/* =====================================================
   POLLA MUNDIAL 2026 — Estética inspirada en Fintual
   Mucho aire, tipografía bold, amarillo como acento,
   fondos blancos limpios, formas pill. Toques mundialistas
   en rojo/azul/verde como acentos secundarios.
   ===================================================== */

:root {
  /* ----- Paleta oficial FIFA (azul oscuro + blanco + negro) ----- */
  --c-bg:           #f4f6fa;     /* gris muy claro azulado */
  --c-bg-alt:       #e8edf5;
  --c-surface:      #ffffff;
  --c-ink:          #020f2a;     /* azul casi negro FIFA */
  --c-ink-2:        #0d1b3d;
  --c-muted:        #5a6378;
  --c-line:         #d8def0;
  --c-line-2:       #c2cae0;

  /* FIFA navy (color principal) */
  --c-navy:         #020f2a;     /* MISMO theme-color que usa fifa.com */
  --c-navy-2:       #0d1b3d;
  --c-navy-3:       #1a2d5e;
  --c-navy-soft:    #e0e6f3;

  /* Acentos sobrios — usados con moderación */
  --c-yellow:       #ffd400;     /* dorado/trofeo */
  --c-yellow-deep:  #d4af00;
  --c-yellow-soft:  #fff5c2;

  --c-red:          #c8102e;     /* rojo FIFA */
  --c-red-deep:     #960c22;
  --c-orange:       #ff7a1a;
  --c-green:        #00853e;
  --c-green-deep:   #00682f;
  --c-pink-soft:    #fde2e6;
  --c-blue-soft:    #e0f2fe;
  --c-mint-soft:    #d1fadf;

  /* Tipografía */
  --font-sans:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display:   'Inter', system-ui, sans-serif; /* mismo, pero usado en pesos altos */
  --font-mono:      'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Radios — Fintual usa formas muy redondeadas */
  --r-xs:    8px;
  --r-sm:    12px;
  --r-md:    18px;
  --r-lg:    24px;
  --r-xl:    32px;
  --r-pill:  999px;

  /* Sombras suaves */
  --shadow-xs:  0 1px 2px rgba(15,19,30,.04);
  --shadow-sm:  0 2px 8px rgba(15,19,30,.05);
  --shadow-md:  0 6px 24px rgba(15,19,30,.07);
  --shadow-lg:  0 16px 48px rgba(15,19,30,.10);

  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 17px;          /* Fintual usa tipografía grande */
  line-height: 1.5;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
a { color: var(--c-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--c-navy); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ----- Tipografía Fintual: muy grande y bold ----- */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; color: var(--c-ink); }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.4rem; line-height: 1.2; }
h4 { font-size: 1.1rem; }
.subtitle { color: var(--c-muted); font-size: 1.05rem; font-weight: 500; line-height: 1.5; }
p { font-size: 1rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 8px;
}

/* ===================================================
   HEADER — FIFA navy, blanco, sticky
=================================================== */
.app-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--c-navy);
  border-bottom: 2px solid #000;
  display: flex; align-items: center;
  padding: 0 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.app-header .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: white;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.app-header .brand .badge-26 {
  background: var(--c-yellow);
  color: var(--c-navy);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 800;
}
.app-header nav {
  display: flex; gap: 4px;
  margin-left: auto;
  align-items: center;
}
.app-header nav a {
  color: rgba(255,255,255,0.85);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.app-header nav a:hover { background: rgba(255,255,255,0.10); color: white; }
.app-header nav a.active { background: white; color: var(--c-navy); }

.app-header .user-chip {
  display: flex; align-items: center; gap: 10px;
  margin-left: 8px;
  padding: 4px 14px 4px 4px;
  background: rgba(255,255,255,0.10);
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
}
.app-header .user-chip:hover { background: rgba(255,255,255,0.18); }
.app-header .user-chip .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-red);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: white;
}

/* ===================================================
   LAYOUT
=================================================== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 32px;
}
.container-narrow { max-width: 640px; margin: 0 auto; padding: 48px 32px; }

.page-title-row {
  display: flex; align-items: end; gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.page-title-row .grow { flex: 1; min-width: 240px; }

/* Section spacing */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--c-line); }

