/* ============================================================
   FOUNDATION - TOKEN SYSTEM GROUNDED IN SUBJECT MATTER
   ============================================================
   Proyecto: fulbito - Poisson + Dixon-Coles football predictions
   Skills aplicadas: frontend-design - evitar defaults de IA
   
   Principios clave evitados (traits de IA generativa):
   - No gradients púrpura-rosa aleatorios
   - No cards idénticas con same border-radius en todo
   - No ALL-CAPS eyebrows encima de cada heading
   - No monospace para etiquetas de datos chiquitas
   - No '→' appended a todo button text
   - Type scale con φ (phi = 1.618) proportions
   - Subject matter: fútbol estadística, no dashboard genérico
   
   --- TOKEN SYSTEM: 6 colores con significado ---
   :root {
     /* Base - negro carbón, no puro para reducir fatiga visual */
     --bg-base: #0d1117;
     --bg-subtle: #1e2130;
     
     /* Acordes de significado fútbol/estadística */
     --accent-primary: #38bdf8;    /* Blue sky - estadio, no verde cliché */
     --accent-secondary: #fbbf24;  /* Amber - odd/casas de apuestas */
     --accent-muted: #64748b;      /* Slate gray - secundario */
     
     /* Texto - jerarquía clara */
     --text-primary: #f8fafc;      /* Blanco cálido sobre oscuro */
     --text-secondary: #94a3b8;    /* Muted, legible */
     --text-dim: #64748b;          /* Dim, no puro gray */
     
     /* Bordes y separadores */
     --border-primary: #334155;
     --border-subtle: #1e293b;
     
     /* Sombras - consistentes, no aleatorias */
     --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
     --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
     --shadow-elevated: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
     
     /* Radii - consistentes, no random en cada card */
     --radius-sm: 6px;
     --radius-md: 12px;
     --radius-lg: 16px;
     --radius-full: 9999px;
     
     /* Spacing scale - múltiplos de 4px rítmico */
     --space-1: 4px;
     --space-2: 8px;
     --space-3: 12px;
     --space-4: 16px;
     --space-6: 24px;
     --space-8: 32px;
     
     /* Type scale - The Elements of Typographic Style con φ (phi = 1.618) */
     --type-scale: 1.618;
     
     /* Tamaños calculados con φ */
     --font-header-1: clamp(2rem, calc(1.618 * 1.25rem), 2.75rem);  /* φ² */
     --font-header-2: clamp(1.75rem, calc(1.618 * 1.15rem), 2.25rem); /* φ¹·⁵ */
     --font-header-3: clamp(1.25rem, calc(1.618 * 1rem), 1.75rem);   /* φ¹·² */
     --font-body: 0.975rem;                                         /* base */
     --font-kpi: 2rem;                                              /* valor grande */
     --font-label: 0.775rem;                                        /* uppercase */
   }
   
   /* --- RESET TYPOGRAPHY: sin defaults de IA --- */
   html {
     -webkit-font-smoothing: antialiased;
     -moz-osx-font-smoothing: grayscale;
     text-rendering: optimizeLegibility;
     -webkit-text-size-adjust: 100%;
   }
   
   body {
     font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
     font-size: var(--font-body);
     line-height: 1.6;
     color: var(--text-primary);
     background-color: var(--bg-base);
   }
   
   h1, h2, h3, h4, h5, h6 {
     font-weight: 600;
     line-height: 1.25;
     text-transform: none;
   }
   
   .uppercase-label {
     text-transform: uppercase;
     letter-spacing: 0.08em;
     font-size: var(--font-label);
     font-weight: 600;
   }
   
   .label, .small, .dim {
     font-family: inherit;
     font-size: 0.85rem;
     color: var(--text-secondary);
   }
   
   /* --- MOTION: una secuencia orchestrada, no scattered effects --- */
   @keyframes content-reveal {
     from { opacity: 0; transform: translateY(12px); }
     to { opacity: 1; transform: translateY(0); }
   }
   
   .animated-reveal {
     animation: content-reveal 0.4s ease-out forwards;
     will-change: opacity, transform;
   }
   
   :focus-visible {
     outline: 2px solid var(--accent-primary);
     outline-offset: 2px;
   }
   
   @media (prefers-reduced-motion: reduce) {
     *, *::before, *::after {
       animation-duration: 0.01ms !important;
       transition-duration: 0.01ms !important;
     }
   }
   
   /* --- ORIGINAL CONTENT PRESERVED BELOW --- */
@keyframes fulbitoPulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123, 225, 200, 0.4), 0 10px 25px -5px rgba(123, 225, 200, 0.3); }
  50% { box-shadow: 0 0 0 10px rgba(123, 225, 200, 0), 0 14px 30px -5px rgba(123, 225, 200, 0.5); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.05s; animation-delay: 0.05s; }
.delay-2 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-3 { transition-delay: 0.15s; animation-delay: 0.15s; }
.delay-4 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-5 { transition-delay: 0.25s; animation-delay: 0.25s; }

.landing-topbar-cta, .hero-cta-primary, .btn-primary-fulbito {
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
}
.landing-topbar-cta:hover, .hero-cta-primary:hover, .btn-primary-fulbito:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 12px 25px -8px rgba(123, 225, 200, 0.4);
}
.landing-topbar-cta:active, .hero-cta-primary:active {
  transform: translateY(0);
}

.landing-stat, .stat-card, .modelado-card, .feature-card {
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(16, 27, 42, 0.8) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(173, 186, 202, 0.25);
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.6), 0 5px 15px -5px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.landing-stat:hover, .stat-card:hover, .modelado-card:hover, .feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8), 0 0 20px -5px rgba(123, 225, 200, 0.15);
  border-color: rgba(123, 225, 200, 0.3);
}

@keyframes floatGlow {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  50% { transform: translate(-50%, -50%) translate(20px, -20px); }
}

.landing-inner {
  position: relative;
  z-index: 1;
}

.landing-shell {
  position: relative;
  overflow: hidden;
  padding: 80px 20px;
}

.landing-shell::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--green-dim), transparent 70%);
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  animation: floatGlow 15s ease-in-out infinite;
}

.landing-inner h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin-bottom: 24px;
}

.landing-inner h1 span {
  display: block;
  background: linear-gradient(135deg, var(--brand), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(100, 228, 169, 0.1));
}


/* ============ OPTIMIZACIONES DE RENDIMIENTO ============ */
/* will-change para elementos animados comunes; reduce repaints en scroll */
.app-nav, .modal-overlay, .tooltip-icono, .partido-card, .fila-mercado {
  will-change: transform;
}

/* ============ MAGIC UI PATTERNS ============ */

/* 1. Bento Grid Layout */
.dash-bento-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-auto-rows: minmax(150px, auto);
  margin-bottom: 24px;
  will-change: transform;
}

.bento-item {
  position: relative;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-card);
}

.bento-item:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 10px 30px -10px rgba(0, 255, 150, 0.15),
              inset 0 1px 0 rgba(255,255,255,0.05);
  border-color: rgba(123, 225, 200, 0.3);
}

/* Shadcn-style KPI Card Adaptation mejorado */
.dash-kpi {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}

/* Sombra difusa detrás del KPI */
.dash-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.dash-kpi:hover { box-shadow: var(--shadow-card-elevated); }

/* --- KPI TOP --- */
.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* --- KPI ICONO --- */
.dash-kpi-icono {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
}
.dash-kpi-icono::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  border: 1px solid currentColor;
}
.dash-kpi-icono.cyan::after { background: linear-gradient(135deg, var(--dash-accent), var(--brand)); opacity: 0.15; }
.dash-kpi-icono.cyan:hover::after { opacity: 0.25; }
.dash-kpi-icono.oro::after { background: linear-gradient(135deg, var(--gold), #fbbf24); opacity: 0.15; }
.dash-kpi-icono.rosa::after { background: linear-gradient(135deg, #f87171, #f472b6); opacity: 0.15; }
.dash-kpi-icono svg { width: 20px; height: 20px; }

/* --- KPI CHIP --- */
.dash-kpi-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  border: 1px solid var(--line);
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}

.dash-kpi-chip:hover {
  border-color: var(--accent-muted);
  color: var(--text-primary);
}

.dash-kpi-chip.neutral { color: var(--text-secondary); }
.dash-kpi-chip.positivo { 
  color: var(--green); 
  background: rgba(34, 197, 96, 0.12); 
  border-color: rgba(34, 197, 96, 0.2); 
}
.dash-kpi-chip.negativo { 
  color: var(--red); 
  background: rgba(239, 68, 68, 0.12); 
  border-color: rgba(239, 68, 68, 0.2); 
}
.dash-kpi-chip.warning { 
  color: var(--gold); 
  background: rgba(251, 191, 36, 0.12); 
  border-color: rgba(251, 191, 36, 0.2); 
}

/* --- KPI LABEL --- */
.dash-kpi-label {
  display: block;
  font-size: var(--font-label);
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* --- KPI VALOR --- */
.dash-kpi-valor {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
  position: relative;
  isolation: isolate;
}
.dash-kpi-valor::after {
  content: "";
  position: absolute;
  left 0;
  bottom: -4px;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--dash-accent), var(--brand));
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dash-kpi-valor:hover::after { opacity: 0.5; }

/* --- KPI PIE --- */
.dash-kpi-pie {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-top: 6px;
}

/* --- KPI BARRA --- */
.dash-kpi-barra {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
  position: relative;
}
.dash-kpi-barra span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.dash-kpi-barra span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: kpiBarShimmer 3s ease-in-out infinite;
}
@keyframes kpiBarShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Variaciones de color por chip */
.dash-kpi-chip.neutral { color: var(--text-dim); }
.dash-kpi-chip.positivo { color: var(--green); background: rgba(34, 197, 96, 0.12); border-color: rgba(34, 197, 96, 0.2); }
.dash-kpi-chip.negativo { color: var(--red); background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.2); }
.dash-kpi-chip.warning { color: var(--gold); background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.2); }

/* Quick Access as Bento Item */
.quick-access {
  padding: 0;
  overflow: hidden;
}

.quick-access .dash-quick-card {
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease);
}

.quick-access .dash-quick-card:hover {
  background: rgba(255,255,255,0.03);
}

.quick-access .dash-quick-icono {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}

.quick-access .dash-quick-icono svg { width: 20px; height: 20px; }

.quick-access .dash-quick-texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-access .dash-quick-texto strong {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.quick-access .dash-quick-texto small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quick-access .dash-quick-flecha {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: transform 0.2s var(--ease);
}

.quick-access .dash-quick-card:hover .dash-quick-flecha {
  transform: translateX(4px);
  color: var(--brand);
}

/* 2. Blur Fade Entrance */
@keyframes blurFadeIn {
  0% { opacity: 0; filter: blur(10px); transform: translateY(10px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.blur-fade-in {
  animation: blurFadeIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  will-change: opacity, filter, transform;
}

/* 3. Border Beam Effect */
.beam-card {
  position: relative;
  overflow: hidden;
}

.beam-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, var(--brand), transparent 30%);
  animation: rotateBeam 4s linear infinite;
  z-index: -1;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
}

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

/* 4. Aurora Text */
.aurora-text {
  background: linear-gradient(
    to right,
    var(--text) 0%,
    var(--brand) 25%,
    var(--gold) 50%,
    var(--brand) 75%,
    var(--text) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: auroraMove 5s linear infinite;
  will-change: background-position;
}

@keyframes auroraMove {
  to { background-position: 200% center; }
}

@media (max-width: 768px) {
  .dash-bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }
}
.glow-card {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--glow-x, 50%) var(--glow-y, 50%),
    var(--glow-color, rgba(123, 225, 200, 0.15)) 0%,
    transparent 60%
  );
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.glow-card:hover::before {
  opacity: 1;
}
/* Habilitar aceleración GPU en todo el documento cuando se hacen transiciones */
.app-nav { transform: translateZ(0); }
/* Containment para reducir el ámbito de los recálculos de layout */
.partido-card, .fila-mercado, .motor-card { contain: layout style; }
/* Imágenes responsivas por defecto */
img { max-width: 100%; height: auto; }
/* Suavizar scroll en iOS */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

:root {
  --bg: #0b1120;
  --bg-soft: #0d1620;
  --bg-raised: #101b2a;
  --panel: #0f1a25;
  --panel-2: #122334;
  --panel-3: #0d151d;
  --card: #101b2a;
  --card-2: #142535;
  --card-3: #182a3d;
  --card-border: rgba(173, 186, 202, 0.14);
  --card-border-soft: rgba(173, 186, 202, 0.22);
  --line: rgba(173, 186, 202, 0.12);
  --text: #edf3ff;
  --text-muted: #a9b7c8;
  --text-dim: #8297b0;
  --gold: #f2c474;
  --gold-strong: #dca551;
  --gold-dim: rgba(242, 196, 116, 0.12);
  --green: #64e4a9;
  --green-strong: #39c98e;
  --green-dim: rgba(100, 228, 169, 0.12);
  --brand: #7be1c8;
  --brand-2: #a1f0cf;
  --brand-deep: #0d201b;
  --luxury: #e6c98a;
  --luxury-soft: rgba(230, 201, 138, 0.12);
  --red: #ff6d7d;
  --red-dim: rgba(255, 109, 125, 0.12);
  --ink-on-accent: #07120d;
  --shadow-soft: 0 22px 50px -30px rgba(0, 0, 0, 0.9);
  --shadow-panel: 0 18px 36px -28px rgba(0, 0, 0, 0.95);

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --radius-xs: 7px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 44px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 14px 30px -18px rgba(0,0,0,0.65);
  --shadow-raised: 0 1px 0 rgba(255,255,255,0.03) inset, 0 22px 44px -20px rgba(0,0,0,0.7);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  /* --- Escala Tipográfica (Font Sizes) --- */
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-base: 1rem;     /* 16px */
  --fs-md: 1.125rem;   /* 18px */
  --fs-lg: 1.25rem;    /* 20px */
  --fs-xl: 1.5rem;     /* 24px */
  --fs-2xl: 2rem;      /* 32px */
  --fs-3xl: 2.75rem;   /* 44px */
  --fs-display: clamp(2.8rem, 7vw, 5.5rem);

  /* --- Espacio entre Líneas (Line Heights) --- */
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-base: 1.55;
  --lh-none: 1;

  /* --- Espacio entre Letras (Letter Spacings) --- */
  --ls-tight: -0.04em;
  --ls-normal: 0;
  --ls-wide: 0.05em;
  --ls-wider: 0.1em;

  /* --- Pesos de Fuente (Font Weights) --- */
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* identidad de color por categoría de mercado */
  --m-resultado: #dcb069; --m-resultado-bg: rgba(220, 176, 105, 0.10);
  --m-doble: #7ea1e6;     --m-doble-bg: rgba(126, 161, 230, 0.10);
  --m-totalgoles: #56bfab;--m-totalgoles-bg: rgba(86, 191, 171, 0.10);
  --m-btts: #d488ac;      --m-btts-bg: rgba(212, 136, 172, 0.10);
  --m-equipomarca: #a794da; --m-equipomarca-bg: rgba(167, 148, 218, 0.10);
  --m-handicap: #d99a63;  --m-handicap-bg: rgba(217, 154, 99, 0.10);
  --m-marcador: #63b2d0;  --m-marcador-bg: rgba(99, 178, 208, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(123, 225, 200, 0.15), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(242, 196, 116, 0.1), transparent 40%),
    linear-gradient(180deg, #070d12 0%, #0a1017 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(123, 225, 200, 0.15), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(242, 196, 116, 0.1), transparent 40%),
    url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12h1v1h-1z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #070d12 0%, #0a1017 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.home-mode .app-nav {
  display: none !important;
}

body:not(.home-mode) .landing-topbar {
  display: none !important;
}

body.home-mode main {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-top: 28px;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

body.home-mode {
  overflow-x: hidden;
}

.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: rgba(9, 14, 18, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.landing-topbar-inner {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.landing-brand {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.05em;
  color: var(--text);
  font-style: italic;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.landing-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.18s var(--ease);
}

.landing-nav a:hover {
  color: var(--text);
}

.landing-topbar-cta {
  border: 1px solid rgba(123, 225, 200, 0.2);
  background: rgba(123, 225, 200, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.landing-topbar-cta:hover {
  border-color: rgba(123, 225, 200, 0.32);
  background: rgba(123, 225, 200, 0.12);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============ NAV PRINCIPAL (app shell / Sidebar Off-Canvas) ============ */
.app-nav {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: 280px;
  height: 100vh;
  padding: 20px 16px;
  background:
    linear-gradient(180deg, rgba(11, 16, 22, 0.98), rgba(7, 12, 17, 0.96)),
    radial-gradient(circle at top left, rgba(123, 225, 200, 0.15), transparent 26%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid rgba(123, 225, 200, 0.12);
  box-shadow: 20px 0 45px -25px rgba(0, 0, 0, 0.95), inset -1px 0 0 rgba(255,255,255,0.03);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

/* Área de activación invisible o borde interactivo para hover off-canvas en desktop */
body:not(.home-mode)::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  width: 18px;
  height: 100vh;
  z-index: 39;
}

/* Comportamiento Hover Off-Canvas en Desktop (cuando no estamos en home-mode) */
@media (min-width: 769px) {
  body:not(.home-mode) .app-nav:hover,
  body:not(.home-mode)::before:hover ~ .app-nav {
    transform: translateX(0);
  }
}

/* Mantener accesible mediante clase menu-abierto (para click / móvil / toggle) con transición suave */
.app-nav.menu-abierto {
  display: flex !important;
  transform: translateX(0) !important;
  box-shadow: 25px 0 60px -20px rgba(0, 0, 0, 0.98), inset -1px 0 0 rgba(255,255,255,0.04);
}

.app-nav-toggle {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 45;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(11, 16, 22, 0.92);
  border: 1px solid rgba(123, 225, 200, 0.25);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px -10px rgba(0,0,0,0.8);
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.app-nav-toggle:hover {
  background: rgba(123, 225, 200, 0.18);
  border-color: rgba(123, 225, 200, 0.4);
  transform: scale(1.04);
}

.app-nav-toggle svg {
  width: 18px;
  height: 18px;
}

.app-nav-fila {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.app-nav-marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: -0.04em;
}

.app-nav-marca::before {
  content: "F";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(123, 225, 200, 0.26), rgba(242, 196, 116, 0.18));
  border: 1px solid rgba(123, 225, 200, 0.25);
  color: var(--brand);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.app-nav-buscador {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(17, 27, 39, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 9px 13px;
  max-width: none;
  margin-left: 0;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.app-nav-buscador:focus-within {
  border-color: rgba(95, 227, 164, 0.4);
  background: rgba(17, 27, 39, 0.96);
  box-shadow: 0 0 0 3px rgba(95, 227, 164, 0.08);
}

.app-nav-buscador svg { width: 15px; height: 15px; color: var(--text-dim); flex-shrink: 0; }

.app-nav-buscador input {
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  width: 100%;
  outline: none;
}
.app-nav-buscador input::placeholder { color: var(--text-dim); }

.app-nav-hamburguesa {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.app-nav-hamburguesa span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

.app-nav-tabs {
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: visible;
  scrollbar-width: none;
}
.app-nav-tabs::-webkit-scrollbar { display: none; }

@media (max-width: 640px) {
  .app-nav-hamburguesa { display: none; }
  .app-nav {
    position: sticky;
    top: 0;
    left: auto;
    width: 100%;
    height: auto;
    padding: 10px 16px 2px;
    border-right: none;
    border-bottom: 1px solid rgba(158, 175, 199, 0.14);
    box-shadow: 0 18px 38px -28px rgba(0,0,0,0.92);
  }
  .app-nav-marca { font-size: 1.2rem; }
  .app-nav-fila {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
  }
  .app-nav-buscador { flex: 1; max-width: none; min-width: 0; }
  .app-nav-tabs {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding: 0 0 8px;
  }
  .nav-tab {
    width: auto;
    min-width: fit-content;
    padding: 8px 12px;
    justify-content: center;
  }
}

.nav-tab {
  appearance: none;
  background: rgba(255,255,255,0.01);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  margin-bottom: 0;
  transition: color 0.15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  width: 100%;
  position: relative;
}

.nav-tab:hover {
  background: rgba(255,255,255,0.02);
  border-color: rgba(148,163,184,0.12);
}
.nav-tab-icono {
  font-size: 0.72rem;
  width: 16px;
  text-align: center;
  opacity: 0.95;
  color: var(--text-dim);
}
.nav-tab:hover { color: var(--text); border-color: var(--line); transform: translateY(-1px); }
.nav-tab.activa {
  color: var(--text);
  background: linear-gradient(135deg, rgba(123, 225, 200, 0.13), rgba(17, 25, 34, 0.96) 60%);
  border-color: rgba(123, 225, 200, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 28px -24px rgba(0,0,0,0.85), 0 0 0 1px rgba(123,225,200,0.06);
}

.nav-tab.activa::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--gold));
  box-shadow: 0 0 0 4px rgba(95,227,164,0.12);
  flex-shrink: 0;
}

.nav-tab.activa .nav-tab-icono {
  color: var(--brand);
}

.nav-tab .contador-favoritos {
  margin-left: auto;
}
/* ============ BOTÓN FAB FLOTANTE ARMAR COMBINADA MANUAL ============ */
@keyframes fabEntrada {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.btn-fab-combinada {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 99999;
  background: linear-gradient(135deg, var(--green), var(--brand));
  color: var(--ink-on-accent);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 1rem;
  box-shadow: 0 12px 32px -6px rgba(100, 228, 169, 0.8), 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: fabEntrada 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, fulbitoPulseGlow 3s ease-in-out 0.5s infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-fab-combinada:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 36px -4px rgba(100, 228, 169, 0.95), 0 6px 16px rgba(0, 0, 0, 0.5);
}

.btn-fab-combinada:active {
  transform: translateY(1px) scale(0.98);
}

@media (max-width: 640px) {
  .btn-fab-combinada {
    bottom: 24px;
    right: 18px;
    padding: 11px 18px;
    font-size: 0.9rem;
  }
}


.nav-tab.activa .nav-tab-icono {
  color: var(--brand);
}
.nav-tab.activa .nav-tab-icono { filter: none; }

.contador-favoritos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink-on-accent);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.nav-tab.activa .contador-favoritos { background: var(--gold); color: var(--ink-on-accent); }

/* ============ HERO COMPACTO ============ */
.hero-compacto {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 46px 20px 12px;
  overflow: hidden;
}

.hero-compacto::after {
  content: "";
  position: absolute;
  inset: 24px 18px auto 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 225, 200, 0.25), transparent);
  pointer-events: none;
}
.hero-compacto::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  top: -190px;
  left: -160px;
  background: radial-gradient(circle, rgba(95, 227, 164, 0.18), transparent 68%);
  filter: blur(32px);
  z-index: 0;
  pointer-events: none;
}

.hero-textos { position: relative; z-index: 1; max-width: 56ch; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--luxury);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.hero-eyebrow-punto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--luxury);
  box-shadow: 0 0 0 4px var(--luxury-soft);
}

.hero-compacto h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 5rem);
  letter-spacing: -0.055em;
  margin: 0;
  line-height: 0.9;
  color: var(--text);
  text-shadow: 0 12px 30px rgba(0,0,0,0.28);
  max-width: 620px;
}

.hero-compacto h1::after {
  content: "";
  display: block;
  width: 86px;
  height: 2px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--green), transparent);
  border-radius: 999px;
}

.hero-compacto p {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 18px 0 0;
  max-width: 46ch;
  line-height: 1.6;
}

.hero-kpis {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin-top: 24px;
}

.hero-kpi {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: linear-gradient(180deg, rgba(18, 28, 34, 0.96), rgba(12, 18, 24, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-panel);
}

.hero-kpi strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-kpi span {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.accesos-rapidos {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
@media (max-width: 560px) { .accesos-rapidos { grid-template-columns: 1fr; } }

.acceso-rapido {
  appearance: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 140px;
  background: linear-gradient(180deg, rgba(17, 26, 28, 0.96), rgba(12, 18, 24, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), filter 0.18s var(--ease);
  color: var(--text);
  font-family: var(--font-body);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 20px 32px -28px rgba(0,0,0,0.9);
}
.acceso-rapido:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 225, 200, 0.22);
  box-shadow: 0 24px 34px -24px rgba(0,0,0,0.94), 0 0 0 1px rgba(123, 225, 200, 0.08);
  background: linear-gradient(180deg, rgba(20, 32, 30, 0.98), rgba(13, 20, 29, 0.92));
  filter: saturate(1.08);
}

.acceso-rapido-icono {
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--green);
}
.acceso-rapido:nth-child(1) .acceso-rapido-icono { color: var(--green); background: var(--green-dim); border-color: rgba(95,227,164,0.2); }
.acceso-rapido:nth-child(2) .acceso-rapido-icono { color: var(--gold); background: var(--gold-dim); border-color: rgba(243,195,111,0.2); }
.acceso-rapido:nth-child(3) .acceso-rapido-icono { color: #8ab4ff; background: rgba(138,180,255,0.12); border-color: rgba(138,180,255,0.2); }
.acceso-rapido:nth-child(4) .acceso-rapido-icono { color: #d9b3ff; background: rgba(217,179,255,0.12); border-color: rgba(217,179,255,0.2); }

.acceso-rapido-texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 0;
}
.acceso-rapido-texto strong {
  font-size: 1.02rem;
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-display);
  flex-shrink: 0;
}

/* ============ MOTOR CHOCO BETS / IA ============ */
.motor-panel {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 22px 0 0;
  padding: 0 24px;
}

.motor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.motor-eyebrow {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.motor-panel-header h3 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  letter-spacing: -0.04em;
  color: var(--text);
}

.chip-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(95, 227, 164, 0.12);
  color: var(--green);
  border: 1px solid rgba(95, 227, 164, 0.25);
}

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

.motor-card {
  background: linear-gradient(180deg, rgba(19, 29, 39, 0.96), rgba(10, 16, 22, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), var(--shadow-panel), 0 18px 30px -28px rgba(0,0,0,0.9);
  position: relative;
  overflow: hidden;
}

.motor-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(123,225,200,0.05), transparent 35%, transparent 100%);
  pointer-events: none;
}

.motor-base {
  background: linear-gradient(180deg, rgba(15, 27, 31, 0.96), rgba(12, 18, 22, 0.92));
}

.motor-ia {
  background: linear-gradient(180deg, rgba(24, 23, 17, 0.96), rgba(12, 18, 22, 0.92));
}

.motor-base {
  border-color: rgba(95, 227, 164, 0.2);
  background: linear-gradient(180deg, rgba(15, 26, 21, 0.96), rgba(10, 16, 22, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 22px 28px -30px rgba(62, 196, 130, 0.45);
}

.motor-ia {
  border-color: rgba(230, 201, 138, 0.2);
  background: linear-gradient(180deg, rgba(29, 24, 18, 0.96), rgba(10, 16, 22, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 22px 28px -30px rgba(230, 201, 138, 0.32);
}

.motor-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.motor-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  font-size: 1.1rem;
}

.motor-card-top small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.motor-card-top strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.2;
  margin-top: 2px;
}

.motor-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
}

.motor-score span {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.motor-score em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ia-score span { color: #a8beff; }

.motor-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.motor-metric {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 10px 9px;
}

.motor-metric span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.motor-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.2;
}

.motor-bar {
  position: relative;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  margin-top: 14px;
}

.motor-bar span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--brand));
  box-shadow: 0 0 16px rgba(100, 228, 169, 0.4);
}

