/* neuro.ci · tablero del centro
   Implementa el diseño de Claude Design ("Tablero neuro.ci"): lateral azul noche con el logo blanco,
   contenido claro, botones primarios oscuros y el amarillo de la marca sólo como punto/acento. */

:root {
  --noche: #1C2638;
  --noche-2: #263247;
  --noche-linea: #2C384D;
  --lat-texto: #C9D1DE;
  --lat-tenue: #A9B3C4;
  --amarillo: #F4CB1C;

  --fondo: #F4F5F7;
  --sup: #FFFFFF;
  --sup-2: #F8F9FB;
  --linea: #E2E5EA;
  --linea-2: #EDEFF2;
  --linea-3: #C9CED6;
  --tinta: #141A24;
  --tinta-2: #3A4352;
  --tenue: #5E6776;
  --enlace: #2B4170;

  --ok: #17613A;   --ok-f: #EAF5EE;   --ok-l: #C5E3D0;
  --warn: #7A5300; --warn-f: #FDF5E0; --warn-l: #EFD9A0;
  --bad: #A3261B;  --bad-f: #FCEEEC;  --bad-l: #F1C7C2;
  --info: #2B4170; --info-f: #EEF2F9; --info-l: #CBD6EA;

  --serie-1: #3B6FC4;  /* particulares */
  --serie-2: #CF8A00;  /* obras sociales */

  --r: 6px;
  --r-s: 4px;
  --fuente: "Nunito Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --sombra-pop: 0 12px 32px rgb(16 24 40 / .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--tinta);
  font: 14px/1.45 var(--fuente); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
a { color: var(--enlace); }
a:hover { color: var(--tinta); }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round; }
.sub, .tenue { color: var(--tenue); }
.sub { font-size: 13px; }
.chico { font-size: 13px; }
.mini { font-size: 12px; }
.fuerte { font-weight: 700; }
.derecha { text-align: right; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }

/* ── Botones y campos ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border: 1px solid var(--linea); border-radius: var(--r);
  background: var(--sup); color: var(--tinta); font-weight: 700; cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: var(--sup-2); border-color: var(--linea-3); color: var(--tinta); }
.btn.primario { background: var(--noche); border-color: var(--noche); color: #fff; }
.btn.primario:hover { background: #2A3650; }
.btn.peligro { color: var(--bad); }
.btn.peligro:hover { background: var(--bad-f); border-color: var(--bad-l); }
.btn.chico { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.grande { height: 46px; font-weight: 800; }
.btn.ancho { width: 100%; }
.btn.punteado { border-style: dashed; border-color: var(--linea-3); color: var(--enlace); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-texto { background: none; border: 0; padding: 2px 4px; color: var(--enlace); font-weight: 700; cursor: pointer;
             border-radius: var(--r-s); text-decoration: none; }
.btn-texto:hover { color: var(--tinta); text-decoration: underline; }
.btn-icono { width: 34px; height: 34px; border: 0; border-radius: var(--r); background: transparent; color: var(--tenue);
             display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-icono:hover { background: var(--sup-2); color: var(--tinta); }
.btn-icono-osc { width: 34px; height: 34px; border: 0; border-radius: var(--r); background: transparent; color: var(--lat-tenue);
                 display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-icono-osc:hover { background: var(--noche-2); color: #fff; }

label, .etiqueta { display: block; font-weight: 700; font-size: 13px; color: var(--tinta-2); margin: 14px 0 5px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
  width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--linea); border-radius: var(--r);
  background: var(--sup);
}
textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8A929F; }
input[readonly] { background: var(--sup-2); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--noche); }
input[type="color"] { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--linea); border-radius: var(--r); background: var(--sup); }
.ayuda { margin: 5px 0 0; font-size: 12px; color: var(--tenue); }
.form-error { min-height: 0; color: var(--bad); font-size: 13px; font-weight: 600; margin-top: 10px; }
.form-error:empty { display: none; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--tinta-2); margin: 12px 0 0; cursor: pointer; }
.campo-clave { position: relative; }
.campo-clave input { padding-right: 84px !important; }
.campo-clave .ver-clave { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 32px; font-size: 13px; }
.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.acciones .btn.primario { flex: 1 1 auto; }
.acciones.fin { justify-content: flex-end; }
.acciones.fin .btn.primario { flex: 0 0 auto; }
details.mas { margin-top: 16px; border-top: 1px solid var(--linea-2); padding-top: 10px; }
details.mas > summary { cursor: pointer; font-weight: 700; color: var(--enlace); list-style: none; }
details.mas > summary::before { content: "+ "; }
details.mas[open] > summary::before { content: "– "; }

/* ── Ingreso ──────────────────────────────────────────────────── */
.login { display: flex; flex-wrap: wrap; min-height: 100vh; font-size: 15px; }
.login-marca { flex: 1 1 420px; background: var(--noche); color: var(--lat-texto); padding: 56px 64px;
               display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 320px; }
