/* ============================================================================
   optica-shell — barra superior + riel de módulos, compartidos (NV, Agenda, …)
   Se sirve desde la raíz:  /shell.css  ·  /shell.js
   El chrome (barra + riel) es SIEMPRE oscuro; los módulos abajo cambian de tema
   con  <html data-theme="black">  (vacío = claro).
   ============================================================================ */
/* Fuentes: Inter + KoHo + Playfair se piden con <link> en el <head> de cada index.html (antes de este archivo,
   con preconnect): un @import acá las hacía esperar a que bajara shell.css.

   CIFRAS ALINEADAS (2026-10-13): KoHo trae dígitos PROPORCIONALES y no tiene la función `tnum` (el "1" mide 418 y el
   "4" 655 unidades), así que todo `font-variant-numeric:tabular-nums` sobre KoHo (N° de OT, montos, totales, reloj)
   no hacía nada: columnas de plata desalineadas y números que "bailan" al cambiar. Esta cara suma a la familia "KoHo"
   SÓLO los dígitos y signos de número ($ % + , - . / : 0-9) tomados de Inter (subconjunto de 8 KB, variable 400–700,
   con tnum). Al declararse DESPUÉS de las caras de Google, gana para esos caracteres (unicode-range); las letras
   siguen siendo KoHo. size-adjust 96 % iguala la altura de Inter a la de las mayúsculas de KoHo.
   Inter es SIL OFL 1.1 (© The Inter Project Authors) — el aviso va dentro del archivo. */
@font-face{
  font-family: "KoHo";
  src: url("/cifras.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0024-0025, U+002B-003A;
  size-adjust: 96%;
}

:root{
  --shell-h: 50px;
  --rail-w: 52px;
  --shell-bg: 228 47% 13%;
  --shell-bg-hi: 228 42% 17%;
  --shell-bd: 228 30% 24%;
  --shell-fg: 0 0% 100%;
  --shell-muted: 220 22% 68%;
  --shell-gold: 39 54% 62%;
  --shell-ok: 150 55% 55%;
}
:root[data-theme="black"]{ --shell-bg: 0 0% 6%; --shell-bg-hi: 30 5% 8%; --shell-bd: 0 0% 18%; }

/* el riel es fijo a la izquierda; el contenido de cada módulo se corre para dejarle lugar */
body{ padding-left: var(--rail-w); }

/* ---------------------------------------------------------------- barra superior */
#optica-shell{
  position:sticky; top:0; z-index:46;   /* sobre el contenido; bajo drawers/modales de los módulos */
  height:var(--shell-h);
  display:flex; align-items:center; gap:14px;
  padding:0 14px;
  background:linear-gradient(180deg, hsl(var(--shell-bg-hi, var(--shell-bg))), hsl(var(--shell-bg)));
  border-bottom:1px solid hsl(var(--shell-bd));
  box-shadow:inset 0 1px 0 hsl(0 0% 100% / .05), 0 1px 0 hsl(0 0% 0% / .12), 0 6px 18px -10px hsl(229 48% 8% / .5);
  color:hsl(var(--shell-fg));
  font:14px/1 "Inter",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;
  user-select:none;
}
#optica-shell *{box-sizing:border-box}
/* filo dorado bajo la barra: se desvanece hacia los costados (mismo hilo que modales y tarjetas) */
#optica-shell::after{content:""; position:absolute; left:0; right:0; bottom:-1px; height:1px; pointer-events:none;
  background:linear-gradient(90deg, transparent 0%, hsl(var(--shell-gold) / .55) 22%, hsl(var(--shell-gold) / .55) 60%, transparent 100%)}
#optica-shell [hidden]{display:none !important}

/* marca: lentes grandes con su resplandor rojo/azul y flotando apenas, wordmark en Playfair a la escala de la placa de sucursal,
   «CHILE» en oro con un brillo que lo cruza cada tanto y un filete dorado debajo. Un hilo vertical la separa de la identidad. */
.osh-brand{position:relative; display:flex; align-items:center; gap:12px; color:inherit; text-decoration:none;
  font:700 15px/1 "KoHo",sans-serif; white-space:nowrap; padding-right:18px; isolation:isolate}
.osh-brand::after{content:""; position:absolute; right:0; top:50%; height:26px; width:1px; transform:translateY(-50%);
  background:linear-gradient(180deg, transparent, hsl(var(--shell-gold) / .6), transparent)}
.osh-brand .osh-mark{position:relative; width:40px; height:auto; flex:none; z-index:1;
  filter:drop-shadow(0 3px 5px hsl(0 0% 0% / .45)); animation:osh-mark-flota 4.2s ease-in-out infinite alternate}
.osh-brand::before{content:""; position:absolute; left:-12px; top:50%; width:64px; height:44px; transform:translateY(-50%); z-index:0; pointer-events:none;
  background:radial-gradient(closest-side, hsl(352 100% 60% / .38), transparent) 22% 50% / 36px 40px no-repeat,
             radial-gradient(closest-side, hsl(200 100% 55% / .38), transparent) 78% 50% / 36px 40px no-repeat;
  animation:osh-mark-luz 3.2s ease-in-out infinite alternate}
@keyframes osh-mark-flota{from{transform:translateY(-1.5px) rotate(-3deg)} to{transform:translateY(1.5px) rotate(3deg)}}
@keyframes osh-mark-luz{from{opacity:.45} to{opacity:1}}
.osh-brand > span{position:relative; font:700 18px/1 "Playfair Display",Georgia,serif; letter-spacing:.11em; text-transform:uppercase; color:hsl(0 0% 100% / .97); padding-bottom:6px}
.osh-brand > span::after{content:""; position:absolute; left:0; right:.11em; bottom:0; height:1px;
  background:linear-gradient(90deg, hsl(var(--shell-gold) / .9), hsl(var(--shell-gold) / .15))}
.osh-brand b{font-weight:700; color:hsl(var(--shell-gold));
  background:linear-gradient(100deg, hsl(36 55% 52%) 0%, hsl(39 68% 74%) 30%, hsl(45 100% 93%) 45%, hsl(39 68% 74%) 60%, hsl(36 55% 52%) 100%) 0 0 / 250% 100%;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; animation:osh-brand-brillo 7s ease-in-out 1.2s infinite}
@keyframes osh-brand-brillo{0%,55%{background-position:100% 0} 85%,100%{background-position:0 0}}

/* identidad real — avatar con iniciales (aro dorado, como el pin de la placa) + nombre en grande y rol en versalitas doradas debajo.
   Es lo ÚNICO que muestra "quién sos" en la barra — ya no hay un segundo indicador de sesión. */
.osh-who{display:flex; align-items:center; gap:10px; color:hsl(var(--shell-fg)); white-space:nowrap; min-width:0}
.osh-who-av{position:relative; flex:none; display:grid; place-items:center; width:34px; height:34px; border-radius:50%;
  font:700 13px/1 "Playfair Display",Georgia,serif; letter-spacing:.04em; color:hsl(var(--shell-gold));
  background:linear-gradient(160deg, hsl(228 36% 20%), hsl(228 44% 10%));
  box-shadow:inset 0 0 0 1px hsl(var(--shell-gold) / .55), inset 0 1px 0 hsl(0 0% 100% / .12), 0 0 0 3px hsl(var(--shell-gold) / .08)}
