/* ============================================================
   Segovia Night Club — Design System v2.0
   iOS 26 / Liquid Glass aesthetic
   Paleta única: deep navy + crystal glass + accent frío
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:            #020509;
  --bg-mid:        #030810;
  --bg-surface:    rgba(8, 16, 36, 0.72);
  --bg-elevated:   rgba(14, 24, 52, 0.80);

  --glass-bg:      rgba(255,255,255, 0.06);
  --glass-bg-hi:   rgba(255,255,255, 0.11);
  --glass-border:  rgba(255,255,255, 0.12);
  --glass-border-hi: rgba(255,255,255, 0.24);
  --glass-blur:    blur(20px) saturate(1.5);

  --text:          #eef4ff;
  --text-sub:      rgba(210, 228, 255, 0.72);
  --text-muted:    rgba(150, 180, 230, 0.52);

  --accent:        rgba(170, 205, 255, 0.90);
  --accent-glow:   rgba(90, 150, 255, 0.20);

  --ok:    #4ade80;
  --warn:  #fbbf24;
  --error: #f87171;
  --ok-bg:    rgba(74,  222, 128, 0.10);
  --warn-bg:  rgba(251, 191,  36, 0.10);
  --error-bg: rgba(248, 113, 113, 0.10);
  --ok-bd:    rgba(74,  222, 128, 0.28);
  --warn-bd:  rgba(251, 191,  36, 0.28);
  --error-bd: rgba(248, 113, 113, 0.28);

  --shadow-sm:  0 4px 16px rgba(0,0,0, 0.28);
  --shadow-md:  0 12px 36px rgba(0,0,0, 0.38);
  --shadow-lg:  0 24px 72px rgba(0,0,0, 0.52);

  --r-xs:  10px;
  --r-sm:  14px;
  --r-md:  18px;
  --r-lg:  24px;
  --r-xl:  30px;
  --r-pill: 999px;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 28% 0%,  rgba(18, 55, 135, 0.26) 0%, transparent 52%),
    radial-gradient(ellipse at 80% 100%, rgba(8, 28, 72, 0.18)  0%, transparent 48%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 22px;
  background: rgba(2, 5, 16, 0.65);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid rgba(255,255,255, 0.07);
}
.brand {
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--text);
  opacity: 0.90;
}
nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  transition: color 0.16s, background 0.16s;
}
nav a:hover { color: var(--text); background: var(--glass-bg); }

/* ── LAYOUT ─────────────────────────────────────────────── */
.wrap   { width: min(1100px, calc(100% - 28px)); margin: 28px auto 80px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 18px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.hero { padding: 32px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 700;
  margin: 0 0 10px;
  opacity: 0.82;
}
h1, h2, h3 { margin: 0 0 12px; line-height: 1.05; font-weight: 800; color: var(--text); }
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p  { color: var(--text-sub); line-height: 1.6; }

/* ── LIQUID GLASS BUTTONS ───────────────────────────────── */
.btn, button.btn, a.btn, span.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255, 0.20);
  background:
    radial-gradient(circle at 28% 16%, rgba(255,255,255, 0.30), rgba(255,255,255, 0.05) 32%, transparent 58%),
    linear-gradient(155deg, rgba(255,255,255, 0.12), rgba(130,175,255, 0.07));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255, 0.42),
    inset 0 -1px 0 rgba(255,255,255, 0.05),
    0 8px 24px rgba(0,0,0, 0.22),
    0 1px 0 rgba(255,255,255, 0.07);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  text-shadow: 0 1px 8px rgba(0,0,0, 0.20);
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}
.btn::before, button.btn::before, a.btn::before, span.btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(175deg, rgba(255,255,255, 0.16) 0%, rgba(255,255,255, 0) 44%);
  pointer-events: none;
}
.btn::after, button.btn::after, a.btn::after, span.btn::after {
  content: "";
  position: absolute;
  left: -40%; top: -20%;
  width: 50%; height: 165%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255, 0.17), transparent);
  opacity: 0.55;
  pointer-events: none;
}
.btn:hover, button.btn:hover, a.btn:hover {
  filter: brightness(1.07);
  border-color: rgba(255,255,255, 0.32);
}
.btn:active, button.btn:active, a.btn:active {
  transform: scale(0.97) translateY(1px);
}

