/* Trackr — visual inspirado em Apple (dark) com acento verde-limão */
:root {
  --bg: #000;
  --bg-2: #070708;
  --card: #0f0f11;
  --card-2: #161618;
  --card-3: #1d1d20;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f5f5f7;
  --muted: #8e8e93;
  --muted-2: #636366;
  --accent: #c8ff2e;
  --accent-2: #a6e800;
  --accent-soft: rgba(200, 255, 46, .12);
  --accent-glow: rgba(200, 255, 46, .35);
  --red: #ff453a;
  --orange: #ff9f0a;
  --blue: #0a84ff;
  --purple: #bf5af2;
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01', 'tnum'; }
body { min-height: 100vh; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.red { color: var(--red); }
.hide { display: none !important; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, #050505, #000);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 12px 22px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: #000; border: 1px solid var(--line-2); display: grid; place-items: center; box-shadow: 0 0 24px -6px var(--accent-glow); }
.logo i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--accent); position: relative; }
.nav-label { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; padding: 16px 12px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: #c7c7cc; font-weight: 500; transition: background .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; opacity: .8; }
.nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a.active svg { opacity: 1; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #6fd400); color: #000; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.main { min-width: 0; padding: 28px 36px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; letter-spacing: -.035em; margin: 0; font-weight: 700; line-height: 1.05; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Controles ---------- */
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; cursor: pointer; color: #aeaeb2; font-weight: 500; font-size: 13px; white-space: nowrap; transition: all .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #2c2c2e; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.seg.accent button.on { background: var(--accent); color: #000; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card-2); padding: 9px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 13px; transition: transform .1s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--card-3); }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #000; border-color: transparent; box-shadow: 0 6px 24px -8px var(--accent-glow); }
.btn-primary:hover { background: #d6ff5c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.btn-danger { color: var(--red); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.input, .select, textarea.input { background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 13px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.select.inline { width: auto; padding: 8px 32px 8px 12px; font-size: 13px; }
input[type=date].input { color-scheme: dark; }
label.field { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

.toggle { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; background: #3a3a3c; border-radius: 99px; cursor: pointer; transition: background .2s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(18px); background: #000; }
.toggle.sm { width: 36px; height: 21px; }
.toggle.sm span::after { width: 15px; height: 15px; }
.toggle.sm input:checked + span::after { transform: translateX(15px); }

/* ---------- Cards / KPIs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.card .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-6 { grid-template-columns: repeat(6, 1fr); }
.span-2 { grid-column: span 2; }
.mt { margin-top: 16px; }
.mt-l { margin-top: 28px; }

.kpi { position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -.035em; margin-top: 10px; line-height: 1.1; white-space: nowrap; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi.hero { background: radial-gradient(120% 140% at 100% 0%, rgba(200, 255, 46, .14), transparent 55%), var(--card); border-color: rgba(200, 255, 46, .22); }
.kpi.hero .value { color: var(--accent); font-size: 34px; }
.kpi .dot { width: 8px; height: 8px; border-radius: 50%; }
.kpi.small { padding: 16px 18px; }
.kpi.small .value { font-size: 21px; margin-top: 6px; }
.kpi .spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 46px; opacity: .55; pointer-events: none; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.t th { position: sticky; top: 0; background: #121214; z-index: 2; text-align: right; font-weight: 500; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; font-size: 12px; }
.t th:hover { color: var(--text); }
.t th.l, .t td.l { text-align: left; }
.t th.sorted { color: var(--accent); }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: rgba(255, 255, 255, .025); }
.t tbody tr.click { cursor: pointer; }
.t tfoot td { font-weight: 700; background: #121214; position: sticky; bottom: 0; border-bottom: 0; border-top: 1px solid var(--line-2); }
.t .sticky-col { position: sticky; left: 0; background: var(--card); z-index: 1; }
.t th.sticky-col { z-index: 3; background: #121214; }
.t tfoot .sticky-col { background: #121214; }
.t tbody tr:hover .sticky-col { background: #141416; }
.name-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.name-cell small { display: block; color: var(--muted-2); font-weight: 400; font-size: 11px; margin-top: 2px; }
.pos { color: var(--accent); }
.neg { color: var(--red); }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: rgba(255, 255, 255, .06); color: #c7c7cc; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.approved, .badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.pending { background: rgba(255, 159, 10, .12); color: var(--orange); }
.badge.refunded, .badge.chargeback, .badge.error { background: rgba(255, 69, 58, .12); color: var(--red); }
.badge.refused { background: rgba(142, 142, 147, .14); color: var(--muted); }
.badge.plain::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font-size: 12px; background: var(--card-2); border: 1px solid var(--line); color: #c7c7cc; }

/* ---------- Gráficos ---------- */
.chart { width: 100%; height: 260px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 3px; border-radius: 3px; display: inline-block; }
.tooltip { position: absolute; pointer-events: none; background: rgba(28, 28, 30, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: 12px; min-width: 150px; z-index: 10; transform: translate(-50%, -110%); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.tooltip b { display: block; margin-bottom: 6px; }
.tooltip div { display: flex; justify-content: space-between; gap: 14px; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; }
.bar-row .track { grid-column: 1 / -1; height: 6px; background: var(--card-3); border-radius: 6px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 120px; }
.hours div { background: var(--accent); border-radius: 3px 3px 1px 1px; min-height: 2px; opacity: .85; position: relative; }
.hours div:hover { opacity: 1; }
.hours-labels { display: grid; grid-template-columns: repeat(24, 1fr); font-size: 10px; color: var(--muted-2); margin-top: 6px; text-align: center; }
.method { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.method:last-child { border-bottom: 0; }
.method .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--card-3); display: grid; place-items: center; grid-row: span 2; font-size: 15px; }
.method .conv { font-size: 12px; color: var(--muted); }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel .step { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: linear-gradient(90deg, var(--accent-soft) var(--w), var(--card-2) var(--w)); font-size: 13px; }
.funnel .step b { font-size: 15px; }

/* ---------- Integrações ---------- */
.plat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.plat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; }
.plat:hover { border-color: rgba(200, 255, 46, .4); transform: translateY(-1px); }
.mono { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #000; flex: none; }
.plat b { display: block; font-size: 13.5px; }
.plat span { font-size: 12px; color: var(--muted); }
.code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; background: #0a0a0a; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; color: #e5e5ea; line-height: 1.55; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .input { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; }
.list-item .grow span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.steps { margin: 0; padding-left: 18px; color: #c7c7cc; line-height: 1.75; font-size: 13px; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: #e6ffb0; font-size: 12.5px; line-height: 1.55; border: 1px solid rgba(200, 255, 46, .2); }
.note.warn { background: rgba(255, 159, 10, .1); color: #ffd59a; border-color: rgba(255, 159, 10, .25); }

/* ---------- Modal / sheet ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #111113; border: 1px solid var(--line-2); border-radius: 24px; padding: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); animation: pop .25s cubic-bezier(.2, 1, .3, 1); }
.modal h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.modal .sub { color: var(--muted); margin: 0 0 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; top: calc(16px + var(--safe-t)); right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 280px; max-width: 360px; background: rgba(28, 28, 30, .88); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border: 1px solid var(--line-2); border-radius: 18px; padding: 14px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); display: flex; gap: 12px; align-items: flex-start; animation: slidein .35s cubic-bezier(.2, 1.2, .3, 1); }
.toast .t-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #000; display: grid; place-items: center; font-weight: 800; flex: none; }
.toast.err .t-ic { background: var(--red); color: #fff; }
.toast b { display: block; font-size: 14px; }
.toast span { font-size: 12.5px; color: #c7c7cc; }
.toast.out { animation: slideout .3s forwards; }
@keyframes slidein { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes slideout { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 50% at 50% 0%, rgba(200, 255, 46, .13), transparent 70%), #000; }
.auth-card { width: min(400px, 100%); }
.auth-card .logo { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 22px; }
.auth-card .logo i { width: 20px; height: 20px; border-width: 5px; }
.auth h1 { text-align: center; font-size: 30px; letter-spacing: -.035em; margin: 0 0 8px; }
.auth p.lead { text-align: center; color: var(--muted); margin: 0 0 28px; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth .input { padding: 13px 15px; font-size: 15px; }
.auth .btn { padding: 13px; font-size: 15px; margin-top: 6px; }
.err-msg { color: var(--red); font-size: 13px; text-align: center; min-height: 18px; }

/* ---------- Mobile: tab bar estilo iOS ---------- */
.tabbar { display: none; }
.mobile-top { display: none; }
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-6 { grid-template-columns: repeat(3, 1fr); }
  .main { padding: 24px 22px 60px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: calc(10px + var(--safe-t)) 14px calc(96px + var(--safe-b)); }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 14px; }
  .mobile-top .brand { padding: 0; font-size: 16px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 28px; }
  .head-actions { width: 100%; }
  .head-actions .seg { width: 100%; }
  .head-actions .seg button { flex: 1; padding: 8px 8px; }
  .head-actions .select.inline, .head-actions > .input { flex: 1 1 calc(50% - 5px); min-width: 0; width: auto !important; font-size: 12.5px; }
  .head-actions > .btn { flex: 1 1 auto; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .g-6 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .span-2 { grid-column: auto; }
  .card { padding: 16px; border-radius: 18px; }
  .kpi .value { font-size: 22px; }
  .kpi.hero .value { font-size: 24px; }
  .kpi.small .value { font-size: 18px; }
  .kpi .label { font-size: 12px; }
  .chart { height: 210px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 8px 6px calc(8px + var(--safe-b)); background: rgba(10, 10, 10, .78); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 500; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar .active { color: var(--accent); }
  .overlay { place-items: end center; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; width: 100%; max-height: 92vh; padding: 22px 18px calc(22px + var(--safe-b)); animation: sheet .3s cubic-bezier(.2, 1, .3, 1); }
  .modal::before { content: ''; display: block; width: 38px; height: 5px; border-radius: 5px; background: #3a3a3c; margin: -8px auto 16px; }
  .kv { grid-template-columns: 110px 1fr; }
  #toasts { left: 12px; right: 12px; top: calc(10px + var(--safe-t)); }
  .toast { min-width: 0; max-width: none; }
  .t td, .t th { padding: 11px 12px; }
  .name-cell { max-width: 180px; }
}
@keyframes sheet { from { transform: translateY(100%); } }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 15px; }
.more-list a svg { width: 22px; height: 22px; color: var(--accent); }
.more-list a:last-child { border-bottom: 0; }

.skeleton { background: linear-gradient(90deg, var(--card-2), var(--card-3), var(--card-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.fade-in { animation: fadeup .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } }

/* ================= Layout estilo Utmify ================= */
.net-ic { display: inline-grid; place-items: center; border-radius: 6px; font-weight: 800; flex: none; line-height: 1; }
.nav a .net-ic { opacity: .95; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tb-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar h1 { font-size: 26px; letter-spacing: -.03em; margin: 0; font-weight: 700; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.tb-right { display: flex; align-items: center; gap: 14px; }
.updated { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; padding: 16px; margin-bottom: 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; }
.ff { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ff > span { font-size: 11.5px; font-weight: 600; color: #c7c7cc; display: flex; align-items: center; gap: 5px; }
.ff .select, .ff .input { padding: 9px 12px; font-size: 13px; border-radius: 10px; }
.ff .select { padding-right: 30px; }
i.info { font-style: normal; width: 15px; height: 15px; border-radius: 50%; border: 1.4px solid currentColor; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 700; color: var(--muted-2); cursor: help; flex: none; font-family: Georgia, serif; }

.dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mc { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; min-height: 92px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mc-head span { font-size: 12.5px; font-weight: 600; color: #d1d1d6; }
.mc-title, .mc-head .mc-title { font-size: 14.5px !important; font-weight: 700 !important; color: var(--text) !important; letter-spacing: -.01em; }
.mc-val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mc.good .mc-val { color: var(--accent); }
.mc.bad .mc-head span, .mc.bad .mc-val, .mc.bad i.info { color: var(--red); }
.mc.bad { border-color: rgba(255, 69, 58, .22); }
.approval { grid-row: span 2; grid-column: 4; justify-content: flex-start; }
.ap-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13px; color: #d1d1d6; border-bottom: 1px solid var(--line); }
.ap-row:last-child { border-bottom: 0; }
.ap-val { display: flex; align-items: center; gap: 8px; }
.ap-val b { font-size: 13px; min-width: 48px; text-align: right; }
.ring { width: 22px; height: 22px; }
.dgrid2 { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: 14px; margin-top: 14px; }
.dgrid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.col-stack { display: flex; flex-direction: column; gap: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; height: 100%; }
.donut-wrap { display: grid; place-items: center; padding: 4px 0 12px; }
.donut { width: 190px; height: 190px; }

/* ----- Campanhas ----- */
.ltoolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ltabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.ltabs::-webkit-scrollbar { display: none; }
.ltab { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 10px 10px 0 0; transition: color .15s, background .15s; }
.ltab svg { width: 17px; height: 17px; }
.ltab:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.ltab.on { color: var(--text); border-bottom-color: var(--accent); background: var(--card); }
.ltab.on svg { color: var(--accent); }
.selpill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #000; font-size: 11px; font-weight: 700; padding: 3px 6px 3px 9px; border-radius: 99px; }
.selpill b { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: rgba(0, 0, 0, .15); font-size: 9px; cursor: pointer; }
.selpill b:hover { background: rgba(0, 0, 0, .3); }
.strip { display: flex; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.strip > div { flex: 1; padding: 12px 16px; border-right: 1px solid var(--line); min-width: 120px; }
.strip > div:last-child { border-right: 0; }
.strip > div > span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.strip b { font-size: 16px; letter-spacing: -.01em; }
.ctw { max-height: calc(100vh - 210px); }
.ct th, .ct td { padding: 11px 14px; }
.ct .sticky { position: sticky; z-index: 1; background: var(--card); }
.ct thead .sticky { z-index: 4; background: #121214; }
.ct tfoot .sticky { z-index: 3; background: #121214; }
.ct .chk { width: 44px; min-width: 44px; text-align: center; padding: 0 12px; }
.ct .name-td, .ct .name-th { box-shadow: 1px 0 0 var(--line); }
.ct .name-cell { max-width: 300px; min-width: 200px; }
.ct tbody tr:hover td.sticky { background: #141416; }
.ct tbody tr.sel td { background: rgba(200, 255, 46, .045); }
.ct tbody tr.sel td.sticky { background: #151a0b; }
a.drill { font-weight: 600; }
a.drill:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
input.cb { appearance: none; width: 17px; height: 17px; border: 1.6px solid #545458; border-radius: 5px; cursor: pointer; display: inline-grid; place-items: center; margin: 0; vertical-align: middle; transition: all .12s; }
input.cb:checked { background: var(--accent); border-color: var(--accent); }
input.cb:checked::after { content: ''; width: 4px; height: 8px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.bud { display: inline-flex; align-items: center; gap: 6px; }
.pen { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 6px; opacity: .6; }
.ct tr:hover .pen, .pen.ok { opacity: 1; }
.pen:hover { background: var(--card-3); color: var(--accent); }
.pen.ok { color: #000; background: var(--accent); font-weight: 800; }
.bud-in { width: 110px; padding: 6px 8px !important; font-size: 13px; text-align: right; }
.small { font-size: 12px; }
.colist { max-height: 55vh; overflow: auto; }
.col-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.col-item .grow { flex: 1; }

@media (max-width: 1180px) {
  .dgrid { grid-template-columns: repeat(3, 1fr); }
  .approval { grid-column: auto; }
  .dgrid2 { grid-template-columns: 1fr 1fr; }
  .col-stack { grid-column: span 2; }
  .pair { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .topbar { padding-bottom: 14px; margin-bottom: 14px; }
  .topbar h1 { font-size: 24px; }
  .tb-right { width: 100%; justify-content: space-between; }
  .filters { grid-template-columns: 1fr 1fr; padding: 12px; gap: 10px; }
  .dgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .approval { grid-row: auto; grid-column: span 2; }
  .mc { padding: 13px 14px; min-height: 80px; }
  .mc-val { font-size: 18px; }
  .dgrid2, .dgrid3 { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
  .col-stack { grid-column: auto; }
  .pair { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ltoolbar .head-actions { width: auto; }
  .ct .name-cell { min-width: 130px; max-width: 150px; }
  .ct .sticky:not(.name-td):not(.name-th) { position: static; }
  .ct .name-td, .ct .name-th { left: 0 !important; }
  .ctw { max-height: none; }
}

/* evita estouro horizontal em telas estreitas */
.grid > *, .dgrid > *, .dgrid2 > *, .dgrid3 > * { min-width: 0; }
.field-row { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.card-head > * { min-width: 0; }
