/* =====================================================================
   Mi Ticket (UBIKUA) - Sistema de diseno
   ---------------------------------------------------------------------
   Sin dependencias externas. Tipografia Inter/JetBrains Mono locales
   (assets/css/fonts.css). Paleta corporativa navy + oro sobre papel.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
  --navy-950: #071a2b;
  --navy-900: #0b2239;
  --navy-800: #0f2d4a;
  --navy-700: #163a5c;
  --navy-600: #336699;
  --navy-100: #e8eef6;

  --gold-600: #d9a500;
  --gold-500: #f6bb00;
  --gold-400: #ffcb2e;
  --gold-100: #fdf3d3;

  --paper: #f4f6f8;
  --paper-warm: #fbf7ec;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #13202e;
  --text-soft: #33475b;
  --muted: #5b6b7d;

  --success: #117a5c;
  --success-bg: #e6f6ef;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --warning: #946200;
  --warning-bg: #fff4d6;
  --info: #0b5cad;
  --info-bg: #e8f1fb;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(13, 38, 61, 0.08);
  --shadow-sm: 0 2px 8px rgba(13, 38, 61, 0.08);
  --shadow-md: 0 12px 28px rgba(13, 38, 61, 0.12);
  --shadow-lg: 0 24px 60px rgba(13, 38, 61, 0.18);

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;

  --container: 1180px;
  --header-height: 74px;
  --transition: 180ms ease;
}

/* ---------------------------------------------------------------------
   2. Reset y base
   --------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

/* El atributo hidden debe ganar siempre a cualquier display de clase. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img,
svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy-700); text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { color: var(--navy-600); }

ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: 1.75rem 0; }

strong { font-weight: 700; }

::selection { background: var(--gold-400); color: var(--navy-950); }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.mi-icon {
  width: 1.15em;
  height: 1.15em;
  stroke-width: 2;
  flex: 0 0 auto;
  vertical-align: -0.18em;
}

/* ---------------------------------------------------------------------
   3. Utilidades
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; color: #fff; }

.stack { display: grid; gap: 1rem; }
.stack-sm { display: grid; gap: 0.5rem; }
.stack-lg { display: grid; gap: 1.75rem; }

.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.cluster-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.cluster-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.75rem; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.hide-sm { display: inline; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.75rem; }
.w-full { width: 100%; }

/* ---------------------------------------------------------------------
   4. Botones
   --------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--navy-800);
  --btn-color: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  color: var(--btn-color);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { color: var(--btn-color); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled],
.btn.is-disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  --btn-bg: var(--gold-500);
  --btn-color: var(--navy-950);
  --btn-border: var(--gold-500);
}
.btn-primary:hover { --btn-bg: var(--gold-400); --btn-border: var(--gold-400); }

.btn-dark { --btn-bg: var(--navy-800); --btn-color: #fff; }
.btn-dark:hover { --btn-bg: var(--navy-700); }
.btn-ghost {
  --btn-bg: transparent;
  --btn-color: var(--navy-800);
  --btn-border: var(--line-strong);
}
.btn-ghost:hover { --btn-bg: var(--navy-100); }
.btn-light {
  --btn-bg: rgba(255, 255, 255, 0.12);
  --btn-color: #fff;
  --btn-border: rgba(255, 255, 255, 0.35);
}
.btn-light:hover { --btn-bg: rgba(255, 255, 255, 0.22); }
.btn-danger { --btn-bg: var(--danger); --btn-color: #fff; }
.btn-danger-ghost {
  --btn-bg: transparent;
  --btn-color: var(--danger);
  --btn-border: rgba(180, 35, 24, 0.35);
}
.btn-danger-ghost:hover { --btn-bg: var(--danger-bg); }
.btn-sm { padding: 0.42rem 0.85rem; font-size: 0.875rem; gap: 0.35rem; }
.btn-lg { padding: 0.95rem 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; border-radius: 50%; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--navy-700);
  font-weight: 600;
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------
   5. Badges, pills y avisos
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  background: var(--navy-100);
  color: var(--navy-700);
  white-space: nowrap;
}
.badge .mi-icon { width: 0.95em; height: 0.95em; }

.tone-success { background: var(--success-bg); color: var(--success); }
.tone-danger { background: var(--danger-bg); color: var(--danger); }
.tone-warning { background: var(--warning-bg); color: var(--warning); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-neutral { background: #eef2f7; color: var(--text-soft); }
.tone-gold { background: var(--gold-100); color: var(--gold-600); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
}

.alert {
  display: flex;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.95rem;
}
.alert .mi-icon { margin-top: 0.15rem; }
.alert-title { margin: 0 0 0.2rem; font-weight: 700; }
.alert p { margin: 0; }
.alert-info { background: var(--info-bg); border-color: rgba(11, 92, 173, 0.18); color: #0a3f76; }
.alert-success { background: var(--success-bg); border-color: rgba(17, 122, 92, 0.2); color: #0b5c46; }
.alert-warning { background: var(--warning-bg); border-color: rgba(148, 98, 0, 0.22); color: #6b4700; }
.alert-danger { background: var(--danger-bg); border-color: rgba(180, 35, 24, 0.2); color: #8a1c13; }

.alert-urgent {
  background: linear-gradient(135deg, #fff4d6, #ffe6a8);
  border-color: rgba(201, 143, 0, 0.45);
  color: #6b4700;
  animation: urgency-pulse 2.8s ease-in-out infinite;
}
@keyframes urgency-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 183, 5, 0); }
  50% { box-shadow: 0 0 0 6px rgba(242, 183, 5, 0.16); }
}

.meter {
  height: 10px;
  border-radius: var(--radius-pill);
  background: #e6ecf3;
  overflow: hidden;
}
.meter-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--navy-600);
  transition: width 400ms ease;
}
.meter-bar.is-warning { background: var(--gold-500); }
.meter-bar.is-danger { background: var(--danger); }

/* ---------------------------------------------------------------------
   6. Formularios
   --------------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.15rem; }
.form-grid-2 { display: grid; gap: 1.15rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field { display: grid; gap: 0.35rem; }
.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
}
.field-label .req { color: var(--danger); }
.field-hint { font-size: 0.82rem; color: var(--muted); }
.field-error { font-size: 0.82rem; color: var(--danger); font-weight: 600; }

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:hover,
.select:hover,
.textarea:hover { border-color: var(--navy-600); }
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(31, 74, 114, 0.12);
}
.input::placeholder,
.textarea::placeholder { color: #93a1b1; }
.textarea { min-height: 130px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6b7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.4rem;
}
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: var(--danger); background: #fffafa; }
.field.has-error .input:focus,
.field.has-error .select:focus,
.field.has-error .textarea:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12); }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.check input[type="checkbox"],
.check input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--navy-700);
  flex: 0 0 auto;
}
.check a { font-weight: 600; }

.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------------------------------------------------------------------
   7. Cabecera y pie publicos
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.22rem;
}
.brand:hover { color: var(--navy-900); }
.brand-icon {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--gold-600);
  stroke-width: 2.2;
}
.brand-name { line-height: 1; }
.brand-dot { color: var(--gold-500); }
.brand-by {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: flex-end;
  padding-bottom: 0.15rem;
}
.brand-light,
.brand-light:hover { color: #fff; }
.brand-light .brand-by { color: rgba(255, 255, 255, 0.55); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.site-nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}
.site-nav-link:hover { background: var(--navy-100); color: var(--navy-800); }
.site-nav-link.is-active { color: var(--navy-900); background: var(--gold-100); }
.nav-logout { display: inline-flex; }
.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy-900);
  cursor: pointer;
}
.nav-toggle .mi-icon { width: 1.4rem; height: 1.4rem; }

.site-main { min-height: 60vh; }

.site-footer {
  margin-top: 4.5rem;
  padding: 3.5rem 0 1.5rem;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
}
.site-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-claim { font-size: 0.92rem; max-width: 34ch; color: rgba(255, 255, 255, 0.65); }
.footer-company { font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); margin-top: 0.75rem; }
.footer-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-400);
  margin-bottom: 1rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer-bottom p { margin: 0; }

/* ---------------------------------------------------------------------
   8. Landing
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 480px at 88% -10%, rgba(242, 183, 5, 0.22), transparent 60%),
    radial-gradient(700px 420px at 8% 10%, rgba(31, 74, 114, 0.55), transparent 55%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800) 58%, var(--navy-700));
  color: #fff;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 6.5rem);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--paper));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(242, 183, 5, 0.45);
  border-radius: var(--radius-pill);
  color: var(--gold-400);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}
.hero h1 em { color: var(--gold-400); font-style: normal; }
.hero-lead {
  max-width: 52ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.hero-note { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.hero-note span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-note .mi-icon { color: var(--gold-400); }

.hero-ticket {
  position: relative;
  justify-self: end;
  width: min(100%, 420px);
  transform: rotate(-2deg);
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.35));
  animation: float-ticket 7s ease-in-out infinite;
}
@keyframes float-ticket {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(-1deg) translateY(-10px); }
}
.hero-ticket-note {
  position: absolute;
  right: -0.5rem;
  bottom: -1.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--gold-500);
  color: var(--navy-950);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(3deg);
  box-shadow: var(--shadow-md);
}

.logos-strip {
  position: relative;
  z-index: 2;
  margin-top: -1.5rem;
}
.logos-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  color: var(--muted);
}
.logos-strip strong { color: var(--navy-800); }

.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.6rem;
}
.section-head p { color: var(--muted); font-size: 1.02rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.feature-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--gold-100);
  color: var(--gold-600);
}
.feature-icon .mi-icon { width: 24px; height: 24px; }
.feature-card h3 { margin-bottom: 0.45rem; }
.feature-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: step;
}
.step-card {
  position: relative;
  padding: 1.6rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-card::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-600);
  margin-bottom: 0.6rem;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.step-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.cta-band {
  position: relative;
  overflow: hidden;
  margin: 1rem 0 0;
  padding: clamp(2.5rem, 5vw, 3.75rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 183, 5, 0.35), transparent 65%);
}
.cta-band h2 { color: #fff; margin-bottom: 0.4rem; }
.cta-band p { color: rgba(255, 255, 255, 0.72); margin: 0; max-width: 46ch; }
.cta-band .btn { position: relative; z-index: 1; }

/* Tarjeta de acceso demo */
.demo-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.demo-role {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.demo-role strong { display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-600); }
.demo-role code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--navy-800); word-break: break-all; }

