/* Central de Pagamentos — telas de quem paga (celular primeiro) e painel. */
:root {
  --bg: oklch(0.985 0.003 265);
  --surface: oklch(1 0 0);
  --sunken: oklch(0.965 0.004 265);
  --line: oklch(0.91 0.006 265);
  --ink: oklch(0.22 0.02 265);
  --ink-2: oklch(0.42 0.02 265);
  --ink-3: oklch(0.54 0.015 265);
  --ok: oklch(0.58 0.14 155);
  --ok-soft: oklch(0.95 0.04 155);
  --warn: oklch(0.62 0.14 70);
  --warn-soft: oklch(0.96 0.05 85);
  --err: oklch(0.56 0.19 25);
  --err-soft: oklch(0.96 0.03 25);
  --brand: #4F46E5;
  --link: oklch(0.5 0.2 275);
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px oklch(0 0 0 / .06), 0 8px 28px oklch(0.3 0.03 265 / .08);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.17 0.01 265); --surface: oklch(0.21 0.012 265); --sunken: oklch(0.19 0.01 265);
    --line: oklch(0.3 0.015 265); --ink: oklch(0.95 0.005 265); --ink-2: oklch(0.78 0.01 265); --ink-3: oklch(0.66 0.012 265);
    --ok-soft: oklch(0.3 0.06 155); --warn-soft: oklch(0.32 0.06 80); --err-soft: oklch(0.32 0.07 25);
    --shadow: 0 1px 2px oklch(0 0 0 / .4), 0 12px 32px oklch(0 0 0 / .35);
    --link: oklch(0.78 0.12 275);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }
