/* =========================================================
   DATOS · TEAM DETAIL
   ========================================================= */

#datos-page .datos-team-body-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;

  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#datos-page .datos-team-info-panel,
#datos-page .datos-team-players-panel {
  min-width: 0;
  width: 100%;
}



/* =========================================================
   DATOS · TEAM DETAIL · BLOQUE ÚNICO HEADER + CONTENIDO
   ========================================================= */

#datos-page .datos-team-main-panel {
  width: 100%;
  min-width: 0;

  margin-top: 12px;

  color: white;

  border-radius: 22px;

  background:
    radial-gradient(
      circle at 0% 0%,
      color-mix(in srgb, var(--datos-team-accent, rgba(255,255,255,.35)) 10%, transparent) 0%,
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(12,18,18,.98) 0%,
      rgba(5,9,9,.99) 100%
    );

  border: 1px solid
    color-mix(
      in srgb,
      var(--datos-team-accent, rgba(255,255,255,.35)) 12%,
      rgba(255,255,255,.10)
    );

  box-shadow:
    0 18px 44px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,255,255,.055);

  overflow: hidden;
}

#datos-page .datos-team-topbar {
  width: 100%;
  min-width: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(
      circle at 4% 0%,
      color-mix(in srgb, var(--datos-team-accent, rgba(255,255,255,.35)) 8%, transparent) 0%,
      transparent 34%
    ),
    linear-gradient(180deg, rgba(17,24,24,.92), rgba(7,12,12,.72));
}

#datos-page .datos-team-main-panel .datos-team-content-shell {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Header del equipo pegado al bloque */
#datos-page .datos-team-main-panel .datos-team-header-card {
  margin: 0 !important;

  border-radius: 0 !important;
  border: 0 !important;

  background: transparent !important;

  box-shadow: none !important;
}

/* Contenido de la tab dentro del mismo bloque */
#datos-page .datos-team-content-body {
  width: 100%;
  min-width: 0;

  padding: 14px;

  box-sizing: border-box;

  background: rgba(0,0,0,.035);
}

/* Quitamos separación visual extra del primer hijo */
#datos-page .datos-team-content-body > div {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Si el contenido trae card propia, la hacemos respirar dentro del bloque */
#datos-page .datos-team-content-body .datos-team-players-card,
#datos-page .datos-team-content-body .datos-team-matches-card,
#datos-page .datos-team-content-body .datos-league-embedded-card {
  margin: 0 !important;
  border-radius: 18px !important;
}

/* Evita doble sombra demasiado fuerte dentro del bloque */
#datos-page .datos-team-content-body .datos-team-players-card,
#datos-page .datos-team-content-body .datos-team-players-panel > div {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 10px 24px rgba(0,0,0,.12) !important;
}


@media (max-width: 760px) {
  #datos-page .datos-team-content-body {
    padding: 12px;
  }

  #datos-page .datos-team-main-panel {
    border-radius: 18px;
  }
}


/* =========================================================
   DATOS · CARD JUGADORES
   ========================================================= */

#datos-page .datos-team-players-card,
#datos-page .datos-team-players-panel > div {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  overflow: hidden;
  color: white;

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#datos-page .datos-team-players-card,
#datos-page .datos-team-players-card *,
#datos-page .datos-team-players-panel > div,
#datos-page .datos-team-players-panel > div * {
  box-sizing: border-box;
}

#datos-page .datos-team-players-card::before,
#datos-page .datos-team-players-panel > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.32),
      transparent
    );

  opacity: 0.72;
  pointer-events: none;
}

#datos-page .datos-team-players-card::after,
#datos-page .datos-team-players-panel > div::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 260px;
  height: 260px;
  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      color-mix(
        in srgb,
        var(--datos-player-accent, var(--datos-team-accent, rgba(255,255,255,.35))) 18%,
        rgba(255,255,255,.035)
      ) 0%,
      rgba(255, 255, 255, 0.025) 36%,
      transparent 70%
    );

  pointer-events: none;
}


/* =========================================================
   DATOS · JUGADORES · HEADER + PILLS
   ========================================================= */

#datos-page .datos-team-players-header {
  position: relative;
  z-index: 2;

  width: 100%;
  min-width: 0;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 12px;
}

#datos-page .datos-team-players-title-block {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

#datos-page .datos-team-players-title {
  color: white;

  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: .15px;
}

