/* Painel v3 (0.9.18): a mesma cara do app Max Pro. Preto, vermelho #E50914, Sora nos títulos e Figtree no texto.
   Sempre escuro, como o app (o tema claro saiu). */
/* Novo visual (0.9.8x): Sora e Figtree ficam no nosso servidor (pasta fontes/), sem buscar no Google. A Fira Code
   (código nas páginas abertas) continua vindo do Google, como antes. */
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&display=swap");
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fontes/figtree-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fontes/figtree-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fontes/sora-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fontes/sora-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #0A0A0C; --surface: #0F0F12; --card: #141416; --card-2: #1E1E22; --line: #2A2A30;
  --fg: #F5F5F5; --muted: #A3A3AB; --primary: #E50914; --primary-fg: #FFFFFF; --primary-soft: rgba(229,9,20,.14);
  --link: #FF4D57;
  --limit: #F5B83D; --limit-soft: rgba(245,184,61,.14);
  --ok: #22C55E; --ok-soft: rgba(34,197,94,.14); --warn: #F5B83D; --warn-soft: rgba(245,184,61,.14);
  --bad: #FF5A5F; --bad-soft: rgba(255,90,95,.14); --info: #38BDF8; --info-soft: rgba(56,189,248,.14);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.35); --overlay: rgba(0,0,0,.65);
  --font: "Figtree", "Segoe UI", Roboto, system-ui, sans-serif;
  --display: "Sora", "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "Fira Code", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fs-xs: 13.5px; --fs-sm: 14.5px; --fs-md: 15.5px; --fs-lg: 18px; --fs-xl: 22.5px; --fs-2xl: 29.5px; --lh: 1.5;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --side-w: 248px; --top-h: 60px; --ctl-h: 38px; --ease: cubic-bezier(.2,.7,.2,1); --t: 160ms;
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--fs-md)/var(--lh) var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--display); letter-spacing: -.01em; }
h1 { font-size: var(--fs-xl); font-weight: 600; }
h2 { font-size: var(--fs-lg); font-weight: 600; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0 0 var(--s3); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono, code { font-family: var(--mono); font-size: .95em; letter-spacing: .02em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sm { font-size: var(--fs-xs); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hide, [hidden] { display: none !important; }
.sp { flex: 1; }
.up { color: var(--ok); } .down { color: var(--bad); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Estrutura: lateral fixa + topo + conteúdo */
.app { display: flex; min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side .brand { height: var(--top-h); flex: none; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s4); font-weight: 700; font-size: var(--fs-lg); border-bottom: 1px solid var(--line); }
.side .brand img { height: 24px; width: auto; display: block; }
.side .brand small { color: var(--muted); font-weight: 500; font-size: var(--fs-xs); margin-left: auto; text-transform: uppercase; letter-spacing: .08em; }
.nav { flex: 1; overflow-y: auto; padding: var(--s3) var(--s2); display: flex; flex-direction: column; gap: 2px; }
.nav .grp { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: var(--s3) var(--s3) var(--s1); margin: 0; }
.nav .grp:first-child { padding-top: 0; }
.nav a { display: flex; align-items: center; gap: var(--s3); height: 34px; padding: 0 var(--s3); border-radius: var(--r-sm); color: var(--muted); font-weight: 500; text-decoration: none; transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.nav a .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; flex: none; }
.nav a:hover { background: var(--card-2); color: var(--fg); }
.nav a.on { background: var(--primary-soft); color: var(--fg); box-shadow: inset 2px 0 0 var(--primary); }
.nav a.on .dot { background: var(--primary); opacity: 1; }
.nav a .cnt { margin-left: auto; font: 500 var(--fs-xs) var(--mono); color: var(--muted); }
.nav a .cnt.alert { color: var(--warn); background: var(--warn-soft); padding: 0 7px; border-radius: var(--r-pill); }
.side .me { border-top: 1px solid var(--line); padding: var(--s3) var(--s4); display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); }
.side .me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-xs); flex: none; }
.side .me .me-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side .me .me-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.side .me .me-t span { color: var(--muted); font-size: var(--fs-xs); }
.side .me form { margin: 0; }
.icon-btn { width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--card-2); color: var(--fg); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s5); }
.top .menu-btn { display: none; }
.search { display: flex; align-items: center; gap: var(--s2); height: var(--ctl-h); width: 360px; max-width: 40vw; padding: 0 var(--s3); background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--muted); margin: 0; }
.search input { flex: 1; min-width: 0; border: 0 !important; background: none !important; color: var(--fg); font: inherit; outline: none; height: auto !important; padding: 0 !important; box-shadow: none !important; }
.search kbd { font: 500 12.5px var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; background: var(--limit-soft); color: var(--limit); }
.chip b { font-family: var(--mono); font-weight: 600; }
.chip.ok { background: var(--card-2); color: var(--muted); }
.chip.ok b { color: var(--fg); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.imp { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s5); background: var(--limit-soft); color: var(--limit); font-size: var(--fs-sm); border-bottom: 1px solid var(--line); }
.imp form { margin: 0 0 0 auto; }
.wrap { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s5); width: 100%; max-width: 1400px; }
.wrap > * { margin-top: 0; margin-bottom: 0; }

/* Cabeçalho da página */
.hd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.hd .sub { color: var(--muted); margin: 4px 0 0; font-size: var(--fs-sm); }
.hd form { margin: 0; }
.crumb { margin: 0 0 calc(-1 * var(--s3)); font-size: var(--fs-sm); }
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); justify-content: space-between; margin-bottom: var(--s3); }

/* Cartões */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s5); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card > header, .card-h { display: flex; align-items: center; gap: var(--s3); justify-content: space-between; padding: var(--s4) var(--s5); margin: calc(-1 * var(--s5)) calc(-1 * var(--s5)) var(--s4); border-bottom: 1px solid var(--line); }
.card.flush > header { margin: 0; }
.card-h b { font-size: var(--fs-lg); font-weight: 600; }
.card > .body { padding: 0; }
.card > .table-wrap { margin: 0 calc(-1 * var(--s5)) calc(-1 * var(--s5)); }
.card.flush > .table-wrap { margin: 0; }
.card.narrow { max-width: 640px; }
.card h1 + p, .card h1 { margin-bottom: var(--s3); }
.card h2 { margin-bottom: 0; }
.card > h2 { margin-bottom: var(--s3); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s5); }

/* Números */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s4); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s1); color: var(--fg); text-decoration: none !important; }
a.stat:hover { border-color: var(--primary); }
.stat .label, .stat > span:first-child { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat .value, .stat > b { font: 700 var(--fs-2xl)/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat .delta { font-size: var(--fs-xs); color: var(--muted); }
.stat .delta.up { color: var(--ok); } .stat .delta.down { color: var(--bad); }
.stat .warn { color: var(--warn); }
.stat.hl { background: linear-gradient(160deg, var(--primary-soft), var(--card) 70%); }

/* Gráfico de barras (acessos por hora) */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-bottom: 20px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.bar i { display: block; background: var(--primary); border-radius: 3px 3px 0 0; opacity: .85; min-height: 2px; }
.bar:hover i { opacity: 1; }
.bar span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font: 500 12.5px var(--mono); color: var(--muted); }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--card-2); overflow: hidden; margin-top: var(--s3); }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th { text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); }
td { padding: 10px var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list td { white-space: nowrap; }
tbody tr:last-child td, table tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--card-2); }
tr.sel td { background: var(--primary-soft) !important; }
th.right, td.right { text-align: right; }
td.actions { text-align: right; }
td form.inline, .inline { display: inline-flex; gap: var(--s1); align-items: center; margin: 0; }
.ck { width: 36px; padding-right: 0; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; }
.tools .grow { flex: 1; min-width: 220px; }
.tools select { width: auto; min-width: 180px; }
.bulkbar { display: none; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); background: var(--primary-soft); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); margin: 0; }
.bulkbar.on { display: flex; }
.bulkbar > b { font-weight: 600; margin-right: var(--s2); }
.bulkbar select { height: 28px; width: auto; font-size: var(--fs-xs); }
.pager { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); font-size: var(--fs-sm); color: var(--muted); border-top: 1px solid var(--line); }
.pager span { margin-right: auto; }

/* Abas */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 var(--s4); color: var(--muted); font: 600 var(--fs-sm) var(--font); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { color: var(--fg); border-bottom-color: var(--primary); }
.tabs .n { font: 500 12.5px var(--mono); background: var(--card-2); color: var(--muted); padding: 1px 7px; border-radius: var(--r-pill); }

/* Selos de estado */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; white-space: nowrap; background: var(--card-2); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info, .pill.trial { background: var(--info-soft); color: var(--info); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card-2); color: var(--fg); font: 600 var(--fs-sm) var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background var(--t) var(--ease), border-color var(--t) var(--ease), opacity var(--t); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { background: var(--card-2); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.small { height: 28px; padding: 0 10px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn.block { width: 100%; height: 42px; }
.btn[disabled], .btn.loading { opacity: .6; cursor: not-allowed; }
.btn.loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row, .actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.btn-row form, .actions form { margin: 0; }
.actions.split { justify-content: space-between; border-top: 1px solid var(--line); padding-top: var(--s4); }

/* Formulários (aceita <div class="field"><label>…</label><input></div> e <label>Texto<input></label>) */
form { margin: 0; }
.form { display: flex; flex-direction: column; gap: var(--s4); }
.two, .three { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.form .two, .form .three { margin-bottom: 0; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field, .card form > label:not(.check), .two > label:not(.check), .three > label:not(.check) { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-bottom: var(--s4); }
.two > .field, .three > .field, .form .field, .two > label, .three > label { margin-bottom: 0; }
.field > label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.req { color: var(--bad); }
.hint { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; letter-spacing: 0; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
  height: var(--ctl-h); padding: 0 var(--s3); background: var(--card-2); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-md);
  font: 400 var(--fs-md) var(--font); width: 100%; transition: border-color var(--t); letter-spacing: 0; }
textarea { height: auto; min-height: 84px; padding: var(--s2) var(--s3); resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary) !important; outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
input.mono { font-family: var(--mono); letter-spacing: .04em; }
input.num { font-variant-numeric: tabular-nums; }
.check { display: flex !important; flex-direction: row !important; align-items: center; gap: var(--s2); font-size: var(--fs-sm) !important; color: var(--fg) !important; font-weight: 500 !important; cursor: pointer; margin: 0 0 var(--s4); }
.form .check { margin: 0; }
.note { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); font-size: var(--fs-sm); }
.form-foot { display: flex; justify-content: flex-end; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.seg.wide { display: flex; }
.seg label { flex: 1; margin: 0 !important; cursor: pointer; display: block !important; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; height: 28px; padding: 0 12px; border-radius: var(--r-sm); color: var(--muted); font: 600 var(--fs-xs) var(--font); white-space: nowrap; }
.seg input:checked + span { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); }
.list-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); margin-top: var(--s3); background: color-mix(in srgb, var(--card-2) 40%, transparent); }
.list-box .two { margin-bottom: 0; }
.list-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.split-form { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s5); align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.danger-zone { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--bad-soft); border-radius: var(--r-lg); }
.danger-zone > div { flex: 1; } .danger-zone p { margin: 2px 0 0; }

