/* ==========================================================================
   GoEvent — sistema visual
   Tipografía: Archivo (ancho variable). Paleta: tinta azul, cobalto y naranja dorsal.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"), url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #F4F6FB;
  --surface: #FFFFFF;
  --ink: #131C33;
  --ink-2: #46506A;
  --ink-3: #7A849C;
  --line: #E2E6EF;
  --line-2: #CDD3E0;

  --cobalt: #2B4BF2;
  --cobalt-deep: #1D36C8;
  --cobalt-tint: #ECEFFF;
  --flare: #FF5A1F;
  --flare-deep: #E0460E;
  --flare-tint: #FFF0E8;
  --moss: #13875A;
  --moss-tint: #E5F5EE;
  --amber: #A76A10;
  --amber-tint: #FFF4DC;
  --red: #CF3434;
  --red-tint: #FDECEC;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(19, 28, 51, .06);
  --shadow-2: 0 1px 2px rgba(19, 28, 51, .05), 0 10px 30px -14px rgba(19, 28, 51, .22);
  --shadow-3: 0 2px 6px rgba(19, 28, 51, .06), 0 24px 60px -24px rgba(19, 28, 51, .35);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--cobalt-deep); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-weight: 800; font-stretch: 112%; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; font-stretch: 110%; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
code { font-size: .9em; background: var(--cobalt-tint); padding: .1em .35em; border-radius: 6px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--cobalt) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--cobalt); color: #fff; }

.ico { width: 20px; height: 20px; flex: none; }
.ico--sm { width: 16px; height: 16px; }
.ico--lg { width: 28px; height: 28px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(40px, 7vw, 80px) 0; }
.section--tight { padding: clamp(28px, 4vw, 44px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--ink-2); }

.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 16px; }
.w-100 { width: 100%; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-stretch: 118%; font-size: 1.2rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 26px; border-radius: 7px; background: var(--cobalt); position: relative; flex: none;
  -webkit-mask: radial-gradient(circle 5px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 5px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.brand-mark::after { content: ""; position: absolute; inset: 7px 9px; border-radius: 3px; background: var(--flare); }
.brand-word b { color: var(--cobalt); font-weight: 800; margin-left: 1px; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--surface); --fg: var(--ink); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.1;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .08s;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--fg); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn--primary { --bg: var(--cobalt); --fg: #fff; --bd: var(--cobalt); }
.btn--primary:hover { --bg: var(--cobalt-deep); --bd: var(--cobalt-deep); color: #fff; }
.btn--accent { --bg: var(--flare); --fg: #fff; --bd: var(--flare); }
.btn--accent:hover { --bg: var(--flare-deep); --bd: var(--flare-deep); color: #fff; }
.btn--ink { --bg: var(--ink); --fg: #fff; --bd: var(--ink); }
.btn--ink:hover { --bg: #000; color: #fff; }
.btn--ghost { --bg: transparent; --bd: transparent; }
.btn--ghost:hover { --bg: var(--cobalt-tint); --bd: transparent; color: var(--cobalt-deep); }
.btn--danger { --bg: var(--surface); --fg: var(--red); --bd: #F1C4C4; }
.btn--danger:hover { --bg: var(--red); --fg: #fff; --bd: var(--red); color: #fff; }
.btn--sm { min-height: 36px; padding: 7px 13px; font-size: .86rem; }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.btn--sm.btn--icon { width: 36px; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-color: #fff #fff transparent transparent; animation: spin .7s linear infinite; }
.btn:not(.btn--primary):not(.btn--accent):not(.btn--ink).is-loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--cobalt); cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span, .field-label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field small, .hint { color: var(--ink-3); font-size: .82rem; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), .field select, .field textarea, .select {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field select, .select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A849C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-tint); }
.field input[type=file] { font: inherit; font-size: .9rem; padding: 10px; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); background: var(--paper); width: 100%; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: .84rem; margin: 2px 0 0; font-weight: 600; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}
.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.fieldset legend { font-weight: 800; font-stretch: 110%; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); flex: none; }
.input-affix { position: relative; }
.input-affix .affix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-affix input { padding-left: 42px !important; }
.input-affix .affix-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* Interruptor */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch-text strong { display: block; font-weight: 700; }
.switch-text small { color: var(--ink-3); }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--cobalt); }
.switch input:checked::after { transform: translateX(18px); }

