/* Tema escuro — ativado pela classe "dark" no <html> (ver index.php).
   Em vez de reescrever cada página com variantes dark:, este arquivo remapeia as
   classes de cor do Tailwind já usadas no app. Para ajustar a paleta, mexa aqui. */
html.dark { color-scheme: dark; }
html.dark body, html.dark body.bg-gray-100 { background-color: #0a101e; color: #e2e8f0; }

html.dark .bg-white { background-color: #111a2e; }
html.dark .bg-gray-100 { background-color: #1b2740; }
html.dark .bg-gray-200 { background-color: #263449; }
html.dark .bg-slate-200 { background-color: #263449; }
html.dark .bg-slate-100 { background-color: #1b2740; }
html.dark .bg-slate-50 { background-color: #16213a; }
html.dark .bg-gray-50 { background-color: #16213a; }
html.dark .bg-slate-300 { background-color: #334155; }
html.dark .bg-slate-900 { background-color: #1b2740; }
html.dark .bg-slate-800 { background-color: #1b2740; }
html.dark .bg-emerald-50 { background-color: rgba(16,185,129,.12); }
html.dark .bg-emerald-100 { background-color: rgba(16,185,129,.18); }
html.dark .bg-red-50 { background-color: rgba(239,68,68,.12); }
html.dark .bg-red-100 { background-color: rgba(239,68,68,.18); }
html.dark .bg-amber-50 { background-color: rgba(245,158,11,.12); }
html.dark .bg-amber-100 { background-color: rgba(245,158,11,.18); }
html.dark .bg-yellow-50 { background-color: rgba(234,179,8,.12); }
html.dark .bg-green-50 { background-color: rgba(34,197,94,.12); }
html.dark .bg-blue-50 { background-color: rgba(59,130,246,.12); }
html.dark .bg-blue-100 { background-color: rgba(59,130,246,.18); }
html.dark .bg-indigo-50 { background-color: rgba(99,102,241,.14); }
html.dark .bg-purple-50 { background-color: rgba(168,85,247,.12); }
html.dark .bg-purple-100 { background-color: rgba(168,85,247,.18); }
html.dark .bg-violet-100 { background-color: rgba(139,92,246,.18); }
html.dark .bg-red-50\/30 { background-color: rgba(239,68,68,.07); }
html.dark .bg-emerald-50\/30 { background-color: rgba(16,185,129,.07); }
html.dark .bg-blue-50\/30 { background-color: rgba(59,130,246,.07); }
html.dark .hover\:bg-slate-50:hover { background-color: #1a2740; }
html.dark .hover\:bg-slate-100:hover { background-color: #1e2c47; }
html.dark .hover\:bg-slate-200:hover { background-color: #2a3a54; }
html.dark .hover\:bg-slate-300:hover { background-color: #334155; }
html.dark .hover\:bg-red-50:hover { background-color: rgba(239,68,68,.16); }
html.dark .text-slate-900 { color: #f1f5f9; }
html.dark .text-slate-800 { color: #e2e8f0; }
html.dark .text-gray-800 { color: #e2e8f0; }
html.dark .text-gray-600 { color: #b4c0d3; }
html.dark .text-slate-700 { color: #cbd5e1; }
html.dark .text-slate-600 { color: #b4c0d3; }
html.dark .text-slate-500 { color: #94a3b8; }
html.dark .text-gray-500 { color: #94a3b8; }
html.dark .text-slate-400 { color: #7c8aa3; }
html.dark .text-slate-300 { color: #56647d; }
html.dark .text-slate-200 { color: #cbd5e1; }
html.dark .text-red-400 { color: #f87171; }
html.dark .text-red-500 { color: #f87171; }
html.dark .text-red-600 { color: #f87171; }
html.dark .text-red-700 { color: #fca5a5; }
html.dark .text-red-800 { color: #fca5a5; }
html.dark .text-emerald-500 { color: #34d399; }
html.dark .text-emerald-600 { color: #34d399; }
html.dark .text-emerald-700 { color: #6ee7b7; }
html.dark .text-emerald-800 { color: #6ee7b7; }
html.dark .text-blue-500 { color: #60a5fa; }
html.dark .text-blue-600 { color: #60a5fa; }
html.dark .text-blue-800 { color: #93c5fd; }
html.dark .text-blue-900 { color: #bfdbfe; }
html.dark .text-indigo-500 { color: #818cf8; }
html.dark .text-indigo-600 { color: #818cf8; }
html.dark .text-indigo-800 { color: #a5b4fc; }
html.dark .text-amber-400 { color: #fbbf24; }
html.dark .text-amber-500 { color: #fbbf24; }
html.dark .text-amber-600 { color: #fbbf24; }
html.dark .text-amber-700 { color: #fcd34d; }
html.dark .text-amber-800 { color: #fcd34d; }
html.dark .text-purple-600 { color: #c084fc; }
html.dark .text-purple-800 { color: #d8b4fe; }
html.dark .text-violet-800 { color: #c4b5fd; }
html.dark .hover\:text-slate-600:hover { color: #e2e8f0; }
html.dark .hover\:text-slate-700:hover { color: #f1f5f9; }
html.dark .hover\:text-indigo-800:hover { color: #c7d2fe; }
html.dark .hover\:text-indigo-600:hover { color: #a5b4fc; }
html.dark .hover\:text-red-600:hover { color: #fca5a5; }
html.dark .hover\:text-red-700:hover { color: #fecaca; }
html.dark .hover\:text-blue-800:hover { color: #bfdbfe; }
html.dark .hover\:text-blue-600:hover { color: #93c5fd; }
html.dark .hover\:text-amber-800:hover { color: #fde68a; }
html.dark .hover\:text-amber-600:hover { color: #fcd34d; }
html.dark .border-gray-100 { border-color: #24324d; }
html.dark .border-gray-200 { border-color: #24324d; }
html.dark .border-gray-300 { border-color: #33435f; }
html.dark .border-slate-100 { border-color: #24324d; }
html.dark .border-slate-200 { border-color: #24324d; }
html.dark .border-slate-300 { border-color: #33435f; }
html.dark .border-emerald-200 { border-color: rgba(16,185,129,.35); }
html.dark .border-emerald-400 { border-color: rgba(16,185,129,.5); }
html.dark .border-red-200 { border-color: rgba(239,68,68,.35); }
html.dark .border-red-400 { border-color: rgba(239,68,68,.5); }
html.dark .border-amber-200 { border-color: rgba(245,158,11,.35); }
html.dark .border-indigo-200 { border-color: rgba(99,102,241,.4); }
html.dark .border-blue-200 { border-color: rgba(59,130,246,.4); }
html.dark .border-purple-200 { border-color: rgba(168,85,247,.4); }
html.dark .border-slate-50 { border-color: #24324d; }
html.dark .border-slate-800 { border-color: #1e2a44; }
html.dark .divide-slate-50 > :not([hidden]) ~ :not([hidden]) { border-color: #24324d; }
html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: #24324d; }
html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #24324d; }
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #24324d; }

/* Menu lateral: mais escuro que os cartões, com divisória, e links claros */
html.dark #sidebar { background-color: #060b17; border-right: 1px solid #1a2540; }
html.dark #sidebar .text-slate-300 { color: #cbd5e1; }
html.dark #sidebar .text-slate-400 { color: #94a3b8; }
html.dark #sidebar .hover\:bg-slate-800:hover { background-color: #16213a; }
html.dark #btnAbrirMenu { background-color: #16213a; }

/* Cabeçalhos escuros de tabela (bg-slate-900 text-white) mantêm o texto claro */
html.dark .bg-slate-900.text-white, html.dark .bg-slate-900 .text-white { color: #f1f5f9; }

/* Campos de formulário */
html.dark input, html.dark select, html.dark textarea {
    background-color: #0d1527; color: #e2e8f0; border-color: #33435f;
}
html.dark input::placeholder, html.dark textarea::placeholder { color: #5b6a84; }
html.dark input:disabled, html.dark select:disabled { background-color: #131c30; color: #7c8aa3; }
html.dark input:focus, html.dark select:focus, html.dark textarea:focus { border-color: #3b82f6; }
html.dark option { background-color: #0d1527; color: #e2e8f0; }

/* Sombras mais discretas e rolagem */
html.dark .shadow-sm, html.dark .shadow, html.dark .shadow-lg, html.dark .shadow-xl { box-shadow: 0 1px 3px rgba(0,0,0,.45); }
html.dark ::-webkit-scrollbar { width: 10px; height: 10px; }
html.dark ::-webkit-scrollbar-track { background: #0a101e; }
html.dark ::-webkit-scrollbar-thumb { background: #2a3a54; border-radius: 6px; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #3b4d6d; }

/* Botão de alternar tema */
#btnTema { transition: background-color .15s; }