/* ==========================================================================
   styles.css — BASE, TOKENS Y COMPONENTES GENERALES
   ========================================================================== */
:root {
  /* Fondos */
  --bg: #070b16;
  --bg-2: #0b1224;
  --surface: #0f182c;
  --surface-2: #142039;
  --graphite: #1c2436;
  --line: rgba(148, 170, 210, 0.14);
  --line-strong: rgba(148, 170, 210, 0.28);
  /* Texto */
  --text: #eaf0fa;
  --muted: #9aa7bf;
  --dim: #6c7891;
  /* Acentos */
  --orange: #ff7a1a;
  --orange-2: #ff9a3c;
  --yellow: #ffcc33;
  --gold: #f5c03a;
  --silver: #cfd6e2;
  --bronze: #d9925a;
  --win: #46d99b;
  --loss: #ff7b7b;
  --live: #ff5a5a;
  /* UPSIN: capa institucional. Muestreados de los logotipos oficiales
     (primary del escudo, secondary del venado azul) */
  --upsin-primary: #083b71;
  --upsin-secondary: #035dc8;
  /* Forma */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.7);
  /* Tipografía: impacto (solo logotipo, hero, nombre MVP y «Final»), titulares y texto */
  --font-impact: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  --font-display: 'Big Shoulders Display', 'Big Shoulders', 'Arial Narrow', sans-serif;
  --font-body: Archivo, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Escala tipográfica */
  --fs-hero: clamp(2.4rem, 6vw, 4rem);
  --fs-page: clamp(2.2rem, 5vw, 3.2rem);
  --fs-section: clamp(1.5rem, 2.4vw, 1.9rem);
  --fs-h3: 1.3rem;
  --fs-figure: 2.2rem;
  --fs-table: 0.94rem;
  --fs-label: 0.75rem;
  --container: 1220px;
  --header-h: 68px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; scrollbar-color: #2b3852 var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(255, 122, 26, 0.09), transparent 60%),
    radial-gradient(900px 520px at -10% 8%, rgba(59, 111, 224, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-body);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
input { caret-color: var(--orange); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.02; margin: 0; letter-spacing: 0.02em; text-wrap: balance; }
p { margin: 0; }
abbr[title] { text-decoration: none; cursor: help; }
code { font-family: inherit; font-size: 0.92em; font-weight: 600; background: rgba(255, 255, 255, 0.06); padding: 0.1em 0.4em; border-radius: 5px; }
small { font-size: 0.72em; }
[hidden] { display: none !important; }
::selection { background: rgba(255, 122, 26, 0.38); color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.app { flex: 1; outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: #111; font-weight: 700; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Etiquetas en mayúsculas pequeñas: Archivo al 87.5 % de ancho */
.eyebrow, .field__label, .info-grid dt, .platform-stats dt, .t-card__facts dt, .t-card__current, .record-grid span, .team-card__stats small,
.leader-mini__label, .spotlight__label, .leader-card__unit, .mvp-stats dt, .mvp-ranking__title, .bk-state {
  font-family: var(--font-body); font-size: var(--fs-label); font-stretch: 87.5%; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}

/* --------------------------- Aviso de datos de ejemplo --------------------------- */
.sample-ribbon { padding: 4px 16px; font-size: 0.75rem; line-height: 1.4; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line); text-align: center; }

/* -------------------------------- Header -------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 11, 22, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--upsin-secondary); }
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
/* El logotipo es azul marino: va sobre blanco para conservar sus colores en el fondo oscuro */
.brand__logo { display: grid; place-items: center; flex: none; height: 44px; aspect-ratio: 1; padding: 3px; border-radius: 8px; background: #fff; }
.brand__logo img { width: 100%; height: 100%; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-family: var(--font-display); font-size: 1.32rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.brand__sub { font-size: 0.74rem; font-stretch: 87.5%; color: var(--orange-2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 0.94rem; color: var(--muted); transition: color 0.18s, background 0.18s; white-space: nowrap; }
.main-nav a .icon { width: 17px; height: 17px; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.main-nav a.is-active { color: #1a0d00; background: linear-gradient(180deg, var(--yellow), var(--orange)); }
.main-nav__admin-item { display: flex; align-items: center; margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.main-nav a.nav-admin { padding: 7px 11px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 0.84rem; }
.main-nav a.nav-admin:hover { color: var(--text); border-color: rgba(255, 204, 51, 0.45); background: rgba(255, 255, 255, 0.06); }
.main-nav a.nav-admin.is-active { color: #1a0d00; border-color: transparent; background: linear-gradient(180deg, var(--yellow), var(--orange)); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; place-items: center; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle__close { display: none; }

/* -------------------------------- Footer -------------------------------- */
.site-footer { margin-top: 56px; border-top: 2px solid var(--upsin-secondary); background: linear-gradient(100deg, color-mix(in srgb, var(--upsin-primary) 60%, var(--bg-2)), var(--bg-2) 72%); }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 28px; font-size: 0.9rem; color: var(--muted); }
.site-footer strong { color: var(--text); font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.site-footer__note { max-width: 460px; text-align: right; }
.site-footer__credit { border-top: 1px solid var(--line); padding-block: 12px; text-align: center; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }
.site-footer__credit span { color: var(--text); font-weight: 700; }
.noscript { padding: 24px; text-align: center; }

/* ------------------------------- Secciones ------------------------------- */
.section { margin-top: 44px; }
.section--flush-top { margin-top: 24px; }
/* Línea de banda: filete a todo el ancho con un punto naranja al inicio */
.section-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.section-head::after { content: ''; position: absolute; left: 0; bottom: -3.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.section-head__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-title { font-size: var(--fs-section); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
h3.section-title { font-size: var(--fs-h3); }
.section-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--orange-2); margin-bottom: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--orange-2); text-decoration: none; transition: color 0.18s; }
.link-more:hover { color: var(--yellow); }
.link-more .icon { transition: transform 0.2s var(--ease); }

.page-head { position: relative; padding-block: 40px 8px; background: linear-gradient(120deg, rgba(20, 32, 57, 0.9), rgba(7, 11, 22, 0.4)); border-bottom: 1px solid var(--line); }
.page-head::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.018) 46px 48px); pointer-events: none; }
.page-head .container { position: relative; }
.page-title { font-size: var(--fs-page); font-weight: 900; text-transform: uppercase; }
.page-lead { color: var(--muted); max-width: 65ch; margin: 10px 0 28px; }

/* -------------------------------- Botones -------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: 0.95rem; text-decoration: none; cursor: pointer; transition: transform 0.16s var(--ease), box-shadow 0.18s, background 0.18s, border-color 0.18s; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn--primary { color: #1a0d00; background: linear-gradient(180deg, #ffd65a, var(--orange)); box-shadow: 0 8px 22px -10px rgba(255, 122, 26, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn--ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 204, 51, 0.5); }
.btn--sm { min-height: 38px; padding: 7px 13px; font-size: 0.88rem; }
.btn--lg { min-height: 52px; padding: 12px 24px; font-size: 1.05rem; }

/* --------------------------------- Hero --------------------------------- */
/* Portada institucional: colores UPSIN sobre el azul marino del sitio. El venado queda
   sobre lo oscuro para que su azul se lea, y baja un poco más allá del borde del hero. */
.hero { position: relative; z-index: 1; overflow-x: clip; border-bottom: 1px solid var(--line); background: linear-gradient(100deg, color-mix(in srgb, var(--upsin-secondary) 34%, var(--bg)) 0%, color-mix(in srgb, var(--upsin-primary) 62%, var(--bg)) 34%, var(--bg) 66%); }
.hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.018) 46px 48px); pointer-events: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; padding-top: 56px; }
.hero__content { position: relative; z-index: 1; padding-bottom: 34px; }
.hero__title { font-family: var(--font-impact); font-size: var(--fs-hero); font-weight: 400; line-height: 1.12; letter-spacing: 0; text-transform: uppercase; text-wrap: wrap; }
.hero__title span { display: block; background: linear-gradient(180deg, var(--yellow), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { color: var(--muted); margin-top: 16px; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.next-match-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 14px 20px; align-items: center;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-strong);
}
.next-match-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--home-color, var(--orange)) 0% 50%, var(--away-color, var(--yellow)) 50% 100%);
}
.next-match-card__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.next-match-card__meta .eyebrow { margin-bottom: 0; }
.next-match-card__body { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; min-width: 0; }
.next-match-card__team {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  letter-spacing: 0.02em; text-transform: uppercase; transition: color 0.18s;
}
.next-match-card__team:hover { color: var(--yellow); }
.next-match-card__vs {
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  letter-spacing: 0.12em; color: var(--muted); padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2);
}
.next-match-card__cta { justify-self: end; }
.hero__mascot { position: relative; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.hero__court { position: absolute; left: 50%; top: 46%; width: 150%; max-width: 640px; height: auto; transform: translate(-50%, -50%); fill: none; stroke: var(--text); stroke-width: 1.5px; opacity: 0.2; }
.hero__court * { vector-effect: non-scaling-stroke; }
.hero__venado { position: relative; width: min(100%, 330px); height: auto; margin-bottom: -30px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5)); }
.hero__venado.is-entering { animation: venado-in 0.5s var(--ease) backwards; }
@keyframes venado-in { from { opacity: 0; transform: translateX(16px); } }

