/* =========================================================
   0) TOKENS / VARIABLES
   (fácil de mantener y ajustar)
========================================================= */
:root {
  --c-black: #0B0B0B;
  --c-dark: #1C1C1C;
  /* Acentos de marca (reasignados a la paleta PES 6: azul) */
  --c-red: #2563eb;
  --c-orange: #0ea5e9;
  --c-yellow: #93c5fd;

  --bg-page:
    radial-gradient(1100px 560px at 50% -12%, rgba(14, 165, 233, 0.16) 0%, rgba(0, 0, 0, 0) 55%),
    linear-gradient(180deg, #0f172a 0%, #0b1220 48%, #070c17 100%);
  --grad-brand: linear-gradient(90deg, #1e3a8a 0%, #2563eb 45%, #0ea5e9 78%, #1e3a8a 100%);
  --grad-brand-strong: linear-gradient(135deg, #fb7185, #f43f5e, #be123c);

  /* Paleta inspirada en PES 6 (azul marino / celeste / plata) */
  --pes-deep: #0c2740;
  --pes-mid: #1c5c93;
  --pes-bright: #0ea5e9;
  --grad-pes-nav: linear-gradient(90deg, #0b1f3a 0%, #1d4ed8 50%, #0b1f3a 100%);
  --grad-pes-header: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%);

  /* Acento coral (combina con el azul) */
  --c-accent: #f43f5e;        /* coral / rosa vibrante */
  --c-accent-2: #fb7185;      /* coral claro */
  --c-accent-deep: #be123c;   /* coral profundo (hover/depth) */
  --grad-accent: linear-gradient(135deg, #fb7185, #f43f5e);
  --grad-accent-strong: linear-gradient(135deg, #f43f5e, #be123c);

  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 14px 34px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.12);

  --radius-1: 10px;
  --radius-2: 14px;
  --radius-3: 18px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================================
   1) BASE
========================================================= */
body {
  background: var(--bg-page);
  background-attachment: fixed;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1e293b;
}

/* Tipografía profesional en toda la app (sobre Bootstrap) */
:root {
  --bs-body-font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6,
.panel-title,
.card-header {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

/* Helpers */
.small-text {
  font-size: 0.85rem;
}

/* =========================================================
   2) COMPONENTES - NAVBAR
========================================================= */
.navbar {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.navbar-custom {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--grad-pes-nav);
  background-size: 220% 100%;
  animation: navGradientShift 16s ease infinite;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  border-bottom: 2px solid rgba(14, 165, 233, 0.35);
}

@keyframes navGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.navbar-logo {
  height: 70px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.06) rotate(-2deg);
  filter: drop-shadow(0 3px 9px rgba(0, 0, 0, 0.55));
}

.navbar-title {
  font-weight: 800;
  letter-spacing: 1.5px;
  font-size: 1.1rem;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.navbar-custom .nav-link,
.navbar-custom .navbar-brand {
  color: #eaf3fb !important;
  font-weight: 700;
  text-transform: uppercase;
}

/* Links tipo pill con subrayado animado */
.navbar-custom .nav-link {
  position: relative;
  margin: 0 0.1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.navbar-custom .nav-link i {
  font-size: 1rem;
  opacity: 0.85;
}

.navbar-custom .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  background: var(--c-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

.navbar-custom .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
  width: 55%;
}

.navbar-custom .nav-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
}

/* Toggler (móvil) */
.navbar-custom .navbar-toggler {
  border-color: rgba(0, 0, 0, 0.25);
}

.navbar-custom .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.15);
}

/* Menú de usuario (avatar) resaltado */
.navbar-custom .dropdown-toggle {
  background: rgba(255, 255, 255, 0.14);
}

.navbar-custom .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Botón en navbar más compacto (pill) */
.navbar .btn-crew-login {
  padding: 0.45rem 1.4rem;
  font-size: 0.85rem;
  border-radius: 999px;
}

/* Dropdown */
.dropdown-menu {
  border-radius: var(--radius-1);
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.dropdown-item {
  font-weight: 600;
}

.dropdown-item:hover {
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  color: #fff;
}

@media (max-width: 576px) {
  .navbar-title {
    display: none;
  }
}

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .navbar-custom {
    animation: none;
  }
}

/* =========================================================
   3) COMPONENTES - CARDS (GLOBAL)
========================================================= */
.card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.card-header {
  background: var(--grad-pes-header);
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: none;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Header con icono */
.card-header i {
  font-size: 1.1rem;
}

/* Toques profesionales globales */
a {
  transition: color 0.15s ease;
}

.btn {
  border-radius: 10px;
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid rgba(14, 165, 233, 0.65);
  outline-offset: 2px;
}

.alert {
  border: none;
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-soft);
  font-weight: 500;
}

/* Modales más limpios */
.modal-content {
  border: none;
  border-radius: var(--radius-3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* =========================================================
   4) COMPONENTES - TABLAS (CREW) GLOBAL
========================================================= */
.user-table-wrapper {
  max-width: 900px;
  margin: auto;
}

/* Contenedor de tabla tipo "tarjeta": redondeado y con borde limpio */
.table-crew {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  margin-bottom: 0;
}

.table-crew th,
.table-crew td {
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  vertical-align: middle;
  border: none;            /* anulamos bordes de Bootstrap; usamos separadores propios */
  box-shadow: none;
}

/* separadores suaves entre filas */
.table-crew tbody tr td {
  border-top: 1px solid #ededed;
}

.table-crew tbody tr:first-child td {
  border-top: none;
}

/* filas zebra (cálido), no pisan las filas de ranking con color de división */
.table-crew tbody tr:nth-child(even) td {
  background-color: #faf6ec;
}

/* hover por encima del zebra */
.table-crew tbody tr:hover td {
  background-color: #eff6ff;
  transition: background-color 0.15s ease;
}

.table-crew a {
  font-weight: 600;
}

.table-crew a:hover {
  color: var(--c-red);
  text-shadow: 0 0 4px rgba(37, 99, 235, 0.6);
}

/* Resultado centrado y destacado en el resumen (no rompe otras tablas) */
.table-crew td:nth-child(4) {
  font-weight: 700;
  text-align: center;
}

.division-badge {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.position-badge {
  display: inline-block;
  min-width: 44px;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  color: #111;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.table-crew tbody tr.rank-row-d1 .position-badge {
  background: linear-gradient(90deg, #ffe100, #ff8a00);
  color: #2a1e00;
  border-color: rgba(120, 78, 0, 0.65);
}

.table-crew tbody tr.rank-row-d2 .position-badge {
  background: linear-gradient(90deg, #e7edf7, #a8b3c2);
  color: #16212e;
  border-color: rgba(50, 63, 80, 0.55);
}

.table-crew tbody tr.rank-row-3a .position-badge {
  background: linear-gradient(90deg, #e2a57b, #b35f22);
  color: #2d1a10;
  border-color: rgba(92, 47, 20, 0.55);
}

.table-crew tbody tr.rank-row-3b .position-badge {
  background: linear-gradient(90deg, #b9cdef, #6f90be);
  color: #162434;
  border-color: rgba(45, 69, 102, 0.5);
}

.table-crew tbody tr.rank-row-3c .position-badge {
  background: linear-gradient(90deg, #c0d0b5, #879e7c);
  color: #1d281a;
  border-color: rgba(55, 76, 47, 0.5);
}

.table-crew tbody tr.rank-row-d1 > td {
  background: rgba(255, 190, 0, 0.58) !important;
  color: #2f2200;
  font-weight: 700;
}

.table-crew tbody tr.rank-row-d1 > td:first-child {
  border-left: 7px solid #b87700;
}

.table-crew tbody tr.rank-row-d2 > td {
  background: rgba(168, 178, 194, 0.46) !important;
  color: #1f2833;
}

.table-crew tbody tr.rank-row-3a > td {
  background: rgba(179, 96, 34, 0.40) !important;
}

.table-crew tbody tr.rank-row-3b > td {
  background: rgba(95, 124, 168, 0.30) !important;
}

.table-crew tbody tr.rank-row-3c > td {
  background: rgba(122, 145, 104, 0.22) !important;
}

.table-crew tbody tr.rank-row-d1:hover > td {
  background: rgba(255, 190, 0, 0.72) !important;
}

.table-crew tbody tr.rank-row-d2:hover > td {
  background: rgba(168, 178, 194, 0.60) !important;
}

.table-crew tbody tr.rank-row-3a:hover > td {
  background: rgba(179, 96, 34, 0.52) !important;
}

.table-crew tbody tr.rank-row-3b:hover > td {
  background: rgba(95, 124, 168, 0.42) !important;
}

.table-crew tbody tr.rank-row-3c:hover > td {
  background: rgba(122, 145, 104, 0.32) !important;
}

/* Thead con gradiente */
.thead-crew {
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 60%, #0ea5e9 100%);
  color: #FFF;
  text-transform: uppercase;
  font-weight: 700;
}

.thead-crew th {
  background: transparent;
  color: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  border: none;
}

/* La tabla de campeones tiene muchas columnas angostas: cabeceras que envuelven */
.campeones-table thead th {
  letter-spacing: 0;
  text-shadow: none;
  white-space: normal;
  word-break: break-word;
}

/* Columna de perfiles (listado de usuarios) */
.perfil-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.5;
}

.btn-perfil-edit {
  border: none;
  background: transparent;
  color: #2563eb;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-perfil-edit:hover {
  opacity: 1;
  transform: scale(1.15);
}

.ip-col {
  font-family: monospace;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Columnas especiales */
.serial-col {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
  font-size: 0.85rem;
}

.table-crew .player-link {
  color: #0066cc;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.table-crew .player-link:hover {
  color: var(--c-red);
  text-shadow: 0 0 4px rgba(37, 99, 235, 0.6);
  cursor: pointer;
}

/* =========================================================
   Tabla del historial de partidos (página /partidos)
========================================================= */
.matches-table th,
.matches-table td {
  padding: 0.45rem 0.6rem;
}

.matches-table .small-text,
.matches-table .player-link {
  font-size: 0.85rem;
}

/* Nombres de equipo: no dejar que estiren la tabla */
.matches-table td .fw-semibold {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.matches-table td img:not(.player-avatar) {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* Columna de vestíbulo: etiqueta clicable que filtra por ese vestíbulo */
.matches-table .lobby-col {
  white-space: nowrap;
}

.lobby-tag {
  display: inline-block;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  color: #1e3a8a;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.22);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.lobby-tag:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--c-red);
}

/* Resultado bien centrado y con énfasis */
.matches-table .match-result {
  text-align: center;
  white-space: nowrap;
}

.matches-table .match-result .score {
  display: inline-block;
  min-width: 52px;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  font-weight: 900;
  font-size: 0.95rem;
}

@media (max-width: 767.98px) {
  .matches-table {
    font-size: 0.78rem;
  }

  .matches-table .small-text,
  .matches-table .player-link {
    font-size: 0.78rem;
  }

  .matches-table td .fw-semibold {
    max-width: 90px;
  }
}

/* =========================================================
   "Últimos partidos" (portada): lista de tarjetas (escudo · marcador · escudo)
   Sustituye a la antigua tabla comprimida: da aire a los escudos
   y hace del resultado el elemento dominante de cada fila.
========================================================= */
.match-list {
  display: grid;
  gap: 0.65rem;
}

.match-row {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 0.55rem 0.9rem 0.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.match-row:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
}

/* Cabecera de la tarjeta: fecha y hora */
.match-row__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding-bottom: 0.45rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.10);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.50);
}

.match-row__time {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #1e3a8a;
}

/* Rejilla local | marcador | visitante */
.match-row__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
}

.match-side {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

/* El local se invierte para que su escudo quede pegado al marcador */
.match-side--home {
  flex-direction: row-reverse;
  justify-content: flex-start;
  text-align: right;
}

.match-side--away {
  text-align: left;
}

/* Escudos: espacio propio, sin deformarse. Son bitmaps pequeños,
   así que no se escalan más de ~48px para que no pierdan nitidez. */
.match-crest {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 32%, #ffffff, #eef2f7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(0, 0, 0, 0.08);
}

.match-crest img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  transition: transform 0.18s ease;
}

.match-row:hover .match-crest img {
  transform: scale(1.06);
}

.match-side__players {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.match-side--home .match-side__players {
  align-items: flex-end;
}

.match-side--away .match-side__players {
  align-items: flex-start;
}

.match-side .player-cell {
  max-width: 100%;
  gap: 0.5rem;
}

.match-side--home .player-cell {
  flex-direction: row-reverse;
}

/* Foto del jugador: el elemento visual dominante junto al marcador */
.match-side .player-avatar {
  width: 78px;
  height: 78px;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.match-row:hover .match-side .player-avatar {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.match-side .player-link {
  color: #0066cc;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.match-side .player-link:hover {
  color: var(--c-red);
  text-shadow: 0 0 4px rgba(37, 99, 235, 0.6);
}

/* Marcador: el elemento con más peso visual de la tarjeta */
.match-score {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.28);
  line-height: 1;
}

.match-score__num {
  min-width: 1.1ch;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.72);
}

.match-score__num.is-win {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.match-score__sep {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.5);
}

/* Escritorio estrecho / tablet: mismos bloques, algo más compactos */
@media (max-width: 991.98px) {
  .match-crest {
    width: 56px;
    height: 56px;
  }

  .match-crest img {
    width: 44px;
    height: 44px;
  }

  .match-score__num {
    font-size: 1.35rem;
  }

  .match-side .player-avatar {
    width: 66px;
    height: 66px;
  }

  .match-side .player-link {
    max-width: 110px;
  }
}

/* Móvil: los dos equipos uno debajo del otro y el marcador a la derecha,
   centrado entre ambos. Todo más compacto para que la tarjeta no se estire. */
@media (max-width: 575.98px) {
  .match-row {
    padding: 0.4rem 0.6rem 0.55rem;
    border-radius: 12px;
  }

  .match-row__head {
    gap: 0.3rem;
    padding-bottom: 0.35rem;
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
  }

  .match-row__time {
    padding: 0.05rem 0.4rem;
  }

  .match-row__body {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "home golHome"
      "away golAway";
    column-gap: 0.5rem;
    row-gap: 0.4rem;
    align-items: center;
  }

  .match-side--home {
    grid-area: home;
  }

  .match-side--away {
    grid-area: away;
  }

  .match-side--home,
  .match-side--away {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 0.45rem;
  }

  .match-side--home .match-side__players,
  .match-side--away .match-side__players {
    align-items: flex-start;
  }

  .match-side--home .player-cell {
    flex-direction: row;
  }

  /* Marcador en vertical: cada gol en la fila de su equipo, a la derecha del todo.
     `display: contents` saca los dos números del recuadro y los convierte en
     celdas de la rejilla, así quedan siempre alineados con su jugador. */
  .match-score {
    display: contents;
  }

  .match-score__sep {
    display: none;
  }

  .match-score__num,
  .match-score__num.is-win {
    grid-area: golHome;
    justify-self: end;
    align-self: center;
    min-width: 1.4ch;
    padding: 0;
    font-size: 1.3rem;
    line-height: 1.25;
    text-align: right;
    /* los dos goles se ven igual: sin píldora ni resaltado */
    color: #1e3a8a;
    background: none;
    border-radius: 0;
    box-shadow: none;
    text-shadow: none;
  }

  .match-score__num ~ .match-score__num {
    grid-area: golAway;
  }

  .match-crest {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .match-crest img {
    width: 30px;
    height: 30px;
  }

  .match-side .player-avatar {
    width: 42px;
    height: 42px;
    border-width: 2px;
  }

  .match-side .player-cell {
    gap: 0.4rem;
  }

  .match-side .player-link {
    font-size: 0.86rem;
    max-width: 42vw;
  }
}

/* =========================================================
   5) COMPONENTES - BOTONES
========================================================= */
.btn-xs {
  color: #fff;
  border: none;
}

.btn-xs:hover {
  filter: brightness(1.1);
}

/* Botón Iniciar Sesión (global) */
.btn-crew-login {
  background: var(--grad-accent);
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  padding: 0.6rem 1.8rem;
  border-radius: var(--radius-2);
  box-shadow:
    0 6px 15px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.btn-crew-login:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 10px 25px rgba(37, 99, 235, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-crew-login:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   6) COMPONENTES - PAGINACIÓN
========================================================= */
.pagination .page-link {
  color: #dc3545;
  border-color: #dee2e6;
}

.pagination .page-link:hover {
  color: #b02a37;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.pagination .page-item.active .page-link {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
}

.pagination .page-item.disabled .page-link {
  color: #adb5bd;
  background-color: #f8f9fa;
}

/* =========================================================
   7) COMPONENTES - LISTAS (GLOBAL)
========================================================= */
.list-group-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
}

.list-group-item:hover {
  background: rgba(14, 165, 233, 0.07);
}

.list-group-item a {
  color: var(--c-black);
  font-weight: 700;
}

/* =========================================================
   8) PÁGINA: RESUMEN (Index)
========================================================= */
.panel-crew {
  background: #fff;
  border-radius: var(--radius-2);
  padding: 0.75rem;
  box-shadow: var(--shadow-soft);
}

.panel-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--c-red);
  letter-spacing: 0.5px;
}

/* Widgets lado derecho */
.widget-card {
  background: transparent;
  box-shadow: none;
}

.widget-card .card-header {
  background: none;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--c-red);
}

/* =========================================================
   7) RANKING (usa estilos de tabla-crew)
========================================================= */
.table-crew td .player-link {
  display: inline-block;
  line-height: 1.1;
}

.player-link {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: underline;
  cursor: default;
}

/* Sidebar ranking (index) */
.ranking-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.28rem 0.7rem;
  transition: background 0.18s ease;
}

/* Número de posición como ficha redonda */
.rank-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
  color: #1e3a8a;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.rank-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-name:hover {
  color: var(--c-red);
}

/* Puntos en píldora, igual que el marcador de los partidos */
.rank-points {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.86rem;
  color: #fff;
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 100%);
  box-shadow: 0 3px 8px rgba(30, 58, 138, 0.25);
}

.ranking-top {
  background: linear-gradient(90deg, #0ea5e9, #2563eb) !important;
}

.ranking-top .rank-num,
.ranking-top .rank-points {
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.ranking-top .rank-name {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ranking-top .rank-name:hover {
  color: #ffe9ef;
}

.ranking-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ranking-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  color: #111;
}

.ranking-subtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: rgba(0, 0, 0, 0.74);
}

.ranking-cta-link {
  font-weight: 800;
  color: #b32400;
  text-decoration: none;
}

.ranking-cta-link:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

.ranking-table tbody tr {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ranking-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.08);
}

.rank-points-cell {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ranking-pager .pagination {
  margin-top: 0.35rem;
}

/* La tabla del ranking global se ajusta al ancho disponible; si aun así no
   cabe, hace scroll ella sola (dentro de .table-responsive) sin arrastrar
   la página entera. */
.ranking-table {
  width: 100%;
}

@media (max-width: 767.98px) {
  .ranking-card .card-body {
    padding: 0.85rem 0.7rem;
  }

  .ranking-table th,
  .ranking-table td {
    padding: 0.4rem 0.3rem;
    font-size: 0.82rem;
  }

  .ranking-table thead th {
    font-size: 0.66rem;
    letter-spacing: 0;
  }

  .ranking-table .rank-user {
    gap: 6px;
  }

  /* el nick nunca empuja la tabla: se recorta con puntos suspensivos */
  .ranking-table .player-link {
    display: inline-block;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }

  .ranking-table .rank-avatar {
    width: 26px;
    height: 26px;
  }

  .ranking-table .position-badge {
    min-width: 34px;
    padding: 0.1rem 0.3rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 576px) {
  .ranking-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-subtitle {
    font-size: 0.8rem;
  }

  .division-badge {
    width: 32px;
    height: 32px;
  }

  .ranking-table th,
  .ranking-table td {
    padding: 0.35rem 0.25rem;
    font-size: 0.78rem;
  }
}

/* =========================================================
   8.1) Filtro de partidos (estilo Crew)
========================================================= */
.crew-filter {
  margin: 0;
  /* evita espacios raros dentro del panel */
}

.crew-filter__wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(147, 197, 253, 0.14), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.crew-filter__input {
  height: 30px;
  padding: 0 10px;
  min-width: 170px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #111;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.crew-filter__input::placeholder {
  color: rgba(0, 0, 0, 0.45);
  font-weight: 600;
}

/* Desplegable (p. ej. vestíbulo) dentro de la barra de filtros */
.crew-filter__select {
  min-width: 190px;
  cursor: pointer;
}

/* Campo con sugerencias de jugador (lista propia, ver js/player-suggest.js) */
.crew-suggest {
  position: relative;
  display: block;
  flex: 0 1 auto;
  width: 170px;
  min-width: 0;
}

.crew-suggest > .crew-filter__input {
  width: 100%;
  min-width: 0;
}

.crew-suggest__list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.20);
}

.crew-suggest__list[hidden] {
  display: none;
}

.crew-suggest__item {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
}

.crew-suggest__item:hover,
.crew-suggest__item.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
}

/* foco con tu identidad (amarillo/naranja) */
.crew-filter__input:focus {
  border-color: rgba(14, 165, 233, 0.75);
  box-shadow: 0 0 0 .18rem rgba(14, 165, 233, 0.18);
}

/* botones */
.crew-filter__btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

/* Filtrar = gradiente brand */
.crew-filter__btn--primary {
  background: var(--grad-brand-strong);
  color: #111;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.crew-filter__btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
}

/* Limpiar = ghost “deportivo” */
.crew-filter__btn--ghost {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: rgba(0, 0, 0, 0.75);
}

.crew-filter__btn--ghost:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
  color: #111;
}

/* Responsive: que no se explote en móvil */
@media (max-width: 576px) {
  .crew-filter__wrap {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .crew-filter__input {
    min-width: 0;
    flex: 1 1 160px;
    /* 16px evita que iOS haga zoom automático al enfocar el campo */
    font-size: 16px;
  }

  .crew-suggest {
    flex: 1 1 160px;
    width: auto;
  }

  /* objetivos táctiles más cómodos en el desplegable */
  .crew-suggest__item {
    padding: 12px 12px;
    font-size: 0.95rem;
  }
}


/* Header del panel: título (+ "Ver todos") a la izquierda y filtro a la derecha.
   Si no caben en la misma línea, el filtro baja entero y se alinea a la
   izquierda, en vez de quedar suelto y descolgado a la derecha. */
.matches-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 12px;
  flex-wrap: wrap;
}

.matches-head__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

/* El buscador puede encogerse antes que bajar de línea */
.matches-head .crew-filter {
  flex: 0 1 auto;
  min-width: 0;
}

/* Si aun así tiene que bajar, sus campos y botones no se salen del recuadro */
.matches-head .crew-filter__wrap {
  flex-wrap: wrap;
}

/* En el panel de la portada hay menos ancho: los campos ceden espacio para que
   título, "Ver todos" y buscador quepan en la misma línea. El ancho por defecto
   de un <input> (size=20) es lo que antes forzaba el salto de línea. */
.panel-crew .crew-filter__input {
  min-width: 0;
}

.panel-crew .crew-suggest {
  width: 148px;
  flex: 1 1 110px;
}

.panel-crew .crew-filter__wrap {
  padding: 5px 7px;
  gap: 6px;
}

/* De tablet hacia arriba el buscador se queda en la misma línea que el título y
   "Ver todos", ocupando el hueco que sobra a su derecha: los campos ceden ancho
   entre ellos y los botones nunca se parten en dos filas. */
@media (min-width: 576px) {
  .panel-crew .matches-head .crew-filter {
    flex: 1 1 320px;
  }

  .panel-crew .matches-head .crew-filter__wrap {
    flex-wrap: nowrap;
  }
}

.panel-crew .crew-filter__btn {
  flex: 0 0 auto;
  padding: 0 10px;
}

/* Fila propia para los chips de filtros activos (debajo del buscador) */
.matches-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Enlace "Ver todos" hacia la página completa de partidos */
.matches-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #1e3a8a;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(14, 165, 233, 0.10);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.matches-more:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--c-red);
}

.matches-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(147, 197, 253, 0.18);
  border: 1px solid rgba(14, 165, 233, 0.22);
  color: rgba(0, 0, 0, 0.75);
}

.matches-chip b {
  color: #111;
}

/* paginación más integrada al estilo */
.matches-pager .pagination {
  gap: 6px;
}

.matches-pager .page-link {
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.82rem;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.matches-pager .page-item.active .page-link {
  background: var(--grad-brand-strong);
  border-color: rgba(0, 0, 0, 0.10);
  color: #111;
}

.matches-pager .page-link:hover {
  filter: brightness(0.98);
}



/* =========================================================
   9) PÁGINA: LOGIN
========================================================= */
.login-wrap {
  margin-top: 0.5rem;
}

.login-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Banner PES06 */
.login-banner {
  height: 110px;
  border-radius: var(--radius-2);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 30% 30%, rgba(147, 197, 253, 0.30), transparent 55%),
    linear-gradient(90deg, rgba(147, 197, 253, 0.25), rgba(14, 165, 233, 0.25), rgba(37, 99, 235, 0.20)),
    rgba(0, 0, 0, 0.10);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

.login-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  filter: contrast(1.05) saturate(1.05);
}

.login-input {
  border-radius: var(--radius-2);
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.login-input:focus {
  border-color: rgba(14, 165, 233, 0.75);
  box-shadow: 0 0 0 .2rem rgba(14, 165, 233, 0.18);
}

@media (max-width: 576px) {
  .login-banner {
    height: 90px;
  }
}

/* =========================================================
   10) PÁGINA: DOWNLOADS
   (todo aislado bajo .downloads-page)
========================================================= */
.downloads-page {
  background: var(--bg-page);
}

/* Contenedor principal */
.downloads-page .downloads-shell {
  border-radius: var(--radius-3);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

/* Header */
.downloads-page .downloads-shell>.card-header {
  background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 35%, #2563eb 70%, #1e3a8a 115%) !important;
  color: #111 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 900;
  padding: 14px 16px;
  text-transform: uppercase;
}

.downloads-page .panel-title {
  color: var(--c-red);
  font-weight: 900;
  letter-spacing: .5px;
}

/* Cards */
.downloads-page .download-card {
  border-radius: var(--radius-3);
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18) !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.downloads-page .download-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.45) !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22) !important;
}

