/* ═══════════════════════════════════════════════════════════════
   LIVEFEST — styles.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── VARIABLES ─── */
:root {
  --bg:      #0b0404;
  --bg2:     #170707;
  --bg3:     #230a0a;
  --border:  #5c1414;
  --text:    #f5e8e8;
  --text2:   #c9a0a0;
  --text3:   #8a5858;
  --y:       #e0111d;   /* rojo sangre — acento principal          */
  --g:       #3fa34d;   /* verde — positivo/éxito (check-in)       */
  --p:       #7a0c14;   /* carmesí oscuro — secundario             */
  --r:       #ff2e2e;   /* rojo intenso — peligro/urgencia         */
  --o:       #9c1414;   /* rojo óxido — acento oscuro              */
  --b:       #b33939;   /* rojo ladrillo — acento extra            */
}
.ig-link{
  color:#e0111d;
  text-decoration:none;
  font-weight:bold;
}

.ig-link:hover{
  text-decoration:underline;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; }
input, select { outline: none; }

/* ─── PARTICLES ─── */
#particles {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════
   FONDO — CASTILLO TENEBROSO (Halloween)
   ═══════════════════════════════════════ */
.castle-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url('img/castle-bg.jpg');
  background-repeat: no-repeat;
  background-position: center 18%;
  background-size: cover;
  background-attachment: fixed;
}
.castle-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
      rgba(11,4,4,.4) 0%,
      rgba(11,4,4,.6) 45%,
      var(--bg) 92%);
}

/* ═══════════════════════════════════════
   GUIRNALDA DE BANDERINES DEBAJO DEL HEADER
   ═══════════════════════════════════════ */
.halloween-bunting {
  position: fixed;
  top: 66px; left: 0; right: 0;
  height: 30px;
  z-index: 90;
  pointer-events: none;
  display: flex;
  justify-content: center;
  overflow: hidden;
  opacity: .92;
}
.halloween-bunting .bunting-row {
  display: flex;
  animation: buntingSway 3.6s ease-in-out infinite;
  transform-origin: top center;
  gap: 2px;
}
.bunting-flag {
  width: 0; height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 20px solid var(--o);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.35));
}
.bunting-flag:nth-child(4n+2) { border-top-color: var(--p); }
.bunting-flag:nth-child(4n+3) { border-top-color: var(--y); }
.bunting-flag:nth-child(4n)   { border-top-color: var(--b); }
@keyframes buntingSway {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.2deg); }
}
@media (max-width: 640px) {
  .halloween-bunting { height: 22px; }
  .bunting-flag { border-left-width: 10px; border-right-width: 10px; border-top-width: 14px; }
}

/* Capa de partículas mágicas (tsParticles) — polvo de brujería en los bordes */
.blood-particles-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right,
      #000 0%, #000 12%, transparent 26%, transparent 74%, #000 88%, #000 100%);
  mask-image: linear-gradient(to right,
      #000 0%, #000 12%, transparent 26%, transparent 74%, #000 88%, #000 100%);
}
.blood-particles-layer canvas { display: block; }

/* ═══════════════════════════════════════
   ICONOS HALLOWEEN FLOTANTES
   ═══════════════════════════════════════ */
.halloween-icon {
  filter: drop-shadow(0 0 6px rgba(224,17,29,.5));
}

/* ═══════════════════════════════════════
   TEXTOS FANTASMALES FLOTANTES
   ═══════════════════════════════════════ */
.spooky-texts {
  position: fixed;
  inset: 0;
  z-index: 56;
  pointer-events: none;
  overflow: hidden;
}
.spooky-text {
  position: absolute;
  bottom: -60px;
  font-family: 'Creepster', 'Bebas Neue', sans-serif;
  color: rgba(255, 192, 61, .9);
  text-shadow: 0 0 12px rgba(224,17,29,.75), 0 0 28px rgba(122,12,20,.65);
  letter-spacing: .04em;
  white-space: nowrap;
  animation-name: spookyFloat;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes spookyFloat {
  0%   { transform: translateY(0) rotate(var(--rot-start, -4deg)) scale(.85); opacity: 0; }
  12%  { opacity: .9; }
  50%  { transform: translateY(-52vh) rotate(var(--rot-mid, 3deg)) scale(1); }
  88%  { opacity: .55; }
  100% { transform: translateY(-108vh) rotate(var(--rot-end, -2deg)) scale(1.05); opacity: 0; }
}

/* ══════════════════════════════════════
   PUBLIC SITE
   ══════════════════════════════════════ */

#publicSite { position: relative; z-index: 1; }

/* HEADER */
.pub-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 28px 14px;
  background: rgba(11,4,4,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.pub-logo { display: flex; align-items: center; gap: 10px; }
.logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--y); }
.logo-text { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--y); letter-spacing: .08em; }
.admin-btn-tiny {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  font-size: .8rem;
  transition: all .2s;
}
.admin-btn-tiny:hover { border-color: var(--y); color: var(--y); }