/* ------------------------------ Logotipo de equipo ------------------------------ */
.emblem { display: inline-grid; place-items: center; flex: none; width: var(--size, 40px); aspect-ratio: 1; border-radius: 50%; background: var(--plate, transparent); container-type: inline-size; }
.emblem img { width: 100%; height: 100%; object-fit: contain; }
.emblem--plate img { width: 80%; height: 80%; }
/* Respaldo sin imagen: abreviatura sobre el color del panel */
.emblem--mono { background: var(--team-panel); color: var(--team-on); }
.emblem__mono { font-family: var(--font-display); font-weight: 900; font-size: 0.8rem; font-size: 36cqi; line-height: 1; letter-spacing: 0.02em; }

/* ----------------------------- Tarjetas resumen ----------------------------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(255, 122, 26, 0.12); color: var(--orange-2); flex: none; }
.stat-card__label { font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.stat-card__value { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-figure); line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-card__value small { font-size: 1.1rem; color: var(--muted); margin-left: 2px; }
.stat-card__value .is-impact { font-family: var(--font-impact); font-weight: 400; font-size: 0.82em; }
.stat-card__hint { margin-top: 4px; font-size: 0.82rem; color: var(--muted); }

/* -------------------------------- Etiquetas -------------------------------- */
.draw-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.72rem; font-stretch: 87.5%; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-stretch: 87.5%; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.status-pill--finished { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.status-pill--scheduled { background: rgba(255, 122, 26, 0.14); color: var(--orange-2); }
.status-pill--live { background: rgba(255, 90, 90, 0.14); color: #ff9a9a; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ----------------------------- Tarjeta partido ----------------------------- */
.match-list { display: grid; gap: 12px; }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.match-card { position: relative; overflow: hidden; padding: 16px 16px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.match-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--home-color, var(--orange)) 0% 50%, var(--away-color, var(--yellow)) 50% 100%);
  opacity: 0.85;
}
.match-card--scheduled { background: linear-gradient(180deg, rgba(255, 122, 26, 0.06), var(--surface) 60%); }
.match-card--live { border-color: rgba(255, 90, 90, 0.45); }
.mc-schedule-pill {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 122, 26, 0.11); border: 1px solid rgba(255, 122, 26, 0.28);
  color: var(--text); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.mc-schedule-pill .icon { width: 13px; height: 13px; color: var(--orange-2); }
