/* ============================================================
   Estilos globais — mobile-first e responsivo
   ============================================================ */
:root {
  --bg: #0f1226;
  --bg-soft: #1a1f3d;
  --card: #232a52;
  --card-2: #2b3266;
  --accent: #ffb703;
  --accent-2: #fb8500;
  --green: #2dd36f;
  --green-dark: #1f9e56;
  --red: #ef476f;
  --blue: #3a86ff;
  --text: #f5f6ff;
  --text-dim: #a9adca;
  --border: rgba(255, 255, 255, 0.08);
  --topbar-bg: rgba(15, 18, 38, 0.85);
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --maxw: 720px;
}

/* ---------- Tema claro ---------- */
:root[data-theme="light"] {
  --bg: #e9edf7;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-2: #eef1fb;
  --accent: #f08c00;
  --accent-2: #e8590c;
  --green: #2f9e44;
  --green-dark: #2b8a3e;
  --red: #e03131;
  --blue: #1c7ed6;
  --text: #1a1f36;
  --text-dim: #5c6280;
  --border: rgba(20, 30, 70, 0.12);
  --topbar-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 8px 24px rgba(20, 30, 60, 0.12);
}

/* ---------- Botão de alternância de tema ---------- */
.theme-toggle {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 95;
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
}
.theme-toggle:hover { filter: brightness(1.08); }
.theme-toggle:active { transform: scale(.94); }
@media print { .theme-toggle { display: none; } }
body.telao .theme-toggle { display: none; } /* telão sem botão flutuante, mas respeita o tema */

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-soft), var(--bg));
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* ---------- Cabeçalho ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .back {
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-size: 20px;
  flex: 0 0 auto;
}
.topbar h1 { font-size: 1.1rem; font-weight: 700; }
.topbar .spacer { flex: 1; }

/* ---------- Home ---------- */
.hero {
  text-align: center;
  padding: 36px 8px 24px;
}
.hero .emoji { font-size: 3rem; }
.hero-logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  display: inline-block;
  background: var(--card);
}
.hero-banner {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 1.8rem; margin: 8px 0 4px; }
.hero p { color: var(--text-dim); }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 560px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .menu-grid .full { grid-column: 1 / -1; }
}