#datos-page .datos-team-players-subtitle {
  max-width: 520px;

  color: rgba(255,255,255,.68);

  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#datos-page .datos-team-players-meta-pills {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

#datos-page .datos-team-players-meta-pill {
  min-height: 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  padding: 0 10px;

  border-radius: 999px;

  color: rgba(255,255,255,.90);

  font-size: 11px;
  font-weight: 850;
  line-height: 1;

  white-space: nowrap;

  background:
    radial-gradient(
      circle at 30% 20%,
      color-mix(
        in srgb,
        var(--datos-player-accent, var(--datos-team-accent, rgba(255,255,255,.35))) 20%,
        rgba(255,255,255,.075)
      ),
      rgba(255,255,255,.045)
    );

  border: 1px solid
    color-mix(
      in srgb,
      var(--datos-player-accent, var(--datos-team-accent, rgba(255,255,255,.35))) 28%,
      rgba(255,255,255,.14)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 5px 12px rgba(0,0,0,.12);
}

#datos-page .datos-team-players-meta-pill__label {
  color: rgba(255,255,255,.68);

  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
}

#datos-page .datos-team-players-meta-pill__value {
  color: white;

  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

#datos-page .datos-team-players-meta-pill.is-fed {
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(59,130,246,.22),
      rgba(59,130,246,.065)
    );

  border-color: rgba(96,165,250,.25);
}

#datos-page .datos-team-players-meta-pill.is-scope {
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(168,85,247,.20),
      rgba(168,85,247,.060)
    );

  border-color: rgba(192,132,252,.24);
}

#datos-page .datos-team-players-meta-pill.is-group {
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255,255,255,.15),
      rgba(255,255,255,.045)
    );

  border-color: rgba(255,255,255,.14);
}

#datos-page .datos-team-players-meta-pill.is-count {
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(34,197,94,.25),
      rgba(34,197,94,.075)
    );

  border-color: rgba(74,222,128,.30);
}

#datos-page .datos-team-players-meta-pill.is-count .datos-team-players-meta-pill__label,
#datos-page .datos-team-players-meta-pill.is-count .datos-team-players-meta-pill__value {
  color: rgba(187,247,208,1);
}

#datos-page .datos-team-players-empty-card {
  position: relative;
  z-index: 1;

  padding: 14px 16px;

  border-radius: 16px;

  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);

  color: rgba(255,255,255,.76);

  font-size: 12px;
  line-height: 1.45;
}

#datos-page .datos-team-players-blob-name {
  position: relative;
  z-index: 1;

  margin-top: 10px;

  color: white;

  font-size: 10px;
  opacity: 0.30;

  word-break: break-all;
}


/* =========================================================
   AG GRID · JUGADORES EQUIPO · BASE
   ========================================================= */

#datos-page .datos-team-players-grid {
  --ag-background-color: rgba(4, 7, 8, 0.34);
  --ag-header-background-color: rgba(255, 255, 255, 0.075);
  --ag-odd-row-background-color: rgba(255, 255, 255, 0.028);
  --ag-row-hover-color: rgba(255, 255, 255, 0.085);
  --ag-border-color: rgba(255, 255, 255, 0.075);
  --ag-header-foreground-color: rgba(255,255,255,.92);
  --ag-foreground-color: rgba(255,255,255,.88);

  --ag-font-family: inherit;
  --ag-font-size: 12px;
  --ag-row-border-color: rgba(255,255,255,.055);
  --ag-secondary-border-color: rgba(255,255,255,.08);
  --ag-selected-row-background-color: rgba(255,255,255,.08);

  position: relative;
  z-index: 1;

  width: 100%;
  min-width: 0;

  margin-top: 14px;

  border-radius: 16px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,.085);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 16px 34px rgba(0,0,0,.16);
}

#datos-page .datos-team-players-grid .ag-root-wrapper {
  border-radius: 16px;
  overflow: hidden;
  border: none !important;
  background: rgba(255,255,255,.025);
}

#datos-page .datos-team-players-grid .ag-root,
#datos-page .datos-team-players-grid .ag-root-wrapper,
#datos-page .datos-team-players-grid .ag-body,
#datos-page .datos-team-players-grid .ag-body-viewport,
#datos-page .datos-team-players-grid .ag-center-cols-viewport,
#datos-page .datos-team-players-grid .ag-center-cols-clipper {
  min-width: 0;
}