.downloads-page .download-title {
  color: #111;
}

.downloads-page .download-subtitle {
  color: rgba(0, 0, 0, 0.55) !important;
}

.downloads-page .download-desc {
  color: rgba(0, 0, 0, 0.65) !important;
}

/* Iconos */
.downloads-page .file-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.downloads-page .file-icon i {
  color: rgba(0, 0, 0, 0.65);
}

/* Chips */
.downloads-page .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.70);
  background: rgba(147, 197, 253, 0.18);
  border: 1px solid rgba(14, 165, 233, 0.22);
}

/* Botón */
.downloads-page .btn-primary {
  border: none;
  border-radius: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 55%, #be123c 120%);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.downloads-page .btn-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

/* =========================================================
   LOBBIES PAGE (Crew)
========================================================= */
.lobbies-page {
  color: #111;
}

.lobbies-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.lobbies-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.15rem;
  color: #fff;
}

.lobbies-subtitle {
  font-size: .9rem;
  color: rgba(255, 255, 255, .75);
}

.lobbies-status .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: .75rem;
  border: 1px solid rgba(255, 255, 255, .15);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  display: inline-block;
}

.dot-green {
  background: #32d74b;
  box-shadow: 0 0 0 4px rgba(50, 215, 75, .2);
}

.lobby-card {
  overflow: hidden;
}