/* Selector de cantidad */
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); }
.qty button { width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.qty button:hover { background: var(--cobalt-tint); color: var(--cobalt); }
.qty button:disabled { opacity: .3; cursor: default; background: none; }
.qty input { width: 34px; border: 0; text-align: center; font: inherit; font-weight: 800; font-size: 1.05rem; background: transparent; color: var(--ink); -moz-appearance: textfield; padding: 0; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Medidor de contraseña */
.pw-meter { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s, background .25s; }
.pw-meter[data-score="2"] i { background: var(--amber); }
.pw-meter[data-score="3"] i, .pw-meter[data-score="4"] i { background: var(--moss); }

/* ---------- Chips, badges, alertas ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .ico { width: 17px; height: 17px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--paper); color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.badge--ok { background: var(--moss-tint); color: var(--moss); }
.badge--warn { background: var(--amber-tint); color: var(--amber); }
.badge--danger { background: var(--red-tint); color: var(--red); }
.badge--info { background: var(--cobalt-tint); color: var(--cobalt-deep); }
.badge--accent { background: var(--flare-tint); color: var(--flare-deep); }
.badge--dark { background: var(--ink); color: #fff; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); background: var(--cobalt-tint); color: var(--cobalt-deep); font-weight: 500; font-size: .95rem; }
.alert .ico { margin-top: 1px; }
.alert--success { background: var(--moss-tint); color: var(--moss); }
.alert--error { background: var(--red-tint); color: var(--red); }
.alert--warning { background: var(--amber-tint); color: var(--amber); }
.alert p { margin: 0; }
.alert a { color: inherit; text-decoration: underline; font-weight: 700; }

.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(520px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-3); font-weight: 600; font-size: .95rem; animation: toast-in .35s cubic-bezier(.2,.9,.3,1.2); }
.toast .ico { color: #9FB0FF; }
.toast--success .ico { color: #6EE7B7; }
.toast--error .ico { color: #FCA5A5; }
.toast--warning .ico { color: #FCD34D; }
.toast .toast-close { margin-left: auto; background: none; border: 0; color: #fff; opacity: .6; cursor: pointer; padding: 4px; }
.toast.is-leaving { animation: toast-out .25s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Tarjetas genéricas ---------- */
.card { background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); padding: clamp(18px, 3vw, 28px); }
.card--flush { padding: 0; }
.card--flush > .table thead th:first-child, .card--flush > .table-wrap .table thead th:first-child { border-top-left-radius: var(--r-md); }
.card--flush > .table thead th:last-child, .card--flush > .table-wrap .table thead th:last-child { border-top-right-radius: var(--r-md); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.1rem; font-stretch: 105%; }
.card-head p { margin: 2px 0 0; color: var(--ink-3); font-size: .9rem; }
.card + .card { margin-top: 20px; }

.empty { text-align: center; padding: clamp(32px, 6vw, 56px) 20px; color: var(--ink-2); }
.empty .ico { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--ink-3); stroke-width: 1.4; }
.empty h3 { margin-bottom: 6px; color: var(--ink); }
.empty p { max-width: 42ch; margin: 0 auto 18px; }

/* ==========================================================================
   Sitio público
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .container { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.site-nav { display: flex; gap: 4px; margin-left: 12px; }
.site-nav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--ink); background: var(--paper); }
.site-nav a.is-active { color: var(--ink); background: var(--paper); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; font-size: .92rem; }
.user-pill:hover { border-color: var(--ink-3); color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; letter-spacing: .02em; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.menu-toggle { display: none; }

.nav-drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.nav-drawer.is-open { display: block; }
.nav-drawer-backdrop { position: absolute; inset: 0; background: rgba(19, 28, 51, .45); animation: fade .2s; }
.nav-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 6px; animation: slide-in .25s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.nav-drawer-panel .drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.nav-drawer-panel a.drawer-link { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.nav-drawer-panel a.drawer-link:hover { background: var(--paper); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(100%); } }

@media (max-width: 900px) {
  .site-nav, .header-actions .hide-mobile { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* Hero */
.hero { position: relative; padding: clamp(32px, 6vw, 72px) 0 clamp(36px, 6vw, 64px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(700px 360px at 85% 10%, rgba(43, 75, 242, .10), transparent 70%),
  radial-gradient(500px 300px at 95% 90%, rgba(255, 90, 31, .08), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-title { font-size: clamp(2.5rem, 7.4vw, 5rem); font-weight: 900; font-stretch: 125%; line-height: .95; letter-spacing: -.035em; margin: 0 0 20px; }
.hero-lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 46ch; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div { display: grid; }
.hero-stats strong { font-size: 1.5rem; font-weight: 800; font-stretch: 120%; line-height: 1.1; }
.hero-stats span { color: var(--ink-3); font-size: .88rem; }

.search-bar { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr) auto; gap: 6px; padding: 6px; background: var(--surface); border-radius: 20px; border: 1.5px solid var(--line); box-shadow: var(--shadow-2); }
.search-bar .sb-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; min-height: 52px; }
.search-bar .sb-field + .sb-field { border-left: 1.5px solid var(--line); border-radius: 0 14px 14px 0; }
.search-bar .sb-field:focus-within { background: var(--paper); }
.search-bar .sb-field .ico { color: var(--ink-3); }
.search-bar input, .search-bar select { border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; width: 100%; min-width: 0; color: var(--ink); padding: 0; appearance: none; -webkit-appearance: none; }
.search-bar .btn { min-height: 52px; border-radius: 14px; padding: 0 24px; }
@media (max-width: 720px) {
  .search-bar { grid-template-columns: 1fr; }
  .search-bar .sb-field + .sb-field { border-left: 0; border-top: 1.5px solid var(--line); border-radius: 0; }
}

.hero-feature { position: relative; }
.hero-feature .ev-card { transform: rotate(1.6deg); box-shadow: var(--shadow-3); }
.hero-feature .ev-card:hover { transform: rotate(0deg); }
.hero-feature-back { position: absolute; left: 34px; right: 34px; bottom: -16px; height: 42%; border-radius: 22px; background: var(--ink); transform: rotate(-2.5deg); }
.hero-feature-label { position: absolute; z-index: 2; top: -12px; right: 24px; }

/* Portada con video / imagen de fondo */
.hero--media { color: #fff; background: #0E1426; min-height: min(760px, 88vh); display: flex; align-items: center; padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 88px); }
.hero--media::before { display: none; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg-poster, .hero-bg-video, .hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-bg-video { opacity: 0; transition: opacity .8s ease; }
.hero-bg-video.is-playing { opacity: 1; }
.hero-slide { opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 7s linear; }
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 28, calc(var(--hero-dim, .55) + .2)) 0%, rgba(10, 14, 28, var(--hero-dim, .55)) 45%, rgba(10, 14, 28, calc(var(--hero-dim, .55) - .25)) 100%),
              linear-gradient(0deg, rgba(10, 14, 28, .55) 0%, transparent 35%); }
