body {
  font-family: "Inter", sans-serif;
  background-color: #f3f4f6;
}
/* --- Dark Mode Overrides --- */
.dark body { background-color: #0f172a; color: #e5e7eb; }
.dark #app-container { background-color: #0b1220; color: #e5e7eb; }
.dark header { background-color: #0b1220 !important; color: #e5e7eb !important; }
.dark .bg-white { background-color: #1f2937 !important; }
.dark .bg-gray-50 { background-color: #111827 !important; }
.dark .text-gray-800 { color: #e5e7eb !important; }
.dark .text-gray-700 { color: #d1d5db !important; }
.dark .text-gray-600 { color: #cbd5e1 !important; }
.dark .text-gray-500 { color: #9ca3af !important; }
.dark .border-gray-200 { border-color: #374151 !important; }
.dark .border-gray-300 { border-color: #4b5563 !important; }
.dark .bg-gray-200 { background-color: #374151 !important; }
.dark .tooltip-text { background-color: #111827 !important; color: #e5e7eb !important; }
.dark .modal-content { background-color: #111827 !important; color: #e5e7eb !important; }
.dark input, .dark textarea, .dark select { background-color: #0b1220; color: #e5e7eb; border-color: #374151; }
.dark input::placeholder, .dark textarea::placeholder { color: #9ca3af; }
.dark .view-only-badge { background: #fbbf24; color: #78350f; }
.dark .notification { background: #111827; color: #e5e7eb; }
.dark .answer-radio-group input[type="radio"]:checked + label { background-color: #0b1220; border-color: #4b5563; box-shadow: 0 0 0 3px rgba(75,85,99,0.25); }
.dark .answer-radio-group input[type="radio"]:checked + label.ans-g { background-color: #052e16; border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.25); }
.dark .answer-radio-group input[type="radio"]:checked + label.ans-y { background-color: #422006; border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,0.25); }
.dark .answer-radio-group input[type="radio"]:checked + label.ans-r { background-color: #450a0a; border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.25); }

/* Dark mode fixes for light backgrounds */
.dark .bg-gray-100 { background-color: #1f2937 !important; color: #e5e7eb !important; }
.dark .bg-green-100 { background-color: #064e3b !important; color: #d1fae5 !important; }
.dark .bg-yellow-100 { background-color: #422006 !important; color: #fef9c3 !important; }
.dark .bg-red-100 { background-color: #450a0a !important; color: #fee2e2 !important; }
.dark .bg-blue-100 { background-color: #0c4a6e !important; color: #e0f2fe !important; }
.dark .bg-purple-100 { background-color: #581c87 !important; color: #e9d5ff !important; }

/* Ensure text on tinted dark backgrounds is readable */
.dark .text-green-800 { color: #86efac !important; }
.dark .text-yellow-800 { color: #fde68a !important; }
.dark .text-red-800 { color: #fca5a5 !important; }
.dark .text-blue-600 { color: #93c5fd !important; }
.dark .text-blue-800 { color: #93c5fd !important; }
.dark .text-purple-800 { color: #c084fc !important; }

/* Dark mode hover fixes */
.dark .hover\:bg-green-200:hover { background-color: #065f46 !important; color: #d1fae5 !important; }
.dark .hover\:bg-yellow-200:hover { background-color: #713f12 !important; color: #fef9c3 !important; }
.dark .hover\:bg-gray-300:hover { background-color: #1f2937 !important; color: #e5e7eb !important; }
.dark .hover\:bg-gray-200:hover { background-color: #111827 !important; color: #e5e7eb !important; }
.dark .hover\:bg-blue-200:hover { background-color: #1e40af !important; color: #93c5fd !important; }
.dark .hover\:bg-purple-200:hover { background-color: #6b21a8 !important; color: #c084fc !important; }

/* Hover for answer options */
.dark .answer-radio-group label:hover { border-color: #4b5563; background-color: #0b1220; }

/* Additional Dark Mode Styles for New Features */

/* Buttons - Blue, Indigo, Purple, Green, Yellow variants */
.dark .bg-blue-600 { background-color: #1e40af !important; }
.dark .bg-blue-700 { background-color: #1e3a8a !important; }
.dark .hover\:bg-blue-700:hover { background-color: #1e3a8a !important; }
.dark .bg-indigo-600 { background-color: #4f46e5 !important; }
.dark .bg-indigo-700 { background-color: #4338ca !important; }
.dark .hover\:bg-indigo-700:hover { background-color: #4338ca !important; }
.dark .bg-purple-600 { background-color: #9333ea !important; }
.dark .bg-green-600 { background-color: #16a34a !important; }
.dark .bg-yellow-600 { background-color: #ca8a04 !important; }

/* Shadows - adjust for dark mode */
.dark .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important; }
.dark .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3) !important; }

/* Border colors - Blue variants */
.dark .border-blue-200 { border-color: #1e3a8a !important; }
.dark .border-blue-300 { border-color: #2563eb !important; }

/* Text colors - Blue variants */
.dark .text-blue-600 { color: #60a5fa !important; }

/* Dropdown menus */
.dark .bg-white.border { background-color: #1f2937 !important; border-color: #374151 !important; }
.dark .border-gray-100 { border-color: #374151 !important; }
.dark .hover\:bg-blue-50:hover { background-color: #1e3a8a !important; color: #e5e7eb !important; }

/* Dependency section - blue background container */
.dark .bg-blue-50 { background-color: #1e3a8a !important; color: #e5e7eb !important; }
.dark .bg-blue-50.border { border-color: #3b82f6 !important; }

/* Category tabs and buttons */
.dark button.bg-white { background-color: #1f2937 !important; }
.dark button.text-blue-600 { color: #60a5fa !important; }
.dark button.hover\:text-gray-800:hover { color: #e5e7eb !important; }

/* Range input slider */
.dark input[type="range"] { 
  background-color: #374151 !important; 
  background-image: none !important;
}
.dark input[type="range"]::-webkit-slider-thumb { 
  background-color: #3b82f6 !important; 
  border: 2px solid #1e40af !important;
}
.dark input[type="range"]::-moz-range-thumb { 
  background-color: #3b82f6 !important; 
  border: 2px solid #1e40af !important;
}
/* Range slider track - ensure gradient works in dark mode */
.dark input[type="range"][style*="linear-gradient"] {
  background: linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--slider-progress, 0%), #4b5563 var(--slider-progress, 0%), #4b5563 100%) !important;
}

/* Red text variants for delete buttons */
.dark .text-red-600 { color: #f87171 !important; }
.dark .hover\:text-red-800:hover { color: #fca5a5 !important; }


/* Additional background colors */
.dark .bg-gray-50.text-gray-700 { background-color: #111827 !important; color: #d1d5db !important; }

/* Select dropdowns */
.dark select.bg-white { background-color: #1f2937 !important; color: #e5e7eb !important; }

/* Option elements in select */
.dark select option { background-color: #1f2937 !important; color: #e5e7eb !important; }

/* Rounded corners with shadows */
.dark .rounded-xl { border-color: #374151 !important; }

/* Main container background */
.dark main { background-color: #0b1220 !important; }

/* Admin Questions Page specific */
.dark .max-w-7xl.bg-white { background-color: #1f2937 !important; }
.dark .border-b.border-gray-200 { border-color: #374151 !important; }
.dark #admin-manage-questions-btn { background-color: #4f46e5 !important; }
.dark #admin-manage-questions-btn:hover { background-color: #4338ca !important; }

/* Additional text color variants */
.dark .text-gray-800 { color: #e5e7eb !important; }
.dark .text-gray-700 { color: #d1d5db !important; }

/* Focus ring colors */
.dark .focus\:ring-blue-500:focus { --tw-ring-color: #3b82f6 !important; }
.dark .focus\:border-blue-500:focus { border-color: #3b82f6 !important; }

/* Green, Yellow, Red, Blue, Purple gradient cards */
.dark .from-green-500.to-green-600 { background: linear-gradient(to right, #10b981, #059669) !important; }
.dark .from-yellow-500.to-yellow-600 { background: linear-gradient(to right, #f59e0b, #d97706) !important; }
.dark .from-blue-500.to-blue-600 { background: linear-gradient(to right, #3b82f6, #2563eb) !important; }
.dark .from-purple-500.to-purple-600 { background: linear-gradient(to right, #7c3aed, #6d28d9) !important; }

/* Border radius and overflow */
.dark .overflow-hidden { border-color: #374151 !important; }

/* Input focus states */
.dark input:focus, .dark textarea:focus, .dark select:focus { 
  border-color: #3b82f6 !important; 
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Checkbox styling */
.dark input[type="checkbox"] { 
  background-color: #1f2937 !important; 
  border-color: #4b5563 !important;
}
.dark input[type="checkbox"]:checked { 
  background-color: #3b82f6 !important; 
  border-color: #3b82f6 !important;
}

/* Range slider value display */
.dark .bg-gray-100.px-2 { background-color: #1f2937 !important; color: #e5e7eb !important; border-color: #374151 !important; }
.dark .min-w-\[24px\] { color: #e5e7eb !important; }
.dark .bg-gray-100.border { background-color: #1f2937 !important; border-color: #374151 !important; }
.dark .border-gray-300 { border-color: #4b5563 !important; }

/* Accent color for range slider */
.dark .accent-blue-600 { accent-color: #3b82f6 !important; }

/* Buttons */
#next-question-btn { background-color: #0ea5e9; }
#next-question-btn:hover { background-color: #0284c7; }
#prev-question-btn { background-color: #6b7280; color: #111827; }
#prev-question-btn:hover { background-color: #4b5563; color: #f9fafb; }
#new-audit-btn { background-color: #7c3aed !important; }
#new-audit-btn:hover { background-color: #6d28d9 !important; }
#start-audit-btn { background-color: #10b981 !important; }
#start-audit-btn:hover { background-color: #059669 !important; }
#save-btn { background-color: #334155; color: #e5e7eb; }
#save-btn:hover { background-color: #1f2937; }
.dark #next-question-btn { background-color: #0a3a5c; color: #f9fafb; }
.dark #next-question-btn:hover { background-color: #082f4a; }
.dark #prev-question-btn { background-color: #111827; color: #e5e7eb; }
.dark #prev-question-btn:hover { background-color: #0b1220; }
.dark #next-question-btn i, .dark #prev-question-btn i { color: #f9fafb; }
.dark #new-audit-btn { background-color: #5b21b6 !important; }
.dark #new-audit-btn:hover { background-color: #4c1d95 !important; }
.dark #start-audit-btn { background-color: #065f46 !important; }
.dark #start-audit-btn:hover { background-color: #064e3b !important; }
.dark #save-btn { background-color: #111827; color: #e5e7eb; }
.dark #save-btn:hover { background-color: #0b1220; }

.screen { display: none; animation: fadeIn 0.3s ease-in-out; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 50; animation: fadeIn 0.2s ease-in-out; }
.modal-content { background-color: white; padding: 2rem; border-radius: 0.5rem; width: 90%; max-width: 500px; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.answer-radio-group label { display: block; padding: 0.75rem 1rem; border: 2px solid #e5e7eb; border-radius: 0.5rem; margin-bottom: 0.5rem; cursor: pointer; transition: all 0.2s ease-in-out; }
.answer-radio-group label:hover { border-color: #93c5fd; background-color: #f0f9ff; }
.answer-radio-group input[type="radio"]:checked + label { border-color: #94a3b8; background-color: #f1f5f9; font-weight: 600; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15); }
.answer-radio-group input[type="radio"]:checked + label.ans-g { border-color: #22c55e; background-color: #f0fdf4; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
.answer-radio-group input[type="radio"]:checked + label.ans-y { border-color: #f59e0b; background-color: #fffbeb; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15); }
.answer-radio-group input[type="radio"]:checked + label.ans-r { border-color: #ef4444; background-color: #fef2f2; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
.answer-radio-group input[type="radio"] { display: none; }

.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 0.5rem; }
.status-g { color: #16a34a; }
.status-r { color: #dc2626; }
.status-y { color: #f59e0b; }

.category-tab { transition: all 0.2s ease-in-out; position: relative; }
.category-tab.active-tab { color: #3b82f6 !important; border-color: #3b82f6 !important; }
.category-tab.completed::after { content: "✓"; position: absolute; top: 0; right: -8px; background: #16a34a; color: white; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }

.audit-card { transition: all 0.2s ease-in-out; }
.audit-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }

.progress-segment { transition: width 0.5s ease-out; }

.tooltip { position: relative; }
.tooltip-text { visibility: hidden; background-color: #1f2937; color: white; text-align: center; border-radius: 6px; padding: 5px 10px; position: absolute; z-index: 100; bottom: 125%; left: 50%; margin-left: -60px; opacity: 0; transition: opacity 0.3s; font-size: 0.75rem; white-space: nowrap; }
.tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

.notification { position: fixed; top: 20px; right: 20px; background: white; padding: 1rem 1.5rem; border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); display: flex; align-items: center; z-index: 100; animation: slideInRight 0.3s ease-out; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.notification.success { border-left: 4px solid #16a34a; }
.notification.info { border-left: 4px solid #3b82f6; }
.notification.warning { border-left: 4px solid #f59e0b; }

/* --- Keyboard shortcuts visuals (temporarily disabled) ---
.keyboard-shortcut { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.875rem; border: 1px solid #d1d5db; }
.dark .keyboard-shortcut { background: #111827; border-color: #374151; color: #e5e7eb; }
*/

.view-only-badge { background: #fbbf24; color: #78350f; padding: 0.25rem 0.75rem; border-radius: 0.25rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
.animate-bounce { animation: bounce 1s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); } 50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); } }