.motor-bar-ia span {
  background: linear-gradient(90deg, #8aa6ff, #a4d0ff);
  box-shadow: 0 0 16px rgba(138, 166, 255, 0.35);
}

.motor-lista {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.motor-lista li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.verde { background: var(--green); box-shadow: 0 0 0 4px rgba(95, 227, 164, 0.12); }
.dot.azul { background: #81a0ff; box-shadow: 0 0 0 4px rgba(129, 160, 255, 0.12); }

@media (max-width: 640px) {
  .motores-grid { grid-template-columns: 1fr; }
  .motor-panel-header { align-items: flex-start; }
  .app-nav {
    background: rgba(9, 14, 18, 0.96);
  }
  main {
    margin-left: 0;
    width: 100%;
    max-width: none;
    padding: 0 12px 32px;
  }
}

/* ============ COMO FUNCIONA (secuencia de 3 pasos) ============ */
.como-funciona { max-width: 800px; margin: 0 auto; padding: 40px 20px 4px; }

.como-funciona-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.como-funciona-pasos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
@media (max-width: 640px) { .como-funciona-pasos { grid-template-columns: 1fr; } }

.como-funciona-paso { display: flex; gap: 14px; background: var(--card); padding: 20px 18px; }
.como-funciona-num {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; color: var(--green);
  flex-shrink: 0; line-height: 1;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-dim); border: 1px solid rgba(69,210,154,0.22);
}
.como-funciona-paso strong { display: block; font-size: 0.94rem; color: var(--text); margin-bottom: 4px; font-weight: 600; }
.como-funciona-paso p { margin: 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; }

/* ============ VISTAS ============ */
main {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin-left: 280px;
  padding: 8px 24px 40px;
}
@media (max-width: 900px) {
  main {
    margin-left: 0;
    width: 100%;
    max-width: none;
    padding: 0 16px 32px;
  }
}

.landing-shell {
  padding: 48px 20px 12px;
}

.landing-inner {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 52px 24px 28px;
  background:
    linear-gradient(180deg, rgba(15, 22, 28, 0.98), rgba(10, 15, 22, 0.92)),
    radial-gradient(circle at top left, rgba(123, 225, 200, 0.14), transparent 30%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 30px;
  box-shadow: 0 36px 64px -36px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(123, 225, 200, 0.04);
  position: relative;
  overflow: hidden;
}

.landing-inner::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -120px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 225, 200, 0.12), transparent 62%);
  pointer-events: none;
}

.landing-inner::after {
  content: "";
  position: absolute;
  inset: auto 8% -30% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 225, 200, 0.1), transparent 60%);
  pointer-events: none;
}

.landing-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(123, 225, 200, 0.18), transparent 38%);
  pointer-events: none;
}

.landing-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(123, 225, 200, 0.08);
  border: 1px solid rgba(123, 225, 200, 0.22);
  color: var(--brand-2);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  font-family: var(--font-mono);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 20px -16px rgba(123,225,200,0.5);
}

.landing-inner h1 {
  position: relative;
  margin: 18px 0 14px;
  max-width: 620px;
  font-family: var(--font-display);
  font-size: var(--fs-display);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--text);
  text-shadow: 0 12px 32px rgba(0,0,0,0.28);
  filter: drop-shadow(0 0 24px rgba(123, 225, 200, 0.12));
}

.landing-inner h1 span {
  display: inline-block;
  background: linear-gradient(135deg, var(--text), #aeead1 40%, #f2c474 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-inner h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 3px;
  margin-top: 18px;
  background: linear-gradient(90deg, var(--green), rgba(123, 225, 200, 0.1));
}

.landing-inner p {
  position: relative;
  max-width: 660px;
  color: var(--text-muted);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  margin: 0;
}

.landing-cta-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.landing-primary, .landing-secondary {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.landing-primary {
  background: linear-gradient(135deg, #6ce0b6, #8fe7d8 45%, #f2c474 100%);
  color: #07120d;
  box-shadow: 0 18px 26px -18px rgba(123, 225, 200, 0.9);
}

.landing-secondary {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--text);
}

.landing-primary:hover, .landing-secondary:hover {
  transform: translateY(-2px);
}

.landing-primary:hover {
  box-shadow: 0 24px 26px -20px rgba(123, 225, 200, 0.85);
}

.landing-secondary:hover {
  border-color: rgba(123, 225, 200, 0.2);
  background: rgba(255,255,255,0.04);
}

.landing-primary {
  background: linear-gradient(135deg, var(--green), var(--brand));
  color: #07120d;
  box-shadow: 0 18px 24px -18px rgba(95, 227, 164, 0.8);
}

.landing-secondary {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  color: var(--text);
}

.landing-primary:hover, .landing-secondary:hover {
  transform: translateY(-1px);
}

.landing-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

/* Subtle gradient separator between stats and feature cards */
.landing-separator {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--brand));
  border-radius: 0 0 3px 3px;
  z-index: 0;
}

.landing-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 30px -28px rgba(0,0,0,0.9);
}

.landing-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(123, 225, 200, 0.08);
  border: 1px solid rgba(123, 225, 200, 0.18);
  margin-bottom: 12px;
}

.landing-card strong {
  display: block;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin-bottom: 6px;
  color: var(--text);
}

.landing-card p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}

.landing-metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.landing-metric {
  background: linear-gradient(180deg, rgba(255,255,255,0.026), rgba(13,20,28,0.96));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 16px 28px -24px rgba(0,0,0,0.8);
}

.landing-metric strong {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(var(--fs-lg), 2vw, var(--fs-xl));
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  margin-bottom: 4px;
}

.landing-metric span {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
}

.landing-sections {
  max-width: 1200px;
  margin: 28px auto 0;
  padding: 0 20px 60px;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 22px;
  text-align: center;
}

.landing-proof {
  padding-bottom: 40px;
}

.proof-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
  background: linear-gradient(180deg, rgba(16, 24, 31, 0.98), rgba(11, 16, 22, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 28px 54px -36px rgba(0,0,0,0.92), inset 0 1px 0 rgba(255,255,255,0.04);
}

.proof-copy h2 {
  margin: 10px 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.proof-copy p {
  margin: 16px 0 0;
  color: var(--text-muted);
  line-height: var(--lh-base);
  max-width: 58ch;
}

.proof-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 10px;
  font-size: var(--fs-sm);
}

.proof-panel {
  display: grid;
  gap: 12px;
}

.proof-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 18px 20px;
}

.proof-strip span {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.proof-strip strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}

.proof-strip.muted {
  background: rgba(123, 225, 200, 0.04);
  border-color: rgba(123, 225, 200, 0.16);
}

.proof-strip.small strong {
  font-size: var(--fs-lg);
}

.landing-cta-final {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.landing-cta-final-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(18, 29, 34, 0.98), rgba(12, 18, 24, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 50px -32px rgba(0,0,0,0.92), inset 0 1px 0 rgba(255,255,255,0.04);
}

.landing-cta-final-inner h2 {
  margin: 8px 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(var(--fs-xl), 4vw, var(--fs-2xl));
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
}

@media (max-width: 760px) {
  .landing-grid,
  .landing-metrics,
  .feature-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }
  .landing-topbar-inner,
  .landing-cta-final-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .landing-nav {
    gap: 12px;
    flex-wrap: wrap;
  }
  body.home-mode main {
    margin-left: 0;
    margin-right: 0;
    padding-left: 16px;
    padding-right: 16px;
  }
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--luxury);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
}

.section-intro h2 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(var(--fs-xl), 4vw, var(--fs-2xl));
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--text);
}

/* ============ SECCION METODOLOGIA ============ */
.metodologia-bloque {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 22px 0 32px;
}

.metodologia-paso {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  background: linear-gradient(180deg, rgba(17, 27, 39, 0.96), rgba(11, 16, 22, 0.92));
  border: 1px solid rgba(173, 186, 202, 0.14);
  border-radius: 22px;
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 18px 30px -26px rgba(0,0,0,0.85);
  position: relative;
  overflow: hidden;
}

.metodologia-paso::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123, 225, 200, 0.04), transparent 55%);
  pointer-events: none;
}

