/* ==========================================================================
   Dashboard LVBP — hoja de estilos única
   Tema oscuro. Sin dependencias externas ni fuentes remotas.
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-soft: #0c1220;
  --panel: #111a2c;
  --panel-2: #16223a;
  --border: #22314e;
  --border-soft: #1a2740;
  --text: #e9eefb;
  --text-2: #b9c6de;
  --muted: #7d8ca8;
  --accent: #4f8cff;
  --accent-2: #2ec4b6;
  --live: #ff4d5e;
  --win: #34d399;
  --loss: #f87171;
  --warn: #fbbf24;
  --tib: #0b2a5b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 50% -220px, #16233d 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }
a:hover { color: #7aa8ff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.25; margin: 0; }

code { font-family: var(--mono); font-size: .87em; background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 18px; }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mt { margin-top: 10px; }
.error { color: var(--loss); }

/* ------------------------------------------------------------- Cabecera -- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 11, 20, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; min-height: 62px; flex-wrap: wrap; padding-block: 8px;
}

/* Marca: logo de WR Servicios + identidad del dashboard.
   Se usa la variante "light" porque el logo original es para fondos claros
   (mismo criterio que el sitio de WR Servicios). */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand__logo-link { display: flex; align-items: center; text-decoration: none; }
.brand__logo { display: block; height: 34px; width: auto; }

.brand__text-link { text-decoration: none; color: inherit; }
.brand__text {
  display: flex; flex-direction: column; line-height: 1.15;
  padding-left: 12px; border-left: 1px solid var(--border);
}
.brand__text strong { font-size: .95rem; color: var(--text); }
.brand__text small { color: var(--muted); font-size: .72rem; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }

.nav__link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  color: var(--text-2); text-decoration: none;
  font-size: .9rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nav__link:hover { background: var(--panel); color: var(--text); }
.nav__link.is-active { background: var(--panel-2); border-color: var(--border); color: #fff; }
.nav__icon { font-size: .95rem; }

/* ---------------------------------------------------------------- Main --- */

.main { flex: 1; padding-block: 26px 44px; }

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.4rem, 3.4vw, 1.95rem); letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 22px; color: var(--muted); font-size: .82rem;
  background: var(--bg-soft);
}
.site-footer p { margin: 0 0 6px; }

/* ------------------------------------------------------------ Controles -- */

.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}

