/* dark-mode.css — Global overrides when <html class="dark"> is set */

html.dark body {
    background-color: #0f172a !important;
    color: #e2e8f0;
}

/* Surfaces */
html.dark .bg-white { background-color: #1e293b !important; }
html.dark .bg-gray-50,
html.dark .bg-gray-50\/30,
html.dark .bg-gray-50\/50 { background-color: #1e293b !important; }
html.dark .bg-gray-100 { background-color: #334155 !important; }
html.dark .bg-gray-200 { background-color: #475569 !important; }
html.dark .bg-slate-50 { background-color: #1e293b !important; }
html.dark .bg-\[\#f8f9fa\] { background-color: #0f172a !important; }
html.dark .bg-\[\#1e293b\] { background-color: #0f172a !important; }
html.dark .bg-black\/50,
html.dark .bg-black\/60 { background-color: rgba(0,0,0,0.7) !important; }

/* Text */
html.dark .text-gray-800,
html.dark .text-gray-900,
html.dark .text-slate-800 { color: #e2e8f0 !important; }
html.dark .text-gray-700 { color: #cbd5e1 !important; }
html.dark .text-gray-600,
html.dark .text-gray-500 { color: #94a3b8 !important; }
html.dark .text-gray-400 { color: #64748b !important; }
html.dark .text-gray-300 { color: #475569 !important; }

/* Borders */
html.dark .border-gray-50,
html.dark .border-gray-100 { border-color: #334155 !important; }
html.dark .border-gray-200,
html.dark .border-gray-300 { border-color: #475569 !important; }
html.dark .divide-gray-50 > * + *,
html.dark .divide-gray-100 > * + * { border-color: #334155 !important; }

/* Hover */
html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover { background-color: #334155 !important; }
html.dark .hover\:bg-gray-200:hover { background-color: #475569 !important; }

/* Forms */
html.dark .form-input,
html.dark .form-select,
html.dark input.form-input,
html.dark select.form-input,
html.dark textarea.form-input {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.dark .form-input::placeholder { color: #64748b !important; }
html.dark .form-label { color: #cbd5e1 !important; }
html.dark option { background-color: #1e293b; color: #e2e8f0; }
html.dark input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

/* Pastel surface tints — keep accent but darken */
html.dark .bg-orange-50,
html.dark .bg-\[\#ffedd5\] { background-color: rgba(249,115,22,0.18) !important; }
html.dark .bg-red-50,
html.dark .bg-red-50\/30 { background-color: rgba(239,68,68,0.15) !important; }
html.dark .bg-green-50 { background-color: rgba(34,197,94,0.15) !important; }
html.dark .bg-blue-50 { background-color: rgba(59,130,246,0.15) !important; }
html.dark .bg-yellow-50 { background-color: rgba(234,179,8,0.15) !important; }
html.dark .bg-purple-50 { background-color: rgba(168,85,247,0.15) !important; }
html.dark .bg-amber-50 { background-color: rgba(245,158,11,0.15) !important; }

/* Pastel accent text — keep readable */
html.dark .text-orange-700,
html.dark .text-\[\#9a3412\] { color: #fed7aa !important; }
html.dark .text-red-700 { color: #fecaca !important; }
html.dark .text-green-700 { color: #bbf7d0 !important; }
html.dark .text-blue-700 { color: #bfdbfe !important; }
html.dark .text-yellow-700 { color: #fde68a !important; }
html.dark .text-purple-700 { color: #e9d5ff !important; }
html.dark .text-amber-700 { color: #fde68a !important; }

/* Gradient nav backgrounds (modal headers) → flatten */
html.dark [class*="from-orange-50"],
html.dark [class*="from-blue-50"],
html.dark [class*="from-red-50"],
html.dark [class*="from-green-50"] { background: #1e293b !important; }

/* Light pastel chips */
html.dark .bg-orange-100 { background-color: rgba(249,115,22,0.25) !important; color: #fed7aa !important; }
html.dark .bg-red-100 { background-color: rgba(239,68,68,0.25) !important; color: #fecaca !important; }
html.dark .bg-green-100 { background-color: rgba(34,197,94,0.25) !important; color: #bbf7d0 !important; }
html.dark .bg-blue-100 { background-color: rgba(59,130,246,0.25) !important; color: #bfdbfe !important; }
html.dark .bg-yellow-100 { background-color: rgba(234,179,8,0.25) !important; color: #fde68a !important; }
html.dark .bg-purple-100 { background-color: rgba(168,85,247,0.25) !important; color: #e9d5ff !important; }
html.dark .bg-amber-100 { background-color: rgba(245,158,11,0.25) !important; color: #fde68a !important; }

/* Tables — striping */
html.dark thead.bg-\[\#ffedd5\],
html.dark thead.bg-orange-50 { background-color: rgba(249,115,22,0.18) !important; }
html.dark tbody tr.bg-white { background-color: #1e293b !important; }
html.dark tbody tr.bg-red-50\/30 { background-color: rgba(239,68,68,0.12) !important; }

/* Custom scrollbar */
html.dark .custom-scroll::-webkit-scrollbar-track { background: #1e293b !important; }
html.dark .custom-scroll::-webkit-scrollbar-thumb { background: #475569 !important; }

/* Shadows softened (white shadows look weird in dark) */
html.dark .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.3) !important; }
html.dark .shadow,
html.dark .shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.4) !important; }
html.dark .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5) !important; }
html.dark .shadow-xl,
html.dark .shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7) !important; }

/* Login page card overrides */
html.dark .auth-card { background-color: #1e293b !important; }
