/* Grinny Pay — estilo base (claro e escuro). Cores da marca vêm do marca.css (vermelho oficial #C51629). */
:root {
  --pink: var(--marca); --pink-link: var(--marca-texto); --black: #141414;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #F6F5F7; --border: #E2E0E6; --text: #141414; --muted: #55535C;
  --err-text: var(--erro-texto); --err-bg: var(--erro-fundo); --err-border: var(--erro-borda);
  --ok-text: var(--ok-texto); --ok-bg: var(--ok-fundo); --ok-border: var(--ok-borda);
  --page: #F4F4F6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E10; --surface: #18181B; --surface2: #222227; --border: #2A2A30; --text: #F4F3F6; --muted: #A9A7B0;
    --err-text: var(--erro-texto); --err-bg: var(--erro-fundo); --err-border: var(--erro-borda);
    --page: #0E0E10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0E10; --surface: #18181B; --surface2: #222227; --border: #2A2A30; --text: #F4F3F6; --muted: #A9A7B0;
  --err-text: var(--erro-texto); --err-bg: var(--erro-fundo); --err-border: var(--erro-borda);
  --page: #0E0E10;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: "DM Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: Poppins, sans-serif; line-height: 1.2; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
a { color: var(--pink-link); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Telas de entrada (login, cadastro, senha) ---------- */
.auth { display: flex; flex-wrap: wrap; min-height: 100vh; align-content: stretch; }
.auth-side { position: relative; overflow: hidden; flex: 1 1 440px; max-width: 100%; min-height: 100vh; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; color: #fff; background: var(--black); }
.auth-side::after { content: ""; position: absolute; right: -160px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--marca-rgb), .5), transparent 70%); pointer-events: none; }
.auth-side img { height: 38px; width: auto; align-self: flex-start; position: relative; }
.auth-side h2 { font-size: 34px; max-width: 420px; position: relative; }
.auth-side h2 em { font-style: normal; color: var(--marca-texto); }
.auth-side p { color: rgba(255, 255, 255, .65); max-width: 420px; margin: 12px 0 0; position: relative; }
.auth-side .foot { font-size: 13px; color: rgba(255, 255, 255, .45); position: relative; }
.auth-main { flex: 999 1 520px; min-width: 0; min-height: 100vh; padding: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; background: var(--bg); }
.auth-top { position: absolute; top: 20px; right: 24px; }
.form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.form.wide { max-width: 560px; }
.form header { display: flex; flex-direction: column; gap: 6px; }
/* Passos do cadastro: sem a borda/caixa padrão do navegador em volta de cada passo. */
.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
/* Cadastro concluído: ícone do e-mail e as dicas (cadastro-concluido.php) */
.cc-ic { width: 64px; height: 64px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--pink-link); background: color-mix(in srgb, var(--pink) 12%, transparent); }
.cc-dicas { list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-radius: 14px; font-size: 14px; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); }
.cc-dicas li { display: flex; gap: 10px; align-items: flex-start; }
.cc-dicas svg { flex: none; margin-top: 2px; color: var(--pink-link); }
.cc-reenviar { margin: 0; }
.cc-reenviar .btn { gap: 8px; }
/* Desafio anti-robô (Turnstile) no login e no cadastro: reserva a altura pra tela não pular quando ele aparece. */
.auth-desafio { min-height: 65px; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
/* Título "Crie sua conta em 4 passos." com respiro antes da lista, e os passos mais espaçados. */
.auth-side h2 + .steps { margin-top: 36px; }
.steps li { display: flex; gap: 14px; position: relative; padding-bottom: 30px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: rgba(255, 255, 255, .15); }
.steps .dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; border: 2px solid rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .6); }
.steps li.cur .dot { background: #fff; color: var(--marca); border-color: #fff; }
.steps li.done .dot { background: var(--pink); color: #fff; border-color: var(--pink); }
.steps b { display: block; font-size: 15px; color: rgba(255, 255, 255, .55); }
.steps li.cur b, .steps li.done b { color: #fff; }
.steps span { font-size: 13px; color: rgba(255, 255, 255, .55); }

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.field-head { display: flex; justify-content: space-between; align-items: center; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=url], input[type=search], input:not([type]), select {
  width: 100%; height: 48px; border-radius: 12px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface2); border: 1px solid var(--border);
}
input:focus, select:focus { outline: 2px solid var(--pink); outline-offset: 1px; }
.field.bad input, .field.bad select { border: 1.5px solid var(--pink); }
.field-err { color: var(--err-text); font-size: 13px; font-weight: 500; }
.pw { position: relative; display: flex; align-items: center; }
.pw input { padding-right: 52px; }
.eye { position: absolute; right: 4px; width: 44px; height: 44px; border-radius: 10px; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); }
.code { text-align: center; font-family: "DM Sans", system-ui, sans-serif; letter-spacing: .2em; font-size: 22px !important; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; height: 56px !important; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--pink); flex: none; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 12px; border: 0; font: inherit; font-family: Poppins, sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none !important; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: transparent; color: var(--err-text); border: 1px solid var(--err-border); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; font-size: 14px; padding: 0 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.linkbtn { border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; padding: 4px 0; color: var(--pink-link); }
.iconbtn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.row { display: flex; gap: 12px; align-items: center; }

/* ---------- Avisos ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.alert.erro { color: var(--err-text); background: var(--err-bg); border: 1px solid var(--err-border); }
.alert.ok { color: var(--ok-text); background: var(--ok-bg); border: 1px solid var(--ok-border); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); }

/* ---------- Avisos: um componente só, estilo clean (claro e escuro) ----------
   Erro, aviso, sucesso e informação (caixas, faixas do topo, mensagens de formulário) usam o mesmo
   visual: fundo da superfície, borda fina neutra, texto e ícone neutros. O tipo aparece só no desenho
   do ícone (Lucide). Nunca cor no fundo, nunca barra lateral. O checkout tem estilo próprio (fica de fora). */
:root {
  --av-bg: #F6F5F7; --av-borda: #E2E0E6; --av-texto: #141414; --av-icone: #55535C; --av-botao: #FFFFFF;
  --av-ic-aviso: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E");
  --av-ic-erro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  --av-ic-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  --av-ic-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] { --av-bg: #222227; --av-borda: rgba(255, 255, 255, .12); --av-texto: #F4F3F6; --av-icone: #C9C7CF; --av-botao: rgba(255, 255, 255, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --av-bg: #222227; --av-borda: rgba(255, 255, 255, .12); --av-texto: #F4F3F6; --av-icone: #C9C7CF; --av-botao: rgba(255, 255, 255, .06); } }
:root :is(.alert, .note, .gp-note, .gp-warn, .gp-erro, .gp-ok, .g-note, .g-error, .g-warn, .g-mtip, .gp-kbar, .gp-vercomo, .sg-fix, .sg-ex, .cf-kyc, .fin-caixa, .lp-aviso, .lp-info, .pc-nota):not(.co *) { color: var(--av-texto); background: var(--av-bg); border: 1px solid var(--av-borda); }
:root .gp-kbar:not(.co *) { border-width: 0 0 1px; }
:root :is(.alert, .note, .gp-note, .gp-warn, .gp-erro, .gp-ok, .g-note, .g-error, .g-warn, .g-mtip, .gp-kbar, .gp-vercomo, .sg-fix, .sg-ex, .lp-aviso, .lp-info, .pc-nota, .cf-kyc-ic):not(.co *) > svg { color: var(--av-icone); }
:root .field-err:not(.co *) { color: var(--av-texto); }
/* Ícone de quem ainda não tem um no HTML: o desenho diz o tipo, a cor é sempre a neutra. */
:root :is(.alert, .gp-note, .gp-warn, .gp-erro, .gp-ok, .g-note, .g-error, .g-warn, .field-err):not(.co *):not(:has(svg))::before { content: ""; display: inline-block; flex: none; width: 16px; height: 16px; margin-top: 2px; background: var(--av-icone); -webkit-mask: var(--av-ic, var(--av-ic-erro)) center / contain no-repeat; mask: var(--av-ic, var(--av-ic-erro)) center / contain no-repeat; }
:root :is(.g-note, .g-error, .g-warn, .field-err):not(.co *):not(:has(svg))::before { margin: 0 8px 0 0; vertical-align: -3px; }
:is(.gp-warn, .g-warn) { --av-ic: var(--av-ic-aviso); }
:is(.alert.ok, .gp-ok) { --av-ic: var(--av-ic-ok); }
:is(.gp-note, .g-note) { --av-ic: var(--av-ic-info); }
/* Aviso e nota em amarelo (pedido do dono, Issue #105): cinza igual ao resto não destacava. Erro e sucesso seguem neutros.
   Fica depois dos temas (painel/base.css redefine --av-bg no escuro), por isso vale direto na caixa. */
:root :is(.gp-warn, .g-warn, .gp-note, .g-note):not(.co *) { --av-bg: var(--aviso-fundo); --av-borda: var(--aviso-borda); --av-texto: var(--aviso-texto); --av-icone: var(--aviso-texto); }
/* Caixa sem ícone no HTML (texto corrido): o ícone desenhado não encosta no texto. */
:root :is(.gp-note, .gp-warn, .gp-erro, .gp-ok):not(.co *):not(:has(svg))::before { margin: 0 8px 0 0; vertical-align: -3px; }

/* Escolha PF/PJ e categorias */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice label { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; cursor: pointer; background: var(--surface2); border: 2px solid var(--border); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { border-color: var(--pink); background: var(--err-bg); }
.choice b { font-size: 15px; }
.choice span { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { height: 40px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 700; border: 1px solid var(--border); }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label:has(input:checked) { background: var(--pink); color: #fff; border-color: var(--pink); }
.chips label:has(input:focus-visible), .choice label:has(input:focus-visible), .drop:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }

.drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; cursor: pointer; background: var(--surface2); border: 2px dashed var(--border); }
.drop.has { border-style: solid; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--pink-link); border: 1px solid var(--border); }
.drop b { display: block; font-size: 14px; }
.drop span { font-size: 12px; color: var(--muted); }

.progress { height: 6px; border-radius: 999px; overflow: hidden; background: var(--surface2); }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--pink); }
/* Barra dos passos do cadastro: cresce com transform (o cadastro.js põe scaleX), não com width. */
.progress i[data-barra] { width: 100%; transform: scaleX(.25); transform-origin: left center; transition: transform .4s ease; }
@media (prefers-reduced-motion: reduce) { .progress i[data-barra] { transition: none; } }
.strength { display: flex; align-items: center; gap: 10px; }
.strength .bars { display: flex; gap: 4px; flex: 1; }
.strength .bars i { flex: 1; height: 5px; border-radius: 999px; background: var(--border); }
/* Força da senha (data-nivel do cadastro.js): texto com 4,5:1 no claro e no escuro; os tracinhos na mesma cor. */
.strength, .pw[data-nivel] { --forca: var(--err-text); }
.strength[data-nivel="2"], .pw[data-nivel="2"] { --forca: #8A5A00; }
.strength[data-nivel="3"], .strength[data-nivel="4"], .pw[data-nivel="3"], .pw[data-nivel="4"] { --forca: var(--ok-text); }
:root[data-theme="dark"] :is(.strength, .pw)[data-nivel="2"] { --forca: #FFD166; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.strength, .pw)[data-nivel="2"] { --forca: #FFD166; } }
.strength [data-forca-txt] { color: var(--forca); font-weight: 700; }
.strength .bars i.on { background: var(--forca); }

/* ---------- Painel ---------- */
.app { display: flex; min-height: 100vh; background: var(--page); }
.nav { flex: none; width: 250px; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.nav .logo { height: 32px; width: auto; margin: 4px 10px 20px; align-self: flex-start; }
.nav a, .nav span.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: none; }
.nav a:hover { background: var(--surface2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--err-bg); color: var(--pink-link); font-weight: 700; }
.nav span.item { opacity: .55; cursor: default; }
.nav .soon { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface2); }
.nav .bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.nav svg { flex: none; }
.main { flex: 1; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 32px; }
.kbar { margin: -28px -32px 0; padding: 12px 32px; display: flex; gap: 10px; align-items: center; background: var(--marca); color: var(--marca-sobre); font-size: 14px; font-weight: 500; }
.kbar b { font-weight: 700; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; max-width: 980px; }
.card + .card { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.ok { color: var(--ok-text); background: var(--ok-bg); }
.pill.wait { color: #8A5A00; background: #FFF6DD; }
.pill.bad { color: var(--err-text); background: var(--err-bg); }
.qr { background: #fff; padding: 10px; border-radius: 14px; border: 1px solid var(--border); width: max-content; }
.qr svg { display: block; width: 200px; height: 200px; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: .08em; padding: 10px 12px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--border); word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 16px; font-weight: 700; letter-spacing: .1em; }
.codes span { padding: 10px; text-align: center; border-radius: 10px; background: var(--surface2); border: 1px solid var(--border); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; align-items: start; }

.mtop { display: none; }
#navt { display: none; }
/* Login/cadastro empilhado e compacto (faixa do logo + formulário) sempre que as 2 colunas (440 + 520) não cabem lado a lado.
   Antes só valia até 760px: entre 761 e 959px cada parte tinha 1 tela inteira de altura e o formulário sumia lá embaixo. */
@media (max-width: 959px) {
  .auth { flex-direction: column; flex-wrap: nowrap; }
  .auth-side { min-height: 0; flex: none; padding: 14px 20px; }
  .auth-side > *:not(img) { display: none; }
  .auth-side::after { display: none; }
  .auth-main { min-height: 0; flex: 1 0 auto; padding: 20px 16px 40px; justify-content: flex-start; }
  /* Botão de tema sobe pra faixa escura do logo (antes ficava por cima do aviso verde/vermelho do topo). */
  .auth-top { top: -54px; right: 16px; z-index: 2; }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--border); }
  .mtop img { height: 30px; }
  .nav { display: none; }
  #navt:checked ~ .nav { display: flex; position: fixed; inset: 0; width: auto; height: auto; z-index: 80; }
  .nav .close { position: absolute; top: 16px; right: 16px; }
  .main { padding: 20px 16px 40px; }
  .kbar { margin: -20px -16px 0; padding: 12px 16px; }
  h1 { font-size: 24px; }
}
@media (min-width: 761px) { .nav .close { display: none; } }

/* Logo certo pra cada tema */
.logo-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none; } :root:not([data-theme="light"]) .logo-d { display: block; } }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }
.flashbox { margin-bottom: 18px; }
.linkbtn { white-space: nowrap; }

