/* ===== Tokens (as cores ficam aqui no topo) ===== */
:root {
  --fundo: #faf7f2;
  --papel: #ffffff;
  --texto: #2a2420;
  --suave: #6f655d;
  --linha: #e6dfd6;
  --erro: #b3261e;
  --erro-fundo: #fdecea;
  --aviso-fundo: #fff4d6;
  --cor-loja: #f5a623;       /* a loja troca esta cor por JavaScript */
  --raio: 16px;
  --margem: 16px;
}

/* ===== Parte comum (clube e painel) ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fundo); color: var(--texto);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
h1, h2, p { margin: 0 0 12px; }
h1 { font-size: 1.6rem; line-height: 1.2; }
h2 { font-size: 1.2rem; }
.suave { color: var(--suave); font-size: .9rem; }
.escondido { display: none !important; }

.caixa {
  background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio);
  padding: 20px var(--margem); margin-bottom: 16px;
}
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="search"], select {
  width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; color: inherit;
  border: 1.5px solid var(--linha); border-radius: 12px; background: #fff;
}
input:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid var(--cor-loja); outline-offset: 2px; }
.botao {
  display: block; width: 100%; min-height: 56px; margin-top: 18px; padding: 14px 18px;
  font: inherit; font-weight: 700; color: #1d1a17; background: var(--cor-loja);
  border: 0; border-radius: 14px; cursor: pointer;
}
.botao:disabled { opacity: .55; cursor: default; }
.botao.discreto { background: transparent; border: 1.5px solid var(--linha); color: var(--texto); }
.erro { background: var(--erro-fundo); color: var(--erro); border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-weight: 600; }
.aviso { background: var(--aviso-fundo); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }

/* ===== Página do clube ===== */
.pagina-clube main { max-width: 480px; margin: 0 auto; padding: 24px var(--margem) 40px; }
.topo-loja { text-align: center; margin-bottom: 20px; }
.logo-loja { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--cor-loja); margin-bottom: 10px; background: #fff; }
.premio { font-size: 1.05rem; }
.centro { text-align: center; }

.opcao-presente { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 8px 0; padding: 10px 14px;
  border: 1.5px solid var(--linha); border-radius: 12px; font-weight: 500; cursor: pointer; }
.opcao-presente input { width: 22px; height: 22px; accent-color: var(--cor-loja); flex: none; }
.opcao-presente:has(input:checked) { border-color: var(--cor-loja); background: var(--aviso-fundo); }
.linha-aceite { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; font-weight: 500; }
.linha-aceite input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--cor-loja); flex: none; }
.privacidade { margin-top: 18px; }

.cartao-codigo { font-size: 2.2rem; font-weight: 800; letter-spacing: .08em; text-align: center; padding: 14px; margin: 8px 0 16px;
  border: 2.5px dashed var(--cor-loja); border-radius: 14px; }
.selos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0 16px; }
.selo { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--linha); display: grid; place-items: center; font-weight: 700; color: var(--suave); }
.selo.cheio { background: var(--cor-loja); border-color: var(--cor-loja); color: #1d1a17; }
.presente-cartao { background: var(--aviso-fundo); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.carregando { text-align: center; padding: 60px 0; color: var(--suave); }

/* ===== Painel do dono ===== */
.pagina-painel main { max-width: 560px; margin: 0 auto; padding: 16px var(--margem) 48px; }
.painel-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.painel-topo h1 { font-size: 1.25rem; margin: 0; }
.painel-topo .botao { width: auto; min-height: 44px; margin: 0; padding: 8px 16px; }
.faixa { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; }
.faixa.amarela { background: var(--aviso-fundo); }
.faixa.vermelha { background: var(--erro-fundo); color: var(--erro); }
.abas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.aba { min-height: 48px; font: inherit; font-weight: 600; font-size: .9rem; border: 1.5px solid var(--linha); border-radius: 12px; background: var(--papel); color: var(--texto); cursor: pointer; padding: 6px 2px; }
.aba[aria-current="true"] { background: var(--cor-loja); border-color: var(--cor-loja); color: #1d1a17; }
.lista { list-style: none; margin: 0; padding: 0; }
.item-membro { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--papel); border: 1.5px solid var(--linha); border-radius: 12px; padding: 12px 14px; margin: 8px 0; min-height: 56px; cursor: pointer; }
.item-membro strong { display: block; }
.ficha .cartao-codigo { font-size: 1.8rem; }
.botoes-balcao .botao { margin-top: 10px; }
.botao.perigo { background: var(--erro); color: #fff; }
.toast { position: sticky; bottom: 12px; background: #2a2420; color: #fff; border-radius: 14px; padding: 12px 14px; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toast .botao { width: auto; min-height: 44px; margin: 0; padding: 8px 16px; background: #fff; }
.grade-numeros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.numero { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px; }
.numero b { display: block; font-size: 1.7rem; line-height: 1.1; }
.barra { height: 18px; border-radius: 9px; background: var(--linha); overflow: hidden; display: flex; margin: 10px 0 6px; }
.barra .usado { background: var(--cor-loja); height: 100%; }
.barra .reservado { background: #c9b99a; height: 100%; }
.campo-ajuste textarea { width: 100%; min-height: 96px; padding: 12px 14px; font: inherit; border: 1.5px solid var(--linha); border-radius: 12px; }
input[type="number"] { width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; border: 1.5px solid var(--linha); border-radius: 12px; background: #fff; }
input[type="color"] { width: 64px; height: 52px; padding: 2px; border: 1.5px solid var(--linha); border-radius: 12px; background: #fff; }
.ok { background: #e6f4ea; color: #1e6b34; border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-weight: 600; }
.link { background: none; border: 0; padding: 12px 0; font: inherit; color: var(--suave); text-decoration: underline; cursor: pointer; min-height: 44px; }