.paso-numero {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(123, 225, 200, 0.18), rgba(123, 225, 200, 0.06));
  border: 1px solid rgba(123, 225, 200, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  color: var(--brand-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 16px -12px rgba(123, 225, 200, 0.2);
}

.paso-contenido {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paso-contenido h3 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
  letter-spacing: var(--ls-tight);
}

.paso-contenido p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

.paso-lista {
  margin: 6px 0 0;
  padding-left: 18px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paso-lista li {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  position: relative;
  padding-left: 18px;
}

.paso-lista li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ============ MODELADO GRID / GLASSMORPHISM CARDS ============ */
.modelado-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.modelado-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 30px -26px rgba(0,0,0,0.85);
}

.modelado-card:hover {
  transform: translateY(-5px);
  border-color: rgba(123, 225, 200, 0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 24px 40px -26px rgba(0,0,0,0.9), 0 0 20px -5px rgba(123, 225, 200, 0.12);
}

.modelado-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modelado-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.modelado-icon {
  font-size: 1.5rem;
}

.modelado-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.modelado-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.modelado-lista {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

.modelado-lista li {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modelado-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 0.75rem;
  font-weight: bold;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .metodologia-paso {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .paso-numero {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-card {
  background: linear-gradient(180deg, rgba(17, 25, 32, 0.96), rgba(11, 16, 22, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 18px 30px -26px rgba(0,0,0,0.85);
  transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 225, 200, 0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 24px 40px -26px rgba(0,0,0,0.9), 0 0 20px -5px rgba(123, 225, 200, 0.15);
}

.feature-card-strong {
  border-color: rgba(123, 225, 200, 0.2);
  background: linear-gradient(180deg, rgba(16, 28, 27, 0.96), rgba(11, 16, 22, 0.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 22px 50px -30px rgba(0,0,0,0.9);
}

.feature-card-strong:hover {
  border-color: rgba(123, 225, 200, 0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 28px 60px -30px rgba(0,0,0,0.95), 0 0 30px -5px rgba(123, 225, 200, 0.2);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(123, 225, 200, 0.08);
  border: 1px solid rgba(123, 225, 200, 0.18);
  margin-bottom: 14px;
  font-size: 1.5rem;
  color: var(--green);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: rgba(123, 225, 200, 0.15);
  border-color: rgba(123, 225, 200, 0.3);
  transform: scale(1.05);
}

.feature-card-strong .feature-icon {
  background: rgba(123, 225, 200, 0.15);
  border-color: rgba(123, 225, 200, 0.25);
}

.feature-card-strong:hover .feature-icon {
  background: rgba(123, 225, 200, 0.2);
  border-color: rgba(123, 225, 200, 0.35);
}

.feature-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.15rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .landing-grid,
  .landing-metrics,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  body.home-mode main {
    margin-left: 0;
    margin-right: 0;
    padding-left: 16px;
    padding-right: 16px;
  }
}
.vista { display: none; }
.vista.vista-activa { display: block; padding-top: 36px; }

.vista h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.5rem);
  letter-spacing: -0.01em;
  margin: 0 0 7px;
  color: var(--text);
}

.subtitulo-vista { color: var(--text-muted); font-size: 0.9rem; max-width: 56ch; margin: 0 0 28px; line-height: 1.55; }

.pestañas-fecha {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(16, 27, 42, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 30px -22px rgba(0, 0, 0, 0.8);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.pestañas-fecha::-webkit-scrollbar { display: none; }

.pestaña {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pestaña:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.pestaña:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.pestaña.activa {
  background: linear-gradient(135deg, var(--green), var(--brand));
  color: var(--ink-on-accent);
  font-weight: var(--fw-bold);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px -6px rgba(100, 228, 169, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pestaña-finalizados { margin-left: 0; padding-left: 16px; }

#contenedor-partidos, #contenedor-favoritos { display: flex; flex-direction: column; gap: var(--sp-5); }

/* ============ FILTROS RÁPIDOS DE PICKS ============ */
.filtros-rapidos-container {
  margin: 14px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filtros-rapidos-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.filtros-rapidos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.filtros-rapidos::-webkit-scrollbar { display: none; }
.filtro-rapido {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.filtro-rapido:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(100, 228, 169, 0.35);
  transform: translateY(-1px);
}
.filtro-rapido.activo {
  background: linear-gradient(135deg, rgba(100, 228, 169, 0.18), rgba(123, 225, 200, 0.08));
  border-color: rgba(100, 228, 169, 0.5);
  color: #64e4a9;
  box-shadow: 0 4px 14px -4px rgba(100, 228, 169, 0.35);
}

/* ============ TARJETA DE PARTIDO ============ */
.tarjeta-partido {
  background:
    linear-gradient(180deg, rgba(17, 26, 37, 0.98), rgba(11, 17, 24, 0.96)),
    radial-gradient(circle at top left, rgba(100, 228, 169, 0.08), transparent 35%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  padding: 18px 20px 16px;
  position: relative;
  overflow: hidden;
  animation: aparecerTarjeta 0.3s var(--ease) both;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 36px -24px rgba(0,0,0,0.85);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.tarjeta-partido::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(100, 228, 169, 0.03), transparent 40%, transparent 100%);
  pointer-events: none;
}

.tarjeta-partido:hover {
  border-color: rgba(100,228,169,0.38);
  box-shadow: 0 22px 42px -24px rgba(0,0,0,0.92), 0 0 20px rgba(100,228,169,0.06);
  transform: translateY(-2px) scale(1.02);
}
@keyframes aparecerTarjeta { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.tarjeta-partido::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), rgba(95,227,164,0.15), transparent);
}

.tarjeta-partido-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.partido-topbar-izq {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
}

.partido-topbar-izq {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.partido-liga-tag {
  font-weight: 700;
  color: #7be1c8;
  background: rgba(123, 225, 200, 0.1);
  border: 1px solid rgba(123, 225, 200, 0.2);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.partido-fecha-tag {
  color: var(--text-dim);
}

.encabezado-partido {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 14px;
}

.equipo-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.equipo-nombre-tend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  flex-wrap: wrap;
}

.encabezado-partido .equipo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 3.2vw, 1.28rem);
  line-height: 1.15;
  color: var(--text);
}

.tendencia { font-size: 0.62rem; line-height: 1; }
.tendencia-sube { color: var(--green); }
.tendencia-baja { color: var(--red); }
.tendencia-neutral { color: var(--text-dim); }

.racha-visual { display: flex; gap: 3px; justify-content: center; }
.racha-punto {
  width: 16px; height: 16px; border-radius: 4px;
  font-size: 0.58rem; font-weight: 700; font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.racha-G { background: rgba(95,227,164,0.16); color: var(--green); }
.racha-E { background: rgba(148,163,184,0.08); color: var(--text-dim); border: 1px solid var(--line); }
.racha-P { background: rgba(255,110,127,0.12); color: var(--red); }

.centro-partido {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.vs-circulo {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(148,163,184,0.08);
  border: 1px solid rgba(148,163,184,0.18);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(17,27,39,0.8);
}

.marcador-estimado-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(10, 16, 22, 0.9);
  border: 1px solid rgba(100, 228, 169, 0.28);
  border-radius: 8px;
  padding: 3px 8px;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.5);
}
.marcador-estimado-label {
  font-size: 0.56rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.marcador-estimado-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #64e4a9;
  line-height: 1.1;
}

.equipo-info .escudo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45));
  transition: transform 0.2s var(--ease);
}
.tarjeta-partido:hover .equipo-info .escudo {
  transform: scale(1.06);
}

.chip-cuenta-regresiva {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(148,163,184,0.08);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.chip-cuenta-regresiva.urgente { color: var(--red); border-color: rgba(255,110,127,0.22); background: rgba(255,110,127,0.1); }

.info-h2h-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text-dim);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  margin-bottom: 12px;
}
.info-h2h-pill strong {
  color: var(--text);
}

.aviso-datos {
  text-align: center;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(243,195,111,0.18);
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 7px 11px;
  margin: 10px 0 16px;
}

/* ============ FILAS DE MERCADO ============ */
.lista-mercados {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 6px;
  margin-top: 14px;
}
@media (max-width: 560px) { .lista-mercados { grid-template-columns: 1fr; } }

.fila-mercado {
  border-radius: 16px;
  padding: 14px 14px 12px 15px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(17,24,33,0.95));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid currentColor;
  transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 32px -28px rgba(0,0,0,0.92);
}

.fila-mercado::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent 55%);
  pointer-events: none;
}

.fila-mercado:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 225, 200, 0.2);
  border-left-color: var(--green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 28px -24px rgba(0,0,0,0.9), 0 0 16px -6px rgba(123, 225, 200, 0.12);
}

.fila-mercado.mercado-principal {
  background: linear-gradient(120deg, rgba(242,196,116,0.14), rgba(255,255,255,0.02) 60%);
  border-color: rgba(242,196,116,0.38);
  box-shadow: 0 4px 20px -6px rgba(242,196,116,0.2);
}

.fila-mercado.mercado-principal:hover {
  border-color: rgba(242,196,116,0.5);
  box-shadow: 0 4px 20px -6px rgba(242,196,116,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}

.etiqueta-pick-principal {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #07120d;
  background: linear-gradient(135deg, #f2c474, #dca551);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.fila-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  gap: 10px;
}

.fila-header-izq {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fila-header-der {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.fila-icono {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.fila-icono svg { width: 15px; height: 15px; }

.fila-porcentaje {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.fila-titulo {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 9px;
  color: currentColor;
  opacity: 0.92;
}

.barra-probabilidad {
  height: 5px;
  max-width: 280px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 11px;
}
.barra-relleno { height: 100%; border-radius: 999px; background: currentColor; opacity: 0.88; transition: width 0.4s var(--ease); }
.barra-relleno.conf-conf-alta {
  background: linear-gradient(90deg, #059669, #34d399);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}
.barra-relleno.conf-conf-media {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}
.barra-relleno.conf-conf-baja {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.fila-mercado-cuerpo {
  margin-bottom: 6px;
}
.fila-mercado-nombre { margin: 0 0 3px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-dim); }
.fila-seleccion { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }

.fila-mercado-footer {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.cuota-implicita-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.03);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}
.cuota-implicita-tag strong {
  color: #7be1c8;
}

.mercado-resultado { color: var(--m-resultado); }
.mercado-doble { color: var(--m-doble); }
.mercado-totalgoles { color: var(--m-totalgoles); }
.mercado-btts { color: var(--m-btts); }
.mercado-equipomarca { color: var(--m-equipomarca); }
.mercado-handicap { color: var(--m-handicap); }
.mercado-marcador { color: var(--m-marcador); }

.punto-mercado { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.punto-resultado { background: var(--m-resultado); }
.punto-doble { background: var(--m-doble); }
.punto-totalgoles { background: var(--m-totalgoles); }
.punto-btts { background: var(--m-btts); }
.punto-equipomarca { background: var(--m-equipomarca); }
.punto-handicap { background: var(--m-handicap); }
.punto-marcador { background: var(--m-marcador); }

/* ============ COMBINACIONES DEL MISMO PARTIDO ============ */
.combos-partido { border-top: 1px solid var(--line); padding: 18px 0 20px; margin-top: 4px; }
.combos-partido-titulo { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 11px; }

.combo-partido { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 12px 14px; margin-bottom: 8px; }
.combo-partido:last-child { margin-bottom: 0; }
.combo-partido-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.combo-partido-pct { font-family: var(--font-mono); font-weight: 700; font-size: 1.02rem; color: var(--green); }
.combo-partido-partes { margin: 0; font-size: 0.87rem; font-weight: 600; color: var(--text); }

/* ============ AUTO-CALIBRACION ============ */
.calibracion-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-raised); border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px; flex-wrap: wrap;
}
.calibracion-item-titulo { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.calibracion-item-valor { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; color: var(--gold); }
.calibracion-categorias { display: flex; flex-direction: column; gap: 6px; }

.calibracion-fila { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-xs); padding: 10px 13px; font-size: 0.82rem; }
.calibracion-fila-titulo { flex: 1; color: var(--text-muted); font-weight: 600; }
.calibracion-fila-factor { font-family: var(--font-mono); font-weight: 700; font-size: 0.98rem; }
.calibracion-fila-factor.sube { color: var(--gold); }
.calibracion-fila-factor.baja { color: var(--red); }
.calibracion-fila-muestras { color: var(--text-dim); font-size: 0.7rem; white-space: nowrap; font-family: var(--font-mono); }
.calibracion-vacio { color: var(--text-muted); font-size: 0.84rem; margin: 0; }

.calibracion-rango-fila { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 15px 17px; margin-bottom: 10px; }
.calibracion-rango-fila.pocas-muestras { opacity: 0.6; }
.calibracion-rango-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.calibracion-rango-label { font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem; color: var(--text); }
.calibracion-barra-item { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.calibracion-barra-item:last-child { margin-bottom: 0; }
.calibracion-barra-etiqueta { width: 130px; flex-shrink: 0; font-size: 0.72rem; color: var(--text-dim); }
.calibracion-barra-fondo { flex: 1; height: 7px; border-radius: 999px; background: var(--bg-raised); overflow: hidden; }
.calibracion-barra-relleno { height: 100%; border-radius: 999px; }
.calibracion-barra-relleno.predicho { background: var(--text-dim); }
.calibracion-barra-relleno.real.bien { background: var(--green); }
.calibracion-barra-relleno.real.sobreestimado { background: var(--red); }
.calibracion-barra-relleno.real.subestimado { background: var(--gold); }
.calibracion-barra-valor { width: 38px; text-align: right; flex-shrink: 0; font-size: 0.78rem; font-weight: 700; color: var(--text); font-family: var(--font-mono); }

.historial-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }

.boton-reiniciar {
  appearance: none;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color .18s var(--ease);
  flex-shrink: 0;
}
.boton-reiniciar:hover { background: var(--red-dim); color: var(--red); border-color: rgba(234,101,119,0.35); }

.historial-partido { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.historial-partido:last-child { margin-bottom: 0; }
.historial-partido-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.historial-partido-equipos { flex: 1; min-width: 140px; font-size: 0.86rem; color: var(--text); }
.historial-partido-marcador { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; color: var(--text-muted); }

.historial-partido-badge { font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; padding: 2px 10px; border-radius: 999px; flex-shrink: 0; }
.historial-partido-badge.todo-bien { background: var(--green-dim); color: var(--green); }
.historial-partido-badge.parcial { background: var(--gold-dim); color: var(--gold); }
.historial-partido-badge.todo-mal { background: var(--red-dim); color: var(--red); }

.historial-partido-mercados { display: flex; flex-direction: column; gap: 6px; }
.historial-mercado-item { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-muted); }
.historial-mercado-item.acierto { color: var(--green); }
.historial-mercado-item.fallo { color: var(--red); opacity: 0.85; }
.historial-mercado-check { font-weight: 700; width: 14px; flex-shrink: 0; text-align: center; }

.precision-general {
  display: flex; align-items: center; gap: 20px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 22px 26px; margin-bottom: 18px; box-shadow: var(--shadow-card);
}
.precision-general-num { font-family: var(--font-mono); font-weight: 700; font-size: 2.8rem; line-height: 1; color: var(--green); flex-shrink: 0; }
.precision-general-label { font-size: 0.79rem; color: var(--text-muted); line-height: 1.45; }

/* ============ COMBINADAS ============ */
.bloque-combinadas { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.bloque-combinadas.sin-borde-superior { margin-top: 0; padding-top: 0; border-top: none; }

.bloque-combinadas .subtitulo-combinadas {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(13, 19, 25, 0.7);
}
.bloque-combinadas h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.75rem; letter-spacing: -0.01em; margin: 0 0 7px; }
.bloque-combinadas .subtitulo-combinadas { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 22px; max-width: 56ch; line-height: 1.55; }

.tarjeta-combinada { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow-card); }
.tarjeta-combinada .encabezado-combinada { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.tarjeta-combinada .encabezado-combinada-titulo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tarjeta-combinada .etiqueta-combinada { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.1rem; color: var(--gold); }
.badge-combinada { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; font-family: var(--font-mono); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid transparent; }
.badge-premium { background: rgba(95, 227, 164, 0.14); color: var(--green); border-color: rgba(95, 227, 164, 0.24); }
.badge-smart { background: rgba(138, 166, 255, 0.14); color: #a8beff; border-color: rgba(138, 166, 255, 0.24); }
.badge-guarded { background: rgba(243, 195, 111, 0.12); color: var(--gold); border-color: rgba(243, 195, 111, 0.25); }
.badge-risk { background: rgba(255, 110, 110, 0.12); color: #ff8d8d; border-color: rgba(255, 110, 110, 0.25); }
.badge-neutral { background: rgba(255,255,255,0.04); color: var(--text-muted); border-color: rgba(255,255,255,0.08); }
.tarjeta-combinada .prob-combinada { font-family: var(--font-mono); font-weight: 700; font-size: 1.4rem; color: var(--text); }

.pierna-combinada { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.86rem; }
.pierna-combinada:first-of-type { border-top: none; }
.pierna-combinada .num {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: var(--radius-xs);
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--text-dim);
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.pierna-combinada .detalle { flex: 1; color: var(--text-muted); }
.pierna-combinada .detalle strong { color: var(--text); font-weight: 700; }
.pierna-combinada .pct { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.78rem; white-space: nowrap; }

.aviso-riesgo {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--gold-dim); border: 1px solid rgba(207,158,87,0.18); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-top: 18px; font-size: 0.8rem; color: var(--text-muted); line-height: 1.55;
}
.aviso-riesgo .icono { flex-shrink: 0; font-size: 1.1rem; }

/* ============ AVISOS / ESTADOS VACIOS ============ */
.aviso-servidor {
  text-align: center; color: var(--text-muted);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; font-size: 0.88rem; line-height: 1.6;
}
.aviso-servidor strong { color: var(--gold); }

/* ============ PIE DE PAGINA ============ */
.pie-pagina {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,22,29,0.8), rgba(7,12,17,0.95));
  border-radius: 0 0 24px 24px;
  position: relative;
}

.pie-pagina::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--green));
  border-radius: 1px;
}

.pie-pagina p {
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.7;
  text-align: center;
  margin: 16px 0 0;
}

.pie-pagina p strong {
  color: var(--text);
  font-weight: 600;
}

.pie-pagina .pie-pagina-enlaces {
  font-size: 0.75rem;
}

.pie-pagina .pie-pagina-enlaces a {
  color: var(--brand, #7be1c8);
  text-decoration: none;
}

.pie-pagina .pie-pagina-enlaces a:hover {
  text-decoration: underline;
}

/* Branding mejorado en el footer */
.pie-pagina .marca-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
}

.pie-pagina .marca-footer span {
  color: var(--green);
}

/* ===== Escudos de equipos ===== */
.escudo { width: 32px; height: 32px; object-fit: contain; vertical-align: middle; margin: 0 8px; }

/* ===== Transición al cambiar de pestaña ===== */
#contenedor-partidos, #contenedor-favoritos { opacity: 0; transition: opacity 0.3s var(--ease); }
#contenedor-partidos.visible, #contenedor-favoritos.visible { opacity: 1; }

/* ===== Filtro por liga ===== */
.filtro-ligas-pills {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 228, 169, 0.3) rgba(16, 27, 42, 0.4);
  -webkit-overflow-scrolling: touch;
}
.filtro-ligas-pills::-webkit-scrollbar {
  height: 5px;
}
.filtro-ligas-pills::-webkit-scrollbar-track {
  background: rgba(16, 27, 42, 0.4);
  border-radius: 999px;
}
.filtro-ligas-pills::-webkit-scrollbar-thumb {
  background: rgba(100, 228, 169, 0.35);
  border-radius: 999px;
}
.filtro-liga-btn {
  appearance: none;
  background: rgba(22, 34, 50, 0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #c5d3e8;
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: var(--lh-snug);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 8px -4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filtro-liga-btn:hover {
  background: rgba(30, 46, 68, 0.9);
  border-color: rgba(100, 228, 169, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px -10px rgba(100, 228, 169, 0.35);
}
.filtro-liga-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.filtro-liga-btn.activa {
  background: linear-gradient(135deg, var(--green), var(--brand));
  color: var(--ink-on-accent);
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: var(--fw-bold);
  box-shadow: 0 4px 16px -6px rgba(100, 228, 169, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* "Todas las ligas" diferenciada visualmente del resto */
.filtro-liga-btn[data-liga="TODAS"] {
  font-weight: var(--fw-bold);
  border-color: rgba(100, 228, 169, 0.4);
}
.filtro-liga-btn[data-liga="TODAS"]:not(.activa) {
  color: var(--brand-2);
}

.filtro-liga-btn .liga-escudo {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: inline-block;
  flex-shrink: 0;
}

.filtro-liga-btn.activa .liga-escudo {
  background: rgba(7, 18, 13, 0.3);
}

/* ===== Modo compacto / expandido ===== */
.lista-mercados .fila-mercado:nth-child(n + 3) { display: none; }
.lista-mercados.expandido .fila-mercado:nth-child(n + 3) { display: block; }
.boton-expandir {
  display: block; width: 100%; margin-top: 12px; padding: 10px;
  background: none; border: 1px solid var(--line); color: var(--text-muted);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.boton-expandir:hover { border-color: var(--green); color: var(--green); }

/* ===== Skeleton loader ===== */
.skeleton-tarjeta { background-color: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 24px; max-width: 500px; margin: 0 auto 30px; }
.skeleton-linea {
  background: linear-gradient(90deg, var(--bg-raised) 25%, var(--card-border) 50%, var(--bg-raised) 75%);
  background-size: 200% 100%; animation: skeleton-pulso 1.4s infinite; border-radius: 6px; margin-bottom: 12px;
}
@keyframes skeleton-pulso { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Indicador de posición en la tabla ===== */
.badge-posicion {
  font-size: 0.7rem; font-family: var(--font-mono); color: var(--text-muted);
  background-color: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 2px 6px; margin-left: 6px;
}

/* ===== Boton compartir combinada ===== */
.boton-compartir {
  display: block; width: 100%; margin-top: 14px; padding: 10px;
  background-color: transparent; color: var(--green); border: 1px solid rgba(69,210,154,0.4);
  border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color .18s var(--ease);
}
.boton-compartir:hover { background-color: var(--green-dim); border-color: var(--green); }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .tarjeta-partido, .skeleton-tarjeta, .bloque-combinadas { max-width: 100%; margin-left: 0; margin-right: 0; padding: 18px; }
  .encabezado-partido { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; }
  .encabezado-partido .equipo { font-size: 0.95rem; line-height: 1.15; }
  .escudo { width: 24px; height: 24px; }
  .filtro-liga-btn { font-size: 0.72rem; padding: 5px 10px; }
  .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accesos-rapidos { grid-template-columns: 1fr; }
}

/* ===== Ajustes finales de lectura y responsive ===== */
button,
input {
  min-height: 42px;
}

.landing-topbar-cta,
.landing-primary,
.landing-secondary {
  min-height: 44px;
}

.landing-sections,
.landing-cta-final {
  scroll-margin-top: 84px;
}

@media (max-width: 760px) {
  .landing-topbar {
    position: relative;
  }

  .landing-topbar-inner {
    padding: 14px 16px;
    gap: 12px;
  }

  .landing-brand {
    font-size: 1.45rem;
  }

  .landing-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-top: 2px;
  }

  .landing-nav a {
    flex: 0 0 auto;
    font-size: 0.76rem;
  }

  .landing-topbar-cta {
    padding: 8px 12px;
    font-size: 0.74rem;
  }

  body.home-mode main {
    padding: 0 12px 32px;
  }

  .landing-shell {
    padding: 28px 0 8px;
  }

  .landing-inner {
    padding: 32px 20px 24px;
    border-radius: 22px;
  }

  .landing-inner h1 {
    font-size: clamp(2.75rem, 13vw, 4.5rem);
    line-height: 0.9;
  }

  .landing-inner p {
    font-size: 0.96rem;
  }

  .landing-cta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .landing-primary,
  .landing-secondary {
    width: 100%;
  }

  .landing-card,
  .dashboard-card,
  .health-card,
  .transparencia-card {
    min-width: 0;
  }

  .landing-sections {
    padding-left: 4px;
    padding-right: 4px;
  }

  .landing-cta-final {
    padding-left: 4px;
    padding-right: 4px;
  }

  .landing-cta-final-inner {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .landing-cta-final-inner h2 {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }
}

@media (max-width: 420px) {
  .landing-topbar-inner {
    flex-wrap: wrap;
  }

  .landing-topbar-cta {
    margin-left: auto;
  }

  .landing-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing-badge {
    max-width: 100%;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 420px) {
  .app-nav-fila {
    padding-left: 14px;
    padding-right: 14px;
    gap: 10px;
  }

  .app-nav-marca {
    font-size: 1.2rem;
  }

  .app-nav-buscador {
    max-width: none;
    padding: 8px 10px;
  }

  .hero-compacto {
    padding-top: 40px;
  }

  .hero-compacto h1 {
    font-size: clamp(2.3rem, 12vw, 3.1rem);
  }

  .hero-kpis {
    grid-template-columns: 1fr;
  }

  .motor-panel-header,
  .vista-cabecera,
  .historial-dashboard-header,
  .historial-filtros-barra {
    flex-direction: column;
    align-items: flex-start;
  }

  .pestañas-fecha {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    scrollbar-width: none;
  }
  .pestañas-fecha::-webkit-scrollbar { display: none; }

  /* Barra unificada: buscador integrado debajo de los chips, sin romper estructura */
  .barra-filtros-unificada {
    background: linear-gradient(180deg, rgba(18, 29, 39, 0.85), rgba(11, 16, 22, 0.9));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 30px -24px rgba(0, 0, 0, 0.8);
  }

  .lista-mercados {
    grid-template-columns: 1fr;
  }

  .resumen-historial-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Estrella de favorito ===== */
.estrella-favorito {
  appearance: none; background: none; border: none; cursor: pointer;
  font-size: 0.9rem; line-height: 1; padding: 0; color: var(--text-dim);
  transition: color 0.15s var(--ease), transform 0.12s var(--ease);
}
.estrella-favorito:hover { transform: scale(1.12); color: var(--text-muted); }
.estrella-favorito.activa { color: var(--gold); }

/* ===== Boton "mi predicción" (pin) ===== */
.boton-pick {
  appearance: none; background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.13);
  border-radius: var(--radius-xs); width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease);
}
.boton-pick:hover { border-color: rgba(255,255,255,0.3); }
.boton-pick.activa { background: var(--gold); border-color: var(--gold); }

/* ============ BARRA DE FILTROS UNIFICADA (Pronósticos: chips + buscador) ============ */
/* Sin IDs nuevos: solo clases existentes, no rompe cambiarVista/cambiarLiga/onBuscarIntegrado */
.barra-filtros-unificada {
  background: linear-gradient(180deg, rgba(18, 29, 39, 0.85), rgba(11, 16, 22, 0.9));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 30px -24px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.barra-filtros-unificada .filtro-ligas-pills { margin-bottom: 0 !important; }

.input-buscar-integrado {
  width: 100%;
  background: rgba(7, 13, 20, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364e4a9' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center / 16px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  padding: 10px 14px 10px 38px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.input-buscar-integrado::placeholder { color: var(--text-muted); opacity: 0.85; }
.input-buscar-integrado:hover { border-color: rgba(100, 228, 169, 0.35); }
.input-buscar-integrado:focus {
  outline: none;
  border-color: var(--green);
  background-color: rgba(7, 13, 20, 0.85);
  box-shadow: 0 0 0 3px rgba(100, 228, 169, 0.18), 0 0 20px -6px rgba(100, 228, 169, 0.35);
}
.input-buscar-integrado::-webkit-search-cancel-button { cursor: pointer; }

/* ===== Selector de fecha personalizada ===== */
.selector-fecha-personalizada { display: flex; gap: 8px; margin-bottom: 22px; align-items: center; }
.selector-fecha-personalizada input[type="date"] {
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--text);
  font-family: var(--font-body); font-size: 0.85rem; padding: 9px 12px; border-radius: var(--radius-sm); flex: 1;
}
.selector-fecha-personalizada button {
  appearance: none; background: var(--green); border: none; color: var(--ink-on-accent);
  font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; padding: 9px 16px;
  border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; transition: background .18s var(--ease);
}
.selector-fecha-personalizada button:hover { background: #5ddcaa; }

/* ===== Cuota implícita ===== */
.cuota-implicita { margin: 8px 0 0; font-family: var(--font-mono); font-size: 0.66rem; opacity: 0.7; font-weight: 500; }
.fila-sin-apuesta { opacity: 0.65; }
.fila-porcentaje-nobet { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--text-dim); }
.fila-razones { margin: 7px 0; }
.fila-razon { margin: 0 0 3px; font-size: 0.7rem; opacity: 0.85; line-height: 1.45; }

.marcadores-probables-titulo { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); margin: 18px 0 9px; }
.marcadores-probables { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.marcador-chip {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-xs);
  padding: 6px 11px; font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.marcador-chip em { font-style: normal; color: var(--gold); margin-left: 4px; }

.catalogo-completo { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 10px; }
.catalogo-fila { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.8rem; color: var(--text-muted); }
.catalogo-fila:last-child { border-bottom: none; }

/* ===== Estilos refinados para tarjetas NO BET ===== */
.fila-sin-apuesta {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(12, 18, 26, 0.9));
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-left: 3px solid rgba(148, 163, 184, 0.35);
  opacity: 0.85;
}
.fila-sin-apuesta:hover {
  opacity: 1;
  border-color: rgba(148, 163, 184, 0.4);
}
.badge-nobet-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 3px 10px;
  border-radius: 6px;
}
.fila-nobet-detalle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.icono-info-nobet {
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-top: 1px;
}
.fila-nobet-detalle .cuota-implicita {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
  opacity: 0.85;
}


/* ============ VISTA "HISTORIAL" (tablero de picks liquidados) ============ */
.resumen-historial-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 720px) { .resumen-historial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.resumen-card {
  background: linear-gradient(180deg, rgba(18, 29, 39, 0.98), rgba(11, 16, 22, 0.94));
  border: 1px solid rgba(173, 186, 202, 0.14);
  border-radius: 18px;
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 24px -26px rgba(0,0,0,0.9);
}

.resumen-card:hover {
  border-color: rgba(123, 225, 200, 0.2);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 22px 36px -28px rgba(0,0,0,0.85);
}
.resumen-card-titulo { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); }
.resumen-card-valor { font-family: var(--font-mono); font-weight: 700; font-size: 1.95rem; line-height: 1; color: var(--text); }
.resumen-card-valor.color-verde { color: var(--green); }
.resumen-card-valor.color-cyan { color: var(--brand); }
.resumen-card-valor.color-gold { color: var(--luxury); }
.resumen-card-sub { font-size: 0.71rem; color: var(--text-muted); line-height: 1.45; }
.resumen-card-barra { height: 5px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; margin-top: 2px; }
.resumen-card-barra div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--green)); }

.historial-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 18px;
  padding-top: 2px;
}

.historial-dashboard-header h3 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  letter-spacing: -0.04em;
  color: var(--text);
}

.historial-filtros-barra { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.historial-filtros-chips { display: flex; gap: 2px; background: rgba(16, 27, 42, 0.8); border: 1px solid var(--line); border-radius: 12px; padding: 3px; width: fit-content; }
.chip-filtro {
  appearance: none; border: none; background: #122334; color: #edf3ff; border: 1px solid rgba(123,225,200,0.25);
  font-family: var(--font-body); font-weight: 600; font-size: 0.8rem; padding: 7px 14px;
  border-radius: 9px; cursor: pointer; transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 12px -6px rgba(0,0,0,0.4);
}
.chip-filtro:hover { color: #fff; transform: translateY(-1px); border-color: rgba(123,225,200,0.45); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 6px 16px -8px rgba(123,225,200,0.2); background: #1a2e3d; }
.chip-filtro.activo { background: linear-gradient(135deg, #0d201b, #122334); color: #fff; box-shadow: inset 0 0 0 1px rgba(123,225,200,0.35), 0 4px 14px -6px rgba(123,225,200,0.25); border-color: rgba(123,225,200,0.55); }

.historial-conteo-resultados { color: var(--text-dim); font-size: 0.78rem; margin: 0 0 15px; }
.lista-eval-historial { display: flex; flex-direction: column; gap: 12px; }

.eval-historial-fila {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, rgba(17,27,39,0.96), rgba(11,16,22,0.96));
  border: 1px solid rgba(173, 186, 202, 0.12);
  border-radius: 16px;
  padding: 14px 17px;
  flex-wrap: wrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 18px 24px -30px rgba(0,0,0,0.9);
}

.eval-historial-fila:hover {
  border-color: rgba(123, 225, 200, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 22px 28px -28px rgba(0,0,0,0.88);
}
.eval-historial-liga { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex-shrink: 0; width: 118px; font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.badge-final { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em; color: var(--green); background: var(--green-dim); padding: 2px 8px; border-radius: 999px; }
.eval-historial-cuerpo { flex: 1; min-width: 200px; }
.eval-historial-partido { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text); flex-wrap: wrap; }
.eval-historial-partido .eval-marcador {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem; color: var(--text);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 8px; padding: 1px 9px;
}
.eval-mercado-titulo { margin: 5px 0 0; font-size: 0.78rem; color: var(--text-muted); }
.eval-mercado-titulo em { font-style: normal; color: var(--text); font-weight: 700; }
.eval-historial-resultado { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.eval-icono { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.eval-icono.ok { background: var(--green-dim); color: var(--green); }
.eval-icono.no { background: var(--red-dim); color: var(--red); }
.eval-confianza { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--brand); min-width: 46px; text-align: right; }

.aviso-servidor {
  text-align: center; color: var(--text-muted);
  background: linear-gradient(180deg, rgba(18, 29, 39, 0.98), rgba(11, 16, 22, 0.94));
  border: 1px solid rgba(173, 186, 202, 0.14);
  border-radius: 18px;
  padding: 28px;
  font-size: 0.9rem;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 18px 24px -26px rgba(0,0,0,0.9);
}
.aviso-servidor strong { color: var(--luxury); }

/* ===== Aviso de datos demo (backend caído) ===== */
/* Banner honesto arriba de la lista: las tarjetas son PARTIDOS_FALLBACK, no la jornada real. */
.aviso-datos-demo {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  text-align: left;
  padding: 14px 16px;
  border: 1px solid rgba(242, 196, 116, 0.30);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(242, 196, 116, 0.10), rgba(11, 16, 22, 0.55));
  box-shadow: var(--shadow-card);
}
.aviso-datos-demo-icono { font-size: 1rem; line-height: 1.5; flex-shrink: 0; }
.aviso-datos-demo-texto strong {
  display: block; color: var(--gold);
  font-size: 0.86rem; font-weight: 700; letter-spacing: 0.01em;
}
.aviso-datos-demo-texto p {
  margin: 4px 0 0; color: var(--text-muted);
  font-size: 0.83rem; line-height: 1.55; max-width: 68ch;
}

.historial-pendientes {
  margin: 18px auto 0;
  max-width: 540px;
  text-align: left;
}
.historial-pendientes-titulo {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}
.historial-pendientes-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.historial-pendiente {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.historial-pendiente-equipos {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.historial-pendiente-fecha {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .eval-historial-liga { width: auto; flex-direction: row; align-items: center; }
  .eval-historial-resultado { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* ============ PULIDO VISUAL / ESTADOS DE DATOS ============ */
.app-nav {
  background: rgba(10, 12, 15, 0.92);
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}

.app-nav-marca {
  letter-spacing: -0.04em;
}

.hero-compacto {
  padding-top: 64px;
  padding-bottom: 18px;
}

.hero-eyebrow,
.vista-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-eyebrow-punto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(69,210,154,0.12);
}

.hero-compacto h1 {
  letter-spacing: -0.045em;
}

.hero-compacto p:not(.hero-eyebrow) {
  max-width: 52ch;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 560px;
  margin-top: 26px;
}

.hero-kpi {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: rgba(24,28,34,0.72);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

.hero-kpi strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 1;
}

.hero-kpi span {
  color: var(--text-dim);
  font-size: 0.68rem;
  line-height: 1.35;
}

.vista-cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.vista-cabecera .vista-eyebrow {
  margin-bottom: 8px;
}

.vista-cabecera h2 {
  margin-bottom: 5px;
}

.vista-cabecera .subtitulo-vista {
  margin-bottom: 0;
}

.estado-datos {
  flex-shrink: 0;
  margin-top: 5px;
  padding: 7px 10px;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(69,210,154,0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
}

.estado-carga,
.estado-vacio,
.estado-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 28px 22px;
  color: var(--text-muted);
  background: linear-gradient(145deg, rgba(24,28,34,0.88), rgba(20,23,28,0.7));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.estado-carga {
  flex-direction: row;
  min-height: 88px;
  font-size: 0.84rem;
}

.estado-vacio strong,
.estado-error strong {
  color: var(--text);
  font-size: 0.94rem;
}

.estado-vacio span,
.estado-error span {
  max-width: 48ch;
  font-size: 0.8rem;
  line-height: 1.55;
}

.estado-error {
  border-color: rgba(234,101,119,0.28);
  background: linear-gradient(145deg, rgba(52,22,32,0.62), rgba(24,28,34,0.78));
}

.estado-error strong { color: var(--red); }

.estado-spinner {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid rgba(69,210,154,0.22);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}

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

.boton-reiniciar,
.boton-reintentar {
  appearance: none;
  margin-top: 4px;
  padding: 9px 15px;
  color: var(--ink-on-accent);
  background: var(--green);
  border: 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
}

.boton-reiniciar:hover,
.boton-reintentar:hover { background: #5ddcaa; }

.calidad-datos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  font-weight: 600;
  white-space: nowrap;
}

.calidad-datos-punto {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.calidad-datos.alta { color: var(--green); border-color: rgba(69,210,154,0.22); }
.calidad-datos.media { color: var(--gold); border-color: rgba(207,158,87,0.22); }
.calidad-datos.limitada { color: var(--red); border-color: rgba(234,101,119,0.25); }

.aviso-servidor-carga {
  min-height: 170px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 24px;
  background:
    linear-gradient(180deg, rgba(18, 29, 39, 0.85), rgba(11, 16, 22, 0.9)) padding-box,
    linear-gradient(135deg, rgba(100, 228, 169, 0.35), rgba(148, 163, 184, 0.1)) border-box;
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.aviso-servidor-carga .estado-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  border-top-color: var(--green);
  box-shadow: 0 0 16px rgba(100, 228, 169, 0.5);
}

@media (max-width: 600px) {
  .hero-compacto { padding-top: 42px; }
  .hero-kpis { gap: 6px; }
  .hero-kpi { padding: 10px 9px; }
  .hero-kpi span { font-size: 0.61rem; }
  .vista-cabecera { flex-direction: column; gap: 10px; }
  .estado-datos { margin-top: 0; }
  .calidad-datos { font-size: 0.57rem; }
}
/* ============ MEJORAS DE PULIDO Y MICRO-INTERACCIONES ============ */

.tarjeta-partido:hover {
  border-color: color-mix(in srgb, var(--green) 30%, var(--card-border));
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 40px -18px rgba(0,0,0,0.7);
}

.tarjeta-partido::after {
  content: "";
  position: absolute;
  top: 0; left: -100%; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0;
  transition: left 0.6s var(--ease), opacity 0.3s var(--ease);
  pointer-events: none;
}
.tarjeta-partido:hover::after {
  left: 100%;
  opacity: 0.5;
}

.tarjeta-partido:nth-child(2) { animation-delay: 0.06s; }
.tarjeta-partido:nth-child(3) { animation-delay: 0.12s; }
.tarjeta-partido:nth-child(4) { animation-delay: 0.18s; }
.tarjeta-partido:nth-child(5) { animation-delay: 0.24s; }

.fila-mercado {
  transition: transform 0.2s var(--ease), border-color 0.18s var(--ease), box-shadow 0.2s var(--ease);
}
.fila-mercado:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(0,0,0,0.5);
}
.fila-mercado.mercado-principal:hover {
  border-color: color-mix(in srgb, var(--gold) 50%, var(--card-border));
}

.barra-relleno {
  background: linear-gradient(90deg, currentColor, color-mix(in srgb, currentColor 70%, white));
  background-size: 200% 100%;
  animation: brilloBarra 2s var(--ease) infinite;
}
@keyframes brilloBarra {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.nav-tab, .pestaña, .filtro-liga-btn, .chip-filtro {
  position: relative;
  overflow: hidden;
}
.nav-tab::before, .pestaña::before, .filtro-liga-btn::before, .chip-filtro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}
.nav-tab:hover::before, .pestaña:hover::before, .filtro-liga-btn:hover::before, .chip-filtro:hover::before {
  opacity: 1;
}

.estrella-favorito:active { transform: scale(0.85); }
.estrella-favorito.activa { animation: popEstrella 0.3s var(--ease); }
@keyframes popEstrella {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.boton-pick:active { transform: scale(0.9); }
.boton-pick.activa { animation: popPick 0.25s var(--ease); }
@keyframes popPick {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.acceso-rapido:hover {
  border-color: color-mix(in srgb, var(--green) 25%, var(--card-border));
  box-shadow: 0 10px 30px -14px rgba(69, 210, 154, 0.15);
}

.vista.vista-activa {
  animation: entrarVista 0.35s var(--ease) both;
}
@keyframes entrarVista {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.marcador-chip {
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
  cursor: default;
}
.marcador-chip:hover {
  transform: scale(1.08);
  border-color: var(--gold);
}

.tarjeta-combinada {
  animation: aparecerTarjeta 0.35s var(--ease) both;
}
.tarjeta-combinada:nth-child(2) { animation-delay: 0.08s; }
.tarjeta-combinada:nth-child(3) { animation-delay: 0.16s; }

.boton-expandir {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.boton-expandir::after {
  content: "▾";
  font-size: 0.7rem;
  transition: transform 0.2s var(--ease);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

::selection { background: rgba(69, 210, 154, 0.25); color: var(--text); }

.pie-pagina { position: relative; }
.pie-pagina::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ============ FILTROS DEL HISTORIAL ============ */
.historial-filtros {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px;
  background: linear-gradient(180deg, rgba(18, 29, 39, 0.98), rgba(11, 16, 22, 0.94));
  border: 1px solid rgba(173, 186, 202, 0.14);
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 18px 24px -26px rgba(0,0,0,0.9);
}

.historial-filtro-grupo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.historial-filtro-grupo label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.filtro-estado,
.filtro-periodo,
.filtro-btn {
  appearance: none;
  background: var(--card-2);
  border: 1px solid var(--card-border-soft);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.filtro-estado:hover,
.filtro-periodo:hover,
.filtro-btn:hover {
  border-color: rgba(123, 225, 200, 0.28);
  background: var(--card-3);
  color: var(--text);
}

.filtro-estado.activo,
.filtro-periodo.activo,
.filtro-btn.activo {
  background: linear-gradient(135deg, rgba(123, 225, 200, 0.18), rgba(123, 225, 200, 0.08));
  border-color: rgba(123, 225, 200, 0.4);
  color: var(--brand-2);
  box-shadow: inset 0 0 0 1px rgba(123, 225, 200, 0.12);
}

.analitica-controles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(16, 27, 42, 0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: fit-content;
}

/* ============ RESUMEN DEL HISTORIAL ============ */
.historial-resumen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.resumen-card {
  background: linear-gradient(180deg, rgba(18, 29, 39, 0.98), rgba(11, 16, 22, 0.94));
  border: 1px solid rgba(173, 186, 202, 0.14);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 24px -26px rgba(0,0,0,0.9);
  transition: all 0.18s var(--ease);
}

.resumen-card:hover {
  border-color: rgba(123, 225, 200, 0.22);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 22px 36px -28px rgba(0,0,0,0.85);
}

.resumen-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.resumen-valor {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* ============ NIVEL DE CONFIANZA VISUAL ============ */
.nivel-confianza {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.nivel-confianza.alta {
  background: rgba(95, 227, 164, 0.15);
  color: var(--green);
  border: 1px solid rgba(95, 227, 164, 0.25);
}

.nivel-confianza.media {
  background: rgba(242, 196, 116, 0.15);
  color: var(--gold);
  border: 1px solid rgba(242, 196, 116, 0.25);
}

.nivel-confianza.baja {
  background: rgba(255, 110, 127, 0.15);
  color: #ff8d8d;
  border: 1px solid rgba(255, 110, 127, 0.25);
}

.indicador-confianza {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

@media (max-width: 760px) {
  .historial-filtros {
    gap: 12px;
    padding: 14px;
  }
  .historial-filtro-grupo {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }
  .filtro-estado,
  .filtro-periodo {
    width: 100%;
  }
  .historial-resumen {
    grid-template-columns: 1fr 1fr;
  }
  .resumen-valor {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .historial-resumen {
    grid-template-columns: 1fr;
  }
}

/* ============ DASHBOARD PERSONAL ============ */
.dashboard-personal {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 48px 0 0;
  padding: 0 24px 60px;
}

.dashboard-titulo {
  text-align: center;
  margin-bottom: 28px;
}

.dashboard-titulo h2,
.dashboard-titulo h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.06em;
  color: var(--text);
}

.dashboard-titulo p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.25s var(--ease);
  isolation: isolate;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  border-radius: 70% 30% 50% 20% / 30% 50% 60% 40%;
  background: radial-gradient(circle, rgba(100, 228, 169, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-card:hover::before { opacity: 0.3; }

.dashboard-card:hover {
  border-color: rgba(123, 225, 200, 0.25);
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-card-elevated);
}

.dashboard-card:active { transform: translateY(1px) scale(0.99); }

.dashboard-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-valor {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

/* Tarjetas con acentos de color */
.dashboard-card.accent-cyan .dashboard-label { color: var(--dash-accent); }
.dashboard-card.accent-cyan .dashboard-valor { color: var(--dash-accent); }
.dashboard-card.accent-oro .dashboard-label { color: var(--gold); }
.dashboard-card.accent-oro .dashboard-valor { color: var(--gold); }
.dashboard-card.accent-rosa .dashboard-label { color: #f87171; }
.dashboard-card.accent-rosa .dashboard-valor { color: #f87171; }

/* ============================================================
   LAYOUT & COMPOSITION PRINCIPLES
   ============================================================
   Structural devices = information, not decoration.
   Numbered markers (01 / 02 / 03) only if content is a sequence.
   Modular rhythm: all spacings multiples of 4px (--space-1 to --space-8).
   Asymmetrical composition with purpose; no centering everything.
   Empty states are invitations to act, not mood pieces.
   Un punto de boldness = el hero (KPIs grandes), lo demás quieto.

   Motion: secuencia orchestrada en carga (content-reveal), no fade-up
   scattered en cada sección. Motion que responde a acción de usuario
   es bienvenido (hover, expand, confirm).

   Copy: name things by what users understand, no por cómo esté
   construido el sistema. Empty states welcome action.

   .empty-state {
     text-align: center;
     padding: var(--space-8) var(--space-4);
     color: var(--text-dim);
     &:before {
       content: "•";
       display: block;
       width: 40px;
       height: 40px;
       margin: 0 auto var(--space-2);
       background: var(--accent-primary);
       border-radius: var(--radius-full);
       color: var(--bg-base);
       font-size: 2rem;
       line-height: 1;
     }
   }
============================================================ */
.quick-access {

.dashboard-label {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  line-height: var(--lh-snug);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tooltip-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(123, 225, 200, 0.12);
  color: var(--brand);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  border: 1px solid rgba(123, 225, 200, 0.2);
  transition: all 0.18s var(--ease);
}

.tooltip-icono:hover {
  background: rgba(123, 225, 200, 0.22);
  border-color: rgba(123, 225, 200, 0.3);
}

.dashboard-valor {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.04em;
}

.dashboard-card small {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
}

/* ============ MOTOR HEALTH VISUALIZATION ============ */
.motor-health-section {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 60px;
  padding: 0 24px;
}

.motor-health-header {
  text-align: center;
  margin-bottom: 28px;
}

.motor-health-header h2,
.motor-health-header h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.06em;
  color: var(--text);
}

.motor-health-header p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

.motor-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

@media (max-width: 900px) {
  .motor-health-grid {
    grid-template-columns: 1fr;
  }
}

.health-card {
  background: linear-gradient(180deg, rgba(18, 29, 39, 0.98), rgba(11, 16, 22, 0.94));
  border: 1px solid rgba(173, 186, 202, 0.14);
  border-radius: 22px;
  padding: 28px;
  min-width: 0;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 30px -26px rgba(0,0,0,0.9);
}

.health-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.health-label {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  line-height: var(--lh-snug);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  flex-wrap: wrap;
}

.health-grande {
  position: relative;
  width: 150px;
  max-width: 100%;
  height: 150px;
  margin-inline: auto;
  flex-shrink: 0;
}

/* Estado vacío del gauge: explica qué falta en vez de dejar "SIN DATOS" huérfano */
.health-gauge-nota {
  margin: -4px auto 0;
  max-width: 26ch;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.45;
}

.health-gauge {
  width: 100%;
  height: auto;
  max-width: 150px;
  display: block;
  margin-inline: auto;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.5)) drop-shadow(0 0 14px rgba(123,225,200,0.18));
}

.health-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 560px) {
  .health-stats { grid-template-columns: 1fr; }
  .health-card { padding: 20px; }
}

.health-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

.health-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.health-stat-dot.verde { background: var(--green); box-shadow: 0 0 10px rgba(95,227,164,0.5); }
.health-stat-dot.cyan { background: var(--brand); box-shadow: 0 0 10px rgba(123,225,200,0.5); }
.health-stat-dot.gold { background: var(--gold); box-shadow: 0 0 10px rgba(242,196,116,0.5); }

.health-mercados {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.health-sub {
  color: var(--text-dim);
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
  margin: 8px 0 0;
  max-width: 40ch;
}

.health-mercado-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  min-width: 0;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.health-mercado-item:hover {
  border-color: var(--card-border);
  background: rgba(255,255,255,0.02);
}

.health-mercado-nombre {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text);
  font-weight: var(--fw-semibold);
  min-width: 0;
  overflow-wrap: anywhere;
}

.health-mercado-nivel {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.health-mercado-nivel.alto { background: rgba(95, 227, 164, 0.14); color: var(--green); border-color: rgba(95, 227, 164, 0.24); }
.health-mercado-nivel.bueno { background: rgba(95, 227, 164, 0.1); color: #7be1c8; border-color: rgba(95, 227, 164, 0.18); }
.health-mercado-nivel.media { background: rgba(242, 196, 116, 0.12); color: var(--gold); border-color: rgba(242, 196, 116, 0.22); }

.health-barra {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  flex: 1;
  min-width: 60px;
}

.health-barra div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--green));
  transition: width 0.5s var(--ease);
  position: relative;
  box-shadow: 0 0 14px rgba(100, 228, 169, 0.45);
}
.health-barra div::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
}

.health-mercado-valor {
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  color: var(--text);
  min-width: 48px;
  text-align: right;
}

.health-nota {
  text-align: center;
  color: var(--text-dim);
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
  margin-top: 12px;
}

/* ============ GARANTIA DE TRANSPARENCIA ============ */
.transparencia-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.transparencia-header {
  text-align: center;
  margin-bottom: 28px;
}

.transparencia-header h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.4rem);
  letter-spacing: -0.06em;
  color: var(--text);
}

.transparencia-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.transparencia-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .transparencia-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .transparencia-grid {
    grid-template-columns: 1fr;
  }
}

.transparencia-card {
  background: linear-gradient(180deg, rgba(18, 29, 39, 0.98), rgba(11, 16, 22, 0.94));
  border: 1px solid rgba(95, 227, 164, 0.18);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 24px -26px rgba(0,0,0,0.9);
  transition: all 0.18s var(--ease);
}

.transparencia-card:hover {
  border-color: rgba(95, 227, 164, 0.3);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(20, 31, 42, 0.98), rgba(13, 18, 25, 0.94));
}

.transparencia-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(95, 227, 164, 0.12);
  color: var(--green);
  font-size: 1.5rem;
  border: 1px solid rgba(95, 227, 164, 0.24);
}

.transparencia-card strong {
  color: var(--text);
  font-size: 1.04rem;
  margin-bottom: 2px;
}

.transparencia-card p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0;
}

/* ============ FILTROS AVANZADOS ============ */
.filtro-mercado,
.filtro-confianza {
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(173, 186, 202, 0.14);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.filtro-mercado:hover,
.filtro-confianza:hover {
  border-color: rgba(173, 186, 202, 0.22);
  color: var(--text);
}

.filtro-mercado.activo,
.filtro-confianza.activo {
  background: linear-gradient(135deg, rgba(123, 225, 200, 0.14), rgba(123, 225, 200, 0.06));
  border-color: rgba(123, 225, 200, 0.3);
  color: var(--brand-2);
  box-shadow: inset 0 0 0 1px rgba(123, 225, 200, 0.1);
}

.badge-posicion {
  transition: background-color 0.15s var(--ease);
  cursor: default;
}
.badge-posicion:hover {
  background-color: var(--card);
  color: var(--green);
}

.contador-favoritos { animation: pulsoContador 0.3s var(--ease); }
@keyframes pulsoContador {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.estado-spinner {
  animation: girar 0.8s linear infinite, respirar 2s var(--ease) infinite;
}
@keyframes respirar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============ BADGE DE CONFIANZA ============ */
.badge-confianza {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-confianza.conf-alta {
  background: color-mix(in srgb, var(--green) 18%, transparent);
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
}
.badge-confianza.conf-media {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 35%, transparent);
}
.badge-confianza.conf-baja {
  background: color-mix(in srgb, var(--text-dim) 15%, transparent);
  color: var(--text-dim);
  border-color: color-mix(in srgb, var(--text-dim) 25%, transparent);
}

.badge-confianza-lectura {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-confianza-lectura.conf-alta {
  background: color-mix(in srgb, var(--green) 22%, transparent);
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, transparent);
}
.badge-confianza-lectura.conf-media {
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
}
.badge-confianza-lectura.conf-baja {
  background: color-mix(in srgb, #ff5c5c 18%, transparent);
  color: #ff8d8d;
  border-color: color-mix(in srgb, #ff5c5c 35%, transparent);
}

.fila-contexto-block {
  font-size: 0.72rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  border-left: 2px solid var(--accent);
  line-height: 1.35;
}
.contexto-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-right: 4px;
}

.fila-explicacion-block {
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  border-radius: 6px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.4;
}
.explicacion-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  display: block;
  margin-bottom: 2px;
}

.fila-header {
  gap: 6px;
}

/* ================================================================
   ANALÍTICA DEL MOTOR — ESTILOS COMPLETOS
   ================================================================ */

/* ---- Contenedor base de la vista ---- */
#vista-analitica {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

#bloque-historial {
  margin-top: 8px;
}

/* ---- Cabecera principal ---- */
.vista-analitica-header {
  text-align: center;
  padding: 32px 20px 24px;
  max-width: 780px;
  margin: 0 auto 8px;
}

.vista-analitica-header h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: -0.06em;
  color: var(--text);
  background: linear-gradient(135deg, var(--text) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vista-analitica-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* ---- Grid de Telemetría (4 KPI cards) ---- */
.telemetria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 1000px) {
  .telemetria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .telemetria-grid { grid-template-columns: 1fr; }
}

.telemetria-card {
  background: linear-gradient(160deg, rgba(20, 32, 44, 0.98) 0%, rgba(11, 16, 22, 0.96) 100%);
  border: 1px solid rgba(173, 186, 202, 0.13);
  border-radius: 18px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 16px 28px -22px rgba(0,0,0,0.85);
  transition: all 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}

.telemetria-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(ellipse at top left, rgba(123,225,200,0.05) 0%, transparent 65%);
  pointer-events: none;
}

.telemetria-card:hover {
  border-color: rgba(123, 225, 200, 0.22);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 36px -24px rgba(0,0,0,0.8);
}

.telemetria-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.telemetria-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(123,225,200,0.1);
  border: 1px solid rgba(123,225,200,0.18);
}

.telemetria-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  margin-left: auto;
}

.telemetria-badge.ok   { background: rgba(95,227,164,0.14); color: var(--green); border-color: rgba(95,227,164,0.28); }
.telemetria-badge.info { background: rgba(123,225,200,0.12); color: var(--brand-2); border-color: rgba(123,225,200,0.22); }
.telemetria-badge.warn { background: rgba(242,196,116,0.13); color: var(--gold); border-color: rgba(242,196,116,0.26); }

.telemetria-valor {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}

.telemetria-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.telemetria-progreso {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-top: 2px;
}

.telemetria-progreso-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--green));
  box-shadow: 0 0 12px rgba(100,228,169,0.4);
  transition: width 0.6s var(--ease);
}

.telemetria-sub {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.45;
  margin-top: 2px;
}

/* ---- Wrapper de controles / filtros pill ---- */
.analitica-controles-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.analitica-controles-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Sobreescribir el pill dentro de analitica para estilo glaseado */
.analitica-controles .filtro-btn {
  border-radius: 999px !important;
  padding: 7px 14px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(173,186,202,0.14);
  color: var(--text-muted);
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.analitica-controles .filtro-btn:hover {
  background: rgba(123,225,200,0.08);
  border-color: rgba(123,225,200,0.22);
  color: var(--text);
}

.analitica-controles .filtro-btn.activo {
  background: linear-gradient(135deg, rgba(123,225,200,0.18), rgba(123,225,200,0.07));
  border-color: rgba(123,225,200,0.38);
  color: var(--brand-2);
  box-shadow: 0 0 16px rgba(123,225,200,0.12), inset 0 0 0 1px rgba(123,225,200,0.1);
}

/* ================================================================
   ESTADO VACÍO — Auditoría en proceso
   ================================================================ */
.auditoria-vacia-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.auditoria-vacia-card {
  background: linear-gradient(160deg, rgba(18, 29, 44, 0.97) 0%, rgba(11, 16, 22, 0.94) 100%);
  border: 1px solid rgba(123,225,200,0.16);
  border-radius: 20px;
  padding: 28px 26px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 16px 28px -22px rgba(0,0,0,0.85);
}

.auditoria-vacia-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.auditoria-vacia-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(123,225,200,0.14), rgba(123,225,200,0.06));
  border: 1px solid rgba(123,225,200,0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.auditoria-vacia-head h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  color: var(--text);
}

.auditoria-vacia-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.auditoria-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 700px) {
  .auditoria-tips-grid { grid-template-columns: 1fr; }
}

.auditoria-tip {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(173,186,202,0.1);
  border-radius: 14px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auditoria-tip-num {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--green));
  color: #0a131b;
  font-weight: 800;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auditoria-tip strong {
  color: var(--text);
  font-size: 0.82rem;
  display: block;
}

.auditoria-tip span {
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* ================================================================
   BENCHMARK DE REFERENCIA
   ================================================================ */
.benchmark-referencia-card {
  background: linear-gradient(160deg, rgba(18, 29, 44, 0.97) 0%, rgba(11, 16, 22, 0.94) 100%);
  border: 1px solid rgba(173,186,202,0.12);
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.benchmark-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.benchmark-head h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.benchmark-head span {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 700px) {
  .benchmark-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.benchmark-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(173,186,202,0.09);
  border-radius: 12px;
}

.benchmark-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.benchmark-info span:first-child {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.benchmark-info strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}

.benchmark-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.benchmark-bar div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--green));
  box-shadow: 0 0 8px rgba(100,228,169,0.35);
}

/* ================================================================
   PANEL DE CALIBRACIÓN — Módulo completo
   ================================================================ */
.panel-calibracion-modulo {
  background: linear-gradient(160deg, rgba(18, 29, 44, 0.97) 0%, rgba(11, 16, 22, 0.94) 100%);
  border: 1px solid rgba(173,186,202,0.12);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 20px 32px -24px rgba(0,0,0,0.85);
}

.panel-calibracion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(173,186,202,0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.panel-calibracion-header h3 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.04em;
  color: var(--text);
}

.panel-calibracion-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.panel-acciones-calibracion {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.boton-accion-secundario {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(173,186,202,0.14);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  font-family: var(--font-body);
  white-space: nowrap;
}

.boton-accion-secundario:hover {
  background: rgba(123,225,200,0.08);
  border-color: rgba(123,225,200,0.22);
  color: var(--text);
}

/* ---- Grid de tarjetas de calibración ---- */
.calibracion-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 22px 22px;
}

@media (max-width: 900px) {
  .calibracion-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .calibracion-cards-grid { grid-template-columns: 1fr; }
}

.calibracion-telemetria-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(173,186,202,0.1);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.18s var(--ease);
}

.calibracion-telemetria-card:hover {
  border-color: rgba(123,225,200,0.2);
  background: rgba(123,225,200,0.03);
}

.telemetria-param-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.telemetria-param-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: rgba(123,225,200,0.08);
  border: 1px solid rgba(123,225,200,0.15);
}

.telemetria-param-nombre {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}

.badge-telemetria {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
  margin-left: auto;
}

.badge-telemetria.estandar    { background: rgba(173,186,202,0.1); color: var(--text-muted); border-color: rgba(173,186,202,0.2); }
.badge-telemetria.matematico  { background: rgba(123,225,200,0.12); color: var(--brand-2); border-color: rgba(123,225,200,0.22); }
.badge-telemetria.autoajustado { background: rgba(95,227,164,0.13); color: var(--green); border-color: rgba(95,227,164,0.26); }

.telemetria-param-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.telemetria-param-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.telemetria-param-desc {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.45;
}

.telemetria-param-progreso {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.progreso-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.progreso-label span:first-child {
  color: var(--text-muted);
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.progreso-label span:last-child {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

.progreso-barra-bg {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.progreso-barra-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--green));
  box-shadow: 0 0 10px rgba(100,228,169,0.38);
  transition: width 0.6s var(--ease);
}

/* ---- Categorías por liga/equipo ---- */
.calibracion-categorias-bloque {
  padding: 0 22px 22px;
}

.calibracion-categorias-bloque h4 {
  margin: 0 0 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.calibracion-categorias-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calibracion-fila-card {
  background: rgba(255,255,255,0.022);
  border: 1px solid rgba(173,186,202,0.09);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calibracion-fila-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calibracion-fila-head span:first-child {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.calibracion-fila-factor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calibracion-fila-factor code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(242,196,116,0.1);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(242,196,116,0.18);
}

.calibracion-vacio-card {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ================================================================
   MEDIA QUERIES ADICIONALES ANALÍTICA
   ================================================================ */
@media (max-width: 760px) {
  .vista-analitica-header {
    padding: 24px 16px 18px;
  }
  .panel-calibracion-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .panel-acciones-calibracion {
    width: 100%;
  }
  .boton-accion-secundario {
    flex: 1;
    justify-content: center;
  }
  .benchmark-head {
    flex-direction: column;
    gap: 4px;
  }
}

/* ============ MODAL ARMAR COMBINADA ============ */
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-overlay {
  display: none;
}

.modal-overlay.activo {
  display: flex;
}

.modal-container {
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.9);
  overflow: hidden;
  animation: modalFadeIn 0.25s ease;
  margin: auto;
  position: relative;
  z-index: 10000;
}

.modal-header {
  flex-shrink: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-raised);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  flex-shrink: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-resumen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
}

.modal-boton {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-boton-danger {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}

.modal-boton-danger:hover {
  background: rgba(239,68,68,0.25);
}

.modal-boton-brand {
  background: rgba(123,228,200,0.15);
  color: var(--brand);
  border: 1px solid rgba(123,228,200,0.3);
}

.modal-boton-brand:hover {
  background: rgba(123,228,200,0.25);
}

.modal-boton-gold {
  background: rgba(242,196,116,0.15);
  color: var(--gold);
  border: 1px solid rgba(242,196,116,0.3);
}

.modal-boton-gold:hover {
  background: rgba(242,196,116,0.25);
}

.modal-boton-primary {
  background: linear-gradient(135deg, var(--green), var(--brand));
  color: #07120d;
  border: none;
  padding: 10px 20px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px -4px rgba(100,228,169,0.6);
}

.modal-boton-primary:hover {
  transform: translateY(-1px);
}

/* ===== Acordeones de liga en modal combinada ===== */
.modal-liga-acordeon {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.modal-liga-cabecera {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
  user-select: none;
}

.modal-liga-cabecera:hover {
  background: rgba(255,255,255,0.04);
}

.modal-liga-cabecera.abierta {
  border-bottom-color: var(--line);
  background: rgba(123,228,200,0.04);
}

.modal-liga-nombre {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.modal-liga-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.modal-liga-icono {
  color: var(--green);
  font-size: 0.8rem;
  margin-right: 8px;
}

.modal-liga-cuerpo {
  padding: 0;
  display: none;
}

.modal-liga-cuerpo.abierto {
  display: block;
}

/* ===== Checkboxes como chips seleccionables ===== */
.combinada-pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.12);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 4px;
}

.combinada-pick-chip:hover {
  border-color: rgba(123,228,200,0.25);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.combinada-pick-chip input[type="checkbox"] {
  display: none;
}

.combinada-pick-chip .chip-marca {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(148,163,184,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: all 0.2s;
  color: transparent;
}

  /* The chip visual is handled by .chip-marca */
.combinada-pick-chip input:checked + .chip-marca {
  background: var(--green);
  border-color: var(--green);
  color: #07120d;
  font-weight: 800;
}

.combinada-pick-chip input:checked ~ .chip-info {
  color: var(--text);
}

.chip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chip-info .chip-label {
  font-weight: 600;
  color: var(--text);
}

.chip-info .chip-prob {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.chip-info .chip-prob .prob-valor {
  color: var(--green);
  font-weight: 700;
}


/* ============================================================
   DASHBOARD COMPACTO — DARK MODE (#0b1320 / #162235)
   Rediseño del contenedor principal de la vista "Fulbito" (inicio):
   sidebar fijo + header compacto + KPIs + accesos rápidos.
   No altera el comportamiento off-canvas del resto de vistas.
   ============================================================ */
:root {
  --dash-bg: #0b1320;
  --dash-surface: #162235;
  --dash-surface-2: #1b2a41;
  --dash-border: rgba(148, 170, 199, 0.14);
  --dash-border-strong: rgba(148, 170, 199, 0.28);
  --dash-line: rgba(148, 170, 199, 0.09);
  --dash-accent: #64e4a9;
  --dash-radius: 12px;
  --dash-sidebar-w: 240px;
}

/* --- Lienzo del dashboard (full-width: sidebar fijo + contenido flexible) --- */
body.home-mode {
  display: grid !important;
  grid-template-columns: 240px 1fr !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  margin: 0 !important;
  background: var(--dash-bg);
  overflow-x: hidden;
  font-family: var(--font-body);
}

/* Fondo sutil con gradiente para dar profundidad */
body.home-mode::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(100, 228, 169, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(196, 191, 226, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* El sidebar ocupa la columna 1 y el contenido la columna 2 (sin franjas) */
body.home-mode .app-nav.dash-sidebar { grid-column: 1 !important; }
body.home-mode main { grid-column: 2 !important; }
body.home-mode .pie-pagina { grid-column: 2 !important; }
body.home-mode .landing-topbar { grid-column: 1 / -1 !important; }
body.home-mode .dash-menu-flotante { grid-column: 1 / -1 !important; }

body.home-mode main {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 12px 24px 20px;
}

body.home-mode .pie-pagina {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
}

/* Contenedores internos sin restricciones de ancho (pantalla de extremo a extremo) */
body.home-mode #vista-inicio,
body.home-mode #vista-inicio .landing-inner,
body.home-mode #vista-inicio .dash-header,
body.home-mode #vista-inicio .dash-kpis,
body.home-mode #vista-inicio .dash-seccion,
body.home-mode #vista-inicio .dash-quick,
body.home-mode #vista-inicio .dash-plegables,
body.home-mode #vista-inicio .dash-info,
body.home-mode #vista-inicio .dash-cta {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.home-mode #vista-inicio.landing-shell { padding: 0; }

body.home-mode #vista-inicio.landing-shell::before { display: none; }

body.home-mode #vista-inicio.vista.vista-activa { padding-top: 0; }

body.home-mode #vista-inicio .landing-inner {
  max-width: none;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

body.home-mode #vista-inicio .landing-inner::before,
body.home-mode #vista-inicio .landing-inner::after { display: none; }

/* --- SIDEBAR FIJO (columna 1 del grid: 240px; el contenido toma el resto con 1fr) --- */
body.home-mode .app-nav.dash-sidebar {
  display: flex !important;
  position: sticky;
  left: 0;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  flex-direction: column;
  flex-shrink: 0;
  gap: 12px;
  width: var(--dash-sidebar-w);
  padding: 20px 18px 20px;
  background: linear-gradient(180deg, var(--dash-surface) 0%, var(--dash-surface-2) 100%);
  border-right: 1px solid var(--dash-border-strong);
  box-shadow: 8px 0 25px -10px rgba(0, 0, 0, 0.4), inset 1px 0 0 rgba(255,255,255,0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 60;
  overflow-y: auto;
}

/* Scrollbar personalizada para el sidebar */
body.home-mode .app-nav.dash-sidebar::-webkit-scrollbar {
  width: 6px;
}
body.home-mode .app-nav.dash-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
body.home-mode .app-nav.dash-sidebar::-webkit-scrollbar-thumb {
  background: var(--dash-border);
  border-radius: 999px;
}
body.home-mode .app-nav.dash-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--dash-border-strong);
}

/* Header del sidebar congradiente sutil */
.dash-sidebar-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dash-line);
}

/* Logo con efecto de brillo */
.dash-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text);
}
.dash-logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--dash-accent), var(--brand));
  color: var(--ink-on-accent);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(100, 228, 169, 0.3);
  transition: transform 0.2s ease;
}
.dash-logo-mark:hover { transform: scale(1.05); }
.dash-logo-texto {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dash-logo-texto em { font-style: normal; color: var(--dash-accent); }

/* Salud del motor con barra progresiva mejorada */
.dash-pie-bloque {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dash-line);
}
.dash-pie-valor {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--dash-accent);
  line-height: 1;
}
.dash-pie-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dash-pie-barra {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 170, 199, 0.12);
  overflow: hidden;
  margin-top: 4px;
}
.dash-pie-barra span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dash-accent), var(--brand));
  transition: width 0.4s var(--ease);
  box-shadow: 0 0 8px rgba(100, 228, 169, 0.4);
}

