/* ==========================================================================
   Sistema de ingressos — estilo das páginas novas (ingresso, pedido, portaria,
   organizador) e do formulário de compra. Usa as cores, fontes e componentes
   de style.css (:root, .btn, .chip, .mono, .pass); aqui só entra o que falta.
   ========================================================================== */

.sis {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 22px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 60% at 50% 0%, #1d1430, var(--bg) 62%);
}
.sis > * { width: 100%; max-width: 420px; }
.sis--larga > * { max-width: 1080px; }

.sis__topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sis__marca {
  color: var(--fg);
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 900;
  font-variation-settings: 'wdth' 120, 'wght' 900;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}
.sis__titulo {
  font-family: var(--f-display);
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 900;
  font-variation-settings: 'wdth' 76, 'wght' 900;
  line-height: 0.95;
  text-transform: uppercase;
}
.sis__sub { color: var(--fg-2); font-size: 15.5px; line-height: 1.45; }
.sis__sub b { color: var(--fg); }
.sis__nota { color: var(--fg-3); font-size: 9.5px; line-height: 1.7; text-align: center; text-wrap: balance; }
.sis__aviso {
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  color: var(--fg-2);
  font-size: 14.5px;
  line-height: 1.4;
}
.sis__aviso--erro { border-color: var(--red); color: var(--fg); }
.sis__linha { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.cartao {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-2);
}

/* selos de situação: cor e palavra, nunca só cor */
.selo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-2);
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.selo::before { content: ''; width: 6px; height: 6px; border-radius: 1.5px; background: currentColor; }
.selo--valido { border-color: transparent; background: var(--yellow); color: var(--ink); }
.selo--entrou { border-color: var(--line-2); color: var(--fg); }
.selo--cancelado { border-color: var(--red); color: var(--red); }

/* ------------------------------ formulário ------------------------------ */

.campo { display: grid; gap: 6px; }
.campo > span { color: var(--fg-2); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; }
.campo input,
.campo select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 16px; /* abaixo de 16px o iPhone dá zoom ao focar */
}
.campo input:focus-visible,
.campo select:focus-visible { border-color: var(--yellow); outline: 2px solid var(--yellow); outline-offset: 1px; }
.campo input[aria-invalid='true'] { border-color: var(--red); }
.campo__erro { min-height: 1.2em; color: var(--orange); font-size: 13.5px; line-height: 1.2; }
.campo__erro:empty { display: none; }

.quantos { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 10px; }
.quantos button {
  height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: none;
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.quantos button[disabled] { border-color: var(--line); color: var(--fg-3); cursor: default; }
.quantos output {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 800;
  font-variation-settings: 'wdth' 92, 'wght' 800;
  line-height: 1;
  text-align: center;
}

.total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.total span { color: var(--fg-2); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; }
.total b {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 800;
  font-variation-settings: 'wdth' 92, 'wght' 800;
  line-height: 1;
}

.compra { display: grid; gap: 14px; }
.compra .btn { width: 100%; }
.compra__volta { justify-self: center; padding: 8px; border: 0; background: none; color: var(--fg-2); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* dentro da folha do site: o bloco de demonstração guarda o espaçamento de antes */
.sheet__demo { display: grid; gap: 14px; }
.sheet__demo .chip { justify-self: start; }
.sheet__demo[hidden], #sheet-compra[hidden] { display: none; }
.compra .chip { justify-self: start; }

/* os 6 números do ingresso: largura igual para todos os dígitos, para não
   tremer enquanto giram; dígito ainda girando aparece quente e apagado */
.pass__code { font-variant-numeric: tabular-nums; white-space: pre; }
.pass__code span { display: inline-block; min-width: 0.62em; text-align: center; transition: color 0.18s, opacity 0.18s; }
.pass__code .gira { color: var(--orange); opacity: 0.55; }
.pass__code .vao { min-width: 0.28em; }

/* ------------------------------- ingresso ------------------------------- */

.pass--real { padding: 22px 18px 20px; border: 1px solid var(--line); border-radius: 28px; }
.pass__qr { transition: opacity 0.3s; }
.pass--fora .pass__qr { display: grid; place-items: center; aspect-ratio: 1; background: var(--bg-3); }
.pass--fora .pass__qr canvas,
.pass--fora .pass__leds,
.pass--fora .pass__live { display: none; }
.pass__estado {
  padding: 0 8%;
  font-family: var(--f-display);
  font-size: clamp(22px, 7vw, 30px);
  font-weight: 900;
  font-variation-settings: 'wdth' 82, 'wght' 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}
.pass__estado small { display: block; margin-top: 10px; color: var(--fg-2); font-family: var(--f-text); font-size: 14.5px; font-variation-settings: normal; font-weight: 400; line-height: 1.35; text-transform: none; }
.pass:not(.pass--fora) .pass__estado { display: none; }
.pass__num { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--fg-2); font-size: 9.5px; }
.pass__num b { color: var(--fg); font-weight: 500; letter-spacing: 0.12em; }
.pass__sinal { color: var(--orange); font-size: 9.5px; text-align: center; }
.pass__sinal:empty { display: none; }

/* ------------------------------- pedido --------------------------------- */

.bilhete { display: grid; gap: 12px; }
.bilhete__topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bilhete__num { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.12em; }
.bilhete__ordem { color: var(--fg-2); font-size: 14px; }
.bilhete__botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bilhete__botoes .btn { padding: 0 10px; }
.bilhete__link { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--fg); font-family: var(--f-mono); font-size: 11px; }