.lobby-header {
  padding: 12px 14px;
}

.lobby-name {
  font-weight: 900;
  letter-spacing: .5px;
}

.lobby-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .75rem;
  text-transform: uppercase;
}

.lobby-badge--on {
  background: rgba(50, 215, 75, .22);
  color: #0b2;
  border: 1px solid rgba(50, 215, 75, .35);
}

.lobby-badge--off {
  background: rgba(0, 0, 0, .10);
  color: #111;
  border: 1px solid rgba(0, 0, 0, .12);
}

.lobby-toggle {
  background: rgba(0, 0, 0, .10);
  border: 1px solid rgba(0, 0, 0, .15);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .75rem;
  border-radius: 999px;
}

.lobby-toggle:hover {
  filter: brightness(1.05);
}

.lobby-body {
  background: #fff;
}

.section-title {
  font-weight: 900;
  text-transform: uppercase;
  font-size: .8rem;
  color: #1e3a8a;
  letter-spacing: .6px;
  margin-bottom: 8px;
}

.empty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .04);
  color: rgba(0, 0, 0, .65);
  font-weight: 700;
}

.empty-ico {
  font-size: 1.05rem;
}

.users-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(147, 197, 253, .18), rgba(14, 165, 233, .10));
  border: 1px solid rgba(0, 0, 0, .10);
  font-weight: 800;
}

