/* ==========================================================================
   COPA CARDELIUS — Lenguaje Visual BrewNu-X Oscuro × Fútbol Estadio Nocturno
   Negro profundo #020408, cian eléctrico #00f0ff, verde césped neón #2fe6a6,
   dorado/cobre campeonato #f5b731 / #c77d5b, vidrio blur, Orbitron + Inter + JetBrains Mono
   ========================================================================== */

:root {
  --bg: #020408;
  --bg2: #08101c;
  --cyan: #00f0ff;
  --pitch: #2fe6a6;
  --gold: #f5b731;
  --copper: #c77d5b;
  --purple-glow: #9b5cff;
  --card: rgba(8, 14, 22, 0.80);
  --card-strong: rgba(10, 18, 30, 0.92);
  --line: rgba(0, 240, 255, 0.16);
  --line-gold: rgba(245, 183, 49, 0.35);
  --line-pitch: rgba(47, 230, 166, 0.30);
  --txt: #eef5ff;
  --mut: #7f98b3;
  --bad: #ff5d6c;
  --ok: #2fe6a6;
  --warn: #e8a15f;

  --font-brand: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-sport: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  /* Compatibilidad con variables inline en módulos JS */
  --purple: #00f0ff;
  --purple-deep: #eef5ff;
  --gold-light: #f5b731;
  --teal: #00f0ff;
  --teal-deep: #2fe6a6;
  --green: #2fe6a6;
  --red: #ff5d6c;
  --ink: #020408;
  --white: #eef5ff;
  --muted: #8ea6c0;
  --snow: rgba(0, 240, 255, 0.05);
  --paper: #060b13;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#app-shell, header, main, nav, .toast-stack {
  position: relative;
  z-index: 2;
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--mut); }
.text-center { text-align: center; }

/* ---------------- Top Header (BrewNu-X Glass) ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 4, 8, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--txt);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  background: rgba(255, 255, 255, 0.94);
  object-fit: contain;
  padding: 2px;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-title {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  line-height: 1.1;
  white-space: nowrap;
}
.brand-title i {
  font-style: normal;
  color: var(--gold);
  margin-left: 3px;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mut);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 780px) {
  .desk-nav { display: flex; }
}
.desk-nav a {
  color: var(--mut);
  padding: 7px 14px;
  border-radius: 60px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s;
  white-space: nowrap;
}
.desk-nav a:hover {
  color: var(--txt);
  border-color: var(--line);
}
.desk-nav a.on {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.10);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.16);
}

.role-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 60px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: 0.2s;
  white-space: nowrap;
}
.role-menu-btn:hover {
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.28);
}
.role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pitch);
  box-shadow: 0 0 10px var(--pitch);
}

/* ---------------- Main Container ---------------- */
.main-view {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 14px calc(96px + env(safe-area-inset-bottom));
}
@media (min-width: 780px) {
  .main-view { padding: 22px 20px 56px; }
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 14px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.loading-bird {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 16px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 36px rgba(0, 240, 255, 0.35);
  animation: pulseLogo 2s ease-in-out infinite;
}
@keyframes pulseLogo {
  0%, 100% { transform: scale(1); box-shadow: 0 0 28px rgba(0, 240, 255, 0.35); }
  50% { transform: scale(1.05); box-shadow: 0 0 46px rgba(245, 183, 49, 0.45); }
}

/* ---------------- Bottom Mobile Nav ---------------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(5, 10, 18, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(0, 240, 255, 0.22);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav.bottom-nav-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (min-width: 780px) {
  .bottom-nav { display: none; }
}

.bnav-item {
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 14px;
  color: var(--mut);
  font-weight: 600;
  font-size: 11px;
  transition: 0.2s;
}
.bnav-ico { font-size: 18px; line-height: 1; }
.bnav-item.active {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.42);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.2);
}

/* ---------------- Role Drawer ---------------- */
.role-sheet {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 640px) {
  .role-sheet { align-items: center; padding: 16px; }
}
.role-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, 0.80);
  backdrop-filter: blur(5px);
}
.role-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #0a1220;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.14);
  border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
}
@media (min-width: 640px) {
  .role-sheet-panel { border-radius: 24px; padding-bottom: 22px; }
}
.role-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.role-sheet-head h3 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--cyan);
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.role-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: rgba(8, 16, 28, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 13px;
  color: var(--txt);
  transition: 0.2s;
}
.role-tile:hover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  transform: translateY(-2px);
}
.role-tile-ref { border-color: rgba(245, 183, 49, 0.35); background: rgba(245, 183, 49, 0.06); }
.role-tile-ref:hover { border-color: var(--gold); }
.role-tile-admin { border-color: rgba(155, 92, 255, 0.38); background: rgba(155, 92, 255, 0.07); }
.role-tile-admin:hover { border-color: var(--purple-glow); }
.role-emoji { font-size: 24px; }
.role-tile strong { font-size: 14px; color: #fff; }
.role-tile small { font-size: 11px; color: var(--mut); }

/* ==========================================================================
   PORTADA IMPRESIONANTE — COPA CARDELIUS (BrewNu-X Stadium Hero)
   ========================================================================== */
.copa-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(0, 240, 255, 0.28);
  background: #030710;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.78), 0 0 48px rgba(0, 240, 255, 0.12);
  min-height: 460px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.copa-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/static/img/hero_copa_estadio.jpg'), url('/static/img/hero_copa_estadio.png');
  background-size: cover;
  background-position: 68% 45%;
  transform: scale(1.02);
  opacity: 0.94;
}