.login-iso { width: 72px; height: auto; display: block; }
.login-logo { width: 280px; max-width: 100%; height: auto; display: block; }
.login-frase { margin-top: 22px; font-size: 18px; color: #fff; font-weight: 600; max-width: 380px; }
.login .credito { color: var(--lat-tenue); }
.login-lado { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; }
.login-form h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.login-sub { margin: 6px 0 8px; color: var(--tenue); }
.login-form label { margin-top: 16px; }
.login-form input { height: 44px !important; }
.login-form .btn { margin-top: 22px; }
.login-ayuda { margin-top: 18px; font-size: 13px; color: var(--tenue); }
.credito { font-size: 12px; color: var(--tenue); }
@media (max-width: 720px) {
  .login-marca { padding: 28px 24px; min-height: 0; gap: 20px; flex-basis: 100%; }
  .login-iso { display: none; }
  .login-logo { width: 180px; }
  .login-frase { font-size: 15px; margin-top: 12px; }
  .login-marca .credito { display: none; }
  .login-lado { align-items: flex-start; padding-top: 28px; }
}

/* ── Estructura ───────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; flex: 0 0 232px; background: var(--noche); color: var(--lat-texto);
           padding: 26px 14px 20px; display: flex; flex-direction: column; gap: 30px; overflow-y: auto; }
.lateral-logo { display: block; width: 128px; height: auto; margin: 0 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: var(--r);
         color: var(--lat-texto); text-decoration: none; font-weight: 600; }
.nav a svg.i { width: 18px; height: 18px; }
.nav a:hover { background: var(--noche-2); color: #fff; }
.nav a[aria-current="page"] { background: var(--noche-2); color: #fff; }
.nav a .punto { margin-left: auto; width: 7px; height: 7px; border-radius: 3px; background: var(--amarillo); display: none; }
.nav a[aria-current="page"] .punto { display: block; }
.nav .cuenta-nav { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--noche-linea);
                   color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.lateral-pie { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--noche-linea); }
.avatar { width: 32px; height: 32px; border-radius: var(--r); background: var(--noche-linea); color: #fff; flex: none;
          display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.yo { flex: 1 1 auto; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.yo-nombre { display: block; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yo-rol { display: block; font-size: 12px; color: var(--lat-tenue); }
.yo:hover .yo-nombre { text-decoration: underline; }
.contenido { flex: 1 1 auto; min-width: 0; padding: 32px 40px 40px; }
.contenedor { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.pie { text-align: center; margin-top: 28px; }
.barra-movil, .tabs-movil { display: none; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%);
             transition: transform .2s ease; height: 100%; }
  .app.menu-abierto .lateral { transform: none; box-shadow: var(--sombra-pop); }
  .app.menu-abierto::after { content: ""; position: fixed; inset: 0; background: rgb(16 24 40 / .35); z-index: 30; }
  .barra-movil { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: 12px;
                 background: var(--noche); color: #fff; padding: 10px 12px 10px 16px; }
  .barra-iso { width: 26px; height: auto; }
  .barra-movil strong { flex: 1 1 auto; font-size: 16px; font-weight: 800; }
  .barra-movil .btn-icono-osc { color: #fff; width: 44px; height: 44px; }
  .contenido { padding: 18px 16px 90px; }
  .tabs-movil { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--sup);
                border-top: 1px solid var(--linea); padding-bottom: env(safe-area-inset-bottom); }
  .tabs-movil a { flex: 1 1 0; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center;
                  gap: 3px; text-decoration: none; font-size: 12px; font-weight: 700; color: var(--tenue); }
  .tabs-movil a svg.i { width: 20px; height: 20px; }
  .tabs-movil a[aria-current="page"] { color: var(--tinta); box-shadow: inset 0 2px 0 var(--amarillo); }
  .pie { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lateral { transition: none; } }

/* ── Cabecera de página ───────────────────────────────────────── */
.cabecera { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cabecera .ante { color: var(--tenue); margin-bottom: 4px; }
.cabecera h1 { font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.cabecera .bajada { margin-top: 4px; color: var(--tenue); }
.cabecera .bajada strong { color: var(--tinta); }
.titulo-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cab-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 900px) { .cabecera h1 { font-size: 22px; } }

.selector-mes { display: flex; align-items: center; border: 1px solid var(--linea); border-radius: var(--r); background: var(--sup); height: 38px; }
.selector-mes button { width: 38px; height: 36px; border: 0; background: transparent; color: var(--tinta-2); cursor: pointer;
                       display: flex; align-items: center; justify-content: center; }
.selector-mes button:hover { color: var(--tinta); background: var(--sup-2); }
.selector-mes span { padding: 0 10px; font-weight: 700; min-width: 128px; text-align: center; line-height: 36px;
                     border-left: 1px solid var(--linea-2); border-right: 1px solid var(--linea-2); }

/* ── Paneles, tablas, badges ──────────────────────────────────── */
.panel { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r); min-width: 0; }
.panel-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
             padding: 16px 20px; border-bottom: 1px solid var(--linea-2); }