/* ═══════════════════════════════════════
   TELARAÑAS EN BOTONES (solo sitio público) — dentro, en la esquina
   ═══════════════════════════════════════ */
#publicSite .cta-primary,
.admin-btn-tiny,
.tc-buy-btn {
  position: relative;
  overflow: hidden;
}
#publicSite .cta-primary::before,
.admin-btn-tiny::before,
.tc-buy-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 26px; height: 26px;
  background-image: url('img/cobweb.svg');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .55;
  pointer-events: none;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.6));
}
.admin-btn-tiny::before { width: 16px; height: 16px; }
.tc-buy-btn::before { width: 22px; height: 22px; }
#publicSite .cta-primary::before { top: 6px; left: 16px; width: 22px; height: 22px; }
@media (max-width: 640px) {
  #publicSite .cta-primary::before { top: 5px; left: 13px; width: 18px; height: 18px; }
  .tc-buy-btn::before { width: 18px; height: 18px; }
}

/* ═══════════════════════════════════════
   ARAÑAS COLGANTES
   ═══════════════════════════════════════ */
.hanging-spider {
  position: fixed;
  top: 0;
  z-index: 95;
  pointer-events: none;
  transform-origin: top center;
  animation: spiderSwing 5s ease-in-out infinite;
}
.spider1 { right: 10%; }
.spider2 { left: 7%; animation-duration: 6.3s; animation-delay: 1.1s; }
.spider-thread {
  width: 1px; height: 92px; margin: 0 auto;
  background: linear-gradient(to bottom, rgba(255,255,255,.55), rgba(255,255,255,.1));
}
.spider2 .spider-thread { height: 130px; }
.spider-body { animation: spiderBob 2.3s ease-in-out infinite; display: flex; justify-content: center; }
@keyframes spiderSwing { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes spiderBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (max-width: 640px) {
  .spider1 { right: 5%; }
  .spider2 { left: 4%; }
  .spider-thread { height: 54px; }
  .spider2 .spider-thread { height: 72px; }
  .hanging-spider svg { width: 16px; height: 16px; }
}

/* ═══════════════════════════════════════
   TELARAÑAS DECORATIVAS EN LAS ESQUINAS DEL HERO
   ═══════════════════════════════════════ */
.corner-web {
  position: absolute;
  top: 0;
  width: 140px; height: 140px;
  z-index: 2;
  pointer-events: none;
  opacity: .3;
  background-image: url('img/cobweb.svg');
  background-repeat: no-repeat;
  background-size: contain;
}
.corner-web-left { left: 0; }
.corner-web-right { right: 0; transform: scaleX(-1); }
@media (max-width: 640px) {
  .corner-web { width: 85px; height: 85px; }
}

/* ═══════════════════════════════════════
   NIEBLA / BRUMA EN EL HERO
   ═══════════════════════════════════════ */
.fog-layer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 240px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.fog {
  position: absolute;
  bottom: -50px;
  width: 160%;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(210,205,205,.14), transparent 70%);
  filter: blur(6px);
  animation: fogDrift 24s linear infinite;
}
.fog1 { left: -30%; animation-duration: 26s; }
.fog2 { left: -60%; bottom: -80px; opacity: .65; animation-duration: 34s; animation-direction: reverse; }
@media (max-width: 640px) {
  .fog-layer { height: 160px; }
  .fog { height: 160px; }
}
@keyframes fogDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(35%); }
}

/* HERO */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding-top: 70px;
}
.hero-bg-video { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.hero-bg-vid {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: .6;
  filter: saturate(1.05) contrast(1.05);
  /* el tinte rojo/sangre se aplica con hero-gradient-overlay encima,
     así el navegador no filtra cada fotograma en vivo → reproducción fluida en celular */
  transform: translateZ(0);
  will-change: transform;
}
.hero-bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: .55;
}
@media (max-width: 640px) {
  .hero-bg-vid, .hero-bg-img { object-position: center 30%; opacity: .48; }
}
.hero-gradient-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(11,4,4,.45) 0%, rgba(11,4,4,.35) 45%, rgba(11,4,4,.92) 100%),
    radial-gradient(ellipse at center, rgba(224,17,29,.18) 0%, rgba(11,4,4,0) 70%);
}
.hero-content-wrap {
  position: relative;
  text-align: center;
  padding: 40px 24px;
  max-width: 800px;
}
.floating-emojis { position: absolute; inset: 0; pointer-events: none; }
.fe {
  position: absolute;
  font-size: 1.8rem;
  animation: floatEmoji 6s ease-in-out infinite;
  opacity: .9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fe svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 8px rgba(224,17,29,.35)); }
