/* ================================================================
   ElevaraInvest Dark Mode Overrides
   Applied when <html class="dark"> is set by dark-mode.js.
   Scoped carefully to avoid !important abuse — specificity wins via
   the html.dark prefix which outranks single-class selectors.
================================================================ */

/* Base document */
html.dark body {
  background-color: #0f172a;
  color: #e2e8f0;
}

/* Common background utilities */
html.dark .bg-white { background-color: #1e293b; }
html.dark .bg-gray-50 { background-color: #0f172a; }
html.dark .bg-gray-100 { background-color: #1e293b; }
html.dark .bg-gray-200 { background-color: #334155; }

/* Text utilities */
html.dark .text-gray-900 { color: #f1f5f9; }
html.dark .text-gray-800 { color: #e2e8f0; }
html.dark .text-gray-700 { color: #cbd5e1; }
html.dark .text-gray-600 { color: #94a3b8; }
html.dark .text-gray-500 { color: #64748b; }

/* Border utilities */
html.dark .border-gray-100 { border-color: #1e293b; }
html.dark .border-gray-200 { border-color: #334155; }
html.dark .border-gray-300 { border-color: #475569; }

/* Cards / panels */
html.dark .shadow { box-shadow: 0 1px 3px 0 rgba(0,0,0,.4); }
html.dark .shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,.5); }

/* Inputs and form controls */
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="number"],
html.dark input[type="search"],
html.dark textarea,
html.dark select {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
html.dark input::placeholder,
html.dark textarea::placeholder { color: #64748b; }

/* Tables */
html.dark .bg-gray-50.divide-y { background-color: #0f172a; }
html.dark thead.bg-gray-50 { background-color: #1e293b; }
html.dark tbody.bg-white { background-color: #0f172a; }
html.dark .divide-y > * { border-color: #1e293b; }
html.dark tr:hover { background-color: #1e293b; }

/* Sidebar */
html.dark .sidebar { background-color: #1e293b !important; border-color: #334155; }

/* Navbar */
html.dark nav.bg-white { background-color: #1e293b; border-color: #334155; }

/* Dropdown menus */
html.dark .absolute.bg-white { background-color: #1e293b; border-color: #334155; }
html.dark .hover\:bg-gray-50:hover { background-color: #334155; }
html.dark .hover\:bg-gray-100:hover { background-color: #334155; }

/* Buttons — keep primary blue, adjust secondary */
html.dark .bg-white.border { background-color: #1e293b; border-color: #334155; color: #e2e8f0; }

/* Status badges — keep their own colors intact */
html.dark .bg-green-100 { background-color: #064e3b; }
html.dark .text-green-800 { color: #6ee7b7; }
html.dark .bg-red-100 { background-color: #7f1d1d; }
html.dark .text-red-800 { color: #fca5a5; }
html.dark .bg-yellow-100 { background-color: #78350f; }
html.dark .text-yellow-800 { color: #fcd34d; }
html.dark .bg-blue-100 { background-color: #1e3a5f; }
html.dark .text-blue-800 { color: #93c5fd; }

/* Info/alert blocks */
html.dark .bg-blue-50 { background-color: #172554; }
html.dark .border-blue-200 { border-color: #1d4ed8; }
html.dark .text-blue-800 { color: #93c5fd; }
html.dark .text-blue-700 { color: #60a5fa; }
html.dark .text-blue-600 { color: #3b82f6; }