/* =========================================================
   AG GRID · FIX SCROLL HORIZONTAL HEADER/BODY
   ========================================================= */

#datos-page .datos-team-players-grid .ag-center-cols-viewport,
#datos-page .datos-team-players-grid .ag-center-cols-clipper {
  overflow-x: hidden !important;
}

#datos-page .datos-team-players-grid .ag-body-viewport,
#datos-page .datos-team-players-grid .ag-header-viewport {
  overflow-x: hidden !important;
}

#datos-page .datos-team-players-grid .ag-body-horizontal-scroll {
  overflow-x: auto;
  background: rgba(0,0,0,.10);
}

#datos-page .datos-team-players-grid .ag-body-horizontal-scroll-viewport {
  overflow-x: auto !important;
}


/* =========================================================
   AG GRID · HEADERS
   ========================================================= */

#datos-page .datos-team-players-grid .ag-header {
  border-bottom: 1px solid rgba(255,255,255,.10);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.085) 0%,
      rgba(255,255,255,.045) 100%
    );
}

#datos-page .datos-team-players-grid .ag-header-cell,
#datos-page .datos-team-players-grid .ag-header-group-cell {
  font-weight: 850;
  letter-spacing: .2px;
  border-right: 1px solid rgba(255,255,255,.05);
}

#datos-page .datos-team-players-grid .ag-header-cell {
  font-size: 11px;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
}

#datos-page .datos-team-players-grid .ag-header-cell-label,
#datos-page .datos-team-players-grid .ag-header-group-cell-label {
  justify-content: center;
}

#datos-page .datos-team-players-grid .datos-player-group-header {
  color: rgba(255,255,255,.92);
}

#datos-page .datos-team-players-grid .datos-player-header-fixed {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.10) 0%,
      rgba(255,255,255,.045) 100%
    );
}


/* =========================================================
   AG GRID · HEADERS AGRUPADOS
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-group-main {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.10) 0%,
      rgba(255,255,255,.045) 100%
    );
  border-left: 1px solid rgba(255,255,255,.08);
}

#datos-page .datos-team-players-grid .datos-player-group-profile {
  background:
    linear-gradient(
      180deg,
      rgba(59,130,246,.16) 0%,
      rgba(59,130,246,.055) 100%
    );
  border-left: 1px solid rgba(59,130,246,.22);
}

#datos-page .datos-team-players-grid .datos-player-group-participation {
  background:
    linear-gradient(
      180deg,
      rgba(34,197,94,.16) 0%,
      rgba(34,197,94,.055) 100%
    );
  border-left: 1px solid rgba(34,197,94,.22);
}

#datos-page .datos-team-players-grid .datos-player-group-attack {
  background:
    linear-gradient(
      180deg,
      rgba(34,197,94,.16) 0%,
      rgba(34,197,94,.055) 100%
    );
  border-left: 1px solid rgba(34,197,94,.22);
}

#datos-page .datos-team-players-grid .datos-player-group-discipline {
  background:
    linear-gradient(
      180deg,
      rgba(239,68,68,.145) 0%,
      rgba(239,68,68,.045) 100%
    );
  border-left: 1px solid rgba(239,68,68,.20);
}

#datos-page .datos-team-players-grid .datos-player-group-extra {
  background:
    linear-gradient(
      180deg,
      rgba(168,85,247,.14) 0%,
      rgba(168,85,247,.045) 100%
    );
  border-left: 1px solid rgba(168,85,247,.18);
}

#datos-page .datos-team-players-grid .datos-player-group-code {
  background:
    linear-gradient(
      180deg,
      rgba(148,163,184,.13) 0%,
      rgba(148,163,184,.040) 100%
    );
  border-left: 1px solid rgba(148,163,184,.16);
}


/* =========================================================
   AG GRID · CELDAS BASE
   ========================================================= */

#datos-page .datos-team-players-grid .ag-row {
  cursor: default;

  border-bottom: 1px solid rgba(255,255,255,.045);

  transition:
    background 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

#datos-page .datos-team-players-grid .ag-cell {
  display: flex;
  align-items: center;

  line-height: 1.2;

  color: rgba(255,255,255,.88);

  border-right: 1px solid rgba(255,255,255,.035);
}

