
  /* Tipografía: Manrope (cuerpo, geométrica con carácter) + Fraunces (títulos, editorial) + JetBrains Mono (números) */
  @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

  :root {
    /* Paleta editorial premium: rojo vivo + crema cálida + acentos dorados */
    --bg: #F4F1E8;             /* crema cálida (newspaper feel) */
    --bg-tint: #EBE6D8;
    --bg-deep: #E5DEC9;         /* sidebar/accent background */
    --card: #FFFFFF;            /* blanco puro para tarjetas (contraste alto) */
    --card-alt: #FAF7EE;        /* tarjeta alterna muy sutil */
    --border: #D9D2BF;          /* borde visible pero discreto */
    --border-strong: #B8AC8B;   /* borde más marcado para divisores */
    --text: #14110D;            /* negro profundo, casi tinta */
    --text-soft: #3D3729;       /* gris cálido medio */
    --muted: #786E58;          /* gris cálido suave para anotaciones */
    --primary: #B81C2C;         /* rojo CB Vic más vivo, mejor contraste */
    --primary-deep: #8B0F1F;    /* hover/active */
    --primary-soft: #F9E8E9;    /* tinte claro */
    --secondary: #14110D;       /* negro profundo para headers */
    --accent: #2F6B43;          /* verde bosque (no oliva apagado) */
    --accent-soft: #DFEBE0;
    --gold: #B89148;            /* dorado premium (acentos) */
    --gold-soft: #F2E6CC;
    --warn: #B56B0F;            /* ámbar profundo */
    --warn-soft: #F8E9CC;
    --danger: #B81C2C;          /* = primary para consistencia */
    --danger-soft: #F9E8E9;
    --input: #FFFFFF;
    --calc: #F4F1E8;
    --row-stripe: #FAF7EE;
    /* Sombras muy sutiles: el diseño editorial usa bordes, no sombras */
    --shadow-sm: 0 1px 2px rgba(20, 17, 13, 0.05);
    --shadow: 0 1px 3px rgba(20, 17, 13, 0.08);
    --radius: 4px;
    --radius-sm: 3px;

    /* Tipografía display (landing) */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Consolas, monospace;

    /* Sombras premium */
    --shadow-md: 0 4px 12px -2px rgba(20,17,13,0.08), 0 2px 4px -2px rgba(20,17,13,0.04);
    --shadow-lg: 0 12px 32px -8px rgba(20,17,13,0.12), 0 4px 8px -2px rgba(20,17,13,0.06);
    --shadow-xl: 0 24px 60px -12px rgba(20,17,13,0.18), 0 8px 16px -4px rgba(20,17,13,0.08);
    --shadow-glow: 0 0 0 1px rgba(184,28,44,0.10), 0 8px 24px -6px rgba(184,28,44,0.25);
  }

  /* ===== DARK MODE ===== */
  [data-theme="dark"] {
    --bg: #0A0907;
    --bg-tint: #14110D;
    --bg-deep: #1A1612;
    --card: #161310;
    --card-alt: #1F1B17;
    --border: #2A2520;
    --border-strong: #3D3729;
    --text: #F4F1E8;
    --text-soft: #C8BFA8;
    --muted: #786E58;
    --primary: #E84A56;
    --primary-deep: #B81C2C;
    --primary-soft: rgba(232,74,86,0.12);
    --secondary: #F4F1E8;
    --accent: #5BB37C;
    --accent-soft: rgba(91,179,124,0.12);
    --gold: #D4A862;
    --gold-soft: rgba(212,168,98,0.10);
    --warn: #E0A04A;
    --warn-soft: rgba(224,160,74,0.10);
    --danger: #E84A56;
    --danger-soft: rgba(232,74,86,0.10);
    --input: #1F1B17;
    --calc: #1A1612;
    --row-stripe: #1A1612;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.5), 0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 32px -8px rgba(0,0,0,0.6), 0 4px 8px -2px rgba(0,0,0,0.3);
    --shadow-xl: 0 24px 60px -12px rgba(0,0,0,0.7), 0 8px 16px -4px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 0 1px rgba(232,74,86,0.20), 0 8px 32px -6px rgba(232,74,86,0.35);
  }
  [data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
  }
  [data-theme="dark"] .sidebar {
    background: #050403;
    border-right-color: #1A1612;
  }
  [data-theme="dark"] .app-header {
    background: rgba(10,9,7,0.85);
    border-bottom-color: var(--border);
  }
  [data-theme="dark"] .hero-orb,
  [data-theme="dark"] .grid-bg {
    opacity: 0.5;
  }

  /* Modo landing/auth: desactivar grid de app-shell */
  body.landing-mode {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-template-areas: none !important;
  }
  body.landing-mode #app-shell {
    display: none !important;
  }

  /* App shell: grid interno (header arriba, sidebar izq + main der) */
  #app-shell {
    display: grid;
    grid-template-columns: 244px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "header header"
      "sidebar main";
    min-height: 100vh;
  }
  #app-shell > header { grid-area: header; margin: 0; }
  #app-shell > aside.sidebar { grid-area: sidebar; }
  #app-shell > main { grid-area: main; min-width: 0; }

  /* Ocultar el header viejo (ahora tenemos la app-header moderna) */
  #app-shell > header { display: none; }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  }
  h1, h2, h3, h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.018em;
    color: var(--text);
    font-optical-sizing: auto;
  }
  /* Tabular nums para que las cifras alineen perfecto en tablas y KPIs */
  .kpi .value, td.num, .ft-faltas, .media-badge, .pos-tag {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
  }

  /* HEADER */
  header {
    background: var(--secondary);
    color: #F4EBD8;
    padding: 16px 28px 14px;
    border-bottom: 4px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  header h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.025em;
    font-optical-sizing: auto;
    color: #F4EBD8;
    margin: 0 0 4px 0;
    line-height: 1.2;
  }
  header h1::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-deep) 100%);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(184, 28, 44, 0.5);
    margin-right: 14px;
    vertical-align: -4px;
  }
  header .sub {
    font-size: 11.5px;
    color: #9C8B73;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .header-actions {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
  }
  .header-actions button {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .header-actions button:hover { background: rgba(255,255,255,0.22); }
  .header-actions button.primary {
    background: var(--accent);
    border-color: var(--accent-dark);
  }
  .header-actions button.primary:hover { background: var(--accent-dark); }

  /* Selector de equipo en el header */
  .header-equipo {
    position: absolute;
    right: 380px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .header-equipo-label {
    font-size: 10.5px;
    color: #9C8B73;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
  }
  .header-equipo-select {
    background: rgba(255,255,255,0.1);
    color: #F4EBD8;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 5px 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-width: 180px;
  }
  .header-equipo-select:hover, .header-equipo-select:focus {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.35);
  }
  .header-equipo-select option {
    background: #14110D;
    color: #F4EBD8;
  }
  .header-equipo-gestionar {
    background: rgba(255,255,255,0.08);
    color: #F4EBD8;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
  }
  .header-equipo-gestionar:hover {
    background: rgba(255,255,255,0.18);
  }

  /* TABS - look periodístico, sin transform */
  /* SIDEBAR - estilo Sorare (sidebar oscuro con pestañas verticales) */
  /* Body sin grid: el layout lo gestiona #app-shell con su grid interno */
  body {
    display: block;
    min-height: 100vh;
  }
  header {
    grid-area: header;
  }
  aside.sidebar {
    grid-area: sidebar;
    background: linear-gradient(180deg, #1F1812 0%, #0E0A06 100%);
    color: #e8d9c8;
    border-right: 1px solid #2a1f15;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: visible;
    box-shadow: 2px 0 16px rgba(20, 17, 13, 0.18);
  }
  /* Wrapper interno con scroll, para no romper los popovers */
  .sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    min-height: 0;
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 18px;
    border-bottom: 1px solid #2a1818;
  }
  .brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: #FFF8E8;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 800;
    font-size: 14px;
    border-radius: 9px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 10px rgba(184, 28, 44, 0.45);
  }
  .brand-text { display: flex; flex-direction: column; min-width: 0; }
  .brand-name {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    color: #F4EBD8;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .brand-sub {
    font-size: 10px;
    color: #8a7868;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 3px;
  }
  nav.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    flex: 1;
  }
  nav.sidebar-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: none;
    border: none;
    padding: 11px 18px;
    font-size: 13.5px;
    color: #b8a898;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.005em;
    text-align: left;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  nav.sidebar-nav button:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f0e0cc;
  }
  nav.sidebar-nav button.active {
    background: linear-gradient(90deg, rgba(184, 28, 44, 0.22) 0%, rgba(184, 28, 44, 0.04) 100%);
    color: #FFF5E0;
    border-left-color: var(--primary);
    font-weight: 700;
  }
  nav.sidebar-nav button.active .tab-icon {
    color: var(--primary);
  }
  /* === NAV GROUP (desplegables estilo Sorare) === */
  .nav-group {
    position: relative;
  }
  .nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 14px 9px 12px;
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    color: #c8b8a0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .nav-group-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f0e2cb;
  }
  .nav-group-toggle .nav-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: #8a7868;
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }
  .nav-group.open .nav-group-toggle .nav-chevron {
    transform: rotate(180deg);
  }
  .nav-group.open .nav-group-toggle {
    color: #FFF5E0;
  }
  .nav-group.open > .nav-group-toggle {
    color: #FFF5E0;
  }
  .nav-group.active > .nav-group-toggle {
    background: linear-gradient(90deg, rgba(184, 28, 44, 0.22) 0%, rgba(184, 28, 44, 0.04) 100%);
    border-left-color: var(--primary);
    color: #FFF5E0;
    font-weight: 700;
  }
  .nav-group.active > .nav-group-toggle .tab-icon {
    color: var(--primary);
  }
  /* Submenu flotante hacia la derecha (estilo Sorare) */
  .nav-group-items {
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0 6px 0;
  }
  .nav-group.open .nav-group-items {
    display: flex;
  }
  .nav-group-items button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 36px;
    background: transparent;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    color: #b8a890;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
  }
  .nav-group-items button .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #5a4d3e;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
  }
  .nav-group-items button:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #FFF5E0;
  }
  .nav-group-items button:hover .dot {
    background: var(--primary);
    transform: scale(1.2);
  }
  .nav-group-items button.active {
    background: linear-gradient(90deg, rgba(184, 28, 44, 0.22) 0%, rgba(184, 28, 44, 0.04) 100%);
    border-left-color: var(--primary);
    color: #FFF5E0;
    font-weight: 600;
  }
  .nav-group-items button.active .dot {
    background: var(--primary);
  }
  .tab-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    color: #8a7868;
    transition: color 0.15s;
  }
  nav.sidebar-nav button:hover .tab-icon {
    color: #c8b8a0;
  }
  .tab-label {
    flex: 1;
  }
  .tab-emoji {
    font-size: 12px;
    opacity: 0.6;
  }
  .sidebar-footer {
    padding: 16px 18px;
    border-top: 1px solid #2a1818;
    font-size: 10.5px;
  }
  .footer-line {
    color: #b8a898;
    letter-spacing: 0.04em;
  }
  .footer-line.muted {
    color: #6a5848;
    margin-top: 3px;
  }

  /* MAIN */
  main {
    grid-area: main;
    padding: 28px 32px 80px;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }

  .panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .panel-header h2 {
    font-size: 28px;
    color: var(--text);
    font-weight: 700;
    font-family: 'Fraunces', Georgia, serif;
    letter-spacing: -0.022em;
    line-height: 1.15;
  }
  .panel-header .desc {
    color: var(--text-soft);
    font-size: 13.5px;
    margin-top: 8px;
    max-width: 720px;
    line-height: 1.55;
    font-weight: 400;
  }

  /* BUTTONS - sin sombras, sin translateY */
  .btn {
    background: var(--card);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    letter-spacing: 0.005em;
  }
  .btn:hover {
    border-color: var(--text);
    color: var(--text);
  }
  .btn-primary {
    background: var(--primary);
    color: #fdfaf3;
    border-color: var(--primary);
  }
  .btn-primary:hover {
    background: #6b0f1f;
    border-color: #6b0f1f;
    color: #fdfaf3;
  }
  .btn-accent {
    background: var(--accent);
    color: #fdfaf3;
    border-color: var(--accent);
  }
  .btn-accent:hover { background: #3d5430; border-color: #3d5430; color: #fdfaf3; }
  .btn-danger {
    background: var(--card);
    color: var(--danger);
    border-color: var(--danger-soft);
  }
  .btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
  .btn-sm { padding: 4px 10px; font-size: 12px; }
  .btn-icon {
    padding: 4px 8px;
    font-size: 16px;
    line-height: 1;
  }

  /* CARDS - editorial, sin sombras */
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
  }
  .card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-family: 'Manrope', sans-serif;
  }

  /* ====== QUICK WINS VISUALES (Sorare-style) ====== */

  /* Micro-interacciones en cards y botones (sin translateY) */
  .card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }
  .card.is-hoverable:hover {
    border-color: rgba(184,28,44,0.35);
    box-shadow: 0 4px 18px -8px rgba(184,28,44,0.15), 0 2px 4px -2px rgba(20,17,13,0.06);
  }
  .btn {
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  }
  .btn:hover {
    box-shadow: 0 2px 8px -2px rgba(20,17,13,0.18);
  }
  .btn-primary:hover {
    box-shadow: 0 3px 12px -3px rgba(184,28,44,0.45);
  }

  /* Avatares por jugador con gradiente según posición */
  .jug-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 1px 2px rgba(20,17,13,0.18);
    user-select: none;
    position: relative;
    overflow: hidden;
  }
  .jug-avatar::after {
    /* brillo superior sutil tipo Sorare */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
  }
  .jug-avatar .in {
    position: relative;
    z-index: 1;
    line-height: 1;
  }
  /* 5 posiciones × gradiente distinto */
  .jug-avatar.pos-base       { background: linear-gradient(135deg, #4F6BED 0%, #2A3F9E 100%); }
  .jug-avatar.pos-escolta    { background: linear-gradient(135deg, #2BAE7E 0%, #156B4D 100%); }
  .jug-avatar.pos-alero      { background: linear-gradient(135deg, #E89B3C 0%, #B8711C 100%); }
  .jug-avatar.pos-alapivot   { background: linear-gradient(135deg, #D65A3F 0%, #9A2E1C 100%); }
  .jug-avatar.pos-pivot      { background: linear-gradient(135deg, #B81C2C 0%, #6B0E18 100%); }
  .jug-avatar.pos-sin        { background: linear-gradient(135deg, #8A7A5C 0%, #4F4434 100%); }
  /* Sizes */
  .jug-avatar.size-xs  { width: 22px; height: 22px; font-size: 9.5px; }
  .jug-avatar.size-sm  { width: 28px; height: 28px; font-size: 10.5px; }
  .jug-avatar.size-md  { width: 38px; height: 38px; font-size: 13px; }
  .jug-avatar.size-lg  { width: 56px; height: 56px; font-size: 19px; }
  .jug-avatar.size-xl  { width: 88px; height: 88px; font-size: 30px; }

  /* Chip de jugador (reutilizable) */
  .jug-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
  }
  .jug-chip .jug-nombre { white-space: nowrap; }

  /* Player card hero (para Perfiles) */
  .player-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, var(--card) 0%, var(--card-alt) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
  }
  .player-hero::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(184,28,44,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
  }
  .player-hero .ph-avatar { z-index: 1; }
  .player-hero .ph-info { z-index: 1; }
  .player-hero .ph-info .ph-nombre {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 4px 0;
  }
  .player-hero .ph-info .ph-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
  }
  .player-hero .ph-info .ph-meta .dot {
    width: 4px; height: 4px;
    background: var(--text-soft);
    border-radius: 50%;
    opacity: 0.4;
  }
  .player-hero .ph-dorsal {
    font-family: 'Fraunces', serif;
    font-size: 80px;
    line-height: 1;
    font-weight: 700;
    color: var(--text);
    opacity: 0.92;
    letter-spacing: -0.04em;
    z-index: 1;
    font-variant-numeric: tabular-nums;
  }
  .player-hero .ph-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
  }
  .player-hero .ph-stat {
    text-align: left;
    padding: 0 18px;
    border-right: 1px solid var(--border);
  }
  .player-hero .ph-stat:first-child { padding-left: 0; }
  .player-hero .ph-stat:last-child  { border-right: 0; padding-right: 0; }
  .player-hero .ph-stat .lbl {
    font-size: 10.5px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .player-hero .ph-stat .val {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
  }
  .player-hero .ph-stat .sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
  }

  /* Posición pill (para hero / detalles) */
  .pos-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
  }
  .pos-pill.pos-base       { background: rgba(79,107,237,0.14);  color: #2A3F9E; }
  .pos-pill.pos-escolta    { background: rgba(43,174,126,0.14);  color: #156B4D; }
  .pos-pill.pos-alero      { background: rgba(232,155,60,0.16);  color: #8A5410; }
  .pos-pill.pos-alapivot   { background: rgba(214,90,63,0.16);   color: #9A2E1C; }
  .pos-pill.pos-pivot      { background: rgba(184,28,44,0.16);   color: #6B0E18; }
  .pos-pill.pos-sin        { background: rgba(120,110,88,0.14);  color: #5A4A30; }

  /* Empty states */
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 20px 36px;
    text-align: center;
    background: var(--card-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
  }
  .empty-state .es-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    color: var(--gold);
    opacity: 0.85;
  }
  .empty-state .es-title {
    font-family: 'Fraunces', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  .empty-state .es-sub {
    font-size: 12.5px;
    color: var(--text-soft);
    max-width: 320px;
    line-height: 1.5;
  }
  .empty-state .es-cta {
    margin-top: 14px;
  }

  /* Mini-stat cards (los KPIs pero un pelín más premium) */
  .kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--muted);
    border-radius: var(--radius);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
  }
  .kpi-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(184,141,72,0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
  }
  .kpi-card:hover {
    border-color: rgba(184,28,44,0.25);
    box-shadow: 0 2px 12px -4px rgba(20,17,13,0.08);
  }
  .kpi-card.kpi-primary  { border-left-color: var(--primary); }
  .kpi-card.kpi-accent   { border-left-color: var(--accent); }
  .kpi-card.kpi-gold     { border-left-color: var(--gold); }
  .kpi-card.kpi-warn     { border-left-color: var(--warn); }
  .kpi-card.kpi-danger   { border-left-color: var(--danger); }

  /* ============================================
     REDISEÑO MODERNO: TOP BAR + APP SHELL
     ============================================ */
  .app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    height: 64px;
    background: rgba(244, 241, 232, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
  }
  [data-theme="dark"] .app-header { background: rgba(10, 9, 7, 0.85); }
  .app-header .ah-brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
  }
  .app-header .ah-brand .ah-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 2px 8px -2px rgba(184,28,44,0.5), inset 0 0 0 1px rgba(255,255,255,0.15);
  }
  .app-header .ah-search {
    flex: 1; max-width: 380px;
    position: relative;
  }
  .app-header .ah-search input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--border);
    background: var(--card-alt);
    color: var(--text);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  }
  .app-header .ah-search input:focus {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(184,28,44,0.10);
  }
  .app-header .ah-search .ah-search-icon {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--muted);
    pointer-events: none;
  }
  .app-header .ah-search .ah-kbd {
    position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
  }
  .app-header .ah-right {
    margin-left: auto;
    display: flex; align-items: center; gap: 8px;
  }
  .ah-icon-btn {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-soft);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .ah-icon-btn:hover {
    background: var(--card-alt);
    color: var(--text);
  }
  .ah-icon-btn svg { width: 18px; height: 18px; }
  .ah-user {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 4px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .ah-user:hover { background: var(--card-alt); border-color: var(--border-strong); }
  .ah-user .ah-user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    padding-right: 4px;
  }
  .ah-user .ah-user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px;
  }

  /* ============================================
     LANDING PAGE (pública, antes de login)
     ============================================ */
  .landing {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-body);
    position: relative;
  }
  /* Fondo con gradientes sutiles */
  .landing::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(184,28,44,0.10) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
  }
  .landing::after {
    content: '';
    position: absolute;
    top: 30%; left: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(184,141,72,0.07) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
  }
  [data-theme="dark"] .landing::before { background: radial-gradient(circle, rgba(232,74,86,0.12) 0%, transparent 60%); }
  [data-theme="dark"] .landing::after { background: radial-gradient(circle, rgba(212,168,98,0.08) 0%, transparent 60%); }
  .landing > * { position: relative; z-index: 1; }

  /* Nav landing */
  .landing-nav {
    display: flex; align-items: center;
    padding: 18px 48px;
    max-width: 1280px; margin: 0 auto;
  }
  .landing-nav .ln-brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 18px; font-weight: 600;
    color: var(--text);
    text-decoration: none;
  }
  .landing-nav .ln-brand .ln-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    box-shadow: 0 2px 8px -2px rgba(184,28,44,0.5), inset 0 0 0 1px rgba(255,255,255,0.15);
  }
  .landing-nav .ln-links {
    margin-left: 48px;
    display: flex; gap: 28px;
  }
  .landing-nav .ln-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.15s ease;
  }
  .landing-nav .ln-links a:hover { color: var(--text); }
  .landing-nav .ln-cta {
    margin-left: auto;
    display: flex; align-items: center; gap: 10px;
  }
  .btn-landing {
    padding: 9px 18px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    line-height: 1.2;
  }
  .btn-landing.btn-ghost {
    background: transparent;
    color: var(--text-soft);
  }
  .btn-landing.btn-ghost:hover { color: var(--text); background: var(--card-alt); }
  .btn-landing.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px -2px rgba(184,28,44,0.4);
  }
  .btn-landing.btn-primary:hover { background: var(--primary-deep); box-shadow: 0 4px 14px -2px rgba(184,28,44,0.5); }
  .btn-landing.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
  }
  .btn-landing.btn-outline:hover { background: var(--card-alt); border-color: var(--border-strong); }
  .btn-landing.btn-lg { padding: 12px 24px; font-size: 14.5px; }
  .btn-landing.btn-xl { padding: 14px 28px; font-size: 15.5px; }

  /* Hero */
  .landing-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 48px 96px;
    text-align: center;
  }
  .landing-hero .lh-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    margin-bottom: 24px;
  }
  .landing-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 600;
    color: var(--text);
    max-width: 920px;
    margin: 0 auto 20px;
  }
  .landing-hero h1 .hl-primary { color: var(--primary); font-style: italic; font-weight: 500; }
  .landing-hero .lh-sub {
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-soft);
    max-width: 640px;
    margin: 0 auto 36px;
  }
  .landing-hero .lh-cta {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  }
  .landing-hero .lh-trust {
    margin-top: 48px;
    display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
  }
  .landing-hero .lh-trust span { display: inline-flex; align-items: center; gap: 6px; }

  /* Hero visual (mockup) */
  .landing-hero-visual {
    max-width: 1100px;
    margin: 64px auto 0;
    position: relative;
  }
  .lh-mock {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
  }
  .lh-mock-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 12px 16px;
    background: var(--card-alt);
    border-bottom: 1px solid var(--border);
  }
  .lh-mock-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
  .lh-mock-bar .dot.y { background: #FEBC2E; }
  .lh-mock-bar .dot.g { background: #28C840; }
  .lh-mock-bar .url {
    margin-left: 16px; flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
  }
  .lh-mock-content {
    padding: 32px;
    min-height: 380px;
    background: linear-gradient(180deg, var(--card) 0%, var(--card-alt) 100%);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }
  .lh-mock-side {
    display: flex; flex-direction: column; gap: 4px;
  }
  .lh-mock-side .item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--text-soft);
    font-weight: 500;
  }
  .lh-mock-side .item.active {
    background: var(--primary-soft);
    color: var(--primary);
  }
  .lh-mock-side .item svg { width: 16px; height: 16px; }
  .lh-mock-main { display: flex; flex-direction: column; gap: 14px; }
  .lh-mock-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .lh-mock-kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
  }
  .lh-mock-kpi .lbl { font-size: 10px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 4px; }
  .lh-mock-kpi .val { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); line-height: 1; }
  .lh-mock-chart {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    flex: 1;
    min-height: 200px;
    position: relative;
    background-image:
      linear-gradient(180deg, transparent 0%, var(--primary-soft) 100%),
      linear-gradient(0deg, transparent 64%, var(--border) 65%, var(--border) 66%, transparent 67%),
      linear-gradient(0deg, transparent 84%, var(--border) 85%, var(--border) 86%, transparent 87%);
  }
  /* Mockup denso (v2) */
  .lh-mock-bar .lh-mock-user {
    font-size: 11.5px;
    color: var(--text-soft);
    font-weight: 600;
    padding: 4px 10px;
    background: var(--bg-tint);
    border-radius: 999px;
    margin-right: 8px;
  }
  .lh-mock-greet { margin-bottom: 4px; }
  .lh-mock-greet-h {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.1;
  }
  .lh-mock-greet-p {
    font-size: 11.5px;
    color: var(--text-soft);
    margin-top: 3px;
  }
  .lh-mock-kpis { margin-top: 12px; }
  .lh-mock-kpi .lh-mock-delta {
    font-size: 10.5px;
    margin-top: 4px;
    font-weight: 600;
    color: var(--muted);
  }
  .lh-mock-kpi .lh-mock-delta.good { color: var(--accent); }
  .lh-mock-kpi .lh-mock-delta.bad { color: var(--primary); }
  .lh-mock-row {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 12px;
    margin-top: 12px;
    flex: 1;
  }
  .lh-mock-chart-h {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    margin-bottom: 8px;
  }
  .lh-mock-svg-chart { width: 100%; height: 130px; display: block; }
  .lh-mock-side2 {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .lh-mock-side2-h {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    margin-bottom: 2px;
  }
  .lh-mock-player {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .lh-mock-av {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
  }
  .lh-mock-av.pos-base { background: linear-gradient(135deg, #4F6BED, #2A3F9E); }
  .lh-mock-av.pos-escolta { background: linear-gradient(135deg, #2BAE7E, #156B4D); }
  .lh-mock-av.pos-alero { background: linear-gradient(135deg, #E89B3C, #B8711C); }
  .lh-mock-av.pos-pivot { background: linear-gradient(135deg, #B81C2C, #6B0E18); }
  .lh-mock-pinfo { flex: 1; min-width: 0; }
  .lh-mock-pname {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lh-mock-pmeta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    font-family: var(--font-mono);
  }
  .lh-mock-pbar {
    width: 50px; height: 5px;
    background: var(--bg-tint);
    border-radius: 3px;
    overflow: hidden;
  }
  .lh-mock-pbar-f {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
  }

  /* Sections (shared) */
  .landing-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 48px;
  }
  .landing-section .ls-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
  }
  .landing-section .ls-eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
  }
  .landing-section h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
  }
  .landing-section .ls-sub {
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--text-soft);
  }

  /* Features grid */
  .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  }
  .feature-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
  }
  .feature-card .fc-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    background: var(--primary-soft);
    color: var(--primary);
  }
  .feature-card .fc-icon svg { width: 22px; height: 22px; }
  .feature-card .fc-icon.gold { background: var(--gold-soft); color: var(--gold); }
  .feature-card .fc-icon.accent { background: var(--accent-soft); color: var(--accent); }
  .feature-card h3 {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
  }
  .feature-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-soft);
  }

  /* Pricing */
  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .price-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px 28px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex; flex-direction: column;
  }
  .price-card:hover { box-shadow: var(--shadow-md); }
  .price-card.featured {
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
  }
  .price-card.featured::before {
    content: 'MÁS POPULAR';
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 999px;
  }
  .price-card .pc-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
  }
  .price-card .pc-desc {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 22px;
    min-height: 36px;
  }
  .price-card .pc-price {
    display: flex; align-items: baseline; gap: 6px;
    margin-bottom: 6px;
  }
  .price-card .pc-price .currency { font-size: 18px; color: var(--text-soft); font-weight: 600; }
  .price-card .pc-price .amount {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .price-card .pc-price .period { font-size: 14px; color: var(--text-soft); }
  .price-card .pc-billed { font-size: 12px; color: var(--muted); margin-bottom: 22px; }
  .price-card .pc-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    flex: 1;
  }
  .price-card .pc-features li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text);
    padding: 7px 0;
  }
  .price-card .pc-features li svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
  .price-card .pc-cta { width: 100%; justify-content: center; }
  .price-card .pc-cta.btn-outline:hover { background: var(--card-alt); }

  /* FAQ */
  .faq-list { max-width: 720px; margin: 0 auto; }
  .faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
  }
  .faq-item summary {
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    list-style: none;
    display: flex; align-items: center; justify-content: space-between;
    transition: background 0.15s ease;
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary:hover { background: var(--card-alt); }
  .faq-item summary::after {
    content: '+';
    font-size: 22px;
    color: var(--text-soft);
    font-weight: 300;
    transition: transform 0.2s ease;
  }
  .faq-item[open] summary::after { content: '−'; }
  .faq-item .fi-body {
    padding: 0 22px 20px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.65;
  }

  /* CTA final */
  .cta-final {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 56px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .cta-final::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 60%);
    border-radius: 50%;
  }
  .cta-final h2 { color: #fff; }
  .cta-final p { color: rgba(255,255,255,0.85); font-size: 17px; }
  .cta-final .btn-landing { background: #fff; color: var(--primary); }
  .cta-final .btn-landing:hover { background: #f8f5ee; }
  .cta-final .btn-landing.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
  .cta-final .btn-landing.btn-outline:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.6); }

  /* Footer landing */
  .landing-footer {
    border-top: 1px solid var(--border);
    padding: 40px 48px 28px;
    max-width: 1280px;
    margin: 0 auto;
    color: var(--text-soft);
    font-size: 13px;
  }
  .landing-footer .lf-top {
    display: flex; align-items: flex-start; gap: 48px; flex-wrap: wrap;
    margin-bottom: 32px;
  }
  .landing-footer .lf-col h4 { font-family: var(--font-body); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin-bottom: 10px; }
  .landing-footer .lf-col a { display: block; color: var(--text-soft); text-decoration: none; padding: 3px 0; transition: color 0.15s ease; }
  .landing-footer .lf-col a:hover { color: var(--text); }
  .landing-footer .lf-bottom {
    border-top: 1px solid var(--border);
    padding-top: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  }

  /* ============================================
     LOGIN / SIGNUP
     ============================================ */
  .auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
  }
  .auth-side {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: #fff;
    padding: 48px;
    display: flex; flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
  }
  .auth-side::before {
    content: '';
    position: absolute;
    top: -150px; right: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 60%);
    border-radius: 50%;
  }
  .auth-side::after {
    content: '';
    position: absolute;
    bottom: -200px; left: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,0,0,0.10) 0%, transparent 60%);
    border-radius: 50%;
  }
  .auth-side > * { position: relative; z-index: 1; }
  .auth-side .as-brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 18px; font-weight: 600;
    color: #fff;
  }
  .auth-side .as-brand .as-mark {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px;
    backdrop-filter: blur(10px);
  }
  .auth-side .as-quote {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.25;
    color: #fff;
    font-weight: 500;
    max-width: 440px;
  }
  .auth-side .as-meta {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
  }
  .auth-side .as-meta strong { color: #fff; font-weight: 600; }
  .auth-form-side {
    padding: 32px 48px;
    display: flex; flex-direction: column; justify-content: center;
    background: var(--bg);
    position: relative;
  }
  .auth-form-side .afs-toggle {
    position: absolute;
    top: 24px; right: 32px;
    display: flex; align-items: center; gap: 8px;
  }
  .auth-form-side .afs-card {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
  }
  .auth-form-side h1 {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
  }
  .auth-form-side .afs-sub {
    color: var(--text-soft);
    font-size: 14.5px;
    margin-bottom: 28px;
  }
  .auth-form-side .afs-form { display: flex; flex-direction: column; gap: 14px; }
  .auth-form-side .afs-row {
    display: flex; flex-direction: column; gap: 6px;
  }
  .auth-form-side label {
    font-size: 12px; font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .auth-form-side .afs-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .auth-form-side .afs-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184,28,44,0.10);
  }
  .auth-form-side .afs-row.afs-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .auth-form-side .afs-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px -2px rgba(184,28,44,0.4);
  }
  .auth-form-side .afs-submit:hover { background: var(--primary-deep); box-shadow: 0 4px 14px -2px rgba(184,28,44,0.5); }
  .auth-form-side .afs-divider {
    display: flex; align-items: center; gap: 12px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 4px 0;
  }
  .auth-form-side .afs-divider::before, .auth-form-side .afs-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }
  .auth-form-side .afs-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13.5px;
    color: var(--text-soft);
  }
  .auth-form-side .afs-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
  }
  .auth-form-side .afs-switch a:hover { text-decoration: underline; }
  .auth-form-side .afs-back {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 12.5px;
    display: inline-flex; align-items: center; gap: 4px;
    margin-bottom: 28px;
  }

  /* Theme toggle switch */
  .theme-switch {
    position: relative;
    width: 44px; height: 24px;
    background: var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  .theme-switch::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: var(--card);
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
  }
  [data-theme="dark"] .theme-switch { background: var(--primary); }
  [data-theme="dark"] .theme-switch::after { transform: translateX(20px); }

  /* ============================================
     DASHBOARD (nueva vista principal post-login)
     ============================================ */
  .dashboard {
    padding: 24px 32px 40px;
  }
  .dashboard .db-greeting {
    margin-bottom: 28px;
  }
  .dashboard .db-greeting h1 {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
  }
  .dashboard .db-greeting p {
    color: var(--text-soft);
    font-size: 15px;
  }
  .dashboard .db-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
  }
  .dashboard .db-kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
  }
  .dashboard .db-kpi .db-kpi-label {
    font-size: 11.5px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
  }
  .dashboard .db-kpi .db-kpi-value {
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }
  .dashboard .db-kpi .db-kpi-delta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
  }
  .dashboard .db-kpi .db-kpi-delta.bad { color: var(--danger); }
  .dashboard .db-kpi .db-kpi-icon {
    position: absolute;
    top: 18px; right: 18px;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
  }
  .dashboard .db-kpi .db-kpi-icon svg { width: 18px; height: 18px; }
  .dashboard .db-kpi .db-kpi-icon.gold { background: var(--gold-soft); color: var(--gold); }
  .dashboard .db-kpi .db-kpi-icon.accent { background: var(--accent-soft); color: var(--accent); }
  .dashboard .db-kpi .db-kpi-icon.warn { background: var(--warn-soft); color: var(--warn); }

  .dashboard .db-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
  }
  .dashboard .db-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
  }
  .dashboard .db-card h3 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
  }
  .dashboard .db-chart-wrap {
    height: 220px;
    position: relative;
  }
  .dashboard .db-quick {
    display: flex; flex-direction: column; gap: 8px;
  }
  .dashboard .db-quick a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--card-alt);
    border-radius: 9px;
    text-decoration: none;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
  }
  .dashboard .db-quick a:hover { background: var(--bg-tint); }
  .dashboard .db-quick a .dq-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .dashboard .db-quick a .dq-icon svg { width: 16px; height: 16px; }
  .dashboard .db-quick a .dq-arrow {
    margin-left: auto;
    color: var(--muted);
  }
  .dashboard .db-activity {
    display: flex; flex-direction: column; gap: 12px;
  }
  .dashboard .db-activity .db-act {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
  }
  .dashboard .db-activity .db-act:last-child { border-bottom: 0; }
  .dashboard .db-activity .db-act .da-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
  }
  .dashboard .db-activity .db-act .da-text { color: var(--text); flex: 1; }
  .dashboard .db-activity .db-act .da-time { color: var(--muted); font-size: 12px; }

  /* Fila con avatar (para tablas) */
  .jug-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
  }
  .jug-cell .jug-avatar { flex-shrink: 0; }
  .jug-cell .jug-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
  .jug-cell .jug-txt .n { font-weight: 600; color: inherit; }
  .jug-cell .jug-txt .d { font-size: 10.5px; color: inherit; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 1px; }

  /* Tablas más respiradas (override sutil) */
  .table-wrap table th {
    font-weight: 600;
    color: var(--text-soft);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .table-wrap table td { padding: 12px 14px; }

  /* Grid de player cards (mini-heroes) */
  .player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
  }
  .player-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }
  .player-card .pc-bg {
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    border-radius: 50%;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
  }
  .player-card .pc-bg.pc-base       { background: linear-gradient(135deg, #4F6BED, #2A3F9E); }
  .player-card .pc-bg.pc-escolta    { background: linear-gradient(135deg, #2BAE7E, #156B4D); }
  .player-card .pc-bg.pc-alero      { background: linear-gradient(135deg, #E89B3C, #B8711C); }
  .player-card .pc-bg.pc-alapivot   { background: linear-gradient(135deg, #D65A3F, #9A2E1C); }
  .player-card .pc-bg.pc-pivot      { background: linear-gradient(135deg, #B81C2C, #6B0E18); }
  .player-card .pc-bg.pc-sin        { background: linear-gradient(135deg, #8A7A5C, #4F4434); }
  .player-card .pc-head, .player-card .pc-pos, .player-card .pc-stats, .player-card .pc-footer {
    position: relative;
    z-index: 1;
  }
  .player-card .pc-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }
  /* v2.48.5: padding-right en pc-head-info para evitar que el badge DISPONIBLE/DUDAS/LESIONADO se superponga con el nombre */
  .player-card .pc-head-info {
    flex: 1;
    min-width: 0;
    padding-right: 90px;
  }
  .player-card .pc-nombre {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text);
  }
  .player-card .pc-dorsal {
    font-family: 'Fraunces', serif;
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 500;
  }
  .player-card .pc-pos { margin-bottom: 12px; }
  .player-card .pc-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
  }
  .player-card .pcs .lbl {
    font-size: 9.5px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
  }
  .player-card .pcs .val {
    font-family: 'Fraunces', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
  }
  .player-card .pc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 10.5px;
  }
  .player-card .pc-lesiones { color: var(--text-soft); font-size: 10.5px; }
  /* v2.8: badge de estado grande en la card (DISPONIBLE / LESIONADO / DUDAS) */
  .pc-estado-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    z-index: 2;
  }
  .pc-estado-ok { background: #10b981; color: white; }
  .pc-estado-les { background: #dc2626; color: white; }
  .pc-estado-dudas { background: #f59e0b; color: white; }
  /* v2.8: sparkline de peso */
  .pc-spark-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 4px;
    border-top: 1px dashed var(--border);
    margin-top: 8px;
  }
  .pc-spark-row .lbl {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
  }
  /* v2.8: badge ACWR (en vez de "Riesgo N") */
  .acwr-badge.riesgo-ok { background: #10b981; color: white; }
  .acwr-badge.riesgo-warn { background: #f59e0b; color: white; }
  .acwr-badge.riesgo-danger { background: #dc2626; color: white; }
  .acwr-badge.riesgo-none { background: var(--border); color: var(--muted); }
  .riesgo-badge.riesgo-ok { background: rgba(16,185,129,0.15); color: #10b981; }
  .riesgo-badge.riesgo-warn { background: rgba(245,158,11,0.15); color: #d97706; }
  .riesgo-badge.riesgo-danger { background: rgba(220,38,38,0.15); color: #dc2626; }
  .riesgo-badge.riesgo-none { background: var(--surface-2, #f1f5f9); color: var(--muted); }
  .riesgo-badge.riesgo-ok, .riesgo-badge.riesgo-warn, .riesgo-badge.riesgo-danger,
  .riesgo-badge.riesgo-none,
  .acwr-badge.riesgo-ok, .acwr-badge.riesgo-warn, .acwr-badge.riesgo-danger {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
  }

  /* Selección de player card (clic) */
  .player-card:hover {
    border-color: rgba(184,28,44,0.35);
    box-shadow: 0 6px 20px -10px rgba(184,28,44,0.25);
  }
  .player-card.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(184,28,44,0.10);
  }

  /* FORM */
  .form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
  .form-row label {
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 500;
    letter-spacing: 0.01em;
  }
  input[type="text"], input[type="number"], input[type="date"], select, textarea {
    background: var(--input);
    border: 1px solid var(--border-strong);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    min-width: 0;
    transition: border-color 0.15s, background 0.15s;
  }
  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--text);
    background: #fff;
  }
  input[type="number"] { width: 70px; text-align: center; }
  input[type="text"] { min-width: 140px; }
  input.compact { width: 50px; padding: 3px 6px; font-size: 12px; }

  /* TABLES */
  .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
  }
  table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
  }
  th, td {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 9px 10px;
    text-align: center;
    white-space: nowrap;
  }
  th:last-child, td:last-child { border-right: none; }
  th {
    background: var(--bg-deep);
    color: var(--text-soft);
    font-weight: 700;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    position: sticky;
    top: 0;
    z-index: 2;
    font-family: 'Manrope', sans-serif;
  }
  th.player-head {
    background: var(--secondary);
    color: #f4f1ea;
    text-align: left;
    padding-left: 14px;
    font-size: 11.5px;
    text-transform: none;
    letter-spacing: 0.04em;
    font-weight: 600;
  }
  tr:nth-child(even) td { background: var(--row-stripe); }
  tr:hover td { background: var(--bg-tint); }
  tr.summary-row td {
    background: var(--warn-soft) !important;
    font-weight: 600;
  }
  tr.media-row td {
    background: var(--accent-soft) !important;
    font-weight: 600;
  }
  tr.week-header td {
    background: var(--secondary) !important;
    color: #f4f1ea !important;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
  }
  tr.week-header td .right-info { float: right; }
  td.calc { background: var(--calc); color: var(--text-soft); }
  td input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    padding: 4px;
    font-size: 12px;
    font-family: inherit;
  }
  td input:focus {
    background: #fff8d6;
    box-shadow: inset 0 0 0 2px var(--warn);
  }
  td.day-label {
    background: #f3f4f6;
    font-weight: 600;
    color: var(--primary);
    text-align: left;
    padding-left: 12px;
    position: sticky;
    left: 0;
    z-index: 1;
  }
  td.day-date {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    font-size: 11px;
  }
  .sticky-col { position: sticky; left: 0; z-index: 1; background: inherit; }
  .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
  }
  .badge-pre { background: #fef3c7; color: #92400e; }
  .badge-comp { background: #d1fae5; color: #065f46; }
  .badge-other { background: #e0e7ff; color: #3730a3; }

  /* JUGADORES MANAGEMENT */
  .jugadores-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
  }
  .jugador-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color 0.15s;
  }
  .jugador-item:hover { border-color: var(--border-strong); }
  .jugador-item .num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    width: 22px;
    text-align: right;
  }
  .jugador-item .name { flex: 1; font-weight: 500; }
  .jugador-item input.name-input { width: 100%; min-width: 0; }
  .jugador-item button {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
    border-radius: 4px;
  }
  .jugador-item button:hover { background: var(--card); color: var(--danger); }
  .jugador-item button.edit:hover { color: var(--primary); }

  /* CALENDARIO */
  .cal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
  }
  .month-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
  }
  .month-card h3 {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .month-cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    font-size: 10px;
  }
  .month-cal .dh {
    text-align: center;
    font-weight: 600;
    color: var(--muted);
    padding: 4px 0;
    font-size: 9px;
  }
  .month-cal .day {
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.1s;
    position: relative;
    font-weight: 500;
  }
  .month-cal .day:hover { background: var(--primary-light); border-color: var(--primary); }
  .month-cal .day.empty { background: transparent; border: none; cursor: default; }
  .month-cal .day[draggable="true"] { cursor: grab; }
  .month-cal .day[draggable="true"]:active { cursor: grabbing; }
  .month-cal .day.dragging { opacity: 0.4; transform: scale(0.95); }
  .month-cal .day.drag-over { outline: 2px dashed var(--primary); outline-offset: -2px; background: var(--primary-light) !important; }
  .month-cal .day-clear {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s, background 0.15s;
    z-index: 2;
    user-select: none;
  }
  .month-cal .day.has-type:hover .day-clear { opacity: 1; }
  .month-cal .day-clear:hover { background: var(--danger); transform: scale(1.15); }
  .month-cal .day.has-type { color: #fff; }
  .month-cal .day .num { font-size: 10px; }
  .month-cal .day .type { font-size: 8px; font-weight: 700; }
  /* v2.29: vista Mes (1 mes más grande, día a día más amplio) */
  .month-card.mes-single {
    max-width: 720px;
    margin: 0 auto;
    padding: 18px;
  }
  .month-card.mes-single h3 {
    font-size: 18px;
    text-align: left;
    padding-bottom: 10px;
  }
  .month-card.mes-single .month-cal {
    font-size: 12px;
    gap: 4px;
  }
  .month-card.mes-single .month-cal .day {
    min-height: 56px;
  }
  .month-card.mes-single .month-cal .day .num { font-size: 13px; }
  .month-card.mes-single .month-cal .day .type { font-size: 9.5px; }
  .month-card.mes-single .month-cal .dh {
    font-size: 11px;
    padding: 8px 0;
  }
  /* v2.29: microciclo en 1 fila — scroll horizontal en móvil */
  .mc-days { scrollbar-width: thin; }
  .mc-days::-webkit-scrollbar { height: 6px; }
  .mc-days::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  @media (max-width: 900px) {
    .mc-days { grid-template-columns: repeat(7, minmax(180px, 1fr)); }
  }
  @media (max-width: 768px) {
    .cal-grid { grid-template-columns: 1fr; }
    .month-card.mes-single { max-width: 100%; }
  }
  .month-summary {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .month-summary .item {
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 8px;
    color: var(--primary);
  }

  /* CARGA EXTERNA - DAY BLOCK */
  .ce-day-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
  }
  .ce-day-header {
    background: var(--primary);
    color: #fff;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .ce-day-header input {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
  }
  .ce-day-body { padding: 8px; }
  .ce-ex-row {
    display: grid;
    grid-template-columns: 2fr repeat(6, 1fr) 1fr 1fr 1fr 1fr;
    gap: 4px;
    align-items: center;
    margin-bottom: 4px;
  }
  .ce-ex-row.head {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
  }
  .ce-ex-row input { font-size: 11px; padding: 3px 5px; }
  .ce-ex-row .ce-total { font-weight: 600; color: var(--primary); }

  /* INFORME TEMPORADA */
  .informe-tabla th { font-size: 11px; }
  .informe-tabla tr.fase-row td {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding-left: 12px;
  }

  /* TOAST */
  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 13px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s, transform 0.2s;
    z-index:  100000;
  }
  .toast.show { opacity: 1; transform: translateY(0); }
  .toast.success { background: var(--accent-dark); }
  .toast.error { background: var(--danger); }

  /* MODAL */
  .modal-back {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  .modal-back.show { display: flex; }
  .modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px 30px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
  }
  .modal h3 {
    color: var(--text);
    margin-bottom: 12px;
  }
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .modal-header h3 {
    margin-bottom: 0;
  }
  .modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 8px;
    margin: -4px -4px 0 0;
    border-radius: 4px;
    font-family: inherit;
    transition: color 0.15s, background 0.15s;
  }
  .modal-close:hover {
    color: var(--primary);
    background: var(--bg-tint);
  }
    font-size: 20px;
    font-family: 'Fraunces', Georgia, serif;
  }
  .modal p { color: var(--text-soft); margin-bottom: 16px; font-size: 13.5px; line-height: 1.5; }
  .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }

  /* KPI GRID */
  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
  }

  /* ============== SUBTABS (Partidos detalle) ============== */
  .subtabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin: 12px 0 16px;
    flex-wrap: wrap;
  }
  .subtab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    color: var(--muted);
    font-weight: 500;
    transition: all 0.15s;
  }
  .subtab:hover {
    color: var(--text);
    background: rgba(0,0,0,0.02);
  }
  .subtab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
  }
  .subtab-content { display: none; }
  .subtab-content.active { display: block; }

  /* ============== ROTATION CHART ============== */
  .rotacion-chart {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    overflow-x: auto;
  }
  .rotacion-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 8px;
    min-height: 32px;
  }
  .rotacion-nombre {
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rotacion-cuartos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
  .rotacion-cuarto {
    position: relative;
    height: 26px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--muted);
  }
  .rotacion-cuarto.q1 { border-left: 2px solid #1e3a5f; }
  .rotacion-cuarto.q2 { border-left: 2px solid #10b981; }
  .rotacion-cuarto.q3 { border-left: 2px solid #f59e0b; }
  .rotacion-cuarto.q4 { border-left: 2px solid #ef4444; }
  .rotacion-cuarto.ot { border-left: 2px solid #8b5cf6; }
  .rotacion-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.3s;
  }
  .rotacion-cuarto.played {
    color: white;
    font-weight: 600;
  }
  .rotacion-cuarto.full { background: var(--primary); color: white; }
  .rotacion-cuarto .rotacion-min {
    position: relative;
    z-index: 1;
    font-weight: 600;
  }
  .rotacion-header {
    font-weight: 600;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
  }
  .quinteto-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 28px;
  }
  .quinteto-chip {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
  }
  .quinteto-chip:hover { border-color: var(--primary); }
  .quinteto-chip.add { background: #10b981; color: white; }
  .quinteto-chip.empty { background: rgba(0,0,0,0.05); color: var(--muted); font-style: italic; }

  /* ============== LIVE MODE ============== */
  .live-marcador {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    background: var(--secondary);
    color: #f4f1ea;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 12px;
  }
  .live-equipo {
    text-align: center;
  }
  .live-equipo-nombre {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 4px;
  }
  .live-equipo-puntos {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .live-tiempo {
    text-align: center;
    border-left: 1px solid rgba(255,255,255,0.2);
    border-right: 1px solid rgba(255,255,255,0.2);
    padding: 0 12px;
  }
  .live-cuarto-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 4px;
  }
  .live-cronometro {
    font-size: 38px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
  }
  .live-cronometro.warning { color: #fbbf24; }
  .live-cronometro.critical { color: #ef4444; animation: pulse 0.5s infinite; }
  @keyframes pulse { 50% { opacity: 0.5; } }
  .live-controles {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .live-controles .btn { padding: 4px 10px; font-size: 12px; }

  .live-jugadores {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
  }
  .live-jugador {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
  }
  .live-jugador:hover { border-color: var(--primary); }
  .live-jugador.en-pista {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  }
  .live-jugador.en-pista .live-jugador-num { background: rgba(255,255,255,0.25); color: white; }
  .live-jugador-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
  }
  .live-jugador-nombre {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .live-jugador-tiempo {
    font-size: 11px;
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
  }
  .live-jugador.faltas-5 { border-color: #ef4444; border-style: dashed; }
  .live-jugador.lesionado { opacity: 0.4; cursor: not-allowed; }

  /* Control de faltas en live mode */
  .live-faltas-control {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    padding: 1px 2px;
    margin: 0 4px;
  }
  .live-jugador.en-pista .live-faltas-control {
    background: rgba(255, 255, 255, 0.95);
  }
  .live-falta-btn {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-soft);
    border-radius: 2px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', sans-serif;
  }
  .live-falta-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  .live-falta-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }
  .live-falta-count {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
  }
  .live-falta-count.ft-aviso { color: var(--warn); }
  .live-falta-count.ft-critico { color: var(--danger); animation: live-falta-pulse 1.5s infinite; }
  .live-falta-count.ft-descalificado { color: white; background: var(--danger); border-radius: 3px; padding: 0 4px; }
  @keyframes live-falta-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
  }
  .live-faltas-tag {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1px 4px;
    border-radius: 2px;
    text-transform: uppercase;
  }
  .live-jugador.ft-aviso .live-faltas-tag { background: var(--warn-soft); color: var(--warn); }
  .live-jugador.ft-critico .live-faltas-tag { background: var(--danger-soft); color: var(--danger); }
  .live-jugador.ft-descalificado .live-faltas-tag { background: var(--danger); color: white; }
  .live-jugador.ft-aviso { border-color: var(--warn); }
  .live-jugador.ft-critico { border-color: var(--danger); border-style: dashed; }
  .live-jugador.ft-descalificado { border-color: var(--danger); border-style: solid; box-shadow: 0 0 0 2px var(--danger-soft); }

  /* Editor de faltas en la tabla del partido */
  .faltas-editor {
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }
  .falta-btn {
    width: 22px;
    height: 22px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-soft);
    border-radius: 2px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', sans-serif;
  }
  .falta-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  .falta-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }
  .falta-count {
    min-width: 26px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    padding: 0 4px;
  }
  .falta-count.ft-aviso { color: var(--warn); }
  .falta-count.ft-critico { color: var(--danger); animation: live-falta-pulse 1.5s infinite; }
  .falta-count.ft-descalificado { color: white; background: var(--danger); border-radius: 3px; }

  /* Panel de Foul Trouble */
  .foul-trouble-panel {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--warn);
    border-radius: 4px;
  }
  .foul-trouble-head {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .foul-trouble-title {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
  }
  .foul-trouble-sub {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 2px;
  }
  .foul-trouble-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .foul-trouble-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tint);
    border-radius: 3px;
    border-left: 3px solid var(--border-strong);
  }
  .foul-trouble-item.ft-aviso { border-left-color: var(--warn); }
  .foul-trouble-item.ft-critico { border-left-color: var(--danger); background: var(--danger-soft); }
  .foul-trouble-item.ft-descalificado { border-left-color: var(--danger); background: var(--danger); color: white; }
  .ft-jugador {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .ft-jugador strong {
    font-size: 13px;
    color: var(--text);
  }
  .foul-trouble-item.ft-critico .ft-jugador strong,
  .foul-trouble-item.ft-descalificado .ft-jugador strong {
    color: var(--danger);
  }
  .foul-trouble-item.ft-descalificado .ft-jugador strong {
    color: white;
  }
  .ft-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-soft);
  }
  .foul-trouble-item.ft-critico .ft-tag { color: var(--danger); }
  .foul-trouble-item.ft-descalificado .ft-tag { color: rgba(255, 255, 255, 0.85); }
  .ft-faltas {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .foul-trouble-item.ft-aviso .ft-faltas { color: var(--warn); }
  .foul-trouble-item.ft-critico .ft-faltas { color: var(--danger); }
  .foul-trouble-item.ft-descalificado .ft-faltas { color: white; }

  /* Badge de foul trouble en stint-block */
  .ft-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 2px;
  }
  .ft-badge.ft-aviso { background: var(--warn-soft); color: var(--warn); }
  .ft-badge.ft-critico { background: var(--danger-soft); color: var(--danger); }
  .ft-badge.ft-descalificado { background: var(--danger); color: white; }

  .pos-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
  }
  .estado-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
  }
  .estado-tag.lesionado { background: #fee2e2; color: #dc2626; }
  .text-success { color: #10b981; }
  .text-muted { color: var(--muted); }
  .muted { color: var(--muted); font-size: 12px; }


  /* v13 — control de minutaje y faltas en Rotación */
  .rot-live-control-card { overflow: hidden; }
  .rot-live-control-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:12px; }
  .rot-control-jugadores { display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:8px; }
  .rot-control-player { border:1px solid var(--border); border-radius:12px; padding:10px; background:var(--surface); transition:.15s; }
  .rot-control-player.active { border-color:var(--accent); box-shadow:0 0 0 2px rgba(16,185,129,.10); background:rgba(16,185,129,.035); }
  .rot-control-player .r-name { font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .rot-control-player .r-times { display:grid; grid-template-columns:1fr 1fr; gap:5px; margin:8px 0; }
  .rot-time-box { background:var(--bg); border-radius:8px; padding:6px; }
  .rot-time-box .label { display:block; font-size:9px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
  .rot-time-box strong { font-size:16px; }
  .rot-foul-row { display:flex; align-items:center; justify-content:space-between; gap:5px; margin-top:5px; }
  .rot-foul-btn { width:28px; height:28px; border:1px solid var(--border); background:var(--surface); border-radius:7px; font-weight:900; cursor:pointer; }
  .rot-foul-btn:hover:not(:disabled) { border-color:var(--accent); color:var(--accent); }
  .rot-foul-btn:disabled { opacity:.35; cursor:not-allowed; }
  .rot-foul-count { min-width:38px; text-align:center; font-weight:900; padding:4px 7px; border-radius:7px; background:var(--bg); }
  .rot-foul-count.warn { background:#fef3c7; color:#b45309; }
  .rot-foul-count.danger { background:#fee2e2; color:#b91c1c; }
  .rot-team-fouls { display:flex; gap:8px; flex-wrap:wrap; }
  .rot-team-foul-box { min-width:105px; border:1px solid var(--border); border-radius:10px; padding:6px 8px; background:var(--bg); }
  .rot-team-foul-box .team-label { font-size:9px; color:var(--muted); text-transform:uppercase; font-weight:800; }
  .rot-team-foul-box .team-value { display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:18px; font-weight:900; }
  .rot-team-foul-box button { width:23px; height:23px; border:1px solid var(--border); background:var(--surface); border-radius:6px; cursor:pointer; font-weight:900; }
  .rot-team-foul-box.rival .team-value { color:#b91c1c; }
  @media (max-width: 1050px) { .rot-control-jugadores { grid-template-columns:repeat(3,minmax(150px,1fr)); } }
  @media (max-width: 700px) { .rot-live-control-head { flex-direction:column; } .rot-control-jugadores { grid-template-columns:repeat(2,minmax(140px,1fr)); } }

  .live-running .live-jugador.en-pista { animation: live-pulse 2s infinite; }
  @keyframes live-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 2px 12px rgba(16, 185, 129, 0.6); }
  }

  /* ============== STINTS POR CUARTO (chips en celdas) ============== */
  .cuartos-stints {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    min-height: 28px;
  }
  .stint-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 6px 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    line-height: 1.2;
  }
  .stint-chip:hover { border-color: var(--primary); background: #dbeafe; }
  .stint-chip .stint-dur {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 2px;
  }
  .stint-chip .stint-del {
    background: rgba(239,68,68,0.15);
    color: #dc2626;
    border: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
  }
  .stint-chip .stint-del:hover { background: #ef4444; color: white; }
  .btn-stint-add {
    background: transparent;
    border: 1.5px dashed var(--muted);
    color: var(--muted);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }
  .btn-stint-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

  /* ============== ESTADO PARTIDO BADGES ============== */
  .badge-estado {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 2px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .badge-estado.planificado { background: var(--bg-tint); color: var(--text-soft); border: 1px solid var(--border-strong); }
  .badge-estado.en_curso { background: var(--danger-soft); color: var(--danger); }
  .badge-estado.finalizado { background: var(--accent-soft); color: var(--accent); }
  .badge-estado.papelera { background: var(--bg-tint); color: var(--muted); text-decoration: line-through; }

  /* ============== STINTS ============== */
  .stint-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
  }
  .stint-lineup {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    margin: 6px 0;
  }
  .stint-jugador {
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
  }
  .stint-pm.pos { color: #10b981; font-weight: 700; }
  .stint-pm.neg { color: #ef4444; font-weight: 700; }
  .stint-pm.neu { color: var(--muted); }

  /* ============== ANALISIS ============== */
  .insight-card {
    background: var(--card);
    border-left: 4px solid var(--primary);
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
  }
  .insight-card.warn { border-left-color: var(--warn); background: #fef3c7; }
  .insight-card.danger { border-left-color: var(--danger); background: #fee2e2; }
  .insight-card.success { border-left-color: var(--accent); background: #d1fae5; }
  .insight-card.info { border-left-color: #3b82f6; background: #dbeafe; }
  .insight-card .insight-title {
    font-weight: 600;
    margin-bottom: 2px;
  }
  .insight-card .insight-detail {
    color: var(--muted);
    font-size: 12px;
  }

  .rotation-health-bar {
    width: 100%;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 6px 0;
  }
  .rotation-health-bar .fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 700;
  }
  .rotation-health-bar .fill.green { background: linear-gradient(90deg, #10b981, #059669); }
  .rotation-health-bar .fill.amber { background: linear-gradient(90deg, #f59e0b, #d97706); }
  .rotation-health-bar .fill.red { background: linear-gradient(90deg, #ef4444, #dc2626); }

  .lineup-rank {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 13px;
  }
  .lineup-rank .rank-num { font-weight: 700; color: var(--muted); min-width: 18px; }
  .lineup-rank .lineup-players { flex: 1; }
  .lineup-rank .lineup-min { color: var(--muted); font-size: 11px; margin-right: 6px; }
  .lineup-rank .lineup-pm { font-weight: 700; min-width: 50px; text-align: right; }

  /* ============== INFORME ============== */
  .informe-preview {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    font-family: Georgia, serif;
    color: #1f2937;
  }
  .informe-preview h1 { font-size: 24px; margin: 0 0 6px; color: var(--primary); }
  .informe-preview h2 { font-size: 16px; margin: 16px 0 6px; border-bottom: 1px solid #e5e7eb; padding-bottom: 4px; }
  .informe-preview h3 { font-size: 13px; margin: 10px 0 4px; color: #4b5563; }
  .informe-preview table { width: 100%; border-collapse: collapse; margin: 8px 0; font-family: -apple-system, sans-serif; font-size: 12px; }
  .informe-preview th, .informe-preview td { padding: 4px 6px; border-bottom: 1px solid #e5e7eb; text-align: left; }
  .informe-preview th { background: #f9fafb; font-weight: 600; }
  .informe-preview .marcador-grande { font-size: 32px; font-weight: 700; text-align: center; margin: 16px 0; }
  .informe-preview .kpis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
  .informe-preview .kpi-print { background: #f9fafb; border-radius: 6px; padding: 8px; text-align: center; }
  .informe-preview .kpi-print .label { font-size: 10px; color: #6b7280; text-transform: uppercase; }
  .informe-preview .kpi-print .value { font-size: 18px; font-weight: 700; color: #1f2937; }

  @media print {
    /* Simplificado: la nueva ventana de impresión en imprimirInformePartido() hace el trabajo */
    body { background: #fff; }
    @page { size: A4; margin: 12mm 10mm; }
  }

  /* Schedule card */
  .schedule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
  }
  .schedule-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
  }
  .schedule-item:hover {
    border-color: var(--text);
    background: var(--bg-tint);
  }
  .schedule-item .fecha { font-weight: 600; min-width: 80px; color: var(--text); }
  .schedule-item .hora { color: var(--muted); min-width: 60px; }
  .schedule-item .rival { flex: 1; font-weight: 500; }
  .schedule-item .comp { color: var(--muted); font-size: 12px; }

  .kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
  }
  .kpi::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
  }
  .kpi.accent::before { background: var(--accent); }
  .kpi.warn::before { background: var(--warn); }
  .kpi.danger::before { background: var(--danger); }
  .kpi .label {
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 8px;
  }
  .kpi .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    font-family: 'Manrope', -apple-system, sans-serif;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
  }
  .kpi.accent .value { color: var(--accent); }
  .kpi.warn .value { color: var(--warn); }
  .kpi.danger .value { color: var(--danger); }
  .kpi .sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
  }

  /* SUB-TABS (dentro de un panel) */
  .btn[data-rtab].active,
  .btn[data-wtab].active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }


  /* ===== Perfil de usuario ===== */
  .profile-modal{max-width:760px!important;padding:0!important;overflow:hidden}
  .profile-modal-head,.wellness-modal-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding:22px 24px 18px;border-bottom:1px solid var(--border)}
  .profile-modal-head h3,.wellness-modal-head h3{margin:3px 0 4px;font-family:'Fraunces',Georgia,serif;font-size:25px}
  .profile-modal-head p,.wellness-modal-head p{margin:0;color:var(--muted);font-size:13px;max-width:560px}
  .eyebrow{font-size:10px;font-weight:800;letter-spacing:.11em;color:var(--accent);text-transform:uppercase}
  .profile-layout{display:grid;grid-template-columns:180px 1fr;gap:26px;padding:24px}
  .profile-photo-panel{display:flex;align-items:center;flex-direction:column;gap:9px;padding:8px 0}
  .profile-photo-preview{width:112px;height:112px;border-radius:50%;background:var(--primary-light);border:1px solid var(--border);display:grid;place-items:center;overflow:hidden;font-size:30px;font-weight:800;color:var(--accent);box-shadow:0 4px 14px rgba(0,0,0,.06)}
  .profile-photo-preview img{width:100%;height:100%;object-fit:cover}
  .tiny{font-size:10px;text-align:center}
  .btn-ghost{border-color:transparent!important;background:transparent!important}
  .profile-section-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:12px}
  .subscription-card{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:16px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(135deg,rgba(139,20,40,.045),rgba(30,58,95,.035));margin-bottom:8px}
  .subscription-card-main{min-width:0}
  .subscription-card-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--primary);margin-bottom:4px}
  .subscription-card-badge:before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block}
  .subscription-card-title{font-size:16px;font-weight:800;color:var(--text);margin-bottom:3px}
  .subscription-card-meta{font-size:12px;color:var(--muted);line-height:1.45}
  .subscription-card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;flex-shrink:0}
  .subscription-card-actions .btn-danger{border-color:rgba(176,32,52,.28);color:#b02034}
  .subscription-card-note{display:block;margin:-2px 0 18px}
  @media(max-width:640px){.subscription-card{align-items:flex-start;flex-direction:column}.subscription-card-actions{width:100%;justify-content:flex-start}.subscription-card-actions .btn{flex:1}}
  .profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
  .form-field{display:flex;flex-direction:column;gap:6px}.form-field label{font-size:11px;font-weight:700;color:var(--muted)}.form-field input,.form-field select{width:100%;box-sizing:border-box}
  .profile-actions{padding:14px 24px 20px;border-top:1px solid var(--border);margin-top:0}
  /* ===== Wellness moderno ===== */
  .wellness-modal{max-width:820px!important;max-height:92vh;overflow:auto;padding:0!important}
  .wellness-modal-head{padding-bottom:16px}
  .wellness-modal .wellness-escala-legend{margin:16px 24px 18px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--card-alt);display:grid;grid-template-columns:auto 1fr 150px 1fr auto;align-items:center;gap:10px}
  .wellness-modal .legend-gradient{height:7px;border-radius:99px;background:linear-gradient(90deg,#4f6b3a,#d4a017,#8b1428)}
  .wellness-meta-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:12px;padding:0 24px 16px}
  .wellness-hooper-preview{margin:0 24px 16px;padding:11px 14px;border:1px solid var(--border);border-radius:10px;background:var(--card-alt);display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:12px}
  .wellness-hooper-preview span{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:800}.wellness-hooper-preview strong{font-size:17px}.wellness-hooper-preview small{font-size:11px;color:var(--muted)}
  @media(max-width:700px){.wellness-hooper-preview{margin-left:14px;margin-right:14px;grid-template-columns:1fr auto}.wellness-hooper-preview small{grid-column:1/-1}}

  .wellness-question{margin:0 24px 12px;padding:15px 16px 14px;border:1px solid var(--border);border-radius:12px;background:var(--card-alt);box-shadow:0 1px 0 rgba(0,0,0,.02)}
  .wellness-question-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}.wellness-question-title h4{margin:0;font-size:14px}.badge-meaning{font-size:11px;padding:4px 8px;border-radius:6px;background:var(--primary-light);color:var(--accent);font-weight:700}
  .wellness-question .scale-ends{display:flex;justify-content:space-between;font-size:10px;margin-bottom:8px}.wellness-scale{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.wellness-scale button{height:38px;background:var(--card);border:1px solid var(--border);border-bottom-width:3px;border-radius:7px;font-weight:700;cursor:pointer;transition:.15s}.wellness-scale button:hover{transform:translateY(-1px)}.wellness-scale button.selected{color:#fff;transform:none}
  .wellness-notes{display:flex;flex-direction:column;gap:6px;padding:2px 24px 18px}.wellness-notes label{font-size:11px;font-weight:700;color:var(--muted)}.wellness-notes label span{font-weight:400}.wellness-notes input{width:100%;box-sizing:border-box}
  .wellness-modal .modal-actions{padding:14px 24px 20px;border-top:1px solid var(--border);margin-top:0}
  @media(max-width:700px){.profile-layout{grid-template-columns:1fr}.profile-grid{grid-template-columns:1fr}.wellness-modal .wellness-escala-legend{grid-template-columns:1fr}.wellness-meta-grid{grid-template-columns:1fr}.wellness-question{margin-left:14px;margin-right:14px}.wellness-modal-head{padding:18px}.wellness-modal .wellness-escala-legend,.wellness-meta-grid,.wellness-notes{margin-left:0;margin-right:0;padding-left:14px;padding-right:14px}.wellness-scale{gap:3px}.wellness-scale button{height:36px}}

  /* WELLNESS MASIVO - inputs en grid */
  .wellness-row {
    display: grid;
    grid-template-columns: 180px repeat(4, 1fr) 1fr;
    gap: 6px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
  }
  .wellness-row:last-child { border-bottom: none; }
  .wellness-row label { font-weight: 500; }
  .wellness-row input { width: 100%; }
  .wellness-row .jugador-nombre { font-weight: 500; padding-left: 8px; }

  /* ESCALA WELLNESS (visual, clara) */
  .wellness-escala-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tint);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 12px;
  }
  .wellness-escala-legend .legend-label {
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10.5px;
  }
  .wellness-escala-legend .legend-gradient {
    flex: 1;
    margin: 0 14px;
    height: 10px;
    border-radius: 2px;
    background: linear-gradient(to right, #4f6b3a 0%, #82a55c 25%, #d4a017 55%, #c45635 80%, #8b1428 100%);
  }
  .wellness-escala-legend .legend-ends {
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 500;
  }
  .wellness-question {
    margin-bottom: 22px;
  }
  .wellness-question-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
  }
  .wellness-question-title h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
  }
  .wellness-question-title .badge-meaning {
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 2px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .wellness-question-title .badge-meaning.bad {
    background: var(--danger-soft);
    color: var(--danger);
  }
  .wellness-question .scale-ends {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-soft);
    margin-bottom: 6px;
  }
  .wellness-question .scale-ends .end-low { color: var(--danger); font-weight: 500; }
  .wellness-question .scale-ends .end-high { color: var(--accent); font-weight: 500; }
  .wellness-scale {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }
  .wellness-scale button {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-soft);
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
    transition: transform 0.1s, border-color 0.15s;
  }
  .wellness-scale button:hover {
    border-color: var(--text);
    transform: translateY(-1px);
  }
  .wellness-scale button[data-value="1"] { border-bottom: 3px solid #4f6b3a; }
  .wellness-scale button[data-value="2"] { border-bottom: 3px solid #6e7f48; }
  .wellness-scale button[data-value="3"] { border-bottom: 3px solid #9a9a50; }
  .wellness-scale button[data-value="4"] { border-bottom: 3px solid #d4a017; }
  .wellness-scale button[data-value="5"] { border-bottom: 3px solid #c45635; }
  .wellness-scale button[data-value="6"] { border-bottom: 3px solid #b04028; }
  .wellness-scale button[data-value="7"] { border-bottom: 3px solid #8b1428; }
  .wellness-scale button[data-value="1"].selected { background: #4f6b3a; border-color: #4f6b3a; }
  .wellness-scale button[data-value="2"].selected { background: #6e7f48; border-color: #6e7f48; }
  .wellness-scale button[data-value="3"].selected { background: #9a9a50; border-color: #9a9a50; }
  .wellness-scale button[data-value="4"].selected { background: #d4a017; border-color: #d4a017; }
  .wellness-scale button[data-value="5"].selected { background: #c45635; border-color: #c45635; }
  .wellness-scale button[data-value="6"].selected { background: #b04028; border-color: #b04028; }
  .wellness-scale button[data-value="7"].selected { background: #8b1428; border-color: #8b1428; }

  /* Mini escalas en grid masivo */
  .wellness-mini-scale {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .wellness-mini-scale button {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-soft);
    padding: 6px 0;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
  }
  .wellness-mini-scale button[data-value="1"].selected,
  .wellness-mini-scale button[data-value="2"].selected,
  .wellness-mini-scale button[data-value="3"].selected { background: #b04028; color: #fdfaf3; border-color: #b04028; }
  .wellness-mini-scale button[data-value="4"].selected,
  .wellness-mini-scale button[data-value="5"].selected { background: #d4a017; color: #fdfaf3; border-color: #d4a017; }
  .wellness-mini-scale button[data-value="6"].selected,
  .wellness-mini-scale button[data-value="7"].selected { background: #c8a020; color: #fdfaf3; border-color: #c8a020; }

  /* Tabla wellness: celdas con color de fondo segun valor */
  .wellness-cell {
    display: inline-block;
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 12px;
  }
  .wellness-cell[data-color="1"] { background: #4f6b3a; color: #fdfaf3; }
  .wellness-cell[data-color="2"] { background: #6e7f48; color: #fdfaf3; }
  .wellness-cell[data-color="3"] { background: #9a9a50; color: #fdfaf3; }
  .wellness-cell[data-color="4"] { background: #d4a017; color: #fdfaf3; }
  .wellness-cell[data-color="5"] { background: #c45635; color: #fdfaf3; }
  .wellness-cell[data-color="6"] { background: #b04028; color: #fdfaf3; }
  .wellness-cell[data-color="7"] { background: #8b1428; color: #fdfaf3; }

  /* FORM ROW (genético) */
  .form-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* ESTADO jugador */
  .estado-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
  }
  .estado-tag.disponible { background: #d1fae5; color: #065f46; }
  .estado-tag.duda { background: #fef3c7; color: #92400e; }
  .estado-tag.lesionado { background: #fee2e2; color: #991b1b; }
  .estado-tag.baja { background: #f3f4f6; color: #6b7280; }

  /* POSICIÓN jugador */
  .pos-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
  }

  /* SEMÁFORO READINESS */
  .semaforo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
  }
  .semaforo .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }
  .semaforo.ok { background: var(--accent-soft); color: var(--accent); }
  .semaforo.ok .dot { background: var(--accent); }
  .semaforo.warn { background: var(--warn-soft); color: var(--warn); }
  .semaforo.warn .dot { background: var(--warn); }
  .semaforo.danger { background: var(--danger-soft); color: var(--danger); }
  .semaforo.danger .dot { background: var(--danger); }
  .semaforo.none { background: var(--bg-tint); color: var(--muted); }
  .semaforo.none .dot { background: var(--border-strong); }

  /* ACWR badges - severidad */
  .acwr-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
  }
  .acwr-badge.acwr-optimo { background: var(--accent-soft); color: var(--accent); }
  .acwr-badge.acwr-bajo { background: var(--bg-tint); color: var(--muted); }
  .acwr-badge.acwr-extremo-bajo { background: var(--bg-tint); color: var(--muted); border: 1px dashed var(--muted); }
  .acwr-badge.acwr-riesgo { background: var(--warn-soft); color: var(--warn); }
  .acwr-badge.acwr-alto { background: var(--danger-soft); color: var(--danger); }
  .acwr-badge.acwr-extremo { background: var(--danger); color: white; }

  /* Panel de alertas ACWR */
  .alertas-panel {
    margin: 16px 0;
    padding: 16px 20px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card);
  }
  .alertas-panel.alertas-ok {
    border-color: var(--accent);
    background: var(--accent-soft);
  }
  .alertas-panel.alertas-warn {
    border-color: var(--warn);
    background: var(--warn-soft);
  }
  .alertas-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
  }
  .alertas-title {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
  }
  .alertas-sub {
    font-size: 12px;
    color: var(--text-soft);
  }
  .alertas-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
  }
  .alerta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--card);
    border-radius: 3px;
    border-left: 3px solid var(--border-strong);
  }
  .alerta-item.alerta-acwr-optimo { border-left-color: var(--accent); }
  .alerta-item.alerta-acwr-bajo { border-left-color: var(--muted); }
  .alerta-item.alerta-acwr-extremo-bajo { border-left-color: var(--muted); }
  .alerta-item.alerta-acwr-riesgo { border-left-color: var(--warn); }
  .alerta-item.alerta-acwr-alto { border-left-color: var(--danger); }
  .alerta-item.alerta-acwr-extremo { border-left-color: var(--danger); background: var(--danger-soft); }
  .alerta-icono {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-tint);
    color: var(--text-soft);
    flex-shrink: 0;
  }
  .alerta-item.alerta-acwr-optimo .alerta-icono { background: var(--accent); color: white; }
  .alerta-item.alerta-acwr-riesgo .alerta-icono { background: var(--warn); color: white; }
  .alerta-item.alerta-acwr-alto .alerta-icono,
  .alerta-item.alerta-acwr-extremo .alerta-icono { background: var(--danger); color: white; }
  .alerta-info { flex: 1; min-width: 0; }
  .alerta-nombre {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
  }
  .alerta-valor {
    font-size: 11px;
    color: var(--text-soft);
    margin-top: 2px;
  }
  .alerta-etiqueta {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 2px;
    font-weight: 600;
  }
  .alerta-item.alerta-acwr-optimo .alerta-etiqueta { background: var(--accent-soft); color: var(--accent); }
  .alerta-item.alerta-acwr-riesgo .alerta-etiqueta { background: var(--warn-soft); color: var(--warn); }
  .alerta-item.alerta-acwr-alto .alerta-etiqueta,
  .alerta-item.alerta-acwr-extremo .alerta-etiqueta { background: var(--danger-soft); color: var(--danger); }
  .alerta-accion {
    font-size: 11px;
    color: var(--muted);
    text-align: right;
  }
  .alerta-tip {
    font-style: italic;
  }

  /* RESTQ-Sport */
  .restq-dim {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-tint);
    border-radius: 3px;
  }
  .restq-dim-label {
    font-family: 'Fraunces', serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
  }
  .restq-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
  }
  .restq-item:last-child { border-bottom: none; }
  .restq-texto {
    flex: 1;
    font-size: 13px;
    color: var(--text);
  }
  .restq-escala {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
  }
  .restq-escala button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-soft);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .restq-escala button:hover {
    background: var(--bg-tint);
    border-color: var(--border-strong);
  }
  .restq-escala button.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  /* Quintetos */
  .quintetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
  }
  .quinteto-card {
    background: var(--bg-tint);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 10px 12px;
    position: relative;
  }
  .quinteto-rank {
    position: absolute;
    top: 8px;
    right: 10px;
    font-family: 'Fraunces', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
  }
  .quinteto-jugadores {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 8px;
    padding-right: 30px;
  }
  .quinteto-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--text-soft);
  }
  .quinteto-stats strong {
    color: var(--text);
    font-size: 13px;
  }

  /* Microcycle inteligente */
  .microcycle-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .microcycle-partido {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  .microcycle-partido:last-child { border-bottom: none; }
  .microcycle-titulo {
    font-family: 'Fraunces', serif;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
  }
  .microcycle-dias {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
  }
  .microcycle-dia {
    padding: 8px 10px;
    border-radius: 3px;
    border-left: 3px solid var(--border-strong);
    background: var(--bg-tint);
  }
  .microcycle-alerta { border-left-color: var(--danger); background: var(--danger-soft); }
  .microcycle-pre { border-left-color: var(--accent); }
  .microcycle-partido { border-left-color: var(--primary); background: var(--primary-soft); }
  .microcycle-post { border-left-color: var(--warn); }
  .microcycle-b2b { border-left-color: var(--danger); }
  .microcycle-fecha {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 2px;
  }
  .microcycle-tipo {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 4px;
  }
  .microcycle-texto {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
  }
  .microcycle-detalle {
    font-size: 11px;
    margin-top: 2px;
  }

  /* GRID 2 columns */
  .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }
  @media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
  }
  .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
  .row > * { flex: 0 0 auto; }
  .spacer { flex: 1; }
  .text-muted { color: var(--muted); font-size: 12px; }
  .text-warn { color: var(--warn); }
  .text-danger { color: var(--danger); }
  .text-success { color: var(--accent-dark); }
  .small { font-size: 11px; }
  .mt-1 { margin-top: 8px; }
  .mt-2 { margin-top: 16px; }
  .mt-3 { margin-top: 24px; }
  .mb-1 { margin-bottom: 8px; }
  .mb-2 { margin-bottom: 16px; }
  .help-block {
    background: var(--gold-soft);
    border-left: 3px solid var(--gold);
    color: var(--text-soft);
    padding: 12px 16px;
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  /* v2.4: CARGAS — MODO TOGGLE */
  .cargas-mode-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    padding: 4px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: fit-content;
  }
  /* v2.6: PLANIFICACIÓN — Selector de tipo activo (pills grandes) */
  .plan-tipo-selector {
    margin-bottom: 12px;
  }
  .pts-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
  }
  .pts-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }
  .pts-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    color: var(--text-soft);
    cursor: pointer;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.12s;
  }
  .pts-pill:hover { border-color: var(--c, var(--primary)); color: var(--text); }
  /* v2.9 — Pill activa: fill suave con color del tipo, check sutil, sin halo rojo */
  .pts-pill.active {
    background: color-mix(in srgb, var(--c, var(--primary)) 12%, var(--card));
    border-color: var(--c, var(--primary));
    color: var(--text);
    font-weight: 700;
  }
  .pts-pill.active .pts-name { color: var(--text); }
  .pts-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: transparent;
    border: 1.5px solid var(--border);
    color: transparent;
    flex-shrink: 0;
  }
  .pts-pill.active .pts-check {
    background: var(--c, var(--primary));
    border-color: var(--c, var(--primary));
    color: white;
  }
  .pts-pill-none .pts-check { background: var(--muted); }
  .pts-pill-none { --c: var(--muted); }
  .pts-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
    flex-shrink: 0;
  }
  .pts-pill-none .pts-dot { display: none; }

  /* v2.8: Quick actions (Rápido + Semanas tipo) eliminados — CSS muerto limpiado */

  /* v2.11 — Modo Partido MÓVIL: cancha + banquillo (mobile-first) */
  #subtab-partido { padding: 0; }
  #subtab-partido .partido-mobile-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding: 8px;
    box-sizing: border-box;
  }
  /* v2.11: en mobile, el card del detalle no debe tener padding ni radius (a sangre) */
  @media (max-width: 768px) {
    #app-shell {
      grid-template-columns: 1fr;
      grid-template-areas:
        "header"
        "main";
    }
    #app-shell > aside.sidebar {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 280px;
      max-width: 80vw;
      z-index: 200;
      transform: translateX(-100%);
      transition: transform 0.22s ease;
      box-shadow: 4px 0 20px rgba(0,0,0,0.35);
    }
    #app-shell.sidebar-open > aside.sidebar {
      transform: translateX(0);
    }
    #app-shell.sidebar-open::after {
      content: "";
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 199;
    }
    #app-shell > main {
      padding: 10px 10px 80px;
    }
    .card {
      padding: 12px;
      margin-bottom: 12px;
    }
    /* partido subtab: full width sin padding del card */
    #partido-detalle-card {
      padding: 0 !important;
      border-radius: 0 !important;
      border-left: none !important;
      border-right: none !important;
      margin-left: -10px;
      margin-right: -10px;
    }
    #subtab-partido .partido-mobile-wrap {
      padding: 6px;
    }
    /* botones header en mobile más compactos */
    .header-actions { gap: 4px; }
    .header-actions button { padding: 6px 8px; font-size: 11.5px; }
    /* subtabs scroll horizontal si no caben */
    .subtabs {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      flex-wrap: nowrap;
    }
    .subtab { flex-shrink: 0; white-space: nowrap; }
    /* botón hamburguesa visible solo en mobile */
    #sidebar-toggle { display: inline-flex !important; align-items: center; }
  }
  .pm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 10px;
    flex-wrap: wrap;
  }
  .pm-header-rival-block { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .pm-header-eq { display: flex; align-items: center; gap: 4px; font-size: 11.5px; }
  .pm-header-eq strong { color: var(--text); font-weight: 700; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pm-header-eq-local { color: var(--text); }
  .pm-header-eq-visit { color: var(--text-soft); }
  .pm-header-eq-label { font-size: 12px; }
  .pm-header-marcador {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
  }
  .pm-header-pts { font-size: 20px; font-weight: 900; min-width: 24px; text-align: center; }
  .pm-header-pts-sep { font-size: 16px; opacity: 0.7; }
  .pm-header-info-block { display: flex; align-items: center; gap: 8px; }
  .pm-header-faltas {
    display: flex; align-items: center; gap: 4px;
    background: rgba(245,158,11,0.15);
    color: #b45309;
    padding: 5px 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
  }
  .pm-header-faltas-label { font-size: 9.5px; font-weight: 800; background: #b45309; color: #fff; padding: 1px 5px; border-radius: 3px; }
  .pm-header-falta-btn {
    background: var(--warn);
    color: #fff;
    border: none;
    padding: 5px 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11.5px;
    cursor: pointer;
    font-family: inherit;
  }
  .pm-header-reset-btn {
    background: var(--card-alt);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 5px 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11.5px;
    cursor: pointer;
    font-family: inherit;
  }
  .pm-header-reset-btn:hover { background: var(--card); color: var(--text); border-color: var(--primary); }
  .pm-header-falta-btn:hover { background: #b45309; }

  /* v2.42: Part Id partido — vista práctica 1 pantalla (sin pista) */
  .pm-howto {
    background: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(59,130,246,0.04));
    border: 1px solid rgba(59,130,246,0.25);
    border-left: 3px solid #3b82f6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--text-soft);
    margin-bottom: 10px;
  }
  .pm-howto strong { color: var(--text); }
  .pm-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .pm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .pm-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
  }
  .pm-section-count {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(184,28,44,0.08);
    padding: 2px 8px;
    border-radius: 10px;
  }

  /* Lista de jugadores en cancha (5 max, tarjetas grandes) */
  .pm-cancha-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 6px;
  }
  .pm-cancha-card {
    display: grid;
    grid-template-columns: 44px 1fr 36px 90px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--card-alt);
    border: 1.5px solid var(--primary);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    min-height: 60px;
  }
  .pm-cancha-card.is-fouled { border-color: #f59e0b; border-left-color: #f59e0b; background: rgba(245,158,11,0.08); }
  .pm-cancha-card.is-fouled-out { border-color: #dc2626; border-left-color: #dc2626; background: rgba(220,38,38,0.08); }
  .pm-cancha-dorsal {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 15px;
    flex-shrink: 0;
  }
  .pm-cancha-info { flex: 1; min-width: 0; }
  .pm-cancha-nombre {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pm-cancha-meta {
    font-size: 10.5px;
    color: var(--muted);
    margin-top: 2px;
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .pm-cancha-pos {
    font-size: 9.5px;
    background: var(--card);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
  }
  .pm-cancha-min { font-weight: 700; color: var(--primary); }
  .pm-cancha-faltas {
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 8px;
  }
  .pm-cancha-faltas.ok { background: rgba(16,185,129,0.15); color: #047857; }
  .pm-cancha-faltas.warn { background: rgba(245,158,11,0.18); color: #b45309; }
  .pm-cancha-faltas.danger { background: #dc2626; color: white; }
  .pm-cancha-sacar {
    background: white;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    min-height: 36px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .pm-cancha-sacar:hover { background: var(--primary); color: white; }
  .pm-cancha-sacar:active { transform: scale(0.97); }
  /* v2.43: acciones agrupadas (sacar + tiempo) */
  .pm-cancha-actions, .pm-bench-actions {
    display: flex;
    gap: 4px;
    align-items: stretch;
  }
  .pm-cambio-tiempo-btn {
    background: var(--card-alt);
    color: var(--text-soft);
    border: 1.5px solid var(--border);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    min-height: 36px;
    min-width: 36px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .pm-cambio-tiempo-btn:hover { background: var(--card); color: var(--primary); border-color: var(--primary); }
  .pm-cambio-tiempo-btn:active { transform: scale(0.95); }
  /* v2.43: controles de falta individuales */
  .pm-cancha-faltas-ctrls {
    display: flex;
    gap: 2px;
    flex-direction: column;
    align-items: center;
  }
  .pm-bench-faltas-ctrls {
    flex-direction: column;
  }
  .pm-falta-btn {
    background: var(--card-alt);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 2px 0;
    border-radius: 4px;
    font-weight: 800;
    font-size: 10px;
    cursor: pointer;
    font-family: inherit;
    height: 16px;
    width: 100%;
    min-width: 32px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    line-height: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pm-falta-btn:hover { background: var(--card); color: var(--text); }
  .pm-falta-btn:active { transform: scale(0.94); }
  .pm-falta-btn.pm-falta-inc { color: #b45309; border-color: rgba(245,158,11,0.5); }
  .pm-falta-btn.pm-falta-inc:hover { background: rgba(245,158,11,0.15); }
  .pm-falta-btn.pm-falta-dec { color: var(--muted); }
  .pm-falta-btn[disabled] { opacity: 0.3; cursor: not-allowed; }
  /* v2.43: dorsal cambia color con foul trouble */
  .pm-cancha-dorsal.is-fouled-dorsal { background: #f59e0b; color: white; }
  .pm-cancha-dorsal.is-fouled-out-dorsal { background: #dc2626; color: white; }
  .pm-bench-dorsal.is-fouled-dorsal { background: rgba(245,158,11,0.15); color: #b45309; border-color: #f59e0b; }
  .pm-bench-dorsal.is-fouled-out-dorsal { background: rgba(220,38,38,0.15); color: #dc2626; border-color: #dc2626; }
  /* v2.43: badge de faltas en banquillo (siempre visible) */
  .pm-bench-fouled-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    background: var(--card);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
  }
  /* v2.43: selector de Q en modal de cambio */
  .pm-cambio-q {
    flex: 1;
    padding: 8px 4px;
    background: var(--card-alt);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .pm-cambio-q:hover { background: var(--card); }
  .pm-cambio-q.active { background: var(--primary); color: white; border-color: var(--primary); }
  .pm-cambio-q:active { transform: scale(0.97); }
  /* v2.44: radio cards de selección de jugador (sustituto / a quién sacar) */
  .pm-sust-opt {
    display: grid;
    grid-template-columns: 18px 36px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--card-alt);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    transition: all 0.12s;
  }
  .pm-sust-opt:hover { background: var(--card); border-color: var(--primary); }
  .pm-sust-opt:has(input:checked) { background: rgba(184,28,44,0.06); border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
  .pm-sust-opt input[type="radio"] { margin: 0; cursor: pointer; }
  .pm-sust-opt-dorsal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
  }
  .pm-sust-opt:has(input:checked) .pm-sust-opt-dorsal { background: var(--primary); color: white; border-color: var(--primary); }
  .pm-sust-opt-info { min-width: 0; }
  .pm-sust-opt-nombre { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pm-sust-opt-meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
  .pm-sust-opt-tag {
    font-size: 9px;
    font-weight: 800;
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .pm-sust-opt-sinsust .pm-sust-opt-dorsal { display: none; }
  .pm-sust-opt-sinsust { grid-template-columns: 18px 1fr; }
  .pm-cancha-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--card-alt);
    border: 2px dashed var(--border);
    border-radius: 8px;
    text-align: center;
  }
  .pm-cancha-empty-text { color: var(--muted); font-size: 12px; }
  .pm-cancha-empty-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    min-height: 40px;
  }
  .pm-cancha-empty-btn:hover { background: #9a1625; }

  /* Lista de jugadores en banquillo (cards horizontales) */
  .pm-banquillo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 6px;
  }
  .pm-bench-card {
    display: grid;
    grid-template-columns: 38px 1fr 36px 90px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--card-alt);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    min-height: 56px;
  }
  .pm-bench-dorsal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
  }
  .pm-bench-card.is-fouled { border-color: #f59e0b; background: rgba(245,158,11,0.05); }
  .pm-bench-card.is-fouled-out { border-color: #dc2626; background: rgba(220,38,38,0.05); opacity: 0.7; }
  .pm-bench-info { flex: 1; min-width: 0; }
  .pm-bench-nombre {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pm-bench-meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .pm-bench-pos {
    font-size: 9px;
    background: var(--card);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
  }
  .pm-bench-fouled { font-weight: 700; color: #b45309; }
  .pm-bench-fouled-out { font-weight: 700; color: #dc2626; }
  .pm-bench-meter {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    min-height: 36px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .pm-bench-meter:hover { background: #047857; }
  .pm-bench-meter:active { transform: scale(0.97); }
  .pm-bench-meter[disabled] { background: var(--muted); cursor: not-allowed; opacity: 0.6; }
  .pm-bench-empty {
    grid-column: 1 / -1;
    padding: 20px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 11.5px;
    font-style: italic;
  }

  /* Cronología de cambios (lista cronológica invertida) */
  .pm-cronologia {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
  }
  .pm-crono-item {
    display: grid;
    grid-template-columns: 50px 1fr 24px;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: var(--card-alt);
    border-left: 3px solid var(--primary);
    border-radius: 5px;
    font-size: 11.5px;
  }
  .pm-crono-item.es-falta { border-left-color: #f59e0b; }
  .pm-crono-item.es-evento { border-left-color: #3b82f6; }
  .pm-crono-cuarto {
    background: var(--secondary);
    color: white;
    font-size: 9.5px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 800;
    text-align: center;
    line-height: 1.15;
  }
  .pm-crono-cuarto-tiempo {
    font-size: 9px;
    opacity: 0.8;
    margin-top: 1px;
  }
  .pm-crono-text { flex: 1; line-height: 1.3; }
  .pm-crono-text .sale { color: #dc2626; font-weight: 700; }
  .pm-crono-text .entra { color: #047857; font-weight: 700; }
  .pm-crono-x {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 14px;
  }
  .pm-crono-x:hover { color: var(--danger); background: var(--card); }
  .pm-crono-empty {
    padding: 20px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 11.5px;
    font-style: italic;
  }
  /* Acciones adicionales del header (Q, undo, live) */
  .pm-header-actions-block {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
  }
  .pm-header-action {
    background: var(--card-alt);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 5px 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    min-height: 32px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .pm-header-action:hover { background: var(--card); border-color: var(--primary); }
  .pm-header-action:active { transform: scale(0.97); }
  .pm-header-action[disabled] { opacity: 0.4; cursor: not-allowed; }
  .pm-header-action.pm-header-live {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  .pm-header-action.pm-header-live:hover { background: #9a1625; }
  /* ===== FIN modo partido v2.42 ===== */

  /* v2.41: layout 2 columnas (cancha + side) */
  .pm-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 10px;
  }
  @media (max-width: 980px) {
    .pm-layout { grid-template-columns: 1fr; }
  }
  .pm-col-cancha { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .pm-col-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

  /* v2.41: stats en pista */
  .pm-stats-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
  }
  .pm-stats-title {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .pm-stats-list { display: flex; flex-direction: column; gap: 4px; }
  .pm-stat-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    background: var(--card-alt);
    border-radius: 5px;
    font-size: 11px;
  }
  .pm-stat-row.is-pivot { background: rgba(184,28,44,0.10); }
  .pm-stat-dorsal { background: var(--primary); color: #fff; font-weight: 800; font-size: 10px; padding: 2px 5px; border-radius: 3px; min-width: 22px; text-align: center; }
  .pm-stat-nombre { font-weight: 700; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  .pm-stat-pos { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
  .pm-stat-min { font-size: 10px; color: var(--muted); font-weight: 600; }
  .pm-stat-faltas { font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 8px; }
  .pm-stat-faltas.ok { background: rgba(16,185,129,0.15); color: var(--accent); }
  .pm-stat-faltas.warn { background: rgba(245,158,11,0.18); color: #b45309; }
  .pm-stat-faltas.danger { background: rgba(220,38,38,0.18); color: #b91c1c; }
  .pm-stats-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 11.5px; font-style: italic; }

  /* v2.41: timeline cronológico */
  .pm-timeline-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    max-height: 380px;
    overflow-y: auto;
  }
  .pm-timeline-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .pm-timeline-count {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 10px;
  }
  .pm-timeline-list { display: flex; flex-direction: column; gap: 4px; }
  .pm-tl-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--card-alt);
    border-radius: 5px;
    border-left: 3px solid var(--primary);
    font-size: 10.5px;
    line-height: 1.3;
  }
  .pm-tl-item.es-falta { border-left-color: #f59e0b; }
  .pm-tl-item.es-evento { border-left-color: #3b82f6; }
  .pm-tl-cuarto {
    background: var(--secondary);
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
  }
  .pm-tl-tiempo { font-size: 9.5px; color: var(--muted); font-weight: 600; min-width: 32px; }
  .pm-tl-icon { font-size: 12px; }
  .pm-tl-text { flex: 1; }
  .pm-tl-text strong { color: var(--text); }
  .pm-tl-text .sale { color: #dc2626; }
  .pm-tl-text .entra { color: #10b981; }
  .pm-tl-empty { padding: 20px 8px; text-align: center; color: var(--muted); font-size: 11.5px; font-style: italic; }
  .pm-header-info { display: flex; flex-direction: column; gap: 2px; }
  .pm-header-rival { font-size: 13px; font-weight: 800; color: var(--text); }
  .pm-header-meta { font-size: 11px; color: var(--muted); }
  .pm-header-cuarto {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 64px;
  }
  .pm-header-cuarto-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; }
  .pm-header-cuarto-tiempo { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }

  /* ===== v2.12 — INICIO (dashboard del entrenador) ===== */
  .inicio-wrap { padding: 4px 0 60px; max-width: 1200px; margin: 0 auto; }
  .inicio-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 4px 0 18px;
    border-bottom: 1px solid var(--border);
  }
  .inicio-hero-eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .inicio-hero-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.05;
    margin: 0 0 4px;
    letter-spacing: -0.018em;
  }
  .inicio-hero-name { color: var(--primary); }
  .inicio-hero-sub {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0;
  }
  .inicio-hero-actions { display: flex; gap: 8px; }
  .inicio-hero-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

  /* KPIs */
  .inicio-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }
  .inicio-kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s, transform 0.12s;
    font-family: inherit;
    color: inherit;
  }
  .inicio-kpi:hover { border-color: var(--primary); }
  .inicio-kpi:active { transform: scale(0.99); }
  .inicio-kpi-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .inicio-kpi-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
  }
  .inicio-kpi-suffix {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    margin-left: 4px;
  }
  .inicio-kpi-sub { font-size: 12.5px; color: var(--muted); }
  .inicio-kpi[data-tone="primary"] { border-left: 3px solid var(--primary); }
  .inicio-kpi[data-tone="ok"] { border-left: 3px solid #10B981; }
  .inicio-kpi[data-tone="warn"] { border-left: 3px solid #F59E0B; }
  .inicio-kpi[data-tone="danger"] { border-left: 3px solid #EF4444; }
  .inicio-kpi[data-tone="gold"] { border-left: 3px solid var(--gold); }
  .inicio-kpi[data-tone="muted"] { border-left: 3px solid var(--border); }

  /* Grid 2x2 de cards grandes */
  .inicio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .inicio-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
  }
  .inicio-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .inicio-card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .inicio-card-title svg { width: 18px; height: 18px; color: var(--primary); }

  /* Equipos (home) */
  .inicio-equipo-card { transition: all 0.18s ease; }
  .inicio-equipo-card:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
  .inicio-equipo-card.activo { box-shadow: 0 2px 8px rgba(184, 28, 44, 0.15); }
  @media (max-width: 768px) {
    .inicio-equipo-card { padding: 10px !important; }
  }

  /* Hoy en microciclo */
  .inicio-hoy-content { padding: 4px 0; }
  .inicio-hoy-tipo {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    margin-bottom: 8px;
  }
  .inicio-hoy-tipo[data-tipo="GIMNASIO"], .inicio-hoy-tipo[data-tipo="GYM"] { background: var(--gold); color: var(--secondary); }
  .inicio-hoy-tipo[data-tipo="RECUPERACIÓN"], .inicio-hoy-tipo[data-tipo="DESCANSO"] { background: #6B7280; }
  .inicio-hoy-tipo[data-tipo="PARTIDO"], .inicio-hoy-tipo[data-tipo="AMISTOSO"] { background: var(--danger); }
  .inicio-hoy-desc { font-size: 15px; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
  .inicio-hoy-meta { font-size: 13px; color: var(--muted); }
  .inicio-hoy-empty { padding: 18px 0; text-align: center; }
  .inicio-hoy-empty p { margin: 0 0 10px; }

  /* Quick actions */
  .inicio-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .inicio-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.15s;
  }
  .inicio-quick-btn:hover { background: var(--card); border-color: var(--primary); color: var(--primary); }
  .inicio-quick-btn svg { width: 22px; height: 22px; }

  /* Próximos partidos */
  .inicio-partidos-lista { display: flex; flex-direction: column; gap: 6px; }
  .inicio-partido-item {
    display: grid;
    grid-template-columns: 70px 1fr 50px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .inicio-partido-item:hover { border-color: var(--primary); }
  .inicio-partido-fecha { text-align: center; }
  .inicio-partido-dia { font-size: 12px; font-weight: 700; color: var(--text); }
  .inicio-partido-hora { font-size: 11px; color: var(--muted); }
  .inicio-partido-rival { font-size: 13.5px; font-weight: 600; color: var(--text); }
  .inicio-partido-meta { font-size: 11.5px; color: var(--muted); }
  .inicio-partido-badge {
    background: var(--primary);
    color: white;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    letter-spacing: 0.3px;
  }

  /* Wellness */
  .inicio-wellness-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
  .inicio-wellness-row {
    display: grid;
    grid-template-columns: 36px 100px 1fr;
    align-items: center;
    gap: 10px;
  }
  .inicio-wellness-count { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 700; }
  .inicio-wellness-row[data-tone="ok"] .inicio-wellness-count { color: #10B981; }
  .inicio-wellness-row[data-tone="warn"] .inicio-wellness-count { color: #F59E0B; }
  .inicio-wellness-label { font-size: 12.5px; color: var(--muted); }
  .inicio-wellness-bar { height: 8px; background: var(--card-alt); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
  .inicio-wellness-fill { height: 100%; transition: width 0.4s; }
  .inicio-wellness-row[data-tone="ok"] .inicio-wellness-fill { background: #10B981; }
  .inicio-wellness-row[data-tone="warn"] .inicio-wellness-fill { background: #F59E0B; }
  .inicio-lesiones { padding-top: 12px; border-top: 1px solid var(--border); }
  .inicio-lesiones-titulo { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--danger); margin-bottom: 6px; }
  .inicio-lesion-item { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; }
  .inicio-lesion-nombre { font-weight: 600; }
  .inicio-lesion-tipo { color: var(--muted); }

  /* Último partido */
  .inicio-ultimo-rival { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
  .inicio-ultimo-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
  .inicio-ultimo-resultado {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
  }
  .inicio-ultimo-stat { font-size: 13px; color: var(--muted); }

  /* Mobile: inicio */
  @media (max-width: 768px) {
    .inicio-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .inicio-kpi { padding: 12px 14px; }
    .inicio-kpi-value { font-size: 24px; }
    .inicio-grid { grid-template-columns: 1fr; }
    .inicio-hero-title { font-size: 24px; }
    .inicio-quick-grid { grid-template-columns: repeat(2, 1fr); }
    .inicio-card { padding: 14px 16px; }
  }

  /* ===== v2.13 — Análisis CMJ vs Fatiga y Carga ===== */
  .cmj-analisis-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 4px 0 12px;
  }
  .cmj-analisis-chart-wrap {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
  }
  .cmj-analisis-scatter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
  }
  .cmj-analisis-scatter-card {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .cmj-analisis-scatter-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text);
    margin-bottom: 2px;
  }
  .cmj-analisis-scatter-meta {
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .cmj-analisis-scatter-canvas { background: var(--card); border-radius: 6px; }
  .cmj-analisis-eventos {
    margin-top: 14px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .cmj-evento-titulo {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--danger);
    margin-bottom: 8px;
  }
  .cmj-evento-vacio { font-size: 12.5px; color: var(--muted); padding: 4px 0; }
  .cmj-evento-lista { display: flex; flex-direction: column; gap: 6px; }
  .cmj-evento-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--danger);
    border-radius: 6px;
    font-size: 12px;
  }
  .cmj-evento-fecha { font-weight: 700; color: var(--text); }
  .cmj-evento-datos { display: flex; gap: 6px; align-items: center; }
  .cmj-evento-carga { color: var(--danger); font-weight: 700; }
  .cmj-evento-cmj { color: var(--primary); font-weight: 700; }
  .cmj-evento-arrow { color: var(--muted); }
  .cmj-evento-valores { text-align: right; color: var(--muted); font-size: 11.5px; }
  @media (max-width: 768px) {
    .cmj-analisis-kpis { grid-template-columns: repeat(2, 1fr); }
    .cmj-analisis-scatter-grid { grid-template-columns: 1fr; }
    .cmj-evento-item { grid-template-columns: 1fr; gap: 4px; }
  }

  /* ============================================================
     v2.21: SALUD DEL EQUIPO — Pizarra del coach
     ============================================================ */
  .salud-kpis-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }
  .salud-kpi {
    border-radius: 10px;
    padding: 12px 14px;
    border-left: 4px solid var(--border);
    background: var(--card);
    border: 1px solid var(--border);
    border-left-width: 4px;
  }
  .salud-kpi-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); margin-bottom: 4px; }
  .salud-kpi-value { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--text); }
  .salud-kpi-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
  .salud-kpi[data-tone="critico"] { border-left-color: #dc2626; }
  .salud-kpi[data-tone="alerta"] { border-left-color: #f59e0b; }
  .salud-kpi[data-tone="optimo"] { border-left-color: #10b981; }
  .salud-kpi[data-tone="lesion"] { border-left-color: #374151; }
  .salud-kpi[data-tone="sub"] { border-left-color: #3b82f6; }
  .salud-kpi[data-tone="acwr"] { border-left-color: #4f46e5; }

  .salud-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .salud-dot-verde { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
  .salud-dot-ambar { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
  .salud-dot-rojo { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.18); animation: pulse-rojo 2s ease-in-out infinite; }
  .salud-dot-negro { background: #374151; box-shadow: 0 0 0 3px rgba(55,65,81,0.18); }
  .salud-dot-azul { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.18); }
  .salud-dot-gris { background: #9ca3af; box-shadow: 0 0 0 3px rgba(156,163,175,0.18); }
  @keyframes pulse-rojo {
    0%, 100% { box-shadow: 0 0 0 3px rgba(220,38,38,0.18); }
    50% { box-shadow: 0 0 0 6px rgba(220,38,38,0.30); }
  }

  .salud-tabla-wrap { margin-top: 6px; }
  .salud-tabla-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
  }
  .salud-tabla-table thead th {
    text-align: left;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    padding: 8px 10px;
    border-bottom: 2px solid var(--border);
    background: var(--card-alt);
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .salud-row { cursor: pointer; transition: background 0.15s; }
  .salud-row:hover { background: var(--card-alt); }
  .salud-row td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
  }
  .salud-tabla-mobile { display: none; }
  .salud-card {
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--card);
  }
  .salud-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .salud-card-body { font-size: 11.5px; line-height: 1.4; margin: 6px 0; }
  .salud-card-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
  .salud-card-meta strong { color: var(--text); }

  @media (max-width: 900px) {
    .salud-kpis-grid { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 768px) {
    .salud-kpis-grid { grid-template-columns: repeat(2, 1fr); }
    .salud-tabla-desktop { display: none; }
    .salud-tabla-mobile { display: block; }
    .salud-toolbar { flex-direction: column; align-items: stretch !important; }
  }

  /* ============================================================
     v2.22: DASHBOARD VISUAL DE SEMANA (Carga)
     ============================================================ */
  .dash-kpis {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  .dash-kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .dash-kpi-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); margin-bottom: 4px; }
  .dash-kpi-value { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--text); }
  .dash-kpi-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
  .dash-kpi-sub:has(▲,▼) { font-weight: 700; }
  .dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .dash-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
  }
  .dash-card-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    margin-bottom: 10px;
  }
  /* Gráfico de barras */
  .dash-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 160px;
    gap: 6px;
    padding: 0 4px;
  }
  .dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
  }
  .dash-bar-value {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
  }
  .dash-bar {
    width: 100%;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s;
  }
  .dash-bar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    margin-top: 6px;
  }
  /* Distribución por tipo */
  .dash-tipo-list { display: flex; flex-direction: column; gap: 8px; }
  .dash-tipo-row {
    display: grid;
    grid-template-columns: 14px 80px 30px 1fr 40px;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
  }
  .dash-tipo-dot { width: 12px; height: 12px; border-radius: 3px; }
  .dash-tipo-name { font-weight: 700; }
  .dash-tipo-count { color: var(--text-soft); font-size: 11px; }
  .dash-tipo-bar { height: 8px; background: var(--card-alt); border-radius: 4px; overflow: hidden; }
  .dash-tipo-fill { height: 100%; transition: width 0.3s; }
  .dash-tipo-pct { font-weight: 800; text-align: right; }
  /* Rankings */
  .dash-rank-list { display: flex; flex-direction: column; gap: 6px; }
  .dash-rank-row {
    display: grid;
    grid-template-columns: 24px 1fr 90px 70px;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
  }
  .dash-rank-pos {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--card-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11.5px;
  }
  .dash-rank-name { display: flex; gap: 6px; align-items: baseline; }
  .dash-rank-bar { height: 6px; background: var(--card-alt); border-radius: 3px; overflow: hidden; }
  .dash-rank-fill { height: 100%; transition: width 0.3s; }
  .dash-rank-ua { text-align: right; font-weight: 700; font-size: 12px; }

  @media (max-width: 1100px) {
    .dash-kpis { grid-template-columns: repeat(3, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 768px) {
    .dash-kpis { grid-template-columns: repeat(2, 1fr); }
    .dash-rank-row { grid-template-columns: 20px 1fr 60px 50px; font-size: 11.5px; }
  }
  .rotacion-timeline-wrap {
    overflow-x: auto;
    background: var(--card);
    border-radius: 8px;
  }
  .rot-timeline-grid {
    display: flex;
    flex-direction: column;
    min-width: 720px;
  }
  .rot-tl-header {
    display: grid;
    grid-template-columns: 220px repeat(4, 1fr) 80px;
    background: var(--card-alt);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .rot-tl-header-cell {
    padding: 10px 12px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    text-align: center;
    border-right: 1px solid var(--border);
  }
  .rot-tl-header-cell:first-child { text-align: left; }
  .rot-tl-row {
    display: grid;
    grid-template-columns: 220px repeat(4, 1fr) 80px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
  }
  .rot-tl-row:hover { background: var(--card-alt); }
  .rot-tl-cell {
    padding: 8px 6px;
    border-right: 1px solid var(--border);
    min-height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .rot-tl-name {
    justify-content: flex-start;
    padding: 6px 12px;
  }
  .rot-tl-jugador {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .rot-tl-pos-dot {
    width: 8px;
    height: 22px;
    border-radius: 2px;
    flex-shrink: 0;
  }
  .rot-tl-dorsal {
    font-weight: 800;
    font-size: 13px;
    color: var(--text);
    flex-shrink: 0;
    min-width: 32px;
  }
  .rot-tl-nombre {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rot-tl-posicion {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
  }
  .rot-tl-cuarto {
    cursor: pointer;
    position: relative;
    background: var(--card);
    transition: background 0.08s;
  }
  .rot-tl-cuarto:hover { background: var(--card-alt); }
  .rot-tl-cuarto.has-stint { background: color-mix(in srgb, var(--primary) 6%, var(--card)); }
  .rot-tl-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    transition: width 0.18s ease;
    opacity: 0.85;
  }
  .rot-tl-mins {
    position: relative;
    z-index: 1;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text);
    text-shadow: 0 0 4px rgba(255,255,255,0.6);
  }
  .rot-tl-total {
    background: var(--card-alt);
    flex-direction: column;
    gap: 2px;
    font-size: 12.5px;
    font-weight: 800;
  }
  .rot-tl-total.has-stint { background: color-mix(in srgb, var(--primary) 8%, var(--card-alt)); }
  .rot-tl-mins-total {
    position: relative;
    z-index: 1;
    color: var(--text);
  }
  /* ===== FIN timeline v2.10 ===== */

  /* v2.9 — Rotación: Quinteto en cancha + log de sustituciones */
  .quinteto-ahora-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 4px;
  }
  .quinteto-ahora-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px dashed var(--border);
    background: var(--card-alt);
    cursor: pointer;
    transition: all 0.12s;
    min-height: 56px;
  }
  .quinteto-ahora-slot:hover { border-color: var(--primary); background: var(--card); }
  .quinteto-ahora-slot.filled {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--card)) 0%, var(--card) 100%);
    border-style: solid;
    border-color: var(--primary);
  }
  .quinteto-ahora-slot.empty {
    border-style: dashed;
    border-color: var(--border);
    color: var(--muted);
  }
  .qas-dorsal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
  }
  .quinteto-ahora-slot.empty .qas-dorsal { display: none; }
  .qas-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card);
    border: 1px dashed var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .qas-info { flex: 1; min-width: 0; }
  .qas-nombre {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .qas-min {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
  }
  .qas-action {
    color: var(--muted);
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }
  .quinteto-ahora-slot.filled:hover .qas-action { color: var(--danger); }
  /* Log de cambios */
  .cambios-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
  .cambio-item {
    display: grid;
    grid-template-columns: 60px 1fr auto 24px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12.5px;
  }
  .cambio-tiempo { display: flex; flex-direction: column; align-items: center; }
  .cambio-cuarto {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 10.5px;
  }
  .cambio-min { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
  .cambio-flecha { display: flex; flex-direction: column; gap: 2px; }
  .cambio-sale {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--danger);
    font-weight: 700;
    font-size: 12.5px;
  }
  .cambio-entra {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #059669;
    font-weight: 700;
    font-size: 12.5px;
  }
  .cambio-motivo { font-size: 11.5px; color: var(--text-soft); }
  .cambio-x {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
  }
  .cambio-x:hover { color: var(--danger); background: var(--card); }
  .empty-mini {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    background: var(--card-alt);
    border: 1px dashed var(--border);
    border-radius: 8px;
  }

  /* v2.6: Día "can-paint" cuando hay tipo activo */
  .day.can-paint:not(.has-type) { cursor: pointer; }
  .day.can-paint:not(.has-type):hover { background: var(--card-alt); border: 1px solid var(--primary); }

  /* v2.6: Distribución por tipo (resumen anual) */
  .dist-row {
    display: grid;
    grid-template-columns: 24px 180px 1fr 90px 60px;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
  }
  .dist-row:last-child { border-bottom: none; }
  .dist-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
  }
  .dist-name {
    font-size: 13px;
    font-weight: 600;
  }
  .dist-bar {
    height: 12px;
    background: var(--card-alt);
    border-radius: 6px;
    overflow: hidden;
  }
  .dist-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s;
  }
  .dist-num {
    font-size: 12px;
    color: var(--text-soft);
    text-align: right;
  }
  .dist-pct {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    font-weight: 700;
  }
  }
  .cargas-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
  }
  .cargas-mode-btn:hover {
    background: rgba(0,0,0,0.04);
    color: var(--text);
  }
  .cargas-mode-btn.active {
    background: linear-gradient(135deg, var(--primary), #7f1d1d);
    color: #fff;
    box-shadow: 0 2px 6px rgba(184, 28, 44, 0.25);
  }

  /* v2.4: DAY NAVIGATOR (chips de días) */
  .day-navigator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }
  .day-nav-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-family: inherit;
  }
  .day-nav-arrow:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }
  .day-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }
  .day-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-soft);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-align: center;
  }
  .day-chip:hover {
    border-color: var(--primary);
    color: var(--text);
  }
  .day-chip.active {
    background: linear-gradient(135deg, var(--primary), #7f1d1d);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(184, 28, 44, 0.25);
  }
  .day-chip .dow { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
  .day-chip .num { font-size: 10px; opacity: 0.85; }
  .day-chip.has-data .num::after {
    content: ' ●';
    color: #fbbf24;
  }
  .day-chip.active.has-data .num::after {
    color: #fff;
  }

  /* v2.4: PLAYER CARDS GRID */
  .players-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }
  .player-load-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
  }
  .player-load-card:hover {
    border-color: var(--text-soft);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }
  .player-load-card.has-load {
    border-left: 3px solid var(--primary);
  }
  .player-load-card.is-rest {
    opacity: 0.7;
  }
  .player-load-card.is-overload {
    border-left: 3px solid #dc2626;
  }
  .plc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }
  .plc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7f1d1d);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
  }
  .plc-info { flex: 1; min-width: 0; }
  .plc-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.1; }
  .plc-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
  .plc-pos {
    background: rgba(184, 28, 44, 0.1);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  .plc-dorsal {
    background: var(--secondary);
    color: #f4f1ea;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9.5px;
    font-weight: 700;
  }
  .plc-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
  }
  .plc-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
  }
  .plc-v-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-alt);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
  }
  .plc-v-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 28, 44, 0.15);
  }
  .plc-rpe-row {
    display: grid;
    grid-template-columns: 32px 28px 1fr 28px;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
  }
  .plc-rpe-min, .plc-rpe-max {
    font-size: 9.5px;
    color: var(--muted);
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }
  .plc-rpe-step {
    background: var(--card-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    height: 32px;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .plc-rpe-step:hover { background: var(--card); border-color: var(--primary); }
  .plc-rpe-step:active { transform: scale(0.94); }
  .plc-rpe-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--card-alt);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    height: 32px;
    -moz-appearance: textfield;
  }
  .plc-rpe-input::-webkit-outer-spin-button,
  .plc-rpe-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .plc-rpe-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 28, 44, 0.15);
  }
  .plc-rpe-presets {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
  }
  .plc-rpe-preset {
    flex: 1;
    background: var(--card-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 4px 0;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    height: 24px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .plc-rpe-preset:hover { background: var(--card); border-color: var(--primary); }
  .plc-rpe-preset.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  .plc-rpe-preset:active { transform: scale(0.96); }
  .plc-rpe-value {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding: 2px 0;
    border-radius: 4px;
    background: var(--card-alt);
  }
  .plc-carga {
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, rgba(184, 28, 44, 0.06), rgba(184, 28, 44, 0.02));
    border-radius: 6px;
    margin-bottom: 8px;
  }
  .plc-carga-label {
    font-size: 9.5px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
  }
  .plc-carga-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
  }
  .plc-carga.is-zero .plc-carga-value { color: var(--muted); font-weight: 600; }
  .plc-carga.is-high .plc-carga-value { color: #dc2626; }
  .plc-ewma {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    font-size: 10px;
    color: var(--muted);
    padding-top: 6px;
    border-top: 1px dashed var(--border);
  }
  .plc-ewma-cell {
    text-align: center;
    flex: 1;
  }
  .plc-ewma-cell strong {
    display: block;
    font-size: 12px;
    color: var(--text);
    font-weight: 700;
  }
  .plc-ewma-cell strong.acwr-green { color: #10b981; }
  .plc-ewma-cell strong.acwr-amber { color: #f59e0b; }
  .plc-ewma-cell strong.acwr-red { color: #dc2626; }
  .plc-ewma-label {
    font-size: 8.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  /* v2.4: ACCIONES RÁPIDAS */
  .cargas-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .cargas-quick-actions .qa-label {
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    align-self: center;
    margin-right: 4px;
  }
  .qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
  }
  .qa-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }
  .qa-btn.qa-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
  }
  .qa-preset-mini {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    background: var(--card);
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
  }
  .qa-preset-mini:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  /* v2.4: DAY STATS BAR (resumen del día) */
  .day-stats-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--card), var(--card-alt));
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 14px;
  }
  .dsb-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 100px;
    padding: 0 8px;
    border-right: 1px solid var(--border);
  }
  .dsb-item:last-child { border-right: none; }
  .dsb-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 2px;
  }
  .dsb-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
  }
  .dsb-value.green { color: #10b981; }
  .dsb-value.amber { color: #f59e0b; }
  .dsb-value.red { color: #dc2626; }

  /* v2.4: PLAYER VIEW (timeline) */
  .player-timeline-bar {
    display: flex;
    align-items: flex-end;
    height: 80px;
    gap: 4px;
    padding: 8px;
    background: var(--card-alt);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    overflow-x: auto;
  }
  .ptl-day {
    flex: 1;
    min-width: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .ptl-bar {
    width: 100%;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    transition: opacity 0.15s;
  }
  .ptl-bar.zero { background: var(--border); }
  .ptl-bar.low { background: #10b981; }
  .ptl-bar.mid { background: #f59e0b; }
  .ptl-bar.high { background: #dc2626; }
  .ptl-dow {
    font-size: 9.5px;
    color: var(--muted);
    font-weight: 700;
  }
  .ptl-val {
    font-size: 9px;
    color: var(--text-soft);
    font-weight: 600;
  }

  /* ============================================
     CARGA EXTERNA v2.4 — Cards de ejercicio
     ============================================ */
  .ce-day-navigator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }
  .ce-day-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 52px;
    padding: 4px 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    font: inherit;
    position: relative;
  }
  .ce-day-chip:hover { background: var(--card-alt); border-color: var(--primary); }
  .ce-day-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(184, 28, 44, 0.25);
  }
  .ce-day-chip .dow { font-size: 10px; font-weight: 700; opacity: 0.7; }
  .ce-day-chip .num { font-size: 14px; font-weight: 700; }
  .ce-day-chip .has-data-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: #f59e0b;
    position: absolute; top: 6px; right: 6px;
  }
  .ce-day-chip.active .has-data-dot { background: #fef3c7; }
  .ce-day-nav-arrow {
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
  }
  .ce-day-nav-arrow:hover { background: var(--card-alt); border-color: var(--primary); }

  .ce-day-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 14px;
  }

  .ce-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 8px 10px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .ce-qa-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-right: 4px;
  }
  .ce-qa-btn {
    padding: 6px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s;
  }
  .ce-qa-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
  .ce-qa-btn.danger:hover { background: #dc2626; border-color: #dc2626; }
  .ce-qa-preset {
    padding: 5px 10px;
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--text-soft);
    cursor: pointer;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
  }
  .ce-qa-preset:hover { background: var(--card-alt); border-style: solid; border-color: var(--primary); }
  .ce-qa-preset.custom {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    color: #92400e;
    border-style: solid;
  }
  .ce-qa-preset.custom:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    border-color: #d97706;
  }
  .ce-qa-add-custom {
    padding: 5px 12px;
    background: transparent;
    border: 1px dashed #f59e0b;
    border-radius: 6px;
    color: #d97706;
    cursor: pointer;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
  }
  .ce-qa-add-custom:hover { background: #fef3c7; border-style: solid; }
  .ce-qa-custom-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }
  .ce-qa-custom-wrap .ce-qa-preset.custom {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: 0;
  }
  .ce-qa-custom-x {
    padding: 5px 7px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-left: none;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    color: #92400e;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }
  .ce-qa-custom-x:hover { background: #fecaca; color: #b91c1c; border-color: #b91c1c; }

  .ejercicio-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    transition: all 0.15s;
  }
  .ejercicio-card.has-load { border-left: 4px solid var(--primary); }
  .ejercicio-card.is-empty { border-left: 4px solid var(--border); opacity: 0.75; }
  .ec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }
  .ec-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--card-alt);
    color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
  }
  .ec-nombre {
    flex: 1;
    padding: 7px 10px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
  }
  .ec-nombre:focus { outline: none; border-color: var(--primary); background: var(--card); }
  .ec-calc {
    padding: 6px 10px;
    background: linear-gradient(135deg, var(--primary), #8b1428);
    color: white;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
  }
  .ec-calc.is-zero { background: var(--border); color: var(--muted); }
  .ec-cse {
    padding: 6px 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
    cursor: help;
  }
  .ec-cse.is-zero { background: var(--border); color: var(--muted); }
  .ec-pct-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
  }
  .ec-pct-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 4px 10px;
    cursor: help;
  }
  .ec-pct-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .ec-pct-input {
    width: 56px;
    padding: 3px 2px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    background: transparent;
    border: none;
    font-family: inherit;
  }
  .ec-pct-input:focus { outline: none; color: var(--primary); }
  .ec-carga-equipo {
    font-size: 12px;
    color: var(--muted);
  }
  .ec-carga-equipo b {
    color: var(--text);
    font-weight: 800;
  }
  .ec-remove {
    width: 28px; height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
  }
  .ec-remove:hover { background: #fee2e2; color: #dc2626; border-color: #dc2626; }

  .ec-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    align-items: center;
  }
  .ec-treal-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--card-alt);
    border-radius: 8px;
    border: 1px solid var(--border);
  }
  .ec-treal-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
  }
  .ec-treal {
    width: 100%;
    padding: 8px 4px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    background: transparent;
    border: none;
    font-family: inherit;
  }
  .ec-treal:focus { outline: none; color: var(--primary); }
  .ec-treal-unit {
    font-size: 9px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
  }

  .ec-var-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .ec-var {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 4px 2px;
  }
  .ec-var-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .ec-var-input {
    width: 100%;
    padding: 3px 2px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: none;
    font-family: inherit;
  }
  .ec-var-input:focus { outline: none; color: var(--primary); }

  .ce-empty-card {
    background: var(--card-alt);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    color: var(--muted);
  }
  .ce-empty-card-emoji { font-size: 32px; margin-bottom: 6px; }

  .ec-vars-summary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted);
  }
  .ec-vars-summary b { color: var(--text); }

  /* COLOR LEGEND FOR TYPES */
  .type-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .type-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
  }

  /* PRINT: simplificado — la nueva ventana de impresión (en imprimirInformePartido) hace todo el trabajo */
  @media print {
    body { background: #fff; }
    @page { size: A4; margin: 12mm 10mm; }
  }

  /* === ANÁLISIS AVANZADO === */
  .análisis-individual-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .player-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .player-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .player-name-block { display: flex; flex-direction: column; gap: 2px; }
  .player-name { font-size: 15px; font-weight: 700; color: var(--primary); }
  .player-position { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
  .player-rating {
    text-align: center;
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 70px;
  }
  .player-rating.pos { background: rgba(16, 185, 129, 0.12); color: var(--accent-dark); }
  .player-rating.warn { background: rgba(245, 158, 11, 0.12); color: #b45309; }
  .player-rating.neg { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
  .rating-value { font-size: 24px; font-weight: 700; line-height: 1; }
  .rating-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
  .player-stats-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-bottom: 10px;
  }
  .ps-cell {
    text-align: center;
    background: var(--bg);
    border-radius: 4px;
    padding: 6px 2px;
  }
  .ps-cell.pos .ps-val { color: var(--accent-dark); font-weight: 700; }
  .ps-cell.neg .ps-val { color: var(--danger); font-weight: 700; }
  .ps-cell.danger { background: rgba(220, 38, 38, 0.12); }
  .ps-cell.danger .ps-val { color: var(--danger); font-weight: 700; }
  .ps-val { display: block; font-size: 16px; font-weight: 700; color: var(--primary); }
  .ps-lbl { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; text-transform: uppercase; }
  .player-advanced { background: var(--bg); border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
  .adv-row { display: flex; gap: 14px; align-items: center; font-size: 12px; margin-bottom: 4px; flex-wrap: wrap; }
  .adv-row:last-child { margin-bottom: 0; }
  .adv-label { color: var(--muted); }
  .adv-val { font-weight: 700; color: var(--primary); }
  .adv-val.pos { color: var(--accent-dark); }
  .adv-val.neg { color: var(--danger); }
  .player-cuartos { margin-bottom: 10px; }
  .cuartos-mini-title { font-size: 11px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
  .cuartos-mini-grid { display: flex; gap: 6px; flex-wrap: wrap; }
  .cuarto-mini {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    min-width: 60px;
    border-left: 3px solid var(--muted);
  }
  .cuarto-mini.pos { border-left-color: var(--accent); background: rgba(16, 185, 129, 0.08); }
  .cuarto-mini.neg { border-left-color: var(--danger); background: rgba(220, 38, 38, 0.08); }
  .qm-q { font-weight: 700; color: var(--primary); }
  .qm-min, .qm-pm { color: var(--muted); font-size: 10px; }
  .player-rating-bars { margin: 10px 0; padding: 8px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .rb-row {
    display: grid;
    grid-template-columns: 130px 1fr 30px;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    margin-bottom: 4px;
  }
  .rb-lbl { color: var(--muted); }
  .rb-bar { background: var(--bg); height: 8px; border-radius: 4px; overflow: hidden; }
  .rb-fill { height: 100%; transition: width 0.3s; }
  .rb-val { font-weight: 700; color: var(--primary); text-align: right; }
  .player-recs { margin-top: 10px; }
  .recs-title { font-size: 11px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
  .player-rec { font-size: 12px; padding: 6px 8px; border-radius: 4px; margin-bottom: 4px; border-left: 3px solid var(--muted); background: var(--bg); }
  .player-rec.pos { border-left-color: var(--accent); background: rgba(16, 185, 129, 0.08); }
  .player-rec.warn { border-left-color: var(--warn); background: rgba(245, 158, 11, 0.08); }
  .player-rec.neg { border-left-color: var(--danger); background: rgba(220, 38, 38, 0.08); }
  .player-rec.danger { border-left-color: var(--danger); background: rgba(220, 38, 38, 0.12); }
  .player-rec.info { border-left-color: var(--primary); background: rgba(30, 58, 95, 0.06); }
  .insight-rec { font-size: 12px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); color: var(--primary); font-style: italic; }
  .run-card { padding: 8px 10px; border-radius: 4px; margin-bottom: 6px; border-left: 3px solid; font-size: 12px; }
  .run-card.pos { background: rgba(16, 185, 129, 0.10); border-left-color: var(--accent); }
  .run-card.neg { background: rgba(220, 38, 38, 0.10); border-left-color: var(--danger); }
  .run-head { font-weight: 700; margin-bottom: 2px; }
  .clutch-summary { padding: 10px; border-radius: 6px; margin-bottom: 8px; border-left: 4px solid; }
  .clutch-summary.pos { background: rgba(16, 185, 129, 0.10); border-left-color: var(--accent); }
  .clutch-summary.neg { background: rgba(220, 38, 38, 0.10); border-left-color: var(--danger); }
  .clutch-head { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
  .clutch-stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
  .clutch-moments { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
  .clutch-moment {
    display: flex; flex-direction: column; align-items: center;
    padding: 4px 8px; border-radius: 4px; font-size: 11px; min-width: 50px;
    background: var(--bg);
  }
  .clutch-moment.pos { background: rgba(16, 185, 129, 0.15); color: var(--accent-dark); }
  .clutch-moment.neg { background: rgba(220, 38, 38, 0.15); color: var(--danger); }
  .cuartos-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
  .cuartos-table th, .cuartos-table td { padding: 8px; text-align: left; border-bottom: 1px solid var(--border); }
  .cuartos-table th { background: var(--bg); font-weight: 700; color: var(--primary); }
  .cuartos-table td.pos { color: var(--accent-dark); font-weight: 700; }
  .cuartos-table td.neg { color: var(--danger); font-weight: 700; }
  .mvp-cell { color: var(--primary); font-weight: 600; }
  .onoff-table { display: flex; flex-direction: column; gap: 2px; }
  .onoff-row { display: grid; grid-template-columns: 1fr 50px 50px 80px; gap: 6px; align-items: center; font-size: 12px; padding: 4px 6px; border-radius: 4px; background: var(--bg); }
  .onoff-name { font-weight: 600; }
  .onoff-min { color: var(--muted); font-size: 11px; }
  .onoff-pm { font-weight: 700; text-align: right; }
  .onoff-pm.pos { color: var(--accent-dark); }
  .onoff-pm.neg { color: var(--danger); }
  .onoff-label { color: var(--muted); font-size: 10px; }

  /* Foul trouble rows */
  .foul-row {
    display: grid;
    grid-template-columns: 70px 50px 50px 60px 1fr;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 4px;
    background: var(--bg);
    margin-bottom: 4px;
    border-left: 3px solid transparent;
  }
  .foul-row.critica { border-left-color: var(--danger); background: rgba(220, 38, 38, 0.06); }
  .foul-row.alta { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.06); }
  .foul-row.media { border-left-color: #3b82f6; background: rgba(59, 130, 246, 0.06); }
  .foul-name { font-weight: 700; }
  .foul-count { font-weight: 700; color: var(--danger); text-align: center; }
  .foul-row.media .foul-count { color: var(--primary); }
  .foul-min { color: var(--muted); font-size: 11px; text-align: center; }
  .foul-stints { color: var(--muted); font-size: 11px; text-align: center; }
  .foul-gestion { font-size: 11px; }

  /* Heatmap de carga por ventanas de 5 min */
  .heatmap-wrapper { overflow-x: auto; margin-top: 8px; }
  .heatmap-table { border-collapse: separate; border-spacing: 2px; font-size: 11px; min-width: 100%; }
  .heatmap-table th { padding: 4px 6px; background: var(--bg); font-weight: 600; color: var(--primary); position: sticky; top: 0; }
  .heatmap-table th.heatmap-jug { text-align: left; min-width: 110px; }
  .heatmap-table th.heatmap-window { text-align: center; min-width: 44px; }
  .heatmap-table td.heatmap-cell {
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    border-radius: 3px;
    color: #1a1a1a;
  }
  .heatmap-table td.heatmap-cell.zero { background: #f1f5f9; color: var(--muted); font-weight: 400; }
  .heatmap-table td.heatmap-cell.light { background: #dbeafe; }
  .heatmap-table td.heatmap-cell.medium { background: #fde68a; }
  .heatmap-table td.heatmap-cell.high { background: #fb923c; color: #1a1a1a; }
  .heatmap-table td.heatmap-cell.peak { background: var(--danger); color: #fff; }
  .heatmap-table tr.heatmap-totalrow td { font-weight: 700; background: var(--bg); color: var(--primary); }
  .heatmap-legend { display: flex; gap: 12px; font-size: 11px; margin-top: 8px; color: var(--muted); flex-wrap: wrap; }
  .heatmap-legend-item { display: inline-flex; align-items: center; gap: 4px; }
  .heatmap-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border); }

  /* Carga por jugador (sin +/-) */
  .carga-jug-row {
    display: grid;
    grid-template-columns: 1fr 50px 50px 50px 60px;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    padding: 5px 6px;
    border-radius: 4px;
    background: var(--bg);
    margin-bottom: 2px;
  }
  .carga-jug-name { font-weight: 600; }
  .carga-jug-min { font-weight: 700; text-align: center; }
  .carga-jug-min.heavy { color: var(--danger); }
  .carga-jug-min.medium { color: var(--warn); }
  .carga-jug-stints { text-align: center; color: var(--muted); }
  .carga-jug-bar { height: 6px; background: var(--border); border-radius: 3px; position: relative; overflow: hidden; }
  .carga-jug-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); border-radius: 3px; }
  .carga-jug-faltas { text-align: center; color: var(--danger); font-weight: 600; }

  /* Quinteto (sin +/-) */
  .lineup-pm.stint-pm.pos { color: var(--accent-dark); }
  .lineup-pm.stint-pm.neg { color: var(--danger); }
  .lineup-pm.stint-pm.neutral { color: var(--muted); }

  /* Rating de gestión de carga (sin box score) */
  .carga-rating-bars .rb-row { display: grid; grid-template-columns: 130px 1fr 40px; gap: 6px; align-items: center; font-size: 11px; margin-bottom: 3px; }
  .carga-rating-bars .rb-lbl { color: var(--muted); }
  .carga-rating-bars .rb-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
  .carga-rating-bars .rb-fill { height: 100%; border-radius: 4px; }
  .carga-rating-bars .rb-val { text-align: right; font-weight: 700; }

  /* Análisis individual cards simplificadas */
  .player-stats-row.carga .ps-cell { padding: 4px; }
  .player-stats-row.carga .ps-lbl { color: var(--muted); }
  .player-cuartos-carga { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
  .cuarto-mini-carga {
    background: var(--bg);
    border-radius: 4px;
    padding: 4px 8px;
    text-align: center;
    font-size: 11px;
    border-left: 3px solid var(--border);
  }
  .cuarto-mini-carga.heavy { border-left-color: var(--danger); }
  .cuarto-mini-carga.medium { border-left-color: var(--warn); }
  .cuarto-mini-carga.light { border-left-color: var(--accent); }
  .qm-cuarto { font-weight: 700; color: var(--primary); }
  .qm-min { display: block; font-size: 12px; font-weight: 600; }
  .qm-stints { display: block; color: var(--muted); font-size: 10px; }

  /* Recs carga */
  .player-rec.carga-pos { background: rgba(16, 185, 129, 0.10); border-left-color: var(--accent); }
  .player-rec.carga-warn { background: rgba(245, 158, 11, 0.10); border-left-color: var(--warn); }
  .player-rec.carga-neg { background: rgba(220, 38, 38, 0.10); border-left-color: var(--danger); }
  .player-rec.carga-info { background: rgba(59, 130, 246, 0.10); border-left-color: #3b82f6; }

  /* ====================== MyCourtFlow style ====================== */
  .mcf-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    background: #fff;
  }
  .mcf-status-pill .mcf-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--muted);
  }
  .mcf-status-pill.low { color: var(--accent-dark); border-color: var(--accent); background: rgba(16, 185, 129, 0.06); }
  .mcf-status-pill.low .mcf-dot { background: var(--accent); }
  .mcf-status-pill.mod { color: #b45309; border-color: #f59e0b; background: rgba(245, 158, 11, 0.08); }
  .mcf-status-pill.mod .mcf-dot { background: #f59e0b; }
  .mcf-status-pill.high { color: var(--danger); border-color: var(--danger); background: rgba(220, 38, 38, 0.08); }
  .mcf-status-pill.high .mcf-dot { background: var(--danger); }

  .mcf-summary-card {
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.30);
    border-radius: 10px;
    padding: 18px 20px;
    margin-top: 12px;
  }
  .mcf-summary-card.mod { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.30); }
  .mcf-summary-card.high { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.30); }
  .mcf-summary-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
  .mcf-summary-head .mcf-summary-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
  .mcf-summary-title { font-size: 28px; font-weight: 800; color: #1a1a1a; line-height: 1.1; margin: 4px 0 6px 0; }
  .mcf-summary-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
  .mcf-summary-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .mcf-summary-kpi {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    text-align: left;
  }
  .mcf-summary-kpi .mcf-kpi-value { font-size: 26px; font-weight: 800; color: #1a1a1a; line-height: 1; }
  .mcf-summary-kpi .mcf-kpi-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; display: block; }
  .mcf-summary-foot { margin-top: 12px; font-size: 13px; color: #1a1a1a; font-style: italic; }

  .mcf-section { margin-top: 20px; }
  .mcf-section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .mcf-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
  }
  .mcf-bullet-list { list-style: none; margin: 0; padding: 0; }
  .mcf-bullet-list li { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 14px; color: #1a1a1a; }
  .mcf-bullet-list li::before { content: '›'; color: #f59e0b; font-weight: 800; font-size: 18px; line-height: 1; flex-shrink: 0; }
  .mcf-dot-list { list-style: none; margin: 0; padding: 0; }
  .mcf-dot-list li { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 13px; color: #1a1a1a; }
  .mcf-dot-list li::before { content: '•'; color: var(--muted); font-size: 16px; line-height: 1; flex-shrink: 0; }

  .mcf-insight-ok {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.30);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--accent-dark);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .mcf-insight-ok::before { content: ''; font-weight: 800; color: var(--accent); font-size: 16px; }
  .mcf-insight-warn {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 8px;
    padding: 12px 16px;
    color: #92400e;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
  .mcf-insight-warn::before { content: ''; font-weight: 800; color: #f59e0b; font-size: 16px; line-height: 1.1; }
  .mcf-insight-danger {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.30);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--danger);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
  .mcf-insight-danger::before { content: ''; font-size: 14px; line-height: 1.1; }

  .mcf-progress-bar {
    background: #e2e8f0;
    border-radius: 4px;
    height: 18px;
    overflow: hidden;
    position: relative;
  }
  .mcf-progress-bar .mcf-progress-fill {
    background: #f59e0b;
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
  }

  .mcf-usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
  .mcf-usage-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
  }
  .mcf-usage-card.starters { background: #fff7ed; border-color: #fed7aa; }
  .mcf-usage-card.bench { background: #f0f9ff; border-color: #bae6fd; }
  .mcf-usage-card.total { background: #f8fafc; border-color: var(--border); }
  .mcf-usage-card .mcf-usage-title { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
  .mcf-usage-card.starters .mcf-usage-title { color: #c2410c; }
  .mcf-usage-card.bench .mcf-usage-title { color: #0369a1; }
  .mcf-usage-card.total .mcf-usage-title { color: var(--muted); }
  .mcf-usage-card .mcf-usage-value { font-size: 22px; font-weight: 800; color: #1a1a1a; margin-top: 4px; }
  .mcf-usage-card .mcf-usage-detail { font-size: 11px; color: var(--muted); }

  .mcf-min-row { display: grid; grid-template-columns: 140px 1fr 50px; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
  .mcf-min-name { font-weight: 600; color: #1a1a1a; }
  .mcf-min-bar { background: #e2e8f0; border-radius: 3px; height: 14px; overflow: hidden; }
  .mcf-min-bar-fill { background: #f59e0b; height: 100%; }
  .mcf-min-bar-fill.overloaded { background: var(--danger); }
  .mcf-min-bar-fill.underused { background: #94a3b8; }
  .mcf-min-val { font-weight: 700; text-align: right; color: #1a1a1a; }

  .mcf-detail-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
  .mcf-detail-table thead th { text-align: left; padding: 8px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
  .mcf-detail-table tbody td { padding: 8px 6px; border-bottom: 1px solid #f1f5f9; color: #1a1a1a; }
  .mcf-detail-table tbody tr:hover { background: #f8fafc; }
  .mcf-load-badge { display: inline-block; background: #fee2e2; color: #b91c1c; font-weight: 700; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
  .mcf-load-badge.normal { background: #d1fae5; color: #047857; }
  .mcf-load-badge.warning { background: #fed7aa; color: #c2410c; }

  .mcf-obs-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 13px; color: #1a1a1a; }
  .mcf-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    flex-shrink: 0;
  }
  .mcf-badge.low { background: #1e40af; }
  .mcf-badge.high { background: var(--danger); }
  .mcf-badge.warn { background: #f59e0b; }
  .mcf-badge.ok { background: var(--accent); }
  .mcf-badge.foul { background: #7c3aed; }

  .mcf-footer {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    padding: 16px 0;
    margin-top: 30px;
    border-top: 1px solid var(--border);
  }

  .mcf-title-block { padding: 12px 0 16px 0; }
  .mcf-title-block .mcf-team-vs { font-size: 32px; font-weight: 800; color: #1a1a1a; line-height: 1.1; }
  .mcf-title-block .mcf-team-vs .mcf-vs { color: var(--muted); font-weight: 400; }
  .mcf-title-block .mcf-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
  .mcf-title-block .mcf-meta .mcf-home { color: #f59e0b; font-weight: 700; }
  /* v2.45: marcador grande y status en la cabecera del informe */
  .mcf-marcador {
    display: inline-block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--text);
    margin-top: 8px;
    padding: 6px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    letter-spacing: -0.02em;
    line-height: 1;
  }
  .mcf-marcador-sep { color: var(--muted); margin: 0 8px; font-size: 32px; }
  .mcf-marcador-win { border-left: 4px solid #10B981; }
  .mcf-marcador-loss { border-left: 4px solid #EF4444; }
  .mcf-marcador-draw { border-left: 4px solid #F59E0B; }
  .mcf-status {
    display: inline-block;
    margin-top: 10px;
    margin-left: 12px;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    vertical-align: middle;
  }
  .mcf-status-ok { background: rgba(16,185,129,0.15); color: #047857; border: 1px solid rgba(16,185,129,0.3); }
  .mcf-status-warn { background: rgba(245,158,11,0.18); color: #b45309; border: 1px solid rgba(245,158,11,0.3); }
  .mcf-status-bad { background: rgba(220,38,38,0.15); color: #b91c1c; border: 1px solid rgba(220,38,38,0.3); }

  /* Report header (logo + title + orange band) */
  .mcf-report { background: #fff; }
  .mcf-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0 4px 0;
  }
  .mcf-logo { display: flex; align-items: center; gap: 10px; }
  .mcf-logo-icon {
    width: 38px; height: 38px; border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 20px;
  }
  .mcf-logo-text { font-size: 18px; font-weight: 800; color: #1a1a1a; line-height: 1; }
  .mcf-logo-text .accent { color: #2563eb; }
  .mcf-logo-sub { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
  .mcf-header-right { text-align: right; }
  .mcf-gen-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
  .mcf-gen-date { font-size: 14px; font-weight: 800; color: #1a1a1a; margin-top: 2px; }
  .mcf-band { height: 4px; background: #f59e0b; border-radius: 2px; margin: 6px 0 4px 0; }

  /* ============================================================
     v2.23: INICIO REDISEÑADO (editorial + microciclo + salud urgente)
     ============================================================ */
  .inicio-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    margin-bottom: 18px;
    background: #0E0A06;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  }
  .inicio-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #B81C2C 0%, #8b1422 50%, #14110D 100%);
    z-index: 0;
  }
  .inicio-hero-bg::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184,145,72,0.25) 0%, transparent 70%);
  }
  .inicio-hero-content {
    position: relative;
    z-index: 1;
    padding: 28px 32px 24px;
    flex: 1;
  }
  .inicio-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
  }
  .inicio-hero-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.1;
    color: #fff;
  }
  .inicio-hero-name {
    background: linear-gradient(135deg, #B89148, #e6c073);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .inicio-hero-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 18px 0;
  }
  .inicio-hero-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
  }
  .inicio-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .inicio-hero-stat-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
  }
  .inicio-hero-stat-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.6);
  }
  .inicio-hero-stat-sep {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.15);
  }
  .inicio-hero-actions {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1;
    display: flex;
    gap: 8px;
  }
  .inicio-hero-actions .btn {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
  }
  .inicio-hero-actions .btn-primary {
    background: #B89148;
    color: #1F1812;
    border-color: #B89148;
  }
  .inicio-hero-actions .btn-primary:hover {
    background: #d4a35c;
  }

  .inicio-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }
  .inicio-kpi {
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
  }
  .inicio-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }
  .inicio-kpi-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: var(--text-soft);
  }
  .inicio-kpi[data-tone="primary"] { border-left-color: #B81C2C; }
  .inicio-kpi[data-tone="primary"] .inicio-kpi-icon { color: #B81C2C; }
  .inicio-kpi[data-tone="gold"] { border-left-color: #B89148; }
  .inicio-kpi[data-tone="gold"] .inicio-kpi-icon { color: #B89148; }
  .inicio-kpi[data-tone="ok"] { border-left-color: #10b981; }
  .inicio-kpi[data-tone="ok"] .inicio-kpi-icon { color: #10b981; }
  .inicio-kpi[data-tone="warn"] { border-left-color: #f59e0b; }
  .inicio-kpi[data-tone="warn"] .inicio-kpi-icon { color: #f59e0b; }
  .inicio-kpi[data-tone="danger"] { border-left-color: #dc2626; }
  .inicio-kpi[data-tone="danger"] .inicio-kpi-icon { color: #dc2626; }
  .inicio-kpi-body { flex: 1; min-width: 0; }
  .inicio-kpi-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); margin-bottom: 4px; }
  .inicio-kpi-value { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--text); }
  .inicio-kpi-suffix { font-size: 13px; font-weight: 600; color: var(--text-soft); margin-left: 2px; }
  .inicio-kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

  /* Grid principal */
  .inicio-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
    gap: 14px;
  }
  .inicio-microciclo-card { grid-column: 1; grid-row: 1; }
  .inicio-salud-card { grid-column: 2; grid-row: 1; }
  .inicio-proximos-card { grid-column: 1; grid-row: 2; }
  .inicio-quick-card { grid-column: 2; grid-row: 2; }

  /* Microciclo visual */
  .inicio-microciclo-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
  }
  .inicio-microciclo-dia {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .inicio-microciclo-dia.inicio-microciclo-hoy {
    border-color: #B81C2C;
    background: rgba(184,28,44,0.04);
  }
  .inicio-microciclo-dia.inicio-microciclo-pasado {
    opacity: 0.55;
  }
  .inicio-microciclo-dia-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-soft);
    letter-spacing: 0.04em;
  }
  .inicio-microciclo-dia-num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
  }
  .inicio-microciclo-dia-tipo {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    padding: 3px 4px;
    border-radius: 3px;
    margin: 4px 0 0 0;
  }
  .inicio-microciclo-dia[data-tipo="descanso"] .inicio-microciclo-dia-tipo {
    background: #9ca3af !important;
  }
  .inicio-microciclo-dia-titulo {
    font-size: 9.5px;
    line-height: 1.2;
    color: var(--text-soft);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Salud urgente */
  .inicio-salud-ok {
    text-align: center;
    padding: 24px 12px;
  }
  .inicio-salud-ok-icon {
    font-size: 36px;
    color: #10b981;
    font-weight: 800;
    line-height: 1;
  }
  .inicio-salud-ok-text {
    font-size: 14px;
    font-weight: 800;
    margin-top: 8px;
    color: var(--text);
  }
  .inicio-salud-ok-sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
  }
  .inicio-salud-list { display: flex; flex-direction: column; gap: 6px; }
  .inicio-salud-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--card-alt);
    border-radius: 6px;
    border-left: 3px solid transparent;
  }
  .inicio-salud-item-acwr {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    margin-left: auto;
  }
  .inicio-salud-item-info { flex: 1; min-width: 0; }
  .inicio-salud-item-nombre { font-size: 12.5px; line-height: 1.2; }
  .inicio-salud-item-msg { font-size: 10.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
  .inicio-salud-mas {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    padding: 6px;
    font-style: italic;
  }

  /* Quick actions */
  .inicio-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .inicio-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
  }
  .inicio-quick-btn:hover {
    background: rgba(184,28,44,0.05);
    border-color: rgba(184,28,44,0.2);
  }
  .inicio-quick-btn svg {
    width: 22px;
    height: 22px;
    color: var(--text-soft);
  }
  .inicio-quick-btn:hover svg {
    color: #B81C2C;
  }

  /* Empty state */
  .inicio-empty {
    text-align: center;
    padding: 20px 12px;
  }
  .inicio-empty-icon { font-size: 28px; opacity: 0.4; }
  .inicio-empty-text { font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; }

  /* Partido badge colores */
  .inicio-partido-badge.badge-hoy { background: #B81C2C; color: #fff; }
  .inicio-partido-badge.badge-semana { background: #f59e0b; color: #fff; }
  .inicio-partido-badge.badge-mes { background: #e5e7eb; color: var(--text); }

  @media (max-width: 1100px) {
    .inicio-kpis { grid-template-columns: repeat(2, 1fr); }
    .inicio-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .inicio-microciclo-card,
    .inicio-salud-card,
    .inicio-proximos-card,
    .inicio-quick-card { grid-column: 1; grid-row: auto; }
  }
  @media (max-width: 768px) {
    .inicio-hero-title { font-size: 24px; }
    .inicio-hero-stats { flex-wrap: wrap; }
    .inicio-hero-actions { position: static; padding: 0 24px 20px; }
    .inicio-microciclo-semana { grid-template-columns: repeat(4, 1fr); }
    .inicio-quick-grid { grid-template-columns: repeat(2, 1fr); }
  }

/* V11 — Control detallado de minutos por turnos */
.pm-minutes-card{margin-top:14px;border:1px solid var(--border);background:var(--card);border-radius:14px;overflow:hidden}
.pm-minutes-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border);gap:12px}
.pm-minutes-title{font-weight:800;font-size:14px}.pm-minutes-sub{font-size:11px;color:var(--muted);margin-top:2px}
.pm-minutes-live{font-size:11px;font-weight:800;padding:6px 9px;border-radius:8px;background:rgba(16,185,129,.10);color:#059669}
.pm-minutes-table-wrap{overflow-x:auto}
.pm-minutes-table{width:100%;border-collapse:collapse;min-width:820px}
.pm-minutes-table th{font-size:10px;text-transform:uppercase;letter-spacing:.45px;color:var(--muted);font-weight:800;text-align:center;padding:9px 8px;border-bottom:1px solid var(--border);background:var(--surface,#f8fafc)}
.pm-minutes-table th:first-child{text-align:left;padding-left:16px}
.pm-minutes-table td{padding:9px 8px;border-bottom:1px solid var(--border);text-align:center;font-size:12px;vertical-align:middle}
.pm-minutes-table tr:last-child td{border-bottom:0}
.pm-minutes-player{text-align:left!important;min-width:180px}.pm-minutes-player strong{display:block;font-size:12px}.pm-minutes-player span{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.pm-min-cell{font-variant-numeric:tabular-nums;font-weight:700}.pm-min-cell.active{color:#059669;background:rgba(16,185,129,.07)}
.pm-min-total{font-weight:900;font-size:14px;font-variant-numeric:tabular-nums}.pm-min-stints{font-size:11px;color:var(--muted)}
.pm-stint-list{padding:10px 16px 14px;background:var(--surface,#f8fafc);border-top:1px solid var(--border);display:none}
.pm-stint-list.open{display:block}.pm-stint-row{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:11px;border-bottom:1px dashed var(--border)}.pm-stint-row:last-child{border-bottom:0}
.pm-stint-q{font-weight:800;width:28px}.pm-stint-clock{font-variant-numeric:tabular-nums}.pm-stint-duration{margin-left:auto;font-weight:900}.pm-stint-current{color:#059669}.pm-min-expand{border:0;background:transparent;color:var(--primary);cursor:pointer;font-size:11px;font-weight:800;padding:2px 4px}
.pm-min-legend{display:flex;gap:14px;align-items:center;padding:10px 16px;color:var(--muted);font-size:10px}.pm-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:4px}.pm-dot-live{background:#10b981}
@media(max-width:900px){.pm-minutes-table{min-width:720px}.pm-minutes-head{align-items:flex-start;flex-direction:column}}

.btn-finalizar-partido{min-height:48px!important;padding:10px 16px!important;font-weight:900!important}

/* v115: compact header action */
#partido-finalizar-top-btn,
#wf-btn-finalizar {
  min-height: 34px !important;
  padding: 7px 11px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
}
#partido-finalizar-top-btn::before,
#wf-btn-finalizar::before,
.btn-finalizar-partido::before {
  content: none !important;
}

/* Senior staff access */
.staff-access-card{max-width:760px;margin:42px auto 0;padding:24px;border:1px solid var(--p-border,#dbe3ec);border-radius:16px;background:var(--card,#fff);box-shadow:var(--p-shadow,0 8px 24px rgba(15,23,42,.06))}
.staff-access-card h3{margin:4px 0 6px}.staff-invite-form{display:flex;gap:10px;margin-top:18px}.staff-invite-form input{flex:1;min-width:0}.staff-access-list{display:grid;gap:8px;margin-top:18px}.staff-access-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--p-border,#dbe3ec);border-radius:10px}.staff-access-email{font-weight:650;overflow-wrap:anywhere}.staff-access-role{font-size:12px;color:var(--p-muted,#64748b)}
.readonly-banner{position:sticky;top:0;z-index:10000;display:flex;justify-content:center;gap:8px;padding:9px 16px;background:#e0f2fe;color:#075985;border-bottom:1px solid #7dd3fc;font-size:13px;font-weight:700}.readonly-banner span{font-weight:500}
.team-access-status.is-pending{color:#9a5b05!important;background:#fff4d9!important;white-space:nowrap}
body.cc-readonly [data-write-action]{display:none!important}
@media(max-width:640px){.staff-invite-form{flex-direction:column}.staff-access-row{align-items:flex-start;flex-direction:column}}
