@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

*[style*="font-weight:600"], *[style*="font-weight: 600"],
*[style*="font-weight:700"], *[style*="font-weight: 700"],
*[style*="font-weight:800"], *[style*="font-weight: 800"],
*[style*="font-weight:900"], *[style*="font-weight: 900"] { font-weight: 500 !important; }

[style*="linear-gradient"], [style*="radial-gradient"] { background-image: none !important; }

:root {
    --bg-primary: #020B1A;
    --bg-surface: #0A1931;
    --brand-accent: #2290FF;
    --brand-purple: #6A4DFF;
    --brand-cyan: #2290FF;
    --text-primary: #EEF7FF;
    --text-secondary: #A8B8D0;
    --text-tertiary: #8B9DBE;
    --bg-light: #ffffff;

    --color-success: #22C55E;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-success-soft: #F0FDF4;
    --color-warning-soft: #FFFBEB;
    --color-danger-soft: #FEF2F2;

    --navy: #020B1A;
    --navy-hex: #020B1A;
    --navy-foreground: #ffffff;
    --navy-foreground-hex: #ffffff;
    --sky: #ffffff;
    --sky-hex: #ffffff;
    --background: #ffffff;
    --background-hex: #ffffff;
    --foreground: #020B1A;
    --foreground-hex: #020B1A;
    --card: #ffffff;
    --card-hex: #ffffff;
    --card-foreground: #020B1A;
    --border: #E2E5E0;
    --border-hex: #E2E5E0;
    --muted: #F6F5F2;
    --muted-hex: #F6F5F2;
    --muted-foreground: #8B9DBE;
    --muted-foreground-hex: #8B9DBE;
    --ring: #2290FF;
    --ring-hex: #2290FF;
    --input: #E2E5E0;

    --primary: var(--navy);
    --primary-hex: var(--navy-hex);
    --accent: var(--brand-accent);
    --accent-soft: rgba(34,144,255,0.10);
    --purple-soft: rgba(106,77,255,0.10);
    --cyan-soft: rgba(34,144,255,0.10);
    --bg: var(--background);
    --bg-alt: var(--muted);
    --text: var(--foreground);
    --text-muted: var(--muted-foreground);
    --text-faint: var(--text-tertiary);

    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-btn: 100px;
    --radius-card: 16px;
    --radius-chip: 100px;

    --shadow-xs: 0 1px 2px rgba(2, 11, 26, 0.04);
    --shadow-sm: 0 1px 3px rgba(2, 11, 26, 0.06), 0 1px 2px rgba(2, 11, 26, 0.04);
    --shadow: 0 4px 12px -2px rgba(2, 11, 26, 0.08), 0 2px 4px -2px rgba(2, 11, 26, 0.04);
    --shadow-lg: 0 12px 24px -6px rgba(2, 11, 26, 0.12), 0 4px 8px -4px rgba(2, 11, 26, 0.06);

    --transition: all .2s cubic-bezier(.4, 0, .2, 1);
    --transition-colors: background-color .2s ease, color .2s ease, border-color .2s ease;

    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
@media (min-width: 1920px) { html { font-size: 17px; } }
@media (min-width: 2560px) { html { font-size: 19px; } }
@media (min-width: 3200px) { html { font-size: 22px; } }
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img { image-rendering: -webkit-optimize-contrast; }
}