/* Hero bloque destacado */
.hero {
  background: var(--c-yellow);
  border-radius: var(--r-xl);
  padding: 48px 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.hero p { font-size: 1.15rem; max-width: 540px; margin-top: 12px; color: var(--c-ink-2); }
.hero .deco {
  position: absolute; right: -40px; bottom: -40px;
  font-size: 14rem; opacity: 0.15; line-height: 1;
  pointer-events: none;
  transform: rotate(-12deg);
}

/* Hero épico con imagen de fondo + overlay oscuro y texto blanco */
.hero-image {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 32px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 40px;
  color: white;
  background:
    linear-gradient(135deg, rgba(10,23,51,0.78) 0%, rgba(193,18,31,0.55) 100%),
    url('/assets/hero-bg.png') center/cover no-repeat;
  background-color: var(--c-navy);
  box-shadow: var(--shadow-lg);
}
.hero-image .eyebrow {
  color: var(--c-yellow);
  letter-spacing: 0.12em;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.hero-image h1 {
  color: white;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  margin: 4px 0 8px;
}
.hero-image p {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  max-width: 600px;
}
.hero-image .wc-logo {
  position: absolute;
  right: 32px; top: 32px;
  width: 90px; height: 90px;
  background: url('/assets/wc2026-logo.png') center/contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  pointer-events: none;
}
@media (max-width: 600px) {
  .hero-image .wc-logo { width: 60px; height: 60px; right: 16px; top: 16px; }
  .hero-image { padding: 36px 22px; min-height: 280px; }
}

/* Caja de cada cifra del countdown */
.cd-cell {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 18px 22px;
  border-radius: 14px;
  min-width: 100px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.cd-cell .cd-num {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  letter-spacing: -0.02em;
}
.cd-cell .cd-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-yellow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}
@media (max-width: 600px) {
  .cd-cell { padding: 12px 14px; min-width: 70px; }
  .cd-cell .cd-num { font-size: 2rem; }
}

/* ===================================================
   CARDS — limpias, bordes sutiles
=================================================== */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
  padding: 28px;
  transition: box-shadow .15s, transform .12s;
}
.card.hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); cursor: pointer; }
.card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.card-header h3 { margin: 0; font-size: 1.2rem; }
.card-header .pill { margin-left: auto; }
.card-tinted-yellow { background: var(--c-yellow-soft); border-color: var(--c-yellow-soft); }
.card-tinted-pink   { background: var(--c-pink-soft);   border-color: var(--c-pink-soft); }
.card-tinted-blue   { background: var(--c-blue-soft);   border-color: var(--c-blue-soft); }
.card-tinted-mint   { background: var(--c-mint-soft);   border-color: var(--c-mint-soft); }
.card-tinted-dark   { background: var(--c-ink); color: white; border-color: var(--c-ink); }
.card-tinted-dark h1, .card-tinted-dark h2, .card-tinted-dark h3 { color: white; }

/* ===================================================
   BOTONES — pill, generosos
=================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--c-ink);
  color: white;
}
.btn-primary:hover { background: var(--c-navy-2); }

.btn-yellow {
  background: var(--c-yellow);
  color: var(--c-ink);
}
.btn-yellow:hover { background: var(--c-yellow-deep); }

.btn-secondary {
  background: var(--c-bg-alt);
  color: var(--c-ink);
}
.btn-secondary:hover { background: var(--c-line-2); }

.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1.5px solid var(--c-line-2);
}
.btn-ghost:hover { background: var(--c-bg-alt); border-color: var(--c-ink); }

.btn-danger { background: var(--c-red); color: white; }
.btn-danger:hover { background: var(--c-red-deep); }
.btn-success { background: var(--c-green-deep); color: white; }

.btn-sm  { padding: 8px 16px; font-size: 0.88rem; }
.btn-lg  { padding: 18px 32px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ===================================================
   FORMS — grandes, claros
=================================================== */
.form-group {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-ink);
}
.form-group .help {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-top: 4px;
  font-weight: 400;
}
.input, .select, .textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-line-2);
  border-radius: var(--r-md);
  transition: border-color .12s, box-shadow .12s;
  color: var(--c-ink);
  font-size: 1rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-ink);
}
.input.error { border-color: var(--c-red); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ===================================================
   PILLS / BADGES
=================================================== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}
.pill-grey   { background: var(--c-bg-alt); color: var(--c-muted); }
.pill-blue   { background: var(--c-blue-soft); color: #1c4f7a; }
.pill-red    { background: var(--c-pink-soft); color: var(--c-red-deep); }
.pill-green  { background: var(--c-mint-soft); color: var(--c-green-deep); }
.pill-yellow { background: var(--c-yellow); color: var(--c-ink); }
.pill-dark   { background: var(--c-ink); color: white; }
.pill-live   {
  background: var(--c-red);
  color: white;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(230,57,70,.6); }
  50%     { box-shadow: 0 0 0 6px rgba(230,57,70,0); }
}

