/* Logística — Hallelujah Party 2026 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--fem-font-body);
  background-color: var(--fem-bg);
  color: var(--fem-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  width: 100%;
}

header h1 {
  margin: 0;
}

.container {
  width: 90%;
  max-width: 450px;
  margin: 24px auto 40px;
  text-align: center;
}

.container.is-hidden {
  display: none;
}

/* ——— Login (mismo patrón que registro) ——— */
#login-panel {
  text-align: center;
  background: var(--fem-bg-card);
  border: 1px solid var(--fem-border);
  border-radius: 12px;
  padding: 28px 22px 24px;
  box-shadow: 0 8px 28px var(--fem-shadow, rgba(10, 10, 10, 0.12));
}

#login-panel.is-hidden {
  display: none;
}

.login-hint {
  color: var(--fem-text-muted);
  font-size: 0.85rem;
  margin: 0 0 18px;
  line-height: 1.45;
  text-align: center;
}

#login-panel .login-hint--after {
  margin-top: 16px;
  margin-bottom: 0;
}

#login-panel .form-group {
  margin-bottom: 18px;
  text-align: center;
}

#login-panel .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--fem-btn);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

#pass-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid var(--fem-border);
  background-color: var(--fem-bg-soft);
  color: var(--fem-text);
  font-size: 1.25rem;
  letter-spacing: 4px;
  text-align: center;
  font-family: var(--fem-font-body);
}

#pass-input:focus {
  outline: none;
  border-color: var(--fem-accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 67, 0.28);
}

.btn-submit {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: var(--fem-btn);
  color: var(--fem-btn-text, #ffffff);
  font-family: var(--fem-font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-submit:hover {
  background: var(--fem-btn-hover);
}

#manual-id,
.claim-controls input[type="number"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid var(--fem-border);
  background-color: var(--fem-bg-card);
  color: var(--fem-text);
  font-size: 1.05rem;
  text-align: center;
  font-family: var(--fem-font-body);
}

#manual-id:focus,
.claim-controls input[type="number"]:focus {
  outline: none;
  border-color: var(--fem-accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 67, 0.28);
}

/* ——— Botones ——— */
.btn-iniciar,
.btn-reset,
.claim-controls button {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 18px;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: var(--fem-btn);
  color: var(--fem-btn-text, #ffffff);
  font-family: var(--fem-font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 48px;
}

.btn-iniciar:hover,
.btn-reset:hover,
.claim-controls button:hover {
  background: var(--fem-btn-hover);
}

.btn-secundario {
  background: var(--fem-bg-soft) !important;
  color: var(--fem-text) !important;
  margin-top: 12px;
  border: 1px solid var(--fem-border) !important;
}

.btn-secundario:hover {
  background: var(--fem-accent-soft) !important;
}

.btn-reset {
  margin-top: 20px;
  display: none;
}

/* ——— Escáner y código manual ——— */
.manual-box {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px dashed var(--fem-border);
}

.manual-box label {
  display: block;
  color: var(--fem-text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.45;
}

#scanner-panel {
  position: relative;
}

/* ——— Escáner QR ——— */
.reader-wrap {
  width: 100%;
  margin-bottom: 16px;
}

.reader-wrap[hidden] {
  display: none !important;
}

.reader-viewport {
  position: relative;
  width: 100%;
  min-height: 280px;
  border: 2px solid var(--fem-accent);
  border-radius: 14px;
  overflow: hidden;
  background: var(--fem-dark, #161a14);
  box-shadow: 0 10px 28px var(--fem-shadow, rgba(18, 21, 15, 0.18));
}

#reader {
  width: 100%;
  min-height: 280px;
}

#reader video {
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
  display: block;
}

#reader img[alt="Info icon"],
#reader__dashboard_section_csr span,
#reader__scan_region img {
  display: none !important;
}

/* Esquinas nativas de html5-qrcode → verde neón SOG */
#qr-shaded-region {
  border-color: rgba(10, 10, 10, 0.55) !important;
}

#qr-shaded-region > div {
  background-color: #B8E62E !important;
  box-shadow: 0 0 10px rgba(184, 230, 46, 0.9) !important;
}

.reader-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px;
  box-sizing: border-box;
}

.reader-scan-box {
  position: relative;
  width: min(72vw, 240px);
  height: min(72vw, 240px);
  flex-shrink: 0;
  overflow: hidden;
}

.reader-scan-line {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: #B8E62E;
  box-shadow:
    0 0 8px #B8E62E,
    0 0 18px rgba(184, 230, 46, 0.85);
  animation: reader-scan-sweep 2.2s ease-in-out infinite;
  will-change: transform;
}

@keyframes reader-scan-sweep {
  0% {
    transform: translateY(10px);
    opacity: 0.55;
  }
  50% {
    transform: translateY(220px);
    opacity: 1;
  }
  100% {
    transform: translateY(10px);
    opacity: 0.55;
  }
}

.reader-hint {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 21, 15, 0.62);
  color: #eef1e6;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(18, 21, 15, 0.45);
}

.btn-cerrar-camara {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0 16px;
  height: 46px;
  border: 1px solid var(--fem-border);
  border-radius: 8px;
  background: var(--fem-bg-soft);
  color: var(--fem-text);
  font-family: var(--fem-font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-cerrar-camara:hover {
  background: var(--fem-accent-soft);
  border-color: var(--fem-btn);
  color: var(--fem-btn);
}

.scan-loading {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 18, 18, 0.52);
  backdrop-filter: blur(4px);
}

html.sog-dark .scan-loading {
  background: rgba(18, 18, 18, 0.78);
}

.scan-loading[hidden] {
  display: none !important;
}

.scan-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 32px;
  border-radius: 16px;
  background: var(--fem-bg-card);
  border: 1px solid var(--fem-border);
  box-shadow: 0 16px 40px var(--fem-shadow, rgba(10, 10, 10, 0.2));
  min-width: 200px;
}