/* Métricas del sidebar (Brier, Picks) */
.dash-pie-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--text-dim);
}
.dash-pie-fila strong {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
}

/* Botón de colapsar rediseñado */
.dash-sidebar-colapsar {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
  flex-shrink: 0;
}
.dash-sidebar-colapsar svg { width: 18px; height: 18px; }
.dash-sidebar-colapsar:hover {
  color: var(--text);
  border-color: var(--dash-border-strong);
  background: rgba(255, 255, 255, 0.05);
}
.dash-sidebar-colapsar:active { transform: scale(0.96); }

/* Pestaña flotante para reabrir */
.dash-sidebar-abrir {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 61;
  width: 30px;
  height: 60px;
  border-radius: 0 12px 12px 0;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-left: none;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  box-shadow: 8px 0 25px -10px rgba(0, 0, 0, 0.5);
  transition: all 0.3s var(--ease);
}
.dash-sidebar-abrir:hover {
  color: var(--text);
  background: var(--dash-surface-2);
  width: 36px;
}
.dash-sidebar-abrir svg { width: 20px; height: 20px; }

/* Estado colapsado en móvil / resize */
body.home-mode.sidebar-oculto .app-nav.dash-sidebar { display: none !important; }
body.home-mode.sidebar-oculto .dash-sidebar-abrir { display: inline-flex; }
body.home-mode.sidebar-oculto main { padding-left: 0 !important; }