.user-name {
  color: #111;
}

.user-meta {
  font-size: .75rem;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .10);
}

/* =========================
   MATCH CARD
========================= */
.match-card {
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, .92));
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
  margin-bottom: 10px;
}

.match-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.match-room {
  font-weight: 900;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.match-meta {
  display: flex;
  gap: 8px;
  color: rgba(0, 0, 0, .55);
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
}

/* GRID home | score | away */
.match-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.side {
  min-width: 0;
}

.side-home {
  text-align: left;
}

.side-away {
  text-align: right;
}

.team-title {
  font-weight: 900;
  text-transform: uppercase;
  font-size: .75rem;
  color: rgba(0, 0, 0, .55);
  margin-bottom: 6px;
}

.team-players {
  font-weight: 800;
  font-size: .9rem;
  color: #111;
  line-height: 1.15;
}

.team-name {
  margin-top: 4px;
  font-size: .78rem;
  font-weight: 900;
  color: rgba(0, 0, 0, .60);
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* score manda */
.scorebox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .04);
  border: 1px solid rgba(0, 0, 0, .10);
}

.team-badge {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: inline-block;
  opacity: .75;
  transform: scale(.95);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .20));
  transition: opacity .15s ease, transform .15s ease, filter .15s ease;
}

.scorebox .score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .10);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .10);
  font-weight: 900;
  font-size: 1.15rem;
  color: #1e3a8a;
}

.match-card:hover .team-badge {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .28));
}