/* ===================================================
   MATCH CARDS — limpio, minimalista
=================================================== */
.match-card {
  background: var(--c-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  transition: border-color .15s, transform .12s;
  text-decoration: none;
  color: inherit;
}
.match-card:hover { border-color: var(--c-ink); transform: translateY(-1px); }
.match-card .team {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.match-card .team.home { justify-content: flex-end; text-align: right; }
.match-card .team .flag {
  width: 40px; height: 30px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--c-bg-alt);
}
.match-card .team .name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-card .vs {
  text-align: center;
  min-width: 96px;
  padding: 0 8px;
}
.match-card .vs .score {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  line-height: 1;
}
.match-card .vs .scheduled {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  line-height: 1;
}
.match-card .vs .meta {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-top: 4px;
  font-weight: 500;
}
.match-card.live { border-color: var(--c-red); }
.match-card.finished { background: var(--c-bg-alt); }

.match-meta-row {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.85rem;
  color: var(--c-muted);
  margin: 12px 4px 0;
  flex-wrap: wrap;
}

/* ===================================================
   PREDICCIÓN INPUT
=================================================== */
.score-input {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  margin: 24px 0 16px;
}
.score-input input {
  width: 88px;
  height: 88px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 2.6rem;
  font-weight: 800;
  border: 2px solid var(--c-line-2);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-ink);
  letter-spacing: -0.02em;
}
.score-input input:focus {
  outline: none;
  border-color: var(--c-ink);
}
.score-input .dash {
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-line-2);
}

/* ===================================================
   LEADERBOARD — Fintual style
=================================================== */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: end;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 40px;
}
.podium .step {
  text-align: center;
  padding: 24px 16px 20px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  position: relative;
  font-weight: 700;
}
.podium .step .crown { font-size: 2.2rem; margin-bottom: 6px; }
.podium .step .name {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.podium .step .pts {
  font-size: 1.3rem;
  font-weight: 800;
}
.podium .step .pts small { font-size: 0.7rem; font-weight: 600; opacity: .7; }
.podium .first  { background: var(--c-yellow); color: var(--c-ink); height: 200px; }
.podium .second { background: var(--c-bg-alt); color: var(--c-ink); height: 160px; border: 1px solid var(--c-line); }
.podium .third  { background: var(--c-pink-soft); color: var(--c-ink); height: 130px; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-line);
}
.lb-table th, .lb-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--c-line);
}
.lb-table th {
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tbody tr:hover { background: var(--c-bg); }
.lb-table .rank {
  font-weight: 800;
  font-size: 1.2rem;
  width: 50px;
  color: var(--c-muted);
}
.lb-table .rank.top1 { color: var(--c-yellow-deep); }
.lb-table .rank.top2 { color: var(--c-muted); }
.lb-table .rank.top3 { color: #cd7f32; }

.lb-table .player { display: flex; align-items: center; gap: 12px; }
.lb-table .player .jersey {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.lb-table .pts-cell {
  text-align: right;
  font-weight: 800;
  font-size: 1.05rem;
}

/* ===================================================
   REACCIONES (emoji)
=================================================== */
.reactions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
}
.reaction {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--c-bg-alt);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform .1s, background .15s;
  user-select: none;
}
.reaction:hover { background: var(--c-line-2); transform: scale(1.05); }
.reaction.mine { background: var(--c-yellow); border-color: var(--c-yellow-deep); }
.reaction .count { font-size: 0.82rem; color: var(--c-muted); font-weight: 700; }
.reaction.mine .count { color: var(--c-ink); }
.reaction-add {
  display: inline-flex; align-items: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1.5px dashed var(--c-line-2);
  border-radius: 50%;
  color: var(--c-muted);
  justify-content: center;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.reaction-add:hover { color: var(--c-ink); border-color: var(--c-ink); }

/* ===================================================
   AUTH (login/registro) — fondo navy con card blanca
=================================================== */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-2) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-line);
  padding: 48px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
}
.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-card .auth-logo h1 {
  font-size: 2rem;
  display: inline-block;
  background: var(--c-navy);
  color: white;
  padding: 8px 18px;
  border-radius: var(--r-md);
  letter-spacing: -0.02em;
}
.auth-card .auth-logo .subtitle { margin-top: 16px; }

