/* NUTRILAB ELITE · Capa del deportista en el portal (fase 1, 24-oct-2026)
   ------------------------------------------------------------------------------------------
   Solo se aplica con la clase `nl-elite` en el <body>, que pone portal-elite.js cuando
   «mi-plan» dice que el paciente es Élite. Usa los tokens del portal (portal-cliente.css):
   esta capa NO crea tokens paralelos. Quitar su <link> deshace la parte visual.
   Prefijo de las clases propias: .nle- */

/* ---- 1 · Lo que se oculta en Élite ---------------------------------------------------- */

/* Gráfico de evolución normal de Inicio (Peso · Cintura · Cadera): en Élite lo sustituyen
   «Tu peso» y «Cómo te sientes» de la capa Élite. Se oculta el bloque que lo envuelve. */
body.nl-elite #inicioContent > div:has(> .card.pt-evol-flat) { display: none; }

/* Check-in diario del portal normal: en Élite lo sustituye el registro del día (5 datos) */
body.nl-elite .add-menu-opt[data-action="open-checkin-diario"] { display: none; }

/* ---- 2 · Bloques de resultados de «Hoy» ---------------------------------------------- */

#nleBloques { display: block; }
.nle-bloques { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.nle-card { padding: 16px; }
.nle-vacio { color: var(--color-text-secondary); font-size: 13px; line-height: 1.45; margin: 6px 0 0; }
.nle-sub { color: var(--color-text-tertiary); font-size: 11.5px; line-height: 1.4; margin: 10px 0 0; }

/* Tarjeta «sin apuntar»: el único sitio de Inicio que pide algo, y lo hace con un botón */
.nle-pedir { text-align: center; }
.nle-pedir-t { font-size: 16px; font-weight: 650; margin: 2px 0 6px; }
.nle-pedir-s { color: var(--color-text-secondary); font-size: 13px; line-height: 1.45; margin: 0 0 14px; }
.nle-btn-grande { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.nle-btn-grande .material-symbols-outlined { font-size: 20px; }
.nle-btn-editar { width: 100%; margin-top: 14px; }

/* Los 5 datos del día ya apuntados */
.nle-dia { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 4px; }
.nle-dato { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-chip); padding: 10px 4px; }
.nle-dato .material-symbols-outlined { font-size: 17px; color: var(--color-text-secondary); }
.nle-dato-v { font-size: 13px; font-weight: 650; line-height: 1.1; }
.nle-dato-k { font-size: 9.5px; color: var(--color-text-tertiary); letter-spacing: .02em; }
@media (max-width: 360px) {
  .nle-dia { grid-template-columns: repeat(3, 1fr); }
}

/* Gráficas (Chart.js, el mismo que ya usa el portal) */
.nle-chart { position: relative; height: 170px; margin-top: 10px; }

/* Comparativa semana a semana */
.nle-comp { list-style: none; margin: 6px 0 0; padding: 0; }
.nle-comp li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--color-border); font-size: 13px; }
.nle-comp li:last-child { border-bottom: 0; }
.nle-comp li > span:first-child { color: var(--color-text-secondary); flex: 1; }
.nle-comp-v { font-weight: 650; font-variant-numeric: tabular-nums; }
.nle-dif { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; min-width: 62px; justify-content: flex-end; }
.nle-dif .material-symbols-outlined { font-size: 15px; }
.nle-dif.bien { color: var(--color-success); }
.nle-dif.ojo { color: var(--color-warning); }
.nle-dif.igual { color: var(--color-text-tertiary); }

