/* ═══════════════════════════════════════════════════════════════════════════
   SISTEMA VISUAL DEL PORTAL BULLPADEL — v1 (28/09/2026, rama prototipo)
   ═══════════════════════════════════════════════════════════════════════════
   Fuente de verdad del rediseño. Lo documenta manual/index.html, que carga
   este mismo archivo: lo que se ve en el manual es lo que hay acá.

   Decisiones cerradas (Leandro, 28/09/2026):
   - Colores de marca en pantalla: rojo #C8102E y negro #0F0F0F.
   - Tema híbrido: menú lateral, login, héroes y vitrina de producto en oscuro;
     pantallas de trabajo (tablas, formularios, Leads, Administración) en claro.
   - Una sola familia: Montserrat (400, 500, 600, 700, 800). Oswald sale.

   Cómo se usa el tema: todo componente toma sus colores de los tokens
   semánticos (--bp-fondo, --bp-texto, --bp-linea…). La clase .bp-oscuro en un
   contenedor redefine esos tokens, y los mismos componentes se ven bien sobre
   negro sin una sola regla extra.

   Todavía NO lo carga el portal: convive con css/tokens.css hasta que cada
   módulo se migre. Por eso todo lleva prefijo bp- (clases y variables) y no
   pisa nada de lo existente.
   ═══════════════════════════════════════════════════════════════════════════ */


/* Montserrat self-hosted (fonts/montserrat-latin-variable.woff2): variable,
   pesos 400-800, subset latin, 38 KB. Bajada de Google Fonts el 28/09/2026;
   sin CDN, igual que Oswald. */
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/montserrat-latin-variable.woff2') format('woff2');
}


/* El atributo hidden gana siempre (display de componentes lo pisaba). */
[hidden] { display: none !important; }


/* ── 1. PALETA (valores crudos — no usarlos directo en componentes) ─────── */
:root {
  /* Marca */
  --bp-rojo:        #C8102E;   /* PMS 186 C. Acción principal y selección */
  --bp-rojo-700:    #A30D24;   /* hover */
  --bp-rojo-800:    #8A0B1E;   /* presionado; texto rojo sobre tinte rojo */
  --bp-rojo-claro:  #FF5C72;   /* rojo para TEXTO o ícono sobre oscuro (6,4:1) */
  --bp-negro:       #0F0F0F;
  --bp-blanco:      #FFFFFF;

  /* Neutros cálidos, oscuros — superficies del lado negro */
  --bp-n-950: #0F0F0F;
  --bp-n-900: #161513;
  --bp-n-850: #1E1D1B;
  --bp-n-800: #2A2A26;
  --bp-n-700: #3A3A36;

  /* Neutros cálidos, claros — superficies del lado claro */
  --bp-n-50:  #F6F5F3;   /* papel: fondo de las pantallas de trabajo */
  --bp-n-100: #EFEEEB;
  --bp-n-200: #E4E2DE;

  /* Estados — siempre con ícono o punto, nunca solo el color */
  --bp-exito:        #1F7A4D;  --bp-exito-tinte:  #E8F3EC;
  --bp-alerta:       #9A5B00;  --bp-alerta-tinte: #FBF1DE;
  --bp-error:        #B42318;  --bp-error-tinte:  #FDECEA;
  --bp-info:         #2563A8;  --bp-info-tinte:   #EAF1F9;
}


/* ── 2. TOKENS SEMÁNTICOS — tema claro (por defecto) ────────────────────── */
:root {
  --bp-fondo:        var(--bp-n-50);
  --bp-superficie:   var(--bp-blanco);
  --bp-superficie-2: rgba(15, 15, 1, .03);   /* panel tenue dentro de una card */
  --bp-hover:        rgba(15, 15, 1, .04);

  --bp-texto:        #141414;                /* 16,9:1 sobre papel */
  --bp-texto-2:      #5C5A55;                /* secundario · 6,3:1 */
  --bp-texto-3:      #6B6964;                /* terciario, ayudas · 5,0:1 */
  --bp-texto-inv:    var(--bp-blanco);       /* sobre rojo o negro */

  --bp-linea:        rgba(15, 15, 1, .08);
  --bp-linea-fuerte: rgba(15, 15, 1, .15);
  --bp-foco:         rgba(200, 16, 46, .45);

  --bp-acento:       var(--bp-rojo);         /* botón primario, ítem activo */
  --bp-acento-texto: var(--bp-rojo);         /* rojo como texto: 5,4:1 sobre papel */
  --bp-acento-tinte: #FDEEEF;                /* fondo de pastilla o selección */

  --bp-secundario:        var(--bp-negro);   /* botón secundario */
  --bp-secundario-texto:  var(--bp-blanco);

  color-scheme: light;
}

