/* JUGADORES — pantalla observacional del formato actual */
.players-page{
  min-height:calc(100vh - 60px);
  background:#06111b;
  color:#eef3f7;
}

.players-shell{
  padding:10px 10px 12px;
}

.players-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:54px;
  margin-bottom:8px;
}

.players-kicker{
  display:block;
  margin-bottom:4px;
  color:#7f94a7;
  font-size:11px;
  font-weight:700;
}

.players-heading-line{
  display:flex;
  align-items:baseline;
  gap:14px;
}

.players-heading h1{
  margin:0;
  font-size:26px;
  line-height:1;
  letter-spacing:.025em;
}

.players-heading-line>span{
  color:#91a2b2;
  font-size:12px;
}

.players-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:8px;
  border:1px solid #263b50;
  border-radius:9px;
  background:#0b1927;
  overflow:hidden;
}

.players-summary>div{
  min-height:66px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  padding:9px 14px;
  border-right:1px solid #ffffff10;
}

.players-summary>div:last-child{border-right:0}

.players-summary span{
  color:#899caf;
  font-size:11px;
  font-weight:800;
}

.players-summary strong{
  color:#f2f6f9;
  font-size:22px;
  line-height:1;
}

.players-filters{
  display:grid;
  grid-template-columns:minmax(250px,1.4fr) minmax(220px,1fr) 150px 170px auto;
  align-items:end;
  gap:8px;
  margin-bottom:8px;
}

.players-filters label{
  min-width:0;
}

.players-filters label>span{
  display:block;
  margin-bottom:4px;
  color:#95a6b6;
  font-size:10.5px;
  font-weight:700;
}

.players-filters input,
.players-filters select{
  width:100%;
  height:35px;
  padding:0 10px;
  border:1px solid #35506a;
  border-radius:7px;
  background:#081623;
  color:#eaf0f5;
  font-size:12px;
}

.players-filter-actions{
  display:flex;
  align-items:center;
  gap:7px;
}

.players-filter-actions a,
.players-filter-actions button{
  height:35px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border-radius:7px;
  font-size:10.5px;
  font-weight:800;
  text-decoration:none;
}

.players-filter-actions a{
  color:#9bacba;
}

.players-filter-actions button{
  border:1px solid #7a4397;
  background:#251631;
  color:#e19cff;
  cursor:pointer;
}

.players-results{
  overflow:hidden;
  border:1px solid #2a4055;
  border-radius:9px;
  background:#091724;
}

.players-results-head{
  height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  border-bottom:1px solid #ffffff10;
}

.players-results-head>div{
  display:flex;
  align-items:baseline;
  gap:10px;
}

.players-results-head h2{
  margin:0;
  font-size:15px;
  letter-spacing:.025em;
}

.players-results-head span{
  color:#8fa0b0;
  font-size:11px;
}

.players-table{
  width:100%;
}

.players-table-head,
.player-row{
  display:grid;
  grid-template-columns:minmax(190px,1.3fr) 105px 100px 76px 100px 68px 68px minmax(170px,1.05fr) 84px 108px;
  align-items:center;
  column-gap:8px;
  padding:0 12px;
}