.hero--media .hero-grid { width: 100%; }
.hero--media .hero-title { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero--media .hero-lead { color: rgba(255,255,255,.88); }
.hero--media .hero-stats strong { color: #fff; }
.hero--media .hero-stats span { color: rgba(255,255,255,.72); }
.hero--media .search-bar { border-color: transparent; box-shadow: 0 20px 60px -20px rgba(0,0,0,.6); color: var(--ink); }
.hero--media .hero-feature .ev-card { box-shadow: 0 30px 70px -20px rgba(0,0,0,.65); }
.hero-grid--solo { grid-template-columns: minmax(0, 760px); }
@media (prefers-reduced-motion: reduce) { .hero-bg-video { display: none; } .hero-slide { transition: none; transform: none; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-feature { max-width: 440px; margin: 8px auto 0; width: 100%; }
}

/* Tarjeta de evento (con perforación de ticket) */
.ev-grid { display: grid; gap: clamp(16px, 2.4vw, 24px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); }
.ev-card { --notch: 11px; position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); color: var(--ink); box-shadow: var(--shadow-2); transition: transform .2s, box-shadow .2s; isolation: isolate; }
.ev-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-3); }
.ev-card-media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: linear-gradient(135deg, var(--cobalt), #6E83FF); }
.ev-card-media img { width: 100%; height: 100%; object-fit: cover; }
.ev-card-media .ev-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.9); }
.ev-card-media .ev-placeholder .ico { width: 56px; height: 56px; stroke-width: 1.2; }
.ev-card-tags { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.ev-card-tags .badge { background: rgba(255,255,255,.94); color: var(--ink); backdrop-filter: blur(6px); }
.ev-card-tags .badge--accent { background: var(--flare); color: #fff; }
.ev-card-tags .badge--dark { background: var(--ink); color: #fff; }
.ev-card-body { padding: 16px 18px 18px; display: grid; gap: 6px; flex: 1; align-content: start; }
.ev-card-title { font-size: 1.12rem; font-weight: 800; font-stretch: 108%; line-height: 1.2; margin: 0; }
.ev-card-meta { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .9rem; }
.ev-card-meta .ico { width: 16px; height: 16px; color: var(--ink-3); }
.ev-perf { position: relative; height: 0; border-top: 2px dashed var(--line-2); margin: 0 16px; }
.ev-perf::before, .ev-perf::after { content: ""; position: absolute; top: calc(var(--notch) * -1 - 1px); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2); border-radius: 50%; background: var(--paper); }
.ev-perf::before { left: calc(-16px - var(--notch)); }
.ev-perf::after { right: calc(-16px - var(--notch)); }
.ev-card-stub { display: flex; align-items: center; gap: 14px; padding: 14px 18px 16px; }
.ev-date { display: grid; place-items: center; min-width: 54px; padding: 6px 8px; border-radius: 12px; background: var(--cobalt-tint); color: var(--cobalt-deep); line-height: 1; }
.ev-date b { font-size: 1.5rem; font-weight: 900; font-stretch: 120%; }
.ev-date span { font-size: .78rem; font-weight: 700; margin-top: 3px; }
.ev-price { margin-left: auto; text-align: right; line-height: 1.2; }
.ev-price small { display: block; color: var(--ink-3); font-size: .78rem; }
.ev-price strong { font-size: 1.1rem; font-weight: 800; font-stretch: 110%; }
.ev-bar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.ev-bar i { display: block; height: 100%; background: var(--moss); border-radius: 99px; }
.ev-bar.is-hot i { background: var(--flare); }
.ev-card--sold .ev-card-media img { filter: grayscale(.8); }

/* Disciplinas */
.disc-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.disc-tile { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); font-weight: 700; }
.disc-tile:hover { border-color: var(--cobalt); color: var(--cobalt-deep); }
.disc-tile .disc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--cobalt); flex: none; }
.disc-tile small { display: block; color: var(--ink-3); font-weight: 500; font-size: .8rem; }

