/* ---------- Área do líder (celular primeiro) ---------- */
.l-wrap { max-width: 600px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }

/* topo */
.l-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.l-top-in { max-width: 600px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.l-top .marca { flex: 1; min-width: 0; }
.l-top .marca span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* navegação inferior */
.l-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.l-nav-in { max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.l-nav a { display: grid; justify-items: center; gap: 3px; padding: 9px 4px 10px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 700; position: relative; }
.l-nav a svg { width: 23px; height: 23px; }
.l-nav a.on { color: var(--brand); }
.l-nav a.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.l-nav .dot { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10.5px; display: grid; place-items: center; }

/* entrada */
.entrada { min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; }
.entrada-topo { background: var(--brand); color: var(--brand-ink); padding: 44px 24px 80px; position: relative; overflow: hidden; }
.entrada-topo::after { content: ""; position: absolute; right: -60px; top: -40px; width: 300px; aspect-ratio: 480/266; background: currentColor; opacity: .07; -webkit-mask: url(../img/logo-um.png) center / contain no-repeat; mask: url(../img/logo-um.png) center / contain no-repeat; transform: rotate(-12deg); }
.entrada-topo .in { max-width: 460px; margin: 0 auto; position: relative; z-index: 1; }
.entrada-topo .logo-um { width: 72px; color: var(--brand-ink); margin-bottom: 26px; }
.entrada-topo .kicker { font-size: 12px; letter-spacing: .14em; font-weight: 800; opacity: .8; text-transform: uppercase; }
.entrada-topo h1 { font-size: 30px; font-weight: 800; margin: 8px 0 10px; }
.entrada-topo p { margin: 0; opacity: .85; font-size: 15px; max-width: 34ch; }
.entrada-form { max-width: 460px; width: calc(100% - 32px); margin: -52px auto 24px; position: relative; z-index: 2; }
.entrada-form .card { padding: 22px; }
.demo-dica { margin-top: 14px; font-size: 13px; text-align: center; color: var(--muted); }
.demo-dica code { background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-weight: 700; color: var(--ink); }
.entrada-rodape { text-align: center; padding: 10px 16px 26px; font-size: 13px; }

/* seletor de congregação com busca */
.busca-cong { position: relative; }
.busca-cong .lista { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 280px; overflow: auto; padding: 6px; }
.busca-cong .op { width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.busca-cong .op:hover, .busca-cong .op.ativo { background: var(--brand-soft); }
.busca-cong .op small { color: var(--muted); }
.pin-in { letter-spacing: .5em; font-size: 22px; font-weight: 800; text-align: center; }

/* cabeçalho das telas */
.tela-h { padding: 22px 2px 6px; }
.tela-h h2 { font-size: 24px; font-weight: 800; }
.tela-h p { margin: 6px 0 0; color: var(--muted); }
.voltar { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 14px 0 0; cursor: pointer; }
.voltar svg { width: 18px; height: 18px; }

/* cartão de saldo */
.saldo { background: var(--brand); color: var(--brand-ink); border-radius: 20px; padding: 22px; margin-top: 16px; position: relative; overflow: hidden; box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 30%, transparent); }
.saldo::after { content: ""; position: absolute; right: -40px; bottom: -36px; width: 210px; aspect-ratio: 480/266; background: currentColor; opacity: .08; -webkit-mask: url(../img/logo-um.png) center / contain no-repeat; mask: url(../img/logo-um.png) center / contain no-repeat; }
.saldo .rot { font-size: 13px; font-weight: 700; opacity: .8; }
.saldo .valor { font-size: 38px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 16px; }
.saldo .barra { background: rgba(255, 255, 255, .22); }
.saldo .barra > i { background: #fff; }
.saldo .barra > i.analise { background: repeating-linear-gradient(45deg, rgba(255,255,255,.65), rgba(255,255,255,.65) 4px, rgba(255,255,255,.35) 4px, rgba(255,255,255,.35) 8px); }
.saldo .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.saldo .trio div { font-size: 12px; opacity: .85; }
.saldo .trio b { display: block; font-size: 15px; opacity: 1; margin-top: 2px; }
.saldo.quitado { background: var(--ok); }

/* linha do tempo do lote */
.etapas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 16px 14px 14px; }
.etapa { display: grid; justify-items: center; text-align: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); position: relative; }
.etapa i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line-2); z-index: 1; font-style: normal; font-size: 12px; }
.etapa i svg { width: 14px; height: 14px; }
.etapa::before { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: var(--line-2); }
.etapa:first-child::before { display: none; }
.etapa.feita i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.etapa.feita::before, .etapa.atual::before { background: var(--brand); }
.etapa.atual i { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); color: var(--brand); }
.etapa.atual { color: var(--ink); }