.fe1 { top: 5%; left: 5%; animation-delay: 0s; }
.fe2 { top: 15%; right: 8%; animation-delay: 1s; }
.fe3 { top: 50%; left: 2%; animation-delay: 2s; }
.fe4 { bottom: 20%; left: 10%; animation-delay: 1.5s; }
.fe5 { bottom: 15%; right: 5%; animation-delay: .5s; }
.fe6 { top: 35%; right: 2%; animation-delay: 3s; }
@keyframes floatEmoji {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}
.hero-eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .2em;
  color: var(--y); margin-bottom: 18px;
  text-transform: uppercase;
}
.hero-title {
  font-family: 'Creepster', 'Bebas Neue', cursive;
  font-weight: 400;
  font-size: clamp(2.8rem, 11vw, 6.8rem);
  line-height: 1.08;
  letter-spacing: .02em;
  color: var(--text);
  margin-bottom: 22px;
  text-shadow:
    0 0 18px rgba(224,17,29,.45),
    0 0 55px rgba(224,17,29,.25),
    3px 4px 0 rgba(0,0,0,.55);
  animation: titleFlicker 5s linear infinite;
}
.hero-title-glow {
  color: var(--y);
  text-shadow:
    0 0 22px rgba(224,17,29,.9),
    0 0 55px rgba(224,17,29,.6),
    0 0 95px rgba(224,17,29,.35),
    3px 4px 0 rgba(0,0,0,.55);
}
@keyframes titleFlicker {
  0%, 19%, 21%, 23%, 54%, 56%, 100% { opacity: 1; }
  20%, 22%, 55% { opacity: .74; }
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text2);
  margin-bottom: 28px;
}
.hero-event-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}
.hem-item {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 18px;
  font-size: .88rem;
  color: var(--text2);
}
.hem-icon { font-size: 1rem; display:flex; align-items:center; }

/* Countdown */
.hero-countdown {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}
.cd-block { text-align: center; }
.cd-num {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 700;
  color: var(--y);
  text-shadow: 0 0 30px rgba(224,17,29,.35);
  line-height: 1;
}
.cd-lbl {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text3);
}
.cd-sep {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--border);
  padding-bottom: 12px;
  font-weight: 700;
}

/* CTA */
.hero-cta-row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cta-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--y), #9c1414);
  color: #000;
  font-weight: 800; font-size: 1.05rem;
  padding: 16px 32px;
  border-radius: 99px;
  text-decoration: none;
  box-shadow: 0 0 30px rgba(224,17,29,.3);
  transition: all .25s;
  border: none;
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(224,17,29,.5); }
.cta-emoji { font-size: 1.2rem; display:inline-flex; align-items:center; }
.cta-arrow { font-size: 1.1rem; }
.cta-urgency { font-size: .8rem; color: var(--r); font-weight: 600; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.full-w { width: 100%; justify-content: center; }
.hero-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  text-align: center; color: var(--text3); font-size: .7rem;
  letter-spacing: .1em;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--text3);
  border-bottom: 2px solid var(--text3);
  transform: rotate(45deg);
  margin: 6px auto 0;
  animation: scrollBounce 1.5s infinite;
}
@keyframes scrollBounce { 0%,100% { transform: rotate(45deg) translateY(0); } 50% { transform: rotate(45deg) translateY(6px); } }

/* ─── SECTIONS ─── */
.vibe-section, .boletas-section, .buy-form-section {
  padding: clamp(60px, 10vw, 110px) clamp(20px, 5vw, 60px);
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: .7rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 12px;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 1.05;
  margin-bottom: 14px;
}
.section-sub { color: var(--text2); font-size: 1rem; margin-bottom: 40px; }
.accent-y { color: var(--y); }
.accent-p { color: var(--p); }
.accent-g { color: var(--g); }

/* FLAYER SECTION */
.flayer-section {
  padding: clamp(60px, 10vw, 110px) clamp(20px, 5vw, 60px) 30px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.flayer-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}
.flayer-img {
  max-width: min(520px, 100%);
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  display: block;
}

/* VIBE GRID */
.vibe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 50px;
  border-radius: 20px;
  overflow: hidden;
}
.vg-big img, .vg-small img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.vg-big { border-radius: 16px 0 0 16px; overflow: hidden; min-height: 340px; }
.vg-small { display: flex; flex-direction: column; gap: 12px; }
.vg-small img { border-radius: 0; flex: 1; min-height: 160px; } .vg-small:first-child img { border-radius: 16px 0 0 0; } .vg-small:first-child img:last-child { border-radius: 0 0 0 16px; } .vg-small:last-child img:first-child { border-radius: 0 16px 0 0; } .vg-small:last-child img:last-child { border-radius: 0 0 16px 0; }
.vibe-features {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center;
}
.vf-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 20px;
}
.vfi-icon { font-size: 1.5rem; display:flex; align-items:center; justify-content:center; }
.vfi-text { font-weight: 600; font-size: .92rem; }