.scan-loading-mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  animation: sog-loading-pulse 1.15s ease-in-out infinite;
}

.scan-loading-mark--dark {
  display: none;
}

html.sog-dark .scan-loading-mark--light {
  display: none;
}

html.sog-dark .scan-loading-mark--dark {
  display: block;
}

@keyframes sog-loading-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.scan-loading-inner p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fem-text);
  text-align: center;
}

/* ——— Conteo en vivo de manillas ——— */
.live-manillas {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #142033;
  border-bottom: 2px solid #B8E62E;
  color: #e8eef5;
  padding: 10px 14px;
}

html:not(.sog-dark) .live-manillas {
  background: #1a2740;
}

.live-manillas-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-manillas-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.live-manillas-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.live-manillas-main strong {
  font-size: 1.85rem;
  font-weight: 900;
  color: #B8E62E;
  line-height: 1;
}

.live-manillas-sep {
  opacity: 0.45;
  font-size: 1.2rem;
}

#live-entradas {
  font-size: 1.15rem;
  font-weight: 700;
}

.live-manillas-pct {
  margin-left: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #B8E62E;
}

.live-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  margin-left: 8px;
}

.live-pill strong {
  font-weight: 900;
  margin-left: 4px;
}

.live-pill.is-pend {
  border-color: #f0a060;
  color: #ffd2a8;
}

.live-loc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px) {
  .live-loc-grid {
    grid-template-columns: 1fr;
  }
}

.live-loc {
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.live-loc.is-vip {
  border-color: #e8b84a;
  background: rgba(232, 184, 74, 0.12);
}

.live-loc.is-general {
  border-color: #6b849e;
  background: rgba(107, 132, 158, 0.14);
}

.live-loc-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.95;
}

.live-loc.is-vip .live-loc-name {
  color: #ffe6a8;
}

.live-loc.is-general .live-loc-name {
  color: #d5e2ef;
}

.live-loc-nums {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.live-loc-nums span {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.85;
}

.live-loc-nums em {
  font-style: normal;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

.live-loc-nums strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}

body.is-login .live-manillas {
  display: none !important;
}

/* ——— Resultado del ticket ——— */
.result-box {
  margin-top: 10px;
  padding: 22px 18px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  display: none;
  text-align: left;
  border: 1px solid var(--fem-border);
  background: var(--fem-bg-card);
}

.result-box.success {
  background: var(--fem-ok-soft);
  border-color: var(--fem-ok);
  color: var(--fem-ok-on-soft);
}

.result-box.error {
  background: var(--fem-danger-soft);
  border-color: var(--fem-danger);
  color: var(--fem-danger-on-soft);
}

.result-box.duplicado {
  background: var(--fem-warn-soft);
  border-color: var(--fem-accent);
  color: var(--fem-warn-on-soft);
}

.result-box.found {
  background: var(--fem-bg-card);
  border-color: var(--fem-btn);
  color: var(--fem-text);
}

.result-message {
  text-align: center;
  font-size: 1.15rem;
}

.info-txt {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--fem-text-muted);
  line-height: 1.55;
}

.loc-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid transparent;
  text-align: center;
}

.orden-id-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px dashed var(--fem-btn);
  background: rgba(184, 230, 46, 0.12);
  text-align: center;
}

.orden-id-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fem-text-muted);
}

.orden-id-value {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--fem-text);
  word-break: break-all;
  line-height: 1.25;
}

.loc-badge-kind {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.loc-badge-name {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.92;
}

.loc-badge.is-vip {
  background: #5c3d08;
  border-color: #e8b84a;
  color: #ffe6a8;
}

.loc-badge.is-general {
  background: #1e2a38;
  border-color: #6b849e;
  color: #d5e2ef;
}

html:not(.sog-dark) .loc-badge.is-vip {
  background: #fff4d6;
  border-color: #c9921a;
  color: #6b4500;
}

html:not(.sog-dark) .loc-badge.is-general {
  background: #e8eef5;
  border-color: #5a7390;
  color: #243447;
}

.loc-inline {
  font-weight: 800;
}

.loc-inline.is-vip {
  color: #c9921a;
}

.loc-inline.is-general {
  color: var(--fem-btn);
}

html.sog-dark .loc-inline.is-vip {
  color: #e8b84a;
}

.destacado-cantidad {
  font-size: 1.35rem;
  color: var(--fem-btn);
  font-weight: 800;
}

.claim-controls {
  margin-top: 16px;
  display: none;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.claim-qty-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.claim-controls label,
.claim-ninos-label {
  width: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fem-text);
  text-align: left;
  margin: 0;
}

.claim-controls input[type="number"] {
  width: 88px;
  flex: 0 0 88px;
}

.claim-controls button {
  flex: 1;
  min-width: 140px;
  width: auto;
}

.claim-ninos-wrap {
  width: 100%;
  text-align: left;
}

.claim-ninos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 8px;
}

.claim-nino-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--fem-border);
  border-radius: 8px;
  background: var(--fem-bg-card);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fem-text);
  cursor: pointer;
}

.claim-nino-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: var(--fem-btn, #003);
  cursor: pointer;
}

.claim-ninos-count {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--fem-text);
}

.claim-nino-item.is-done {
  opacity: 0.72;
  background: var(--fem-bg-soft, #f5f0e6);
  cursor: default;
}

.claim-nino-item.is-done span {
  text-decoration: line-through;
  color: var(--fem-text-muted, #6b6258);
}

.claim-nino-tag {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fem-text-muted, #6b6258);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.claim-qty-wrap.is-hidden,
.claim-ninos-wrap.is-hidden {
  display: none !important;
}
