/* Identidade Traxofy: lime #B8FF3D · grafite #0B0D10 · card #1A1F26 · texto #E6E8EC · Satoshi + Inter */
:root {
  color-scheme: dark;
  --brand: #B8FF3D; --brand-ink: #0B0D10; --brand-glow: rgba(184,255,61,.35);
  --bg: #0B0D10; --bg-2: #0E1115; --card: #14181E; --card-2: #1A1F26; --hover: #1F252D;
  --border: #20262E; --border-2: #2C333D;
  --text: #E6E8EC; --text-2: #A3A9B3; --text-3: #6B727D;
  --accent: #B8FF3D; --accent-2: #C9FF6B; --accent-bg: rgba(184,255,61,.10);
  --good: #B8FF3D; --good-bg: rgba(184,255,61,.10);
  --bad: #FF5A5A; --bad-bg: rgba(255,90,90,.12);
  --warn: #fab219; --warn-bg: rgba(250,178,25,.12);
  --serious: #ec835a;
  /* séries: s1 = lime da marca (série-herói); demais validadas na skill dataviz (passo dark) */
  --s1: #B8FF3D; --s2: #d95926; --s3: #3987e5; --s4: #c98500; --s5: #d55181; --s7: #B8FF3D;
  --grid: #1E242B; --surface-gap: #14181E;
  --radius: 12px; --radius-sm: 8px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Satoshi', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --brand: #B8FF3D; --brand-ink: #0B0D10; --brand-glow: rgba(120,170,20,.25);
  --bg: #F4F5F7; --bg-2: #ECEEF1; --card: #ffffff; --card-2: #F8F9FA; --hover: #EEF0F3;
  --border: #E3E6EA; --border-2: #D3D7DD;
  --text: #0B0D10; --text-2: #4E5560; --text-3: #858C96;
  --accent: #4F7A00; --accent-2: #4F7A00; --accent-bg: rgba(110,160,0,.10);
  --good: #3F7300; --good-bg: rgba(110,160,0,.10); --bad: #d03b3b; --warn: #b07800;
  --s1: #5E9000; --s2: #eb6834; --s3: #2a78d6; --s4: #eda100; --s5: #e87ba4; --s7: #5E9000;
  --grid: #ECEEF1; --surface-gap: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 13.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1, 'cv11' 1; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-bg); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); background: var(--bg-2); display: flex; flex-direction: column; padding: 14px 10px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 16px; font: 800 17px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.brand sup { font-size: 8px; font-weight: 500; color: var(--text-3); margin-left: -4px; }
.logo { width: 26px; height: 26px; color: var(--brand); filter: drop-shadow(0 0 8px var(--brand-glow)); flex: none; }
:root[data-theme="light"] .logo { color: var(--accent); filter: none; }
.ws-switch { margin: 0 2px 12px; width: calc(100% - 4px); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 9px; cursor: pointer; }
.nav-group { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 12px 10px 5px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 6.5px 10px; border-radius: var(--radius-sm); color: var(--text-2); transition: background .12s, color .12s; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, var(--accent-bg), transparent 85%); color: var(--text); box-shadow: inset 2px 0 0 var(--brand); }
.nav a.active svg { color: var(--brand); opacity: 1; }
:root[data-theme="light"] .nav a.active svg { color: var(--accent); }
.nav a svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav .soon { margin-left: auto; font-size: 10px; color: var(--text-3); border: 1px solid var(--border); padding: 0 5px; border-radius: 4px; }
.sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--border-2); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--text); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.topbar h1 { font: 700 16px/1.2 var(--display); margin: 0 auto 0 0; letter-spacing: -.01em; }
.page { padding: 22px 28px 60px; max-width: 1480px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.menu-btn { display: none; }

/* ---------- controles ---------- */
.ctl { height: 32px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; outline: none; }
.ctl:hover { border-color: var(--border-2); }
.ctl:focus-visible, .btn:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select.ctl { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; cursor: pointer; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 5px; color: var(--text-2); cursor: pointer; font-size: 12.5px; }
.seg button.on { background: var(--hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }
.btn { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--card-2); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; box-shadow: 0 0 0 0 var(--brand-glow); transition: box-shadow .2s, filter .2s; }
.btn.primary:hover { box-shadow: 0 0 18px var(--brand-glow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn svg { width: 14px; height: 14px; }
label.field { display: grid; gap: 5px; font-size: 12px; color: var(--text-2); }
label.field .ctl { width: 100%; color: var(--text); }
textarea.ctl { height: auto; min-height: 80px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3-1 { grid-template-columns: 2fr 1fr; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.card-h h3 { margin: 0; font-size: 13px; font-weight: 600; }
.card-h .sub { color: var(--text-3); font-size: 12px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 14px 16px 16px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.card-h h3, .section-title h2 { font-family: var(--display); }
.section-title h2 { font-size: 13px; font-weight: 600; margin: 0; color: var(--text); }
.section-title .sub { color: var(--text-3); font-size: 12px; }

.kpi { padding: 14px 16px; position: relative; overflow: hidden; }
.kpi .lbl { color: var(--text-2); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.kpi .val { font: 700 22px/1.2 var(--display); letter-spacing: -.01em; margin-top: 6px; }
.kpi .delta { font-size: 11.5px; margin-top: 4px; color: var(--text-3); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.kpi .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.hero { grid-column: span 2; }
.kpi.hero .val { font-size: 30px; }
.kpi.hero { background: radial-gradient(420px 160px at 100% 100%, var(--accent-bg), transparent 70%), var(--card); }
.up { color: var(--good); } .down { color: var(--bad); } .flat { color: var(--text-3); }
.pos { color: var(--good); } .neg { color: var(--bad); }
.kpi .spark { position: absolute; right: 12px; bottom: 12px; opacity: .9; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.t th { text-align: left; font-weight: 500; color: var(--text-3); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--card); }
.t th.num, .t td.num { text-align: right; font-variant-numeric: tabular-nums; }
.t th:hover { color: var(--text-2); }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .1s; }
.t tbody tr:hover { background: var(--hover); }
.t tr.click { cursor: pointer; }
.t .name { font-weight: 500; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.t .muted, .muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 11.5px; }

.pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--border-2); color: var(--text-2); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); background: var(--good-bg); }
.pill.critical, .pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-bg); }
.pill.warning { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-bg); }
.pill.serious { color: var(--serious); border-color: color-mix(in srgb, var(--serious) 35%, transparent); }
.pill.accent { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-bg); }