#datos-page .datos-team-players-grid .ag-cell-value {
  width: 100%;
}

#datos-page .datos-team-players-grid .ag-row-hover .ag-cell {
  background-color: rgba(255,255,255,.075) !important;
  color: white;
}

#datos-page .datos-team-players-grid .ag-row.ag-row-selected .ag-cell {
  background: color-mix(
    in srgb,
    var(--datos-player-accent, var(--datos-team-accent, rgba(255,255,255,.35))) 22%,
    rgba(255,255,255,0.06)
  ) !important;
}


/* =========================================================
   COLUMNA FIJA · JUGADOR
   ========================================================= */

#datos-page .datos-team-players-grid .ag-pinned-left-header,
#datos-page .datos-team-players-grid .ag-pinned-left-cols-container {
  box-shadow: 10px 0 18px rgba(0,0,0,.16);
  border-right: 1px solid rgba(255,255,255,.10);
}

#datos-page .datos-team-players-grid .ag-pinned-left-cols-container .ag-cell {
  background:
    linear-gradient(
      90deg,
      rgba(12,16,25,.90) 0%,
      rgba(12,16,25,.76) 100%
    );
}

#datos-page .datos-team-players-grid .ag-row-hover .ag-pinned-left-cols-container .ag-cell {
  background: rgba(255,255,255,.075) !important;
}

#datos-page .datos-team-players-grid .datos-player-name-cell {
  justify-content: flex-start !important;

  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .15px;

  color: rgba(255,255,255,.96);
}

#datos-page .datos-team-players-grid .datos-player-name-cell .ag-cell-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   JUGADORES · IMAGEN / INICIALES
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-image-cell {
  justify-content: center !important;
  padding: 0 !important;
}

#datos-page .datos-player-img-renderer {
  width: 48px;
  height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255,255,255,.18),
      rgba(255,255,255,.055)
    );

  border: 1px solid rgba(255,255,255,.16);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 6px 16px rgba(0,0,0,.20);
}

#datos-page .datos-player-img-renderer__img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center top;

  border-radius: inherit;
}

#datos-page .datos-player-img-renderer__fallback {
  width: 100%;
  height: 100%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: inherit;

  color: white;

  font-size: 13px;
  font-weight: 950;
  letter-spacing: .25px;

  background:
    radial-gradient(
      circle at 30% 20%,
      color-mix(
        in srgb,
        var(--datos-player-accent, var(--datos-team-accent, rgba(255,255,255,.35))) 36%,
        rgba(255,255,255,.12)
      ),
      rgba(255,255,255,.055)
    );
}