/* PRIMARY — glass blanco brillante */
.btn.primary, button.btn.primary, a.btn.primary {
  background:
    radial-gradient(circle at 28% 16%, rgba(255,255,255, 0.78), rgba(255,255,255, 0.26) 34%, transparent 62%),
    linear-gradient(155deg, rgba(236,248,255, 0.70), rgba(175,210,255, 0.36));
  border-color: rgba(255,255,255, 0.50);
  color: #08111e;
  text-shadow: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255, 0.78),
    inset 0 -1px 0 rgba(255,255,255, 0.14),
    0 10px 28px rgba(60,120,240, 0.16);
}

/* GHOST */
.btn.ghost, button.btn.ghost, a.btn.ghost {
  background:
    radial-gradient(circle at 28% 16%, rgba(255,255,255, 0.12), rgba(255,255,255, 0.02) 30%, transparent),
    linear-gradient(155deg, rgba(255,255,255, 0.05), rgba(110,155,235, 0.03));
  border-color: rgba(255,255,255, 0.12);
  color: rgba(210, 230, 255, 0.80);
  box-shadow: inset 0 1px 0 rgba(255,255,255, 0.20), 0 4px 14px rgba(0,0,0, 0.14);
}

/* DANGER */
.btn.danger, button.btn.danger, a.btn.danger {
  background:
    radial-gradient(circle at 28% 16%, rgba(255,180,180, 0.24), rgba(255,80,80, 0.05) 34%, transparent),
    linear-gradient(155deg, rgba(255,110,110, 0.16), rgba(210,50,50, 0.08));
  border-color: rgba(255,140,140, 0.24);
  color: #ffe4e4;
}

/* FORMAS */
.btn.square, button.btn.square, a.btn.square {
  width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  padding: 0; border-radius: var(--r-sm);
}
.btn.circle, button.btn.circle, a.btn.circle {
  width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  padding: 0; border-radius: 50%;
}

/* TAMAÑOS */
.btn.sm, button.btn.sm, .btn.small { min-height: 34px; padding: 7px 14px; font-size: 12px; }
.btn.lg, button.btn.lg { min-height: 50px; padding: 12px 26px; font-size: 15px; }
.btn.sm.square, .btn.sm.circle, .btn.small.square, .btn.small.circle {
  width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0;
}

/* Icono interno */
.btn .btn-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; }
.btn.circle .btn-icon, .btn.square .btn-icon { width: 20px; height: 20px; }

/* ── ACCIONES ───────────────────────────────────────────── */
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }

/* ── FORMS ──────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
  font-weight: 700;
}
.form input, .form select, .form textarea, .searchbar input {
  width: 100%;
  background: rgba(5, 10, 28, 0.58);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.form input:focus, .form select:focus, .form textarea:focus, .searchbar input:focus {
  border-color: rgba(150,195,255, 0.52);
  box-shadow: 0 0 0 3px rgba(90,150,255, 0.09);
}
.form textarea { resize: vertical; min-height: 110px; }
.form input[type=file] { padding: 10px 12px; }
.form input::placeholder, .form textarea::placeholder { color: var(--text-muted); }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin: 0 0 16px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid;
}
.alert.ok    { background: var(--ok-bg);    border-color: var(--ok-bd);    color: #a7f3c5; }
.alert.warn  { background: var(--warn-bg);  border-color: var(--warn-bd);  color: #fde68a; }
.alert.error { background: var(--error-bg); border-color: var(--error-bd); color: #fecaca; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-sub);
}
.badge.claimed    { background: var(--warn-bg);  border-color: var(--warn-bd);  color: #fde68a; }
.badge.checked_in { background: var(--ok-bg);    border-color: var(--ok-bd);    color: #a7f3c5; }
.badge.completed  { background: var(--ok-bg);    border-color: var(--ok-bd);    color: #a7f3c5; }
.badge.cancelled, .badge.lost { background: var(--error-bg); border-color: var(--error-bd); color: #fecaca; }

/* ── LINKS ──────────────────────────────────────────────── */
.link { color: var(--accent); display: inline-flex; margin-top: 8px; opacity: 0.82; }