:root[data-theme="black"] .osh-who-av{background:linear-gradient(160deg, hsl(30 6% 15%), hsl(0 0% 6%))}
.osh-who-av::after{content:""; position:absolute; right:-1px; bottom:-1px; width:9px; height:9px; border-radius:50%;
  background:hsl(145 70% 48%); box-shadow:0 0 0 2px hsl(var(--shell-bg)), 0 0 8px hsl(145 80% 50% / .7); animation:osh-en-linea 2.6s ease-in-out infinite}
@keyframes osh-en-linea{0%,100%{box-shadow:0 0 0 2px hsl(var(--shell-bg)), 0 0 4px hsl(145 80% 50% / .4)} 50%{box-shadow:0 0 0 2px hsl(var(--shell-bg)), 0 0 11px hsl(145 90% 55% / .9)}}
.osh-who-tx{display:flex; flex-direction:column; gap:5px; min-width:0}
.osh-who-nom{font:600 15px/1 "Inter",system-ui,sans-serif; letter-spacing:.005em; color:hsl(0 0% 100% / .96); overflow:hidden; text-overflow:ellipsis}
.osh-who-rol{display:inline-flex; align-items:center; gap:6px; font:600 9.5px/1 "Inter",system-ui,sans-serif; color:hsl(var(--shell-gold)); text-transform:uppercase; letter-spacing:.16em}
.osh-who-rol::before{content:""; width:14px; height:1px; background:linear-gradient(90deg, hsl(var(--shell-gold) / .9), hsl(var(--shell-gold) / .2))}

/* Sucursal: la placa del local, siempre a la vista junto al nombre, para que nadie trabaje en la sucursal equivocada sin darse cuenta.
   Doble marco (aro dorado fino por fuera, placa marino por dentro), pin dorado en su círculo y el nombre en Playfair, la letra del sello de la marca. */
.osh-suc{position:static; flex:0 0 auto; margin-left:6px; max-width:36vw; padding:3px; border-radius:999px; cursor:default;
  background:linear-gradient(135deg, hsl(var(--shell-gold) / .75), hsl(var(--shell-gold) / .22) 55%, hsl(var(--shell-gold) / .55));
  box-shadow:0 10px 26px -12px hsl(var(--shell-gold) / .6), 0 0 0 5px hsl(var(--shell-gold) / .07); overflow:hidden; isolation:isolate}
.osh-suc-in{display:flex; align-items:center; gap:11px; padding:4px 22px 4px 4px; border-radius:999px; white-space:nowrap;
  background:linear-gradient(180deg, hsl(228 44% 18%), hsl(228 50% 11%));
  box-shadow:inset 0 1px 0 hsl(0 0% 100% / .14), inset 0 -1px 0 hsl(0 0% 0% / .35)}
:root[data-theme="black"] .osh-suc-in{background:linear-gradient(180deg, hsl(30 6% 12%), hsl(0 0% 5%))}
.osh-suc-pin{flex:none; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; color:hsl(228 50% 12%);
  background:linear-gradient(145deg, hsl(39 68% 76%), hsl(var(--shell-gold)) 55%, hsl(36 55% 50%));
  box-shadow:inset 0 1px 0 hsl(0 0% 100% / .55), 0 2px 6px -1px hsl(0 0% 0% / .45)}
.osh-suc-n{min-width:0; overflow:hidden; text-overflow:ellipsis; font:700 17px/1.1 "Playfair Display",Georgia,serif; letter-spacing:.015em; color:hsl(0 0% 100% / .97)}
.osh-suc-sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
/* un solo destello dorado al aparecer o cambiar de sucursal (sólo transform; nada de movimiento permanente) */
.osh-suc::after{content:""; position:absolute; inset:0; z-index:2; pointer-events:none; transform:translateX(-120%); opacity:0;
  background:linear-gradient(100deg, transparent 30%, hsl(39 80% 85% / .6) 50%, transparent 70%)}
