:root {
  color-scheme: light;
  --brand: #0265a2; --brand-2: #134068; --accent: #ffa700;
  --meta: #0866ff; --google: #ea4335;
  --plane: #f6f8fa; --surface: #ffffff; --ink: #0e1f2e; --ink-2: #4a5b68;
  --muted: #8496a3; --grid: #e6ecf1; --axis: #c7d2da; --border: rgba(19,64,104,0.12);
  --good: #0ca30c; --crit: #d03b3b;
  --shadow: 0 1px 2px rgba(19,64,104,.06), 0 6px 20px rgba(19,64,104,.06);
}
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) {
  color-scheme: dark; --brand: #2a92d8; --brand-2: #6fb8e6; --accent: #ffb733; --meta: #4d8dff; --google: #ff6b5e;
  --plane: #0a1520; --surface: #10202e; --ink: #eef4f8; --ink-2: #a9bccb; --muted: #7f94a3;
  --grid: #1c3040; --axis: #2b475b; --border: rgba(255,255,255,0.10); --good: #12b312; --crit: #e05656;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.4);
}}
:root[data-theme="dark"] {
  color-scheme: dark; --brand: #2a92d8; --brand-2: #6fb8e6; --accent: #ffb733; --meta: #4d8dff; --google: #ff6b5e;
  --plane: #0a1520; --surface: #10202e; --ink: #eef4f8; --ink-2: #a9bccb; --muted: #7f94a3;
  --grid: #1c3040; --axis: #2b475b; --border: rgba(255,255,255,0.10); --good: #12b312; --crit: #e05656;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--plane); color: var(--ink); font-family: "Poppins", system-ui, sans-serif; font-size: 14px; line-height: 1.45; }
a { color: var(--brand); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 20px clamp(12px,3vw,28px) 60px; }
header.top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 3px solid var(--brand); }
header.top h1 { font-size: 19px; margin: 0; font-weight: 600; }
.sub { color: var(--ink-2); font-size: 13px; }
.brand-logo { height: 42px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .logo-light { display:none; } :root:where(:not([data-theme="light"])) .logo-dark { display:block; } }
:root[data-theme="dark"] .logo-light { display: none; } :root[data-theme="dark"] .logo-dark { display: block; }
:root[data-theme="light"] .logo-light { display: block; } :root[data-theme="light"] .logo-dark { display: none; }
.brand-sep { width: 1px; height: 34px; background: var(--border); }
.spacer { flex: 1; }
.navlink { text-decoration: none; color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.navlink:hover { border-color: var(--brand); color: var(--brand); }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { text-decoration: none; color: var(--ink-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: 13px; }
.tab:hover { border-color: var(--brand); }
.tab.active { background: var(--brand); color: #fff; border-color: transparent; }
button, .navlink, .tab { font: inherit; cursor: pointer; }
.icon-btn { border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: 8px 10px; cursor: pointer; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 18px; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
select, input[type="date"] { font: inherit; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--plane); color: var(--ink); }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 0; cursor: pointer; white-space: nowrap; }
.chk input { width: 16px; height: 16px; }
.platform-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; margin: 4px 0 12px; }
.platform-title .badge { font-size: 12px; color: #fff; padding: 2px 10px; border-radius: 999px; }
.badge-meta { background: var(--meta); } .badge-google { background: var(--google); } .badge-comb { background: var(--brand); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .value { font-size: 24px; font-weight: 650; margin-top: 4px; font-family: "Poppins", sans-serif; }
.kpi .value small { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.kpi .delta { font-size: 12px; font-weight: 600; margin-top: 4px; }
.kpi .delta.up { color: var(--good); } .kpi .delta.down { color: var(--crit); } .kpi .delta.flat { color: var(--muted); }
.kpi.hl { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.kpi.hl .label, .kpi.hl .value small { color: rgba(255,255,255,.85); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { font-size: 14px; margin: 0 0 12px; font-weight: 600; }
.card h2 .hint { color: var(--muted); font-weight: 400; font-size: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--grid); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--brand); }
th.sortable .arr { opacity: .4; }
th.sortable.asc .arr, th.sortable.desc .arr { opacity: 1; color: var(--brand); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.type-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); }
.type-LEAD { color: var(--meta); } .type-SEGUIDOR { color: var(--accent); }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-top: 22px; overflow-x: auto; border-bottom: 1px solid var(--axis); }
.chart .b { flex: 1 0 22px; min-width: 16px; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; position: relative; }
.chart .b .fill { width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; background: var(--meta); }
.chart .b .lbl { font-size: 10px; color: var(--ink); font-weight: 600; margin-bottom: 3px; white-space: nowrap; }
.chart .b .tk { font-size: 10px; color: var(--muted); white-space: nowrap; margin-top: 4px; transform: rotate(-38deg); height: 14px; }
.chart.google .b .fill { background: var(--google); }
.chart.comb .b .fill { background: var(--brand); }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.empty { color: var(--muted); text-align: center; padding: 30px; }
.recon-flex { display: flex; gap: 24px; flex-wrap: wrap; }
.recon-item { flex: 1; min-width: 220px; }
.recon-item .big { font-size: 22px; font-weight: 700; font-family: "Poppins",sans-serif; }
.hbar-row { display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; }
.hbar-name { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--grid); border-radius: 5px; height: 18px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 5px; min-width: 2px; }
.hbar-val { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 62px; text-align: right; }