/* Aviso del coaching aprobado por la nutricionista */
.nle-coach { border-color: var(--color-border-strong); }
.nle-coach-t { font-size: 14.5px; font-weight: 650; margin: 2px 0 6px; }
.nle-coach-m { color: var(--color-text-secondary); font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.nle-coach .btn-secondary { width: 100%; }

/* ---- 3 · Modal del registro del día (por pasos) --------------------------------------- */

.nle-hoja .sheet-body { padding-bottom: 18px; }
.nle-prog { height: 3px; background: var(--color-track); border-radius: var(--radius-pill); overflow: hidden; margin: 2px 0 12px; }
.nle-prog > span { display: block; height: 100%; background: var(--color-accent-protein); border-radius: var(--radius-pill);
  transition: width var(--dur-press, 160ms) var(--ease); }
.nle-paso { color: var(--color-text-tertiary); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.nle-q { text-align: center; }
.nle-qico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 10px;
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-thumb); }
.nle-qico .material-symbols-outlined { font-size: 22px; color: var(--color-text-secondary); }
.nle-qt { font-size: 17px; font-weight: 650; line-height: 1.3; margin: 0 0 6px; }
.nle-ayuda { color: var(--color-text-secondary); font-size: 12.5px; line-height: 1.45; margin: 0 0 16px; }

/* Peso: un solo campo grande */
.nle-num { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.nle-num input { width: 140px; background: transparent; border: 0; border-bottom: 2px solid var(--color-border-strong);
  color: var(--color-text); font-size: 42px; font-weight: 650; text-align: center; padding: 4px 0;
  font-variant-numeric: tabular-nums; outline: none; }
.nle-num input:focus { border-bottom-color: var(--color-accent-protein); }
.nle-num input::-webkit-outer-spin-button, .nle-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nle-u { color: var(--color-text-secondary); font-size: 16px; font-weight: 600; }

/* Barras (horas de sueño, esfuerzo) */
.nle-barra { margin: 8px 0 4px; }
.nle-out { display: block; text-align: center; font-size: 34px; font-weight: 650; font-variant-numeric: tabular-nums;
  color: var(--color-text-tertiary); margin-bottom: 8px; }
.nle-barra.on .nle-out { color: var(--color-text); }
.nle-barra input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; }
.nle-barra input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-accent-protein) var(--p, 50%), var(--color-track) var(--p, 50%)); }
.nle-barra input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px;
  border-radius: 50%; background: #fff; border: 1px solid var(--color-border-strong); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.nle-barra input[type="range"]::-moz-range-track { height: 6px; border-radius: var(--radius-pill); background: var(--color-track); }
.nle-barra input[type="range"]::-moz-range-progress { height: 6px; border-radius: var(--radius-pill); background: var(--color-accent-protein); }
.nle-barra input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; }
.nle-extremos { display: flex; justify-content: space-between; color: var(--color-text-tertiary); font-size: 11px; margin-top: 2px; }

/* Escalas de 5 botones (calidad del sueño, ánimo, estrés) */
.nle-escala { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 2px; }
.nle-escala button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 62px; padding: 8px 2px; background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-chip); color: var(--color-text-secondary); cursor: pointer;
  transition: transform var(--dur-press, 160ms) var(--ease), border-color var(--dur-press, 160ms) var(--ease),
    background var(--dur-press, 160ms) var(--ease), color var(--dur-press, 160ms) var(--ease); }
.nle-escala button small { font-size: 9.5px; line-height: 1.15; text-align: center; }
.nle-escala.caras button .material-symbols-outlined { font-size: 24px; }
.nle-escala button:active { transform: scale(.96); }
.nle-escala button.on { background: rgba(74, 222, 128, .12); border-color: var(--color-accent-protein); color: var(--color-text); }
.nle-escala button.on .material-symbols-outlined { color: var(--color-accent-protein); }