/* Pasos */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.how-step { position: relative; padding: 24px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); counter-increment: step; }
.how-step::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; font-stretch: 120%; margin-bottom: 16px; }
.how-step h3 { margin-bottom: 6px; }
.how-step p { color: var(--ink-2); margin: 0; font-size: .95rem; }
@media (max-width: 800px) { .how { grid-template-columns: 1fr; } }

/* Banda organizadores */
.org-band { position: relative; overflow: hidden; border-radius: 28px; background: var(--ink); color: #fff; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.org-band h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-stretch: 120%; }
.org-band p { color: #C3CAE0; }
.org-band ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.org-band li { display: flex; gap: 12px; align-items: flex-start; color: #E3E7F4; }
.org-band li .ico { color: var(--flare); margin-top: 2px; }
@media (max-width: 800px) { .org-band { grid-template-columns: 1fr; } }

.newsletter { display: flex; gap: 8px; max-width: 460px; }
.newsletter input { flex: 1; min-width: 0; min-height: 48px; border-radius: 999px; border: 1.5px solid var(--line-2); padding: 0 18px; font: inherit; background: var(--surface); }

/* Pie */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: .95rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-2); font-size: .95rem; }
.footer-grid a:hover { color: var(--cobalt); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .86rem; }
.pay-logos { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-logos span { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); font-weight: 700; font-size: .8rem; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Listado de eventos */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); margin-bottom: 24px; }
.filters .select, .filters .input { min-height: 42px; width: auto; flex: 1 1 160px; font-size: .95rem; }
.filters .input-affix { flex: 2 1 240px; }
.page-head { padding: clamp(28px, 5vw, 48px) 0 8px; }
.page-head p { color: var(--ink-2); max-width: 60ch; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: .9rem; }
.pagination .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Página de evento */
.ev-hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.ev-hero-bg { position: absolute; inset: 0; }
.ev-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: saturate(1.1); }
.ev-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,28,51,.35) 0%, rgba(19,28,51,.92) 100%); }
.ev-hero .container { position: relative; padding-top: clamp(32px, 7vw, 88px); padding-bottom: clamp(24px, 4vw, 40px); }
.ev-hero h1 { color: #fff; font-size: clamp(2rem, 5.6vw, 3.6rem); font-stretch: 120%; font-weight: 900; letter-spacing: -.03em; max-width: 20ch; line-height: 1; margin: 12px 0 18px; }
.ev-hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #DCE1F0; font-weight: 500; }
.ev-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.ev-hero-meta .ico { color: #fff; opacity: .75; }
.ev-hero .crumbs { color: #C3CAE0; font-size: .9rem; display: flex; gap: 6px; align-items: center; }
.ev-hero .crumbs a { color: #fff; }
.ev-org { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; color: #fff; font-weight: 600; }
.ev-org img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: #fff; }

.ev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(24px, 4vw, 48px); align-items: start; padding-top: 32px; }
.ev-main > section + section { margin-top: 40px; }
.ev-main h2 { font-size: 1.35rem; margin-bottom: 14px; }
.prose { color: var(--ink-2); font-size: 1.02rem; max-width: 68ch; }
.prose p { margin-bottom: 1em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
.fact { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; gap: 12px; align-items: flex-start; }
.fact .ico { color: var(--cobalt); margin-top: 2px; }
.fact small { display: block; color: var(--ink-3); font-size: .8rem; }
.fact strong { font-weight: 700; font-size: .98rem; }
.map-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--r-md); background: var(--line); }
.doc-link { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); color: var(--ink); font-weight: 700; }
.doc-link:hover { border-color: var(--cobalt); color: var(--ink); }
.doc-link .doc-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.doc-link small { display: block; color: var(--ink-3); font-weight: 500; }

.buy-panel { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); border: 1px solid var(--line); overflow: hidden; }
.buy-panel-head { padding: 20px 22px 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.buy-panel-head h2 { margin: 0; font-size: 1.2rem; }
.tiers { display: grid; }
.tier { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--line); }
.tier:first-child { border-top: 0; }
.tier-name { font-weight: 800; font-size: 1rem; line-height: 1.25; }
.tier-name .badge { margin-left: 6px; vertical-align: 1px; }
.tier-desc { color: var(--ink-3); font-size: .86rem; grid-column: 1; }
.tier-price { font-weight: 800; font-size: 1.12rem; font-stretch: 110%; }
.tier-price small { font-weight: 500; font-size: .78rem; color: var(--ink-3); font-stretch: 100%; }
.tier-left { font-size: .8rem; font-weight: 700; color: var(--flare-deep); }
.tier.is-off { opacity: .6; }
.tier .qty { grid-row: span 2; }
.buy-summary { padding: 18px 22px 22px; background: var(--paper); border-top: 1px solid var(--line); display: grid; gap: 12px; }
.buy-summary .line { display: flex; justify-content: space-between; color: var(--ink-2); font-size: .92rem; }
.buy-summary .total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 1.25rem; font-stretch: 110%; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--ink-3); font-size: .82rem; }
.secure-note .ico { width: 15px; height: 15px; }

