@layer legado {
/* Vidrio 2 · Chasis como la maqueta aprobada: lateral por puesto y barra superior con búsqueda ⌘K (26-oct-2026). */

/* Lateral: logo, puesto, Mi trabajo, áreas plegadas con su número, sincronización abajo */
html .app-shell .command-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--ty-e-2);
  padding: var(--ty-e-4) var(--ty-e-3);
  overflow: hidden;
}
html .app-shell .command-sidebar .sidebar-head {
  flex: 0 0 auto;
  padding: 0 var(--ty-e-2);
}
html .app-shell .command-sidebar .sidebar-head img {
  width: 34px;
  height: 34px;
  border-radius: var(--ty-r-2);
}
html .app-shell .puesto-card {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  margin: var(--ty-e-2) var(--ty-e-2) 0;
  padding: var(--ty-e-3) 0;
  border-top: 1px solid var(--ty-vidrio-ahumado-borde);
  border-bottom: 1px solid var(--ty-vidrio-ahumado-borde);
}
html .app-shell .puesto-eyebrow,
html .app-shell .nav-work-title {
  color: var(--ty-sobre-grafito-suave);
  font-size: var(--ty-t-micro);
  font-weight: var(--ty-peso-fuerte);
}
html .app-shell .command-sidebar .puesto-card > strong,
html .app-shell .command-sidebar .puesto-card select#selector-puesto {
  color: var(--ty-sobre-grafito);
  font-size: var(--ty-t-base);
  font-weight: var(--ty-peso-maximo);
}
html .app-shell .command-sidebar .puesto-card select#selector-puesto {
  appearance: none;
  width: 100%;
  min-width: 0;
  padding: 2px var(--ty-e-5) 2px 0;
  border: 0;
  border-radius: var(--ty-r-1);
  background-color: transparent;
  background-image: linear-gradient(45deg, transparent 50%, var(--ty-sobre-grafito-suave) 50%), linear-gradient(135deg, var(--ty-sobre-grafito-suave) 50%, transparent 50%);
  background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-family: var(--ty-fuente);
  cursor: pointer;
  -webkit-text-fill-color: currentColor;
}
html .app-shell .puesto-card select option { color: var(--ty-tinta); background-color: var(--ty-panel); }
html .app-shell .command-sidebar .command-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  padding-bottom: var(--ty-e-2);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: var(--ty-e-2);
}
/* Ninguna área se encoge para caber: el menú entero hace scroll (si no, el último rótulo salía cortado). */
html .app-shell .command-sidebar .command-nav > * { flex-shrink: 0; }
html .app-shell .nav-work-title { padding: var(--ty-e-3) var(--ty-e-2) var(--ty-e-1); }
html .app-shell .nav-areas-title { display: none; }
html .app-shell .command-sidebar .nav-work-item { min-height: 36px; }
/* Vidrio 3: cada entrada en UNA línea (icono · rótulo con elipsis · contador a la derecha); el rótulo
   completo va en el atributo title. Antes «Alertas y pendientes» o «Partes de trabajo» se partían en dos. */