.mc-schedule-pill strong { color: var(--yellow); font-weight: 700; }
.mc-schedule-pill__sep { color: var(--dim); }
.round-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.round-pill {
  min-height: 38px; padding: 6px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--muted); font-family: var(--font-display); font-weight: 800;
  font-size: 1rem; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.round-pill:hover { color: var(--text); border-color: rgba(255, 204, 51, 0.45); }
.round-pill.is-active {
  color: #1a0d00; border-color: transparent;
  background: linear-gradient(180deg, var(--yellow), var(--orange));
}
.match-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.match-card__state { display: inline-flex; align-items: center; gap: 6px; }
.match-card__round { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.92rem; color: var(--muted); }
.match-card__teams { position: relative; display: grid; gap: 6px; }
.mc-team { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.mc-team__link { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.mc-team__link:hover .mc-team__name { color: var(--yellow); }
.mc-team__name { font-weight: 600; transition: color 0.18s; }
.mc-team__score { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-figure); line-height: 1; min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.mc-team.is-winner .mc-team__name { font-weight: 700; }
.mc-team.is-winner .mc-team__score { color: var(--yellow); }
.mc-team.is-loser { opacity: 0.62; }
.mc-vs { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); max-width: 40%; text-align: right; line-height: 1.1; }
.match-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 0.8rem; color: var(--muted); }
.match-card__foot > span { display: inline-flex; align-items: center; gap: 5px; }
.match-card__foot .icon { width: 14px; height: 14px; color: var(--dim); }