.buy-bar { display: none; }
@media (max-width: 980px) {
  .ev-layout { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .buy-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; gap: 12px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(19,28,51,.35); }
  .buy-bar .grow small { display: block; color: var(--ink-3); font-size: .78rem; }
  .buy-bar .grow strong { font-size: 1.15rem; font-weight: 800; }
  body.has-buy-bar { padding-bottom: 84px; }
}

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(20px, 3vw, 36px); align-items: start; padding: 28px 0 60px; }
@media (max-width: 980px) { .checkout { grid-template-columns: 1fr; } .checkout .order-summary { order: -1; } }
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; counter-reset: s; flex-wrap: wrap; }
.stepper li { counter-increment: s; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; font-size: .92rem; }
.stepper li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); font-weight: 800; font-size: .85rem; }
.stepper li + li::after { order: -1; content: ""; width: 20px; height: 2px; background: var(--line-2); margin-right: 4px; }
.stepper li.is-done { color: var(--moss); }
.stepper li.is-done::before { content: "✓"; background: var(--moss); border-color: var(--moss); color: #fff; }
.stepper li.is-current { color: var(--ink); }
.stepper li.is-current::before { background: var(--ink); border-color: var(--ink); color: #fff; }

.countdown { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--amber-tint); color: var(--amber); font-weight: 600; font-size: .92rem; margin-bottom: 20px; }
.countdown strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.countdown.is-low { background: var(--red-tint); color: var(--red); }

.participant { background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; }
.participant + .participant { margin-top: 16px; }
.participant-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap; }
.participant-num { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 900; font-stretch: 120%; }
.participant-head strong { font-size: 1rem; }
.participant-head small { color: var(--ink-3); display: block; font-size: .85rem; }
.participant-head .link-btn { margin-left: auto; font-size: .9rem; }
.participant-body { padding: 20px; display: grid; gap: 16px; }