/* Tema oscuro, por contenedor: menú lateral, login, héroes, vitrina. */
.bp-oscuro {
  --bp-fondo:        var(--bp-n-950);
  --bp-superficie:   var(--bp-n-900);
  --bp-superficie-2: var(--bp-n-850);
  --bp-hover:        rgba(255, 255, 255, .06);

  --bp-texto:        var(--bp-blanco);       /* 19:1 */
  --bp-texto-2:      #B9B7B2;                /* 9,6:1 */
  --bp-texto-3:      #8C8A85;                /* 5,6:1 */

  --bp-linea:        rgba(255, 255, 255, .08);
  --bp-linea-fuerte: rgba(255, 255, 255, .16);
  --bp-foco:         rgba(255, 92, 114, .55);

  --bp-acento-texto: var(--bp-rojo-claro);   /* el rojo de marca no llega a 4,5:1 sobre negro */
  --bp-acento-tinte: rgba(200, 16, 46, .18);

  --bp-secundario:        var(--bp-blanco);  /* en oscuro, el secundario es blanco */
  --bp-secundario-texto:  var(--bp-negro);

  background: var(--bp-fondo);
  color: var(--bp-texto);
  color-scheme: dark;
}


/* ── 3. TIPOGRAFÍA ──────────────────────────────────────────────────────── */
:root {
  --bp-fuente: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* tamaño / interlineado — peso — tracking */
  --bp-t-display: 800 40px/44px var(--bp-fuente);  /* héroe, login */
  --bp-t-h1:      700 28px/34px var(--bp-fuente);  /* título de módulo */
  --bp-t-h2:      700 20px/28px var(--bp-fuente);  /* título de sección */
  --bp-t-h3:      600 16px/24px var(--bp-fuente);  /* subtítulo, título de card */
  --bp-t-lectura: 400 16px/26px var(--bp-fuente);  /* texto largo: capacitaciones */
  --bp-t-cuerpo:  400 14px/22px var(--bp-fuente);  /* texto de interfaz */
  --bp-t-fuerte:  600 14px/22px var(--bp-fuente);  /* énfasis, botones, celdas clave */
  --bp-t-chico:   500 12px/18px var(--bp-fuente);  /* metadatos, ayudas */
  --bp-t-etiqueta:600 11px/16px var(--bp-fuente);  /* eyebrow, label, encabezado de tabla (MAYÚSCULAS) */
  --bp-t-numero:  700 32px/36px var(--bp-fuente);  /* KPI */
}
@media (max-width: 720px) {
  :root {
    --bp-t-display: 800 30px/34px var(--bp-fuente);
    --bp-t-h1:      700 24px/30px var(--bp-fuente);
    --bp-t-numero:  700 26px/30px var(--bp-fuente);
  }
}

.bp-display  { font: var(--bp-t-display); letter-spacing: -.02em; text-wrap: balance; }
.bp-h1       { font: var(--bp-t-h1);      letter-spacing: -.015em; text-wrap: balance; }
.bp-h2       { font: var(--bp-t-h2);      letter-spacing: -.01em; }
.bp-h3       { font: var(--bp-t-h3); }
.bp-lectura  { font: var(--bp-t-lectura); max-width: 68ch; }
.bp-cuerpo   { font: var(--bp-t-cuerpo); }
.bp-fuerte   { font: var(--bp-t-fuerte); }
.bp-chico    { font: var(--bp-t-chico);   color: var(--bp-texto-2); }
.bp-etiqueta { font: var(--bp-t-etiqueta); letter-spacing: .08em; text-transform: uppercase; color: var(--bp-texto-3); }
.bp-numero   { font: var(--bp-t-numero);  letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bp-texto-2  { color: var(--bp-texto-2); }
.bp-texto-3  { color: var(--bp-texto-3); }
.bp-num      { font-variant-numeric: tabular-nums; }


/* ── 4. ESPACIO, RADIOS, SOMBRAS, MOVIMIENTO ────────────────────────────── */
:root {
  /* Escala de 4 px. Nada fuera de estos valores. */
  --bp-e-1: 4px;  --bp-e-2: 8px;  --bp-e-3: 12px; --bp-e-4: 16px;
  --bp-e-5: 20px; --bp-e-6: 24px; --bp-e-8: 32px; --bp-e-10: 40px;
  --bp-e-12: 48px; --bp-e-16: 64px;

  --bp-radio-sm:   8px;    /* botones, inputs, ítems de menú */
  --bp-radio-md:   12px;   /* cards, tablas */
  --bp-radio-lg:   16px;   /* modales, drawers, héroes, card de producto */
  --bp-radio-pill: 999px;  /* pastillas, tabs de vista, switches */

  /* Las cards NO llevan sombra: se separan con línea. La sombra es solo para
     lo que flota sobre la página. */
  --bp-sombra-reposo: 0 1px 2px rgba(15, 15, 1, .06), 0 4px 12px rgba(15, 15, 1, .04); /* card de producto quieta */
  --bp-sombra-flota:  0 8px 24px rgba(15, 15, 1, .12);           /* menú desplegable, tooltip */
  --bp-sombra-modal:  0 24px 64px rgba(15, 15, 1, .24);          /* modal, drawer */

  /* Movimiento (propuesta IA/08-movimiento, 28/09). Seis duraciones y tres curvas. */
  --bp-dur-instante:  80ms;   /* respuesta al toque */
  --bp-dur-rapido:   120ms;   /* hover, foco, fundido de contenido */
  --bp-dur-base:     200ms;   /* indicador de tab, toast, modal */
  --bp-dur-panel:    280ms;   /* drawer, cambio de módulo, entrada de cards */
  --bp-dur-lento:    400ms;   /* barra de progreso, trazo del ingreso, logro */
  --bp-dur-conteo:   500ms;   /* número KPI que cuenta (una vez por sesión) */
  --bp-escalon:       40ms;   /* stagger; tope 6 elementos */
  --bp-curva:        cubic-bezier(.2, 0, 0, 1);     /* algo cambia en pantalla */
  --bp-curva-entra:  cubic-bezier(.05, .7, .1, 1);  /* algo aparece */
  --bp-curva-sale:   cubic-bezier(.3, 0, .8, .15);  /* algo se va */
  --bp-curva-lineal: linear;                        /* solo carga y progreso indeterminado */
  --bp-dist: 1;   /* desplazamientos: calc(8px * var(--bp-dist)); 0 con movimiento reducido */
  --bp-mov-rapido: var(--bp-dur-rapido) var(--bp-curva);
  --bp-mov-base:   var(--bp-dur-base)   var(--bp-curva);

  --bp-control-sm: 32px;   /* alto de botón o input chico */
  --bp-control-md: 40px;   /* por defecto */
  --bp-control-lg: 48px;   /* acción principal de una pantalla, login */

  --bp-lateral:            248px;
  --bp-lateral-colapsado:  72px;
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --bp-dist: 0; --bp-dur-instante: 0ms; --bp-dur-base: 120ms; --bp-dur-panel: 120ms;
    --bp-dur-lento: 0ms; --bp-dur-conteo: 0ms; --bp-escalon: 0ms;
    --bp-mov-rapido: 0ms; --bp-mov-base: 0ms;
  }
}


