:root {
  color-scheme: light;
  --brand: #9a7b4f; --brand-2: #2c4a3e; --accent: #c4a574;
  --meta: #0866ff; --google: #ea4335;
  --plane: #f7f4ef; --surface: #fcfbf8; --ink: #1a1714; --ink-2: #3d3832;
  --muted: #7a7268; --grid: #e4dfd6; --axis: #d4cdc0; --border: rgba(26,23,20,0.10);
  --good: #2c4a3e; --crit: #8b3a3a;
  --shadow: 0 1px 2px rgba(26,23,20,.05), 0 8px 24px rgba(26,23,20,.06);
}
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) {
  color-scheme: dark; --brand: #c4a574; --brand-2: #d4b896; --accent: #9a7b4f; --meta: #4d8dff; --google: #ff6b5e;
  --plane: #141210; --surface: #1c1916; --ink: #f7f4ef; --ink-2: #c4bdb2; --muted: #8a8278;
  --grid: #2a2622; --axis: #3a342e; --border: rgba(255,255,255,0.10); --good: #5a8f7b; --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: #c4a574; --brand-2: #d4b896; --accent: #9a7b4f; --meta: #4d8dff; --google: #ff6b5e;
  --plane: #141210; --surface: #1c1916; --ink: #f7f4ef; --ink-2: #c4bdb2; --muted: #8a8278;
  --grid: #2a2622; --axis: #3a342e; --border: rgba(255,255,255,0.10); --good: #5a8f7b; --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: "Manrope", 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: 2px solid var(--brand); }
header.top h1 { font-size: 19px; margin: 0; font-weight: 600; font-family: "Cormorant Garamond", Georgia, serif; letter-spacing: .02em; }
.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: "Manrope", 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); }
.empty { color: var(--muted); padding: 20px; text-align: center; }
.primary { background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 9px 14px; font-weight: 600; }
.primary:hover { filter: brightness(1.05); }
.primary:disabled { opacity: .6; cursor: wait; }