/* =========================================================
   PERFIL · EDAD / AÑO / DORSAL / POSICIÓN
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-age-cell,
#datos-page .datos-team-players-grid .datos-player-year-cell,
#datos-page .datos-team-players-grid .datos-player-dorsal-cell,
#datos-page .datos-team-players-grid .datos-player-position-cell {
  justify-content: center !important;

  font-size: 12px;
  font-weight: 850;

  color: rgba(219,234,254,.96);
}

#datos-page .datos-team-players-grid .datos-player-dorsal-cell .ag-cell-value {
  width: auto;

  min-width: 30px;
  height: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 950;

  color: rgba(255,255,255,.94);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255,255,255,.18),
      rgba(255,255,255,.060)
    );

  border: 1px solid rgba(255,255,255,.16);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 5px 12px rgba(0,0,0,.16);
}

#datos-page .datos-team-players-grid .datos-player-position-cell {
  color: rgba(191,219,254,.98);
}


/* =========================================================
   JUGADORES · NACIONALIDAD / BANDERA
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-flag-cell {
  justify-content: center !important;
  padding: 0 !important;
}

#datos-page .datos-team-players-grid .datos-player-flag-cell .ag-cell-value {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

#datos-page .datos-team-players-grid .datos-player-flag-cell img,
#datos-page .datos-team-players-grid .datos-player-flag-cell .ag-cell-value img {
  width: 28px;
  height: 28px;

  object-fit: cover;

  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.18);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 5px 12px rgba(0,0,0,.16);
}

#datos-page .datos-team-players-grid .datos-player-nationality-cell {
  display: none !important;
}


/* =========================================================
   PARTICIPACIÓN · PJ / TIT / SUP / MINUTOS
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-played-cell,
#datos-page .datos-team-players-grid .datos-player-starts-cell,
#datos-page .datos-team-players-grid .datos-player-sub-cell,
#datos-page .datos-team-players-grid .datos-player-callups-cell,
#datos-page .datos-team-players-grid .datos-player-minutes-cell,
#datos-page .datos-team-players-grid .datos-player-avg-minutes-cell {
  justify-content: center !important;

  font-size: 12px;
  font-weight: 850;

  color: rgba(220,252,231,.96);
}

#datos-page .datos-team-players-grid .datos-player-main-number-cell {
  font-weight: 950 !important;
  color: rgba(187,247,208,1) !important;
}

#datos-page .datos-team-players-grid .datos-player-minutes-cell {
  color: rgba(134,239,172,1) !important;
}


/* =========================================================
   ATAQUE · GOLES / ASISTENCIAS
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-goals-cell,
#datos-page .datos-team-players-grid .datos-player-goals-total-cell,
#datos-page .datos-team-players-grid .datos-player-assists-cell,
#datos-page .datos-team-players-grid .datos-player-goals-avg-cell {
  justify-content: center !important;

  font-size: 12px;
  font-weight: 900;
}

#datos-page .datos-team-players-grid .datos-player-goals-cell,
#datos-page .datos-team-players-grid .datos-player-goals-total-cell,
#datos-page .datos-team-players-grid .datos-player-goals-avg-cell {
  color: rgba(187,247,208,1);
}

#datos-page .datos-team-players-grid .datos-player-assists-cell {
  color: rgba(191,219,254,1);
}

#datos-page .datos-team-players-grid .datos-player-pill-cell .ag-cell-value {
  width: auto;

  min-width: 38px;
  min-height: 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 9px;

  border-radius: 999px;

  color: white;

  font-size: 12px;
  font-weight: 950;
  line-height: 1;

  border: 1px solid rgba(255,255,255,.18);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255,255,255,.20),
      rgba(255,255,255,.060)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 5px 14px rgba(0,0,0,.18);
}

#datos-page .datos-team-players-grid .datos-player-goals-cell .ag-cell-value,
#datos-page .datos-team-players-grid .datos-player-goals-total-cell .ag-cell-value,
#datos-page .datos-team-players-grid .datos-player-goals-avg-cell .ag-cell-value {
  color: rgba(187,247,208,1);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(34,197,94,.34),
      rgba(34,197,94,.12)
    );

  border-color: rgba(74,222,128,.36);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 5px 14px rgba(0,0,0,.18),
    0 0 12px rgba(34,197,94,.10);
}

#datos-page .datos-team-players-grid .datos-player-assists-cell .ag-cell-value {
  color: rgba(191,219,254,1);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(59,130,246,.28),
      rgba(59,130,246,.10)
    );

  border-color: rgba(96,165,250,.30);
}


/* =========================================================
   DISCIPLINA · TARJETAS
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-yellow-cell,
#datos-page .datos-team-players-grid .datos-player-red-cell,
#datos-page .datos-team-players-grid .datos-player-double-yellow-cell,
#datos-page .datos-team-players-grid .datos-player-cards-total-cell {
  justify-content: center !important;

  font-size: 12px;
  font-weight: 900;
}

#datos-page .datos-team-players-grid .datos-player-yellow-cell {
  color: rgba(254,240,138,1) !important;
}

#datos-page .datos-team-players-grid .datos-player-red-cell {
  color: rgba(252,165,165,1) !important;
}

#datos-page .datos-team-players-grid .datos-player-double-yellow-cell {
  color: rgba(253,186,116,1) !important;
}

#datos-page .datos-team-players-grid .datos-player-card-cell .ag-cell-value {
  width: auto;

  min-width: 32px;
  min-height: 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 8px;

  border-radius: 8px;

  font-size: 12px;
  font-weight: 950;
  line-height: 1;

  background: rgba(255,255,255,.060);
  border: 1px solid rgba(255,255,255,.12);
}

#datos-page .datos-team-players-grid .datos-player-yellow-cell .ag-cell-value {
  background: rgba(250,204,21,.14);
  border-color: rgba(250,204,21,.28);
}

#datos-page .datos-team-players-grid .datos-player-red-cell .ag-cell-value {
  background: rgba(239,68,68,.16);
  border-color: rgba(248,113,113,.30);
}

#datos-page .datos-team-players-grid .datos-player-double-yellow-cell .ag-cell-value {
  background: rgba(249,115,22,.16);
  border-color: rgba(251,146,60,.30);
}


/* =========================================================
   EXTRA · RATING / VALOR / ALTURA / EQUIPO
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-rating-cell,
#datos-page .datos-team-players-grid .datos-player-value-cell,
#datos-page .datos-team-players-grid .datos-player-height-cell,
#datos-page .datos-team-players-grid .datos-player-temp-cell,
#datos-page .datos-team-players-grid .datos-player-played-total-cell,
#datos-page .datos-team-players-grid .datos-player-team-pos-cell,
#datos-page .datos-team-players-grid .datos-player-team-points-cell {
  justify-content: center !important;

  font-size: 12px;
  font-weight: 850;

  color: rgba(233,213,255,.96);
}

#datos-page .datos-team-players-grid .datos-player-rating-cell .ag-cell-value {
  color: rgba(216,180,254,1);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(168,85,247,.30),
      rgba(168,85,247,.10)
    );

  border-color: rgba(192,132,252,.30);
}

#datos-page .datos-team-players-grid .datos-player-value-cell .ag-cell-value {
  color: rgba(187,247,208,1);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(34,197,94,.26),
      rgba(34,197,94,.10)
    );

  border-color: rgba(74,222,128,.28);
}


/* =========================================================
   FICHA / CÓDIGOS
   ========================================================= */

