@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;900&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
  /* ── Paleta Diacrítica ── */
  --purpura:        #773076;
  --purpura-dark:   #5a2358;
  --purpura-light:  #9b4599;
  --naranja:        #DE4B28;
  --naranja-dim:    #b83d20;
  --rojo:           #E8302A;
  --rojo-vivo:      #E8302A;

  /* Aliases para que el código existente siga funcionando sin cambios */
  --verde:          var(--purpura);
  --verde-dark:     var(--purpura-dark);
  --verde-light:    var(--purpura-light);
  --dorado:         var(--naranja);
  --dorado-dim:     var(--naranja-dim);

  /* Neutrals — light */
  --bg:             #f4f2f5;
  --surface:        #ffffff;
  --surface-2:      #f9f7fa;
  --border:         #e2dce3;
  --border-2:       #cec6cf;
  --text-1:         #333333;
  --text-2:         #4a3d4a;
  --text-3:         #8a7a8a;

  /* Nav */
  --nav-bg:         #2d0f2c;
  --nav-text:       #d4b8d3;

  /* Clasificación */
  --clasif-bg:      #f3edf3;
  --clasif-txt:     #5a2358;
  --chance-bg:      #fff2ed;
  --chance-txt:     #a03018;
  --elim-bg:        #f0f0f0;
  --elim-txt:       #888;

  /* Panel Poisson */
  --p-bg:           #1e0a1e;
  --p-text:         #e8d8e8;
  --p-accent:       #DE4B28;
  --p-border:       #3d1a3d;

  /* Misc */
  --radius:         10px;
  --radius-sm:      6px;
  --radius-xs:      4px;
  --shadow-sm:      0 1px 3px rgba(119,48,118,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 12px rgba(119,48,118,0.12);
  --shadow-lg:      0 8px 28px rgba(119,48,118,0.18);
  --t:              0.18s ease;
}

[data-theme="dark"] {
  --bg:          #120812;
  --surface:     #1e0f1e;
  --surface-2:   #271527;
  --border:      #3d1f3d;
  --border-2:    #522a52;
  --text-1:      #ede0ed;
  --text-2:      #c4a8c3;
  --text-3:      #8a6a89;
  --nav-bg:      #0d050d;
  --nav-text:    #c4a8c3;
  --clasif-bg:   #2a0f2a;
  --clasif-txt:  #c47ac3;
  --chance-bg:   #2a1008;
  --chance-txt:  #e07050;
  --elim-bg:     #1a121a;
  --elim-txt:    #5a4a5a;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.75);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.4;
  transition: background var(--t), color var(--t);
}

/* ===== NAV ===== */
nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 4px;
}

.nav-brand {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nav-text);
  text-decoration: none;
  padding: 13px 16px 13px 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.2px;
  transition: color var(--t);
}

