/* ==========================================================================
   Identidad del sitio de Natalia, encima de estilo.css.
   Las mismas letras y la misma paleta que nataliasanchezpsicologia.com.ar
   (web-sitio y /comun/marca.css). Sólo cambia cómo se ve: ninguna regla de
   acá cambia tamaños de los blancos para el dedo ni qué se muestra u oculta.
   ========================================================================== */

:root {
  --tinta: #2A2540; --tenue: #5A5470; --linea: rgba(76, 80, 165, .18); --fondo: #F4EFE6;
  --papel: #FFFDF8; --acento: #4C50A5; --acento-suave: #ECE8F6;
  --alerta: #A33B2A; --alerta-suave: #F6E1DC; --ok: #3F7F6A;
  --lavanda: #CFBEDB; --lila: #8F6BC4;
  --f-titulo: 'Fraunces', Georgia, serif; --f-texto: 'Figtree', system-ui, sans-serif;
}
body { font: 16px/1.55 var(--f-texto); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--f-titulo); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: 2rem; line-height: 1.15; }
h2 { font-size: 1.3rem; }
a { color: var(--acento); }
a:hover { color: #B8533A; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }

/* Papel: tarjetas redondeadas, con una sombra suave. */
.tarjeta { border-radius: 18px; border: 1.5px solid var(--linea); box-shadow: 0 8px 26px rgba(42,37,64,.06); }
table { background: var(--papel); }

/* Los botones del sitio: borde de tinta y sombra corrida. */
.boton, button { border: 2px solid var(--tinta); border-radius: 999px; background: var(--acento); color: #FFFDF8;
  font-weight: 600; padding: .6rem 1.3rem; box-shadow: 3px 3px 0 var(--tinta); transition: translate .15s ease, box-shadow .15s ease; }
.boton:hover, button:hover { translate: -1px -1px; box-shadow: 4px 4px 0 var(--tinta); color: #FFFDF8; }
.boton.suave, button.suave { background: var(--papel); color: var(--tinta); }
.boton.suave:hover, button.suave:hover { color: var(--tinta); }
.boton:disabled, button:disabled { translate: none; box-shadow: none; }

input[type=text], input[type=date], input[type=password], input[type=email], select, textarea {
  border: 2px solid #CFC8E0; border-radius: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--acento); outline: none; box-shadow: 3px 3px 0 var(--lavanda); }
textarea { font-family: inherit; font-size: .95rem; }

.aviso { border-radius: 14px; background: #F8ECCE; border-color: #E8CF94; }
.aviso.error { background: var(--alerta-suave); border-color: #E3B3A8; color: var(--alerta); }
.aviso.ok { background: #E3F0EA; border-color: #A9CFBF; color: var(--ok); }
.etiqueta { background: var(--acento-suave); color: var(--acento); }
.etiqueta.pendiente { background: #F8ECCE; color: #8A5D12; }
.etiqueta.completa { background: #E3F0EA; color: var(--ok); }
.pp { background: #ECE8F2; }
.pp.alto span { background: #B8533A; }

/* El cuestionario: lo marcado, en la lavanda del sitio. */
.item .op label { border-radius: 12px; border-width: 1.5px; }
.item .op label:has(input:checked), .item.repaso .marca label:has(input:checked) { background: var(--lavanda); border-color: var(--acento); }
.item.sin-responder { background: #FBF3E3; }
.progreso { background: var(--fondo); }
.progreso .via { background: #E6E0EE; height: 8px; border-radius: 4px; }
.progreso .via span { background: linear-gradient(90deg, var(--lila), var(--acento)); }

/* ---------- la barra de Natalia ---------- */
.barra { background: var(--tinta); border-bottom: 0; color: #E6E4F7; }
.barra .marca { display: inline-flex; align-items: center; gap: .6rem; color: #F4EFE6; font: 400 1.35rem var(--f-titulo); letter-spacing: 0; }
.barra .marca .isotipo-id { width: 38px; height: 38px; }
.barra nav a { color: #E6E4F7; font-weight: 600; }
.barra nav a:hover { color: #fff; }
.barra .quien, .barra .quien a { color: #CFC9E6; }
/* Con "Correo" el menú tiene cinco entradas: en el celular baja de renglón en vez de salirse. */
.barra nav { flex-wrap: wrap; row-gap: .35rem; }

/* ---------- la marca y el pie para el paciente ---------- */
.cab-sitio { background: color-mix(in srgb, var(--fondo) 92%, transparent); border-bottom: 1px dashed #B9B3DC; }
.cab-dentro, .pie-dentro { max-width: 1060px; margin: 0 auto; padding: 0 1.2rem; }
.cab-dentro { min-height: 68px; display: flex; align-items: center; }
.cab-marca { display: inline-flex; align-items: center; gap: .7rem; color: var(--tinta); }
.cab-marca .isotipo-id { width: 44px; height: 44px; }
.cab-marca b { display: block; font: 400 1.3rem/1.1 var(--f-titulo); }
.cab-marca small { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .32em; color: var(--acento); }
.pie-sitio { background: var(--tinta); color: #F4EFE6; margin-top: 3rem; padding: 2rem 0 2.4rem; }
.pie-nombre { margin: 0 0 .6rem; }
.pie-nombre b { font: 400 1.15rem var(--f-titulo); }
.pie-crisis { margin: 0; font-size: .85rem; color: #CFC9E6; max-width: 56rem; }
.pie-credito { margin: .9rem 0 0; font-size: .8rem; color: #A9A3C9; }
.pie-credito a { color: #CFC9E6; }

/* La primera pantalla del cuestionario: una franja de acuarela y el espiral que se dibuja. */
.bienvenida { position: relative; border-radius: 22px; overflow: hidden; padding: 1.6rem 1.4rem; margin: .4rem 0 1.2rem;
  background: var(--lavanda) url(/comun/acuarela.jpg) 50% 40% / cover; }
.bienvenida::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(244,239,230,.94) 0%, rgba(244,239,230,.8) 55%, rgba(244,239,230,.1) 90%); }
.bienvenida > * { position: relative; z-index: 1; }
.bienvenida h1 { margin: 0; font-size: 2.3rem; }
.bienvenida h1 em { color: var(--acento); }
.bienvenida .isotipo-id { position: absolute; z-index: 1; right: 1.4rem; top: 50%; translate: 0 -50%; width: 110px; height: 110px; overflow: visible; }
.dibujo .punto { transform-box: fill-box; transform-origin: center; }
.dibujo .espiral { fill: none; stroke: var(--tinta); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1 2; }
@media (max-width: 34rem) { .bienvenida { padding-right: 1.4rem; } .bienvenida .isotipo-id { display: none; } .bienvenida h1 { font-size: 1.9rem; } }

/* Movimiento sólo con CSS y sólo si la persona no pidió reducirlo: nada queda
   oculto si una animación no corre. */
@media (prefers-reduced-motion: no-preference) {
  .contenido > h1, .contenido > .tarjeta, .contenido > .bienvenida { animation: entrar-id .7s cubic-bezier(.2,.8,.2,1) backwards; }
  .contenido > .tarjeta:nth-of-type(2) { animation-delay: .08s; }
  .dibujo .punto { animation: brotar-id .7s cubic-bezier(.3,1.5,.5,1) .15s backwards; }
  .dibujo .espiral { animation: trazar-id 2.2s cubic-bezier(.45,.05,.3,1) .45s backwards; }
}
@keyframes entrar-id { from { opacity: 0; translate: 0 16px; } }
@keyframes brotar-id { from { scale: 0; } }
@keyframes trazar-id { from { stroke-dashoffset: 1; } }

/* ---------- el avance del borrador con IA (informe.php, conclusion_panel_avance) ----------
   Mientras la IA escribe: la espiral de la identidad dibujándose en bucle, el punto lila
   latiendo, la etapa en curso, el reloj y las etapas como lista con su marca. */
.ia-progreso { border-radius: 16px; border: 1.5px dashed #B9B3DC; padding: 1.1rem 1.25rem; margin: .4rem 0 .8rem;
  background: linear-gradient(135deg, var(--fondo), var(--acento-suave)); }
.ia-progreso-cab { display: flex; align-items: center; gap: 1rem; }
.ia-progreso-cab .isotipo-id { width: 66px; height: 66px; flex: none; overflow: visible; }
.ia-progreso h3 { margin: 0; font: 400 1.3rem/1.15 var(--f-titulo); color: var(--tinta); }
.ia-progreso-estado { margin: .2rem 0 0; color: var(--tenue); }
.ia-tiempo { font-variant-numeric: tabular-nums; color: var(--acento); font-weight: 600; white-space: nowrap; }
.ia-etapas { list-style: none; margin: 1rem 0 .7rem; padding: 0; display: grid; gap: .4rem; }
.ia-etapas li { position: relative; padding-left: 1.9rem; color: var(--tenue); }
.ia-etapas li::before { content: ""; position: absolute; left: .3rem; top: .4em; width: .85rem; height: .85rem; border-radius: 50%;
  border: 2px solid #B9B3DC; background: var(--papel); box-sizing: border-box; transform-origin: center; }
.ia-etapas li.hecha { color: var(--tinta); }
.ia-etapas li.hecha::before { background: var(--acento); border-color: var(--acento); }
.ia-etapas li.hecha::after { content: ""; position: absolute; left: .58rem; top: .5em; width: .22rem; height: .45rem;
  border: solid #FFFDF8; border-width: 0 2px 2px 0; rotate: 45deg; }
.ia-etapas li.actual { color: var(--tinta); font-weight: 600; }
.ia-etapas li.actual::before { background: var(--lila); border-color: var(--lila); }
.ia-etapas li small { font-weight: 400; color: var(--tenue); }
.ia-via { height: 8px; border-radius: 4px; background: #E6E0EE; overflow: hidden; }
.ia-via span { display: block; height: 100%; width: 38%; border-radius: 4px; background: linear-gradient(90deg, var(--lila), var(--acento)); }
@media (prefers-reduced-motion: no-preference) {
  .ia-progreso .dibujo .espiral { animation: trazar-bucle 3.4s cubic-bezier(.45,.05,.3,1) infinite alternate; }
  .ia-progreso .dibujo .punto { animation: latir-id 1.7s ease-in-out infinite; }
  .ia-etapas li.actual::before { animation: latir-id 1.2s ease-in-out infinite; }
  .ia-via span { animation: ir-y-volver 2.6s ease-in-out infinite alternate; }
}
@keyframes trazar-bucle { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes latir-id { 50% { scale: 1.2; } }
@keyframes ir-y-volver { from { translate: 0; } to { translate: 165%; } }
@media (max-width: 34rem) { .ia-progreso-cab .isotipo-id { width: 52px; height: 52px; } }

@media print {
  .cab-sitio, .pie-sitio, .bienvenida .isotipo-id, .ia-progreso { display: none !important; }
  .tarjeta { box-shadow: none; }
}

/* ---------- Importar desde Excel (importar.php, 16/10/2026) ----------
   Tres pasos: la planilla, la revisión fila por fila y el envío con avance. */
.imp-cabeza h1 { margin-bottom: .3rem; }
.imp-cabeza p { margin: 0 0 1.1rem; max-width: 46rem; }
.imp-pasos { list-style: none; display: flex; gap: .4rem; margin: 0 0 1.3rem; padding: 0; flex-wrap: wrap; }
.imp-pasos li { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .95rem .35rem .4rem; border-radius: 999px;
  background: var(--papel); border: 1.5px solid var(--linea); color: var(--tenue); font-weight: 600; font-size: .92rem; }
.imp-pasos li span { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: #E6E0EE; color: var(--tenue); font-size: .85rem; }
.imp-pasos li.actual { border-color: var(--tinta); color: var(--tinta); box-shadow: 3px 3px 0 var(--lavanda); }
.imp-pasos li.actual span { background: var(--acento); color: #FFFDF8; }
.imp-pasos li.hecho span { background: var(--ok); color: #FFFDF8; }

.imp-grilla { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.imp-grilla .tarjeta { margin-bottom: 1.2rem; }
@media (max-width: 760px) { .imp-grilla { grid-template-columns: 1fr; gap: 0; } }
.tarjeta h2 .imp-num { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; margin-right: .55rem;
  border-radius: 50%; background: var(--lavanda); color: var(--tinta); font: 600 .95rem var(--f-texto); vertical-align: .15em; }
.imp-bloque h2 { margin-top: .2rem; }

/* La planilla en miniatura: que se vea qué columnas lleva antes de bajarla. */
.imp-hoja { border: 1.5px solid var(--linea); border-radius: 12px; overflow: hidden; font-size: .72rem; background: #fff; margin: .6rem 0 .2rem; }
.imp-hoja-letras, .imp-hoja-fila { display: grid; grid-template-columns: 1.6rem 1.25fr .62fr .9fr 1.25fr 1fr .9fr; }
.imp-hoja-letras i, .imp-hoja-fila i { font-style: normal; text-align: center; color: #8C86A3; background: #F3F0F8; padding: .15rem 0; }
.imp-hoja-letras i { border-bottom: 1px solid var(--linea); }
.imp-hoja-fila b { font-weight: 400; padding: .25rem .35rem; border-left: 1px solid #ECE8F2; border-bottom: 1px solid #ECE8F2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tinta); }
.imp-hoja-fila.tit b { background: var(--acento); color: #FFFDF8; font-weight: 600; white-space: normal; line-height: 1.2; }

/* La zona para soltar la planilla. */
.imp-zona { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center;
  min-height: 11rem; margin: .6rem 0 .8rem; padding: 1.2rem; border: 2px dashed #B9B3DC; border-radius: 18px; cursor: pointer;
  background: linear-gradient(135deg, var(--fondo), var(--acento-suave)); color: var(--acento); transition: background .2s, border-color .2s; }
.imp-zona input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.imp-zona strong { color: var(--tinta); font: 400 1.2rem var(--f-titulo); word-break: break-all; }
.imp-zona:hover, .imp-zona.encima { border-color: var(--acento); background: var(--acento-suave); }
.imp-zona:focus-within { outline: 3px solid var(--acento); outline-offset: 2px; }
.imp-zona.lleno { border-style: solid; border-color: var(--ok); background: #E3F0EA; color: var(--ok); }
.imp-pegar summary { cursor: pointer; color: var(--acento); font-weight: 600; font-size: .92rem; }
.imp-pegar textarea { min-height: 7rem; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }

/* Los tests como tarjetas para tildar. */
.imp-tests { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .55rem; margin-top: .8rem; }
.imp-test { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .6rem .8rem; border: 1.5px solid #D9D3EA; border-radius: 14px;
  background: var(--papel); cursor: pointer; color: var(--tinta); font-size: .95rem; transition: background .15s, border-color .15s; }
.imp-test:hover { border-color: var(--acento); }
.imp-test:has(input:checked) { background: var(--lavanda); border-color: var(--acento); box-shadow: 2px 2px 0 var(--acento); }
.imp-test input { width: 1.1rem; height: 1.1rem; accent-color: var(--acento); flex: none; margin: 0; }
.imp-test span { display: flex; flex-direction: column; line-height: 1.25; }
.imp-test small { color: var(--tenue); font-size: .78rem; }
.imp-tests.compactas { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.imp-tests.compactas .imp-test { padding: .45rem .65rem; font-size: .88rem; }
.imp-pie { margin-bottom: 1.6rem; }

/* La revisión. */
.imp-resumen { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: 0 0 1rem; }
.imp-cifra { display: inline-flex; align-items: baseline; gap: .35rem; padding: .35rem .9rem; border-radius: 999px; font-size: .92rem; background: var(--papel);
  border: 1.5px solid var(--linea); }
.imp-cifra b { font: 400 1.35rem var(--f-titulo); }
.imp-cifra.ok { color: var(--ok); border-color: #A9CFBF; background: #E3F0EA; }
.imp-cifra.revisar { color: #8A5D12; border-color: #E8CF94; background: #F8ECCE; }
.imp-cifra.error { color: var(--alerta); border-color: #E3B3A8; background: var(--alerta-suave); }
.imp-generales { align-items: end; }
.imp-interruptor { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .6rem .9rem; border-radius: 12px; border: 2px solid #CFC8E0;
  background: var(--papel); color: var(--tinta); font-size: .95rem; cursor: pointer; }
.imp-interruptor:has(input:checked) { border-color: var(--acento); background: var(--acento-suave); }
.imp-interruptor input { width: 1.15rem; height: 1.15rem; accent-color: var(--acento); margin: 0; }
.imp-cambiar-tests { margin-top: 1rem; }
.imp-cambiar-tests summary { cursor: pointer; color: var(--tinta); font-weight: 600; }
.imp-cambiar-tests summary .chico { color: var(--acento); }
.imp-punto { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: -.05em; }
.imp-punto.revisar { background: #E2B04A; }
.imp-punto.error { background: var(--alerta); }
.imp-tabla-tarjeta { padding: 1rem .8rem; }
.imp-ayuda-tabla { margin: 0 .3rem .8rem; }
.imp-tabla th { white-space: nowrap; }
.imp-tabla td { padding: .35rem .3rem; border-bottom: 0; vertical-align: top; }
.imp-tabla tbody.imp-fila { border-bottom: 1px solid var(--linea); }
.imp-tabla tbody.imp-fila > tr:first-child > td:first-child { box-shadow: inset 4px 0 0 var(--ok); padding-left: .7rem; padding-top: .7rem; }
.imp-tabla tbody.revisar > tr:first-child > td:first-child { box-shadow: inset 4px 0 0 #E2B04A; }
.imp-tabla tbody.error > tr:first-child > td:first-child { box-shadow: inset 4px 0 0 var(--alerta); }
.imp-tabla tbody.error { background: #FCF4F1; }
.imp-tabla tbody.revisar { background: #FDF8EC; }
.imp-tabla td.num { padding-top: .8rem; }
.imp-tabla input[type=text], .imp-tabla select { padding: .35rem .5rem; font-size: .9rem; border-radius: 9px; }
.imp-tabla input[name$="[nombre]"] { min-width: 12rem; }
.imp-tabla input[name$="[nac]"] { width: 7.4rem; }
.imp-tabla input[name$="[correo]"] { min-width: 13rem; }
.imp-tabla input[name$="[puesto]"] { min-width: 8rem; }
.imp-tabla input[name$="[tests]"] { min-width: 8rem; }
.imp-tabla select { width: 4.2rem; }
.imp-tabla input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--acento); }
.imp-resuelto { display: block; margin: .2rem .2rem 0; color: var(--acento); font-size: .76rem; line-height: 1.25; }
.imp-mensajes td { padding-top: 0; padding-bottom: .6rem; }
.imp-mensajes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; font-size: .85rem; }
.imp-mensajes li { position: relative; padding-left: 1.1rem; }
.imp-mensajes li::before { content: ""; position: absolute; left: 0; top: .45em; width: .55rem; height: .55rem; border-radius: 50%; }
.imp-mensajes li.error { color: var(--alerta); }
.imp-mensajes li.error::before { background: var(--alerta); }
.imp-mensajes li.revisar { color: #8A5D12; }
.imp-mensajes li.revisar::before { background: #E2B04A; }
.imp-mensajes li.info { color: var(--tenue); }
.imp-mensajes li.info::before { background: #CFC8E0; }
.imp-barra { position: sticky; bottom: .8rem; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .8rem 1rem;
  border-radius: 18px; border: 2px solid var(--tinta); background: var(--papel); box-shadow: 4px 4px 0 var(--tinta); }
.imp-barra p { margin: 0 auto 0 .2rem; }
.imp-barra p strong { font: 400 1.5rem var(--f-titulo); color: var(--acento); }

/* El envío y el seguimiento de la tanda. */
.imp-envio { background: linear-gradient(135deg, var(--papel), var(--acento-suave)); }
.imp-envio-cab { display: flex; align-items: center; gap: 1rem; }
.imp-envio-cab .isotipo-id { width: 60px; height: 60px; flex: none; overflow: visible; }
.imp-envio-cab h2 { margin: 0; word-break: break-word; }
.imp-envio-cab p { margin: .1rem 0 0; }
.imp-envio-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 1.1rem 0 .9rem; }
.imp-envio-cifras div { padding: .7rem .9rem; border-radius: 14px; background: var(--papel); border: 1.5px solid var(--linea); }
.imp-envio-cifras b { display: block; font: 400 2rem/1.1 var(--f-titulo); color: var(--acento); }
.imp-envio-cifras span { font-size: .85rem; color: var(--tenue); }
@media (max-width: 34rem) { .imp-envio-cifras { grid-template-columns: 1fr; } }
.imp-via { height: 10px; border-radius: 5px; background: #E6E0EE; overflow: hidden; }
.imp-via span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--lila), var(--acento)); transition: width .5s ease; }
.imp-chip { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap;
  background: #ECE8F2; color: var(--tenue); }
.imp-chip.mandando { background: var(--lavanda); color: var(--tinta); }
.imp-chip.salio, .imp-chip.cerrada { background: #E3F0EA; color: var(--ok); }
.imp-chip.error { background: var(--alerta-suave); color: var(--alerta); }
.imp-chip.sin_correo { background: #F8ECCE; color: #8A5D12; }
.imp-detalle { display: block; color: var(--tenue); margin-top: .15rem; max-width: 22rem; }
.imp-lote td { vertical-align: top; }
@media (prefers-reduced-motion: no-preference) {
  .imp-envio.mandando .dibujo .espiral { animation: trazar-bucle 3.4s cubic-bezier(.45,.05,.3,1) infinite alternate; }
  .imp-envio.mandando .dibujo .punto { animation: latir-id 1.7s ease-in-out infinite; }
  .imp-chip.mandando { animation: latir-id 1.2s ease-in-out infinite; }
}
/* En el celular: los avisos de cada fila quedan a la vista aunque la tabla se
   corra de costado, los tests van de a dos y la barra de abajo ocupa menos. */
.imp-mensajes ul { position: sticky; left: .4rem; max-width: min(100%, calc(100vw - 4.5rem)); }
@media (max-width: 34rem) {
  .imp-tests { grid-template-columns: 1fr 1fr; }
  .imp-test { padding: .5rem .55rem; font-size: .88rem; gap: .45rem; }
  .imp-barra { gap: .4rem; padding: .6rem .7rem; bottom: .4rem; }
  .imp-barra .boton, .imp-barra button { padding: .45rem .9rem; font-size: .9rem; }
  .imp-barra .boton.suave { display: none; }
  .imp-barra p { flex-basis: 100%; }
}
@media print { .imp-barra, .imp-pasos { display: none !important; } }

/* ---------- En vivo (en_vivo.php, 16/10/2026): quién está respondiendo ahora ---------- */
.vivo-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .6rem 1.2rem; }
.vivo-cab h1 { margin-bottom: .2rem; text-wrap: balance; }
.vivo-sub { margin: 0; max-width: 60ch; }
.vivo-latido { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--tenue); background: var(--papel);
  border: 1.5px solid var(--linea); border-radius: 999px; padding: .3rem .4rem .3rem .7rem; margin-top: .6rem; white-space: nowrap; }
.vivo-punto { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.vivo-latido.pausado .vivo-punto { background: var(--tenue); }
.vivo-latido.error { border-color: #E8CF94; color: #8A5D12; }
.vivo-latido.error .vivo-punto { background: #C9962E; }
.vivo-latido button.vivo-pausa { padding: .15rem .7rem; font-size: .8rem; box-shadow: none; border: 1.5px solid var(--linea); background: var(--acento-suave); color: var(--acento); translate: none; }
.vivo-latido button.vivo-pausa:hover { background: var(--lavanda); color: var(--tinta); box-shadow: none; translate: none; }

.vivo-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .8rem; margin: 1.2rem 0 .4rem; }
.vivo-cifra { padding: .7rem .9rem; border-radius: 14px; background: var(--papel); border: 1.5px solid var(--linea); color: inherit; text-decoration: none; display: block; }
.vivo-cifra b { display: block; font: 400 2rem/1.1 var(--f-titulo); color: var(--tinta); font-variant-numeric: tabular-nums; }
.vivo-cifra span { font-size: .85rem; color: var(--tenue); }
.vivo-cifra.viva b { color: var(--acento); }
.vivo-cifra.lista b { color: var(--ok); }
a.vivo-cifra:hover { border-color: var(--acento); color: inherit; }
.vivo-cifra.ojo { background: #FBF3E3; border-color: #E8CF94; }
.vivo-cifra.ojo b { color: #8A5D12; }

.vivo-dos { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.2rem; align-items: start; }
@media (max-width: 56rem) { .vivo-dos { grid-template-columns: minmax(0, 1fr); } }
.vivo-principal { min-width: 0; }
.vivo h2 { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.vivo h2 small { font: 400 .85rem var(--f-texto); color: var(--tenue); }

.vivo-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: .9rem; }
.vivo-persona { background: var(--papel); border: 1.5px solid var(--linea); border-radius: 16px; padding: .9rem 1rem 1rem; display: grid; gap: .7rem; min-width: 0;
  box-shadow: 0 6px 20px rgba(42,37,64,.05); }
.vivo-persona.ojo { border-color: #E3C27A; background: #FFFBF2; }
.vivo-pcab { display: flex; align-items: flex-start; gap: .6rem; }
.vivo-pcab > div { min-width: 0; }
.vivo-nombre { font-weight: 600; font-size: 1.02rem; line-height: 1.25; overflow-wrap: anywhere; }
.vivo-det { color: var(--tenue); font-size: .84rem; }
.vivo-chip { margin-left: auto; flex: none; white-space: nowrap; font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: #ECE8F2; color: var(--tenue); }
.vivo-chip.activo { background: #E3F0EA; color: var(--ok); }
.vivo-chip.quieto { background: #F8ECCE; color: #8A5D12; }
.vivo-test { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) auto; align-items: center; gap: .3rem .7rem; font-size: .9rem; }
.vivo-test .t { font-weight: 600; line-height: 1.2; }
.vivo-test .t small { display: block; font-weight: 400; color: var(--tenue); font-size: .76rem; }
.vivo-test .n { font-variant-numeric: tabular-nums; color: var(--tenue); white-space: nowrap; font-size: .85rem; }
.vivo-test .n b { color: var(--tinta); }
.vivo-barra { display: block; height: 10px; background: #E6E0EE; border-radius: 999px; overflow: hidden; position: relative; }
.vivo-barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--lila), var(--acento)); }
.vivo-barra.lista i { background: var(--ok); }
.vivo-barra.con-reloj i { background: repeating-linear-gradient(90deg, var(--acento) 0 9px, var(--lila) 9px 11px); }
.vivo-pie { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--tenue); font-size: .82rem; border-top: 1px dashed var(--linea); padding-top: .55rem; }
.vivo-pie b { color: var(--tinta); }
.vivo-pie a { margin-left: auto; font-weight: 600; text-decoration: none; }
.vivo-reloj { color: var(--alerta); font-weight: 600; font-variant-numeric: tabular-nums; }
.vivo-vacio { color: var(--tenue); background: var(--papel); border: 1.5px dashed var(--linea); border-radius: 14px; padding: 1rem; margin: 0; }

.vivo-lista { background: var(--papel); border: 1.5px solid var(--linea); border-radius: 14px; padding: .1rem 1rem; margin-top: .8rem; }
.vivo-lista summary { cursor: pointer; padding: .7rem 0; font-weight: 600; }
.vivo-lista summary small { color: var(--tenue); font-weight: 400; margin-left: .4rem; }
.vivo-lista table { margin-bottom: .6rem; font-size: .9rem; }
.vivo-lista td { vertical-align: top; }
.vivo-lista td a { font-weight: 600; text-decoration: none; }
.vivo-q { color: #8A5D12; }

.vivo-hilo { background: var(--papel); border: 1.5px solid var(--linea); border-radius: 16px; padding: .9rem 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
@media (max-width: 56rem) { .vivo-hilo { position: static; max-height: none; } }
.vivo-hilo h3 { margin: 0 0 .7rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tenue); font-weight: 600; }
.vivo-hilo ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .88rem; }
.vivo-hilo li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .5rem; line-height: 1.35; }
.vivo-hilo time { color: var(--tenue); font-variant-numeric: tabular-nums; }
.vivo-hilo li.ok span { color: var(--ok); }
.vivo-hilo li.q span { color: #8A5D12; }
.vivo-ayuda { color: var(--tenue); font-size: .86rem; margin-top: 1.6rem; max-width: 75ch; }
.vivo-ayuda b { color: var(--tinta); }
@media (max-width: 34rem) {
  .vivo-test { grid-template-columns: 5.4rem minmax(0, 1fr) auto; gap: .3rem .5rem; }
  .vivo-cifra b { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .vivo-barra i { transition: width .7s ease; }
  .vivo-latido:not(.pausado):not(.error) .vivo-punto { animation: vivo-late 2s ease-out infinite; }
}
@keyframes vivo-late { 0% { box-shadow: 0 0 0 0 rgba(63,127,106,.45); } 70% { box-shadow: 0 0 0 8px rgba(63,127,106,0); } 100% { box-shadow: 0 0 0 0 rgba(63,127,106,0); } }
/* En vivo: "Qué ver" (tandas) y el filtro por test */
.vivo-ver { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 1.1rem 0 0; }
.vivo-ver-tit { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tenue); font-weight: 600; }
.vivo-ver-opc { display: flex; flex-wrap: wrap; gap: .45rem; min-width: 0; }
.vivo-ver button.vivo-op { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: .35rem .85rem; border-radius: 14px;
  border: 1.5px solid var(--linea); background: var(--papel); color: var(--tinta); box-shadow: none; font-size: .86rem; font-weight: 600; line-height: 1.25; translate: none; text-align: left; }
.vivo-ver button.vivo-op small { font-weight: 400; font-size: .74rem; color: var(--tenue); }
.vivo-ver button.vivo-op:hover { border-color: var(--acento); color: var(--tinta); box-shadow: none; translate: none; }
.vivo-ver button.vivo-op.elegida { background: var(--acento); border-color: var(--acento); color: #FFFDF8; }
.vivo-ver button.vivo-op.elegida small { color: #E6E4F7; }
.vivo-ver-test { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 0 auto; font-size: .85rem; color: var(--tenue); }
.vivo-ver-test select { width: auto; padding: .3rem .6rem; border-radius: 10px; font-size: .88rem; }
@media (max-width: 34rem) { .vivo-ver-test { margin-left: 0; } }
/* En vivo en el celular: que la primera tarjeta entre en la primera pantalla.
   El selector y las cifras pasan a filas que se deslizan con el dedo, y todo
   lo que se toca mide al menos lo que pide un dedo (40-44 px). */
@media (max-width: 34rem) {
  .vivo-cab h1 { font-size: 1.55rem; margin-top: .2rem; }
  .vivo-sub { display: none; }
  .vivo-latido { margin-top: .1rem; }
  .vivo-latido button.vivo-pausa { min-height: 36px; padding: .2rem .95rem; }
  .vivo-ver { gap: .45rem; margin-top: .8rem; }
  .vivo-ver-tit { display: none; }
  .vivo-ver-opc { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: .25rem; scroll-snap-type: x proximity;
    scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .vivo-ver-opc::-webkit-scrollbar { display: none; }
  .vivo-ver button.vivo-op { flex: none; min-height: 44px; justify-content: center; scroll-snap-align: start; }
  .vivo-ver-test { width: 100%; }
  .vivo-ver-test select { flex: 1; min-height: 40px; }
  .vivo-cifras { display: flex; overflow-x: auto; gap: .45rem; margin: .7rem 0 .1rem; padding-bottom: .25rem; scrollbar-width: none; }
  .vivo-cifras::-webkit-scrollbar { display: none; }
  .vivo-cifra { flex: none; display: flex; align-items: baseline; gap: .35rem; padding: .4rem .8rem; border-radius: 999px; }
  .vivo-cifra b { display: inline; font-size: 1.25rem; }
  .vivo-cifra span { font-size: .78rem; white-space: nowrap; }
  .vivo h2 { margin-top: 1.1rem; font-size: 1.2rem; }
  .vivo-pie a { padding: .5rem .7rem; margin: -.5rem -.7rem -.5rem auto; }
  .vivo-lista summary { padding: .85rem 0; }
  .vivo-lista td a { display: inline-block; padding: .6rem .45rem; margin: -.6rem -.45rem; }
  .vivo-pcab { flex-wrap: wrap; gap: .35rem; }
  .vivo-pcab > div { flex: 1 1 100%; }
  .vivo-chip { margin-left: 0; }
  .vivo-cifras { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
}

/* ---------- La barra en el celular (16/10/2026): el menú se pliega detrás de «Menú» ----------
   Sólo con JavaScript (la clase .con-menu la pone el guion de layout.php); sin él, se ve como
   siempre. En la computadora .barra-cuerpo no existe como caja (display: contents). */
.barra-cuerpo { display: contents; }
.barra .barra-menu { display: none; }
.barra nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--lavanda); text-underline-offset: .35em; text-decoration-thickness: 2px; }
@media (max-width: 34rem) {
  .barra.con-menu { gap: 0 .8rem; padding-block: .5rem; }
  .barra.con-menu .marca { font-size: 1.2rem; }
  .barra.con-menu .marca .isotipo-id { width: 32px; height: 32px; }
  .barra.con-menu .barra-menu { display: inline-flex; align-items: center; gap: .55rem; margin-left: auto; min-height: 42px; padding: .4rem .95rem;
    background: transparent; color: #F4EFE6; border: 1.5px solid rgba(230, 228, 247, .4); border-radius: 999px; box-shadow: none; font-size: .95rem; translate: none; }
  .barra.con-menu .barra-menu:hover { box-shadow: none; translate: none; color: #fff; }
  .barra-menu-icono { display: inline-grid; gap: 3px; }
  .barra-menu-icono i { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .barra.abierta .barra-menu-icono i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .barra.abierta .barra-menu-icono i:nth-child(2) { opacity: 0; }
  .barra.abierta .barra-menu-icono i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
  .barra.con-menu .barra-cuerpo { display: none; }
  .barra.con-menu.abierta .barra-cuerpo { display: flex; flex-direction: column; width: 100%; padding: .3rem 0 .5rem; }
  .barra.con-menu.abierta nav { flex-direction: column; gap: 0; }
  .barra.con-menu.abierta nav a { display: flex; align-items: center; min-height: 46px; padding: 0 .2rem; border-top: 1px solid rgba(230, 228, 247, .14); font-size: 1.02rem; }
  .barra.con-menu.abierta nav a[aria-current="page"] { text-decoration: none; color: #fff; box-shadow: inset 3px 0 0 var(--lavanda); padding-left: .8rem; }
  .barra.con-menu.abierta .quien { margin: .5rem 0 0; padding-top: .6rem; border-top: 1px solid rgba(230, 228, 247, .14); line-height: 2.4; }
}
@media (prefers-reduced-motion: reduce) { .barra-menu-icono i { transition: none; } }
/* En el celular no entran dos columnas de 210 px: el campo que pide ocupar dos (el buscador del
   archivo de informes) pasaba a ocupar el ancho entero y la página se corría de costado. */
@media (max-width: 34rem) {
  .campos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
  .campos > div[style*="grid-column"] { grid-column: 1 / -1 !important; }
}
/* Tablas de datos sueltas dentro de una tarjeta (por ejemplo, la configuración en Probar correo):
   en el celular, una dirección de correo o un enlace largo se corta en vez de correr la página. */
@media (max-width: 34rem) {
  .tarjeta > table th, .tarjeta > table td { overflow-wrap: anywhere; }
}