.tile {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
button.tile { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.tile:active { transform: scale(.98); }
.tile .ic {
  font-size: 2rem;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255, 183, 3, 0.15);
  flex: 0 0 auto;
}
.tile .tx strong { display: block; font-size: 1.15rem; }
.tile .tx span { color: var(--text-dim); font-size: .9rem; }
.tile.admin .ic { background: rgba(58, 134, 255, 0.15); }
.tile.insta .ic {
  background: radial-gradient(circle at 30% 107%,
    #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.tile.whats .ic { background: #25D366; }

/* ---------- Cartões genéricos ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card h2 { font-size: 1.1rem; margin-bottom: 12px; }
.muted { color: var(--text-dim); }
.center { text-align: center; }

/* ---------- Cardápio ---------- */
.cat-title {
  font-size: 1.25rem;
  margin: 24px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.item:last-child { border-bottom: none; }
.item .name { font-weight: 600; }
.item .desc { color: var(--text-dim); font-size: .85rem; }
.item .price {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.stock-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.stock-ok  { background: rgba(45,211,111,.16);  color: var(--green); }
.stock-low { background: rgba(255,183,3,.18);   color: var(--accent); }
.stock-out { background: rgba(255,77,79,.16);   color: var(--red); }
.item.esgotado .name { text-decoration: line-through; opacity: .6; }
.item.esgotado .price { opacity: .5; }

/* ---------- Compras no cardápio ---------- */
.item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.btn-add {
  background: var(--accent); color: #1a1200; border: none; border-radius: 10px;
  padding: 6px 12px; font-weight: 700; font-size: .85rem; cursor: pointer; white-space: nowrap;
}
.btn-add:active { transform: scale(.96); }
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--card); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(0,0,0,.25);
}
.cart-bar #cartInfo { font-weight: 700; }
.cart-bar .btn { width: auto; margin: 0; padding: 10px 16px; }
.qty-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-size: 1.1rem; cursor: pointer; flex: 0 0 auto;
}
.pill:disabled { opacity: .4; cursor: default; }
input:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Bingo ---------- */
/* Banner de rodada / prêmio no topo do Bingo */
.round-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: clamp(1rem, 4.5vw, 1.35rem);
  color: #1a1200;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(251, 133, 0, .35);
  animation: pop .35s ease;
}
.round-banner .dot { opacity: .6; font-weight: 400; }
/* garante que o atributo hidden vença o display:flex acima */
.round-banner[hidden] { display: none; }

.bingo-last {
  text-align: center;
  margin-bottom: 20px;
}
.bingo-last .label { color: var(--text-dim); font-size: .9rem; }
.ball-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.bingo-last .ball {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: clamp(1.6rem, 8vw, 3rem); font-weight: 800;
  color: #1a1200;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--accent) 60%, var(--accent-2));
  box-shadow: 0 10px 30px rgba(251, 133, 0, .45);
  animation: pop .4s ease;
  flex: 0 0 auto;
}
/* histórico: pedras anteriores num carrossel rolável, à esquerda da bola principal */
.history {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(55vw, 300px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.3) transparent;
  -webkit-overflow-scrolling: touch;
}
.history::-webkit-scrollbar { height: 5px; }
.history::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.history .mini-ball {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: clamp(.7rem, 3.5vw, 1rem); font-weight: 700;
  color: #14173a;
  background: #ffffff;
  border: 2px solid #000;
  flex: 0 0 auto;
}
.history .mini-ball:last-child {
  width: 68px; height: 68px; /* a mais recente do histórico fica um pouco maior */
  font-size: clamp(.8rem, 4vw, 1.1rem);
}
@keyframes pop {
  0% { transform: scale(.4); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.bingo-count { text-align: center; color: var(--text-dim); margin-bottom: 16px; }

.bingo-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
@media (min-width: 420px) { .bingo-board { gap: 8px; } }
@media (min-width: 600px) { .bingo-board { grid-template-columns: repeat(10, 1fr); } }

.bingo-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: clamp(.8rem, 3.5vw, 1.1rem);
  color: var(--text-dim);
  user-select: none;
  transition: transform .12s ease, background .2s ease;
}
.bingo-cell.drawn {
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: #1a1200;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(251, 133, 0, .4);
}
.bingo-cell.just {
  animation: pop .4s ease;
  outline: 3px solid #fff;
}
/* modo admin: célula clicável */
.bingo-board.admin .bingo-cell { cursor: pointer; }
.bingo-board.admin .bingo-cell:active { transform: scale(.9); }

/* ---------- Pop-up (modal de mensagem) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 18, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.overlay.show { display: grid; }
.popup {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: pop .35s ease;
}
.popup .big { font-size: 2.5rem; }
.popup h2 { margin: 8px 0 10px; }
.popup p { font-size: 1.15rem; }
.popup .close-x {
  margin-top: 20px;
}

/* Formulário de cadastro (Nome + WhatsApp) */
#identOverlay .popup input {
  width: 100%;
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1rem;
}
#identOverlay .popup input:focus { outline: none; border-color: var(--accent); }
#identOverlay .popup .err { color: var(--red); font-size: .85rem; min-height: 1.1em; margin: 8px 0 2px; }
#identOverlay .popup .btn { margin-top: 10px; }
#identOverlay .popup .skip {
  display: block; margin: 12px auto 0;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: .85rem; text-decoration: underline;
}

/* Central de notificações (admin) */
.notif-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px; margin: 8px 0;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 12px;
}
.notif-row strong { display: block; }
.notif-row .muted { display: block; font-size: .78rem; }
.notif-row .pill { flex: 0 0 auto; min-width: 100px; }