.copa-hero-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020408 0%, rgba(2, 4, 8, 0.92) 34%, rgba(2, 4, 8, 0.56) 62%, rgba(2, 4, 8, 0.18) 100%),
    linear-gradient(0deg, #020408 0%, rgba(2, 4, 8, 0.15) 40%, rgba(2, 4, 8, 0.35) 100%);
}

.hero-radar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.copa-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 640px;
  padding: 28px 24px 26px;
}

.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 60px;
  background: rgba(47, 230, 166, 0.12);
  border: 1px solid rgba(47, 230, 166, 0.45);
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pitch);
  box-shadow: 0 0 12px var(--pitch);
  animation: blinkDot 1.6s infinite;
}
@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-emblem-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.hero-logo-lg {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.35), 0 0 12px rgba(245, 183, 49, 0.3);
}
.hero-edition-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--copper);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-display {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: clamp(2.15rem, 6.5vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-display .w-copa {
  display: inline-block;
  background: linear-gradient(180deg, #e0feff 0%, #00f0ff 55%, #00a9c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(0, 240, 255, 0.4));
}
.hero-display .w-cardelius {
  display: block;
  margin-top: 4px;
  background: linear-gradient(180deg, #fff5d1 0%, #f5b731 48%, #c77d5b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(245, 183, 49, 0.42));
}

.hero-rule {
  width: 78px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--gold), transparent);
  margin: 14px 0 12px;
}

.hero-subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  color: rgba(238, 245, 255, 0.86);
  max-width: 480px;
}
.hero-subtitle strong { color: var(--pitch); }

.hero-hud-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.hero-hud-box {
  background: rgba(6, 12, 22, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-top: 2px solid var(--cyan);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}
.hero-hud-box.hud-gold { border-top-color: var(--gold); }
.hero-hud-box.hud-pitch { border-top-color: var(--pitch); }
.hero-hud-val {
  display: block;
  font-family: var(--font-brand);
  font-size: clamp(16px, 3.6vw, 22px);
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}
.hud-gold .hero-hud-val { color: var(--gold); text-shadow: 0 0 18px rgba(245, 183, 49, 0.35); }
.hud-pitch .hero-hud-val { color: var(--pitch); text-shadow: 0 0 18px rgba(47, 230, 166, 0.35); }
.hero-hud-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .copa-hero {
    min-height: 490px;
    align-items: flex-end;
    border-radius: 22px;
  }
  .copa-hero-bg {
    background-position: 62% 18%;
  }
  .copa-hero-fade {
    background:
      linear-gradient(0deg, #020408 0%, rgba(2, 4, 8, 0.94) 44%, rgba(2, 4, 8, 0.50) 72%, rgba(2, 4, 8, 0.20) 100%);
  }
  .copa-hero-content { padding: 22px 16px 20px; }
  .hero-logo-lg { width: 52px; height: 52px; }
  .hero-cta-row .btn { flex: 1; }
}

/* ---------------- Cards (BrewNu-X Glass) ---------------- */
.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(0, 240, 255, 0.32); }

.card-purple {
  background: linear-gradient(135deg, rgba(22, 14, 48, 0.88), rgba(8, 16, 28, 0.88));
  border-color: rgba(155, 92, 255, 0.35);
}

.card-gold {
  background: linear-gradient(135deg, rgba(44, 30, 8, 0.82), rgba(10, 16, 26, 0.88));
  border-color: var(--line-gold);
}

.card-teal {
  background: linear-gradient(135deg, rgba(6, 36, 40, 0.84), rgba(8, 15, 24, 0.88));
  border-color: var(--line-pitch);
}

.card-dark {
  background: rgba(4, 9, 16, 0.92);
  border-color: rgba(0, 240, 255, 0.28);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 12px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  border-left: 4px solid var(--cyan);
  padding-left: 11px;
}
.section-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: transparent;
  border: none;
  padding: 4px 6px;
  letter-spacing: 0.04em;
}
.section-link:hover { color: var(--cyan); }