.osh-suc-brilla::after{animation:osh-suc-brillo 1.3s cubic-bezier(.16,1,.3,1) .35s 1}
@keyframes osh-suc-brillo{0%{transform:translateX(-120%); opacity:1} 100%{transform:translateX(120%); opacity:1}}
@media(prefers-reduced-motion:reduce){ .osh-suc-brilla::after{animation:none} .osh-brand .osh-mark, .osh-brand::before, .osh-brand b, .osh-who-av::after{animation:none} }
/* en el flujo de la barra, pegada al nombre: centrada en absoluto tapaba los botones del módulo (Resumen, Ventas…) */
@media(max-width:1280px){ .osh-who-rol, .osh-brand > span::after{display:none} .osh-who{max-width:15vw} .osh-brand > span{font-size:16px; padding-bottom:0} }
.osh-spacer{flex:1}
/* cuando falta ancho, cede primero lo redundante: el nombre del módulo (ya lo dicen el riel y las pestañas), luego «en vivo» queda en puntito */
@media(max-width:1500px){ #optica-shell .osh-cat{display:none} }
@media(max-width:1400px){ #optica-shell .osh-live{font-size:0; gap:0; padding:0 11px} }
@media(max-width:1300px){ #optica-shell{gap:10px} .osh-act{padding:0 14px} .osh-brand{padding-right:14px} }

/* acciones + estado del módulo — el markup lo inyecta cada módulo en #osh-slot.
   Patrón IDÉNTICO en todos los módulos: [indicador "en vivo" si aplica] [tabs/botón
   de acción]. Nada de esto vive suelto en el HTML propio del módulo. */
.osh-slot{display:flex; align-items:center; gap:8px}
/* botones del módulo: pestañas = píldora con hilo fino (la activa se rellena en oro); la acción principal («+ Nuevo…») lleva aro dorado y
   el «+» en oro, para que no parezcan dos pestañas más. Misma altura (36) y mismo aro que Tareas y el avatar. */
.osh-act{
  position:relative; height:36px; padding:0 17px; border:0; border-radius:999px; cursor:pointer; white-space:nowrap;
  background:linear-gradient(180deg, hsl(0 0% 100% / .07), hsl(0 0% 100% / .02)); color:hsl(var(--shell-fg));
  box-shadow:inset 0 0 0 1px hsl(0 0% 100% / .12), inset 0 1px 0 hsl(0 0% 100% / .08);
  font:600 13px/1 "Inter",system-ui,sans-serif; letter-spacing:.01em;
  transition:background .18s cubic-bezier(.2,.7,.2,1), color .18s, box-shadow .2s, transform .18s cubic-bezier(.34,1.45,.64,1);
}
.osh-act:hover{background:linear-gradient(180deg, hsl(0 0% 100% / .13), hsl(0 0% 100% / .05)); box-shadow:inset 0 0 0 1px hsl(0 0% 100% / .22); transform:translateY(-1px)}
.osh-act:active{transform:scale(.97)}
.osh-act.on{background:linear-gradient(180deg, hsl(41 68% 74%), hsl(var(--shell-gold)) 60%, hsl(36 55% 54%)); color:hsl(229 45% 12%);
  box-shadow:inset 0 1px 0 hsl(0 0% 100% / .5), 0 6px 16px -6px hsl(var(--shell-gold) / .7)}
#navNueva.osh-act, #newBtn.osh-act{box-shadow:inset 0 0 0 1px hsl(var(--shell-gold) / .6), inset 0 1px 0 hsl(0 0% 100% / .1); background:linear-gradient(180deg, hsl(var(--shell-gold) / .16), hsl(var(--shell-gold) / .05))}
#navNueva.osh-act:hover, #newBtn.osh-act:hover{background:linear-gradient(180deg, hsl(var(--shell-gold) / .3), hsl(var(--shell-gold) / .12)); box-shadow:inset 0 0 0 1px hsl(var(--shell-gold)), 0 6px 18px -8px hsl(var(--shell-gold) / .7)}
#navNueva.osh-act.on, #newBtn.osh-act.on{background:linear-gradient(180deg, hsl(41 68% 74%), hsl(var(--shell-gold)) 60%, hsl(36 55% 54%)); color:hsl(229 45% 12%);
  box-shadow:inset 0 1px 0 hsl(0 0% 100% / .5), 0 6px 16px -6px hsl(var(--shell-gold) / .7)}
.osh-act.rr-tab{display:inline-flex; align-items:center; gap:7px; padding:0 15px}   /* pestañas con ícono (RRHH) */
.osh-act.osh-ic{padding:0 11px; font-size:14px}          /* acción sólo-ícono (⚙, etc.) */

/* indicador "en vivo" reusable — cualquier módulo lo pone en su slot:
   <span class="osh-live"><span class="live" id="liveDot"></span>en vivo</span>
   Píldora con el mismo hilo fino que el resto de la barra: punto que pulsa + versalitas espaciadas. */
.osh-live{display:flex; align-items:center; gap:8px; height:28px; padding:0 13px 0 11px; border-radius:999px; white-space:nowrap;
  font:600 10px/1 "Inter",system-ui,sans-serif; letter-spacing:.16em; text-transform:uppercase; color:hsl(var(--shell-muted));
  background:hsl(0 0% 100% / .04); box-shadow:inset 0 0 0 1px hsl(0 0% 100% / .1)}
.live{width:8px; height:8px; border-radius:50%; flex:none; background:hsl(0 0% 100% / .25); transition:background .3s, box-shadow .3s}
.live.on{background:hsl(var(--shell-ok)); box-shadow:0 0 0 0 hsl(var(--shell-ok) / .5); animation:oshLivePulse 2s ease-out infinite}
.osh-live:has(.live.on){color:hsl(var(--shell-ok)); background:hsl(var(--shell-ok) / .08); box-shadow:inset 0 0 0 1px hsl(var(--shell-ok) / .35)}
@keyframes oshLivePulse{0%{box-shadow:0 0 0 0 hsl(var(--shell-ok) / .5)}70%,100%{box-shadow:0 0 0 7px hsl(var(--shell-ok) / 0)}}

/* nombre del módulo activo: mismo lenguaje que nombre·rol — «MÓDULO» en versalitas doradas con filete y el nombre en Playfair,
   separado por un hilo vertical dorado como el de la marca. */
.osh-cat{position:relative; display:flex; flex-direction:column; gap:5px; white-space:nowrap; padding-left:18px; margin-left:2px;
  font:700 16px/1 "Playfair Display",Georgia,serif; letter-spacing:.01em; color:hsl(0 0% 100% / .96)}
.osh-cat::before{content:"Módulo"; display:inline-flex; align-items:center; gap:6px; font:600 9.5px/1 "Inter",system-ui,sans-serif; letter-spacing:.16em; text-transform:uppercase; color:hsl(var(--shell-gold))}
.osh-cat::after{content:""; position:absolute; left:0; top:50%; height:26px; width:1px; transform:translateY(-50%);
  background:linear-gradient(180deg, transparent, hsl(var(--shell-gold) / .6), transparent)}

/* toggle de tema — el relleno muestra el color AL QUE cambia (claro ⇄ negro); aro dorado doble como el avatar */
.osh-toggle{
  width:30px; height:30px; border-radius:50%; flex:none; cursor:pointer; padding:0;
  border:2px solid hsl(var(--shell-gold) / .65);
  box-shadow:inset 0 0 0 3px hsl(var(--shell-bg)), 0 0 0 3px hsl(var(--shell-gold) / .08);
  transition:transform .18s cubic-bezier(.34,1.45,.64,1), border-color .15s, box-shadow .2s;
}
.osh-toggle:hover{transform:scale(1.1) rotate(25deg); border-color:hsl(var(--shell-gold)); box-shadow:inset 0 0 0 3px hsl(var(--shell-bg)), 0 0 0 3px hsl(var(--shell-gold) / .2), 0 0 14px -2px hsl(var(--shell-gold) / .6)}
.osh-toggle[data-to="black"]{ background:#0d0d0d }
.osh-toggle[data-to=""]     { background:#f4f6fb }

/* cerrar sesión: redondo como el toggle, ícono de apagado; se enciende en rojo al pasar */
.osh-out{
  background:hsl(0 0% 100% / .04); border:0; color:hsl(354 85% 76%); flex:none; padding:0;
  box-shadow:inset 0 0 0 1px hsl(354 70% 60% / .4);
  width:34px; height:34px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background-color .18s, color .18s, box-shadow .18s, transform .18s cubic-bezier(.34,1.45,.64,1);
}
.osh-out svg{display:block}
.osh-out:hover{background:hsl(354 66% 48%); color:#fff; transform:scale(1.08); box-shadow:inset 0 0 0 1px hsl(354 80% 70% / .6), 0 4px 16px -4px hsl(354 70% 45% / .8)}
.osh-out:active{transform:scale(.94)}

/* ---------------------------------------------------------------- riel de módulos */
.osh-rail{
  position:fixed; left:0; top:0; bottom:0; width:var(--rail-w); z-index:45;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:9px 0;
  background:hsl(var(--shell-bg));
  border-right:1px solid hsl(var(--shell-bd));
}
.osh-rail-i{
  width:38px; height:38px; border-radius:11px; flex:none;
  display:flex; align-items:center; justify-content:center;
  line-height:1; text-decoration:none; color:hsl(var(--shell-fg));
  opacity:.55; transition:background-color .18s, opacity .18s, color .18s, transform .12s;
}
.osh-rail-i:hover{opacity:1; background:hsl(0 0% 100% / .08)}
.osh-rail-i:active{transform:scale(.93)}
.osh-rail-i svg{display:block}
.osh-rail-i.on{opacity:1; color:hsl(var(--shell-gold)); background:hsl(var(--shell-gold) / .14)}
@media(min-width:721px){
  .osh-rail{background:linear-gradient(180deg, hsl(var(--shell-bg-hi, var(--shell-bg))), hsl(var(--shell-bg)) 40%)}
  .osh-rail-i{position:relative}
  /* módulo activo: barra dorada pegada al borde del riel que crece al activarse */
  .osh-rail-i::before{content:""; position:absolute; left:-7px; top:9px; bottom:9px; width:3px; border-radius:0 3px 3px 0;
    background:hsl(var(--shell-gold)); transform:scaleY(0); transition:transform .28s cubic-bezier(.16,1,.3,1)}
  .osh-rail-i.on::before{transform:scaleY(1)}
  /* nombre del módulo flotando a la derecha al pasar el mouse o con el foco del teclado (antes: title nativo, tardío y gris) */
  .osh-rail-i::after{content:attr(aria-label); position:absolute; left:calc(100% + 12px); top:50%; z-index:60;
    transform:translate(-4px,-50%); opacity:0; pointer-events:none; white-space:nowrap;
    padding:7px 11px; border-radius:9px; font:600 12.5px/1 "Inter",system-ui,sans-serif; letter-spacing:.005em;
    color:hsl(var(--shell-fg)); background:hsl(var(--shell-bg-hi, var(--shell-bg)));
    box-shadow:inset 0 0 0 1px hsl(0 0% 100% / .09), 0 8px 24px -6px hsl(229 48% 6% / .6);
    transition:opacity .14s ease, transform .18s cubic-bezier(.16,1,.3,1)}
  .osh-rail-i:hover::after,.osh-rail-i:focus-visible::after{opacity:1; transform:translate(0,-50%); transition-delay:.12s}
}

/* ---------------------------------------------------------------- login único (rediseño 2026-10-06)
   Siempre CLARO, no cambia con el tema del ERP (decisión del usuario). Escena de marca a la
   izquierda (lentes vectoriales + wordmark + fondo con lentes flotantes y parallax) y tarjeta
   de acceso a la derecha. Sólo transform/opacity animados (barato en equipos de sucursal).
   Variables --lg-* scopeadas acá. Paleta del sitio: navy #1b2447, dorado #d0aa63. */
.osh-login{
  --lg-bg: 40 25% 97%;
  --lg-card: 0 0% 100%;
  --lg-ink: 222 47% 13%;
  --lg-ink-soft: 215 16% 44%;
  --lg-line: 38 18% 87%;
  --lg-navy: 228 45% 19%;
  --lg-gold: 39 54% 60%;
  --lg-gold-hi: 39 60% 70%;
  --lg-gold-lo: 36 55% 44%;
  --lg-red: 354 70% 45%;
  --mx: 0; --my: 0;
  color-scheme: light;
  font-family:"Inter",system-ui,sans-serif;
  position:fixed; inset:0; z-index:200; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  background:hsl(var(--lg-bg));
  padding:24px;
  transition:opacity .5s ease, transform .5s cubic-bezier(.16,1,.3,1);
}
.osh-login[hidden]{display:none !important}
.osh-login.saliendo{opacity:0; transform:scale(1.035); pointer-events:none}

/* ---- fondo: manchas de color a la deriva + rejilla de puntos + barrido de luz + lentes flotantes ---- */
.lg-bg{position:absolute; inset:0; pointer-events:none; overflow:hidden}
.lg-blob{position:absolute; border-radius:50%; will-change:transform}
.lg-blob.a{width:70vmax; height:70vmax; left:-22vmax; top:-30vmax;
  background:radial-gradient(closest-side, hsl(var(--lg-navy)/.16), transparent 70%); animation:lg-drift-a 26s ease-in-out infinite alternate}
.lg-blob.b{width:62vmax; height:62vmax; right:-24vmax; bottom:-30vmax;
  background:radial-gradient(closest-side, hsl(var(--lg-gold)/.30), transparent 70%); animation:lg-drift-b 30s ease-in-out infinite alternate}
.lg-blob.c{width:34vmax; height:34vmax; left:30%; top:48%;
  background:radial-gradient(closest-side, hsl(354 78% 62%/.10), hsl(212 85% 58%/.07) 55%, transparent 72%); animation:lg-drift-c 22s ease-in-out infinite alternate}
@keyframes lg-drift-a{to{transform:translate3d(9vmax,6vmax,0) scale(1.1)}}
@keyframes lg-drift-b{to{transform:translate3d(-8vmax,-7vmax,0) scale(1.12)}}
@keyframes lg-drift-c{to{transform:translate3d(-12vmax,-8vmax,0) scale(1.25)}}
.lg-dots{position:absolute; inset:0; opacity:.55;
  background-image:radial-gradient(hsl(var(--lg-navy)/.16) 1.2px, transparent 1.4px); background-size:26px 26px;
  -webkit-mask-image:radial-gradient(ellipse at 30% 45%, #000 0%, transparent 62%); mask-image:radial-gradient(ellipse at 30% 45%, #000 0%, transparent 62%);
  animation:lg-dots 40s linear infinite}
@keyframes lg-dots{to{background-position:26px 26px}}
.lg-sweep{position:absolute; top:-20%; bottom:-20%; width:26vmax; left:-40vmax; transform:skewX(-18deg);
  background:linear-gradient(90deg, transparent, hsl(var(--lg-gold-hi)/.22), hsl(0 0% 100%/.5), hsl(var(--lg-gold-hi)/.22), transparent);
  animation:lg-sweep 11s cubic-bezier(.45,0,.2,1) 1.2s infinite}
@keyframes lg-sweep{0%{transform:translateX(0) skewX(-18deg)} 40%,100%{transform:translateX(190vw) skewX(-18deg)}}
/* lentes que caen despacio (animación por defecto) + el mouse los empuja arriba/abajo y de lado, más cuanto más cerca (--d) */
.lg-float{position:absolute; left:var(--x); top:0; width:var(--s,100px); opacity:var(--o,.45);
  transform:translate3d(calc(var(--mx)*var(--d,40px)*.6), calc(var(--my)*var(--d,40px)*-1.6), 0);
  transition:transform .9s cubic-bezier(.16,1,.3,1)}
.lg-fall{animation:lg-fall var(--t,40s) linear var(--dl,0s) infinite; will-change:transform,opacity}
.lg-fall img{display:block; width:100%; height:auto; animation:lg-sway 6.5s ease-in-out infinite alternate; filter:drop-shadow(0 6px 6px hsl(var(--lg-navy)/.12))}
@keyframes lg-fall{0%{transform:translateY(-26vh); opacity:0} 8%{opacity:1} 92%{opacity:1} 100%{transform:translateY(122vh); opacity:0}}
@keyframes lg-sway{from{transform:translateX(-16px) rotate(var(--r0,-6deg))} to{transform:translateX(16px) rotate(var(--r1,7deg))}}

/* ---- escena ---- */
.lg-stage{position:relative; width:100%; max-width:1060px; display:grid; grid-template-columns:minmax(0,1fr) 380px; align-items:center; gap:72px}
.lg-hero{display:flex; flex-direction:column; align-items:center; text-align:center; gap:22px;
  animation:lg-in .9s cubic-bezier(.16,1,.3,1) .05s both}
.lg-glasses{width:min(100%,470px); height:auto; margin-bottom:16px;
  transform:perspective(900px) translate3d(calc(var(--mx)*22px),calc(var(--my)*14px),0) rotateY(calc(var(--mx)*18deg)) rotateX(calc(var(--my)*-12deg));
  transition:transform .45s cubic-bezier(.16,1,.3,1);
  filter:drop-shadow(0 24px 22px hsl(var(--lg-navy)/.25))}
.lg-glasses .lg-bobber{animation:lg-bob2 4.6s ease-in-out infinite alternate; transform-origin:50% 55%; position:relative}
@keyframes lg-bob2{0%{transform:translateY(-14px) rotate(-3deg)} 50%{transform:translateY(2px) rotate(.6deg)} 100%{transform:translateY(14px) rotate(3deg)}}
.lg-glasses img{display:block; width:100%; height:auto; user-select:none; -webkit-user-drag:none}
/* reflejos sobre los cristales: capa recortada con la silueta de los cristales (lentes-lente.png) y una franja de luz que la cruza */
.lg-reflejo{position:absolute; inset:0; pointer-events:none;
  -webkit-mask:url(/lentes-lente.png) center/100% 100% no-repeat; mask:url(/lentes-lente.png) center/100% 100% no-repeat;
  background:
    linear-gradient(105deg, transparent 40%, hsl(0 0% 100%/.62) 47%, hsl(0 0% 100%/.15) 53%, transparent 58%) 0 0/260% 100% no-repeat,
    linear-gradient(105deg, transparent 18%, hsl(0 0% 100%/.16) 24%, transparent 30%, transparent 62%, hsl(0 0% 100%/.1) 68%, transparent 74%);
  animation:lg-reflejo 4.2s cubic-bezier(.5,0,.2,1) 1.4s infinite}
@keyframes lg-reflejo{0%{background-position:130% 0,0 0} 45%,100%{background-position:-60% 0,0 0}}
.lg-mark{display:inline-flex; border:3px solid transparent; border-radius:2px;
  background:linear-gradient(#fff,#fff) padding-box, linear-gradient(110deg,hsl(var(--lg-gold-lo)),hsl(var(--lg-gold-hi)) 35%,hsl(var(--lg-gold-lo)) 60%,hsl(var(--lg-gold-hi))) border-box;
  background-size:100% 100%, 220% 100%; animation:lg-border 7s linear infinite;
  box-shadow:0 14px 30px -12px hsl(var(--lg-navy)/.35)}
@keyframes lg-border{to{background-position:0 0, -220% 0}}
.lg-mark span{font:700 clamp(26px,3.6vw,40px)/1 "Playfair Display",Georgia,serif; padding:.28em .5em .3em; letter-spacing:.02em}
.lg-mark .a{color:#14161f; background:#fff}
.lg-mark .b{background:hsl(var(--lg-navy)); color:transparent}
.lg-mark .b em{font-style:normal; background:linear-gradient(100deg,hsl(var(--lg-gold-lo)) 10%,hsl(var(--lg-gold-hi)) 40%,#fff 50%,hsl(var(--lg-gold-hi)) 60%,hsl(var(--lg-gold-lo)) 90%) 0 0/250% 100%;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; animation:lg-shine 5.5s ease-in-out 2s infinite}
@keyframes lg-shine{0%{background-position:120% 0} 55%,100%{background-position:-60% 0}}
.lg-slogan{margin:0; font:500 clamp(15px,1.7vw,19px)/1.3 "Inter",system-ui,sans-serif; color:hsl(var(--lg-navy)); letter-spacing:.01em}
.lg-slogan i{font-style:normal; background:linear-gradient(transparent 82%, hsl(var(--lg-gold)/.55) 82%); background-size:0 100%; background-repeat:no-repeat; animation:lg-underline 1.1s cubic-bezier(.16,1,.3,1) 1.1s forwards}
@keyframes lg-underline{to{background-size:100% 100%}}
@keyframes lg-in{from{opacity:0; transform:translateY(22px)} to{opacity:1; transform:none}}

/* ---- tarjeta de acceso ---- */
.osh-login-box{
  position:relative; width:100%; box-sizing:border-box;
  display:flex; flex-direction:column; gap:16px;
  background:hsl(var(--lg-card) / .82);
  -webkit-backdrop-filter:blur(14px) saturate(1.3); backdrop-filter:blur(14px) saturate(1.3);
  border:1px solid hsl(0 0% 100% / .9);
  border-radius:22px;
  padding:34px 32px 30px;
  box-shadow:0 1px 0 hsl(0 0% 100%) inset, 0 4px 12px hsl(var(--lg-navy)/.06), 0 34px 60px -20px hsl(var(--lg-navy)/.30);
  animation:lg-in .9s cubic-bezier(.16,1,.3,1) .25s both;
}
.osh-login-box::before{content:""; position:absolute; left:32px; right:32px; top:-1px; height:3px; border-radius:0 0 3px 3px;
  background:linear-gradient(90deg,transparent,hsl(var(--lg-gold)),transparent)}
.osh-login-box.sacude{animation:lg-shake .45s cubic-bezier(.36,.07,.19,.97)}
@keyframes lg-shake{15%,85%{transform:translateX(-3px)} 30%,70%{transform:translateX(6px)} 45%,55%{transform:translateX(-8px)}}
.osh-login-head{margin-bottom:8px}
.osh-login-head p{margin:0 0 4px; font-size:11px; color:hsl(var(--lg-ink-soft)); text-transform:uppercase; letter-spacing:.2em; font-weight:700}
.osh-login-head h2{margin:0; display:flex; align-items:center; gap:10px; font:800 38px/1 "KoHo",sans-serif; letter-spacing:-.01em; color:hsl(var(--lg-navy))}
.osh-login-head .erp{position:relative; overflow:hidden; font:800 15px/1 "Inter",system-ui,sans-serif; letter-spacing:.14em; padding:7px 10px 7px 12px; border-radius:8px; color:hsl(var(--lg-navy));
  background:linear-gradient(180deg,hsl(var(--lg-gold-hi)),hsl(var(--lg-gold))); box-shadow:0 6px 14px hsl(var(--lg-gold)/.4), 0 1px 0 hsl(0 0% 100%/.6) inset}
.osh-login-head .erp::after{content:""; position:absolute; top:0; bottom:0; width:45%; left:-70%; transform:skewX(-20deg);
  background:linear-gradient(90deg,transparent,hsl(0 0% 100%/.75),transparent); animation:lg-btn 5s ease-in-out 1.6s infinite}
.osh-login-box > *:not(.osh-login-head){animation:lg-field .6s cubic-bezier(.16,1,.3,1) backwards}
.osh-login-box > label{position:relative}
.osh-login-box > label:focus-within{z-index:10}
.osh-login-box > :nth-child(2){animation-delay:.45s}
.osh-login-box > :nth-child(3){animation-delay:.52s}
.osh-login-box > :nth-child(4){animation-delay:.59s}
.osh-login-box > :nth-child(5){animation-delay:.66s}
@keyframes lg-field{from{opacity:0; transform:translateY(12px)} to{opacity:1; transform:none}}
.osh-login-box label{display:flex; flex-direction:column; gap:6px; font-size:11.5px;
  color:hsl(var(--lg-ink-soft)); font-weight:700; text-transform:uppercase; letter-spacing:.05em; transition:color .2s}
.osh-login-box label:focus-within{color:hsl(var(--lg-navy))}
.osh-login-box input,.osh-login-box select{
  font:15px/1 "Inter",system-ui,sans-serif; padding:13px 14px; border-radius:11px;
  border:1.5px solid hsl(var(--lg-line));
  /* !important a propósito: cada módulo trae su `input{background:…}` genérico (con su tema oscuro);
     el login tiene que ganar siempre, sea cual sea el módulo que lo aloja. */
  background:hsl(0 0% 100%) !important; color:hsl(var(--lg-ink)) !important;
  transition:border-color .2s, box-shadow .2s, transform .2s;
}
.osh-login-box input:hover,.osh-login-box select:hover{border-color:hsl(var(--lg-navy)/.35)}
.osh-login-box input:focus,.osh-login-box select:focus{
  outline:none; border-color:hsl(var(--lg-gold)); box-shadow:0 0 0 4px hsl(var(--lg-gold)/.22)}
/* el autocompletar de Chrome/Brave pinta su propio fondo e ignora `background`: sólo pisa un box-shadow inset enorme. */
.osh-login-box input:-webkit-autofill,
.osh-login-box input:-webkit-autofill:hover,
.osh-login-box input:-webkit-autofill:focus{
  -webkit-text-fill-color:hsl(var(--lg-ink));
  -webkit-box-shadow:0 0 0 1000px hsl(0 0% 100%) inset;
  box-shadow:0 0 0 1000px hsl(0 0% 100%) inset;
  caret-color:hsl(var(--lg-ink));
  transition:background-color 999999s ease-in-out 0s;
}
.osh-login-box button[type=submit]{
  position:relative; overflow:hidden; margin-top:8px; padding:14px; border:0; border-radius:999px; cursor:pointer;
  background:linear-gradient(180deg,hsl(var(--lg-gold-hi)),hsl(var(--lg-gold))); color:hsl(var(--lg-navy)); font:800 14.5px/1 "Inter",system-ui,sans-serif;
  letter-spacing:.03em; box-shadow:0 8px 20px hsl(var(--lg-gold)/.42), 0 1px 0 hsl(0 0% 100%/.6) inset;
  transition:box-shadow .2s, transform .15s;
}
.osh-login-box button[type=submit]::after{content:""; position:absolute; top:0; bottom:0; width:40%; left:-60%; transform:skewX(-20deg);
  background:linear-gradient(90deg,transparent,hsl(0 0% 100%/.65),transparent); animation:lg-btn 4.5s ease-in-out 2.4s infinite}
@keyframes lg-btn{0%{left:-60%} 30%,100%{left:130%}}
.osh-login-box button[type=submit]:hover{box-shadow:0 12px 26px hsl(var(--lg-gold)/.55), 0 1px 0 hsl(0 0% 100%/.6) inset; transform:translateY(-2px)}
.osh-login-box button[type=submit]:active{transform:translateY(0) scale(.99)}
.osh-login-box button[type=submit]:disabled{cursor:default; box-shadow:none; transform:none; opacity:.8}
.osh-login-box button[type=submit]:disabled::after{animation:none}
.osh-login-box button[type=submit]:disabled{background:linear-gradient(90deg,hsl(var(--lg-gold)),hsl(var(--lg-gold-hi)),hsl(var(--lg-gold))); background-size:200% 100%; animation:lg-load 1s linear infinite}
@keyframes lg-load{to{background-position:-200% 0}}
.osh-login-err{color:hsl(var(--lg-red)); font-size:12.5px; margin:0; line-height:1.4; font-weight:600}
.osh-login-err[hidden]{display:none}

.osh-lg-cuentawrap{position:relative}
.osh-lg-cuentawrap input{width:100%; box-sizing:border-box}
.osh-login-box select{width:100%; box-sizing:border-box}
.osh-lg-results{
  position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:5;
  background:#fff; border:1px solid hsl(var(--lg-line)); border-radius:12px;
  max-height:220px; overflow-y:auto; box-shadow:0 14px 30px hsl(var(--lg-navy)/.16);
}
.osh-lg-results[hidden],.osh-lg-results.hidden{display:none}
.osh-lg-results button{
  display:block; width:100%; text-align:left; padding:10px 13px; border:0; background:transparent;
  color:hsl(var(--lg-ink)); font:14px/1.2 "Inter",system-ui,sans-serif; cursor:pointer;
}
.osh-lg-results button.act{background:hsl(var(--lg-gold)/.16)}
.osh-lg-results button:hover{background:hsl(var(--lg-gold)/.16)}
.osh-lg-results button + button{border-top:1px solid hsl(var(--lg-line))}
.osh-lg-empty{padding:10px 13px; font-size:12.5px; color:hsl(var(--lg-ink-soft))}

/* clave del login: div contenteditable enmascarado (no es <input>, los gestores de contraseñas no la ven) */
.osh-login-box .osh-clave{
  font:15px/1.2 "Inter",system-ui,sans-serif; padding:13px 14px; border-radius:11px; min-height:19px;
  border:1.5px solid hsl(var(--lg-line)); background:hsl(0 0% 100%); color:hsl(var(--lg-ink));
  -webkit-text-security:disc; text-security:disc; white-space:nowrap; overflow:hidden;
  transition:border-color .2s, box-shadow .2s; cursor:text;
}
.osh-login-box .osh-clave:hover{border-color:hsl(var(--lg-navy)/.35)}
.osh-login-box .osh-clave:focus{outline:none; border-color:hsl(var(--lg-gold)); box-shadow:0 0 0 4px hsl(var(--lg-gold)/.22)}

/* ---- "Descargar Aplicación": flecha sutil arriba a la derecha que despliega el botón ----
   En reposo sólo respira y brilla despacio (no compite con el login); al pasar el mouse se anima
   más. El panel entra con rebote; el botón usa el dorado del login. Paleta --lg-* del propio gate. */
.lg-install{position:absolute; top:20px; right:24px; z-index:30}
.lg-install-arrow{
  position:relative; width:44px; height:44px; padding:0; border:0; cursor:pointer; border-radius:50%;
  display:grid; place-items:center; color:hsl(var(--lg-navy));
  background:hsl(0 0% 100% / .7);
  -webkit-backdrop-filter:blur(10px) saturate(1.3); backdrop-filter:blur(10px) saturate(1.3);
  box-shadow:0 2px 8px hsl(var(--lg-navy)/.14), 0 0 0 1px hsl(var(--lg-navy)/.08) inset;
  animation:lg-install-bob 2.8s ease-in-out infinite;
  transition:transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, background .25s;
}
.lg-install-arrow svg{transition:transform .35s cubic-bezier(.16,1,.3,1)}
.lg-install-arrow::before{content:""; position:absolute; inset:0; border-radius:50%; pointer-events:none;
  box-shadow:0 0 0 0 hsl(var(--lg-gold)/.55); animation:lg-install-halo 2.8s ease-out infinite}
.lg-install-arrow:hover{background:hsl(0 0% 100% / .95); box-shadow:0 8px 20px hsl(var(--lg-navy)/.2), 0 0 0 1px hsl(var(--lg-gold)/.5) inset}
.lg-install-arrow:focus-visible{outline:none; box-shadow:0 0 0 4px hsl(var(--lg-gold)/.4)}
.lg-install.abierto .lg-install-arrow{animation:none; transform:none}
.lg-install.abierto .lg-install-arrow svg{transform:rotate(180deg)}
.lg-install.abierto .lg-install-arrow::before{animation:none; box-shadow:none}
@keyframes lg-install-bob{0%,100%{transform:translateY(0)} 50%{transform:translateY(5px)}}
@keyframes lg-install-halo{0%{box-shadow:0 0 0 0 hsl(var(--lg-gold)/.5)} 70%,100%{box-shadow:0 0 0 13px hsl(var(--lg-gold)/0)}}

.lg-install-panel{
  position:absolute; top:calc(100% + 12px); right:0; width:min(320px,84vw);
  display:flex; flex-direction:column; gap:12px;
  transform-origin:top right; opacity:0; transform:translateY(-10px) scale(.9); pointer-events:none;
  transition:opacity .22s ease, transform .34s cubic-bezier(.18,1.3,.4,1);
}
.lg-install.abierto .lg-install-panel{opacity:1; transform:none; pointer-events:auto}

.lg-install-go{
  position:relative; overflow:hidden; display:flex; align-items:center; gap:12px; text-align:left;
  padding:14px 16px; border:0; border-radius:16px; cursor:pointer; color:hsl(var(--lg-navy));
  background:linear-gradient(180deg,hsl(var(--lg-gold-hi)),hsl(var(--lg-gold)));
  box-shadow:0 10px 26px hsl(var(--lg-gold)/.45), 0 1px 0 hsl(0 0% 100%/.6) inset;
  transition:transform .16s cubic-bezier(.16,1,.3,1), box-shadow .2s;
}
.lg-install.abierto .lg-install-go{animation:lg-install-pop .5s cubic-bezier(.18,1.3,.4,1) both}
.lg-install-go:hover{transform:translateY(-2px); box-shadow:0 16px 32px hsl(var(--lg-gold)/.55), 0 1px 0 hsl(0 0% 100%/.6) inset}
.lg-install-go:active{transform:translateY(0) scale(.985)}
.lg-install-go::after{content:""; position:absolute; top:0; bottom:0; width:38%; left:-60%; transform:skewX(-20deg);
  background:linear-gradient(90deg,transparent,hsl(0 0% 100%/.7),transparent); animation:lg-btn 4s ease-in-out 1s infinite}
.lg-install-ico{flex:none; display:grid; place-items:center; width:34px; height:34px; border-radius:10px;
  background:hsl(0 0% 100%/.55); box-shadow:0 1px 0 hsl(0 0% 100%/.7) inset}
.lg-install-txt{display:flex; flex-direction:column; gap:2px; min-width:0}
.lg-install-txt b{font:800 14.5px/1.1 "Inter",system-ui,sans-serif; letter-spacing:.01em}
.lg-install-txt small{font:500 11.5px/1.2 "Inter",system-ui,sans-serif; color:hsl(var(--lg-navy)/.72)}
@keyframes lg-install-pop{0%{opacity:0; transform:translateY(10px) scale(.94)} 60%{opacity:1} 100%{opacity:1; transform:none}}

.lg-install-help{
  padding:14px 16px; border-radius:16px; text-align:left;
  background:hsl(0 0% 100% / .94);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  box-shadow:0 12px 30px hsl(var(--lg-navy)/.16), 0 0 0 1px hsl(var(--lg-line)) inset;
  animation:lg-install-pop .4s cubic-bezier(.18,1.3,.4,1) both;
}
.lg-install-help[hidden]{display:none}
.lg-install-h{margin:0 0 8px; font:800 12.5px/1.3 "Inter",system-ui,sans-serif; color:hsl(var(--lg-navy))}
.lg-install-pasos{margin:0; padding-left:18px; display:flex; flex-direction:column; gap:6px;
  font:500 12.5px/1.35 "Inter",system-ui,sans-serif; color:hsl(var(--lg-ink))}
.lg-install-pasos b{font-weight:800}
.lg-install-note{margin:10px 0 0; font:500 11px/1.35 "Inter",system-ui,sans-serif; color:hsl(var(--lg-ink-soft))}

@media(max-width:900px){
  .osh-login{scrollbar-width:none; align-items:flex-start; overflow-y:auto; padding:18px 16px}
  .lg-install{top:12px; right:12px}
  .lg-install-arrow{width:40px; height:40px}
  .lg-stage{grid-template-columns:minmax(0,1fr); max-width:400px; gap:22px; margin:50px auto 0}   /* el margen de arriba deja aire para la flecha */
  .lg-float{width:calc(var(--s)*.7)}
  .osh-login-box{padding:26px 22px 24px}
  .lg-hero{gap:14px}
  .lg-glasses{width:150px}
  .lg-mark span{font-size:20px}
  .lg-slogan{display:none}
}
@media(max-height:620px) and (min-width:901px){.lg-glasses{width:300px}}
@media(prefers-reduced-motion:reduce){
  .osh-login *,.osh-login *::before,.osh-login *::after{animation:none !important; transition:none !important}
  .osh-login-box > *,.lg-hero,.osh-login-box{opacity:1 !important}
  .lg-float{display:none}
}

/* ---------------------------------------------------------------- responsive */
@media(max-width:720px){
  body{ padding-left:0; padding-bottom:52px; }
  #optica-shell{gap:10px; padding:0 10px; flex-wrap:wrap; height:auto; min-height:var(--shell-h); padding-top:6px; padding-bottom:6px}
  .osh-brand span{display:none}
  .osh-brand{padding-right:0} .osh-brand::after{display:none} .osh-brand .osh-mark{width:32px}
  .osh-cat{display:none}
  .osh-rail{
    top:auto; left:0; right:0; bottom:0; width:auto; height:50px;
    flex-direction:row; justify-content:flex-start; gap:8px; padding:6px 10px;
    border-right:0; border-top:1px solid hsl(var(--shell-bd));
    /* con 9-10 módulos no entran en el ancho de un celular: el riel se desliza de lado.
       Los márgenes auto de primero/último los centran cuando SÍ caben (justify-content:center
       a secas recortaba los de la izquierda sin poder llegar a ellos). */
    overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch; scrollbar-width:none;
  }
  .osh-rail::-webkit-scrollbar{display:none}
  .osh-rail > .osh-rail-i:first-child{margin-left:auto}
  .osh-rail > .osh-rail-i:last-child{margin-right:auto}
  .osh-rail-i.on{box-shadow:inset 0 -3px 0 hsl(var(--shell-gold))}
}

/* ---------------------------------------------------------------- shell raíz (página "/")
   Layout flex en vez de restar una constante fija (--shell-h) al 100vh: la barra
   (#optica-shell) puede crecer a 2 líneas en celular cuando un módulo agrega botones a su
   slot — con un cálculo fijo eso cortaba el iframe por abajo. Con flex, el iframe ocupa
   automáticamente lo que sobra debajo de la barra, sea cual sea su alto real. Ver
   docs/superpowers/specs/2026-09-17-mobile-responsive-design.md §3.2. */
html,body{height:100vh;height:100dvh;margin:0}
body{display:flex;flex-direction:column}
#optica-shell{flex:none}
.osh-frame{
  display:block; border:0; width:100%;
  flex:1; min-height:0;
  background:hsl(var(--bg, 40 23% 97%));
  transition:opacity .26s cubic-bezier(.16,1,.3,1);
}
/* shell-root.js la pone al cambiar de módulo y la saca en el `load` del iframe */
.osh-frame.osh-cambiando{opacity:.35; transition-duration:.12s}
@media(prefers-reduced-motion:reduce){ .osh-frame{transition:none} }


/* ---------------------------------------------------------------- celular: barra superior de UNA línea (+ acciones del módulo en otra) y riel inferior con nombres */
.osh-rail-l{display:none}
@media(max-width:720px){
  /* barra de dos pisos: arriba lentes · placa de sucursal (ocupa todo lo que sobra) · tareas; abajo la tira de acciones del módulo */
  #optica-shell{gap:10px; padding:0 12px; padding-top:calc(env(safe-area-inset-top) + 8px); padding-bottom:0; min-height:56px; align-content:flex-start;
    background:radial-gradient(120% 90% at 50% -30%, hsl(var(--shell-gold) / .13), transparent 60%), linear-gradient(180deg, hsl(var(--shell-bg-hi, var(--shell-bg))), hsl(var(--shell-bg)))}
  .osh-who-rol{display:none}
  .osh-brand .osh-mark{width:40px}
  .osh-brand::before{left:-10px; width:64px; height:46px}
  .osh-spacer{display:none}
  .osh-suc{flex:1 1 0; min-width:0; margin-left:0; max-width:none; padding:2px}
  .osh-suc-in{width:100%; gap:10px; padding:4px 16px 4px 4px}
  .osh-suc-pin{width:30px; height:30px}
  .osh-suc-n{font-size:16px}
  .osh-who{display:none}   /* el nombre de la persona se ve en «Más»; en celular la sucursal manda */
  .osh-slot{order:10; flex:1 1 100%; overflow-x:auto; scrollbar-width:none; padding:10px 0 11px; gap:8px; position:relative;
    -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 22px), transparent 100%); mask-image:linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 22px), transparent 100%)}
  .osh-slot::-webkit-scrollbar{display:none}
  .osh-slot:empty{display:none}
  .osh-slot > *{flex:none}
  .osh-slot > :first-child{margin-left:6px}
  .osh-slot > :last-child{margin-right:14px}
  /* módulo sin botones (Clientes, Boletas…): el slot sólo trae «en vivo», que no merece un piso entero → se queda en el piso de arriba, entre la placa y Tareas */
  .osh-slot:not(:has(.osh-act)){order:0; flex:0 0 auto; padding:0; overflow:visible; -webkit-mask-image:none; mask-image:none}
  .osh-slot:not(:has(.osh-act)) > *{margin:0 !important}
  .osh-act{height:40px; padding:0 18px}
  .osh-live{height:32px}
  .osh-toggle,.osh-out{display:none}   /* en celular el tema y cerrar sesión viven en la hoja "Más" (la barra quedaba apretada) */
  .osh-rail{height:calc(56px + env(safe-area-inset-bottom)); padding:4px 6px env(safe-area-inset-bottom); gap:0; justify-content:space-around; overflow:visible}
  .osh-rail > .osh-rail-i:first-child{margin-left:0}
  .osh-rail > .osh-rail-i:last-child{margin-right:0}
  .osh-rail-i{flex:1 1 0; width:auto; height:100%; min-width:0; flex-direction:column; gap:3px; border-radius:12px; background:none; border:0; color:hsl(var(--shell-fg)); font:inherit; cursor:pointer}
  .osh-rail-i svg{width:22px; height:22px}
  .osh-rail-l{display:block; font:600 10.5px/1 "Inter",system-ui,sans-serif; letter-spacing:.01em; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
  .osh-rail-i.on{box-shadow:none; background:hsl(var(--shell-gold) / .16); color:hsl(var(--shell-gold))}
  .osh-rail-i.on::after{content:""; position:absolute; top:0; width:26px; height:3px; border-radius:0 0 3px 3px; background:hsl(var(--shell-gold))}
  .osh-rail-i{position:relative}
  /* hoja "Más": todos los módulos, en cuadrícula grande */
  .osh-mas-sheet{position:fixed; inset:0; z-index:44; background:hsl(0 0% 0% / .45); display:flex; align-items:flex-end}
  .osh-mas-sheet[hidden]{display:none}
  .osh-mas-grid{width:100%; display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:14px 12px calc(66px + env(safe-area-inset-bottom));
    background:hsl(var(--shell-bg)); border-top:1px solid hsl(var(--shell-bd)); border-radius:18px 18px 0 0; animation:oshHoja .22s ease-out}
  .osh-mas-i{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; min-height:78px; border-radius:14px; text-decoration:none; color:hsl(var(--shell-fg));
    background:hsl(0 0% 100% / .06); opacity:.9}
  .osh-mas-i.on{background:hsl(var(--shell-gold) / .18); color:hsl(var(--shell-gold)); opacity:1}
  .osh-mas-acc{grid-column:span 3; display:flex; align-items:center; justify-content:center; gap:10px; min-height:50px; border:0; border-radius:14px; cursor:pointer; font:600 14px/1 "Inter",sans-serif; color:hsl(var(--shell-fg)); background:hsl(0 0% 100% / .06)}
  .osh-mas-acc.salir{color:hsl(354 80% 72%); background:hsl(354 62% 50% / .16)}
  .osh-mas-dot{width:18px; height:18px; border-radius:50%; background:linear-gradient(90deg,#0d0d0d 50%,#f4f6fb 50%); border:2px solid hsl(0 0% 100% / .35)}
  .osh-mas-i svg{width:24px; height:24px}
  .osh-mas-i .osh-rail-l{display:block; font-size:12px}
  @keyframes oshHoja{from{transform:translateY(30px); opacity:.5} to{transform:none; opacity:1}}
}
@media(min-width:721px){ .osh-mas-sheet{display:none!important} }

/* ✕ de cerrar/quitar: trazo de línea (SVG) en vez del glifo de texto, a la medida de la letra del botón */
.xi{width:1em;height:1em;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.14em}