/* ── GRIDS ──────────────────────────────────────────────── */
.grid        { display: grid; gap: 16px; }
.form-grid   { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); align-items: end; gap: 10px; }
.full-row    { grid-column: 1 / -1; margin-top: -4px; }
.form-grid.compact-grid { gap: 10px; }

/* ── STATS ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stats-grid.compact { margin-top: 16px; margin-bottom: 0; }
.stat {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 18px 16px;
}
.stat b   { display: block; font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.stat span { color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 0.10em; }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow: auto; }
table       { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td      { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255, 0.06); vertical-align: middle; font-size: 14px; }
th          { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }

/* ── MONO / CODES ───────────────────────────────────────── */
.mono, .ticket-code, .big-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.14em;
  font-weight: 800;
}
.ticket-code { font-size: 22px; color: var(--text); }
.big-code    { font-size: clamp(40px,11vw,78px); text-align: center; margin: 18px 0; }

/* ── TICKETS ────────────────────────────────────────────── */
.tickets-grid { grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); }
.ticket-mini  { display: flex; flex-direction: column; gap: 10px; }
.ticket-card  { text-align: center; max-width: 620px; margin-left: auto; margin-right: auto; }
.ticket-info  { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; text-align: left; margin: 18px 0; }
.ticket-info div {
  background: rgba(255,255,255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 12px;
}
.ticket-info b {
  display: block;
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  opacity: 0.70;
}
.ticket-thumb { width: 100%; height: 140px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--glass-border); margin-bottom: 2px; }
.qrbox, .qr-img-fallback {
  display: grid; place-items: center;
  width: 280px; height: 280px;
  margin: 18px auto;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 14px;
}

/* ── SEARCHBAR ──────────────────────────────────────────── */
.searchbar { display: flex; gap: 10px; margin-bottom: 14px; }