/* ---------- gráficos ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--text-3); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--text-3) 0 4px, transparent 4px 7px) !important; }
.tip { position: absolute; pointer-events: none; z-index: 10; background: var(--card-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); min-width: 150px; opacity: 0; transition: opacity .1s; }
.tip .tt { color: var(--text-3); margin-bottom: 4px; }
.tip .row { display: flex; justify-content: space-between; gap: 14px; }
.tip .row i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

.funnel { display: grid; gap: 6px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 230px; align-items: center; gap: 12px; }
.funnel-bar { height: 26px; background: var(--card-2); border-radius: 4px; position: relative; overflow: hidden; }
.funnel-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--s1) 55%, transparent), var(--s1)); border-radius: 0 4px 4px 0; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.funnel-row .drop { color: var(--text-3); font-size: 12px; text-align: right; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 90px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-track { height: 8px; background: var(--card-2); border-radius: 4px; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }

/* ---------- diversos ---------- */
.alert { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.alert:last-child { border-bottom: 0; }
.alert .ic { margin-top: 1px; }
.alert b { font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); }
.code { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-all; color: var(--text-2); position: relative; }
.code .copy { position: absolute; top: 8px; right: 8px; }
.feed { max-height: 420px; overflow-y: auto; }
.feed-item { display: grid; grid-template-columns: 70px 150px 1fr auto; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; align-items: center; }
.feed-item.new { animation: flash 1.2s ease; }
@keyframes flash { from { background: var(--accent-bg); } to { background: transparent; } }
.timeline { border-left: 1px solid var(--border-2); margin-left: 6px; padding-left: 16px; display: grid; gap: 10px; }
.timeline .ev { position: relative; font-size: 12.5px; }
.timeline .ev::before { content: ''; position: absolute; left: -20.5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.timeline .ev.buy::before { background: var(--good); }
.timeline .ev.sess::before { background: var(--accent); }
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--card); border-left: 1px solid var(--border); z-index: 51; overflow-y: auto; animation: slide .2s ease; }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); z-index: 1; }
.drawer-h h3 { margin: 0; font-size: 14px; }
.drawer-b { padding: 18px 20px; display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--card-2); border: 1px solid var(--border-2); padding: 10px 16px; border-radius: 8px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s; }
.roadmap li { margin: 6px 0; color: var(--text-2); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.skeleton { background: linear-gradient(90deg, var(--card) 0, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 90px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(900px 500px at 100% 100%, rgba(184,255,61,.14), transparent 60%), radial-gradient(700px 400px at 0% 0%, rgba(184,255,61,.05), transparent 60%), var(--bg); }
.auth-tag { color: var(--text-2); font-size: 13px; margin: -6px 0 4px; }
.auth-tag b { color: var(--brand); font-weight: 600; }
.auth-card { width: min(380px, 100%); padding: 28px; display: grid; gap: 14px; }
.auth-card h1 { margin: 0; font: 700 21px/1.2 var(--display); }
.err { color: var(--bad); font-size: 12.5px; min-height: 16px; }

@media (max-width: 1100px) { .cols-2, .cols-3-1 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.5); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .page { padding: 16px 16px 50px; }
  .kpi.hero { grid-column: span 1; }
  .kpi.hero .val, .kpi .val { font-size: 18px; }
  .kpi .spark { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .funnel-row { grid-template-columns: 100px 1fr 80px; }
  .form-grid { grid-template-columns: 1fr; }
  .feed-item { grid-template-columns: 60px 1fr auto; }
  .feed-item .hide-sm { display: none; }
}

/* brilho da série-herói (lime), como no material da marca */
.chart path[stroke="var(--s1)"] { filter: drop-shadow(0 0 6px var(--brand-glow)); }
:root[data-theme="light"] .chart path[stroke="var(--s1)"] { filter: none; }

/* ---------- dashboards por oferta ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); white-space: nowrap; font-size: 12.5px; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.on { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); font-weight: 600; }
.chip.on .muted { color: color-mix(in srgb, var(--brand-ink) 60%, transparent); }
:root[data-theme="light"] .chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.sdot.active { background: var(--good); box-shadow: 0 0 6px var(--brand-glow); }
.sdot.paused { background: var(--warn); }
.chip.on .sdot { background: var(--brand-ink); box-shadow: none; }

.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.offer-card { display: grid; gap: 14px; padding: 16px; position: relative; overflow: hidden; transition: border-color .18s, transform .18s, box-shadow .18s; cursor: pointer; }
.offer-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(360px 140px at 100% 0%, var(--accent-bg), transparent 70%); opacity: 0; transition: opacity .2s; pointer-events: none; }
.offer-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 1px color-mix(in srgb, var(--brand) 15%, transparent); }
.offer-card:hover::before { opacity: 1; }
.offer-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.oc-h { display: flex; align-items: center; gap: 10px; }
.oc-name { font: 700 15px/1.25 var(--display); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.oc-hero .lbl { color: var(--text-3); font-size: 12px; }
.oc-profit { font: 700 26px/1.15 var(--display); letter-spacing: -.01em; margin: 2px 0; }
.oc-hero .spark { position: static; flex: none; }
.oc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.oc-stats div { display: grid; gap: 2px; min-width: 0; }
.oc-stats span { color: var(--text-3); font-size: 11.5px; }
.oc-stats b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-share { height: 4px; background: var(--card-2); border-radius: 2px; overflow: hidden; }
.oc-share span { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
:root[data-theme="light"] .oc-share span { background: var(--accent); }
.oc-foot { display: flex; justify-content: space-between; font-size: 12px; }
.oc-open { color: var(--accent-2); font-weight: 500; transition: transform .15s; }
.offer-card:hover .oc-open { transform: translateX(3px); }

.offer-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 18px 20px; margin-bottom: 14px; background: radial-gradient(600px 180px at 100% 0%, var(--accent-bg), transparent 70%), var(--card); border-color: color-mix(in srgb, var(--brand) 22%, var(--border)); }
.offer-head h2 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -.01em; }
#title a:hover { color: var(--text); }

.nav-offer { padding-left: 14px !important; font-size: 13px; }
.nav-offer span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-offer.active .sdot { box-shadow: 0 0 8px var(--brand); }
.nav-add { margin-left: auto; padding: 0 6px !important; color: var(--text-3); font-size: 15px; line-height: 1; }
.funnel.compact .funnel-row { grid-template-columns: 130px 1fr 110px; }
.funnel.compact .funnel-bar { height: 18px; }
@media (max-width: 820px) { .offer-grid { grid-template-columns: 1fr; } .funnel.compact .funnel-row { grid-template-columns: 90px 1fr 80px; } }

/* ---------- funil, previsão, horários, ranking, abas ---------- */
.cols-3 { grid-template-columns: 1fr 1.15fr 1fr; }
@media (max-width: 1250px) { .cols-3 { grid-template-columns: 1fr 1fr; } .cols-3 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 820px) { .cols-3 { grid-template-columns: 1fr; } }

.funnel-shape { display: grid; gap: 4px; }
.f-row { display: grid; grid-template-columns: 1fr 64px; gap: 10px; align-items: center; animation: fin .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fin { from { opacity: 0; transform: scaleX(.9); } to { opacity: 1; transform: none; } }
.f-seg { justify-self: center; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--brand-ink); line-height: 1.15; transition: filter .15s; }
.f-row:hover .f-seg { filter: brightness(1.12) drop-shadow(0 0 8px var(--brand-glow)); }
.f-seg b { font: 700 14px var(--display); }
.f-seg span { font-size: 10.5px; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90%; }
:root[data-theme="light"] .f-seg { color: #fff; }
.f-side { display: flex; flex-direction: column; font-size: 10.5px; color: var(--text-3); line-height: 1.2; }
.f-side b { color: var(--text); font-size: 12.5px; }
.fc-main { margin-bottom: 14px; }
.fc-val { font: 700 30px/1.15 var(--display); color: var(--brand); letter-spacing: -.01em; margin: 2px 0 4px; text-shadow: 0 0 22px var(--brand-glow); }
:root[data-theme="light"] .fc-val { color: var(--accent); text-shadow: none; }
.fc-bar { position: relative; height: 8px; background: var(--card-2); border-radius: 4px; margin-bottom: 16px; }
.fc-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 50%, transparent), var(--brand)); }
.fc-bar i { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--text); border-radius: 1px; }
.fc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fc-grid div { display: grid; gap: 1px; }
.fc-grid span { color: var(--text-3); font-size: 11.5px; }
.fc-grid b { font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-grid em { font-style: normal; color: var(--text-3); font-size: 11px; }

.hbars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; }
.hbar { height: 100%; display: flex; align-items: flex-end; cursor: default; border-radius: 3px; }
.hbar:hover { background: var(--hover); }
.hbar span { display: block; width: 100%; background: color-mix(in srgb, var(--s1) 70%, transparent); border-radius: 3px 3px 0 0; transition: background .15s; }
.hbar:hover span, .hbar.now span { background: var(--s1); }
.hbar.now span { box-shadow: 0 0 10px var(--brand-glow); }
.hbars-axis { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; margin-top: 6px; font-size: 10.5px; color: var(--text-3); }
.hbars-axis span { white-space: nowrap; }