/* ---------------- Badges & Pills ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 60px;
  border: 1px solid var(--cyan);
  background: rgba(0, 240, 255, 0.10);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.badge-gold { border-color: var(--gold); background: rgba(245, 183, 49, 0.14); color: #fde68a; }
.badge-purple { border-color: rgba(155, 92, 255, 0.65); background: rgba(155, 92, 255, 0.16); color: #d8b4fe; }
.badge-green { border-color: var(--pitch); background: rgba(47, 230, 166, 0.14); color: #99f6e4; }
.badge-teal { border-color: var(--cyan); background: rgba(0, 240, 255, 0.12); color: #a5f3fc; }
.badge-orange { border-color: var(--warn); background: rgba(232, 161, 95, 0.16); color: #fed7aa; }
.badge-red { border-color: var(--bad); background: rgba(255, 93, 108, 0.16); color: #fecaca; }
.badge-gray { border-color: rgba(148, 163, 184, 0.35); background: rgba(148, 163, 184, 0.10); color: #cbd5e1; }

/* ---------------- Buttons (BrewNu-X Pill Glow) ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 60px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  transition: 0.2s;
  text-align: center;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 12px; }
.btn-lg { padding: 13px 22px; font-size: 14px; width: 100%; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--cyan);
  color: #001318;
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.28);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 30px rgba(0, 240, 255, 0.55); }

.btn-gold {
  background: linear-gradient(135deg, #ffd76a, #e8961e);
  color: #160c00;
  box-shadow: 0 0 22px rgba(245, 183, 49, 0.32);
}
.btn-gold:hover:not(:disabled) { box-shadow: 0 0 32px rgba(245, 183, 49, 0.6); }

.btn-green {
  background: var(--pitch);
  color: #011f15;
  box-shadow: 0 0 20px rgba(47, 230, 166, 0.25);
}
.btn-green:hover:not(:disabled) { box-shadow: 0 0 28px rgba(47, 230, 166, 0.55); }

.btn-teal {
  background: rgba(0, 240, 255, 0.14);
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.45);
}
.btn-teal:hover:not(:disabled) { background: rgba(0, 240, 255, 0.24); }

.btn-mp {
  background: #009EE3;
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 158, 227, 0.35);
}

.btn-danger {
  background: rgba(255, 93, 108, 0.18);
  color: #ffb3ba;
  border-color: rgba(255, 93, 108, 0.55);
}
.btn-danger:hover:not(:disabled) { background: var(--bad); color: #190205; }

.btn-white {
  background: rgba(255, 255, 255, 0.06);
  color: var(--txt);
  border-color: rgba(238, 245, 255, 0.22);
}
.btn-white:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.4);
}
.btn-ghost:hover:not(:disabled) { background: rgba(0, 240, 255, 0.10); }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--txt);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------------- Match Cards (Broadcast Fútbol NUX) ---------------- */
.match-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 20px;
  padding: 15px 16px;
  margin-bottom: 13px;
  transition: border-color 0.2s, transform 0.15s;
}
.match-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(47, 230, 166, 0.025) 0px,
    rgba(47, 230, 166, 0.025) 26px,
    transparent 26px,
    transparent 52px
  );
  pointer-events: none;
}
.match-card:hover { border-color: rgba(0, 240, 255, 0.42); }
.match-card-final {
  border-left-color: var(--gold);
  border-color: rgba(245, 183, 49, 0.35);
  background: linear-gradient(135deg, rgba(42, 28, 6, 0.78), rgba(8, 14, 22, 0.88));
  box-shadow: 0 0 32px rgba(245, 183, 49, 0.12);
}