/* ---------------------------------------------------------------------
   9. Catalogo de eventos
   --------------------------------------------------------------------- */
.page-head {
  padding: clamp(2rem, 4vw, 3rem) 0 1.5rem;
  background:
    radial-gradient(700px 280px at 95% 0%, rgba(242, 183, 5, 0.16), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #fff;
}
.page-head h1 { color: #fff; margin-bottom: 0.4rem; }
.page-head p { color: rgba(255, 255, 255, 0.7); margin: 0; max-width: 62ch; }
.page-head .cluster { margin-top: 1.25rem; }

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.1rem;
  margin-top: -1.75rem;
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.catalog-search { flex: 1 1 280px; display: flex; align-items: center; gap: 0.5rem; padding: 0 0.25rem; }
.catalog-search .mi-icon { color: var(--muted); }
.catalog-search .input { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.catalog-search .input:focus { box-shadow: none; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.filter-chip:hover { border-color: var(--navy-600); color: var(--navy-800); }
.filter-chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.event-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.event-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-800); }
.event-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.event-card:hover .event-card-media img { transform: scale(1.04); }
.event-card-badges {
  position: absolute;
  inset: 0.75rem 0.75rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.event-card-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem 1.25rem 1.4rem; flex: 1; }
.event-card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.event-card-title { font-size: 1.18rem; margin: 0; }
.event-card-title a { color: inherit; text-decoration: none; }
.event-card-title a:hover { color: var(--navy-600); }
.event-card-meta { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
.event-card-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.event-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.event-price { font-weight: 800; color: var(--navy-800); font-size: 1.02rem; }
.event-price.is-free { color: var(--success); }
.event-capacity { font-size: 0.8rem; color: var(--muted); }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state .mi-icon { width: 2.2rem; height: 2.2rem; color: var(--navy-600); }
.empty-state h2 { margin: 0; font-size: 1.15rem; }
.empty-state p { margin: 0; max-width: 46ch; }

/* ---------------------------------------------------------------------
   10. Detalle de evento
   --------------------------------------------------------------------- */
.event-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: #fff;
}
.event-hero-media { position: absolute; inset: 0; }
.event-hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; }
.event-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(7, 26, 43, 0.95) 20%, rgba(7, 26, 43, 0.55) 65%, rgba(7, 26, 43, 0.85));
}
.event-hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  max-width: 760px;
}
.event-hero h1 { color: #fff; margin: 0.6rem 0 0.9rem; }
.event-hero-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.8); }
.event-hero-meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.event-hero-meta .mi-icon { color: var(--gold-400); }

