/* Tema claro/escuro das telas de entrada: login, tipo de acesso e código 2FA (carregado por views/partials/tema_entrada_head.php).
   O claro fica exatamente como era: tudo aqui (fora o botão) vale só com html[data-dpv-tema="escuro"], dentro da moldura .fh-entrada.
   Cores = as do tema do sistema (assets/css/tema-tokens.css), repetidas aqui porque essas telas não carregam a moldura .rt.
   Regra do tema: escolha guardada no navegador (localStorage dpv-tema) vence; sem escolha, segue o sistema operacional.
   Botão de lua/sol: [data-fh-tema] (views/partials/tema_entrada_botao.php). */

/* Botão de lua/sol (os dois temas) */
.fh-tema-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px;
    border: 1px solid rgba(15, 23, 42, 0.15); background: rgba(255, 255, 255, 0.85); color: #0f172a; cursor: pointer; font-size: 15px;
    padding: 0; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.fh-tema-btn:hover { background: #ffffff; border-color: rgba(15, 23, 42, 0.3); }
.fh-tema-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.fh-tema-btn-fixo { position: fixed; top: 1rem; right: 1rem; z-index: 60; }

/* ===== Escuro ===== */
html[data-dpv-tema="escuro"] body { background: #181c30 !important; }
html[data-dpv-tema="escuro"] .fh-entrada { background: #181c30; color: #f8fafc; color-scheme: dark; }
html[data-dpv-tema="escuro"] .fh-tema-btn { border-color: rgba(255, 255, 255, 0.14); background: #0f172a; color: #f8fafc; }
html[data-dpv-tema="escuro"] .fh-tema-btn:hover { background: rgba(195, 255, 0, 0.12); border-color: rgba(195, 255, 0, 0.35); color: #c3ff00; }

/* Painel ilustrado (galáxia / comunicados): azul mais fundo no escuro */
html[data-dpv-tema="escuro"] .fh-entrada .fh-entrada-visual { background: linear-gradient(135deg, #1e40af 0%, #172554 55%, #0f172a 100%); }

/* Textos (classes Tailwind das telas) */
html[data-dpv-tema="escuro"] .fh-entrada .text-gray-800, html[data-dpv-tema="escuro"] .fh-entrada .text-gray-900,
html[data-dpv-tema="escuro"] .fh-entrada .text-slate-800, html[data-dpv-tema="escuro"] .fh-entrada .text-slate-900 { color: #f8fafc; }
html[data-dpv-tema="escuro"] .fh-entrada .text-gray-700, html[data-dpv-tema="escuro"] .fh-entrada .text-gray-600,
html[data-dpv-tema="escuro"] .fh-entrada .text-slate-700, html[data-dpv-tema="escuro"] .fh-entrada .text-slate-600 { color: #cbd5e1; }
html[data-dpv-tema="escuro"] .fh-entrada .text-gray-500, html[data-dpv-tema="escuro"] .fh-entrada .text-slate-500 { color: #94a3b8; }
html[data-dpv-tema="escuro"] .fh-entrada .text-gray-400 { color: #64748b; }
html[data-dpv-tema="escuro"] .fh-entrada .hover\:text-gray-800:hover { color: #f8fafc; }
html[data-dpv-tema="escuro"] .fh-entrada .text-amber-600 { color: #fbbf24; }
html[data-dpv-tema="escuro"] .fh-entrada .text-green-600 { color: #4ade80; }

/* Cartão do formulário, cartões dos comunicados e botão desligado */
html[data-dpv-tema="escuro"] .fh-entrada .card { background-color: #1c2238; border-color: rgba(255, 255, 255, 0.08); box-shadow: none; }
html[data-dpv-tema="escuro"] .fh-entrada article.bg-white { background-color: #1c2238; }
html[data-dpv-tema="escuro"] .fh-entrada .border-gray-100, html[data-dpv-tema="escuro"] .fh-entrada .border-gray-200,
html[data-dpv-tema="escuro"] .fh-entrada .border-slate-100 { border-color: rgba(255, 255, 255, 0.08); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-gray-300 { background-color: #334155; color: #94a3b8; }

/* Campos do login */
html[data-dpv-tema="escuro"] .fh-entrada input[type="text"], html[data-dpv-tema="escuro"] .fh-entrada input[type="password"] {
    background-color: #0f172a; border-color: rgba(255, 255, 255, 0.14); color: #f8fafc; }
html[data-dpv-tema="escuro"] .fh-entrada input[type="text"]:focus, html[data-dpv-tema="escuro"] .fh-entrada input[type="password"]:focus {
    border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
html[data-dpv-tema="escuro"] .fh-entrada input::placeholder { color: #64748b; }
html[data-dpv-tema="escuro"] .fh-entrada input:-webkit-autofill { -webkit-text-fill-color: #f8fafc; -webkit-box-shadow: 0 0 0 1000px #0f172a inset; }

/* Avisos (erro de login, mensagem de erro, selos dos comunicados) */
html[data-dpv-tema="escuro"] .fh-entrada .bg-red-100 { background-color: rgba(239, 68, 68, 0.14); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-red-50 { background-color: rgba(239, 68, 68, 0.1); }
html[data-dpv-tema="escuro"] .fh-entrada .text-red-700 { color: #fca5a5; }
html[data-dpv-tema="escuro"] .fh-entrada .border-red-400, html[data-dpv-tema="escuro"] .fh-entrada .border-red-200 { border-color: rgba(239, 68, 68, 0.45); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-yellow-100 { background-color: rgba(245, 158, 11, 0.14); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-yellow-50 { background-color: rgba(245, 158, 11, 0.1); }
html[data-dpv-tema="escuro"] .fh-entrada .text-yellow-700 { color: #fcd34d; }
html[data-dpv-tema="escuro"] .fh-entrada .border-yellow-400, html[data-dpv-tema="escuro"] .fh-entrada .border-yellow-200 { border-color: rgba(245, 158, 11, 0.45); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-orange-100 { background-color: rgba(249, 115, 22, 0.14); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-orange-50 { background-color: rgba(249, 115, 22, 0.1); }
html[data-dpv-tema="escuro"] .fh-entrada .text-orange-700 { color: #fdba74; }
html[data-dpv-tema="escuro"] .fh-entrada .border-orange-400, html[data-dpv-tema="escuro"] .fh-entrada .border-orange-200 { border-color: rgba(249, 115, 22, 0.45); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-blue-100 { background-color: rgba(56, 189, 248, 0.14); }
html[data-dpv-tema="escuro"] .fh-entrada .text-blue-700 { color: #7dd3fc; }
html[data-dpv-tema="escuro"] .fh-entrada .border-blue-400 { border-color: rgba(56, 189, 248, 0.45); }
html[data-dpv-tema="escuro"] .fh-entrada .bg-amber-50 { background-color: rgba(245, 158, 11, 0.14); }
html[data-dpv-tema="escuro"] .fh-entrada .text-amber-800 { color: #fcd34d; }
html[data-dpv-tema="escuro"] .fh-entrada .border-amber-200 { border-color: rgba(245, 158, 11, 0.4); }

/* Reações dos comunicados (tipo de acesso) */
html[data-dpv-tema="escuro"] .fh-entrada .lc-reacao { background: rgba(148, 163, 184, 0.1); border-color: rgba(255, 255, 255, 0.14); color: #cbd5e1; }
html[data-dpv-tema="escuro"] .fh-entrada .lc-reacao:hover { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.45); }
html[data-dpv-tema="escuro"] .fh-entrada .lc-reacao.lc-minha { background: rgba(56, 189, 248, 0.16); border-color: #38bdf8; color: #7dd3fc; }

/* Código 2FA (classes próprias da tela; o body é a moldura) */
html[data-dpv-tema="escuro"] body.fh-2fa { background: linear-gradient(135deg, #1e1b4b 0%, #181c30 100%) !important; }
html[data-dpv-tema="escuro"] .fh-2fa .card-2fa { background: #1c2238; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45); }
html[data-dpv-tema="escuro"] .fh-2fa h2 { color: #f8fafc; }
html[data-dpv-tema="escuro"] .fh-2fa .info-text, html[data-dpv-tema="escuro"] .fh-2fa .timer { color: #cbd5e1; }
html[data-dpv-tema="escuro"] .fh-2fa .email-badge { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
html[data-dpv-tema="escuro"] .fh-2fa .code-digit { background: #0f172a; border-color: rgba(255, 255, 255, 0.14); color: #f8fafc; }
html[data-dpv-tema="escuro"] .fh-2fa .code-digit:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25); }
html[data-dpv-tema="escuro"] .fh-2fa .btn-resend { background: #0f172a; color: #cbd5e1; border-color: rgba(255, 255, 255, 0.14); }
html[data-dpv-tema="escuro"] .fh-2fa .btn-resend:hover:not(:disabled) { background: #141a2e; }
html[data-dpv-tema="escuro"] .fh-2fa .error-message { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
html[data-dpv-tema="escuro"] .fh-2fa .confiar-2fa { background: rgba(129, 140, 248, 0.1); border-color: rgba(129, 140, 248, 0.3); }
html[data-dpv-tema="escuro"] .fh-2fa .confiar-2fa-label { color: #f8fafc; }
html[data-dpv-tema="escuro"] .fh-2fa .confiar-2fa-nota, html[data-dpv-tema="escuro"] .fh-2fa .nota-2fa { color: #94a3b8; }