.heat { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 3px; }
.heat-h { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.heat-d { font-size: 11.5px; color: var(--text-2); display: flex; align-items: center; }
.heat-c { aspect-ratio: 1.3; border-radius: 3px; min-height: 14px; transition: outline-color .1s; outline: 1px solid transparent; }
.heat-c:hover { outline-color: var(--text); }
.heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 11.5px; color: var(--text-3); }
.heat-legend i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--s1) 12%, var(--card-2)), var(--s1)); }

.best { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.best li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; }
.rank { width: 22px; height: 22px; border-radius: 6px; background: var(--card-2); display: grid; place-items: center; font: 700 11.5px var(--display); color: var(--text-2); }
.best li:first-child .rank { background: var(--brand); color: var(--brand-ink); }
.best-main { min-width: 0; }
.best-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.best-bar { height: 4px; background: var(--card-2); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.best-bar span { display: block; height: 100%; background: var(--s1); border-radius: 2px; }
.best-bar span.neg { background: var(--bad); }
.best-nums { text-align: right; display: grid; font-variant-numeric: tabular-nums; }
.best-nums span { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--brand); font-weight: 500; }
.col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.col-opt { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; padding: 3px 0; }
.col-opt input { accent-color: var(--brand); width: 15px; height: 15px; }
.name-cell { display: flex; align-items: center; gap: 8px; }
.name-cell > div { overflow: hidden; text-overflow: ellipsis; }
.edit-btn { opacity: 0; padding: 0 6px; flex: none; transition: opacity .12s; }
tr:hover .edit-btn, .edit-btn:focus-visible { opacity: 1; }
@media (hover: none) { .edit-btn { opacity: .8; } }