.auth-tabs {
  display: flex; gap: 4px;
  background: var(--c-bg-alt);
  border-radius: var(--r-pill);
  padding: 4px;
  margin-bottom: 32px;
}
.auth-tabs button {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-muted);
}
.auth-tabs button.active {
  background: var(--c-ink);
  color: white;
}

/* ===================================================
   TABS / GROUP nav — pill style
=================================================== */
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--c-bg-alt);
  border-radius: var(--r-pill);
}
.tabs button {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--c-muted);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.tabs button.active {
  background: var(--c-ink);
  color: white;
}
.tabs button:hover:not(.active) { color: var(--c-ink); }

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

/* ===================================================
   ALERTS / TOAST
=================================================== */
.alert {
  padding: 16px 20px;
  border-radius: var(--r-md);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex; align-items: start; gap: 12px;
}
.alert .icon { font-size: 1.2rem; flex-shrink: 0; }
.alert-info    { background: var(--c-blue-soft); color: #1c4f7a; }
.alert-success { background: var(--c-mint-soft); color: var(--c-green-deep); }
.alert-warn    { background: var(--c-yellow-soft); color: #6a5500; }
.alert-error   { background: var(--c-pink-soft); color: var(--c-red-deep); }

.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--c-ink);
  color: white;
  padding: 14px 20px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 260px;
  animation: slideUp .25s ease-out;
}
.toast.success { background: var(--c-green-deep); }
.toast.error   { background: var(--c-red-deep); }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ===================================================
   LOADER / EMPTY
=================================================== */
.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--c-line);
  border-top-color: var(--c-ink);
  border-radius: 50%;
  animation: spin .9s linear infinite;
  margin: 32px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh;
  color: var(--c-muted);
}
.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--c-muted);
}
.empty .emoji { font-size: 4rem; margin-bottom: 16px; }
.empty h3 { color: var(--c-ink); margin-bottom: 8px; }