/* Micro-animations (clean / sutis) */
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.55; } }
.avanti-card, .quick-card, .metric-card { transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s ease, border-color .18s ease; }
.avanti-card:hover, .quick-card:hover, .metric-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -6px rgba(31,18,88,0.10); }
button:not(:disabled), .avanti-cta-pill, a.avanti-cta-pill { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease; }
button:not(:disabled):hover, .avanti-cta-pill:hover { transform: translateY(-1px); }
button:not(:disabled):active, .avanti-cta-pill:active { transform: translateY(0); }
input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(34,144,255,0.15); }
.flash { animation: slideUp .3s cubic-bezier(.4,0,.2,1); }
.pill-tag, .au-pill, .af-pill, .sf-status { transition: background-color .18s ease, color .18s ease; }
[data-step].active { animation: fadeIn .25s ease-out; }
.modal-bg.open { animation: fadeIn .2s ease; }
.modal-box, .modal-box-content { animation: slideUp .28s cubic-bezier(.4,0,.2,1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body, input, textarea, select, button {
    font-family: var(--font-display) !important;
    font-feature-settings: 'cv11', 'ss01';
    font-weight: 400;
}

body {
    font-size: 16px;
    line-height: 28px;
    letter-spacing: 0;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

h1, h2, h3, h4, h5 {
    color: var(--navy-hex);
    font-family: var(--font-display);
    font-weight: 500;
    margin: 0 0 .5rem;
}

h1, .text-titulo {
    font-size: 44px;
    line-height: 48px;
    letter-spacing: -1.6px;
    font-weight: 500;
}
@media (max-width: 768px) { h1, .text-titulo { font-size: 32px; line-height: 36px; letter-spacing: -1.1px; } }

h2 { font-size: 32px; line-height: 38px; letter-spacing: -1.2px; }
h3 { font-size: 22px; line-height: 28px; letter-spacing: -.5px; }
h4 { font-size: 18px; line-height: 24px; letter-spacing: -.3px; }

p { font-size: 16px; line-height: 28px; letter-spacing: 0; margin: 0 0 1rem; }

.text-display { font-weight: 300; font-size: 64px; line-height: 66px; letter-spacing: -2.9px; }
@media (max-width: 768px) { .text-display { font-size: 42px; line-height: 44px; letter-spacing: -1.9px; } }

.text-subtitulo { font-weight: 300; font-size: 19px; line-height: 30px; letter-spacing: -.3px; color: var(--text-muted); }

.text-overline, .avanti-tag {
    display: inline-block;
    font-weight: 500;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--brand-accent);
}
.avanti-tag.tag-purple { color: var(--brand-purple); }
.avanti-tag.tag-cyan { color: var(--brand-cyan); }

.text-caption { font-weight: 300; font-size: 13px; line-height: 20px; letter-spacing: .2px; color: var(--text-muted); }

.text-label, .pill-tag, .avanti-badge {
    display: inline-block;
    font-weight: 500;
    font-size: 10px;
    line-height: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--accent-soft);
    color: var(--brand-accent);
}
.pill-tag.api { background: var(--brand-purple); color: #fff; letter-spacing: 1.2px; }
.pill-tag.email { background: var(--cyan-soft); color: var(--brand-cyan); }
.pill-purple { background: var(--purple-soft); color: var(--brand-purple); }
.pill-cyan { background: var(--cyan-soft); color: var(--brand-cyan); }
.pill-success { background: var(--color-success-soft); color: var(--color-success); }
.pill-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.pill-danger { background: var(--color-danger-soft); color: var(--color-danger); }

.text-footnote { font-weight: 300; font-size: 11px; line-height: 16px; letter-spacing: .1px; color: var(--text-muted); }

.text-quote, blockquote { font-weight: 300; font-style: italic; font-size: 26px; line-height: 34px; letter-spacing: -.4px; }

.text-stat { font-weight: 400; font-size: 56px; line-height: 56px; letter-spacing: -2.8px; color: var(--navy-hex); }

.text-list, ul.text-list, ol.text-list { font-weight: 400; font-size: 16px; line-height: 30px; padding-left: 14px; }

.text-button, .avanti-cta-pill {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: .3px;
    padding: 14px 28px;
    border-radius: 100px;
    cursor: pointer;
    border: none;
    background: var(--navy-hex);
    color: var(--navy-foreground-hex);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    transition: var(--transition-colors), transform .2s;
}
.avanti-cta-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.avanti-cta-pill.accent { background: var(--brand-accent); }
.avanti-cta-pill.purple { background: var(--brand-purple); }
.avanti-cta-pill.cyan { background: var(--brand-cyan); }
.avanti-cta-pill.outline { background: transparent; color: var(--navy-hex); border: 1.5px solid var(--navy-hex); }

.avanti-card {
    background: #fff;
    border: 1px solid var(--border-hex);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
}
.avanti-card { transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s; }
.avanti-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.avanti-cta-pill:active { transform: translateY(0); }
button:not(:disabled):active, .avanti-cta-pill:not(:disabled):active { transform: scale(.97); }
.skeleton { background: linear-gradient(90deg, var(--muted-hex) 0%, #fafafa 50%, var(--muted-hex) 100%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.fade-in, tbody tr, .avanti-card { animation: fadeIn .25s ease-out; }
.copy-btn { background: none; border: 0; cursor: pointer; padding: 2px 6px; border-radius: 4px; color: var(--muted-foreground-hex); font-size: 12px; transition: color .15s, background .15s; }
.copy-btn:hover { color: var(--brand-accent); background: var(--accent-soft); }
.copy-btn.copied { color: #22c55e; }
#toast-stack { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 1000; pointer-events: none; }
.toast { background: var(--navy-hex); color: #fff; padding: .75rem 1.25rem; border-radius: 9999px; font-size: 13.5px; font-weight: 500; box-shadow: 0 12px 32px -8px rgba(31,18,88,.4); animation: toastIn .3s cubic-bezier(.4,0,.2,1); pointer-events: auto; max-width: 480px; }
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.warn { background: #f59e0b; color: #1c0d00; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(20px); } }
.toast.fade-out { animation: toastOut .25s forwards; }
#cmd-palette { position: fixed; inset: 0; background: rgba(2,11,26,.6); display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; z-index: 1001; }
#cmd-palette.open { display: flex; }
#cmd-palette .cmd-box { background: #fff; width: min(560px, 92vw); border-radius: 14px; box-shadow: 0 24px 64px -8px rgba(2,11,26,.4); overflow: hidden; }
#cmd-palette input { width: 100%; padding: 1.1rem 1.4rem; border: 0; font-size: 16px; font-family: inherit; border-bottom: 1px solid var(--border-hex); outline: none; box-sizing: border-box; }
#cmd-palette .cmd-list { max-height: 400px; overflow-y: auto; }
#cmd-palette .cmd-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.4rem; cursor: pointer; font-size: 14px; color: var(--text); }
#cmd-palette .cmd-item:hover, #cmd-palette .cmd-item.active { background: var(--muted-hex); color: var(--navy-hex); }
#cmd-palette .cmd-item .cmd-shortcut { margin-left: auto; font-size: 11px; color: var(--text-muted); font-family: monospace; }

.avanti-card-sky { background: #fff; border-radius: 16px; padding: 1.75rem; }

.avanti-card-accent {
    background: #fff;
    border-radius: 16px;
    border-left: 4px solid var(--brand-accent);
    padding: 1.25rem;
    transition: var(--transition);
}
.avanti-card-accent:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.avanti-card-accent.purple { border-left-color: var(--brand-purple); }
.avanti-card-accent.cyan { border-left-color: var(--brand-cyan); }
.avanti-card-accent.success { border-left-color: var(--color-success); }
.avanti-card-accent.warning { border-left-color: var(--color-warning); }
.avanti-card-accent.danger { border-left-color: var(--color-danger); }

a { color: var(--brand-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

input, select, textarea {
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--border-hex);
    border-radius: 8px;
    padding: .65rem .85rem;
    color: var(--foreground-hex);
    transition: var(--transition-colors);
    font-family: var(--font-display);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(34,144,255,0.10);
}

.field input:required + label::after,
.field select:required + label::after,
.field label:has(+ input[required])::after,
.field label:has(+ select[required])::after,
.field label:has(+ textarea[required])::after {
    content: " *";
    color: #ef4444;
    font-weight: 500;
}

input:invalid:not(:placeholder-shown), select:invalid, textarea:invalid:not(:placeholder-shown) {
    border-color: #f87171;
    background: #fef2f2;
}

input:valid:not(:placeholder-shown):required, select:valid:required, textarea:valid:not(:placeholder-shown):required {
    border-color: #86efac;
}

/* ============ DARK MODE — refinado ============ */
html[data-theme="dark"] {
    --navy-hex: #c4b5fd;
    --brand-accent: #38bdf8;
    --background: #0a0e1a;
    --background-hex: #0a0e1a;
    --foreground: #e2e8f0;
    --foreground-hex: #e2e8f0;
    --card: #131b2c;
    --card-hex: #131b2c;
    --border: #1f2a44;
    --border-hex: #1f2a44;
    --muted: #131b2c;
    --muted-hex: #131b2c;
    --muted-foreground: #94a3b8;
    --muted-foreground-hex: #94a3b8;
    --bg: #0a0e1a;
    --bg-alt: #131b2c;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
}
html[data-theme="dark"] body { background: #0a0e1a; color: #e2e8f0; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4 { color: #f1f5f9; }
html[data-theme="dark"] .avanti-card,
html[data-theme="dark"] .quick-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .hd-card,
html[data-theme="dark"] .sf-card,
html[data-theme="dark"] .au-table,
html[data-theme="dark"] .af-table,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .tpl-block,
html[data-theme="dark"] .bc-callout,
html[data-theme="dark"] .gloss-item,
html[data-theme="dark"] details.bc-item,
html[data-theme="dark"] .fundo-section { background: #131b2c; border-color: #1f2a44; color: #e2e8f0; }
html[data-theme="dark"] aside.sidebar { background: #0d1424; border-color: #1f2a44; }
html[data-theme="dark"] header.app-header { background: #0d1424; border-color: #1f2a44; }
html[data-theme="dark"] .sidebar nav a { color: #94a3b8; }
html[data-theme="dark"] .sidebar nav a:hover,
html[data-theme="dark"] .sidebar nav a.active { color: #f1f5f9; background: #1f2a44; border-left-color: #c4b5fd; }
html[data-theme="dark"] .sidebar-brand-text { color: #e2e8f0; }
html[data-theme="dark"] .sidebar-section { color: #94a3b8; }
html[data-theme="dark"] .header-greet, html[data-theme="dark"] .header-greet strong { color: #e2e8f0; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
    background: #0a0e1a; color: #e2e8f0; border-color: #1f2a44;
}
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus, html[data-theme="dark"] textarea:focus {
    border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.18);
}
html[data-theme="dark"] table { color: #e2e8f0; }
html[data-theme="dark"] table th { background: #131b2c; color: #94a3b8; border-color: #1f2a44; }
html[data-theme="dark"] table tr { border-color: #1f2a44; }
html[data-theme="dark"] table tr:hover { background: #1a2238; }
html[data-theme="dark"] a:not(.avanti-cta-pill):not(.btn-primary):not(.btn-outline) { color: #38bdf8; }
html[data-theme="dark"] code { background: #1f2a44; color: #e2e8f0; }
html[data-theme="dark"] pre { background: #0a0e1a; color: #e2e8f0; }
html[data-theme="dark"] .pill-tag.pill-success { background: #052e16; color: #4ade80; }
html[data-theme="dark"] .pill-tag.pill-danger { background: #450a0a; color: #f87171; }
html[data-theme="dark"] .pill-tag.pill-warning { background: #451a03; color: #fbbf24; }
html[data-theme="dark"] .flash { background: #450a0a; border-color: #b91c1c; color: #fecaca; }
html[data-theme="dark"] .app-footer { background: #0d1424; border-color: #1f2a44; color: #94a3b8; }
html[data-theme="dark"] .app-footer a { color: #94a3b8; }
html[data-theme="dark"] .avanti-cta-pill { background: #c4b5fd; color: #0a0e1a; }
html[data-theme="dark"] .avanti-cta-pill:hover { background: #ddd6fe; }
html[data-theme="dark"] .sidebar-brand .logo-light { display: none; }
html[data-theme="dark"] .sidebar-brand .logo-dark { display: block; }
html:not([data-theme="dark"]) .sidebar-brand .logo-dark { display: none; }

/* DARK MODE — cobrir hardcoded colors comuns em style inline */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background:#fafafa"],
html[data-theme="dark"] [style*="background:#F6F5F2"] { background: #131b2c !important; color: #e2e8f0 !important; }
html[data-theme="dark"] [style*="background:#020B1A"] { background: #0a0e1a !important; }
html[data-theme="dark"] [style*="color:#020B1A"],
html[data-theme="dark"] [style*="color:#020B1A"],
html[data-theme="dark"] [style*="color:var(--navy-hex)"] { color: #e2e8f0 !important; }
html[data-theme="dark"] [style*="color:#717885"],
html[data-theme="dark"] [style*="color:#8B9DBE"],
html[data-theme="dark"] [style*="color:var(--text-muted)"],
html[data-theme="dark"] [style*="color:var(--muted-foreground-hex)"] { color: #94a3b8 !important; }
html[data-theme="dark"] [style*="border:1px solid var(--border-hex)"],
html[data-theme="dark"] [style*="border:1px solid #E2E5E0"],
html[data-theme="dark"] [style*="border:1px solid #e2e8f0"] { border-color: #1f2a44 !important; }

/* Hero dark (já é escuro mas garantir contraste do texto) */
html[data-theme="dark"] .home-hero { background-color: #060912; background-image:
  linear-gradient(90deg, rgba(6,9,18,.96) 0%, rgba(6,9,18,.88) 38%, rgba(6,9,18,.55) 62%, rgba(6,9,18,.08) 100%),
  url('/static/equipe-avanti.jpg') !important; }
html[data-theme="dark"] .home-hero, html[data-theme="dark"] .home-hero * { color: #EEF7FF; }
html[data-theme="dark"] .home-hero .home-hero-eyebrow { color: #38bdf8; }
html[data-theme="dark"] .home-hero .accent { color: #38bdf8; }
html[data-theme="dark"] .home-hero .btn-primary { background: #f1f5f9; color: #0a0e1a; }
html[data-theme="dark"] .home-hero .btn-outline { color: #EEF7FF; border-color: rgba(238,247,255,0.30); }

/* Metric values, headings, sub-text consistentes */
html[data-theme="dark"] .metric-value, html[data-theme="dark"] .home-hero-title { color: #f1f5f9; }
html[data-theme="dark"] .metric-label { color: #38bdf8; }
html[data-theme="dark"] .metric-sub { color: #94a3b8; }
html[data-theme="dark"] .quick-card h3 { color: #e2e8f0; }
html[data-theme="dark"] .quick-card p { color: #94a3b8; }
html[data-theme="dark"] .quick-card::after { color: #94a3b8; }

/* Tabelas — text-muted nos ths */
html[data-theme="dark"] th { color: #94a3b8 !important; }
html[data-theme="dark"] td { color: #e2e8f0; }

/* Form elements em dark */
html[data-theme="dark"] label { color: #cbd5e1; }
html[data-theme="dark"] legend { color: #f1f5f9; }
html[data-theme="dark"] fieldset { border-color: #1f2a44; background: #131b2c !important; }

/* Wizard pills no dark */
html[data-theme="dark"] .wizard-step-pill { background: #1f2a44; color: #94a3b8; }
html[data-theme="dark"] .wizard-step-pill.active { background: #c4b5fd; color: #0a0e1a; }
html[data-theme="dark"] .wizard-step-pill.done { background: #1f2a44; color: #38bdf8; }
html[data-theme="dark"] .wizard-arrow { color: #475569; }

/* Tabs */
html[data-theme="dark"] .sim-tab.active, html[data-theme="dark"] .sf-tab.active { color: #c4b5fd; border-bottom-color: #c4b5fd; }

/* Skeleton placeholder */
html[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #1f2a44 0%, #2a3754 50%, #1f2a44 100%); }

/* DARK — painéis novos (Rodobens/etapas, avisos) + acento AZUL (migração v2) */
/* fundos quentes/claros (laranja Rodobens, creme da etapa atual, amarelo aviso) → escuro quente */
html[data-theme="dark"] [style*="background:#fff7ed"],
html[data-theme="dark"] [style*="background:#fffdf9"],
html[data-theme="dark"] [style*="background:#fffbeb"],
html[data-theme="dark"] [style*="background:#fef3c7"],
html[data-theme="dark"] [style*="background:#eff6ff"],
html[data-theme="dark"] [style*="background:#f0fdf4"],
html[data-theme="dark"] [style*="background:#fee2e2"] { background: #1a2030 !important; }
/* bordas claras desses painéis → escuras */
html[data-theme="dark"] [style*="border:1px solid #fed7aa"],
html[data-theme="dark"] [style*="border:1px solid #fde68a"],
html[data-theme="dark"] [style*="border:1px solid #93c5fd"],
html[data-theme="dark"] [style*="border:1px solid #bfdbfe"],
html[data-theme="dark"] [style*="border:1px solid #86efac"] { border-color: #2f3b54 !important; }
/* textos escuros desses painéis → claros pra ter contraste no fundo escuro */
html[data-theme="dark"] [style*="color:#9a3412"],
html[data-theme="dark"] [style*="color:#b45309"],
html[data-theme="dark"] [style*="color:#92400e"],
html[data-theme="dark"] [style*="color:#78350f"],
html[data-theme="dark"] [style*="color:#1e40af"] { color: #fbbf95 !important; }
/* acento AZUL no dark (no lugar do roxo antigo #c4b5fd) */
html[data-theme="dark"] .wizard-step-pill.active { background: #2290FF; color: #fff; }
html[data-theme="dark"] .wizard-step-pill.done { background: #1f2a44; color: #60a5fa; }
html[data-theme="dark"] .sim-tab.active, html[data-theme="dark"] .sf-tab.active { color: #60a5fa; border-bottom-color: #60a5fa; }
html[data-theme="dark"] .metric-label, html[data-theme="dark"] .home-hero .accent, html[data-theme="dark"] .home-hero .home-hero-eyebrow { color: #60a5fa; }

/* Botão dark mode toggle mais visível */
html[data-theme="dark"] #darkmode-btn { color: #c4b5fd; }

/* Modal background opaco */
html[data-theme="dark"] .modal-bg { background: rgba(0,0,0,0.75); }


/* DARK — cobertura ABRANGENTE de fundos claros (mata os "quadrados" brancos) */
html[data-theme="dark"] [style*="background:#fff" i],
html[data-theme="dark"] [style*="background: #fff" i],
html[data-theme="dark"] [style*="background-color:#fff" i],
html[data-theme="dark"] [style*="background:#ffffff" i],
html[data-theme="dark"] [style*="background: #ffffff" i],
html[data-theme="dark"] [style*="background-color:#ffffff" i],
html[data-theme="dark"] [style*="background:#f8fafc" i],
html[data-theme="dark"] [style*="background: #f8fafc" i],
html[data-theme="dark"] [style*="background-color:#f8fafc" i],
html[data-theme="dark"] [style*="background:#fafafa" i],
html[data-theme="dark"] [style*="background: #fafafa" i],
html[data-theme="dark"] [style*="background-color:#fafafa" i],
html[data-theme="dark"] [style*="background:#f1f5f9" i],
html[data-theme="dark"] [style*="background: #f1f5f9" i],
html[data-theme="dark"] [style*="background-color:#f1f5f9" i],
html[data-theme="dark"] [style*="background:#eef1f5" i],
html[data-theme="dark"] [style*="background: #eef1f5" i],
html[data-theme="dark"] [style*="background-color:#eef1f5" i],
html[data-theme="dark"] [style*="background:#eef2f7" i],
html[data-theme="dark"] [style*="background: #eef2f7" i],
html[data-theme="dark"] [style*="background-color:#eef2f7" i],
html[data-theme="dark"] [style*="background:#f8f8f4" i],
html[data-theme="dark"] [style*="background: #f8f8f4" i],
html[data-theme="dark"] [style*="background-color:#f8f8f4" i],
html[data-theme="dark"] [style*="background:#fafbfc" i],
html[data-theme="dark"] [style*="background: #fafbfc" i],
html[data-theme="dark"] [style*="background-color:#fafbfc" i],
html[data-theme="dark"] [style*="background:#f3f4f6" i],
html[data-theme="dark"] [style*="background: #f3f4f6" i],
html[data-theme="dark"] [style*="background-color:#f3f4f6" i],
html[data-theme="dark"] [style*="background:#e5e7eb" i],
html[data-theme="dark"] [style*="background: #e5e7eb" i],
html[data-theme="dark"] [style*="background-color:#e5e7eb" i],
html[data-theme="dark"] [style*="background:#e2e8f0" i],
html[data-theme="dark"] [style*="background: #e2e8f0" i],
html[data-theme="dark"] [style*="background-color:#e2e8f0" i],
html[data-theme="dark"] [style*="background:#e2e5e0" i],
html[data-theme="dark"] [style*="background: #e2e5e0" i],
html[data-theme="dark"] [style*="background-color:#e2e5e0" i],
html[data-theme="dark"] [style*="background:#f6f5f2" i],
html[data-theme="dark"] [style*="background: #f6f5f2" i],
html[data-theme="dark"] [style*="background-color:#f6f5f2" i],
html[data-theme="dark"] [style*="background:#eef7ff" i],
html[data-theme="dark"] [style*="background: #eef7ff" i],
html[data-theme="dark"] [style*="background-color:#eef7ff" i],
html[data-theme="dark"] [style*="background:#fef2f2" i],
html[data-theme="dark"] [style*="background: #fef2f2" i],
html[data-theme="dark"] [style*="background-color:#fef2f2" i],
html[data-theme="dark"] [style*="background:#fee2e2" i],
html[data-theme="dark"] [style*="background: #fee2e2" i],
html[data-theme="dark"] [style*="background-color:#fee2e2" i],
html[data-theme="dark"] [style*="background:#fecaca" i],
html[data-theme="dark"] [style*="background: #fecaca" i],
html[data-theme="dark"] [style*="background-color:#fecaca" i],
html[data-theme="dark"] [style*="background:#f0fdf4" i],
html[data-theme="dark"] [style*="background: #f0fdf4" i],
html[data-theme="dark"] [style*="background-color:#f0fdf4" i],
html[data-theme="dark"] [style*="background:#ecfdf5" i],
html[data-theme="dark"] [style*="background: #ecfdf5" i],
html[data-theme="dark"] [style*="background-color:#ecfdf5" i],
html[data-theme="dark"] [style*="background:#eff6ff" i],
html[data-theme="dark"] [style*="background: #eff6ff" i],
html[data-theme="dark"] [style*="background-color:#eff6ff" i],
html[data-theme="dark"] [style*="background:#f0f9ff" i],
html[data-theme="dark"] [style*="background: #f0f9ff" i],
html[data-theme="dark"] [style*="background-color:#f0f9ff" i],
html[data-theme="dark"] [style*="background:#eef2ff" i],
html[data-theme="dark"] [style*="background: #eef2ff" i],
html[data-theme="dark"] [style*="background-color:#eef2ff" i],
html[data-theme="dark"] [style*="background:#ecfeff" i],
html[data-theme="dark"] [style*="background: #ecfeff" i],
html[data-theme="dark"] [style*="background-color:#ecfeff" i],
html[data-theme="dark"] [style*="background:#e0e7ff" i],
html[data-theme="dark"] [style*="background: #e0e7ff" i],
html[data-theme="dark"] [style*="background-color:#e0e7ff" i],
html[data-theme="dark"] [style*="background:#e0f2fe" i],
html[data-theme="dark"] [style*="background: #e0f2fe" i],
html[data-theme="dark"] [style*="background-color:#e0f2fe" i],
html[data-theme="dark"] [style*="background:#f0f7ff" i],
html[data-theme="dark"] [style*="background: #f0f7ff" i],
html[data-theme="dark"] [style*="background-color:#f0f7ff" i],
html[data-theme="dark"] [style*="background:#fef3c7" i],
html[data-theme="dark"] [style*="background: #fef3c7" i],
html[data-theme="dark"] [style*="background-color:#fef3c7" i],
html[data-theme="dark"] [style*="background:#fffbeb" i],
html[data-theme="dark"] [style*="background: #fffbeb" i],
html[data-theme="dark"] [style*="background-color:#fffbeb" i],
html[data-theme="dark"] [style*="background:#fefce8" i],
html[data-theme="dark"] [style*="background: #fefce8" i],
html[data-theme="dark"] [style*="background-color:#fefce8" i],
html[data-theme="dark"] [style*="background:#fff7ed" i],
html[data-theme="dark"] [style*="background: #fff7ed" i],
html[data-theme="dark"] [style*="background-color:#fff7ed" i],
html[data-theme="dark"] [style*="background:#fffdf9" i],
html[data-theme="dark"] [style*="background: #fffdf9" i],
html[data-theme="dark"] [style*="background-color:#fffdf9" i],
html[data-theme="dark"] [style*="background:#f5f3ff" i],
html[data-theme="dark"] [style*="background: #f5f3ff" i],
html[data-theme="dark"] [style*="background-color:#f5f3ff" i] { background-color: #161d2e !important; }

/* DARK — textos escuros de painel → claros */
html[data-theme="dark"] [style*="color:#991b1b" i],
html[data-theme="dark"] [style*="color:#b91c1c" i],
html[data-theme="dark"] [style*="color:#7f1d1d" i] { color: #fca5a5 !important; }
html[data-theme="dark"] [style*="color:#166534" i],
html[data-theme="dark"] [style*="color:#15803d" i],
html[data-theme="dark"] [style*="color:#14532d" i] { color: #86efac !important; }
html[data-theme="dark"] [style*="color:#1e40af" i],
html[data-theme="dark"] [style*="color:#1d4ed8" i],
html[data-theme="dark"] [style*="color:#1e3a8a" i] { color: #93c5fd !important; }
html[data-theme="dark"] [style*="color:#92400e" i],
html[data-theme="dark"] [style*="color:#854d0e" i],
html[data-theme="dark"] [style*="color:#713f12" i] { color: #fcd34d !important; }
html[data-theme="dark"] [style*="color:#3730a3" i] { color: #c7d2fe !important; }
html[data-theme="dark"] [style*="color:#5b21b6" i] { color: #ddd6fe !important; }
html[data-theme="dark"] [style*="color:#6b21a8" i] { color: #e9d5ff !important; }

/* DARK — superfícies brancas definidas em REGRAS CSS (não inline): Leads, Histórico, cards.
   O override de inline-style não alcança essas (são class { background:#fff }). */
html[data-theme="dark"] .lp-card, html[data-theme="dark"] .lp-tbl, html[data-theme="dark"] .lp-list,
html[data-theme="dark"] .funil, html[data-theme="dark"] .fcard, html[data-theme="dark"] .empty,
html[data-theme="dark"] .hd-card, html[data-theme="dark"] .anx-item, html[data-theme="dark"] .lp-sortsel,
html[data-theme="dark"] .lp-refresh, html[data-theme="dark"] .chip.miss {
  background: #131b2c !important; color: #e2e8f0 !important; border-color: #1f2a44 !important;
}
html[data-theme="dark"] .fview.on, html[data-theme="dark"] .lp-filt button.on {
  background: #1f2a44 !important; color: #e2e8f0 !important;
}
html[data-theme="dark"] .lp-card *, html[data-theme="dark"] .fcard *, html[data-theme="dark"] .hd-card *:not(.pill-tag):not([style*="color:#dc2626"]):not([style*="color:#16a34a"]) {
  border-color: #1f2a44;
}
/* DARK — campo obrigatório vazio (sem placeholder) não fica ROSA claro: escuro com hint vermelho */
html[data-theme="dark"] input:invalid:not(:placeholder-shown),
html[data-theme="dark"] select:invalid,
html[data-theme="dark"] textarea:invalid:not(:placeholder-shown) {
  background: #241319 !important; border-color: #7f1d1d !important; color: #e2e8f0 !important;
}

/* DARK — cards de fundo (Para quais fundos enviar): nome legível + borda/hover */
html[data-theme="dark"] .fundo-card > span:nth-of-type(2) { color: #EEF7FF !important; }
html[data-theme="dark"] .fundo-card { border-color:#1f2a44; }
html[data-theme="dark"] .fundo-card:hover { background:#131b2c; border-color:#2290FF; }
html[data-theme="dark"] .fundo-card:has(input:checked) { background:rgba(34,144,255,.10); }
