/* ---------- tokens: preto + dourado (identidade ProAtiva), tema claro como alternativa ---------- */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #2a2a2f;
  --text: #f3f1ec;
  --muted: #a3a09a;
  --gold: #c9a45c;
  --gold-2: #e8cf98;
  --on-gold: #141109;
  --gold-soft: rgba(201, 164, 92, .12);
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  /* séries categóricas (passo escuro da paleta validada) */
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --s-none: #5d5d63;
  --bar: var(--gold);
  --track: #232327;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #f3f0e8;
  --border: #e3ded2;
  --text: #16150f;
  --muted: #5f5c55;
  --gold: #9c7a35;
  --gold-2: #c9a45c;
  --on-gold: #ffffff;
  --gold-soft: rgba(156, 122, 53, .10);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s-none: #a3a09a;
  --bar: #9c7a35;
  --track: #eeeae0;
  --shadow: 0 20px 50px rgba(40, 30, 10, .12);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
svg { width: 18px; height: 18px; flex: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; font-weight: 750; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.gold { color: var(--gold); }
:root[data-theme="dark"] .gold, :root:not([data-theme]) .gold {
  background: linear-gradient(100deg, var(--gold) 10%, var(--gold-2) 55%, var(--gold) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---------- topo ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 14px; }
.wordmark { display: flex; flex-direction: column; line-height: 1; color: var(--gold); }
.wordmark span { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.wordmark small { font-size: 8.5px; letter-spacing: .55em; margin-top: 4px; padding-left: 2px; }
.divider { width: 1px; height: 28px; background: var(--border); }
.product { font-weight: 600; font-size: 14px; }
.tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; }
.tab { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--surface-2); }
.top-right { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.on { color: var(--text); }
.chip.on svg { color: var(--gold); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(12, 163, 12, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(12, 163, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); } }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: none; color: var(--text); cursor: pointer; }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 14px; padding: 11px 22px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--on-gold); border-color: transparent; box-shadow: 0 8px 24px var(--gold-soft); }
.btn.ghost { background: transparent; border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.btn.small { padding: 7px 16px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn svg { width: 16px; height: 16px; }
select, input[type=search] { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--track); border: 1px solid var(--border); position: relative; flex: none; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + .track { background: var(--gold-soft); border-color: var(--gold); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--gold); }
.switch input:disabled + .track { opacity: .5; }

/* ---------- cards e layout ---------- */
.panel { display: none; padding: 34px 0 30px; }
.panel.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.hero { text-align: center; max-width: 860px; margin: 18px auto 34px; }
.hero.compact { margin-bottom: 26px; }
.hero.compact h1 { font-size: clamp(28px, 3.8vw, 42px); }
.lead { color: var(--muted); font-size: 17px; max-width: 700px; margin: 16px auto 0; }

.start-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 300px; padding: 30px; border-radius: 18px; border: 1.5px dashed color-mix(in srgb, var(--gold) 55%, var(--border)); background: radial-gradient(ellipse at top, var(--gold-soft), transparent 70%), var(--surface); cursor: pointer; transition: border-color .2s, transform .2s; }
.drop:hover, .drop.over { border-color: var(--gold); transform: translateY(-2px); }
.drop input { display: none; }
.drop-icon { width: 46px; height: 46px; color: var(--gold); padding: 10px; border-radius: 14px; background: var(--gold-soft); }
.drop strong { font-size: 18px; }
.start-side { display: grid; gap: 16px; }
.demo-card { display: grid; gap: 10px; align-content: start; }
.demo-card .btn { justify-self: start; }
.tag { justify-self: start; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); padding: 2px 10px; border-radius: 999px; }
.demo-card p { margin: 0; }
.options { display: grid; gap: 14px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.pillar { display: flex; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); }
.pillar svg { width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }
.pillar strong { display: block; }
.pillar span { font-size: 13px; color: var(--muted); }