/* ── 5. BOTONES ─────────────────────────────────────────────────────────────
   Cuatro variantes y ninguna más:
   primario  — rojo. UNA por pantalla o por bloque: la acción que se vino a hacer.
   secundario— negro (blanco en oscuro). Acción con peso que no es la principal.
   contorno  — lo repetitivo: "Ver ficha" en cada fila, "Filtrar", "Cancelar".
   texto     — acciones terciarias dentro de un texto o de una card.
   Peligro no es una variante de color: es un contorno con texto de error, y
   siempre pide confirmación. */
.bp-btn {
  --_alto: var(--bp-control-md);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--bp-e-2);
  height: var(--_alto); padding: 0 var(--bp-e-4);
  border: 1px solid transparent; border-radius: var(--bp-radio-sm);
  font: var(--bp-t-fuerte); white-space: nowrap; text-decoration: none;
  cursor: pointer; user-select: none;
  transition: background var(--bp-mov-rapido), border-color var(--bp-mov-rapido), color var(--bp-mov-rapido), transform var(--bp-mov-rapido);
}
.bp-btn svg { width: 18px; height: 18px; flex: none; }
.bp-btn:focus-visible { outline: 3px solid var(--bp-foco); outline-offset: 2px; }
.bp-btn:active:not(:disabled) { transform: translateY(1px); }
.bp-btn:disabled, .bp-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.bp-btn--primario   { background: var(--bp-rojo); color: var(--bp-blanco); }
.bp-btn--primario:hover:not(:disabled)  { background: var(--bp-rojo-700); }
.bp-btn--primario:active:not(:disabled) { background: var(--bp-rojo-800); }

.bp-btn--secundario { background: var(--bp-secundario); color: var(--bp-secundario-texto); }
.bp-btn--secundario:hover:not(:disabled) { opacity: .88; }

.bp-btn--contorno   { background: transparent; color: var(--bp-texto); border-color: var(--bp-linea-fuerte); }
.bp-btn--contorno:hover:not(:disabled) { background: var(--bp-hover); border-color: var(--bp-texto-3); }

.bp-btn--texto      { background: transparent; color: var(--bp-acento-texto); padding: 0 var(--bp-e-2); }
.bp-btn--texto:hover:not(:disabled) { background: var(--bp-acento-tinte); }

.bp-btn--peligro    { background: transparent; color: var(--bp-error); border-color: currentColor; }
.bp-oscuro .bp-btn--peligro { color: var(--bp-rojo-claro); }
.bp-btn--peligro:hover:not(:disabled) { background: var(--bp-error-tinte); }
.bp-oscuro .bp-btn--peligro:hover:not(:disabled) { background: var(--bp-acento-tinte); }

.bp-btn--sm { --_alto: var(--bp-control-sm); padding: 0 var(--bp-e-3); font-size: 13px; }
.bp-btn--lg { --_alto: var(--bp-control-lg); padding: 0 var(--bp-e-6); font-size: 15px; }
.bp-btn--icono { width: var(--_alto); padding: 0; }
.bp-btn--bloque { width: 100%; }

.bp-btn.is-cargando { color: transparent !important; position: relative; pointer-events: none; }
.bp-btn.is-cargando::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--bp-blanco); border-right-color: transparent;
  animation: bp-giro .7s linear infinite;
}
.bp-btn--contorno.is-cargando::after, .bp-btn--texto.is-cargando::after { border-color: var(--bp-texto); border-right-color: transparent; }
@keyframes bp-giro { to { transform: rotate(360deg); } }


/* ── 6. PASTILLAS ───────────────────────────────────────────────────────────
   estado  — dice en qué situación está algo. Punto + texto, nunca solo color.
   filtro  — se puede tocar; seleccionada = negro (blanco en oscuro). Lleva conteo.
   etiqueta— clasifica (línea de producto, camino del lead). No se toca. */