/* TICKET CARDS */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.ticket-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.ticket-card:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.tc-stripe {
  height: 5px;
  background: linear-gradient(90deg, var(--g), #2f8f46);
}
.tc-vip .tc-stripe { background: linear-gradient(90deg, var(--y), #ff2e2e); }
.tc-palco .tc-stripe { background: linear-gradient(90deg, var(--r), var(--p)); }
.tc-popular-badge {
  position: absolute; top: 18px; right: 18px;
  background: linear-gradient(135deg, var(--r), var(--p));
  color: #fff;
  font-size: .7rem; font-weight: 800;
  padding: 4px 12px; border-radius: 99px;
}
.tc-body { padding: 28px 24px; }
.tc-type { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.tc-desc { font-size: .88rem; color: var(--text2); margin-bottom: 20px; line-height: 1.5; }
.tc-price { font-size: 2rem; font-weight: 900; color: var(--text); }
.tc-price-sub { font-size: .75rem; color: var(--text3); margin-bottom: 20px; }
.tc-perks { list-style: none; margin-bottom: 24px; }
.tc-perks li { font-size: .85rem; color: var(--text2); padding: 5px 0; border-bottom: 1px solid var(--border); }
.tc-perks li::before { content: '✓ '; color: var(--g); font-weight: 700; }
.tc-buy-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--y), #9c1414);
  color: #000;
  font-weight: 800; font-size: 1rem;
  padding: 14px;
  border-radius: 12px;
  transition: all .2s;
}
.tc-buy-btn:hover { opacity: .9; transform: translateY(-1px); }
.tc-vip .tc-buy-btn { background: linear-gradient(135deg, var(--y), #9c1414); }

/* BUY NOTE */
.buy-note {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
  font-size: .88rem; color: var(--text2); line-height: 1.55;
}
.bn-icon { font-size: 1.5rem; display:flex; align-items:center; }

/* BUY FORM */
.buy-form-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px;
  max-width: 640px; margin: 0 auto;
}
.bfc-selected {
  background: rgba(224,17,29,.08);
  border: 1px solid rgba(224,17,29,.2);
  border-radius: 12px; padding: 14px 18px;
  font-weight: 600; font-size: .95rem;
  margin-bottom: 24px;
}
.bf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.bf-field { display: flex; flex-direction: column; gap: 6px; }
.bf-field.full { grid-column: 1 / -1; }
.bf-field label { font-size: .8rem; font-weight: 600; color: var(--text2); }
.bf-field input {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 11px 14px; font-size: .92rem; font-family: inherit;
  transition: border-color .2s;
}
.bf-field input:focus { border-color: var(--y); }
.back-link {
  display: block; text-align: center; margin-top: 14px;
  color: var(--text2); font-size: .88rem;
  background: none; text-decoration: none;
  transition: color .2s;
}
.back-link:hover { color: var(--y); }

/* FOOTER */
.pub-footer {
  text-align: center;
  padding: 50px 24px;
  border-top: 1px solid var(--border);
}
.pf-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem; color: var(--y); margin-bottom: 10px;
}
.pf-text { color: var(--text2); font-size: .95rem; margin-bottom: 6px; }
.pf-small { color: var(--text3); font-size: .8rem; }

/* ══════════════════════════════════════
   ADMIN LOGIN
   ══════════════════════════════════════ */
.overlay-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.login-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 30px;
  width: min(420px, 92vw);
  position: relative;
}
.lc-close {
  position: absolute; top: 16px; right: 16px;
  background: none; color: var(--text2); font-size: 1.1rem;
  transition: color .2s;
}
.lc-close:hover { color: var(--r); }
.lc-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem; color: var(--y);
  margin-bottom: 12px;
}
.lc-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.lc-sub { font-size: .85rem; color: var(--text2); margin-bottom: 24px; }
.lc-field { margin-bottom: 16px; }
.lc-field label { display: block; font-size: .8rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.lc-field input {
  width: 100%;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 12px 14px; font-size: .95rem; font-family: inherit;
  transition: border-color .2s;
}
.lc-field input:focus { border-color: var(--y); }
.lc-error { color: var(--r); font-size: .85rem; margin-bottom: 16px; }

/* ══════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════ */
#adminPanel {
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* TOPBAR */
.admin-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 24px 12px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.at-left { display: flex; align-items: center; gap: 12px; }
.at-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--y), #ff2e2e);
  color: #000; font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
}
.at-brand { font-weight: 800; font-size: 1rem; }
.at-tag { font-size: .72rem; color: var(--text2); }
.at-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,46,46,.12); border: 1px solid rgba(255,46,46,.3);
  color: var(--r); font-size: .72rem; font-weight: 800;
  padding: 5px 12px; border-radius: 99px;
}
.live-dot {
  width: 7px; height: 7px;
  background: var(--r); border-radius: 50%;
  animation: livePulse 1.2s infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
.ev-select {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px;
  padding: 7px 12px; font-size: .83rem; font-family: inherit;
}
.logout-btn {
  background: rgba(255,46,46,.12); border: 1px solid rgba(255,46,46,.3);
  color: var(--r); font-size: .82rem; font-weight: 600;
  padding: 7px 16px; border-radius: 9px; transition: all .2s;
}
.logout-btn:hover { background: rgba(255,46,46,.22); }
.admin-clock {
  font-family: 'Space Mono', monospace;
  font-size: .9rem; color: var(--text2);
}

/* NAV */
.admin-nav {
  display: flex; gap: 4px;
  padding: 10px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.an-btn {
  display: flex; align-items: center; gap: 7px;
  background: none;
  color: var(--text2);
  font-size: .82rem; font-weight: 600;
  padding: 8px 14px; border-radius: 9px;
  white-space: nowrap;
  transition: all .2s;
}
.an-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.an-btn:hover { background: var(--bg3); color: var(--text); }
.an-btn.active { background: rgba(224,17,29,.12); color: var(--y); }

/* CONTENT */
.admin-content { flex: 1; padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; }
.aview { display: none; }
.aview.active { display: block; }
.aview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.aview-header h1 { font-size: 1.6rem; font-weight: 800; }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  border-top: 3px solid transparent;
}
.sc-yellow { border-top-color: var(--y); }
.sc-green  { border-top-color: var(--g); }
.sc-purple { border-top-color: var(--p); }
.sc-red    { border-top-color: var(--r); }
.sca-num { font-size: 2rem; font-weight: 900; line-height: 1; margin-bottom: 6px; }
.sc-yellow .sca-num { color: var(--y); }
.sc-green  .sca-num { color: var(--g); }
.sc-purple .sca-num { color: var(--p); }
.sc-red    .sca-num { color: var(--r); }
.sca-lbl { font-size: .78rem; color: var(--text2); font-weight: 600; }

/* ADMIN CARD */
.admin-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  margin-bottom: 18px;
}
.ac-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ac-title { font-size: .92rem; font-weight: 700; }
.ac-badge {
  font-size: .82rem; font-weight: 700; color: var(--y);
  background: rgba(224,17,29,.1); border: 1px solid rgba(224,17,29,.2);
  padding: 3px 12px; border-radius: 99px;
}

