/* Dark mode da Central — overrides da paleta Tailwind (slate/white) sob html.dark.
   Especificidade html.dark .x (0,2,1) vence as utilities .x (0,1,0), independente da ordem.
   Tudo em @media screen pra NÃO afetar a impressão (proposta sai sempre em folha branca). */
@media screen {
  html.dark body { background-color: #0f172a; color: #e2e8f0; }

  /* fundos */
  html.dark .bg-slate-100 { background-color: #0f172a; }
  html.dark .bg-white     { background-color: #1e293b; }
  html.dark .bg-slate-50  { background-color: #1e2a3d; }

  /* bordas (default do preflight + classes explícitas) */
  html.dark *, html.dark ::before, html.dark ::after { border-color: #334155; }
  html.dark .border-slate-200 { border-color: #334155; }
  html.dark .border-slate-300 { border-color: #475569; }

  /* textos */
  html.dark .text-slate-900 { color: #f1f5f9; }
  html.dark .text-slate-800 { color: #e8edf4; }
  html.dark .text-slate-700 { color: #e2e8f0; }
  html.dark .text-slate-600 { color: #cbd5e1; }
  html.dark .text-slate-500 { color: #97a6bb; }
  html.dark .text-slate-400 { color: #7c8aa0; }

  /* links / acentos emerald (clarear pra ler no escuro) */
  html.dark .text-emerald-700 { color: #34d399; }
  html.dark .text-emerald-600 { color: #34d399; }
  html.dark .text-red-600 { color: #f87171; }
  html.dark .text-amber-700 { color: #fbbf24; }

  /* botões/abas escuros (bg-slate-900 some no fundo escuro) */
  html.dark .bg-slate-900 { background-color: #475569; }
  html.dark .hover\:bg-slate-700:hover { background-color: #64748b; }
  html.dark .hover\:bg-slate-100:hover { background-color: #334155; }
  html.dark .hover\:bg-slate-50:hover  { background-color: #1b2740; }

  /* campos de formulário */
  html.dark input, html.dark select, html.dark textarea {
    background-color: #0f172a !important; color: #e7edf5; border-color: #475569;
  }
  html.dark input::placeholder, html.dark textarea::placeholder { color: #64748b; }
  html.dark select option { background-color: #1e293b; color: #e7edf5; }
}

/* Botão flutuante de alternância (estilo em ambos os temas; escondido na impressão) */
.ef-theme-toggle {
  position: fixed; right: 14px; bottom: 14px; z-index: 50;
  width: 42px; height: 42px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; cursor: pointer;
  background: #fff; border: 1px solid #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
html.dark .ef-theme-toggle { background: #1e293b; border-color: #475569; }
@media print { .ef-theme-toggle { display: none !important; } }
