

/* =========================================================
   FAC OPS - SCROLL COMPLETO BARRA LATERAL IZQUIERDA
   Permite subir y bajar TODO el sidebar: logo, menú,
   usuario y footer.
   ========================================================= */

/* Sidebar completo desplazable */
aside.sidebar{
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 100vh !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  display: flex !important;
  flex-direction: column !important;

  scrollbar-width: thin !important;
  scrollbar-color: rgba(139,15,38,.45) rgba(139,15,38,.08) !important;
}

/* Scroll visual */
aside.sidebar::-webkit-scrollbar{
  width: 9px !important;
}

aside.sidebar::-webkit-scrollbar-track{
  background: rgba(139,15,38,.08) !important;
  border-radius: 999px !important;
}

aside.sidebar::-webkit-scrollbar-thumb{
  background: rgba(139,15,38,.45) !important;
  border-radius: 999px !important;
}

aside.sidebar::-webkit-scrollbar-thumb:hover{
  background: rgba(139,15,38,.65) !important;
}

/* El nav NO tiene scroll propio */
nav#mainNav.side-nav,
.side-nav#mainNav{
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Usuario y footer van después del menú, como contenido normal */
aside.sidebar .side-user{
  margin-top: 18px !important;
  flex: 0 0 auto !important;
}

aside.sidebar .side-footer{
  flex: 0 0 auto !important;
  padding-bottom: 24px !important;
}

/* Evita que en pantallas chicas el menú se ponga en dos columnas */
@media(max-width:900px){
  aside.sidebar{
    position: sticky !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  nav#mainNav.side-nav,
  .side-nav#mainNav{
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    overflow: visible !important;
  }
}

/* Compacto para pantallas bajas */
@media(max-height:760px){
  aside.sidebar .nav-btn{
    min-height: 42px !important;
  }

  aside.sidebar .nav-section{
    margin-top: 10px !important;
  }

  aside.sidebar .side-brand{
    padding-bottom: 10px !important;
  }
}