.panel-cab h2 { font-size: 16px; font-weight: 700; }
.panel-cab .sub { width: 100%; margin-top: -6px; }
.panel-cuerpo { padding: 16px 20px; }
.panel-pie { padding: 12px 20px; border-top: 1px solid var(--linea-2); }
.contador { height: 22px; min-width: 22px; padding: 0 7px; border-radius: var(--r-s); background: var(--noche); color: #fff;
            font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fila-flex { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-ancha { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-angosta { flex: 1 1 300px; min-width: 0; }
.desliza { overflow-x: auto; }

.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; color: var(--tenue); font-size: 12px; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.04em; padding: 10px 12px; white-space: nowrap; }
.tabla td { padding: 12px 10px; border-top: 1px solid var(--linea-2); vertical-align: middle; }
.tabla th { padding: 10px; }
.tabla th:first-child, .tabla td:first-child { padding-left: 20px; }
.tabla th:last-child, .tabla td:last-child { padding-right: 20px; }
.tabla .num { text-align: right; white-space: nowrap; }
.tabla.compacta { font-size: 13.5px; }
.tabla.compacta th { font-size: 11px; letter-spacing: 0.03em; padding: 10px 7px; }
.tabla.compacta td { padding: 12px 7px; }
.tabla.compacta th:first-child, .tabla.compacta td:first-child { padding-left: 20px; }
.tabla.compacta th:last-child, .tabla.compacta td:last-child { padding-right: 16px; }
.tabla tr.total td { border-top: 1px solid var(--linea); background: var(--sup-2); font-weight: 800; }
.tabla tr.seccion th { background: var(--sup-2); border-top: 1px solid var(--linea-2); color: var(--tinta-2); font-weight: 800; }
.tabla tr.seccion th .sub { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12px; }
.tabla tr.click { cursor: pointer; }
.tabla tr.click:hover td { background: var(--sup-2); }
.tabla .linea2 { font-size: 13px; color: var(--tenue); }
.nombre-color { display: flex; align-items: center; gap: 10px; }
.barra-color { width: 4px; height: 30px; border-radius: 2px; flex: none; }
.punto-color { width: 8px; height: 8px; border-radius: 2px; flex: none; display: inline-block; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border: 1px solid var(--linea);
         border-radius: var(--r-s); background: var(--sup-2); color: var(--tinta-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.badge.sin-punto::before { display: none; }
.badge.amarillo::before { background: var(--amarillo); }
.badge.ok { background: var(--ok-f); color: var(--ok); border-color: var(--ok-l); }
.badge.warn { background: var(--warn-f); color: var(--warn); border-color: var(--warn-l); }
.badge.bad { background: var(--bad-f); color: var(--bad); border-color: var(--bad-l); }
.badge.info { background: var(--info-f); color: var(--info); border-color: var(--info-l); }
.nota { padding: 10px 12px; border: 1px solid var(--info-l); border-radius: var(--r); background: var(--info-f); color: var(--info); font-size: 13px; }
.nota.warn { border-color: var(--warn-l); background: var(--warn-f); color: var(--warn); }
.nota.bad { border-color: var(--bad-l); background: var(--bad-f); color: var(--bad); }
.nota.ok { border-color: var(--ok-l); background: var(--ok-f); color: var(--ok); }
.vacio { padding: 28px 20px; text-align: center; color: var(--tenue); }

/* ── Números del mes ──────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--linea);
         border: 1px solid var(--linea); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--sup); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat .et { font-size: 13px; color: var(--tenue); font-weight: 600; }
.stat .va { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.stat .su { font-size: 13px; color: var(--tenue); }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { padding: 14px; } .stat .va { font-size: 20px; } }

/* ── Para revisar ─────────────────────────────────────────────── */
.alertas { list-style: none; margin: 0; padding: 0; }
.alertas li { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--linea-2); }
.alertas li:first-child { border-top: 0; }
.alerta-icono { flex: none; width: 28px; height: 28px; border-radius: var(--r); border: 1px solid var(--linea);
                display: flex; align-items: center; justify-content: center; background: var(--sup-2); color: var(--tinta-2); }
.alerta-icono.ok { background: var(--ok-f); color: var(--ok); border-color: var(--ok-l); }
.alerta-icono.warn { background: var(--warn-f); color: var(--warn); border-color: var(--warn-l); }
.alerta-icono.bad { background: var(--bad-f); color: var(--bad); border-color: var(--bad-l); }
.alerta-icono.info { background: var(--info-f); color: var(--info); border-color: var(--info-l); }
.alerta-icono svg.i { width: 15px; height: 15px; stroke-width: 2; }
.alertas .t { font-weight: 700; }
.alertas .d { color: var(--tinta-2); font-size: 13px; margin-top: 2px; }
.alertas .a { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; text-decoration: none; }

/* ── Gráfico ──────────────────────────────────────────────────── */
.leyenda-graf { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 13px; color: var(--tinta-2); }
.leyenda-graf .sw { display: inline-flex; align-items: center; gap: 6px; }
.leyenda-graf .sw i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.grafico { margin-top: 18px; display: flex; gap: 10px; }
.eje { position: relative; width: 52px; flex: none; height: 200px; font-size: 12px; color: var(--tenue); }
.eje span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.area { flex: 1 1 auto; min-width: 0; }
.plot { position: relative; height: 200px; display: flex; align-items: flex-end; gap: 4%; padding: 0 2%; border-bottom: 1px solid var(--linea-3); }
.plot .guia { position: absolute; left: 0; right: 0; height: 1px; background: var(--linea-2); }
.barra { position: relative; flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; cursor: default; }
.barra .seg-os { background: var(--serie-2); border-radius: 4px 4px 0 0; }
.barra .seg-part { background: var(--serie-1); }
.barra .seg-part:first-child { border-radius: 4px 4px 0 0; }
.barra:hover .seg-os, .barra:hover .seg-part, .barra:focus-visible .seg-os, .barra:focus-visible .seg-part { filter: brightness(.9); }
.barra .etq { position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.meses-eje { display: flex; gap: 4%; padding: 8px 2% 0; font-size: 12px; color: var(--tenue); }
.meses-eje span { flex: 1 1 0; text-align: center; }
.tooltip { position: fixed; z-index: 60; pointer-events: none; background: var(--noche); color: #fff; border-radius: var(--r);
           padding: 8px 10px; font-size: 12px; box-shadow: var(--sombra-pop); max-width: 260px; }
.tooltip b { display: block; font-size: 13px; margin-bottom: 2px; }
.tooltip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* ── Grilla de asistencias ────────────────────────────────────── */
.leyenda { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 16px; background: var(--sup);
           border: 1px solid var(--linea); border-radius: var(--r); font-size: 13px; color: var(--tinta-2); }
.leyenda > strong { color: var(--tinta); }
.leyenda .item { display: inline-flex; align-items: center; gap: 7px; }
.leyenda .celda { width: 24px; height: 24px; font-size: 12px; cursor: default; }
.leyenda .celda svg.i { width: 14px; height: 14px; }
.celda { width: 40px; height: 40px; border: 1px solid var(--linea-3); border-radius: var(--r); background: var(--sup);
         color: var(--tenue); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
         cursor: pointer; padding: 0; }
.celda svg.i { width: 17px; height: 17px; stroke-width: 2.6; }
.celda.vacia { border-style: dashed; }
.celda.vacia:hover { border-color: var(--enlace); color: var(--enlace); background: var(--info-f); }
.celda.fuera { opacity: .45; border-color: var(--linea); }
.celda.fuera:hover { opacity: 1; }
.celda.vino { background: var(--ok-f); color: var(--ok); border-color: var(--ok-l); }
.celda.aviso, .celda.feriado { background: var(--fondo); color: var(--tenue); border-color: var(--linea); }
.celda.cobra { background: var(--warn-f); color: var(--warn); border-color: var(--warn-l); }
.celda.prof { background: var(--info-f); color: var(--info); border-color: var(--info-l); }
.celda.eval { box-shadow: inset 0 -3px 0 var(--serie-1); }
.celda[disabled] { cursor: default; }
.celda.guardando { opacity: .6; }
.grilla th.fecha { text-align: center; padding: 10px 4px; }
.grilla th.fecha .d { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--tinta); }
.grilla th.fecha.futura .d { color: var(--tenue); }
.grilla th.fecha.hoy .d::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: var(--amarillo); margin-left: 5px; vertical-align: 2px; }
.grilla th.fecha .btn { margin-top: 4px; height: 24px; padding: 0 8px; font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--enlace); }
.grilla th.fecha .prox { margin-top: 4px; height: 24px; line-height: 24px; font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--tenue); font-weight: 600; }
.grilla td.c { text-align: center; padding: 8px 4px; }
.grilla td.pac { min-width: 210px; }
.grilla .pac .n { font-weight: 700; }
.grilla .pac a { color: inherit; text-decoration: none; }
.grilla .pac a:hover { text-decoration: underline; }