/* =========================================================
   PROFILE PAGE (Crew Radar Stats)
========================================================= */
.profile-page {
  background: var(--bg-page);
  min-height: 100vh;
  padding: 2rem 0;
}

.profile-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Profile Card Principal */
.profile-card {
  background: #fff;
  border-radius: var(--radius-3);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Profile Header */
.profile-header {
  background: linear-gradient(135deg, rgba(147, 197, 253, 0.25), rgba(14, 165, 233, 0.15), rgba(37, 99, 235, 0.10));
  padding: 2rem 1.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-name {
  font-size: 2rem;
  font-weight: 900;
  color: #0f2c4d;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.profile-stats-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.profile-points {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 1.1rem;
  color: rgba(0, 0, 0, 0.65);
  font-weight: 700;
}

.profile-points-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--c-red);
}

/* Escudo de división: mismo alto que la foto para que ambos queden alineados.
   La imagen original es de 128px, así que no se escala por encima de eso. */
.profile-division-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 168px;
  height: 168px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 3px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.profile-division-badge img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

/* Profile Rank */
.profile-rank {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.35);
}

/* Radar Container */
.radar-container {
  position: relative;
  width: 100%;
  margin: 2rem 0;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(circle at 20% 25%, rgba(50, 95, 130, 0.28) 0%, rgba(12, 24, 34, 0) 48%),
    radial-gradient(circle at 78% 78%, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 45%),
    linear-gradient(145deg, #152636 0%, #0f1d2a 45%, #08121b 100%);
  border-radius: var(--radius-2);
  border: 1px solid rgba(123, 159, 191, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 26px rgba(0, 0, 0, 0.35);
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 1.6rem;
  align-items: center;
}

.radar-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
}

.radar-side-stats {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.side-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(176, 201, 223, 0.18);
  padding: 0.35rem 0;
}

.side-stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--c-accent);
  line-height: 1;
}

.side-stat-label {
  color: rgba(196, 214, 230, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Stats Legend */
.stats-legend {
  display: block;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 1));
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
  font-size: 2rem;
  display: block;
}