@media (min-width: 1025px) {
  .dash-sidebar-colapsar { display: inline-flex; }

  /* Estado colapsado: se elimina la columna lateral y el contenido toma todo */
  body.home-mode.sidebar-oculto { grid-template-columns: 0 1fr !important; }
  body.home-mode.sidebar-oculto .app-nav.dash-sidebar { display: none !important; }
  body.home-mode.sidebar-oculto main,
  body.home-mode.sidebar-oculto .pie-pagina { grid-column: 1 / -1 !important; }
  body.home-mode.sidebar-oculto main { padding-left: 0 !important; }
  body.home-mode.sidebar-oculto .dash-sidebar-abrir { display: inline-flex; }
}

/* --- HEADER DASHBOARD MEJORADO --- */
body.home-mode #vista-inicio .dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  margin: -24px -24px 24px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dash-header-saludo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-eyebrow {
  margin: 0 0 6px;
  max-width: none;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--dash-accent);
}

body.home-mode #vista-inicio .dash-header-saludo h1,
body.home-mode #vista-inicio .dash-header-saludo h2,
body.home-mode #vista-inicio #hero-saludo {
  margin: 0 0 8px !important;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.2rem) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2 !important;
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  max-width: 100%;
}

.dash-header-saludo h1::after,
.dash-header-saludo h2::after { display: none; }

.dash-header-sub {
  margin: 6px 0 0;
  max-width: none;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.dash-header-acciones {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-header-acciones .dash-buscador {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  padding: 10px 14px;
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  border-radius: var(--radius-md);
  flex: 1;
}

.dash-header-acciones .dash-buscador:focus-within {
  border-color: var(--dash-accent);
  box-shadow: 0 0 0 3px rgba(100, 228, 169, 0.08);
}

.dash-header-acciones .dash-buscador svg { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }

.dash-header-acciones .dash-buscador input {
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.87rem;
  width: 100%;
  outline: none;
}

.dash-header-acciones .dash-buscador input::placeholder { color: var(--text-dim); }

/* Botón de perfil con mejor diseño */
.dash-perfil-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-perfil {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.dash-perfil:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--dash-accent);
}

.dash-perfil-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--dash-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  flex-shrink: 0;
}

.dash-perfil-datos strong { color: var(--text); }
.dash-perfil-datos { font-size: 0.85rem; }

.dash-perfil-chevron {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--text-dim);
  transition: transform 0.2s var(--ease);
}

.dash-perfil[aria-expanded="true"] .dash-perfil-chevron { transform: rotate(180deg); }
  border-radius: 9px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.dash-sidebar-cerrar::after {
  content: "✕";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

/* --- Botón para colapsar el sidebar (solo escritorio) --- */
.dash-sidebar-colapsar {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.dash-sidebar-colapsar svg { width: 16px; height: 16px; }

.dash-sidebar-colapsar:hover {
  color: var(--text);
  border-color: var(--dash-border-strong);
  background: rgba(255, 255, 255, 0.04);
}

/* --- Pestaña flotante para reabrir el sidebar colapsado (escritorio) --- */
.dash-sidebar-abrir {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 61;
  width: 26px;
  height: 56px;
  border-radius: 0 12px 12px 0;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-left: none;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow: 6px 0 22px -14px rgba(0, 0, 0, 0.9);
  transition: color 0.2s var(--ease), background 0.2s var(--ease), width 0.2s var(--ease);
}

.dash-sidebar-abrir:hover {
  color: var(--text);
  background: var(--dash-surface-2);
  width: 30px;
}

.dash-sidebar-abrir svg { width: 16px; height: 16px; }

@media (min-width: 1025px) {
  .dash-sidebar-colapsar { display: inline-flex; }

  /* Estado colapsado: se elimina la columna lateral y el contenido toma todo */
  body.home-mode.sidebar-oculto { grid-template-columns: 0 1fr !important; }

  body.home-mode.sidebar-oculto .app-nav.dash-sidebar { display: none !important; }

  body.home-mode.sidebar-oculto main,
  body.home-mode.sidebar-oculto .pie-pagina { grid-column: 1 / -1 !important; }

  body.home-mode.sidebar-oculto main { padding-left: 44px; }

  body.home-mode.sidebar-oculto .dash-sidebar-abrir { display: inline-flex; }
}

.dash-sidebar .app-nav-buscador {
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  padding: 8px 11px;
}

.dash-sidebar .app-nav-buscador:focus-within {
  border-color: color-mix(in srgb, var(--dash-accent) 45%, transparent);
  background: var(--dash-bg);
  box-shadow: 0 0 0 3px rgba(100, 228, 169, 0.08);
}

.dash-sidebar .app-nav-buscador input { font-size: 0.82rem; }

body.home-mode .dash-sidebar .dash-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 3px;
  padding-right: 2px;
}

.dash-nav-grupo {
  margin: 10px 0 5px;
  padding: 0 4px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.85;
}

.dash-nav-grupo:first-child { margin-top: 0; }

body.home-mode .dash-sidebar .nav-tab {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
}

body.home-mode .dash-sidebar .nav-tab:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--dash-line);
  color: var(--text);
  transform: none;
}

body.home-mode .dash-sidebar .nav-tab.activa {
  background: var(--dash-surface-2);
  border-color: var(--dash-border-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.home-mode .dash-sidebar .nav-tab.activa::before {
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--dash-accent), var(--brand));
  box-shadow: none;
}

.dash-sidebar .nav-tab-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
}

.dash-sidebar .nav-tab-icono svg { width: 15px; height: 15px; }

.dash-sidebar .contador-favoritos {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 700;
  text-align: center;
}

.dash-punto-vivo {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 109, 125, 0.18);
  animation: dashPulsoVivo 1.8s var(--ease) infinite;
}

@keyframes dashPulsoVivo {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --- Pie del sidebar (salud del motor) --- */
.dash-sidebar-pie {
  margin-top: auto;
  padding: 12px;
  border-radius: var(--dash-radius);
  background: rgba(11, 19, 32, 0.55);
  border: 1px solid var(--dash-line);
}

.dash-pie-bloque { display: flex; flex-direction: column; gap: 6px; }

.dash-pie-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dash-pie-valor {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--dash-accent);
  line-height: 1;
}

.dash-pie-barra {
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 170, 199, 0.16);
  overflow: hidden;
}

.dash-pie-barra span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dash-accent), var(--brand));
  transition: width 0.4s var(--ease);
}

.dash-pie-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.dash-pie-fila strong {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
}

.dash-pie-nota {
  margin: 9px 0 0;
  font-size: 0.66rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* --- Botón flotante del menú (móvil / tablet) --- */
.dash-menu-flotante { display: none; }

/* --- HEADER COMPACTO --- */
body.home-mode #vista-inicio .dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin: 0;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
}

.dash-header-saludo { min-width: 240px; flex: 1; }

body.home-mode #vista-inicio .dash-eyebrow {
  margin: 0 0 5px;
  max-width: none;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--dash-accent);
}

body.home-mode #vista-inicio .dash-header-saludo h1,
body.home-mode #vista-inicio .dash-header-saludo h2,
body.home-mode #vista-inicio #hero-saludo {
  margin: 0 0 8px !important;
  font-family: var(--font-body);
  font-size: 1.6rem !important;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2 !important;
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  max-width: 100%;
}

body.home-mode #vista-inicio .dash-header-saludo h1::after,
body.home-mode #vista-inicio .dash-header-saludo h2::after { display: none; }

body.home-mode #vista-inicio .dash-header-sub {
  margin: 5px 0 0;
  max-width: none;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.dash-header-acciones {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-header-acciones .dash-buscador {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 230px;
  padding: 8px 11px;
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
}

.dash-header-acciones .dash-buscador:focus-within {
  border-color: color-mix(in srgb, var(--dash-accent) 45%, transparent);
  box-shadow: 0 0 0 3px rgba(100, 228, 169, 0.08);
}

.dash-header-acciones .dash-buscador svg {
  width: 15px;
  height: 15px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.dash-header-acciones .dash-buscador input {
  width: 100%;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
}

.dash-header-acciones .dash-buscador input::placeholder { color: var(--text-dim); }

.dash-icono-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.dash-icono-btn:hover {
  color: var(--text);
  background: var(--dash-surface-2);
  border-color: var(--dash-border-strong);
}

.dash-icono-btn svg { width: 16px; height: 16px; }

.dash-idioma span { font-size: 0.72rem; font-weight: 700; }

.dash-badge-notif {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #17090c;
  font-size: 0.6rem;
  font-weight: 800;
}

/* --- Control de perfil --- */
.dash-perfil-wrap { position: relative; }

.dash-perfil {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 6px;
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.dash-perfil:hover,
.dash-perfil-wrap:focus-within .dash-perfil { border-color: var(--dash-border-strong); }

.dash-perfil-avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--dash-accent), var(--gold));
  color: var(--ink-on-accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.dash-perfil-datos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.dash-perfil-datos strong { font-size: 0.8rem; }
.dash-perfil-datos small { font-size: 0.65rem; color: var(--text-dim); }
.dash-perfil-chevron { width: 14px; height: 14px; color: var(--text-dim); }

.dash-perfil-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  min-width: 214px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border-strong);
  border-radius: var(--dash-radius);
  box-shadow: 0 24px 44px -24px rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}

.dash-perfil-wrap:focus-within .dash-perfil-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Apertura explícita por JS: :focus-within no basta en Safari/toque */
.dash-perfil-wrap.abierta .dash-perfil-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dash-perfil-item {
  padding: 8px 10px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.dash-perfil-item:hover { background: var(--dash-surface-2); color: var(--text); }

/* --- KPIs SUPERIORES --- */
body.home-mode #vista-inicio .dash-kpis {
  display: grid;
  /* Las 3 tarjetas KPI siempre en UNA sola fila horizontal */
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 12px 0;
}

body.home-mode #vista-inicio .dash-kpi {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 13px 11px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}

body.home-mode #vista-inicio .dash-kpi:hover {
  border-color: var(--dash-border-strong);
  transform: translateY(-2px);
}

body.home-mode #vista-inicio .dash-kpi-accion { cursor: pointer; }

body.home-mode #vista-inicio .dash-kpi-accion:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--dash-accent) 55%, transparent);
  outline-offset: 2px;
}

.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-kpi-icono {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--dash-surface-2);
  color: var(--dash-accent);
}

.dash-kpi-icono svg { width: 16px; height: 16px; }
.dash-kpi-icono.cyan { color: var(--brand); }
.dash-kpi-icono.oro { color: var(--gold); }
.dash-kpi-icono.rosa { color: #ff9bb0; }

.dash-kpi-chip {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(100, 228, 169, 0.1);
  border: 1px solid rgba(100, 228, 169, 0.22);
  color: var(--dash-accent);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dash-kpi-chip.rosa {
  background: rgba(255, 155, 176, 0.1);
  border-color: rgba(255, 155, 176, 0.24);
  color: #ff9bb0;
}

/* Chip en estado vacío: sin datos verificados todavía (nunca "Óptimo" inventado) */
.dash-kpi-chip.neutral {
  background: rgba(148, 170, 199, 0.1);
  border-color: rgba(148, 170, 199, 0.26);
  color: var(--text-dim);
}

.dash-kpi-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-dim);
}

.dash-kpi-valor {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
}

.dash-kpi-pie {
  font-size: 0.71rem;
  color: var(--text-muted);
}

.dash-kpi-barra {
  height: 4px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(148, 170, 199, 0.16);
  overflow: hidden;
}

.dash-kpi-barra span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dash-accent), var(--brand));
}

.dash-tip {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(148, 170, 199, 0.16);
  color: var(--text-dim);
  font-size: 0.58rem;
  font-weight: 700;
  cursor: help;
}

/* --- ACCESOS RÁPIDOS --- */
body.home-mode #vista-inicio .dash-seccion-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

body.home-mode #vista-inicio .dash-seccion-head h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.dash-seccion-nota {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Grilla de tarjetas rectangulares que se reacomoda sola (2-3+ columnas) */
body.home-mode #vista-inicio .dash-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

body.home-mode #vista-inicio .dash-seccion { padding: 12px 0; margin: 0; }

.dash-quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 13px 14px;
  text-align: left;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}

.dash-quick-card:hover {
  background: var(--dash-surface-2);
  border-color: var(--dash-border-strong);
  transform: translateY(-2px);
}

.dash-quick-icono {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--dash-surface-2);
  color: var(--dash-accent);
}