/* Acciones */
.nle-acciones { display: flex; gap: 10px; margin-top: 20px; }
.nle-acciones .btn-primary { flex: 1; }
.nle-acciones .btn-secondary { flex: 0 0 auto; min-width: 92px; }
.nle-saltar { display: block; width: 100%; margin: 12px 0 0; padding: 10px; background: none; border: 0;
  color: var(--color-text-tertiary); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nle-saltar:active { color: var(--color-text-secondary); }

/* Opción del botón central (+) */
.nle-menu-opt .add-menu-ico .material-symbols-outlined { color: var(--color-accent-protein); }

@media (prefers-reduced-motion: reduce) {
  .nle-prog > span, .nle-escala button { transition: none; }
  .nle-escala button:active { transform: none; }
}

/* ---- 4 · SIN TARJETAS (24-oct-2026, a petición de Samuel) ------------------------------
   Mismo criterio que el rediseño plano del panel (assets/css/elite-flat.css): el contenido
   flota sobre el fondo y se separa con líneas de 1 px, no con cajas. Solo conservan
   contenedor los CONTROLES (botones, campos, escalas, chips) y las hojas/modales.
   Solo afecta a los deportistas Élite (body.nl-elite); el portal normal no cambia. */
:root { --nle-linea: rgba(255, 255, 255, .085); }

/* Las tarjetas del portal y las de esta capa pierden la caja */
body.nl-elite #inicioContent .card,
body.nl-elite #seguimientoContent .card,
body.nl-elite #inicioContent .pt-card-outline,
body.nl-elite #seguimientoContent .pt-card-outline,
body.nl-elite .nle-card {
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  backdrop-filter: none !important;
}
/* …y se separan con una línea fina. Solo los BLOQUES DE CONTENIDO (los que llevan tarjeta
   dentro): si se separa cualquier div, se raya también la cabecera (saludo, campana, aviso). */
body.nl-elite #inicioContent > div:has(.card),
body.nl-elite #seguimientoContent > div:has(.card),
body.nl-elite .nle-bloques > * + * {
  border-top: 1px solid var(--nle-linea);
  padding-top: 18px;
  margin-top: 18px;
}
body.nl-elite .nle-bloques > *:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
body.nl-elite .nle-bloques { gap: 0; }

/* La cabecera de cada bloque, sin recuadro de icono */
body.nl-elite .card-header { padding: 0 0 10px; border-bottom: 0; }
body.nl-elite .card-icon {
  background: none !important;
  border: 0 !important;
  width: auto !important;
  height: auto !important;
}
body.nl-elite .card-icon .material-symbols-outlined { color: var(--color-text-tertiary); font-size: 19px; }
body.nl-elite .card-label { letter-spacing: .14em; }

/* Los 5 datos del día: números sueltos separados por líneas verticales, sin cajitas */
body.nl-elite .nle-dato {
  background: none;
  border: 0;
  border-left: 1px solid var(--nle-linea);
  border-radius: 0;
  padding: 2px 4px;
}
body.nl-elite .nle-dia > .nle-dato:first-child { border-left: 0; }

/* Medidas de «Progreso»: mismo trato */
body.nl-elite .pt-seg-measure,
body.nl-elite .pt-md {
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
  border-top: 1px solid var(--nle-linea) !important;
}

/* Lo que SÍ mantiene caja: controles y hojas (si no, no se ve dónde se pulsa) */
body.nl-elite .btn-primary,
body.nl-elite .btn-secondary,
body.nl-elite .nle-escala button,
body.nl-elite .nle-num input,
body.nl-elite .bottom-sheet,
body.nl-elite .add-menu-opt,
body.nl-elite .nav-pill {
  border-radius: var(--radius-btn);
}
body.nl-elite .nle-escala button { background: var(--color-surface-2); border: 1px solid var(--color-border); }

/* ---- 5 · Fase 2: canales, foto semanal y bandeja (24-oct-2026) -------------------------
   Todo plano, sin tarjetas: separadores de 1 px y contenedor solo en los controles. */

/* Bloques de «Hoy» */
.nle-foto-aviso, .nle-resp-aviso, .nle-envios { display: block; }
.nle-foto-aviso .nle-pedir-t { font-size: 16px; font-weight: 650; margin: 0 0 6px; }
.nle-foto-aviso .nle-pedir-s { color: var(--color-text-secondary); font-size: 13px; line-height: 1.45; margin: 0 0 14px; }
.nle-resp-item { padding: 10px 0; border-top: 1px solid var(--nle-linea); }
.nle-resp-aviso .card-header + .nle-resp-item { border-top: 0; }
.nle-resp-item p { color: var(--color-text-secondary); font-size: 13px; line-height: 1.5; margin: 6px 0 0; }
.nle-resp-aviso .btn-secondary, .nle-envios .btn-secondary { width: 100%; margin-top: 12px; }

/* Lista de canales */
.nle-lista { list-style: none; margin: 4px 0 0; padding: 0; }
.nle-lista li + li { border-top: 1px solid var(--nle-linea); }
.nle-lista button {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  width: 100%; padding: 15px 0; background: none; border: 0; text-align: left; cursor: pointer;
}
.nle-lista-t { font-size: 15px; font-weight: 600; color: var(--color-text); }
.nle-lista-d { grid-column: 1; color: var(--color-text-secondary); font-size: 12.5px; line-height: 1.4; }
.nle-lista-v { grid-column: 2; grid-row: 1 / span 2; color: var(--color-text-tertiary); }

/* Campos del formulario */
.nle-texto { width: 100%; margin-top: 10px; }
.nle-error { color: var(--color-warning); font-size: 12.5px; min-height: 18px; margin: 10px 0 0; text-align: center; }
.nle-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.nle-chips button {
  padding: 10px 14px; background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-chip); color: var(--color-text-secondary); font-size: 13px; cursor: pointer;
}
.nle-chips button.on { background: rgba(74, 222, 128, .12); border-color: var(--color-accent-protein); color: var(--color-text); }
.nle-escala-10 { grid-template-columns: repeat(5, 1fr); }
.nle-escala-10 button { min-height: 46px; }
.nle-escala-10 button small { font-size: 14px; font-weight: 600; }