#datos-page .datos-team-players-grid .datos-player-code-cell {
  justify-content: center !important;

  color: rgba(255,255,255,.56);

  font-size: 11px;
  font-weight: 750;
}

#datos-page .datos-team-players-grid .datos-player-link-cell {
  justify-content: center !important;

  color: rgba(216,180,254,.88);

  font-size: 11px;
  font-weight: 700;

  padding-left: 8px !important;
  padding-right: 8px !important;
}

#datos-page .datos-team-players-grid .datos-player-link-cell .ag-cell-value {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#datos-page .datos-player-ficha-btn {
  appearance: none;
  -webkit-appearance: none;

  border: 1px solid rgba(216, 180, 254, 0.34);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(216, 180, 254, 0.22),
      rgba(168, 85, 247, 0.10)
    );

  color: rgba(243, 232, 255, 0.96);

  min-width: 82px;
  height: 28px;
  padding: 0 10px;

  border-radius: 999px;

  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;

  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 5px 12px rgba(0,0,0,.16);

  transition:
    transform .14s ease,
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}

#datos-page .datos-player-ficha-btn:hover {
  transform: translateY(-1px);

  border-color: rgba(216, 180, 254, 0.58);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(216, 180, 254, 0.30),
      rgba(168, 85, 247, 0.16)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 7px 16px rgba(0,0,0,.22),
    0 0 14px rgba(168,85,247,.12);
}

#datos-page .datos-player-ficha-btn:active {
  transform: translateY(0);
}

#datos-page .datos-player-ficha-empty {
  color: rgba(255,255,255,.36);
  font-size: 12px;
  font-weight: 800;
}


/* =========================================================
   FILAS DESTACADAS
   ========================================================= */

#datos-page .datos-team-players-grid .ag-row.datos-player-row-goals .ag-cell {
  background:
    linear-gradient(
      90deg,
      rgba(34,197,94,.045) 0%,
      rgba(34,197,94,.018) 42%,
      rgba(255,255,255,.010) 100%
    );
}

#datos-page .datos-team-players-grid .ag-row.datos-player-row-minutes .ag-cell {
  background:
    linear-gradient(
      90deg,
      rgba(34,197,94,.034) 0%,
      rgba(34,197,94,.014) 42%,
      rgba(255,255,255,.010) 100%
    );
}

#datos-page .datos-team-players-grid .ag-row.datos-player-row-cards .ag-cell {
  background:
    linear-gradient(
      90deg,
      rgba(239,68,68,.030) 0%,
      rgba(239,68,68,.012) 42%,
      rgba(255,255,255,.010) 100%
    );
}

#datos-page .datos-team-players-grid .ag-row-hover .datos-player-name-cell {
  color: white !important;
}

#datos-page .datos-team-players-grid .ag-row-hover .datos-player-pill-cell .ag-cell-value {
  border-color: rgba(255,255,255,.32);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 6px 16px rgba(0,0,0,.22),
    0 0 16px rgba(255,255,255,.05);
}