.stat-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stat-value {
  display: inline-block;
  min-width: 50px;
  text-align: right;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--c-accent);
  background: linear-gradient(90deg, #fb7185, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-bar-wrapper {
  position: relative;
  height: 24px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.stat-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.stat-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Stat Bar Variants */
.stat-row.versatilidad .stat-bar {
  background: linear-gradient(90deg, #7B68EE, #6A5ACD);
}

.stat-row.ataque .stat-bar {
  background: linear-gradient(90deg, #FF6B6B, #FF4444);
}

.stat-row.defensa .stat-bar {
  background: linear-gradient(90deg, #4ECDC4, #45B7AA);
}

.stat-row.constancia .stat-bar {
  background: linear-gradient(90deg, #FFD93D, #FFC300);
}

.stat-row.mentalidad .stat-bar {
  background: linear-gradient(90deg, #6FCF97, #4CAF7F);
}

/* Pestañas del perfil */
.profile-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem 0.25rem;
}

.profile-tab {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f1f3f5;
  color: #555;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.profile-tab:hover {
  background: #e7eaed;
}

.profile-tab.active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #1a1a1a;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

.profile-pane {
  display: none;
}

.profile-pane.active {
  display: block;
}

/* Paginador de tablas */
.table-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1rem 0 0.25rem;
}

.pager-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
  color: #333;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pager-btn:hover:not(:disabled) {
  background: #f1f3f5;
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pager-info {
  font-weight: 700;
  color: #555;
  font-size: 0.9rem;
}

.no-data {
  text-align: center;
  color: #888;
  padding: 1.5rem;
  margin: 0;
}

/* Panel de KPIs (compacto) */
.kpi-panel {
  padding: 1.5rem;
  background: linear-gradient(180deg, #ffffff, #f4f6f8);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

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

.kpi-value {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--c-accent);
  white-space: nowrap;
}

.kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tabla de récord por equipo */
.teams-table-wrap {
  padding: 1.5rem;
  background: linear-gradient(180deg, #ffffff, #f4f6f8);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.teams-table-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #333;
  margin: 0 0 1rem;
  text-align: center;
}

/* =========================================================
   Paginación unificada (todas las tablas)
========================================================= */
.crew-pager,
.matches-pager,
.ranking-pager {
  margin-top: 1rem;
}

.pagination {
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.pagination .page-link {
  margin-left: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  color: #1e3a8a;
  font-weight: 700;
  min-width: 34px;
  text-align: center;
  background: #fff;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pagination .page-link:hover {
  background: #eff6ff;
  color: #1e3a8a;
}

.pagination .page-item.active .page-link {
  background: var(--grad-accent);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}

.pagination .page-item.disabled .page-link {
  opacity: 0.45;
}

/* Tablas de récord (perfil): usan el estilo unificado .table-crew/.thead-crew
   + estos helpers para centrado numérico, escudos y colores V/E/D. */
.th-num,
.td-num {
  text-align: center;
}

.td-num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.td-team {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: left;
  font-weight: 700;
}

.team-shield {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.rival-icon {
  font-size: 1.2rem;
  color: var(--c-red);
  flex-shrink: 0;
}

/* Colores semánticos solo en el cuerpo (la cabecera ya es el degradado blanco) */
.table-crew tbody .td-w {
  color: #1e8e4f;
}

.table-crew tbody .td-d {
  color: #6c757d;
}

.table-crew tbody .td-l {
  color: #c0392b;
}

/* Forma reciente (últimos 5) */
.forma-reciente {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.forma-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.forma-badges {
  display: flex;
  gap: 0.5rem;
}

.forma-badge {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.95rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.forma-badge.forma-v {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.forma-badge.forma-e {
  background: linear-gradient(135deg, #b8b8b8, #8a8a8a);
}

.forma-badge.forma-d {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* Back Button */
.profile-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.4rem;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--c-orange);
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  margin: 1rem 1.5rem 0;
}

.profile-back-btn:hover {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(14, 165, 233, 0.4);
  color: var(--c-red);
  transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
  .profile-header {
    padding: 1.5rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .profile-name {
    font-size: 1.5rem;
  }

  /* Foto y escudo algo más pequeños, pero manteniendo el mismo alto */
  .profile-photo-avatar {
    width: 110px;
    height: 138px;
    margin-right: 10px;
  }

  .profile-division-badge {
    width: 138px;
    height: 138px;
  }

  .profile-division-badge img {
    width: 106px;
    height: 106px;
  }

  .profile-stats-header {
    width: 100%;
    gap: 0.8rem;
  }

  .radar-container {
    max-width: 100%;
    padding: 1.5rem 1rem;
    margin: 1.5rem 0;
  }

  .radar-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .radar-canvas-wrapper {
    height: 350px;
  }

  .radar-side-stats {
    gap: 0.45rem;
  }

  .side-stat-item {
    padding: 0.25rem 0;
  }

  .side-stat-value {
    font-size: 1.2rem;
  }

  .side-stat-label {
    font-size: 0.82rem;
  }

  .stats-legend {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem 1rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .stat-value {
    font-size: 0.95rem;
  }
}
}

.match-card:hover .scorebox .score {
  box-shadow: 0 10px 22px rgba(37, 99, 235, .18);
}

@media (max-width: 768px) {
  .match-room {
    max-width: 52%;
  }

  .match-mid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .side-away {
    text-align: left;
  }

  .scorebox {
    width: 100%;
  }

  .team-name {
    white-space: normal;
  }
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  /* ✅ permite que baje a otra línea si falta espacio */
}

.user-loc {
  font-size: .75rem;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  color: rgba(0, 0, 0, .75);
}

/* Campeones */
.campeones-wrapper {
  max-width: 100%;
  margin: 0 auto;
}

.campeones-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.campeones-card {
  border-radius: 12px;
}

.campeones-card .card-body {
  background: #f4f4f6;
}

.campeones-card .form-select {
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
}

.campeones-filter {
  margin: 0;
}

.campeones-filter__wrap {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
}

.campeones-filter__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 190px;
}

.campeones-filter__actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
  padding-top: 18px;
}

.campeones-filter__select {
  min-width: 200px;
}

.campeones-filter.is-filtering {
  opacity: 0.92;
}

.campeones-filter.is-filtering .crew-filter__wrap {
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.22), 0 10px 22px rgba(0, 0, 0, 0.12);
}

.campeones-filter.is-filtering .crew-filter__btn--primary {
  pointer-events: none;
  filter: saturate(0.8);
}

.campeones-card .form-select:focus {
  border-color: rgba(14, 165, 233, 0.75);
  box-shadow: 0 0 0 0.18rem rgba(14, 165, 233, 0.2);
}

.campeonato-dropdown {
  position: relative;
  width: 100%;
}

.campeonato-summary {
  list-style: none;
  width: 100%;
  min-height: 31px;
  padding: 0.36rem 2.2rem 0.36rem 0.62rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1d1d1d;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.campeonato-summary::-webkit-details-marker {
  display: none;
}

.campeonato-summary::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(0, 0, 0, 0.55);
  border-bottom: 2px solid rgba(0, 0, 0, 0.55);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.16s ease;
}

.campeonato-dropdown[open] .campeonato-summary {
  border-color: rgba(14, 165, 233, 0.7);
  box-shadow: 0 0 0 0.16rem rgba(14, 165, 233, 0.16);
}

.campeonato-dropdown[open] .campeonato-summary::after {
  transform: translateY(-35%) rotate(-135deg);
}

.campeonato-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 25px rgba(0, 0, 0, 0.22);
  padding: 0.32rem;
}

.campeonato-option {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.4rem 0.44rem;
  border-radius: 7px;
  margin-bottom: 2px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.campeonato-option span {
  margin: 0;
  cursor: pointer;
  width: 100%;
}

.campeonato-option:hover {
  background: rgba(255, 198, 92, 0.24);
}

.campeonato-check {
  accent-color: #1e3a8a;
}

.campeonato-check:checked + span {
  font-weight: 800;
  color: #8e1f00;
}

.campeonato-option:has(.campeonato-check:checked) {
  background: linear-gradient(90deg, rgba(147, 197, 253, 0.3), rgba(14, 165, 233, 0.22));
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.campeones-table {
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
}

.campeones-table th,
.campeones-table td {
  font-size: 0.70rem;
  padding: 0.20rem 0.26rem;
  line-height: 1.15;
}

.campeones-table .campeonato-col {
  min-width: 56px;
  max-width: 56px;
  font-size: 0.56rem;
  letter-spacing: 0;
  word-break: break-word;
  text-transform: uppercase;
}

.campeones-table .user-col {
  min-width: 138px;
  max-width: 138px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.campeones-table th:first-child,
.campeones-table td:first-child {
  width: 28px;
}

.campeones-table th:nth-child(3),
.campeones-table td:nth-child(3) {
  width: 44px;
}

.campeones-table th:nth-child(4),
.campeones-table td:nth-child(4) {
  width: 56px;
}

.campeones-table td.campeonato-cell {
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.campeones-table td.zero-cell {
  background: linear-gradient(180deg, #ff6b6b 0%, #d62828 100%);
  color: #fff6f6;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  border-left: 1px solid rgba(121, 15, 15, 0.55);
  border-right: 1px solid rgba(121, 15, 15, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.campeones-table td.win-cell {
  background: linear-gradient(180deg, #51cf66 0%, #2b8a3e 100%);
  color: #f3fff6;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  border-left: 1px solid rgba(18, 92, 45, 0.55);
  border-right: 1px solid rgba(18, 92, 45, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.campeones-table tbody tr:hover td.zero-cell {
  background: linear-gradient(180deg, #ff7b7b 0%, #c81d1d 100%);
}

.campeones-table tbody tr:hover td.win-cell {
  background: linear-gradient(180deg, #63db78 0%, #237735 100%);
}

@media (max-width: 1200px) {
  /* En tablet/laptop chica recortamos columnas menos relevantes */
  .campeones-table th:nth-child(n+13),
  .campeones-table td:nth-child(n+13) {
    display: none;
  }
}

@media (max-width: 992px) {
  .campeones-table {
    min-width: 640px;
  }

  .campeones-table .user-col {
    min-width: 118px;
    max-width: 118px;
  }

  .campeones-table .campeonato-col {
    min-width: 52px;
    max-width: 52px;
    font-size: 0.54rem;
  }

  .campeones-table th:nth-child(n+9),
  .campeones-table td:nth-child(n+9) {
    display: none;
  }
}

@media (max-width: 768px) {
  .campeones-card .card-body {
    padding: 0.45rem;
  }

  .campeones-filter__wrap {
    flex-wrap: wrap;
  }

  .campeones-filter__field {
    min-width: 0;
    width: 100%;
  }

  .campeones-filter__actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .campeonato-menu {
    max-height: 180px;
  }

  .campeones-table {
    min-width: 100%;
  }

  .campeones-table th,
  .campeones-table td {
    font-size: 0.74rem;
    padding: 0.22rem 0.26rem;
  }

  .campeones-table .user-col {
    min-width: 132px;
    max-width: 132px;
  }

  /* En móvil mostramos una versión compacta: #, Usuario, Total y Puntaje */
  .campeones-table th:nth-child(n+5),
  .campeones-table td:nth-child(n+5) {
    display: none;
  }
}

/* =========================================================================
   Categoría ÉLITE (750+ puntos) — animación dorada premium
   Aplica a:
     - Ranking general (tabla): filas con .rank-row-d1  (D1 = 750+)
     - Top 10 del inicio (sidebar): filas .ranking-row.rank-elite
   CHAMPION (.rank-champion) = Top 1 + 750+  → versión más exclusiva.
   ========================================================================= */

/* Degradado dorado + franja de luz, ambos como capas de fondo que se desplazan
   de forma CONTINUA a lo largo de toda la fila (sin cortes por columna). */
@keyframes crewGoldRow {
  0%   { background-position: -60% 0, 0% 0; }
  100% { background-position: 160% 0, 200% 0; }
}

@keyframes crewGoldSweep {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes crewGoldGlow {
  0%, 100% { box-shadow: inset 0 0 0 rgba(255, 193, 7, 0); }
  50%      { box-shadow: inset 0 0 20px rgba(255, 193, 7, 0.55); }
}

@keyframes crewGoldPulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 1px rgba(184, 119, 0, 0.6)); }
  50%      { transform: scale(1.18); filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.95)); }
}

/* Barrido de luz diagonal (sidebar) */
@keyframes crewGoldShine {
  0%   { transform: translateX(-120%) skewX(-20deg); }
  60%, 100% { transform: translateX(320%) skewX(-20deg); }
}

/* Champion: halo dorado pulsante mucho más intenso (glow externo + interno) */
@keyframes crewChampionGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 193, 7, 0.55), inset 0 0 10px rgba(255, 180, 0, 0.30); }
  50%      { box-shadow: 0 0 20px rgba(255, 193, 7, 0.95), 0 0 36px rgba(255, 140, 0, 0.50),
                         inset 0 0 20px rgba(255, 180, 0, 0.55); }
}

/* Champion: trofeo que rebota */
@keyframes crewTrophyBounce {
  0%, 100% { transform: translateY(0) rotate(-6deg) scale(1); }
  50%      { transform: translateY(-3px) rotate(6deg) scale(1.28); }
}

/* ---- Ranking general (tabla): degradado CONTINUO en el <tr>, celdas transparentes ---- */
.table-crew tbody tr.rank-row-d1 {
  background-image:
      linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.70) 50%, rgba(255, 255, 255, 0) 100%),
      linear-gradient(100deg, #fff6cf 0%, #ffe27a 20%, #ffc107 40%, #ffde6b 60%, #ffc107 80%, #fff6cf 100%);
  background-size: 45% 100%, 200% 100%;
  background-repeat: no-repeat, repeat;
  background-position: -60% 0, 0 0;
  animation: crewGoldRow 4.5s linear infinite, crewGoldGlow 2.6s ease-in-out infinite;
}

.table-crew tbody tr.rank-row-d1 > td,
.table-crew tbody tr.rank-row-d1:hover > td {
  background: transparent !important;
  color: #4a3500 !important;
  font-weight: 800;
}

/* Sin línea vertical en el tramo dorado (750+): se veía brusca e inconsistente */
.table-crew tbody tr.rank-row-d1 > td:first-child {
  border-left: 0 !important;
}

.table-crew tbody tr.rank-row-d1:hover {
  filter: brightness(1.06);
}

/* Nombre élite: brillo dorado, corona animada y legibilidad conservada */
.table-crew tbody tr.rank-row-d1 .player-link {
  color: #5a4000 !important;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.table-crew tbody tr.rank-row-d1 .rank-points-cell {
  color: #6a3d00 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* ---- CHAMPION en la tabla (Top 1 + 750+): dorado más rápido y glow suave (sin emoji) ---- */
.table-crew tbody tr.rank-champion {
  animation: crewGoldRow 3s linear infinite, crewGoldGlow 2s ease-in-out infinite;
}

.table-crew tbody tr.rank-champion .player-link {
  color: #4a2f00 !important;
  letter-spacing: 0.2px;
}

/* ---- Top 10 del inicio (sidebar) ---- */
.ranking-row.rank-elite {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg,
      #fff6cf 0%, #ffe27a 18%, #ffc107 38%, #ffde6b 58%, #ffc107 78%, #fff6cf 100%) !important;
  background-size: 200% 100%;
  animation: crewGoldSweep 4s linear infinite, crewGoldGlow 2.6s ease-in-out infinite;
}

.ranking-row.rank-elite .rank-num,
.ranking-row.rank-elite .rank-points,
.ranking-row.rank-elite .rank-name {
  color: #4a3500 !important;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Sobre el dorado, la ficha y la píldora van en claro para que se lean */
.ranking-row.rank-elite .rank-num,
.ranking-row.rank-elite .rank-points {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(120, 78, 0, 0.35);
  box-shadow: none;
}

/* Posiciones 2–6 (≥750, no #1): medalla, secundaria a la cabra del #1 */
.ranking-row.rank-elite .rank-name::before {
  content: "🎖️";
  display: inline-block;
  margin-right: 5px;
  font-size: 1.02em;
  animation: crewGoldPulse 2.6s ease-in-out infinite;
}

.ranking-row.rank-elite::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
  animation: crewGoldShine 3.4s ease-in-out infinite;
  pointer-events: none;
}

/* ---- CHAMPION en el Top 10 (Top 1 + 750+): sobresale sin borde externo ---- */
.ranking-row.rank-champion {
  z-index: 2;
  transform: scale(1.03);
  animation: crewGoldSweep 3s linear infinite, crewGoldGlow 2s ease-in-out infinite;
}

/* El #1 del Top 10 conserva un distintivo especial: la cabra (mejor jugador) */
.ranking-row.rank-champion .rank-name::before {
  content: "🐐";
  animation: crewTrophyBounce 1.3s ease-in-out infinite;
  font-size: 1.14em;
  margin-right: 6px;
}

/* Respeta a quien prefiere menos movimiento: conserva el dorado, quita la animación */
@media (prefers-reduced-motion: reduce) {
  .table-crew tbody tr.rank-row-d1,
  .table-crew tbody tr.rank-champion,
  .ranking-row.rank-elite,
  .ranking-row.rank-elite .rank-name::before,
  .ranking-row.rank-elite::after,
  .ranking-row.rank-champion,
  .ranking-row.rank-champion .rank-name::before {
    animation: none !important;
  }
}

/* =========================================================================
   Fotos de perfil de usuarios (avatares + editor de recorte)
   ========================================================================= */

/* Avatar del navbar */
.nav-avatar-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.65);
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
}

/* Miniatura en la tabla admin de usuarios */
.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-thumb {
  width: 30px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

.user-thumb-icon {
  font-size: 1.4rem;
  color: #9aa3af;
  flex: 0 0 auto;
}

/* Foto en el perfil público */
/* Foto del perfil: mismo alto que el escudo de división (168px) para que la
   cabecera quede alineada de lado a lado. */
.profile-photo-avatar {
  width: 134px;
  height: 168px;
  border-radius: 14px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
  margin-right: 14px;
}

/* Vista previa grande en "Mi cuenta" */
.account-avatar-lg {
  width: 200px;
  height: 250px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  background: #eef1f5;
}

.account-avatar-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b4bcc7;
  font-size: 4.5rem;
}

/* Editor de recorte */
.crop-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.crop-canvas {
  width: 100%;
  max-width: 300px;      /* mantiene 4:5 (300x375) en pantalla */
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  cursor: grab;
  touch-action: none;    /* el arrastre mueve la foto, no hace scroll */
  background: #1b1b1b;
}

.crop-canvas:active {
  cursor: grabbing;
}

.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto 8px;
}

.crop-zoom {
  flex: 1 1 auto;
}

.crop-status {
  text-align: center;
  min-height: 1.2em;
  margin: 0;
  font-size: 0.85rem;
}

/* Avatar junto al nombre en ranking general (tabla) */
.rank-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rank-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
}

/* Avatar en el Top 10 del inicio (sidebar): en la misma línea visual que las
   fotos de "Últimos partidos" (borde blanco + sombra), pero a una escala que
   deja la columna del ranking a la par de altura con las tarjetas de partidos. */
.rank-avatar-sm {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 2px solid #fff;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ranking-row:hover .rank-avatar-sm {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* Avatar junto al nick en "Últimos partidos" */
.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.player-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: #fff;
}

/* Avatar del rival en "Récord por rival" */
.rival-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
}

/* Tabla admin de usuarios: nombre en una sola línea */
.user-cell {
  white-space: nowrap;
}

/* Muchas columnas → la tabla scrollea horizontalmente DENTRO de su tarjeta (va
   envuelta en su propio .table-responsive). Damos algo más de ancho al contenedor
   del listado de usuarios y evitamos que las celdas se deformen. Sin ocultar nada. */
.user-table-wrapper.users-wide {
  max-width: 1200px;
}

.users-audit {
  min-width: 1040px;
}

.users-audit th,
.users-audit td {
  white-space: nowrap;
  vertical-align: middle;
}

/* La columna de perfiles sí puede ocupar varias líneas (uno por perfil). */
.users-audit .perfiles-col {
  white-space: normal;
  min-width: 150px;
}
/* =========================================================
   TABLAS DE ADMINISTRACIÓN Y LISTADOS (baneados, conexiones,
   usuarios, servidores, vestíbulos): comportamiento responsive
   ---------------------------------------------------------
   Antes el .table-responsive envolvía la TARJETA entera, así que en
   móvil se desplazaba de lado el bloque completo (cabecera, filtros,
   avisos y paginador incluidos) y esos elementos quedaban fuera de
   pantalla. Ahora solo la tabla scrollea dentro de su tarjeta.
========================================================= */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* sombra al borde derecho mientras quede tabla por ver */
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center,
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) right center;
  background-repeat: no-repeat;
  background-size: 28px 100%, 28px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}

.table-scroll > .table {
  margin-bottom: 0;
}

/* La tarjeta nunca puede ser más ancha que la pantalla */
.user-table-wrapper {
  max-width: 900px;
  margin: auto;
  min-width: 0;
}

.user-table-wrapper > .card {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .table-scroll .table th,
  .table-scroll .table td {
    padding: 0.4rem 0.45rem;
    font-size: 0.82rem;
  }

  .table-scroll .thead-crew th {
    font-size: 0.68rem;
    letter-spacing: 0;
    white-space: nowrap;
  }

  /* Los botones de acción se mantienen juntos y pulsables */
  .action-col {
    white-space: nowrap;
  }

  .action-col .btn-xs {
    padding: 0.25rem 0.45rem;
  }

  /* Columnas largas: se recortan en vez de estirar la tabla */
  .serial-col {
    max-width: 130px;
  }

  .users-audit .perfiles-col {
    min-width: 110px;
  }
}

/* =========================================================
   PAGINADOR EN MÓVIL
   Con muchas páginas los números se amontonaban y se salían de la
   tarjeta. Por debajo de 576px se ocultan los números y queda
   « ‹ [página / total] › », que ocupa siempre lo mismo.
========================================================= */
.crew-pager__status {
  display: none;
}

.crew-pager__status .page-link {
  min-width: 76px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.04);
  cursor: default;
}

@media (max-width: 575.98px) {
  /* solo el paginador compacto (con indicador) puede ir en una sola línea;
     los demás siguen envolviendo como hasta ahora */
  .crew-pager .pagination {
    gap: 0.25rem;
    flex-wrap: nowrap;
  }

  .crew-pager .page-item.is-num,
  .crew-pager .page-item.is-gap {
    display: none;
  }

  .crew-pager__status {
    display: list-item;
  }

  .crew-pager .page-link {
    min-width: 40px;
    padding: 0.35rem 0.5rem;
  }
}

/* Enlaces dentro de la auditoría de conexiones (usuario / IP) */
.audit-link {
  color: #1e3a8a;
  font-weight: 700;
  text-decoration: none;
}

.audit-link:hover {
  color: var(--c-red);
  text-decoration: underline;
}

/* Buscador de la gestión de usuarios: en móvil ocupa el ancho completo
   y los botones caben debajo sin salirse de la tarjeta. */
@media (max-width: 575.98px) {
  .users-search {
    width: 100%;
  }

  .users-search .form-control {
    flex: 1 1 100%;
    max-width: none !important;
  }

  /* En pantallas pequeñas la tabla de usuarios no necesita el ancho mínimo
     de escritorio: se compacta y solo scrollea lo imprescindible. */
  .users-audit {
    min-width: 720px;
  }

  .users-audit .serial-col {
    max-width: 110px;
  }
}

/* Listado de baneados: el motivo es texto libre, así que necesita un ancho
   mínimo para no quedar en una columna de una palabra por línea. */
.motivo-col {
  min-width: 190px;
  white-space: normal;
}

/* =========================================================
   MINUTO A MINUTO: vestíbulos agrupados por servidor
========================================================= */
.server-group {
  margin-bottom: 1.4rem;
}

.server-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  /* más oscuro que las tarjetas de vestíbulo para que se lea como separador */
  background: linear-gradient(90deg, #060f2b 0%, #0d2154 70%, #143a86 100%);
  border: 1px solid rgba(14, 165, 233, 0.45);
  border-left: 5px solid #0ea5e9;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.server-group__id {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.server-group__name {
  font-weight: 900;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-group__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.server-chip {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  white-space: nowrap;
}

.server-chip--on {
  background: rgba(34, 197, 94, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Etiqueta del servidor dentro de cada tarjeta de vestíbulo. La cabecera de la
   tarjeta es azul, así que va en claro para que se lea. */
.lobby-server {
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .server-group__head {
    padding: 0.45rem 0.6rem;
  }

  .server-group__name {
    font-size: 0.85rem;
  }

  .server-chip {
    font-size: 0.68rem;
  }
}

/* =========================================================================
   PES6.LAT — marca (wordmark en texto, sin logo)
   ========================================================================= */
.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 0.35rem 0;
  text-transform: none !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.brand-wordmark__pes { color: #ffffff; }
.brand-wordmark__dot { color: var(--c-accent); margin: 0 1px; }
.brand-wordmark__lat { color: #38bdf8; }

.brand-wordmark:hover .brand-wordmark__dot {
  display: inline-block;
  transform: scale(1.35);
  transition: transform 0.2s ease;
}

/* =========================================================================
   W.O. en partidos
   ========================================================================= */
.wo-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: help;
}

.profile-extras {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.profile-wo { color: #fecaca; }

/* =========================================================================
   Copas
   ========================================================================= */
.copa-status {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.copa-status--open { background: #dcfce7; color: #166534; }
.copa-status--live { background: #fee2e2; color: #b91c1c; }
.copa-status--done { background: #e0e7ff; color: #3730a3; }
.copa-status--off  { background: #e5e7eb; color: #4b5563; }

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

.copa-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: var(--shadow-soft);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.copa-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  color: inherit;
}

.copa-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.copa-card__format { font-size: 0.75rem; color: #64748b; }

.copa-card__name {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}

.copa-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #475569;
}

.copa-card__bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.copa-card__bar span {
  display: block;
  height: 100%;
  background: var(--grad-brand);
}

.copa-div-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.copa-hero {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--grad-pes-header);
  color: #fff;
}

.copa-hero__name {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0.4rem 0 0.6rem;
}

.copa-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.copa-hero__facts .text-muted { color: rgba(255, 255, 255, 0.7) !important; }

.copa-signup {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f0f9ff;
  border: 1px dashed #7dd3fc;
}

.copa-myprofiles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.copa-myprofile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.copa-section {
  font-size: 1rem;
  font-weight: 800;
  margin: 0.5rem 0 0.6rem;
}

.copa-entries .list-group-item { background: transparent; }

.copa-medal { font-size: 1.1rem; }

.copa-table td:nth-child(4) { font-weight: normal; }

.copa-results {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.copa-result {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  font-size: 0.88rem;
}

.copa-result__score {
  font-weight: 800;
  min-width: 3.2rem;
  text-align: center;
}

/* Cuadro de eliminación: una columna por ronda, desplazable en móvil */
.bracket {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.bracket__round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 0.75rem;
  min-width: 200px;
}

.bracket__title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  text-align: center;
}

.bracket__match {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-soft);
}

.bracket__team {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.bracket__team + .bracket__team { border-top: 1px solid #eef2f7; }

.bracket__team.is-win {
  background: #ecfdf5;
  font-weight: 800;
}

/* Avisos del servidor: respetan los saltos de línea del texto */
.news-preview {
  white-space: pre-line;
  max-width: 60ch;
}

/* Menú más largo (Copas, Grupos): sin cortes de línea y más compacto en pantallas medianas */
.navbar-custom .nav-link { white-space: nowrap; }

@media (min-width: 992px) and (max-width: 1599.98px) {
  .navbar-custom .nav-link {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
    font-size: 0.8rem;
  }
  .navbar-custom .nav-link .bi { display: none; }
  .brand-wordmark { font-size: 1.3rem; }
}

/* Etiquetas de la cabecera de los rankings: legibles sobre el azul */
.card-header .ranking-tag {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.card-header .ranking-tag--ok {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(134, 239, 172, 0.6);
}

/* Escudo del grupo junto al nombre del jugador en el ranking general */
.rank-group-link {
  display: inline-flex;
  margin-left: 0.4rem;
  vertical-align: middle;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.rank-group-link:hover { transform: scale(1.12); }
.rank-group-link .grp-shield { width: 22px; height: 22px; }
.rank-group-link .grp-shield span { font-size: 0.62rem; }