.order-summary { position: sticky; top: calc(var(--header-h) + 16px); }
.summary-ticket { --notch: 12px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.summary-ticket .st-head { padding: 20px 22px; display: flex; gap: 14px; align-items: center; }
.summary-ticket .st-head img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; }
.summary-ticket .st-head h3 { margin: 0 0 4px; font-size: 1.02rem; line-height: 1.25; }
.summary-ticket .st-head small { color: var(--ink-3); display: block; }
.summary-ticket .ev-perf { margin: 0 18px; }
.summary-ticket .ev-perf::before { left: calc(-18px - var(--notch)); }
.summary-ticket .ev-perf::after { right: calc(-18px - var(--notch)); }
.summary-lines { padding: 18px 22px; display: grid; gap: 10px; font-size: .94rem; }
.summary-lines .line { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.summary-lines .line b { color: var(--ink); font-weight: 600; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 22px 20px; border-top: 1px solid var(--line); font-weight: 900; font-size: 1.4rem; font-stretch: 115%; }
.summary-total small { font-size: .8rem; color: var(--ink-3); font-weight: 500; font-stretch: 100%; }

.pay-methods { display: grid; gap: 12px; }
.pay-method { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.pay-method:hover { border-color: var(--line-2); }
.pay-method input { width: 20px; height: 20px; accent-color: var(--cobalt); margin: 0; flex: none; }
.pay-method:has(input:checked) { border-color: var(--cobalt); background: var(--cobalt-tint); }
.pay-method .pm-logo { width: 52px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; font-size: .74rem; letter-spacing: .02em; flex: none; }
.pm-logo--webpay { background: #fff; border: 1px solid var(--line); color: #D6006F; }
.pm-logo--mercadopago { background: #00B1EA; color: #fff; }
.pm-logo--demo { background: var(--ink); color: #fff; }
.pay-method strong { display: block; }
.pay-method small { color: var(--ink-3); }

.result { max-width: 720px; margin: 0 auto; padding: 40px 0 60px; text-align: center; }
.result-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--moss-tint); color: var(--moss); }
.result-icon .ico { width: 38px; height: 38px; stroke-width: 2.2; }
.result-icon.is-error { background: var(--red-tint); color: var(--red); }
.result-icon.is-wait { background: var(--amber-tint); color: var(--amber); }
.result h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.result .lead { color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; margin: 0 auto 28px; }

/* ---------- Ticket tipo dorsal ---------- */
.result-bibs { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.result-bibs .bib { width: min(100%, 340px); }
.bib-list { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.bib { position: relative; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-2); overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.bib:hover { color: var(--ink); }
.bib-band { background: var(--cobalt); color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bib-band strong { font-weight: 800; font-stretch: 112%; font-size: 1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bib-band span { font-size: .82rem; opacity: .85; white-space: nowrap; }
.bib-body { position: relative; padding: 18px 22px 20px; text-align: center; }
.bib-body::before, .bib-body::after, .bib-pins::before, .bib-pins::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(19,28,51,.25); }
.bib-body::before { top: 12px; left: 12px; }
.bib-body::after { top: 12px; right: 12px; }
.bib-pins::before { bottom: 12px; left: 12px; }
.bib-pins::after { bottom: 12px; right: 12px; }
.bib-number { font-size: clamp(3.6rem, 12vw, 4.6rem); font-weight: 900; font-stretch: 125%; line-height: .95; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bib-name { font-weight: 700; font-size: 1.05rem; margin-top: 6px; }
.bib-tier { color: var(--ink-3); font-size: .9rem; }
.bib-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 2px dashed var(--line-2); font-size: .88rem; color: var(--ink-2); }
.bib--used .bib-band { background: var(--ink-3); }
.bib--void .bib-band { background: var(--red); }

.ticket-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .ticket-view { grid-template-columns: 1fr; } }
.ticket-qr { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 24px; text-align: center; }
.ticket-qr .qr { width: min(280px, 100%); height: auto; margin: 0 auto; border-radius: 12px; }
.ticket-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.35rem; letter-spacing: .18em; font-weight: 700; margin-top: 12px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; font-size: .95rem; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- Autenticación ---------- */
.auth-body { min-height: 100vh; background: var(--paper); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-split { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { position: relative; background: var(--ink); color: #fff; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.auth-aside h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-stretch: 122%; font-weight: 900; line-height: 1; letter-spacing: -.03em; max-width: 14ch; }
.auth-aside p { color: #C3CAE0; max-width: 40ch; }
.auth-aside .bib { max-width: 300px; transform: rotate(-4deg); margin-bottom: auto; margin-top: 12px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.auth-aside .bib .bib-body::before, .auth-aside .bib .bib-body::after, .auth-aside .bib .bib-pins::before, .auth-aside .bib .bib-pins::after { background: var(--ink); }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-aside { display: none; } }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 5vw, 40px); box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.auth-card--wide { max-width: 640px; }
.auth-card .brand { margin-bottom: 24px; }
.auth-title { font-size: clamp(1.6rem, 4vw, 2rem); font-stretch: 115%; margin-bottom: 6px; }
.auth-sub { color: var(--ink-2); margin-bottom: 24px; }
.auth-foot { text-align: center; color: var(--ink-2); font-size: .95rem; margin-top: 20px; }
.auth-card--admin { border-top: 5px solid var(--flare); }
.otp-input { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.checklist { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; font-size: .92rem; }
.checklist .is-ok { color: var(--moss); }
.checklist .is-bad { color: var(--red); font-weight: 700; }
.steps-list { padding-left: 20px; display: grid; gap: 10px; margin: 20px 0; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 16px; background: var(--paper); border-radius: var(--r-sm); font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 1rem; text-align: center; }
.totp-setup { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.totp-setup .qr { width: 180px; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 560px) { .totp-setup { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---------- Área de cliente ---------- */
.account-head { padding: 28px 0 12px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.account-head h1 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 16px; font-weight: 700; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-color: var(--cobalt); }
.segmented { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; gap: 2px; }
.segmented a { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.segmented a.is-active { background: var(--ink); color: #fff; }

/* ==========================================================================
   Panel (organizadores y administración)
   ========================================================================== */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; }
.sidebar .brand { padding: 6px 10px 18px; }
.org-switch { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 14px; border-radius: 14px; background: var(--paper); }
.org-switch .org-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; overflow: hidden; flex: none; }
.org-switch .org-logo img { width: 100%; height: 100%; object-fit: cover; }
.org-switch strong { display: block; font-size: .92rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-switch small { color: var(--ink-3); font-size: .78rem; display: flex; gap: 4px; align-items: center; }
.org-switch small .ico { width: 13px; height: 13px; color: var(--moss); }
.side-group { margin-top: 10px; }
.side-group-title { font-size: .76rem; font-weight: 700; color: var(--ink-3); padding: 10px 12px 6px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.side-link .ico { color: var(--ink-3); }
.side-link:hover { background: var(--paper); color: var(--ink); }
.side-link.is-active { background: var(--cobalt-tint); color: var(--cobalt-deep); }
.side-link.is-active .ico { color: var(--cobalt); }
.side-link .count { margin-left: auto; font-size: .75rem; background: var(--flare); color: #fff; border-radius: 999px; padding: 1px 8px; font-weight: 800; }
.side-cta { margin: 14px 4px 4px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 800; font-stretch: 110%; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .header-actions { margin-left: auto; }
.app-content { padding: clamp(18px, 3vw, 32px); width: 100%; max-width: 1320px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.page-title p { margin: 4px 0 0; color: var(--ink-2); }
.side-toggle { display: none; }

@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-3); }
  .app.is-nav-open .sidebar { transform: none; }
  .app.is-nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(19,28,51,.45); z-index: 60; }
  .side-toggle { display: inline-flex; }
}

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 14px; } .kpi-value { font-size: 1.2rem; font-stretch: 100%; } .kpi-label { font-size: .78rem; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; min-width: 0; }
.kpi-label { color: var(--ink-3); font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi-label .ico { width: 17px; height: 17px; }
.kpi-value { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 900; font-stretch: 115%; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.kpi-foot { color: var(--ink-3); font-size: .82rem; margin-top: 4px; }
.kpi--accent { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi--accent .kpi-label, .kpi--accent .kpi-foot { color: #AEB7D1; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid > .card + .card { margin-top: 0; }

.chart { width: 100%; height: 220px; }
.chart .bar { fill: var(--cobalt); }
.chart .bar:hover { fill: var(--flare); }
.chart .axis { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }

.list-rows { display: grid; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); min-width: 0; }
.list-row:first-child { border-top: 0; }
.list-row:hover { color: var(--ink); }
.list-row .lr-thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--cobalt-tint); flex: none; display: grid; place-items: center; color: var(--cobalt); }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-main small { color: var(--ink-3); }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--cobalt); border-radius: 99px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .select, .toolbar .input { width: auto; min-height: 42px; font-size: .94rem; flex: 0 1 220px; }
.toolbar .input-affix { flex: 1 1 240px; }
.toolbar .input-affix .input, .filters .input-affix .input { width: 100%; flex: none; }
@media (max-width: 640px) { .toolbar > *, .filters > * { flex: 1 1 100% !important; } .toolbar > .btn, .filters > .btn { flex: 1 1 auto !important; } }
.toolbar .spacer { flex: 1; }

/* Tablas: en móvil se transforman en tarjetas */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 700; color: var(--ink-3); font-size: .8rem; padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFBFE; }
.table .t-main { font-weight: 700; color: var(--ink); }
.table .t-sub { color: var(--ink-3); font-size: .84rem; }
.table .t-actions { text-align: right; white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) {
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table--cards td { padding: 4px 0; border: 0; display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); column-gap: 16px; text-align: right; align-items: baseline; }
  .table--cards td > * { grid-column: 2; }
  .table--cards td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 4; color: var(--ink-3); font-size: .82rem; font-weight: 600; text-align: left; }
  .table--cards td .progress { margin-left: auto; width: 120px; }
  .table--cards td.t-first { display: block; text-align: left; padding-bottom: 8px; }
  .table--cards td.t-first::before { display: none; }
  .table--cards td.t-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; }
  .table--cards td.t-actions::before { display: none; }
  .table--cards .num { text-align: right; }
}

.menu { position: relative; display: inline-block; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); padding: 6px; display: none; text-align: left; }
.menu.is-open .menu-list { display: block; }
.menu-list a, .menu-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--paper); }
.menu-list .is-danger { color: var(--red); }
.menu-list form { margin: 0; }

/* Formulario de evento */
.form-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.form-nav { position: sticky; top: 84px; display: grid; gap: 2px; }
.form-nav a { padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.form-nav a:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 1100px) { .form-layout { grid-template-columns: 1fr; } .form-nav { display: none; } }
.form-section { scroll-margin-top: 84px; }
.tier-editor { display: grid; gap: 14px; }
.tier-row { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 18px; background: var(--paper); position: relative; }
.tier-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.tier-row-head strong { font-size: .98rem; }
.tallas { display: flex; flex-wrap: wrap; gap: 6px; }
.tallas label { cursor: pointer; }
.tallas input { position: absolute; opacity: 0; pointer-events: none; }
.tallas span { display: inline-block; min-width: 42px; text-align: center; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--line-2); font-weight: 700; font-size: .85rem; background: var(--surface); }
.tallas input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.tallas input:focus-visible + span { outline: 3px solid var(--cobalt-tint); }
.img-drop { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 7; border-radius: var(--r-md); border: 2px dashed var(--line-2); background: var(--paper); overflow: hidden; cursor: pointer; text-align: center; color: var(--ink-3); }
.img-drop:hover { border-color: var(--cobalt); }
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-drop .img-drop-label { position: relative; display: grid; gap: 6px; justify-items: center; font-weight: 600; font-size: .92rem; padding: 12px; }
.img-drop--square { aspect-ratio: 1; max-width: 160px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 0; margin-top: 24px; background: linear-gradient(180deg, transparent, var(--paper) 30%); flex-wrap: wrap; }
.projection { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .projection { grid-template-columns: 1fr; } }
.projection div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; }
.projection small { color: var(--ink-3); display: block; font-size: .8rem; }
.projection strong { font-size: 1.2rem; font-weight: 800; }

/* Portada (admin) */
.hero-preview { position: relative; aspect-ratio: 21 / 8; min-height: 220px; border-radius: var(--r-lg); overflow: hidden; background: #0E1426; color: #fff; }
.hero-preview video, .hero-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,14,28,calc(var(--hero-dim,.55) + .2)), rgba(10,14,28,calc(var(--hero-dim,.55) - .25))); }
.hero-preview-text { position: absolute; z-index: 1; left: clamp(20px, 4vw, 48px); bottom: clamp(20px, 4vw, 40px); right: 30%; display: grid; gap: 8px; }
.hero-preview-text strong { font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 900; font-stretch: 125%; line-height: .98; letter-spacing: -.03em; }
.hero-preview-text span { opacity: .85; max-width: 52ch; }
.hero-preview-text.is-plain { color: #fff; }
.hero-preview-tag { position: absolute; z-index: 1; top: 14px; right: 14px; }
@media (max-width: 700px) { .hero-preview-text { right: 20px; } .hero-preview-text span { display: none; } }
.media-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.media-option { position: relative; display: grid; gap: 6px; cursor: pointer; font-size: .88rem; font-weight: 600; }
.media-option input { position: absolute; opacity: 0; pointer-events: none; }
.media-thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--paper); border: 2px solid var(--line); color: var(--ink-3); transition: border-color .15s; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-option input:checked + .media-thumb { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-tint); }
.media-option input:focus-visible + .media-thumb { outline: 3px solid var(--cobalt-tint); }
.media-option--check input:checked + .media-thumb { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); opacity: .55; }
.media-current { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* Control de acceso */
.scanner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .scanner { grid-template-columns: 1fr; } }
.scanner-cam { position: relative; background: #000; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; color: #fff; }
.scanner-cam #qr-reader { width: 100%; height: 100%; }
.scanner-cam #qr-reader video { object-fit: cover; }
.scanner-cam .cam-placeholder { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 24px; }
.scan-result { border-radius: var(--r-lg); padding: 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); min-height: 220px; display: grid; place-items: center; align-content: center; gap: 8px; transition: background .2s; }
.scan-result .sr-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink-3); margin: 0 auto; }
.scan-result .sr-icon .ico { width: 32px; height: 32px; stroke-width: 2.2; }
.scan-result.is-ok { background: var(--moss); color: #fff; border-color: var(--moss); }
.scan-result.is-warn { background: var(--amber); color: #fff; border-color: var(--amber); }
.scan-result.is-bad { background: var(--red); color: #fff; border-color: var(--red); }
.scan-result.is-ok .sr-icon, .scan-result.is-warn .sr-icon, .scan-result.is-bad .sr-icon { background: rgba(255,255,255,.2); color: #fff; }
.scan-result h3 { font-size: 1.5rem; font-stretch: 115%; margin: 6px 0 0; }
.scan-result p { margin: 0; opacity: .9; }
.scan-counter { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.scan-counter div { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; text-align: center; }
.scan-counter strong { display: block; font-size: 1.4rem; font-weight: 900; font-stretch: 115%; }
.scan-counter small { color: var(--ink-3); }

.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.error-code { font-size: clamp(5rem, 20vw, 9rem); font-weight: 900; font-stretch: 125%; line-height: .9; letter-spacing: -.05em; color: var(--cobalt); }

/* Diálogo de confirmación */
dialog.confirm { border: 0; border-radius: var(--r-lg); padding: 0; width: min(420px, calc(100% - 32px)); box-shadow: var(--shadow-3); color: var(--ink); }
dialog.confirm::backdrop { background: rgba(19,28,51,.5); }
dialog.confirm .confirm-body { padding: 24px; }
dialog.confirm h3 { margin-bottom: 6px; }
dialog.confirm p { color: var(--ink-2); margin: 0; }
dialog.confirm .confirm-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; background: var(--paper); }

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Impresión de tickets */
@media print {
  .site-header, .site-footer, .no-print, .buy-bar, .toasts, .tabs, .account-head .btn { display: none !important; }
  body { background: #fff; }
  .bib, .ticket-qr { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
.field input[type=range] { width: 100%; height: 28px; margin: 4px 0; accent-color: var(--cobalt); }

.offline-banner { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; background: var(--red); color: #fff; font-size: .92rem; font-weight: 500; text-align: center; }
.offline-banner a { color: #fff; text-decoration: underline; font-weight: 700; }
.side-link .count:not(:empty) { min-width: 20px; text-align: center; }
.status-hero { display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: var(--r-lg); color: #fff; background: var(--moss); }
.status-hero.is-off { background: var(--red); }
.status-hero .status-dot { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); flex: none; }
.status-hero .status-dot .ico { width: 28px; height: 28px; }
.status-hero h2 { color: #fff; margin: 0 0 2px; font-size: 1.5rem; font-stretch: 115%; }
.status-hero p { margin: 0; opacity: .9; }