#datos-page .datos-team-players-grid .ag-row-hover .datos-player-goals-cell .ag-cell-value,
#datos-page .datos-team-players-grid .ag-row-hover .datos-player-goals-total-cell .ag-cell-value,
#datos-page .datos-team-players-grid .ag-row-hover .datos-player-goals-avg-cell .ag-cell-value {
  border-color: rgba(134,239,172,.54);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 6px 16px rgba(0,0,0,.22),
    0 0 16px rgba(34,197,94,.14);
}


/* =========================================================
   PAGINACIÓN
   ========================================================= */

#datos-page .datos-team-players-grid .ag-paging-panel {
  min-height: 44px;

  border-top: 1px solid rgba(255,255,255,.08);

  background: rgba(255,255,255,.030);

  color: rgba(255,255,255,.72);

  font-size: 11px;
  font-weight: 700;
}

#datos-page .datos-team-players-grid .ag-paging-button {
  color: rgba(255,255,255,.78);
  opacity: .86;
}

#datos-page .datos-team-players-grid .ag-paging-button:hover {
  color: white;
  opacity: 1;
}


/* =========================================================
   ICONOS / SCROLLBARS
   ========================================================= */

#datos-page .datos-team-players-grid .ag-icon,
#datos-page .datos-team-players-grid .ag-header-icon {
  opacity: .72;
}

#datos-page .datos-team-players-grid .ag-body-vertical-scroll {
  background: rgba(0,0,0,.10);
}

#datos-page .datos-team-players-grid ::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

#datos-page .datos-team-players-grid ::-webkit-scrollbar-track {
  background: rgba(255,255,255,.025);
}

#datos-page .datos-team-players-grid ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.16);
  border-radius: 999px;
}

#datos-page .datos-team-players-grid ::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.24);
}


/* =========================================================
   DATOS · INFO DEL EQUIPO
   ========================================================= */

#datos-page .datos-team-info-panel > div {
  position: sticky;
  top: 86px;
  overflow: hidden;

  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#datos-page .datos-team-info-panel > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.26),
      transparent
    );

  pointer-events: none;
}

#datos-page .datos-team-info-panel strong {
  color: rgba(255, 255, 255, 0.94);
}

#datos-page .datos-team-info-panel span {
  color: rgba(255, 255, 255, 0.72);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  #datos-page .datos-team-body-grid {
    grid-template-columns: 1fr;
  }

  #datos-page .datos-team-info-panel > div {
    position: relative;
    top: auto;
  }
}

@media (max-width: 900px) {
  #datos-page .datos-team-players-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #datos-page .datos-team-players-meta-pills {
    justify-content: flex-start;
  }

  #datos-page .datos-team-players-subtitle {
    max-width: 100%;
  }

  #datos-page .datos-team-players-grid {
    --ag-font-size: 11px;
    margin-top: 12px;
  }

  #datos-page .datos-team-players-grid .datos-player-pill-cell .ag-cell-value {
    min-width: 34px;
    padding: 5px 8px;
    font-size: 11px;
  }

  #datos-page .datos-team-players-grid .datos-player-name-cell {
    font-size: 12px;
  }

  #datos-page .datos-player-img-renderer {
    width: 44px;
    height: 44px;
  }

  #datos-page .datos-player-img-renderer__fallback {
    font-size: 12px;
  }

  #datos-page .datos-player-ficha-btn {
    min-width: 74px;
    height: 27px;
    font-size: 10px;
    padding: 0 8px;
  }
}

@media (max-width: 760px) {
  #datos-page .datos-team-body-grid {
    gap: 12px;
  }

  #datos-page .datos-team-players-grid {
    --ag-font-size: 11px;
    border-radius: 14px;
  }

  #datos-page .datos-team-players-grid .ag-root-wrapper {
    border-radius: 14px;
  }

  #datos-page .datos-team-players-grid .ag-header-cell {
    font-size: 10px;
  }

  #datos-page .datos-team-players-grid .datos-player-name-cell {
    font-size: 12px;
  }

  #datos-page .datos-player-img-renderer {
    width: 40px;
    height: 40px;
  }

  #datos-page .datos-player-img-renderer__fallback {
    font-size: 11px;
  }

  #datos-page .datos-team-players-grid .datos-player-flag-cell img,
  #datos-page .datos-team-players-grid .datos-player-flag-cell .ag-cell-value img {
    width: 24px;
    height: 24px;
  }
}




