@font-face { font-family: "ARVIA Brand"; src: url("/fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
:root {
  --navy: #023163;
  --teal: #13A8AA;
  --petrol: #155E75;
  --petrol-dark: #0F4D60;
  --mist: #E8F8F5;
  --surface: #F8FAFC;
  --card: #FFFFFF;
  --line: #E2E8F0;
  --field: #CBD5E1;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --link: #0E7490;
  --ok: #047857;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand: "ARVIA Brand", "Poppins", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 22px; }
a { color: var(--link); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.topbar { height: 56px; padding: 0 16px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5; }
.wordmark { font-family: var(--brand); font-weight: 500; font-size: 20px; letter-spacing: 0.12em; color: var(--navy); text-decoration: none; }
.topbar .evento { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }

.hero { background: var(--navy); color: #fff; padding: 28px 16px 26px; }
.hero-inner, .wrap { max-width: 640px; margin: 0 auto; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 999px; }
.pill-teal { background: var(--teal); color: var(--navy); }
.hero h1 { margin: 10px 0 8px; font-size: 28px; line-height: 34px; font-weight: 700; }
.hero p { margin: 0; color: #D6E2EE; }

main.wrap { padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 24px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 16px; box-shadow: var(--shadow); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.section-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.step { width: 28px; height: 28px; border-radius: 999px; background: var(--mist); color: var(--petrol); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.count { font-size: 13px; font-weight: 600; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, legend { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 13px; line-height: 18px; color: var(--muted); }
input[type=text], input[type=tel], input[type=email], input[type=password], select {
  width: 100%; height: 48px; border: 1px solid var(--field); border-radius: 12px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
}
input:focus-visible, select:focus-visible, button:focus-visible, .seg input:focus-visible + span { outline: 3px solid rgba(19,168,170,0.45); outline-offset: 2px; }
.invalid input, .invalid select { border-color: var(--danger); }
.error-text { margin: 0; font-size: 13px; font-weight: 500; color: var(--danger); display: flex; align-items: center; gap: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 360px) { .grid2 { grid-template-columns: 1fr; } }

fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { height: 46px; border-radius: 12px; border: 1px solid var(--field); color: var(--ink-2); font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; background: #fff; }
.seg input:checked + span { background: var(--petrol); border-color: var(--petrol); color: #fff; font-weight: 600; }
.invalid .seg span { border-color: var(--danger); }

.ej { display: flex; flex-direction: column; gap: 14px; }
.ej.has-error { border: 2px solid var(--danger); }
.ej-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ej-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.badge-error { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--danger); background: var(--danger-bg); padding: 4px 10px; border-radius: 999px; }
.ej-summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ej-summary .ok-dot { width: 32px; height: 32px; border-radius: 999px; background: var(--mist); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ej-summary .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ej-summary .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ej-summary .t2 { font-size: 13px; color: var(--muted); }

.icon-btn { width: 44px; height: 44px; border: none; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; }
.icon-btn:hover { background: var(--surface); color: var(--danger); }
.text-btn { height: 44px; padding: 0 12px; border: none; background: transparent; color: var(--link); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 10px; }
.text-btn:hover { background: var(--mist); }

.btn { height: 52px; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; text-decoration: none; }
.btn-primary { border: none; background: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-dark); }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; }
.btn-secondary { border: 1px solid var(--field); background: #fff; color: var(--petrol); font-size: 15px; }
.btn-add { height: 52px; border: 2px dashed var(--teal); border-radius: 12px; background: var(--mist); color: var(--petrol); font: inherit; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.btn-block { width: 100%; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--ink-2); padding: 0 4px; cursor: pointer; }
.check input { margin: 1px 0 0; width: 18px; height: 18px; accent-color: var(--petrol); flex-shrink: 0; }

.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 20px; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #FECACA; }
.alert-info { background: var(--mist); color: var(--petrol); border: 1px solid #BFE9E1; }

.footer { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); padding: 8px 0 24px; }
.footer .wordmark { font-size: 12px; }

/* Confirmación */
.done-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 12px 8px 0; }
.done-icon { width: 72px; height: 72px; border-radius: 999px; background: var(--mist); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; }
.done-head h1 { margin: 0; font-size: 28px; line-height: 34px; }
.done-head p { margin: 0; color: var(--ink-2); }
.code-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-caps { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.code { font-size: 24px; font-weight: 700; color: var(--navy); }
.divider { height: 1px; background: var(--line); }
.jaula-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.jaula-list li { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.jaula { min-width: 56px; font-size: 12px; font-weight: 700; color: var(--petrol); background: var(--mist); border-radius: 8px; padding: 4px 6px; text-align: center; flex-shrink: 0; }
.promo { background: var(--navy); color: #fff; border-radius: 16px; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.promo .tag { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--teal); }
.promo .t { font-size: 17px; line-height: 24px; font-weight: 600; }
.promo .s { font-size: 13px; line-height: 18px; color: #D6E2EE; }
.promo a { align-self: flex-start; margin-top: 4px; height: 44px; padding: 0 16px; border-radius: 12px; background: #fff; color: var(--navy); font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.actions { display: flex; flex-direction: column; gap: 10px; }

/* Panel de organizadores */
.admin main.wrap { max-width: 1200px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar input[type=text] { flex: 1 1 220px; width: auto; }
.toolbar .btn { height: 48px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 32px; }
.table-box { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; background: var(--surface); position: sticky; top: 0; }
tr.first td { border-top: 2px solid var(--line); }
.state-pill { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 999px; }
.state-open { color: var(--ok); background: #ECFDF5; }
.state-closed { color: var(--danger); background: var(--danger-bg); }

@media print {
  .topbar, .no-print, .promo, .actions, .footer { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* --- Expo 2026: marca, evento y contador --- */
.topbar .logo { height: 26px; width: auto; display: block; }
.hero .evento-info { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: #D6E2EE; }
.hero .evento-info b { color: #fff; font-weight: 600; }
.countdown { margin-top: 18px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 16px; padding: 14px 14px 12px; }
.countdown .cd-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--teal); }
.countdown .cd-grid { margin-top: 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.countdown .cd-cell { background: rgba(2,49,99,0.55); border-radius: 12px; padding: 8px 4px; text-align: center; }
.countdown .cd-n { font-size: 26px; line-height: 30px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.countdown .cd-u { font-size: 11px; color: #D6E2EE; }
.countdown .cd-fin { margin-top: 8px; font-size: 13px; color: #D6E2EE; }
.countdown.cerrado .cd-grid { display: none; }
.countdown.urgente .cd-cell { background: rgba(185,28,28,0.55); }
.form-bloqueado { opacity: 0.55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 200px; }
.cfg-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.cfg-row .field { flex: 1 1 260px; }
.admin .countdown { margin: 0; background: var(--navy); }
.btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