/* Foto */
.nle-foto { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 14px; }
.nle-foto img { max-width: 190px; max-height: 240px; border-radius: var(--radius-thumb); object-fit: cover; }
.nle-foto-ico { font-size: 56px; color: var(--color-text-tertiary); }
.nle-foto-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Bandeja */
.nle-bandeja { list-style: none; margin: 4px 0 0; padding: 0; }
.nle-bandeja li { padding: 16px 0; border-top: 1px solid var(--nle-linea); }
.nle-bandeja li:first-child { border-top: 0; }
.nle-b-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.nle-b-canal { font-size: 14px; font-weight: 650; }
.nle-b-fecha { color: var(--color-text-tertiary); font-size: 11.5px; }
.nle-b-mini { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius-thumb); margin: 10px 0 4px; }
.nle-b-datos { color: var(--color-text-secondary); font-size: 12.5px; line-height: 1.5; margin: 6px 0 0; }
.nle-b-esperando { color: var(--color-text-tertiary); font-size: 12px; font-style: italic; margin: 8px 0 0; }
.nle-b-val { display: inline-block; margin-top: 8px; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; }
.nle-b-val.ok { background: rgba(74, 222, 128, .14); color: var(--color-accent-protein); }
.nle-b-val.medio { background: rgba(251, 191, 36, .14); color: var(--color-accent-carbs); }
.nle-b-val.mal { background: rgba(248, 113, 113, .14); color: var(--color-accent-fat); }
.nle-b-resp { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--color-accent-protein); }
.nle-b-resp-t { color: var(--color-accent-protein); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.nle-b-resp p { color: var(--color-text); font-size: 13.5px; line-height: 1.5; margin: 4px 0 0; }

/* ---- 6 · Fase 3: pestaña «Competición» (24-oct-2026) ----------------------------------
   Sin tarjetas, como el resto: cifras grandes, líneas de 1 px y el día de hoy marcado. */
.nlx-comp { padding-bottom: 24px; }
.nlx-sec { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--nle-linea); }
.nle-section { color: var(--color-text-tertiary); font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; margin: 0 0 12px; }

/* Cuenta atrás */
.nlx-cuenta { text-align: center; padding: 26px 0 8px; }
.nlx-cuenta-n { display: block; font-size: 72px; font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.nlx-cuenta-t { display: block; font-size: 17px; font-weight: 650; margin-top: 8px; }
.nlx-cuenta-f { display: block; color: var(--color-text-secondary); font-size: 13px; margin-top: 4px; }

/* Estado vacío */
.nlx-vacia { text-align: center; padding: 48px 20px; }
.nlx-vacia .material-symbols-outlined { font-size: 40px; color: var(--color-text-tertiary); }
.nlx-vacia .nle-pedir-t { margin-top: 12px; }

/* Los días del protocolo */
.nlx-dias { list-style: none; margin: 0; padding: 0; }
.nlx-dias > li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--nle-linea); }
.nlx-dias > li:first-child { border-top: 0; }
.nlx-dias > li.on { border-left: 2px solid var(--color-accent-protein); padding-left: 12px; margin-left: -14px; }
.nlx-dia-et { color: var(--color-text-tertiary); font-size: 11.5px; line-height: 1.35; padding-top: 2px; }
.nlx-dias > li.on .nlx-dia-et { color: var(--color-accent-protein); font-weight: 600; }
.nlx-dia-t { font-size: 14.5px; font-weight: 650; margin: 0; }
.nlx-claves { list-style: none; margin: 8px 0 0; padding: 0; }
.nlx-claves li { position: relative; padding: 2px 0 2px 14px; color: var(--color-text-secondary); font-size: 13px; line-height: 1.45; }
.nlx-claves li::before { content: ""; position: absolute; left: 0; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: var(--color-text-tertiary); }