.bp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: var(--bp-radio-pill);
  font: 600 12px/1 var(--bp-fuente); white-space: nowrap;
  background: var(--bp-superficie-2); color: var(--bp-texto-2);
  border: 1px solid var(--bp-linea);
}
.bp-pill--estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bp-pill--exito  { background: var(--bp-exito-tinte);  color: var(--bp-exito);  border-color: transparent; }
.bp-pill--alerta { background: var(--bp-alerta-tinte); color: var(--bp-alerta); border-color: transparent; }
.bp-pill--error  { background: var(--bp-error-tinte);  color: var(--bp-error);  border-color: transparent; }
.bp-pill--info   { background: var(--bp-info-tinte);   color: var(--bp-info);   border-color: transparent; }
.bp-pill--marca  { background: var(--bp-acento-tinte); color: var(--bp-rojo-800); border-color: transparent; }
.bp-oscuro .bp-pill--marca { color: var(--bp-rojo-claro); }
.bp-oscuro .bp-pill--exito  { background: rgba(31,122,77,.22);  color: #7FD1A6; }
.bp-oscuro .bp-pill--alerta { background: rgba(154,91,0,.28);   color: #F2C46D; }
.bp-oscuro .bp-pill--error  { background: rgba(180,35,24,.28);  color: #FF9A8F; }
.bp-oscuro .bp-pill--info   { background: rgba(37,99,168,.28);  color: #93BDF0; }

button.bp-pill--filtro, .bp-pill--filtro { height: 32px; padding: 0 14px; font-size: 13px; cursor: pointer; background: transparent; color: var(--bp-texto); border-color: var(--bp-linea-fuerte); }
.bp-pill--filtro:hover { background: var(--bp-hover); }
.bp-pill--filtro[aria-pressed="true"] { background: var(--bp-secundario); color: var(--bp-secundario-texto); border-color: transparent; }
.bp-pill--filtro:focus-visible { outline: 3px solid var(--bp-foco); outline-offset: 2px; }
.bp-pill__conteo { font-variant-numeric: tabular-nums; opacity: .7; }

.bp-pill--etiqueta { height: 22px; padding: 0 9px; font: 700 10.5px/1 var(--bp-fuente); letter-spacing: .04em; text-transform: uppercase; border: 0; }


/* ── 7. CAMPOS ──────────────────────────────────────────────────────────── */
.bp-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bp-campo__label { font: 600 13px/18px var(--bp-fuente); color: var(--bp-texto); }
.bp-campo__label .bp-req { color: var(--bp-acento-texto); margin-left: 2px; }
.bp-campo__ayuda { font: var(--bp-t-chico); color: var(--bp-texto-3); }
.bp-campo__error { font: var(--bp-t-chico); color: var(--bp-error); display: flex; gap: 6px; align-items: center; }
.bp-oscuro .bp-campo__error { color: #FF9A8F; }

.bp-input, .bp-select, .bp-textarea {
  width: 100%; height: var(--bp-control-md); padding: 0 var(--bp-e-3);
  font: var(--bp-t-cuerpo); color: var(--bp-texto);
  background: var(--bp-superficie); border: 1px solid var(--bp-linea-fuerte); border-radius: var(--bp-radio-sm);
  transition: border-color var(--bp-mov-rapido), box-shadow var(--bp-mov-rapido);
}
.bp-oscuro .bp-input, .bp-oscuro .bp-select, .bp-oscuro .bp-textarea { background: var(--bp-superficie-2); }
.bp-textarea { height: auto; min-height: 96px; padding: var(--bp-e-3); resize: vertical; }
.bp-input::placeholder, .bp-textarea::placeholder { color: var(--bp-texto-3); }
.bp-input:hover, .bp-select:hover, .bp-textarea:hover { border-color: var(--bp-texto-3); }
.bp-input:focus, .bp-select:focus, .bp-textarea:focus { outline: none; border-color: var(--bp-acento); box-shadow: 0 0 0 3px var(--bp-foco); }
.bp-input:disabled, .bp-select:disabled { background: var(--bp-superficie-2); color: var(--bp-texto-3); cursor: not-allowed; }
.bp-campo.is-error .bp-input, .bp-campo.is-error .bp-select, .bp-campo.is-error .bp-textarea { border-color: var(--bp-error); }
.bp-select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238C8A85' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.bp-busqueda { position: relative; }
.bp-busqueda svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--bp-texto-3); pointer-events: none; }
.bp-busqueda .bp-input { padding-left: 38px; }

.bp-check { display: inline-flex; align-items: center; gap: var(--bp-e-2); font: var(--bp-t-cuerpo); cursor: pointer; }
.bp-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--bp-rojo); cursor: pointer; }

.bp-switch { display: inline-flex; align-items: center; gap: var(--bp-e-3); font: var(--bp-t-cuerpo); cursor: pointer; }
.bp-switch input { appearance: none; margin: 0; width: 36px; height: 20px; border-radius: var(--bp-radio-pill); background: var(--bp-linea-fuerte); position: relative; cursor: pointer; transition: background var(--bp-mov-base); flex: none; }
.bp-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--bp-blanco); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: translate var(--bp-mov-base); }
.bp-switch input:checked { background: var(--bp-rojo); }
.bp-switch input:checked::after { translate: 16px 0; }
.bp-switch input:focus-visible { outline: 3px solid var(--bp-foco); outline-offset: 2px; }


