/* Menú lateral (prueba): secciones en una columna a la izquierda para técnicos y administradores en el PC. */
html.lateral {
  --lat-w: 212px;
}
html.lateral-mini {
  --lat-w: 60px;
}
/* La cabecera y el contenido usan todo el ancho disponible */
html.lateral .top .wrap,
html.lateral main.wrap {
  max-width: none;
}
html.lateral .top > .wrap:last-child {
  padding: 0;
}
html.lateral main.wrap {
  margin-left: var(--lat-w);
  padding-left: 24px;
  padding-right: 24px;
}
/* Columna del menú */
html.lateral .tabs {
  position: fixed;
  left: 0;
  top: var(--top-h, 54px);
  bottom: 0;
  width: var(--lat-w);
  z-index: 4;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
html.lateral .tab,
html.lateral .plegar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-bottom: 0;
  border-radius: 8px;
}
html.lateral .tab svg,
html.lateral .plegar svg {
  width: 20px;
  height: 20px;
  flex: none;
}
html.lateral .tab:hover,
html.lateral .plegar:hover {
  background: var(--surface-2);
}
html.lateral .tab[aria-current='page'] {
  background: var(--surface-2);
  color: var(--fg);
  box-shadow: inset 3px 0 0 var(--accent);
}
html.lateral .tab .cnt {
  margin-left: auto;
}
html.lateral .plegar {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  margin-top: auto;
  color: var(--muted);
  font-size: 12.5px;
}
/* Plegado: solo iconos */
html.lateral-mini .tab,
html.lateral-mini .plegar {
  justify-content: center;
  padding: 10px 0;
  position: relative;
}
html.lateral-mini .tab > span:not(.cnt),
html.lateral-mini .plegar > span {
  display: none;
}
html.lateral-mini .tab .cnt {
  position: absolute;
  top: 2px;
  right: 4px;
  margin: 0;
  font-size: 10px;
  padding: 0 4px;
}
/* Ventanas estrechas: se pliega solo */
@media (max-width: 1000px) {
  html.lateral {
    --lat-w: 60px;
  }
  html.lateral .tab {
    justify-content: center;
    padding: 10px 0;
    position: relative;
  }
  html.lateral .tab > span:not(.cnt) {
    display: none;
  }
  html.lateral .tab .cnt {
    position: absolute;
    top: 2px;
    right: 4px;
    margin: 0;
  }
  html.lateral .plegar {
    display: none;
  }
}
