
/* ── Tema: sobrescrita para estilo inline (conteúdo gerado via JS) ──
   O app tem milhares de `style="..."` escritos direto no HTML/JS, sem
   classe. Em vez de reescrever cada um, esta camada casa pelo valor
   hexadecimal usado (ex.: color:#8a8a8a) e reaplica com a variável de
   tema equivalente. Em tema escuro isso não muda nada visualmente (a
   variável resolve pro mesmo hex original); em tema claro, resolve pro
   valor claro. Cores de marca/status (roxo, ciano, verde, vermelho,
   âmbar) ficam de fora de propósito — continuam exatas nos dois temas. */
[style*="color:#8a8a8a"],[style*="color: #8a8a8a"]{color:var(--text-muted) !important}
[style*="color:#ededed"],[style*="color: #ededed"]{color:var(--text-primary) !important}
[style*="color:#a1a1a1"],[style*="color: #a1a1a1"]{color:var(--text-secondary) !important}
[style*="color:#b3b3b3"],[style*="color: #b3b3b3"]{color:var(--text-quiet2) !important}
[style*="color:#7a7a7a"],[style*="color: #7a7a7a"]{color:var(--text-faint) !important}
[style*="color:#5c6a6c"],[style*="color: #5c6a6c"]{color:var(--text-dim) !important}
[style*="color:#d4d4d4"],[style*="color: #d4d4d4"]{color:var(--text-quiet) !important}
[style*="color:#333333"],[style*="color: #333333"]{color:var(--text-faint) !important}
[style*="color:#fafafa"],[style*="color: #fafafa"]{color:var(--text-primary) !important}
[style*="color:#c4c4c4"],[style*="color: #c4c4c4"]{color:var(--text-quiet) !important}
[style*="color:#9a9a9a"],[style*="color: #9a9a9a"]{color:var(--text-muted) !important}
[style*="color:#d8d8d8"],[style*="color: #d8d8d8"]{color:var(--text-quiet) !important}
[style*="color:#f5f5f5"],[style*="color: #f5f5f5"]{color:var(--text-primary) !important}
[style*="color:#6b6b6b"],[style*="color: #6b6b6b"]{color:var(--text-muted) !important}
[style*="background:#141414"],[style*="background: #141414"]{background:var(--bg-surface) !important}
[style*="background:#1a1a1a"],[style*="background: #1a1a1a"]{background:var(--bg-surface-alt) !important}
[style*="background:#1f1f1f"],[style*="background: #1f1f1f"]{background:var(--bg-chip) !important}
[style*="background:#1c1c1c"],[style*="background: #1c1c1c"]{background:var(--bg-chip) !important}
[style*="background:#0f0f0f"],[style*="background: #0f0f0f"]{background:var(--bg-sunken) !important}
[style*="background:#0a0a0a"],[style*="background: #0a0a0a"]{background:var(--bg-page) !important}
[style*="background:#131313"],[style*="background: #131313"]{background:var(--bg-row-alt) !important}
[style*="background:#181f20"],[style*="background: #181f20"]{background:var(--bg-row-hover) !important}
[style*="background:#171c1d"],[style*="background: #171c1d"]{background:var(--bg-row-group) !important}
[style*="background:#232323"],[style*="background: #232323"]{background:var(--bg-chip) !important}
[style*="background:#262626"],[style*="background: #262626"]{background:var(--bg-chip) !important}
[style*="background:#333333"],[style*="background: #333333"]{background:var(--bg-chip) !important}
[style*="border-color:#333333"],[style*="border-color: #333333"]{border-color:var(--border-strong) !important}
[style*="border-color:#262626"],[style*="border-color: #262626"]{border-color:var(--border-default) !important}
[style*="border-color:#1f1f1f"],[style*="border-color: #1f1f1f"]{border-color:var(--border-subtle) !important}
[style*="background:#0c2e1e"],[style*="background: #0c2e1e"]{background:var(--tint-green-bg) !important}
[style*="background:#0b241a"],[style*="background: #0b241a"]{background:var(--tint-green-bg-2) !important}
[style*="background:#0f2327"],[style*="background: #0f2327"]{background:var(--tint-cyan-bg) !important}
[style*="background:#12282c"],[style*="background: #12282c"]{background:var(--tint-cyan-bg-2) !important}
[style*="background:#1a1430"],[style*="background: #1a1430"]{background:var(--tint-purple-bg) !important}
[style*="background:#3a1220"],[style*="background: #3a1220"]{background:var(--tint-red-bg) !important}
[style*="background:#33280b"],[style*="background: #33280b"]{background:var(--tint-amber-bg) !important}
[style*="border-color:#1e4a52"],[style*="border-color: #1e4a52"]{border-color:var(--tint-cyan-border) !important}
[style*="border-color:#1d4d35"],[style*="border-color: #1d4d35"]{border-color:var(--tint-green-border) !important}
[style*="border:1px solid #262626"],[style*="border: 1px solid #262626"]{border-color:var(--border-default) !important}
[style*="border:2px solid #262626"],[style*="border: 2px solid #262626"]{border-color:var(--border-default) !important}
[style*="border:1px dashed #262626"],[style*="border: 1px dashed #262626"]{border-color:var(--border-default) !important}
[style*="border:1px solid #3a2a6b"],[style*="border: 1px solid #3a2a6b"]{border-color:var(--tint-purple-border) !important}
[style*="border:1px solid #1f1f1f"],[style*="border: 1px solid #1f1f1f"]{border-color:var(--border-subtle) !important}
[style*="border:1px dashed #2b2b2b"],[style*="border: 1px dashed #2b2b2b"]{border-color:var(--border-default) !important}
[style*="border:1px solid #2b2b2b"],[style*="border: 1px solid #2b2b2b"]{border-color:var(--border-default) !important}
[style*="border:1px solid #1e4a52"],[style*="border: 1px solid #1e4a52"]{border-color:var(--tint-cyan-border) !important}
[style*="border:2px solid #1e4a52"],[style*="border: 2px solid #1e4a52"]{border-color:var(--tint-cyan-border) !important}
[style*="border:1px solid #1d4d35"],[style*="border: 1px solid #1d4d35"]{border-color:var(--tint-green-border) !important}
[style*="border-bottom:1px solid #262626"],[style*="border-bottom: 1px solid #262626"]{border-color:var(--border-default) !important}
[style*="border-top:1px solid #262626"],[style*="border-top: 1px solid #262626"]{border-color:var(--border-default) !important}
[style*="border-right:1px solid #262626"],[style*="border-right: 1px solid #262626"]{border-color:var(--border-default) !important}
[style*="border-bottom:1px solid #1f1f1f"],[style*="border-bottom: 1px solid #1f1f1f"]{border-color:var(--border-subtle) !important}
[style*="border-top:1px solid #1f1f1f"],[style*="border-top: 1px solid #1f1f1f"]{border-color:var(--border-subtle) !important}
[style*="border-right:1px solid #1f1f1f"],[style*="border-right: 1px solid #1f1f1f"]{border-color:var(--border-subtle) !important}
[style*="border-bottom:1px solid #1a1a1a"],[style*="border-bottom: 1px solid #1a1a1a"]{border-color:var(--border-default) !important}
/* Tela de login: fundo é um gradiente radial (não dá pra pegar por
   substring de hex simples) — sobrescreve pelo id, com o equivalente claro. */
html[data-theme="light"] #login-screen{background:radial-gradient(ellipse 120% 90% at 50% -10%,#ffffff 0%,#f1f5f9 40%,#f8fafc 70%,#f8fafc 100%) !important}
/* Subtítulo "Inteligência Comercial" usa um ciano bem claro, pensado pra
   fundo escuro — no fundo claro fica ilegível, então ganha uma cor com
   contraste melhor só no tema claro. */
html[data-theme="light"] #login-screen p[style*="color:#8fd3de"]{color:#0e7490 !important}
/* Quem tem sessão salva não vê o login piscar a cada F5: enquanto o /api/me
   não responde, o formulário fica escondido e aparece só um indicador. */
html.restaurando #login-screen{visibility:hidden}
html.restaurando body::after{content:"";position:fixed;top:50%;left:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border:3px solid rgba(34,211,238,.25);border-top-color:#22d3ee;border-radius:50%;animation:restaurandoGira .8s linear infinite}
@keyframes restaurandoGira{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){html.restaurando body::after{animation-duration:2.4s}}