/* ── SCANNER ────────────────────────────────────────────── */
.reader {
  position: relative;
  width: min(420px, 100%);
  min-height: 210px;
  margin: 16px auto;
  border: 1px solid rgba(150,190,255, 0.20);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(0,0,0, 0.28);
  display: grid;
  place-items: center;
}
.reader video, .reader canvas { border-radius: var(--r-md); }
.reader-placeholder { color: var(--text-muted); font-weight: 700; text-align: center; padding: 22px; }
.scanner-controls   { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px auto 14px; }
.camera-hint        { max-width: 520px; margin: 0 auto 14px; text-align: center; font-size: 13px; color: var(--text-muted); }
.scan-form          { max-width: 520px; margin: 0 auto; }
.scan-result {
  margin-top: 16px; border-radius: var(--r-md); padding: 16px;
  display: none; font-weight: 700; font-size: 14px; border: 1px solid;
}
.scan-result.ok    { display: block; background: var(--ok-bg);    border-color: var(--ok-bd);    color: #a7f3c5; }
.scan-result.warn  { display: block; background: var(--warn-bg);  border-color: var(--warn-bd);  color: #fde68a; }
.scan-result.error { display: block; background: var(--error-bg); border-color: var(--error-bd); color: #fecaca; }

/* ── COPY BTN ───────────────────────────────────────────── */
.copy-btn {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-sub);
  padding: 6px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-size: 12px;
  transition: background 0.14s;
}
.copy-btn:hover { background: var(--glass-bg-hi); }

/* ── SELLER ─────────────────────────────────────────────── */
.seller-event-form  { max-width: 720px; }
.seller-assign-form { gap: 18px; }
.seller-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px,1fr));
  gap: 10px; max-height: 260px; overflow: auto;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  background: rgba(0,0,0, 0.14);
}
.seller-check-item {
  display: flex; gap: 8px; align-items: center;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xs);
  background: rgba(255,255,255, 0.03);
  cursor: pointer; font-size: 13px;
}
.seller-check-item input { width: auto; }
.qr-details         { margin-top: 8px; }
.qr-details summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 13px; opacity: 0.80; }
.qr-details img     { display: block; width: 180px; height: 180px; background: #fff; border-radius: var(--r-sm); padding: 10px; margin-top: 8px; }
.qr-details small   { display: block; margin-top: 6px; color: var(--text-muted); }
nav a[href="/seller.php"] { color: var(--text) !important; font-weight: 800; }

/* ── EVENTS ADMIN ───────────────────────────────────────── */
.event-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 18px; }
.event-admin-card { padding: 0; overflow: hidden; }
.event-photo-preview {
  height: 220px;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  display: grid; place-items: center; overflow: hidden;
}
.event-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-photo-preview.empty span { color: var(--text-muted); font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; }
.event-edit-form  { padding: 18px; }
.event-meta-line  { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.check-line {
  display: flex !important; align-items: center; gap: 9px; margin-top: 8px;
  text-transform: none !important; letter-spacing: 0 !important;
  font-weight: 600 !important; color: var(--text-sub) !important;
}
.check-line input { width: auto !important; }

/* ── LANDING HERO (interior) ────────────────────────────── */
.landing-hero {
  position: relative; min-height: 480px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-lg);
  margin-bottom: 22px;
  display: grid; align-items: end; background: var(--bg-mid);
}
.landing-bg { position: absolute; inset: 0; }
.landing-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.landing-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0, 0.80), rgba(0,0,0, 0.30) 55%, transparent),
    linear-gradient(0deg, rgba(0,0,0, 0.88), transparent 52%);
}
.landing-content { position: relative; z-index: 1; max-width: 680px; padding: 38px; }
.landing-content h1 { font-size: clamp(38px, 6vw, 70px); }
.landing-content p  { font-size: 16px; max-width: 560px; }

/* ── NEXT / PUBLIC EVENTS ───────────────────────────────── */
.next-event-card  { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 20px; align-items: center; }
.next-event-img   { height: 300px; border-radius: var(--r-lg); overflow: hidden; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.next-event-img img { width: 100%; height: 100%; object-fit: cover; }
.public-event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px,1fr)); gap: 18px; }
.public-event-card { padding: 0; overflow: hidden; }
.public-event-img  { height: 250px; overflow: hidden; background: var(--glass-bg); }
.public-event-img img { width: 100%; height: 100%; object-fit: cover; }
.public-event-body { padding: 20px; }