#datos-page .datos-team-players-grid,
#datos-page .datos-team-players-grid .ag-root-wrapper,
#datos-page .datos-team-players-grid .ag-root {
  width: 100% !important;
}
















/* =========================================================
   DATOS · TEAM DETAIL · CONTENIDO EMBEBIDO SIN CARD INTERNA
   ========================================================= */

/* Cuando jugadores/partidos van dentro del bloque unido,
   quitamos la card interna para que parezca un único contenedor. */

#datos-page .datos-team-content-body .datos-team-players-card,
#datos-page .datos-team-content-body .datos-team-players-panel > div {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  padding: 0 !important;
  margin: 0 !important;

  border-radius: 0 !important;
}

/* Quitamos la línea decorativa superior que aparece cerca de "Jugadores" */
#datos-page .datos-team-content-body .datos-team-players-card::before,
#datos-page .datos-team-content-body .datos-team-players-panel > div::before {
  display: none !important;
  content: none !important;
}

/* Quitamos también el brillo/radial interno de esa card */
#datos-page .datos-team-content-body .datos-team-players-card::after,
#datos-page .datos-team-content-body .datos-team-players-panel > div::after {
  display: none !important;
  content: none !important;
}

/* Dejamos el header de jugadores limpio dentro del bloque */
#datos-page .datos-team-content-body .datos-team-players-header {
  margin-bottom: 12px;
  padding: 0;
}

/* El grid sí mantiene su propia caja, pero ya no parece una card doble */
#datos-page .datos-team-content-body .datos-team-players-grid {
  margin-top: 12px;
}

#datos-page .datos-team-players-grid .datos-player-captain-cell {
  justify-content: center !important;
  color: rgba(254,240,138,1) !important;
  font-size: 12px;
  font-weight: 950;
}

#datos-page .datos-team-players-grid .datos-player-captain-cell .ag-cell-value {
  color: rgba(254,240,138,1);
  background:
    radial-gradient(circle at 30% 20%, rgba(250,204,21,.30), rgba(250,204,21,.10));
  border-color: rgba(250,204,21,.34);
}

#datos-page .datos-team-players-grid .datos-player-sanction-cell {
  justify-content: center !important;
  color: rgba(253,186,116,1) !important;
  font-size: 12px;
  font-weight: 950;
}

#datos-page .datos-team-players-grid .datos-player-sanction-cell .ag-cell-value {
  min-width: 54px;
  color: rgba(255,237,213,1);
  background:
    radial-gradient(circle at 30% 20%, rgba(249,115,22,.34), rgba(127,29,29,.20));
  border-color: rgba(251,146,60,.40);
}

#datos-page .datos-team-players-grid .datos-player-sanction-count-cell {
  justify-content: center !important;
  color: rgba(253,186,116,1) !important;
  font-size: 12px;
  font-weight: 900;
}

#datos-page .datos-team-players-grid .datos-player-sanction-reason-cell {
  color: rgba(255,237,213,.94) !important;
  font-size: 11px;
  font-weight: 850;
}

#datos-page .datos-team-players-grid .datos-player-discipline-state-cell .ag-cell-value {
  min-width: 46px;
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(226,232,240,.78);
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.13);
}

#datos-page .datos-team-players-grid .datos-player-state-risk .ag-cell-value {
  color: rgba(254,240,138,1);
  background:
    radial-gradient(circle at 28% 18%, rgba(250,204,21,.32), rgba(113,63,18,.22));
  border-color: rgba(250,204,21,.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 13px rgba(250,204,21,.13);
}

#datos-page .datos-team-players-grid .datos-player-state-sanction .ag-cell-value {
  color: rgba(255,237,213,1);
  background:
    radial-gradient(circle at 28% 18%, rgba(251,146,60,.36), rgba(127,29,29,.34));
  border-color: rgba(251,146,60,.54);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 15px rgba(249,115,22,.18);
}

#datos-page .datos-team-players-grid .datos-player-state-doubt .ag-cell-value {
  color: rgba(226,232,240,.96);
  background:
    radial-gradient(circle at 28% 18%, rgba(148,163,184,.24), rgba(51,65,85,.20));
  border-color: rgba(203,213,225,.24);
}