.dash-quick-icono svg { width: 17px; height: 17px; }
.dash-quick-icono.verde { background: rgba(100, 228, 169, 0.1); color: var(--dash-accent); }
.dash-quick-icono.cyan { background: rgba(123, 225, 200, 0.1); color: var(--brand); }
.dash-quick-icono.oro { background: rgba(242, 196, 116, 0.1); color: var(--gold); }
.dash-quick-icono.rosa { background: rgba(255, 155, 176, 0.1); color: #ff9bb0; }
.dash-quick-icono.violeta { background: rgba(167, 148, 218, 0.12); color: #b7a6e6; }

.dash-quick-texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dash-quick-texto strong { font-size: 0.85rem; font-weight: 700; }

.dash-quick-texto small {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-quick-flecha {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.dash-quick-card:hover .dash-quick-flecha {
  color: var(--dash-accent);
  transform: translateX(3px);
}

/* ============================================================
   RESUMEN DEL MOTOR (paneles bajo los KPIs)
   Lectura del día + última liquidación + forma reciente + cobertura.
   Misma paleta que el resto del dashboard (dark / --dash-accent).
   ============================================================ */
.dash-panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas:
    "lectura liquidacion"
    "lectura forma"
    "cobertura cobertura";
  gap: 12px;
  padding: 4px 0 12px;
}

.dash-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  min-width: 0;
  transition: border-color 0.2s var(--ease);
}

.dash-panel:hover { border-color: var(--dash-border-strong); }

.dash-panel-lectura { grid-area: lectura; justify-content: space-between; }
.dash-panel-cobertura { grid-area: cobertura; }
.dash-panel-grid > .dash-panel:nth-child(2) { grid-area: liquidacion; }
.dash-panel-grid > .dash-panel:nth-child(3) { grid-area: forma; }

.dash-panel-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-label-mono {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dash-label-dimmer {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.75;
}

.dash-panel-titulo {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
}

.dash-panel-sub {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.dash-btn-terciario {
  align-self: flex-start;
  margin-top: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid rgba(100, 228, 169, 0.28);
  background: rgba(100, 228, 169, 0.08);
  color: var(--dash-accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.dash-btn-terciario:hover {
  background: rgba(100, 228, 169, 0.16);
  border-color: rgba(100, 228, 169, 0.5);
  transform: translateY(-1px);
}

.dash-chip-mini {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(100, 228, 169, 0.1);
  border: 1px solid rgba(100, 228, 169, 0.22);
  color: var(--dash-accent);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* --- Última liquidación --- */
.dash-liq-partido { display: flex; flex-direction: column; gap: 3px; }

.dash-liq-liga {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dash-liq-equipos { font-size: 0.9rem; color: var(--text); font-weight: 600; line-height: 1.35; }
.dash-liq-vs { color: var(--text-dim); font-size: 0.72rem; font-weight: 500; }
.dash-liq-fecha { font-size: 0.68rem; color: var(--text-muted); }

.dash-liq-resultado { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }

.dash-liq-marcador {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.dash-liq-count { font-size: 0.74rem; color: var(--text-muted); }

.dash-liq-barra {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 170, 199, 0.16);
  overflow: hidden;
}

.dash-liq-barra span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dash-accent), var(--brand));
}

/* --- Estados vacíos con dirección (nunca "vacío" sin salida) --- */
.dash-vacio-titulo { margin: 0 0 4px; font-size: 0.82rem; font-weight: 600; color: var(--text); }
.dash-vacio-sub { margin: 0; font-size: 0.75rem; line-height: 1.5; color: var(--text-muted); }

/* --- Forma reciente --- */
.dash-spark-vacio {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 52px;
  padding-top: 8px;
  position: relative;
}

/* Barras fantasma en la zona de la línea de 50%: dejan claro cuántos
   partidos entrarán, sin inventar aciertos. */
.dash-spark-vacio::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  border-top: 1px dashed rgba(148, 170, 199, 0.3);
}

.dash-spark-fantasma {
  flex: 1;
  min-width: 8px;
  height: 50%;
  border-radius: 4px 4px 2px 2px;
  background: rgba(148, 170, 199, 0.14);
  border: 1px dashed rgba(148, 170, 199, 0.22);
}

.dash-spark-barras {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 52px;
  padding-top: 8px;
}

.dash-spark-bar {
  flex: 1;
  min-width: 8px;
  height: var(--h);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--dash-accent), rgba(100, 228, 169, 0.4));
}

.dash-spark-bar.med { background: linear-gradient(180deg, #f2c474, rgba(242, 196, 116, 0.4)); }
.dash-spark-bar.bajo { background: linear-gradient(180deg, #ff9bb0, rgba(255, 155, 176, 0.4)); }

/* --- Cobertura del motor --- */
.dash-panel-cobertura { gap: 12px; }

.dash-cobertura-ligas { display: flex; flex-wrap: wrap; gap: 8px; }

.dash-cobertura-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: default;
}

.dash-cobertura-chip:hover { border-color: var(--dash-border-strong); color: var(--dash-accent); }

.dash-cobertura-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--dash-line);
  padding-top: 10px;
}

@media (max-width: 1024px) {
  .dash-panel-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "lectura"
      "liquidacion"
      "forma"
      "cobertura";
  }
}

/* --- RESPONSIVE DEL DASHBOARD --- */
@media (max-width: 1180px) {
  /* Los 3 KPIs siguen en una sola fila: solo se compactan espacios y tipografía */
  body.home-mode #vista-inicio .dash-kpis { gap: 12px; }
  body.home-mode #vista-inicio .dash-kpi { padding: 11px 12px 10px; }
  .dash-kpi-valor { font-size: 1.4rem; }
}

@media (max-width: 1024px) {
  body.home-mode {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.home-mode .app-nav.dash-sidebar {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(280px, 84vw);
    transform: translateX(-100%);
    box-shadow: 20px 0 45px -25px rgba(0, 0, 0, 0.95);
  }

  body.home-mode .app-nav.dash-sidebar.menu-abierto {
    display: flex !important;
    transform: none !important;
  }

  .dash-sidebar-cerrar { display: block; }

  body.home-mode main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 56px 16px 24px;
  }

  body.home-mode .pie-pagina {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.home-mode .dash-menu-flotante { display: flex; }

  /* Estado colapsado en móvil / resize: oculta sidebar y muestra botón de reabrir */
  body.home-mode.sidebar-oculto .app-nav.dash-sidebar { display: none !important; }
  body.home-mode.sidebar-oculto .dash-sidebar-abrir { display: inline-flex; }
  body.home-mode.sidebar-oculto main { padding-left: 0 !important; }
}

@media (min-width: 1025px) {
  .dash-menu-flotante { display: none; }
}

@media (max-width: 760px) {
  body.home-mode #vista-inicio .dash-header { padding: 11px 12px; gap: 10px; }

  .dash-header-saludo { min-width: 0; }

  body.home-mode #vista-inicio .dash-header-saludo h1,
  body.home-mode #vista-inicio .dash-header-saludo h2 { font-size: 1.25rem; }

  .dash-header-acciones { width: 100%; }

  .dash-header-acciones .dash-buscador { flex: 1; min-width: 0; }

  .dash-perfil-datos { display: none; }

  body.home-mode #vista-inicio .dash-kpis {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  body.home-mode #vista-inicio .dash-kpi { padding: 9px 8px 8px; gap: 4px; }
  .dash-kpi-valor { font-size: 1.05rem; }
  .dash-kpi-label { font-size: 0.64rem; }
  .dash-kpi-pie { font-size: 0.62rem; }
  .dash-kpi-chip { display: none; }
  .dash-kpi-icono { width: 24px; height: 24px; }

  body.home-mode #vista-inicio .dash-quick {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .dash-quick-texto small { white-space: normal; }

  .dash-plegable-hint { display: none; }
}

@media (max-width: 440px) {
  /* Las 3 tarjetas KPI se mantienen en UNA sola fila también en móvil */
  body.home-mode #vista-inicio .dash-kpis {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  body.home-mode #vista-inicio .dash-kpi { padding: 8px 6px 7px; gap: 3px; }

  .dash-kpi-valor { font-size: 0.95rem; }
  .dash-kpi-label { font-size: 0.6rem; }
  .dash-kpi-pie, .dash-kpi-barra { display: none; }
  .dash-kpi-top { justify-content: center; }

  body.home-mode #vista-inicio .dash-quick { grid-template-columns: 1fr; }
}

/* ============================================================
   BLOQUES LARGOS -> PLEGABLES COMPACTOS
   La vista principal queda limpia (sin scroll largo): "Tu desempeño"
   y "Salud del motor" se muestran solo si el usuario los abre.
   ============================================================ */
body.home-mode #vista-inicio .dash-plegable {
  margin: 0;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  overflow: hidden;
}

body.home-mode #vista-inicio .dash-plegable[open] {
  border-color: var(--dash-border-strong);
}

body.home-mode #vista-inicio .dash-plegables {
  display: grid;
  gap: 10px;
  padding: 12px 0 0;
  margin: 0;
}

body.home-mode #vista-inicio .dash-plegable > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}

.dash-plegable > summary::-webkit-details-marker { display: none; }
.dash-plegable > summary::marker { content: ""; }

.dash-plegable-titulo {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.dash-plegable-hint {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.dash-plegable-chevron {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: transform 0.2s var(--ease);
}

.dash-plegable[open] .dash-plegable-chevron { transform: rotate(180deg); }

body.home-mode #vista-inicio .dash-plegable-cuerpo { padding: 0 14px 12px; }

/* Los títulos internos se ocultan: el summary ya los nombra */
body.home-mode #vista-inicio .dash-plegable .dashboard-titulo,
body.home-mode #vista-inicio .dash-plegable .motor-health-header { display: none; }

/* Compactación interna de los bloques largos */
body.home-mode #vista-inicio .dash-plegable .dashboard-personal,
body.home-mode #vista-inicio .dash-plegable .motor-health-section {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.home-mode #vista-inicio .dash-plegable .dashboard-grid {
  gap: 10px;
  margin-bottom: 0;
}

body.home-mode #vista-inicio .dash-plegable .dashboard-card {
  padding: 14px;
  border-radius: var(--dash-radius);
}

body.home-mode #vista-inicio .dash-plegable .dashboard-valor { font-size: 1.4rem; }

body.home-mode #vista-inicio .dash-plegable .motor-health-grid {
  gap: 10px;
  margin-bottom: 0;
}

body.home-mode #vista-inicio .dash-plegable .health-card {
  padding: 16px;
  border-radius: var(--dash-radius);
}

body.home-mode #vista-inicio .dash-plegable .health-metric { gap: 10px; }

/* El contenedor del gauge acompaña al SVG reducido: sin aire muerto debajo */
body.home-mode #vista-inicio .dash-plegable .health-grande {
  width: 116px;
  height: 116px;
}

body.home-mode #vista-inicio .dash-plegable .health-grande svg {
  width: 116px;
  height: 116px;
}

body.home-mode #vista-inicio .dash-plegable .health-nota {
  margin-top: 10px;
  padding-top: 0;
}

@media (max-width: 900px) {
  body.home-mode #vista-inicio .dash-plegable .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   DETALLES COMPACTOS Y CTA (vista limpia, poco scroll)
   ============================================================ */
body.home-mode #vista-inicio .dash-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px 0 0;
}

body.home-mode #vista-inicio .dash-info-item {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  overflow: hidden;
}

body.home-mode #vista-inicio .dash-info-item[open] {
  border-color: var(--dash-border-strong);
}

body.home-mode #vista-inicio .dash-info-item > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  color: var(--text);
}

.dash-info-item > summary::-webkit-details-marker { display: none; }
.dash-info-item > summary::marker { content: ""; }

.dash-info-icono { font-size: 0.95rem; line-height: 1; }

.dash-info-item > summary strong { font-weight: 700; }

.dash-info-hint {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
}

body.home-mode #vista-inicio .dash-info-item p {
  margin: 0;
  padding: 0 12px 12px;
  max-width: none;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-muted);
}

body.home-mode #vista-inicio .dash-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  padding: 12px 0 0;
  background: none;
  border: none;
  border-radius: 0;
}

.dash-cta-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dash-accent);
}

body.home-mode #vista-inicio .dash-cta h2 {
  margin: 4px 0 0;
  max-width: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

body.home-mode #vista-inicio .dash-cta .landing-primary {
  padding: 10px 16px;
  font-size: 0.82rem;
}

@media (max-width: 760px) {
  .dash-info-hint { display: none; }

  body.home-mode #vista-inicio .dash-info { grid-template-columns: 1fr; }

  body.home-mode #vista-inicio .dash-cta { flex-direction: column; align-items: flex-start; }

  body.home-mode #vista-inicio .dash-cta .landing-primary { width: 100%; }
}


/* FORZAR LAYOUT COMPACTO Y FULL-WIDTH */
html, body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* Anular ancho máximo en todos los contenedores principales */
.container, main, #app, .dashboard-container, .hero, .wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px 24px !important;
}

/* Dashboard home a pantalla completa: tarjeta oscura header + KPIs */
body.home-mode #vista-inicio .landing-inner,
body.home-mode #vista-inicio .dash-header,
body.home-mode #vista-inicio .dash-kpis,
body.home-mode #vista-inicio .dash-seccion,
body.home-mode #vista-inicio .dash-quick,
body.home-mode #vista-inicio .dash-plegables,
body.home-mode #vista-inicio .dash-info,
body.home-mode #vista-inicio .dash-cta {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Achicar el título gigante del Header */
h1, .hero h1, .dashboard-title {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    font-weight: 600 !important;
}

/* ============ DESIGN PREDICTION CARDS (PREMIUM) ============ */
.design-card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 32, 48, 0.95), rgba(12, 18, 26, 0.98));
  border: 1px solid rgba(173, 186, 202, 0.15);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
}

.design-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 225, 200, 0.3);
  box-shadow: 0 25px 50px -20px rgba(0, 0, 0, 0.8);
}

.design-card-border {
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 4px;
  border-radius: 0 4px 4px 0;
}

.design-card-border.green { background: var(--green); box-shadow: 0 0 12px var(--green); }
.design-card-border.gold { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.design-card-border.rosa { background: var(--red); box-shadow: 0 0 12px var(--red); }

.design-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.design-card-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.design-card-countdown {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(242, 196, 116, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(242, 196, 116, 0.2);
}

.design-card-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.design-card-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.design-card-team img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.design-card-team span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-align: center;
}

.design-card-vs {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 700;
}

.design-card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(173, 186, 202, 0.1);
}

.design-card-league {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.design-card-prob-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.design-card-prob-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.design-card-prob-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.design-card-prob-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--brand));
  box-shadow: 0 0 10px rgba(100, 228, 169, 0.4);
  transition: width 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.design-card-prob-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  min-width: 40px;
  text-align: right;
}

/* ============================================
   ANIMACIONES MEJORADAS - PRONÓSTICOS Y DASHBOARD
   ============================================ */

/* === ANIMACIONES DE ENTRADA === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fillBar {
  from { width: 0; }
}

@keyframes pulseLive {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

@keyframes pulseActive {
  0%, 100% { box-shadow: 0 4px 16px -6px rgba(100, 228, 169, 0.65); }
  50% { box-shadow: 0 4px 20px -4px rgba(100, 228, 169, 0.8); }
}

@keyframes progressFill {
  from { width: 0; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@keyframes floatButton {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes rotateBeam {
  100% { transform: rotate(360deg); }
}

/* === TARJETAS DE PARTIDOS - ENTRADA ESCALONADA === */
.tarjeta-partido {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tarjeta-partido:nth-child(1) { animation-delay: 0.05s; }
.tarjeta-partido:nth-child(2) { animation-delay: 0.1s; }
.tarjeta-partido:nth-child(3) { animation-delay: 0.15s; }
.tarjeta-partido:nth-child(4) { animation-delay: 0.2s; }
.tarjeta-partido:nth-child(5) { animation-delay: 0.25s; }
.tarjeta-partido:nth-child(6) { animation-delay: 0.3s; }
.tarjeta-partido:nth-child(7) { animation-delay: 0.35s; }
.tarjeta-partido:nth-child(8) { animation-delay: 0.4s; }
.tarjeta-partido:nth-child(n+9) { animation-delay: 0.45s; }

/* === HOVER MEJORADO EN TARJETAS === */
.tarjeta-partido:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5),
              0 0 20px -5px rgba(100, 228, 169, 0.15);
  border-color: rgba(100, 228, 169, 0.3);
}

/* === BARRAS DE PROBABILIDAD ANIMADAS === */
.barra-relleno {
  width: 0 !important;
  animation: fillBar 1s ease-out forwards;
  animation-delay: 0.3s;
}

/* === EFECTO PULSE PARA PARTIDOS EN VIVO === */
.partido-en-vivo {
  animation: pulseLive 2s ease-in-out infinite;
}

/* === TRANSICIÓN SUAVE ENTRE PESTAÑAS === */
.pestaña {
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pestaña:hover {
  transform: translateY(-2px);
}

/* === DASHBOARD BENTO GRID - ANIMACIÓN DE ENTRADA === */
.bento-item {
  animation: scaleIn 0.4s ease-out forwards;
  opacity: 0;
}

.bento-item:nth-child(1) { animation-delay: 0.05s; }
.bento-item:nth-child(2) { animation-delay: 0.1s; }
.bento-item:nth-child(3) { animation-delay: 0.15s; }
.bento-item:nth-child(4) { animation-delay: 0.2s; }
.bento-item:nth-child(5) { animation-delay: 0.25s; }
.bento-item:nth-child(6) { animation-delay: 0.3s; }
.bento-item:nth-child(7) { animation-delay: 0.35s; }
.bento-item:nth-child(8) { animation-delay: 0.4s; }

/* === EFECTO GLOW EN TARJETAS DESTACADAS === */
.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.6s ease;
}

.kpi-card:hover::before {
  left: 100%;
}

/* === GAUGE DE SALUD DEL MOTOR ANIMADO === */
#salud-gauge-arco {
  transition: stroke-dasharray 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === MICRO-INTERACCIONES EN BOTONES === */
.dash-quick-card {
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.dash-quick-card:hover {
  transform: translateX(4px);
}

/* === ANIMACIÓN DE ENCABEZADO === */
.dash-header {
  animation: slideDown 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA ICONOS === */
.dash-kpi-icono {
  transition: transform 0.3s ease;
}

.dash-kpi-icono:hover {
  transform: scale(1.1) rotate(5deg);
}

/* === ANIMACIÓN DE PROGRESO === */
.dash-kpi-barra span {
  animation: progressFill 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

/* === ANIMACIÓN PARA TARJETAS DE EQUIPOS === */
.equipo-info {
  transition: transform 0.2s ease;
}

.equipo-info:hover {
  transform: translateX(4px);
}

/* === ANIMACIÓN PARA BOTONES DE FILTRO === */
.filtro-liga-btn.activa {
  animation: pulseActive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA MODALES === */
.modal-overlay {
  animation: fadeIn 0.2s ease-out;
}

.modal-container {
  animation: scaleIn 0.3s ease-out;
}

/* === ANIMACIÓN PARA TENDENCIAS === */
.tendencia-sube {
  animation: trendUp 0.5s ease-out;
}

.tendencia-baja {
  animation: trendDown 0.5s ease-out;
}

@keyframes trendUp {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes trendDown {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* === ANIMACIÓN PARA RACHAS === */
.racha-punto {
  animation: popIn 0.3s ease-out backwards;
}

.racha-punto:nth-child(1) { animation-delay: 0.1s; }
.racha-punto:nth-child(2) { animation-delay: 0.15s; }
.racha-punto:nth-child(3) { animation-delay: 0.2s; }
.racha-punto:nth-child(4) { animation-delay: 0.25s; }
.racha-punto:nth-child(5) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA COMBINADAS === */
.tarjeta-combinada {
  animation: fadeInUp 0.5s ease-out forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-combinada:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.4);
}

/* === ANIMACIÓN PARA FAB FLOTANTE === */
.btn-fab-combinada {
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  animation: floatButton 3s ease-in-out infinite;
}

.btn-fab-combinada:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA NAV TABS === */
.nav-tab {
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-tab::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.3s ease;
}

.nav-tab:hover::before,
.nav-tab.activa::before {
  width: 100%;
}

/* === ANIMACIÓN PARA CONTADOR DE FAVORITOS === */
.contador-favoritos {
  animation: bounceIn 0.5s ease-out;
}

/* === ANIMACIÓN PARA PUNTO VIVO === */
.dash-punto-vivo {
  animation: pulseDot 1.5s ease-in-out infinite;
}

/* === ANIMACIÓN PARA BEAM CARD === */
.beam-card {
  position: relative;
  overflow: hidden;
}

.beam-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(100, 228, 169, 0.1), transparent 30%);
  animation: rotateBeam 4s linear infinite;
}

/* === ANIMACIÓN PARA KPIs === */
.dash-kpi-valor {
  animation: countUp 0.8s ease-out forwards;
}

/* === ANIMACIÓN PARA HEALTH CARDS === */
.health-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.health-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.3);
}

/* === ANIMACIÓN PARA TELEMETRÍA === */
.telemetria-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.telemetria-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.4);
}

.telemetria-progreso-fill {
  animation: progressFill 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

/* === ANIMACIÓN PARA HISTORIAL === */
.historial-partido {
  animation: fadeInLeft 0.4s ease-out forwards;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.historial-partido:hover {
  transform: translateX(4px);
  border-color: rgba(100, 228, 169, 0.3);
}

/* === ANIMACIÓN PARA PRECISIÓN GENERAL === */
.precision-general {
  animation: scaleIn 0.5s ease-out forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.precision-general:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.4);
}

/* === ANIMACIÓN PARA LANDING PRIMARY === */
.landing-primary {
  transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.landing-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(100, 228, 169, 0.5);
}

/* === ANIMACIÓN PARA INPUTS DE BÚSQUEDA === */
input[type="search"],
input[type="date"] {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="search"]:focus,
input[type="date"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(100, 228, 169, 0.15);
}

/* === ANIMACIÓN PARA BOTONES DE PERFIL === */
.dash-perfil-item {
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.dash-perfil-item:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-left: 20px;
}

/* === ANIMACIÓN PARA DASH INFO ITEMS === */
.dash-info-item {
  animation: fadeInUp 0.4s ease-out forwards;
}

.dash-info-item:nth-child(1) { animation-delay: 0.1s; }
.dash-info-item:nth-child(2) { animation-delay: 0.15s; }
.dash-info-item:nth-child(3) { animation-delay: 0.2s; }
.dash-info-item:nth-child(4) { animation-delay: 0.25s; }

/* === ANIMACIÓN PARA DASH CTA === */
.dash-cta {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA VISTAS === */
.vista-activa {
  animation: fadeIn 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA FILAS DE MERCADO === */
.fila-mercado {
  animation: fadeInLeft 0.4s ease-out forwards;
}

.fila-mercado:nth-child(1) { animation-delay: 0.1s; }
.fila-mercado:nth-child(2) { animation-delay: 0.15s; }
.fila-mercado:nth-child(3) { animation-delay: 0.2s; }
.fila-mercado:nth-child(4) { animation-delay: 0.25s; }
.fila-mercado:nth-child(5) { animation-delay: 0.3s; }
.fila-mercado:nth-child(n+6) { animation-delay: 0.35s; }

/* === ANIMACIÓN PARA COMBOS DE PARTIDO === */
.combo-partido {
  animation: fadeInRight 0.4s ease-out forwards;
}

.combo-partido:nth-child(1) { animation-delay: 0.35s; }
.combo-partido:nth-child(2) { animation-delay: 0.4s; }
.combo-partido:nth-child(3) { animation-delay: 0.45s; }

/* === ANIMACIÓN PARA MARCADORES PROBABLES === */
.marcador-chip {
  transition: all 0.2s ease;
  animation: popIn 0.4s ease-out backwards;
}

.marcador-chip:nth-child(1) { animation-delay: 0.5s; }
.marcador-chip:nth-child(2) { animation-delay: 0.55s; }
.marcador-chip:nth-child(3) { animation-delay: 0.6s; }

.marcador-chip:hover {
  transform: translateY(-2px);
  background: rgba(100, 228, 169, 0.1);
  border-color: var(--brand);
}

/* === ANIMACIÓN PARA CATÁLOGO === */
.catalogo-fila {
  animation: fadeInLeft 0.3s ease-out forwards;
}

.catalogo-fila:nth-child(1) { animation-delay: 0.05s; }
.catalogo-fila:nth-child(2) { animation-delay: 0.1s; }
.catalogo-fila:nth-child(3) { animation-delay: 0.15s; }
.catalogo-fila:nth-child(4) { animation-delay: 0.2s; }
.catalogo-fila:nth-child(5) { animation-delay: 0.25s; }
.catalogo-fila:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA DASHBOARD CARDS === */
.dashboard-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.4);
}

/* === ANIMACIÓN PARA DASHBOARD VALOR === */
.dashboard-valor {
  animation: countUp 0.6s ease-out forwards;
}

/* === ANIMACIÓN PARA VS CIRCULO === */
.vs-circulo {
  display: inline-block;
  transition: transform 0.3s ease;
}

.vs-circulo:hover {
  transform: scale(1.2) rotate(10deg);
}

/* === ANIMACIÓN PARA MARCADOR ESTIMADO === */
.marcador-estimado-badge {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.marcador-estimado-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.3);
}

/* === ANIMACIÓN PARA H2H === */
.info-h2h-pill {
  transition: transform 0.2s ease, background 0.2s ease;
}

.info-h2h-pill:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.03);
}