/* ── PROFILE ────────────────────────────────────────────── */
.profile-pill {
  border: 1px solid rgba(255,255,255, 0.16);
  border-radius: var(--r-pill);
  padding: 7px 14px !important;
  color: var(--text) !important;
  background: var(--glass-bg);
}
.quick-profile-card        { border-color: rgba(150,195,255, 0.16); }
.profile-hero .role-line   { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.role-badge                { color: var(--accent); border-color: rgba(150,195,255, 0.22); background: rgba(90,150,255, 0.08); }
.role-check-grid           { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 10px; }
.role-check span           { font-weight: 700; }
.seller-hero h1            { letter-spacing: 0.01em; }
.events-hero p             { max-width: 720px; }
.login-card h1             { font-size: clamp(28px, 5vw, 46px); }

/* ── AUTOCOMPLETE ───────────────────────────────────────── */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  background: rgba(4, 10, 28, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.autocomplete-item {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  text-align: left; background: transparent; color: var(--text); border: 0;
  border-bottom: 1px solid rgba(255,255,255, 0.05);
  padding: 12px 14px; cursor: pointer;
  transition: background 0.12s; font-size: 13px;
}
.autocomplete-item:hover { background: rgba(255,255,255, 0.05); }
.autocomplete-item b     { font-family: ui-monospace, monospace; color: var(--accent); }
.autocomplete-item span  { color: var(--text-muted); font-size: 12px; }
.autocomplete-empty      { padding: 12px 14px; color: var(--text-muted); font-size: 13px; }

/* ── MISC ───────────────────────────────────────────────── */
small, .muted, .muted-card { color: var(--text-muted); }
.muted-card { font-size: 13px; }

/* ============================================================
   SEGOVIA FULLSCREEN LANDING
   ============================================================ */
body.landing-fullscreen-body {
  margin: 0; min-height: 100vh; overflow-x: hidden; background: #000;
}
.segovia-fullscreen-landing {
  position: relative; width: 100%; min-height: 100vh; overflow: hidden;
  background-image: var(--segovia-hero);
  background-size: cover; background-position: center; isolation: isolate;
}
.segovia-fullscreen-landing::before {
  content: ""; position: absolute; inset: -2px;
  background-image: var(--segovia-hero);
  background-size: cover; background-position: center; z-index: -2;
}
.segovia-fullscreen-shade {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 28%, rgba(18,70,200, 0.14), transparent 46%),
    linear-gradient(90deg, rgba(0,0,0, 0.18), rgba(0,0,0, 0.06) 48%, rgba(0,0,0, 0.32) 100%),
    linear-gradient(0deg, rgba(0,0,0, 0.74) 0%, rgba(0,0,0, 0.10) 46%, rgba(0,0,0, 0.16) 100%);
}
.landing-floating-alert {
  position: absolute; z-index: 10; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(580px, calc(100% - 32px)); margin: 0;
}

/* ── EVENT WIDGET ───────────────────────────────────────── */
.segovia-event-widget {
  position: absolute;
  left: clamp(22px, 8vw, 140px);
  bottom: clamp(28px, 8vh, 90px);
  z-index: 5;
  width: min(580px, calc(100% - 44px));
  padding: 22px 22px 20px;
  border-radius: var(--r-xl);
  background: rgba(3, 8, 24, 0.72);
  border: 1px solid rgba(255,255,255, 0.16);
  box-shadow: 0 28px 80px rgba(0,0,0, 0.55), inset 0 1px 0 rgba(255,255,255, 0.08);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  overflow: hidden;
}
.segovia-event-widget::after {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 1px;
  background: linear-gradient(90deg, rgba(180,215,255, 0), rgba(180,215,255, 0.52) 26%, rgba(255,255,255, 0.20) 62%, rgba(180,215,255, 0));
  pointer-events: none;
}
.segovia-event-widget .eyebrow   { margin-bottom: 12px; color: var(--accent); font-size: 10px; letter-spacing: 0.28em; opacity: 0.78; }
.segovia-event-widget h1          { font-size: clamp(34px, 4.8vw, 54px); margin-bottom: 7px; color: var(--text); text-shadow: 0 8px 28px rgba(0,0,0, 0.42); }
.segovia-event-widget p           { color: var(--text-sub); margin: 0; font-size: 15px; }

/* Cabecera: ícono + nombre */
.segovia-event-head { display: flex; align-items: center; gap: 15px; }
.segovia-event-icon {
  flex: 0 0 76px; width: 76px; height: 76px; border-radius: 20px;
  overflow: hidden; border: 1px solid rgba(255,255,255, 0.16);
  background: rgba(255,255,255, 0.05);
  box-shadow: 0 10px 30px rgba(0,0,0, 0.28);
}
.segovia-event-icon img          { width: 100%; height: 100%; object-fit: cover; display: block; }
.segovia-event-icon.logo-icon    { background: rgba(0,0,0, 0.40); padding: 10px; }
.segovia-event-icon.logo-icon img { object-fit: contain; }

/* Countdown */
.time-remaining {
  margin-top: 16px; padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(150,190,255, 0.16);
  background: rgba(255,255,255, 0.04);
  display: grid; grid-template-columns: auto auto;
  justify-content: start; align-items: center; column-gap: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255, 0.05);
}
.time-label {
  padding: 0 0 0 10px;
  border-left: 2px solid rgba(160,200,255, 0.80);
  color: var(--accent);
  font-size: 10px; letter-spacing: 0.24em; font-weight: 800; opacity: 0.88;
}

