:root {
  --azul-umariana: #009ada;
  --azul-oscuro: #396eaf;
  --blanco: #ffffff;
  --transicion: 0.3s ease;
}

/* --- Reset --- */
.sidebar, .sidebar * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Lato', sans-serif;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 68px;
  height: 100vh;
  background: var(--azul-umariana);
  transition: width var(--transicion);
  overflow: hidden;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  z-index: 9999; /* 🔒 se aísla totalmente del resto del contenido */
}

/* Evita que cualquier contenido externo afecte su posición */
html, body {
  overflow-x: hidden;
}

/* --- Hover expand --- */
.sidebar:hover {
  width: 250px;
}

/* --- Logo --- */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  position: relative;
  overflow: hidden;
}

.logo-small {
  width: 58px;
  height: 57px;
  position: absolute;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.logo-large {
  width: 200px;
  height: 57px;
  position: absolute;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sidebar:hover .logo-small {
  opacity: 0;
  transform: scale(0.85);
}

.sidebar:hover .logo-large {
  opacity: 1;
  transform: scale(1);
}

/* --- Enlaces --- */
.sidebar ul {
  list-style: none;
  margin-top: 10px;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--blanco);
  padding: 12px 25px;
  transition: background var(--transicion);
  white-space: nowrap;
}

.sidebar ul li a:hover {
  background: var(--azul-oscuro);
}

.sidebar ul li a i {
  font-size: 18px;
  width: 30px;
  text-align: center;
}

.sidebar ul li a span {
  opacity: 0;
  margin-left: 8px;
  transition: opacity var(--transicion);
}

.sidebar:hover ul li a span {
  opacity: 1;
}

/* --- Submenú --- */
.submenu {
  display: none;
  flex-direction: column;
  background-color: #46c1f2;
}

.sidebar:hover .has-submenu:hover .submenu {
  display: flex;
}

.submenu a {
  font-size: 14px;
  padding: 6px 0px 6px 40px !important;
}

/* --- Móvil: sin interferencias --- */
@media (max-width: 768px) {
  .sidebar {
    height: 100vh;
    overflow: hidden; /* ✅ nada de scroll interno ni externo */
    width: 68px;
  }

  .sidebar:hover {
    width: 270px; /* Un poco menos en pantallas pequeñas */
  }

	.sidebar.active {
  width: 270px;
}
	
  body {
    overflow-x: hidden !important;
  }
}