.match-meta-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.match-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
}

.match-scoreboard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}
.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
}
.team-crest {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.18);
  flex-shrink: 0;
}
.team-crest-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 10px; box-shadow: none; }
.team-crest img { width: 100%; height: 100%; object-fit: cover; }

.match-team-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.score-pill {
  font-family: var(--font-brand);
  font-size: 24px;
  font-weight: 800;
  background: rgba(2, 6, 12, 0.9);
  color: var(--gold);
  border: 1px solid rgba(245, 183, 49, 0.45);
  box-shadow: 0 0 22px rgba(245, 183, 49, 0.18);
  padding: 7px 16px;
  border-radius: 14px;
  letter-spacing: 0.06em;
  min-width: 92px;
  text-align: center;
}
.score-pill-vs {
  background: rgba(0, 240, 255, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.12);
  font-size: 14px;
  padding: 8px 14px;
  min-width: 68px;
}
.penalties-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 4px;
  text-align: center;
}

.match-details-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--mut);
  padding-top: 10px;
  border-top: 1px solid rgba(0, 240, 255, 0.12);
}
.match-details-bar strong { color: var(--txt); }
.match-actions-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------------- Tabs & Filter Pills ---------------- */
.pill-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.pill-tabs::-webkit-scrollbar { display: none; }

.pill-tab {
  border: 1px solid var(--line);
  background: rgba(8, 14, 22, 0.72);
  color: var(--mut);
  border-radius: 60px;
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: 0.2s;
}
.pill-tab:hover { color: var(--txt); border-color: rgba(0, 240, 255, 0.4); }
.pill-tab.active {
  background: var(--cyan);
  color: #021218;
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}

/* ---------------- Standings Table (BrewNu-X Precision) ---------------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.standings-table th:nth-child(2) { text-align: left; }
.standings-table td {
  padding: 11px 6px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--txt);
}
.standings-table td:nth-child(2) { text-align: left; font-family: var(--font-body); }
.standings-table tr:hover td { background: rgba(0, 240, 255, 0.04); }
.standings-table tr.zone-final td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.standings-table tr.zone-third_place td:first-child { box-shadow: inset 4px 0 0 var(--cyan); }
.team-inline { display: flex; align-items: center; gap: 9px; font-weight: 700; color: #fff; }
.pts-cell {
  font-family: var(--font-brand) !important;
  font-weight: 800;
  font-size: 15px !important;
  color: var(--cyan) !important;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}
.form-dots { display: inline-flex; gap: 4px; }
.fdot {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fdot-G { background: rgba(47, 230, 166, 0.25); color: var(--pitch); border: 1px solid var(--pitch); }
.fdot-E { background: rgba(245, 183, 49, 0.22); color: var(--gold); border: 1px solid var(--gold); }
.fdot-P { background: rgba(255, 93, 108, 0.22); color: var(--bad); border: 1px solid var(--bad); }

/* ---------------- Rankings List ---------------- */
.rank-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
}
.rank-row:last-child { border-bottom: none; }
.rank-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 13px;
  background: rgba(0, 240, 255, 0.06);
  color: var(--cyan);
  flex-shrink: 0;
}
.rank-num-1 {
  background: rgba(245, 183, 49, 0.20);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 16px rgba(245, 183, 49, 0.25);
}
.rank-info { flex: 1; min-width: 0; }
.rank-info strong { display: block; font-size: 14px; color: #fff; }
.rank-info small { font-size: 11px; color: var(--mut); }
.rank-metric {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 19px;
  color: var(--cyan);
  text-align: right;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}

/* ---------------- Forms & Wizard ---------------- */
.form-group { margin-bottom: 13px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 6px;
  color: var(--copper);
}
.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 12px;
  background: rgba(2, 6, 12, 0.72);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--txt);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.16);
}
.select option { background: #08101c; color: #eef5ff; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}
.wstep {
  text-align: center;
  padding: 9px 6px;
  border-radius: 60px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  background: rgba(8, 14, 22, 0.7);
  color: var(--mut);
}
.wstep.active {
  background: rgba(0, 240, 255, 0.14);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.2);
}
.wstep.done {
  background: rgba(47, 230, 166, 0.14);
  border-color: var(--pitch);
  color: var(--pitch);
}