/* Botones del landing */
.landing-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.landing-detail      { margin-top: 12px !important; font-size: 14px; }
.landing-description { margin-top: 8px !important; max-width: 520px; font-size: 14px; display: none; }

/* Botón perfil (esquina) */
.corner-profile-btn { position: absolute; top: 18px; right: 18px; z-index: 10; }

/* ── FLIP CLOCK ─────────────────────────────────────────── */
.flip-countdown-shell { display: flex; align-items: flex-end; gap: 14px; }
.flip-countdown       { display: flex; gap: 9px; align-items: flex-end; }
.flip-countdown-empty { color: var(--text); font-weight: 800; letter-spacing: 0.02em; }

.flip-card {
  position: relative; width: 68px; height: 78px;
  perspective: 600px; font-variant-numeric: tabular-nums; overflow: visible;
}
.flip-panel {
  position: absolute; left: 0; width: 100%; height: 50%;
  overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flip-panel span {
  position: absolute; left: 0; width: 100%; height: 200%;
  display: flex; justify-content: center; align-items: center;
  color: #eef4ff; font-weight: 800; font-size: 30px; letter-spacing: -0.02em; line-height: 1; padding: 0;
}
.flip-top, .flip-next-top {
  top: 0; border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, rgba(14,26,58, 0.98), rgba(9,16,38, 0.96));
  border: 1px solid rgba(150,195,255, 0.15); border-bottom: none;
}
.flip-top span, .flip-next-top span { top: 0; bottom: auto; }

.flip-bottom, .flip-next-bottom {
  bottom: 0; border-radius: 4px 4px 12px 12px;
  background: linear-gradient(180deg, rgba(7,12,28, 0.98), rgba(11,20,44, 0.98));
  border: 1px solid rgba(150,195,255, 0.15); border-top: none;
}
.flip-bottom span, .flip-next-bottom span { top: auto; bottom: 0; }
.flip-next-top, .flip-next-bottom { z-index: 4; visibility: hidden; }

.flip-divider {
  position: absolute; left: 5px; right: 5px; top: 50%; height: 1px; transform: translateY(-0.5px);
  background: linear-gradient(90deg, rgba(150,195,255, 0.04), rgba(200,222,255, 0.36), rgba(150,195,255, 0.04));
  z-index: 5;
}
.flip-card-label {
  position: absolute; left: 0; right: 0; bottom: -16px;
  text-align: center; font-size: 9px; letter-spacing: 0.22em;
  color: rgba(150,195,255, 0.62); font-weight: 800;
}
.flip-card::before, .flip-card::after {
  content: ""; position: absolute; top: calc(50% - 4px);
  width: 6px; height: 8px; border-radius: 999px;
  background: rgba(2,5,16, 0.96); border: 1px solid rgba(150,195,255, 0.11); z-index: 6;
}
.flip-card::before { left: -3px; }
.flip-card::after  { right: -3px; }

