#sidebar .sidebar-scroll {
    background-image: url('../../assets/img/bg.webp');
}

.sidebar-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    border-left-color: #51CF66;
    background: rgba(81, 207, 102, 0.1);
}

.sidebar-item.active {
    border-left-color: #51CF66;
    background: rgba(81, 207, 102, 0.15);
}

.submenu-item {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.submenu-item:hover {
    border-left-color: #51CF66 !important;
    background: rgba(81, 207, 102, 0.1);
}

.sidebar-item::before,
.submenu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../../assets/img/hover.webp');
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.sidebar-item:hover::before,
.submenu-item:hover::before {
    opacity: 1;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(81, 207, 102, 0.5);
    border-radius: 4px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(81, 207, 102, 0.7);
}

/* Cambiar a max-width: 1023px para lg breakpoint */
@media (max-width: 1023px) {
    #sidebar {
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }
    
    #sidebar .sidebar-scroll {
        height: 100vh;
    }
}

body.overflow-hidden {
    overflow: hidden;
}

#sidebarOverlay {
    transition: opacity 0.3s ease;
}

#sidebarOverlay:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (hover: none) and (pointer: coarse) {
    .sidebar-item,
    .submenu-item {
        -webkit-tap-highlight-color: transparent;
    }
}

#sidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar {
    z-index: 40;
}

#sidebarOverlay {
    z-index: 30;
}