.menu-flotante { position: fixed; z-index: 70; min-width: 236px; background: var(--sup); border: 1px solid var(--linea);
                 border-radius: var(--r); box-shadow: var(--sombra-pop); padding: 6px; }
.menu-flotante .tit { padding: 6px 10px 8px; font-size: 12px; color: var(--tenue); font-weight: 700; border-bottom: 1px solid var(--linea-2); margin-bottom: 4px; }
.menu-flotante button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0;
                        background: none; border-radius: var(--r-s); cursor: pointer; text-align: left; font-weight: 600; }
.menu-flotante button:hover, .menu-flotante button:focus-visible { background: var(--sup-2); }
.menu-flotante button .celda { width: 24px; height: 24px; font-size: 12px; pointer-events: none; }
.menu-flotante button .celda svg.i { width: 14px; height: 14px; }
.menu-flotante button.actual { background: var(--info-f); }
.menu-flotante hr { border: 0; border-top: 1px solid var(--linea-2); margin: 4px 0; }

.resumen-liq dl { margin: 0; padding: 6px 20px; }
.resumen-liq dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linea-2); }
.resumen-liq dt { color: var(--tinta-2); }
.resumen-liq dd { margin: 0; font-weight: 700; white-space: nowrap; }
.resumen-liq .total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 20px 16px; }
.resumen-liq .total span:last-child { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.resumen-liq .botones { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 20px; }
.resumen-liq .botones .btn { flex: 1 1 auto; height: 40px; }
.lista-simple { list-style: none; margin: 0; padding: 0; }
.lista-simple li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 12px 20px; border-bottom: 1px solid var(--linea-2); }
.lista-simple li .izq { flex: 1 1 220px; min-width: 0; }
.lista-simple li .der { text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 34px; padding: 0 12px; border: 1px solid var(--linea); border-radius: var(--r); background: var(--sup);
        color: var(--tinta-2); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.chip:hover { border-color: var(--linea-3); }
.chip[aria-pressed="true"] { background: var(--noche); border-color: var(--noche); color: #fff; }
.segmento { display: flex; border: 1px solid var(--linea); border-radius: var(--r); background: var(--sup); overflow: hidden; }
.segmento button { height: 36px; padding: 0 12px; border: 0; border-left: 1px solid var(--linea); background: var(--sup);
                   color: var(--tinta-2); font-weight: 600; cursor: pointer; }
.segmento button:first-child { border-left: 0; }
.segmento button[aria-pressed="true"] { background: var(--noche); color: #fff; font-weight: 700; }
.segmento.ancho button { flex: 1 1 0; height: 32px; font-size: 13px; }
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.buscador { position: relative; flex: 1 1 200px; max-width: 300px; }
.buscador svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--tenue); }
.buscador input { padding-left: 34px !important; height: 36px !important; }
.filtros select { width: auto; height: 36px; }
.filtros .en-linea { display: inline-flex; align-items: center; gap: 8px; color: var(--tinta-2); font-weight: 600; margin: 0; }

.pestanas { display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--linea); }
.pestanas a { padding: 0 2px 10px; text-decoration: none; font-weight: 600; color: var(--tenue); }
.pestanas a[aria-current="page"] { font-weight: 800; color: var(--tinta); box-shadow: inset 0 -2px 0 var(--noche); }
.pestanas a .mini { font-weight: 700; color: var(--warn); }