.nav-brand:hover { color: #fff; }

.nav-brand-wc   { color: #fff; font-weight: 700; }
.nav-brand-sep  { color: #5a3a5a; }
.nav-brand-diac {
  color: var(--purpura-light);
  font-weight: 600;
  font-size: 0.82rem;
}

.nav-links {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  padding: 13px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--t), border-color var(--t);
}

.nav-links a:hover { color: #fff; border-bottom-color: rgba(222,75,40,0.6); }
.nav-links a.active { color: var(--dorado); border-bottom-color: var(--dorado); }

/* Dark mode toggle in nav */
.nav-theme-btn {
  margin-left: 8px;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--nav-text);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  transition: var(--t);
  flex-shrink: 0;
}
.nav-theme-btn:hover { border-color: var(--dorado); color: var(--dorado); }

/* ===== LAYOUT ===== */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 16px;
}

/* ===== LIVE BAR ===== */
.live-bar {
  background: var(--rojo-vivo);
  color: #fff;
  padding: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  font-size: 0.8rem;
  font-weight: 600;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.live-bar.active {
  max-height: 48px;
  padding: 8px 0;
}

.live-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: live-pulse 1.2s infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.live-bar-matches {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.live-bar-match {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.95;
}

/* ===== COUNTDOWN BANNER ===== */
#countdown-banner {
  background: linear-gradient(90deg, #2d0f2c 0%, #0f2240 100%);
  border-bottom: 1px solid rgba(222,75,40,0.25);
  color: #c4a8c3;
  padding: 7px 16px;
  text-align: center;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#countdown-banner strong {
  font-size: 1.05rem;
  color: var(--dorado);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

#countdown-banner .cd-label {
  font-size: 0.72rem;
  color: #8a6a89;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  row-gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.toolbar-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ultima-act { font-size: 0.72rem; color: var(--text-3); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  line-height: 1;
}

.btn-primary  { background: var(--verde);  color: #fff; }
.btn-primary:hover { background: var(--verde-dark); }
.btn-secondary { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-2); color: var(--text-1); }
.btn-gold   { background: var(--dorado); color: #fff; }
.btn-gold:hover { background: var(--dorado-dim); }
.btn-danger { background: var(--rojo); color: #fff; }
.btn-danger:hover { background: #a81c00; }
.btn.active { background: var(--verde); color: #fff; border-color: var(--verde); }

/* ===== MATCH CARD ===== */
.partidos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 10px;
}

.match-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
}

.match-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }

.match-card.argentina {
  border-top: 2px solid var(--dorado);
}

.match-header {
  background: var(--nav-bg);
  color: #e2e8f0;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.match-header-left {
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #c4a8c3;
}

.match-grupo-badge {
  background: var(--verde);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  display: inline-block;
  margin-right: 4px;
}

.match-hora {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dorado);
  line-height: 1.2;
  margin: 2px 0;
}
.match-hora-utc { font-size: 0.67rem; color: #8a6a89; }
.match-venue { font-size: 0.68rem; color: #8a6a89; }

/* STATUS BADGES */
.status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.status-finalizado { background: #3d1f3d; color: #c4a8c3; }
.status-proximo    { background: rgba(222,75,40,0.15); color: var(--dorado); border: 1px solid rgba(222,75,40,0.4); }
.status-envivo {
  background: var(--rojo-vivo);
  color: #fff;
  animation: pulse-badge 1.3s infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,48,16,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(240,48,16,0); }
}

/* MATCH BODY */
.match-body {
  padding: 16px 14px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.team-flag { font-size: 2.2rem; line-height: 1; }
.team-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-1);
  line-height: 1.2;
  max-width: 80px;
  word-break: break-word;
}

.match-score {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.score-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text-1);
  min-width: 42px;
  text-align: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-sep { font-size: 1.6rem; color: var(--text-3); font-weight: 300; }

.score-input {
  width: 36px;
  height: 42px;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  background: var(--surface-2);
  outline: none;
  font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
  -moz-appearance: textfield;
}
.score-input::-webkit-inner-spin-button,
.score-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.score-input:focus { border-color: var(--dorado); box-shadow: 0 0 0 3px rgba(222,75,40,0.15); }

/* Match footer */
.match-footer {
  padding: 5px 14px 9px;
  font-size: 0.68rem;
  color: var(--text-3);
  text-align: center;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.match-footer.pronostico { color: var(--dorado); font-weight: 600; }
.match-footer.simultaneo { color: #e65100; }
.match-footer.saved { color: var(--verde-light); }

/* ===== POISSON PANEL ===== */
.poisson-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: var(--p-bg);
  border: none;
  cursor: pointer;
  color: var(--p-text);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background var(--t);
  border-top: 1px solid var(--p-border);
}

.poisson-toggle:hover { background: #2a1028; }

.poisson-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--p-accent);
}

.poisson-toggle-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
  color: var(--p-accent);
}
.poisson-toggle.open .poisson-toggle-arrow { transform: rotate(180deg); }

.poisson-content {
  background: var(--p-bg);
  border-top: 1px solid var(--p-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.poisson-content.open { max-height: 600px; }
.poisson-content-inner { padding: 12px 14px 14px; }

/* Probability bars */
.prob-bars {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.prob-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.prob-bar-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a6a89;
}

.prob-bar-pct {
  font-size: 1rem;
  font-weight: 900;
  color: var(--p-accent);
  font-variant-numeric: tabular-nums;
}

.prob-bar-track {
  width: 100%;
  height: 5px;
  background: #3d1a3d;
  border-radius: 3px;
  overflow: hidden;
}

.prob-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--p-accent);
  transition: width 0.5s ease;
}

.prob-bar-fill.fill-local  { background: #773076; }
.prob-bar-fill.fill-empate { background: #8a6a89; }
.prob-bar-fill.fill-visita { background: #DE4B28; }

/* Lambda display */
.lambda-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #8a6a89;
  margin-bottom: 8px;
}

.lambda-val {
  background: #3d1a3d;
  color: #c4a8c3;
  padding: 1px 6px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Top scores list */
.top-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.top-score-pill {
  background: #3d1a3d;
  color: #c4a8c3;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.top-score-pill .pct { color: var(--p-accent); }

/* ===== HEAT MAP ===== */
.heat-map-wrap {
  margin-top: 10px;
}

.heat-map-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a6a89;
  margin-bottom: 5px;
}

.heat-map {
  display: grid;
  gap: 2px;
  width: fit-content;
}

.hm-cell {
  width: 24px;
  height: 22px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.57rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.85);
}

.hm-header-cell {
  width: 24px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  color: #8a6a89;
}

/* ===== H2H PANEL ===== */
.h2h-panel {
  margin-top: 10px;
  border-top: 1px solid var(--p-border);
  padding-top: 10px;
}

.h2h-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a6a89;
  margin-bottom: 6px;
}

.h2h-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.h2h-bar-local  { background: #773076; }
.h2h-bar-empate { background: #8a6a89; }
.h2h-bar-visita { background: #DE4B28; }

.h2h-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.63rem;
  color: #8a6a89;
}

.h2h-recent {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h2h-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.67rem;
  color: #c4a8c3;
  padding: 2px 0;
  border-bottom: 1px solid #3d1a3d;
}

.h2h-match:last-child { border-bottom: none; }
.h2h-match-torneo { color: #8a6a89; font-size: 0.62rem; }
.h2h-match-result { font-weight: 700; color: var(--p-accent); }

/* ===== ESTADIO BADGE ===== */
.estadio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  font-size: 0.67rem;
  color: var(--text-2);
}

.altitud-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(222,75,40,0.12);
  border: 1px solid rgba(222,75,40,0.3);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  font-size: 0.65rem;
  color: var(--dorado);
  font-weight: 600;
}

/* ===== GROUP SECTION ===== */
.grupos-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(410px, 1fr));
  gap: 16px;
}

.grupo-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.grupo-header {
  background: var(--nav-bg);
  color: #e2e8f0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grupo-header h2 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.grupo-header-badge {
  background: var(--dorado);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 700;
  margin-left: auto;
}

/* Standings table */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.standings-table thead tr {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.standings-table th {
  padding: 6px 7px;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.standings-table th.text-left { text-align: left; }

.standings-table td {
  padding: 7px 7px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.standings-table td.text-left { text-align: left; }
.standings-table tbody tr:last-child td { border-bottom: none; }
.standings-table tbody tr:hover { background: var(--surface-2); }

.team-cell { display: flex; align-items: center; gap: 5px; font-weight: 500; }
.team-cell-flag { font-size: 1rem; }
.team-cell-name { font-size: 0.8rem; }
.pts-cell { font-weight: 700; font-size: 0.88rem; color: var(--text-1); }

/* Classification rows */
.row-clasif { background: var(--clasif-bg) !important; }
.row-clasif .team-cell-name { color: var(--clasif-txt); font-weight: 600; }
.row-chance { background: var(--chance-bg) !important; }
.row-chance .team-cell-name { color: var(--chance-txt); }
.row-eliminado { background: var(--elim-bg) !important; }
.row-eliminado .team-cell-name { color: var(--elim-txt); }
.row-corte td {
  padding: 0 !important;
  height: 0;
  border-top: 2px solid rgba(232,48,42,0.35) !important;
  border-bottom: none !important;
  background: transparent;
}

/* Pos numbers */
.pos-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border);
}
.pos-1 { background: var(--dorado); color: #fff; border-color: var(--dorado); }
.pos-2 { background: var(--verde); color: #fff; border-color: var(--verde); }
.pos-3 { background: #78909c; color: #fff; border-color: #78909c; }

/* Grupo match mini list */
.grupo-partidos-divider {
  padding: 7px 14px 5px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  background: var(--surface-2);
  border-top: 2px solid var(--border);
}

.grupo-partidos {
  background: var(--surface-2);
  border-top: none !important;
}

.grupo-partido-mini {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  gap: 7px;
  font-size: 0.77rem;
}

.grupo-partido-mini:first-child { padding-top: 10px; }
.grupo-partido-mini:last-child { border-bottom: none; }

.partido-mini-teams {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.partido-mini-vs { color: var(--text-3); font-size: 0.67rem; }

.partido-mini-score {
  font-weight: 700;
  min-width: 36px;
  text-align: center;
  color: var(--text-1);
}

.partido-mini-hora { font-size: 0.7rem; color: var(--text-3); white-space: nowrap; }

/* ===== TERCEROS TABLE ===== */
.terceros-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 18px;
}

.section-header {
  background: var(--nav-bg);
  color: #e2e8f0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h2 { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.3px; }

/* ===== FIXTURE PAGE ===== */
.jornada-section { margin-bottom: 22px; }

.jornada-header {
  background: var(--nav-bg);
  color: #c4a8c3;
  padding: 8px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dia-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 10px;
}

.dia-header {
  background: var(--verde);
  color: #fff;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ===== BRACKET ===== */
.bracket-wrapper { overflow-x: auto; padding: 14px 0; }

.bracket-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  min-width: 1080px;
  padding: 0 8px;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}

.round-label {
  text-align: center;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin-bottom: 8px;
  padding: 3px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.bracket-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
}

.bracket-match {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 10px;
  width: 188px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: box-shadow var(--t), border-color var(--t);
}

.bracket-match:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.bracket-match.argentina-track { border-top: 2px solid var(--dorado); }

.bracket-match-header {
  background: var(--surface-2);
  padding: 3px 7px;
  font-size: 0.62rem;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.bracket-team {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.bracket-team:last-child { border-bottom: none; }
.bracket-team-flag { font-size: 0.95rem; }
.bracket-team-name {
  flex: 1;
  font-size: 0.72rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.2;
  word-break: break-word;
}
.bracket-team-score {
  font-weight: 700;
  color: var(--text-1);
  min-width: 16px;
  text-align: center;
  font-size: 0.8rem;
}

.bracket-team.winner { background: var(--clasif-bg); }
.bracket-team.winner .bracket-team-name { font-weight: 700; color: var(--clasif-txt); }

.bracket-match-venue {
  padding: 3px 7px;
  font-size: 0.6rem;
  color: var(--text-3);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.bracket-round.round-final .bracket-match {
  width: 196px;
  border: 1px solid var(--dorado);
}

.bracket-round.round-final .bracket-match-header {
  background: rgba(222,75,40,0.12);
  color: var(--dorado);
  font-weight: 700;
}

/* ===== STATS / STAT CARD ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  text-align: center;
}

.stat-card-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.stat-card-value { font-size: 1.4rem; font-weight: 900; color: var(--text-1); }
.stat-card-sub { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }

/* ===== GOLEADORES TABLE ===== */
.goleadores-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.goleadores-table th {
  padding: 7px 10px;
  text-align: left;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.goleadores-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.goleadores-table tbody tr:last-child td { border-bottom: none; }
.goleadores-table tbody tr:hover { background: var(--surface-2); }

.gol-pos { font-weight: 700; color: var(--text-3); font-size: 0.82rem; }
.gol-pos-1 { color: var(--dorado); }
.gol-pos-2 { color: var(--text-2); }
.gol-pos-3 { color: #cd7f32; }

.gol-num {
  font-weight: 900;
  font-size: 1rem;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

/* ===== MONTE CARLO CHART ===== */
.mc-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.mc-team { width: 130px; font-weight: 600; display: flex; align-items: center; gap: 5px; }

.mc-bar-wrap {
  flex: 1;
  height: 20px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.mc-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--verde);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  align-items: center;
  padding-left: 6px;
}

.mc-bar-fill.arg { background: var(--naranja); }
.mc-pct { font-size: 0.73rem; font-weight: 700; color: var(--text-1); min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* ===== TIMELINE BAR ===== */
.timeline-bar {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 18px;
}

.timeline-bar-header {
  padding: 10px 14px;
  background: var(--nav-bg);
  color: #c4a8c3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.timeline-track {
  padding: 14px;
  display: flex;
  gap: 0;
  position: relative;
}

.timeline-phase {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-3);
  border: 1px solid var(--border);
  margin: 0 2px;
  background: var(--surface-2);
  transition: all var(--t);
}

.timeline-phase.active {
  background: var(--verde);
  border-color: var(--verde);
  color: #fff;
}

.timeline-phase.done {
  background: rgba(119,48,118,0.1);
  border-color: rgba(119,48,118,0.3);
  color: var(--verde);
}

.timeline-phase-date {
  font-size: 0.6rem;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 1px;
}

/* ===== COMPARADOR ===== */
.comparador-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.comparador-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
}

.comparador-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.comparador-flag { font-size: 2rem; }
.comparador-name { font-size: 1rem; font-weight: 700; }
.comparador-ranking { font-size: 0.72rem; color: var(--text-3); }

.comparador-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.comparador-stat:last-child { border-bottom: none; }
.comparador-stat-label { color: var(--text-3); }
.comparador-stat-val { font-weight: 700; color: var(--text-1); }
.comparador-stat-val.mejor { color: var(--verde-light); }

/* Selects for comparador */
.select-equipo {
  padding: 7px 10px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  width: 100%;
}

.select-equipo:focus { outline: none; border-color: var(--dorado); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  max-width: 480px;
  width: 100%;
}

.modal h3 { margin-bottom: 12px; font-size: 0.95rem; font-weight: 700; }

.modal-textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: monospace;
  font-size: 0.78rem;
  resize: vertical;
  line-height: 1.5;
  background: var(--surface-2);
  color: var(--text-1);
}

.modal-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }

/* ===== NOTIFICACION ===== */
.notificacion {
  position: fixed;
  top: 68px;
  right: 14px;
  z-index: 300;
  background: var(--verde);
  color: #fff;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: slide-in 0.25s ease;
  max-width: 280px;
}

@keyframes slide-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ===== PAGE TITLE ===== */
.page-title {
  padding: 14px 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
}

/* ===== LEGEND ===== */
.leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  margin-bottom: 12px;
  color: var(--text-2);
  align-items: center;
}

.leyenda::before {
  content: 'Referencia:';
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  margin-right: 4px;
}

.leyenda-item { display: flex; align-items: center; gap: 5px; }
.leyenda-box { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }

/* ===== FILTER TABS ===== */
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }

.filter-tab {
  padding: 4px 11px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-3);
  font-family: inherit;
  transition: all var(--t);
}

.filter-tab:hover { border-color: var(--verde); color: var(--verde); }
.filter-tab.active { background: var(--verde); border-color: var(--verde); color: #fff; }

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-3);
  font-size: 0.88rem;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--verde);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 0.86rem; }

/* ===== TABS ===== */
.tabs {
  display: inline-flex;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 14px;
}

.tab {
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-3);
  border: none;
  background: transparent;
  font-family: inherit;
  transition: all var(--t);
}

.tab.active { background: var(--surface); color: var(--verde); box-shadow: var(--shadow-sm); }

/* ===== SIMULADOR ===== */
.simulador-result {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  margin-top: 10px;
}

.simulador-grupo { margin-bottom: 10px; }

.simulador-grupo h4 {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  color: var(--text-2);
}

.sim-team {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  margin-bottom: 2px;
  color: var(--text-1);
}

.sim-team.clasif { background: var(--clasif-bg); color: var(--clasif-txt); }
.sim-team.chance { background: var(--chance-bg); color: var(--chance-txt); }
.sim-team.eliminado { background: var(--elim-bg); color: var(--elim-txt); }

/* ===== ERROR ===== */
.error-msg {
  background: rgba(204,34,0,0.08);
  border: 1px solid rgba(204,34,0,0.3);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--rojo);
  font-size: 0.84rem;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== PREDICCIONES PAGE ===== */
.pred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.pred-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pred-card-header {
  background: var(--p-bg);
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--p-accent);
  letter-spacing: 0.3px;
}

.pred-card-body { padding: 14px; }

/* ===== PRED SPLIT ===== */
.pred-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .pred-split { grid-template-columns: 1fr; }
}

/* ===== FOOTER INSTITUCIONAL ===== */
.site-footer {
  background: var(--nav-bg);
  border-top: 1px solid rgba(119,48,118,0.3);
  margin-top: 40px;
  padding: 20px 16px;
}

.site-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.site-footer-main {
  font-size: 0.84rem;
  color: #c4a8c3;
  font-weight: 500;
}

.footer-link-diac {
  color: var(--purpura-light);
  text-decoration: none;
  font-weight: 700;
  transition: color var(--t);
}

.footer-link-diac:hover { color: #fff; }

.site-footer-links {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.76rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer-links a {
  color: #8a6a89;
  text-decoration: none;
  transition: color var(--t);
}

.site-footer-links a:hover { color: var(--purpura-light); }
.site-footer-links span   { color: #3d1f3d; }

.site-footer-copy {
  font-size: 0.68rem;
  color: #5a4a5a;
  margin-top: 2px;
}

.site-footer-copy a {
  color: #773076;
  text-decoration: none;
}

.site-footer-copy a:hover { color: var(--purpura-light); }

@media (max-width: 640px) {
  .site-footer-main { font-size: 0.78rem; }
  .site-footer-links { font-size: 0.7rem; gap: 6px; }
}

@media (max-width: 768px) {
  .grupos-layout { grid-template-columns: 1fr; }
  .partidos-grid { grid-template-columns: 1fr; }
  .bracket-match { width: 155px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-brand { font-size: 0.9rem; }
  .comparador-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-brand { display: none; }
  .nav-links a { padding: 13px 11px; font-size: 0.8rem; }
  .nav-links a.active {
    background: rgba(222,75,40,0.12);
    border-radius: 6px 6px 0 0;
  }
}

@media (max-width: 480px) {
  .container { padding: 8px 10px; }
  .score-num { font-size: 1.8rem; }
  .team-flag { font-size: 1.8rem; }
  .toolbar { padding: 7px 10px; row-gap: 8px; }
  .pred-grid { grid-template-columns: 1fr; }

  /* Ocultar G/E/P individuales — queda PJ, GF, GC, DG, Pts */
  .standings-table th:nth-child(4),
  .standings-table th:nth-child(5),
  .standings-table th:nth-child(6),
  .standings-table td:nth-child(4),
  .standings-table td:nth-child(5),
  .standings-table td:nth-child(6) { display: none; }

  .standings-table th, .standings-table td { padding: 6px 4px; }
  .team-cell-name { font-size: 0.72rem; }
}

.sync-live::after {
  content: ' ↻';
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* ===== FILTROS TEMPORALES FIXTURE ===== */
.tiempo-tabs { gap: 4px; }

.tiempo-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-3);
  font-family: inherit;
  transition: all var(--t);
  white-space: nowrap;
}

.tiempo-tab:hover { border-color: var(--verde); color: var(--verde); }

.tiempo-tab.active {
  background: var(--verde);
  border-color: var(--verde);
  color: #fff;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.tiempo-tab:not(.active) .filter-count {
  background: var(--surface-2);
  color: var(--text-2);
}

.dia-header .hoy-badge {
  display: inline-block;
  background: var(--rojo-vivo);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  margin-right: 6px;
  animation: pulse-badge 1.3s infinite;
}

/* ===== PREDICCIONES — CARDS EXPANDIDAS ===== */
.pred-proximos-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.pred-card-expanded {
  border: 1px solid var(--border);
}

.pred-card-expanded .poisson-content.open {
  max-height: 900px;
}

/* ===== FORMA RECIENTE ===== */
.forma-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.forma-g { background: var(--clasif-bg); color: var(--clasif-txt); }
.forma-e { background: var(--chance-bg); color: var(--chance-txt); }
.forma-p { background: var(--elim-bg);   color: #666; }

/* ===== MONTE CARLO — AJUSTE ===== */
.mc-bar-wrap { height: 26px; }
.mc-row { font-size: 0.8rem; }
.mc-team { width: 150px; }

/* ===== SCORE SIN DATO (en vivo sin API) ===== */
.score-sin-dato {
  color: var(--text-3);
  font-size: 1.4rem;
}

/* ===== EVENTOS DEL PARTIDO ===== */
.eventos-partido {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.evt-minuto-actual {
  font-size: 0.7rem;
  color: var(--rojo-vivo);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.evt-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  color: var(--text-2);
  line-height: 1.3;
}

.evt-min {
  min-width: 28px;
  font-weight: 700;
  color: var(--text-3);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.evt-gol       { color: var(--text-1); }
.evt-gol strong{ color: var(--text-1); }
.evt-asist     { color: var(--text-3); font-size: 0.68rem; }
.evt-tarjeta   { color: var(--text-2); }
.evt-cambio    { color: var(--text-3); font-size: 0.7rem; }
.evt-entra     { color: var(--verde-light); font-weight: 600; }
.evt-sale      { color: var(--text-3); }

/* ===== SCORING ===== */
.score-exacto  td { background: rgba(222,75,40,0.06); }
.score-correcto td { background: rgba(119,48,118,0.06); }
.score-fallo   td { background: transparent; }

.scoring-tipo {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== SORPRESA POISSON ===== */
.sorpresa-badge {
  padding: 5px 14px;
  background: rgba(240,48,16,0.08);
  border-top: 1px solid rgba(240,48,16,0.2);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--rojo-vivo);
  text-align: center;
  letter-spacing: 0.3px;
}

.sorpresa-badge.gran-sorpresa {
  background: rgba(240,48,16,0.15);
  border-top-color: rgba(240,48,16,0.4);
  animation: sorpresa-pulse 2s infinite;
}

@keyframes sorpresa-pulse {
  0%, 100% { background: rgba(240,48,16,0.15); }
  50%       { background: rgba(240,48,16,0.25); }
}

/* ===== PERFIL DE EQUIPO ===== */
.modal-perfil { max-width: 520px; padding: 16px; }

.perfil-equipo {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.perfil-header {
  background: var(--nav-bg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
}

.perfil-flag    { font-size: 2.8rem; line-height: 1; }
.perfil-nombre  { font-size: 1rem; font-weight: 700; }
.perfil-sub     { font-size: 0.72rem; color: #8a6a89; margin-top: 2px; }

.perfil-prob-campeon {
  margin-left: auto;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--dorado);
  line-height: 1.2;
}

/* ===== MONTE CARLO BRACKET ===== */
.bracket-mc-prob {
  font-size: 0.58rem;
  color: var(--verde-light);
  font-weight: 700;
  margin-left: auto;
  margin-right: 3px;
  opacity: 0.8;
}

/* ===== CAMINO AL TÍTULO ===== */
.camino-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}
.camino-step:last-child { border-bottom: none; }
.camino-icon  { font-size: 0.9rem; flex-shrink: 0; }
.camino-ronda { font-weight: 700; color: var(--text-2); min-width: 80px; font-size: 0.74rem; }
.camino-rival { color: var(--text-1); }

/* ===== LINEUPS ===== */
.lineup-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 10px 14px;
  background: var(--p-bg);
}

.lineup-col { padding: 0 6px; }

.lineup-team-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--p-accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lineup-titulo {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a6a89;
  margin: 6px 0 3px;
}

.lineup-jugador {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  font-size: 0.72rem;
  color: #c4a8c3;
  border-bottom: 1px solid #3d1a3d;
}
.lineup-jugador:last-child { border-bottom: none; }

.lineup-num {
  min-width: 18px;
  font-weight: 700;
  color: var(--p-accent);
  font-size: 0.68rem;
  text-align: right;
}

.lineup-pos {
  margin-left: auto;
  font-size: 0.6rem;
  color: #8a6a89;
  background: #3d1a3d;
  padding: 0 4px;
  border-radius: 2px;
}

/* ===== SYNC PENDIENTE ===== */
.match-footer.sync-pendiente {
  color: var(--naranja);
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  padding: 6px 14px;
  border-top: 1px solid rgba(222,75,40,0.2);
  background: rgba(222,75,40,0.05);
}

/* ===== EXTRA INFO PARTIDO ===== */
.match-extra-info {
  padding: 4px 14px 6px;
  font-size: 0.67rem;
  color: var(--text-3);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}

.stats-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.stats-bar-inner::-webkit-scrollbar { display: none; }

.stats-bar-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  font-size: 0.78rem;
}

.stats-bar-item:first-child { padding-left: 0; }
.stats-bar-item:last-child  { border-right: none; }

.stats-bar-icon  { font-size: 0.9rem; }
.stats-bar-val   { font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.stats-bar-label { color: var(--text-3); font-size: 0.7rem; }

/* ===== NOTIF GOL ===== */
.notif-gol {
  background: var(--purpura-dark);
  border-left: 4px solid var(--naranja);
  font-size: 0.84rem;
  max-width: 320px;
  line-height: 1.4;
  padding: 12px 16px;
}

/* ===== AUTH ===== */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 0 auto;
}
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-label { font-size: 0.78rem; color: var(--text-2); font-weight: 500; }
.auth-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-1);
  font-size: 0.9rem;
  padding: 9px 12px;
  width: 100%;
  transition: border-color .2s;
}
.auth-input:focus { border-color: var(--purpura); outline: none; }
.auth-error {
  background: rgba(232,48,42,0.1);
  border: 1px solid rgba(232,48,42,0.3);
  border-radius: 6px;
  color: #e8302a;
  font-size: 0.82rem;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.auth-submit { margin-top: 6px; }

/* ===== NAV AUTH ===== */
.nav-auth { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-username { font-size: 0.78rem; color: var(--text-2); }
.nav-btn-small { font-size: 0.75rem !important; padding: 4px 12px !important; border-radius: 20px !important; }

/* ===== ANALYTICS — prob bars ===== */
.prob-bars { display: flex; flex-direction: column; gap: 10px; }
.prob-bar-col { display: flex; flex-direction: column; gap: 3px; }
.prob-bar-label { font-size: 0.78rem; color: var(--text-2); }
.prob-bar-pct { font-size: 0.72rem; color: var(--text-3); }
.prob-bar-track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.prob-bar-fill { height: 100%; border-radius: 5px; transition: width .6s ease; }
.fill-local   { background: var(--purpura); }
.fill-empate  { background: #64748b; }
.fill-visita  { background: var(--naranja); }

/* ===== ESCENARIOS ===== */
.escenario-impacto {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 6px 10px;
}

/* ===== QUINIELA RANKING ===== */
tr.mi-fila { background: rgba(119,48,118,0.15) !important; font-weight: 600; }

/* ===== DIVISOR DE SECCIONES ===== */
.seccion-divisor {
  height: 28px;
  display: flex;
  align-items: center;
  margin: 0 0 4px;
  position: relative;
}
.seccion-divisor::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ===== NAV MOBILE ===== */
@media (max-width: 768px) {
  .nav-links {
    -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 80%, transparent 100%);
  }
  .nav-links a {
    padding: 13px 10px;
    font-size: 0.76rem;
  }
  .nav-links a[href="historico.php"] {
    display: none;
  }
}

/* ===== BREADCRUMB MOBILE ===== */
.page-breadcrumb {
  padding: 5px 16px;
  font-size: 0.7rem;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: none;
}
.breadcrumb-sep     { margin: 0 5px; }
.breadcrumb-current { color: var(--purpura-light); font-weight: 600; }
@media (max-width: 640px) {
  .page-breadcrumb { display: block; }
}
