:root {
  --bg: #0e0e10;
  --card: #18181b;
  --line: #2a2a2f;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #d4ff3a;
  --accent-ink: #111;
  --ok: #3ddc84;
  --err: #ff6b6b;
  --radius: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 32px 16px; }
.wrap { width: 100%; max-width: 420px; }
.wrap.wide { max-width: 900px; }
.brand { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
h1 { font-size: 30px; line-height: 1.1; margin: 0 0 24px; letter-spacing: -.02em; }
h2 { font-size: 20px; margin: 0 0 6px; }
p { color: var(--muted); line-height: 1.5; margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--input, #0f0f12);
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; outline: none;
}
input:focus { border-color: var(--accent); }
input.code { font-size: 28px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
button {
  font: inherit; font-weight: 600; font-size: 16px; border: 0; border-radius: 10px; padding: 13px 16px;
  cursor: pointer; width: 100%; margin-top: 14px; background: var(--accent); color: var(--accent-ink);
}
button:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
button.link { background: none; color: var(--muted); width: auto; padding: 0; margin: 0; font-weight: 500; text-decoration: underline; font-size: 14px; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.user { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.user img { width: 28px; height: 28px; border-radius: 50%; }
.user .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg { font-size: 14px; margin-top: 12px; min-height: 1em; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.devbox { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.devbox input { margin-bottom: 8px; font-size: 15px; padding: 10px 12px; }
.badge { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.ticket { text-align: center; padding: 8px 0; }
.ticket .check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 34px; margin: 0 auto 16px; }
.ticket .phone { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.hidden { display: none !important; }
#gbtn { display: flex; justify-content: center; min-height: 44px; }

/* Panel de puerta */
.card.wa { margin-bottom: 14px; }
.card.wa .row { align-items: flex-start; }
.badge.ok { background: rgba(61,220,132,.15); color: var(--ok); }
.badge.bad { background: rgba(255,107,107,.15); color: var(--err); }
.steps { color: var(--muted); font-size: 14px; line-height: 1.6; padding-left: 20px; margin: 16px 0 12px; }
.steps b { color: var(--text); font-weight: 600; }
#waQr { display: block; width: 260px; height: 260px; background: #fff; border-radius: 12px; padding: 10px; image-rendering: pixelated; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 200px; }
.toolbar button, .toolbar a.btn { width: auto; margin: 0; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; font-weight: 500; font-size: 15px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.stats { display: flex; gap: 12px; margin-bottom: 14px; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .who { flex: 1; min-width: 0; }
.item .who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .who span { font-size: 13px; color: var(--muted); }
.item button { width: auto; margin: 0; padding: 9px 14px; font-size: 14px; white-space: nowrap; }
.item.in { opacity: .55; }
.item.in button { background: transparent; color: var(--ok); border: 1px solid var(--ok); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

.toplink { color: var(--muted); font-size: 14px; }
.strong { color: var(--text); }
.m0 { margin: 0; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
label.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 13px; line-height: 1.45; cursor: pointer; }
label.consent input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.card.danger { margin-top: 28px; border-color: #3a2326; }
.card.danger button { color: var(--err); border-color: #5a2a2e; }

/* Número de lista */
.bignum { font-size: 4.5rem; font-weight: 800; line-height: 1; margin: 6px 0 14px; letter-spacing: -2px; }

/* Paneles manager y plataforma */
textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; outline: none; }
textarea:focus { border-color: var(--accent); }
.mb16 { margin-bottom: 16px; }
.creds { margin: 12px 0 16px; display: grid; gap: 6px; }
.cred { word-break: break-all; }
.cred b { font-variant-numeric: tabular-nums; user-select: all; }
.club .who a { color: var(--accent); text-decoration: none; }
.club.off { opacity: .55; }
.club .actions { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }

/* Teléfono con prefijo */
.phonerow { display: flex; gap: 8px; }
.phonerow select { flex: 0 0 96px; width: 96px; font: inherit; font-size: 16px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 0 6px 0 10px; outline: none; }
.phonerow select:focus { border-color: var(--accent); }
.phonerow select option { color: #111; }
.phonerow input { flex: 1; min-width: 0; }

/* Eventos */
.events { display: grid; gap: 10px; margin-top: 12px; }
.eventbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.eventbtn:hover { border-color: var(--accent); }
.eventbtn span { color: var(--muted); font-size: 14px; }
.evlabel { display: block; margin-bottom: 6px; }
.evsel { width: 100%; font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; outline: none; }
.evsel option { color: #111; }
.m0 { margin: 0; }
.club .actions a.link { color: var(--accent); text-decoration: none; font-size: inherit; }

/* Campo trampa anti-bots: fuera de pantalla, nunca visible para personas */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Logo del local y personalización */
.clublogo { display: block; max-width: 70%; max-height: 84px; object-fit: contain; margin: 0 0 14px; }
.brandrow { display: flex; gap: 16px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.logoBox { width: 120px; height: 84px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; background: repeating-conic-gradient(#8883 0% 25%, transparent 0% 50%) 50% / 16px 16px; overflow: hidden; }
.logoBox.sq { width: 84px; }
.logoBox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0; }
.colors label { margin: 0; }
.colors input[type=color] { width: 100%; height: 44px; padding: 2px; cursor: pointer; background: var(--input, #0f0f12); }
.preview { background: var(--pv-bg, #0e0e10); color: var(--pv-text, #f4f4f5); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; }
.preview b { font-size: 18px; }
.preview p { color: var(--pv-text, #f4f4f5); opacity: .7; margin: 4px 0 12px; }
.preview .pbtn { display: inline-block; background: var(--pv-accent, #d4ff3a); color: var(--pv-ink, #111); font-weight: 600; padding: 10px 16px; border-radius: 10px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btnrow button { width: auto; flex: 1 1 auto; margin-top: 8px; }

/* Información de privacidad y página legal */
.pinfo { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; color: var(--muted); }
.pinfo p { font-size: 12px; margin: 6px 0 0; }
.pinfo a, .legal a { color: var(--accent); }
.wrap.legal { max-width: 720px; }
.legal h1 { font-size: 28px; }
.legal h2 { margin-top: 26px; }
.legal ul { color: var(--muted); line-height: 1.6; padding-left: 20px; }
.legal li { margin-bottom: 4px; }
.legal b { color: var(--text); }
.rowactions { margin-top: 4px; display: flex; gap: 14px; }
.rowactions button.link { font-size: 12px; }

/* Con logo: logo centrado, sin el nombre del club, y debajo "Lista de puerta" centrado */
.has-logo .clublogo { margin: 28px auto 14px; max-width: 82%; }
.has-logo .brand { text-align: center; margin-bottom: 26px; }
.has-logo #clubName { display: none; }
/* Pantalla de elegir evento: más espacio bajo "Lista de puerta" */
.wrap:has(#stepEvent:not(.hidden)) .brand { margin-bottom: 40px; }
.has-logo #eventLine { text-align: center; font-size: 15px; color: var(--text); margin: 0 0 20px; }
.has-logo #eventNotice { text-align: center; margin: 0 0 16px; }

/* Enlace de privacidad (con "Elegir otro evento" justo encima) y pie de adartsmedia */
.formfoot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
#otherEventBtn { margin-top: 10px; color: var(--text); font-weight: 600; border-color: var(--muted); }
#doneOtherBtn { margin-top: 18px; color: var(--text); font-weight: 600; border-color: var(--muted); }
#doneOtherBtn:hover { border-color: var(--accent); color: var(--accent); }
#otherEventBtn:hover { border-color: var(--accent); color: var(--accent); }
.plink { align-self: center; font-size: 13px; color: var(--muted); text-decoration: underline; }
.poweredby { margin-top: 36px; text-align: center; }
.poweredby img { display: block; height: 22px; width: auto; margin: 0 auto 8px; opacity: .85; filter: var(--platform-logo-filter, none); }
.poweredby p { font-size: 12px; color: var(--muted); margin: 0; }
.poweredby a { color: var(--muted); text-decoration: underline; }

/* Formulario de invitados: más aire entre cada texto y el campo anterior */
#regForm label, #codeForm label { margin: 14px 0 6px; }
#regForm label:first-child, #codeForm label:first-child { margin-top: 0; }

/* Móvil: el formulario de invitados cabe en una pantalla (título arriba, campos, botón Enviar y debajo la explicación) */
.formhint { font-size: 13px; line-height: 1.45; margin: 12px 0 0; }
#formMsg:empty { display: none; }
@media (max-width: 480px) {
  body { padding: 10px 14px 12px; }
  .has-logo .clublogo { max-width: 58%; max-height: 46px; margin: 18px auto 6px; }
  .wrap:has(#stepEvent:not(.hidden)) .brand { margin-bottom: 24px; }
  .has-logo .brand { margin-bottom: 8px; font-size: 11px; }
  .has-logo #eventLine { margin: 0 0 8px; font-size: 14px; }
  .has-logo #eventNotice { margin: 0 0 8px; }
  #stepForm, #stepCode, #stepDone, #stepEvent, #stepNone { padding: 16px 18px 12px; }
  #stepForm h2 { margin-bottom: 6px; }
  #regForm label, #codeForm label { margin: 10px 0 5px; font-size: 13px; }
  #regForm label:first-child, #codeForm label:first-child { margin-top: 0; }
  #regForm input, #regForm select { padding-top: 11px; padding-bottom: 11px; font-size: 16px; }
  #regForm button[type=submit] { margin-top: 14px; padding: 13px 16px; }
  .formhint { margin-top: 10px; }
  .formfoot { margin-top: 10px; padding-top: 10px; gap: 8px; }
  #otherEventBtn { margin-top: 8px; padding: 8px 14px; font-size: 15px; }
  .poweredby { margin-top: 14px; }
  .poweredby img { height: 18px; margin-bottom: 6px; }
}

/* Página del enlace de cancelación */
a.btn.ghostlink { display: block; text-align: center; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); text-decoration: none; }

label.consent input.hoursin { width: 64px; height: auto; flex: none; margin: -6px 0 0; padding: 6px 8px; text-align: center; }

.msgdefaults { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.msgdefaults h3 { margin: 0 0 6px; font-size: 16px; }

.shotnote { text-align: center; margin: 14px 0 16px; color: var(--text); font-weight: 600; }

.onehint { margin: 16px 0 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 14px; color: var(--text); text-align: center; }

/* Inscripción enviando un WhatsApp */
button.wabtn, a.wabtn { display: block; box-sizing: border-box; width: 100%; background: var(--accent); color: var(--accent-ink); text-align: center; text-decoration: none; font-weight: 600; }
a.wabtn { padding: 14px 16px; border-radius: 10px; margin-top: 14px; }
.waiting { text-align: center; }

/* Asistencia y fidelidad */
.list.scroll { max-height: 420px; overflow-y: auto; }
.score { text-align: right; font-variant-numeric: tabular-nums; }
.score b { display: block; font-size: 18px; }
.score span { font-size: 11px; color: var(--muted); }
.card > select { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
#iTarget { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.sample { white-space: pre-wrap; font-size: 14px; border: 1px dashed var(--line); border-radius: 12px; padding: 12px; }

/* Nivel VIP en puerta */
.item .who .vip { display: inline-block; font-size: 12px; font-weight: 700; color: var(--text); border: 1px solid var(--muted); border-radius: 999px; padding: 2px 9px; margin-bottom: 5px; }
.item .who .vip.v3 { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.item .who .vip.v2 { border: 2px solid var(--accent); color: var(--accent); }
.item .who .vip.v0 { border-color: var(--line); color: var(--muted); font-weight: 500; }
.item .who .vip.low { border-color: var(--err); color: var(--err); }
.homelink { display: block; color: inherit; text-decoration: none; }
.card p.offline { border: 1px solid var(--err); border-radius: 12px; padding: 12px 14px; margin: 14px 0 0; font-size: 14px; line-height: 1.45; color: var(--text); }