.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
}
.swatch.selected { outline: 2.5px solid var(--cyan); outline-offset: 2px; box-shadow: 0 0 14px var(--cyan); }

.roster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(2, 8, 16, 0.72);
  border: 1px solid rgba(0, 240, 255, 0.14);
  border-radius: 14px;
  margin-bottom: 8px;
}
.jersey-chip {
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- Premios & Reglamento ---------------- */
.prize-banner-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  margin-bottom: 14px;
}
.prize-card {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(14px);
  margin-bottom: 10px;
}
.prize-card-hi {
  border-color: var(--line-gold);
  background: linear-gradient(135deg, rgba(46, 32, 8, 0.8), rgba(8, 14, 22, 0.88));
}
.prize-medal {
  min-width: 68px;
  padding: 9px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  text-align: center;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.rule-accordion {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  margin-bottom: 10px;
  overflow: hidden;
}
.rule-accordion summary {
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--txt);
}
.rule-accordion[open] summary {
  background: rgba(0, 240, 255, 0.09);
  color: var(--cyan);
  border-bottom: 1px solid var(--line);
}
.rule-accordion ul {
  margin: 0;
  padding: 13px 18px 15px 32px;
  font-size: 13px;
  color: #cbd8e8;
  line-height: 1.55;
}
.rule-accordion li { margin-bottom: 7px; }

/* ---------------- MODO ÁRBITRO (Broadcast Sideline Tablet) ---------------- */
.ref-console-head {
  background: linear-gradient(160deg, rgba(10, 20, 34, 0.94), rgba(4, 9, 16, 0.96));
  color: var(--txt);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.7), 0 0 36px rgba(0, 240, 255, 0.14);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 15px;
}
.ref-score-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin: 12px 0;
}
.ref-big-score {
  font-family: var(--font-brand);
  font-size: 34px;
  font-weight: 800;
  color: var(--gold);
  background: rgba(2, 4, 8, 0.9);
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 28px rgba(245, 183, 49, 0.25);
  border-radius: 16px;
  padding: 8px 18px;
}
.ref-timer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 14px;
  padding: 9px 12px;
  margin-top: 10px;
}
.ref-timer-val {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--pitch);
  text-shadow: 0 0 14px rgba(47, 230, 166, 0.4);
}

.dorsal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
@media (min-width: 600px) {
  .dorsal-grid { grid-template-columns: repeat(5, 1fr); }
}
.dorsal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 82px;
  padding: 10px 6px;
  background: rgba(6, 13, 24, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 16px;
  color: var(--txt);
  text-align: center;
  transition: 0.15s;
}
.dorsal-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.10);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.2);
}
.dorsal-btn-num {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
}
.dorsal-btn-name {
  font-size: 11px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dbe8f8;
}
.dorsal-btn.suspended {
  background: rgba(255, 93, 108, 0.14);
  border-color: var(--bad);
  opacity: 0.72;
}
.dorsal-btn.suspended .dorsal-btn-num { color: var(--bad); }
.dorsal-btn.is-gk {
  background: rgba(47, 230, 166, 0.10);
  border-color: var(--pitch);
}
.dorsal-btn.is-mvp {
  background: rgba(245, 183, 49, 0.14);
  border-color: var(--gold);
}
.dorsal-mini-badges { display: flex; gap: 3px; font-size: 11px; margin-top: 2px; }