html .app-shell .command-sidebar .command-nav .nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ty-e-2);
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: var(--ty-e-1) var(--ty-e-2);
  text-align: left;
}
html .app-shell .command-sidebar .command-nav .nav-item > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 0;
}
html .app-shell .command-sidebar .command-nav .nav-item > span,
html .app-shell .command-sidebar .nav-section-title.nav-section-link > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html .app-shell .command-sidebar .command-nav .nav-item > .nav-badge {
  justify-self: end;
  min-width: 24px;
  margin: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html .app-shell .command-sidebar .nav-section-items { display: grid; gap: 2px; padding-left: var(--ty-e-2); }
/* Entradas de un área desplegada: mismo contraste que «Mi trabajo» (sobre-grafito-suave sobre grafito, > 5,5:1)
   y la activa igual que allí. Sin la animación heredada de despliegue (erpy-nav-unfold): partía de opacidad 0 y,
   con cada repintado del lateral, las entradas se veían desvaídas sobre el grafito. */
html .app-shell.ops-shell .command-sidebar .nav-group .nav-section-items { animation: none; opacity: 1; }
html .app-shell.ops-shell .command-sidebar .nav-section-items .nav-item {
  background-color: transparent;
  color: var(--ty-sobre-grafito-suave);
  font-weight: var(--ty-peso-medio);
}
html .app-shell.ops-shell .command-sidebar .nav-section-items .nav-item :is(i, svg) { color: var(--ty-sobre-grafito-suave); background-color: transparent; }
html .app-shell.ops-shell .command-sidebar .nav-section-items .nav-item:hover {
  background-color: var(--ty-vidrio-ahumado-activo);
  color: var(--ty-sobre-grafito);
}
html .app-shell.ops-shell .command-sidebar .nav-section-items .nav-item:is(.active, [aria-current="page"]) {
  background-color: var(--ty-vidrio-ahumado-activo);
  box-shadow: inset 3px 0 0 var(--ty-acento-area-claro);
  color: var(--ty-sobre-grafito);
  font-weight: var(--ty-peso-fuerte);
}
html .app-shell.ops-shell .command-sidebar .nav-section-items .nav-item:is(.active, [aria-current="page"]) :is(i, svg) { color: var(--ty-acento-area-claro); }
html .app-shell .command-sidebar .command-nav .nav-section { width: 100%; }
html .app-shell .command-sidebar .nav-section:first-of-type { margin-top: var(--ty-e-3); }
html .app-shell .command-sidebar .nav-section .nav-section-title.nav-section-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: var(--ty-e-2);
  width: 100%;
  min-height: 32px;
  padding: var(--ty-e-1) var(--ty-e-2);
  text-align: left;
  font-size: var(--ty-t-micro);
  font-weight: var(--ty-peso-fuerte);
}
html .app-shell .nav-section-count {
  color: var(--ty-sobre-grafito-suave);
  font-size: var(--ty-t-micro);
  font-variant-numeric: tabular-nums;
}
html .app-shell.ops-shell .command-sidebar .nav-group .nav-section-link.nav-section-title > b,
html .app-shell.ops-shell .command-sidebar .nav-group.expanded .nav-section-link.nav-section-title > b,
html .app-shell .command-sidebar .nav-section-title b {
  animation: none;
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--ty-sobre-grafito-suave);
  font-weight: var(--ty-peso-normal);
}
html .app-shell .command-sidebar .sidebar-foot {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ty-e-1) var(--ty-e-2);
}
html .app-shell .command-sidebar .sidebar-foot .sync-chip-action.sync-chip-action {
  color: var(--ty-sobre-grafito);
  box-shadow: none;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--ty-e-2);
  padding: var(--ty-e-3);
  border-radius: var(--ty-r-2);
  background-color: var(--ty-vidrio-ahumado-activo);
  border: 0;
}
html .app-shell .command-sidebar .sidebar-foot .nav-collapse-toggle,
html .app-shell .command-sidebar .sidebar-foot .sidebar-tarjeta,
html .app-shell .command-sidebar .sidebar-foot .sidebar-logout {
  min-height: 28px;
  padding: 2px var(--ty-e-2);
  border: 0;
  background-color: transparent;
  box-shadow: none;
  font-size: var(--ty-t-micro);
  font-weight: var(--ty-peso-medio);
}
html .app-shell .command-sidebar .sidebar-foot .nav-collapse-toggle { grid-column: 1 / -1; justify-self: start; }
html .app-shell .command-sidebar .sidebar-foot .sidebar-tarjeta { display: inline-flex; align-items: center; gap: var(--ty-e-2); justify-content: flex-start; }
html .app-shell .command-sidebar .sidebar-foot .sidebar-tarjeta .avatar { width: 22px; height: 22px; font-size: var(--ty-t-micro); }