/* PROGRESS */
.prog-track {
  height: 8px; background: var(--bg3);
  border-radius: 99px; position: relative; overflow: visible;
}
.prog-fill {
  height: 100%; background: linear-gradient(90deg, var(--y), var(--g));
  border-radius: 99px; transition: width .6s ease;
}
.prog-glow {
  position: absolute; top: 50%; transform: translate(-50%,-50%);
  width: 18px; height: 18px;
  background: var(--y); border-radius: 50%;
  box-shadow: 0 0 14px var(--y);
  transition: left .6s ease;
}

/* TYPE STATS GRID */
.type-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.tsg-item {
  background: var(--bg3); border-radius: 12px; padding: 14px;
}
.tsg-name { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.tsg-count { font-size: 1.5rem; font-weight: 900; line-height: 1; }
.tsg-sub { font-size: .72rem; color: var(--text3); margin-bottom: 8px; }
.tsg-bar { height: 4px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.tsg-fill { height: 100%; border-radius: 99px; transition: width .4s; }

/* RECENT FEED */
.recent-feed { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feed-item { display: flex; align-items: center; gap: 12px; }
.fi-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.fi-info { flex: 1; min-width: 0; }
.fi-name { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-meta { font-size: .75rem; color: var(--text2); }
.fi-time { font-family: 'Space Mono', monospace; font-size: .78rem; color: var(--text3); }
.empty-feed { color: var(--text3); font-size: .85rem; padding: 12px 0; }

/* EXPORT BTN */
.export-btn {
  background: rgba(63,163,77,.1); border: 1px solid rgba(63,163,77,.25);
  color: var(--g); font-size: .83rem; font-weight: 700;
  padding: 8px 18px; border-radius: 9px; transition: all .2s;
}
.export-btn:hover { background: rgba(63,163,77,.2); }

/* LIST CONTROLS */
.list-controls { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.lc-search {
  flex: 1; min-width: 200px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 10px 16px; font-size: .9rem; font-family: inherit;
  transition: border-color .2s;
}
.lc-search:focus { border-color: var(--y); }
.lc-filter {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 10px 12px; font-size: .88rem; font-family: inherit;
}

/* BUYERS TABLE */
.buyers-table-wrap { }
.buyers-list { display: flex; flex-direction: column; gap: 10px; }
.buyer-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  transition: border-color .2s;
}
.buyer-row:hover { border-color: var(--text3); }
.buyer-row.paid { border-left: 3px solid var(--g); }
.buyer-row.unpaid { border-left: 3px solid var(--o); }
.br-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg3); color: var(--y);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; flex-shrink: 0;
}
.br-info { flex: 1; min-width: 0; }
.br-name { font-weight: 700; font-size: .95rem; margin-bottom: 2px; }
.br-sub { font-size: .78rem; color: var(--text2); margin-bottom: 2px; }
.br-meta { font-size: .75rem; color: var(--text3); }
.br-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.type-badge {
  font-size: .72rem; font-weight: 800; padding: 3px 12px;
  border-radius: 99px; letter-spacing: .06em;
}
.tb-VIP      { background: rgba(224,17,29,.12); color: var(--y); border: 1px solid rgba(224,17,29,.25); }
.tb-General  { background: rgba(63,163,77,.12);  color: var(--g); border: 1px solid rgba(63,163,77,.25); }
.tb-Palco    { background: rgba(255,46,46,.12); color: var(--r); border: 1px solid rgba(255,46,46,.25); }
.tb-Cortesía { background: rgba(201,97,255,.12); color: var(--p); border: 1px solid rgba(201,97,255,.25); }
.tb-Staff    { background: rgba(255,124,42,.12); color: var(--o); border: 1px solid rgba(255,124,42,.25); }
.payment-badge {
  font-size: .72rem; font-weight: 700; padding: 4px 12px;
  border-radius: 99px; cursor: pointer; transition: opacity .2s;
}
.payment-badge:hover { opacity: .75; }
.pb-paid    { background: rgba(63,163,77,.15); color: var(--g); border: 1px solid rgba(63,163,77,.3); }
.pb-pending { background: rgba(255,124,42,.15); color: var(--o); border: 1px solid rgba(255,124,42,.3); }
.br-actions { display: flex; gap: 6px; }
.br-btn {
  font-size: .75rem; font-weight: 700;
  padding: 5px 12px; border-radius: 7px;
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border);
  transition: all .2s;
}
.br-btn:hover { border-color: var(--text3); color: var(--text); }
.br-btn-checkin { background: rgba(63,163,77,.1); color: var(--g); border-color: rgba(63,163,77,.3); }
.br-btn-checkin:hover { background: rgba(63,163,77,.2); }
.br-btn-del { background: rgba(255,46,46,.1); color: var(--r); border-color: rgba(255,46,46,.3); }
.br-btn-del:hover { background: rgba(255,46,46,.2); }

/* ─ QR button in buyers table ─ */
.br-btn-qr {
  background: rgba(201,97,255,.12);
  color: var(--p);
  border: 1px solid rgba(201,97,255,.3);
  font-size: .75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 7px;
  transition: all .2s;
}
.br-btn-qr:hover { background: rgba(201,97,255,.22); }

.empty-list { color: var(--text3); font-size: .88rem; text-align: center; padding: 24px 0; }

/* ACCESS VIEW */
.search-wrap { margin-bottom: 20px; }
.search-field {
  position: relative;
  display: flex; align-items: center;
}
.sf-icon {
  position: absolute; left: 14px;
  width: 18px; height: 18px;
  stroke: var(--text3); fill: none; stroke-width: 2;
  stroke-linecap: round;
}
.search-field input {
  width: 100%;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: 12px;
  padding: 14px 50px 14px 44px;
  font-size: 1rem; font-family: inherit;
  transition: border-color .2s;
}
.search-field input:focus { border-color: var(--y); }
.sf-clear {
  position: absolute; right: 14px;
  background: none; color: var(--text3);
  font-size: 1rem; transition: color .2s;
}
.sf-clear:hover { color: var(--r); }
.search-results-list { display: flex; flex-direction: column; gap: 8px; }
.sri {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px;
  cursor: pointer; transition: border-color .2s;
}
.sri:hover { border-color: var(--y); }
.sri-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg3); color: var(--y);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.sri-info { flex: 1; min-width: 0; }
.sri-name { font-weight: 600; font-size: .9rem; }
.sri-sub { font-size: .75rem; color: var(--text2); }
.status-in  { font-size: .75rem; font-weight: 700; color: var(--g); }
.status-out { font-size: .75rem; font-weight: 700; color: var(--o); }
.access-hint {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px; color: var(--text3); text-align: center;
  gap: 12px;
}
.ah-icon { font-size: 2.5rem; display:flex; align-items:center; justify-content:center; }
.ah-text { font-size: .9rem; line-height: 1.6; }
.rp-found { }
.rp-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
}
.rp-not-found {
  background: rgba(255,46,46,.08); border: 1px solid rgba(255,46,46,.2);
  border-radius: 12px; padding: 18px 20px;
  color: var(--r); font-size: .9rem;
}
.rp-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.rp-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--y), var(--p));
  color: #000; font-weight: 900; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.rp-name { font-size: 1.2rem; font-weight: 800; }