/* ===================================================
   MODAL
=================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,19,30,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 200;
  animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  padding: 36px;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.modal-header h2 { margin: 0; }
.modal-close {
  margin-left: auto;
  background: var(--c-bg-alt);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--c-ink);
  width: 36px; height: 36px;
  border-radius: 50%;
}
.modal-close:hover { background: var(--c-line-2); }

/* ===================================================
   STAT BLOCKS (Fintual usa mucho)
=================================================== */
.stat {
  padding: 24px;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
}
.stat .stat-label {
  font-size: 0.85rem;
  color: var(--c-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat .stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--c-ink);
}
.stat .stat-hint {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-top: 4px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .container { padding: 32px 20px; }
  .container-narrow { padding: 32px 20px; }
  .app-header { padding: 0 16px; }
  .app-header nav { gap: 0; }
  .app-header nav a { padding: 6px 10px; font-size: 0.85rem; }
  .app-header .user-chip span:not(.avatar) { display: none; }
  .match-card { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
  .match-card .team.home { justify-content: flex-start; text-align: left; }
  .match-card .vs { display: flex; gap: 16px; align-items: baseline; justify-content: center; }
  .auth-card { padding: 32px 24px; }
  .hero { padding: 32px 24px; }
}

/* ===================================================
   UTILITIES
=================================================== */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-muted  { color: var(--c-muted); }
.text-bold   { font-weight: 800; }
.font-mono   { font-family: var(--font-mono); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-sm  { font-size: 0.9rem; }
.fs-lg  { font-size: 1.15rem; }
.hidden { display: none !important; }
.flex-1 { flex: 1; }

/* Predicción ajena oculta hasta que se cierre */
.locked-veil {
  background: var(--c-bg-alt);
  border-radius: var(--r-md);
  padding: 24px;
  text-align: center;
  color: var(--c-muted);
  font-size: 0.95rem;
}
.locked-veil .lock-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }

/* =====================================================
   MOBILE FIRST OPTIMIZATIONS
   Bottom nav, sheets, touch targets, responsive tables
===================================================== */

/* Mejor scroll y touch */
html {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  overscroll-behavior-y: none;
  /* Soporta safe-area de iPhone (notch) */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Inputs nativos con tipografía consistente y sin zoom-on-focus en iOS */
input, select, textarea, button {
  font-size: 16px !important;
}

/* ========== BOTTOM NAV (mobile) ========== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-navy);
  border-top: 1px solid #000;
  z-index: 90;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -2px 14px rgba(0,0,0,0.2);
}
.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  max-width: 100%;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 600;
  border-radius: 10px;
  min-height: 50px;
  transition: background .12s, color .12s;
}
.bottom-nav a .ic { font-size: 1.3rem; line-height: 1; }
.bottom-nav a:hover { color: white; }
.bottom-nav a.active { background: rgba(255,255,255,0.12); color: var(--c-yellow); }

/* ========== AJUSTES MOBILE ========== */
@media (max-width: 768px) {
  body {
    /* Espacio inferior para el bottom nav */
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0)) !important;
  }

  .bottom-nav { display: block; }

  /* Header mobile: simplificado, oculta nav (la usaremos en bottom) */
  .app-header {
    padding: 0 16px;
    height: 60px;
  }
  .app-header .brand {
    font-size: 1rem;
  }
  .app-header nav {
    /* Esconder los links principales, dejar solo user-chip + pollas */
    gap: 0;
  }
  .app-header nav a:not(.user-chip):not([href="/pollas"]) {
    display: none;
  }
  .app-header .user-chip {
    padding: 4px 8px;
  }
  .app-header .user-chip .avatar {
    width: 28px; height: 28px; font-size: 0.7rem;
  }
  .app-header nav a[href="/pollas"] {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  /* Container con menos padding */
  .container { padding: 20px 14px; }
  .container-narrow { padding: 20px 14px; }

  /* Hero más compacto */
  .hero-image {
    padding: 28px 18px;
    min-height: 240px;
  }
  .hero-image h1 { font-size: 1.5rem; line-height: 1.15; }
  .hero-image p { font-size: 0.9rem; }
  .hero-image .wc-logo {
    width: 56px; height: 56px;
    right: 14px; top: 14px;
  }
  .cd-cell {
    padding: 10px 8px;
    min-width: 60px;
  }
  .cd-cell .cd-num { font-size: 1.6rem; }
  .cd-cell .cd-lbl { font-size: 0.62rem; }

  /* Page titles más pequeños */
  h1 { font-size: 1.7rem !important; }
  h2 { font-size: 1.3rem !important; }
  h3 { font-size: 1.05rem !important; }
  .subtitle { font-size: 0.92rem; }

  /* Stats grid una columna */
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .stat { padding: 16px; }
  .stat .stat-value { font-size: 1.5rem; }

  /* Cards más compactas */
  .card { padding: 16px; border-radius: 14px; }

  /* Match cards (versión normal) */
  .match-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }
  .match-card .team.home { justify-content: flex-start; text-align: left; }
  .match-card .vs { display: flex; gap: 12px; align-items: center; justify-content: center; }
  .match-card .vs .score { font-size: 1.4rem; }
  .match-card .vs .scheduled { font-size: 1.1rem; }

  /* Tabs como scroll horizontal */
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  /* Standings table — todas las columnas más compactas */
  .standings-table th, .standings-table td,
  .lb-table th, .lb-table td {
    padding: 6px 3px !important;
    font-size: 0.78rem !important;
  }
  table { font-size: 0.78rem; }

  /* Group cards (en Predicciones y Grupos) — full width */
  .container > div[style*="grid-template-columns:repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }

  /* Predicción inline (matches.js) */
  [data-match] input[type="number"] {
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
  }
  [data-match] .fw-700 { font-size: 0.78rem !important; }

  /* Forms más cómodos para tipear */
  .input, .select, .textarea {
    padding: 12px 14px;
    border-radius: 14px;
  }

  /* Botones full-width en formularios */
  .btn-block { padding: 14px; }
  .btn { padding: 12px 18px; font-size: 0.92rem; min-height: 44px; }
  .btn-sm { padding: 8px 12px; font-size: 0.8rem; min-height: 36px; }
  .btn-lg { padding: 16px 24px; font-size: 1rem; }

  /* Modal preview de partido = full screen sheet en mobile */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0));
    animation: slideUpSheet .25s ease-out;
  }
  @keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .modal-header h2 { font-size: 1.1rem !important; }
  .modal-close {
    width: 32px; height: 32px;
    font-size: 1.1rem;
  }

  /* En el modal, comparativas y secciones más compactas */
  .modal [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .modal img[style*="width:80px"] {
    width: 60px !important;
    height: 45px !important;
  }
  .modal h3 { font-size: 1rem !important; }

  /* Auth card usable */
  .auth-card { padding: 28px 20px; border-radius: 20px; }
  .auth-card .auth-logo h1 { font-size: 1.4rem; padding: 6px 12px; }

  /* Pollas list cards */
  .card.hover { padding: 16px; }

  /* Toast más arriba (no tapar bottom nav) */
  .toast-container {
    bottom: calc(80px + env(safe-area-inset-bottom, 0));
    right: 12px; left: 12px;
  }
  .toast { min-width: auto; width: 100%; font-size: 0.88rem; padding: 12px 16px; }

  /* Reactions más toqueables */
  .reaction { padding: 8px 12px; min-height: 36px; }
  .reaction-add { width: 36px; height: 36px; }

  /* Score input grande para Match Detail */
  .score-input input {
    width: 70px !important;
    height: 70px !important;
    font-size: 2rem !important;
  }
}