/* Barra superior: una sola fila; la búsqueda manda a la izquierda, lo demás a la derecha */
html .app-shell .command-topbar {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: var(--ty-e-2) var(--ty-e-4);
}
html .app-shell .command-topbar .topbar-main { display: none; }
html .app-shell .command-topbar .topbar-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--ty-e-2);
  min-width: 0;
}
html .app-shell .shell-search {
  display: flex;
  align-items: center;
  gap: var(--ty-e-3);
  flex: 0 1 520px;
  min-width: 200px;
  min-height: 42px;
  margin-right: auto;
  padding: 0 var(--ty-e-3);
  border: 1px solid var(--ty-vidrio-borde);
  border-radius: var(--ty-r-2);
  background-color: var(--ty-vidrio);
  color: var(--ty-tinta-suave);
  font-family: var(--ty-fuente);
  font-size: var(--ty-t-base);
  text-align: left;
  cursor: text;
}
html .app-shell .shell-search span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html .app-shell .shell-search kbd {
  padding: 1px var(--ty-e-1);
  border: 1px solid var(--ty-raya);
  border-radius: var(--ty-r-1);
  background-color: var(--ty-panel);
  color: var(--ty-tinta-suave);
  font-family: var(--ty-fuente);
  font-size: var(--ty-t-micro);
}
html .app-shell :is(.shell-search, .shell-bell, .shell-context summary) svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html .app-shell .shell-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ty-e-1);
  flex: 0 0 auto;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--ty-e-2);
  border: 1px solid var(--ty-raya);
  border-radius: var(--ty-r-2);
  background-color: var(--ty-panel);
  color: var(--ty-tinta-media);
  cursor: pointer;
}
/* El contador va DENTRO del botón (campana · 11): colgado de la esquina se salía de su caja y, con tres cifras,
   tapaba el avatar a 1280. */
html .app-shell .shell-bell .nav-badge {
  position: static;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--ty-e-1);
  border-radius: var(--ty-r-pastilla);
  background-color: var(--ty-peligro-tinta);
  color: var(--ty-sobre-marca);
  font-size: var(--ty-t-micro);
  font-weight: var(--ty-peso-maximo);
  font-variant-numeric: tabular-nums;
  line-height: 20px;
  text-align: center;
}
html .app-shell .shell-context { position: relative; }
html .app-shell .shell-context summary {
  display: inline-flex;
  align-items: center;
  gap: var(--ty-e-2);
  min-height: 40px;
  padding: 0 var(--ty-e-3);
  border: 1px solid var(--ty-raya);
  border-radius: var(--ty-r-2);
  background-color: var(--ty-panel);
  color: var(--ty-tinta-media);
  font-size: var(--ty-t-menor);
  font-weight: var(--ty-peso-fuerte);
  list-style: none;
  cursor: pointer;
}
html .app-shell .shell-context summary::-webkit-details-marker { display: none; }
html .app-shell .shell-context-menu {
  position: absolute;
  top: calc(100% + var(--ty-e-2));
  right: 0;
  z-index: var(--ty-z-flotante);
  display: grid;
  gap: var(--ty-e-1);
  min-width: 220px;
  padding: var(--ty-e-3);
  border: 1px solid var(--ty-raya);
  border-radius: var(--ty-r-3);
  background-color: var(--ty-panel);
  box-shadow: var(--ty-s-3);
}
html .app-shell .shell-context-menu button {
  padding: var(--ty-e-2);
  border: 0;
  border-radius: var(--ty-r-1);
  background-color: transparent;
  color: var(--ty-tinta);
  text-align: left;
  cursor: pointer;
}
html .app-shell .shell-context-menu button.active { background-color: var(--ty-panel-hondo); font-weight: var(--ty-peso-maximo); }
html .app-shell .shell-context-divider,
html .app-shell .shell-context-menu strong { color: var(--ty-tinta-suave); font-size: var(--ty-t-micro); }
html .app-shell .command-topbar .topbar-context-action { display: inline-flex; flex: 0 1 auto; min-width: 0; max-width: 220px; }
html .app-shell .command-topbar .topbar-context-action .btn {
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Lo de la derecha nunca se encoge ni se monta: la que cede es la búsqueda (flex 0 1, min 200px). */
html .app-shell .command-topbar :is(.shell-context, .shell-install, .topbar-notifications, .shell-bell, .topbar-user-button) { flex: 0 0 auto; }
html .app-shell .command-topbar .topbar-user-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  border: 0;
  background-color: transparent;
  padding: 0;
  overflow: visible;
}
html .app-shell .command-topbar .topbar-user-button .avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--ty-r-pastilla);
}