/* === ANIMACIÓN PARA ETIQUETA PICK PRINCIPAL === */
.etiqueta-pick-principal {
  animation: pulseDot 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA BOTÓN MI PREDICCIÓN === */
.boton-mi-prediccion {
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.boton-mi-prediccion:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA BADGE NO BET === */
.badge-nobet-tag {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA FILA SIN APUESTA === */
.fila-sin-apuesta {
  animation: fadeInLeft 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA EXPLICACIÓN === */
.fila-explicacion-block {
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: 0.25s;
}

/* === ANIMACIÓN PARA CONTEXTO === */
.fila-contexto-block {
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: 0.15s;
}

/* === ANIMACIÓN PARA RAZONES === */
.fila-razon {
  animation: fadeInLeft 0.3s ease-out forwards;
}

.fila-razon:nth-child(1) { animation-delay: 0.3s; }
.fila-razon:nth-child(2) { animation-delay: 0.35s; }
.fila-razon:nth-child(3) { animation-delay: 0.4s; }
.fila-razon:nth-child(4) { animation-delay: 0.45s; }
.fila-razon:nth-child(5) { animation-delay: 0.5s; }

/* === ANIMACIÓN PARA CUOTA IMPLÍCITA === */
.cuota-implicita-tag {
  transition: all 0.2s ease;
}

.cuota-implicita-tag:hover {
  transform: scale(1.05);
  background: rgba(100, 228, 169, 0.1);
  border-color: var(--brand);
}

/* === ANIMACIÓN PARA TARJETAS DE COMPETICIONES === */
#vista-competiciones .dashboard-card {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA TARJETAS DE RANKING === */
#vista-ranking .dashboard-card {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA TARJETAS DE DOBLES === */
#vista-dobles .tarjeta-combinada {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA TARJETAS DE ANALÍTICA === */
#vista-analitica .telemetria-card {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA TARJETAS DE HISTORIAL === */
#vista-historial .historial-partido {
  animation: fadeInLeft 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA TARJETAS DE LIVE === */
#vista-live .tarjeta-partido {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA TARJETAS DE FAVORITOS === */
#vista-favoritos .tarjeta-partido {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA TARJETAS DE MIS PREDICCIONES === */
#vista-mispredicciones .tarjeta-partido {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA CONTENEDOR DE PARTIDOS === */
#contenedor-partidos {
  animation: fadeIn 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA BLOQUE DE COMBINADAS === */
#bloque-combinadas {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA PESTAÑAS DE FECHA === */
.pestañas-fecha {
  animation: slideDown 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA BARRA DE FILTROS === */
.barra-filtros-unificada {
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA PILLS DE LIGAS === */
.filtro-ligas-pills {
  animation: fadeInLeft 0.4s ease-out forwards;
  animation-delay: 0.15s;
}

/* === ANIMACIÓN PARA INPUT DE BÚSQUEDA === */
.input-buscar-integrado {
  animation: fadeInRight 0.4s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA DASHBOARD PERSONAL === */
.dashboard-personal {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA DASHBOARD TITULO === */
.dashboard-titulo {
  animation: slideDown 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA DASHBOARD GRID === */
.dashboard-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA MOTOR HEALTH SECTION === */
.motor-health-section {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA MOTOR HEALTH HEADER === */
.motor-health-header {
  animation: slideDown 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA MOTOR HEALTH GRID === */
.motor-health-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA DASH INFO === */
.dash-info {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ENTRADA DEL SIDEBAR === */
/* OJO: no animar `transform` con fill `forwards`: clava translateX(0) y rompe
   el modo off-canvas (el sidebar queda siempre abierto tapando el contenido).
   Usamos solo opacidad para que el posicionamiento siga mandando. */
@keyframes sidebarFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.app-nav {
  animation: sidebarFadeIn 0.4s ease-out;
}

.dash-sidebar {
  animation: sidebarFadeIn 0.4s ease-out;
}

/* === ANIMACIÓN PARA DASH LOGO === */
.dash-logo {
  transition: all 0.2s ease;
}

.dash-logo:hover {
  transform: scale(1.05);
}

/* === ANIMACIÓN PARA DASH LOGO MARK === */
.dash-logo-mark {
  transition: transform 0.3s ease;
}

.dash-logo:hover .dash-logo-mark {
  transform: rotate(360deg);
}

/* === ANIMACIÓN PARA DASH PERFIL === */
.dash-perfil {
  transition: all 0.2s ease;
}

.dash-perfil:hover {
  transform: translateY(-2px);
}

/* === ANIMACIÓN PARA DASH PERFIL AVATAR === */
.dash-perfil-avatar {
  transition: transform 0.3s ease;
}

.dash-perfil:hover .dash-perfil-avatar {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA DASH PERFIL CHEVRON === */
.dash-perfil-chevron {
  transition: transform 0.3s ease;
}

.dash-perfil[aria-expanded="true"] .dash-perfil-chevron {
  transform: rotate(180deg);
}

/* === ANIMACIÓN PARA DASH PERFIL PANEL === */
.dash-perfil-panel {
  animation: slideDown 0.3s ease-out;
}

/* === ANIMACIÓN PARA APP NAV HAMBURGUESA === */
.app-nav-hamburguesa {
  transition: all 0.2s ease;
}

.app-nav-hamburguesa:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA DASH SIDEBAR CERRAR === */
.dash-sidebar-cerrar {
  transition: transform 0.2s ease;
}

.dash-sidebar-cerrar:hover {
  transform: rotate(90deg);
}

/* === ANIMACIÓN PARA BOTÓN REINICIAR === */
.boton-reiniciar {
  transition: all 0.2s ease;
}

.boton-reiniciar:hover {
  transform: scale(1.05);
}

/* === ANIMACIÓN PARA FILTROS DE HISTORIAL === */
.historial-filtro-grupo {
  transition: background 0.2s ease;
  border-radius: var(--radius-sm);
  padding: 4px;
}

.historial-filtro-grupo:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA TARJETAS DE CALIBRACIÓN === */
.calibracion-item {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.calibracion-item:hover {
  transform: translateX(4px);
  border-color: rgba(242, 196, 116, 0.3);
}

/* === ANIMACIÓN PARA FILAS DE CALIBRACIÓN === */
.calibracion-fila {
  transition: background 0.2s ease;
}

.calibracion-fila:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* === ANIMACIÓN PARA TARJETAS DE TELEMETRÍA ICONO === */
.telemetria-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.telemetria-card:hover .telemetria-icon {
  transform: scale(1.2) rotate(10deg);
}

/* === ANIMACIÓN PARA TARJETAS DE TELEMETRÍA BADGE === */
.telemetria-badge {
  transition: all 0.2s ease;
}

.telemetria-badge:hover {
  transform: scale(1.05);
}

/* === ANIMACIÓN PARA AVISO DE RIESGO === */
.aviso-riesgo {
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA ICONO DE AVISO === */
.aviso-riesgo .icono {
  display: inline-block;
  animation: pulseDot 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA SELECTOR DE FECHA PERSONALIZADA === */
.selector-fecha-personalizada {
  animation: slideDown 0.3s ease-out;
}

/* === ANIMACIÓN PARA BOTONES DE PESTAÑAS === */
#vista-pronosticos .pestaña {
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

#vista-pronosticos .pestaña:hover {
  transform: translateY(-2px);
}

#vista-pronosticos .pestaña.activa {
  animation: pulseActive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA BOTÓN DE FECHA PERSONALIZADA === */
#vista-pronosticos .pestaña-finalizados {
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

#vista-pronosticos .pestaña-finalizados:hover {
  transform: translateY(-2px);
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ff8d8d;
}

/* === ANIMACIÓN PARA TARJETAS DE FINALIZADOS === */
#vista-pronosticos .historial-partido {
  animation: fadeInLeft 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA BADGES DE FINALIZADOS === */
#vista-pronosticos .historial-partido-badge {
  transition: transform 0.2s ease;
}

#vista-pronosticos .historial-partido-badge:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA ENCABEZADO DE PARTIDO === */
.encabezado-partido {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA TOPBAR DE PARTIDO === */
.tarjeta-partido-topbar {
  animation: slideDown 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA CENTRO DE PARTIDO === */
.centro-partido {
  animation: scaleIn 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA AVISOS DE DATOS === */
.aviso-datos {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA LISTA DE MERCADOS === */
.lista-mercados {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA BOTÓN EXPANDIR === */
.boton-expandir {
  transition: all 0.2s ease;
}

.boton-expandir:hover {
  background: rgba(100, 228, 169, 0.1);
  border-color: var(--brand);
}

/* === ANIMACIÓN PARA COMBOS DE PARTIDO TITULO === */
.combos-partido-titulo {
  animation: fadeInLeft 0.4s ease-out forwards;
  animation-delay: 0.35s;
}

/* === ANIMACIÓN PARA COMBO PARTIDO HEADER === */
.combo-partido-header {
  transition: background 0.2s ease;
  border-radius: var(--radius-xs);
  padding: 2px 4px;
}

.combo-partido-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA TÍTULO DE MARCADORES PROBABLES === */
.marcadores-probables-titulo {
  animation: fadeInLeft 0.4s ease-out forwards;
  animation-delay: 0.45s;
}

/* === ANIMACIÓN PARA MARCADORES PROBABLES === */
.marcadores-probables {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.5s;
}

/* === ANIMACIÓN PARA CATÁLOGO COMPLETO === */
.catalogo-completo {
  animation: slideDown 0.3s ease-out;
}

/* === ANIMACIÓN PARA FILAS DE MERCADO AL EXPANDIR === */
.lista-mercados.expandido .fila-mercado:nth-child(n+3) {
  display: block;
  animation: fadeInUp 0.4s ease-out forwards;
}

.lista-mercados.expandido .fila-mercado:nth-child(3) { animation-delay: 0.05s; }
.lista-mercados.expandido .fila-mercado:nth-child(4) { animation-delay: 0.1s; }
.lista-mercados.expandido .fila-mercado:nth-child(5) { animation-delay: 0.15s; }
.lista-mercados.expandido .fila-mercado:nth-child(n+6) { animation-delay: 0.2s; }

/* === ANIMACIÓN PARA FILA HEADER === */
.fila-header {
  transition: background 0.2s ease;
  border-radius: var(--radius-xs);
  padding: 2px 4px;
}

.fila-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA ICONO DE MERCADO === */
.fila-icono {
  transition: transform 0.3s ease;
}

.fila-mercado:hover .fila-icono {
  transform: scale(1.1) rotate(5deg);
}

/* === ANIMACIÓN PARA BARRA DE PROBABILIDAD EN FILA === */
.barra-probabilidad {
  transition: all 0.3s ease;
}

.fila-mercado:hover .barra-probabilidad {
  height: 6px;
}

/* === ANIMACIÓN PARA FILA EXPLICACIÓN BLOCK === */
.fila-explicacion-block {
  transition: background 0.2s ease;
  border-radius: var(--radius-xs);
  padding: 4px 6px;
}

.fila-explicacion-block:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA FILA CONTEXTO BLOCK === */
.fila-contexto-block {
  transition: background 0.2s ease;
  border-radius: var(--radius-xs);
  padding: 4px 6px;
}

.fila-contexto-block:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA BOTONES DE MODAL === */
.modal-footer button {
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.modal-footer button:hover {
  transform: translateY(-2px);
}

/* === ANIMACIÓN PARA BOTÓN LIMPIAR === */
button[onclick="limpiarCombinadaManual()"]:hover {
  background: rgba(239, 68, 68, 0.3) !important;
}

/* === ANIMACIÓN PARA BOTÓN COMPARTIR MODAL === */
button[onclick="compartirCombinadaManual()"]:hover {
  background: rgba(100, 228, 169, 0.3) !important;
}

/* === ANIMACIÓN PARA BOTÓN GUARDAR === */
button[onclick="guardarCombinadaGuardada()"]:hover {
  background: rgba(242, 196, 116, 0.3) !important;
}

/* === ANIMACIÓN PARA BOTÓN CONFIRMAR === */
button[onclick="confirmarCombinadaManual()"]:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px -8px rgba(100, 228, 169, 0.6);
}

/* === ANIMACIÓN PARA BOTÓN CERRAR MODAL === */
button[onclick="cerrarModalArmarCombinada()"]:hover,
button[onclick="cerrarCombinadaAsistida()"]:hover {
  transform: rotate(90deg);
  color: var(--red) !important;
}

/* === ANIMACIÓN PARA TARJETAS DE HISTORIAL HEADER === */
.historial-partido-header {
  transition: background 0.2s ease;
}

.historial-partido-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA ITEMS DE MERCADO EN HISTORIAL === */
.historial-mercado-item {
  transition: transform 0.2s ease;
}

.historial-mercado-item:hover {
  transform: translateX(4px);
}

/* === ANIMACIÓN PARA CHECK DE MERCADO === */
.historial-mercado-check {
  transition: transform 0.2s ease;
}

.historial-mercado-item:hover .historial-mercado-check {
  transform: scale(1.2);
}

/* === ANIMACIÓN PARA BADGE DE PARTIDO === */
.historial-partido-badge {
  transition: transform 0.2s ease;
}

.historial-partido-badge:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA PRECISIÓN GENERAL NUM === */
.precision-general-num {
  animation: countUp 0.8s ease-out forwards;
}

/* === ANIMACIÓN PARA PRECISIÓN GENERAL LABEL === */
.precision-general-label {
  animation: fadeInLeft 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA ICONOS DE TELEMETRÍA VALOR === */
.telemetria-valor {
  font-variant-numeric: tabular-nums;
  animation: countUp 0.8s ease-out forwards;
}

/* === ANIMACIÓN PARA LABEL DE TELEMETRÍA === */
.telemetria-label {
  animation: fadeInLeft 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA SUB DE TELEMETRÍA === */
.telemetria-sub {
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA CONTROLES DE ANALÍTICA === */
.analitica-controles {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA LABEL DE CONTROLES === */
.analitica-controles-label {
  animation: fadeInLeft 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA BLOQUE DE HISTORIAL EN ANALÍTICA === */
#bloque-historial {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA VISTA ANALÍTICA HEADER === */
.vista-analitica-header {
  animation: slideDown 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA GRID DE TELEMETRÍA === */
.telemetria-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA CONTROLES DE ANALÍTICA WRAPPER === */
.analitica-controles-wrapper {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA VISTA HISTORIAL HEADER === */
.historial-header {
  animation: slideDown 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA FILTROS DE HISTORIAL === */
.historial-filtros {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA BOTÓN REINICIAR EN HISTORIAL === */
#vista-historial .boton-reiniciar {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA VISTA FAVORITOS HEADER === */
#vista-favoritos h2 {
  animation: slideDown 0.5s ease-out forwards;
}

#vista-favoritos .subtitulo-vista {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA VISTA MIS PREDICCIONES HEADER === */
#vista-mispredicciones h2 {
  animation: slideDown 0.5s ease-out forwards;
}

#vista-mispredicciones .subtitulo-vista {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA VISTA HISTORIAL HEADER === */
#vista-historial h2 {
  animation: slideDown 0.5s ease-out forwards;
}

#vista-historial .subtitulo-vista {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA VISTA COMPETICIONES HEADER === */
#vista-competiciones h2 {
  animation: slideDown 0.5s ease-out forwards;
}

#vista-competiciones .subtitulo-vista {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA VISTA RANKING HEADER === */
#vista-ranking h2 {
  animation: slideDown 0.5s ease-out forwards;
}

#vista-ranking .subtitulo-vista {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA VISTA DOBLES HEADER === */
#vista-dobles h2 {
  animation: slideDown 0.5s ease-out forwards;
}

#vista-dobles .subtitulo-vista {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA VISTA LIVE HEADER === */
#vista-live h2 {
  animation: slideDown 0.5s ease-out forwards;
}

#vista-live .subtitulo-vista {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA GRID DE COMPETICIONES === */
#vista-competiciones .dashboard-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA GRID DE RANKING === */
#vista-ranking .dashboard-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA BLOQUE DE COMBINADAS EN DOBLES === */
#vista-dobles .bloque-combinadas {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA TÍTULO DE COMBINADAS === */
.bloque-combinadas h3 {
  animation: fadeInLeft 0.6s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA SUBTÍTULO DE COMBINADAS === */
.bloque-combinadas .subtitulo-combinadas {
  animation: fadeInRight 0.6s ease-out forwards;
  animation-delay: 0.15s;
}

/* === ANIMACIÓN PARA PIERNAS DE COMBINADA === */
.pierna-combinada {
  animation: fadeInLeft 0.4s ease-out forwards;
}

.pierna-combinada:nth-child(1) { animation-delay: 0.1s; }
.pierna-combinada:nth-child(2) { animation-delay: 0.15s; }
.pierna-combinada:nth-child(3) { animation-delay: 0.2s; }
.pierna-combinada:nth-child(4) { animation-delay: 0.25s; }

/* === ANIMACIÓN PARA COMBO PARTIDO PCT === */
.combo-partido-pct {
  font-variant-numeric: tabular-nums;
  animation: countUp 0.6s ease-out forwards;
}

/* === ANIMACIÓN PARA PARTES DE COMBO === */
.combo-partido-partes {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA MARCADOR CHIP EM === */
.marcador-chip em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

/* === ANIMACIÓN PARA FILA SELECCIÓN === */
.fila-seleccion {
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA NOMBRE DE MERCADO === */
.fila-mercado-nombre {
  animation: fadeInLeft 0.3s ease-out forwards;
  animation-delay: 0.15s;
}

/* === ANIMACIÓN PARA TÍTULO DE FILA === */
.fila-titulo {
  animation: fadeInLeft 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA CUERPO DE MERCADO === */
.fila-mercado-cuerpo {
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA FOOTER DE MERCADO === */
.fila-mercado-footer {
  animation: fadeInRight 0.4s ease-out forwards;
  animation-delay: 0.35s;
}

/* === ANIMACIÓN PARA STRONG DE CUOTA === */
.cuota-implicita-tag strong {
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* === ANIMACIÓN PARA ICONO DE INFO NO BET === */
.icono-info-nobet {
  display: inline-block;
  animation: pulseDot 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA DETALLE NO BET === */
.fila-nobet-detalle {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA CUOTA IMPLÍCITA EN NO BET === */
.cuota-implicita {
  font-variant-numeric: tabular-nums;
  animation: countUp 0.6s ease-out forwards;
}

/* === ANIMACIÓN PARA BOTÓN MI PREDICCIÓN ACTIVO === */
.boton-mi-prediccion.activo {
  animation: pulseActive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA H2H ICONO === */
.h2h-icono {
  display: inline-block;
  transition: transform 0.3s ease;
}

.info-h2h-pill:hover .h2h-icono {
  transform: rotate(15deg);
}

/* === ANIMACIÓN PARA BADGE CONFIANZA LECTURA === */
.badge-confianza-lectura {
  transition: all 0.2s ease;
}

.badge-confianza-lectura:hover {
  transform: scale(1.05);
}

/* === ANIMACIÓN PARA TENDENCIA === */
.tendencia {
  display: inline-block;
  transition: transform 0.3s ease;
}

.tendencia:hover {
  transform: scale(1.2);
}

/* === ANIMACIÓN PARA TENDENCIA NEUTRAL === */
.tendencia-neutral {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA BADGE POSICION === */
.badge-posicion {
  transition: all 0.2s ease;
}

.badge-posicion:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA ESTRELLA FAVORITO === */
.estrella-favorito {
  transition: all 0.2s ease;
}

.estrella-favorito:hover {
  transform: scale(1.3) rotate(15deg);
}

/* === ANIMACIÓN PARA ESTRELLA FAVORITO ACTIVA === */
.estrella-favorito.activa {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* === ANIMACIÓN PARA RACHA VISUAL === */
.racha-visual {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA EQUIPO INFO === */
.equipo-info {
  transition: transform 0.2s ease;
}

/* === ANIMACIÓN PARA ALINEACION IZQ === */
.alineacion-izq {
  animation: fadeInLeft 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA ALINEACION DER === */
.alineacion-der {
  animation: fadeInRight 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA ESCUDO === */
.escudo {
  transition: transform 0.3s ease;
}

.equipo-info:hover .escudo {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA EQUIPO NOMBRE TEND === */
.equipo-nombre-tend {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA EQUIPO === */
.equipo {
  animation: fadeInLeft 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA TOPBAR IZQ === */
.partido-topbar-izq {
  animation: fadeInLeft 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA TOPBAR DER === */
.partido-topbar-der {
  animation: fadeInRight 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA PARTIDO LIGA TAG === */
.partido-liga-tag {
  animation: fadeIn 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA PARTIDO FECHA TAG === */
.partido-fecha-tag {
  animation: fadeIn 0.3s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA CHIP CUENTA REGRESIVA === */
.chip-cuenta-regresiva {
  animation: fadeInRight 0.3s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA CHIP URGENTE === */
.chip-cuenta-regresiva.urgente {
  animation: pulse 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA DESIGN CARD === */
.design-card {
  animation: fadeInUp 0.5s ease-out forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.design-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

/* === ANIMACIÓN PARA DESIGN CARD BORDER === */
.design-card-border {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA DESIGN CARD HEADER === */
.design-card-header {
  animation: slideDown 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA DESIGN CARD DATE === */
.design-card-date {
  animation: fadeInLeft 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA DESIGN CARD COUNTDOWN === */
.design-card-countdown {
  animation: fadeInRight 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA DESIGN CARD TEAMS === */
.design-card-teams {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA DESIGN CARD TEAM === */
.design-card-team {
  animation: fadeIn 0.4s ease-out forwards;
}

.design-card-team:nth-child(1) { animation-delay: 0.15s; }
.design-card-team:nth-child(3) { animation-delay: 0.2s; }

/* === ANIMACIÓN PARA DESIGN CARD VS === */
.design-card-vs {
  animation: scaleIn 0.5s ease-out forwards;
  animation-delay: 0.25s;
}

/* === ANIMACIÓN PARA DESIGN CARD FOOTER === */
.design-card-footer {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA DESIGN CARD LEAGUE === */
.design-card-league {
  animation: fadeInLeft 0.3s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA DESIGN CARD PROB CONTAINER === */
.design-card-prob-container {
  animation: fadeInRight 0.3s ease-out forwards;
  animation-delay: 0.35s;
}

/* === ANIMACIÓN PARA DESIGN CARD PROB LABEL === */
.design-card-prob-label {
  animation: fadeInLeft 0.3s ease-out forwards;
  animation-delay: 0.35s;
}

/* === ANIMACIÓN PARA DESIGN CARD PROB BAR === */
.design-card-prob-bar {
  animation: fadeInRight 0.3s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA DESIGN CARD PROB FILL === */
.design-card-prob-fill {
  animation: fillBar 1s ease-out forwards;
  animation-delay: 0.5s;
}

/* === ANIMACIÓN PARA DESIGN CARD PROB VAL === */
.design-card-prob-val {
  animation: countUp 0.6s ease-out forwards;
  animation-delay: 0.6s;
}

/* === ANIMACIÓN PARA SKELETON TARJETA === */
.skeleton-tarjeta {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA SKELETON LINEA === */
.skeleton-linea {
  animation: fadeIn 0.5s ease-out forwards;
}

.skeleton-linea:nth-child(1) { animation-delay: 0.1s; }
.skeleton-linea:nth-child(2) { animation-delay: 0.2s; }
.skeleton-linea:nth-child(3) { animation-delay: 0.3s; }
.skeleton-linea:nth-child(4) { animation-delay: 0.4s; }

/* === ANIMACIÓN PARA AVISO SERVIDOR === */
.aviso-servidor {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA PIE PAGINA === */
.pie-pagina {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* === ANIMACIÓN PARA MARCA FOOTER === */
.marca-footer {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA MODAL OVERLAY === */
.modal-overlay {
  animation: fadeIn 0.2s ease-out;
}

/* === ANIMACIÓN PARA MODAL CONTAINER === */
.modal-container {
  animation: scaleIn 0.3s ease-out;
}

/* === ANIMACIÓN PARA MODAL HEADER === */
.modal-header {
  animation: slideDown 0.3s ease-out;
}

/* === ANIMACIÓN PARA MODAL BODY === */
.modal-body,
#modal-combinada-body,
#asistida-body {
  animation: fadeIn 0.3s ease-out;
}

/* === ANIMACIÓN PARA MODAL FOOTER === */
.modal-footer {
  animation: slideDown 0.3s ease-out;
}

/* === ANIMACIÓN PARA RESUMEN DE COMBINADA === */
#modal-combinada-resumen {
  animation: fadeIn 0.3s ease-out;
}

/* === ANIMACIÓN PARA CONTADORES DE COMBINADA === */
#comb-count-picks,
#comb-prob-total,
#comb-cuota-total {
  font-variant-numeric: tabular-nums;
  transition: all 0.3s ease;
}

/* === ANIMACIÓN PARA BOTONES DE FOOTER DE COMBINADA === */
#asistida-footer button {
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

#asistida-footer button:hover {
  transform: translateY(-2px);
}

/* === ANIMACIÓN PARA STEPPER === */
#asistida-step-1,
#asistida-step-2 {
  transition: all 0.3s ease;
}

/* === ANIMACIÓN PARA BODY DE ASISTIDA === */
#asistida-body {
  animation: fadeIn 0.3s ease-out;
}

/* === ANIMACIÓN PARA FOOTER DE ASISTIDA === */
#asistida-footer {
  animation: slideDown 0.3s ease-out;
}

/* === ANIMACIÓN PARA VISTA ACTIVA === */
.vista-activa {
  animation: fadeIn 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS ACTIVA === */
#vista-pronosticos.vista-activa {
  animation: fadeIn 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA VISTA INICIO ACTIVA === */
#vista-inicio.vista-activa {
  animation: fadeIn 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA TRANSICIÓN DE VISTAS === */
.vista {
  transition: opacity 0.3s ease;
}

/* === ANIMACIÓN PARA VISTA OCULTA === */
.vista:not(.vista-activa) {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* === ANIMACIÓN PARA VISTA MOSTRADA === */
.vista.vista-activa {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  overflow: visible;
}

/* === ANIMACIÓN PARA CONTENIDO DE VISTA === */
.vista-activa > * {
  animation: fadeIn 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA PRIMER ELEMENTO DE VISTA === */
.vista-activa > *:nth-child(1) { animation-delay: 0.05s; }
.vista-activa > *:nth-child(2) { animation-delay: 0.1s; }
.vista-activa > *:nth-child(3) { animation-delay: 0.15s; }
.vista-activa > *:nth-child(4) { animation-delay: 0.2s; }
.vista-activa > *:nth-child(5) { animation-delay: 0.25s; }
.vista-activa > *:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA SCROLL SUAVE === */
html {
  scroll-behavior: smooth;
}

/* === ANIMACIÓN PARA BODY === */
body {
  animation: fadeIn 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA MAIN === */
main {
  animation: fadeInUp 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA LANDING SHELL === */
.landing-shell {
  animation: fadeIn 0.6s ease-out forwards;
}

/* === ANIMACIÓN PARA LANDING INNER === */
.landing-inner {
  animation: fadeInUp 0.6s ease-out forwards;
;
}

/* === ANIMACIÓN PARA LANDING TOPBAR === */
.landing-topbar {
  animation: slideDown 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA LANDING BRAND === */
.landing-brand {
  animation: fadeInLeft 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA LANDING NAV === */
.landing-nav {
  animation: fadeInRight 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA LANDING TOPBAR CTA === */
.landing-topbar-cta {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA LANDING INNER H1 === */
.landing-inner h1 {
  animation: slideDown 0.6s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA LANDING INNER SPAN === */
.landing-inner h1 span {
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA LANDING INNER P === */
.landing-inner p {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA LANDING CTA ROW === */
.landing-cta-row {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA LANDING PRIMARY === */
.landing-primary {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA LANDING SECONDARY === */
.landing-secondary {
  animation: fadeInLeft 0.5s ease-out forwards;
  animation-delay: 0.45s;
}

/* === ANIMACIÓN PARA LANDING SECTIONS === */
.landing-sections {
  animation: fadeInUp 0.6s ease-out forwards;
;
}

/* === ANIMACIÓN PARA LANDING CTA FINAL === */
.landing-cta-final {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA LANDING CTA FINAL INNER === */
.landing-cta-final-inner {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA LANDING CTA FINAL H2 === */
.landing-cta-final-inner h2 {
  animation: slideDown 0.5s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA LANDING CTA FINAL P === */
.landing-cta-final-inner p {
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: 0.5s;
}

/* === ANIMACIÓN PARA LANDING CTA FINAL BUTTONS === */
.landing-cta-final-inner .landing-primary,
.landing-cta-final-inner .landing-secondary {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.6s;
}

/* === ANIMACIÓN PARA DASH HEADER SALUDO === */
.dash-header-saludo {
  animation: fadeInLeft 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA DASH HEADER ACCIONES === */
.dash-header-acciones {
  animation: fadeInRight 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA DASH EYEBROW === */
.dash-eyebrow {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA DASH SALUDO H2 === */
#hero-saludo {
  animation: slideDown 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA DASH HEADER SUB === */
.dash-header-sub {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA DASH BUSCADOR === */
.dash-buscador {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.15s;
}

/* === ANIMACIÓN PARA DASH PERFIL WRAP === */
.dash-perfil-wrap {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA DASH PERFIL DATOS === */
.dash-perfil-datos {
  animation: fadeInLeft 0.4s ease-out forwards;
  animation-delay: 0.25s;
}

/* === ANIMACIÓN PARA DASH NAV GRUPO === */
.dash-nav-grupo {
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.25s;
}

/* === ANIMACIÓN PARA APP NAV BUSCADOR === */
.app-nav-buscador {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.15s;
}

/* === ANIMACIÓN PARA DASH SIDEBAR CABECERA === */
.dash-sidebar-cabecera {
  animation: slideDown 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA DASH LOGO TEXTO === */
.dash-logo-texto {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA DASH NAV === */
.dash-nav {
  animation: fadeInLeft 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA NAV TAB ICONO === */
.nav-tab-icono {
  transition: transform 0.3s ease;
}

.nav-tab:hover .nav-tab-icono {
  transform: scale(1.1) rotate(5deg);
}

/* === ANIMACIÓN PARA NAV TAB ACTIVA === */
.nav-tab.activa {
  animation: pulseActive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA APP NAV HAMBURGUESA SPAN === */
.app-nav-hamburguesa span {
  transition: all 0.3s ease;
}

.app-nav-hamburguesa:hover span:nth-child(1) {
  transform: translateY(-2px);
}

.app-nav-hamburguesa:hover span:nth-child(3) {
  transform: translateY(2px);
}

/* === ANIMACIÓN PARA FILTRO LIGA BTN === */
.filtro-liga-btn {
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.filtro-liga-btn:hover {
  transform: translateY(-2px);
}

/* === ANIMACIÓN PARA FILTRO BTN === */
.filtro-btn {
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.filtro-btn:hover {
  transform: translateY(-2px);
}

.filtro-btn.activa {
  animation: pulseActive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA FILTRO ESTADO === */
.filtro-estado {
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.filtro-estado:hover {
  transform: translateY(-2px);
}

.filtro-estado.activa {
  animation: pulseActive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA BOTÓN COMPARTIR === */
.boton-compartir {
  transition: all 0.2s ease;
}

.boton-compartir:hover {
  transform: scale(1.02);
}

/* === ANIMACIÓN PARA TARJETAS DE HISTORIAL === */
.historial-partido {
  animation: fadeInLeft 0.4s ease-out forwards;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.historial-partido:hover {
  transform: translateX(4px);
  border-color: rgba(100, 228, 169, 0.3);
}

/* === ANIMACIÓN PARA HEALTH STATS === */
.health-stat {
  transition: transform 0.2s ease;
}

.health-stat:hover {
  transform: translateX(4px);
}

/* === ANIMACIÓN PARA HEALTH STAT DOT === */
.health-stat-dot {
  transition: transform 0.3s ease;
}

.health-stat:hover .health-stat-dot {
  transform: scale(1.3);
}

/* === ANIMACIÓN PARA HEALTH LABEL === */
.health-label {
  animation: fadeInLeft 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA HEALTH SUB === */
.health-sub {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.25s;
}

/* === ANIMACIÓN PARA HEALTH GRANDE === */
.health-grande {
  animation: scaleIn 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA HEALTH GAUGE NOTA === */
.health-gauge-nota {
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: 0.5s;
}

/* === ANIMACIÓN PARA HEALTH MERCADOS LISTA === */
.health-mercados {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA HEALTH NOTA === */
.health-nota {
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA MOTOR HEALTH CARD === */
.motor-health-grid .health-card {
  animation: fadeInUp 0.5s ease-out forwards;
}

.motor-health-grid .health-card:nth-child(1) { animation-delay: 0.1s; }
.motor-health-grid .health-card:nth-child(2) { animation-delay: 0.2s; }

/* === ANIMACIÓN PARA DASHBOARD CARD === */
.dashboard-card {
  animation: fadeInUp 0.5s ease-out forwards;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.15s; }
.dashboard-card:nth-child(3) { animation-delay: 0.2s; }
.dashboard-card:nth-child(4) { animation-delay: 0.25s; }

/* === ANIMACIÓN PARA DASHBOARD LABEL === */
.dashboard-label {
  animation: fadeInLeft 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA DASHBOARD CARD SMALL === */
.dashboard-card small {
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA CALIBRACION RANGO FILA === */
.calibracion-rango-fila {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.calibracion-rango-fila:hover {
  transform: translateX(4px);
  border-color: rgba(242, 196, 116, 0.3);
}

/* === ANIMACIÓN PARA CALIBRACION RANGO HEADER === */
.calibracion-rango-header {
  transition: background 0.2s ease;
}

.calibracion-rango-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA CALIBRACION BARRA ITEM === */
.calibracion-barra-item {
  transition: background 0.2s ease;
  border-radius: var(--radius-xs);
  padding: 2px 4px;
}

.calibracion-barra-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* === ANIMACIÓN PARA CALIBRACION BARRA RELLENO === */
.calibracion-barra-relleno {
  transition: width 1s ease;
}

/* === ANIMACIÓN PARA CALIBRACION BARRA VALOR === */
.calibracion-barra-valor {
  font-variant-numeric: tabular-nums;
  animation: countUp 0.6s ease-out forwards;
}

/* === ANIMACIÓN PARA CALIBRACION VACIO === */
.calibracion-vacio {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === ANIMACIÓN PARA CALIBRACION CATEGORIAS === */
.calibracion-categorias {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA CALIBRACION FILA FACTOR === */
.calibracion-fila-factor {
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s ease;
}

.calibracion-fila-factor:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA CALIBRACION FILA MUESTRAS === */
.calibracion-fila-muestras {
  font-variant-numeric: tabular-nums;
}

/* === ANIMACIÓN PARA CALIBRACION ITEM TITULO === */
.calibracion-item-titulo {
  animation: fadeInLeft 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA CALIBRACION ITEM VALOR === */
.calibracion-item-valor {
  font-variant-numeric: tabular-nums;
  animation: countUp 0.6s ease-out forwards;
;
}

/* === ANIMACIÓN PARA BLOQUE COMBINADAS === */
.bloque-combinadas {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA TARJETAS DE COMBINADA === */
.tarjeta-combinada:nth-child(1) { animation-delay: 0.05s; }
.tarjeta-combinada:nth-child(2) { animation-delay: 0.1s; }
.tarjeta-combinada:nth-child(3) { animation-delay: 0.15s; }
.tarjeta-combinada:nth-child(4) { animation-delay: 0.2s; }
.tarjeta-combinada:nth-child(5) { animation-delay: 0.25s; }
.tarjeta-combinada:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA ENCABEZADO COMBINADA === */
.encabezado-combinada {
  animation: fadeIn 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA ETIQUETA COMBINADA === */
.etiqueta-combinada {
  animation: fadeInLeft 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA BADGE COMBINADA === */
.badge-combinada {
  transition: all 0.2s ease;
}

.badge-combinada:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA PROB COMBINADA === */
.prob-combinada {
  font-variant-numeric: tabular-nums;
  animation: countUp 0.6s ease-out forwards;
}

/* === ANIMACIÓN PARA PIERNAS COMBINADA === */
.pierna-combinada .num {
  transition: all 0.2s ease;
}

.pierna-combinada:hover .num {
  transform: scale(1.2);
  background: var(--brand);
  color: white;
}

/* === ANIMACIÓN PARA PIERNA COMBINADA DETALLE === */
.pierna-combinada .detalle {
  animation: fadeInLeft 0.3s ease-out forwards;
}

/* === ANIMACIÓN PARA PIERNA COMBINADA PCT === */
.pierna-combinada .pct {
  font-variant-numeric: tabular-nums;
  animation: countUp 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA HISTORIAL PARTIDO EQUIPOS === */
.historial-partido-equipos {
  animation: fadeInLeft 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA HISTORIAL PARTIDO MARCADOR === */
.historial-partido-marcador {
  font-variant-numeric: tabular-nums;
  animation: fadeInRight 0.4s ease-out forwards;
}

/* === ANIMACIÓN PARA HISTORIAL MERCADO ITEM === */
.historial-mercado-item.acierto {
  animation: fadeInLeft 0.3s ease-out forwards;
;
}

.historial-mercado-item.fallo {
  animation: fadeInLeft 0.3s ease-out forwards;
;
  opacity: 0.85;
}

/* === ANIMACIÓN PARA VISTA ANALITICA CONTROLES === */
.analitica-controles {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA ANALITICA FILTRO BTN === */
#vista-analitica .filtro-btn {
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

#vista-analitica .filtro-btn:hover {
  transform: translateY(-2px);
}

#vista-analitica .filtro-btn.activa {
  animation: pulseActive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA VISTA COMPETICIONES GRID === */
#vista-competiciones .dashboard-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA VISTA RANKING GRID === */
#vista-ranking .dashboard-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA VISTA DOBLES BLOQUE COMBINADAS === */
#vista-dobles .bloque-combinadas {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA VISTA FAVORITOS CONTENEDOR === */
#contenedor-favoritos {
  animation: fadeIn 0.4s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA MIS PREDICCIONES CONTENEDOR === */
#contenedor-mispredicciones {
  animation: fadeIn 0.4s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA HISTORIAL CONTENEDOR === */
#vista-historial .historial-partido {
  animation: fadeInLeft 0.4s ease-out forwards;
;
}

#vista-historial .historial-partido:nth-child(1) { animation-delay: 0.05s; }
#vista-historial .historial-partido:nth-child(2) { animation-delay: 0.1s; }
#vista-historial .historial-partido:nth-child(3) { animation-delay: 0.15s; }
#vista-historial .historial-partido:nth-child(4) { animation-delay: 0.2s; }
#vista-historial .historial-partido:nth-child(5) { animation-delay: 0.25s; }
#vista-historial .historial-partido:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA VISTA HISTORIAL PRECISION === */
#vista-historial .precision-general {
  animation: scaleIn 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA VISTA ANALITICA HISTORIAL === */
#vista-analitica #bloque-historial {
  animation: fadeIn 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA ANALITICA HISTORIAL PARTIDO === */
#vista-analitica .historial-partido {
  animation: fadeInLeft 0.4s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA LIVE CONTENEDOR === */
#contenedor-live {
  animation: fadeIn 0.4s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA LIVE PARTIDO EN VIVO === */
#vista-live .partido-en-vivo {
  animation: pulseLive 2s ease-in-out infinite;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS PESTAÑAS === */
#vista-pronosticos .pestañas-fecha {
  animation: slideDown 0.4s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS BARRA FILTROS === */
#vista-pronosticos .barra-filtros-unificada {
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: 0.1s;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS PILLS LIGAS === */
#vista-pronosticos .filtro-ligas-pills {
  animation: fadeInLeft 0.4s ease-out forwards;
  animation-delay: 0.15s;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS INPUT BUSCAR === */
#vista-pronosticos .input-buscar-integrado {
  animation: fadeInRight 0.4s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS FILTROS RAPIDOS === */
#vista-pronosticos #filtros-rapidos-pills {
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: 0.25s;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS CONTENEDOR PARTIDOS === */
#vista-pronosticos #contenedor-partidos {
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS BLOQUE COMBINADAS === */
#vista-pronosticos #bloque-combinadas {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS FAB === */
#vista-pronosticos .btn-fab-combinada {
  animation: floatButton 3s ease-in-out infinite;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS SELECTOR FECHA === */
#vista-pronosticos .selector-fecha-personalizada {
  animation: slideDown 0.3s ease-out;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS HISTORIAL PARTIDO === */
#vista-pronosticos .historial-partido {
  animation: fadeInLeft 0.4s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA PRONÓSTICOS HISTORIAL BADGE === */
#vista-pronosticos .historial-partido-badge {
  transition: transform 0.2s ease;
}

#vista-pronosticos .historial-partido-badge:hover {
  transform: scale(1.1);
}

/* === ANIMACIÓN PARA VISTA FAVORITOS TARJETAS === */
#vista-favoritos .tarjeta-partido {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA FAVORITOS TARJETAS RETRASO === */
#vista-favoritos .tarjeta-partido:nth-child(1) { animation-delay: 0.05s; }
#vista-favoritos .tarjeta-partido:nth-child(2) { animation-delay: 0.1s; }
#vista-favoritos .tarjeta-partido:nth-child(3) { animation-delay: 0.15s; }
#vista-favoritos .tarjeta-partido:nth-child(4) { animation-delay: 0.2s; }
#vista-favoritos .tarjeta-partido:nth-child(5) { animation-delay: 0.25s; }
#vista-favoritos .tarjeta-partido:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA VISTA MIS PREDICCIONES TARJETAS === */
#vista-mispredicciones .tarjeta-partido {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA MIS PREDICCIONES TARJETAS RETRASO === */
#vista-mispredicciones .tarjeta-partido:nth-child(1) { animation-delay: 0.05s; }
#vista-mispredicciones .tarjeta-partido:nth-child(2) { animation-delay: 0.1s; }
#vista-mispredicciones .tarjeta-partido:nth-child(3) { animation-delay: 0.15s; }
#vista-mispredicciones .tarjeta-partido:nth-child(4) { animation-delay: 0.2s; }
#vista-mispredicciones .tarjeta-partido:nth-child(5) { animation-delay: 0.25s; }
#vista-mispredicciones .tarjeta-partido:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA VISTA LIVE TARJETAS === */
#vista-live .tarjeta-partido {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA VISTA LIVE TARJETAS RETRASO === */
#vista-live .tarjeta-partido:nth-child(1) { animation-delay: 0.05s; }
#vista-live .tarjeta-partido:nth-child(2) { animation-delay: 0.1s; }
#vista-live .tarjeta-partido:nth-child(3) { animation-delay: 0.15s; }
#vista-live .tarjeta-partido:nth-child(4) { animation-delay: 0.2s; }
#vista-live .tarjeta-partido:nth-child(5) { animation-delay: 0.25s; }
#vista-live .tarjeta-partido:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA VISTA ANALITICA TELEMETRIA CARDS === */
#vista-analitica .telemetria-card {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

#vista-analitica .telemetria-card:nth-child(1) { animation-delay: 0.05s; }
#vista-analitica .telemetria-card:nth-child(2) { animation-delay: 0.1s; }
#vista-analitica .telemetria-card:nth-child(3) { animation-delay: 0.15s; }
#vista-analitica .telemetria-card:nth-child(4) { animation-delay: 0.2s; }

/* === ANIMACIÓN PARA VISTA COMPETICIONES DASHBOARD CARDS === */
#vista-competiciones .dashboard-card {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

#vista-competiciones .dashboard-card:nth-child(1) { animation-delay: 0.05s; }
#vista-competiciones .dashboard-card:nth-child(2) { animation-delay: 0.1s; }
#vista-competiciones .dashboard-card:nth-child(3) { animation-delay: 0.15s; }
#vista-competiciones .dashboard-card:nth-child(4) { animation-delay: 0.2s; }
#vista-competiciones .dashboard-card:nth-child(5) { animation-delay: 0.25s; }
#vista-competiciones .dashboard-card:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA VISTA RANKING DASHBOARD CARDS === */
#vista-ranking .dashboard-card {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

#vista-ranking .dashboard-card:nth-child(1) { animation-delay: 0.05s; }
#vista-ranking .dashboard-card:nth-child(2) { animation-delay: 0.1s; }
#vista-ranking .dashboard-card:nth-child(3) { animation-delay: 0.15s; }
#vista-ranking .dashboard-card:nth-child(4) { animation-delay: 0.2s; }
#vista-ranking .dashboard-card:nth-child(5) { animation-delay: 0.25s; }
#vista-ranking .dashboard-card:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA VISTA DOBLES TARJETAS COMBINADA === */
#vista-dobles .tarjeta-combinada {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

#vista-dobles .tarjeta-combinada:nth-child(1) { animation-delay: 0.05s; }
#vista-dobles .tarjeta-combinada:nth-child(2) { animation-delay: 0.1s; }
#vista-dobles .tarjeta-combinada:nth-child(3) { animation-delay: 0.15s; }
#vista-dobles .tarjeta-combinada:nth-child(4) { animation-delay: 0.2s; }
#vista-dobles .tarjeta-combinada:nth-child(5) { animation-delay: 0.25s; }
#vista-dobles .tarjeta-combinada:nth-child(n+6) { animation-delay: 0.3s; }

/* === ANIMACIÓN PARA BENTO ITEMS EN DASHBOARD === */
.dash-bento-grid .bento-item {
  animation: scaleIn 0.4s ease-out forwards;
  opacity: 0;
}

.dash-bento-grid .bento-item:nth-child(1) { animation-delay: 0.05s; }
.dash-bento-grid .bento-item:nth-child(2) { animation-delay: 0.1s; }
.dash-bento-grid .bento-item:nth-child(3) { animation-delay: 0.15s; }
.dash-bento-grid .bento-item:nth-child(4) { animation-delay: 0.2s; }
.dash-bento-grid .bento-item:nth-child(5) { animation-delay: 0.25s; }
.dash-bento-grid .bento-item:nth-child(6) { animation-delay: 0.3s; }
.dash-bento-grid .bento-item:nth-child(7) { animation-delay: 0.35s; }
.dash-bento-grid .bento-item:nth-child(8) { animation-delay: 0.4s; }

/* === ANIMACIÓN PARA KPIs EN DASHBOARD === */
.dash-kpi-valor {
  animation: countUp 0.8s ease-out forwards;
}

/* === ANIMACIÓN PARA KPIs EN DASHBOARD CON RETRASO === */
.dash-bento-grid .bento-item:nth-child(1) .dash-kpi-valor { animation-delay: 0.2s; }
.dash-bento-grid .bento-item:nth-child(2) .dash-kpi-valor { animation-delay: 0.3s; }
.dash-bento-grid .bento-item:nth-child(3) .dash-kpi-valor { animation-delay: 0.4s; }

/* === ANIMACIÓN PARA BARRA DE KPI EN DASHBOARD === */
.dash-kpi-barra span {
  animation: progressFill 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

/* === ANIMACIÓN PARA HEALTH CARDS EN DASHBOARD === */
.health-card {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

.health-card:nth-child(1) { animation-delay: 0.1s; }
.health-card:nth-child(2) { animation-delay: 0.2s; }

/* === ANIMACIÓN PARA HEALTH STATS EN DASHBOARD === */
.health-stat {
  animation: fadeInLeft 0.4s ease-out forwards;
;
}

.health-stat:nth-child(1) { animation-delay: 0.3s; }
.health-stat:nth-child(2) { animation-delay: 0.35s; }
.health-stat:nth-child(3) { animation-delay: 0.4s; }

/* === ANIMACIÓN PARA DASHBOARD PERSONAL === */
.dashboard-personal {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA DASHBOARD TITULO === */
.dashboard-titulo {
  animation: slideDown 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA DASHBOARD GRID === */
.dashboard-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA DASHBOARD CARDS RETRASO === */
.dashboard-grid .dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-grid .dashboard-card:nth-child(2) { animation-delay: 0.15s; }
.dashboard-grid .dashboard-card:nth-child(3) { animation-delay: 0.2s; }
.dashboard-grid .dashboard-card:nth-child(4) { animation-delay: 0.25s; }

/* === ANIMACIÓN PARA DASHBOARD CARD VALOR RETRASO === */
.dashboard-grid .dashboard-card:nth-child(1) .dashboard-valor { animation-delay: 0.2s; }
.dashboard-grid .dashboard-card:nth-child(2) .dashboard-valor { animation-delay: 0.25s; }
.dashboard-grid .dashboard-card:nth-child(3) .dashboard-valor { animation-delay: 0.3s; }
.dashboard-grid .dashboard-card:nth-child(4) .dashboard-valor { animation-delay: 0.35s; }

/* === ANIMACIÓN PARA MOTOR HEALTH SECTION === */
.motor-health-section {
  animation: fadeInUp 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA MOTOR HEALTH HEADER === */
.motor-health-header {
  animation: slideDown 0.5s ease-out forwards;
;
}

/* === ANIMACIÓN PARA MOTOR HEALTH GRID === */
.motor-health-grid {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.2s;
}

/* === ANIMACIÓN PARA MOTOR HEALTH CARD RETRASO === */
.motor-health-grid .health-card:nth-child(1) { animation-delay: 0.1s; }
.motor-health-grid .health-card:nth-child(2) { animation-delay: 0.2s; }

/* === ANIMACIÓN PARA DASH INFO === */
.dash-info {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA DASH CTA === */
.dash-cta {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* === ANIMACIÓN PARA DASH CTA KICKER === */
.dash-cta-kicker {
  animation: fadeInLeft 0.5s ease-out forwards;
  animation-delay: 0.35s;
}

/* === ANIMACIÓN PARA DASH CTA H2 === */
.dash-cta h2 {
  animation: slideDown 0.5s ease-out forwards;
  animation-delay: 0.4s;
}

/* === ANIMACIÓN PARA LANDING PRIMARY EN CTA === */
.dash-cta .landing-primary {
  animation: fadeInRight 0.5s ease-out forwards;
  animation-delay: 0.45s;
}