/* ── 8. CARDS ───────────────────────────────────────────────────────────────
   Sin sombra. La card se separa del fondo por el color de superficie y una
   línea. Una card por bloque de sentido: no anidar cards dentro de cards
   (adentro se usa .bp-panel). */
.bp-card { background: var(--bp-superficie); border: 1px solid var(--bp-linea); border-radius: var(--bp-radio-md); padding: var(--bp-e-6); }
.bp-card__cabecera { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--bp-e-4); margin-bottom: var(--bp-e-4); }
.bp-card--interactiva { cursor: pointer; transition: border-color var(--bp-mov-rapido), background var(--bp-mov-rapido); }
.bp-card--interactiva:hover { border-color: var(--bp-linea-fuerte); background: color-mix(in srgb, var(--bp-superficie) 96%, var(--bp-texto)); }
.bp-panel { background: var(--bp-superficie-2); border-radius: var(--bp-radio-sm); padding: var(--bp-e-4); }

/* KPI: etiqueta arriba, número grande, contexto abajo. */
.bp-kpi { display: flex; flex-direction: column; gap: var(--bp-e-1); padding: var(--bp-e-5); }
.bp-kpi__nota { font: var(--bp-t-chico); color: var(--bp-texto-3); }
.bp-kpi--alerta { border-color: var(--bp-rojo); }
.bp-kpi--alerta .bp-numero, .bp-kpi--alerta .bp-kpi__nota { color: var(--bp-acento-texto); }

/* Card de producto (Leandro, 28/09): clara y corta, como la del portal actual
   pero con mucha menos info. Pala sobre un gris un tono más oscuro que la página, borde marcado y sombra suave en reposo; abajo línea, nombre,
   una línea de para quién y "Ver ficha". Toda la card es el link (el ::after
   del nombre la cubre). Comparar va aparte, redondo, arriba a la derecha.
   Hover sobre la CARD, nunca sobre la foto: sube 3 px y gana borde y sombra.
   Solo con mouse: en la tablet del mostrador no hay hover. */
.bp-producto { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--bp-superficie); color: var(--bp-texto); border: 1px solid var(--bp-linea-fuerte); border-radius: var(--bp-radio-lg);
  box-shadow: var(--bp-sombra-reposo);   /* Leandro, 28/09: que se despegue del fondo */
  transition: transform var(--bp-dur-base) var(--bp-curva), border-color var(--bp-mov-rapido), box-shadow var(--bp-dur-base) var(--bp-curva); }
@media (hover: hover) and (pointer: fine) {
  .bp-producto:hover { transform: translateY(calc(-3px * var(--bp-dist))); border-color: var(--bp-linea-fuerte); box-shadow: var(--bp-sombra-flota); }
  .bp-producto:hover .bp-producto__ver svg { transform: translateX(calc(3px * var(--bp-dist))); }
}
.bp-producto__foto { height: 248px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: var(--bp-e-5) var(--bp-e-4); background: var(--bp-n-100); border-bottom: 1px solid var(--bp-linea); }
.bp-producto__foto img { height: 100%; width: auto; max-width: 100%; min-width: 0; object-fit: contain; mix-blend-mode: multiply; }
.bp-producto__cuerpo { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--bp-e-1); padding: var(--bp-e-4) var(--bp-e-4) var(--bp-e-5); }
.bp-producto__cuerpo .bp-pill--etiqueta { margin-bottom: 2px; }
.bp-producto__nombre { font: var(--bp-t-h3); overflow-wrap: anywhere; }
.bp-producto__link { color: inherit; text-decoration: none; }
.bp-producto__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.bp-producto__link:focus-visible { outline: none; }
.bp-producto__link:focus-visible::after { outline: 3px solid var(--bp-foco); outline-offset: -3px; }
.bp-producto__para { font: var(--bp-t-chico); color: var(--bp-texto-2); overflow-wrap: anywhere; }
.bp-producto__nota { margin-top: var(--bp-e-1); }
.bp-producto__ver { margin-top: auto; padding-top: var(--bp-e-3); display: inline-flex; align-items: center; gap: 2px; font: var(--bp-t-fuerte); color: var(--bp-acento-texto); }
.bp-producto__ver svg { width: 16px; height: 16px; transition: transform var(--bp-dur-base) var(--bp-curva); }
.bp-producto__comparar { position: absolute; top: var(--bp-e-3); right: var(--bp-e-3); z-index: 2; width: var(--bp-control-sm); height: var(--bp-control-sm);
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--bp-linea-fuerte); background: var(--bp-superficie); color: var(--bp-texto-2); cursor: pointer;
  transition: background var(--bp-mov-rapido), color var(--bp-mov-rapido), border-color var(--bp-mov-rapido); }
.bp-producto__comparar svg { width: 16px; height: 16px; }
.bp-producto__comparar:hover { color: var(--bp-texto); border-color: var(--bp-texto-3); }
.bp-producto__comparar:focus-visible { outline: 3px solid var(--bp-foco); outline-offset: 2px; }
.bp-producto__icono-check { display: none; }
.bp-producto__comparar[aria-pressed="true"] { background: var(--bp-acento-tinte); border-color: var(--bp-acento-texto); color: var(--bp-acento-texto); }
.bp-producto__comparar[aria-pressed="true"] .bp-producto__icono-comparar { display: none; }
.bp-producto__comparar[aria-pressed="true"] .bp-producto__icono-check { display: grid; }
/* Variante con texto y acciones propias (equivalentes del Comparador): sin link
   que cubra la card, los botones van al pie. */