/* Avisos, vazio */
.flash { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--ok); font-size: var(--fs-sm); margin: 0; }
.flash.bad { border-left-color: var(--bad); }
.flash.warn { border-left-color: var(--warn); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: var(--s8) var(--s5); color: var(--muted); }
.empty h3, .empty > b { color: var(--fg); font-size: var(--fs-lg); font-weight: 600; }
.empty p { margin: 0 0 var(--s2); }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }

/* Páginas abertas (0.9.18): início, ativar TV, entrar. Mesma cara do app: preto, vermelho, Sora. */
body.pub { height: auto; min-height: 100%; display: flex; flex-direction: column; background: var(--bg); position: relative; z-index: 0; }
/* Brilho vermelho só no alto da página (no fundo do body ele se repetia a cada altura de tela). */
body.pub::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 760px; z-index: -1; pointer-events: none; background: radial-gradient(1100px 520px at 85% -10%, rgba(229,9,20,.18), transparent 60%); }
.pub-in { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.pub-top { position: sticky; top: 0; z-index: 30; background: rgba(10,10,12,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }
.pub-top .pub-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.pub-logo img { height: 28px; width: auto; display: block; }
.pub-nav { display: flex; gap: 22px; margin-left: auto; }
.pub-nav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.pub-nav a:hover { color: var(--fg); text-decoration: none; }
.pub-solo { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 48px 24px 64px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pub-solo > .card.narrow, .pub-solo > .solo-card { width: 100%; max-width: 440px; }
.pub-solo > .flash { width: 100%; max-width: 440px; }
.solo-card { padding: 36px 28px; }
.solo-card h1 { font-size: var(--fs-2xl); margin-bottom: var(--s2); }
.solo-card .form { margin-top: var(--s5); }
.eyebrow { font: 700 13.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin: 0 0 10px; }
.lead { font-size: 18px; color: #C9C9CF; line-height: 1.6; }
.btn.big { height: 50px; padding: 0 24px; font-size: 17px; border-radius: 12px; }
.btn svg, .dev-ic svg, .feat-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge-red { display: inline-block; background: var(--primary); color: #fff; font: 700 13.5px var(--font); letter-spacing: .04em; padding: 4px 10px; border-radius: var(--r-pill); margin-bottom: 12px; }

/* Início: destaque com a maquete da TV */
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero-in { display: flex; align-items: center; gap: 48px; }
.hero-txt { flex: 1 1 0; min-width: 0; }
.hero h1 { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.mock { position: relative; flex: 0 0 560px; height: 400px; }
.mock-tv { position: absolute; left: 0; top: 0; width: 520px; height: 312px; border-radius: 14px; padding: 10px; background: #1b1b1f; border: 1px solid #2c2c33; box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 120px rgba(229,9,20,.18); }
.mock-screen { width: 100%; height: 100%; border-radius: 6px; background: #0A0A0C; overflow: hidden; padding: 12px 16px; position: relative; }
.mock-top { display: flex; align-items: center; gap: 14px; font: 600 9px var(--font); color: #8a8a92; }
.mock-top img { height: 12px; margin-right: 8px; }
.mock-top .on { color: #fff; border-bottom: 2px solid var(--primary); padding-bottom: 2px; }
.mock-hero { margin-top: 12px; height: 128px; border-radius: 8px; padding: 18px; background: linear-gradient(90deg, rgba(10,10,12,.95) 0%, rgba(10,10,12,.5) 55%, rgba(10,10,12,0) 100%), linear-gradient(135deg, #5b0a10 0%, #1c1c40 60%, #0d3a4a 100%); }
.mock-hero b { display: block; width: 160px; height: 16px; border-radius: 4px; background: #f5f5f5; margin-bottom: 10px; }
.mock-hero em { display: block; width: 210px; height: 6px; border-radius: 3px; background: #6b6b74; margin-bottom: 6px; }
.mock-hero em.s { width: 150px; }
.mock-btn { display: inline-block; margin-top: 10px; background: var(--primary); color: #fff; font: 700 9px var(--font); padding: 5px 10px; border-radius: 4px; }
.mock-row { font: 600 9px var(--font); color: #c9c9cf; margin: 12px 0 6px; }
.mock-posters { display: flex; gap: 8px; }
.mock-posters i { flex: 1; height: 92px; border-radius: 5px; }
.mock-posters i:first-child { outline: 2px solid #fff; outline-offset: 1px; }
.p1 { background: linear-gradient(160deg, #7a1d24, #1c0b0e); } .p2 { background: linear-gradient(160deg, #1f4e79, #0b1522); }
.p3 { background: linear-gradient(160deg, #6b4a12, #1e1405); } .p4 { background: linear-gradient(160deg, #3d2a6b, #110b20); }
.p5 { background: linear-gradient(160deg, #135c4a, #061a15); } .p6 { background: linear-gradient(160deg, #6b1240, #1c0512); }
.mock-stand { position: absolute; left: 210px; top: 318px; width: 100px; height: 14px; border-radius: 0 0 8px 8px; background: #1b1b1f; }
.mock-phone { position: absolute; right: 0; top: 120px; width: 150px; height: 280px; border-radius: 24px; padding: 8px; background: #1b1b1f; border: 1px solid #2c2c33; box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.mock-phone-in { width: 100%; height: 100%; border-radius: 17px; background: #0A0A0C; padding: 14px 10px; position: relative; overflow: hidden; }
.mock-phone-in > img { height: 10px; display: block; margin-bottom: 10px; }
.mock-hero.sm { margin: 0 0 10px; height: 96px; padding: 10px; }
.mock-hero.sm b { width: 70px; height: 9px; }
.mock-posters.sm { gap: 5px; } .mock-posters.sm i { height: 62px; }
.mock-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; border-top: 1px solid #222; display: flex; justify-content: space-around; align-items: center; }
.mock-tabs i { width: 12px; height: 12px; border-radius: 3px; background: #3a3a42; } .mock-tabs i:first-child { background: var(--primary); }

/* Seções */
.sec { padding: 56px 0; }
.sec.alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,.02) 20%, rgba(255,255,255,.02) 80%, transparent); }
.sec h2 { font-size: 36px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 28px; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; }
.steps li { flex: 1 1 0; display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.steps li > b { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 16px var(--display); }
.steps h3 { font-size: 17px; margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }
.devs { display: flex; flex-wrap: wrap; gap: 18px; }
.dev { flex: 1 1 300px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: border-color var(--t), transform var(--t) var(--ease); }
.dev:hover { border-color: #3a3a42; transform: translateY(-2px); }
.dev-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.dev-ic svg { width: 22px; height: 22px; }
.dev h3 { font-size: 18px; margin-bottom: 6px; }
.dev p { color: var(--muted); flex: 1; }
.dev .btn { align-self: flex-start; }
.dev-note { align-self: flex-start; font-weight: 600; font-size: 13px; color: var(--fg); background: var(--card-2); border: 1px solid var(--line); padding: 7px 12px; border-radius: var(--r-md); }
.feats { display: flex; flex-wrap: wrap; gap: 18px; }
.feat { flex: 1 1 340px; display: flex; gap: 16px; padding: 6px 0; }
.feat-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); display: flex; align-items: center; justify-content: center; }
.feat-ic svg { width: 22px; height: 22px; }
.feat h3 { font-size: 17px; margin-bottom: 4px; }
.feat p { color: var(--muted); margin: 0; }
.notice { border: 1px solid var(--line); border-left: 4px solid var(--primary); background: var(--card); border-radius: 14px; padding: 22px 26px; }
.notice h3 { font-size: 18px; margin-bottom: 6px; }
.notice p { color: var(--muted); margin: 0; }
.band { display: flex; align-items: center; gap: 24px; justify-content: space-between; border-radius: 20px; padding: 36px 40px; background: linear-gradient(120deg, rgba(229,9,20,.22), rgba(229,9,20,.04) 60%), var(--card); border: 1px solid rgba(229,9,20,.35); }
.band h2 { margin-bottom: 8px; font-size: 28px; }
.band p { color: #C9C9CF; margin: 0; max-width: 620px; }

/* Ativar TV */
.act { width: 100%; display: flex; gap: 48px; align-items: flex-start; }
.act-txt { flex: 1 1 0; min-width: 0; padding-top: 8px; }
.act-txt h1 { font-size: 38px; line-height: 1.12; font-weight: 800; margin-bottom: 14px; }
.steps.mini { flex-direction: column; gap: 12px; margin: 26px 0 18px; }
.steps.mini li { padding: 16px 18px; }
.act-card { flex: 0 0 420px; padding: 28px; }
.act-card h2 { font-size: 23.5px; margin-bottom: 6px; }
.act-card form { margin-top: 18px; }
.act-card .small, .act-txt .small { font-size: 14.5px; }
.act-card.center { text-align: center; }
/* /minha-tv (0.9.36): um cartão só, centralizado; mais largo depois de entrar, para as listas. */
.act-one { justify-content: center; }
.act-one .act-card { flex: 0 1 460px; }
.act-one .act-card.wide { flex-basis: 860px; }
.act-one .card-h { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; }
.act-one .list-head { flex-wrap: wrap; gap: 8px; }
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }

/* Rodapé */
.pub-foot { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: auto; }
.pub-foot .pub-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.pub-foot-logo { height: 22px; width: auto; }
.pub-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.pub-foot nav a { color: var(--muted); font-size: 14px; }
.pub-foot nav a:hover { color: var(--fg); }
.pub-foot p { flex: 1 0 100%; color: #6e6e76; font-size: 12px; margin: 0; }

@media (max-width: 1060px) {
  .hero-in { flex-direction: column; align-items: flex-start; }
  .mock { flex-basis: auto; width: 560px; max-width: 100%; }
  .act { flex-direction: column; }
  .act-card { flex-basis: auto; width: 100%; }
}
@media (max-width: 760px) {
  .pub-nav { display: none; }
  .pub-top .btn { margin-left: auto; }
  .hero { padding: 40px 0 24px; }
  .hero h1 { font-size: 34px; }
  .lead { font-size: 16px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .mock { flex: none; width: 560px; max-width: none; height: 400px; transform: scale(.62); transform-origin: left top; margin-bottom: -152px; margin-right: -213px; }
  .sec { padding: 36px 0; }
  .sec h2 { font-size: 27.5px; margin-bottom: 20px; }
  .steps { flex-direction: column; }
  .band { flex-direction: column; align-items: flex-start; padding: 26px; }
  .act-txt h1 { font-size: 29.5px; }
  .pub-solo { padding: 28px 16px 48px; }
  .pub-in { padding: 0 16px; }
  .pub-foot nav { margin-left: 0; }
}

/* Telas antigas que ainda usam o padrão anterior (Listas, Acessos, Marca, Futebol, Conta) */
.wrap > p:first-child a { font-size: var(--fs-sm); }
.card table { margin-top: var(--s2); }
.card .search { width: 100%; max-width: none; }

/* Responsivo: lateral vira gaveta */
@media (max-width: 1100px) { .split-form, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 280px; max-width: 85vw; z-index: 40; transform: translateX(-100%); transition: transform var(--t) var(--ease); }
  .app.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax var(--overlay); }
  .top { padding: 0 var(--s4); }
  .top .menu-btn { display: inline-flex; }
  .top .search { flex: 1; width: auto; max-width: none; }
  .top .chip { display: none; }
  .wrap { padding: var(--s4); }
}
@media (max-width: 640px) {
  .two, .three { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd .btn { flex: 1; }
}
.card > .table-wrap table, .card.flush table { margin-top: 0; }
h1.mono { font-size: var(--fs-xl); }
td.actions > *, td.actions form { vertical-align: middle; }

/* v0.8.6: Provedor e DNS */
.provider-code { font-size: 36px; font-weight: 800; letter-spacing: .12em; margin: 4px 0 10px; color: var(--ink, inherit); }
tr.sub-row td { background: rgba(127,127,127,.06); }
.act-card form .btn.block { margin-bottom: 14px; }
.sec.tight { padding: 8px 0 24px; }
/* Celular: links do rodapé com área de toque maior (Privacidade, Termos, e-mail). */
@media (max-width: 760px) { .pub-foot nav { gap: 4px 8px; } .pub-foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; margin-left: -10px; } }

/* ==========================================================================
   Painel novo, etapa 1 (0.9.41): telas logadas com a cara da prévia aprovada pelo Meza (previa-visual-v3).
   Console de revenda de TV: menu fixo à esquerda, barra de comando no topo (buscar / ativar), fundo claro que segue
   o tema escuro do sistema. Uma família (Archivo) em larguras diferentes: títulos largos, números estreitos.
   Vermelho da marca = ação e alerta ("luz de no ar"); azul aço = o que está selecionado.
   Só vale com body.v3: as páginas abertas (início, /ativar, /minha-tv, entrar) continuam pretas como o app.
   ========================================================================== */
body.v3 {
  /* Novo visual (0.9.8x, aprovado pelo Meza em 13/10): as cores do app Max Pro (samsung-app/css/app.src.css), sempre
     escuro como o app. Vermelho só na marca e no botão principal; cada informação tem a sua cor (sistema-visual.md). */
  --bg: #0A0A0C; --surface: #0F0F12; --card: #141416; --card-2: #1B1B1F; --line: #26262C; --fg: #F4F3F1; --muted: #9897A1;
  --side-bg: #060607;
  --primary: #E50914; --primary-hi: #FF1F2B; --primary-fg: #ffffff; --primary-soft: rgba(229, 9, 20, .12); --link: #7DB2FF;
  --red-ink: #FF4D57; --steel: #7DB2FF; --steel-wash: rgba(125, 178, 255, .10);
  --ok: #3DD68C; --ok-soft: rgba(61, 214, 140, .12); --warn: #FF9F43; --warn-soft: rgba(255, 159, 67, .13);
  --bad: #FF5468; --bad-soft: rgba(255, 84, 104, .13); --info: #7CC4FF; --info-soft: rgba(124, 196, 255, .12);
  --limit: #F5B83D; --limit-soft: rgba(245, 184, 61, .13);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -18px rgba(0, 0, 0, .8); --overlay: rgba(0, 0, 0, .6);
  --bezel: #05070c; --tvscreen: #0b0b0e; --tvink: #F4F3F1;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "Sora", "Figtree", system-ui, sans-serif;
  --mono: "Figtree", system-ui, sans-serif;
  --r-sm: 8px; --r-md: 10px; --r-lg: 16px; --side-w: 268px; --top-h: 72px; --ctl-h: 44px;
  color-scheme: dark;
  font: 400 17px/1.5 var(--font);
}
body.v3 :focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
body.v3 .num, body.v3 .stat .value, body.v3 .nav a .cnt { font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 80; }
body.v3 .mono, body.v3 code { font-family: var(--mono); font-weight: 500; font-size: .92em; letter-spacing: .01em; }
body.v3 svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Títulos: largos e pesados; o resto em largura normal. */
body.v3 h1 { font-size: 29.5px; font-weight: 750; font-variation-settings: "wdth" 118; letter-spacing: -.015em; line-height: 1.15; text-wrap: balance; }
body.v3 h1.mono { font-family: var(--mono); font-size: 25.5px; font-weight: 700; font-variation-settings: normal; letter-spacing: .02em; }
body.v3 h2 { font-size: 19px; font-weight: 700; font-variation-settings: "wdth" 110; letter-spacing: -.005em; }
body.v3 .hd .sub { font-size: 16px; margin-top: 6px; max-width: 70ch; }
body.v3 .crumb { margin: 0 0 -10px; font-size: 15px; color: var(--muted); }
body.v3 a { color: var(--link); }

/* Menu */
body.v3 .side { width: var(--side-w); background: var(--surface); }
body.v3 .side .brand { height: auto; padding: 18px 20px 16px; text-decoration: none; color: var(--fg); }
body.v3 .side .brand .mark { font-weight: 800; font-size: 22.5px; font-variation-settings: "wdth" 125; letter-spacing: -.01em; }
body.v3 .side .brand .mark b { color: var(--primary); }
body.v3 .side .brand small { font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 500; }
body.v3 .nav { padding: 12px 10px; gap: 1px; }
body.v3 .nav .grp { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; padding: 16px 12px 4px; }
body.v3 .nav a { height: auto; padding: 8px 12px; gap: 11px; color: var(--fg); font-size: 16px; font-weight: 500; }
body.v3 .nav a:hover { background: var(--card-2); text-decoration: none; }
body.v3 .nav a.on { background: var(--steel-wash); color: var(--steel); font-weight: 600; box-shadow: none; }
body.v3 .nav a .cnt { font: 500 14px var(--font); color: var(--muted); }
body.v3 .nav a.on .cnt { color: var(--steel); }
body.v3 .nav a .cnt.alert { background: var(--primary); color: var(--primary-fg); padding: 0 7px; border-radius: 999px; font-weight: 700; }
body.v3 .side .me { padding: 14px 20px; font-size: 15.5px; }
body.v3 .side .me .av { width: 34px; height: 34px; background: var(--primary-soft); color: var(--red-ink); font-size: 14.5px; }
body.v3 .side .me .me-t span { font-size: 14px; }

/* Barra do topo: busca e Ativar cliente em todas as telas. */
body.v3 .top { height: auto; min-height: var(--top-h); padding: 12px 32px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.v3 .top .search { flex: 1; width: auto; max-width: 520px; height: 42px; background: var(--surface); border-color: var(--line); border-radius: 10px; }
body.v3 .top .search:focus-within { border-color: var(--steel); }
body.v3 .top .search input { font-size: 17px; }
body.v3 .top .search kbd { font: 500 13px var(--mono); }
body.v3 .top .act-btn { height: 42px; padding: 0 16px; font-size: 16px; }
body.v3 .imp { padding: 10px 32px; }
body.v3 .wrap { padding: 28px 36px 64px; gap: 24px; max-width: 1840px; }
/* O fundo do menu desce até o fim de páginas longas (o menu em si fica preso no alto). */
@media (min-width: 901px) { body.v3 .app { background: linear-gradient(90deg, var(--surface) calc(var(--side-w) - 1px), var(--line) calc(var(--side-w) - 1px), var(--line) var(--side-w), transparent var(--side-w)); } }

/* Peças comuns, recoloridas */
body.v3 .card { border-radius: var(--r-lg); box-shadow: none; }
body.v3 .card > header, body.v3 .card-h { padding: 16px 20px; }
body.v3 .card > header h2 { margin: 0; }
body.v3 .stat { border-radius: var(--r-lg); }
body.v3 .stat .label, body.v3 .stat > span:first-child { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; }
body.v3 .stat .value { font: 700 34px/1.1 var(--font); }
body.v3 a.stat:hover { border-color: var(--steel); }
body.v3 a.stat { color: var(--fg); }
body.v3 .card:not(.flush) > header + .table-wrap { margin-top: -16px; }
body.v3 .stat.hl { background: var(--card); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
body.v3 th { text-transform: none; letter-spacing: 0; font-size: 14.5px; color: var(--muted); background: var(--card-2); padding: 10px 16px; }
body.v3 td { padding: 12px 16px; }
body.v3 tbody tr:hover td { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
body.v3 tr.sel td { background: var(--steel-wash) !important; }
body.v3 .bulkbar { background: var(--steel-wash); }
body.v3 input[type="checkbox"], body.v3 input[type="radio"] { accent-color: var(--steel); }
body.v3 .tabs a { font-size: 15.5px; }
body.v3 .tabs .n { font: 500 13.5px var(--font); font-variant-numeric: tabular-nums; }
body.v3 .btn { font: 600 15.5px var(--font); border-radius: var(--r-sm); background: var(--surface); }
body.v3 .btn.small { font-size: 14.5px; }
body.v3 .btn.primary { background: var(--primary); color: var(--primary-fg); }
body.v3 .btn.ghost { background: transparent; border-color: transparent; color: var(--steel); }
body.v3 .btn.ghost:hover { background: var(--steel-wash); }
body.v3 .btn.danger, body.v3 .btn.ghost.danger { background: transparent; color: var(--bad); border-color: transparent; }
body.v3 .btn.danger:hover { background: var(--bad); color: #fff; }
body.v3 .btn.big { height: 48px; font-size: 18px; padding: 0 18px; }
body.v3 .btn[disabled] { opacity: .5; }
body.v3 .field, body.v3 .card form > label:not(.check), body.v3 .two > label:not(.check), body.v3 .three > label:not(.check), body.v3 .field > label { font-size: 15px; font-weight: 500; letter-spacing: 0; }
body.v3 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), body.v3 select, body.v3 textarea { background: var(--card-2); border: 1.5px solid var(--line); border-radius: var(--r-sm); font: 400 17px var(--font); color: var(--fg); }
body.v3 input:focus, body.v3 select:focus, body.v3 textarea:focus { border-color: var(--steel) !important; box-shadow: none; background: var(--surface); }
body.v3 input.mono { font-family: var(--mono); }
body.v3 .seg { background: var(--card-2); border-radius: 9px; }
body.v3 .seg span { font: 600 15px var(--font); height: 30px; }
body.v3 .seg input:checked + span { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px color-mix(in srgb, var(--fg) 14%, transparent); }
body.v3 .seg input:focus-visible + span { outline-color: var(--steel); }
body.v3 .list-box { background: var(--card-2); border-color: var(--line); }
body.v3 .note { background: var(--card-2); }
body.v3 .flash { border-radius: var(--r-md); font-size: 15.5px; }
body.v3 .flash.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
body.v3 .pill { font-size: 14px; }
body.v3 .chip { font-family: var(--font); }
body.v3 .meter { height: 6px; }
body.v3 .meter i { background: var(--steel); }
body.v3 .mini-h { font-size: 17px; font-weight: 700; margin: 18px 0 10px; }
body.v3 .opt { font-weight: 400; color: var(--muted); }
body.v3 .opt::before { content: "("; } body.v3 .opt::after { content: ")"; }
body.v3 .lbl-like { font-size: 15px; font-weight: 500; color: var(--muted); }
body.v3 .sub-row td { background: var(--card-2); }
body.v3 .pw-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
body.v3 .pw-row .field { margin: 0; flex: 1 1 200px; }

/* Minha conta > Links úteis */
body.v3 .links { display: flex; flex-direction: column; }
body.v3 .links a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--fg); text-decoration: none; }
body.v3 .links a:first-child { border-top: 0; }
body.v3 .links a:hover { background: var(--card-2); }
body.v3 .links a b { color: var(--steel); font-weight: 600; white-space: nowrap; }

/* Ativar cliente: três passos à esquerda; à direita, a TV do cliente e o resumo. */
body.v3 .av-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
body.v3 .av-steps { padding: 0; }
body.v3 .av-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 20px; }
body.v3 .av-step + .av-step { border-top: 1px solid var(--line); }
body.v3 .av-step h2 { margin-top: 3px; }
body.v3 .av-n { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 15.5px; color: var(--muted); }
body.v3 .av-p { margin: 2px 0 0; font-size: 15.5px; }
body.v3 .av-mac { display: flex; gap: 6px; align-items: center; margin-top: 14px; }
body.v3 .av-mac input { width: 56px !important; height: 58px !important; padding: 0 !important; text-align: center; font: 700 24.5px var(--mono) !important; text-transform: uppercase; border-radius: 10px !important; }
body.v3 .av-mac span { color: var(--muted); font: 500 22.5px var(--mono); }
body.v3 .av-fields { margin: 14px 0 0; }
body.v3 .av-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
body.v3 .av-way { position: relative; display: grid !important; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; margin: 0; color: var(--fg); }
body.v3 .av-way input { position: absolute; opacity: 0; pointer-events: none; }
body.v3 .av-way .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; }
body.v3 .av-way b { display: block; font-size: 17.5px; }
body.v3 .av-way .d { display: block; color: var(--muted); font-size: 15px; }
body.v3 .av-way em { display: block; font-style: normal; font-weight: 600; font-size: 15px; margin-top: 6px; }
body.v3 .av-way .why { display: block; color: var(--red-ink); font-size: 14.5px; margin-top: 6px; }
body.v3 .av-way.on, body.v3 .av-way:has(input:checked) { border-color: var(--steel); background: var(--steel-wash); }
body.v3 .av-way.on .dot, body.v3 .av-way:has(input:checked) .dot { border: 5px solid var(--steel); }
body.v3 .av-way:has(input:focus-visible) { outline: 2px solid var(--steel); outline-offset: 2px; }
body.v3 .av-way.off { cursor: not-allowed; background: var(--card-2); }
body.v3 .av-way.off b, body.v3 .av-way.off .d, body.v3 .av-way.off em { color: var(--muted); }
body.v3 .av-val { margin-top: 14px; }
body.v3 .av-val .seg { margin-top: 6px; max-width: 360px; }
body.v3 .av-step > div > .field + .field, body.v3 .av-step > div > .two + .field { margin-top: 14px; }
body.v3 .av-step .three, body.v3 .av-step .two { margin-bottom: 0; }
body.v3 .av-step .list-box .three { margin-bottom: 14px; }
body.v3 .av-step .two { margin: 14px 0 0; }
body.v3 .av-add { margin-top: 12px; }
body.v3 .av-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; }
body.v3 .av-sum .kv, body.v3 .av-done .kv { grid-template-columns: auto minmax(0, 1fr); gap: 9px 14px; font-size: 15.5px; }
body.v3 .av-sum .kv dd { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
body.v3 .av-done .kv { font-size: 17px; }
body.v3 .av-done .kv dd { font-weight: 600; overflow-wrap: anywhere; }
body.v3 .av-note { margin: 14px 0; border-radius: var(--r-sm); padding: 11px 13px; font-size: 15px; background: var(--warn-soft); color: var(--warn); }
body.v3 .av-note.bad { background: var(--bad-soft); color: var(--bad); }
body.v3 .av-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* A TV do cliente: a peça que marca a tela. */
body.v3 .tv { background: var(--bezel); border-radius: 14px; padding: 10px 10px 14px; box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--fg) 60%, transparent); }
body.v3 .tv-s { aspect-ratio: 16 / 9; border-radius: 6px; background: radial-gradient(120% 90% at 20% 10%, #1b2a4d 0%, var(--tvscreen) 60%); color: var(--tvink); position: relative; overflow: hidden; display: grid; place-items: center; text-align: center; padding: 14px; }
body.v3 .tv-lg { position: absolute; top: 10px; left: 12px; font-weight: 800; font-size: 13.5px; font-variation-settings: "wdth" 125; }
body.v3 .tv-lg b { color: #ff3b48; }
body.v3 .tv-k, body.v3 .tv-w { font-size: 12.5px; opacity: .75; }
body.v3 .tv-m { font: 700 19px var(--mono); letter-spacing: .03em; margin: 2px 0 6px; }
body.v3 .tv-ok { font-weight: 750; font-size: 22.5px; font-variation-settings: "wdth" 118; }
body.v3 .tv-ok i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #3fcf98; margin-right: 8px; box-shadow: 0 0 12px #3fcf98; }
body.v3 .tv-foot { display: flex; justify-content: center; margin-top: 8px; }
body.v3 .tv-foot i { width: 50px; height: 3px; border-radius: 2px; background: #2a3141; }
body.v3 .tv-cap { font-size: 14px; color: var(--muted); text-align: center; margin: 8px 0 0; }
@keyframes tvOn { 0% { filter: brightness(2.2) saturate(0); } 100% { filter: none; } }
body.v3 .tv-s.flash { animation: tvOn .5s ease-out; }

@media (max-width: 1100px) { body.v3 .av-grid { grid-template-columns: minmax(0, 1fr); } body.v3 .av-side { position: static; } }
@media (max-width: 900px) {
  body.v3 .side { width: 280px; }
  body.v3 .top { padding: 10px 16px; gap: 8px; position: static; }
  body.v3 .top .search { max-width: none; }
  body.v3 .top .sp { display: none; }
  body.v3 .imp { padding: 8px 16px; flex-wrap: wrap; }
  body.v3 .wrap { padding: 20px 16px 56px; }
  body.v3 h1 { font-size: 25.5px; }
}
@media (max-width: 560px) {
  body.v3 .top .act-btn span, body.v3 .top .search kbd { display: none; }
  body.v3 .top .act-btn { width: 42px; padding: 0; }
  body.v3 .av-step { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px; }
  body.v3 .av-mac { gap: 2px; }
  body.v3 .av-mac input { width: 40px !important; height: 48px !important; font-size: 19px !important; border-radius: 8px !important; }
  body.v3 .av-mac span { font-size: 15.5px; }
  body.v3 .hd .btn { flex: 0 1 auto; }
}
@media (prefers-reduced-motion: reduce) { body.v3 .tv-s.flash { animation: none; } }
/* .actions é flex para as barras de botões; numa célula de tabela ela tem de continuar célula. */
body.v3 td.actions { display: table-cell; margin-top: 0; white-space: nowrap; }
body.v3 td.actions > form, body.v3 td.actions > a, body.v3 td.actions > button { display: inline-block; margin-left: var(--s2); }

/* Apps para os clientes (Início e Minha conta) e código de provedor no topo (0.9.43). */
.apps-card .body { display: grid; gap: 8px; }
.app-link { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 8px; align-items: center; }
.app-link .app-l { font-weight: 600; font-size: var(--fs-sm); }
.app-link input { width: 100%; min-width: 0; }
.prov-chip { border: 0; cursor: pointer; font: inherit; font-size: var(--fs-xs); font-weight: 600; }
@media (max-width: 640px) { .app-link { grid-template-columns: 1fr auto; } .app-link .app-l { grid-column: 1 / -1; } }

/* Financeiro (painel novo, etapa 2, Meza 11/10): seletor de mês, filtros, barra de conta em aberto, janelinhas
   (Colocar créditos, Recebi, Estornar) e comprovante. Mesmas cores e cantos da prévia aprovada. */
body.v3 .month { display: inline-flex; align-items: center; gap: 6px; }
body.v3 .month b { min-width: 9.5em; text-align: center; font-variant-numeric: tabular-nums; }
body.v3 .month [aria-disabled="true"] { opacity: .4; pointer-events: none; }
body.v3 .month .btn { min-width: 34px; justify-content: center; font-size: 20px; line-height: 1; }
/* Botões da Cobrança (Recebi, Copiar cobrança, Bloquear) quebram linha em vez de sair da tabela. */
body.v3 td.actions.fa { white-space: normal; min-width: 13em; }
body.v3 td.actions.fa > * { margin: 2px 0 2px var(--s2); }
body.v3 .tools.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
body.v3 .hd .chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
body.v3 a.chip { text-decoration: none; }
body.v3 .chip.on { background: var(--steel-wash, var(--info-soft)); color: var(--steel, var(--info)); }
body.v3 .chip.on b { color: inherit; }
body.v3 .stats.money .stat .meter { margin-top: 6px; }
body.v3 .stat .delta.down { color: var(--bad); }
body.v3 .alertbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--bad);
  border-radius: var(--r-lg); background: var(--card); }
body.v3 .alertbar .sp { flex: 1; }
body.v3 .alertbar form.inline { display: inline; }
dialog.dlg { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); color: var(--fg); }
dialog.dlg::backdrop { background: var(--overlay); }
dialog.dlg form, body.v3 .card.narrow > form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
dialog.dlg header, body.v3 .card.narrow > form > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
dialog.dlg h2, body.v3 .card.narrow > form > header h2 { margin: 0; font-size: 20px; }
dialog.dlg .seg { align-self: flex-start; }
body.v3 .receipt { max-width: 460px; }
body.v3 .receipt .rh { padding: 16px 20px 0; font-weight: 700; letter-spacing: .02em; }
body.v3 .receipt .kv { padding: 0 20px 4px; }
body.v3 .receipt .btn-row { padding: 0 20px 20px; }
.sr-copy { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
body.v3 .stats.money .value { white-space: nowrap; }
body.v3 td.txt { white-space: normal; min-width: 16em; }
@media (max-width: 640px) { body.v3 .month b { min-width: 0; } body.v3 .alertbar .sp { display: none; } body.v3 .stats.money .value { font-size: 23.5px; } }

/* Painel v3, etapa 3: TVs do mesmo WhatsApp juntas em Clientes, e as páginas Termos de uso e Política de privacidade. */
table.list tr.kid td:nth-child(2) { padding-left: 34px; }
table.list tr.kid td:nth-child(2)::before { content: "\21B3"; color: var(--muted); margin: 0 6px 0 -18px; }
.pub-solo > .legal { width: 100%; max-width: 760px; padding: 28px 32px; line-height: 1.6; }
.legal h1 { margin: 0 0 8px; }
.legal h2 { font-size: 18px; margin: 24px 0 8px; }
.legal ul { padding-left: 20px; margin: 0 0 12px; }
@media (max-width: 560px) { .pub-solo > .legal { padding: 20px 16px; } }
.kv .provider-code { display: inline-block; font-size: 27.5px; margin: 0; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.kv:has(.provider-code) { align-items: center; margin-bottom: 14px; }

/* ==========================================================================
   0.9.56 (Meza 12/10 21:27): lista de Revendas em cartões, no estilo do Max+. À esquerda a logo, o nome, o provedor e as
   etiquetas; no meio os números grandes; à direita WhatsApp, Entrar, Editar e "…". No celular, os números descem para
   baixo do nome e os botões ficam embaixo.
   ========================================================================== */
.rv-list { display: flex; flex-direction: column; gap: 10px; }
.rv { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.rv:hover { border-color: color-mix(in srgb, var(--line), var(--fg) 18%); }
.rv-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rv-logo { width: 46px; height: 46px; flex: none; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 800; font-size: 17px; color: var(--muted); letter-spacing: .02em; }
.rv-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rv-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 18px; }
.rv-name a { color: var(--fg); }
.rv-prov { color: var(--muted); font-size: 14px; }
.rv-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.rv-nums { display: flex; gap: 6px; }
.rv-n { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 0 6px; }
.rv-n + .rv-n { border-left: 1px solid var(--line); }
.rv-n b { font-size: 23.5px; font-weight: 800; line-height: 1.1; }
.rv-n span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.rv-n.bad b { color: var(--bad); }
.rv-act { display: flex; align-items: center; gap: 6px; }
.rv-act form { margin: 0; }
.btn.wa, body.v3 .btn.wa { background: #1faa59; color: #fff; border-color: transparent; }
.btn.wa:hover { filter: brightness(1.08); }
.rv-more { position: relative; }
.rv-more > summary { list-style: none; min-width: 34px; }
.rv-more > summary::-webkit-details-marker { display: none; }
.rv-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.rv-menu form { margin: 0; display: block; }
.rv-menu a, .rv-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; color: var(--fg); font: 500 15.5px var(--font); cursor: pointer; text-decoration: none; }
.rv-menu a:hover, .rv-menu button:hover { background: var(--card-2); text-decoration: none; }
.rv-menu button.danger { color: var(--bad); }
.rv-filter { margin: 2px 0 4px; }
.chip.on { background: var(--steel-wash, var(--primary-soft)); color: var(--steel, var(--fg)); }
@media (max-width: 1180px) {
  .rv { grid-template-columns: minmax(0, 1fr) auto; }
  .rv-nums { grid-column: 1 / -1; order: 3; justify-content: flex-start; }
  .rv-n:first-child { padding-left: 0; align-items: flex-start; }
}
@media (max-width: 640px) {
  .rv { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rv-nums { order: 2; flex-wrap: wrap; }
  .rv-n { min-width: 0; flex: 1 1 22%; align-items: flex-start; }
  .rv-n b { font-size: 21.5px; }
  .rv-act { order: 3; flex-wrap: wrap; }
  .rv-act > * { flex: 1 1 auto; }
  .rv-more { flex: 0 0 auto; }
  .rv-mail { white-space: normal; overflow-wrap: anywhere; }
}

/* ==========================================================================
   0.9.72 (Meza 13/10 01:16 e 01:17): lista de Revendas em tabela, cada tipo de informação com a sua cor, sempre a mesma
   nas telas cheias: provedor = roxo (--prov), situação = verde/amarelo/vermelho (selo e faixa à esquerda da linha),
   créditos = amarelo, nome da revenda = texto normal (azul fica só para links e botões secundários). Linhas alternadas.
   No celular cada linha vira um cartão com as colunas em pares rótulo/valor.
   ========================================================================== */
body.v3 { --prov: #B69CFF; --prov-soft: rgba(182, 156, 255, .12); }
.rl-list { --rl-cols: minmax(0, 2.1fr) minmax(0, 1.5fr) minmax(0, 1.6fr) 100px 120px 176px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: visible; }
.rl-list.rl-hascred { --rl-cols: minmax(0, 2.1fr) minmax(0, 1.5fr) minmax(0, 1.6fr) 100px 88px 120px 176px; }
.rl { display: grid; grid-template-columns: var(--rl-cols); align-items: center; gap: 16px; padding: 12px 16px 12px 18px; position: relative; border-top: 1px solid var(--line); }
.rl::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ok); }
.rl.rl-warn::before { background: var(--warn); }
.rl.rl-bad::before { background: var(--bad); }
.rl:nth-child(odd):not(.rl-head) { background: color-mix(in srgb, var(--card-2) 55%, transparent); }
.rl:not(.rl-head):hover { background: var(--card-2); }
.rl-head { border-top: 0; padding-top: 10px; padding-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.rl-head::before { display: none; }
.rl-head > div:nth-child(n+4) { text-align: right; }
.rl-c { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rl-tvs, .rl-crd, .rl-bill { align-items: flex-end; text-align: right; }
.rl-who { flex-direction: row; align-items: center; gap: 12px; }
.rl-who .rv-logo { width: 40px; height: 40px; font-size: 14.5px; }
.rl-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rl-list a.rl-name, .rl-list a.rl-name:visited { color: var(--fg); text-decoration: none; font-weight: 700; font-size: 17.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-list a.rl-name:hover { color: var(--link); text-decoration: underline; }
.rl-mail, .rl-note { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-note { font-style: italic; }
.rl-rel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.rl-origin { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--fg); }
.rl-d1 .rl-who { padding-left: 22px; } .rl-d2 .rl-who { padding-left: 44px; } .rl-d3 .rl-who { padding-left: 66px; }
.rl-d1 .rl-who::before, .rl-d2 .rl-who::before, .rl-d3 .rl-who::before { content: "\21B3"; color: var(--muted); margin-right: -4px; }
.rl-provname { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--prov); background: var(--prov-soft); padding: 3px 10px; border-radius: 7px; font-size: 17.5px; font-weight: 700; border: 1px solid color-mix(in srgb, var(--prov) 35%, transparent); }
.rl-noprov { color: var(--warn); font-weight: 600; font-size: 15px; }
.rl-sub { color: var(--muted); font-size: 14px; line-height: 1.35; }
.rl-sub .mono { color: var(--fg); }
.rl-sub.bad { color: var(--bad); }
.rl-sit .pill { align-self: flex-start; }
.rl-big { font-size: 21.5px; font-weight: 800; line-height: 1.15; }
.rl-big.bad { color: var(--bad); }
.rl-cred { color: var(--limit); }
.rl-cred.bad { color: var(--bad); }
.rl-bar { display: block; width: 64px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 3px; }
.rl-bar i { display: block; height: 100%; background: var(--ok); }
.rl-bar.warn i { background: var(--warn); } .rl-bar.bad i { background: var(--bad); }
.rl-act { flex-direction: row; align-items: center; justify-content: flex-end; gap: 6px; }
.rl-act form { margin: 0; }
.rl-list > .rl:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
@media (max-width: 1180px) {
  .rl-list, .rl-list.rl-hascred { background: none; border: 0; display: flex; flex-direction: column; gap: 10px; }
  .rl-head { display: none; }
  .rl, .rl:nth-child(odd):not(.rl-head) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 14px 14px 18px; }
  .rl-who { grid-column: 1 / -1; }
  .rl-d1 .rl-who, .rl-d2 .rl-who, .rl-d3 .rl-who { padding-left: 0; }
  .rl-d1, .rl-d2, .rl-d3 { margin-left: 18px; }
  .rl-prov, .rl-sit { grid-column: span 2; }
  .rl-c[data-l]::before { content: attr(data-l); font-size: 13.5px; font-weight: 600; color: var(--muted); }
  .rl-tvs, .rl-crd, .rl-bill { align-items: flex-start; text-align: left; }
  .rl-act { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .rl, .rl:nth-child(odd):not(.rl-head) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
  .rl-prov, .rl-sit { grid-column: 1 / -1; }
  .rl-big { font-size: 19px; }
  .rl-act > form, .rl-act > a { flex: 1 1 auto; }
  .rl-act .btn { width: 100%; }
  .rl-d1, .rl-d2, .rl-d3 { margin-left: 10px; }
}

/* 0.9.72: tabelas cheias (Clientes, Créditos anuais e as outras listas): linhas alternadas para o olho seguir a linha,
   faixa da situação à esquerda na lista de Clientes, MAC em texto normal e "crédito anual" em amarelo. */
body.v3 table.list tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--card-2) 45%, transparent); }
body.v3 table.list tbody tr:hover td { background: var(--card-2); }
table.list tr[class*="st-"] > td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
table.list tr.st-warn > td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
table.list tr.st-bad > td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
table.list tr.st-info > td:first-child { box-shadow: inset 4px 0 0 var(--info); }
body.v3 a.tv-mac, body.v3 a.tv-mac:visited { color: var(--fg); font-weight: 600; }
body.v3 a.tv-mac:hover { color: var(--link); }
.tv-cred { color: var(--limit); font-weight: 600; }
@media (max-width: 640px) {
  table.list tr[class*="st-"] > td:first-child, table.list tr.st-warn > td:first-child, table.list tr.st-bad > td:first-child, table.list tr.st-info > td:first-child { box-shadow: none; }
  table.list tr[class*="st-"] { box-shadow: inset 4px 0 0 var(--ok); }
  table.list tr.st-warn { box-shadow: inset 4px 0 0 var(--warn); }
  table.list tr.st-bad { box-shadow: inset 4px 0 0 var(--bad); }
  table.list tr.st-info { box-shadow: inset 4px 0 0 var(--info); }
}

/* 0.9.72: busca em Créditos anuais. */
.cr-search { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.cr-none { padding: 12px 16px; margin: 0; }

/* 0.9.56: Migrar TVs (confirmação e lista de contas). */
.mig-confirm { border-color: var(--warn); }
.mig-list { margin: 0 0 var(--s3); padding-left: 18px; columns: 2 220px; font-size: 15.5px; }
.mig-list li { break-inside: avoid; }

/* 0.9.59: caixa "Precisa de você" no Início (auditoria, etapa 1). */
.card.todo { margin-bottom: 18px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.todo-list li:first-child { border-top: 0; }
.todo-list li b { font-size: 22.5px; text-align: right; }
.todo-list li.todo-bad b { color: var(--bad); }
.todo-list li.todo-warn b { color: var(--warn); }
.todo-list li.todo-info b { color: var(--steel, var(--primary)); }
.todo-ok { margin: 0; color: var(--ok); font-weight: 600; }
@media (max-width: 640px) { .todo-list li { grid-template-columns: 44px 1fr; padding: 12px 16px; } .todo-list li .btn { grid-column: 2; justify-self: start; } }

/* 0.9.60: Financeiro numa tela só (abas no topo das telas de dinheiro). */
.fin-crumb { margin-bottom: 4px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 12.5px; color: var(--muted); }
.fin-tabs { margin-bottom: 18px; }
.fin-tabs .n.bad { background: var(--bad); color: #fff; }
.chips.fin-per { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* 0.9.61 (auditoria, etapa 3): ficha da revenda. Topo com nome, situação, números e botões; no computador ele fica
   preso no alto ao rolar, junto com as abas. Sub-revendas recuadas debaixo da mãe na lista. */
.ficha-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.ficha-top h1 { margin: 0; font-size: 23.5px; line-height: 1.2; }
.ficha-top .sub { margin: 2px 0 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.ficha-top .rv-nums { grid-column: 1 / -1; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.ficha-top .rv-n:first-child { padding-left: 0; }
.ficha-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ficha-act form { margin: 0; }
.ficha-tabs { background: var(--bg); }
.ficha-dados { max-width: 860px; display: flex; flex-direction: column; gap: var(--s5); }
.card .pad { padding: 10px 16px; margin: 0; }
.rv-sub { margin-left: 28px; border-left: 3px solid var(--line); }
.rv-sub.rv-d2 { margin-left: 56px; }
.rv-sub.rv-d3 { margin-left: 84px; }
@media (min-width: 1181px) { .ficha-tabs { position: sticky; top: 0; z-index: 20; } }
@media (max-width: 760px) {
  .ficha-top { grid-template-columns: minmax(0, 1fr); }
  .ficha-top .rv-nums { order: 3; }
  .ficha-top .rv-n:first-child { align-items: flex-start; }
  .ficha-act { justify-content: flex-start; }
  .rv-sub, .rv-sub.rv-d2, .rv-sub.rv-d3 { margin-left: 14px; }
}
/* 0.9.61 (etapa 4): faixa "Na hora" da ficha da TV, separada do formulário que só vale com "Salvar alterações". */
.acts-now { padding: 12px 16px; }
.acts-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.acts-row form { margin: 0; }
.xfer > summary { list-style: none; cursor: pointer; }
.xfer > summary::-webkit-details-marker { display: none; }
.xfer[open] { flex-basis: 100%; }
.xfer-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px !important; }
.xfer-f input { max-width: 220px; }
.acts-t { margin-right: 6px; font-size: 14.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.acts-now p { margin: 8px 0 0; }

/* 0.9.63 (auditoria, etapa 5): no celular, cada linha de tabela vira um cartão. O admin.js copia o título de cada
   coluna para a célula (data-l), e aqui ele aparece à esquerda do valor. A primeira coluna vira o título do cartão,
   a caixa de marcar fica no canto e os botões (coluna sem título) ficam embaixo, inteiros. Nada some nem precisa arrastar. */
@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  table.list tbody tr:last-child { border-bottom: 0; }
  /* Bloco com o título flutuando à esquerda: o valor (mesmo com duas linhas, ex.: cliente e revenda) fica junto à direita. */
  body.v3 table.list td, table.list td { display: block; padding: 3px 0; border: 0; white-space: normal; text-align: right; background: none !important; overflow-wrap: anywhere; min-width: 0; }
  table.list td::after { content: ""; display: table; clear: both; }
  table.list td[data-l]::before { content: attr(data-l); float: left; max-width: 45%; margin-right: 12px; color: var(--muted); font-size: 14px; font-weight: 500; text-align: left; }
  body.v3 table.list td[data-first], table.list td[data-first] { text-align: left; font-weight: 600; font-size: 17px; padding-right: 36px; }
  table.list td[data-first]::before { display: none; }
  table.list td.ck { position: absolute; top: 14px; right: 16px; width: auto; padding: 0; }
  body.v3 table.list td:not([data-l]):not(.ck):not([data-first]) { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; text-align: left; }
  body.v3 table.list td.actions > * { margin: 0; }
  table.list td:empty { display: none; }
  table.list tr.kid { padding-left: 32px; }
  table.list tr.kid td:nth-child(2) { padding-left: 0; }
  table.list tr.kid td:nth-child(2)::before { margin: 0 6px 0 0; }
  /* Cabeçalho do quadro com botões (ex.: Histórico · Extrato do mês) quebra a linha em vez de sair da tela. */
  .card > header { flex-wrap: wrap; row-gap: 8px; }
  /* Abas com rolagem lateral: some a barra e um esmaecido à direita mostra que tem mais. */
  .tabs { scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 24px; }
  .tabs::-webkit-scrollbar { display: none; }
}
/* 0.9.65 (etapa 6): menu de 6 itens + Configurações; "Minha conta" no canto de baixo, junto do Sair. */
.nav-sep { border: 0; border-top: 1px solid var(--line); margin: 10px 12px; }
.me-link { font-size: 14px; }
/* 0.9.98: "Minhas contas" no menu do dono (atalho de entrar na outra conta). */
.alt-menu { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; }
.alt-menu form { margin: 0; }
.alt-menu button.me-link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-align: left; font: inherit; font-size: 14px; }
.alt-menu button.me-link:hover { text-decoration: underline; }
/* 0.9.66 (etapa 7): impressão e PDF só com o conteúdo (sem menu, topo, abas e botões). */
.pix-card textarea { width: 100%; font-size: 13.5px; word-break: break-all; resize: vertical; }
@media print {
  .side, .top, .tabs, .crumb, .no-print, .btn, .flash, .imp { display: none !important; }
  body, body.v3, .main, .wrap { background: #fff !important; color: #000 !important; }
  .app { display: block !important; }
  .card, .stat { border-color: #bbb !important; background: #fff !important; box-shadow: none !important; break-inside: avoid; }
  .pix-card textarea { border: 1px solid #bbb; height: auto; }
}
/* 0.9.67 (auditoria, etapa 8): sininho, primeiros passos, gráfico de 6 meses e perguntas comuns. */
.bell { position: relative; }
.bell > summary { list-style: none; position: relative; cursor: pointer; }
.bell > summary::-webkit-details-marker { display: none; }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 12.5px/18px var(--font); text-align: center; }
.bell-box { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(380px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(0,0,0,.2); padding: 12px; }
.bell-t { display: block; margin-bottom: 6px; }
.bell-box .todo-list { margin: 0; }
.steps-list { list-style: none; margin: 0; padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.steps-list li { display: flex; align-items: center; gap: 12px; }
.steps-list li > span:nth-child(2) { flex: 1; }
.steps-list li.done { opacity: .6; }
.step-n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14.5px; }
.steps-list li.done .step-n { background: var(--ok); color: #fff; border-color: transparent; }
.c6 { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding: 12px 16px 16px; }
.c6-b { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.c6-b i { display: block; width: 100%; max-width: 48px; background: var(--primary); border-radius: 6px 6px 0 0; }
.c6-v { font-size: 13.5px; font-weight: 700; }
.c6-l { font-size: 13.5px; color: var(--muted); }
.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }
/* 0.9.70: Ativação anual (só o MAC, 1 crédito). Saldo grande: agora → depois. */
body.v3 .an-card { padding: 26px 28px; }
body.v3 .an-card h2 { font-size: var(--fs-lg); }
body.v3 .an-mac { margin: 16px 0 22px; }
body.v3 .an-bal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
body.v3 .an-bal > div { display: flex; flex-direction: column; gap: 2px; }
body.v3 .an-bal span { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
body.v3 .an-bal b { font: 800 40px/1 var(--display); color: var(--fg); }
body.v3 .an-bal > div + i + div b { color: var(--steel); }
body.v3 .an-bal > div.bad b { color: var(--bad); }
body.v3 .an-bal i { font-style: normal; font-size: 27.5px; color: var(--muted); }
body.v3 .an-bal p { margin: 0; }
body.v3 .an-kv { grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; font-size: 15.5px; margin: 0 0 18px; }
body.v3 .an-kv dd { text-align: right; font-weight: 600; }
@media (max-width: 640px) { body.v3 .an-card { padding: 18px 16px; } body.v3 .an-bal b { font-size: 34px; } }
/* 0.9.70: Pedidos de cadastro em lista, com busca. Cada linha abre o formulário de aprovar. */
body.v3 .rq-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
body.v3 .rq-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
body.v3 .rq-stat span { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
body.v3 .rq-stat b { font: 800 27.5px/1.1 var(--display); }
body.v3 .rq-stat.warn b { color: var(--limit, #e3a008); }
body.v3 .rq-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
body.v3 .rq-search { flex: 1; display: flex; gap: 8px; max-width: 520px; }
body.v3 .rq-search input { flex: 1; }
body.v3 .rq-cols, body.v3 .rq-row { display: grid; grid-template-columns: 40px minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 118px; gap: 14px; align-items: center; }
body.v3 .rq-cols { padding: 10px 18px; font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; border-bottom: 1px solid var(--line); }
body.v3 .rq { border-bottom: 1px solid var(--line); }
body.v3 .rq:last-child { border-bottom: 0; }
body.v3 .rq-row { padding: 12px 18px; cursor: pointer; list-style: none; font-size: 15.5px; }
body.v3 .rq-row::-webkit-details-marker { display: none; }
body.v3 .rq-row:hover, body.v3 .rq[open] > .rq-row { background: var(--surface); }
body.v3 .rq-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--steel-wash); color: var(--steel); font: 700 14.5px var(--display); }
body.v3 .rq-who { display: flex; flex-direction: column; min-width: 0; }
body.v3 .rq-who b, body.v3 .rq-mail, body.v3 .rq-c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.v3 .rq-mail { color: var(--muted); font-size: 14.5px; }
body.v3 .rq-go { text-align: right; }
body.v3 .rq[open] .rq-btn { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
body.v3 .rq-body { padding: 4px 18px 20px 72px; background: var(--surface); }
body.v3 .rq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
body.v3 .rq-fixed { margin: 0; min-height: var(--ctl-h, 40px); display: flex; align-items: center; gap: 6px; font-weight: 600; }
body.v3 .rq-none { padding: 22px 18px; margin: 0; }
@media (max-width: 1100px) { body.v3 .rq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  body.v3 .rq-cols { display: none; }
  body.v3 .rq-row { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 6px; }
  body.v3 .rq-c { grid-column: 2 / 4; font-size: 14.5px; }
  body.v3 .rq-c::before { content: attr(data-l) ": "; color: var(--muted); }
  body.v3 .rq-go { grid-column: 3; grid-row: 1; }
  body.v3 .rq-body { padding: 4px 16px 18px; }
  body.v3 .rq-head { flex-direction: column; align-items: stretch; }
  body.v3 .rq-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  body.v3 .rq-stat { padding: 10px 12px; } body.v3 .rq-stat b { font-size: 22.5px; }
}
@media (max-width: 560px) { body.v3 .rq-grid { grid-template-columns: minmax(0, 1fr); } }
body.v3 .rq-when { white-space: normal; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
@media (max-width: 860px) { body.v3 .rq-when::before { margin-right: -2px; } }

/* 0.9.73: caixa "Cortesia" na janelinha Colocar créditos. */
.cf-gift { display: flex; gap: 8px; align-items: center; font-size: 15.5px; margin: 0; cursor: pointer; }
.cf-gift input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
[data-gift-why] { margin-top: 10px; }

/* ==========================================================================
   Novo visual (0.9.8x, Meza 13/10 02:43 "pode fazer, sem quebrar nada"). Prévia aprovada em painel-v3/novo-visual/.
   Parte 1: cores do app Max Pro, letras Sora/Figtree, menu, topo, peças comuns e a barra do celular. Só aparência:
   nenhuma tela perde botão, campo ou link. Vermelho = marca e botão principal; azul = links; cada informação tem a
   sua cor (situação verde/laranja/vermelho, teste azul-gelo, provedor violeta, créditos dourado).
   ========================================================================== */
body.v3 { background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
body.v3 h1 { font: 700 32px/1.15 var(--display); font-variation-settings: normal; letter-spacing: -.015em; }
body.v3 h2 { font-family: var(--display); font-weight: 600; font-variation-settings: normal; }
body.v3 .num, body.v3 .stat .value, body.v3 .nav a .cnt { font-variation-settings: normal; }
body.v3 .stat .value, body.v3 .rl-big, body.v3 .rv-n b { font-family: var(--display); }
/* MAC, códigos e chaves: Figtree com números do mesmo tamanho e um pouco de espaço entre as letras. */
body.v3 .mono, body.v3 code, body.v3 h1.mono { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
body.v3 :focus-visible { outline-color: var(--link); }

/* Menu: preto do app, logo da marca, item aberto com a faixa vermelha à esquerda. */
body.v3 .side { background: var(--side-bg); border-right-color: #1A1A1E; }
@media (min-width: 901px) { body.v3 .app { background: linear-gradient(90deg, var(--side-bg) calc(var(--side-w) - 1px), #1A1A1E calc(var(--side-w) - 1px), #1A1A1E var(--side-w), transparent var(--side-w)); } }
body.v3 .side .brand { height: var(--top-h); padding: 0 22px; border-bottom: 0; }
body.v3 .side .brand:hover { text-decoration: none; }
body.v3 .side .brand img { height: 22px; width: auto; max-width: 150px; object-fit: contain; }
body.v3 .side .brand small { color: #6E6D77; font-size: 13.5px; font-weight: 600; }
body.v3 .nav { padding: 10px 12px; gap: 2px; }
body.v3 .nav .grp { color: #6E6D77; }
body.v3 .nav a { position: relative; padding: 9px 12px; gap: 12px; border-radius: 10px; color: #A9A8B1; font-size: 16px; }
body.v3 .nav a:hover { background: rgba(255, 255, 255, .04); color: var(--fg); }
body.v3 .nav a.on { background: linear-gradient(90deg, rgba(229, 9, 20, .16), rgba(229, 9, 20, 0) 85%); color: #fff; font-weight: 600; }
body.v3 .nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
body.v3 .nav a.on svg.i { color: var(--primary-hi); }
body.v3 .nav a .cnt, body.v3 .nav a.on .cnt { color: #77767F; }
body.v3 .nav a .cnt.alert { min-width: 20px; height: 20px; line-height: 20px; text-align: center; background: var(--primary); color: #fff; }
body.v3 .nav-sep { border-top-color: #1C1C21; margin: 10px 4px; }
body.v3 .side .me { border-top-color: #1A1A1E; padding: 14px 16px; }
body.v3 .side .me .av { width: 36px; height: 36px; background: linear-gradient(135deg, #2C2C33, #1A1A1F); border: 1px solid #34343C; color: #fff; font-family: var(--display); }
body.v3 .side .me .me-t span { color: #77767F; }

/* Topo: busca, provedor (violeta, toque copia), sininho e o botão vermelho Ativar cliente. */
body.v3 .top { min-height: var(--top-h); background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--line); }
body.v3 .top .search { background: var(--card); border-radius: 12px; }
body.v3 .top .act-btn { box-shadow: 0 8px 22px -12px rgba(229, 9, 20, .9); }
body.v3 .top .icon-btn, body.v3 .bell > summary.icon-btn { width: 40px; height: 40px; border-radius: 10px; background: var(--card); color: #CFCED3; }
body.v3 .chip.prov-chip { height: 36px; border-radius: 10px; padding: 0 12px; background: var(--prov-soft); border: 1px solid rgba(182, 156, 255, .32); color: #CFCED3; }
body.v3 .chip.prov-chip b { color: var(--prov); font-weight: 700; }
body.v3 .bell-n { background: var(--primary); border: 2px solid var(--bg); top: -6px; right: -6px; }
body.v3 .bell-box, body.v3 .rv-menu { background: var(--card); border-color: #33333B; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
body.v3 .imp { background: var(--limit-soft); border-bottom: 1px solid rgba(245, 184, 61, .3); color: var(--fg); }

/* Peças comuns */
body.v3 .card, body.v3 .stat, body.v3 .rl-list, body.v3 .rv { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); }
body.v3 .card > header, body.v3 .card-h { border-bottom-color: var(--line); }
body.v3 th { background: var(--card-2); }
body.v3 .btn { height: 40px; border-radius: 10px; background: var(--card-2); border-color: #33333B; }
body.v3 .btn:hover { background: #232328; border-color: #44444C; }
body.v3 .btn.small { height: 32px; border-radius: 8px; }
body.v3 .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 22px -12px rgba(229, 9, 20, .9); }
body.v3 .btn.primary:hover { background: var(--primary-hi); filter: none; }
body.v3 .btn.ghost { background: transparent; border-color: transparent; color: var(--link); }
body.v3 .btn.ghost:hover { background: rgba(255, 255, 255, .04); }
body.v3 .btn.danger, body.v3 .btn.ghost.danger { background: transparent; border-color: rgba(255, 84, 104, .4); color: var(--bad); }
body.v3 .btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
body.v3 .btn.big { border-radius: 12px; }
body.v3 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), body.v3 select, body.v3 textarea { background: var(--card); border: 1px solid #33333B; border-radius: 10px; }
body.v3 input:focus, body.v3 select:focus, body.v3 textarea:focus { border-color: var(--link) !important; box-shadow: 0 0 0 3px rgba(125, 178, 255, .15) !important; background: var(--card); }
body.v3 input[type="checkbox"], body.v3 input[type="radio"] { accent-color: var(--primary); }
body.v3 .tabs { gap: 4px; }
body.v3 .tabs a { height: 44px; padding: 0 14px; position: relative; border-bottom: 0; margin-bottom: 0; font-size: 15.5px; }
body.v3 .tabs a { color: var(--muted); }
body.v3 .tabs a:hover { color: var(--fg); text-decoration: none; }
body.v3 .tabs a.on { color: var(--fg); }
body.v3 .tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--primary); }
body.v3 .pill { height: 24px; padding: 0 10px; border-radius: 12px; }
body.v3 .seg { background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; }
body.v3 .seg input:checked + span { background: #2A2A30; color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
body.v3 .note, body.v3 .list-box { background: var(--card-2); border-color: var(--line); }
body.v3 .meter i { background: var(--ok); }
body.v3 tr.sel td { background: var(--primary-soft) !important; }
body.v3 .bulkbar { background: var(--primary-soft); border-bottom-color: rgba(229, 9, 20, .25); }
body.v3 .c6-b i { background: color-mix(in srgb, var(--ok) 35%, var(--card-2)); }
body.v3 .c6-b:last-child i { background: var(--ok); }
body.v3 .step-n { font-family: var(--display); }
body.v3 .steps-list li.done .step-n { color: #06140C; }

/* Celular: barra fixa embaixo (Início, Clientes, Ativar no meio, Revendas, Mais). Some no computador e na impressão. */
.bbar { display: none; }
@media (max-width: 900px) {
  body.v3 .bbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(68px + env(safe-area-inset-bottom, 0px)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--side-bg) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid #1C1C21; }
  body.v3 .bbar a, body.v3 .bbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
    border: 0; background: none; padding: 0; color: #8E8D96; font: 600 12.5px var(--font); text-decoration: none; cursor: pointer; }
  body.v3 .bbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.v3 .bbar a.on { color: #fff; }
  body.v3 .bbar a.on svg.i { color: var(--primary-hi); }
  body.v3 .bbar .bbar-fab b { width: 50px; height: 50px; margin-top: -22px; border-radius: 16px; display: grid; place-items: center; background: var(--primary); color: #fff;
    box-shadow: 0 10px 24px -8px rgba(229, 9, 20, .9), 0 0 0 4px var(--bg); }
  body.v3 .bbar .bbar-fab svg.i { width: 22px; height: 22px; color: #fff; }
  body.v3 .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  /* O Ativar cliente do topo vira o botão do meio da barra de baixo. */
  body.v3 .top .act-btn { display: none; }
  body.v3 .side { background: var(--side-bg); }
}
@media print { .bbar { display: none !important; } }

/* Início: placar das TVs (a peça que marca o novo visual). Número grande em Sora e a barra dividida pela situação. */
body.v3 .placar { padding: 22px 24px 20px; margin-bottom: 4px; background: radial-gradient(700px 200px at 0% 0%, rgba(229, 9, 20, .07), transparent 70%), var(--card); }
.placar .pl-top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.placar .pl-main { display: flex; flex-direction: column; gap: 2px; }
.placar .label { color: var(--muted); font-size: 15px; font-weight: 600; }
.placar .pl-big { font: 700 64px/1 var(--display); letter-spacing: -.03em; margin: 6px 0 4px; }
.placar .pl-pct { margin-left: auto; padding: 4px 10px; border-radius: 8px; background: var(--fg); color: var(--bg); font: 700 14.5px var(--font); }
.placar .pl-bar { display: flex; gap: 3px; height: 10px; margin: 16px 0 18px; }
.placar .pl-bar i { display: block; min-width: 6px; border-radius: 5px; }
.placar .pl-bar i.ok { background: var(--ok); } .placar .pl-bar i.warn { background: var(--warn); }
.placar .pl-bar i.trial { background: var(--info); } .placar .pl-bar i.bad { background: var(--bad); }
.placar .pl-leg { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.placar .pl-leg-i { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 2px 12px; border-left: 3px solid var(--ok); color: var(--fg); text-decoration: none; border-radius: 0; }
.placar .pl-leg-i:hover { text-decoration: none; background: linear-gradient(90deg, rgba(255, 255, 255, .03), transparent); }
.placar .pl-leg-i.warn { border-left-color: var(--warn); } .placar .pl-leg-i.bad { border-left-color: var(--bad); } .placar .pl-leg-i.trial { border-left-color: var(--info); }
.placar .pl-leg-i b { font: 700 25.5px/1.15 var(--display); }
@media (max-width: 640px) {
  body.v3 .placar { padding: 18px 16px; }
  .placar .pl-big { font-size: 48px; }
  .placar .pl-leg { grid-template-columns: 1fr 1fr; }
}
/* Celular: tabelas simples (as que não viram cartão, ex.: Últimos cadastros do Início) rolam dentro do quadro, sem
   alargar a página. As tabelas .list continuam virando cartões (0.9.63). */
@media (max-width: 640px) { body.v3 .table-wrap { overflow-x: auto; } }
body.v3 .todo-list li b { font-family: var(--display); }
@media (max-width: 640px) { body.v3 .stat .value { font-size: 25.5px; } }

/* Novo visual, parte 2: Clientes e Revendas. Só CSS: as mesmas abas, filtros e botões, com a cor de cada situação. */
/* Abas de Clientes: a bolinha de cada aba é a mesma cor da faixa das linhas daquela situação. */
body.v3 .tabs a[href*="f=ativas"]::before, body.v3 .tabs a[href*="f=vencendo"]::before, body.v3 .tabs a[href*="f=vencidas"]::before,
body.v3 .tabs a[href*="f=lista"]::before, body.v3 .tabs a[href*="f=teste"]::before, body.v3 .tabs a[href*="f=bloqueadas"]::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
body.v3 .tabs a[href*="f=vencendo"]::before { background: var(--warn); }
body.v3 .tabs a[href*="f=vencidas"]::before, body.v3 .tabs a[href*="f=lista"]::before, body.v3 .tabs a[href*="f=bloqueadas"]::before { background: var(--bad); }
body.v3 .tabs a[href*="f=teste"]::before { background: var(--info); }
body.v3 .tabs .n { background: transparent; color: #6E6D77; padding: 0; font-weight: 600; }
body.v3 .tabs a.on .n { color: var(--muted); }
/* Filtros de Revendas (Todas, Do Max Pro, Max Ativador): pílulas com borda; a escolhida fica clara. */
body.v3 .rv-filter .chip { height: 34px; padding: 0 14px; border-radius: 17px; background: transparent; border: 1px solid #33333B; color: #CFCED3; font-size: 14.5px; }
body.v3 .rv-filter .chip b { color: inherit; }
body.v3 .rv-filter .chip.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
/* Revendas: "Entrar" deixa de ser vermelho (vermelho fica só no botão principal da tela, "+ Nova revenda"). */
body.v3 .rl-act .btn.primary { background: var(--card-2); border-color: #33333B; color: var(--fg); box-shadow: none; }
body.v3 .rl-act .btn.primary:hover { background: #232328; border-color: #44444C; }
body.v3 .rl-act .rv-more > summary.btn { color: var(--fg); font-size: 18px; letter-spacing: .05em; }
body.v3 .rl-head { background: var(--card-2); border-radius: var(--r-lg) var(--r-lg) 0 0; }

/* Novo visual, parte 3: acabamento das demais telas. Só CSS, nada muda em botão, campo ou link. */
/* Botão dentro da coluna de ações da tabela: o texto fica no meio do botão (antes subia para o topo). */
body.v3 td.actions > a.btn, body.v3 td.actions > button.btn { display: inline-flex; vertical-align: middle; }
body.v3 td.actions > form { vertical-align: middle; }
/* Respiro entre os dados (kv), o aviso e o formulário que vem embaixo, e entre dois formulários seguidos no mesmo quadro. */
body.v3 .card > .kv + .form, body.v3 .card > .kv + .flash, body.v3 .card > .form + .form, body.v3 .card > .form + p.muted { margin-top: 18px; }
/* Pedidos de cadastro e Ativação anual: rótulos em letra normal, como os quadros do Financeiro. */
body.v3 .rq-stat span, body.v3 .an-bal span { text-transform: none; letter-spacing: 0; font-size: 14.5px; font-weight: 500; }
body.v3 .rq-cols { text-transform: none; letter-spacing: 0; font-size: 14.5px; font-weight: 500; }
/* Saúde das listas: "Com problema"/"Todas" é filtro, não ação; o marcado fica claro, como nas Revendas. */
body.v3 a.btn.small.primary[href^="/saude?f="] { background: var(--fg); border-color: var(--fg); color: var(--bg); box-shadow: none; border-radius: 17px; }
body.v3 a.btn.small.ghost[href^="/saude?f="] { border-radius: 17px; }
/* Tabela que não é a última coisa do quadro (ex.: DNS com o formulário "Novo DNS" embaixo): sem a margem negativa de baixo, o formulário não encosta nela. */
body.v3 .card > .table-wrap:not(:last-child) { margin-bottom: 0; }

/* Cadastro pelo link: "Como quer trabalhar" (preferência, opcional). Três cartões de escolha; no celular, um embaixo do outro. */
.su-modes { border: 0; margin: 0; padding: 0; min-width: 0; }
.su-modes legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: var(--fs-sm); }
.su-modes-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.su-mode { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; }
.su-mode input { position: absolute; top: 12px; right: 12px; margin: 0; accent-color: var(--primary); }
.su-mode b { font-size: 16px; padding-right: 22px; }
.su-mode span { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.su-mode:has(input:checked) { border-color: var(--fg); }
.su-mode:has(input:focus-visible) { outline: 2px solid var(--link, #7DB2FF); outline-offset: 2px; }
.su-modes .hint { display: block; margin-top: 8px; }
@media (max-width: 640px) { .su-modes-g { grid-template-columns: 1fr; } }
/* Pedidos de cadastro: a preferência aparece em cima do formulário de aprovar. */
.rq-pref { margin: 0 0 12px; font-size: 15.5px; }
/* PDF por fatura: a fatura de um mês sozinha, pronta para "Salvar como PDF". Na impressão sai só o quadro, em branco. */
.fatura-pdf .fp-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.fatura-pdf .fp-head b { font-family: var(--display, inherit); font-size: 22.5px; }
.fatura-pdf .fp-head span { color: var(--muted); }
.fatura-pdf .kv { font-size: 17px; }
.fatura-pdf .fp-pix { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.fatura-pdf .fp-code { margin-top: 6px; font-size: 13.5px; overflow-wrap: anywhere; word-break: break-all; }
.fatura-pdf .fp-foot { margin: 16px 0 0; }
@media print {
  .fatura-pdf { max-width: none !important; border: 0 !important; padding: 0 !important; }
  .fatura-pdf .fp-head span, .fatura-pdf .kv dt, .fatura-pdf .muted { color: #444 !important; }
  .fatura-pdf .pill { border: 1px solid #999 !important; background: #fff !important; color: #000 !important; }
}

/* Logo maior no menu lateral (pedido do Meza, 13/10): era 22px, agora 46px. Só tamanho; nenhuma rota ou campo muda. */
body.v3 .side .brand { height: 84px; gap: 10px; }
body.v3 .side .brand img { height: 46px; max-width: 168px; }
body.v3 .side .brand small { flex: none; }

/* ==========================================================================
   0.9.118 (Meza 14/10, celular): nada mais fica escondido atrás da barra de baixo nem estoura a largura.
   ========================================================================== */
/* Janelas (Colocar créditos, Recebi): cabem na tela e rolam por dentro; o Confirmar sempre alcançável. */
dialog.dlg { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
/* Futebol: "Ver o automático" com classe própria (a .search é a busca do topo, limitada a 40% da tela). */
.fb-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0; }
.fb-pick label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 260px; min-width: 0; font-size: var(--fs-xs); font-weight: 600; }
.fb-pick select { width: 100%; max-width: 100%; }
table.fbmap textarea { min-width: 180px; }
@media (max-width: 900px) {
  /* Menu "…" das revendas: vira uma folha presa acima da barra de baixo, em qualquer cartão (antes o do último cartão
     abria para baixo e "Bloquear"/"Apagar" ficavam atrás da barra e do botão Ativar). */
  body.v3 .rv-menu { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 45;
    min-width: 0; max-height: 60vh; max-height: 60dvh; overflow-y: auto; padding: 8px; box-shadow: 0 -16px 48px rgba(0, 0, 0, .6); }
  body.v3 .rv-menu a, body.v3 .rv-menu button { padding: 13px 14px; font-size: 16.5px; }
  /* Gaveta acima do sininho e do menu "…". */
  .side { z-index: 50; }
  /* Clientes, ações em massa: a barra aparece presa acima da barra de baixo (quem marca no fim da lista também vê). */
  body.v3 .bulkbar.on { position: fixed; left: 8px; right: 8px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 35;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: color-mix(in srgb, var(--primary) 14%, var(--card));
    box-shadow: 0 -16px 48px rgba(0, 0, 0, .6); }
  body.v3:has(.bulkbar.on) .wrap { padding-bottom: calc(260px + env(safe-area-inset-bottom, 0px)); }
  .bulkbar .inline { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
  .bulkbar select { max-width: 100%; min-width: 0; }
  /* Botões pequenos com altura de dedo. */
  body.v3 .btn.small { height: 40px; min-width: 40px; }
}

/* 0.9.119 (Meza 14/10, vídeo do celular): o menu "…" das revendas era uma folha solta, a lista de trás continuava rolando
   e aceitando toque. Agora é janela de verdade: fundo escuro (o próprio botão "…" cobre a tela, então tocar fora fecha),
   a página de trás fica travada e o nome da revenda aparece no topo. Com a gaveta "Mais" aberta a página também trava. */
@media (max-width: 900px) {
  body.v3 .rv-more[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 44; background: var(--overlay); touch-action: none; cursor: default; }
  html:has(.rv-more[open]), html:has(.app.nav-open) { overflow: hidden; }
  body.v3 .rv-menu { overscroll-behavior: contain; }
  body.v3 .rv-menu[data-t]::before { content: attr(data-t); display: block; padding: 8px 14px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
    color: var(--muted); font: 600 13.5px var(--font); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* 0.9.121 (Meza 15/10): avisos e erros fáceis de ver. Sucesso verde, erro vermelho, os dois com fundo colorido, ícone e
   texto mais forte; o aviso do que acabou de acontecer pisca uma vez (admin.js leva a página até ele). */
body.v3 .flash { position: relative; padding: 14px 16px 14px 46px; line-height: 1.45; font-weight: 500; }
body.v3 .flash::before { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 800 14px/1 var(--font); color: #0A0A0C; }
body.v3 .flash.ok { background: color-mix(in srgb, var(--ok) 13%, var(--card)); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); border-left: 4px solid var(--ok); color: var(--fg); }
body.v3 .flash.ok::before { content: "\2713"; background: var(--ok); }
body.v3 .flash.bad { background: color-mix(in srgb, var(--bad) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); border-left: 4px solid var(--bad); color: var(--fg); font-weight: 600; }
body.v3 .flash.bad::before { content: "!"; background: var(--bad); color: #fff; }
body.v3 .flash.warn::before { content: "!"; background: var(--warn); }
body.v3 .flash:not(.ok):not(.bad):not(.warn) { padding-left: 16px; }
.flash[data-now]:focus { outline: none; }
.flash-pop { animation: flashPop 1s ease-out 1; }
@keyframes flashPop { 0% { transform: scale(.98); box-shadow: 0 0 0 0 color-mix(in srgb, var(--fg) 35%, transparent); } 60% { transform: none; box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .flash-pop { animation: none; } }