.players-table-head{
  height:34px;
  border-bottom:1px solid #ffffff10;
  background:#07131f;
  color:#8ca0b4;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}

.player-row{
  min-height:44px;
  border-bottom:1px solid rgba(255,255,255,.07);
  font-size:12.5px;
}

.player-row:last-child{
  border-bottom:0;
}

.player-row:hover{
  background:#102235;
}

.player-name,
.player-archetype{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.player-name strong,
.player-archetype strong{
  overflow:hidden;
  color:#f2f6f9;
  font-size:13px;
  line-height:1.15;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.player-name small,
.player-archetype small{
  color:#8195a7;
  font-size:10.5px;
  line-height:1.1;
}

.player-performance{
  color:#41d994;
  font-size:14px;
}

.player-wr{
  color:#dfe8ef;
  font-size:13px;
}

.player-record{
  color:#eaf0f5;
  font-size:12.5px;
}

.player-number,
.player-position{
  color:#dfe8ef;
  font-size:13px;
}

.player-row time{
  color:#a5b4c0;
  font-size:11.5px;
}

.players-pagination{
  height:34px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  padding:0 12px;
  border-top:1px solid #ffffff10;
  background:#07131f;
}

.players-pagination a{
  color:#c991ea;
  font-size:10.5px;
  font-weight:800;
  text-decoration:none;
}

.players-pagination a:last-child{
  justify-self:end;
}

.players-pagination strong{
  color:#9eafbd;
  font-size:11px;
}

.players-empty{
  min-height:220px;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:10px;
  color:#a4b2be;
}

.players-empty strong{
  font-size:14px;
}

.players-empty a{
  color:#d68cf0;
  font-size:12px;
}

@media(max-width:1180px){
  .players-filters{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .players-filter-actions{
    grid-column:1/-1;
  }
  .players-results{
    overflow-x:auto;
  }
  .players-table,
  .players-results-head,
  .players-pagination{
    min-width:1040px;
  }
}

@media(max-width:720px){
  .players-shell{
    padding-inline:8px;
  }
  .players-heading-line{
    display:block;
  }
  .players-heading-line>span{
    display:block;
    margin-top:5px;
  }
  .players-summary{
    grid-template-columns:repeat(2,1fr);
  }
  .players-summary>div:nth-child(2){
    border-right:0;
  }
  .players-summary>div:nth-child(-n+2){
    border-bottom:1px solid #ffffff10;
  }
  .players-filters{
    grid-template-columns:1fr;
  }
  .players-filter-actions{
    grid-column:auto;
  }
}


/* JUGADORES V2 — encabezados de ranking clickeables */
.players-sort-head{
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#8ca0b4;
  font:inherit;
  font-weight:800;
  text-decoration:none;
  text-transform:uppercase;
  white-space:nowrap;
}

.players-sort-head:hover{
  color:#d9e5ee;
}

.players-sort-head.is-active{
  color:#d995f3;
}

.players-sort-head b{
  color:#d995f3;
  font-size:13px;
  line-height:1;
}


/* JUGADORES V3 — ranking oficial Deckero C10 */
.player-official{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.player-official strong{
  color:#d995f3;
  font-size:14px;
  line-height:1.05;
}

.player-official small{
  color:#93a5b5;
  font-size:11px;
  line-height:1.1;
}

.players-ranking-warning{
  padding:8px 12px;
  border-bottom:1px solid #61426f;
  background:#1a1220;
  color:#d7b6e4;
  font-size:11.5px;
  font-weight:700;
}


/* JUGADORES V4 — una pantalla completa, sin scroll vertical en desktop */
@media(min-width:1181px){
  .players-shell{
    padding:5px 10px 4px !important;
  }

  .players-heading{
    min-height:38px !important;
    height:38px !important;
    margin-bottom:5px !important;
  }

  .players-kicker{
    margin-bottom:2px !important;
    font-size:10.5px !important;
    line-height:1 !important;
  }

  .players-heading-line{
    gap:12px !important;
    align-items:center !important;
  }

  .players-heading h1{
    font-size:23px !important;
  }

  .players-heading-line>span{
    font-size:11px !important;
  }

  .players-summary{
    margin-bottom:5px !important;
  }

  .players-summary>div{
    min-height:48px !important;
    padding:6px 14px !important;
    gap:3px !important;
  }

  .players-summary span{
    font-size:10.5px !important;
  }

  .players-summary strong{
    font-size:20px !important;
  }

  .players-filters{
    gap:7px !important;
    margin-bottom:5px !important;
  }

  .players-filters label>span{
    margin-bottom:2px !important;
    font-size:10.5px !important;
    line-height:1 !important;
  }

  .players-filters input,
  .players-filters select{
    height:31px !important;
    font-size:11.5px !important;
  }

  .players-filter-actions a,
  .players-filter-actions button{
    height:31px !important;
    padding:0 11px !important;
    font-size:10.5px !important;
  }

  .players-results-head{
    height:38px !important;
  }

  .players-table-head{
    height:32px !important;
  }

  .player-row{
    min-height:40px !important;
  }

  .players-pagination{
    height:30px !important;
  }
}


/* JUGADORES V5 — menos bulto arriba, sin perder legibilidad */
@media(min-width:1181px){
  .players-shell{
    padding-top:4px !important;
  }

  .players-heading{
    min-height:34px !important;
    height:34px !important;
    margin-bottom:4px !important;
  }

  .players-heading h1{
    font-size:22px !important;
  }

  .players-summary{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    margin-bottom:5px !important;
  }

  .players-summary>div{
    min-height:42px !important;
    padding:5px 14px !important;
    gap:2px !important;
  }

  .players-summary span{
    font-size:10px !important;
  }

  .players-summary strong{
    font-size:19px !important;
  }

  .players-filters{
    align-items:center !important;
    margin-bottom:5px !important;
  }

  .players-filters input,
  .players-filters select,
  .players-filter-actions a,
  .players-filter-actions button{
    height:31px !important;
  }

  .players-results{
    margin-top:0 !important;
  }

  .players-results-head{
    display:none !important;
  }

  .players-table-head{
    height:31px !important;
  }

  .player-row{
    min-height:40px !important;
  }

  .players-pagination{
    height:29px !important;
  }
}


/* JUGADORES V6 — dashboard de una sola pantalla: sin footer visible */
@media(min-width:1181px){
  .players-page{
    min-height:calc(100vh - 60px) !important;
    height:calc(100vh - 60px) !important;
    overflow:hidden !important;
  }

  .players-page + .site-footer{
    display:none !important;
  }

  .players-shell{
    height:100% !important;
    padding-bottom:6px !important;
  }

  .players-results{
    margin-bottom:0 !important;
  }
}


/* JUGADORES V7 — nueve filas completas sin tocar el borde inferior */
@media(min-width:1181px){
  .player-row{
    min-height:39px !important;
    height:39px !important;
  }

  .players-pagination{
    height:28px !important;
  }

  .players-shell{
    padding-bottom:8px !important;
  }
}


/* JUGADORES V8 — top 10 sin scroll; ranking completo con scroll */
@media(min-width:1181px){
  .players-results:not(.is-expanded) .player-row{
    min-height:36px !important;
    height:36px !important;
  }

  .players-results:not(.is-expanded) .players-table-scroll{
    overflow:visible !important;
    max-height:none !important;
  }

  .players-results.is-expanded{
    height:calc(100vh - 224px) !important;
    display:flex;
    flex-direction:column;
    overflow:hidden !important;
  }

  .players-results.is-expanded .players-table-scroll{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-gutter:stable;
  }

  .players-results.is-expanded .players-table-head{
    position:sticky;
    top:0;
    z-index:3;
  }

  .players-results.is-expanded .player-row{
    min-height:39px !important;
    height:39px !important;
  }

  .players-ranking-toggle{
    flex:0 0 28px;
    height:28px !important;
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    padding:0 12px !important;
  }

  .players-ranking-toggle span{
    color:#9eafbd;
    font-size:11px;
    font-weight:800;
  }

  .players-ranking-toggle a{
    justify-self:auto !important;
    color:#d995f3;
    font-size:10.5px;
    font-weight:800;
    text-decoration:none;
  }
}


/* JUGADORES V9 — top 10 completo con el botón visible dentro del viewport */
@media(min-width:1181px){
  .players-heading{
    min-height:31px !important;
    height:31px !important;
    margin-bottom:3px !important;
  }

  .players-summary{
    margin-bottom:4px !important;
  }

  .players-summary>div{
    min-height:39px !important;
    padding:4px 14px !important;
  }

  .players-filters{
    margin-bottom:4px !important;
  }

  .players-filters input,
  .players-filters select,
  .players-filter-actions a,
  .players-filter-actions button{
    height:29px !important;
  }

  .players-results:not(.is-expanded) .players-table-head{
    height:29px !important;
  }

  .players-results:not(.is-expanded) .player-row{
    min-height:34px !important;
    height:34px !important;
  }

  .players-results:not(.is-expanded) .players-ranking-toggle{
    height:27px !important;
    flex-basis:27px !important;
  }

  .players-shell{
    padding-bottom:5px !important;
  }
}


/* JUGADORES V10 — top 10 con cierre inferior completamente visible */
@media(min-width:1181px){
  .players-page{
    height:calc(100dvh - 54px) !important;
    min-height:0 !important;
  }

  .players-shell{
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
    padding-top:3px !important;
    padding-bottom:7px !important;
  }

  .players-heading{
    flex:0 0 29px !important;
    min-height:29px !important;
    height:29px !important;
    margin-bottom:3px !important;
  }

  .players-summary{
    flex:0 0 47px !important;
    margin-bottom:4px !important;
  }

  .players-summary>div{
    min-height:47px !important;
  }

  .players-filters{
    flex:0 0 29px !important;
    margin-bottom:4px !important;
  }

  .players-results:not(.is-expanded){
    flex:0 0 auto !important;
    height:auto !important;
  }

  .players-results:not(.is-expanded) .players-table-head{
    height:27px !important;
    min-height:27px !important;
  }

  .players-results:not(.is-expanded) .player-row{
    min-height:32px !important;
    height:32px !important;
  }

  .players-results:not(.is-expanded) .players-ranking-toggle{
    height:27px !important;
    min-height:27px !important;
    flex-basis:27px !important;
  }
}


/* JUGADORES V11 — top 12 completo sin scroll */
@media(min-width:1181px){
  .players-results:not(.is-expanded) .player-row{
    min-height:31px !important;
    height:31px !important;
  }

  .players-results:not(.is-expanded) .players-ranking-toggle{
    height:26px !important;
    min-height:26px !important;
    flex-basis:26px !important;
  }

  .players-shell{
    padding-bottom:6px !important;
  }
}


/* JUGADORES V12 — ranking expandido ocupa todo el alto disponible */
@media(min-width:1181px){
  .players-results.is-expanded{
    flex:1 1 auto !important;
    height:auto !important;
    min-height:0 !important;
    margin-bottom:0 !important;
  }

  .players-results.is-expanded .players-table-scroll{
    flex:1 1 0 !important;
    min-height:0 !important;
    max-height:none !important;
    overflow-y:auto !important;
  }

  .players-results.is-expanded .players-ranking-toggle{
    margin-top:0 !important;
  }
}


/* JUGADORES V13 — expandido conserva exactamente el alto del Top 12 y solo agrega scroll */
@media(min-width:1181px){
  .players-results.is-expanded{
    flex:0 0 auto !important;
    height:auto !important;
    min-height:0 !important;
    overflow:hidden !important;
    margin-bottom:0 !important;
  }

  .players-results.is-expanded .players-table-scroll{
    flex:none !important;
    height:399px !important; /* 27px de cabecera + 12 filas de 31px */
    min-height:399px !important;
    max-height:399px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    scrollbar-gutter:stable;
  }

  .players-results.is-expanded .players-table-head{
    height:27px !important;
    min-height:27px !important;
  }

  .players-results.is-expanded .player-row{
    min-height:31px !important;
    height:31px !important;
  }

  .players-results.is-expanded .players-ranking-toggle{
    height:26px !important;
    min-height:26px !important;
    flex-basis:26px !important;
    margin-top:0 !important;
  }
}

/* Ficha pública de jugador, escritorio y móvil. */
.player-name .player-open-profile{color:#eaf4ff;font-size:13px;font-weight:800;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-name .player-open-profile:hover{color:#d99cf6;text-decoration:underline}
.player-detail-page .players-shell{max-width:1440px;padding:18px 16px 36px!important}
.player-detail-back{margin-bottom:14px}
.player-detail-back a{color:#bf91db;font-size:12px;font-weight:800;text-decoration:none}
.player-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:15px}
.player-detail-heading span{color:#b09bc7;font-size:11px;font-weight:800;letter-spacing:.06em}
.player-detail-heading h1{font-size:29px;line-height:1.2;margin:5px 0}
.player-detail-heading p{font-size:12px;color:#a0b0c0;margin:0}
.player-detail-period{max-width:260px;text-align:right;display:flex;flex-direction:column;gap:5px}
.player-detail-period strong{color:#d99cf6;font-size:12px}
.player-detail-period span{font-size:11px;line-height:1.4;letter-spacing:0;color:#92a4b5;font-weight:400}
.player-detail-kpis{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-bottom:10px}
.player-detail-kpis>div,.player-detail-highlights>div{background:#0b1928;border:1px solid #2a4157;border-radius:9px;padding:14px 12px;min-width:0}
.player-detail-kpis span{display:block;color:#93a6b9;font-size:10px;font-weight:800;margin-bottom:8px}
.player-detail-kpis strong{font-size:24px;line-height:1;color:#f3f6fa}
.player-detail-highlights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:12px}
.player-detail-highlights h2{font-size:11px;color:#96a9bb;margin:0 0 10px}
.player-detail-highlights strong{display:block;font-size:17px;color:#f1f4fb}
.player-detail-highlights p{font-size:11px;color:#98a9b8;margin:7px 0 0}
.player-detail-history{background:#091725;border:1px solid #2a4157;border-radius:9px;overflow:hidden}
.player-detail-history>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px;border-bottom:1px solid #243849}
.player-detail-history h2{font-size:14px;margin:0}
.player-detail-history>header span{font-size:11px;color:#94a6b5}
.player-detail-scroll{overflow:auto;max-height:500px}
.player-detail-history table{width:100%;border-collapse:collapse;text-align:left}
.player-detail-history th{position:sticky;top:0;background:#071320;color:#92a5b7;font-size:10px;padding:11px 14px}
.player-detail-history td{padding:10px 14px;font-size:12px;border-top:1px solid #1e3040}
.player-detail-history td a{color:#d4a7ee;text-decoration:none}
.player-detail-history td a:hover{text-decoration:underline}
.player-detail-history tr:hover{background:#102234}
.player-detail-empty{padding:20px;color:#9aaaba}
@media(max-width:1000px){.player-detail-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){
 .player-detail-page .players-shell{padding:12px 9px 26px!important}
 .player-detail-heading{display:block}
 .player-detail-heading h1{font-size:23px}
 .player-detail-period{text-align:left;max-width:none;margin-top:12px}
 .player-detail-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .player-detail-kpis strong{font-size:21px}
 .player-detail-highlights{grid-template-columns:1fr}
 .player-detail-history table{min-width:690px}
}

/* PERFIL JUGADOR V2: compactar de verdad el escritorio, historial visible. */
@media (min-width: 1181px){
 .player-detail-page .players-shell{padding:6px 12px 12px!important;max-width:1440px}
 .player-detail-back{margin-bottom:4px!important;line-height:16px}
 .player-detail-heading{margin-bottom:7px!important;gap:8px!important;align-items:center!important}
 .player-detail-heading h1{font-size:21px!important;line-height:1.05!important;margin:2px 0 0!important}
 .player-detail-heading span{font-size:9px!important}
 .player-detail-period{gap:2px!important;max-width:285px}
 .player-detail-period strong{font-size:10px!important}
 .player-detail-period span{font-size:9px!important;line-height:1.2!important}
 .player-detail-kpis{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:6px!important;margin-bottom:6px!important}
 .player-detail-kpis>div{height:49px!important;min-height:49px!important;padding:6px 10px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;gap:3px!important}
 .player-detail-kpis span{font-size:9px!important;margin:0!important;line-height:1!important}
 .player-detail-kpis strong{font-size:17px!important;line-height:1.1!important}
 .player-detail-highlights{gap:6px!important;margin-bottom:7px!important}
 .player-detail-highlights>div{height:58px!important;min-height:58px!important;padding:7px 11px!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
 .player-detail-highlights h2{font-size:9px!important;line-height:1!important;margin:0 0 5px!important}
 .player-detail-highlights strong{font-size:14px!important;line-height:1.1!important}
 .player-detail-highlights p{font-size:9px!important;line-height:1.1!important;margin:3px 0 0!important}
 .player-detail-history>header{height:31px!important;min-height:31px!important;padding:5px 12px!important}
 .player-detail-history h2{font-size:12px!important}
 .player-detail-history>header span{font-size:10px!important}
 .player-detail-scroll{height:clamp(300px,calc(100dvh - 285px),900px)!important;max-height:none!important;min-height:260px!important;overflow-y:auto!important}
 .player-detail-history th{height:27px!important;padding:5px 12px!important;font-size:10px!important}
 .player-detail-history td{height:34px!important;padding:5px 12px!important;font-size:11px!important;line-height:1.15!important}
 .player-detail-history tbody tr{height:34px!important}
}