.bp-producto__texto { font: var(--bp-t-chico); color: var(--bp-texto-2); }
.bp-producto__acciones { margin-top: auto; padding-top: var(--bp-e-3); align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: var(--bp-e-2); }
.bp-producto--chica .bp-producto__foto { height: 200px; }
@media (max-width: 720px) {
  .bp-producto__foto { height: 176px; padding: var(--bp-e-4) var(--bp-e-3); }
  .bp-producto--chica .bp-producto__foto { height: 150px; }
  .bp-producto__cuerpo { padding: var(--bp-e-3) var(--bp-e-3) var(--bp-e-4); }
  .bp-producto__comparar { top: var(--bp-e-2); right: var(--bp-e-2); }
}


/* ── 9. NAVEGACIÓN ──────────────────────────────────────────────────────────
   Dos niveles y un control para cada uno (ver manual, sección Navegación):
   1. Menú lateral: SOLO módulos, en grupos. Siempre oscuro.
   2. Cabecera de módulo: título + tabs de sub-sección (subrayadas).
      Si una sub-sección tiene varias vistas del mismo dato, un selector de
      vista (segmentado) a la derecha. Los filtros van como pastillas. */

/* 9.1 Menú lateral */
.bp-lateral {
  width: var(--bp-lateral); display: flex; flex-direction: column; gap: var(--bp-e-1);
  padding: var(--bp-e-4) var(--bp-e-3); background: var(--bp-n-950); color: var(--bp-blanco);
  border-right: 1px solid rgba(255,255,255,.06);
}
.bp-lateral__marca { display: flex; align-items: center; gap: var(--bp-e-3); padding: var(--bp-e-1) var(--bp-e-2) var(--bp-e-4); }
.bp-lateral__nombre { font: 700 14px/1.2 var(--bp-fuente); color: var(--bp-blanco); letter-spacing: -.01em; }

/* Isotipo: la B blanca sobre el rojo oficial. Es la marca del portal
   (Leandro, 28/09): lateral, login, ingreso, favicon. El PNG es la B sola
   (img/marca/iso-b-blanca.png); el cuadrado rojo lo pone el CSS, así el rojo
   es siempre #C8102E exacto. Versiones ya compuestas: img/marca/iso-bullpadel-*.png */
.bp-iso { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--bp-radio-sm); background: var(--bp-rojo); }
.bp-iso img { width: 74%; height: auto; display: block; }
.bp-iso--lg { width: 56px; height: 56px; border-radius: var(--bp-radio-md); }
.bp-lateral__sesion { display: flex; align-items: center; gap: var(--bp-e-3); padding: var(--bp-e-3); margin-bottom: var(--bp-e-3); border-radius: var(--bp-radio-md); background: var(--bp-n-900); border: 1px solid rgba(255,255,255,.06); }
.bp-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bp-rojo); color: var(--bp-blanco); font: 700 12px/1 var(--bp-fuente); flex: none; }
.bp-lateral__grupo { font: var(--bp-t-etiqueta); letter-spacing: .08em; text-transform: uppercase; color: #8C8A85; padding: var(--bp-e-4) var(--bp-e-3) var(--bp-e-2); }
.bp-lateral__item {
  display: flex; align-items: center; gap: var(--bp-e-3); height: 40px; padding: 0 var(--bp-e-3);
  border-radius: var(--bp-radio-sm); color: #B9B7B2; text-decoration: none;
  font: 500 14px/1 var(--bp-fuente); transition: background var(--bp-mov-rapido), color var(--bp-mov-rapido);
}
.bp-lateral__item svg { width: 20px; height: 20px; flex: none; }
.bp-lateral__item:hover { background: rgba(255,255,255,.06); color: var(--bp-blanco); }
.bp-lateral__item[aria-current="page"] { background: var(--bp-rojo); color: var(--bp-blanco); font-weight: 600; }
.bp-lateral__item:focus-visible { outline: 3px solid rgba(255,92,114,.55); outline-offset: 1px; }
.bp-lateral__conteo { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--bp-radio-pill); background: rgba(255,255,255,.1); color: var(--bp-blanco); font: 700 11px/20px var(--bp-fuente); text-align: center; font-variant-numeric: tabular-nums; }
.bp-lateral__item[aria-current="page"] .bp-lateral__conteo { background: rgba(0,0,0,.22); }
.bp-lateral__pie { margin-top: auto; padding-top: var(--bp-e-3); border-top: 1px solid rgba(255,255,255,.06); }

/* 9.2 Cabecera de módulo */
.bp-modulo-cabecera { display: flex; flex-direction: column; gap: var(--bp-e-4); padding-bottom: 0; border-bottom: 1px solid var(--bp-linea); margin-bottom: var(--bp-e-6); }
.bp-modulo-cabecera__fila { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--bp-e-4); flex-wrap: wrap; }
.bp-modulo-cabecera__desc { font: var(--bp-t-cuerpo); color: var(--bp-texto-2); max-width: 60ch; margin-top: var(--bp-e-1); }
.bp-modulo-cabecera__acciones { display: flex; gap: var(--bp-e-2); flex-wrap: wrap; }