/* ── Celular: día de hoy ──────────────────────────────────────── */
.hoy-cab { background: var(--noche); color: #fff; border-radius: var(--r); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.hoy-cab .fila { display: flex; align-items: center; gap: 12px; }
.hoy-cab h1 { font-size: 20px; font-weight: 800; line-height: 1.2; }
.hoy-cab p { font-size: 13px; color: var(--lat-texto); }
.hoy-cab .nav-dia { margin-left: auto; display: flex; gap: 6px; }
.hoy-cab .nav-dia button { width: 44px; height: 44px; border: 1px solid var(--noche-linea); border-radius: var(--r); background: transparent;
                           color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hoy-cab .progreso { display: flex; justify-content: space-between; font-size: 13px; color: var(--lat-texto); margin-bottom: 6px; }
.hoy-cab .progreso strong { color: #fff; }
.medidor { height: 6px; border-radius: 3px; background: var(--noche-linea); overflow: hidden; }
.medidor span { display: block; height: 100%; background: var(--amarillo); border-radius: 3px; }
.turnos-hoy { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.turnos-hoy li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: var(--sup);
                 border: 1px solid var(--linea); border-radius: var(--r); min-height: 62px; font-size: 15px; }
.turnos-hoy li.libre { background: var(--sup-2); }
.turnos-hoy li.bloq { background: transparent; border-style: dashed; color: var(--tenue); min-height: 44px; }
.turnos-hoy .hora { width: 44px; flex: none; font-weight: 800; font-size: 14px; color: var(--tinta-2); }
.turnos-hoy .quien { flex: 1 1 auto; min-width: 0; }
.turnos-hoy .quien .n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turnos-hoy .quien .s { font-size: 12px; color: var(--tenue); }
.turnos-hoy .botones { display: flex; gap: 6px; }
.turnos-hoy .botones .btn { height: 44px; padding: 0 12px; font-size: 14px; }
.btn.vino { color: var(--ok); border-color: var(--ok-l); }
.btn.estado { height: 44px; padding: 0 12px; font-size: 14px; font-weight: 800; }
.btn.estado.vino { background: var(--ok-f); }
.btn.estado.aviso, .btn.estado.feriado { background: var(--fondo); color: var(--tinta-2); }
.btn.estado.cobra { background: var(--warn-f); color: var(--warn); border-color: var(--warn-l); }
.btn.estado.prof { background: var(--info-f); color: var(--info); border-color: var(--info-l); }
.etq-libre { height: 32px; padding: 0 10px; border: 1px dashed var(--linea-3); border-radius: var(--r); color: var(--tenue);
             font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; }

/* ── Agenda ───────────────────────────────────────────────────── */
.semana { display: grid; grid-template-columns: repeat(var(--dias, 5), minmax(0, 1fr)); gap: 12px; min-width: 1040px; align-items: start; }
.dia-col { display: flex; flex-direction: column; gap: 10px; }
.dia-col > .cab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.dia-col > .cab h2 { font-size: 15px; font-weight: 800; }
.dia-col > .cab span { font-size: 12px; color: var(--tenue); }
.bloque { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r); overflow: hidden; }
.bloque .cab { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--linea-2); }
.bloque .cab .n { font-weight: 800; font-size: 13px; }
.bloque .cab .e { font-size: 12px; color: var(--tenue); }
.bloque ul { list-style: none; margin: 0; padding: 6px; }
.bloque li { margin: 0; }
.turno { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0 6px; border: 1px solid transparent;
         border-radius: var(--r-s); font-size: 13px; background: none; text-align: left; cursor: default; color: inherit; }
button.turno { cursor: pointer; }
button.turno:hover { background: var(--sup-2); border-color: var(--linea); }
.turno .h { width: 38px; flex: none; color: var(--tenue); font-weight: 600; }
.turno .q { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.turno.libre { border: 1px dashed var(--linea-3); background: var(--sup); }
.turno.libre .q { font-weight: 800; color: var(--enlace); }
.turno.libre .asignar { font-size: 12px; font-weight: 700; color: var(--enlace); }
.turno.bloqueado { background: var(--fondo); }
.turno.bloqueado .q { color: var(--tenue); font-weight: 400; }
.sin-turnos { padding: 18px 14px; border: 1px dashed var(--linea-3); border-radius: var(--r); color: var(--tenue); font-size: 13px; text-align: center; }
@media (max-width: 900px) {
  .semana { grid-template-columns: minmax(0, 1fr); min-width: 0; }
}

/* ── Pacientes ────────────────────────────────────────────────── */
.lista-pac { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow-y: auto; }
.lista-pac li { border-bottom: 1px solid var(--linea-2); }
.lista-pac a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--tinta); }
.lista-pac a:hover { background: var(--sup-2); color: var(--tinta); }
.lista-pac a[aria-current="true"] { background: var(--info-f); box-shadow: inset 3px 0 0 var(--noche); }
.lista-pac .n { font-weight: 700; }
.lista-pac .t { font-size: 12px; color: var(--tenue); }
.lista-pac .c { margin-left: auto; font-size: 12px; color: var(--tinta-2); font-weight: 600; white-space: nowrap; }
.ficha-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px;
             border-bottom: 1px solid var(--linea-2); }