.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 0 0;
}
.event-content { display: grid; gap: 2rem; }
.event-panel {
  padding: 1.6rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.event-panel h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.event-description { color: var(--text-soft); font-size: 1.02rem; }
.event-description p { margin-bottom: 1rem; }
.event-description h2,
.event-description h3 { margin-top: 1.5rem; }

.meta-list { display: grid; gap: 1rem; }
.meta-item { display: flex; gap: 0.9rem; }
.meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--navy-100);
  color: var(--navy-700);
}
.meta-item strong { display: block; font-size: 0.95rem; }
.meta-item span { color: var(--muted); font-size: 0.88rem; }

.capacity-block { margin-top: 1.25rem; }
.capacity-row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.capacity-row strong { color: var(--navy-800); }

.event-aside {
  position: sticky;
  top: calc(var(--header-height) + 1.25rem);
  display: grid;
  gap: 1rem;
}
.buy-card {
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.buy-card h2 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.buy-price { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.75rem 0 1rem; }
.buy-price strong { font-size: 2rem; letter-spacing: -0.03em; color: var(--navy-900); }
.buy-price span { color: var(--muted); font-size: 0.85rem; }
.buy-facts { display: grid; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: 0.88rem; color: var(--text-soft); }
.buy-facts li { display: flex; gap: 0.5rem; align-items: flex-start; }
.buy-facts .mi-icon { color: var(--success); margin-top: 0.15rem; }
.organizer-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.organizer-card .avatar { width: 44px; height: 44px; }
.organizer-card strong { display: block; font-size: 0.95rem; }
.organizer-card span { font-size: 0.82rem; color: var(--muted); }

.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-soft);
}
.map-frame iframe { display: block; width: 100%; height: 320px; border: 0; }