/* ---------- Pedidos ---------- */
.order {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.order .who { flex: 1; min-width: 0; }
.order .who strong { display: block; }
.order .who span { color: var(--text-dim); font-size: .9rem; }
.status-badge {
  font-size: .8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-recebido   { background: rgba(58,134,255,.18);  color: #8ab4ff; }
.status-preparando { background: rgba(255,183,3,.18);   color: var(--accent); }
.status-pronto     { background: rgba(45,211,111,.18);  color: var(--green); }
.status-retirado   { background: rgba(148,163,184,.18); color: #cbd5e1; }

/* ---------- Formulários e botões ---------- */
label { display: block; font-size: .9rem; color: var(--text-dim); margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=tel], select, textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1200;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  cursor: pointer;
  margin-top: 16px;
  transition: transform .12s ease, opacity .2s ease;
}
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--card-2); color: var(--text); }
.btn.danger { background: linear-gradient(160deg, #ff6b8a, var(--red)); color: #fff; }
.btn.green { background: linear-gradient(160deg, #4ade80, var(--green-dark)); color: #06231a; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-top: 0; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .85rem;
  cursor: pointer;
}
.pill.active { background: var(--accent); color: #1a1200; border-color: transparent; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

.toast {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.status-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
  margin-right: 6px;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.conn { font-size: .8rem; color: var(--text-dim); display: flex; align-items: center; }

.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 20px;
}
.empty .big { font-size: 2.5rem; display: block; margin-bottom: 8px; }

/* ---------- Modo Telão ---------- */
body.telao {
  height: 100vh; height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.telao-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2vh;
  padding: 3vh 2vw;
  text-align: center;
}
.telao-round {
  font-size: clamp(1.4rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #1a1200;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  padding: .4em 1em;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(251,133,0,.4);
}
.telao-round[hidden] { display: none; }
.telao-main { display: flex; flex-direction: column; align-items: center; }
.telao-label {
  font-size: clamp(1rem, 3vw, 2rem);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.telao-ball {
  width: min(46vh, 80vw);
  height: min(46vh, 80vw);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: min(20vh, 34vw);
  font-weight: 900;
  color: #1a1200;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--accent) 60%, var(--accent-2));
  box-shadow: 0 20px 60px rgba(251,133,0,.5);
  animation: pop .45s ease;
  line-height: 1;
}
/* dimensões de referência da pedra principal */
:root { --telao-ball: min(46vh, 80vw); }

/* o "stage" só serve de referência; os elementos são fixados no viewport */
.telao-stage { position: static; }

/* PEDRA PRINCIPAL — travada exatamente no centro da tela */
.telao-main {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* ANTERIORES — faixa horizontal que corre para a esquerda a partir da principal.
   row-reverse: a mais recente (primeiro no DOM) cola na principal; as antigas
   escorregam para a esquerda e somem fora da tela (carrossel). */
.telao-history {
  position: fixed;
  top: 50%;
  right: calc(50% + (var(--telao-ball) / 2) + min(3.5vh, 3.5vw));
  transform: translateY(-50%);
  /* largura do carrossel: da margem esquerda até um pouco antes da bola */
  max-width: calc(50% - (var(--telao-ball) / 2) - min(3.5vh, 3.5vw) - 3vw);
  display: flex;
  flex-direction: row;         /* antigas à esquerda, recentes à direita (coladas na bola) */
  align-items: center;
  gap: min(2.5vh, 2.5vw);
  z-index: 5;
  white-space: nowrap;
  overflow-x: auto;            /* rolável */
  overflow-y: hidden;
  padding: 10px 2px;           /* espaço p/ sombra */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
  -webkit-overflow-scrolling: touch;
}
.telao-history::-webkit-scrollbar { height: 6px; }
.telao-history::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 3px; }
.telao-mini {
  flex: 0 0 auto;
  width: min(26vh, 24vw);
  height: min(26vh, 24vw);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: min(10vh, 10vw);
  font-weight: 800;
  color: #14173a;
  background: #ffffff;
  border: 3px solid #000;
  line-height: 1;
}
/* a mais recente (colada na principal) um pouco maior e destacada */
.telao-history .telao-mini:last-child {
  width: min(32vh, 30vw);
  height: min(32vh, 30vw);
  font-size: min(12.5vh, 12.5vw);
}
/* efeito carrossel: cada pedra entra deslizando da direita */
@keyframes telaoSlide {
  from { transform: translateX(min(10vh, 10vw)); opacity: .35; }
  to   { transform: translateX(0); opacity: 1; }
}

/* rodada no topo e contador embaixo, fixos, para não empurrar a principal */
.telao-round {
  position: fixed;
  top: 3vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}
.telao-count {
  position: fixed;
  bottom: 3vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

@media (max-width: 640px) {
  .telao-history {
    right: auto; left: 50%;
    top: auto; bottom: calc(50% + (var(--telao-ball) / 2) + 2vh);
    transform: translateX(-50%);
    max-width: 92vw;
  }
  .telao-mini { width: clamp(48px, 12vh, 96px); height: clamp(48px, 12vh, 96px); font-size: clamp(.9rem, 4vh, 1.6rem); }
  .telao-history .telao-mini:last-child { width: clamp(56px, 14vh, 110px); height: clamp(56px, 14vh, 110px); font-size: clamp(1rem, 4.5vh, 1.9rem); }
}
.telao-count {
  font-size: clamp(1rem, 3vw, 2rem);
  color: var(--text-dim);
  font-weight: 700;
}
.telao-back, .telao-fs {
  position: fixed;
  top: 16px;
  z-index: 30;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 22px;
  text-decoration: none;
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s;
}
.telao-back { left: 16px; }
.telao-fs { right: 16px; }
.telao-back:hover, .telao-fs:hover { opacity: 1; }
:fullscreen .no-fs { display: none; }

/* ---------- Conferir cartela ---------- */
.conferir-status {
  font-size: 1.5rem;
  font-weight: 800;
}
.conferir-status.win   { color: var(--green); animation: pop .4s ease; }
.conferir-status.line  { color: var(--accent); animation: pop .4s ease; }
.conferir-status.close { color: var(--blue); }

.cartela {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 4px 0 16px;
}
.cartela-head {
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent);
  padding-bottom: 4px;
}
.cartela-cell {
  aspect-ratio: 1;
  width: 100%;
  text-align: center;
  font-size: clamp(1rem, 5vw, 1.4rem);
  font-weight: 700;
  padding: 0;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
}
.cartela-cell.free {
  display: grid;
  place-items: center;
  font-size: .7rem;
  color: var(--text-dim);
  background: var(--card-2);
}
.cartela-cell.hit {
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: #1a1200;
  border-color: transparent;
}
.cartela-cell.bad {
  border-color: var(--red);
  color: var(--red);
}
input.cartela-cell:focus { outline: none; border-color: var(--accent); }
.conferir-status.bad { color: var(--red); }

/* ---------- Conferidor: várias cartelas em carrossel ---------- */
.rule-banner {
  text-align: center;
  font-weight: 700;
  font-size: .95rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.rule-banner b { color: var(--accent); }

.cartela-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 4px 0 10px;
}
.cartela-nav button {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); font-size: 1.4rem; line-height: 1;
  cursor: pointer; flex: 0 0 auto;
}
.cartela-nav button:disabled { opacity: .35; cursor: default; }
.cartela-nav .label { font-weight: 800; }

.cartela-carousel {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cartela-carousel::-webkit-scrollbar { display: none; }
.cartela-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: center;
  padding: 0 2px;
}
.cartela-slide .conferir-status { font-size: 1.35rem; }

.cartela-dots { display: flex; gap: 8px; justify-content: center; margin: 10px 0 4px; flex-wrap: wrap; }
.cartela-dots .dot {
  width: 13px; height: 13px; border-radius: 50%; padding: 0;
  background: var(--border); border: 1px solid var(--border); cursor: pointer;
}
.cartela-dots .dot.won { background: var(--green); border-color: var(--green); }
.cartela-dots .dot.active { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- QR Code ---------- */
.qr-box {
  width: min(320px, 80vw);
  aspect-ratio: 1;
  margin: 10px auto;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-url {
  word-break: break-all;
  font-size: .9rem;
  color: var(--text-dim);
  margin-top: 8px;
}
@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: none; }
  .qr-url { color: #000; }
}