/* ------------------------------- portaria ------------------------------- */

.porta__camera {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-3);
}
.porta__camera video { width: 100%; height: 100%; object-fit: cover; }
.porta__mira { position: absolute; inset: 14%; border: 2px solid var(--fg); border-radius: 18px; opacity: 0.75; pointer-events: none; }
.porta__semcamera { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--fg-2); text-align: center; }
.porta__semcamera[hidden] { display: none; }

.porta__faixa {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  padding: 14px var(--gutter);
  background: var(--red);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.veredito {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  border: 0;
  color: #fff;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.veredito--sim { background: #0c7a3d; }
.veredito--nao { background: #b3141f; }
.veredito__palavra {
  font-family: var(--f-display);
  font-size: clamp(44px, 15vw, 120px);
  font-weight: 900;
  font-variation-settings: 'wdth' 70, 'wght' 900;
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}
.veredito__nome { font-size: clamp(20px, 5vw, 34px); font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.veredito__mais { font-size: clamp(15px, 3.4vw, 20px); opacity: 0.9; }
.veredito__toque { margin-top: 10px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; opacity: 0.75; text-transform: uppercase; }

.achados { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.achado {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: none;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.achado b { overflow-wrap: anywhere; }
.achado small { grid-column: 1; color: var(--fg-2); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; }
.achado .selo { grid-row: 1 / span 2; grid-column: 2; }

/* ------------------------------ organizador ----------------------------- */

.placar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .placar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.placar > div { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.placar dt { color: var(--fg-2); font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.placar dd { font-family: var(--f-display); font-size: 30px; font-weight: 800; font-variation-settings: 'wdth' 92, 'wght' 800; line-height: 1; }
.placar dd small { color: var(--fg-2); font-family: var(--f-text); font-size: 14px; font-variation-settings: normal; font-weight: 400; }

.barras { display: grid; gap: 10px; }
.barra { display: grid; gap: 6px; }
.barra__txt { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.barra__txt span:last-child { color: var(--fg-2); }
.barra__trilho { height: 8px; overflow: hidden; border-radius: 4px; background: var(--bg-3); }
.barra__trilho i { display: block; height: 100%; border-radius: 4px; background: var(--ramp); }

.org__grade { display: grid; gap: 18px; }
@media (min-width: 900px) { .org__grade { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.org__h { color: var(--fg-2); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; }
.org__filtros { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; }
.org__cortesia { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; align-items: end; }
.org__cortesia .btn { grid-column: 1 / -1; }

.lista { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.item { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.item__topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.item__nome { font-size: 16px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.item__meta { color: var(--fg-2); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; line-height: 1.7; }
.item__acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.item__acoes .btn { --h: 36px; padding: 0 14px; font-size: 10px; }
.btn--perigo { border-color: var(--red); color: var(--red); }

.leituras { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-family: var(--f-mono); font-size: 10.5px; line-height: 1.5; }
.leituras li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.leituras b { color: var(--fg); font-weight: 500; }
.leituras .ruim { color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  .pass__qr { transition: none; }
}
