/* B30: identidade nova da Central — neutros frios, mel como acento (pouco), cores dos gráficos validadas (dataviz:
   produto/anúncios/taxas/lucro passam CVD e visão normal nos dois temas; no claro, amarelo e verde levam rótulo). */
:root {
  color-scheme: light;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --raised: #FFFFFF;
  --line: #E5E7EB;
  --line-strong: #D1D5DB;
  --text: #111827;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --honey: #B7791F;
  --honey-bright: #E5A00D;
  --honey-soft: rgba(229, 160, 13, .14);
  --turf: #059669;
  --turf-soft: rgba(5, 150, 105, .12);
  --flare: #DC2626;
  --flare-soft: rgba(220, 38, 38, .10);
  --steel-soft: rgba(107, 114, 128, .12);
  --fut7: #D08A00;
  --tnf: #1C6FB4;
  --ocean-a: #EEF1F5;
  --ocean-b: #D7DDE5;
  --land: #4B5563;
  --grat: rgba(17, 24, 39, .06);
  --rim: rgba(28, 111, 180, .22);
  --ping-edge: #FFFFFF;
  --backdrop: rgba(17, 24, 39, .32);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px -16px rgba(16, 24, 40, .18);
  --c-produto: #eda100;
  --c-ads: #2a78d6;
  --c-taxas: #eb6834;
  --c-lucro: #1baf7a;
  --c-receita: #111827;
  --c-ontem: #9CA3AF;
  --hero-bg: linear-gradient(135deg, #14171D 0%, #252A33 100%);
  --hero-text: #F9FAFB;
  --hero-muted: #A1A7B3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B0D11;
    --surface: #13161B;
    --surface-2: #181C22;
    --raised: #1C2128;
    --line: #252A32;
    --line-strong: #343B45;
    --text: #F3F4F6;
    --muted: #9CA3AF;
    --faint: #6B7280;
    --honey: #F5B83D;
    --honey-bright: #FFC857;
    --honey-soft: rgba(245, 184, 61, .14);
    --turf: #34D399;
    --turf-soft: rgba(52, 211, 153, .13);
    --flare: #F87171;
    --flare-soft: rgba(248, 113, 113, .13);
    --steel-soft: rgba(156, 163, 175, .12);
    --fut7: #F5B83D;
    --tnf: #7FC8FF;
    --ocean-a: #151A22;
    --ocean-b: #0A0D12;
    --land: #6B7A8C;
    --grat: rgba(243, 244, 246, .05);
    --rim: rgba(127, 200, 255, .25);
    --ping-edge: #0B0D11;
    --backdrop: rgba(0, 0, 0, .6);
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, .8);
    --c-produto: #c98500;
    --c-ads: #3987e5;
    --c-taxas: #d95926;
    --c-lucro: #199e70;
    --c-receita: #F3F4F6;
    --c-ontem: #6B7280;
    --hero-bg: linear-gradient(135deg, #1D2129 0%, #2A2416 100%);
    --hero-text: #F9FAFB;
    --hero-muted: #A1A7B3;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0D11;
  --surface: #13161B;
  --surface-2: #181C22;
  --raised: #1C2128;
  --line: #252A32;
  --line-strong: #343B45;
  --text: #F3F4F6;
  --muted: #9CA3AF;
  --faint: #6B7280;
  --honey: #F5B83D;
  --honey-bright: #FFC857;
  --honey-soft: rgba(245, 184, 61, .14);
  --turf: #34D399;
  --turf-soft: rgba(52, 211, 153, .13);
  --flare: #F87171;
  --flare-soft: rgba(248, 113, 113, .13);
  --steel-soft: rgba(156, 163, 175, .12);
  --fut7: #F5B83D;
  --tnf: #7FC8FF;
  --ocean-a: #151A22;
  --ocean-b: #0A0D12;
  --land: #6B7A8C;
  --grat: rgba(243, 244, 246, .05);
  --rim: rgba(127, 200, 255, .25);
  --ping-edge: #0B0D11;
  --backdrop: rgba(0, 0, 0, .6);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .8);
  --c-produto: #c98500;
  --c-ads: #3987e5;
  --c-taxas: #d95926;
  --c-lucro: #199e70;
  --c-receita: #F3F4F6;
  --c-ontem: #6B7280;
  --hero-bg: linear-gradient(135deg, #1D2129 0%, #2A2416 100%);
  --hero-text: #F9FAFB;
  --hero-muted: #A1A7B3;
}

*, *::before, *::after { box-sizing: inherit; }
/* O atributo hidden ganha sempre: main (grid), footer (flex) e outros têm display próprio, que sem isto se sobrepunha ao
   hidden (a vista de decisões não escondia a página; o arranque mostrava o main vazio). Visto na captura do B14.3. */
[hidden] { display: none !important; }
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--honey-bright); outline-offset: 2px; border-radius: 6px; }
.num { font-family: 'Saira Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand svg { flex: none; }
.brand b { font-family: 'Saira Condensed', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .01em; }
.brand span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.seg button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.live {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 13px;
}
.live i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--turf);
  box-shadow: 0 0 0 0 var(--turf-soft);
  animation: beat 2s infinite;
}
.live.paused i { background: var(--faint); animation: none; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 var(--turf-soft); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.clock { font-size: 22px; font-weight: 600; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer;
}
.demo-flag { font-size: 12px; color: var(--muted); padding: 4px 10px; border: 1px dashed var(--line-strong); border-radius: 999px; white-space: nowrap; }

/* ---------- page ---------- */
main { max-width: 1440px; margin: 0 auto; padding: 18px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
main > *, .layout > *, .bottom > *, .side > *, .score > *, .kpis > *, .panel-h > *, .top-in > * { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.panel-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 14px 18px 0; }
.panel-h h2 { white-space: nowrap; }
.panel-h h2 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-h .muted { font-size: 13px; }
.panel-h .act { margin-left: auto; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

/* ---------- scoreboard ---------- */
.score {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 18px 22px;
}
.profit .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.profit .big { font-size: 46px; font-weight: 700; line-height: 1; margin: 6px 0 6px; }
.profit .big.neg { color: var(--flare); }
.profit .proj { font-size: 13px; color: var(--muted); }
.profit .proj b { color: var(--text); font-weight: 700; }
.hp-wrap { min-width: 0; }
.hp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.hp-head .t { font-size: 13px; font-weight: 600; color: var(--muted); }
.hp-head .v { font-size: 28px; font-weight: 700; line-height: 1; }
.hp-head .p { font-size: 13px; color: var(--muted); }
.hp { position: relative; height: 50px; }
.hp-track { position: absolute; left: 0; right: 0; top: 10px; height: 18px; display: grid; grid-template-columns: repeat(50, 1fr); gap: 2px; }
.hp-track span { border-radius: 2px; background: var(--steel-soft); }
.hp-track span.z-loss.on { background: var(--flare); }
.hp-track span.z-ok.on { background: var(--honey-bright); }
.hp-track span.z-goal.on { background: var(--turf); }
.hp-track span.z-loss { background: var(--flare-soft); }
.hp-track span.z-ok { background: var(--honey-soft); }
.hp-track span.z-goal { background: var(--turf-soft); }
.hp-proj { position: absolute; top: 0; height: 6px; border: 2px solid var(--text); border-bottom: 0; border-radius: 2px 2px 0 0; opacity: .6; }
.hp-tick { position: absolute; top: 30px; transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.hp-tick::before { content: ""; position: absolute; left: 50%; top: -6px; width: 1px; height: 6px; background: var(--line-strong); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(118px, auto)); gap: 10px 26px; }
.kpi .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 24px; font-weight: 700; line-height: 1.1; }
.kpi .d { font-size: 12px; color: var(--muted); }
.kpi .d.up { color: var(--turf); }
.kpi .d.down { color: var(--flare); }
/* B23.3: o card de gasto abre o painel por conta */
button.kpi { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
button.kpi:focus-visible { outline: 2px solid var(--honey-bright); outline-offset: 4px; }
button.kpi .k::after { content: "▾"; font-size: 10px; margin-left: 2px; }
button.kpi[aria-expanded="true"] .k::after { content: "▴"; }
.orc-box { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; }
.orc-box .nota-orc { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.prov { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.prov.real { background: var(--text); }
.prov.est { background: linear-gradient(90deg, var(--text) 50%, transparent 50%); border: 1.5px solid var(--text); }
.prov.proj { border: 1.5px solid var(--text); }

/* ---------- main grid ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(330px, 1fr); gap: 16px; align-items: start; }
.side { display: grid; gap: 16px; }

/* globe */
.globe-panel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 45%, var(--surface) 0%, var(--surface-2) 70%);
  /* B25 (C): altura própria (proporção com tecto), sem esticar com a coluna de missões, avisos e copiloto */
  aspect-ratio: 5 / 4;
  min-height: 420px;
  max-height: 620px;
  align-self: start;
}
.globe-panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.globe-panel canvas.dragging { cursor: grabbing; }
.g-head { position: absolute; left: 18px; top: 14px; right: 18px; display: flex; align-items: flex-start; gap: 12px; pointer-events: none; }
.g-head h2 { margin: 0; font-size: 15px; }
.g-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.legend { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); pointer-events: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.g-foot {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.play {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--text); color: var(--bg); display: grid; place-items: center; flex: none;
}
.g-foot input[type=range] { flex: 1; min-width: 0; accent-color: var(--honey-bright); }
.g-time { font-size: 20px; font-weight: 600; min-width: 52px; text-align: right; }
.chip-btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip-btn[aria-pressed="true"] { border-color: var(--turf); color: var(--turf); }
.tip {
  position: absolute; z-index: 3; pointer-events: none;
  background: var(--raised); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 8px 10px; font-size: 12.5px; min-width: 170px;
  box-shadow: var(--shadow);
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0; transition: opacity .12s;
}
.tip.on { opacity: 1; }
.tip b { display: block; font-size: 13px; }
.tip .r { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }

/* missions */
.missions { padding: 6px 18px 14px; display: grid; gap: 12px; margin: 0; list-style: none; }
.mission { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: center; }
.hex { width: 30px; height: 30px; }
.mission .t { font-weight: 600; font-size: 13.5px; }
.mission .s { font-size: 12.5px; color: var(--muted); }
.meter { height: 5px; border-radius: 3px; background: var(--steel-soft); margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; }
.streak { display: flex; align-items: center; gap: 10px; padding: 10px 18px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.streak .num { font-size: 22px; font-weight: 700; color: var(--honey); }
.mission .link-btn { font-size: 12.5px; }

/* copilot */
.copilot { padding: 12px 18px 16px; }
.copilot p { margin: 0 0 10px; font-size: 13.5px; }
.copilot .qs { display: flex; flex-wrap: wrap; gap: 8px; }
.copilot .ans {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px;
}
.copilot .ans small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* feed */
.feed { list-style: none; margin: 0; padding: 8px 10px 12px; max-height: 330px; overflow: auto; }
.feed li {
  display: grid; grid-template-columns: 44px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 8px; border-radius: 10px;
}
.feed li.fresh { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { background: var(--honey-soft); } 100% { background: transparent; } }
.feed .tm { font-size: 17px; font-weight: 600; color: var(--muted); }
.cc {
  font-size: 11px; font-weight: 700; letter-spacing: .02em; text-align: center;
  padding: 3px 0; border-radius: 6px; border: 1px solid var(--line-strong);
}
.cc.fut7 { color: var(--fut7); border-color: color-mix(in srgb, var(--fut7) 45%, transparent); }
.cc.tnf { color: var(--tnf); border-color: color-mix(in srgb, var(--tnf) 45%, transparent); }
.feed .what { min-width: 0; }
.feed .what b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .what span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.feed .val { font-size: 18px; font-weight: 700; }
.tag-noutm { color: var(--flare); }

/* cards */
.rail-head { display: flex; align-items: baseline; gap: 10px; padding: 2px 2px 0; }
.rail-head h2 { margin: 0; font-size: 15px; }
.rail-head .muted { font-size: 13px; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 214px;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scroll-snap-type: x proximity;
}
.card {
  --frame: var(--line-strong);
  --frame-2: var(--line-strong);
  position: relative;
  scroll-snap-align: start;
  border: 0; padding: 2px; cursor: pointer; text-align: left;
  background: linear-gradient(155deg, var(--frame), var(--frame-2));
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  transition: transform .18s ease;
}
.card:hover { transform: translateY(-3px); }
.card[aria-current="true"] { transform: translateY(-3px); }
.card-in {
  clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 0 100%);
  background: var(--surface);
  padding: 12px 14px 14px;
  height: 100%;
  display: flex; flex-direction: column; gap: 8px;
}
.card.t-lendaria { --frame: var(--honey-bright); --frame-2: var(--honey); }
.card.t-lendaria .card-in {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0l14 8v16l-14 8L0 24V8z' fill='none' stroke='%23D99400' stroke-opacity='.18'/%3E%3C/svg%3E"),
    var(--surface);
}
.card.t-ouro { --frame: var(--honey); --frame-2: color-mix(in srgb, var(--honey) 40%, var(--line-strong)); }
.card.t-prata { --frame: var(--muted); --frame-2: var(--line-strong); }
.card.t-bronze { --frame: #B9774A; --frame-2: var(--line-strong); }
.card.t-risco { --frame: var(--flare); --frame-2: color-mix(in srgb, var(--flare) 35%, var(--line-strong)); }
.card.t-amostra { --frame: var(--line-strong); --frame-2: var(--line); }
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.rating { font-size: 40px; font-weight: 800; line-height: .9; }
.t-lendaria .rating, .t-ouro .rating { color: var(--honey); }
.t-risco .rating { color: var(--flare); }
.t-amostra .rating { color: var(--faint); }
.tier { font-size: 12px; font-weight: 700; line-height: 1.15; margin-top: 3px; }
.tier small { display: block; font-weight: 600; color: var(--muted); }
.card-art { display: grid; place-items: center; height: 92px; margin: -2px 0 0; }
.card-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 4px; margin: 2px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-size: 11px; color: var(--muted); font-weight: 600; }
.stats dd { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.05; }
.signal {
  margin-top: auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700;
  padding: 7px 10px; border-radius: 9px;
}
.signal svg { flex: none; }
.s-subir { background: var(--turf-soft); color: var(--turf); }
.s-voltar, .s-cortar { background: var(--flare-soft); color: var(--flare); }
.s-manter { background: var(--steel-soft); color: var(--text); }
.s-amostra { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }

/* bottom */
.bottom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.rows { list-style: none; margin: 0; padding: 6px 8px 12px; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) 44px 92px 88px; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; }
.rows li.h { color: var(--muted); font-size: 12px; font-weight: 600; padding-bottom: 2px; }
.rows .p b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .p span { font-size: 12.5px; color: var(--muted); }
.rows .n { font-size: 18px; font-weight: 700; text-align: right; white-space: nowrap; }
/* B23: rankings de clubes (por loja) e de camisas (unidades e faturamento) */
.rows.rp li { grid-template-columns: minmax(0, 1fr) 44px 92px 84px 88px; }
.rows.rc li { grid-template-columns: minmax(0, 1fr) 64px 92px 56px; }
.rows.rc li.sub { display: block; color: var(--text); font-size: 12.5px; font-weight: 700; padding: 8px 10px 0; }
.rows .v { text-align: right; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.rows .why { font-size: 12px; color: var(--muted); }
.rank-alt { display: inline-flex; gap: 6px; }
.bar-mini { height: 6px; border-radius: 3px; background: var(--steel-soft); overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: var(--turf); border-radius: 3px; }
.rules { list-style: none; margin: 0; padding: 4px 18px 16px; display: grid; gap: 14px; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; }
.rule .t { font-weight: 600; font-size: 13.5px; }
.rule .s { font-size: 12.5px; color: var(--muted); }
.rule .score-n { font-size: 26px; font-weight: 700; text-align: right; line-height: 1; }
.pips { display: flex; gap: 3px; grid-column: 1 / -1; }
.pips i { width: 14px; height: 6px; border-radius: 2px; background: var(--steel-soft); }
.pips i.w { background: var(--turf); }
.pips i.l { background: var(--flare); }
.rules-note { padding: 0 18px 16px; font-size: 12.5px; color: var(--muted); }

footer { max-width: 1440px; margin: 0 auto; padding: 0 24px 32px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12.5px; color: var(--muted); }
footer span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- drawer ---------- */
.backdrop { position: fixed; inset: 0; background: var(--backdrop); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
.backdrop.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 21;
  top: 0; right: 0; bottom: 0;
  width: min(600px, 100%);
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.on { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.d-head { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.d-head h2 { margin: 0; font-size: 19px; line-height: 1.2; }
.d-head .ad { font-family: 'Saira Condensed', sans-serif; color: var(--muted); font-size: 15px; letter-spacing: .02em; }
.d-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); }
.d-body { overflow: auto; padding: 16px 18px 28px; display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; min-height: 0; }
.d-body > * { flex: none; }
.d-sec h3 { margin: 0 0 10px; font-size: 14px; }
.act-box { border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.act-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--muted); }
.act-box.s-subir::before { background: var(--turf); }
.act-box.s-voltar::before, .act-box.s-cortar::before { background: var(--flare); }
.act-box.s-subir, .act-box.s-voltar, .act-box.s-cortar, .act-box.s-manter, .act-box.s-amostra, .act-box.s-reduzir, .act-box.s-pausada { color: var(--text); background: var(--surface); border: 1px solid var(--line); }
.act-box li::first-letter { text-transform: uppercase; }
.act-box .what { font-size: 20px; font-weight: 700; }
.act-box.s-subir .what { color: var(--turf); }
.act-box.s-voltar .what, .act-box.s-cortar .what { color: var(--flare); }
.act-box ul { margin: 8px 0 10px; padding: 0 0 0 18px; }
.act-box li { margin: 2px 0; }
.act-box .sug { font-weight: 600; }
.act-box .note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: center; }
.mini-globe { position: relative; height: 220px; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.mini-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.countries { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.countries li.empty { display: block; }
.countries li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 26px; gap: 10px; align-items: center; font-size: 13px; }
.chart { width: 100%; height: auto; display: block; margin-top: 12px; }
.chart text { font-family: 'Manrope', sans-serif; font-size: 10.5px; fill: var(--muted); }
.creatives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.creative { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.creative .poster { aspect-ratio: 4 / 3; display: block; width: 100%; height: auto; }
.creative .c-in { padding: 10px 12px 12px; }
.creative .c-name { font-family: 'Saira Condensed', sans-serif; font-size: 14px; color: var(--muted); word-break: break-all; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.tags span { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--steel-soft); }
.c-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.c-stats div { display: flex; flex-direction: column; }
.c-stats dt { font-size: 11px; color: var(--muted); font-weight: 600; }
.c-stats dd { margin: 0; font-size: 17px; font-weight: 700; }
.aud { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ages { display: grid; gap: 7px; }
.age { display: grid; grid-template-columns: 46px minmax(0, 1fr) 36px; gap: 8px; align-items: center; font-size: 12.5px; }
.age .bar-mini i { background: var(--honey-bright); }
.gender { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 6px 0 4px; }
.gender i:first-child { background: var(--tnf); }
.gender i:last-child { background: var(--honey-bright); }
.places { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.places span { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); }
.caveat { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.move { display: grid; grid-template-columns: 54px 18px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13px; }
.move .tm { font-size: 17px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.moves.avisos { padding: 6px 18px 14px; }
.card-fuso { font-size: 11px; color: var(--muted); margin-top: 2px; }
.avisos .move .tm { font-size: 15px; white-space: nowrap; }
.move .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; background: var(--muted); }
.move .dot.ok { background: var(--turf); }
.move .dot.bad { background: var(--flare); }
.move .dot.wait { background: transparent; border: 2px solid var(--muted); }
.empty { font-size: 13px; color: var(--muted); }

/* ---------- fotografia real ---------- */
.gap-list { list-style: none; margin: 0; padding: 10px 14px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1040px) { .gap-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .gap-list { grid-template-columns: 1fr; } }
.gap-list li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.gap-list .num { display: block; font-size: 28px; font-weight: 700; line-height: 1; }
.gap-list li.bad .num { color: var(--flare); }
.gap-list li.warn .num { color: var(--honey); }
.gap-list li.muted .num { color: var(--muted); }
.gap-list .t { font-weight: 700; font-size: 13.5px; margin-top: 6px; }
.gap-list .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.empty-box { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.rules-empty { margin: 10px 18px 18px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stats dd.warn, .d-stats small.warn { color: var(--flare); }
.s-reduzir { background: var(--flare-soft); color: var(--flare); }
.s-pausada { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }
.card.t-pausada { --frame: var(--line); --frame-2: var(--line); opacity: .78; }
.t-pausada .rating { color: var(--faint); }
.act-box.s-reduzir::before { background: var(--flare); }
.act-box.s-reduzir .what { color: var(--flare); }
.d-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.d-stats div { display: flex; flex-direction: column; }
.d-stats dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.d-stats dd { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.15; }
.d-stats small { font-size: 12px; color: var(--muted); }
.ads { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ads li { display: grid; gap: 5px; }
.a-top { display: flex; align-items: center; gap: 8px; }
.a-top b { font-weight: 700; font-size: 14px; }
.a-v { margin-left: auto; font-size: 17px; font-weight: 700; }
.a-sub { font-size: 12.5px; color: var(--muted); }
.pill.best { border-color: var(--turf); color: var(--turf); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .score { grid-template-columns: 1fr; gap: 18px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .layout { grid-template-columns: 1fr; }
  .bottom { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top-in { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .brand span, .demo-flag { display: none; }
  .top-right { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .brand { flex: 1 1 auto; }
  .top-right { margin-left: 0; }
  #liveTxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .brand b { font-size: 20px; }
  .seg { order: 3; width: 100%; justify-content: space-between; }
  .seg button { flex: 1; }
  main { padding: 14px 14px 32px; gap: 14px; }
  .score { padding: 16px; }
  .profit .big { font-size: 40px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .globe-panel { min-height: 0; aspect-ratio: auto; height: min(430px, 112vw); }
  .legend { display: none; }
  .g-foot { left: 10px; right: 10px; bottom: 10px; gap: 8px; padding: 7px 9px; }
  .rail { grid-auto-columns: 200px; }
  .rows li { grid-template-columns: minmax(0, 1fr) 36px 84px; }
  .rows li > :nth-child(3) { display: none; }
  .rows.rp li { grid-template-columns: minmax(0, 1fr) 36px 76px; }
  .rows.rp li > :nth-child(5) { display: none; }
  .rows.rc li { grid-template-columns: minmax(0, 1fr) 56px 52px; }
  .rank-alt { margin-left: 0; }
  .split { grid-template-columns: 1fr; }
  .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creatives { grid-template-columns: 1fr 1fr; }
  .aud { grid-template-columns: 1fr; }
  footer { padding: 0 16px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Central (C2): arranque, erro, dados velhos ---------- */
.boot { max-width: 520px; margin: 18vh auto 0; padding: 0 16px; text-align: center; color: var(--muted); font-size: 15px; }
.boot b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.boot a { color: var(--honey); }
.live { font-size: 12.5px; }
.live.off { color: var(--flare); }
.live.off i { background: var(--flare); animation: none; }
.gap-list li.ok .num { color: var(--turf); }
.prov-tag { font-size: 11px; font-weight: 700; color: var(--honey); border: 1px solid var(--honey-soft); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }

/* ---------- B14.2: caixa de decisões ---------- */
.dec-btn .dec-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--flare); color: #fff; font-size: 13px; line-height: 18px; text-align: center; }
.dec-btn .dec-n:empty { display: none; }
.dec-view { max-width: 980px; margin: 18px auto 40px; padding: 0 16px; }
.dec-intro { margin: 0; padding: 0 18px 6px; font-size: 13px; color: var(--muted); }
.dec-list { list-style: none; margin: 0; padding: 8px 18px 18px; display: grid; gap: 12px; }
.dec { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.dec.aberta { border-left: 4px solid var(--honey-bright); }
.dec.respondida { opacity: .72; }
.dec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.dec-h b { font-size: 15px; }
.dec-h .id { font-weight: 800; color: var(--honey); }
.dec-h .meta { font-size: 12px; color: var(--muted); margin-left: auto; }
.dec dl { margin: 8px 0 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; }
.dec dt { color: var(--muted); font-weight: 600; }
.dec dd { margin: 0; }
@media (max-width: 620px) { .dec dl { grid-template-columns: 1fr; } .dec dt { margin-top: 4px; } .dec-h .meta { margin-left: 0; } }

/* ---------- B14.1: avisos ---------- */
#pushBtn[aria-pressed="true"] { color: var(--honey-bright); border-color: var(--honey); }
#pushBtn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- COP4: conversa com o copiloto ---------- */
.conversa { display: flex; gap: 8px; margin-top: 10px; }
.conversa input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.conversa input:focus { outline: 2px solid var(--honey-bright); outline-offset: 1px; }
.conversa-lista { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.conversa-lista .q { font-weight: 700; font-size: 13.5px; }
.conversa-lista .a { font-size: 13.5px; }
.conversa-lista small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* META-1: vista Anúncios */
.ads-body { padding: 4px 18px 18px; display: grid; gap: 18px; }
.ads-sec h3 { margin: 0 0 6px; font-size: 15px; }
.ads-sec p.nota { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.ads-sec .tab-wrap { overflow-x: auto; }
.ads-sec table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ads-sec th, .ads-sec td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ads-sec th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.ads-sec td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ads-sec code { font-size: 12px; word-break: break-all; }
.ads-sec .alerta { color: var(--flare); font-weight: 600; }
.ads-sec .ok { color: var(--muted); }

/* ---------- B25 ---------- */
/* telemóvel: sem zoom acidental (iOS amplia campos com letra < 16 px; duplo toque nos botões) e texto longo parte */
button, a, input, [role="button"] { touch-action: manipulation; }
.gap-list .s, .gap-list .t, .pub-foot, .champ-c, .nota { overflow-wrap: anywhere; }
@media (max-width: 720px) { input, select, textarea { font-size: 16px; } }

/* A: o ícone colmeia ocupa o lugar do antigo hexágono */
.brand .hive-btn { margin-left: -6px; }

/* F: seletor do dia */
.dia-sel { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.dia-sel button { border: 0; background: transparent; padding: 6px 12px; min-height: 32px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.dia-sel button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.dia-cal input { font: inherit; font-size: 13px; color: var(--text); background: transparent; border: 0; padding: 4px 6px; min-height: 32px; max-width: 150px; }
body.dia-fechado .live i { background: var(--faint); animation: none; }
@media (max-width: 720px) {
  .dia-sel { order: 4; width: 100%; justify-content: space-between; }
  .dia-sel button { flex: 1; min-height: 44px; }
  .dia-cal { flex: 1.4; } .dia-cal input { width: 100%; max-width: none; min-height: 44px; font-size: 16px; }
  .seg button { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
}

/* C: no telemóvel, "O que esta fotografia revelou" é um carrossel com o tamanho dos cards de sempre (largura toda) */
.gap-dots { display: none; }
@media (max-width: 620px) {
  .gap-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; align-items: start; scrollbar-width: none; }
  .gap-list::-webkit-scrollbar { display: none; }
  .gap-list li { scroll-snap-align: start; }
  .gap-dots { display: flex; justify-content: center; gap: 6px; padding: 0 0 12px; }
  .gap-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
  .gap-dots i.on { background: var(--honey-bright); }
}

/* D: ícone do clube (tamanho fixo: o layout não pula) */
.p-ic { display: flex !important; align-items: center; gap: 8px; min-width: 0; }
.rows .p .p-tx { min-width: 0; display: flex; flex-direction: column; font-size: inherit; color: inherit; }
.p-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.club-ic, .rows .p .club-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: 0; }
.club-ic img { width: 22px; height: 22px; object-fit: contain; display: block; }

/* E1: público */
.pub-box { padding: 10px 18px 16px; display: grid; gap: 14px; }
.pub-loja h3 { margin: 0 0 8px; font-size: 14px; }
.pub-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pub-h { font-weight: 700; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.pub-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pub-rows li { display: grid; grid-template-columns: minmax(0, 1fr) 44px 48px; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pub-rows li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-rows .num { text-align: right; font-size: 15px; }
.pub-foot { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pub-foot.alerta, .champ .alerta { color: var(--flare); }
@media (max-width: 620px) { .pub-cols { grid-template-columns: 1fr; } }

/* E2: criativos campeões */
.champs { list-style: none; margin: 0; padding: 10px 18px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.champ { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); }
.champ-art { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; }
.champ-art img { width: 72px; height: 72px; object-fit: cover; display: block; }
.champ-ph { font-size: 10.5px; line-height: 1.2; color: var(--muted); text-align: center; padding: 4px; overflow-wrap: anywhere; }
.champ-n { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.champ-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.champ-n .num { color: var(--honey); font-size: 16px; font-weight: 700; }
.champ-c { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.champ-s { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 8px 0 0; }
.champ-s dt { font-size: 11px; color: var(--muted); }
.champ-s dd { margin: 0; font-size: 16px; font-weight: 600; }

/* B29: funil do Meta — etapas em blocos com a passagem da etapa anterior (0–100%) e o custo de cada etapa */
.fn { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; padding: 12px 18px 4px; align-items: start; }
.fn-etapas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fn-etapas.compacto { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.compacto .fn-etapa { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "k v m" "t t c"; gap: 2px 12px; align-items: center; padding: 8px 12px; }
.compacto .fn-k { grid-area: k; } .compacto .fn-v { grid-area: v; font-size: 18px; margin: 0; text-align: right; }
.compacto .fn-meter { grid-area: m; margin: 0; } .compacto .fn-t { grid-area: t; } .compacto .fn-c { grid-area: c; text-align: right; }
.fn-etapa { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.fn-k { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-seta { color: var(--faint); }
.fn-v { font-size: 26px; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.fn-meter { height: 6px; border-radius: 3px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.fn-meter i { display: block; height: 100%; background: var(--honey-bright); border-radius: 3px; }
.fn-t, .fn-c { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-t b, .fn-c b { color: var(--text); font-weight: 700; }
.fn-lado { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fn-lado div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.fn-lado dt { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-lado dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.fn-nota { margin: 0; padding: 8px 18px 14px; font-size: 12px; color: var(--muted); }
.d-sec .fn-nota { padding: 8px 0 0; }
.fn-vazio { margin: 12px 18px 16px; }
@media (max-width: 1040px) { .fn { grid-template-columns: minmax(0, 1fr); } .fn-lado { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .fn { padding: 10px 12px 4px; }
  .fn-etapas:not(.compacto) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-etapas:not(.compacto) .fn-etapa:first-child { grid-column: 1 / -1; }
  .fn-lado { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-v { font-size: 22px; }
  .fn-nota { padding: 8px 12px 12px; }
}

/* B29: campanhas em tabela (padrão) ou cartas (opção) */
.camp-sec { display: grid; gap: 8px; min-width: 0; }
.rail-head { flex-wrap: wrap; }
.rail-head .act { margin-left: auto; }
.vista-alt { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; flex: none; }
.seg-btn { border: 0; background: var(--surface); color: var(--muted); padding: 6px 14px; min-height: 32px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-strong); }
.seg-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.seg-btn:focus-visible { outline: 2px solid var(--honey-bright); outline-offset: -2px; }
.camp-tab { overflow: hidden; }
.ctab-wrap { overflow-x: auto; }
.ctab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.ctab th { background: var(--surface); text-align: right; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0; white-space: nowrap; font-size: 12px; }
.ctab th button { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 10px 10px; width: 100%; text-align: inherit; white-space: nowrap; }
.ctab th button:focus-visible, .camp-nome:focus-visible { outline: 2px solid var(--honey-bright); outline-offset: -2px; }
.ctab th[aria-sort="ascending"], .ctab th[aria-sort="descending"] { color: var(--text); }
.ctab td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctab td .v { display: block; font-weight: 600; }
.ctab td .s { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ctab td .s .warn { color: var(--flare); font-weight: 600; }
.ctab .c-nome { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 220px; max-width: 320px; white-space: normal; box-shadow: 1px 0 0 var(--line); }
.camp-nome { border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; padding: 0; display: flex; gap: 7px; align-items: center; max-width: 100%; text-align: left; }
.camp-nome b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-nome:hover b { text-decoration: underline; }
.camp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ctab tbody tr:hover td { background: var(--surface-2); }
.ctab tbody tr.on td { background: var(--honey-soft); }
.ctab tbody tr:last-child td { border-bottom: 0; }
.sig-tag { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--steel-soft); color: var(--muted); }
.sig-tag.s-subir { background: var(--turf-soft); color: var(--turf); }
.sig-tag.s-cortar, .sig-tag.s-reduzir { background: var(--flare-soft); color: var(--flare); }
.sig-tag.s-manter { color: var(--text); }
.ctab-nota { margin: 0; padding: 8px 12px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 720px) { .ctab .c-nome { min-width: 160px; max-width: 190px; } .ctab td { padding: 8px; } }

/* ======================================================================================================================
   B30 — identidade nova da Central: cabeçalho em dois andares, seletor de período, cartões com variação e minigráfico,
   gráficos, funil em degraus e uma grelha sem buracos. Vem por último: sobrepõe-se ao que estava acima.
   ====================================================================================================================== */
body { font-size: 14px; letter-spacing: -.003em; font-feature-settings: "ss01", "cv11"; }
.num { font-family: 'Manrope', system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.panel { border-radius: 14px; box-shadow: var(--shadow); }
.panel-h { padding: 16px 20px 0; }
.panel-h h2 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--steel-soft); color: var(--muted); }
.pill { border-radius: 6px; }
.chip-btn, .seg-btn { border-radius: 8px; }
.chip-btn { background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font-weight: 600; min-height: 32px; }
.chip-btn:hover { border-color: var(--text); }
.chip-btn[aria-pressed="true"] { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.icon-btn { border-radius: 8px; border-color: var(--line-strong); }
.empty-box { border-radius: 10px; }

/* ── cabeçalho: marca e estado em cima; loja, período e comparação em baixo ── */
.top { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.top-in { padding: 10px 24px; gap: 14px; }
.brand-tx { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-tx b { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-tx b em { font-style: normal; color: var(--honey-bright); }
.brand-tx span { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { gap: 10px; }
.demo-flag { border-style: solid; border-color: var(--line); background: var(--surface); border-radius: 8px; }
.clock { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.toolbar { border-top: 1px solid var(--line); position: relative; }
.toolbar-in { max-width: 1440px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg, .per-sel { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.seg button, .per-sel button { border: 0; background: transparent; padding: 6px 12px; min-height: 32px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:hover, .per-sel button:hover { color: var(--text); background: var(--surface-2); }
.seg button[aria-pressed="true"], .per-sel button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.per-info { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.per-pop { position: absolute; right: 24px; top: calc(100% + 6px); z-index: 30; display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.per-pop label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.per-pop input { font: inherit; font-size: 14px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 8px; min-height: 36px; }
.btn-pri { border: 0; border-radius: 8px; background: var(--text); color: var(--bg); font-weight: 700; padding: 0 16px; min-height: 36px; cursor: pointer; }
.per-erro { flex-basis: 100%; font-size: 12.5px; color: var(--flare); }
.per-erro:empty { display: none; }

/* ── números: o lucro em destaque e oito cartões com variação e minigráfico ── */
main { gap: 18px; padding-top: 20px; }
.kpi-sec { display: grid; grid-template-columns: minmax(300px, 1.05fr) minmax(0, 3fr); gap: 14px; align-items: stretch; }
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 20px 22px 18px; background: var(--hero-bg); color: var(--hero-text); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 184, 61, .28), transparent 70%); pointer-events: none; }
.hero-top { display: flex; align-items: center; gap: 10px; }
.hero .lbl { font-size: 13px; color: var(--hero-muted); font-weight: 600; }
.hero .big { font-size: 46px; font-weight: 800; line-height: 1.02; letter-spacing: -.035em; margin: 2px 0; color: var(--hero-text); }
.hero .big.neg { color: #FCA5A5; }
.hero .proj { font-size: 13px; color: var(--hero-muted); }
.hero .proj b { color: var(--hero-text); }
.hero .prov.proj { border-color: var(--hero-muted); }
.hero-spark { height: 44px; margin: 4px -4px 2px; }
.hero .hp-wrap { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); }
.hero .hp-head .t, .hero .hp-head .p { color: var(--hero-muted); }
.hero .hp-head .v { font-size: 22px; color: var(--hero-text); }
.hero .hp { height: 44px; }
.hero .hp-track { top: 4px; height: 14px; }
.hero .hp-track span { background: rgba(255, 255, 255, .08); }
.hero .hp-track span.z-loss { background: rgba(248, 113, 113, .22); }
.hero .hp-track span.z-ok { background: rgba(245, 184, 61, .2); }
.hero .hp-track span.z-goal { background: rgba(52, 211, 153, .2); }
.hero .hp-track span.z-loss.on { background: #F87171; }
.hero .hp-track span.z-ok.on { background: #F5B83D; }
.hero .hp-track span.z-goal.on { background: #34D399; }
.hero .hp-tick { top: 22px; color: var(--hero-muted); font-size: 11.5px; }
.hero .hp-tick::before { background: rgba(255, 255, 255, .25); }
.hero .hp-proj { border-color: var(--hero-text); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi, button.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; text-align: left; }
button.kpi { cursor: pointer; }
button.kpi:hover { border-color: var(--line-strong); }
button.kpi .k::after { content: none; }
.kpi .k { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.k-mais { font-size: 10px; }
button.kpi[aria-expanded="true"] .k-mais { display: inline-block; transform: rotate(180deg); }
.v-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi .v { font-size: 25px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.kpi-spark { height: 28px; color: var(--line-strong); margin: 4px 0 2px; }
.kpi .d { font-size: 12px; color: var(--muted); line-height: 1.35; }
.kpi .d .warn { color: var(--flare); font-weight: 600; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; letter-spacing: 0; }
.delta.up { color: var(--turf); background: var(--turf-soft); }
.delta.down { color: var(--flare); background: var(--flare-soft); }
.delta.neu { color: var(--muted); background: var(--steel-soft); }
.hero .delta.up { color: #34D399; background: rgba(52, 211, 153, .15); }
.hero .delta.down { color: #FCA5A5; background: rgba(248, 113, 113, .15); }
.orc-box { grid-column: 1 / -1; border-top: 0; padding: 4px 18px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ── gráficos ── */
.charts { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr); gap: 14px; align-items: stretch; }
.chart-box { padding: 6px 12px 12px; min-height: 290px; }
.chart-area { position: relative; overflow: hidden; }
.chart { display: block; max-width: 100%; height: auto; }
.chart .grade { stroke: var(--line); stroke-width: 1; }
.chart .grade.zero { stroke: var(--line-strong); }
.chart .eixo { font-family: 'Manrope', sans-serif; font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .eixo.aviso { fill: var(--flare); font-weight: 700; }
.chart .cruz { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .faixa { fill: var(--steel-soft); }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 6px 8px 8px; font-size: 12.5px; color: var(--muted); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda b { color: var(--text); font-weight: 700; }
.legenda i, .ch-tip i, .d-leg i { width: 10px; height: 10px; border-radius: 3px; background: var(--cor); flex: none; display: inline-block; }
.legenda i.tr { height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--cor) 0 4px, transparent 4px 7px); width: 16px; }
.ch-tip { position: absolute; top: 8px; z-index: 4; min-width: 180px; pointer-events: none; padding: 10px 12px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 12.5px; }
.ch-tip b { display: block; margin-bottom: 4px; }
.ch-tip div { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.ch-tip span { margin-left: auto; padding-left: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-tip .pd { color: var(--muted); margin-top: 4px; }
.donut-box { padding: 10px 20px 16px; }
.donut { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: center; }
.donut .d-v { font-family: 'Manrope', sans-serif; font-size: 22px; font-weight: 800; fill: var(--text); letter-spacing: -.02em; }
.donut .d-v.neg { fill: var(--flare); font-size: 17px; }
.donut .d-k { font-family: 'Manrope', sans-serif; font-size: 11.5px; fill: var(--muted); }
.d-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.d-leg li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 40px; gap: 8px; align-items: center; font-size: 13px; }
.d-leg b { font-variant-numeric: tabular-nums; }
.d-leg em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.d-nota { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ── funil em degraus ── */
.fn-etapa { position: relative; padding-top: 12px; background: var(--surface); }
.fn-deg { height: 74px; display: flex; align-items: flex-end; margin: 0 0 10px; border-bottom: 1px solid var(--line); }
.fn-deg i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--honey-bright), color-mix(in srgb, var(--honey-bright) 55%, var(--surface))); }
.fn-etapa + .fn-etapa .fn-deg i { opacity: .92; }
.fn-v { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.fn-meter i { background: var(--text); opacity: .75; }

/* ── campanhas ── */
.rail-head { padding: 4px 4px 0; align-items: center; }
.rail-head h2 { font-size: 16px; font-weight: 700; }
.ctab th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.ctab td .v { font-weight: 700; }

/* ── operação do dia: três colunas da mesma altura, cada uma com a sua rolagem (sem buracos) ── */
.ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: stretch; }
.ops-col { display: flex; flex-direction: column; min-height: 0; height: 520px; }
.ops-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ops .feed { max-height: none; padding: 8px 12px 12px; }
.ops .missions { padding: 10px 20px 6px; }
.sub-h { margin: 12px 20px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ops .gaps { box-shadow: none; }
.ops .gap-list { display: grid; grid-template-columns: 1fr; grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; scroll-snap-type: none; gap: 0; padding: 0 12px 12px; }
.ops .gap-list li { display: grid; grid-template-columns: 66px minmax(0, 1fr); grid-template-areas: "n t" "n s"; column-gap: 10px; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; min-height: 0; }
.ops .gap-list li:last-child { border-bottom: 0; }
.ops .gap-list .num { grid-area: n; font-size: 18px; line-height: 1.15; align-self: start; white-space: nowrap; }
.ops .gap-list .t { grid-area: t; margin: 0; font-size: 13px; }
.ops .gap-list .s { grid-area: s; font-size: 12px; }
.ops .gap-dots { display: none; }
.ops .copilot { padding: 12px 20px 16px; }
.ops .avisos { padding: 0 20px 8px; }

/* ── mapa e público lado a lado, mesma altura ── */
.layout { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); align-items: stretch; }
.layout .globe-panel { aspect-ratio: auto; height: 560px; min-height: 0; max-height: none; border-radius: 14px; }
.side-pub { display: flex; flex-direction: column; height: 560px; min-height: 0; }
.side-pub .pub-box { padding-bottom: 12px; align-content: start; }
.side-pub .pub-loja + .pub-loja { border-top: 1px solid var(--line); padding-top: 12px; }

/* ── produtos e criativos; placar recolhido ── */
.bottom { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); align-items: start; }
.placar-det summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; padding: 16px 20px; font-weight: 700; font-size: 15px; }
.placar-det summary::-webkit-details-marker { display: none; }
.placar-det summary::before { content: "▸"; color: var(--muted); font-size: 12px; transition: transform .15s; }
.placar-det[open] summary::before { transform: rotate(90deg); }
.placar-det summary .muted { font-weight: 500; font-size: 13px; }
.per-nota { padding: 14px 20px; color: var(--muted); font-size: 13.5px; }
.per-nota p { margin: 0; }

/* ── responsivo ── */
@media (max-width: 1240px) {
  .kpi-sec { grid-template-columns: 1fr; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; }
  .hero-top, .hero .big, .hero .proj { grid-column: 1; }
  .hero-spark { grid-column: 1; }
  .hero .hp-wrap { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; border-top: 0; padding-top: 0; align-self: center; }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout, .bottom { grid-template-columns: 1fr; }
  .side-pub { height: auto; max-height: 520px; }
}
@media (max-width: 720px) {
  .top-in { padding: 8px 14px; }
  .toolbar-in { padding: 8px 14px; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar-in::-webkit-scrollbar { display: none; }
  .toolbar-in .seg { order: 0; width: auto; flex: none; }
  .toolbar-in .seg button { flex: none; }
  .per-sel { flex: none; }
  .per-info { display: none; }
  .per-pop { left: 14px; right: 14px; }
  .brand-tx span { display: none; }
  .hero { display: flex; padding: 18px; }
  .hero .big { font-size: 40px; }
  .hero .hp-wrap { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }
  .kpis { gap: 10px; }
  .kpi, button.kpi { padding: 12px; }
  .kpi .v { font-size: 21px; }
  .chart-box { padding: 4px 6px 10px; min-height: 0; }
  .donut { grid-template-columns: 1fr; justify-items: center; }
  .d-leg { width: 100%; }
  .ops { grid-template-columns: 1fr; }
  .ops-col { height: auto; max-height: 460px; }
  .layout .globe-panel { height: min(430px, 112vw); }
  .fn-deg { height: 48px; }
}
/* B30: no escuro, o cartão do lucro ganha um contorno mel subtil (sem ele fundia-se com o fundo) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { box-shadow: inset 0 0 0 1px rgba(245, 184, 61, .22), var(--shadow); } }
:root[data-theme="dark"] .hero { box-shadow: inset 0 0 0 1px rgba(245, 184, 61, .22), var(--shadow); }

/* ======================================================================================================================
   B31 — larguras da tabela, separar por conta, painel das contas, fotos dos produtos, bandeiras, referência de 14 dias.
   ====================================================================================================================== */
.ctab th { position: relative; }
.col-res { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 3; touch-action: none; }
.col-res::after { content: ""; position: absolute; top: 22%; bottom: 22%; left: 4px; width: 1px; background: var(--line-strong); }
.col-res:hover::after { background: var(--honey-bright); width: 2px; }
.ctab.fixa { table-layout: fixed; }
.ctab.fixa .c-nome { max-width: none; min-width: 0; }
.ctab.fixa td { overflow: hidden; text-overflow: ellipsis; }
.ctab tr.grupo td { background: var(--surface-2); border-top: 1px solid var(--line-strong); font-weight: 700; }
.ctab tr.grupo .g-nome { display: block; font-size: 13px; }
.conta-sel select { font: inherit; font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 28px 6px 10px; min-height: 34px; max-width: 280px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.rail-head .conta-sel { margin-left: auto; }
.rail-head .conta-sel + .act { margin-left: 8px; }

.contas-filtro { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.contas-filtro .seg-btn + .seg-btn { border-left: 1px solid var(--line-strong); }
.contas-tab td { vertical-align: top; }
.contas-tab .conta-nome { font-weight: 700; font-size: 13.5px; text-align: left; }
.contas-tab tr.sem-uso td { color: var(--muted); }
.contas-tab tr.tem-alerta td:first-child { box-shadow: inset 3px 0 0 var(--flare); }
.contas-tab .c-al { white-space: normal; min-width: 220px; }
.al { display: block; font-size: 12px; line-height: 1.35; }
.al.alto { color: var(--flare); font-weight: 600; }
.al.info { color: var(--muted); }
.est, .uso { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; background: var(--steel-soft); color: var(--muted); }
.est.ok { background: var(--turf-soft); color: var(--turf); }
.est.er { background: var(--flare-soft); color: var(--flare); }
.uso.sim { background: var(--honey-soft); color: var(--honey); }
.uso.nao { background: var(--flare-soft); color: var(--flare); }

.rows .p .foto { flex: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 0; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; }
.rows .p .foto img { width: 40px; height: 40px; object-fit: cover; display: block; }
.rows .p .foto.sem-foto { cursor: default; background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, var(--line) 6px 7px); }
.rows .p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.paises { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.pais { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.flag { width: 16px; height: 12px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); vertical-align: -1px; flex: none; }
.cc .flag { margin-right: 4px; }
.cc { display: inline-flex; align-items: center; }

.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(8, 10, 14, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; max-width: min(640px, 92vw); text-align: center; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 12px; background: #fff; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.lightbox figcaption { margin-top: 10px; color: #F3F4F6; font-size: 14px; font-weight: 600; }
.lb-x { position: absolute; top: 18px; right: 18px; background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; width: 40px; height: 40px; font-size: 16px; }

.hero-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--hero-muted); }
.hero-ref:empty { display: none; }
.hero-ref b { color: var(--hero-text); }
.hero-ref .ref-n { font-size: 11px; opacity: .8; border-bottom: 1px dotted currentColor; cursor: help; }
.hero-ref .ref-ind { font-size: 12px; }
@media (max-width: 720px) {
  .rail-head .conta-sel { margin-left: 0; order: 3; flex: 1 1 100%; }
  .conta-sel select { max-width: none; width: 100%; }
  .contas-filtro { order: 3; }
}
.contas-tab th { padding: 10px; text-align: left; }
.contas-tab th.n { text-align: right; }
.contas-tab td { text-align: left; }
.contas-tab td.n { text-align: right; }
.contas-tab .c-al { text-align: left; }
.contas-tab .c-nome .s { display: block; }

/* ======================================================================================================================
   B32 — régua v3 por criativo
   ====================================================================================================================== */
.regua-filtro { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.regua-filtro .seg-btn + .seg-btn { border-left: 1px solid var(--line-strong); }
.regua-filtro .seg-btn .num { opacity: .7; margin-left: 2px; }
.regua-tab th { padding: 10px; text-align: left; }
.regua-tab th.n { text-align: right; }
.regua-tab td { text-align: left; }
.regua-tab td.n { text-align: right; }
.regua-tab .cr-nome { display: block; font-weight: 700; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regua-tab tr.sem-uso td { opacity: .6; }
.regua-tab .c-al { min-width: 240px; white-space: normal; }
.st { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; border: 1px solid transparent; }
.st-validado { background: var(--text); color: var(--bg); }
.st-promissor { background: transparent; color: var(--honey); border-color: var(--honey); }
.st-observacao { background: var(--honey-soft); color: var(--honey); border-color: color-mix(in srgb, var(--honey) 40%, transparent); }
.st-reprovado { background: var(--flare-soft); color: var(--flare); }
.st-insuficiente, .st-por_saber { background: var(--steel-soft); color: var(--muted); }
.st-resumo { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.st-n { font-size: 11.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; }
.st-n.st-validado { background: var(--text); color: var(--bg); }
.st-n.st-promissor { color: var(--honey); box-shadow: inset 0 0 0 1px var(--honey); }
.st-n.st-observacao { background: var(--honey-soft); color: var(--honey); }
.st-n.st-reprovado { background: var(--flare-soft); color: var(--flare); }
.st-n.st-insuficiente { background: var(--steel-soft); color: var(--muted); }
.regua-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.regua-mini li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.regua-mini .rm-n b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regua-mini .rm-n span { display: block; font-size: 12px; color: var(--muted); }
.st-n.st-por_saber { background: var(--steel-soft); color: var(--muted); }

/* B35: telemóvel — nenhum texto comprido (nome de campanha, ID de conta) empurra a página para os lados. Os filhos de
   grelha e de flex não crescem além da coluna (min-width: 0) e o texto parte-se onde for preciso. */
.ops { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.ops > *, .layout > *, .bottom > *, .kpis > *, .charts > *, .panel, .panel-h > *, .ops-scroll, .feed li, .gap-list li { min-width: 0; }
.panel, .ops-scroll, .feed, .missions, .copilot, .avisos, .gap-list, .panel-h { overflow-wrap: anywhere; }
.kpi, button.kpi, .kpi > *, .kpi-sec > * { min-width: 0; }
.kpi .d, .kpi .lbl, .kpi .sub { overflow-wrap: anywhere; }
html, body { max-width: 100%; overflow-x: clip; }
/* B35: no telemóvel o cabeçalho fica numa linha (marca à esquerda, ações à direita); o relógio e o "Ao vivo" saem
   (o ponto verde fica), os botões encolhem. */
@media (max-width: 720px) {
  .top-in { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; }
  .brand { gap: 6px; flex: 0 1 auto; }
  .brand { min-width: 0; overflow: hidden; }
  .brand-tx b { font-size: 0; white-space: nowrap; }
  .brand-tx b em { font-size: 16px; }
  .top-right { gap: 6px; min-width: 0; flex: 0 0 auto; margin-left: auto; }
  .top-right .clock, .top-right #liveTxt, .top-right .demo-flag { display: none; }
  .top-right .chip-btn, .top-right .chip-btn.dec-btn, .top-right .chip-btn.ads-btn { padding: 5px 9px; min-height: 34px; font-size: 12.5px; }
  .top-right .icon-btn { width: 36px; height: 36px; }
}
/* B35: contas de anúncio recolhidas (3 + Mostrar todas) */
.contas-mais { display: flex; justify-content: center; padding: 8px 16px 2px; }
.contas-mais .chip-btn { min-height: 40px; }

/* B35: atalho para a página Criativos no cabeçalho das campanhas */
.cr-link { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