.poster-qr {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.poster-qr img { width: 96px; height: 96px; background: #fff; border-radius: var(--radius-sm); padding: 4px; }
.poster-qr p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.poster-qr strong { display: block; color: var(--navy-800); font-size: 0.95rem; }

/* ---------------------------------------------------------------------
   11. Flujo de registro y checkout
   --------------------------------------------------------------------- */
.flow-shell {
  max-width: 760px;
  margin: 2.5rem auto 0;
}
.flow-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  counter-reset: flowstep;
  margin-bottom: 1.75rem;
  padding: 0;
  list-style: none;
}
.flow-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.flow-steps li::before {
  counter-increment: flowstep;
  content: counter(flowstep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--line);
  color: var(--text-soft);
  font-size: 0.72rem;
}
.flow-steps li.is-done { color: var(--success); border-color: rgba(17, 122, 92, 0.25); background: var(--success-bg); }
.flow-steps li.is-done::before { background: var(--success); color: #fff; content: "OK"; font-size: 0.58rem; }
.flow-steps li.is-current { color: var(--navy-900); border-color: var(--gold-500); background: var(--gold-100); }
.flow-steps li.is-current::before { background: var(--gold-500); color: var(--navy-950); }

.flow-head { margin-bottom: 1.5rem; }
.flow-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.35rem; }
.flow-head p { color: var(--muted); margin: 0; }

.email-intent {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: #0a3f76;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.email-intent .mi-icon { flex: 0 0 auto; }

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 700;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}
.summary-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + 1.25rem);
}
.summary-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; padding: 0.45rem 0; color: var(--text-soft); }
.summary-row.is-total { margin-top: 0.6rem; padding-top: 0.9rem; border-top: 1px solid var(--line); font-weight: 800; font-size: 1.05rem; color: var(--navy-900); }
.summary-event { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.summary-event img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.summary-event strong { display: block; font-size: 0.95rem; line-height: 1.3; }
.summary-event span { font-size: 0.8rem; color: var(--muted); }

.pay-methods { display: grid; gap: 0.65rem; margin: 1.25rem 0; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.pay-method:hover { border-color: var(--navy-600); }
.pay-method input { accent-color: var(--navy-700); width: 1.1rem; height: 1.1rem; }
.pay-method.is-selected { border-color: var(--navy-700); background: var(--navy-100); }
.pay-method strong { font-size: 0.92rem; }
.pay-method small { display: block; color: var(--muted); font-size: 0.78rem; }
.pay-method .mi-icon { margin-left: auto; color: var(--navy-700); }

.card-shell {
  padding: 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.card-shell .card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.demo-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}

/* ---------------------------------------------------------------------
   12. Entrada tradicional (ticket)
   --------------------------------------------------------------------- */
.ticket-stage {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(242, 183, 5, 0.15), transparent 60%),
    var(--paper);
}
.ticket-wrap { max-width: 900px; margin: 0 auto; }

.ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  background: var(--paper-warm);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(13, 38, 61, 0.22);
  color: var(--navy-950);
  overflow: hidden;
}
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  left: calc(100% - 270px);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper);
  transform: translateX(-50%);
  box-shadow: inset 0 2px 6px rgba(13, 38, 61, 0.12);
  z-index: 3;
}
.ticket::before { top: -17px; }
.ticket::after { bottom: -17px; }