.datenav { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.datenav__btn {
  border: 0; background: transparent; color: var(--text-2);
  width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
  font-size: 1.05rem; line-height: 1;
}
.datenav__btn:hover:not(:disabled) { background: var(--panel-2); color: #fff; }
.datenav__btn:disabled { opacity: .35; cursor: not-allowed; }
.datenav__label { padding-inline: 8px; font-weight: 600; font-size: .9rem; min-width: 172px; text-align: center; }

.btn {
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: .85rem; font-weight: 600; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.btn:hover:not(:disabled) { background: #1d2c48; border-color: #2f4370; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: transparent; }
.btn--ghost:hover:not(:disabled) { background: var(--panel-2); }

.refreshbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); font-size: .84rem; color: var(--muted);
}
.refreshbar strong { color: var(--text-2); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot--live { background: var(--live); animation: blink 1.4s infinite; }
.dot--ok { background: var(--win); }
.dot--err { background: var(--loss); }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* --------------------------------------------------------------- Grids --- */

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

/* ------------------------------------------------------------ Tarjeta ---- */

.card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.card__title { font-size: .98rem; letter-spacing: .01em; }
.card__sub { font-size: .78rem; color: var(--muted); }
.card__body { padding: 14px 16px; }
.card--flush .card__body { padding: 0; }

/* --------------------------------------------------------------- Juego --- */

.game {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.game--live { border-color: rgba(255, 77, 94, .5); box-shadow: 0 0 0 1px rgba(255, 77, 94, .18), var(--shadow); }

.game__head {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft); font-size: .76rem; color: var(--muted);
}
.game__time { font-weight: 600; color: var(--text-2); white-space: nowrap; }
.game__venue { margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52%; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.badge--live { background: rgba(255, 77, 94, .14); color: #ff8a95; border-color: rgba(255, 77, 94, .4); }
.badge--final { background: rgba(125, 140, 168, .14); color: var(--text-2); border-color: var(--border); }
.badge--pre { background: rgba(79, 140, 255, .13); color: #8fb4ff; border-color: rgba(79, 140, 255, .35); }
.badge--dead { background: rgba(251, 191, 36, .12); color: var(--warn); border-color: rgba(251, 191, 36, .35); }

.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: blink 1.4s infinite; }

.game__teams { display: flex; flex-direction: column; }

.teamrow {
  display: grid; grid-template-columns: 34px 1fr auto auto;
  align-items: center; gap: 11px;
  padding: 11px 14px; position: relative;
}
.teamrow + .teamrow { border-top: 1px solid var(--border-soft); }
.teamrow.is-tib { background: linear-gradient(90deg, rgba(79, 140, 255, .1), transparent 62%); }
.teamrow.is-tib::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.teamrow.is-winner .teamrow__name { color: #fff; }
.teamrow.is-winner .teamrow__score { color: #fff; }
.teamrow:not(.is-winner) .teamrow__name { color: var(--text-2); }

.logo { display: block; object-fit: contain; background: rgba(255, 255, 255, .04); border-radius: 7px; }
.logo--fallback {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border);
  font-size: .68rem; font-weight: 700; color: var(--text-2);
}

.teamrow__name { display: flex; flex-direction: column; min-width: 0; }
.teamrow__full { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teamrow__abbr { font-size: .68rem; color: var(--muted); letter-spacing: .06em; }
.teamrow__rec { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.teamrow__score {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 700;
  min-width: 42px; text-align: right; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- Franja live -- */

.game__live {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 14px;
  padding: 12px 14px; border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255, 77, 94, .05), transparent);
}
.game__live-col { display: flex; flex-direction: column; gap: 5px; }
.game__live-col--mid { min-width: 0; }
.game__inning { font-weight: 700; font-size: .9rem; color: #fff; }
.game__meta { display: flex; align-items: center; gap: 10px; }

.matchup { display: flex; gap: 7px; font-size: .78rem; min-width: 0; }
.matchup__role { color: var(--muted); min-width: 44px; }
.matchup__who { color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.outs { display: inline-flex; gap: 4px; }
.out { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--border); display: inline-block; }
.out.is-on { background: var(--warn); border-color: var(--warn); }

.count { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--muted); }
.count__pair { font-family: var(--mono); font-weight: 700; color: var(--text-2); font-size: .82rem; }
.count__b { color: #7dd3fc; }
.count__s { color: var(--warn); }

/* Diamante de bases */
.diamond { position: relative; width: 56px; height: 56px; flex: none; }
.diamond__base {
  position: absolute; width: 15px; height: 15px;
  background: var(--panel-2); border: 1.5px solid var(--border);
  transform: rotate(45deg); border-radius: 2px;
  transition: background .2s, border-color .2s;
}
.diamond__base.is-on { background: var(--warn); border-color: #fde68a; box-shadow: 0 0 10px rgba(251, 191, 36, .55); }
.diamond__base--2 { top: 2px; left: 50%; margin-left: -7.5px; }
.diamond__base--3 { bottom: 14px; left: 2px; }
.diamond__base--1 { bottom: 14px; right: 2px; }
.diamond__home { position: absolute; bottom: 2px; left: 50%; margin-left: -6px; width: 12px; height: 12px; background: var(--border); transform: rotate(45deg); border-radius: 2px; }

/* ------------------------------------------------------------- Acciones -- */

.game__actions { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border-soft); margin-top: auto; }
.game__details { padding: 0 14px 14px; border-top: 1px solid var(--border-soft); padding-top: 12px; }

/* --------------------------------------------- Resumen de juego terminado - */

.game__summary {
  padding: 11px 14px; border-top: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, .015);
}
.game__summary.is-cargando { opacity: .6; }

.decisions { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.decision { display: flex; align-items: baseline; gap: 6px; font-size: .8rem; min-width: 0; }
.decision__label {
  color: var(--muted); text-transform: uppercase;
  font-size: .64rem; letter-spacing: .07em; font-weight: 700; flex: none;
}
.decision__who { color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decision__who strong { color: #fff; font-weight: 600; }
.decision__none { color: #4a5a76; font-size: .78rem; }

.highlights { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border-soft); }
.highlights__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.highlights__title {
  text-transform: uppercase; font-size: .64rem; letter-spacing: .07em;
  font-weight: 700; color: var(--accent-2);
}
.highlights__rule { font-size: .66rem; color: #4a5a76; }

.highlights__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.highlight { display: flex; align-items: center; gap: 7px; font-size: .8rem; }
.highlight .logo { background: none; border-radius: 0; flex: none; }
.highlight__name {
  color: var(--text); font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.highlight__line {
  margin-left: auto; flex: none; color: var(--muted);
  font-family: var(--mono); font-size: .74rem;
}

/* -------------------------------------------------------------- Tablas --- */

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th, .table td { padding: 9px 8px; text-align: center; white-space: nowrap; }
.table thead th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; border-bottom: 1px solid var(--border); }
.table tbody tr { border-bottom: 1px solid var(--border-soft); }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: rgba(79, 140, 255, .06); }
.table tbody tr.is-tib { background: linear-gradient(90deg, rgba(79, 140, 255, .12), transparent 70%); }
.table tbody tr.is-tib:hover { background: linear-gradient(90deg, rgba(79, 140, 255, .18), transparent 70%); }
.table .tl { text-align: left; }
.table .th-total, .table tfoot td { font-weight: 700; color: #fff; }
.table .is-empty { color: #3d4c68; }
.table--linescore { font-size: .8rem; }
.table--linescore th.tl { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.table--stats .tl { min-width: 172px; }
.table--stats .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.tname { display: flex; align-items: center; gap: 9px; }
.tname__text { display: flex; flex-direction: column; line-height: 1.15; }
.tname__text small { color: var(--muted); font-size: .68rem; letter-spacing: .05em; }
.tname--tib .tname__text strong { color: #9dc0ff; }

.pos { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); font-size: .76rem; font-weight: 700; font-family: var(--mono); }
.pos--1 { background: rgba(251, 191, 36, .16); border-color: rgba(251, 191, 36, .45); color: #fde68a; }

.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; font-family: var(--mono); background: var(--panel-2); border: 1px solid var(--border); color: var(--text-2); }
.chip--w { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .4); color: #6ee7b7; }
.chip--l { background: rgba(248, 113, 113, .13); border-color: rgba(248, 113, 113, .38); color: #fca5a5; }

/* ------------------------------------------------------------ Play list -- */

.plays { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }

/* Cada jugada: primera línea con evento, entrada y marcador; la descripción va
   debajo ocupando el ancho completo. Con una rejilla de columnas fijas el texto
   se partía palabra por palabra dentro de una tarjeta estrecha. */
.play {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid transparent; font-size: .82rem;
}
.play.is-scoring { background: rgba(52, 211, 153, .09); border-color: rgba(52, 211, 153, .28); }
.play__ev { font-weight: 700; color: #fff; }
.play__ctx { color: var(--muted); font-size: .75rem; font-family: var(--mono); }
.play__desc { flex: 1 1 100%; color: var(--text-2); min-width: 0; }
.play__score { margin-left: auto; font-family: var(--mono); font-weight: 700; color: var(--text-2); }

/* --------------------------------------------------------------- Avisos -- */

.notice {
  padding: 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border-soft);
  color: var(--text-2); text-align: center;
}
.notice--error { border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .07); text-align: left; }
.notice--error strong { display: block; margin-bottom: 6px; color: #fca5a5; }
.notice--error p { margin: 0 0 8px; }

.skeleton { display: flex; flex-direction: column; gap: 10px; }
.skeleton__row { height: 54px; border-radius: var(--radius); background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --------------------------------------------------------------- Tabs ---- */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  font-size: .86rem; font-weight: 600; font-family: inherit;
}
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.is-active { background: var(--accent); border-color: var(--accent); color: #04121f; }

.select {
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  padding: 7px 11px; border-radius: var(--radius-sm); font-family: inherit; font-size: .85rem;
}

/* --------------------------------------------------------- Hero equipo --- */

.hero {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 22px; border-radius: var(--radius); margin-bottom: 20px;
  background: linear-gradient(135deg, var(--tib) 0%, #0e1a33 55%, var(--panel) 100%);
  border: 1px solid #1d3563; box-shadow: var(--shadow);
}
.hero__logo { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5)); }
.hero__main { min-width: 0; flex: 1; }
.hero__name { font-size: clamp(1.35rem, 3.6vw, 1.9rem); letter-spacing: -.01em; }
.hero__meta { color: #a9bede; font-size: .87rem; margin-top: 4px; }
.hero__record { display: flex; gap: 22px; margin-top: 12px; flex-wrap: wrap; }
.hero__stat { display: flex; flex-direction: column; }
.hero__stat b { font-size: 1.35rem; font-family: var(--mono); color: #fff; }
.hero__stat span { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: #93a9cc; }

.stat { background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stat__value { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; color: #fff; }
.stat__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 3px; }
.stat__note { font-size: .68rem; color: var(--muted); margin-top: 2px; }

/* Fila de resultado reciente */
.resultline { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); font-size: .86rem; }
.resultline:last-child { border-bottom: 0; }
.resultline__res { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: .72rem; font-weight: 800; font-family: var(--mono); flex: none; }
.resultline__res--w { background: rgba(52, 211, 153, .18); color: #6ee7b7; }
.resultline__res--l { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.resultline__res--t { background: var(--panel-2); color: var(--text-2); }
.resultline__txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.resultline__date { color: var(--muted); font-size: .76rem; }
.resultline__score { font-family: var(--mono); font-weight: 700; }

.inline-link { font-weight: 600; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* Barras de diferencia de carreras */
.bar-track {
  flex: 1; height: 16px; display: flex; align-items: center;
  background: var(--bg-soft); border-radius: 999px;
  border: 1px solid var(--border-soft); overflow: hidden; min-width: 60px;
}
.bar { display: block; height: 100%; border-radius: 999px; }
.bar--pos { background: linear-gradient(90deg, rgba(52, 211, 153, .45), #34d399); margin-right: auto; }
.bar--neg { background: linear-gradient(90deg, #f87171, rgba(248, 113, 113, .45)); margin-left: auto; }

/* ======================================================================
   Página TIBURONES
   Bloques a todo el ancho y de altura propia. Antes iban en una rejilla de
   columnas que igualaba las alturas: "Próximo juego" medía 604 px con 168 px
   de contenido (más de 400 px vacíos). Una columna con bloques naturales
   elimina ese hueco y deja respirar cada sección.
   ====================================================================== */

.bloques { display: flex; flex-direction: column; gap: 16px; }

/* --- Forma reciente, dentro del héroe --- */
.forma { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.forma__label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .07em;
  color: #93a9cc; font-weight: 700;
}
.forma__tira { display: flex; gap: 4px; }
.forma__chip {
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 7px;
  font-family: var(--mono); font-size: .72rem; font-weight: 800;
  border: 1px solid transparent;
}
.forma__chip--w { background: rgba(52, 211, 153, .18); color: #6ee7b7; border-color: rgba(52, 211, 153, .4); }
.forma__chip--l { background: rgba(248, 113, 113, .16); color: #fca5a5; border-color: rgba(248, 113, 113, .38); }
.forma__chip--t { background: var(--panel-2); color: var(--text-2); border-color: var(--border); }

/* --- Próximo juego, protagonista --- */
.card--proximo { border-color: #1d3563; background: linear-gradient(135deg, #0d1c38, var(--panel) 60%); }
.card--proximo .card__head { background: transparent; border-bottom-color: #1d3563; }

.proximo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.proximo__equipo { display: flex; align-items: center; gap: 12px; flex: 1 1 210px; min-width: 0; }
.proximo__equipo--der { flex-direction: row-reverse; text-align: right; }
.proximo__equipo .logo { background: none; flex: none; }
.proximo__datos { display: flex; flex-direction: column; min-width: 0; }
.proximo__nombre { font-weight: 700; font-size: 1.05rem; }
.proximo__cond { font-size: .74rem; color: #93a9cc; text-transform: uppercase; letter-spacing: .06em; }

.proximo__centro {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex: none; padding-inline: 10px;
}
.proximo__vs { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; color: var(--muted); }
.proximo__hora { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: #fff; white-space: nowrap; }

.proximo__pie {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #1d3563;
  text-align: center; font-size: .86rem; color: var(--text-2);
}

.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.pill--hoy { background: rgba(255, 77, 94, .16); color: #ff8a95; border: 1px solid rgba(255, 77, 94, .4); }
.pill--pronto { background: rgba(79, 140, 255, .14); color: #8fb4ff; border: 1px solid rgba(79, 140, 255, .35); }

/* --- Promedios del equipo: una fila de 6 --- */
.teamgrid { display: grid; gap: 10px; grid-template-columns: repeat(6, 1fr); }

/* --- Líderes del equipo: una tarjeta, dos columnas --- */
.lideres2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.lideres2__grupo {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent-2); margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.liderato { margin-bottom: 14px; }
.liderato:last-child { margin-bottom: 0; }
.liderato__titulo {
  margin: 0 0 5px; font-size: .66rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); font-weight: 700;
}
.fila-lider {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 0; border-bottom: 1px dashed var(--border-soft); font-size: .86rem;
}
.fila-lider:last-child { border-bottom: 0; }
.fila-lider__puesto {
  flex: none; width: 16px; font-family: var(--mono);
  font-size: .72rem; color: var(--muted);
}
.fila-lider__nombre {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}
.fila-lider__valor {
  margin-left: auto; flex: none; font-family: var(--mono);
  font-weight: 700; color: #fff;
}

/* --- Roster: filtro por posición y varias columnas --- */
.filtros { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filtro {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: .8rem; font-weight: 600;
}
.filtro:hover { background: var(--panel-2); color: var(--text); }
.filtro.is-active { background: var(--accent); border-color: var(--accent); color: #04121f; }
.filtro__n {
  font-family: var(--mono); font-size: .7rem; opacity: .75;
}

.roster-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.jugador {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border-soft);
}
.jugador__pos {
  flex: none; width: 30px; text-align: center;
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  color: var(--text-2); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 0;
}
.jugador__nombre {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .85rem;
}
.jugador__estado {
  margin-left: auto; flex: none; font-size: .62rem; text-transform: uppercase;
  letter-spacing: .05em; color: #4a5a76;
}
.jugador__estado--alerta { color: var(--warn); }

/* --- Calendario a todo el ancho --- */
.partidos { display: flex; flex-direction: column; }
.partido {
  display: grid; grid-template-columns: 22px 1fr 96px 84px;
  align-items: center; gap: 12px;
  padding: 9px 4px; border-bottom: 1px solid var(--border-soft); font-size: .87rem;
}
.partido:last-child { border-bottom: 0; }
.partido--hoy { background: rgba(79, 140, 255, .09); border-radius: var(--radius-sm); padding-inline: 10px; }
.partido__res {
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 6px; font-family: var(--mono); font-size: .72rem; font-weight: 800;
}
.partido__res--w { background: rgba(52, 211, 153, .18); color: #6ee7b7; }
.partido__res--l { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.partido__res--t { background: var(--panel-2); color: var(--text-2); }
.partido__res--live { color: var(--live); }
.partido__res--pend { background: transparent; }
.partido__rival { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.partido__cond { flex: none; font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.partido__nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.partido__fecha { color: var(--muted); font-size: .78rem; text-align: right; }
.partido__marcador { font-family: var(--mono); font-weight: 700; text-align: right; color: #fff; white-space: nowrap; }

.ver-todo { margin-top: 14px; width: 100%; }

/* --- Responsive de la sección --- */
@media (max-width: 900px) {
  .teamgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .hero__record { gap: 14px 18px; }
  .proximo { gap: 10px; }
  .proximo__equipo { flex: 1 1 130px; }
  .proximo__equipo--der { flex-direction: row; text-align: left; }
  .proximo__centro { order: 3; width: 100%; flex-direction: row; justify-content: space-between; padding: 10px 0 0; border-top: 1px solid #1d3563; }
  .lideres2 { gap: 18px; }
  /* La columna de hora pasa a automática: con 76 px fijos, "7:00 p. m." se
     partía en dos líneas. */
  .partido { grid-template-columns: 22px 1fr auto; }
  .partido__fecha { display: none; }
  /* Dos columnas: en una sola, los 34 jugadores ocupaban ~1390 px. El mínimo
     tiene que ser holgado: el contenedor mide 320 px y con 158 px por columna
     más la separación se quedaba a 2 px de caber. */
  .roster-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .jugador { padding: 5px 8px; gap: 7px; }
  .jugador__pos { align-self: flex-start; }
  /* En una columna estrecha es mejor partir el nombre en dos líneas que
     recortarlo: en el móvil no hay tooltip que lo rescate. */
  .jugador__nombre { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
  .fila-lider { padding: 3px 0; }
}
@media (max-width: 480px) {
  .teamgrid { grid-template-columns: repeat(2, 1fr); }
  .roster-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
}

/* ------------------------------------------------------------ Responsive - */

@media (max-width: 720px) {
  .site-header__inner { min-height: auto; }
  .nav { width: 100%; justify-content: space-between; order: 3; }
  .nav__link { padding: 7px 10px; font-size: .82rem; }
  .nav__icon { display: none; }
  .game__live { grid-template-columns: 1fr auto; }
  .game__live-col--mid { order: 3; grid-column: 1 / -1; }
  .datenav__label { min-width: 132px; font-size: .84rem; }
  /* En pantallas estrechas el logo se reduce y el texto secundario se oculta
     para que la marca y la navegación quepan en una línea. */
  .brand__logo { height: 28px; }
  .brand__text { padding-left: 10px; }
  .brand__text strong { font-size: .88rem; }
  .brand__text small { display: none; }
  .hero { padding: 16px; }
  .hero__logo { width: 62px; height: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