@media (max-width: 380px) {
  /* Pantallas pequeñas (iPhone SE, etc.) */
  .container { padding: 16px 10px; }
  .hero-image { padding: 22px 14px; min-height: 200px; }
  .hero-image h1 { font-size: 1.3rem; }
  .cd-cell { padding: 8px 6px; min-width: 52px; }
  .cd-cell .cd-num { font-size: 1.3rem; }
  .bottom-nav a { font-size: 0.6rem; padding: 6px 2px; }
  .bottom-nav a .ic { font-size: 1.15rem; }
  [data-match] input[type="number"] {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.92rem !important;
  }
}

/* Animación entrada suave de modal en desktop también */
.modal { animation: scaleIn .15s ease-out; }
@keyframes scaleIn {
  from { transform: scale(.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Active scale para feedback táctil */
.btn:active, .reaction:active, .card.hover:active {
  transform: scale(0.97);
}

/* ===================================================
   FIX MOBILE: safe area iPhone (status bar) + scroll tables
=================================================== */
@media (max-width: 768px) {
  /* Header NO debe quedar bajo el notch/status bar de iOS */
  .app-header {
    padding-top: env(safe-area-inset-top, 0);
    height: calc(60px + env(safe-area-inset-top, 0));
  }
  /* Tablas siempre con scroll horizontal en mobile (las del card de grupo) */
  .card div[style*="overflow-x:auto"],
  .container div[style*="overflow-x:auto"] {
    margin: 0 -8px;
    padding: 0 8px;
  }
  /* Tablas de standings: forzar columnas más estrechas */
  .standings-table {
    min-width: 360px;
  }
}

/* ===================================================
   FIX MOBILE V2: prevenir scroll horizontal global
   y simplificar tablas estrechas
=================================================== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

@media (max-width: 768px) {
  /* Remover el min-width que forzaba scroll (lo agregué antes y era un error) */
  .standings-table { min-width: 0 !important; }

  /* Prevenir overflow en todos los contenedores */
  .container, .container-narrow {
    max-width: 100vw;
    overflow-x: hidden;
  }
  .card, .hero-image, .stat, .match-card, [data-match] {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Forzar todos los grid auto-fit a 1 columna */
  .stat-grid,
  div[style*="grid-template-columns:repeat(auto-fit"],
  div[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
    max-width: 100%;
  }

  /* Tablas standings: ULTRA compactas */
  .standings-table th, .standings-table td {
    padding: 4px 2px !important;
    font-size: 0.72rem !important;
  }
  .standings-table img.flag,
  .standings-table img[style*="width:24px"],
  .standings-table img[style*="width:20px"] {
    width: 16px !important;
    height: 12px !important;
  }
  /* Truncar nombres largos en celda equipo */
  .standings-table td:nth-child(2) span:not(.fw-700) { display: none; }
  .standings-table td:nth-child(2) span,
  .standings-table td:nth-child(2) {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Match inline: nombres truncados */
  [data-match] .fw-700 {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
  }
  /* Inputs de score más chicos para que quepa todo */
  [data-match] input[type="number"] {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.95rem !important;
  }

  /* Hero countdown: 4 cifras MUY compactas para que quepan */
  #cd-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
  .cd-cell {
    min-width: 0 !important;
    padding: 8px 4px !important;
  }
  .cd-cell .cd-num { font-size: 1.4rem !important; }
  .cd-cell .cd-lbl { font-size: 0.58rem !important; letter-spacing: 0.04em !important; }

  /* Hero image: padding más razonable */
  .hero-image { padding: 24px 16px !important; min-height: 220px !important; }
  .hero-image .wc-logo { display: none; } /* Logo se quita en mobile, ya está el fondo */
  .hero-image h1 { font-size: 1.3rem !important; line-height: 1.2 !important; }
  .hero-image p { font-size: 0.85rem !important; }

  /* Tabs scroll horizontal correcto */
  .tabs {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  /* Modal: usar full-width sin scroll */
  .modal {
    width: 100%;
    max-width: 100% !important;
    overflow-x: hidden;
  }
  .modal * { max-width: 100%; }
  .modal table { font-size: 0.74rem; }
}

/* ===================================================
   FIX MOBILE V3: bullet-proof no horizontal scroll
=================================================== */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative;
}
* { max-width: 100% !important; }
img, table, pre, code, .modal { max-width: 100% !important; }

@media (max-width: 768px) {
  /* Container = ancho del viewport menos pads */
  .container, .container-narrow {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
  }
  /* Cards: nunca más anchos que su contenedor */
  .card { box-sizing: border-box; width: 100%; }
  /* Nombres en match cards: cortar */
  [data-match] .fw-700 {
    max-width: 60px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }
  /* Tablas dentro de cards: si no caben, scroll DENTRO del card */
  .card > div > table,
  .card > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===================================================
   MOBILE FIXES FINAL
=================================================== */

/* 1. Bottom nav extiende navy hacia abajo cubriendo safe-area */
@media (max-width: 768px) {
  body { background: var(--c-bg) !important; }

  /* Pseudo-elemento que pinta navy desde el bottom nav hacia abajo */
  .bottom-nav::before {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-bottom, 0);
    background: var(--c-navy);
    z-index: 89;
    pointer-events: none;
  }
  .bottom-nav {
    box-shadow: 0 -2px 14px rgba(0,0,0,0.2);
  }
}

/* 2. Pill "X/6 jugados" en mobile: muy compacto, no aplastar tabla */
@media (max-width: 768px) {
  /* Pill grey/yellow más chico siempre en mobile */
  .pill {
    font-size: 0.66rem !important;
    padding: 3px 8px !important;
  }
  /* H2 grupo: más chico para que el pill quede al lado */
  .card h2 {
    font-size: 1.1rem !important;
  }
  /* Header del card de grupo: row flex con gap mínimo */
  .card .row {
    gap: 6px !important;
  }
}

/* 3. Última defensa: nada se sale del viewport */
@media (max-width: 768px) {
  .container, .container > * {
    max-width: calc(100vw - 24px) !important;
  }
  .card {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  /* Tabla: dejar que se contraiga, sin min-width */
  table {
    width: 100%;
    table-layout: auto;
    max-width: 100% !important;
  }
}

/* ===================================================
   FIX MOBILE V6: safe-area en pollas/modal + match cards limpios
=================================================== */
@media (max-width: 768px) {
  /* Pollas: la pantalla NO tiene app-header, así que el container debe respetar safe-area */
  body > #app > .container {
    padding-top: max(20px, env(safe-area-inset-top, 20px)) !important;
  }
  /* Pero si HAY app-header arriba (después de entrar a polla), el container vuelve normal */
  body:has(header.app-header) > #app > .container {
    padding-top: 16px !important;
  }

  /* Modal sheet: respetar safe-area top */
  .modal {
    padding-top: max(20px, env(safe-area-inset-top, 20px)) !important;
  }
  .modal-header {
    padding-top: 8px;
  }

  /* Pill "X/Y jugados" SUPER chiquito y posición en línea con título */
  .card .row > .pill.pill-grey,
  .card .row > .pill.pill-yellow {
    font-size: 0.58rem !important;
    padding: 2px 6px !important;
    line-height: 1.2;
  }

  /* Match cards "Próximos partidos" en Inicio: una línea limpia */
  #upcoming .match-card {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 12px !important;
  }
  #upcoming .match-card .team {
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    justify-content: center !important;
  }
  #upcoming .match-card .team.home,
  #upcoming .match-card .team.away {
    justify-content: center !important;
    text-align: center !important;
  }
  #upcoming .match-card .team .name {
    font-size: 0.78rem !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.15;
    max-width: 90px !important;
  }
  #upcoming .match-card .team .flag {
    width: 32px !important;
    height: 24px !important;
    order: -1; /* bandera arriba */
  }
  #upcoming .match-card .vs {
    min-width: 0 !important;
    padding: 0 !important;
  }
  #upcoming .match-card .vs .scheduled {
    font-size: 1rem !important;
  }
  #upcoming .match-card .vs .meta {
    font-size: 0.66rem !important;
    margin-top: 2px;
  }
}