/* ----------------------------------- Tablas ----------------------------------- */
.table-wrap { position: relative; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 11px 12px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table thead th { position: sticky; top: 0; background: var(--surface-2); font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table .col-team, .data-table .col-player { text-align: left; }
.data-table tbody th { font-weight: 600; }

.standings .col-pos { width: 64px; }
.standings .col-strong { font-weight: 700; color: var(--text); }
.col-dif { font-weight: 600; }
.col-dif.is-pos, .is-pos { color: var(--win); }
.col-dif.is-neg, .is-neg { color: var(--loss); }
.team-cell { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.team-cell span { transition: color 0.18s; }
.team-cell:hover span { color: var(--yellow); }
.pos-badge { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 9px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rank-1 .pos-badge { color: #2b1d00; background: var(--gold); border-color: var(--gold); }
.rank-2 .pos-badge { color: #1d2430; background: var(--silver); border-color: var(--silver); }
.rank-3 .pos-badge { color: #2a1406; background: var(--bronze); border-color: var(--bronze); }
.standings-row.rank-1 > :first-child { box-shadow: inset 3px 0 0 var(--gold); }
.standings-row.rank-2 > :first-child { box-shadow: inset 3px 0 0 var(--silver); }
.standings-row.rank-3 > :first-child { box-shadow: inset 3px 0 0 var(--bronze); }

/* Tabla de jugadores */
.players th:first-child, .players td:first-child { padding-left: 16px; }
.players .col-player { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.players thead .col-player { z-index: 2; background: var(--surface-2); }
.players tbody tr:hover .col-player { background: #131d33; }
.players td.is-sorted { color: var(--yellow); font-weight: 600; background: rgba(255, 204, 51, 0.04); }
.sort-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; margin: -4px -6px; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; border-radius: 6px; transition: color 0.18s; }
.sort-btn:hover { color: var(--text); }
th.is-sorted .sort-btn { color: var(--yellow); }
.sort-ind { font-size: 0.6rem; width: 0.8em; }
.player-cell { display: flex; align-items: center; gap: 10px; }
.player-cell__name { display: block; font-weight: 600; }
.col-num { color: var(--muted); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.col-team-name a { text-decoration: none; color: var(--muted); transition: color 0.18s; }
.col-team-name a:hover { color: var(--yellow); }
.stat-unknown { color: var(--muted); }
.stat-partial sup { color: var(--yellow); font-weight: 700; margin-left: 1px; }
.no-data { color: var(--muted); text-align: left !important; }
.players tr.is-empty .player-cell__name { color: var(--muted); }
.stat-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 20px; margin: 12px 0 0; font-size: 0.82rem; color: var(--muted); }
.stat-legend > div { display: flex; gap: 8px; }
.stat-legend dt { flex: none; min-width: 2.6em; font-weight: 700; color: var(--text); }
.stat-legend dd { margin: 0; }
.match-card__stats { display: inline-flex; align-items: center; gap: 5px; flex-basis: 100%; margin-top: 2px; font-weight: 600; color: var(--orange-2); text-decoration: none; transition: color 0.18s; }
.match-card__stats:hover { color: var(--yellow); }
.match-card__stats .icon { color: currentColor !important; }
.table-empty { padding: 28px !important; color: var(--muted); }
.table-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.86rem; color: var(--muted); margin: 0 0 10px; }
.table-legend { font-size: 0.82rem; color: var(--muted); margin-top: 10px; }

/* ------------------------------ Formularios ------------------------------ */
.toolbar, .filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 14px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field__label { color: var(--muted); padding: 0; }
.field--search { flex: 1 1 240px; }
.input, .select { min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text); transition: border-color 0.18s, box-shadow 0.18s; }
.input::placeholder { color: var(--muted); }
.select { padding-right: 34px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa7bf' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; cursor: pointer; min-width: 180px; }
.input:hover, .select:hover { border-color: rgba(255, 204, 51, 0.4); }
.input:focus, .select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 204, 51, 0.22); }
.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { width: 100%; padding-left: 38px; }
.segmented { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line-strong); }
.segmented__opt span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; border-radius: 8px; border: 0; background: none; font-weight: 600; font-size: 0.88rem; color: var(--muted); cursor: pointer; transition: background 0.18s, color 0.18s; }
.segmented__opt:hover span { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.segmented__opt input:checked + span { color: #1a0d00; background: linear-gradient(180deg, var(--yellow), var(--orange)); }
.segmented__opt { position: relative; }
.segmented__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented__opt input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 1px; }

/* -------------------------------- Avisos -------------------------------- */
.note { font-size: 0.86rem; color: var(--muted); padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); max-width: 560px; }
.note summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text); list-style: none; }
.note summary::-webkit-details-marker { display: none; }
.note summary::after { content: '+'; margin-left: auto; color: var(--orange-2); font-weight: 700; }
.note[open] summary::after { content: '−'; }
.note ol { margin: 10px 0 6px; padding-left: 22px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--radius); background: rgba(255, 179, 64, 0.07); border: 1px solid rgba(255, 179, 64, 0.28); color: #f3dfbf; font-size: 0.9rem; }
.notice .icon { color: var(--yellow); margin-top: 2px; }
.banner-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.82rem; color: var(--muted); }

/* ---------------------------- Estados ---------------------------- */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--muted); }
.state--empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255, 255, 255, 0.015); }
.state--loading { min-height: 50vh; }
.state__icon { width: 30px; height: 30px; color: var(--muted); }
.state__title { font-weight: 700; color: var(--text); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--orange); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------- Cambio de vista ---------------------------- */
.view-enter { animation: view-in 0.18s var(--ease) backwards; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------- Hover solo con cursor real ------------------------- */
@media (hover: hover) and (pointer: fine) {
  .link-more:hover .icon { transform: translateX(3px); }
  .btn--primary:hover { box-shadow: 0 12px 26px -10px rgba(255, 140, 30, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5); transform: translateY(-1px); }
  .btn--primary:active { transform: scale(0.97); }
  .match-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
}

/* ---------------------------- Accesibilidad ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