code, .mono { font-family: var(--mono); font-size: .86em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 550 14px var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--ink-3); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { width: 100%; min-height: 52px; font-size: 16px; border-radius: 12px; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
label { display: grid; gap: 5px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
input, select, textarea { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: 14px var(--font); }
input[type=color] { padding: 3px; min-height: 38px; }
input[type=checkbox] { width: auto; min-height: auto; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.hint { font-weight: 400; color: var(--ink-3); font-size: 12px; }

.alert { padding: 10px 14px; border-radius: var(--r); font-size: 14px; margin: 0 0 16px; }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--ink); }

/* ============ tela de pagamento ============ */
.pay { min-height: 100dvh; display: grid; place-items: start center; padding: 28px 16px 40px; }
.pay-card { width: min(440px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.pay-top { padding: 22px 24px 18px; border-top: 5px solid var(--brand); display: flex; align-items: center; gap: 12px; }
.pay-top img { height: 36px; max-width: 140px; object-fit: contain; }
.pay-top .who { font-weight: 650; font-size: 16px; }
.pay-body { padding: 4px 24px 24px; }
.pay-body h1 { font-size: 22px; letter-spacing: -0.01em; }
.pay-body .desc { color: var(--ink-2); margin: 6px 0 0; }
.price { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price strong { font-size: 34px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price span { color: var(--ink-3); }
/* escolha de plano: um cartão por plano */
.choice { margin: 16px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.choice h2 { font-size: 18px; letter-spacing: -0.01em; }
.choice .desc { margin: 4px 0 0; }
.choice .price { margin: 12px 0 2px; }
.choice .price strong { font-size: 26px; }
.choice .btn.big { margin-top: 14px; }
.choice .btn[disabled] { opacity: .6; cursor: default; }
.trial { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; }
.items { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line); }
.items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.items li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.items li.total { font-weight: 650; border-bottom: 0; }
.buyer { margin: 18px 0; padding: 12px 14px; background: var(--sunken); border-radius: var(--r); font-size: 14px; }
.buyer div:first-child { font-weight: 600; }
.alts form + form { margin-top: 12px; }
.alts .desc.small { margin-top: 6px; text-align: center; font-size: 13px; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.secure { margin-top: 14px; text-align: center; font-size: 12px; color: var(--ink-3); }
.msg { text-align: center; padding: 28px 24px; }
.msg .icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); font-size: 26px; }
.msg .icon.ok { background: var(--ok-soft); color: var(--ok); }
.msg h1 { font-size: 21px; }
.msg p { color: var(--ink-2); margin: 8px 0 20px; text-wrap: pretty; }

/* ============ painel ============ */
/* Claro e sóbrio (estilo dos painéis de pagamento): fundo levemente frio,
   superfícies brancas, índigo só para ação, seleção e dados. */
body.admin {
  color-scheme: light;
  --bg: oklch(0.982 0.004 275); --surface: oklch(1 0 0); --sunken: oklch(0.967 0.006 275);
  --line: oklch(0.915 0.007 275); --line-soft: oklch(0.948 0.005 275);
  --ink: oklch(0.21 0.02 275); --ink-2: oklch(0.4 0.018 275); --ink-3: oklch(0.5 0.016 275);
  --brand: oklch(0.51 0.21 277); --brand-soft: oklch(0.95 0.03 277); --brand-ink: oklch(0.42 0.2 277);
  --ok: oklch(0.52 0.13 155); --ok-soft: oklch(0.955 0.045 155);
  --warn: oklch(0.55 0.13 65); --warn-soft: oklch(0.965 0.05 85);
  --err: oklch(0.53 0.19 25); --err-soft: oklch(0.96 0.03 25);
  --link: var(--brand-ink);
  --shadow-sm: 0 1px 2px oklch(0.3 0.03 275 / .06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--bg); color: var(--ink); font-size: 14px;
}
.admin a { text-decoration: none; }
.admin a:hover { text-decoration: underline; text-underline-offset: 3px; }
.admin .btn { min-height: 34px; border-radius: 8px; font-size: 13.5px; box-shadow: var(--shadow-sm); transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.admin .btn:hover { text-decoration: none; background: var(--sunken); border-color: var(--line); }
.admin .btn.primary { box-shadow: 0 1px 2px oklch(0.4 0.2 277 / .3); }
.admin .btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); filter: none; }
.admin .btn.ghost { box-shadow: none; }
.admin .btn.ghost:hover { background: var(--sunken); color: var(--ink); }
.admin .btn.big { min-height: 42px; font-size: 14.5px; border-radius: 9px; }
.admin input, .admin select, .admin textarea { min-height: 36px; border-radius: 8px; border-color: var(--line); box-shadow: var(--shadow-sm); font-size: 14px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.admin input:hover, .admin select:hover { border-color: oklch(0.85 0.01 275); }
.admin input:focus, .admin select:focus, .admin textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px oklch(0.51 0.21 277 / .16); }
.admin input::placeholder { color: oklch(0.58 0.012 275); }
.admin label { color: var(--ink); font-weight: 550; font-size: 13px; align-content: start; }
.admin input[type=checkbox] { width: 16px; height: 16px; min-height: 0; padding: 0; box-shadow: none; flex: none; }
.admin input[type=color] { padding: 3px 4px; cursor: pointer; }
.admin .hint { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.admin code { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* topo */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; padding: 0 max(28px, calc((100% - 1180px) / 2 + 28px)); height: 56px; background: oklch(1 0 0 / .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.top .logo, .auth-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.top .logo:hover { text-decoration: none; }
.mark { width: 24px; height: 24px; fill: var(--brand); flex: none; }
.tabs { display: flex; align-self: stretch; gap: 4px; }
.tabs a { display: flex; align-items: center; padding: 0 12px; color: var(--ink-2); font-weight: 550; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s var(--ease); }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current=page] { color: var(--brand-ink); border-bottom-color: var(--brand); }
.top form { margin-left: auto; }

/* página */
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 28px 72px; }
.wrap.narrow { max-width: 820px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.lede { margin: 4px 0 0; color: var(--ink-3); font-size: 13.5px; }
.lede code { font-size: 12.5px; }
.crumb { display: inline-block; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
.scope select { min-width: 210px; font-weight: 550; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.panel.flush { padding: 0; overflow: hidden; }
.panel > h2, .panel-head h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.panel .sub { color: var(--ink-3); font-size: 13px; margin: 3px 0 0; max-width: 70ch; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.more { font-size: 13px; font-weight: 550; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid2.tight { gap: 12px; grid-template-columns: 1fr 1fr; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.auth-card.stack { gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 16px; }
.admin .check { font-weight: 500; align-items: flex-start; }
.admin .check { display: flex; gap: 9px; }
.admin .check input { margin-top: 2px; accent-color: var(--brand); }
.admin .check .hint { margin-left: 4px; }
.admin .check.needs-confirm { padding: 8px 10px; border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); }

/* números do mês: uma faixa só, dividida, em vez de cartões soltos */
.stats { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; color: inherit; }
.stat + .stat { border-left: 1px solid var(--line-soft); }
.stat .label { font-size: 13px; color: var(--ink-2); font-weight: 550; }
.stat strong { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat.lead strong { font-size: 30px; }
.stat .foot { font-size: 12.5px; color: var(--ink-3); }
.stat.link { transition: background-color .15s var(--ease); }
.stat.link:hover { background: var(--sunken); text-decoration: none; }
.stat.alert strong { color: var(--err); }
.stat.alert .foot { color: var(--err); font-weight: 550; }
.delta { display: inline-block; padding: 0 6px; border-radius: 5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.delta.up { background: var(--ok-soft); color: var(--ok); }
.delta.down { background: var(--err-soft); color: var(--err); }

/* gráfico de receita por dia */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 168px; padding-top: 8px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 41px, var(--line-soft) 41px 42px); }
.chart .col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.chart .bar { display: block; width: 100%; min-height: 0; border-radius: 3px 3px 0 0; background: oklch(0.51 0.21 277 / .78); transition: background-color .15s var(--ease); }
.chart .col.today .bar { background: var(--brand); }
.chart .col:hover .bar { background: var(--brand-ink); }
.chart .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 4px; padding: 6px 9px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s var(--ease), translate .15s var(--ease); z-index: 2; }
.chart .tip b { display: block; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart .col:hover .tip { opacity: 1; translate: -50% 0; }
.chart .col:first-child .tip { left: 0; translate: 0 4px; }
.chart .col:first-child:hover .tip { translate: 0 0; }
.chart .col:last-child .tip { left: auto; right: 0; translate: 0 4px; }
.chart .col:last-child:hover .tip { translate: 0 0; }
.axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.chart-empty { display: grid; place-items: center; align-content: center; gap: 2px; height: 168px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; background: var(--sunken); }
.chart-empty p { margin: 0; color: var(--ink-2); }

.split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split .panel { margin-bottom: 0; }

/* tabelas */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.panel:not(.flush) th:first-child, .panel:not(.flush) td:first-child { padding-left: 0; }
.panel:not(.flush) th:last-child, .panel:not(.flush) td:last-child { padding-right: 0; }
.panel.flush th:first-child, .panel.flush td:first-child { padding-left: 22px; }
.panel.flush th:last-child, .panel.flush td:last-child { padding-right: 22px; }
.panel.flush th { background: var(--sunken); }
tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr { transition: background-color .12s var(--ease); }
table.list tbody tr:hover { background: oklch(0.985 0.004 275); }
tfoot td { border-top: 1px solid var(--line); border-bottom: 0; background: var(--sunken); font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.strong { font-weight: 600; color: var(--ink); }
td.when { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
.who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.who .small { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj { display: inline-flex; align-items: center; white-space: nowrap; color: var(--ink-2); }
.rowlink { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; }
tr.clickable { cursor: pointer; position: relative; }
tr.clickable .rowlink::after { content: ""; position: absolute; inset: 0; }
.tbl { overflow-x: auto; }
.empty { padding: 14px 0 2px; color: var(--ink-3); font-size: 13.5px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.tag.paid, .tag.active, .tag.delivered, .tag.trialing { background: var(--ok-soft); color: var(--ok); }
.tag.failed, .tag.canceled, .tag.unpaid, .tag.incomplete_expired { background: var(--err-soft); color: var(--err); }
.tag.pending, .tag.past_due { background: var(--warn-soft); color: var(--warn); }
.tag.refunded, .tag.expired { background: var(--sunken); color: var(--ink-2); }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 8px; flex: none; box-shadow: inset 0 0 0 1px oklch(0 0 0 / .08); }

/* precisa de atenção */
.issues { list-style: none; margin: 0; padding: 0; display: grid; }
.issues li { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.issues li:first-child { border-top: 0; padding-top: 2px; }
.issues li > div, .all-good > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.issues strong, .all-good strong { font-size: 13.5px; font-weight: 600; }
.dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; flex: none; }
.dot.err { background: var(--err); } .dot.warn { background: var(--warn); } .dot.ok { background: var(--ok); }
.all-good { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); }

/* filtros dos pagamentos */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.filters .search { flex: 1 1 260px; }
.filters select { min-width: 170px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: oklch(0.94 0.008 275); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--ink-2); transition: background-color .15s var(--ease), color .15s var(--ease); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

/* projeto */
.title { display: flex; align-items: center; gap: 14px; }
.avatar { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 19px; box-shadow: inset 0 0 0 1px oklch(0 0 0 / .08); text-shadow: 0 1px 1px oklch(0 0 0 / .2); }
.mini-stats { display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); }
.mini-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 18px; }
.mini-stats > div + div { border-left: 1px solid var(--line-soft); }
.mini-stats .label { font-size: 12px; color: var(--ink-3); font-weight: 550; }
.mini-stats strong { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.page { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 28px; align-items: start; }
.toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 1px; }
.toc a { padding: 6px 10px; border-radius: 7px; color: var(--ink-2); font-size: 13.5px; font-weight: 550; }
.toc a:hover { background: oklch(0.95 0.008 275); color: var(--ink); text-decoration: none; }
.sections .panel { scroll-margin-top: 76px; }
.subform { margin-top: 18px; padding: 18px; border-radius: 10px; background: var(--sunken); scroll-margin-top: 76px; }
.subform h3 { font-size: 14px; font-weight: 650; }
.secret { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.secret code, .kv code.v { display: block; padding: 8px 10px; background: var(--sunken); border: 1px solid var(--line-soft); border-radius: 8px; overflow-x: auto; white-space: nowrap; font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 16px; align-items: center; }
.kv .k { font-size: 13px; color: var(--ink-2); font-weight: 550; }
.qr { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; margin-bottom: 18px; padding: 16px; border-radius: 10px; background: var(--sunken); }
.qr img { width: 180px; height: 180px; border-radius: 8px; background: #fff; padding: 6px; }
pre.payload { margin: 6px 0 0; padding: 8px 10px; background: var(--sunken); border-radius: 8px; font-size: 12px; max-height: 180px; overflow: auto; }
details summary { cursor: pointer; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.admin .alert { border-radius: 10px; font-size: 13.5px; }
.admin .alert.ok { border: 1px solid oklch(0.88 0.06 155); }
.admin .alert.err { border: 1px solid oklch(0.88 0.06 25); }
.admin .alert.warn { border: 1px solid oklch(0.88 0.07 85); }
.onboard { padding: 28px 24px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.onboard h2 { font-size: 16px; }
.onboard p { margin: 0; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }
.panel.onboard { padding: 36px 24px; }

/* entrar / primeiro acesso */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: radial-gradient(60% 50% at 50% 0%, oklch(0.94 0.04 277 / .7), transparent 70%), var(--bg); }
.auth-card { width: min(380px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px oklch(0.3 0.03 275 / .06), 0 16px 40px oklch(0.3 0.05 275 / .08); }
.auth-card h1 { font-size: 20px; letter-spacing: -0.01em; }
.auth-card .lede { margin-top: -6px; }
.auth-brand { margin-bottom: 6px; font-size: 14px; }

@media (max-width: 960px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(2n) { border-left: 1px solid var(--line-soft); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .split { grid-template-columns: 1fr; }
  .page { grid-template-columns: 1fr; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .toc a { background: var(--surface); border: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .top { gap: 12px; padding: 0 16px; overflow-x: auto; }
  .top .logo span { display: none; }
  .tabs a { padding: 0 8px; white-space: nowrap; }
  .wrap { padding: 20px 16px 56px; }
  .stats { grid-template-columns: 1fr; }
  .stat:nth-child(n) { border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line-soft); }
  .kv, .qr { grid-template-columns: 1fr; }
  .mini-stats { width: 100%; }
  .mini-stats > div { flex: 1; }
  .chart { gap: 2px; }
  .filters select, .scope select { min-width: 0; width: 100%; }
  .filters > label:not(.search) { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin *, .admin *::before, .admin *::after { transition: none !important; }
}