/* ---------- processamento ---------- */
.running { max-width: 640px; margin: 30px auto; text-align: center; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; text-align: left; display: grid; gap: 8px; }
.step { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); opacity: .45; transition: opacity .3s, border-color .3s; }
.step.run, .step.done { opacity: 1; }
.step.run { border-color: var(--gold); }
.step .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); flex: none; }
.step.run .dot { border-color: var(--gold); border-top-color: transparent; animation: spin .8s linear infinite; }
.step.done .dot { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.step.done .dot svg { width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.step .txt { flex: 1; }
.step .txt span { display: block; font-size: 12.5px; color: var(--muted); }
.step .metric { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold); white-space: nowrap; }

/* ---------- resultado ---------- */
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-number { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 24px; align-items: center; padding: 28px; background: radial-gradient(ellipse at 0% 0%, var(--gold-soft), transparent 60%), var(--surface); }
.hn-main { display: grid; gap: 6px; }
.hn-main .label { font-size: 14px; color: var(--muted); }
.big { font-size: clamp(44px, 6.4vw, 76px); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hn-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.tile .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .label svg { width: 14px; height: 14px; }
.tile .value { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .sub { font-size: 12px; color: var(--muted); }
.ic-good { color: var(--good); } .ic-warn { color: var(--warning); } .ic-crit { color: var(--critical); }

.precision { margin-top: 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.precision .ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--track) 0); position: relative; }
.precision .ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.precision .ring b { position: relative; }
.precision p { margin: 2px 0; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card h3 + p { margin: 2px 0 14px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; align-items: center; cursor: default; }
.hbar .name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .lane { display: grid; grid-template-columns: 1fr 64px; align-items: center; gap: 8px; min-width: 0; }
.hbar .track { display: block; height: 14px; }
.hbar .fill { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--bar); width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); min-width: 2px; }
.hbar .val { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.hbar:hover .fill { filter: brightness(1.15); }
.stack { display: flex; gap: 2px; height: 18px; margin: 4px 0 12px; }
.stack span { display: block; height: 100%; transition: flex-grow .9s; }
.stack span:first-child { border-radius: 4px 0 0 4px; }
.stack span:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend b { font-variant-numeric: tabular-nums; }

.findings { margin-top: 14px; }
.findings-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--gold); color: var(--on-gold); }
.search { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.search svg { color: var(--muted); width: 16px; }
.search input { border: 0; background: none; padding: 8px 4px; min-width: 200px; outline: none; }
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.grid td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.grid tbody tr { cursor: pointer; transition: background .15s; }
.grid tbody tr:hover { background: var(--surface-2); }
.grid .desc { font-weight: 600; }
.grid .code { font-size: 12px; color: var(--muted); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.status svg { width: 15px; height: 15px; }
.up { color: var(--text); font-weight: 650; }
.up::before { content: "+"; color: var(--good); }
.down { color: var(--text); font-weight: 650; }
.down::before { content: "−"; color: var(--critical); }

/* ---------- painel lateral ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); border-left: 1px solid var(--border); z-index: 50; transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; padding: 22px; box-shadow: var(--shadow); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 18px; }
.trail { list-style: none; margin: 0; padding: 0; position: relative; }
.trail::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.trail li { position: relative; padding: 0 0 18px 42px; }
.trail .node { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--border); }
.trail .node svg { width: 14px; height: 14px; }
.trail .node.good { border-color: var(--good); color: var(--good); }
.trail .node.warn { border-color: var(--warning); color: var(--warning); }
.trail .node.crit { border-color: var(--critical); color: var(--critical); }
.trail h4 { margin: 2px 0 4px; font-size: 14px; }
.trail p { margin: 2px 0; font-size: 13.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 13px; margin-top: 4px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.finding { margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.finding .head { display: flex; justify-content: space-between; gap: 8px; font-weight: 650; }
.finding .meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.impact { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.xml-card { margin-top: 16px; }
.xml-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: start; }
.xml-head > div:first-child { flex: 1 1 420px; }
.xml-head p { margin: 6px 0 0; }
.xml-actions { display: grid; gap: 8px; justify-items: end; }
.xml-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.xml-stats .stat { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 120px; }
.xml-stats .stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.xml-stats .stat span { font-size: 12px; color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.or-line { display: flex; align-items: center; gap: 14px; margin: 34px 0 20px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.hero h1 { font-size: clamp(28px, 4vw, 44px); }
.path { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.path span { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); }
.path span:last-child { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }

/* ---------- base ---------- */
.bigsearch { max-width: 860px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.bigsearch > svg { color: var(--gold); width: 20px; height: 20px; }
.bigsearch input { flex: 1 1 220px; border: 0; background: none; font-size: 16px; padding: 10px 0; outline: none; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 22px; }
.examples button { font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.examples button:hover { color: var(--text); border-color: var(--gold); }
#baseResult { max-width: 860px; margin: 0 auto; }
.result-card { display: grid; gap: 10px; }
.ncm-badge { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 700; color: var(--gold); }
.cand { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.cand .mono { color: var(--gold); white-space: nowrap; }
.evidence { display: flex; flex-wrap: wrap; gap: 8px; }
.evidence span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; gap: 6px; align-items: center; }
.evidence svg { width: 13px; height: 13px; color: var(--good); }
.confbar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; max-width: 240px; }
.confbar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }

/* ---------- atualizações ---------- */
.upd-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 14px; }
.sync { background: radial-gradient(ellipse at 100% 0%, var(--gold-soft), transparent 60%), var(--surface); }
.sync .state-line { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.sync .version { font-size: 28px; font-weight: 800; margin: 10px 0 2px; }
.sources { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; }
.sources li { display: flex; gap: 14px; align-items: start; }
.sources li div { display: grid; }
.state { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; min-width: 110px; text-align: center; }
.state.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.timeline { display: grid; gap: 16px; margin-top: 12px; }
.tl-group h4 { margin: 0 0 6px; font-size: 13px; color: var(--gold); }
.tl-item { display: flex; gap: 14px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.tl-item .mono { color: var(--text); white-space: nowrap; }
.affected-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }

footer { padding: 30px 0 40px; text-align: center; max-width: 820px; margin: 0 auto; }

/* ---------- tooltip e toast ---------- */
.tip { position: fixed; z-index: 70; pointer-events: none; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; box-shadow: var(--shadow); max-width: 300px; }
.tip b { font-variant-numeric: tabular-nums; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow); max-width: min(640px, calc(100% - 32px)); }
.toast.err { border-color: var(--critical); }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .start-grid, .hero-number, .charts, .upd-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  .top-right { margin-left: auto; }
  .precision { grid-template-columns: auto 1fr; }
}
@media (max-width: 560px) {
  .hn-tiles { grid-template-columns: 1fr; }
  .chip#chipNcm { display: none; }
  .hbar { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- relatório impresso ---------- */
.report { display: none; }
@media print {
  body { background: #fff; color: #111; }
  body > *:not(.report) { display: none !important; }
  .report { display: block; font-size: 12px; color: #111; }
  .report h1 { font-size: 22px; margin: 6px 0 2px; }
  .report .rp-brand { color: #8a6a2c; font-weight: 800; letter-spacing: .04em; }
  .report .rp-brand small { display: block; font-size: 7px; letter-spacing: .5em; }
  .report .rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
  .report .rp-kpis div { border: 1px solid #ddd; border-radius: 8px; padding: 8px; }
  .report .rp-kpis b { display: block; font-size: 16px; }
  .report table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
  .report th, .report td { border-bottom: 1px solid #ddd; padding: 5px 6px; text-align: left; vertical-align: top; }
  .report th { font-size: 10px; text-transform: uppercase; color: #555; }
  .report .r { text-align: right; white-space: nowrap; }
  .report .note { color: #555; font-size: 10px; }
  @page { margin: 14mm; }
}

.link { color: var(--gold); }
.link:visited { color: var(--gold); }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at top, var(--gold-soft), transparent 60%), var(--bg); }
.login-wrap { width: min(420px, calc(100% - 32px)); display: grid; gap: 22px; justify-items: center; padding: 30px 0; }
.login-mark span { font-size: 30px; }
.login-mark small { font-size: 10px; }
.login-card { width: 100%; display: grid; gap: 14px; padding: 28px; }
.login-card input { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; }
.login-card input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.login-card .btn { width: 100%; }
.login-card p { margin: 0; }
.login-error { color: var(--critical); font-size: 14px; }
.user-chip { font-size: 13px; color: var(--muted); }
