/* ClinicManager — la misma dirección visual que la versión Reflex
   («minimalismo tipográfico», theme.py): el color está en el dato, no en el
   cromo. Los tokens se repiten aquí como variables CSS. */
:root {
  --fondo: #F1F2F6; --superficie: #FFFFFF; --superficie-2: #F5F5F7;
  --tinta: #1D1D1F; --tinta-suave: #6E6E73; --tenue: #A1A1A6;
  --linea: #E4E4E7; --linea-suave: #EFEFF2;
  --boton: #1D1D1F; --boton-hover: #000;
  --exito: #2E7D5B; --exito-tenue: #E7F1EB; --exito-linea: #BFD8CA;
  --aviso: #B07A18; --aviso-tenue: #FAF4E8; --aviso-linea: #E3CFA5;
  --peligro: #B3261E; --peligro-tenue: #FBEEEC;
  --radio: 14px; --radio-sm: 12px;
  --elev-1: 0 1px 2px rgba(17,20,32,.05), 0 4px 14px -6px rgba(17,20,32,.10);
  --elev-2: 0 2px 6px -1px rgba(17,20,32,.10), 0 10px 24px -8px rgba(17,20,32,.16);
  --elev-3: 0 4px 12px -2px rgba(17,20,32,.14), 0 18px 40px -12px rgba(17,20,32,.24);
  --alto-barra: 62px;
  /* La franja de «versión en prueba» (26 px) va fija arriba, con la barra
     debajo; el día del cambio se quita y esto pasa a 0. */
  --alto-prueba: 26px;
  --arriba: calc(var(--alto-prueba) + var(--alto-barra));
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  /* Todas las pantallas llevan la foto de la unidad bajo un velo de papel,
     más opaco que en el acceso (`theme.FONDO_APP`); fija al desplazar. */
  background: linear-gradient(135deg, rgba(241,242,246,.90), rgba(223,226,234,.88)), url("../marca/fondo-acceso.c082b92c163d.jpg") center / cover fixed no-repeat;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tinta); background-color: var(--fondo); -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
svg { flex-shrink: 0; }
/* `hidden` manda siempre: un `display` propio no puede volver a enseñar lo oculto. */
[hidden] { display: none !important; }

/* ── Barra superior ───────────────────────────────────────────────────── */
.barra {
  position: sticky; top: var(--alto-prueba); z-index: 20; height: var(--alto-barra);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(12px, 3vw, 32px);
  background: rgba(241,242,246,.78); backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--linea);
}
.marca { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.marca img { height: 28px; width: auto; }
.marca .dos { color: var(--tenue); }

/* Menú de usuario: <details> nativo, sin JavaScript. */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--superficie-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tinta); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 600; }
.quien { display: flex; flex-direction: column; line-height: 1.15; }
.quien b { font-size: .88rem; font-weight: 600; }
.quien small { font-size: .74rem; color: var(--tinta-suave); }
.menu .panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px;
  background: var(--superficie); border-radius: var(--radio); box-shadow: var(--elev-3);
  padding: 6px; display: flex; flex-direction: column;
}
.menu .panel a, .menu .panel button {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  font-size: .9rem; color: var(--tinta); background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.menu .panel a:hover, .menu .panel button:hover { background: var(--superficie-2); box-shadow: var(--elev-1); transform: translateY(-1px); }
.menu .panel a.activo { background: var(--superficie-2); font-weight: 600; }
.menu .panel .antigua { margin-left: auto; color: var(--tenue); }
.menu .panel hr { border: 0; border-top: 1px solid var(--linea); margin: 6px 4px; }
.menu .panel .salir { color: var(--peligro); }
@media (max-width: 600px) { .quien { display: none; } }

/* ── Página ───────────────────────────────────────────────────────────
   Como `responsive.cabecera_pagina` + `cuerpo_bajo_cabecera` de la versión
   Reflex: la cabecera es una franja fija bajo la barra, a todo el ancho y
   esmerilada, y lo que se centra (1400 px) es su interior; el contenido de
   debajo lleva los mismos márgenes para que los bordes caigan en la misma
   vertical. Márgenes: 0,75 / 1,25 / 1,5 rem (`PAGE_PADDING`). */
:root { --pagina: .75rem; }
@media (min-width: 768px) { :root { --pagina: 1.25rem; } }
@media (min-width: 992px) { :root { --pagina: 1.5rem; } }
.cabecera { position: sticky; top: var(--arriba); z-index: 20; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: var(--pagina) max(var(--pagina), calc((100% - var(--ancho, 1400px)) / 2 + var(--pagina))) .85rem;
  background: rgba(241,242,246,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--linea); }
@media (min-width: 768px) { .cabecera { padding-bottom: 1.1rem; } }
.cabecera > div:first-child { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.cabecera h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.035em; line-height: 1.25; }
@media (min-width: 768px) { .cabecera h1 { font-size: 20px; } }
@media (min-width: 992px) { .cabecera h1 { font-size: 24px; } }
.cabecera p { margin: 0; color: var(--tinta-suave); font-size: .9rem; max-width: 560px; }
.cabecera > :not(:first-child) { flex-shrink: 0; }
@media (max-width: 991px) { .cabecera > :not(:first-child) { width: 100%; } }
.cuerpo { padding: 1rem var(--pagina) var(--pagina); max-width: var(--ancho, 1400px); margin: 0 auto; }
@media (min-width: 768px) { .cuerpo { padding-top: 1.4rem; } }

.pildora { appearance: none; border: 0; background: var(--superficie); box-shadow: var(--elev-1); border-radius: 99px; height: 40px; padding: 0 38px 0 18px; font-size: .92rem; font-weight: 500; color: var(--tinta); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }

/* ── Fichas de documento ──────────────────────────────────────────────── */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: .9rem; }
.ficha { background: var(--fondo); border: 1px solid var(--linea); border-radius: var(--radio-sm); padding: .95rem; display: flex; flex-direction: column; gap: .75rem; }
.ficha.resumen { background: var(--superficie); border: 1.5px solid var(--tinta-suave); }
.ficha .cab { display: flex; align-items: center; gap: .65rem; }
.ficha .ico { width: 34px; height: 34px; border-radius: 99px; background: var(--superficie-2); display: grid; place-items: center; color: var(--tinta-suave); }
.ficha .periodo { font-size: .92rem; font-weight: 500; letter-spacing: -.015em; }
.ficha .rotulo { font-size: .72rem; color: var(--tenue); }
.etiq { font-size: .66rem; font-weight: 600; color: var(--tenue); letter-spacing: .055em; text-transform: uppercase; }
.importe { font-size: 1.45rem; font-weight: 620; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fila-importe { display: flex; align-items: flex-end; justify-content: space-between; gap: .4rem .8rem; flex-wrap: wrap; }
.enlace-suave { font-size: .76rem; color: var(--tinta-suave); }
.enlace-suave:hover { text-decoration: underline; }
.acciones { display: flex; gap: .5rem; margin-top: auto; }
.acciones > * { flex: 1; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: .7rem; font-weight: 600; letter-spacing: .02em; border: 1px solid; white-space: nowrap; }
.chip.exito { color: var(--exito); background: var(--exito-tenue); border-color: var(--exito-linea); }
.chip.aviso { color: var(--aviso); background: var(--aviso-tenue); border-color: var(--aviso-linea); }
.entrega { height: 22px; display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--tenue); }

