/* Barra lateral: menú, usuario y salir; en celular es un cajón con velo (DISENO.md R1, R9). */

.lateral {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  background: var(--petroleo);
  color: rgb(255 255 255 / 85%);
}

.lateral .marca {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 1rem;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.lateral .usuario {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  border-block: 1px solid rgb(255 255 255 / 12%);
}

.lateral .usuario strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}

.lateral .usuario small {
  color: rgb(255 255 255 / 60%);
  font-size: 0.8rem;
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-weight: 700;
}

.lateral nav {
  flex: 1;
}

.lateral .seccion {
  margin: 1.1rem 0.5rem 0.3rem;
  color: rgb(255 255 255 / 50%);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lateral nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: rgb(255 255 255 / 85%);
  font-size: 0.95rem;
  text-decoration: none;
}

.lateral nav a:hover {
  background: rgb(255 255 255 / 8%);
  color: #fff;
}

.lateral nav a[aria-current="page"] {
  background: var(--azul);
  color: #fff;
}

.lateral .salir button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  border: 1px solid rgb(255 255 255 / 20%);
  background: transparent;
  color: rgb(255 255 255 / 85%);
}

.velo {
  display: none;
}

/* --- Celular y tablet chica: cajón que se abre con el botón de la barra (app.js) ---- */

@media (max-width: 900px) {
  .lateral {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(80vw, 280px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .menu-abierto .lateral {
    transform: none;
  }

  .menu-abierto .velo {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    background: rgb(0 0 0 / 40%);
  }
}
