/* Menú lateral (ordenador): secciones en una columna a la izquierda, plegable a solo iconos. */
html.lateral {
  --lat-w: 212px;
}
html.lateral-mini {
  --lat-w: 60px;
}
/* La cabecera y el contenido usan todo el ancho disponible */
html.lateral .hdr .in,
html.lateral main.in {
  max-width: none;
}
html.lateral .hdr-top {
  padding-block: 10px;
}
html.lateral main.in {
  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, 60px);
  bottom: 0;
  width: var(--lat-w);
  z-index: 15;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
html.lateral .tabs .in {
  flex-direction: column;
  gap: 2px;
  min-height: 100%;
  padding: 12px 8px;
}
html.lateral .tab,
html.lateral .plegar-menu {
  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-menu svg {
  width: 20px;
  height: 20px;
  flex: none;
}
html.lateral .tab:hover,
html.lateral .plegar-menu:hover {
  background: var(--surface-2);
}
html.lateral .tab[aria-current='page'] {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tab svg {
  display: none;
}
html.lateral .tab svg {
  display: block;
}
.plegar-menu {
  display: none;
}
html.lateral .plegar-menu {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  margin-top: auto;
  color: var(--muted);
  font: 500 12.5px var(--f-body);
}
/* Plegado: solo iconos */
html.lateral-mini .tab,
html.lateral-mini .plegar-menu {
  justify-content: center;
  padding: 10px 0;
}
html.lateral-mini .tab > span,
html.lateral-mini .plegar-menu > span {
  display: none;
}
/* Ventanas estrechas: se pliega solo */
@media (max-width: 1000px) {
  html.lateral {
    --lat-w: 60px;
  }
  html.lateral .tab {
    justify-content: center;
    padding: 10px 0;
  }
  html.lateral .tab > span {
    display: none;
  }
  html.lateral .plegar-menu {
    display: none;
  }
}
@media print {
  html.lateral .tabs {
    display: none;
  }
  html.lateral main.in {
    margin-left: 0;
  }
}