/* atalhos */
.atalhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.atalho { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; display: grid; justify-items: center; gap: 8px; text-align: center; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 13px; box-shadow: var(--shadow); }
.atalho span { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.atalho svg { width: 22px; height: 22px; }
.atalho:active { transform: scale(.98); }

/* chips de tamanho */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-t { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.chip-t b { font-size: 15px; }
.grupo-tam { padding: 14px 18px; border-top: 1px solid var(--line); }
.grupo-tam:first-child { border-top: 0; }
.grupo-tam h4 { font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; }

/* ---------- pedido: modelos e grade */
.modelo { margin-top: 14px; overflow: hidden; }
.modelo-h { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.modelo-h .camiseta { width: 56px; height: 56px; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.modelo-h h3 { font-size: 16px; }
.modelo-h p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.modelo-h .preco { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.modelo-h .preco b { display: block; font-size: 16px; color: var(--ink); }
.abas { display: flex; gap: 6px; padding: 0 18px 12px; overflow-x: auto; }
.aba { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.aba.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.aba .n { background: var(--brand); color: var(--brand-ink); border-radius: 99px; font-size: 11px; padding: 0 6px; min-width: 18px; text-align: center; }
.aba.on .n { background: #fff; color: var(--ink); }
.tams { border-top: 1px solid var(--line); }
.tam { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.tam:last-child { border-bottom: 0; }
.tam .t { width: 46px; height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; }
.tam.tem .t { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand); }
.tam .p { flex: 1; font-size: 13px; color: var(--muted); }
.tam .p b { color: var(--ink); font-size: 14px; }
.tam .p .extra { color: var(--warn); font-weight: 700; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.stepper button:active { background: var(--brand-soft); }
.stepper button svg { width: 18px; height: 18px; }
.stepper input { width: 46px; height: 42px; border: 0; text-align: center; font-weight: 800; font-size: 16px; outline: none; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* barra fixa de total */
.barra-total { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 25; padding: 10px 16px; pointer-events: none; }
.barra-total .in { max-width: 568px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 10px 10px 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); pointer-events: auto; }
.barra-total .info { flex: 1; font-size: 12px; opacity: .9; }
.barra-total .info b { display: block; font-size: 18px; opacity: 1; }
.barra-total .btn { background: #fff; color: var(--ink); border-color: #fff; }

/* espelho do pedido */
.espelho td, .espelho th { padding: 9px 14px; }
.espelho .grp td { background: var(--surface-2); font-weight: 800; font-size: 13px; }
.total-final { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px; border-top: 2px solid var(--ink); }
.total-final b { font-size: 24px; }

/* opções (radio em cartões) */
.opcoes { display: grid; gap: 8px; }
.opcoes.tres { grid-template-columns: repeat(3, 1fr); }
.opcao { position: relative; }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao label { display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; text-align: center; font-weight: 700; font-size: 14px; background: var(--surface); }
.opcao label small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.opcao input:checked + label { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.opcao input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }

/* PIX */
.pix-box { display: grid; gap: 14px; justify-items: center; text-align: center; }
.qr { background: #fff; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.qr img, .qr canvas { width: 200px !important; height: 200px !important; }
.copia { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; text-align: left; max-height: 76px; overflow: auto; }

/* upload */
.upload { border: 2px dashed var(--line-2); border-radius: 14px; padding: 18px; text-align: center; cursor: pointer; display: grid; justify-items: center; gap: 6px; background: var(--surface-2); transition: border-color .15s; }
.upload:hover { border-color: var(--brand); }
.upload svg { width: 28px; height: 28px; color: var(--brand); }
.upload.tem { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.upload img { max-height: 160px; border-radius: 8px; }

/* extrato */
.mov { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.mov:last-child { border-bottom: 0; }
.mov .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.mov .ico svg { width: 19px; height: 19px; }
.mov .ico.deb { background: var(--brand-soft); color: var(--brand); }
.mov .ico.cred { background: var(--ok-soft); color: var(--ok); }
.mov .ico.an { background: var(--warn-soft); color: var(--warn); }
.mov .ico.rec { background: var(--bad-soft); color: var(--bad); }
.mov .meio { flex: 1; min-width: 0; }
.mov .meio b { display: block; font-size: 14.5px; }
.mov .meio small { color: var(--muted); font-size: 12.5px; }
.mov .dir { text-align: right; white-space: nowrap; }
.mov .dir b { display: block; font-size: 15px; }
.mov .dir .saldo-apos { font-size: 11.5px; color: var(--muted); }
.mov .det { margin-top: 8px; }
.mov .motivo { margin-top: 8px; font-size: 13px; color: var(--bad); background: var(--bad-soft); padding: 8px 10px; border-radius: 8px; }
.mov .acoes-mov { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.filtros { display: flex; gap: 6px; margin: 14px 0 0; overflow-x: auto; }

/* sucesso */
.sucesso { text-align: center; padding: 40px 10px 10px; }
.sucesso .selo { width: 76px; height: 76px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 18px; animation: pop .4s cubic-bezier(.2, 1.6, .5, 1); }
.sucesso .selo svg { width: 38px; height: 38px; }
.sucesso h2 { font-size: 24px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

details.faq { border-bottom: 1px solid var(--line); }
details.faq:last-child { border-bottom: 0; }
details.faq summary { padding: 15px 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); font-size: 14px; }

@media (min-width: 700px) {
  .tela-h h2 { font-size: 28px; }
}
@media (max-width: 360px) {
  .opcoes.tres { grid-template-columns: 1fr; }
  .saldo .valor { font-size: 32px; }
}