/* Plan del día: las tomas se marcan */
.nlx-plan-f { margin: -6px 0 12px; }
.nlx-tomas { list-style: none; margin: 0; padding: 0; }
.nlx-tomas > li { border-top: 1px solid var(--nle-linea); }
.nlx-tomas > li:first-child { border-top: 0; }
.nlx-tomas button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; background: none; border: 0;
  color: var(--color-text); font-size: 14.5px; text-align: left; cursor: pointer; }
.nlx-tomas .material-symbols-outlined { font-size: 22px; color: var(--color-text-tertiary); flex: 0 0 auto; }
.nlx-tomas li.on button { color: var(--color-text-secondary); }
.nlx-tomas li.on button span:last-child { text-decoration: line-through; }
.nlx-tomas li.on .material-symbols-outlined { color: var(--color-accent-protein); }

/* Peso para competir */
.nlx-peso { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; text-align: center; }
.nlx-peso-n { display: block; font-size: 30px; font-weight: 300; letter-spacing: -.02em; }
.nlx-peso-k { display: block; color: var(--color-text-tertiary); font-size: 11px; margin-top: 4px; }

/* ---- 7 · Fase 4: lo que toca estos días (24-oct-2026) --------------------------------- */
.nle-toca-l { list-style: none; margin: 4px 0 0; padding: 0; }
.nle-toca-l li + li { border-top: 1px solid var(--nle-linea); }
.nle-toca-l button, .nle-toca-l div {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  width: 100%; padding: 13px 0; background: none; border: 0; text-align: left; cursor: pointer;
}
.nle-toca-l div { cursor: default; }
/* el <button> no hereda el color del portal: sin esto el título salía en gris oscuro */
.nle-toca-l button, .nle-toca-l div { color: var(--color-text); }
.nle-toca-t { font-size: 14.5px; font-weight: 600; color: var(--color-text); }
.nle-toca-m { grid-column: 1; color: var(--color-text-secondary); font-size: 12.5px; }
.nle-toca-l .nle-lista-v { grid-column: 2; grid-row: 1 / span 2; color: var(--color-text-tertiary); }

/* ---- 8 · Fase 5: alrededor del entreno (25-oct-2026) ---------------------------------- */
#nlePeriBloque { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--nle-linea); }
.nlp-tramos { list-style: none; margin: 4px 0 0; padding: 0; }
.nlp-tramos li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-top: 1px solid var(--nle-linea); font-size: 13.5px; }
.nlp-tramos li:first-child { border-top: 0; }
.nlp-tramos li > span { color: var(--color-text-secondary); }
.nlp-tramos strong { font-weight: 600; text-align: right; }
.nlp-tit { color: var(--color-text-tertiary); font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; margin: 20px 0 4px; }
.nlp-ses { list-style: none; margin: 0 0 16px; padding: 0; }
.nlp-ses li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--nle-linea); font-size: 13.5px; }
.nlp-ses li:first-child { border-top: 0; }
.nlp-ses > li > span:first-child { color: var(--color-text-secondary); }
.nlp-g { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--color-warning); }
.nlp-g.ok { color: var(--color-accent-protein); }
.nlp-sin { color: var(--color-text-tertiary); font-size: 12.5px; font-style: italic; }
.nle-reco { background: rgba(74, 222, 128, .08); border-radius: var(--radius-chip); padding: 10px 12px; margin-bottom: 14px; }
.nle-reco strong { color: var(--color-accent-protein); }