/* 9.3 Tabs de sub-sección */
.bp-tabs { display: flex; gap: var(--bp-e-6); overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
.bp-tabs::-webkit-scrollbar { display: none; }
.bp-tab {
  position: relative; display: inline-flex; align-items: center; gap: var(--bp-e-2);
  height: 44px; padding: 0; background: none; border: 0; cursor: pointer; white-space: nowrap;
  font: 600 14px/1 var(--bp-fuente); color: var(--bp-texto-3); text-decoration: none;
  border-bottom: 2px solid transparent; transition: color var(--bp-mov-rapido), border-color var(--bp-mov-rapido);
}
.bp-tab:hover { color: var(--bp-texto); }
.bp-tab[aria-selected="true"] { color: var(--bp-texto); border-bottom-color: var(--bp-rojo); }
.bp-tab:focus-visible { outline: 3px solid var(--bp-foco); outline-offset: -3px; border-radius: 4px; }
.bp-tab .bp-lateral__conteo { background: var(--bp-superficie-2); color: var(--bp-texto-2); }
.bp-tab[aria-selected="true"] .bp-lateral__conteo { background: var(--bp-acento-tinte); color: var(--bp-acento-texto); }

/* 9.4 Selector de vista (segmentado) */
.bp-segmentado { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px; gap: 2px; border-radius: var(--bp-radio-pill); background: var(--bp-superficie-2); border: 1px solid var(--bp-linea); }
.bp-segmentado button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px;
  border: 0; border-radius: var(--bp-radio-pill); background: transparent; cursor: pointer;
  font: 600 13px/1 var(--bp-fuente); color: var(--bp-texto-2);
}
.bp-segmentado button svg { width: 16px; height: 16px; }
.bp-segmentado button:hover { color: var(--bp-texto); }
.bp-segmentado button[aria-pressed="true"] { background: var(--bp-superficie); color: var(--bp-texto); box-shadow: 0 1px 2px rgba(15,15,1,.12); }
.bp-oscuro .bp-segmentado button[aria-pressed="true"] { background: var(--bp-n-700); }
.bp-segmentado button:focus-visible { outline: 3px solid var(--bp-foco); outline-offset: 1px; }

/* 9.5 Migas: solo dentro de una ficha */
.bp-migas { display: flex; align-items: center; gap: var(--bp-e-2); font: var(--bp-t-chico); color: var(--bp-texto-3); }
.bp-migas a { color: var(--bp-texto-2); text-decoration: none; }
.bp-migas a:hover { color: var(--bp-texto); text-decoration: underline; }
.bp-migas [aria-current] { color: var(--bp-texto); font-weight: 600; }


/* ── 10. TABLA ──────────────────────────────────────────────────────────── */
.bp-tabla-caja { background: var(--bp-superficie); border: 1px solid var(--bp-linea); border-radius: var(--bp-radio-md); overflow: hidden; }
.bp-tabla-scroll { overflow-x: auto; position: relative; }   /* contiene lo absoluto (textos solo para lectores) */
.bp-tabla { width: 100%; border-collapse: collapse; font: var(--bp-t-cuerpo); color: var(--bp-texto); }
.bp-tabla th {
  text-align: left; padding: 12px var(--bp-e-4); white-space: nowrap;
  font: var(--bp-t-etiqueta); letter-spacing: .08em; text-transform: uppercase; color: var(--bp-texto-3);
  background: var(--bp-superficie-2); border-bottom: 1px solid var(--bp-linea);
}
.bp-tabla td { padding: 14px var(--bp-e-4); border-bottom: 1px solid var(--bp-linea); vertical-align: middle; }
.bp-tabla tr:last-child td { border-bottom: 0; }
.bp-tabla tbody tr:hover td { background: var(--bp-hover); }
.bp-tabla .bp-num, .bp-tabla th.bp-num { text-align: right; }
.bp-tabla__principal { font-weight: 600; }
.bp-tabla__sub { display: block; font: var(--bp-t-chico); color: var(--bp-texto-3); }
.bp-tabla__acciones { text-align: right; white-space: nowrap; }
.bp-tabla-pie { display: flex; align-items: center; justify-content: space-between; gap: var(--bp-e-3); padding: var(--bp-e-3) var(--bp-e-4); border-top: 1px solid var(--bp-linea); font: var(--bp-t-chico); color: var(--bp-texto-3); }


