/*=============================================
Interfaz Dashboard
=============================================*/

/* Asegura altura completa */
html, body {
  height: 100%;
}

/* El wrapper no scrollea: cada panel maneja su propio scroll */
#wrapper {
  display: flex;
  flex-direction: row;
  height: 100vh;          /* clave */
  overflow: hidden;       /* clave: evita doble scroll del body */
}

#sidebar-wrapper {
  position: relative;
  min-height: 100vh;
  height: 100vh;          /* clave: alto fijo para scroll interno */
  width: 250px;
  z-index: 1;
  transition: all 0.3s;
  overflow-y: auto;       /* clave: scroll vertical */
  overscroll-behavior: contain;
}

#sidebar-wrapper .sidebar-heading {
  font-size: 1.5rem;
  text-align: center;
  min-width: 225px;
}

#sidebar-wrapper .list-group-item {
  padding: 15px 20px;
}

#sidebar-wrapper .list-group-item i {
  margin-right: 10px;
}

#sidebar-wrapper .menu-text {
  display: inline;
}

#sidebar-wrapper.collapsed {
  width: 80px;
}

#sidebar-wrapper.collapsed .menu-text {
  display: none;
}

#sidebar-wrapper.collapsed .list-group-item {
  margin-right: 0;
  text-align: center;
}

#sidebar-wrapper.collapsed .list-group-item i{
  margin: 0;
}

/* Panel derecho con scroll propio */
#page-content-wrapper {
  flex-grow: 1;
  width: 50%;
  height: 100vh;          /* clave */
  overflow-y: auto;       /* clave: scroll vertical */
  overscroll-behavior: contain;
}

/* Float the sidebar for mobile */
@media (max-width: 768px) {
  #sidebar-wrapper {
    position: fixed;
    z-index: 2000;
    height: 100%;         /* mantiene scroll interno en móvil */
    left: -250px;
    transition: all 0.3s ease;
    max-width: 80vw;      /* opcional: limita ancho del overlay */
    background: #fff;     /* opcional: asegura fondo sólido */
    box-shadow: 2px 0 12px rgba(0,0,0,.12);
  }

  #sidebar-wrapper.show {
    left: 0;
  }

  #menu-toggle {
    display: block;
    margin-left: 20px;
  }
}

/* (Opcional) estética del scrollbar en WebKit */
#sidebar-wrapper::-webkit-scrollbar,
#page-content-wrapper::-webkit-scrollbar {
  width: 8px;
}
#sidebar-wrapper::-webkit-scrollbar-thumb,
#page-content-wrapper::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}

.backDashboard{
  background-color: #f0f0f5 !important;
}
.borderDashboard{
  border: 1px solid #dce1e5 !important;
}
