#wrapper {
    width: 100%;
}
#page-wrapper {
    padding:7em 2em 2.5em;
	background-color: #F1F1F1;
}
.navbar-top-links {
    margin-right: 0;
}

.navbar-top-links li {
    display: inline-block;
}

.navbar-top-links li:last-child {
    margin-right: 15px;
}

.navbar-top-links li a {
    padding: 15px;
    min-height: 50px;
}

.navbar-top-links .dropdown-menu li {
    display: block;
}

.navbar-top-links .dropdown-menu li:last-child {
    margin-right: 0;
}

.navbar-top-links .dropdown-menu li a {
    padding: 3px 20px;
    min-height: 0;
}

.navbar-top-links .dropdown-menu li a div {
    white-space: normal;
}

.navbar-top-links .dropdown-messages,
.navbar-top-links .dropdown-tasks,
.navbar-top-links .dropdown-alerts {
    width: 310px;
    min-width: 0;
}
.navbar-top-links .dropdown-messages {
    margin-left: 5px;
}
.navbar-top-links .dropdown-tasks {
    margin-left: -59px;
}

.navbar-top-links .dropdown-alerts {
    margin-left: -123px;
}

.navbar-top-links .dropdown-user {
    right: 0;
    left: auto;
}

.sidebar .sidebar-nav.navbar-collapse {
    padding-right: 0;
    padding-left: 0;
}

.sidebar .sidebar-search {
    padding: 15px;
}
.sidebar .arrow {
    float: right;
}

.sidebar .fa.arrow:before {
    content: "\f104";
}

.sidebar .active>a>.fa.arrow:before {
    content: "\f107";
}

.sidebar .nav-second-level li,
.sidebar .nav-third-level li {
    border-bottom: 0!important;
	margin-bottom: 0;
}

.sidebar .nav-second-level li a {
    padding-left: 53px;
    font-size: .9em;
}
.sidebar .nav-third-level li a {
    padding-left: 52px;
}
@media(min-width:768px){
    .navbar-top-links .dropdown-messages,
    .navbar-top-links .dropdown-tasks,
    .navbar-top-links .dropdown-alerts {
        margin-left: auto;
    }
}

/* SCROLL FORZADO PARA EL MENÚ LATERAL - IMPORTANTE */
.cbp-spmenu-vertical {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100vh - 76px) !important;
    max-height: calc(100vh - 76px) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.4) rgba(255,255,255,0.1);
}

/* Forzar scroll visible en webkit browsers */
.cbp-spmenu-vertical::-webkit-scrollbar {
    width: 12px !important;
    background: rgba(255,255,255,0.1);
}

.cbp-spmenu-vertical::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1) !important;
    border-radius: 6px;
}

.cbp-spmenu-vertical::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4) !important;
    border-radius: 6px;
    border: 2px solid rgba(79,82,186,1);
    transition: background 0.3s ease;
}

.cbp-spmenu-vertical::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.6) !important;
}

/* Asegurar que el contenido del menú sea scrolleable */
#cbp-spmenu-s1 {
    padding-right: 5px !important;
    box-sizing: border-box !important;
}

#side-menu {
    height: auto !important;
    overflow: visible !important;
}

/* Mejorar visibilidad de elementos del menú */
.sidebar ul li a {
    padding: 12px 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar ul li:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Scroll personalizado para el menú lateral */
.cbp-spmenu-vertical {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - 76px) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

/* Estilo personalizado para webkit browsers (Chrome, Safari, Edge) */
.cbp-spmenu-vertical::-webkit-scrollbar {
    width: 8px;
}

.cbp-spmenu-vertical::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.cbp-spmenu-vertical::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.cbp-spmenu-vertical::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Mejorar el padding para evitar que el scroll cubra contenido */
#cbp-spmenu-s1 {
    padding-right: 8px;
}

/* Asegurar que los submenús funcionen correctamente con el scroll */
.nav-second-level {
    max-height: none !important;
}

/* Animación suave para el scroll */
.cbp-spmenu-vertical {
    scroll-behavior: smooth;
}

/* Indicador visual de scroll disponible */
.cbp-spmenu-vertical.has-scroll::after {
    content: "⋮";
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Efecto hover para los elementos del menú en scroll */
.cbp-spmenu-vertical .nav > li > a:hover {
    background-color: rgba(255,255,255,0.1);
    transition: background-color 0.3s ease;
}