.ticket-main {
  padding: 2.2rem 2.4rem;
  background:
    repeating-linear-gradient(135deg, rgba(15, 45, 74, 0.035) 0 2px, transparent 2px 12px);
}
.ticket-brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.ticket-brand .brand { font-size: 1.1rem; }
.ticket-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.ticket-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0.5rem 0 0.35rem; line-height: 1.15; }
.ticket-sub { color: var(--text-soft); font-size: 0.95rem; margin: 0; }

.ticket-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem 1.5rem;
  margin: 1.9rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(13, 38, 61, 0.35);
}
.ticket-data dt {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.ticket-data dd { margin: 0; font-weight: 700; font-size: 0.98rem; color: var(--navy-950); }
.ticket-data .is-wide { grid-column: span 2; }

.ticket-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.75rem 1.5rem;
  background: var(--navy-900);
  color: #fff;
  border-left: 2px dashed rgba(255, 255, 255, 0.28);
  text-align: center;
}
.ticket-stub .qr-box {
  width: 190px;
  height: 190px;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
}
.ticket-stub .qr-box img { width: 100%; height: 100%; }
.ticket-number {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-400);
  word-break: break-all;
}
.ticket-scan-note { font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); margin: 0; }
.ticket-hash {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.38);
  word-break: break-all;
  margin: 0;
}

.ticket-status {
  position: absolute;
  top: 1.1rem;
  right: calc(270px + 1.1rem);
  transform: rotate(-6deg);
  padding: 0.3rem 0.8rem;
  border: 2px solid var(--success);
  border-radius: 6px;
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
.ticket-status.is-used { border-color: var(--danger); color: var(--danger); }
.ticket-status.is-cancelled { border-color: var(--muted); color: var(--muted); }

.ticket-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.75rem; }
.ticket-footnote { margin-top: 1.25rem; text-align: center; font-size: 0.82rem; color: var(--muted); }

/* ---------------------------------------------------------------------
   13. Autenticacion
   --------------------------------------------------------------------- */
.page-auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(800px 380px at 12% 0%, rgba(242, 183, 5, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(31, 74, 114, 0.35), transparent 55%),
    linear-gradient(150deg, var(--navy-950), var(--navy-800));
  color: #fff;
}
.auth-header { padding: 1.5rem 1.25rem; display: flex; justify-content: center; }
.auth-main { flex: 1; display: grid; place-items: center; padding: 1.5rem 1.25rem 3rem; }
.auth-card {
  width: min(100%, 440px);
  padding: 2.25rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 1.65rem; margin-bottom: 0.4rem; }
.auth-card .auth-lead { color: var(--muted); margin-bottom: 1.5rem; }
.auth-card .form-grid { margin-bottom: 1.25rem; }
.auth-card .btn-block { margin-top: 0.5rem; }
.auth-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; font-size: 0.86rem; }
.auth-footer { padding: 1rem 1.25rem 2rem; text-align: center; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }
.auth-footer a { color: rgba(255, 255, 255, 0.8); }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0; color: var(--muted); font-size: 0.8rem; }
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.role-hint {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--muted);
}
.role-hint code { font-family: var(--font-mono); color: var(--navy-800); }

