/* =====================================
   IFL — ESTILOS NUEVOS (Fase 2 + Fase 3)
   Componentes añadidos: modales de partido/estadio,
   tutorial en carrusel, chips de partido en el
   calendario, tarjetas de estadio, utilidades del
   admin panel (toast, buscador, formulario de resultado),
   login rediseñado y loader 100% neón.
   Se carga DESPUÉS de style.css / admin.css.
===================================== */

/* ---- Modal genérico (partido / estadio) ---- */

.ifl-modal[hidden] { display: none; }

.ifl-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ifl-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.ifl-modal__box {
  position: relative;
  width: min(480px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  padding: 28px;
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.ifl-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white, #fff);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ifl-modal__close:hover { background: rgba(255, 255, 255, 0.14); }

.ifl-modal__title {
  margin: 6px 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--white, #fff);
}

.ifl-modal__meta { margin: 0 0 4px; font-size: 13px; color: var(--gray-2, #8b8d96); }

.ifl-modal__score {
  margin: 12px 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  color: var(--white, #fff);
}

/* ---- Chips de partido en el calendario ---- */

.match-chip {
  display: block;
  width: 100%;
  margin-bottom: 3px;
  padding: 3px 6px;
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 4px;
  color: var(--white, #fff);
  font-size: 10.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-chip:hover { background: rgba(88, 101, 242, 0.3); }

/* ---- Tarjetas de estadio ---- */

.stadiums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stadium-card {
  text-align: left;
  padding: 16px 18px;
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.stadium-card:hover { border-color: var(--gray-2, #8b8d96); }

.stadium-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--white, #fff);
  margin-bottom: 4px;
}

.stadium-card__meta { font-size: 12.5px; color: var(--gray-2, #8b8d96); }

/* ---- Tutorial en carrusel ---- */

.ifl-tutorial[hidden] { display: none; }

.ifl-tutorial {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ifl-tutorial__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.ifl-tutorial__box {
  position: relative;
  width: min(460px, 100%);
  padding: 34px 30px 28px;
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  border-radius: 14px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.ifl-tutorial__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white, #fff);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.ifl-tutorial__icon { font-size: 40px; margin-bottom: 10px; }

.ifl-tutorial__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--white, #fff);
}

.ifl-tutorial__body {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-2, #8b8d96);
}

.ifl-tutorial__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.ifl-tutorial__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.ifl-tutorial__dot.is-active { background: var(--accent, #5865f2); }

.ifl-tutorial__nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ---- Admin: notificación flotante (toast) ---- */

.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 99999;
  padding: 10px 20px;
  background: rgba(20, 20, 26, 0.96);
  border: 1px solid var(--border, #23232b);
  border-radius: 8px;
  color: var(--white, #fff);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.admin-toast--error { border-color: rgba(239, 68, 68, 0.5); color: #ff8787; }

/* ---- Admin: resultados de búsqueda flotantes ---- */

.admin-search-results {
  position: absolute;
  z-index: 20;
  /* top explícito en vez de dejar que el navegador calcule la "posición
     estática": dentro de un contenedor flex en columna (.admin-field),
     un elemento absoluto sin top/left puede terminar arriba del todo,
     tapando el campo, en vez de ir debajo. Esto lo fuerza siempre abajo. */
  top: 100%;
  left: 0;
  margin-top: 4px;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(14, 14, 18, 0.98);
  border: 1px solid var(--border, #23232b);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.admin-field, .admin-top__search { position: relative; }

/* ---- Admin: formulario de resultado (eventos del partido) ---- */

.result-events { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }

.result-event-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 720px) {
  .result-event-row { grid-template-columns: 1fr; }
}

/* ---- Escudos de equipo ---- */

.team-crest {
  display: inline-block;
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 4px;
  vertical-align: middle;
}

.team-crest--empty {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed var(--border, #23232b);
}

.team-crest--small {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.standings__club { display: flex; align-items: center; }

/* Las celdas de tabla tienen "vertical-align: baseline" por defecto en el
   navegador: si una celda lleva un escudo (más alto que el texto) y las
   demás solo números, el texto de cada celda queda a una altura distinta
   y la fila se ve "torcida". Esto alinea todo al centro siempre. */
.standings td,
.standings th {
  vertical-align: middle;
}

.match-chip {
  display: flex !important;
  align-items: center;
  gap: 4px;
}

.match-chip__crest {
  width: 13px;
  height: 13px;
  object-fit: contain;
  border-radius: 2px;
  flex: none;
}

.ifl-modal__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ifl-modal__crest {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 5px;
}

/* ---- Foto de "Mi carrera" ---- */

.career-avatar {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 0 18px;
  border: 2px solid var(--border, #23232b);
}

/* ---- Notificaciones ---- */

#notif-panel {
  right: 46px;
}

#notif-button {
  gap: 0;
}

/* ---- Campana de notificaciones (rediseño) ---- */

.notif-bell {
  position: relative;
}

.notif-bell__icon { font-size: 18px; line-height: 1; }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--down, #ef4444);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 46px;
  z-index: 50;
  width: 300px;
  padding: 6px;
  background: rgba(14, 14, 18, 0.97);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border, #23232b);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}

.notif-panel[hidden] { display: none; }

.notif-panel__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--white, #fff);
  border-bottom: 1px solid var(--border-soft, rgba(255,255,255,.07));
  margin-bottom: 4px;
}

.notif-panel__list { max-height: 340px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
}

.notif-item:hover { background: rgba(255, 255, 255, 0.05); }

.notif-item__icon { font-size: 18px; flex: none; }

.notif-item__title { font-size: 13.5px; font-weight: 600; color: var(--white, #fff); }

.notif-item__meta { font-size: 12px; color: var(--gray-3, #56585f); margin-top: 2px; }

.notif-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--gray-3, #56585f);
  font-size: 13px;
}

/* =====================================
   PANTALLA DE CARGA — 100% neón, sin etiqueta "Consejos:"
===================================== */

.loader { padding: 0 !important; }

.loader__logo {
  width: min(50vw, 240px) !important;
  filter: drop-shadow(0 0 18px rgba(88, 101, 242, 0.85)) drop-shadow(0 0 40px rgba(59, 214, 255, 0.5));
  animation: loader-logo-neon 2.4s ease-in-out infinite;
}

@keyframes loader-logo-neon {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(88, 101, 242, 0.75)) drop-shadow(0 0 28px rgba(59, 214, 255, 0.4)); }
  50%      { filter: drop-shadow(0 0 24px rgba(88, 101, 242, 1)) drop-shadow(0 0 54px rgba(59, 214, 255, 0.75)); }
}

.loader__progress {
  box-shadow: 0 0 14px 1px rgba(88, 101, 242, 0.8);
}

.loader__progress-fill {
  background: linear-gradient(90deg, #5865f2, #3bd6ff);
  box-shadow: 0 0 12px 2px rgba(59, 214, 255, 1);
}

/* La etiqueta "Consejos:" (si el HTML/ui.js la renderiza) se oculta:
   solo debe verse el texto del consejo en sí, en blanco puro con glow. */
.loader__tip-bottom .loader__tip-label {
  display: none !important;
}

.loader__tip-bottom .loader__tip-text {
  color: #fff !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.55), 0 0 24px rgba(59, 214, 255, 0.35);
}

/* ---- Logos más grandes en todo el sitio ---- */

.app-header__logo { width: 130px !important; height: auto !important; }
.league-page-head__logo { height: 42px !important; }
.admin-side__logo { width: 52px !important; height: 52px !important; }
.admin-denied .locked-card img { width: 60px !important; height: 60px !important; }

/* =====================================
   LOGIN — rediseño neón completo
===================================== */

.login-page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(88, 101, 242, 0.22), transparent 60%),
    radial-gradient(ellipse 55% 45% at 90% 90%, rgba(59, 214, 255, 0.16), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    #050507;
  background-size: auto, auto, 26px 26px, auto;
}

.login-card {
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  right: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan, #3bd6ff), transparent);
  animation: hero-shine 5s ease-in-out infinite;
  opacity: 0.8;
}

.login-page__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.55;
}

.login-page__shape--1 {
  width: 420px;
  height: 420px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, #5865f2, transparent 70%);
  animation: login-shape-float 9s ease-in-out infinite;
}

.login-page__shape--2 {
  width: 360px;
  height: 360px;
  bottom: -160px;
  right: -100px;
  background: radial-gradient(circle, #3bd6ff, transparent 70%);
  animation: login-shape-float 11s ease-in-out infinite reverse;
}

@keyframes login-shape-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -20px) scale(1.08); }
}

.login-page__watermark {
  position: absolute;
  right: -6%;
  bottom: -10%;
  width: 46vw;
  max-width: 560px;
  opacity: 0.045;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 2;
  padding: 44px 38px 36px;
  border-radius: 12px;
  /* Mismo tipo de superficie sólida que el resto de tarjetas de la app
     (division-card, admin-panel...) en vez de una tarjeta de cristal aparte. */
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  box-shadow: 0 0 0 1px #5865f2, 0 0 24px -8px #5865f2, 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: login-card-glow 3.2s ease-in-out infinite;
  text-align: center;
  max-width: 420px;
}

@keyframes login-card-glow {
  0%, 100% { box-shadow: 0 0 0 1px #5865f2, 0 0 16px -6px #5865f2, 0 30px 90px rgba(0,0,0,.55); }
  50%      { box-shadow: 0 0 0 1px #3bd6ff, 0 0 30px 0px #3bd6ff, 0 30px 90px rgba(0,0,0,.55); }
}

.login-card__logo {
  display: none; /* sustituido por login-card__logo-wrap más abajo */
}

/* Mismo "wrap" con glow que usan el header y el hero de Inicio, para que
   el logo se vea igual en todas partes de la app. */
.login-card__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: hero-logo-glow 3.2s ease-in-out infinite;
}

.login-card__logo-wrap img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Misma tipografía/estilo "eyebrow" que usa league-page-head y el hero */
.login-card__eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-2, #8b8d96);
}

.login-card__title {
  margin: 0 0 8px;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 26px;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--white, #fff);
}

.login-card__subtitle {
  margin: 0 0 26px;
  font-family: var(--font-hub);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gray-2, #8b8d96);
}

/* Mismo estilo de botón sólido que btn-hero--solid del menú de Inicio */
.btn-discord {
  font-family: var(--font-hub);
  font-weight: 700;
  border-radius: 6px;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-discord:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.login-card__hint {
  margin-top: 18px;
  font-family: var(--font-hub);
  font-size: 12px;
  color: var(--gray-3, #56585f);
}

.login-page__footnote {
  position: relative;
  z-index: 2;
  font-family: var(--font-hub);
  text-align: center;
}

.loader__center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin: auto;
}

.loader__progress {
  width: min(70vw, 260px);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border-radius: 2px;
}

.loader__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 2000ms cubic-bezier(0.4, 0, 0.2, 1);
}

.loader__tip-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
  text-align: center;
}

.loader__tip-bottom .loader__tip-text.is-fading { opacity: 0; }

body { overflow-x: hidden; }

/* ---- Cabecera: quitar la "píldora" de fondo del menú, texto normal ---- */

.app-header__nav {
  background: none;
  border: none;
  padding: 0;
  gap: 26px;
}

.app-header__link {
  text-transform: none;
  font-family: var(--font-hub, var(--font-display));
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0;
  padding: 6px 0;
  clip-path: none;
  color: var(--gray-2, #8b8d96);
  border-bottom: 2px solid transparent;
}

.app-header__nav .app-header__link.is-active {
  background: none;
  box-shadow: none;
  color: var(--white, #fff);
  border-bottom-color: var(--white, #fff);
}

.app-header__link:hover { background: none; }
.app-header__link-icon { display: none; }

/* ---- Portada (Hub hero): a pantalla completa, sin tarjeta ---- */

:root { --font-hub: "Manrope", var(--font); }

.hub-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
  border-radius: 0;
  border: none;
  min-height: 640px;
  background: #0a0a0d center/cover no-repeat;
}

.hub-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(5,5,7,.88) 0%, rgba(5,5,7,.55) 45%, rgba(5,5,7,.25) 100%),
    linear-gradient(180deg, rgba(5,5,7,.15) 0%, rgba(5,5,7,.4) 70%, rgba(5,5,7,.96) 100%);
}

.hub-hero__content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 40px 110px;
}

.hub-hero__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 30px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: hero-logo-glow 3.2s ease-in-out infinite;
}

@keyframes hero-logo-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 14px -4px rgba(255,255,255,.7); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 0 28px 0px rgba(255,255,255,.9); }
}

.hub-hero__logo {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.98;
}

.hub-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-2, #8b8d96);
}

.hub-hero__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-2, #8b8d96);
}

.hub-hero__title {
  margin: 0 0 18px;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--white, #fff);
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.25);
}

.hub-hero__lead {
  margin: 0 0 28px;
  max-width: 560px;
  font-family: var(--font-hub);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--gray-1, #d7d7dd);
}

.hub-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-hero {
  position: relative;
  overflow: hidden;
  padding: 13px 24px;
  border-radius: 6px;
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease;
}

.btn-hero--solid { background: #fff; color: #0a0a0d; }
.btn-hero--solid:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,.2); }

.btn-hero--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white, #fff);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn-hero--ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }

.hub-hero__shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: hero-shine 6s ease-in-out infinite;
}

h1.hub-hero__title::after { animation-delay: 0.3s; }
.hub-hero__actions .hub-hero__shine:nth-child(2)::after { animation-delay: 2s; }

@keyframes hero-shine {
  0%   { left: -60%; }
  14%  { left: 130%; }
  100% { left: 130%; }
}

.hub-hero__stats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-hero__stat {
  padding: 20px 40px;
  text-align: left;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.hub-hero__stat:last-child { border-right: none; }

.hub-hero__stat span {
  display: block;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 34px;
  color: var(--white, #fff);
}

.hub-hero__stat small {
  font-family: var(--font-hub);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-3, #56585f);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 640px) {
  .hub-hero { min-height: 560px; }
  .hub-hero__content { padding: 32px 20px 130px; }
  .hub-hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hub-hero__stat { padding: 14px 18px; }
  .hub-hero__stat:nth-child(2) { border-right: none; }
}

/* ---- Cabecera de página tipo "League" ---- */

.league-page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.league-page-head__logo { height: 30px; width: auto; }

.league-page-head__title {
  margin: 0;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 30px;
  color: var(--white, #fff);
}

.league-page-head__subtitle {
  margin: 2px 0 0;
  font-family: var(--font-hub);
  font-size: 13.5px;
  color: var(--gray-2, #8b8d96);
}

.competitions-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 14px;
}

.competitions-row__label {
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 17px;
  color: var(--white, #fff);
}

.competitions-row__count {
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-3, #56585f);
}

/* ---- Tarjetas de división (fiel a la referencia) ---- */

.division-board-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.division-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 12px;
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  --div-color: var(--accent, #5865f2);
  animation: division-glow 3.2s ease-in-out infinite;
}

.division-card--primera { --div-color: #5865f2; }
.division-card--segunda { --div-color: #eab308; }

@keyframes division-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--div-color), 0 0 16px -6px var(--div-color); }
  50%      { box-shadow: 0 0 0 1px var(--div-color), 0 0 30px 0px var(--div-color); }
}

.division-card__glow {
  position: absolute;
  top: -60px;
  left: -40px;
  width: 220px;
  height: 160px;
  background: radial-gradient(circle, var(--div-color), transparent 70%);
  opacity: 0.35;
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.division-card__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.division-card__badge {
  flex: none;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--div-color), rgba(0,0,0,.3));
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  box-shadow: 0 0 16px -2px var(--div-color);
}

.division-card__title {
  margin: 0 0 2px;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 18px;
  color: var(--white, #fff);
}

.division-card__subtitle {
  margin: 0;
  font-family: var(--font-hub);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray-3, #56585f);
}

.division-card .table-wrap {
  position: relative;
  z-index: 1;
  border-color: var(--border-soft, rgba(255,255,255,.08));
  background: transparent;
}

.division-card .standings thead th {
  font-family: var(--font-hub);
  background: transparent;
  border-bottom-color: var(--border-soft, rgba(255,255,255,.08));
}

.division-card .standings tbody td { border-bottom-color: var(--border-soft, rgba(255,255,255,.06)); }

/* ---- Chips de forma (fieles: W blanco, L granate, D gris) ---- */

.form-cell { display: flex; gap: 3px; }

.form-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-family: var(--font-hub);
  font-size: 10px;
  font-weight: 800;
}

.form-chip--w { background: #f1f1f3; color: #0a0a0d; }
.form-chip--l { background: #7c2d2d; color: #fff; }
.form-chip--d { background: rgba(255,255,255,.12); color: var(--gray-1, #d7d7dd); }

/* ---- Buscador de jugador (página pública) ---- */

.player-search-box {
  position: relative;
  max-width: 460px;
  margin-top: 22px;
}

.player-search-box__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--gray-3, #56585f);
  pointer-events: none;
}

.player-search-box input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  border-radius: 10px;
  color: var(--white, #fff);
  font-family: var(--font-hub);
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.player-search-box input::placeholder { color: var(--gray-3, #56585f); }

.player-search-box input:focus {
  outline: none;
  border-color: var(--accent, #5865f2);
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15);
}

.player-search-results {
  max-width: 460px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  color: var(--gray-3, #56585f);
}

.player-result-row:hover { border-color: var(--accent, #5865f2); background: rgba(88, 101, 242, 0.06); }

.player-result-row__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.player-result-row__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent, #5865f2), #262835);
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}

.player-result-row__body { flex: 1; min-width: 0; }

.player-result-row__name {
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--white, #fff);
}

.player-result-row__meta { font-size: 12px; color: var(--gray-3, #56585f); }

/* ---- Subir archivo, como botón de verdad ---- */

.file-upload {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.file-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-upload__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, #23232b);
  border-radius: 7px;
  color: var(--white, #fff);
  font-family: var(--font-hub, inherit);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-upload__button::before { content: "📁"; font-size: 13px; }

.file-upload:hover .file-upload__button { border-color: var(--accent, #5865f2); background: rgba(88, 101, 242, 0.08); }

.file-upload__input:focus-visible ~ .file-upload__button {
  outline: 2px solid var(--cyan, #3bd6ff);
  outline-offset: 2px;
}

.file-upload__name {
  font-size: 12px;
  color: var(--gray-3, #56585f);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Casilla de asistencia (quién jugó) en Resultados ---- */

.attendance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 0 18px;
}

@media (max-width: 640px) {
  .attendance-grid { grid-template-columns: 1fr; }
}

/* ---- Pestañas Temporada / Total (Premios y Clasificación) ---- */

.premio-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
}

.premio-tab {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, #23232b);
  border-radius: 999px;
  color: var(--gray-2, #8b8d96);
  font-family: var(--font-hub, inherit);
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.premio-tab.is-active {
  background: var(--div-color, var(--accent));
  border-color: var(--div-color, var(--accent));
  color: #fff;
}

/* ---- Mi Club ---- */

.club-hero {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  min-height: 260px;
  background: #0a0a0d center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: club-neon 2.6s ease-in-out infinite;
}

@keyframes club-neon {
  0%, 100% { box-shadow: 0 0 0 2px #5865f2, 0 0 20px -4px #5865f2, 0 0 0 2px #5865f2 inset; }
  50%      { box-shadow: 0 0 0 2px #3bd6ff, 0 0 40px 0px #3bd6ff, 0 0 0 2px #3bd6ff inset; }
}

.club-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(5,5,7,.3) 0%, rgba(5,5,7,.85) 85%, rgba(5,5,7,.97) 100%);
}

.club-hero__content { position: relative; z-index: 1; padding: 28px 28px 24px; }

.club-hero__logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

.club-hero__name {
  margin: 0 0 4px;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 30px;
  color: #fff;
}

.club-hero__meta { margin: 0; font-family: var(--font-hub); font-size: 13px; color: var(--gray-2, #8b8d96); }

.club-hero__budget {
  position: absolute;
  z-index: 1;
  top: 22px;
  right: 24px;
  text-align: right;
}

.club-hero__budget small {
  display: block;
  font-family: var(--font-hub);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-2, #8b8d96);
}

.club-hero__budget span {
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 24px;
  color: #22c55e;
  text-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
}

/* =====================================
   RANKINGS (Premios) — filas limpias e integradas
===================================== */

.lb-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-row:last-child { border-bottom: none; }

.lb-row__rank {
  flex: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 11.5px;
  color: var(--gray-1, #d7d7dd);
}

.lb-row:nth-child(1) .lb-row__rank {
  background: linear-gradient(135deg, var(--div-color, #5865f2), rgba(0,0,0,.3));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 12px -2px var(--div-color, #5865f2);
}

.lb-row__body { flex: 1; min-width: 0; }

.lb-row__name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--white, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-row__meta {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--gray-3, #56585f);
}

.lb-row__crest {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  flex: none;
}

.lb-row__value {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 11.5px;
  color: var(--white, #fff);
  white-space: nowrap;
}

/* =====================================
   MODAL DE ESTADIO — versión con foto de fondo y borde neón
===================================== */

.ifl-modal__box--stadium {
  overflow: hidden;
  padding: 0;
  border: none;
  box-shadow: 0 0 0 1px var(--cyan, #3bd6ff), 0 0 34px -8px var(--cyan, #3bd6ff), 0 24px 70px rgba(0,0,0,.55);
  animation: stadium-modal-glow 3s ease-in-out infinite;
}

@keyframes stadium-modal-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--cyan, #3bd6ff), 0 0 20px -6px var(--cyan, #3bd6ff), 0 24px 70px rgba(0,0,0,.55); }
  50%      { box-shadow: 0 0 0 1px #5865f2, 0 0 36px 0px #5865f2, 0 24px 70px rgba(0,0,0,.55); }
}

.ifl-modal__box--stadium .ifl-modal__stadium-banner {
  position: relative;
  height: 160px;
  background: #0a0a0d center/cover no-repeat;
}

.ifl-modal__box--stadium .ifl-modal__stadium-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,7,.15) 0%, rgba(5,5,7,.55) 70%, rgba(14,14,18,1) 100%);
}

.ifl-modal__box--stadium .ifl-modal__stadium-body { padding: 22px 26px 26px; }
.ifl-modal__box--stadium .ifl-modal__close { top: 12px; right: 12px; background: rgba(0,0,0,.5); }

/* =====================================
   LOGIN — brillo extra en el botón, a juego con el hero
===================================== */

.btn-discord {
  position: relative;
  overflow: hidden;
}

.btn-discord::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: hero-shine 6s ease-in-out infinite;
}

/* =====================================
   MERCADO DE FICHAJES
===================================== */

.transfer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.transfer-row:last-child { border-bottom: none; }

.transfer-row__club,
.transfer-row__player {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-hub);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--white, #fff);
}

.transfer-row__arrow {
  color: var(--cyan, #3bd6ff);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(59, 214, 255, 0.6);
}

.transfer-row__price {
  margin-left: auto;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 13px;
  color: #22c55e;
}

.transfer-row__date {
  font-size: 11px;
  color: var(--gray-3, #56585f);
}

/* =====================================
   MERCADO — componentes propios (inputs, botones, tarjetas)
   Se definen aquí en vez de reutilizar .admin-input/.admin-form porque
   esas clases solo están completas en admin.css (que no se carga en
   index.html), y usarlas fuera del panel de admin salía sin estilo
   (cajas blancas). Estos componentes funcionan en cualquier página.
===================================== */

.market-label {
  display: block;
  font-family: var(--font-hub);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-2, #8b8d96);
}

.market-input,
.market-select,
.market-textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, #23232b);
  border-radius: 8px;
  color: var(--white, #fff);
  font-family: var(--font-hub, inherit);
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.market-input::placeholder,
.market-textarea::placeholder { color: var(--gray-3, #56585f); }

.market-input:focus,
.market-select:focus,
.market-textarea:focus {
  outline: none;
  border-color: var(--accent, #5865f2);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.18);
}

.market-select option { background: #0e0e12; color: #fff; }
.market-textarea { resize: vertical; min-height: 76px; font-family: inherit; line-height: 1.5; }

.btn-market {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #5865f2, #3bd6ff);
  color: #fff;
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.btn-market:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(88, 101, 242, 0.7); }
.btn-market:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-market--ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white, #fff);
}

.btn-market--danger { background: linear-gradient(135deg, #ef4444, #7c2d2d); }
.btn-market--small { padding: 7px 14px; font-size: 12px; }

.market-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 12px;
  background: var(--surface, #0e0e12);
  border: 1px solid var(--border, #23232b);
  margin-bottom: 20px;
}

.market-card--glow {
  --div-color: #5865f2;
  animation: division-glow 3.2s ease-in-out infinite;
}

.market-card__title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 15px;
  color: var(--white, #fff);
  margin: 0 0 14px;
}

.market-card--glow::before {
  content: "";
  position: absolute;
  top: -60px;
  left: -40px;
  width: 220px;
  height: 160px;
  background: radial-gradient(circle, var(--div-color), transparent 70%);
  opacity: 0.3;
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.market-player-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.market-player-row:last-child { border-bottom: none; }

.market-player-row__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.market-player-row__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent, #5865f2), #262835);
  font-family: var(--font-hub);
  font-weight: 800;
  color: #fff;
  font-size: 15px;
}

.market-player-row__body { flex: 1; min-width: 160px; }

.market-player-row__name {
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 14px;
  color: var(--white, #fff);
}

.market-player-row__meta {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--gray-3, #56585f);
  line-height: 1.5;
}

.market-player-row__tag {
  display: inline-block;
  margin: 3px 6px 0 0;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.4);
  color: #cdd3ff;
  font-family: var(--font-hub);
  font-size: 10.5px;
  font-weight: 700;
}

.market-offer-box {
  width: 100%;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 4px 0 54px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-hub);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.badge-pill--pending { background: rgba(234, 179, 8, 0.15); border: 1px solid rgba(234, 179, 8, 0.4); color: #eab308; }
.badge-pill--accepted { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.4); color: #22c55e; }
.badge-pill--rejected { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: #ef4444; }

.market-code-box {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(88, 101, 242, 0.08);
  border: 1px dashed rgba(88, 101, 242, 0.5);
}

.market-code-box__value {
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.14em;
  color: var(--white, #fff);
  margin: 4px 0 6px;
}

.market-code-box__hint {
  font-size: 11.5px;
  color: var(--gray-2, #8b8d96);
  margin: 0;
}

.market-empty {
  position: relative;
  z-index: 1;
  padding: 20px 4px;
  text-align: center;
  color: var(--gray-3, #56585f);
  font-size: 13px;
}

/* =====================================
   ESTADIOS — tarjetas con foto de fondo y borde neón al pasar el ratón
===================================== */

.stadiums-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.stadium-card2 {
  position: relative;
  overflow: hidden;
  height: 190px;
  padding: 0;
  border-radius: 12px;
  border: none;
  background: #0a0a0d center/cover no-repeat;
  cursor: pointer;
  text-align: left;
  --div-color: #3bd6ff;
  animation: division-glow 3.4s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.stadium-card2:hover { transform: translateY(-2px); }

/* =====================================
   PRÓXIMOS PARTIDOS (Inicio)
===================================== */

.upcoming-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.upcoming-match-card {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 20px;
  border-radius: 14px;
  background: var(--surface, #0e0e12);
  border: none;
  text-align: center;
  --div-color: #5865f2;
  animation: division-glow 3.6s ease-in-out infinite;
}

.upcoming-match-card__crests {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
}

.upcoming-match-card__crests img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.upcoming-match-card__crest-empty {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed var(--border, #23232b);
}

.upcoming-match-card__vs {
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--gray-3, #56585f);
}

.upcoming-match-card__meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--font-hub);
  font-size: 12px;
  color: var(--gray-2, #8b8d96);
}

.upcoming-match-card__countdown {
  font-weight: 800;
  font-size: 14px;
  color: var(--white, #fff);
  text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
}

.stadium-card2--noimg {
  background:
    radial-gradient(circle at 25% 15%, rgba(88, 101, 242, 0.22), transparent 60%),
    radial-gradient(circle at 85% 90%, rgba(59, 214, 255, 0.16), transparent 60%),
    #0e0e12;
}

.stadium-card2__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 7, 0.1) 0%, rgba(5, 5, 7, 0.55) 55%, rgba(5, 5, 7, 0.95) 100%);
}

.stadium-card2__body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
}

.stadium-card2__crest {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.stadium-card2__name {
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 17px;
  color: var(--white, #fff);
  line-height: 1.2;
}

.stadium-card2__meta {
  margin-top: 3px;
  font-family: var(--font-hub);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-1, #d7d7dd);
}

.stadium-card2__foot {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  font-family: var(--font-hub);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-2, #8b8d96);
}

/* =====================================
   MÓVIL — ajustes generales
   (algunos usan !important porque pisan reglas de admin.css/style.css
   que no controlamos desde aquí y hay que ganar el pulso de todas formas)
===================================== */

@media (max-width: 760px) {
  /* ---- Cabecera pública ---- */
  .app-header {
    flex-wrap: wrap !important;
    height: auto !important;
    padding: 10px 14px !important;
    gap: 10px !important;
  }

  .app-header__logo { width: 90px !important; }

  .app-header__nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 16px !important;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .app-header__nav::-webkit-scrollbar { display: none; }

  .app-header__link {
    flex: none;
    font-size: 13px !important;
    white-space: nowrap;
  }

  .app-header__user { display: none; }

  .dashboard { padding: 18px 14px !important; }

  /* ---- Hero de Inicio ---- */
  .hub-hero__content { padding: 28px 18px 120px !important; }
  .hub-hero__title { font-size: clamp(34px, 11vw, 52px) !important; }
  .hub-hero__lead { font-size: 14px !important; }
  .hub-hero__actions { flex-direction: column; }
  .btn-hero { width: 100%; text-align: center; }

  /* ---- Rejillas → una sola columna ---- */
  .stat-grid,
  .division-board-grid,
  .stadiums-grid,
  .upcoming-matches,
  .admin-stats,
  .admin-panels,
  .admin-grid,
  .division-board {
    grid-template-columns: 1fr !important;
  }

  .stadium-card2 { height: 170px; }

  /* ---- Tarjetas y filas del mercado ---- */
  .market-player-row { flex-wrap: wrap; }
  .market-player-row__body { min-width: 100%; order: 2; }
  .market-offer-box { padding-left: 4px !important; }
  .transfer-row { font-size: 11.5px; }
  .transfer-row__price { margin-left: 0 !important; width: 100%; order: 5; }

  /* ---- Formularios ---- */
  .admin-form { grid-template-columns: 1fr !important; }
  .attendance-grid { grid-template-columns: 1fr !important; }
  .result-event-row { grid-template-columns: 1fr !important; }

  /* ---- Modales ---- */
  .ifl-modal__box {
    width: 92vw !important;
    padding: 22px 18px !important;
    max-height: 82vh;
  }

  .ifl-tutorial__box { width: 92vw !important; padding: 26px 20px 22px !important; }

  /* ---- Login ---- */
  .login-card { padding: 38px 24px 30px !important; width: 92vw; }
  .login-page__watermark { display: none; }

  /* ---- Tablas: scroll horizontal garantizado ---- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .standings { min-width: 520px; }

  /* ---- Mi Club ---- */
  .club-hero__budget { position: static; text-align: left; margin-top: 14px; }
  .club-hero { min-height: 220px; }

  /* ---- Calendario ---- */
  .calendar-grid { font-size: 11px; }
}

@media (max-width: 980px) {
  /* ---- Panel de administración: la barra lateral pasa a ir arriba,
     apilada, en vez de al lado (no conocemos el CSS exacto de admin.css,
     así que forzamos con !important para asegurar el cambio). ---- */
  .admin {
    display: block !important;
    height: auto !important;
  }

  .admin-side {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    max-height: 60vh;
    overflow-y: auto;
  }

  .admin-main { margin-left: 0 !important; width: 100% !important; }

  .admin-top {
    flex-wrap: wrap !important;
    height: auto !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .admin-top__search { order: 3; width: 100%; }
  .admin-nav { flex-wrap: wrap !important; }
}

@media (max-width: 760px) {
  /* ---- Formularios hechos con grid inline (cánticos, etc.) ---- */
  .chants-form-grid { grid-template-columns: 1fr !important; }

  /* ---- Tarjetas y tipografía general, un poco más compactas ---- */
  .market-card { padding: 14px !important; }
  .market-card__title { font-size: 14px !important; }
  .division-card { padding: 14px !important; }
  .division-card__title { font-size: 16px !important; }
  .league-page-head__title { font-size: 24px !important; }
  .table-heading { font-size: 15px !important; }

  /* ---- Filas densas: texto más pequeño para que quepa ---- */
  .lb-row__name, .market-player-row__name { font-size: 13px !important; }
  .lb-row__meta, .market-player-row__meta { font-size: 11px !important; }

  /* ---- Pestañas (Premios/Clasificación) con scroll si no caben ---- */
  .premio-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .premio-tab { flex: none; }

  /* ---- Botones del modal: más fáciles de tocar ---- */
  .ifl-modal__close { width: 36px !important; height: 36px !important; font-size: 20px !important; }

  /* ---- Mercado: que los botones de acción nunca se corten ---- */
  .market-player-row { gap: 10px !important; }
  .market-player-row > button { width: 100%; order: 3; }

  /* ---- Filtros de Contratos (admin) en una columna ---- */
  #contracts-filter-club, #contracts-filter-season, #contracts-filter-status { width: 100%; }
}

/* =====================================
   REPRODUCTOR DE MÚSICA (playlist de Spotify)
===================================== */

.ifl-music[hidden] { display: none; }

.ifl-music {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9990;
  width: 320px;
  max-width: calc(100vw - 24px);
  border-radius: 14px;
  background: rgba(14, 14, 18, 0.92);
  backdrop-filter: blur(14px);
  --div-color: #1db954;
  animation: division-glow 3.6s ease-in-out infinite;
}

.ifl-music__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.ifl-music__label {
  flex: 1;
  font-family: var(--font-hub);
  font-weight: 800;
  font-size: 13px;
  color: var(--white, #fff);
}

.ifl-music__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #1db954, #3bd6ff);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.ifl-music__btn:hover { transform: scale(1.06); box-shadow: 0 6px 16px -6px rgba(29, 185, 84, 0.8); }

.ifl-music__btn--ghost {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* El embed tiene que seguir "montado" aunque el panel esté cerrado para que
   la música no se corte: se aparta de la pantalla en vez de usar display:none. */
.ifl-music__panel {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 304px;
}

.ifl-music.is-open .ifl-music__panel {
  position: static;
  width: auto;
  padding: 0 10px 10px;
}

.ifl-music__panel iframe { border-radius: 10px; display: block; }

.ifl-music__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; width: 16px; }
.ifl-music__bars i {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: #1db954;
}
.ifl-music__bars.is-playing i { animation: ifl-music-eq 0.9s ease-in-out infinite; }
.ifl-music__bars.is-playing i:nth-child(2) { animation-delay: 0.2s; }
.ifl-music__bars.is-playing i:nth-child(3) { animation-delay: 0.4s; }

@keyframes ifl-music-eq {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

@media (max-width: 760px) {
  .ifl-music { right: 10px; bottom: 10px; width: 260px; }
}


/* =========================================================
   IFL HUB REFRESH — capa visual responsive
   Inspiración general: hubs deportivos modernos; identidad IFL propia.
   Solo estilos: no altera la lógica ni las conexiones de datos.
========================================================= */
:root {
  --ifl-panel: #101116;
  --ifl-panel-raised: #151720;
  --ifl-line: rgba(255,255,255,.09);
  --ifl-muted: #a2a5b2;
  --ifl-accent: #6875ff;
  --ifl-radius: 14px;
  --ifl-shadow: 0 18px 48px rgba(0,0,0,.24);
}

html { scroll-behavior: smooth; }
body {
  background-color: #08090d;
  background-image:
    radial-gradient(ellipse 60% 32% at 50% 0%, rgba(88,101,242,.12), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.012), transparent 28%);
}
::selection { background: rgba(104,117,255,.35); color: #fff; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(a,button,input,select,textarea,[tabindex]):focus-visible {
  outline: 2px solid #9ba4ff;
  outline-offset: 3px;
}

.app-header {
  gap: clamp(14px, 2vw, 30px);
  padding: 10px clamp(16px, 3vw, 42px);
  background: rgba(7,8,12,.88);
  border-bottom-color: rgba(255,255,255,.1);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.app-header__brand { flex: 0 0 auto; }
.app-header__logo { width: clamp(82px, 9vw, 124px) !important; max-height: 54px; }
.app-header__nav {
  min-width: 0;
  flex-wrap: wrap;
  gap: clamp(12px, 1.7vw, 26px);
}
.app-header__link {
  padding: 11px 1px 10px;
  font-size: 13.5px;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, opacity .18s ease;
}
.app-header__nav .app-header__link.is-active {
  color: #fff;
  border-bottom-color: var(--ifl-accent);
  text-shadow: 0 0 18px rgba(104,117,255,.25);
}
.app-header__account { gap: 10px; }
.app-header__user { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

.dashboard {
  width: min(100% - 48px, 1240px);
  max-width: 1240px;
  padding: clamp(28px, 4vw, 54px) 0 76px;
}
.view { min-width: 0; }
.view-header { margin-bottom: 14px; }
.dashboard__title {
  font-size: clamp(27px, 3vw, 36px);
  letter-spacing: -.025em;
}
.view-lead {
  max-width: 720px;
  color: var(--ifl-muted);
  line-height: 1.75;
}
:where(.division-card,.stadium-card,.stat-card,.panel,.card,.match-card,.player-card,.team-card,.award-card,.market-card,.career-card) {
  border-color: var(--ifl-line);
  border-radius: var(--ifl-radius);
  box-shadow: 0 8px 26px rgba(0,0,0,.12);
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
:where(.division-card,.stadium-card,.stat-card,.panel,.card,.match-card,.player-card,.team-card,.award-card,.market-card,.career-card):hover {
  border-color: rgba(139,149,255,.36);
}
.stadium-card {
  padding: 19px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), transparent 75%), var(--ifl-panel);
}
.stadiums-grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

.hub-hero {
  min-height: clamp(480px, 57vw, 660px);
  background-color: #0b0d14;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hub-hero__overlay {
  background:
    linear-gradient(90deg, rgba(5,6,10,.94) 0%, rgba(5,6,10,.76) 38%, rgba(5,6,10,.25) 100%),
    linear-gradient(180deg, rgba(5,6,10,.06) 20%, rgba(5,6,10,.28) 60%, #08090d 100%);
}
.hub-hero__content {
  max-width: 1240px;
  padding: clamp(38px, 6vw, 76px) clamp(22px, 4vw, 44px) 108px;
}
.hub-hero__logo-wrap {
  border-radius: 16px;
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.22);
  backdrop-filter: blur(14px);
}
.hub-hero__title {
  font-size: clamp(56px, 8vw, 94px);
  line-height: .94;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hub-hero__lead {
  max-width: 610px;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.8;
  color: rgba(255,255,255,.78);
}
.btn-hero {
  border-radius: 7px;
  min-height: 44px;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn-hero:hover { transform: translateY(-2px); }

:where(.standings, .calendar, .matches-table, .data-table) {
  border-collapse: separate;
  border-spacing: 0;
}
:where(.standings, .calendar, .matches-table, .data-table) thead th {
  color: #aeb2c2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
:where(.standings, .calendar, .matches-table, .data-table) tbody tr {
  transition: background .15s ease;
}
:where(.standings, .calendar, .matches-table, .data-table) tbody tr:hover {
  background: rgba(255,255,255,.035);
}
.standings td, .standings th { padding-top: 12px; padding-bottom: 12px; }
.match-chip {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(104,117,255,.12);
  border-color: rgba(104,117,255,.24);
  font-size: 11px;
}
.match-chip:hover { background: rgba(104,117,255,.22); border-color: rgba(139,149,255,.48); }

:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  border-radius: 8px;
  border-color: rgba(255,255,255,.13);
}
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus {
  border-color: rgba(139,149,255,.72);
  box-shadow: 0 0 0 3px rgba(104,117,255,.13);
}
:where(button,.btn-admin,.btn-hero,.btn-discord) { transition-timing-function: ease; }
.profile-menu, .notif-panel, .ifl-modal__box, .ifl-tutorial__box {
  border-color: rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.48);
}
.ifl-modal__box { background: #11131a; }

@media (min-width: 1500px) {
  .dashboard { width: min(100% - 80px, 1320px); max-width: 1320px; }
  .hub-hero__content { max-width: 1320px; }
}
@media (max-width: 980px) {
  .app-header { flex-wrap: wrap; gap: 10px 18px; padding: 10px 18px; }
  .app-header__brand { margin-right: auto; }
  .app-header__account { margin-left: auto; }
  .app-header__nav {
    order: 3;
    flex: 1 0 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 22px;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .app-header__link { flex: 0 0 auto; }
  .dashboard { width: min(100% - 32px, 1240px); padding-top: 30px; }
}
@media (max-width: 600px) {
  .app-header { padding: 8px 14px; }
  .app-header__logo { width: 84px !important; max-height: 42px; }
  .app-header__user { display: none; }
  .app-header__nav { gap: 20px; margin: 0 -2px; }
  .app-header__link { font-size: 13px; padding: 10px 0 9px; }
  .dashboard { width: calc(100% - 28px); padding: 24px 0 56px; }
  .hub-hero { min-height: 510px; }
  .hub-hero__overlay {
    background:
      linear-gradient(90deg, rgba(5,6,10,.88), rgba(5,6,10,.52)),
      linear-gradient(180deg, rgba(5,6,10,.12), #08090d 100%);
  }
  .hub-hero__content { padding: 34px 20px 86px; }
  .hub-hero__logo-wrap { width: 54px; height: 54px; margin-bottom: 24px; }
  .hub-hero__lead { font-size: 14px; line-height: 1.7; }
  .hub-hero__actions { flex-wrap: wrap; gap: 10px; }
  .stadiums-grid { grid-template-columns: 1fr; }
  .ifl-modal { padding: 12px; }
  .ifl-modal__box { padding: 24px 18px; }
  .notif-panel { right: 0; width: min(300px, calc(100vw - 28px)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* =========================================================
   IFL HUB — refinamiento visual inspirado en hubs deportivos
   Segunda pasada: más jerarquía, ritmo y contraste.
   Mantiene la identidad IFL y no cambia comportamiento.
========================================================= */
:root {
  --ifl-accent-soft: rgba(104, 117, 255, .14);
  --ifl-glass: rgba(17, 19, 27, .78);
}

.view-header {
  position: relative;
  padding-bottom: 12px;
}
.view-header::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ifl-accent), rgba(104,117,255,.18));
}
.dashboard__title,
.league-page-head__title {
  text-wrap: balance;
}
.hub-hero {
  isolation: isolate;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
}
.hub-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 24%, rgba(104,117,255,.18), transparent 34%),
    linear-gradient(115deg, transparent 45%, rgba(255,255,255,.025) 45.2%, transparent 45.8%);
}
.hub-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(8,9,13,.48);
  color: rgba(255,255,255,.82);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.hub-hero__title {
  max-width: 850px;
  text-shadow: 0 8px 36px rgba(0,0,0,.32);
}
.hub-hero__stats {
  backdrop-filter: blur(16px);
}
.hub-hero__stat {
  border-color: rgba(255,255,255,.12);
}
.hub-hero__stat span {
  font-variant-numeric: tabular-nums;
}
:where(.division-card, .market-card, .stadium-card2, .career-card, .stat-card) {
  overflow: hidden;
}
:where(.division-card, .market-card, .stadium-card2, .career-card, .stat-card):focus-within {
  outline: 1px solid rgba(139,149,255,.42);
  outline-offset: 2px;
}
:where(.division-card, .market-card, .career-card, .stat-card) {
  background-image: linear-gradient(145deg, rgba(255,255,255,.025), transparent 62%);
}
:where(.btn-admin, .btn-market, .btn-discord, .btn-hero) {
  font-weight: 800;
  letter-spacing: .01em;
}
.btn-hero--solid {
  box-shadow: 0 8px 22px rgba(104,117,255,.22);
}
.btn-hero--solid:hover {
  box-shadow: 0 12px 28px rgba(104,117,255,.3);
}
:where(.standings, .calendar, .matches-table, .data-table) tbody tr {
  border-bottom-color: rgba(255,255,255,.055);
}
:where(.standings, .calendar, .matches-table, .data-table) tbody tr:last-child {
  border-bottom: 0;
}
.login-card {
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 28px 90px rgba(0,0,0,.38);
  backdrop-filter: blur(18px);
}
.login-card__eyebrow {
  letter-spacing: .14em;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .hub-hero { border-radius: 0 0 14px 14px; }
  .hub-hero__eyebrow {
    font-size: 9px;
    letter-spacing: .08em;
    max-width: 100%;
  }
  .view-header::after { margin-top: 9px; }
}


/* Estado accesible de IFL Radio. */
.ifl-radio__now { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ifl-radio__track { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifl-radio__status { min-height: 14px; color: rgba(255,255,255,.55); font-size: 10px; line-height: 1.2; }
.ifl-radio__status[data-tone="ok"] { color: #74e39b; }
.ifl-radio__status[data-tone="warn"] { color: #ffd27a; }
.ifl-radio__status[data-tone="error"] { color: #ff8e9b; }