/* El asistente (botón flotante de chat, agente.css) en escritorio baja a la esquina y el contenido deja
   aire debajo para que el final de cada pantalla nunca quede tapado. */
@media (min-width: 1025px) {
  html .ty-agente-fab { bottom: max(var(--ty-e-4), env(safe-area-inset-bottom, 0px)); }
  html .app-shell .content { padding-bottom: 96px; }
}

/* Acción fija del móvil y menú «Más»: solo en el móvil, encima de la barra de pestañas */
html .app-shell :is(.mobile-fixed-action, .menu-mas) { display: none; }

@media (max-width: 1024px) {
  html .app-shell .command-sidebar { display: none; }
  html .app-shell .command-topbar { min-height: 56px; padding: var(--ty-e-2) var(--ty-e-3); }
  html .app-shell .command-topbar .topbar-main {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--ty-tinta);
    font-size: var(--ty-t-titulo);
    font-weight: 800;
    font-stretch: 110%;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html .app-shell .command-topbar .topbar-actions { flex: 0 0 auto; width: auto; min-width: 0; margin-left: auto; }
  html .app-shell .command-topbar .topbar-actions .shell-bell { flex: 0 0 40px; width: 40px; min-width: 40px; }
  html .app-shell .shell-search { flex: 0 0 40px; min-width: 40px; width: 40px; padding: 0; justify-content: center; margin-right: 0; }
  html .app-shell .shell-search :is(span, kbd) { display: none; }
  html .app-shell .command-topbar :is(.shell-context, .topbar-user-button, .shell-install, .topbar-context-action, .sync-chip-action) { display: none; }
  html .app-shell .mobile-fixed-action {
    position: fixed;
    left: var(--ty-e-3);
    right: var(--ty-e-3);
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    z-index: var(--ty-z-lateral);
    transition: left var(--ty-v-media) var(--ty-curva), width var(--ty-v-media) var(--ty-curva), border-radius var(--ty-v-media) var(--ty-curva);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ty-e-2);
    min-height: 52px;
    border: 0;
    border-radius: var(--ty-r-3);
    background-color: var(--ty-marca-accion);
    color: var(--ty-sobre-marca);
    font-size: var(--ty-t-medio);
    font-weight: var(--ty-peso-maximo);
    box-shadow: var(--ty-s-3);
  }
  html .app-shell .mobile-fixed-action svg { width: 20px; height: 20px; flex: 0 0 auto; }
  html .app-shell .mobile-fixed-action span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Al bajar, la acción fija se pliega a un botón redondo a la derecha: no tapa lo que se lee y sigue a mano. */
  html[data-accion-plegada] .app-shell .mobile-fixed-action {
    left: auto;
    width: 52px;
    padding: 0;
    border-radius: var(--ty-r-pastilla);
  }
  html[data-accion-plegada] .app-shell .mobile-fixed-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  @media (prefers-reduced-motion: reduce) { html .app-shell .mobile-fixed-action { transition: none; } }

  /* «Más»: hoja inferior con la búsqueda arriba y las áreas con sus pantallas. */
  html .app-shell .menu-mas { position: fixed; inset: 0; z-index: var(--ty-z-dialogo); display: grid; align-items: end; }
  html .app-shell .menu-mas-fondo { position: absolute; inset: 0; border: 0; background-color: var(--ty-velo); }
  html .app-shell .menu-mas-hoja {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: var(--ty-e-3);
    max-height: min(calc(1vh * 82), 720px);
    padding: var(--ty-e-4) var(--ty-e-4) calc(var(--ty-e-4) + env(safe-area-inset-bottom, 0px));
    border-radius: var(--ty-r-4) var(--ty-r-4) 0 0;
    background-color: var(--ty-panel);
    box-shadow: var(--ty-s-4);
    color: var(--ty-tinta);
  }
  html .app-shell .menu-mas-cabeza { display: flex; align-items: center; justify-content: space-between; gap: var(--ty-e-2); }
  html .app-shell .menu-mas-cabeza h2 { margin: 0; font: var(--ty-peso-maximo) var(--ty-t-titulo)/1.2 var(--ty-fuente-marca); }
  html .app-shell .menu-mas-cerrar {
    display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--ty-raya); border-radius: var(--ty-r-pastilla);
    background-color: var(--ty-panel); color: var(--ty-tinta-media); font-size: var(--ty-t-titulo); cursor: pointer;
  }
  html .app-shell .menu-mas-buscar {
    display: flex; align-items: center; gap: var(--ty-e-2); min-height: 46px; padding: 0 var(--ty-e-3);
    border: 1px solid var(--ty-vidrio-borde); border-radius: var(--ty-r-3); background-color: var(--ty-panel-hondo);
    color: var(--ty-tinta-suave); font: inherit; font-size: var(--ty-t-base); text-align: left; cursor: text;
  }
  html .app-shell .menu-mas-buscar svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  html .app-shell .menu-mas-buscar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html .app-shell .menu-mas-grupos { display: grid; gap: var(--ty-e-4); min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  html .app-shell .menu-mas-grupo h3 {
    margin: 0 0 var(--ty-e-1); color: var(--ty-tinta-suave); font-size: var(--ty-t-micro); font-weight: var(--ty-peso-maximo);
    letter-spacing: .06em; text-transform: uppercase;
  }
  html .app-shell .menu-mas-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ty-e-1); }
  html .app-shell .menu-mas-item {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: var(--ty-e-2);
    min-width: 0; min-height: 44px; padding: var(--ty-e-1) var(--ty-e-2); border: 1px solid var(--ty-raya); border-radius: var(--ty-r-2);
    background-color: var(--ty-panel); color: var(--ty-tinta); font: inherit; font-size: var(--ty-t-menor); font-weight: var(--ty-peso-medio);
    text-align: left; cursor: pointer;
  }
  html .app-shell .menu-mas-item i { display: inline-flex; color: var(--ty-tinta-media); }
  html .app-shell .menu-mas-item svg { width: 18px; height: 18px; }
  html .app-shell .menu-mas-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html .app-shell .menu-mas-item.active { border-color: var(--ty-marca); background-color: var(--ty-panel-hondo); font-weight: var(--ty-peso-fuerte); }
  html .app-shell .menu-mas-item .nav-badge {
    min-width: 22px; padding: 0 var(--ty-e-1); border-radius: var(--ty-r-pastilla); background-color: var(--ty-aviso-fondo);
    color: var(--ty-aviso-tinta); font-size: var(--ty-t-micro); font-weight: var(--ty-peso-maximo); line-height: 20px; text-align: center;
  }
  html .app-shell .mobile-tabbar > button { flex: 1 1 0; min-width: 0; padding-inline: 2px; }
  html .app-shell .mobile-tabbar.mobile-bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)) 44px; }
  html .app-shell .mobile-tabbar > button > span:last-child {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--ty-t-micro);
    font-stretch: 75%;
  }
  /* Hueco real bajo el contenido: barra de pestañas (~76 px) + acción fija (52 px) + aire. */
  html .app-shell .content { padding-bottom: calc(184px + env(safe-area-inset-bottom, 0px)); }
  /* Móvil: el asistente se apila ENCIMA de la acción fija (antes los dos iban a 84 px y se montaban). */
  html .ty-agente-fab { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
  html[data-accion-plegada] .ty-agente-fab { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
}

/* Menú que se oculta solo, como la barra de tareas de Windows (5-nov-2026). Con el interruptor puesto el menú
   queda fuera de la pantalla y aparece al llevar el ratón al borde izquierdo (o al entrar con el teclado), y se
   vuelve a esconder al salir, con una pausa corta para que no parpadee.
   - El borde es el botón «Menú» (.nav-reveal-button, justo antes del lateral): con ratón es una franja
     transparente de 10 px a todo el alto; al pasar por ella sale el lateral (`+`), que se pinta ENCIMA y desde ese
     momento se sostiene con su propio :hover. Una franja hija del lateral (::after) se movía con él al salir y
     dejaba el ratón fuera de los dos: el menú parpadeaba.
   - En pantallas táctiles el mismo botón es la pastilla «Menú» de siempre, que lo enseña sin quitar la preferencia.
   - Con el teclado sale solo con foco VISIBLE (:has(:focus-visible)): con :focus-within, tras pulsar el
     interruptor o un enlace con el ratón, el foco se quedaba dentro y el menú no se iba.
   Antes estilos/05 lo dejaba en translateX(-105%) también con :hover, y solo se recuperaba con «Menú», que además
   APAGABA el autoocultado: por eso «se ocultaba una vez y nada más». */
html .app-shell.nav-collapsed .command-sidebar,
html .app-shell.nav-collapsed .command-sidebar:is(:hover, :has(:focus-visible)) {
  position: fixed;
  inset: var(--ty-e-3) auto var(--ty-e-3) 0;
  margin: 0;
}
html .app-shell.nav-collapsed .command-sidebar {
  transform: translateX(-100%);
  transition: transform 0.18s ease 0.3s;
}
html .app-shell.nav-collapsed :is(.nav-reveal-button:hover + .command-sidebar, .command-sidebar:hover, .command-sidebar:has(:focus-visible)) {
  transform: none;
  transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  html .app-shell.nav-collapsed .command-sidebar { transition: none; }
}
@media (hover: hover) {
  html .app-shell.nav-collapsed .nav-reveal-button {
    inset: 0 auto 0 0;
    /* Mismo nivel que el lateral (--z-sidebar, por encima de la barra superior) y antes en el DOM: el lateral, al
       salir, se pinta encima de la franja. */
    z-index: var(--z-sidebar);
    width: 10px; min-height: 0; height: auto;
    padding: 0; border: 0; border-radius: 0; box-shadow: none;
    background: none; color: transparent; font-size: 0;
    opacity: 0;
  }
}

/* El interruptor del pie del lateral: una pastilla que se ve encendida o apagada. */
html .app-shell .command-sidebar .sidebar-foot .nav-collapse-toggle { display: inline-flex; align-items: center; gap: var(--ty-e-2); }
html .app-shell .nav-interruptor {
  position: relative; flex: none; width: 28px; height: 16px;
  border-radius: var(--ty-r-pastilla); background-color: var(--ty-vidrio-ahumado-borde);
  transition: background-color 0.15s ease;
}
html .app-shell .nav-interruptor::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
  border-radius: var(--ty-r-pastilla); background-color: var(--ty-sobre-grafito);
  transition: transform 0.15s ease;
}
html .app-shell .nav-collapse-toggle[aria-checked="true"] .nav-interruptor { background-color: var(--ty-marca-accion); }
html .app-shell .nav-collapse-toggle[aria-checked="true"] .nav-interruptor::after { transform: translateX(12px); }
}