/* ── 11. AVISOS, VACÍOS, PROGRESO ───────────────────────────────────────── */
.bp-aviso { display: flex; gap: var(--bp-e-3); align-items: flex-start; padding: var(--bp-e-3) var(--bp-e-4); border-radius: var(--bp-radio-sm); font: var(--bp-t-cuerpo); }
.bp-aviso svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.bp-aviso strong { font-weight: 600; }
.bp-aviso--info   { background: var(--bp-info-tinte);   color: #1B4A80; }
.bp-aviso--exito  { background: var(--bp-exito-tinte);  color: #175C3A; }
.bp-aviso--alerta { background: var(--bp-alerta-tinte); color: #6E4100; }
.bp-aviso--error  { background: var(--bp-error-tinte);  color: #8E1B12; }

.bp-vacio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--bp-e-2); padding: var(--bp-e-12) var(--bp-e-6); color: var(--bp-texto-2); }
.bp-vacio__icono { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bp-superficie-2); color: var(--bp-texto-3); margin-bottom: var(--bp-e-2); }
.bp-vacio__icono svg { width: 22px; height: 22px; }

.bp-progreso { height: 6px; border-radius: var(--bp-radio-pill); background: var(--bp-superficie-2); overflow: hidden; }
.bp-progreso > span { display: block; height: 100%; border-radius: inherit; background: var(--bp-rojo); }

.bp-puntaje { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font: 700 13px/1 var(--bp-fuente); font-variant-numeric: tabular-nums; }
.bp-puntaje--alto  { background: var(--bp-rojo); color: var(--bp-blanco); }
.bp-puntaje--medio { background: var(--bp-acento-tinte); color: var(--bp-rojo-800); box-shadow: inset 0 0 0 1px rgba(200,16,46,.35); }
.bp-puntaje--bajo  { background: var(--bp-superficie-2); color: var(--bp-texto-2); box-shadow: inset 0 0 0 1px var(--bp-linea-fuerte); }


/* ── 12. MODAL Y PANEL LATERAL (drawer) ─────────────────────────────────── */
.bp-velo { position: fixed; inset: 0; background: rgba(15,15,1,.48); display: grid; place-items: center; padding: var(--bp-e-4); z-index: 100; }
.bp-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bp-superficie); color: var(--bp-texto); border-radius: var(--bp-radio-lg); box-shadow: var(--bp-sombra-modal); }
.bp-modal__cabecera { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--bp-e-4); padding: var(--bp-e-6) var(--bp-e-6) var(--bp-e-4); }
.bp-modal__cuerpo { padding: 0 var(--bp-e-6) var(--bp-e-6); display: flex; flex-direction: column; gap: var(--bp-e-4); }
/* El pie queda a la vista aunque el cuerpo sea más alto que la pantalla (certificado de
   Capacitaciones en celular, 08/10/2026). Como --bp-superficie-2 es translúcida en el tema
   claro, va sobre --bp-superficie para que el contenido no se vea por detrás. 100dvh: en
   celular 100vh cuenta también lo que tapa la barra del navegador. */
@supports (height: 100dvh) { .bp-modal { max-height: calc(100dvh - 32px); } }
.bp-modal { scroll-padding-bottom: 72px; }   /* un campo enfocado con Tab no queda debajo del pie */
.bp-modal__pie { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: var(--bp-e-2); padding: var(--bp-e-4) var(--bp-e-6); border-top: 1px solid var(--bp-linea); background: linear-gradient(var(--bp-superficie-2), var(--bp-superficie-2)), var(--bp-superficie); }
.bp-drawer { width: min(480px, 100%); height: 100%; background: var(--bp-superficie); border-left: 1px solid var(--bp-linea); box-shadow: var(--bp-sombra-modal); display: flex; flex-direction: column; }
.bp-drawer .bp-modal__cuerpo { flex: 1; overflow: auto; }


/* ── 13. COLORES DE DATOS ───────────────────────────────────────────────────
   Categorías que no son estados: líneas de producto y caminos de un lead.
   Son las que ya usa el portal (css/styles.css .tag-*, leads/styles.css
   .estado-*). Una escala (puntaje, banda) se muestra con intensidades del
   rojo, nunca con semáforo. */
.bp-linea-proline { background: #FDEEEF; color: #A32D2D; }
.bp-linea-next    { background: #E6F1FB; color: #0C447C; }
.bp-linea-advance { background: #EAF3DE; color: #27500A; }
.bp-linea-tour    { background: #FAEEDA; color: #633806; }
.bp-linea-junior  { background: #EEEDFE; color: #3C3489; }
.bp-linea-onyx    { background: #E9E9EA; color: #333338; }
.bp-camino-reunion      { background: #E8F3EC; color: #166534; }
.bp-camino-distribuidor { background: #EAF1F9; color: #1D4ED8; }
.bp-camino-tiendanube   { background: #F5EEFC; color: #6B21A8; }

/* ── 14. ÁREA TÁCTIL ────────────────────────────────────────────────────────
   Con el dedo (pointer: coarse), los controles de 32 px o menos suman área
   invisible hasta 44 px, sin cambiar el dibujo: un ::before transparente que
   desborda la caja (inset negativo solo si la caja mide menos de 44). Los
   botones usan ::before porque .is-cargando ya usa ::after. Auditoría 30/09,
   ítem 10. Los que ya están posicionados (absolute) no llevan relative. */
@media (pointer: coarse) {
  .bp-btn--sm, .bp-pill--filtro, .bp-segmentado > button, .cat-activo, .ini-paso__link { position: relative; }
  .bp-btn--sm::before, .bp-pill--filtro::before, .bp-segmentado > button::before, .bp-producto__comparar::before,
  .cat-activo::before, .cat-bandeja__quitar::before, .ini-paso__link::before {
    content: ""; position: absolute; inset: min(0px, calc(50% - 22px));
  }
  .cat-bandeja__quitar { position: relative; }
  /* Un select no admite pseudo-elementos: en el celular va a 40 px de alto. */
  .bp-select { min-height: var(--bp-control-md); }
  /* El segmentado desplaza en horizontal (overflow-x: auto) y eso recorta el
     área de sus botones a su propio alto: es la única pieza que crece en el
     celular, 4 px (botones de 34, control de 42). */
  .bp-segmentado button { height: 34px; }
}