/* ---------------------------------------------------------------------
   14. Panel de administracion
   --------------------------------------------------------------------- */
.page-admin { background: var(--paper); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: 268px;
  padding: 1.5rem 1.1rem;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.75);
  overflow-y: auto;
}
.admin-sidebar-head { padding: 0 0.5rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.admin-sidebar-role { margin: 0.6rem 0 0; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.admin-tenant-card {
  margin: 1rem 0 0.5rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-tenant-label { display: block; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 0.2rem; }
.admin-tenant-card strong { display: block; font-size: 0.9rem; color: #fff; line-height: 1.3; }
.admin-tenant-plan { display: block; margin-top: 0.2rem; font-size: 0.72rem; color: rgba(255, 255, 255, 0.45); }
.admin-nav { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 1.25rem; }
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.admin-nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-nav-link.is-active { background: var(--gold-500); color: var(--navy-950); }
.admin-nav-link .mi-icon { width: 1.15rem; height: 1.15rem; }
.admin-nav-separator {
  margin: 1.1rem 0 0.35rem;
  padding: 0 0.8rem;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}
.admin-sidebar-foot { margin-top: auto; padding-top: 1.25rem; display: grid; gap: 0.6rem; font-size: 0.78rem; }
.admin-sidebar-env,
.admin-sidebar-site { display: inline-flex; align-items: center; gap: 0.45rem; color: rgba(255, 255, 255, 0.5); text-decoration: none; }
.admin-sidebar-env { padding: 0.35rem 0.5rem; border-radius: var(--radius-xs); background: rgba(242, 183, 5, 0.08); color: var(--gold-400); }
.admin-sidebar-site:hover { color: #fff; }

.admin-main {
  flex: 1;
  min-width: 0;
  margin-left: 268px;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.admin-sidebar-toggle {
  display: none;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  color: var(--navy-900);
}
.admin-sidebar-toggle .mi-icon { width: 1.35rem; height: 1.35rem; }
.admin-topbar-titles { min-width: 0; }
.admin-page-title { font-size: 1.28rem; margin: 0; letter-spacing: -0.02em; }
.admin-page-subtitle { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }
.admin-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 0.85rem; }
.admin-actions-html { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-user { display: flex; align-items: center; gap: 0.65rem; padding-left: 0.85rem; border-left: 1px solid var(--line); }
.admin-user form { display: inline-flex; }
.admin-user-data { display: grid; line-height: 1.25; }
.admin-user-data strong { font-size: 0.85rem; }
.admin-user-data small { color: var(--muted); font-size: 0.72rem; }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-400);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-content { flex: 1; padding: 1.75rem; display: grid; gap: 1.5rem; align-content: start; }
.admin-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.75rem 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.admin-foot a { color: var(--navy-700); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-card {
  padding: 1.2rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.stat-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-label .mi-icon { color: var(--gold-600); }
.stat-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; color: var(--navy-900); margin: 0.35rem 0 0.1rem; }
.stat-hint { font-size: 0.8rem; color: var(--muted); }
.stat-card.is-accent { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); border-color: transparent; }
.stat-card.is-accent .stat-label { color: rgba(255, 255, 255, 0.65); }
.stat-card.is-accent .stat-value { color: #fff; }
.stat-card.is-accent .stat-hint { color: rgba(255, 255, 255, 0.6); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 1.05rem; }
.panel-head p { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--muted); }
.panel-body { padding: 1.35rem; }
.panel-body.is-flush { padding: 0; }
.panel-foot { padding: 1rem 1.35rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 0.5rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.toolbar-search { flex: 1 1 260px; display: flex; align-items: center; gap: 0.5rem; }
.toolbar-search .input { padding-left: 0.75rem; }
.toolbar-search .mi-icon { color: var(--muted); margin-left: 0.5rem; }

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: rgba(232, 238, 246, 0.5); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-main { display: flex; align-items: center; gap: 0.65rem; }
.table .cell-main .avatar { width: 34px; height: 34px; font-size: 0.72rem; }
.table .cell-title { font-weight: 600; color: var(--navy-900); }
.table .cell-sub { display: block; font-size: 0.78rem; color: var(--muted); }
.table .cell-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .cell-actions { display: flex; gap: 0.35rem; justify-content: flex-end; }
.table tr.is-highlight { background: var(--gold-100); }

.list-cards { display: grid; gap: 0.85rem; }
.list-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.list-card-media { width: 72px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--navy-800); }
.list-card-body { flex: 1 1 220px; min-width: 0; }
.list-card-title { font-weight: 700; color: var(--navy-900); margin: 0 0 0.15rem; }
.list-card-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.8rem; color: var(--muted); }
.list-card-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-section { padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.form-section + .form-section { margin-top: 1rem; }
.form-section h2 { font-size: 1rem; margin-bottom: 1rem; }

.upload-zone {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  padding: 1.75rem 1rem;
  text-align: center;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.upload-zone:hover,
.upload-zone.is-dragover { border-color: var(--navy-600); background: var(--navy-100); }
.upload-zone .mi-icon { width: 1.9rem; height: 1.9rem; color: var(--navy-600); }
.upload-zone input[type="file"] { display: none; }
.upload-preview { display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.upload-preview img { width: 110px; height: 66px; object-fit: cover; border-radius: 6px; }

.banner-preview { width: 100%; max-width: 360px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.banner-preview.is-empty { display: grid; place-items: center; background: var(--navy-100); color: var(--muted); font-size: 0.8rem; }

.ai-panel {
  border: 1px solid rgba(242, 183, 5, 0.4);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffdf5, #fff8e2);
  padding: 1.1rem 1.2rem;
}
.ai-panel-head { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--navy-900); }
.ai-panel-head .mi-icon { color: var(--gold-600); }
.ai-panel p { font-size: 0.85rem; color: var(--text-soft); margin: 0.35rem 0 0.75rem; }
.ai-output { margin-top: 0.85rem; padding: 0.9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.9rem; white-space: pre-wrap; }
.ai-status { font-size: 0.75rem; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tab-link {
  padding: 0.55rem 0.95rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.tab-link.is-active { color: var(--navy-900); border-bottom-color: var(--gold-500); }

.pagination { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; font-size: 0.85rem; }
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text-soft);
  background: var(--surface);
}
.pagination .is-current { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(7, 26, 43, 0.55);
  backdrop-filter: blur(3px);
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(100%, 520px);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.5rem; }

/* Editor WYSIWYG */
.editor {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 0.15rem; padding: 0.45rem; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.editor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.editor-btn:hover { background: var(--navy-100); color: var(--navy-900); }
.editor-btn.is-active { background: var(--navy-800); color: #fff; }
.editor-surface { min-height: 260px; padding: 1rem 1.1rem; outline: none; font-size: 0.92rem; color: var(--text-soft); }
.editor-surface:focus { box-shadow: inset 0 0 0 2px rgba(31, 74, 114, 0.18); }
.editor-surface h2 { font-size: 1.15rem; }
.editor-surface table { width: 100%; border-collapse: collapse; }
.editor-surface td,
.editor-surface th { border: 1px solid var(--line); padding: 0.4rem 0.6rem; }

/* Ayuda */
.help-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; }
.help-nav { position: sticky; top: 90px; display: grid; gap: 0.2rem; }
.help-nav a { padding: 0.45rem 0.7rem; border-radius: var(--radius-sm); text-decoration: none; font-size: 0.88rem; color: var(--text-soft); }
.help-nav a:hover { background: var(--navy-100); color: var(--navy-800); }
.help-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); }
.help-article h2 { margin-top: 2rem; scroll-margin-top: 90px; }
.help-article h2:first-child { margin-top: 0; }
.help-article h3 { margin-top: 1.5rem; }
.help-article img { border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 1rem 0; }
.help-figure { margin: 1.25rem 0; }
.help-figure figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }
.help-tip { display: flex; gap: 0.6rem; padding: 0.85rem 1rem; background: var(--gold-100); border-radius: var(--radius-sm); font-size: 0.88rem; color: #6b4700; margin: 1rem 0; }
.help-tip .mi-icon { flex: 0 0 auto; margin-top: 0.15rem; }

/* Paginas legales */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.prose h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.08rem; margin-top: 1.75rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .prose-updated { font-size: 0.85rem; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1rem 0; }
.prose th,
.prose td { border: 1px solid var(--line); padding: 0.55rem 0.75rem; text-align: left; }
.prose th { background: var(--surface-soft); }

/* Pagina de error */
.error-page { display: grid; place-items: center; padding: clamp(3rem, 8vw, 6rem) 1.25rem; }
.error-card { max-width: 620px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); box-shadow: var(--shadow-md); }
.error-code { font-family: var(--font-mono); font-size: clamp(3rem, 10vw, 5rem); font-weight: 700; line-height: 1; color: var(--gold-500); margin: 0 0 0.5rem; }
.error-title { font-size: 1.5rem; }
.error-message { color: var(--muted); }
.error-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }
.error-trace { margin-top: 1.75rem; text-align: left; }
.error-trace summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.error-trace pre { overflow-x: auto; padding: 1rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.78rem; }

/* Toasts y cookies */
.toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 150;
  display: grid;
  gap: 0.6rem;
  width: min(100% - 2.5rem, 380px);
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  animation: toast-in 260ms ease both;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-icon .mi-icon { width: 1.25rem; height: 1.25rem; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-text { margin: 0; font-size: 0.88rem; color: var(--text-soft); flex: 1; }
.toast-close { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0.1rem; line-height: 1; }
.toast-close .mi-icon { width: 1rem; height: 1rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.cookie-banner {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 140;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2.5rem, 720px);
  padding: 1rem 1.2rem;
  background: var(--navy-950);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.cookie-banner[hidden] { display: none; }
.cookie-text { flex: 1 1 320px; }
.cookie-text strong { display: block; font-size: 0.92rem; margin-bottom: 0.2rem; }
.cookie-text p { margin: 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); }
.cookie-text a { color: var(--gold-400); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------------------------------------------------------------------
   15. Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-ticket { justify-self: start; transform: none; animation: none; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-layout { grid-template-columns: 1fr; }
  .event-aside { position: static; }
  .checkout-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .admin-sidebar { transform: translateX(-100%); transition: transform 240ms ease; box-shadow: var(--shadow-lg); }
  .admin-sidebar.is-open { transform: none; }
  .admin-main { margin-left: 0; }
  .admin-sidebar-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-header-inner { flex-wrap: wrap; gap: 0.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0.5rem 0 0.85rem;
    gap: 0.25rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav-link { width: 100%; }
  .nav-logout { margin-top: 0.5rem; }
  .nav-logout .btn { width: 100%; }
  .hide-sm { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .feature-grid,
  .steps-grid,
  .event-grid,
  .demo-card,
  .form-grid-2,
  .form-row { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; }
  .ticket::before,
  .ticket::after { left: 50%; top: auto; transform: translateX(-50%); }
  .ticket::before { top: calc(100% - 270px); }
  .ticket::after { display: none; }
  .ticket-main { padding: 1.75rem 1.5rem; }
  .ticket-stub { border-left: 0; border-top: 2px dashed rgba(255, 255, 255, 0.28); }
  .ticket-data { grid-template-columns: 1fr 1fr; }
  .ticket-data .is-wide { grid-column: span 2; }
  .ticket-status { position: static; display: inline-block; transform: none; margin: 1rem 1.5rem 0; }
  .admin-topbar { flex-wrap: wrap; padding: 0.85rem 1rem; }
  .admin-user-data { display: none; }
  .admin-user { padding-left: 0.5rem; }
  .admin-content { padding: 1.1rem; }
  .help-grid { grid-template-columns: 1fr; }
  .help-nav { position: static; display: flex; flex-wrap: wrap; }
  .hero { padding-bottom: 4rem; }
  .catalog-toolbar { flex-direction: column; align-items: stretch; }
  .toast-stack { left: 1rem; right: 1rem; width: auto; }
  .cookie-banner { left: 1rem; right: 1rem; width: auto; }
}

@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .toast-stack,
  .ticket-actions,
  .admin-sidebar,
  .admin-topbar,
  .admin-foot,
  .skip-link { display: none !important; }
  body { background: #fff; }
  .ticket { box-shadow: none; border: 1px solid #999; }
  .ticket-stage { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