/* ---------- Checkout do comprador ---------- */
/* As cores vêm do vendedor (--pc principal, --bt botão, --co-bg fundo, --bar barra do topo); o resto segue o tema claro/escuro. */
.co { --pc: var(--marca); --pc-txt: #fff; --pc-ink: var(--pc); --bt: var(--pc); --bt-txt: #fff; --bar: #141414; --bar-txt: #fff;
  --co-page: #F4F4F6; --co-card: #FFFFFF; --co-border: #E2E0E6; --co-text: #141414; --co-muted: #55535C; --co-input: #F6F5F7;
  --co-tint: color-mix(in srgb, var(--pc) 7%, var(--co-card));
  min-height: 100vh; background: var(--co-bg, var(--co-page)); color: var(--co-text); color-scheme: light; }
.co.escuro { --co-page: #0E0E10; --co-card: #18181B; --co-border: #2A2A30; --co-text: #F4F3F6; --co-muted: #A9A7B0; --co-input: #222227;
  --co-tint: color-mix(in srgb, #FFFFFF 8%, var(--co-card)); color-scheme: dark; } /* cinza neutro: a cor de destaque não tinge o fundo no escuro */
.co .muted { color: var(--co-muted); }
.co-previa { position: sticky; top: 0; z-index: 30; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 8px 12px; font-size: 13px; font-weight: 700; background: #FFF6DD; color: #6B4600; }
.co-barra { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; padding: 10px 16px; text-align: center; font-size: 14px; font-weight: 700; background: var(--bar); color: var(--bar-txt); }
.co-cd { display: inline-flex; align-items: center; gap: 6px; font-family: Poppins, sans-serif; font-size: 16px; font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: 8px; background: rgba(255, 255, 255, .16); }
.co-banner-wrap { display: block; max-width: 1040px; margin: 24px auto 0; padding: 0 16px; }
.co-banner { display: block; width: 100%; height: auto; border-radius: 18px; }
/* Banner em vídeo (Issue #110): link direto (video) ou player incorporado (iframe criado pelo checkout.js depois do carregamento).
   A forma (4:1 no computador, 16:9 no celular), a altura e o ajuste saem do CheckoutVisual::estilo. O banner é só enfeite: nada de clique no player. */
.co-banner-video { background: #000; }
.co-banner-wrap[hidden] { display: none; }
.co-banner-embed { position: relative; overflow: hidden; background: #000; container-type: size; }
.co-banner-embed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: inherit; }
.co-banner-embed iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); transform: translate(-50%, -50%); border: 0; pointer-events: none; }
.co-wrap { max-width: 1040px; margin: 0 auto; padding: 28px 16px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "main resumo" "main extra"; grid-template-rows: auto 1fr; gap: 24px; align-items: start; }
.co-main { grid-area: main; min-width: 0; }
.co-resumo { grid-area: resumo; }
.co-extra { grid-area: extra; }
.co-card { background: var(--co-card); border: 1px solid var(--co-border); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.co-card h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.co-card h2 .n { width: 28px; height: 28px; border-radius: 50%; background: var(--pc); color: var(--pc-txt); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.co input[type=text], .co input[type=email], .co input[type=tel] { background: var(--co-input); border-color: var(--co-border); color: var(--co-text); }
.co input:focus { outline-color: var(--pc-ink); }
.co .btn-primary { background: var(--bt); color: var(--bt-txt); }
.co .btn-ghost { color: var(--co-text); border-color: var(--co-border); }
.co-pagar { height: 56px; font-size: 17px; }
.co-desafio { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--co-border); background: var(--co-input); }
.co-desafio-txt { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--co-text); }
.co-desafio-txt svg { color: var(--pc-ink); flex: none; }
.co-desafio .cf-turnstile { min-height: 65px; }
.co-seguro { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 12px; color: var(--co-muted); }
/* Aviso LGPD embaixo do botão (PUB-08) e "confira o recebedor" na página do Pix (PUB-12). */
.co-lgpd { margin: 0; font-size: 12px; line-height: 1.5; text-align: center; color: var(--co-muted); }
.co-lgpd a { color: inherit; text-decoration: underline; }
.co-recebedor { display: flex; gap: 6px; align-items: flex-start; justify-content: center; text-align: left; }
.co-recebedor svg { flex: none; margin-top: 2px; color: var(--pc-ink); }
.co-prod { display: flex; gap: 14px; align-items: center; }
.co-prod img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; background: var(--co-input); }
.co-prod .ph { width: 72px; height: 72px; border-radius: 12px; background: var(--co-input); flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--pc-ink); }
.co-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.co-total { display: flex; justify-content: space-between; font-family: Poppins, sans-serif; font-weight: 700; font-size: 20px; padding-top: 12px; border-top: 1px solid var(--co-border); }
.co-bump { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; border: 2px dashed var(--pc); background: var(--co-tint); cursor: pointer; }
.co-bump input { width: 22px; height: 22px; accent-color: var(--pc); flex: none; margin-top: 1px; }
.co-bump .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-ink); }
.co-bump s { opacity: .7; }
.co-pix { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--pc); background: var(--co-tint); }
.co-pix-ic { width: 40px; height: 40px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #32BCAD; background: rgba(50, 188, 173, .12); }
.co-pix-txt { flex: 1; min-width: 0; }
.co-pix-ok { flex: none; color: var(--pc-ink); }
.co-trust { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--co-muted); }
.co-trust > span { display: flex; gap: 8px; align-items: center; }
.co-trust svg { color: var(--pc-ink); }
.co.fundo-escuro .co-trust, .co.fundo-escuro .co-foot { color: rgba(255, 255, 255, .72); }
.co.fundo-escuro .co-trust svg { color: currentColor; }
.co.fundo-claro .co-trust, .co.fundo-claro .co-foot { color: #55535C; }
.co.fundo-escuro .co-foot .logo-l, .co.fundo-claro .co-foot .logo-d { display: none; }
.co.fundo-escuro .co-foot .logo-d, .co.fundo-claro .co-foot .logo-l { display: block; }
.co-lateral { display: block; width: 100%; height: auto; border-radius: 18px; }
.co-dep { margin: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--co-border); }
.co-deps h2 + .co-dep { padding-top: 0; border-top: 0; }
.co-dep-top { display: flex; gap: 10px; align-items: center; }
.co-dep-top img, .co-dep-ini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.co-dep-ini { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--co-tint); color: var(--pc-ink); }
.co-dep-top b { display: block; font-size: 14px; }
.co-dep blockquote { margin: 0; font-size: 14px; color: var(--co-muted); }
/* Vídeo do depoimento (Issue #110): botão de play; o player entra no lugar dele só depois do clique, com som. */
.co-dep-play { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--co-border); border-radius: var(--co-r, 10px); background: var(--co-tint); color: inherit; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.co-dep-play:hover { border-color: var(--co-muted); }
.co-dep-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--co-r, 10px); overflow: hidden; }
.co-dep-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Construtor: blocos de texto livre e perguntas frequentes. */
.co-texto { overflow-wrap: anywhere; } /* #224: palavra ou endereço sem espaço quebra dentro do cartão (título flex e parágrafo; anywhere, ao contrário de break-word, diminui a largura mínima do item flex) */
.co-texto p { margin: 0; font-size: 14px; color: var(--co-muted); }
/* Texto livre formatado (Issue #221): link, tamanhos do trecho (co-t-p/g/e) e alinhamento do bloco (co-texto-centro/dir/just). As classes só saem de listas fechadas do PHP (TextoFormatado). */
.co-texto p a { color: var(--pc-ink); text-decoration: underline; text-underline-offset: 2px; }
.co-texto .co-t-p { font-size: .85em; }
.co-texto .co-t-g { font-size: 1.3em; }
.co-texto .co-t-e { font-size: 1.7em; }
/* Cor do trecho (Issue #237): uma classe por cor da paleta fixa (TextoFormatado::CORES). O PHP só escreve a classe; o vendedor nunca manda CSS. */
.co-texto .co-c-111111 { color: #111111; }
.co-texto .co-c-6b7280 { color: #6b7280; }
.co-texto .co-c-9ca3af { color: #9ca3af; }
.co-texto .co-c-ffffff { color: #ffffff; }
.co-texto .co-c-e11d48 { color: #e11d48; }
.co-texto .co-c-b91c1c { color: #b91c1c; }
.co-texto .co-c-f97316 { color: #f97316; }
.co-texto .co-c-eab308 { color: #eab308; }
.co-texto .co-c-84cc16 { color: #84cc16; }
.co-texto .co-c-16a34a { color: #16a34a; }
.co-texto .co-c-166534 { color: #166534; }
.co-texto .co-c-0d9488 { color: #0d9488; }
.co-texto .co-c-0891b2 { color: #0891b2; }
.co-texto .co-c-2563eb { color: #2563eb; }
.co-texto .co-c-1e3a8a { color: #1e3a8a; }
.co-texto .co-c-4f46e5 { color: #4f46e5; }
.co-texto .co-c-7c3aed { color: #7c3aed; }
.co-texto .co-c-c026d3 { color: #c026d3; }
.co-texto .co-c-ec4899 { color: #ec4899; }
.co-texto .co-c-92400e { color: #92400e; }
.co-texto-centro p { text-align: center; } .co-texto-centro h2 { justify-content: center; }
.co-texto-dir p { text-align: right; } .co-texto-dir h2 { justify-content: flex-end; }
.co-texto-just p { text-align: justify; }
.co-faq-item { padding: 12px 0; border-top: 1px solid var(--co-border); }
.co-faq h2 + .co-faq-item { padding-top: 0; border-top: 0; }
.co-faq-item summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.co-faq-item p { margin: 8px 0 0; font-size: 14px; color: var(--co-muted); }
.estrelas { display: inline-flex; gap: 1px; color: #F5A400; }
.estrelas span { display: inline-flex; opacity: .3; }
.estrelas span.on { opacity: 1; }
.estrelas span.on path { fill: currentColor; }
/* Página do Pix: no computador o QR vem primeiro; no celular, o botão de copiar. */
.co-qr { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.co-qr .qr svg { width: 220px; height: 220px; }
.co-qrbox { order: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.co-copia { order: 2; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.co-copia input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; height: 44px; text-overflow: ellipsis; background: var(--co-input); border-color: var(--co-border); color: var(--co-muted); }
.co-copia .btn.copiado { background: #1FA35B; color: #fff; }
.co-passos { margin: 4px 0 0; padding-left: 22px; text-align: left; font-size: 14px; color: var(--co-muted); display: flex; flex-direction: column; gap: 4px; }
.co-wait { order: 3; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--co-muted); }
.co-qr .note { order: 4; }
.co-timer { font-size: 14px; font-weight: 700; color: var(--pc-ink); }
/* Página com um cartão só (não encontrado, acesso ao produto): centralizada. */
.co-wrap > :only-child { grid-column: 1 / -1; grid-row: 1 / -1; width: 100%; max-width: 560px; justify-self: center; }
.co-wait i { width: 10px; height: 10px; border-radius: 50%; background: #E8A400; animation: gpPulse 1.2s infinite; }
@keyframes gpPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.co-ok { width: 64px; height: 64px; border-radius: 50%; background: #1FA35B; color: #fff; display: inline-flex; align-items: center; justify-content: center; animation: gpPop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes gpPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.co-foot { text-align: center; font-size: 12px; color: #8A8891; padding-bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.co-foot img { height: 20px; }
.co .alert.erro { color: var(--erro-texto); background: var(--erro-fundo); border-color: var(--erro-borda); }
.co.escuro .alert.erro { color: var(--erro-texto); background: var(--erro-fundo); border-color: var(--erro-borda); }
.co .note { color: var(--co-muted); background: var(--co-input); border-color: var(--co-border); }
.co .field-err { color: var(--erro-texto); }
.co.escuro .field-err { color: var(--erro-texto); }
.so-celular { display: none; }
@media (max-width: 860px) {
  .co-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "resumo" "main" "extra"; grid-template-rows: none; gap: 16px; padding: 16px 12px 40px; }
  .co-wrap.co-pixpag { grid-template-areas: "main" "resumo"; }
  .co-card { padding: 20px 16px; border-radius: 16px; }
  .co-prod img, .co-prod .ph { width: 56px; height: 56px; }
}
@media (max-width: 640px) {
  .so-celular { display: block; }
  .co-banner-wrap { margin: 0; padding: 0; }
  .co-banner { border-radius: 0; }
  .co-copia { order: 1; }
  .co-qrbox { order: 2; }
  .co-qr .qr svg { width: 180px; height: 180px; }
  .co-qr h1 { font-size: 22px; }
}

/* Tabelas e filtros do painel */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 230px)); gap: 16px; align-items: end; }
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; max-width: 980px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.stat .ic { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--err-bg); color: var(--pink-link); }
.stat b { font-family: Poppins, sans-serif; font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); max-width: 980px; }
.tabs a { padding: 10px 14px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--pink-link); border-color: var(--pink); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox input { font-family: ui-monospace, Consolas, monospace; font-size: 13px !important; height: 40px !important; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.thumb { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; background: var(--surface2); border: 1px solid var(--border); }
.banner-prev { width: 100%; max-width: 600px; border-radius: 12px; border: 1px solid var(--border); }
input[type=color] { width: 60px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); padding: 4px; }
textarea { width: 100%; min-height: 110px; border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface2); border: 1px solid var(--border); resize: vertical; }
input[type=file] { font: inherit; font-size: 14px; color: var(--muted); }
dl.kv { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--border); }
.timeline li.done:not(:last-child)::before { background: var(--pink); }
.timeline .dot { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; background: var(--surface); }
.timeline li.done .dot { background: var(--pink); border-color: var(--pink); color: #fff; }
.neg { color: var(--err-text); } .pos { color: var(--ok-text); }

/* Dashboard e conquistas */
.chart { width: 100%; height: 200px; display: block; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); flex-wrap: wrap; }
.seg a { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg a:hover { text-decoration: none; }
.levels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.levels li { display: flex; gap: 16px; align-items: center; }
.levels li > .stack { flex: 1; gap: 8px; }
.plate { width: 64px; height: 64px; flex: none; }
.progress i.w0 { width: 0%; }
.progress i.w5 { width: 5%; }
.progress i.w10 { width: 10%; }
.progress i.w15 { width: 15%; }
.progress i.w20 { width: 20%; }
.progress i.w25 { width: 25%; }
.progress i.w30 { width: 30%; }
.progress i.w35 { width: 35%; }
.progress i.w40 { width: 40%; }
.progress i.w45 { width: 45%; }
.progress i.w50 { width: 50%; }
.progress i.w55 { width: 55%; }
.progress i.w60 { width: 60%; }
.progress i.w65 { width: 65%; }
.progress i.w70 { width: 70%; }
.progress i.w75 { width: 75%; }
.progress i.w80 { width: 80%; }
.progress i.w85 { width: 85%; }
.progress i.w90 { width: 90%; }
.progress i.w95 { width: 95%; }
.progress i.w100 { width: 100%; }
.admin-tag { align-self: flex-start; margin: -10px 10px 12px; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.docs figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.docs img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; border: 1px solid var(--border); background: var(--surface2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.actions form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; padding: 1px 6px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--border); } pre.secret { white-space: pre-wrap; margin: 0; }

/* Editor do checkout (painel): formulário + prévia ao vivo */
.editor { display: grid; grid-template-columns: minmax(0, 620px) 380px; gap: 24px; align-items: start; }
.editor-form .card { max-width: none; }
.previa-box { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; }
.previa-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.previa { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--surface2); }
.previa iframe { display: block; border: 0; width: 100%; height: min(720px, calc(100vh - 120px)); background: #fff; }
.previa.pc iframe { width: 1200px; height: 1500px; transform-origin: 0 0; }
.previa-vazia { max-width: 380px; }
.seg button { border: 0; background: transparent; font: inherit; padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.savebar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; padding: 12px 0; background: linear-gradient(to top, var(--page) 70%, transparent); }
.so-estreito { display: none !important; }
.dep-slot { border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); }
.dep-slot summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14px; list-style-position: inside; }
.dep-slot > .stack { padding: 0 14px 14px; }
.dep-slot .row { flex-wrap: wrap; align-items: flex-end; }
.dep-foto { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.banner-prev.lateral { max-width: 180px; }
input[type=color]:disabled { opacity: .4; }
body.sem-rolagem { overflow: hidden; }
@media (max-width: 1240px) {
  .editor { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
  .so-estreito { display: inline-flex !important; }
  .previa-box { display: none; }
  .previa-box.aberta { display: flex; position: fixed; inset: 0; z-index: 90; padding: 12px; background: var(--page); }
  .previa-box.aberta .previa { flex: 1; min-height: 0; }
  .previa-box.aberta .previa.cel { width: 100%; max-width: 420px; margin: 0 auto; }
  .previa-box.aberta .previa iframe { height: 100%; }
  .previa-box.aberta .previa.pc iframe { height: 1500px; }
}

/* ---------- Celular: revisão geral ---------- */
input[type=file] { max-width: 100%; }
.field input[type=file] { width: 100%; min-width: 0; }
.dep-slot .row > .field { flex: 1 1 200px; min-width: 0; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; font-size: 14px; height: 40px; padding: 0 14px; margin-right: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.tabbar { display: none; }
@media (max-width: 760px) {
  /* 16 px: abaixo disso o iPhone dá zoom sozinho ao tocar no campo. */
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=url], input[type=search], input:not([type]), select, textarea,
  .linkbox input, .co-copia input { font-size: 16px !important; }
  input.code { font-size: 22px !important; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .main { gap: 24px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filters .field > span:first-child:not(:only-child) { display: none; }
  .top > div { min-width: 0; }
  .top .actions, .top .row { flex-wrap: wrap; }
  label.check { min-height: 40px; align-items: center; }
  label.check input { margin: 0; }
  .linkbtn { padding: 10px 0; }
  .btn-sm { height: 42px; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg a, .seg button { padding: 10px 12px; white-space: nowrap; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; padding: 12px 14px; }
  .linkbox { flex-wrap: wrap; }
  .linkbox input { flex: 1 1 100%; }
  dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  dl.kv dd { margin-bottom: 10px; }
  .nav a, .nav span.item { padding: 12px; font-size: 15px; }
  .split { gap: 16px; }
  /* Barra de atalhos embaixo (como num app) */
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  .tabbar a, .tabbar label { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; cursor: pointer; }
  .tabbar .on { color: var(--pink-link); }
  .tabbar a:hover { text-decoration: none; }
  .savebar { bottom: calc(64px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  /* Números em 2 colunas: no celular a tela não some atrás dos cartões. */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px; gap: 6px; border-radius: 14px; }
  .stat .ic { width: 32px; height: 32px; border-radius: 10px; }
  .stat .ic svg { width: 18px; height: 18px; }
  .stat b { font-size: 18px; overflow-wrap: anywhere; }
  .stat span { font-size: 12px; }
  /* Tabelas viram cartões: cada linha mostra "rótulo · valor" (rótulos postos pelo tema.js). */
  .table-wrap { overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; margin-bottom: 10px; background: var(--surface); }
  .table td { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 9px 0; text-align: right; border-bottom: 1px solid var(--border); min-height: 40px; overflow-wrap: anywhere; }
  .table td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 6; text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; }
  .table td > * { grid-column: 2; justify-self: end; }
  .table td[data-label=""]::before { content: none; }
  .table td[data-label=""] { display: block; text-align: center; }
  .table tr td:last-child, .table tr:last-child td:last-child { border-bottom: 0; }
  .table tr:last-child td { border-bottom: 1px solid var(--border); }
  .table td.right { text-align: right; }
  .table td:first-child { display: block; text-align: left; font-weight: 700; }
  .table td:first-child::before { content: none; }
  .table td:first-child > *, .table td[data-label=""] > * { justify-self: auto; }
  .top > form.row { flex: 1 1 100%; }
  .card > .table-wrap, .card .table-wrap { margin: 0 -4px; }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
}

/* ===== Admin: menu em grupos, equipe e logs ===== */
.nav .grupo { padding: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.nav .admin-tag + .grupo { padding-top: 0; }
.trilha { display: block; margin-bottom: -10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pill.info { color: #1D4ED8; background: rgba(37, 99, 235, .12); }
.pill.neutro { color: var(--muted); background: var(--surface2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.info { color: #93B4FF; } }
:root[data-theme="dark"] .pill.info { color: #93B4FF; }
.table tr.apagado td { opacity: .55; }
.actions.fim { justify-content: flex-end; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.nowrap { white-space: nowrap; }
code.bloco { display: block; padding: 12px 14px; overflow-x: auto; white-space: nowrap; line-height: 1.5; }
.matriz .sim { color: var(--ok-text); display: inline-flex; }
.matriz .nao { color: var(--muted); }
.table td form.row select { min-width: 130px; }

/* ===== Admin: dashboard ===== */
.stat small { color: var(--muted); font-size: 12px; }
.ic.ok, .stat .ic.ok { background: var(--ok-bg); color: var(--ok-text); }
.ic.info, .stat .ic.info { background: rgba(37, 99, 235, .12); color: #2563EB; }
.ic.aviso, .stat .ic.aviso { background: #FFF6DD; color: #8A5A00; }
.ic.erro, .stat .ic.erro { background: var(--err-bg); color: var(--pink-link); }
.ic.neutro, .stat .ic.neutro { background: var(--surface2); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic.aviso { background: rgba(255, 196, 0, .14); color: #FFD166; } :root:not([data-theme="light"]) .ic.info { color: #93B4FF; } }
:root[data-theme="dark"] .ic.aviso { background: rgba(255, 196, 0, .14); color: #FFD166; }
:root[data-theme="dark"] .ic.info { color: #93B4FF; }
.filas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.filas li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.filas li > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.filas small { color: var(--muted); font-size: 12px; }
.filas .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
dl.kv.conta dd { text-align: right; font-weight: 700; }
dl.kv.conta dd.mais { color: var(--ok-text); }
dl.kv.conta .total { padding-top: 10px; border-top: 1px solid var(--border); font-size: 16px; font-weight: 700; color: var(--text); }
.table tbody tr.vazio:not(:first-child) { display: none !important; }
dl.kv.conta { grid-template-columns: minmax(0, 1fr) auto !important; gap: 10px 16px !important; } dl.kv.conta dd { margin: 0 !important; }

/* ===== Admin: transações e ficha da venda ===== */
.filtros-tx { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
dl.resumo-venda { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 20px; margin: 0; }
dl.resumo-venda dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
dl.resumo-venda dd { margin: 4px 0 0; font-size: 15px; word-break: break-word; }
.sinais ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.sinais h2 svg { color: #C2410C; }
.sinais.limpo h2 svg { color: var(--ok-text); }
.abas-venda { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.abas-venda a { white-space: nowrap; }
.note.aviso { background: #FFF6DD; border-color: #F5D98B; color: #6B4A00; }
.note.bom { background: var(--ok-bg); border-color: transparent; color: var(--ok-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note.aviso { background: rgba(255, 196, 0, .12); border-color: rgba(255, 196, 0, .3); color: #FFD166; } }
:root[data-theme="dark"] .note.aviso { background: rgba(255, 196, 0, .12); border-color: rgba(255, 196, 0, .3); color: #FFD166; }
.quebra { word-break: break-all; }
.table tr.atual td { background: var(--surface2); }
ol.tempo { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
ol.tempo li { position: relative; display: flex; flex-direction: column; gap: 2px; }
ol.tempo li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); border: 2px solid var(--surface); }
ol.tempo li.ok::before { background: #16A34A; }
ol.tempo li.bad::before { background: var(--pink); }
ol.tempo li.wait::before { background: #D97706; }
h1.row { flex-wrap: wrap; gap: 10px; }
.split.largo { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); max-width: 980px; }

/* ===== Admin: vendedores, cadastros e janelas ===== */
.avatar { flex: none; width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font: 700 22px Poppins, sans-serif; color: #fff; background: var(--pink); }
.ficha-topo { align-items: flex-start; }
.ficha-topo .row { align-items: flex-start; gap: 14px; }
.etiquetas { gap: 6px !important; margin-top: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); font-size: 14px; font-weight: 500; cursor: pointer; }
.chip input { width: 18px; height: 18px; accent-color: var(--pink); margin: 0; }
.chip:has(input:checked) { border-color: var(--pink); background: var(--err-bg); color: var(--pink-link); font-weight: 700; }
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
dialog.dialogo { width: min(520px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
dialog.dialogo::backdrop { background: rgba(10, 10, 12, .55); }
dialog.dialogo h2 { margin: 0; }
dialog.dialogo textarea { width: 100%; }

/* ===== Admin: provedores ===== */
.avatar.pequeno { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.banco-topo { align-items: center; gap: 12px; }
.banco-topo > div { flex: 1; min-width: 0; }
.banco-topo h2 { margin: 0; }
.copiar { display: flex; gap: 8px; align-items: center; }
.copiar input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.table.custos input { width: 100%; min-width: 90px; }

/* ===== Jornada e Corrida ===== */
img.plate.foto { object-fit: cover; border-radius: 14px; border: 1px solid var(--border); }
img.apagada { filter: grayscale(1); opacity: .45; }
img.pulseira { width: 120px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.table.niveis input[type=text] { min-width: 110px; width: 100%; }
.table.niveis input[type=color] { width: 40px; height: 40px; padding: 2px; border-radius: 10px; flex: none; }
.table.niveis tr.novo td { background: var(--surface2); }
.foto-campo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.foto-campo input[type=file] { max-width: 190px; font-size: 12px; }
.mini { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.mini.vazio { background: var(--surface2); }
ol.ganhadores { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* ===== Comunicados (faixa no painel do vendedor) ===== */
.comunicado { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; font-size: 14px; max-width: 980px; border: 1px solid transparent; }
.comunicado svg { flex: none; margin-top: 1px; }
.comunicado.info { background: rgba(37, 99, 235, .1); border-color: rgba(37, 99, 235, .25); color: #1D4ED8; }
.comunicado.novidade { background: var(--ok-bg); color: var(--ok-text); }
.comunicado.atencao { background: #FFF6DD; border-color: #F5D98B; color: #6B4A00; }
.comunicado.problema { background: var(--err-bg); color: var(--err-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .comunicado.info { color: #93B4FF; } :root:not([data-theme="light"]) .comunicado.atencao { background: rgba(255, 196, 0, .12); border-color: rgba(255, 196, 0, .3); color: #FFD166; } }
:root[data-theme="dark"] .comunicado.info { color: #93B4FF; }
:root[data-theme="dark"] .comunicado.atencao { background: rgba(255, 196, 0, .12); border-color: rgba(255, 196, 0, .3); color: #FFD166; }

/* ===== Marca da plataforma ===== */
.marca-img .row { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.previa-logo { width: 180px; height: 72px; border-radius: 12px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; padding: 10px; flex: none; }
.previa-logo.claro { background: #fff; }
.previa-logo.escuro { background: #141414; }
.previa-logo img { max-width: 100%; max-height: 100%; }
input[type=color] { width: 46px; height: 46px; padding: 3px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); flex: none; cursor: pointer; }

/* ===== Modelos de e-mail ===== */
.emails { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; max-width: 1100px; }
.lista-emails { display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.lista-emails a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.lista-emails a:hover { background: var(--surface2); }
.lista-emails a.on { background: var(--err-bg); color: var(--pink-link); }
.previa-email { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #F4F4F5; margin: 0 auto; width: 100%; }
.previa-email.celular { max-width: 390px; }
.previa-email iframe { display: block; width: 100%; height: 620px; border: 0; }
@media (max-width: 900px) { .emails { grid-template-columns: minmax(0, 1fr); } .lista-emails { flex-direction: row; overflow-x: auto; } .lista-emails a { flex: none; } }
.simulador { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 360px); gap: 12px 24px; align-items: start; padding: 14px; border-radius: 14px; background: var(--surface2); }
@media (max-width: 640px) { .simulador { grid-template-columns: minmax(0, 1fr); } }

/* ===== Disputa (detalhe) ===== */
.disputa { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; max-width: 1100px; }
.disputa > .stack, .disputa > aside { gap: 16px; }
@media (max-width: 1000px) { .disputa { grid-template-columns: minmax(0, 1fr); } }
.disputa aside dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .disputa aside dl.kv dd { margin-bottom: 8px; }

/* ===== Antifraude ===== */
ul.protecoes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.protecoes li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
ul.protecoes li > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
ul.protecoes li > div > .pill { align-self: flex-start; }
.vercomo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-radius: 14px; background: #1D4ED8; color: #fff; font-size: 14px; max-width: 980px; }
.vercomo span { flex: 1; min-width: 200px; }
.vercomo .btn { background: #fff; color: #1D4ED8; border-color: #fff; }

/* Barra do topo do painel: menu, saudação + selo, Prêmios, tema e iniciais */
.ptop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: -8px; }
.ptop-l, .ptop-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
.iconbtn.redondo { border-radius: 50%; width: 42px; height: 42px; }
.ptop-oi { display: inline-flex; align-items: center; gap: 6px; font-family: Poppins, sans-serif; font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selo { display: inline-flex; color: #fff; }
.selo svg { fill: #1D9BF0; stroke: #fff; }
.banners .slide { min-height: 0; }
.premios { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 500; text-decoration: none; }
.premios:hover { border-color: var(--pink); text-decoration: none; }
.pr-ic { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--pink-link); background: var(--err-bg); flex: none; }
.pr-txt { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; row-gap: 3px; font-size: 12px; line-height: 1.1; }
.pr-txt b { font-size: 13px; color: var(--pink-link); }
.pr-val { color: var(--muted); white-space: nowrap; }
.pr-bar { grid-column: 1 / -1; width: 100%; min-width: 150px; height: 5px; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface2); appearance: none; -webkit-appearance: none; }
.pr-bar::-webkit-progress-bar { background: var(--surface2); border-radius: 999px; }
.pr-bar::-webkit-progress-value { background: var(--pink); border-radius: 999px; }
.pr-bar::-moz-progress-bar { background: var(--pink); border-radius: 999px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-family: Poppins, sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--text); background: var(--surface2); border: 1px solid var(--border); text-decoration: none; }
.avatar:hover { border-color: var(--pink); text-decoration: none; }
.ptop .sol { display: none; }
:root[data-theme="dark"] .ptop .lua { display: none; }
:root[data-theme="dark"] .ptop .sol { display: inline-flex; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ptop .lua { display: none; } :root:not([data-theme="light"]) .ptop .sol { display: inline-flex; } }


/* Menu da conta (clique nas iniciais) */
.pmenu { position: relative; }
.pmenu > summary { list-style: none; cursor: pointer; }
.pmenu > summary::-webkit-details-marker { display: none; }
.pmenu[open] > summary { border-color: var(--pink); }
.pm-caixa { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: 260px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(0, 0, 0, .12); display: flex; flex-direction: column; gap: 2px; animation: pm-in .15s ease; }
.pm-topo { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.pm-ini { width: 36px; height: 36px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 13px Poppins, sans-serif; color: #fff; background: var(--pink); }
.pm-nome { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.pm-nome b, .pm-nome span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-nome span { font-size: 12px; color: var(--muted); }
.pm-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 12px; color: var(--text); font-size: 14px; text-decoration: none; }
.pm-item:hover, .pm-item:focus-visible { background: var(--surface2); text-decoration: none; }
.pm-item > span:last-child { display: flex; flex-direction: column; }
.pm-item small { font-size: 12px; color: var(--muted); }
.pm-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--pink-link); background: var(--err-bg); }
:root[data-theme="dark"] .pm-caixa { box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
@keyframes pm-in { from { opacity: 0; transform: translateY(-4px); } }

/* Carrossel de banners do Dashboard */
.banners { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface2); border: 1px solid var(--border); }
.banners .faixa { display: flex; transition: transform .5s ease; }
.banners .slide { flex: 0 0 100%; display: block; }
.banners img { display: block; width: 100%; aspect-ratio: 5 / 1; object-fit: cover; }
.banners .pontos { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.banners .pontos button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: rgba(255, 255, 255, .55); transition: background-color var(--mv-base) ease; }
.banners .pontos button.on { width: 22px; background: #fff; }
@media (max-width: 760px) {
  .ptop { margin-bottom: -12px; flex-wrap: nowrap; }
  .ptop-l { flex: 1 1 auto; }
  .ptop-r { gap: 6px; flex: none; }
  .ptop-oi { display: block; }
  .selo { vertical-align: -3px; margin-left: 4px; }
  .pr-val { display: none; }
  .ptop-oi { font-size: 15px; }
  .pr-bar { min-width: 56px; }
  .premios { padding-right: 10px; }
  .ptop .avatar, .ptop .iconbtn.redondo { width: 36px; height: 36px; }
  .banners img { aspect-ratio: 2 / 1; }
}
@media (max-width: 420px) { .ptop .pr-txt b { display: none; } .pr-bar { min-width: 40px; } .premios { gap: 6px; padding: 0 10px 0 4px; } }

/* Saldo ao vivo: o número que mudou dá uma piscada rosa. */
@keyframes gpPisca { 0% { color: var(--pink-link); } 100% { color: inherit; } }
.gp-pisca { animation: gpPisca 1.4s ease-out; }

/* Passo do cadastro concluído: visto desenhado em CSS (sem caractere de emoji). */
.steps li.done .dot::after { content: ''; width: 6px; height: 11px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }

/* Checkout: cupom de desconto (campo + Aplicar) e linhas de desconto no resumo. */
.co-cupom-linha { display: flex; gap: 8px; }
.co-cupom-linha input { flex: 1; min-width: 0; text-transform: uppercase; }
.co-cupom-btn { height: auto; min-height: 44px; flex: none; }
.co-cupom-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #15803D; }
.co.escuro .co-cupom-ok { color: #6EE7A0; }
.co-desc span:last-child { color: #15803D; font-weight: 600; }
.co.escuro .co-desc span:last-child { color: #6EE7A0; }
.co-cupom-linha input::placeholder { text-transform: none; }

/* ---------- Movimento (Issue #2; regras em docs/padrao-movimento.md) ----------
   Entrada e saída de janela, aviso, menu, lista e troca de tela: 150–250 ms, só transform e opacity.
   Entra com --mv-entra (rápido no começo, assenta devagar); sai mais curto e com --mv-sai (a pessoa já está olhando outra coisa). */
:root {
  --mv-rapido: 150ms; --mv-base: 200ms; --mv-lento: 250ms;
  --mv-entra: cubic-bezier(.16, 1, .3, 1); --mv-sai: cubic-bezier(.4, 0, 1, 1);
}
/* "Reduzir movimento" ligado no sistema: nada se mexe (vale pra todas as telas que carregam este arquivo).
   O estado final continua igual (a animação só termina na hora). Fica de fora só a animação do botão de pagar, que é
   escolha do vendedor no editor do checkout (o dono pediu de volta em 27/10/2026; teste no CheckoutAjustesDonoTest). */
@media (prefers-reduced-motion: reduce) {
  :where(*:not(.co-anim, .pm-anim)), :where(*:not(.co-anim, .pm-anim))::before, :where(*:not(.co-anim, .pm-anim))::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Botão que envia: rodinha antes do texto e o botão não aceita outro clique (envio.js). */
.gp-enviando { cursor: progress !important; }
.gp-enviando:disabled { opacity: 1; }
.gp-giro { display: inline-block; flex: none; width: 1em; height: 1em; margin-right: 8px; vertical-align: -.15em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: gp-giro .7s linear infinite; }
@keyframes gp-giro { to { transform: rotate(360deg); } }
/* Upload: barra com a porcentagem enviada, logo abaixo do botão (envio.js). */
.gp-envio { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.gp-envio-trilho { flex: 1 1 auto; height: 6px; border-radius: 999px; overflow: hidden; background: var(--surface2); }
.gp-envio-trilho i { display: block; height: 100%; border-radius: 999px; background: var(--marca); transform: scaleX(0); transform-origin: left center; transition: transform var(--mv-base) linear; }
.gp-envio.erro { color: var(--erro-texto); }
.gp-envio-indef .gp-envio-trilho i { width: 40%; transform: none; animation: gp-envio-corre 1.1s var(--mv-entra) infinite; }
@keyframes gp-envio-corre { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- Caixinhas de marcar e bolinhas redondas (todo o site) ----------
   A do navegador fica quadrada e o contorno de foco também. Aqui: cantos arredondados, visto desenhado em CSS,
   e o contorno de foco acompanha o arredondado. Não mexe nas caixinhas escondidas dos chips e interruptores.
   Todas as regras usam o MESMO seletor (mesma força), senão a de "marcada" perde pra regra base. */
:where(input[type="checkbox"], input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input) {
  -webkit-appearance: none; appearance: none; position: relative; display: inline-grid; place-content: center;
  width: 20px; height: 20px; margin: 0; padding: 0; flex: none; cursor: pointer; vertical-align: middle;
  border-radius: 6px; border: 2px solid #B9B6C0; background: transparent;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
:where(input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input) { border-radius: 50%; }
:where(input[type="checkbox"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input)::after { content: ''; width: 5px; height: 10px; margin-top: -2px; border: solid #FFFFFF; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .15s cubic-bezier(.3, 1.5, .5, 1); }
:where(input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input)::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #FFFFFF; transform: scale(0); transition: transform .15s ease; }
:where(input[type="checkbox"], input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input):checked { background: var(--pc, var(--marca)); border-color: var(--pc, var(--marca)); }
:where(input[type="checkbox"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input):checked::after { transform: rotate(45deg) scale(1); }
:where(input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input):checked::after { transform: scale(1); }
:where(input[type="checkbox"], input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input):hover:not(:disabled) { border-color: var(--pc, var(--marca)); }
:where(input[type="checkbox"], input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input):focus { outline: none; }
:where(input[type="checkbox"], input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input):focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--marca-rgb), .28); }
:where(input[type="checkbox"], input[type="radio"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input):disabled { opacity: .5; cursor: not-allowed; }
/* Tamanhos que essas telas já tinham (o padrão acima é 20 px). */
.co-bump :where(input[type="checkbox"]):not([role="switch"], [aria-hidden="true"], [hidden], .gp-navt, .ep-file):not(:is(.af-chip, .cf-file, .chips, .choice, .drop, .ep-est-esc, .ep-seg-radio, .g-rel, .g-segbtn, .g-sw, .it-check, .it-evchip, .kyc-chip, .pr-tipo, .pv-rel, .rd, .gp-sw, .gp-seg, .ep-tirar) input) { width: 22px; height: 22px; }

/* Contorno de foco de botões, links e campos: arredondado (segue o canto do elemento) e na cor da marca. */
:where(a, button, [tabindex], summary, input, select, textarea):focus-visible { outline: 2px solid var(--pc, var(--marca-foco)); outline-offset: 2px; }

/* ---------- Páginas de erro (404.php e erro.php): protótipo "Erros" ---------- */
.er-tema { position: absolute; top: 16px; right: 16px; }
.er-wrap { position: relative; min-height: 100vh; padding: 32px 16px; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--text); }
.er-top { position: absolute; top: 24px; right: 24px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.er-top .er-sol { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .er-top .er-lua { display: none; } :root:not([data-theme="light"]) .er-top .er-sol { display: inline-flex; } }
:root[data-theme="dark"] .er-top .er-lua { display: none; }
:root[data-theme="dark"] .er-top .er-sol { display: inline-flex; }
.er-box { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; animation: gpFade .4s ease-out both; }
.er-box .er-logo { height: 34px; width: auto; }
.er-big { font-family: Poppins, sans-serif; font-weight: 800; font-size: 120px; line-height: 1; letter-spacing: -4px; background: var(--marca-degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.er-box h1 { margin: 0; font-family: Poppins, sans-serif; font-weight: 700; font-size: 28px; line-height: 1.2; }
.er-txt { font-size: 15px; color: var(--muted); max-width: 460px; }
.er-acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.er-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700; text-decoration: none !important; }
.er-btn.er-primario { padding: 0 22px; border: 0; font-size: 16px; background: var(--pink); color: #FFFFFF; }
.er-btn.er-primario:hover { color: #FFFFFF; filter: brightness(1.08); }
.er-btn.er-fantasma { padding: 0 20px; font-size: 15px; background: transparent; color: var(--text); border: 1px solid var(--border); }
.er-dev { max-width: min(900px, 100%); overflow: auto; text-align: left; }
@keyframes gpFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .er-box { animation: none; } }

/* ===== Quadradinhos de ícone: UM estilo só, em todas as telas (vendedor, admin, gerente, docs/legais, checkout) =====
   Fora dos painéis: ícone da marca sobre fundo suave (claro) ou branco sobre a marca (escuro). Nos painéis: cinza, nunca cor da marca (logo abaixo). Vale também para as variantes coloridas dos cartões de número (verde, amarelo,
   azul, cinza, vermelho) e para os ícones de categoria das pendências do admin: a cor de status fica no texto (ex.: "+1 venda" em verde), não no ícone.
   Ficam de fora: os indicadores de status das listas do admin
   (saúde do sistema, filas), em que a cor é a própria informação. Tokens: --ic-bg / --ic-fg. */
:root { --ic-bg: var(--marca-suave); --ic-fg: var(--marca-texto); }
:root[data-theme="dark"] { --ic-bg: var(--marca); --ic-fg: var(--marca-sobre); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ic-bg: var(--marca); --ic-fg: var(--marca-sobre); } }
/* Painéis (vendedor, gerente e admin): menos vermelho (Issue #81, docs/estilo-painel.md). Quadradinho de ícone como na referência
   (fundo cinza suave, ícone na cor da marca: --marca-texto, que no escuro é o tom legível), nos dois temas: o dono comparou e o
   FUNDO vermelho deixava a tela poluída.
   Botão sem degradê e sem brilho. Fora dos painéis (entrada, docs, páginas legais, checkout) nada muda. */
.gp-body, body.adm { --ic-bg: var(--g-pinksoft, var(--gp-pinksoft)); --ic-fg: var(--marca-texto); }
/* O ícone dos "Prêmios" do topo continua na cor da marca, junto com o nome (pedido do dono). */
.gp-body .gp-pr-ic { --ic-bg: var(--marca); --ic-fg: var(--marca-sobre); }
.gp-body, body.adm { --marca-degrade: linear-gradient(var(--marca), var(--marca)); --marca-brilho: 0 0 0 0 transparent; }
:root :is(
  .gp-stat-ic, .dsh-static, .st-ic, .op-stat-ic, .vnd-static, .stat .ic, .g-ib:not(.off, .gray), .dsh-aic,
  :is(.gp-pr-ic, .af-thumb, .cb-headic, .cf-tfa-ic, .nt-bell, .cf-bigic, .cq-count, .rc-off-ic, .dh-mt.on .dh-mt-ic, .fin-dica-ic, .fin-bigic, .ind-num,
    .lp-cab-ic, .lp-drop-ic, .pc-head-ic, .pc-sec-ic, .ep-thumb, .ep-quad, .ep-avatar, .pr-thumb, .rel-ava, .fn-ic, .fn-alerta-ic, .it-trava-ic, .it-logo,
    .au-catic, .cb-ic, .pv-mic, .sg-sic, .tx-cic, .ic.erro, .cc-ic, .lg-canal-ic):not(.green, .yellow, .blue, .gray, .off, .ok, .info, .aviso, .neutro)
) { background: var(--ic-bg); color: var(--ic-fg); }
/* Checkout: no claro segue a cor do vendedor (como sempre); no escuro, o mesmo grafite com ícone branco. */
.co.escuro .co-selo-ic { background: #2C2C31; color: #FFFFFF; }

/* Construtor: lista de benefícios, aviso em destaque e botão de link. */
.co-benef ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.co-benef li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.co-benef li svg { flex: none; margin-top: 2px; color: var(--pc-ink); }
.co-aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--co-tint); border: 1px solid var(--co-border); }
.co-aviso svg { flex: none; margin-top: 1px; color: var(--pc-ink); }
.co-aviso-sucesso { border-color: #059669; }
.co-aviso-alerta { border-color: #D97706; }
.co-link { text-align: center; text-decoration: none; }

/* Construtor: blocos Imagem e Cabeçalho. Cor, tamanho e capa de cada cabeçalho vêm de CheckoutVisual::estiloBlocos (o CSP não aceita style=""). */
.co-img { display: flex; }
.co-img-esq { justify-content: flex-start; }
.co-img-centro { justify-content: center; }
.co-img-dir { justify-content: flex-end; }
.co-img img { max-width: 100%; height: auto; display: block; }
.co-img-link { display: block; max-width: 100%; }
.co-cab { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 12px; }
.co-cab-lado-dir { flex-direction: row-reverse; }
.co-cab-img { flex: none; width: 75px; height: 75px; object-fit: cover; border-radius: 8px; }
.co-cab-txt { min-width: 0; flex: 1; }
.co-cab-lado-dir .co-cab-txt { text-align: right; }
.co-cab-t { font-size: 24px; overflow-wrap: anywhere; }
.co-cab-d { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }

/* ===== Cartão de número: UM formato em todos os painéis (Issue #81; medidas em docs/estilo-painel.md) =====
   Ícone branco num quadradinho na cor da marca à esquerda, rótulo cinza em cima, valor em negrito embaixo. Borda fina, sem sombra,
   sem degradê, sem cartão "de destaque". Famílias: .gp-stat (vendedor/gerente), .dsh-stat, .st-card, .op-stat, .vnd-stat (admin).
   A grade (.gp-stats, .dsh-cards, .st-cards, .op-stats, .vnd-stats) fica em cada arquivo: sempre auto-fit, pra encher a largura. */
:is(.gp-stat, .dsh-stat, .st-card, .op-stat, .vnd-stat) {
  --cn-fundo: var(--g-surface, var(--gp-surface)); --cn-borda: var(--g-border, var(--gp-border)); --cn-texto: var(--g-text, var(--gp-text)); --cn-suave: var(--g-muted, var(--gp-muted));
  container-type: inline-size; position: relative; min-width: 0; min-height: 96px; box-sizing: border-box; padding: 20px 24px; border-radius: 16px; text-align: left;
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-content: center; align-items: center;
  color: var(--cn-texto); background: var(--cn-fundo); border: 1px solid var(--cn-borda); }
:is(.gp-stat-top, .dsh-stattop, .st-top, .op-stat-top, .vnd-stattop) { display: contents; }
:is(.gp-stat-ic, .dsh-static, .st-ic, .op-stat-ic, .vnd-static) { grid-column: 1; grid-row: 1 / span 3; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
:is(.gp-stat-lab, .dsh-statlab, .st-lab, .op-stat-lab, .vnd-statlab) { grid-column: 2; grid-row: 1; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--cn-suave); }
:is(.gp-stat-val, .dsh-statval, .st-val, .op-stat-val, .vnd-statval) { grid-column: 2; grid-row: 2; font-weight: 700; font-size: clamp(16px, 10cqi, 20px); line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(.gp-stat-sub, .dsh-statsub, .st-sub, .op-stat-sub, .vnd-statsub) { grid-column: 2; grid-row: 3; font-size: 12px; line-height: 16px; color: var(--cn-suave); }
/* Cartão estreito (menos de 240px): o valor desce pra linha de baixo e usa a largura toda, pra não cortar o número. */
@container (max-width: 240px) {
  :is(.gp-stat-ic, .dsh-static, .st-ic, .op-stat-ic, .vnd-static) { grid-row: 1; }
  :is(.gp-stat-val, .dsh-statval, .st-val, .op-stat-val, .vnd-statval), :is(.gp-stat-sub, .dsh-statsub, .st-sub, .op-stat-sub, .vnd-statsub) { grid-column: 1 / -1; }
  :is(.gp-stat-val, .dsh-statval, .st-val, .op-stat-val, .vnd-statval) { margin-top: 8px; }
}

/* Escala do painel (Issues #104 e #324): os painéis do vendedor e do admin usam zoom FIXO de 106% a partir de 1280px (escolha do dono, comparando com o painel de referência;
   a referência tem menu de 200px). Fixo de propósito: zoom que muda com a largura da tela cancelava o zoom manual do
   navegador (Ctrl +/−). Dentro do painel, toda medida em vh/vw é dividida por var(--gp-esc): o zoom também multiplica essas unidades. */
:root { --gp-esc: 1; }
@media (min-width: 1280px) { :root { --gp-esc: 1.06; } }
body.gp-body, body.adm { zoom: var(--gp-esc); }