.ficha-cab h2 { font-size: 22px; font-weight: 800; }
.ficha-cab p { margin-top: 4px; color: var(--tinta-2); }
.ficha-sec { padding: 18px 24px; border-bottom: 1px solid var(--linea-2); min-width: 0; }
.ficha-sec:last-child { border-bottom: 0; }
.ficha-sec h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tinta-2); }
.ficha-cols { display: flex; flex-wrap: wrap; }
.ficha-cols > .ficha-sec { flex: 1 1 300px; }
.terapia { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 14px; border: 1px solid var(--linea); border-radius: var(--r); }
.terapia + .terapia { margin-top: 8px; }
.terapia .q { flex: 1 1 200px; min-width: 0; }
.terapia .q .n { font-weight: 800; }
.terapia .q .s { font-size: 13px; color: var(--tenue); }
.terapia.inactiva { opacity: .65; }
.dl-filas { margin: 0; }
.dl-filas > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--linea-2); }
.dl-filas dt { color: var(--tinta-2); }
.dl-filas dd { margin: 0; font-weight: 700; text-align: right; }
.dl-filas .ok { color: var(--ok); }
.dl-filas .warn { color: var(--warn); }
.dl-filas .bad { color: var(--bad); }

/* ── Formularios laterales y modales ──────────────────────────── */
.form-panel form { padding: 4px 20px 20px; }
.calculo { border: 1px solid var(--linea); border-radius: var(--r); background: var(--sup-2); padding: 12px 14px; display: flex;
           flex-direction: column; gap: 6px; margin-top: 14px; }