/* ---------------- Modal & Toasts (BrewNu-X Glass) ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, 0.82);
  backdrop-filter: blur(5px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: #0a1322;
  border: 1px solid var(--cyan);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 36px rgba(0, 240, 255, 0.18);
  border-radius: 22px;
  padding: 20px 18px;
  color: var(--txt);
}

.toast-stack {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: calc(100% - 28px);
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 780px) {
  .toast-stack { bottom: 24px; }
}
.toast {
  background: rgba(8, 14, 22, 0.96);
  color: var(--txt);
  border: 1px solid var(--cyan);
  border-radius: 60px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.28);
  pointer-events: auto;
}
.toast-ok { border-color: var(--pitch); box-shadow: 0 0 28px rgba(47, 230, 166, 0.3); }
.toast-err { border-color: var(--bad); background: rgba(45, 8, 16, 0.96); box-shadow: 0 0 28px rgba(255, 93, 108, 0.3); }

/* ---------------- Admin KPI Grid (BrewNu-X op-kpi) ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}
@media (min-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
.kpi-box {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
}
.kpi-box:nth-child(2) { border-top-color: var(--pitch); }
.kpi-box:nth-child(2) .kpi-val { color: var(--pitch); }
.kpi-box:nth-child(3) { border-top-color: var(--gold); }
.kpi-box:nth-child(3) .kpi-val { color: var(--gold); }
.kpi-val {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}
.kpi-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
  margin-top: 4px;
}

.event-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.09);
  font-size: 13px;
}
.event-line:last-child { border-bottom: none; }

.code-box {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: rgba(0, 240, 255, 0.10);
  color: var(--cyan);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.18);
  border-radius: 14px;
  padding: 13px;
  text-align: center;
}

/* ---------------- Landing Info & Showcase de Valor (Publicidad App) ---------------- */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 720px) {
  .schedule-grid { grid-template-columns: repeat(4, 1fr); }
}
.schedule-tile {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  border-radius: 18px;
  padding: 14px 13px;
}
.schedule-tile.tile-final {
  border-top-color: var(--gold);
  border-color: var(--line-gold);
  background: linear-gradient(155deg, rgba(48, 32, 8, 0.8), rgba(8, 14, 22, 0.88));
}
.schedule-tile .st-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.schedule-tile.tile-final .st-tag { color: var(--gold); }
.schedule-tile .st-date {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 5px 0 3px;
}
.schedule-tile .st-sub {
  font-size: 12px;
  color: var(--mut);
  line-height: 1.35;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 720px) {
  .slots-grid { grid-template-columns: repeat(4, 1fr); }
}
.slot-card {
  border-radius: 16px;
  padding: 13px 11px;
  border: 1px dashed rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.slot-card.filled {
  border-style: solid;
  border-color: rgba(47, 230, 166, 0.45);
  background: rgba(47, 230, 166, 0.07);
}
.slot-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.showcase-section {
  position: relative;
  overflow: hidden;
  margin-top: 26px;
  padding: 22px 18px;
  border-radius: 26px;
  border: 1px solid rgba(0, 240, 255, 0.32);
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 240, 255, 0.14), transparent 48%),
    radial-gradient(circle at 90% 88%, rgba(245, 183, 49, 0.14), transparent 50%),
    rgba(6, 12, 22, 0.88);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65), 0 0 42px rgba(0, 240, 255, 0.09);
}
.showcase-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 20px;
}
.showcase-title {
  margin: 10px 0 8px;
  font-family: var(--font-brand);
  font-size: clamp(19px, 4.5vw, 27px);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #00f0ff 52%, #f5b731 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.showcase-sub {
  margin: 0;
  font-size: 13px;
  color: #c2d4e8;
  line-height: 1.55;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 920px) {
  .showcase-grid { grid-template-columns: repeat(3, 1fr); }
}
.feat-card {
  background: rgba(8, 15, 26, 0.86);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-top: 3px solid var(--cyan);
  border-radius: 18px;
  padding: 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.2s, border-color 0.2s;
}
.feat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 240, 255, 0.48);
}
.feat-card.accent-gold { border-top-color: var(--gold); }
.feat-card.accent-pitch { border-top-color: var(--pitch); }
.feat-card.accent-purple { border-top-color: var(--purple-glow); }
.feat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feat-ico {
  font-size: 24px;
  line-height: 1;
}
.feat-card h3 {
  margin: 2px 0 0;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}
.feat-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--mut);
  line-height: 1.48;
}

.showcase-cta-box {
  margin-top: 20px;
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(135deg, rgba(44, 30, 8, 0.72), rgba(8, 16, 28, 0.9));
  text-align: center;
}