.rp-detail { font-size: .82rem; color: var(--text2); }
.rp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.rp-tag {
  background: var(--bg3); border-radius: 8px;
  padding: 6px 12px; font-size: .8rem;
}
.rp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-checkin-big {
  background: linear-gradient(135deg, var(--g), #2f8f46);
  color: #000; font-weight: 800; font-size: .95rem;
  padding: 12px 24px; border-radius: 10px;
  transition: opacity .2s;
}
.btn-checkin-big:hover { opacity: .85; }
.btn-already { font-size: .88rem; color: var(--g); font-weight: 600; padding: 12px 0; }
.fg-btn-secondary {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 10px;
  transition: all .2s;
}
.fg-btn-secondary:hover { border-color: var(--text3); color: var(--text); }

/* EVENTS */
.event-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.event-item:last-child { border-bottom: none; }
.ev-name { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.ev-meta { font-size: .8rem; color: var(--text2); margin-bottom: 4px; line-height: 1.5; }
.ev-prices { font-size: .78rem; color: var(--text3); }
.ev-del-btn {
  background: rgba(255,46,46,.1); border: 1px solid rgba(255,46,46,.2);
  color: var(--r); font-size: .8rem; font-weight: 600;
  padding: 6px 14px; border-radius: 8px; flex-shrink: 0;
  transition: all .2s;
}
.ev-del-btn:hover { background: rgba(255,46,46,.22); }
.fg-actions { margin-top: 16px; }

/* REPORT */
.report-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.rt-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
.rt-name { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.rt-count { font-size: 2rem; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.rt-sub { font-size: .75rem; color: var(--text3); margin-bottom: 10px; }
.rt-bar { height: 5px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.rt-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.timeline-feed { display: flex; flex-direction: column; gap: 8px; }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.tl-t { font-family: 'Space Mono', monospace; font-size: .78rem; color: var(--text3); min-width: 50px; }
.tl-n { flex: 1; font-size: .85rem; }

/* CHECK-IN MODAL */
.checkin-success { text-align: center; padding: 24px; }
.cs-emoji { font-size: 3.5rem; display: block; margin-bottom: 12px; }
.cs-title { font-size: 1.3rem; font-weight: 900; color: var(--g); margin-bottom: 10px; }
.cs-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }
.cs-btn {
  background: var(--g); color: #000;
  font-weight: 800; font-size: 1rem;
  padding: 12px 32px; border-radius: 10px;
  margin-top: 10px;
}

/* MODAL */
.modal-bg {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-bg.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px;
  width: min(480px, 92vw);
  transform: scale(.95);
  transition: transform .3s;
}
.modal-bg.open .modal-box { transform: scale(1); }

/* TOAST */
.toast {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-size: .88rem; font-weight: 600;
  padding: 12px 24px; border-radius: 99px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: all .3s; z-index: 9999; white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-color: rgba(63,163,77,.4); color: var(--g); }
.toast-error   { border-color: rgba(255,46,46,.4); color: var(--r); }
.toast-info    { border-color: rgba(179,57,57,.3); color: var(--b); }

/* ══════════════════════════════════════
   QR MODAL
   ══════════════════════════════════════ */
.qr-modal-box {
  width: min(440px, 94vw);
  padding: 0;
  overflow: hidden;
  position: relative;
}
.qr-close-btn {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); width: 32px; height: 32px;
  border-radius: 50%; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.qr-close-btn:hover { color: var(--r); border-color: var(--r); }
.qr-modal-inner { padding: 28px 24px 24px; text-align: center; }
.qr-modal-header {
  background: linear-gradient(135deg, #3a0a0a, #0b0404);
  margin: -28px -24px 0;
  padding: 28px 24px 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.qrm-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; color: var(--y);
  margin-bottom: 4px;
}
.qrm-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.qrm-sub { font-size: .82rem; color: var(--text2); }
.qrm-name { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; }
.qrm-badge {
  display: inline-block;
  font-size: .78rem; font-weight: 800;
  padding: 4px 18px; border-radius: 99px;
  margin-bottom: 8px; letter-spacing: .05em;
}
.qrm-code {
  font-family: 'Space Mono', monospace;
  font-size: .85rem; color: var(--text3);
  margin-bottom: 18px;
}
.qr-code-box {
  display: inline-block;
  background: #ffffff;
  padding: 12px; border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.qr-code-box img, .qr-code-box canvas {
  display: block;
  border-radius: 6px;
}
.qrm-detail {
  font-size: .8rem; color: var(--text2);
  margin-bottom: 20px; line-height: 1.7;
}
.qrm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.qrm-btn-pdf {
  background: linear-gradient(135deg, var(--p), #b33939);
  color: #fff; font-weight: 800; font-size: .9rem;
  padding: 11px 24px; border-radius: 10px;
  transition: opacity .2s;
}
.qrm-btn-pdf:hover { opacity: .85; }
.qrm-btn-sec {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: .88rem;
  padding: 11px 20px; border-radius: 10px;
  transition: all .2s;
}
.qrm-btn-sec:hover { border-color: var(--text3); color: var(--text); }

/* ══════════════════════════════════════
   ESCÁNER QR
   ══════════════════════════════════════ */
.scanner-status-badge {
  font-size: .78rem; font-weight: 700;
  color: var(--text3);
  padding: 5px 14px; border-radius: 99px;
  background: var(--bg3); border: 1px solid var(--border);
}
.scanner-card { }
.scanner-container { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.scanner-frame {
  position: relative;
  width: 100%; max-width: 420px;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg3);
  border: 2px solid var(--border);
}
#scannerVideo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.scanner-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
}
.scan-corner {
  position: absolute;
  width: 28px; height: 28px;
  border-color: var(--y);
  border-style: solid;
}
.scan-corner.tl { top: 16px; left: 16px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.scan-corner.tr { top: 16px; right: 16px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.scan-corner.bl { bottom: 16px; left: 16px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.scan-corner.br { bottom: 16px; right: 16px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }
.scan-line {
  position: absolute;
  left: 20px; right: 20px;
  top: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--y), transparent);
  opacity: 0;
}
.scan-line.scanning {
  opacity: 1;
  animation: scanMove 2s ease-in-out infinite;
}
@keyframes scanMove {
  0%   { top: 20%; }
  50%  { top: 80%; }
  100% { top: 20%; }
}
.scanner-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
}
.sp-icon { font-size: 3rem; opacity: .4; display:flex; align-items:center; justify-content:center; color:#fff; }
.sp-text { font-size: .85rem; color: var(--text3); }
.scanner-controls { display: flex; gap: 10px; }
.scan-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .88rem;
  padding: 11px 22px; border-radius: 10px;
  transition: all .2s;
}
.scan-start {
  background: linear-gradient(135deg, var(--g), #2f8f46);
  color: #000;
}
.scan-start:hover { opacity: .88; }
.scan-stop {
  background: rgba(255,46,46,.15); border: 1px solid rgba(255,46,46,.3);
  color: var(--r);
}
.scan-stop:hover { background: rgba(255,46,46,.25); }
.scan-hint { text-align: center; color: var(--text3); font-size: .85rem; padding: 10px 0 4px; line-height: 1.6; }

/* Scan result */
#scanResultArea { width: 100%; margin-top: 8px; }
.scan-result {
  text-align: center; border-radius: 14px; padding: 22px 20px;
  animation: fadeInUp .35s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.scan-result-ok   { background: rgba(63,163,77,.08); border: 1.5px solid rgba(63,163,77,.3); }
.scan-result-error{ background: rgba(255,46,46,.08); border: 1.5px solid rgba(255,46,46,.3); }
.scan-result-warn { background: rgba(255,124,42,.08); border: 1.5px solid rgba(255,124,42,.3); }
.scan-result-dup  { background: rgba(136,136,136,.08); border: 1.5px solid rgba(136,136,136,.3); }
.sr-icon { font-size: 2.8rem; margin-bottom: 8px; }
.sr-title { font-size: 1.15rem; font-weight: 900; margin-bottom: 6px; }
.scan-result-ok    .sr-title { color: var(--g); }
.scan-result-error .sr-title { color: var(--r); }
.scan-result-warn  .sr-title { color: var(--o); }
.scan-result-dup   .sr-title { color: #888; }
.sr-sub { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.sr-badge {
  display: inline-block; border: 1.5px solid;
  font-size: .78rem; font-weight: 800;
  padding: 3px 16px; border-radius: 99px;
  margin-bottom: 8px;
}
.sr-detail { font-size: .8rem; color: var(--text2); }

/* Scanner log */
.scanner-log { display: flex; flex-direction: column; gap: 8px; }
.sl-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.sl-icon { font-size: 1.2rem; flex-shrink: 0; }
.sl-info { flex: 1; min-width: 0; }
.sl-name { font-size: .88rem; font-weight: 600; display: block; }
.sl-meta { font-size: .73rem; color: var(--text3); }
.sl-right { text-align: right; flex-shrink: 0; }
.sl-label { display: block; font-size: .75rem; font-weight: 700; }
.sl-time { font-size: .72rem; color: var(--text3); font-family: 'Space Mono', monospace; }

/* ─── RESPONSIVE ─── */
@media (max-width: 700px) {
  .vibe-grid { grid-template-columns: 1fr; }
  .vg-big, .vg-small { min-height: 200px; }
  .vg-small { flex-direction: row; }
  .bf-grid { grid-template-columns: 1fr; }
  .bf-field.full { grid-column: 1; }
  .buyer-row { flex-wrap: wrap; }
  .admin-topbar { padding: 10px 14px; }
  .admin-content { padding: 14px; }
  .admin-nav { padding: 8px 10px; }
  .an-btn span { display: none; }
  .an-btn { padding: 8px 10px; }
}

/* Ajustes extra para celulares pequeños */
@media (max-width: 480px) {
  .toast { white-space: normal; text-align: center; font-size: .82rem; padding: 10px 18px; }
  .cta-primary { padding: 14px 22px; font-size: .95rem; }
  .pub-header { padding-left: 16px; padding-right: 16px; }
  .admin-content { padding: 10px; }
  .modal-box, .qr-modal-box { width: calc(100vw - 24px); max-width: calc(100vw - 24px); }
  .logo-text { font-size: 1.25rem; }
}

/* Que el contenido ancho (tablas, código) no fuerce scroll horizontal de toda la página */
.buyers-table, .admin-content { max-width: 100%; }
.admin-content { overflow-x: hidden; }