.calculo .f { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--tinta-2); }
.calculo .grande { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; color: var(--tinta); }
.calculo .ok { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok); font-weight: 700; }
.calculo .ok svg.i { width: 14px; height: 14px; stroke-width: 2.6; }
.calculo .warn { font-size: 12px; color: var(--warn); font-weight: 700; }
.numero-factura { display: flex; align-items: center; gap: 8px; }
.numero-factura input:first-child { width: 92px !important; flex: none; }
.modal { border: 0; padding: 0; border-radius: var(--r); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
         box-shadow: var(--sombra-pop); color: var(--tinta); }
.modal.chico { width: min(420px, calc(100vw - 24px)); }
.modal.ancho { width: min(760px, calc(100vw - 24px)); }
.modal::backdrop { background: rgb(16 24 40 / .45); }
.modal-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--linea-2);
             position: sticky; top: 0; background: var(--sup); z-index: 1; }
.modal-cab h2 { font-size: 17px; font-weight: 800; }
.modal-cuerpo { padding: 4px 20px 20px; }
.modal.chico .modal-cuerpo { padding: 20px; }
.modal.chico h2 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.clave-grande { font-size: 28px; font-weight: 800; letter-spacing: .06em; text-align: center; padding: 16px; margin: 14px 0;
                background: var(--sup-2); border: 1px dashed var(--linea-3); border-radius: var(--r); user-select: all; }
.token { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; word-break: break-all; }
pre.codigo { background: var(--sup-2); border: 1px solid var(--linea); border-radius: var(--r); padding: 12px; overflow-x: auto;
             font-size: 12px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; margin: 8px 0 0; }

/* ── Toasts ───────────────────────────────────────────────────── */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column;
          gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 8px 8px 14px; background: var(--noche);
         color: #fff; border-radius: var(--r); box-shadow: var(--sombra-pop); font-weight: 600; max-width: min(520px, calc(100vw - 24px)); }
.toast.error { background: var(--bad); }
.toast button { background: none; border: 0; color: #fff; font-weight: 800; cursor: pointer; padding: 6px 8px; border-radius: var(--r-s); }
.toast button:hover { background: rgb(255 255 255 / .12); }
@media (max-width: 900px) { #toasts { bottom: 76px; } }

@media print {
  .lateral, .barra-movil, .tabs-movil, .cab-acciones, .btn { display: none !important; }
  .contenido { padding: 0; }
  body { background: #fff; }
}