/* ===================================================
   FIX V7: tabla de grupos abarca el ancho total del card
=================================================== */
@media (max-width: 768px) {
  /* La tabla usa todo el ancho disponible en el card */
  .card .standings-table,
  .card table {
    width: 100% !important;
    table-layout: fixed !important;
    min-width: 0 !important;
  }
  /* Columna 1 (#) angosta */
  .card .standings-table th:nth-child(1),
  .card .standings-table td:nth-child(1) {
    width: 22px !important;
  }
  /* Columna 2 (Equipo) toma TODO el espacio restante */
  .card .standings-table th:nth-child(2),
  .card .standings-table td:nth-child(2) {
    width: auto !important;
    max-width: none !important;
  }
  /* Resto de columnas numéricas: angostas y centradas */
  .card .standings-table th:nth-child(n+3),
  .card .standings-table td:nth-child(n+3) {
    width: 24px !important;
    text-align: center !important;
    padding: 4px 1px !important;
  }
  /* Quitar overflow-x del wrapper porque ya cabe */
  .card > div[style*="overflow-x:auto"] {
    overflow-x: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Bandera del equipo: más visible en el ancho extra */
  .card .standings-table td:nth-child(2) img {
    width: 22px !important;
    height: 16px !important;
  }
  .card .standings-table td:nth-child(2) span.fw-700 {
    font-size: 0.82rem !important;
    max-width: none !important;
  }
}

/* ===================================================
   FIX V8: tabla con nombres visibles + layout que NO se solapa
=================================================== */
@media (max-width: 768px) {
  /* RESET de las reglas anteriores que escondían nombres */
  .standings-table td:nth-child(2) span,
  .card .standings-table td:nth-child(2) span {
    display: inline !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }
  /* table-layout AUTO para que el browser ajuste columnas según contenido */
  .card table,
  .card .standings-table {
    table-layout: auto !important;
    width: 100% !important;
  }
  /* Quitar widths fijos que rompen el flujo */
  .card .standings-table th,
  .card .standings-table td {
    width: auto !important;
    padding: 6px 3px !important;
    font-size: 0.74rem !important;
  }
  /* La columna Equipo (2da) puede crecer más */
  .card .standings-table th:nth-child(2),
  .card .standings-table td:nth-child(2) {
    text-align: left !important;
    padding-left: 4px !important;
  }
  /* Columnas numéricas: text-align center (ya estaba) y padding mínimo */
  .card .standings-table th:nth-child(n+3),
  .card .standings-table td:nth-child(n+3) {
    text-align: center !important;
    padding: 6px 2px !important;
    min-width: 18px;
    font-variant-numeric: tabular-nums;
  }
  /* Bandera dentro de cell Equipo: más chica para dar espacio al nombre */
  .card .standings-table td:nth-child(2) img {
    width: 18px !important;
    height: 13px !important;
    flex-shrink: 0;
    display: inline-block !important;
    vertical-align: middle;
    margin-right: 4px;
  }
  /* Nombre del equipo: bold, puede hacer wrap si no cabe */
  .card .standings-table td:nth-child(2) span {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1.15;
    word-wrap: break-word;
  }
  /* Nombres muy largos pueden hacer wrap en 2 líneas */
  .card .standings-table td:nth-child(2) > div {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
}