/* ── Botones ──────────────────────────────────────────────────────────── */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; border: 0; cursor: pointer; font-size: .88rem; font-weight: 500; transition: transform .12s, box-shadow .12s, background .12s; }
.boton.primario { background: var(--boton); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 6px -2px rgba(0,0,0,.35); }
.boton.primario:hover { background: var(--boton-hover); transform: translateY(-1px); }
.boton.suave { background: var(--superficie-2); color: var(--tinta); }
.boton.suave:hover { background: #ECECF0; }
.boton.ancho { width: 100%; height: 42px; font-size: .95rem; }

.vacio { background: var(--superficie); border-radius: var(--radio); box-shadow: var(--elev-1); padding: 3.5rem 1rem; text-align: center; color: var(--tenue); max-width: 760px; }
.vacio b { display: block; color: var(--tinta); font-weight: 500; margin: .5rem 0 .25rem; }

/* ── Acceso ─────────────────────────────────────────────────────────────
   Como `pages/login.py`: foto bajo un velo (0,78 / 0,72), tarjeta de 420 px
   con la sombra más alta, y una entrada animada (`responsive.css`). */
.acceso-fondo { min-height: 100vh; display: grid; place-items: center; padding: 1rem .75rem;
  background-image: linear-gradient(135deg, rgba(241,242,246,.78), rgba(223,226,234,.72)), var(--fondo-img);
  background-size: cover; background-position: center; background-attachment: fixed; }
@media (min-width: 768px) { .acceso-fondo { padding: 1.5rem; } }
.acceso-columna { width: 100%; max-width: 420px; }
.tarjeta-acceso { width: 100%; background: var(--superficie); border-radius: 16px; box-shadow: var(--elev-3); padding: 28px;
  display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 480px) { .tarjeta-acceso { padding: 36px; } }
.tarjeta-acceso .marca-acceso { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.tarjeta-acceso .marca-acceso img { height: 86px; width: auto; margin-bottom: .45rem; }
.tarjeta-acceso .nombre { font-weight: 800; font-size: 1.7rem; line-height: 1.25; }
@media (min-width: 480px) { .tarjeta-acceso .nombre { font-size: 2rem; } }
.tarjeta-acceso .nombre span { color: var(--tenue); }
.tarjeta-acceso .marca-acceso small { font-size: .85rem; color: var(--tinta-suave); }
.tarjeta-acceso hr { border: 0; border-top: 1px solid var(--linea); margin: 0; width: 100%; }
.form-acceso { display: flex; flex-direction: column; gap: 1rem; }
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo label { font-size: .85rem; font-weight: 600; color: var(--tinta); }
.campo input { height: 40px; border: 1px solid var(--linea); border-radius: 8px; padding: 0 12px; font-size: 1rem; background: var(--superficie);
  box-shadow: inset 0 1px 2px rgba(17,20,32,.06); color: var(--tinta); }
.campo input::placeholder { color: #A1A1A6; }
.campo input:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 1px var(--tinta); }
.campo input.mal { border-color: #E5484D; }
.boton.ancho { width: 100%; height: 40px; font-size: 1rem; }
.olvido-fila { display: flex; justify-content: flex-end; margin-top: -.5rem; }
.olvido { font: inherit; font-size: .82rem; color: var(--tinta-suave); background: none; border: 0; padding: 0; cursor: pointer; }
.olvido:hover { color: var(--tinta); text-decoration: underline; }
.error { background: var(--peligro-tenue); color: var(--peligro); border-radius: 10px; padding: .6rem .8rem; font-size: .86rem; display: flex; gap: .5rem; align-items: center; }
.error-olvido { color: #E5484D; font-size: .8rem; margin: 0; }
.ok-olvido { display: flex; gap: .5rem; align-items: flex-start; padding: .75rem; border-radius: 10px; background: var(--exito-tenue); color: var(--exito); font-size: .88rem; }
.autoria { text-align: center; font-size: .72rem; color: var(--tinta-suave); opacity: .75; letter-spacing: .01em; line-height: 1.55; margin-top: 1.5rem; }
.prueba { position: sticky; top: 0; z-index: 21; height: var(--alto-prueba); box-sizing: border-box; background: var(--aviso-tenue); color: var(--aviso); text-align: center; font-size: .78rem; padding: 4px 8px; border-bottom: 1px solid var(--aviso-linea); }
@keyframes acceso-tarjeta { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes acceso-pieza { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes acceso-aviso { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.acceso-tarjeta { animation: acceso-tarjeta .6s cubic-bezier(.16,1,.3,1) both; }
.acceso-pieza { animation: acceso-pieza .5s cubic-bezier(.16,1,.3,1) both; }
.acceso-pieza-1 { animation-delay: .12s; } .acceso-pieza-2 { animation-delay: .18s; } .acceso-pieza-3 { animation-delay: .26s; }
.acceso-pieza-4 { animation-delay: .33s; } .acceso-pieza-5 { animation-delay: .40s; }
.acceso-aviso { animation: acceso-aviso .28s cubic-bezier(.16,1,.3,1) both; }
@media (prefers-reduced-motion: reduce) { .acceso-tarjeta, .acceso-pieza, .acceso-aviso { animation: none; } }

/* ── Varios ───────────────────────────────────────────────────────────── */
.pila { display: flex; flex-direction: column; gap: .85rem; }
.centro { text-align: center; align-items: center; }
.suave { color: var(--tinta-suave); font-size: .9rem; margin: 0; }
.olvido { align-self: flex-end; font-size: .8rem; color: var(--tinta-suave); }
.olvido:hover { text-decoration: underline; }
.tarjeta { background: var(--superficie); border-radius: var(--radio); box-shadow: var(--elev-1); padding: clamp(1rem, 3vw, 1.5rem); }

/* Avisos breves (los «toasts» de la versión Reflex). */
.avisos { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.aviso-toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--superficie); box-shadow: var(--elev-3); font-size: .9rem; animation: aviso 4.5s ease forwards; }
.aviso-toast.success { color: var(--exito); }
.aviso-toast.error { color: var(--peligro); }
.aviso-toast.warning { color: var(--aviso); }
/* El aviso de que la sesión va a cerrarse: no se desvanece como los demás. */
.aviso-sesion { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 61; width: min(92vw, 460px);
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 12px;
  background: var(--superficie); box-shadow: var(--elev-3); font-size: .88rem; color: var(--aviso); }
.aviso-sesion span { flex: 1; }
@keyframes aviso { 0% { opacity: 0; transform: translateY(-6px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }

/* ── Recibos ──────────────────────────────────────────────────────────── */
.ficha.constancia { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; }
.ico.verde { color: var(--exito); }
.texto-suave { font-size: .78rem; color: var(--tinta-suave); }
.fila-botones { display: flex; gap: .5rem; align-items: center; }
.boton.subir { cursor: pointer; }
.boton.rojo { background: #E5484D; color: #fff; }
.boton.rojo:hover { background: #DC3E42; }
.ficha.rehacer { border: 1.5px solid #EB8E90; }
.datos { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; }
.datos > div > div:last-child { font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.observaciones { display: flex; flex-direction: column; gap: .55rem; padding: .6rem .7rem; border-radius: 10px; background: var(--superficie-2); }
.ficha.rehacer .observaciones { background: #FFF7F7; }
.obs { display: flex; gap: .45rem; align-items: flex-start; }
.obs svg { margin-top: 2px; }
.obs.mayor svg { color: #DC3E42; } .obs.menor svg { color: #AB6400; } .obs.detalle svg { color: var(--tenue); }
.obs-texto { font-size: .8rem; font-weight: 500; }
.obs.detalle .obs-texto { font-weight: 400; color: var(--tinta-suave); }
.obs-como { font-size: .76rem; color: var(--tinta-suave); }
.nota { display: flex; gap: .45rem; align-items: flex-start; font-size: .8rem; padding: .5rem .65rem; border-radius: 10px; background: var(--superficie-2); }
.acciones.envolver { flex-wrap: wrap; }
.acciones .ancho-total { flex-basis: 100%; }
.acciones .ancho-total .boton { width: 100%; }
.chip.gris { color: var(--tinta-suave); background: var(--superficie-2); border-color: var(--linea); }
.chip.aviso.borde { background: transparent; }
.chip.estado-green { color: #218358; background: #E6F6EB; border-color: #ADDDC0; }
.chip.estado-amber { color: #AB6400; background: #FFF7C2; border-color: #F3D673; }
.chip.estado-red { color: #CE2C31; background: #FFF0EF; border-color: #F4A9AA; }
.chip.estado-blue { color: #0D74CE; background: #E6F4FE; border-color: #ACD8FC; }
.chip.estado-gray { color: var(--tinta-suave); background: var(--superficie-2); border-color: var(--linea); }
.ficha.blanca { background: var(--superficie); }
.rotulo.fuerte { font-size: .68rem; font-weight: 600; color: var(--tinta-suave); letter-spacing: .04em; text-transform: uppercase; }

/* ── Historial ────────────────────────────────────────────────────────── */
.selectores { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; min-width: 0; }
.pildora.ancha { width: min(100%, 280px); }
.pila-hist { display: flex; flex-direction: column; gap: 1rem; }
.resumen-hist { display: block; cursor: pointer; transition: box-shadow .15s; }
.resumen-hist:hover { box-shadow: 0 4px 14px rgba(17,20,32,.12); }
.resumen-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem 2rem; }
.sumandos { flex: 1 1 340px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
@media (min-width: 768px) { .sumandos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.filete { width: 1px; align-self: stretch; background: var(--linea); display: none; }
@media (min-width: 992px) { .filete { display: block; } .dato.total { align-items: flex-end; text-align: right; } }
.dato { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.cifra { font-size: 1.3rem; font-weight: 620; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cifra.grande { font-size: 1.75rem; }
.pendiente-boleta, .aviso-c { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--aviso); white-space: nowrap; }
.pista { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--tinta-suave); margin-top: .9rem; }
.tarjeta > .pista.solo-movil { margin: 0 0 .6rem; color: var(--tenue); }
@media (min-width: 768px) { .solo-movil { display: none !important; } }

/* La tabla se desplaza ella, con sombra en el borde por el que sigue. */
.tabla-desliza { overflow-x: auto; max-width: 100%;
  background: linear-gradient(to right, var(--superficie) 40%, transparent), linear-gradient(to left, var(--superficie) 40%, transparent) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(29,29,31,.16), transparent), radial-gradient(farthest-side at 100% 50%, rgba(29,29,31,.16), transparent) 100% 0;
  background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
.tabla-hist { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabla-hist th { font-size: .7rem; font-weight: 600; color: var(--tenue); letter-spacing: .055em; text-transform: uppercase; text-align: left; white-space: nowrap; padding: 0 .7rem .6rem; }
.tabla-hist td { padding: .7rem; white-space: nowrap; border-top: 1px solid var(--linea); font-size: .88rem; }
.tabla-hist .c { text-align: center; } .tabla-hist .d { text-align: right; }
.tabla-hist tbody tr { cursor: pointer; }
.tabla-hist tbody tr:hover { background: var(--superficie-2); }
.tabla-hist tr.elegida { background: var(--superficie-2); box-shadow: inset 3px 0 0 var(--tinta); }
.tabla-hist .mes { font-size: .9rem; font-weight: 560; letter-spacing: -.015em; }
.tabla-hist .reloj { color: var(--aviso); vertical-align: -2px; }
.suave-c { color: var(--tinta-suave); } .tenue { color: var(--tenue); }
.tabla-hist .fuerte { font-weight: 560; }
.tabla-hist .total { font-size: .9rem; font-weight: 620; letter-spacing: -.015em; }
.cuenta { font-weight: 560; }
.cuenta.m { color: #C6892A; } .cuenta.t { color: #2E7D5B; } .cuenta.n { color: #3A3A3C; }
.cuenta.cero { color: var(--tenue); opacity: .45; }

.estadisticas { display: flex; flex-direction: column; gap: 1.4rem; scroll-margin-top: calc(var(--arriba) + 16px); }
.est-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.est-cab .espacio { flex: 1; }
.texto-tenue { font-size: .75rem; color: var(--tenue); }
.boton.chico { height: 26px; padding: 0 10px; font-size: .78rem; border-radius: 8px; }
.est-datos { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.est { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.est .etiq { font-size: .7rem; white-space: nowrap; }
.pie { font-size: .78rem; color: var(--tinta-suave); }
.ritmo { display: flex; flex-direction: column; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--linea-suave); }
.ritmo-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; font-size: .86rem; color: var(--tinta-suave); }
.ritmo-fila b { color: var(--tinta); font-weight: 620; }
.variacion { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.variacion.sube { color: var(--exito); } .variacion.baja { color: var(--peligro); }
.comparativas { display: flex; flex-wrap: wrap; gap: .7rem; }
.comparativa { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: .35rem; padding: .8rem .9rem; border-radius: 10px; background: var(--superficie-2); }
.comparativa .etiq { letter-spacing: .04em; }
.variaciones { display: flex; flex-wrap: wrap; gap: .9rem; min-height: 1.2em; }
.filete-h { border: 0; border-top: 1px solid var(--linea); margin: 0; width: 100%; }
.grafica { position: relative; height: 270px; width: 100%; }
.grafica.alta { height: 240px; } .grafica.baja { height: 150px; }
@media (max-width: 600px) { .est-datos { gap: 1.2rem 1rem; } .est { flex-basis: 130px; } .est .cifra { font-size: 1.15rem; } }

/* ── Avatar ───────────────────────────────────────────────────────────── */
.avatar { overflow: hidden; }
.avatar svg { width: 18px; height: 18px; }
.avatar b { font-weight: 600; }
.avatar.foto img, .avatar-grande.foto img, .avatar-chico.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.con-borde { box-shadow: inset 0 0 0 1px var(--linea); }

/* ── Mis Datos ────────────────────────────────────────────────────────── */
.columnas-datos { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: stretch; }
@media (min-width: 768px) { .columnas-datos { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (min-width: 1280px) { .columnas-datos { grid-template-columns: 1fr 1fr 1fr; } }
.pila-datos { display: flex; flex-direction: column; gap: 1rem; }
.seccion { display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.1rem; border-radius: 12px; }
.seccion-cab { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .88rem; padding-bottom: .7rem; border-bottom: 1px solid var(--linea); }
.campo-f { display: flex; flex-direction: column; gap: .3rem; }
.campo-f label { font-size: .78rem; font-weight: 600; color: var(--tinta-suave); display: flex; align-items: center; gap: 6px; }
.candado { color: var(--tenue); display: inline-flex; }
.campo-f input, .campo-f select { height: 34px; border: 1px solid var(--linea); border-radius: 8px; padding: 0 10px; font: inherit; font-size: .9rem;
  background: var(--superficie-2); color: var(--tinta); width: 100%; min-width: 0; }
.campo-f input[readonly] { cursor: not-allowed; }
.campo-f input.bloqueado { color: var(--tinta-suave); }
.campo-f select:disabled { opacity: 1; color: var(--tinta); cursor: not-allowed; }
.editando .campo-f input:not([readonly]), .editando .campo-f select { background: #fff; cursor: text; box-shadow: inset 0 1px 2px rgba(17,20,32,.06); }
.editando .campo-f select { cursor: pointer; }
.campo-f input:focus, .campo-f select:focus { outline: 2px solid rgba(29,29,31,.25); outline-offset: 1px; }
.campo-f input.mal { border-color: var(--peligro); }
.ayuda { font-size: .72rem; line-height: 1.35; color: var(--tenue); }
.ayuda.mal { color: var(--peligro); }
.panel-avatar { align-items: center; }
.panel-avatar .seccion-cab { align-self: stretch; }
.retrato { flex: 1 1 auto; display: grid; place-items: center; padding: 1rem 0; }
.avatar-grande, .avatar-chico { border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.avatar-grande { width: 200px; height: 200px; box-shadow: 0 0 0 3px #1D1D1F; }
.avatar-grande svg { width: 76px; height: 76px; }
.avatar-grande b { font-size: 3.4rem; font-weight: 800; letter-spacing: -1px; }
.avatar-chico { width: 48px; height: 48px; }
.avatar-chico svg { width: 22px; height: 22px; }
.avatar-chico b { font-size: 1rem; font-weight: 800; }
.opciones-avatar { display: grid; grid-template-columns: repeat(4, auto); gap: .75rem; justify-content: center; }
@media (min-width: 480px) and (max-width: 767px) { .opciones-avatar { grid-template-columns: repeat(6, auto); } }
@media (min-width: 1280px) { .opciones-avatar { grid-template-columns: repeat(3, auto); } }
.opcion { border: 3px solid transparent; border-radius: 50%; padding: 2px; background: none; cursor: pointer; transition: transform .15s; }
.opcion:disabled { opacity: .6; cursor: default; }
.opcion:not(:disabled):hover { transform: scale(1.1); }
.opcion.elegida { border-color: #1D1D1F; }
.subir-foto { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.boton.chico-b { height: 28px; padding: 0 10px; font-size: .8rem; }
.boton.contorno { background: transparent; border: 1px solid var(--tinta); color: var(--tinta); }
.boton.fantasma { background: transparent; color: var(--tinta-suave); }
.boton.fantasma:hover { background: var(--superficie-2); }
.nomina { margin-top: 1rem; }
.rejilla-nomina { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem 1.1rem; }
.registro { margin-top: 1rem; display: flex; flex-direction: column; gap: .7rem; border: 1px solid var(--linea); }
.registro .suave { max-width: 640px; font-size: .84rem; }
.tabla-cambios { width: 100%; border-collapse: collapse; }
.tabla-cambios th { font-size: .7rem; font-weight: 600; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; text-align: left; padding: 0 10px 7px; }
.tabla-cambios td { padding: 9px 10px; font-size: .82rem; white-space: nowrap; border-top: 1px solid var(--linea); }
.tabla-cambios .d { text-align: right; } .tabla-cambios .fuerte { font-weight: 500; }
.tabla-cambios .antes { color: var(--tenue); text-decoration: line-through; }
.tabla-cambios svg { color: var(--tenue); vertical-align: -1px; margin: 0 .3rem; }
.tabla-cambios b { font-weight: 500; }
.dialogo { border: 0; border-radius: 16px; box-shadow: var(--elev-3); padding: 1.3rem; width: min(380px, 92vw); }
.dialogo::backdrop { background: rgba(17,20,32,.4); }
.dialogo h2 { margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 600; }
.dialogo .suave { font-size: .84rem; margin-bottom: .9rem; }
.marco { position: relative; width: 280px; height: 280px; margin: 0 auto; overflow: hidden; border: 1px solid var(--linea); border-radius: 14px; background: var(--superficie-2); cursor: grab; touch-action: none; }
.marco img { position: absolute; user-select: none; pointer-events: none; max-width: none; }
.marco .mascara { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px var(--superficie-2); pointer-events: none; }
.zoom { display: flex; align-items: center; gap: .6rem; margin: .9rem 0; color: var(--tenue); }
.zoom input { flex: 1; accent-color: var(--tinta); cursor: pointer; }
.fila-botones.derecha { justify-content: flex-end; }

/* ── Disponibilidad ───────────────────────────────────────────────────── */
.disp { display: flex; flex-direction: column; gap: 1rem; }
.disp-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.disp-titulo { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.disp-titulo .suave { font-size: .85rem; }
.navegador-mes { display: inline-flex; align-items: center; gap: .25rem; background: var(--superficie); box-shadow: var(--elev-1); border-radius: 99px; height: 40px; padding: 0 .35rem; }
.navegador-mes b { font-weight: 600; font-size: .92rem; min-width: 128px; text-align: center; }
.navegador-mes a, .navegador-mes .apagado { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--tinta-suave); }
.navegador-mes a:hover { background: var(--superficie-2); }
.navegador-mes .apagado { opacity: .3; }
.plazo { display: flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 500; color: var(--tinta-suave); }
.cerrado { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; white-space: nowrap; }
.leyenda-turnos { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; font-size: .75rem; color: var(--tenue); }
.leyenda-turnos .espacio { flex: 1; }
.ley { display: inline-flex; align-items: center; gap: .35rem; }
.ley b { color: var(--tinta); font-size: .78rem; }
.ley i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ley.m i { background: #C6892A; } .ley.t i { background: #2E7D5B; } .ley.gn i { background: #3A3A3C; }
.atajos { display: flex; flex-wrap: wrap; gap: .5rem; }
.dias-disp { column-count: 1; column-gap: 1.75rem; column-rule: 1px solid var(--linea-suave); }
@media (min-width: 480px) { .dias-disp { column-count: 2; } }
@media (min-width: 992px) { .dias-disp { column-count: 3; } }
@media (min-width: 1280px) { .dias-disp { column-count: 4; } }
.dia-disp { display: flex; align-items: center; gap: .3rem; padding: .22rem 0; break-inside: avoid; }
.dia-disp .num { width: 30px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .85rem; font-weight: 600; line-height: 1; }
.dia-disp .num small { font-size: .6rem; font-weight: 700; color: var(--tenue); }
.dia-disp .num small.rojo { color: var(--peligro); }
.turno { flex: 1 1 0; min-width: 0; height: 30px; position: relative; }
.turno input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.turno span { height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--linea); background: var(--superficie-2);
  font-size: .72rem; font-weight: 700; color: var(--tenue); transition: background .15s, border-color .15s; }
.editando .turno span { cursor: pointer; }
.editando .turno:hover span { filter: brightness(.97); }
.turno input:focus-visible + span { outline: 2px solid rgba(29,29,31,.35); outline-offset: 1px; }
.turno input:checked + span { color: #fff; }
.turno.m input:checked + span { background: #C6892A; border-color: #C6892A; }
.turno.t input:checked + span { background: #2E7D5B; border-color: #2E7D5B; }
.turno.gn input:checked + span { background: #3A3A3C; border-color: #3A3A3C; }
.barra-pie { position: sticky; bottom: 0; z-index: 15; display: flex; gap: .6rem; justify-content: space-between; padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--linea); }
.barra-pie .boton { height: 40px; }
.barra-pie .boton.primario { margin-left: auto; }
@media (max-width: 767px) { .solo-ancho { display: none !important; } }

/* ── Visualizador Global ──────────────────────────────────────────────── */
.rol-centro { max-width: 1400px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); width: 100%; }
.rol-cab { position: sticky; top: var(--arriba); z-index: 12; padding: 24px 0 1rem; border-bottom: 1px solid var(--linea);
  background: rgba(241,242,246,.92); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.rol-cab h1 { margin: 0; font-weight: 600; letter-spacing: -.035em; }
.rol-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.rol-fila.segunda { margin-top: 1.1rem; gap: .9rem; }
.rol-fila .espacio { flex: 1; }
.periodo { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pildora.area { width: 172px; }
.pestanas { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--superficie-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { border: 0; background: transparent; padding: 7px 15px; border-radius: 99px; font-size: .82rem; color: var(--tinta-suave); cursor: pointer; white-space: nowrap; transition: all .18s; }
.pestanas button.activa { background: var(--superficie); color: var(--tinta); font-weight: 500; box-shadow: var(--elev-1); }
.leyenda-rol { display: flex; flex-wrap: wrap; gap: 18px; font-size: .78rem; color: var(--tinta-suave); }
.leyenda-rol span, .cab-columnas span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
@media (min-width: 768px) { .leyenda-rol.solo-movil-dia { display: none; } }
i.p { width: 7px; height: 7px; border-radius: 99px; display: inline-block; flex-shrink: 0; }
i.p.grande { width: 8px; height: 8px; }
i.p.m { background: #C6892A; } i.p.t { background: #2E7D5B; } i.p.gn { background: #3A3A3C; }
.cab-columnas { display: none; gap: 1.2rem; margin-top: 1.1rem; padding: 0 1rem; font-size: .72rem; font-weight: 500; color: var(--tinta-suave); letter-spacing: .03em; text-transform: uppercase; }
@media (min-width: 768px) { .cab-columnas:not([hidden]) { display: flex; } }
.cab-columnas .gutter { width: 74px; flex-shrink: 0; padding-left: 10px; }
.cab-columnas span:not(.gutter) { flex: 1 1 200px; padding: 0 16px; border-right: 1px solid var(--linea); }
.cab-columnas span.ultima { border-right: 0; }
.rol-cuerpo { padding-top: 1.4rem; padding-bottom: 48px; }
.vacio-tabla { text-align: center; color: var(--tenue); font-size: .88rem; padding: 2.5rem 1rem; margin: 0; }
.vacio-tabla b { color: var(--tinta); font-weight: 500; }

/* Matriz y por plaza */
.tabla-rol { width: fit-content; max-width: 100%; margin: 0 auto; padding: clamp(.9rem, 2vw, 1.2rem); }
.titulo-tabla { display: flex; align-items: center; gap: .8rem; margin-bottom: .7rem; width: 0; min-width: 100%; }
.titulo-tabla b { font-size: .85rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.camara { border: 1px solid var(--linea); background: var(--superficie); color: var(--tinta-suave); border-radius: 8px; height: 26px; padding: 0 .45rem; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.camara:hover { background: var(--superficie-2); }
.desliza { overflow: auto; max-width: 100%; }
.desliza.alto { max-height: 70vh; }
.m-fila { display: flex; min-width: max-content; border-top: 1px solid var(--linea); background: var(--superficie); }
.m-fila.par { background: var(--superficie-2); }
.m-cab { position: sticky; top: 0; z-index: 3; border-top: 0; border-bottom: 1.5px solid var(--linea); }
.m-nombre { position: sticky; left: 0; z-index: 2; background: inherit; width: 186px; min-width: 186px; display: flex; align-items: center; gap: 7px; padding-right: 8px; border-right: 1px solid var(--linea); font-size: .78rem; overflow: hidden; }
@media (min-width: 768px) { .m-nombre { width: 232px; min-width: 232px; } }
.m-nombre.plaza { width: 128px; min-width: 128px; }
.m-nombre .cod { font-size: .62rem; font-weight: 700; color: var(--tenue); min-width: 22px; }
.largo, .corto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.corto { display: none; }
@media (max-width: 767px) { .largo { display: none; } .corto { display: inline; } }
.m-dia { width: 34px; min-width: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 1px; }
.m-cab .m-dia { padding: 5px 0 6px; gap: 1px; }
.m-cab .m-dia small { font-size: .58rem; font-weight: 600; color: var(--tenue); }
.m-cab .m-dia b { font-size: .68rem; font-weight: 700; color: var(--tinta-suave); }
.m-cab .m-dia.finde small { color: var(--tinta-suave); } .m-cab .m-dia.finde b { color: var(--tinta); }
.m-dia.finde { background: #F0F0F3; }
.m-dia.lunes, .pl-celda.lunes { border-left: 1px solid var(--linea); }
.et { width: 100%; height: 20px; border-radius: 6px; border: 1px solid transparent; display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 700; }
.et-M, .et-D, .et-MN { background: #F5E7CE; border-color: #E3CFA5; color: #7A5410; }
.et-T, .et-TN { background: #D8E9E0; border-color: #B3D2C2; color: #245C42; }
.et-N { background: #E0E0E4; border-color: #C6C6CC; color: #3A3A3C; }
.et-DN { background: #EFEFF2; border-color: #DEDEE3; color: #5A5A5F; }
.et.largo { font-size: .5rem; letter-spacing: -.03em; } /* «MMTT» y más, de la doble plaza */
.m-fila.pl { border-top: 1px solid var(--linea-suave); }
.m-fila.pl.primera { border-top: 1.5px solid var(--linea); }
/* Aire entre MED. 01 y MED. 02, como en la app: se leen como dos bloques. */
.m-fila.pl.otra-plaza { margin-top: 10px; }
.m-fila.pl.noche { background: var(--superficie-2); }
.pl-nombre { min-width: 58px; font-size: .7rem; font-weight: 600; color: var(--tinta-suave); white-space: nowrap; }
.m-nombre.plaza b { font-size: .7rem; }
.pl-celda { width: 34px; min-width: 34px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: .64rem; font-weight: 700; color: var(--tenue); border-right: 1px solid var(--linea-suave); }
.pl-celda.con { color: var(--tinta); }
.pl-celda.finde { background: #F0F0F3; }
.pl-celda.falta { background: var(--peligro-tenue); color: var(--peligro); font-size: .72rem; font-weight: 800; }
.codigos { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--linea); width: 0; min-width: 100%; }
.codigos > div { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; margin-top: .6rem; }
.codigo { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--tinta-suave); white-space: nowrap; }
.codigo b { font-size: .66rem; font-weight: 700; color: var(--tinta); background: var(--superficie-2); padding: 2px 5px; border-radius: 6px; }

/* Por día */
.por-dia { padding: .6rem 1rem 1.2rem; }
.fila-dia { display: flex; align-items: flex-start; gap: 1.2rem; padding: 10px 0; border-top: 1px solid var(--linea); }
.fila-dia.finde { background: var(--superficie-2); }
.fila-dia .gutter { width: 74px; flex-shrink: 0; display: flex; align-items: center; gap: 7px; }
@media (min-width: 768px) { .fila-dia .gutter { padding-left: 10px; } }
.fila-dia .num { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-size: .95rem; font-weight: 600; letter-spacing: -.02em; }
.fila-dia .num.hoy { background: var(--tinta); color: #fff; }
.fila-dia .gutter small { font-size: .72rem; color: var(--tenue); }
.fila-dia .cols { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .85rem; }
.fila-dia .col { display: flex; flex-wrap: wrap; gap: 7px 20px; min-width: 0; }
.fila-dia .col em { font-size: .82rem; color: var(--tenue); }
.col-et { flex-basis: 100%; font-size: .66rem; font-weight: 500; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 2px; }
.medico { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; letter-spacing: -.01em; white-space: nowrap; }
.medico i.p { width: 6px; height: 6px; }
@media (min-width: 768px) {
  .fila-dia .cols { flex-direction: row; gap: 0; }
  .fila-dia .col { flex: 1 1 200px; padding: 0 16px; border-right: 1px solid var(--linea); align-content: flex-start; }
  .fila-dia .col.ultima { border-right: 0; }
  .col-et { display: none; }
}

/* Por turno */
.bloque-turno { width: fit-content; max-width: 100%; margin: 0 auto 1.6rem; }
.bt-cab { display: flex; align-items: baseline; gap: 8px; margin-bottom: .7rem; }
.bt-cab b { font-size: .95rem; font-weight: 500; letter-spacing: -.015em; }
.bt-cab span { font-size: .82rem; color: var(--tenue); }
.bloque-turno .tarjeta { padding: clamp(.9rem, 2vw, 1.2rem); }
.t-fila { display: flex; align-items: center; min-width: max-content; }
.t-fila.borde { border-top: 1px solid var(--linea); }
.t-fila.totales { margin-top: 4px; }
.t-nombre { width: 160px; min-width: 160px; padding: 5px 12px 5px 0; font-size: .8rem; display: flex; overflow: hidden; }
@media (min-width: 768px) { .t-nombre { width: 186px; min-width: 186px; } }
.et-total { font-size: .72rem; font-weight: 500; color: var(--tinta-suave); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.t-dia { width: 24px; min-width: 24px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 500; }
.t-dia.num { font-size: .6rem; color: var(--tenue); height: auto; padding-bottom: 7px; }
.totales .t-dia { height: 24px; }
.t-dia.finde { background: var(--superficie-2); }
.t-dia.hueco { color: var(--peligro); }
.t-dia i.lleno { width: 9px; height: 9px; border-radius: 99px; }
.t-dia i.lleno.m { background: #C6892A; } .t-dia i.lleno.t { background: #2E7D5B; } .t-dia i.lleno.gn { background: #3A3A3C; }
.t-dia i.guia { width: 3px; height: 3px; border-radius: 99px; background: var(--linea); }
/* La doble plaza: «×2» junto al punto; el punto se encoge un poco para que quepa en 24 px. */
.t-dia:has(.x2) { gap: 1px; } .t-dia:has(.x2) i.lleno { width: 7px; height: 7px; }
.t-dia .x2 { font-size: .5rem; font-weight: 700; letter-spacing: -.04em; color: var(--tinta); }

/* Calendario */
.calendario-rol { padding: clamp(.9rem, 2vw, 1.2rem); }
.franjas { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.franjas span { display: inline-flex; align-items: center; gap: .3rem; padding: 4px 10px; background: var(--superficie-2); border-radius: 99px; font-size: .72rem; color: var(--tinta-suave); white-space: nowrap; }
.franjas svg { color: var(--tenue); }
.cal-desliza { overflow-x: auto; }
.cal-sem, .cal-rejilla { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: .45rem; }
.cal-sem { margin-bottom: .3rem; }
.cal-sem span { font-size: .68rem; font-weight: 700; color: var(--tenue); letter-spacing: .08em; padding-left: .5rem; }
.cal-sem span.rojo { color: var(--peligro); }
.cal-dia { display: flex; flex-direction: column; gap: .3rem; padding: .5rem; min-height: 118px; background: var(--superficie); border: 1px solid var(--linea); border-radius: 12px; min-width: 0; }
.cal-dia.fuera { background: transparent; }
.cal-dia.fuera .cal-num b { color: var(--tenue); }
.cal-dia.domingo { background: var(--peligro-tenue); }
.cal-dia.domingo .cal-num b { color: var(--peligro); }
.cal-dia.hoy { box-shadow: 0 0 0 2px var(--tinta); }
.cal-num { display: flex; align-items: center; justify-content: space-between; }
.cal-num b { font-size: .95rem; font-weight: 620; letter-spacing: -.02em; }
.feriado { font-size: .55rem; font-weight: 700; color: var(--exito); letter-spacing: .08em; }
.cal-entradas { flex: 1; display: flex; flex-wrap: wrap; gap: .3rem; align-content: stretch; min-width: 0; }
.cal-e { flex: 1 1 100%; min-width: 0; border-left: 3px solid; border-radius: 7px; padding: 5px 8px; display: flex; flex-direction: column; }
.cal-e.media { flex: 1 1 0; padding: 4px 6px; }
.cal-et { display: flex; align-items: center; gap: .25rem; font-size: .58rem; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.cal-e.media .cal-et { font-size: .55rem; }
.cal-n { font-size: .78rem; font-weight: 560; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.cal-e.media .cal-n { font-size: .72rem; }
.cal-leyenda { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.cal-leyenda span { display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; background: var(--superficie); border: 1px solid var(--linea); border-radius: 12px; }
.cal-leyenda i { width: 9px; height: 9px; border-radius: 99px; }
.cal-leyenda b { font-size: .78rem; font-weight: 560; }
.cal-leyenda small { font-size: .7rem; color: var(--tenue); margin-left: .2rem; }

/* Por médico */
.rejilla-medicos { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .rejilla-medicos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .rejilla-medicos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.medico-t { padding: 18px; border-radius: 16px; min-width: 0; }
.mt-cab { display: flex; align-items: center; gap: 11px; }
.mt-cab .ini { width: 32px; height: 32px; border-radius: 99px; background: var(--tinta); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 600; flex-shrink: 0; }
.mt-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mt-nom b { font-size: .88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-nom small { font-size: .72rem; color: var(--tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.horas { font-size: .72rem; color: var(--tenue); white-space: nowrap; }
.horas b { font-size: 1rem; font-weight: 600; color: var(--tinta); }
.tira { display: flex; gap: 1px; margin-top: 14px; }
.tira > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 0 1px; border-radius: 3px; }
.tira > div.finde { background: var(--superficie-2); }
.tira i { height: 6px; border-radius: 2px; }
.tira i.m { background: #C6892A; } .tira i.t { background: #2E7D5B; } .tira i.gn { background: #3A3A3C; }
/* La doble plaza no cabe con texto en 6 px: la barra se parte en dos (=). */
.tira i.doble { -webkit-mask: linear-gradient(#000 0 40%, transparent 40% 60%, #000 60%); mask: linear-gradient(#000 0 40%, transparent 40% 60%, #000 60%); }
.mt-pie { display: flex; gap: 14px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--linea); font-size: .78rem; font-weight: 500; color: var(--tinta-suave); }
.mt-pie span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 600px) {
  .rol-cab { padding-top: 16px; padding-bottom: .75rem; }
  .rol-fila.segunda { margin-top: .75rem; gap: .5rem; }
  .periodo { flex-wrap: nowrap; width: 100%; gap: .4rem; }
  .pildora.area { width: auto; flex: 1 1 0; min-width: 0; padding-left: 14px; padding-right: 30px; background-position: right 10px center; }
  .periodo .navegador-mes b { min-width: 104px; font-size: .86rem; }
  .leyenda-rol { gap: 4px 12px; font-size: .72rem; }
}

/* ── Mi Horario ───────────────────────────────────────────────────────── */
.horario { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
@media (min-width: 992px) { .horario { flex-direction: row; padding-right: 2.4rem; } }
.cal-tarjeta { flex: 1; min-width: 0; }
.lateral { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (min-width: 992px) { .lateral { width: 360px; flex-shrink: 0; } .panel-dia { flex: 1 1 auto; } }
.cal-cab { display: flex; align-items: center; gap: .75rem; margin-bottom: .8rem; }
@media (min-width: 768px) { .cal-cab { margin-bottom: 1.2rem; } }
.cal-cab > div:first-child { flex: 1; min-width: 0; }
.cal-cab h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.035em; }
.cal-cab .suave { font-size: .82rem; margin-top: .2rem; }
.flechas { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--superficie-2); flex-shrink: 0; }
.flechas button { width: 32px; height: 28px; border: 0; background: none; border-radius: 99px; cursor: pointer; display: grid; place-items: center; color: var(--tinta-suave); }
.flechas button:hover { background: rgba(0,0,0,.05); }
.cal-dias-sem, .semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dias-sem span { font-size: .75rem; color: var(--tenue); padding: 0 8px 10px; min-width: 0; overflow: hidden; }
@media (max-width: 479px) { .cal-dias-sem span { font-size: 0; padding: 0 2px 8px; } .cal-dias-sem span::first-letter { font-size: .72rem; } }
#cal-continuo { position: relative; overflow-y: auto; height: 624px; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
#cal-continuo::-webkit-scrollbar { display: none; }
.semana[data-inicio] { scroll-snap-align: start; }
.casilla { height: 104px; overflow: hidden; min-width: 0; padding: 2px; border-top: 1px solid var(--linea); }
.dia { width: 100%; height: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 8px 8px 10px; border-radius: 12px; cursor: pointer; min-width: 0; transition: box-shadow .18s, transform .18s, background .18s; }
.dia:hover { background: var(--superficie); box-shadow: var(--elev-2); transform: translateY(-2px); position: relative; z-index: 2; }
.dia:active { transform: none; box-shadow: var(--elev-1); }
.dia.pasado { background: #F8F8FA; }
.dia.elegido { background: #FAFAFB; box-shadow: var(--elev-1); }
.dia.pasado > * { opacity: .5; }
.dia.fuera { background: transparent; }
.dia.fuera > * { opacity: .18; }
.num-fila { display: flex; align-items: center; gap: 4px; }
.dia .num { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-size: .88rem; letter-spacing: -.02em; flex-shrink: 0; }
.dia .num.hoy { background: var(--tinta); color: #fff; font-weight: 600; }
.dia.pasado .num:not(.hoy), .dia.fuera .num:not(.hoy) { color: var(--tenue); }
.dia.elegido .num { font-weight: 600; }
.et-mes { font-size: .68rem; font-weight: 600; color: var(--tinta-suave); text-transform: uppercase; letter-spacing: .04em; }
.pastilla { display: inline-flex; align-items: center; gap: 5px; border: 1px solid; border-radius: 6px; padding: 2px 7px; max-width: 100%; min-width: 0; overflow: hidden; flex-shrink: 0; white-space: nowrap; }
.largo-t { font-size: .72rem; font-weight: 600; } .corto-t { display: none; font-size: .6rem; font-weight: 700; }
.area-t { font-size: .62rem; font-weight: 500; opacity: .72; letter-spacing: .03em; }
.p-M { background: #F5E7CE; border-color: #E3CFA5; color: #7A5410; }
.p-T { background: #D8E9E0; border-color: #B3D2C2; color: #245C42; }
.p-GN { background: #E0E0E4; border-color: #C6C6CC; color: #3A3A3C; }
.p-D { background: #E7F0FB; border-color: #B7D0F0; color: #1F5C9E; }
@media (max-width: 767px) {
  #cal-continuo { height: 504px; overflow-y: hidden; scroll-snap-type: none; overscroll-behavior: auto; }
  .casilla { height: 84px; }
  .dia { padding: 7px 6px 8px; gap: 4px; }
  .dia .num { width: 24px; height: 24px; font-size: .72rem; }
  .largo-t { display: none; } .corto-t { display: inline; }
  .pastilla { width: 100%; padding: 1px 3px; gap: 2px; }
  .area-t { font-size: .5rem; }
}
@media (max-width: 479px) {
  #cal-continuo { height: 456px; } .casilla { height: 76px; }
  .dia { padding: 4px 3px 6px; } .dia .num { width: 20px; height: 20px; }
  .area-t, .et-mes { display: none; }
}
.panel-dia { display: flex; flex-direction: column; }
.sin-dia { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: 1.5rem 0; color: var(--tenue); }
.sin-dia b { color: var(--tinta); font-weight: 500; }
.sin-dia span { font-size: .85rem; max-width: 230px; }
.dia-cab { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dia-cab b { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
.cerrar-dia, .cerrar-cajon { border: 0; background: none; color: var(--tenue); cursor: pointer; padding: 4px; border-radius: 6px; display: grid; }
.cerrar-dia:hover, .cerrar-cajon:hover { background: var(--superficie-2); }
.propio { background: var(--superficie-2); border-radius: 12px; padding: .15rem .95rem; margin-top: .8rem; }
.propio-t { padding: .55rem 0; display: flex; flex-direction: column; gap: .25rem; }
.propio-l { display: flex; flex-wrap: wrap; align-items: center; gap: 0 9px; font-size: .85rem; color: var(--tinta-suave); }
.propio-l b { font-size: .95rem; font-weight: 600; color: var(--tinta); letter-spacing: -.015em; }
.dos-plazas { font-size: .68rem; font-weight: 600; color: var(--tinta); background: #F0F0F3; padding: 1px 7px; border-radius: 99px; }
.contigo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-left: 17px; }
.contigo small { font-size: .72rem; color: var(--tenue); text-transform: uppercase; letter-spacing: .05em; }
.contigo div { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .82rem; color: var(--tinta-suave); }
.libre { display: flex; align-items: center; gap: 9px; padding: .7rem 0; font-size: .9rem; color: var(--tinta-suave); }
.libre svg { color: var(--tenue); }
.areas-dia { margin-top: .6rem; }
.area-dia { padding: .6rem 0; border-top: 1px solid var(--linea-suave); }
.area-dia .etiq { margin-bottom: .25rem; }
.linea-turno { display: flex; align-items: flex-start; gap: 10px; padding: 1px 0; }
.lt-et { width: 84px; min-width: 84px; display: flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 500; color: var(--tinta-suave); white-space: nowrap; line-height: 1.6; }
.lt-et i.p { width: 6px; height: 6px; }
.lt-nombres { display: flex; flex-wrap: wrap; gap: 0 14px; flex: 1; min-width: 0; }
.lt-nombres span { font-size: .82rem; color: var(--tinta-suave); white-space: nowrap; line-height: 1.5; padding: 1px 0; letter-spacing: -.01em; }
.lt-nombres span.tuyo { font-weight: 600; color: var(--tinta); background: #F0F0F3; padding: 1px 7px; border-radius: 6px; }
.cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem 1rem; margin-top: 1rem; }
.cifras b { display: block; font-size: 1.55rem; font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.cifras b.c-m { color: #C6892A; } .cifras b.c-t { color: #2E7D5B; } .cifras b.c-gn { color: #3A3A3C; }
.cifras span { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: .72rem; color: var(--tinta-suave); }
i.p.tenue-p { background: var(--tenue); width: 6px; height: 6px; }
.cifras i.p { width: 6px; height: 6px; }
.tirador { position: fixed; right: 0; top: 38%; z-index: 50; border: 0; padding: 14px 10px 14px 12px; background: var(--superficie); border-radius: 14px 0 0 14px; box-shadow: var(--elev-3);
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--tinta); transition: padding .18s; }
.tirador:hover { padding: 14px 14px 14px 16px; }
.tirador .cuenta { background: var(--peligro); color: #fff; border-radius: 99px; min-width: 17px; height: 17px; padding: 0 4px; font-size: .6rem; font-weight: 700; display: grid; place-items: center; }
.tirador .cuenta[hidden] { display: none; }
.cajon-fondo { position: fixed; inset: 0; z-index: 55; background: rgba(17,20,32,.18); }
.cajon { position: fixed; top: 0; right: 0; bottom: 0; z-index: 56; width: min(340px, 86vw); background: var(--superficie); box-shadow: var(--elev-3); padding: clamp(1rem, 3vw, 1.5rem);
  overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; transform: translateX(100%); transition: transform .25s ease; }
.cajon.abierto { transform: none; }
.cajon-cab { display: flex; align-items: center; justify-content: space-between; }
.cajon-cab .etiq { font-size: .78rem; }
.aviso-t { color: var(--aviso) !important; }
.pendientes { display: flex; flex-direction: column; gap: .4rem; }
.pendiente { display: flex; align-items: flex-start; gap: .7rem; padding: .55rem .4rem; margin: 0 -.4rem; border-radius: 6px; }
.pendiente:hover { background: var(--superficie-2); }
.pendiente > svg { color: var(--tenue); align-self: center; }
.p-ico { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; background: var(--superficie-2); color: var(--tinta-suave); }
.p-ico.urgente { background: var(--aviso-tenue); color: var(--aviso); }
.p-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.p-txt b { font-size: .86rem; font-weight: 600; letter-spacing: -.01em; }
.p-txt small { font-size: .76rem; color: var(--tinta-suave); line-height: 1.4; }
.novedad { display: flex; gap: .6rem; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--linea-suave); }
.novedad > div { flex: 1; min-width: 0; }
.nov-cab { display: flex; align-items: center; gap: .4rem; }
.nov-cab b { flex: 1; font-size: .8rem; font-weight: 700; line-height: 1.35; }
.nov-cab small { font-size: .68rem; color: var(--tenue); white-space: nowrap; }
.novedad p { margin: 2px 0 0; font-size: .78rem; color: var(--tinta-suave); line-height: 1.5; }
.insignia { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; background: var(--superficie-2); color: var(--tinta-suave); }
.insignia.k-conformidad { background: var(--exito-tenue); color: var(--exito); }
.insignia.k-announcement { background: var(--aviso-tenue); color: var(--aviso); }
.insignia.t-M { background: #F5E7CE; color: #7A5410; } .insignia.t-T { background: #D8E9E0; color: #245C42; } .insignia.t-GN { background: #E0E0E4; color: #3A3A3C; }

/* ── Presentación en vídeo ────────────────────────────────────────────── */
.presentacion { position: fixed; inset: 0; z-index: 10002; background: rgba(10,10,12,.92); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
.pres-caja { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; max-width: 960px; }
.pres-titulos { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; color: #fff; }
.pres-titulos b { font-size: clamp(1.05rem, 2.6vw, 1.25rem); font-weight: 600; letter-spacing: -.02em; }
.pres-titulos span { font-size: .84rem; color: rgba(255,255,255,.7); max-width: 440px; }
.pres-marco { position: relative; }
.pres-marco video { display: block; max-width: min(960px, 100%); max-height: calc(100dvh - 190px); width: auto; height: auto; border-radius: 14px; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.pres-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 99px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); box-shadow: 0 10px 30px rgba(0,0,0,.35); display: grid; place-items: center; color: #1D1D1F; padding-left: 4px; }
.pres-play svg { fill: #1D1D1F; }
.pres-marco[data-reproduciendo] .pres-play { display: none; }
.pres-omitir { display: inline-flex; align-items: center; gap: 4px; color: #fff; border: 1px solid rgba(255,255,255,.35); background: transparent; border-radius: 99px; padding: 7px 16px; cursor: pointer; font-size: .88rem; }
.pres-omitir:hover { background: rgba(255,255,255,.08); }

/* Safari de iOS no admite el fondo `fixed`: la foto va en una capa fija aparte
   (lo mismo que `responsive.css` en la versión Reflex). */
@supports (-webkit-touch-callout: none) {
  body { background: var(--fondo); }
  body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(135deg, rgba(241,242,246,.90), rgba(223,226,234,.88)), url("../marca/fondo-acceso.c082b92c163d.jpg") center / cover no-repeat; }
  .acceso-fondo { background-attachment: scroll; }
}

@media (min-width: 480px) { .cal-cab h2 { font-size: 28px; } }
@media (min-width: 768px) { .cal-cab h2 { font-size: 35px; } }
.rol-cab h1 { font-size: 24px; }
@media (min-width: 768px) { .rol-cab h1 { font-size: 35px; } }
.rol-cab { padding-top: var(--pagina); }
.rol-centro { padding: 0 var(--pagina); }
/* El contenido arranca separado de la cabecera, como `.cuerpo` en el resto
   de secciones (la regla de arriba le quitaba el margen superior). */
.rol-centro.rol-cuerpo { padding-top: 1rem; padding-bottom: 48px; }
body { min-height: 100vh; }

/* Cambiar contraseña y el botón suave, como Radix «soft gray». */
.form-clave { display: flex; flex-direction: column; gap: 1rem; }
.form-clave .suave { font-size: .85rem; }
.form-clave .campo-f input { background: #fff; height: 32px; }
.form-clave .campo-f label { font-size: .8rem; }
.dos-campos { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 480px) { .dos-campos { grid-template-columns: 1fr 1fr; } }
.fila-botones .espacio { flex: 1; }
.aviso-caja { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; border-radius: 10px; background: #FFF7C2; color: #AB6400; font-size: .88rem; line-height: 1.45; }
.aviso-caja svg { margin-top: 2px; }
.boton.suave { background: #E9E9EC; box-shadow: 0 1px 2px rgba(17,20,32,.12); }
.boton.suave:hover { background: #E0E0E4; }

/* Sin avatar elegido: el círculo gris con la persona, como `profile.avatar_display`. */
.avatar-grande.sin-avatar { background: var(--superficie-2); color: var(--tenue); box-shadow: 0 0 0 3px var(--linea); }
/* Los desplegables, con la flecha de Radix y no la del navegador. */
.campo-f select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.campo-f input, .campo-f select { height: 32px; }
/* Los doce avatares reparten el ancho de la tarjeta, como la rejilla de Radix. */
.opciones-avatar { width: 100%; justify-items: center; grid-template-columns: repeat(4, 1fr); }
@media (min-width: 480px) and (max-width: 767px) { .opciones-avatar { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1280px) { .opciones-avatar { grid-template-columns: repeat(3, 1fr); } }
/* El estado de un recibo es una insignia de Radix: sin borde y algo más
   cuadrada que las pastillas de las fichas. */
.ficha .cab .chip { border-color: transparent; border-radius: 6px; font-size: .75rem; font-weight: 500; letter-spacing: 0; padding: 2px 8px; }
.ficha .cab .chip.aviso.borde { background: var(--aviso-tenue); }
.nota-tenue { font-size: .78rem; color: var(--tenue); line-height: 1.5; }

/* Insignias de Radix (size 2): sin borde, esquinas de 6 px. */
.insignia-r { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.insignia-r.amarilla { background: #FFF7C2; color: #9E6C00; }
.insignia-r.verde { background: #E6F6EB; color: #218358; }
.plazo.pendiente { color: var(--aviso); }
.atajos.sueltos .boton { border: 1px solid #D9D9E0; color: var(--tinta-suave); background: #fff; box-shadow: 0 1px 2px rgba(17,20,32,.08); height: 26px; font-size: .8rem; padding: 0 8px; }
.atajos.sueltos .boton:hover { background: var(--superficie-2); }
.pildora.area { width: 200px; }
.periodo .navegador-mes b { font-weight: 400; font-size: 1rem; min-width: 140px; }

/* Por debajo de 992 px el menú se abre con ☰, como `navbar.mobile_menu`. */
.solo-movil-menu { display: none; }
@media (max-width: 991px) { .solo-ancho-menu { display: none; } .solo-movil-menu { display: inline-flex; margin-left: 4px; } }
.campo-f input.bloqueado { color: var(--tinta); }

/* ── Administrador: barra lateral por fases (`navbar.menu_lateral`) ──── */
.menu-lateral { display: none; }
@media (min-width: 992px) {
  :root { --lateral: 224px; }
  .menu-lateral { display: flex; flex-direction: column; gap: 1px; position: fixed; top: var(--arriba); left: 0; bottom: 0; width: var(--lateral); box-sizing: border-box; padding: 10px 12px 24px;
    overflow: hidden auto; z-index: 15; border-right: 1px solid var(--linea); background: rgba(241,242,246,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
  body.con-lateral { padding-left: var(--lateral); }
  body.con-lateral .barra { margin-left: calc(-1 * var(--lateral)); }
  body.con-lateral .prueba { margin-left: calc(-1 * var(--lateral)); }
  .menu-admin-movil { display: none; }
}
/* Con ratón, la barra va en iconos y se abre **por encima** del contenido al
   pasar (o con Tab), sin empujar la página. «Fijar menú» la deja abierta y
   empujando, como antes. En pantallas táctiles no hay «pasar por encima»:
   ahí sigue abierta siempre y el botón no sale. */
.menu-lateral .fijar { display: none; }
@media (min-width: 992px) and (hover: hover) {
  body.con-lateral:not(.lateral-fija) { --lateral: 60px; }
  .menu-lateral { transition: width .18s ease, box-shadow .18s ease; }
  .menu-lateral a, .menu-lateral .grupo { white-space: nowrap; }
  .menu-lateral a > span, .menu-lateral .fijar > span, .menu-lateral .grupo { transition: opacity .15s ease, color .15s ease; }
  .menu-lateral { padding-bottom: 0; }
  /* Encima del contenido, casi opaca: la translúcida dejaba leer la página a través. */
  body:not(.lateral-fija) .menu-lateral:is(.abierta, :focus-within) { width: 224px; z-index: 25; box-shadow: var(--elev-3); background: rgba(241,242,246,.97); }
  /* Cerrada, el título de grupo se vuelve una línea **del mismo alto**: si
     encogiera, los iconos se moverían bajo el ratón al abrirse. */
  body:not(.lateral-fija) .menu-lateral:not(.abierta):not(:focus-within) .grupo { position: relative; color: transparent; }
  body:not(.lateral-fija) .menu-lateral:not(.abierta):not(:focus-within) .grupo::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 9px; border-top: 1px solid var(--linea); }
  body:not(.lateral-fija) .menu-lateral:not(.abierta):not(:focus-within) :is(a > span, .fijar > span) { opacity: 0; }
  /* Pegado al pie: en una pantalla de 900 px la lista ya no cabe y el botón
     quedaba debajo, donde nadie lo encuentra. */
  .menu-lateral .fijar { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; margin: auto -12px 0; padding: 12px 22px 16px; border: 0; border-top: 1px solid var(--linea);
    background: var(--fondo); position: sticky; bottom: 0; font: inherit; font-size: .8rem; color: var(--tenue); white-space: nowrap; cursor: pointer; }
  .menu-lateral .fijar:hover { color: var(--tinta); }
  .menu-lateral .fijar .q, body.lateral-fija .menu-lateral .fijar .p { display: none; }
  body.lateral-fija .menu-lateral .fijar .q { display: inline; }
}
.menu-lateral .grupo, .menu-admin-movil .grupo { font-size: .66rem; font-weight: 600; color: var(--tenue); letter-spacing: .07em; text-transform: uppercase; padding: 14px 10px 4px; }
.menu-lateral a { display: flex; align-items: center; gap: .6rem; padding: 7px 10px; border-radius: 9px; font-size: .86rem; font-weight: 500; color: var(--tinta-suave); }
.menu-lateral a svg { color: var(--tinta-suave); }
.menu-lateral a:hover { background: var(--superficie); }
.menu-lateral a.activo { background: var(--superficie); color: var(--tinta); font-weight: 650; box-shadow: 0 1px 3px rgba(17,20,32,.10); }
.menu-lateral a.activo svg { color: var(--tinta); }
.menu-lateral .antigua { margin-left: auto; color: var(--tenue); display: inline-flex; }
.menu .panel { max-height: calc(100vh - var(--alto-barra) - 16px); overflow-y: auto; }

/* ── Piezas comunes del admin ─────────────────────────────────────────── */
.rotulo-seccion { font-size: .72rem; font-weight: 600; color: var(--tenue); letter-spacing: .055em; text-transform: uppercase; }
.pasos-cierre { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; padding-top: 1.4rem; margin-top: 1.2rem; border-top: 1px solid var(--linea); }
.paso { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-radius: 12px; background: var(--superficie); box-shadow: 0 1px 3px rgba(17,20,32,.08); }
.paso:hover { box-shadow: 0 3px 10px rgba(17,20,32,.12); }
.paso .t { display: flex; flex-direction: column; gap: .15rem; }
.paso.sig { margin-left: auto; } .paso.sig .t { align-items: flex-end; }
.paso small { font-size: .7rem; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.paso b { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; font-weight: 600; }
.paso > svg { color: var(--tenue); }
.callout { display: flex; gap: .55rem; align-items: flex-start; padding: .6rem .8rem; border-radius: 8px; font-size: .84rem; line-height: 1.45; }
.callout.ambar { background: #FFF7C2; color: #9E6C00; } .callout.rojo { background: #FFF0EF; color: #CE2C31; } .callout.azul { background: #E6F4FE; color: #0D74CE; }
.callout svg { margin-top: 2px; }

/* ── Traslados ────────────────────────────────────────────────────────── */
.tr-cab { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-bottom: .6rem; border-bottom: 1px solid var(--linea); }
.tr-cab b { font-weight: 600; }
.tr-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--linea); }
.tr-cab + .tr-fila { border-top: 0; }
.tr-fecha { width: 90px; flex-shrink: 0; font-size: .84rem; font-variant-numeric: tabular-nums; }
.tr-medico { width: 220px; flex-shrink: 0; min-width: 0; display: flex; flex-direction: column; }
.tr-medico b { font-size: .86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-medico small { font-size: .72rem; color: var(--tenue); }
.tr-detalle { flex: 1; min-width: 220px; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; }
.tr-ruta { font-size: .84rem; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.tr-detalle small { font-size: .78rem; color: var(--tinta-suave); }
.tr-detalle small.tenue { font-size: .74rem; color: var(--tenue); }
.tr-monto { width: 100px; text-align: right; font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tr-acciones { display: flex; gap: 2px; flex-shrink: 0; }
.accion { border: 0; background: none; padding: 7px; border-radius: 99px; cursor: pointer; color: var(--tinta-suave); display: grid; }
.accion:hover { background: var(--superficie-2); }
.accion.rojo { color: var(--peligro); }
.tr-resumen { display: flex; align-items: center; gap: .8rem; padding: .3rem 0; }
.tr-resumen b { font-size: .86rem; font-weight: 500; }
.tr-resumen small { font-size: .8rem; color: var(--tinta-suave); }
.tr-resumen .espacio { flex: 1; }
.tarjeta > .rotulo-seccion { display: block; margin-bottom: .5rem; }
.insignia-r.azul { background: #E6F4FE; color: #0D74CE; }
.insignia-r.chica { font-size: .72rem; padding: 1px 6px; }
.dialogo.ancho { width: min(560px, 94vw); }
.form-dialogo { display: flex; flex-direction: column; gap: .75rem; }
.form-dialogo .dos { display: flex; flex-wrap: wrap; gap: .8rem; }
.form-dialogo .dos > * { flex: 1 1 160px; }
.campo-d { display: flex; flex-direction: column; gap: .3rem; font-size: .78rem; font-weight: 500; color: var(--tinta-suave); }
.campo-d input, .campo-d select, .campo-d textarea { font: inherit; font-size: .9rem; color: var(--tinta); border: 1px solid var(--linea); border-radius: 8px; padding: 0 10px; height: 34px; background: #fff; }
.campo-d textarea { height: auto; padding: 8px 10px; resize: vertical; }
.campo-d select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.campo-d input:focus, .campo-d select:focus, .campo-d textarea:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 1px var(--tinta); }
/* Desplegable con búsqueda de «Desde» y «Hasta» en Traslados. */
.combo { position: relative; display: flex; flex-direction: column; }
.combo input { padding-right: 30px; }
.combo-flecha { position: absolute; right: 8px; top: 10px; color: var(--tinta-suave); cursor: pointer; display: flex; }
.combo-lista { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5; margin: 0; padding: 4px; list-style: none;
  background: var(--superficie); border-radius: 10px; box-shadow: var(--elev-3); max-height: 220px; overflow-y: auto; }
.combo-lista li { padding: 7px 10px; border-radius: 7px; font-size: .9rem; color: var(--tinta); cursor: pointer; }
.combo-lista li:hover, .combo-lista li.activo { background: var(--superficie-2); }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--tinta); }

/* ── Adicionales ──────────────────────────────────────────────────────── */
.pila-grande { display: flex; flex-direction: column; gap: 1.5rem; }
.tarjeta-plana { background: var(--superficie); border-radius: var(--radio); box-shadow: var(--elev-1); padding: clamp(1rem, 3vw, 1.5rem); }
.ad-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ad-cab .espacio { flex: 1; }
.nota-tenue.grande { font-size: .82rem; margin: .6rem 0; }
.pastillas { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.pastilla-c { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; background: var(--superficie-2); font-size: .82rem; white-space: nowrap; }
.pastilla-c svg { color: var(--tenue); }
.pastilla-c button { border: 0; background: none; padding: 0; cursor: pointer; display: grid; color: var(--tenue); }
.ad-tabla { min-width: max-content; }
@media (max-width: 991px) { .ad-tabla { min-width: 0; } .tarjeta-plana .ad-tabla { overflow: auto; max-height: calc(100vh - 16rem); } .ad-fila { min-width: max-content; } }
.ad-fila { display: flex; align-items: center; height: 34px; border-top: 1px solid var(--linea-suave); }
.ad-cabecera { height: auto; min-height: 44px; border-top: 0; border-bottom: 1px solid var(--linea); position: sticky; top: calc(var(--arriba) + 100px); z-index: 3; background: var(--superficie); }
@media (max-width: 991px) { .ad-cabecera { top: 0; } }
.ad-nombre { width: 210px; min-width: 210px; padding: 0 8px; display: flex; align-items: center; gap: 5px; font-size: .85rem; position: sticky; left: 0; background: inherit; z-index: 2; overflow: hidden; }
.ad-fila { background: var(--superficie); }
.ad-nombre span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-nombre small { font-size: .66rem; font-weight: 600; color: var(--tenue); white-space: nowrap; }
.ad-cabecera .ad-nombre { font-size: .72rem; font-weight: 600; color: var(--tenue); letter-spacing: .03em; }
.ad-c, .ad-total { width: 152px; min-width: 152px; padding: 0 8px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-total { width: 120px; min-width: 120px; }
.ad-cabecera .ad-c b, .ad-cabecera .ad-total b { font-size: .7rem; font-weight: 600; color: var(--tinta-suave); letter-spacing: .02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ad-cabecera .ad-c small { font-size: .64rem; color: var(--tenue); }
.ad-total b { font-weight: 700; }
.ad-c input { width: 100%; height: 26px; border: 1px solid var(--linea); border-radius: 6px; text-align: right; font: inherit; font-size: .82rem; padding: 0 6px; background: #fff; }
.ad-pie { height: 38px; background: var(--superficie-2); border-top: 1.5px solid var(--linea); }
.ad-pie .ad-nombre b { font-size: .8rem; font-weight: 700; }
.ad-pie .ad-c b { font-size: .82rem; font-weight: 600; }
.tenue { color: var(--tenue) !important; }
.adm-tabla { min-width: max-content; }
.adm-fila { display: flex; align-items: center; height: 34px; border-top: 1px solid var(--linea-suave); font-size: .85rem; }
.adm-fila > span { width: 90px; min-width: 90px; padding: 0 8px; text-align: center; }
.adm-fila > span.n { width: 260px; min-width: 260px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-fila > span.p { width: 130px; min-width: 130px; text-align: right; font-weight: 500; }
.adm-fila i { font-style: normal; font-variant-numeric: tabular-nums; }
.adm-fila input { width: 100%; height: 26px; border: 1px solid var(--linea); border-radius: 6px; text-align: center; font: inherit; }
.adm-cab { border-top: 0; border-bottom: 1px solid var(--linea); font-size: .72rem; font-weight: 600; color: var(--tenue); letter-spacing: .03em; }
.adm-cab > span.p { font-weight: 600; }
.adm-pie { height: 38px; border-top: 2px solid var(--linea); }
.adm-pie .n { font-size: .8rem; font-weight: 600; color: var(--tinta-suave); }
.adm-pie b { font-size: .88rem; font-weight: 650; }
.fila-pct { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--tinta-suave); }
.fila-pct input { width: 90px; text-align: center; }

/* ── Conformidades ────────────────────────────────────────────────────── */
.cf-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.cf-resumen { flex: 1 1 240px; min-width: 0; font-size: .82rem; color: var(--tinta-suave); }
.cf-tabla { min-width: max-content; }
@media (max-width: 991px) { .cf-tabla { min-width: 0; overflow: auto; max-height: calc(100vh - 17rem); } .cf-fila { min-width: max-content; } }
.cf-fila { display: flex; align-items: center; gap: .7rem; height: 38px; border-top: 1px solid var(--linea); background: var(--superficie); }
.cf-cab { height: auto; padding-bottom: 7px; border-top: 0; position: sticky; top: calc(var(--arriba) + 100px); z-index: 3; font-size: .68rem; font-weight: 600; color: var(--tenue); letter-spacing: .055em; text-transform: uppercase; }
@media (max-width: 991px) { .cf-cab { top: 0; } }
.cf-pie { height: auto; padding: 10px 0; border-top: 1.5px solid var(--linea); position: sticky; bottom: 0; z-index: 2; }
.cf-n { width: 210px; min-width: 210px; font-size: .85rem; overflow: hidden; position: sticky; left: 0; background: inherit; z-index: 1; }
.cf-n b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; letter-spacing: -.01em; }
.cf-pie .cf-n b { font-weight: 700; font-size: .82rem; }
.cf-a { width: 116px; min-width: 116px; font-size: .75rem; color: var(--tinta-suave); white-space: nowrap; }
.cf-e { width: 190px; min-width: 190px; display: flex; align-items: center; min-height: 22px; overflow: hidden; }
.cf-i { width: 118px; min-width: 118px; text-align: right; font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cf-cab .cf-i { font-size: .68rem; }
.cf-i b { font-weight: 700; }
.cf-ac { width: 124px; min-width: 124px; display: flex; justify-content: flex-end; }
.cf-botones { display: flex; gap: 2px; align-items: center; }
.cf-botones form { display: contents; }
.cf-marcas { display: flex; gap: .45rem; align-items: center; }
.cf-m { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; color: var(--tinta-suave); white-space: nowrap; letter-spacing: .02em; }
.cf-m.rojo { color: var(--peligro); } .cf-m.verde { color: var(--exito); }
.cf-orig { font-size: .7rem; font-weight: 600; color: var(--tinta-suave); }
.cf-ficha { display: flex; flex-direction: column; gap: .35rem; padding: .6rem 0; border-top: 1px solid var(--linea); }
.cf-ficha-a { display: flex; align-items: flex-start; gap: .6rem; justify-content: space-between; }
.cf-ficha-a span { display: flex; flex-direction: column; min-width: 0; }
.cf-ficha-a b { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.cf-ficha-a small { font-size: .72rem; color: var(--tinta-suave); }
.cf-ficha-a .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cf-ficha-b { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.cf-total { padding-top: .6rem; border-top: 1.5px solid var(--linea); }
@media (max-width: 767px) { .solo-ancho { display: none !important; } }
.cf-cab .cf-n { font-size: .68rem; }

/* ── Consolidados ─────────────────────────────────────────────────────── */
.pila-c { display: flex; flex-direction: column; gap: 1rem; }
.cs-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.cs-acciones .espacio { flex: 1; }
.cs-grupo { display: flex; align-items: center; gap: .6rem; }
.segmentos { display: inline-flex; gap: 1px; }
.segmentos .boton:first-child { border-radius: 99px 0 0 99px; } .segmentos .boton:last-child { border-radius: 0 99px 99px 0; }
.cs-enviar { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; font-weight: 500; color: var(--tinta-suave); white-space: nowrap; }
.cs-enviar:hover { color: var(--tinta); }
@media (max-width: 767px) { .cs-grupo { flex-direction: column; align-items: flex-start; width: 100%; gap: .35rem; } .segmentos { width: 100%; } .segmentos .boton { flex: 1; } }
.cs-tabla { overflow: auto; max-height: calc(100vh - 22rem); scrollbar-gutter: stable; padding-right: 16px; }
.cs-fila { display: flex; align-items: center; gap: .4rem; min-width: max-content; height: 34px; border-top: 1px solid var(--linea); background: var(--superficie); font-size: .82rem; font-variant-numeric: tabular-nums; }
.cs-fila.alta { height: auto; min-height: 44px; }
.cs-fila > span { flex: 1 1 var(--w, 104px); min-width: var(--w, 104px); padding-left: 8px; text-align: right; white-space: nowrap; }
.cs-fila > span.iz { text-align: left; }
.cs-fila > span.dos { display: flex; flex-direction: column; align-items: flex-end; overflow: hidden; }
.cs-fila > span.dos small { font-size: .68rem; color: var(--tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cs-fila > span b { font-weight: 700; }
.cs-fila > .cs-m { flex: 0 0 214px; min-width: 214px; text-align: left; padding: 0 8px; position: sticky; left: 0; background: inherit; z-index: 1; display: flex; flex-direction: column; overflow: hidden; }
.cs-m b { font-size: .84rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-m small { font-size: .68rem; color: var(--tenue); }
.cs-cab { height: auto; padding-bottom: 7px; border-top: 0; position: sticky; top: 0; z-index: 2; font-size: .68rem; font-weight: 600; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; }
.cs-cab .cs-m { font-size: .68rem; }
.cs-pie { height: auto; padding: 10px 0; border-top: 1.5px solid var(--linea); background: var(--superficie-2); position: sticky; bottom: 0; z-index: 2; }
.cs-pie .cs-m b { font-weight: 700; font-size: .8rem; }
.fuerte { font-weight: 700; }
.ret-form { display: inline; }
.ret { display: inline-flex; align-items: center; gap: .25rem; border: 0; background: none; font: inherit; color: var(--tinta); padding: 1px 5px; border-radius: 6px; cursor: pointer; font-variant-numeric: tabular-nums; }
.ret:hover { background: var(--superficie-2); }
.ret.fija { cursor: default; } .ret.fija:hover { background: none; }
.ret svg { color: var(--tenue); }
.cs-ficha { padding: .7rem 0; border-top: 1px solid var(--linea); display: flex; flex-direction: column; gap: .4rem; }
.cs-ficha-a { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.cs-ficha-a b { font-size: .86rem; font-weight: 500; } .cs-ficha-a > b:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.cs-ficha-a span { display: flex; flex-direction: column; }
.cs-pares { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; font-size: .82rem; }
.cs-pares span { display: flex; flex-direction: column; align-items: flex-start; }
.cs-pares small { font-size: .64rem; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; }
.cs-total { padding: .7rem 0; border-top: 1.5px solid var(--linea); }
.cs-fila > .cs-m b { font-weight: 500; } .cs-pie > .cs-m b { font-weight: 700; }

/* ── Cabecera de sección esmerilada ───────────────────────────────────
   A petición del usuario (23-oct-2026): sin el gris, solo la línea de abajo,
   y al desplazar se transparenta como la barra superior. */
.cabecera, .rol-cab {
  /* El mismo cristal que la barra: translúcido y desenfocado, así lo que pasa
     por debajo al desplazar se adivina en vez de quedar tapado. */
  background: rgba(241,242,246,.78);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
/* La barra y su menú, por encima de la cabecera fija: el desplegable del
   avatar quedaba debajo de ella y se cortaba. */
.barra { z-index: 30; }
.prueba { z-index: 31; }

/* ── Boletas (admin) ──────────────────────────────────────────────────── */
.bl-tabla { overflow: auto; max-height: max(16rem, calc(100vh - 30rem)); scrollbar-gutter: stable; padding-right: 16px; }
.bl-fila { display: flex; align-items: center; gap: .4rem; min-width: max-content; min-height: 42px; border-top: 1px solid var(--linea); background: var(--superficie); font-size: .82rem; }
.bl-fila > span { flex: 1 1 var(--w); min-width: var(--w); padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-fila > .bl-m { flex: 0 0 230px; min-width: 230px; padding: 0 8px; position: sticky; left: 0; background: inherit; z-index: 1; display: flex; flex-direction: column; }
.bl-m b { font-weight: 500; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; }
.bl-m small { font-size: .68rem; color: var(--tenue); }
.bl-fila > .bl-ac { flex: 0 0 116px; min-width: 116px; display: flex; justify-content: flex-end; overflow: visible; }
.bl-cab { min-height: 0; padding-bottom: 7px; border-top: 0; position: sticky; top: 0; z-index: 2; font-size: .68rem; font-weight: 600; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; }
.zona-subida { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.6rem 1rem; border: 1px dashed var(--linea); border-radius: 14px; background: var(--superficie-2); cursor: pointer; text-align: center; color: var(--tinta-suave); }
.zona-subida b { font-size: .86rem; font-weight: 400; color: var(--tinta); } .zona-subida small { font-size: .78rem; color: var(--tenue); }
.zona-subida.encima { border-color: var(--tinta); background: #fff; }
.bl-pend { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: 9px 0; border-top: 1px solid var(--linea); }
.bl-pend-n { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--tinta-suave); }
.bl-pend-n span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tinta); }
.pildora.chica { height: 34px; font-size: .84rem; width: 150px; }
.pildora.chica.ancha-s { width: 210px; }

/* ── Envío por correo (admin) ─────────────────────────────────────────── */
.rojo-t { color: var(--peligro); }
.ds-enviado { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; color: var(--exito); }
.chip.estado-red small { font-size: .66rem; }
.ds-fallo { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; background: var(--peligro-tenue); border: 1px solid var(--peligro); box-shadow: none; padding: clamp(.9rem, 2vw, 1.1rem); }
.ds-fallo-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; color: var(--peligro); }
.ds-fallo-t > span { display: flex; flex-direction: column; gap: .15rem; }
.ds-fallo-t b { font-size: .9rem; font-weight: 600; } .ds-fallo-t small { font-size: .78rem; color: var(--tinta-suave); }
.ds-listos { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; font-size: .86rem; }
/* Columnas fijas: las cifras caen en la misma vertical de una tarjeta a otra. */
.ds-grupo { display: grid; grid-template-columns: 1fr; align-items: center; gap: .9rem; padding: clamp(.9rem, 2vw, 1.1rem); }
@media (min-width: 768px) { .ds-grupo { grid-template-columns: minmax(0, 1fr) 320px 132px; } }
.ds-g-n { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ds-g-n b { font-size: .92rem; font-weight: 600; letter-spacing: -.015em; } .ds-g-n small { font-size: .78rem; color: var(--tenue); }
.ds-pasos { display: flex; gap: .4rem; }
.ds-paso { width: 76px; display: flex; flex-direction: column; }
.ds-paso b { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ds-paso small { font-size: .68rem; color: var(--tenue); white-space: nowrap; }
.ds-paso.ok b { color: var(--exito); } .ds-paso.falta b { color: var(--aviso); } .ds-paso.rojo b { color: var(--peligro); }
.ds-g-b { display: flex; justify-content: flex-start; }
@media (min-width: 768px) { .ds-g-b { justify-content: flex-end; } }
.ds-tabla { max-height: none; }
.bl-fila > .ds-ac { flex: 0 0 104px; min-width: 104px; display: flex; justify-content: flex-end; overflow: visible; padding: 0; }
.ds-motivo { display: flex !important; flex-direction: column; }
.ds-motivo b { font-size: .76rem; font-weight: 500; color: var(--peligro); overflow: hidden; text-overflow: ellipsis; }
.ds-motivo small { font-size: .7rem; color: var(--tenue); }
.ds-enviar { display: inline-flex; }
.boton.ds-b { background: #E6EDFE; color: #3A5BC7; }
.boton.ds-b:hover { background: #D9E2FC; }
.boton.ds-b.rojo-s { background: #FFF0EF; color: #CE2C31; }
.boton.ds-b.rojo-s:hover { background: #FEE3E1; }
.cs-ficha .ds-enviar { align-self: flex-start; }
.ds-panel { width: min(380px, 92vw); padding: 1.5rem; display: none; }
.ds-panel[open] { display: flex; flex-direction: column; gap: .75rem; }
.ds-p-t { display: flex; align-items: center; gap: .6rem; } .ds-p-t b { font-size: .95rem; font-weight: 600; letter-spacing: -.02em; }
.ds-panel .suave { margin: 0; font-size: .86rem; color: var(--tinta-suave); }
.ds-barra { height: 6px; border-radius: 99px; background: var(--superficie-2); overflow: hidden; }
.ds-barra i { display: block; height: 100%; background: var(--boton); border-radius: 99px; transition: width .3s; }
.ds-p-pie { display: flex; align-items: center; gap: .8rem; font-size: .76rem; color: var(--tenue); }
.ds-p-pie span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-p-nota { margin: 0; font-size: .74rem; color: var(--tenue); line-height: 1.45; }
.gira { animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.boton.ds-b.gris-s { background: transparent; color: var(--tenue); }
.boton.ds-b.gris-s:hover { background: #E9E9EC; }
.cs-ficha-a .chip, .cs-ficha-a .ds-enviado { flex-direction: row; flex-shrink: 0; }

/* ── Recibos (admin) ──────────────────────────────────────────────────── */
.azul-t { color: #0D74CE; }
.rc-cifras { display: flex; flex-wrap: wrap; gap: 1.2rem 2.2rem; }
.rc-cifras span { display: flex; flex-direction: column; gap: .15rem; }
.rc-cifras b { font-size: 1.35rem; font-weight: 620; letter-spacing: -.03em; line-height: 1.1; }
.rc-cifras small { font-size: .7rem; color: var(--tenue); }
.rc-tabla { max-height: max(16rem, calc(100vh - 26rem)); }
.bl-fila > .rc-f { flex: 0 0 var(--w); }
.bl-fila > .rc-f.der { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.bl-fila > .rc-dos { display: flex; flex-direction: column; }
.rc-dos b { font-weight: 400; } .rc-dos small { font-size: .7rem; color: var(--tenue); }
.bl-fila > .rc-est { display: flex; align-items: center; gap: .4rem; min-width: var(--w); }
.rc-est .chip { flex-shrink: 0; }
.rc-res { font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bl-fila > .rc-ac { flex: 0 0 76px; min-width: 76px; display: flex; justify-content: flex-end; gap: 2px; overflow: visible; position: sticky; right: 0; background: inherit; z-index: 1; padding-left: 4px; }
.bl-fila.rc-rehacer { background: #FFF8F8; }
.chip.borde-c { background: transparent; }
.rc-est-m { display: flex; flex-direction: row !important; align-items: center; gap: .4rem; min-width: 0; }
.rc-est-m .rc-res { display: none; }
.rc-txt { margin: 0; font-size: .8rem; }
.rc-interruptor { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; }
.interruptor { width: 36px; height: 20px; border-radius: 99px; border: 0; background: #D9D9DE; position: relative; cursor: pointer; padding: 0; transition: background .15s; }
.interruptor i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.interruptor.on { background: var(--boton); } .interruptor.on i { left: 18px; }
.rc-correos { max-height: 22rem; overflow: auto; }
.rc-correo { display: flex; align-items: center; gap: .6rem; min-width: 560px; padding: .3rem 0; border-top: 1px solid var(--linea); }
.rc-c-f { width: 78px; flex-shrink: 0; white-space: nowrap; } .rc-correo .chip { flex-shrink: 0; }
.rc-c-m { width: 150px; flex-shrink: 0; font-size: .8rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-c-n { width: 74px; flex-shrink: 0; font-size: .78rem; }
.rc-c-d { flex: 1; min-width: 0; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-const { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--linea); font-size: .84rem; }
.rc-const b { font-weight: 500; } .rc-const .espacio { flex: 1; }
.rc-dialogo { display: none; }
.rc-dialogo[open] { display: flex; flex-direction: column; gap: .75rem; max-height: 92vh; overflow: auto; }
.rc-dialogo h2 { margin: 0; }
.rc-d-t { margin: 0; font-size: .9rem; font-weight: 500; }
.rc-datos { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
.rc-datos span { display: flex; flex-direction: column; gap: .1rem; }
.rc-datos small { font-size: .64rem; font-weight: 600; color: var(--tenue); letter-spacing: .055em; text-transform: uppercase; }
.rc-datos b { font-size: .86rem; font-weight: 400; white-space: nowrap; }
.rc-seccion { display: flex; flex-direction: column; gap: .55rem; padding-top: .5rem; border-top: 1px solid var(--linea); }
.rc-seccion.rc-fila { flex-direction: row; }
.rc-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rc-fila .espacio { flex: 1; }
.rc-ancho { width: 100%; }
.rc-nota { width: 100%; box-sizing: border-box; border: 1px solid var(--linea); border-radius: 10px; padding: .55rem .7rem; font: inherit; font-size: .86rem; resize: vertical; }
.rc-zona { padding: 1rem; flex-direction: row; justify-content: center; }

/* ── Pagos (admin) ────────────────────────────────────────────────────── */
.callout.verde { background: #E6F6EB; color: #218358; }
.pg-orden { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.pg-orden .espacio { flex: 1; }
.pg-dato { display: flex; flex-direction: column; gap: .15rem; }
.pg-dato small { font-size: .68rem; color: var(--tenue); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.pg-dato b { font-size: .92rem; font-weight: 600; white-space: nowrap; }
.pg-dato.verde b { color: var(--exito); }
.pg-generar { display: flex; gap: .6rem; flex-wrap: wrap; }
.pg-tabla { max-height: max(16rem, calc(100vh - 30rem)); }
.bl-fila > .pg-m { flex-basis: 260px; min-width: 260px; }
.bl-fila > .der { text-align: right; }
.mono { font-family: ui-monospace, monospace; font-size: .78rem; }
.pg-concepto { font-size: .76rem; }
.pg-imp { font-weight: 600; }
.bl-fila > .pg-est { padding-left: 12px; display: flex; }
.pg-txt { margin: 0; max-width: 620px; font-size: .8rem; }
.pg-hist { max-height: 60vh; overflow: auto; }
.pg-orden-h { border-top: 1px solid var(--linea); min-width: max-content; }
.pg-orden-h summary { list-style: none; cursor: pointer; padding: 6px 0; display: flex; align-items: center; gap: .5rem; font-size: .82rem; }
.pg-orden-h summary::-webkit-details-marker { display: none; }
.pg-orden-h .flecha { color: var(--tinta-suave); transition: transform .15s; flex-shrink: 0; }
.pg-orden-h[open] .flecha { transform: rotate(90deg); }
.pg-h-a { width: 120px; font-weight: 600; } .pg-h-n { width: 110px; } .pg-h-f { width: 90px; } .pg-h-c { width: 80px; }
.pg-h-t { width: 120px; text-align: right; font-weight: 600; }
.pg-linea { display: flex; gap: .5rem; padding: 4px 0 4px 22px; border-top: 1px solid var(--superficie-2); font-size: .82rem; }
.pg-l-m { width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pg-l-d { width: 100px; } .pg-l-i { width: 110px; } .pg-l-e { width: 70px; }

/* ── Inicio (admin) ───────────────────────────────────────────────────── */
.in-aviso { text-decoration: none; }
.in-cab { padding-bottom: .3rem; }
.in-paso { padding: .85rem 0; border-top: 1px solid var(--linea); }
.in-enlace { display: flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.in-ico { width: 26px; height: 26px; border-radius: 99px; flex-shrink: 0; display: grid; place-items: center; border: 1.5px solid var(--linea); background: var(--superficie); }
.in-ico.e-hecho { background: var(--exito); border-color: var(--exito); color: #fff; }
.in-ico.e-parcial { background: var(--aviso-tenue); border-color: var(--aviso); color: var(--aviso); }
.in-ico.e-informativo { border-style: dashed; color: var(--tenue); } /* se enseña, pero no cuenta para cerrar */
.in-t b .chip { font-size: .66rem; font-weight: 600; vertical-align: 2px; margin-left: .3rem; }
.in-ico i { font-style: normal; font-weight: 700; line-height: 1; margin-top: -4px; }
.in-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.in-t b { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.in-t small { font-size: .82rem; color: var(--tinta-suave); }
.in-detalle { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .3rem 1.2rem; padding: .45rem 0 0 calc(26px + .8rem); }
.in-d { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .78rem; }
.in-d b { font-weight: 600; white-space: nowrap; }
.in-d small { font-size: .78rem; color: var(--tinta-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.in-punto { width: 7px; height: 7px; border-radius: 99px; background: var(--tenue); flex-shrink: 0; }
.in-punto.e-hecho { background: var(--exito); } .in-punto.e-parcial { background: var(--aviso); }
.in-com summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.in-com summary::-webkit-details-marker { display: none; }
.in-com summary .espacio { flex: 1; }
.in-com .flecha { color: var(--tinta-suave); transition: transform .15s; }
.in-com[open] .flecha { transform: rotate(90deg); }
.in-form { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 0; border-bottom: 1px solid var(--linea); }
.in-campo { width: 100%; box-sizing: border-box; border: 1px solid var(--linea); border-radius: 10px; padding: .55rem .7rem; font: inherit; font-size: .88rem; background: #fff; }
.in-lista { display: flex; flex-direction: column; gap: .5rem; max-height: 42vh; overflow: auto; padding-top: .8rem; }
.in-aviso-c { display: flex; gap: .5rem; align-items: flex-start; padding: 8px; border: 1px solid var(--linea); border-radius: 8px; background: #fff; }
.in-a-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.in-a-t b { font-size: .88rem; font-weight: 700; }
.in-a-t p { margin: 0; font-size: .8rem; color: var(--tinta-suave); line-height: 1.4; }
.in-a-b { display: flex; gap: 2px; flex-shrink: 0; }

/* ── Accesos (admin) ──────────────────────────────────────────────────── */
.verde-t { color: var(--exito); }
.ac-act { display: flex; align-items: center; gap: .8rem; }
.ac-cifras { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ac-cifras .tarjeta { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; }
.ac-cifras b { font-size: 1.6rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ac-cifras small { font-size: .76rem; color: var(--tenue); }
.ac-busca { width: 200px; height: 36px; font: inherit; font-size: .86rem; padding: 0 .9rem; border: 1px solid var(--linea); border-radius: 99px; background: #fff; box-shadow: var(--elev-1); }
.ac-filtro { width: 210px; height: 36px; font-size: .86rem; }
.ac-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem .2rem; border-top: 1px solid var(--linea); }
.ac-n { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.ac-n b { font-weight: 500; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ac-n small { font-size: .72rem; }
.ac-e { width: 140px; flex-shrink: 0; }
.ac-u { width: 190px; flex-shrink: 0; display: flex; flex-direction: column; } .ac-u small { font-size: .76rem; white-space: nowrap; }
.ac-q { width: 170px; flex-shrink: 0; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-x { flex: 1 1 200px; display: flex; flex-wrap: wrap; gap: .35rem; }
.ac-registro { max-height: 520px; overflow-y: auto; }
.ac-ev { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; padding: .4rem .2rem; border-top: 1px solid var(--linea); }
.ac-ev-f { width: 84px; flex-shrink: 0; font-size: .74rem; }
.ac-ev-n { flex: 1 1 180px; min-width: 0; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-ev-t { font-size: .78rem; font-weight: 500; white-space: nowrap; }
.ac-ev-d { flex: 1 1 160px; min-width: 0; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Incidencias (admin) ──────────────────────────────────────────────── */
.ic-ficha { display: flex; flex-direction: column; gap: .6rem; padding: 1rem 1.1rem; background: var(--superficie); border-radius: 14px; border: 1px solid var(--linea); opacity: .85; }
.ic-ficha.abierta { opacity: 1; border-left-width: 4px; }
.ic-ficha.abierta.c-red { border-left-color: #E5484D; } .ic-ficha.abierta.c-amber { border-left-color: #FFC53D; }
.ic-ficha.abierta.c-blue { border-left-color: #0090FF; } .ic-ficha.abierta.c-violet { border-left-color: #6E56CF; }
.ic-ficha.abierta.c-gray { border-left-color: #8D8D8D; }
.ic-cat.c-red { color: #CE2C31; background: #FFF0EF; border-color: #F4A9AA; } .ic-cat.c-amber { color: #AB6400; background: #FFF7C2; border-color: #F3D673; }
.ic-cat.c-blue { color: #0D74CE; background: #E6F4FE; border-color: #ACD8FC; } .ic-cat.c-violet { color: #6550B9; background: #F4F0FE; border-color: #D0C5F7; }
.ic-cat.c-gray { color: var(--tinta-suave); background: var(--superficie-2); border-color: var(--linea); }
.ic-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ic-t { flex: 1; min-width: 12rem; font-size: .95rem; font-weight: 600; }
.ic-monto { font-size: .82rem; white-space: nowrap; } .ic-monto.amb { color: #AB6400; } .ic-monto.roj { color: #CE2C31; }
.ic-datos { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .8rem; color: var(--tinta-suave); }
.ic-datos span { display: inline-flex; align-items: center; gap: .3rem; } .ic-datos svg { color: var(--tenue); }
.ic-desc { margin: 0; font-size: .84rem; white-space: pre-wrap; }
.ic-res { display: flex; flex-direction: column; gap: .25rem; padding: .6rem .75rem; border-radius: 10px; background: var(--superficie-2); }
.ic-pie { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ic-pie .espacio { flex: 1; }
.ic-vacio { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 3rem 1rem; font-size: .9rem; }
.ic-form { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; }
.ic-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .78rem; font-weight: 500; color: var(--tinta-suave); }
.ic-form input:not([type=file]), .ic-form textarea { border: 1px solid var(--linea); border-radius: 10px; padding: .5rem .7rem; font: inherit; font-size: .88rem; color: var(--tinta); background: #fff; }
.ic-form .pildora { width: 100%; height: 38px; font-size: .86rem; }
.ic-dos { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ic-tres { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: .75rem; }
@media (max-width: 560px) { .ic-dos, .ic-tres { grid-template-columns: 1fr; } }
.ic-zona { padding: 1rem; flex-direction: row; justify-content: center; font-weight: 400; }
.ic-dialogo { max-height: 92vh; overflow: auto; }

/* ── Archivo (admin) ──────────────────────────────────────────────────── */
.ar-filtros { flex-wrap: wrap; }
.ar-anio { width: 110px; }
.ar-mes summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; }
.ar-mes summary::-webkit-details-marker { display: none; }
.ar-mes .flecha { color: var(--tinta-suave); transition: transform .15s; flex-shrink: 0; }
.ar-mes[open] .flecha { transform: rotate(90deg); }
.ar-mes summary .espacio { flex: 1; }
.ar-m-t { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ar-m-t b { font-size: .95rem; font-weight: 600; } .ar-m-t small { font-size: .78rem; }
.ar-lista { margin-top: .8rem; }
.ar-fila { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--linea); font-size: .84rem; }
.ar-tipo { width: 96px; justify-content: center; flex-shrink: 0; }
.ar-area { width: 100px; flex-shrink: 0; font-size: .76rem; }
.ar-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-ac { display: flex; gap: 2px; flex-shrink: 0; }
@media (max-width: 600px) { .ar-area { display: none; } .ar-tipo { width: auto; } }

/* ── Comunicados (admin) ──────────────────────────────────────────────── */
.callout.gris { background: var(--superficie-2); color: var(--tinta-suave); }
.co-redactor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (min-width: 992px) { .co-redactor { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem; } }
.co-modo { width: 200px; }
.co-ayuda { margin: 0; font-size: .8rem; color: var(--tenue); }
.co-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.co-pill { display: inline-flex; align-items: center; gap: .35rem; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--tinta); font-size: .84rem; cursor: pointer; user-select: none; }
.co-pill input { display: none; } .co-pill svg { display: none; }
.co-pill:has(input:checked) { background: var(--tinta); color: #fff; } .co-pill:has(input:checked) svg { display: inline; }
.co-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.co-fila .espacio { flex: 1; } .co-der { justify-content: flex-end; }
.co-busca { flex: 1; min-width: 160px; }
.co-medicos { max-height: 300px; overflow-y: auto; border-bottom: 1px solid var(--linea); }
.co-med { display: flex; align-items: center; gap: .6rem; padding: .4rem .2rem; border-top: 1px solid var(--linea); cursor: pointer; }
.co-med input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--tinta); }
.co-med span { display: flex; flex-direction: column; min-width: 0; }
.co-med b { font-weight: 400; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .co-med small { font-size: .7rem; }
.co-et { font-size: .78rem; font-weight: 500; color: var(--tinta-suave); }
.co-check { display: flex; align-items: center; gap: .5rem; font-size: .86rem; cursor: pointer; }
.co-check input { width: 16px; height: 16px; accent-color: var(--tinta); }
.co-ademas { gap: .45rem; padding-top: .4rem; }
.co-campo { width: 100%; box-sizing: border-box; border: 1px solid var(--linea); border-radius: 10px; padding: .5rem .7rem; font: inherit; font-size: .88rem; background: #fff; color: var(--tinta); }
textarea.co-campo { resize: vertical; }
.co-lab { display: flex; flex-direction: column; gap: .35rem; }
.co-firma { flex: 1; min-width: 0; }
.co-vfirma { display: flex; flex-direction: column; padding-top: .5rem; border-top: 1px solid var(--linea); font-size: .8rem; line-height: 1.45; color: var(--tinta-suave); }
.co-vfirma b { color: var(--tinta); font-weight: 600; }
.co-resumen { display: flex; flex-direction: column; gap: .4rem; padding: .8rem; background: var(--superficie-2); border-radius: 10px; }
.co-resumen > b { display: flex; align-items: center; gap: .45rem; font-size: .86rem; } .co-resumen small { font-size: .74rem; }
.co-destinos { max-height: 180px; overflow-y: auto; }
.co-d { display: flex; justify-content: space-between; gap: .6rem; padding: .25rem 0; border-top: 1px solid var(--linea); font-size: .8rem; }
.co-d span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .co-d small { font-size: .7rem; color: var(--tenue); white-space: nowrap; }
.co-confirmar { width: min(480px, 94vw); } .co-confirmar[open] { display: flex; flex-direction: column; gap: .7rem; }
.co-confirmar p { margin: 0; } .co-dcf-f { font-size: .84rem; font-weight: 500; }
.co-hcab { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.co-ht { flex: 1 1 260px; display: flex; flex-direction: column; gap: .2rem; } .co-ht small { font-size: .78rem; }
.co-ho { width: 160px; height: 36px; font-size: .86rem; }
.co-lote { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding: .65rem .3rem; border-top: 1px solid var(--linea); color: inherit; text-decoration: none; }
.co-lote:hover { background: var(--superficie-2); }
.co-l-f { width: 122px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; } .co-l-f small { font-size: .76rem; }
.co-l-a { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.co-l-a b, .co-l-a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .co-l-a b { font-weight: 500; font-size: .86rem; } .co-l-a small { font-size: .74rem; }
.co-l-a h2 { margin: 0; font-size: 1.05rem; }
.co-est { flex-shrink: 0; }
.co-mas { align-self: center; }
.co-det { width: min(620px, 94vw); max-height: 92vh; overflow: auto; } .co-det[open] { display: flex; flex-direction: column; gap: .8rem; }
.co-cuerpo { max-height: 220px; overflow-y: auto; padding: .8rem; background: var(--superficie-2); border-radius: 10px; font-size: .84rem; white-space: pre-wrap; line-height: 1.5; }
.co-dest-l { max-height: 300px; overflow-y: auto; }
.co-dest { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--linea); }
.co-dest > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.co-dest b { font-weight: 400; font-size: .82rem; } .co-dest small { font-size: .72rem; }
.co-firmas { max-height: 380px; overflow-y: auto; }
.co-ef { display: flex; gap: .5rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--linea); }
.co-ef-c { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.co-ef-d { display: flex; gap: .4rem; } @media (max-width: 560px) { .co-ef-d { flex-direction: column; } }
.co-izq { align-self: flex-start; }

/* ── Ajustes (admin) ──────────────────────────────────────────────────── */
.aj-sec { display: flex; flex-direction: column; gap: .9rem; scroll-margin-top: calc(var(--arriba) + 110px); }
.aj-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.aj-cab .espacio { flex: 1; }
.aj-titulo b { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.aj-txt { margin: 0; font-size: .82rem; color: var(--tenue); max-width: 620px; }
.aj-campos { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: .9rem; }
.aj-campos label, .aj-l { display: flex; flex-direction: column; gap: .3rem; font-size: .78rem; font-weight: 500; color: var(--tinta-suave); min-width: 0; }
.aj-campos input { border: 1px solid var(--linea); border-radius: 10px; padding: .5rem .7rem; font: inherit; font-size: .9rem; background: #fff; color: var(--tinta); min-width: 0; }
.aj-campos:disabled input, .aj-campos:disabled select { background: var(--superficie-2); color: var(--tinta); -webkit-text-fill-color: var(--tinta); opacity: 1; }
.aj-campos .pildora { width: 100%; height: 40px; }
.aj-sec.abierta { box-shadow: var(--elev-2); }
.aj-g2, .aj-g3, .aj-gp { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .aj-g2 { grid-template-columns: 1fr 1fr; } .aj-g3 { grid-template-columns: 1fr 1fr 1fr; } .aj-gp { grid-template-columns: 1.2fr 1.6fr .7fr; } }
#empresa .aj-g3 { grid-template-columns: 1fr; } @media (min-width: 640px) { #empresa .aj-g3 { grid-template-columns: 2fr 1fr 2fr; } }
.aj-area { display: flex; flex-direction: column; gap: .4rem; padding-top: .6rem; border-top: 1px solid var(--linea); }
.aj-area:first-child { border-top: 0; padding-top: 0; }
.aj-dot-area { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem; }
.aj-dot-area .pildora { width: 200px; height: 40px; }
.aj-dot { overflow-x: auto; gap: .35rem; }
.aj-dot-f { display: grid; grid-template-columns: 72px repeat(7, minmax(40px, 1fr)); gap: .35rem; align-items: center; min-width: 380px; }
.aj-dot-f b { font-size: .82rem; font-weight: 500; }
.aj-dot-cab small { font-size: .62rem; font-weight: 600; color: var(--tenue); text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.aj-dot input { text-align: center; padding: .4rem .2rem; }
.aj-sub { padding-top: .3rem; }
.aj-prueba { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; padding-top: .6rem; border-top: 1px solid var(--linea); }
.aj-prueba .aj-l { flex: 1 1 260px; }

/* ── Usuarios (admin) ─────────────────────────────────────────────────── */
.us-filtros { gap: .5rem; } .us-busca { width: 280px; max-width: 100%; } .us-sel { width: 170px; height: 36px; font-size: .86rem; }
.us-tabla { overflow-x: auto; }
.us-t { width: 100%; border-collapse: collapse; font-size: .86rem; }
.us-t th { text-align: left; font-size: .68rem; font-weight: 600; color: var(--tenue); letter-spacing: .05em; text-transform: uppercase; padding: 0 8px 8px; white-space: nowrap; position: sticky; top: 0; background: var(--superficie); }
.us-t th[data-orden] { cursor: pointer; user-select: none; } .us-t th.activa { color: var(--tinta); }
.us-t th.activa::after { content: " ↑"; } .us-t th.activa.desc::after { content: " ↓"; }
.us-t td { padding: 6px 8px; border-top: 1px solid var(--linea); white-space: nowrap; }
.us-t .d { text-align: right; }
.us-t tbody tr:hover { background: var(--superficie-2); }
.us-ac { display: inline-flex; gap: 2px; justify-content: flex-end; }
.cs-ficha .us-ac { align-self: flex-start; }
.us-dialogo { width: min(760px, 96vw); max-height: 94vh; padding: 0; } .us-dialogo[open] { display: flex; flex-direction: column; }
.us-dialogo h2 { margin: 0; padding: 1.2rem 1.3rem .6rem; }
.us-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.us-cuerpo { overflow-y: auto; padding: 0 1.3rem; display: flex; flex-direction: column; gap: 1rem; }
.us-sec { border: 1px solid var(--linea); border-radius: 12px; padding: .9rem; margin: 0; display: grid; grid-template-columns: 1fr; gap: .7rem; min-width: 0; }
@media (min-width: 640px) { .us-sec { grid-template-columns: 1fr 1fr; } }
.us-sec legend, .us-leg { font-size: .78rem; font-weight: 700; color: var(--tinta-suave); padding: 0 .3rem; }
.us-reg { display: flex; flex-direction: column; }
.us-sec label, .us-l { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--tinta-suave); min-width: 0; }
.us-sec input { border: 1px solid var(--linea); border-radius: 10px; padding: .5rem .7rem; font: inherit; font-size: .88rem; background: #fff; color: var(--tinta); min-width: 0; }
.us-sec .pildora { width: 100%; height: 38px; font-size: .86rem; }
.us-l small { font-weight: 400; font-size: .72rem; } .us-l .boton { align-self: flex-start; }
.us-acceso { background: var(--superficie-2); }
.us-pie { padding: .9rem 1.3rem 1.2rem; border-top: 1px solid var(--linea); }

/* ── Disponibilidad (admin) ───────────────────────────────────────────── */
.av-ley { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--tinta-suave); margin-right: .6rem; }
.av-ley i { width: 10px; height: 12px; border-radius: 2px; display: inline-block; }
.av-ley i.m, .av-c b.m { background: #C6892A; } .av-ley i.t, .av-c b.t { background: #2E7D5B; } .av-ley i.n, .av-c b.n { background: #3A3A3C; }
.av-matriz { overflow: auto; max-height: 70vh; display: flex; }
.av-tabla { margin: 0 auto; min-width: max-content; }
.av-fila { display: flex; align-items: center; padding: .15rem 0; border-bottom: 1px solid var(--linea); }
.av-fila:not(.av-cab):hover, .av-fila:not(.av-cab):hover .av-nom { background: var(--superficie-2); }
.av-cab { position: sticky; top: 0; z-index: 2; background: #fff; padding: .5rem 0; border-bottom: 2px solid var(--linea); }
.av-nom { position: sticky; left: 0; z-index: 1; background: var(--superficie); width: 180px; flex-shrink: 0; padding-right: .5rem; display: flex; align-items: center; gap: .35rem; color: var(--tinta); text-decoration: none; font-size: .78rem; font-weight: 560; overflow: hidden; }
.av-nom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 767px) { .av-nom { width: 120px; } }
.av-dias { display: flex; gap: 2px; }
.av-dias small { width: 26px; text-align: center; font-size: .58rem; font-weight: 700; color: var(--tenue); }
.av-c { width: 26px; height: 22px; box-sizing: border-box; display: flex; gap: 1px; padding: 2px; background: var(--superficie-2); border: 1px solid var(--linea); border-radius: 3px; flex-shrink: 0; }
.av-c.dom { background: #FBF8F3; }
.av-c b { flex: 1 1 0; border-radius: 1px; }
.av-h { min-width: 58px; padding-left: .6rem; font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.av-h b { font-weight: 600; }
.av-dialogo { width: min(620px, 94vw); } .av-dialogo h2 { margin: 0 0 .2rem; }
.av-ed { display: grid; grid-template-columns: 1fr; gap: .3rem 1.2rem; max-height: 52vh; overflow-y: auto; padding: .6rem .25rem .6rem 0; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
@media (min-width: 480px) { .av-ed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.av-ed-d { display: flex; align-items: center; gap: .3rem; }
.av-ed-n { width: 30px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; line-height: 1; }
.av-ed-n small { font-size: .6rem; font-weight: 700; color: var(--tenue); } .av-ed-n b { font-size: .85rem; font-weight: 600; }
.av-t { flex: 1 1 0; min-width: 0; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--superficie-2); border: 1px solid var(--linea); font-size: .72rem; font-weight: 700; color: var(--tenue); cursor: pointer; user-select: none; }
.av-t input { display: none; }
.av-t.m:has(input:checked) { background: #C6892A; border-color: #C6892A; color: #fff; }
.av-t.t:has(input:checked) { background: #2E7D5B; border-color: #2E7D5B; color: #fff; }
.av-t.n:has(input:checked) { background: #3A3A3C; border-color: #3A3A3C; color: #fff; }

/* ── Constructor de Rol (admin) ───────────────────────────────────────── */
.sb-botones { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.1rem; }
.sb-aviso { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 8px; background: var(--aviso-tenue); border: 1px solid var(--aviso-linea); font-size: .78rem; color: var(--tinta-suave); }
.sb-aviso svg { color: var(--aviso); flex-shrink: 0; }
.sb-borrador > span { display: flex; flex-direction: column; gap: .1rem; } .sb-borrador b { color: var(--aviso); font-size: .82rem; } .sb-borrador small { font-size: .76rem; }
.periodo.bloqueado { opacity: .5; }
.sb-ley { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-size: .74rem; color: var(--tinta-suave); }
.sb-ley span { display: inline-flex; align-items: center; gap: .35rem; } .sb-ley .espacio { flex: 1; }
.sb-ley i { width: 14px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid; }
.sb-ley i.m, .sb-c.m, .sb-pop .m { background: #F5E7CE; border-color: #E3CFA5; color: #7A5410; }
.sb-ley i.t, .sb-c.t, .sb-pop .t { background: #D8E9E0; border-color: #B3D2C2; color: #245C42; }
.sb-ley i.n, .sb-c.n, .sb-pop .n { background: #E0E0E4; border-color: #E3CFA5; color: #3A3A3C; }
.sb-ley i.v, .sb-c.v, .sb-pop .v { background: #FBEFD6; border-color: #E8CE93; color: #8A5A05; }
.sb-ley i.lc, .sb-c.lc, .sb-pop .lc { background: #DDE8F7; border-color: #B4CBEA; color: #1F4C85; }
.sb-ley i.ls, .sb-c.ls, .sb-pop .ls { background: #F8DEDE; border-color: #E8B4B4; color: #8A2020; }
.sb-ley i.c, .sb-c.c, .sb-pop .c { background: #F2E2F0; border-color: #DCBDD8; color: #75356B; }
.sb-c.otro { background: #EFEFF2; border-color: #DEDEE3; color: #5A5A5F; }
.sb-matriz { overflow: auto; max-height: 65vh; display: flex; }
.sb-tabla { margin: 0 auto; min-width: max-content; }
.sb-fila { display: flex; align-items: center; padding: 1px 0; }
.sb-cab { position: sticky; top: 0; z-index: 2; background: #fff; padding: 4px 0 6px; }
.sb-nom { position: sticky; left: 0; z-index: 1; background: var(--superficie); width: 150px; flex-shrink: 0; padding-right: .5rem; font-size: .74rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-dias { display: flex; gap: 2px; }
.sb-d { width: 24px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.sb-d small { font-size: .55rem; font-weight: 700; color: var(--tenue); } .sb-d b { font-size: .6rem; font-weight: 700; color: var(--tinta-suave); }
.sb-d.dom small, .sb-d.dom b { color: var(--peligro); }
.sb-c { width: 24px; height: 13px; box-sizing: border-box; border-radius: 3px; border: 1px solid var(--linea); background: var(--superficie-2); font-style: normal; font-size: .52rem; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--tenue); flex-shrink: 0; }
.sb-c.dom:not(.m):not(.t):not(.n):not(.v):not(.lc):not(.ls):not(.c):not(.otro) { background: var(--linea); }
@media (max-width: 991px) { .sb-c { height: 26px; } }
#sb-rol.editando .sb-c { cursor: pointer; } #sb-rol.editando .sb-c:hover { opacity: .8; }
.sb-c.dsp { color: var(--tinta); } .sb-c.dsp.si { background: #E8EDF2; border-color: #CBD5E0; }
.sb-disp .sb-c { height: 11px; } @media (max-width: 991px) { .sb-disp .sb-c { height: 20px; } }
.sb-h { width: 112px; flex-shrink: 0; padding-left: .5rem; font-size: .72rem; white-space: nowrap; display: flex; align-items: center; gap: .25rem; color: var(--tinta-suave); }
.sb-h b { font-weight: 600; color: var(--tinta); font-variant-numeric: tabular-nums; } .sb-h small { font-size: .66rem; color: var(--tenue); } .sb-h .sb-obj { color: #6550B9; }
.sb-cab .sb-h { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--tenue); }
.sb-fl { display: inline-flex; flex-direction: column; } .sb-fl button { border: 0; background: none; padding: 0 2px; font-size: .5rem; line-height: 1; color: var(--tenue); cursor: pointer; } .sb-fl button:hover { color: var(--tinta); }
.sb-cobf:first-of-type, .sb-cobf { padding-top: 2px; } .sb-cobf .sb-nom { font-size: .7rem; color: var(--tinta-suave); }
.sb-k { width: 24px; height: 16px; box-sizing: border-box; border-radius: 2px; font-style: normal; font-size: .52rem; font-weight: 700; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; cursor: pointer; flex-shrink: 0; border: 1px solid var(--linea); background: var(--superficie-2); color: var(--tenue); }
.sb-k.dom { background: var(--linea); }
.sb-k.falta { background: var(--peligro-tenue); color: var(--peligro); border-color: var(--peligro); }
.sb-k.sobra { background: var(--aviso-tenue); color: var(--aviso); } .sb-k.exacto { background: var(--exito-tenue); color: var(--exito); }
.sb-k.exc { border: 1px dashed var(--tinta); } .sb-k:hover { filter: brightness(.95); }
.sb-cob-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.sb-pop { position: absolute; z-index: 40; background: #fff; border-radius: 10px; box-shadow: var(--elev-3); padding: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.sb-pop[hidden] { display: none; }
.sb-pop b { font-size: .8rem; } .sb-pop small { font-size: .7rem; color: var(--tenue); }
.sb-pop .sb-pop-r { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: .3rem; border-top: 1px solid var(--linea); display: block; }
.sb-pop-b { display: flex; gap: .3rem; }
.sb-pop-b button { min-width: 32px; height: 26px; border-radius: 6px; border: 1px solid var(--linea); background: var(--superficie-2); font-size: .74rem; font-weight: 700; cursor: pointer; }
.sb-pop-t { display: grid; grid-template-columns: repeat(4, auto); }
.sb-pop-t [data-q] { height: 20px; font-size: .8rem; line-height: 1; color: var(--tinta-suave); }
.sb-pop-b button:disabled { opacity: .35; cursor: default; }
.sb-pop sup { font-size: .55rem; margin-left: 1px; }
.sb-c.largo { font-size: .44rem; letter-spacing: -.03em; }

/* Sin la franja de «en prueba» (producción): su hueco desaparece. */
html.sin-prueba { --alto-prueba: 0px; }