/* ---------- Campanhas: estilo Gerenciador de Anúncios ---------- */
.am-tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; background: var(--card); overflow-x: auto; }
.am-tab { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-right: 1px solid var(--border); background: none; color: var(--text-2); cursor: pointer; white-space: nowrap; position: relative; font-weight: 500; }
.am-tab svg { width: 16px; height: 16px; }
.am-tab:hover { color: var(--text); background: var(--hover); }
.am-tab.on { color: var(--text); background: var(--card-2); box-shadow: inset 0 -2px 0 var(--brand); }
.am-tab.on svg { color: var(--brand); }
:root[data-theme="light"] .am-tab.on svg { color: var(--accent); }
.am-tab em { font-style: normal; color: var(--text-3); font-size: 12px; font-weight: 400; }
.am-tab-aux { margin-left: auto; border-left: 1px solid var(--border); border-right: 0; font-weight: 400; }
.am-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: var(--brand-ink); font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 4px 1px 9px; }
.am-badge i { font-style: normal; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; }
.am-badge i:hover { background: rgba(0,0,0,.15); }
:root[data-theme="light"] .am-badge { background: var(--text); color: #fff; }
.am-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--card); margin-bottom: 14px; }
.am-search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 240px; }
.am-search:focus-within { border-color: var(--brand); }
.am-search svg { width: 14px; height: 14px; color: var(--text-3); }
.am-search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; }
.am-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.am-check input, .am-cb input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.am-batch { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border)); animation: fade .15s; }
.am-sep { width: 1px; height: 20px; background: var(--border-2); }
.am-mini { height: 26px; font-size: 12px; }
.am-batch .btn:disabled, .am-batch .ctl:disabled { opacity: .45; cursor: not-allowed; }
.am-table td, .am-table th { white-space: nowrap; }
.am-table .am-cb { width: 36px; padding-right: 0; }
.am-table .am-tg { width: 56px; }
.am-table tbody tr.am-selected { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.am-table tfoot td { border-top: 1px solid var(--border-2); border-bottom: 0; color: var(--text-2); font-variant-numeric: tabular-nums; background: var(--card-2); }
.am-sticky { position: sticky; left: 0; background: var(--card); z-index: 1; }
.am-table thead .am-sticky { z-index: 2; }
.am-table tbody tr:hover .am-sticky { background: var(--hover); }
.am-table tfoot .am-sticky { background: var(--card-2); }
.am-name { cursor: pointer; font-weight: 500; }
.am-name:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.am-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .12s; flex: none; }
.am-actions .btn { padding: 0 6px; }
tr:hover .am-actions, .am-actions:focus-within { opacity: 1; }
@media (hover: none) { .am-actions { opacity: .85; } }
.switch { width: 34px; height: 20px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--card-2); position: relative; cursor: pointer; padding: 0; transition: background .15s, border-color .15s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-3); transition: transform .15s, background .15s; }
.switch.on { background: var(--brand); border-color: var(--brand); }
.switch.on i { transform: translateX(14px); background: var(--brand-ink); }
:root[data-theme="light"] .switch.on { background: var(--accent); border-color: var(--accent); }
:root[data-theme="light"] .switch.on i { background: #fff; }
.switch:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 820px) { .am-search { min-width: 0; flex: 1 1 100%; } .am-tab { padding: 10px 12px; } .am-tab span:not(.am-badge) { font-size: 12.5px; } }
