:root {
  --bg: #0b0b0c;
  --surface: #161618;
  --surface-2: #202023;
  --line: #2e2e33;
  --ink: #ffffff;
  --muted: #a3a3a9;
  --accent: #00b7d1;
  --accent-ink: #061215;
  --ok: #22c55e;
  --erro: #ff5a4f;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 16px; }
body { min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
h1, h2, .num { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: 34px; line-height: 1; margin: 0 0 20px; }
h2 { font-size: 22px; line-height: 1.1; margin: 0 0 12px; }
p { margin: 0 0 16px; line-height: 1.5; }

.topo { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(11,11,12,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.marca { height: 26px; width: auto; }
.quem { flex: 1; color: var(--muted); font-size: 14px; }
.ligacao { color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.ligacao:active { background: var(--surface-2); }
.faixa { margin: 0; padding: 10px 16px; font-size: 13px; background: #2a2208; color: #ffd36b; border-bottom: 1px solid #4a3c10; }

main { flex: 1; padding: 20px 16px 140px; max-width: 560px; width: 100%; margin: 0 auto; }

/* login */
.nomes { display: grid; gap: 10px; margin-bottom: 24px; }
.nome { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; font-weight: 600; font-size: 18px; }
.nome.sel { border-color: var(--accent); background: #0a2a30; }
.pin { display: flex; gap: 10px; justify-content: center; margin: 8px 0 20px; }
.pin span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.pin span.on { background: var(--accent); border-color: var(--accent); }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tecla { height: 64px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 26px; font-weight: 600; }
.tecla:active { background: var(--surface-2); }

/* artigos */
.grupo { margin-bottom: 28px; }
.grupo h2 { display: flex; justify-content: space-between; align-items: baseline; }
.grupo h2 small { font-family: Inter, sans-serif; font-weight: 600; font-size: 15px; color: var(--muted); }
.tamanhos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tam { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.tam.tem { border-color: var(--accent); background: #0a2a30; }
.tam .rot { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 30px; line-height: 1; }
.tam .resta { font-size: 12px; color: var(--muted); }
.tam .resta.pouco { color: #ffd36b; }
.tam.esgotado { opacity: .4; }
.passos { display: flex; align-items: center; justify-content: space-between; }
.passo { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); font-size: 26px; font-weight: 600; line-height: 1; }
.passo.mais { background: var(--accent); color: var(--accent-ink); }
.passo:disabled { opacity: .3; }
.qtd { font-family: "Barlow Condensed", sans-serif; font-size: 30px; font-weight: 800; min-width: 36px; text-align: center; }

/* barra inferior */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: rgba(11,11,12,.96); border-top: 1px solid var(--line); }
.barra-dentro { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.barra .total { flex: 1; }
.barra .total small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.barra .total strong { font-family: "Barlow Condensed", sans-serif; font-size: 32px; font-weight: 800; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 22px; border-radius: 16px; font-weight: 700; font-size: 17px; background: var(--surface-2); border: 1px solid var(--line); }
.btn.prim { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ok { background: var(--ok); color: #04150a; border-color: var(--ok); }
.btn.perigo { color: var(--erro); border-color: #5a2522; background: transparent; }
.btn.largo { width: 100%; }
.btn:disabled { opacity: .35; }
.pilha { display: grid; gap: 12px; }

/* métodos */
.metodo { display: flex; align-items: center; gap: 16px; width: 100%; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.metodo.sel { border-color: var(--accent); background: #0a2a30; }
.metodo .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: 14px; }
.metodo strong { display: block; font-size: 18px; margin-bottom: 2px; }
.metodo span { color: var(--muted); font-size: 14px; }

.campo { display: grid; gap: 8px; margin-bottom: 16px; }
.campo label { font-size: 14px; color: var(--muted); font-weight: 600; }
.campo input { height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 16px; font-size: 20px; }
.campo input:focus { outline: none; border-color: var(--accent); }
.erro { color: var(--erro); font-size: 15px; margin: 4px 0 16px; }

/* espera / estado */
.cartao { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; }
.valor { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 56px; line-height: 1; margin: 6px 0 16px; }
.ref { display: grid; gap: 14px; }
.ref div small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.ref div b { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 40px; letter-spacing: .04em; }
.espera { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.roda { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: roda 0.9s linear infinite; flex: none; }
@keyframes roda { to { transform: rotate(360deg); } }
.pago { text-align: center; padding: 28px 0 8px; }
.visto { width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%; background: var(--ok); color: #04150a; display: grid; place-items: center; font-size: 52px; font-weight: 800; animation: entra .35s ease-out; }
@keyframes entra { from { transform: scale(.6); opacity: 0; } }
.resumo { color: var(--muted); font-size: 15px; }
.lista { display: grid; gap: 8px; }
.linha { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.linha span { color: var(--muted); }

a.btn { color: inherit; text-decoration: none; }