.flip-card.is-flipping .flip-top {
  transform-origin: bottom; animation: segoviaFlipTop 0.30s ease-in forwards; z-index: 7;
}
.flip-card.is-flipping .flip-next-top { visibility: visible; z-index: 3; }
.flip-card.is-flipping .flip-next-bottom {
  visibility: visible; transform-origin: top; transform: rotateX(90deg);
  animation: segoviaFlipBottom 0.32s ease-out 0.30s forwards; z-index: 8;
}
@keyframes segoviaFlipTop    { 0%{ transform:rotateX(0deg);   } 100%{ transform:rotateX(-90deg); } }
@keyframes segoviaFlipBottom { 0%{ transform:rotateX(90deg);  } 100%{ transform:rotateX(0deg);   } }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .topbar { align-items: flex-start; gap: 10px; flex-direction: column; }
  nav { gap: 3px; }
  .wrap { width: calc(100% - 20px); margin-top: 16px; }
  .card { padding: 18px; }
  .hero { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .ticket-info { grid-template-columns: 1fr; }
  .role-check-grid { grid-template-columns: 1fr; }
  .qrbox, .qr-img-fallback { width: 240px; height: 240px; padding: 12px; }
  .qrbox canvas, .qrbox img { width: 214px !important; height: 214px !important; }
  .next-event-card { grid-template-columns: 1fr; }
  .next-event-img { height: 220px; }
  .public-event-img { height: 200px; }
  .event-card-grid { grid-template-columns: 1fr; }
  .event-photo-preview { height: 190px; }
  .landing-content { padding: 26px; }
  .landing-hero { min-height: 440px; }

  .btn, button.btn, a.btn, span.btn { min-height: 40px; padding: 9px 16px; font-size: 13px; }
  .btn.square, .btn.circle, button.btn.square, button.btn.circle { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }

  /* Fullscreen landing mobile */
  .segovia-fullscreen-landing {
    min-height: 100svh;
    background-image: var(--segovia-hero-mobile, var(--segovia-hero));
    background-size: cover; background-position: center;
  }
  .segovia-fullscreen-landing::before {
    background-image: var(--segovia-hero-mobile, var(--segovia-hero));
    background-size: cover; background-position: center;
  }
  .segovia-event-widget {
    left: 14px; right: 14px;
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 6px);
    width: auto; padding: 16px 16px 15px; border-radius: 24px;
  }
  .segovia-event-widget h1 { font-size: clamp(25px, 8.6vw, 33px); margin-bottom: 4px; }
  .segovia-event-widget p  { font-size: 12px; }
  .segovia-event-widget .eyebrow { font-size: 9px; letter-spacing: 0.26em; margin-bottom: 10px; }
  .segovia-event-head { gap: 11px; }
  .segovia-event-icon { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 16px; }

  .time-remaining { margin-top: 12px; padding: 11px 12px; column-gap: 10px; }
  .flip-countdown { gap: 6px; }
  .flip-card { width: 56px; height: 66px; }
  .flip-panel span { font-size: 25px; }
  .flip-card-label { font-size: 8px; bottom: -14px; letter-spacing: 0.18em; }

  /* Landing actions — 3 columnas */
  .landing-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px; margin-top: 12px;
  }
  .landing-actions .btn {
    width: 100%; min-width: 0 !important;
    min-height: 40px; padding: 9px 8px; font-size: 12px;
    border-radius: var(--r-pill);
    text-align: center;
  }
  .corner-profile-btn { top: 12px; right: 12px; }
  .landing-floating-alert { top: 12px; width: calc(100% - 28px); }
}

@media (max-width: 390px) {
  .segovia-event-widget { left: 10px; right: 10px; padding: 14px 14px 13px; }
  .segovia-event-icon { flex: 0 0 46px; width: 46px; height: 46px; }
  .segovia-event-widget h1 { font-size: clamp(22px, 8.4vw, 28px); }
  .time-remaining { column-gap: 8px; }
  .flip-countdown { gap: 5px; }
  .flip-card { width: 50px; height: 60px; }
  .flip-panel span { font-size: 22px; }
  .landing-actions .btn { font-size: 11px; min-height: 37px; padding: 7px 6px; }
  .btn, button.btn, a.btn { min-height: 38px; padding: 8px 13px; font-size: 12px; }
  .btn.square, .btn.circle { width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
}

@media (max-height: 700px) and (max-width: 720px) {
  .segovia-event-widget { bottom: 10px; padding: 13px 14px; }
  .time-remaining { margin-top: 10px; }
  .landing-actions { margin-top: 10px; }
}