/* ============ VERYA · "Executivo + Narrativa" design system ============ */

/* ---------- THEME TOKENS ---------- */
:root {
/* ---------- Brand book: the palette ----------
   Every colour of the panel comes from these. Names follow the brand book. */
--navy:#0A1A33; --onix:#0B0D12;
--lavanda:#C9CBFF; --gelo:#B9E9FF; --lilas:#A6A6DA; --petroleo:#69B0C8;
--branco:#FFFFFF; --nevoa:#F3F4F7; --n100:#E6E8EE; --n300:#B8BECB; --n500:#6B7487; --n700:#2E3A50;
--aurora: linear-gradient(120deg, #C9CBFF, #E9ECFA 45%, #B9E9FF);
--noite: linear-gradient(180deg, #05070D 0%, #0A1A33 45%, #4E6FB0 85%, #B9E9FF 120%);
}
:root[data-theme="light"] {
--bg:#F3F4F7;
--bg-elev:#FFFFFF;
--bg-soft:#ECEEF3;
--border:#E6E8EE;
--border-strong:#D3D7E0;
--row-divider:#EEF0F4;
--th-divider:#E6E8EE;
--meter-track:#E6E8EE;
--text:#0A1A33;
--text-soft:#2E3A50;
--text-muted:#6B7487;
--text-faint:#8A92A3;
--brand:#0A1A33;
--brand-soft:#E9ECFA;
--accent:#2E8FCB;
--aqua:#69B0C8;
/* Data palette, fixed order (never reordered). */
--d1:#2E8FCB; --d2:#4652C9; --d3:#E0608E; --d4:#5C8BE6; --d5:#7A4FAA;
--data-you:#0A1A33;
--data-others:#B8BECB;
--chip-bg:rgba(10,26,51,.05);
--chip-line:rgba(10,26,51,.09);
/* Status is reserved for up and down. A caution has no colour of its own. */
--good:#138A63;
--good-text:#138A63;
--danger:#D23F3F;
--danger-text:#D23F3F;
--warn:#6B7487;
--warn-text:#2E3A50;
--purple:#7A4FAA;
--purple-text:#7A4FAA;
--teal-text:#2E3A50;
--shadow-card: 0 1px 2px rgba(10,26,51,.05);
--shadow-pop: 0 12px 32px rgba(10,26,51,.28);
--shadow-seg: 0 1px 3px rgba(10,26,51,.14);
--grid:#E6E8EE;
--seg-bg:#E6E8EE;
--seg-inactive:#6B7487;
--tip-bg:#0A1A33;
--tip-text:#FFFFFF;
--sidebar-bg:#0A1A33;
--sidebar-text:#B8BECB;
--sidebar-text-strong:#FFFFFF;
--sidebar-hover:#16284A;
--sidebar-active:#B9E9FF;
--topbar-fade: linear-gradient(180deg, rgba(243,244,247,.88) 60%, rgba(243,244,247,0));
}
:root[data-theme="dark"] {
--bg:#05070D;
--bg-elev:#0F1524;
--bg-soft:#171F33;
--border:rgba(255,255,255,.10);
--border-strong:rgba(255,255,255,.18);
--row-divider:rgba(255,255,255,.06);
--th-divider:rgba(255,255,255,.09);
--meter-track:rgba(255,255,255,.10);
--text:#FFFFFF;
--text-soft:#C3C8D4;
--text-muted:#8F97A8;
--text-faint:#6B7487;
--brand:#5F90EC;
--brand-soft:rgba(95,144,236,.16);
--accent:#2CA2CE;
--aqua:#B9E9FF;
--d1:#2CA2CE; --d2:#5063D9; --d3:#D2738B; --d4:#5F90EC; --d5:#934AC4;
--data-you:#2CA2CE;
--data-others:#6B7487;
--chip-bg:rgba(255,255,255,.08);
--chip-line:rgba(255,255,255,.13);
--good:#3CCB95;
--good-text:#3CCB95;
--danger:#FF6B6B;
--danger-text:#FF6B6B;
--warn:#8F97A8;
--warn-text:#C3C8D4;
--purple:#934AC4;
--purple-text:#A6A6DA;
--teal-text:#C3C8D4;
--shadow-card: 0 1px 2px rgba(0,0,0,.4);
--shadow-pop: 0 12px 32px rgba(0,0,0,.55);
--shadow-seg: 0 1px 3px rgba(0,0,0,.5);
--grid:rgba(255,255,255,.08);
--seg-bg:#171F33;
--seg-inactive:#8F97A8;
--tip-bg:#F3F4F7;
--tip-text:#0A1A33;
--sidebar-bg:#05070D;
--sidebar-text:#B8BECB;
--sidebar-text-strong:#FFFFFF;
--sidebar-hover:#0F1524;
--sidebar-active:#B9E9FF;
--topbar-fade: linear-gradient(180deg, #05070D 72%, rgba(5,7,13,0));
}

/* ---------- Brand book: the page of light and the satin glass ----------
   Shared by the panel skin (skin.css), the login and the public pages.
   "A luz mora na borda": lavender top left, ice bottom right, lilac low in
   the middle, sized by the window so the light stays at the edges. */
:root {
--mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
--page-light:
  radial-gradient(ellipse 34vw 48vh at 8% 14%, rgba(201,203,255,.95), rgba(201,203,255,.55) 42%, rgba(201,203,255,0) 100%),
  radial-gradient(ellipse 36vw 46vh at 94% 96%, rgba(185,233,255,.95), rgba(185,233,255,.5) 42%, rgba(185,233,255,0) 100%),
  radial-gradient(ellipse 46vw 42vh at 52% 108%, rgba(166,166,218,.55), rgba(166,166,218,.28) 45%, rgba(166,166,218,0) 100%),
  #F3F4F7;
--page-dark:
  radial-gradient(ellipse 50vw 32vh at 50% 102%, rgba(94,123,192,.85), rgba(94,123,192,.34) 48%, rgba(94,123,192,0) 100%),
  radial-gradient(ellipse 26vw 30vh at 6% 100%, rgba(201,203,255,.42), rgba(201,203,255,.16) 46%, rgba(201,203,255,0) 100%),
  radial-gradient(ellipse 26vw 30vh at 96% 100%, rgba(185,233,255,.40), rgba(185,233,255,.15) 46%, rgba(185,233,255,0) 100%),
  linear-gradient(180deg, #05070D 0%, #05070D 50%, #0A1A33 100%);
/* The brand book's grid of dots: 62px apart, navy at 13% (white at 8% on dark). */
--dots-light: radial-gradient(circle, rgba(10,26,51,.13) 1.3px, transparent 1.6px);
--dots-dark: radial-gradient(circle, rgba(255,255,255,.08) 1.3px, transparent 1.6px);
--glass-light: linear-gradient(165deg, rgba(255,255,255,.78), rgba(255,255,255,.58) 55%, rgba(255,255,255,.7));
--glass-light-shadow: 0 1px 2px rgba(10,26,51,.05), 0 12px 24px -12px rgba(10,26,51,.12), 0 40px 70px -40px rgba(10,26,51,.24);
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
-webkit-font-smoothing: antialiased;
background: var(--bg);
color: var(--text);
min-height: 100vh;
transition: background .35s ease, color .35s ease;
font-size: 14px;
/* Texto in the brand book: Regular, tracking -0.5% */
letter-spacing: -.005em;
}
a { color: inherit; }

/* ---------- APP LAYOUT ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

/* Light mode: brand gradient blobs behind everything (glass concept) */
:root[data-theme="light"] { background: #F3F4F7; }
:root[data-theme="light"] body { background: transparent; }
:root[data-theme="light"] body::before {
content: ''; position: fixed; inset: 0; z-index: -2;
/* One painter for every light page: panel, login and the public pages. */
background: var(--page-light);
}
:root[data-theme="light"] .app { grid-template-columns: 266px 1fr; }
.main { min-width: 0; padding: 0 36px 40px; max-width: 1240px; width: 100%; }

/* ---------- SIDEBAR ---------- */
.sidebar {
background: var(--sidebar-bg);
padding: 20px 14px;
position: sticky; top: 0; height: 100vh;
display: flex; flex-direction: column;
overflow: hidden;
z-index: 5;
}
.sidebar::after {
content: ''; position: absolute; right: -46px; bottom: -40px;
width: 190px; height: 190px;
background: url('../assets/verya-simbolo.png') no-repeat center / contain;
transform: rotate(-8deg); pointer-events: none; opacity: 0;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 2px 6px 18px; }
.brand-logo {
width: 36px; height: 36px; border-radius: 10px; flex: none;
background: #FFFFFF;
display: flex; align-items: center; justify-content: center;
box-shadow: 0 4px 14px rgba(3,16,31,.45);
}
.brand-logo img { width: 22px; height: auto; display: block; }
.brand-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.6); margin-top: 2px; }
.brand-spec { font-size: 10.5px; color: rgba(255,255,255,.45); margin-top: 1px; }
.nav-section {
font-size: 10px;
color: rgba(255,255,255,.38); margin: 16px 8px 6px;
}
.nav-item {
display: flex; align-items: center; gap: 10px;
padding: 9px 12px; border-radius: 9px;
font-size: 13.5px; font-weight: 500; color: var(--sidebar-text);
text-decoration: none; margin-bottom: 2px;
transition: color .15s ease, background .15s ease;
}
.nav-dot {
width: 6px; height: 6px; border-radius: 2px; flex: none;
background: transparent; transition: background .15s ease, box-shadow .15s ease;
}
.nav-item:hover { color: #fff; background: var(--sidebar-hover); }
.nav-item.active {
color: #fff; font-weight: 600;
background: linear-gradient(90deg, rgba(185,233,255,.18), rgba(185,233,255,.03));
}
.nav-item.active .nav-dot { background: var(--sidebar-active); box-shadow: 0 0 8px rgba(185,233,255,.8); }
.summary-text { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--text-soft); max-width: 86ch; }
.print-btn { appearance: none; border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-soft); font-family: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; margin-right: 34px; }
.print-btn:hover { border-color: var(--brand); color: var(--text); }
.print-head { display: none; }

.nav-list { display: contents; }
.nav-toggle { display: none; font-family: inherit; }
.sidebar-footer {
margin-top: auto; padding: 14px 8px 2px;
border-top: 1px solid rgba(255,255,255,.08);
font-size: 11px; line-height: 1.7; color: rgba(255,255,255,.38);
}
.sidebar-footer a { color: inherit; }

/* Light sidebar: floating frosted-glass panel (variant A) */
:root[data-theme="light"] .sidebar {
margin: 16px 0 16px 16px;
height: calc(100vh - 32px); top: 16px;
border-radius: 20px;
background: rgba(255,255,255,.58);
backdrop-filter: blur(22px) saturate(1.3);
-webkit-backdrop-filter: blur(22px) saturate(1.3);
border: 1px solid rgba(255,255,255,.85);
box-shadow: 0 10px 34px rgba(10,26,51,.10), inset 0 1px 0 rgba(255,255,255,.9);
}
:root[data-theme="light"] .sidebar::after { opacity: .06; }
:root[data-theme="light"] .brand-logo { background: #0A1A33; box-shadow: 0 6px 16px rgba(10,26,51,.25); }
:root[data-theme="light"] .brand-logo img { filter: brightness(0) invert(1); }
:root[data-theme="light"] .brand-name { color: #0A1A33; }
:root[data-theme="light"] .brand-sub { color: #6B7487; }
:root[data-theme="light"] .brand-spec { color: #8A92A3; }
:root[data-theme="light"] .nav-section { color: #8A92A3; }
:root[data-theme="light"] .nav-item { color: #2E3A50; }
:root[data-theme="light"] .nav-item:hover { background: rgba(255,255,255,.7); color: #0A1A33; }
:root[data-theme="light"] .nav-item.active {
color: #0A1A33;
background: rgba(255,255,255,.95);
box-shadow: 0 2px 10px rgba(10,26,51,.10), inset 0 0 0 1px rgba(255,255,255,1);
}
:root[data-theme="light"] .nav-item.active .nav-dot { background: #2E8FCB; box-shadow: 0 0 8px rgba(185,233,255,.9); }
:root[data-theme="light"] .sidebar-footer { color: #8A92A3; border-top-color: rgba(10,26,51,.08); }

/* Dark sidebar: navy glass with brand glows (variant B) */
:root[data-theme="dark"] .sidebar {
background:
  radial-gradient(300px 260px at 20% 8%, rgba(185,233,255,.20), transparent 70%),
  radial-gradient(320px 300px at 60% 100%, rgba(247,209,216,.13), transparent 70%),
  linear-gradient(165deg, #12254A 0%, #0A1A33 45%, #05070D 100%);
}
:root[data-theme="dark"] .sidebar::after { opacity: .07; filter: brightness(0) invert(1); }
:root[data-theme="dark"] .nav-item.active {
background: rgba(255,255,255,.10);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
box-shadow: inset 0 0 0 1px rgba(185,233,255,.28);
}

/* ---------- TOPBAR ---------- */
.topbar {
display: flex; align-items: center; justify-content: space-between; gap: 16px;
padding: 18px 0 14px;
position: sticky; top: 0; z-index: 40;
background: var(--topbar-fade);
}
.topbar-left { display: flex; flex-direction: column; gap: 2px; }
.crumbs { font-size: 12px; color: var(--text-muted); }
.lede-note { display: block; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.lede-link { color: var(--text-soft); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.lede-link:hover { color: var(--text); }

/* Como funciona */
.how { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-soft); }
.how strong { color: var(--text); }
.glossary { margin: 0; }
.g-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.g-row:last-child { border-bottom: 0; padding-bottom: 0; }
.g-row:first-child { padding-top: 0; }
.g-row dt { font-size: 13px; font-weight: 500; }
.g-row dd { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-soft); }
.weights { display: flex; gap: 3px; margin-top: 10px; height: 34px; max-width: 420px; }
.weights span { display: flex; flex-direction: column; justify-content: center; padding: 0 10px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.weights small { font-weight: 500; opacity: .85; }
.weights.ai-weights { height: 12px; }
.weights.ai-weights span { padding: 0; border-radius: 4px; }
.weights .w1 { background: var(--brand); } .weights .w2 { background: var(--accent); } .weights .w3 { background: var(--text-muted); }
:root[data-theme="dark"] .weights .w1 { background: #2E6BD1; }
@media (max-width: 700px) { .g-row { grid-template-columns: 1fr; gap: 4px; } }
.crumbs span { color: var(--text-soft); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* Month switcher · macOS segmented control */
/* Edition stepper · "‹ Relatório de Setembro 2026 ›" */
.edition { position: relative; display: inline-flex; align-items: stretch; background: var(--seg-bg); border-radius: 8px; padding: 2px; }
.edition button { appearance: none; border: 0; background: transparent; cursor: pointer; font-family: inherit; color: var(--seg-inactive); border-radius: 6px; transition: all .16s ease; }
.edition button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-arrow { width: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ed-arrow svg { width: 15px; height: 15px; }
.ed-arrow:hover:not(:disabled) { color: var(--text); background: var(--bg-elev); }
.ed-arrow:disabled { opacity: .35; cursor: default; }
.ed-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 12px; background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-seg); font-size: 13px; font-weight: 500; white-space: nowrap; }
.ed-label small { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.ed-label svg { width: 13px; height: 13px; color: var(--text-muted); }
.ed-label:hover svg { color: var(--text); }
.ed-menu {
position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 220px; max-height: 60vh; overflow: auto;
background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px;
box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.ed-year { font-size: 10.5px; color: var(--text-faint); padding: 8px 10px 4px; }
.ed-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 7px 10px; font-size: 13px; font-weight: 500; color: var(--text); }
.ed-menu button:hover, .ed-menu button:focus-visible { background: var(--bg-soft); }
.ed-menu button.on { font-weight: 500; color: var(--brand); }
:root[data-theme="dark"] .ed-menu button.on { color: var(--aqua); }
.ed-tag { font-size: 10px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-soft); background: var(--chip-bg); padding: 2px 6px; border-radius: 999px; }
.ed-tag.ed-draft { color: var(--text-muted); background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
/* Admin preview of a month before it is published (shell.js previewBar). */
.preview-bar { margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; color: var(--text-soft); background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); }
.preview-bar strong { color: var(--warn-text); font-weight: 600; }

/* Theme toggle · 34px circle */
.theme-toggle {
width: 34px; height: 34px; border-radius: 999px;
background: var(--bg-elev); border: 1px solid var(--border-strong);
display: inline-flex; align-items: center; justify-content: center;
cursor: pointer; color: var(--text-soft); padding: 0;
transition: all .16s ease;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle svg { width: 15px; height: 15px; stroke: currentColor; }

/* ---------- EDITORIAL HEADLINE ---------- */
.headline { padding: 8px 0 22px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.headline h1 {
font-family: 'Inter', sans-serif;
font-size: 30px; font-weight: 500; margin: 0;
letter-spacing: -.035em; line-height: 1.15; max-width: 780px;
}
.headline .lede {
font-size: 14px; line-height: 1.65; color: var(--text-soft);
max-width: 740px; margin: 10px 0 0;
}
.headline .lede strong { color: var(--text); font-weight: 600; }
/* Emphasis in a sentence is weight, not a status colour. */
.lede strong.hl-danger, .lede strong.hl-good, .lede strong.hl-warn { color: var(--text); }

/* ---------- CARDS ---------- */
.card {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: 14px;
padding: 22px 24px;
box-shadow: var(--shadow-card);
margin-bottom: 16px;
position: relative;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-right: 24px; }
.card-title { font-family: 'Inter', sans-serif; font-size: 14.5px; font-weight: 500; letter-spacing: -.025em; margin: 0; }
.card-sub { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2e { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2e > .card { margin-bottom: 0; }
/* Wide column on the right: for a chart whose labels need the room. */
.grid-2w { display: grid; grid-template-columns: 1fr 1.55fr; gap: 16px; margin-bottom: 16px; }
.grid-2w > .card { margin-bottom: 0; }

/* ---------- KPI CARDS ---------- */
.kpi-grid, .kpi-grid-5 { display: grid; gap: 14px; margin-bottom: 18px; }
.kpi-grid { grid-template-columns: repeat(4, 1fr); }
.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpi {
background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
padding: 18px 20px; box-shadow: var(--shadow-card); position: relative;
}
.kpi-grid-5 .kpi { padding: 16px 18px; }
.kpi-label {
font-size: 11px;
color: var(--text-muted); margin-bottom: 8px; padding-right: 20px;
}
.kpi-value {
font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums;
font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -.04em; color: var(--text);
}
.kpi-grid-5 .kpi-value { font-size: 29px; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--text-faint); margin-left: 3px; }
.kpi-value.v-good, .kpi-value.v-bad { color: inherit; }
.kpi-value.v-na { color: var(--text-faint); }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; margin-top: 7px; }
.kpi-trend.trend-up { color: var(--good-text); }
.kpi-trend.trend-down { color: var(--danger-text); }
.kpi-trend.trend-flat { color: var(--text-faint); }
.kpi-change { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.kpi-change .kpi-trend { margin-top: 0; }
.kpi-was { font-size: 11.5px; color: var(--text-muted); }
.kpi-mom { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
/* On screen the month is told by cards and charts; the paragraph is for paper. */
.print-only { display: none; }
.page-tools { display: flex; justify-content: flex-end; margin-top: 4px; }
/* Score per AI: one bar each, in the AI's colour. */
.ai-scores { display: grid; gap: 12px; }
.ai-score { display: grid; grid-template-columns: 104px minmax(0, 1fr) 30px 46px; align-items: center; gap: 10px; font-size: 13px; }
.ai-score .ai-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-score .ai-name i { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.ai-bar { height: 10px; border-radius: 999px; background: var(--meter-track); overflow: hidden; }
.ai-bar span { display: block; height: 100%; border-radius: 999px; }
.ai-score strong { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.ai-delta { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-delta.up { color: var(--good-text); } .ai-delta.down { color: var(--danger-text); } .ai-delta.flat { color: var(--text-faint); }
.ai-known { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-soft); text-decoration: none; }
.ai-known strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ai-known:hover span:first-child { color: var(--text); }
.m-meter { height: 10px; border-radius: 999px; background: var(--meter-track); overflow: hidden; margin: 18px 0 10px; }
.m-meter span { display: block; height: 100%; border-radius: 999px; }
@media (max-width: 560px) { .ai-score { grid-template-columns: 92px minmax(0, 1fr) 28px; } .ai-delta { display: none; } }
.kpi-mom strong { font-weight: 600; color: var(--text-soft); }

/* KPI popover (click breakdown) */
.kpi.has-popover { cursor: pointer; }
.kpi-popover {
position: absolute; top: calc(100% + 6px); left: 10px; right: 10px; z-index: 55;
background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
box-shadow: var(--shadow-pop); padding: 12px 14px;
opacity: 0; pointer-events: none; transform: translateY(-3px);
transition: all .18s ease;
}
.kpi.open .kpi-popover, .kpi.has-popover:hover .kpi-popover { opacity: 1; pointer-events: auto; transform: none; }
.kpi-popover h4 { margin: 0 0 8px; font-size: 10.5px; color: var(--text-faint); }
.kpi-popover .row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; gap: 12px; }
.kpi-popover .row strong { font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; }

/* ---------- ⓘ TOOLTIPS ---------- */
.info-btn {
position: absolute; top: 12px; right: 12px;
width: 17px; height: 17px; border-radius: 999px;
background: var(--bg-soft); border: 1px solid var(--border-strong); color: var(--seg-inactive);
font-size: 10px; font-weight: 500; font-style: normal; line-height: 1;
display: inline-flex; align-items: center; justify-content: center;
cursor: help; z-index: 20; padding: 0; font-family: inherit;
}
.kpi-grid-5 .info-btn { width: 16px; height: 16px; font-size: 9.5px; top: 11px; right: 11px; }
.info-btn:hover, .info-btn:focus { border-color: var(--brand); color: var(--brand); outline: none; }

/* Inline "?" help, explanation rendered in a body-level floating tip */
.help-btn {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 16px; height: 16px; margin-left: 7px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border-strong); color: var(--seg-inactive);
  font-family: inherit; font-size: 10px; font-weight: 500; line-height: 1; cursor: help; user-select: none;
}
.help-btn:hover, .help-btn:focus { border-color: var(--brand); color: var(--brand); outline: none; }
.float-tip {
  position: fixed; display: none; z-index: 1000;
  background: var(--tip-bg); color: var(--tip-text);
  font-size: 12px; font-weight: 400; line-height: 1.55; padding: 10px 12px; border-radius: 10px;
  box-shadow: var(--shadow-pop);
}
.tech-weight { font-size: 11px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.tech-weight.gate-fail { color: var(--danger-text); }
.tech-folded .tech-row-pass { display: none; }
.tech-toggle {
  display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-soft);
  font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.tech-toggle:hover { border-color: var(--brand); color: var(--brand); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Connect callout (traffic) */
.callout-connect {
background: linear-gradient(135deg, var(--brand-soft), transparent 65%);
border: 1px solid #DCE4F5; border-left: 3px solid var(--brand);
border-radius: 12px; padding: 16px 20px; margin-bottom: 18px;
font-size: 13.5px; line-height: 1.65; color: var(--text-soft); max-width: 860px;
}
:root[data-theme="dark"] .callout-connect { border-color: #27325A; }
.callout-connect strong { color: var(--text); }

/* dashed placeholder cards (not-connected charts) */
.placeholder-card {
border: 1px dashed var(--border-strong); border-radius: 14px;
background: transparent; box-shadow: none;
min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center;
text-align: center; padding: 24px;
}
.ph-title { font-size: 14px; font-weight: 500; letter-spacing: -.025em; margin-bottom: 6px; color: var(--text-soft); }
.ph-text { font-size: 12.5px; color: var(--text-faint); line-height: 1.6; max-width: 320px; }

/* ---------- TABLES ---------- */
.table-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; }
.dt th {
font-size: 10.5px;
color: var(--text-faint); text-align: left; padding: 0 10px 9px;
border-bottom: 1px solid var(--th-divider); white-space: nowrap;
}
.dt td { padding: 12px 10px; border-bottom: 1px solid var(--row-divider); font-size: 13px; vertical-align: middle; }
.dt tbody tr { transition: background .12s ease; }
.dt tbody tr:hover { background: var(--bg-soft); }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt .num { text-align: right; }
.dt-wide .dt { min-width: 1000px; }

/* meter bars */
.pbar { height: 6px; border-radius: 999px; background: var(--meter-track); overflow: hidden; min-width: 60px; }
.pbar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.pbar > span.m-good { background: var(--good); }
.pbar > span.m-danger { background: var(--danger); }
.pbar > span.m-you { background: var(--data-you); }
.pbar > span.m-comp { background: var(--d2); }
.pbar > span.m-dir { background: var(--d4); }
.pbar > span.m-muted { background: var(--text-faint); }
.pbar > span.m-warn { background: var(--warn); }
.pbar > span.m-purple { background: var(--purple); }
.pbar > span.m-accent { background: var(--accent); }

/* ---------- BADGES ----------
   Brand book: status colour is reserved for up and down. So every chip is
   neutral. A change carries a glyph (b-up, b-down); where a level of
   severity has to be told apart (technical checks, the plan's priority) a
   small dot does it, the same way everywhere. */
.badge {
display: inline-flex; align-items: center; gap: 6px;
font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 999px;
white-space: nowrap;
background: var(--chip-bg); border: 1px solid var(--chip-line); color: var(--text-soft);
}
.b-good::before, .b-danger::before, .b-warn::before { content: ''; width: 6px; height: 6px; border-radius: 999px; flex: none; }
.b-good::before { background: var(--good); }
.b-danger::before { background: var(--danger); }
.b-warn::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-muted); }
.b-up::before, .b-down::before { font-size: 8px; line-height: 1; }
.b-up::before { content: '\25B2'; color: var(--good); }
.b-down::before { content: '\25BC'; color: var(--danger); }
.b-you { background: var(--brand); border-color: transparent; color: #fff; }
.b-muted { color: var(--text-muted); }

/* ---------- CHIPS ---------- */
.filterbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.fchip {
appearance: none; border: 1px solid var(--border-strong); background: var(--bg-elev);
color: var(--text-soft); font-size: 10.5px; font-family: inherit;
padding: 6px 14px; border-radius: 999px; cursor: pointer;
transition: all .15s ease;
}
.fchip:hover { border-color: var(--brand); color: var(--brand); }
.fchip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fcount { font-size: 12px; color: var(--text-faint); margin-left: auto; }

.chip-comp {
display: inline-flex; align-items: center; gap: 5px;
background: var(--chip-bg); border: 1px solid var(--chip-line); color: var(--text-soft);
font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
text-decoration: none; white-space: nowrap;
}
a.chip-comp:hover { border-color: var(--border-strong); color: var(--text); }
.chip-comp .n { font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }

.src-chip {
display: inline-flex; align-items: center; gap: 5px;
background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
font-size: 11px; padding: 3px 9px; border-radius: 999px; text-decoration: none;
}
.src-chip:hover { border-color: var(--brand); }
.src-chip .n { color: var(--text-muted); }
.src-chip.shared { color: var(--text-muted); border-style: dashed; background: transparent; }
.src-chip.shared .n { color: var(--text-faint); }

/* platform coverage dots */
/* The AIs' own marks, each in its AI's colour (C.aiMark in components.js).
   Where a mark is missing the old coloured dot is drawn instead. */
.ai-logo { flex: none; display: inline-block; vertical-align: -2px; }
.ai-logo.off { opacity: .6; }
.ai-logo-mask { -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ai-cell { display: inline-flex; align-items: center; gap: 8px; }
.ai-cell > i { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.pdots { display: inline-flex; gap: 5px; align-items: center; }
.pdots i {
width: 8px; height: 8px; border-radius: 999px;
background: var(--meter-track);
}
.pdots i.on { background: var(--accent); }
/* brand colours, mirrored in charts.js PLATFORM_COLORS */
.pdots i.on.p-chatgpt { background: #10A37F; }
.pdots i.on.p-claude { background: #D97757; }
.pdots i.on.p-gemini { background: #8E75F0; }
.pdots i.on.p-perplexity { background: #21B8CD; }
.pdots i.on.p-google { background: #4285F4; }

/* citations: what each own page answers, and the questions with no page */
.qa-page { padding: 12px 0; border-bottom: 1px solid var(--border); }
.qa-page:last-child { border-bottom: 0; padding-bottom: 0; }
.qa-page:first-child { padding-top: 0; }
.qa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.qa-title { font-weight: 600; line-height: 1.4; }
.qa-title small { display: block; font-size: 11px; color: var(--text-faint); font-weight: 400; margin-top: 2px; }
.qa-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.qa-n { }
.qa-n small { font-family: inherit; font-weight: 400; color: var(--text-muted); margin-left: 3px; }
.qa-qs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qchip {
display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: 999px;
font-size: 12px; line-height: 1.3; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border);
}
.qchip.branded { color: var(--text-muted); border-style: dashed; background: transparent; }
.gap-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.gap-row:last-child { border-bottom: 0; padding-bottom: 0; }
.gap-row:first-child { padding-top: 0; }
.gap-q { font-weight: 600; line-height: 1.4; margin-bottom: 7px; }
.gap-pages { display: flex; flex-direction: column; gap: 5px; }
.gap-page { display: flex; align-items: center; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.gap-page .who { font-weight: 600; color: var(--text); }
.gap-page a.path { color: var(--text-muted); text-decoration: none; border-bottom: 1px dashed var(--border-strong); word-break: break-all; }
.gap-page a.path:hover { color: var(--text); }

/* links */
.domain-link { font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.domain-link:hover { border-bottom-color: var(--brand); color: var(--brand); }
.danger-link { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.danger-link:hover { border-bottom-color: var(--text-soft); }

/* ---------- FUNNEL ---------- */
.funnel-row { display: grid; grid-template-columns: 175px 1fr 46px; gap: 14px; align-items: center; padding: 10px 0; }
.funnel-row + .funnel-row { border-top: 1px solid var(--row-divider); }
.funnel-label { font-size: 13px; font-weight: 600; }
.funnel-label small { display: block; font-weight: 400; font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.funnel-bar { height: 10px; border-radius: 999px; background: var(--meter-track); overflow: hidden; }
/* The funnel's own gradient, from the brand book: navy to petrol in light, indigo to ice in dark. */
.funnel-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0A1A33, #2E8FCB 70%, #69B0C8); min-width: 4px; }
:root[data-theme="dark"] .funnel-bar > span { background: linear-gradient(90deg, #4652C9, #2CA2CE 70%, #B9E9FF); }
.funnel-count { font-size: 15px; text-align: right; }

/* ---------- RECOMMENDED ACTIONS (overview rows) ---------- */
.action-row {
display: flex; align-items: center; gap: 12px;
padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
margin-bottom: 8px; text-decoration: none; color: inherit; cursor: pointer;
transition: all .15s ease; font-size: 13px;
}
.action-row:hover { border-color: var(--brand); background: var(--bg-soft); }
.action-num {
width: 22px; height: 22px; border-radius: 7px; flex: none;
background: var(--bg-soft); color: var(--text-muted);
font-size: 11px;
display: inline-flex; align-items: center; justify-content: center;
}
.action-text { flex: 1; font-weight: 600; line-height: 1.4; }
.action-text small { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- ACTION PLAN PAGE ---------- */
.bucket-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.bucket-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-card); }
.bucket-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bucket-icon {
width: 34px; height: 34px; border-radius: 10px; flex: none;
display: inline-flex; align-items: center; justify-content: center;
font-weight: 500; font-size: 15px;
}
.bucket-icon.b1, .bucket-icon.b2 { background: var(--chip-bg); color: var(--text-soft); }
.bucket-icon.b1 { color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.bucket-icon.b3 { background: var(--chip-bg); color: var(--text-muted); }
.bucket-title { font-size: 14.5px; font-weight: 500; letter-spacing: -.02em; }
.bucket-list-items, .bucket-card ul { font-size: 12.5px; color: var(--text-soft); line-height: 1.7; border-top: 1px dashed var(--border); padding: 10px 0 0; margin: 0; list-style: none; }

/* ---------- CHARTS ---------- */
.chart-wrap { position: relative; height: 260px; }

/* small multiples: one sparkline per AI */
.tones { display: flex; flex-wrap: wrap; gap: 5px; }
.tone { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft); cursor: help; }
.tone::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--text-faint); }
.tone-positive::before, .tone-negative::before { width: auto; height: auto; background: none; border-radius: 0; font-size: 8px; line-height: 1; }
.tone-positive::before { content: '\25B2'; color: var(--good); }
.tone-negative::before { content: '\25BC'; color: var(--danger); }
.kpi-value.v-text { font-size: 22px; letter-spacing: 0; padding-top: 4px; }
.multiples { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.multiple { padding: 12px 12px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); min-width: 0; }
.m-head { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-head i { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.m-val { margin-top: 6px; font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; font-size: 24px; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.m-val small { font-family: inherit; font-size: 11px; font-weight: 600; }
.m-val small.up { color: var(--good-text); }
.m-val small.down { color: var(--danger-text); }
.m-val small.flat { color: var(--text-faint); }
.m-spark { position: relative; height: 72px; margin-top: 8px; }
@media (max-width: 900px) { .tones { display: flex; flex-wrap: wrap; gap: 5px; }
.tone { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft); cursor: help; }
.tone::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--text-faint); }
.tone-positive::before, .tone-negative::before { width: auto; height: auto; background: none; border-radius: 0; font-size: 8px; line-height: 1; }
.tone-positive::before { content: '\25B2'; color: var(--good); }
.tone-negative::before { content: '\25BC'; color: var(--danger); }
.kpi-value.v-text { font-size: 22px; letter-spacing: 0; padding-top: 4px; }
.multiples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tones { display: flex; flex-wrap: wrap; gap: 5px; }
.tone { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft); cursor: help; }
.tone::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--text-faint); }
.tone-positive::before, .tone-negative::before { width: auto; height: auto; background: none; border-radius: 0; font-size: 8px; line-height: 1; }
.tone-positive::before { content: '\25B2'; color: var(--good); }
.tone-negative::before { content: '\25BC'; color: var(--danger); }
.kpi-value.v-text { font-size: 22px; letter-spacing: 0; padding-top: 4px; }
.multiples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart-wrap.tall { height: 340px; }
.chart-wrap.short { height: 210px; }

/* ---------- FOOTER / MISC ---------- */
.footer { text-align: center; font-size: 12px; color: var(--text-faint); padding: 26px 0 6px; }
.footer span { color: var(--text-soft); font-weight: 500; }
.fadeUp { animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.empty-note { margin: 0; color: var(--text-faint); font-size: 13px; text-align: center; padding: 24px 0; }

/* Quem cada IA recomenda: one column per AI, top 3 with counts */
.leaders { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.leader-col { background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.leader-head { display: flex; align-items: center; gap: 8px; font-size: 13px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.leader-head i { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.leader-head span { margin-left: auto; font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.leader-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.35; min-width: 0; }
.leader-row > div { min-width: 0; }
.leader-row small { display: block; font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.leader-rank { flex: none; width: 18px; height: 18px; border-radius: 6px; background: var(--bg-elev); color: var(--text-muted); font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; }
.leader-name { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.leader-row .danger-link { overflow-wrap: anywhere; }
/* The client's own line in the ranking: picked out, never a footnote. */
.leader-row.is-you { margin: 0 -8px; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.leader-row.is-you .leader-rank { background: var(--accent); color: #fff; }
.leader-row.is-you .leader-name { color: var(--text); }
.leader-below { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); }
@media (max-width: 1100px) { .leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .leaders { grid-template-columns: 1fr; } }

/* ---------- LOGIN ---------- */
.login-wrap {
min-height: 100vh; display: flex; align-items: center; justify-content: center;
padding: 24px;
}
/* The dotted grid of the brand book, over the page of light and under the card. */
.login-wrap::before {
content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
background-image: var(--dots-light); background-size: 62px 62px; background-position: 31px 18px;
}
.login-card {
background: var(--glass-light); border-radius: 32px;
box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 5px rgba(255,255,255,.42), inset 0 0 0 6px rgba(10,26,51,.05), var(--glass-light-shadow);
-webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%);
padding: 42px 44px 38px; width: 100%; max-width: 380px; text-align: center; color: #0A1A33;
border: 1.2px solid rgba(255,255,255,.9);
}
.login-logo { margin: 4px auto 16px; display: flex; justify-content: center; }
.login-logo img { width: 150px; height: auto; }
.login-slogan { font-size: 12.5px; color: #2E3A50; margin-top: 6px; }
.login-tag { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #6B7487; margin: 14px 0 24px; }
.login-field { text-align: left; margin-bottom: 12px; }
.login-field label { display: block; font-size: 10.5px; color: #2E3A50; margin-bottom: 6px; }
.login-field input {
width: 100%; border: 1px solid #E6E8EE; border-radius: 14px;
padding: 12px 14px; font-size: 14px; font-family: inherit; outline: none; color: #0A1A33; background: rgba(255,255,255,.9);
}
.login-field input:focus { border-color: #0A1A33; }
.login-btn {
width: 100%; padding: 13px; border: 0; border-radius: 14px;
background: linear-gradient(160deg, #2A3550, #0A1A33);
color: #fff; font-size: 14px; font-weight: 500; font-family: inherit; cursor: pointer;
box-shadow: 0 6px 16px rgba(10,26,51,.3); margin-top: 8px;
transition: all .18s ease;
}
.login-btn:hover { filter: brightness(1.06); }
.login-btn:disabled { opacity: .6; cursor: default; }
.login-error { margin: 12px 0 0; font-size: 13px; color: #D23F3F; min-height: 18px; text-align: left; }
.login-note { margin-top: 20px; font-size: 12px; color: #6B7487; line-height: 1.6; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
.kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid { grid-template-columns: repeat(2, 1fr); }
.grid-2, .grid-2e, .grid-2w { grid-template-columns: 1fr; }
.bucket-list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
.app { grid-template-columns: 1fr; }
:root[data-theme="light"] .app { grid-template-columns: 1fr; }
.sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px; padding: 10px 14px; overflow: visible; }
:root[data-theme="light"] .sidebar { margin: 10px; height: auto; top: 0; border-radius: 16px; }
.sidebar::after { display: none; }
.brand { padding: 0 10px 0 0; margin: 0; }
/* The menu is one button showing the current page; the list opens under it. */
.nav-toggle {
display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
appearance: none; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff;
font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; cursor: pointer;
}
.nav-toggle svg { width: 14px; height: 14px; transition: transform .15s ease; }
.sidebar.open .nav-toggle svg { transform: rotate(180deg); }
:root[data-theme="light"] .nav-toggle { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,.6); }
.nav-list { display: none; width: 100%; flex-direction: column; gap: 2px; padding-top: 8px; }
.sidebar.open .nav-list { display: flex; }
.nav-section { display: none; }
.nav-item { padding: 10px 12px; font-size: 14px; }
.sidebar-footer { margin-top: 6px; }
.main { padding: 0 16px 32px; }
.headline { padding: 4px 0 16px; margin-bottom: 16px; }
.headline h1 { font-size: 22px; line-height: 1.25; }
.headline .lede { font-size: 14px; }
.lede-note { display: none; }
/* Wide tables scroll inside their card instead of widening the page. */
.card { overflow-x: auto; }
.bar-cell { display: none; }
.kpi-grid, .kpi-grid-5 { grid-template-columns: 1fr 1fr; }
.funnel-row { grid-template-columns: 120px 1fr 40px; }
}
@media (max-width: 520px) {
.kpi-grid, .kpi-grid-5 { grid-template-columns: 1fr; }
.topbar { flex-wrap: wrap; }
}


/* ============ GLASS TOTAL (light mode) ============ */
/* Floating glass shapes behind everything (injected by shell.js) */
.bg-shapes { display: none; }
:root[data-theme="light"] .bg-shapes {
display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
.bg-shapes i {
position: absolute; display: block; border-radius: 40px;
background: linear-gradient(150deg, rgba(255,255,255,.34), rgba(255,255,255,.12));
border: 1px solid rgba(255,255,255,.6);
box-shadow: 0 12px 40px rgba(10,26,51,.07), inset 0 1px 0 rgba(255,255,255,.75);
}
.bg-shapes .s1 { width: 24vw; height: 24vw; max-width: 340px; max-height: 340px; right: -7vw; top: -9vh; border-radius: 999px; }
.bg-shapes .s2 { width: 15vw; height: 15vw; max-width: 230px; max-height: 230px; right: 12vw; top: 6vh; transform: rotate(14deg); }
.bg-shapes .s3 { width: 16vw; height: 16vw; max-width: 240px; max-height: 240px; left: 14vw; bottom: -8vh; border-radius: 999px; }
.bg-shapes .s4 { width: 12vw; height: 12vw; max-width: 190px; max-height: 190px; left: 36vw; bottom: 10vh; transform: rotate(-10deg); }
.bg-shapes .s5 { width: 8vw; height: 8vw; max-width: 130px; max-height: 130px; left: 55vw; top: 9vh; border-radius: 999px; }

/* Frosted surfaces: translucent glass with the sheen baked into the
   background stack. No per-card backdrop-filter: over a soft gradient the
   blur is visually negligible and it was the main scroll cost. */
:root[data-theme="light"] .card,
:root[data-theme="light"] .kpi,
:root[data-theme="light"] .bucket-card,
:root[data-theme="light"] .callout-connect {
background:
  linear-gradient(160deg, rgba(255,255,255,.5), rgba(255,255,255,0) 34%),
  linear-gradient(115deg, rgba(255,255,255,.68), rgba(255,255,255,.46) 45%, rgba(255,255,255,.58));
border-color: rgba(255,255,255,.95);
box-shadow: 0 10px 34px rgba(10,26,51,.09), inset 0 1px 0 rgba(255,255,255,1);
}
:root[data-theme="light"] .kpi-popover { background: rgba(255,255,255,.97); }

/* chrome: month segmented control, theme toggle, filter chips, inputs */
:root[data-theme="light"] .edition {
background: rgba(255,255,255,.42);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border: 1px solid rgba(255,255,255,.7);
}
:root[data-theme="light"] .theme-toggle {
background: rgba(255,255,255,.55);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border-color: rgba(255,255,255,.85);
}
:root[data-theme="light"] .fchip {
background: rgba(255,255,255,.6);
border-color: rgba(255,255,255,.85);
}
:root[data-theme="light"] .fchip.on { background: var(--brand); border-color: var(--brand); }
:root[data-theme="light"] .filterbar input[type="text"] {
background: rgba(255,255,255,.7);
border-color: rgba(255,255,255,.9);
}

/* tables on glass: hairlines and hover that work over tint */
:root[data-theme="light"] .dt th { border-bottom-color: rgba(20,24,31,.10); }
:root[data-theme="light"] .dt td { border-bottom-color: rgba(20,24,31,.07); }
:root[data-theme="light"] .dt tbody tr:hover { background: rgba(10,26,51,.04); }
:root[data-theme="light"] .prompt-table table.dt thead th { background: rgba(255,255,255,.94); }
:root[data-theme="light"] .pbar { background: rgba(20,24,31,.10); }
:root[data-theme="light"] .funnel-bar { background: rgba(20,24,31,.10); }
:root[data-theme="light"] .funnel-row + .funnel-row { border-top-color: rgba(20,24,31,.07); }
:root[data-theme="light"] .headline { border-bottom-color: rgba(10,26,51,.10); }
:root[data-theme="light"] .action-row { background: rgba(255,255,255,.5); border-color: rgba(255,255,255,.8); }
:root[data-theme="light"] .action-row:hover { background: rgba(255,255,255,.85); border-color: var(--brand); }
:root[data-theme="light"] .src-chip { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.85); }
:root[data-theme="light"] .placeholder-card { border-color: rgba(10,26,51,.22); }

@media (max-width: 820px) {
.bg-shapes { display: none !important; }
}

/* ---- paper: the overview as a one-sheet monthly summary ----
   Kept at the end of the file: these rules have the same weight as the
   screen rules above, so they only win by coming last. */
/* ---- Financeiro: a charge still owed, with its Pix code. The QR sits on a
   white tile in both themes: a camera needs dark on light. ---- */
.pay-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; }
.pay-main { min-width: 0; }
.pay-amount { font-size: 40px; line-height: 1; margin: 14px 0 10px; color: var(--text); }
.pay-meta { font-size: 13.5px; color: var(--text-soft); }
.pay-side { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.pay-qr { width: 148px; height: 148px; flex: none; padding: 6px; border-radius: 16px; background: #fff; border: 1px solid var(--border); }
.pay-qr svg { display: block; width: 100%; height: 100%; }
.pay-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pay-note { font-size: 13px; color: var(--text-muted); max-width: 220px; }
.doc-link { color: var(--text); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.doc-link:hover { border-bottom-color: var(--text); }
@media (max-width: 640px) { .pay-card { align-items: flex-start; } .pay-amount { font-size: 32px; } .pay-side { width: 100%; } }

/* ---- Type roles (brand book). Two families, Inter 300 to 600, no 650, 700
   or 800: those cuts are not in the font file, so the browser fakes them.
   Three recipes; a rule sets its own size and colour and takes the rest
   from here. They sit before the print rules, which must stay last. ---- */

/* Label: IBM Plex Mono Medium, capitals, +8%. Table headers, form labels,
   status and filter chips, small titles above a number. */
.dt th, .kpi-label, .kpi-popover h4, .nav-section, .login-field label, .ed-year,
.fchip, .tone, .badge, .wbadge, .plan-status,
.prompt-table table.dt td[data-l]::before {
  font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}
/* System number: the same face for a number that is an index, not a measure. */
.leader-rank, .plan-num, .action-num {
  font-family: var(--mono); font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
/* Dado: a measured number. Inter SemiBold, tabular, tracking -4%. */
.kpi-value, .pay-amount, .dt td.num, .m-val, .qa-n, .src-chip .n, .ai-count, .pp-count strong,
.funnel-count, .ai-score strong, .ai-known strong, .chip-comp .n {
  font-family: 'Inter', sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.04em;
}
/* What rides beside a number (a unit, a change) keeps normal spacing. */
.kpi-value small, .m-val small, .qa-n small { letter-spacing: 0; }


@page { size: A4; margin: 14mm; }
@media print {
:root, :root[data-theme="light"], :root[data-theme="dark"] {
--bg: #fff; --bg-elev: #fff; --bg-soft: #f5f6f8; --border: #dfe3ea; --border-strong: #cfd5df;
--text: #0A1A33; --text-soft: #3b4658; --text-muted: #5f6b80; --text-faint: #7a8398; --meter-track: #e9edf3;
}
html, body { background: #fff !important; }
/* The page of light is fixed to the window: on paper it would repeat on every sheet. */
body::before { display: none !important; }
*, *::before, *::after { transition: none !important; animation: none !important; }
.sidebar, .topbar, .bg-shapes, .tip-btn, .no-print, .kpi-popover, .lede-note { display: none !important; }
.print-only { display: block; }
.grid-2.trend-row { grid-template-columns: 1fr !important; }
.app { display: block !important; }
.main { padding: 0 !important; max-width: none !important; }
.print-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #3b4658; border-bottom: 1px solid #cfd5df; padding-bottom: 8px; margin-bottom: 14px; }
.print-head strong { letter-spacing: .18em; color: #0A1A33; }
.headline { padding: 0 0 10px; margin-bottom: 12px; }
.headline h1 { font-size: 21px; }
.headline .lede { font-size: 12.5px; }
.card, .kpi { background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border: 1px solid #dfe3ea !important; break-inside: avoid; }
.card { padding: 14px 16px; margin-bottom: 10px; }
.kpi-grid, .kpi-grid-5 { grid-template-columns: repeat(4, 1fr) !important; gap: 8px; margin-bottom: 10px; }
.kpi { padding: 10px 12px; }
.kpi-value { font-size: 22px; }
.summary-text { font-size: 12.5px; line-height: 1.6; max-width: none; }
.chart-wrap { height: 190px !important; }
canvas { max-width: 100% !important; }
.grid-2 { grid-template-columns: 1fr 1fr !important; gap: 10px; }
/* On paper the funnel gives way to the next actions: its numbers are in the summary. */
.print-next { grid-template-columns: 1fr !important; }
.print-next > .card:first-child { display: none; }
.chart-wrap { height: 135px !important; }
.card-sub { display: none; }
.card-head { margin-bottom: 8px; }
.card { padding: 12px 14px; }
.summary-text { font-size: 12px; line-height: 1.5; }
.action-row { padding: 5px 0; }
.footer { margin-top: 0; padding: 6px 0 0; font-size: 10.5px; }
a { color: inherit; text-decoration: none; }
}
