:root {
  --azul: #0a2f86;
  --azul-esc: #071f5c;
  --verde: #1a8a4f;
  --verde-esc: #136b3c;
  --amarelo: #ffd24a;
  --laranja: #f59e0b;
  --fundo: #e9ebef;
  --card: #f2f3f5;
  --branco: #fff;
  --texto: #1f2430;
  --suave: #6b7280;
  --borda: #c9ccd3;
  --raio: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--fundo);
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- topo ---------- */
.topo {
  background: var(--azul);
  color: #fff;
  height: 112px;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 22px 0;
}
.topo .lado { width: 96px; display: flex; }
.topo .lado.dir { justify-content: flex-end; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: 1; text-decoration: none; color: #fff; }
.logo .l1 { font-weight: 900; font-size: 22px; letter-spacing: .5px; text-transform: uppercase;
  color: #fff; text-shadow: 0 2px 0 #1d4fc4, 0 3px 6px rgba(0,0,0,.35); }
.logo .l2 { margin-top: 3px; font-weight: 800; font-size: 13px; letter-spacing: 3px; color: var(--amarelo); text-transform: uppercase; }
.btn-topo { background: none; border: 0; color: var(--amarelo); display: flex; flex-direction: column; align-items: center;
  gap: 4px; font-weight: 600; font-size: 13px; padding: 2px; }
.btn-topo svg { stroke: #fff; }

/* ---------- moldura ---------- */
.moldura {
  max-width: 760px; margin: -22px auto 120px; background: var(--fundo);
  border-radius: 22px 22px 0 0; padding: 18px 14px 0; position: relative;
}
@media (min-width: 640px) { .moldura { padding: 20px 16px 0; } }

/* ---------- hero ---------- */
.hero { position: relative; border-radius: var(--raio); overflow: hidden; aspect-ratio: 16 / 9.4;
  box-shadow: 0 6px 18px rgba(10,30,80,.18); background: #10215a; }
.hero svg.arte { width: 100%; height: 100%; display: block; }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 7px; font-weight: 600;
  font-size: 15px; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.chip.escuro { background: rgba(40,40,46,.78); color: #fff; backdrop-filter: blur(2px); }
.chip.branco { background: #fff; color: #111; }
.chip.verde { background: var(--verde); color: #fff; }
.chip.tl { top: 12px; left: 12px; } .chip.tr { top: 12px; right: 12px; }
.chip.bl { bottom: 12px; left: 12px; } .chip.br { bottom: 12px; right: 12px; }
@media (max-width: 480px) { .chip { font-size: 12.5px; padding: 6px 11px; } }

/* ---------- painel ---------- */
.painel { background: var(--card); border-radius: var(--raio); padding: 16px 14px 18px; margin-top: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.painel h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.progresso { display: flex; justify-content: space-between; font-size: 13px; color: var(--suave); margin-bottom: 7px; font-weight: 500; }
.progresso b { color: var(--texto); }
.barra { height: 10px; border-radius: 99px; background: #dcdfe5; overflow: hidden; }
.barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--verde), #33b06e); border-radius: 99px; transition: width .5s; }

/* atalhos +1 +2 +5 */
.atalhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.atalho { position: relative; background: #f5f5f6; border: 1px solid #8f939b; border-radius: 12px; padding: 12px 6px 10px;
  display: flex; flex-direction: column; align-items: center; }
.atalho b { font-size: 21px; font-weight: 600; }
.atalho span { font-size: 14px; color: #555; }
.atalho.destaque { background: var(--azul); border-color: var(--azul); color: #fff; }
.atalho.destaque span { color: #dfe6ff; }
.atalho .selo { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--azul); color: #fff;
  border: 2px solid #fff; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 1px 10px; white-space: nowrap; }
.atalho:active { transform: scale(.98); }

.stepper { display: grid; grid-template-columns: 60px 1fr 60px; gap: 10px; margin-top: 10px; }
.stepper button { background: #f5f5f6; border: 1px solid #8f939b; border-radius: 10px; height: 58px; font-size: 26px; font-weight: 300; }
.stepper button:disabled { border-color: #d5d7dc; color: #b6b9c0; cursor: default; }
.stepper .qtd { background: #f7f7f8; border: 1px solid #e3e4e8; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; gap: 10px; font-size: 15px; color: #555; }
.stepper .qtd b { font-size: 20px; color: var(--texto); font-weight: 600; }
.dica { font-size: 12.5px; color: var(--suave); margin: 8px 2px 0; }

/* grade de números */
.grade-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.legenda { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--suave); }
.legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legenda .l-livre { background: #fff; border: 1px solid #9aa0aa; }
.legenda .l-sel { background: var(--azul); }
.legenda .l-res { background: #fde7b0; border: 1px solid #e3b544; }
.legenda .l-pago { background: #d4d7dd; }
.toggle { font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--texto); user-select: none; }
.toggle input { width: 16px; height: 16px; accent-color: var(--azul); }
.busca { width: 100%; margin-bottom: 10px; padding: 11px 14px; border-radius: 10px; border: 1px solid #d6d8de; background: #fff; }

.grade { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
@media (max-width: 420px) { .grade { grid-template-columns: repeat(8, 1fr); gap: 5px; } }
.num { aspect-ratio: 1.15; border-radius: 8px; border: 1px solid #a7acb5; background: #fff; font-weight: 600; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center; padding: 0; transition: transform .08s, background .15s; }
.num:hover:not(:disabled) { border-color: var(--azul); }
.num:active:not(:disabled) { transform: scale(.94); }
.num.sel { background: var(--azul); border-color: var(--azul); color: #fff; box-shadow: 0 2px 6px rgba(10,47,134,.35); }
.num.reservado { background: #fde7b0; border-color: #e3b544; color: #8a6410; cursor: not-allowed; }
.num.pago { background: #d4d7dd; border-color: #d4d7dd; color: #8b9099; cursor: not-allowed; text-decoration: line-through; }
.num.oculto { display: none; }
.vazio { text-align: center; color: var(--suave); padding: 20px; font-size: 14px; }

.escolhidos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { background: var(--azul); color: #fff; border-radius: 99px; padding: 4px 6px 4px 11px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px; }
.tag button { background: rgba(255,255,255,.2); border: 0; color: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: 13px; line-height: 1; padding: 0; }

/* CTA fixa */
.cta-fixa { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(233,235,239,0), var(--fundo) 30%); z-index: 20; }
.cta-fixa .dentro { max-width: 730px; margin: 0 auto; }
.cta { width: 100%; background: var(--verde); color: #fff; border: 0; border-radius: 12px; height: 64px; display: flex;
  align-items: center; justify-content: space-between; padding: 0 24px; font-size: 20px; font-weight: 600;
  box-shadow: 0 6px 16px rgba(19,107,60,.35); transition: background .15s, opacity .15s; }
.cta:hover:not(:disabled) { background: var(--verde-esc); }
.cta:disabled { opacity: .55; cursor: default; box-shadow: none; }
.cta .dir { display: flex; align-items: center; gap: 10px; }
.rodape-mini { text-align: center; font-size: 13px; color: #555; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }

.rodape { text-align: center; font-size: 12.5px; color: var(--suave); padding: 22px 10px 10px; line-height: 1.6; }

/* ---------- modais ---------- */
.modal { position: fixed; inset: 0; background: rgba(8,16,40,.55); display: none; align-items: flex-end; justify-content: center; z-index: 50; }
.modal.aberto { display: flex; animation: fade .15s; }
@media (min-width: 640px) { .modal { align-items: center; } }
.caixa { background: #fff; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: sobe .2s ease-out; }
@media (min-width: 640px) { .caixa { border-radius: 22px; } }
@keyframes fade { from { opacity: 0 } }
@keyframes sobe { from { transform: translateY(30px); opacity: .6 } }
.caixa-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.caixa-topo h3 { margin: 0; font-size: 19px; }
.fechar { background: #f0f1f4; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; }
.campo { display: block; margin-bottom: 12px; }
.campo span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #333; }
.campo input, .campo textarea, .campo select { width: 100%; padding: 13px 14px; border: 1px solid #cfd2d8; border-radius: 10px; background: #fafbfc; font-size: 16px; }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: 2px solid rgba(10,47,134,.25); border-color: var(--azul); background: #fff; }
.campo textarea { resize: vertical; min-height: 64px; }
.resumo { background: #f3f5fa; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.resumo .linha { display: flex; justify-content: space-between; align-items: baseline; }
.resumo .total { font-size: 20px; font-weight: 700; color: var(--verde); }
.resumo .nums { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.mini { background: var(--azul); color: #fff; border-radius: 6px; padding: 2px 7px; font-size: 12.5px; font-weight: 600; }
.mini.pendente { background: #fde7b0; color: #8a6410; }
.mini.pago { background: #d1f0de; color: #0f6b3a; }
.btn { width: 100%; border: 0; border-radius: 12px; height: 54px; font-size: 17px; font-weight: 600; background: var(--verde); color: #fff; }
.btn:hover:not(:disabled) { background: var(--verde-esc); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.azul { background: var(--azul); } .btn.azul:hover:not(:disabled) { background: var(--azul-esc); }
.btn.claro { background: #eef0f4; color: var(--texto); } .btn.claro:hover:not(:disabled) { background: #e2e5eb; }
.btn + .btn { margin-top: 10px; }
.aviso { font-size: 12.5px; color: var(--suave); text-align: center; margin-top: 10px; line-height: 1.5; }
.erro { color: #b42318; font-size: 13.5px; margin: -4px 0 10px; min-height: 1em; }

/* pix */
.pix-valor { text-align: center; margin-bottom: 6px; color: var(--suave); font-size: 14px; }
.pix-valor b { display: block; font-size: 30px; color: var(--texto); }
.qr { width: 236px; height: 236px; margin: 10px auto 14px; padding: 8px; background: #fff; border: 1px solid #e3e5ea; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.qr img, .qr canvas { width: 218px !important; height: 218px !important; }
.copiacola { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 12px; padding: 10px; border: 1px dashed #b9bec8; border-radius: 10px;
  background: #f7f8fa; resize: none; height: 74px; word-break: break-all; }
.passos { font-size: 13.5px; color: #444; padding-left: 18px; margin: 14px 0; line-height: 1.6; }
.codigo-pedido { text-align: center; font-size: 13px; color: var(--suave); }
.codigo-pedido b { color: var(--texto); letter-spacing: 1px; }

/* meus números */
.pedido-box { border: 1px solid #e3e5ea; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.pedido-box .cab { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--suave); margin-bottom: 8px; }
.status { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.status.pendente { background: #fff1cc; color: #8a6410; }
.status.pago { background: #d1f0de; color: #0f6b3a; }
.status.cancelado { background: #f1f2f4; color: #6b7280; }
.pedido-box .nums { display: flex; flex-wrap: wrap; gap: 5px; }
.pedido-box .acao { margin-top: 10px; }
.pedido-box .acao .btn { height: 42px; font-size: 14.5px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: #1f2430; color: #fff; padding: 12px 18px;
  border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.erro { background: #b42318; }
#toast.ok { background: var(--verde); }

.faixa-demo { background: #fff4d6; color: #7a5a00; font-size: 12.5px; text-align: center; padding: 7px 10px; }
.carregando { text-align: center; padding: 30px; color: var(--suave); font-size: 14px; }

/* ---------- admin ---------- */
.adm-wrap { max-width: 1100px; margin: -22px auto 40px; padding: 18px 14px; background: var(--fundo); border-radius: 22px 22px 0 0; position: relative; }
.login { max-width: 400px; margin: 30px auto; background: #fff; border-radius: var(--raio); padding: 24px; box-shadow: 0 6px 18px rgba(10,30,80,.1); }
.login h2 { margin: 0 0 16px; font-size: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: 14px; padding: 14px; }
.stat small { display: block; font-size: 12.5px; color: var(--suave); font-weight: 500; }
.stat b { font-size: 24px; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.verde b { color: var(--verde); } .stat.amarelo b { color: #b7791f; }
.barra-adm { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.abas { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: 12px; }
.aba { border: 0; background: none; padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--suave); }
.aba.ativa { background: var(--azul); color: #fff; }
.aba .cnt { font-size: 11.5px; background: rgba(0,0,0,.08); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.aba.ativa .cnt { background: rgba(255,255,255,.22); }
.barra-adm input { flex: 1; min-width: 200px; padding: 11px 14px; border-radius: 12px; border: 1px solid #d6d8de; background: #fff; }
.btn-p { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14px; background: var(--azul); color: #fff; white-space: nowrap; }
.btn-p.claro { background: #fff; color: var(--texto); border: 1px solid #d6d8de; }
.btn-p.verde { background: var(--verde); }
.btn-p.vermelho { background: #fff; color: #b42318; border: 1px solid #f1c1bc; }
.btn-p:disabled { opacity: .55; cursor: default; }
.lista-pedidos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ped { background: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid #e3b544; }
.ped.pago { border-left-color: var(--verde); } .ped.cancelado { border-left-color: #c9ccd3; opacity: .75; }
.ped .l1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ped .nome { font-weight: 700; font-size: 16px; }
.ped .meta { font-size: 13px; color: #555; line-height: 1.55; }
.ped .meta a { color: var(--azul); text-decoration: none; font-weight: 600; }
.ped .nums { display: flex; flex-wrap: wrap; gap: 4px; }
.ped .valor { font-weight: 700; font-size: 17px; }
.ped .acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.ped .acoes .btn-p { flex: 1; padding: 9px 8px; font-size: 13.5px; }
.sair { background: none; border: 0; color: #fff; font-size: 13px; opacity: .85; text-decoration: underline; }
