/* Ingressos: escolha na compra, ingresso com QR code, painel e portaria. */

/* ---------- Escolha dos ingressos ---------- */
.ing-tipos { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.ing-tipo {
  display: grid; grid-template-columns: 1fr auto auto; gap: .9rem; align-items: center;
  padding: .9rem 1rem; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--surface);
}
.ing-tipo-off { opacity: .6; }
.ing-tipo-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ing-tipo-info strong { color: var(--titulo); font-size: 1.02rem; }
.ing-ultimos { color: #c0392b; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ing-tipo-preco { font-weight: 700; color: var(--titulo); white-space: nowrap; }
.ing-qtd { display: flex; align-items: center; gap: .35rem; }
.ing-qtd input {
  width: 3rem; text-align: center; font-size: 1.05rem; font-weight: 700; padding: .35rem .2rem;
  border: 1px solid var(--borda); border-radius: 6px; -moz-appearance: textfield;
}
.ing-qtd input::-webkit-outer-spin-button, .ing-qtd input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ing-qtd button {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--borda); background: var(--surface);
  font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--titulo);
}
.ing-qtd button:disabled { opacity: .35; cursor: default; }
@media (max-width: 520px) {
  .ing-tipo { grid-template-columns: 1fr auto; }
  .ing-qtd { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- Ingresso (QR code) ---------- */
.ing-cartao {
  max-width: 420px; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #fff; color: #10233f;
  box-shadow: 0 18px 40px rgba(16, 35, 63, .18); border: 1px solid #e3e8ef;
}
.ing-cartao-topo { background: #0f2a4d; color: #fff; padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .25rem; }
.ing-cartao-topo strong { font-size: 1.25rem; line-height: 1.2; }
.ing-cartao-topo span { font-size: .9rem; opacity: .85; }
.ing-marca { font-size: .7rem !important; letter-spacing: .18em; opacity: .7 !important; }
.ing-cartao-qr { padding: 1.4rem 1.4rem .6rem; text-align: center; border-bottom: 2px dashed #e3e8ef; }
.ing-cartao-qr svg { width: 100%; max-width: 260px; height: auto; display: block; margin: 0 auto; }
.ing-codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; margin: .6rem 0 0; }
.ing-carimbo { font-size: 1.6rem; font-weight: 900; color: #c0392b; border: 3px solid #c0392b; display: inline-block; padding: .3rem .8rem; transform: rotate(-4deg); margin: 1.5rem 0 .5rem; }
.ing-cartao-dados { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 1rem; padding: 1rem 1.4rem 0; margin: 0; }
.ing-cartao-dados dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6b7a90; }
.ing-cartao-dados dd { margin: 0 0 .4rem; font-weight: 700; }
.ing-instrucoes { white-space: pre-line; padding: 0 1.4rem; font-size: .9rem; color: #33445e; }
.ing-aviso { padding: 0 1.4rem 1.2rem; color: #6b7a90 !important; }
.ing-usado .ing-cartao-topo, .ing-cancelado .ing-cartao-topo { background: #5b6575; }
@media print {
  .topo, .rodape, header, footer, .ing-sem-impressao, .whats-flutuante, .area-menu { display: none !important; }
  body { background: #fff !important; }
  .ing-cartao { box-shadow: none; border: 1px solid #999; }
}

/* ---------- Painel ---------- */
.resumo-ingressos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.resumo-ingressos > div { border: 1px solid var(--borda); border-radius: var(--raio); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.resumo-ingressos strong { font-size: 1.5rem; color: var(--titulo); }
.acoes-cabecalho { display: flex; gap: .5rem; flex-wrap: wrap; }
.busca-admin { margin: 1rem 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.busca-admin input { flex: 1; min-width: 220px; }

/* ---------- Portaria ---------- */
.port-pagina { max-width: 560px; margin: 0 auto; padding: 1rem; }
.port-topo { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.port-topo > div { display: flex; flex-direction: column; min-width: 0; }
.port-topo small { color: var(--texto-suave); }
.port-titulo { font-size: 1.4rem; margin: .5rem 0 1rem; }
.port-eventos { display: grid; gap: .75rem; }
.port-evento {
  display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; border: 1px solid var(--borda); border-radius: var(--raio);
  background: var(--surface); color: inherit; text-decoration: none;
}
.port-evento:hover { border-color: var(--marca); text-decoration: none; }
.port-evento strong { font-size: 1.1rem; }
.port-evento small { color: var(--texto-suave); }
.port-evento-hoje { border-color: var(--marca); border-width: 2px; }
.port-evento-passado { opacity: .6; }
.port-evento-conta { font-weight: 700; margin-top: .3rem; }
.port-contador { text-align: center; font-size: 1.05rem; margin-bottom: .75rem; }
.port-contador strong { font-size: 1.6rem; }
.port-camera {
  position: relative; aspect-ratio: 1 / 1; background: #0b1424; border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.port-camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.port-mira {
  position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); display: none;
}
.port-camera-ligada .port-mira { display: block; }
.port-ligar { position: relative; z-index: 1; }
.port-camera-aviso { position: relative; z-index: 1; color: #fff; text-align: center; padding: 1rem; margin: 0; }
.port-resultado {
  margin-top: .75rem; border-radius: 16px; padding: 1.1rem 1rem; text-align: center; color: #fff;
  display: flex; flex-direction: column; gap: .25rem;
}
.port-resultado[hidden] { display: none; }
.port-resultado strong { font-size: 1.9rem; font-weight: 900; letter-spacing: .02em; }
.port-resultado span { font-size: 1.15rem; font-weight: 700; }
.port-resultado small { font-size: .95rem; opacity: .95; }
.port-ok { background: #1e8e3e; }
.port-nao { background: #c0392b; }
/* Ingresso válido esperando a decisão do porteiro */
.port-conferir { background: #fff; color: #10233f; border: 3px solid #1e8e3e; }
.port-conferir strong { color: #1e8e3e; }
.port-recusado { background: #5f6b7a; }
.port-resultado .port-resultado-descricao {
  font-style: normal; font-weight: 700; font-size: 1rem; background: #fff4d6; color: #6b4700;
  border-radius: 8px; padding: .4rem .6rem; margin: .25rem 0;
}
.port-resultado-descricao[hidden] { display: none; }
.port-acoes { display: grid; grid-template-columns: 1fr 1.4fr; gap: .6rem; margin-top: .8rem; }
.port-acoes[hidden] { display: none; }
.port-acoes-so-recusar { grid-template-columns: 1fr; }
.port-acoes-so-recusar .port-btn-aprovar { display: none; }
.port-btn { min-height: 60px; border: 0; border-radius: 12px; font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; }
.port-btn:disabled { opacity: .6; cursor: wait; }
.port-btn-aprovar { background: #1e8e3e; color: #fff; }
.port-btn-recusar { background: #c0392b; color: #fff; }
.port-nao .port-btn-recusar { background: #fff; color: #c0392b; }
.port-manual { display: flex; gap: .5rem; margin-top: 1rem; }
.port-manual input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.port-dica { text-align: center; margin-top: .75rem; }
