.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: #1a1a1a;
    border-right: 1px solid #2d2d2d;
    transition: transform 0.3s ease;
    z-index: 1040;
    padding-top: 60px;
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar-content {
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #2d2d2d #1a1a1a;
}

/* Webkit (Chrome, Safari, Edge) scrollbar styling */
.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background-color: #2d2d2d;
    border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background-color: #3d3d3d;
}

.sidebar-profile {
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.sidebar-profile:hover {
    background-color: #2d2d2d;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.sidebar-link:hover {
    background-color: #2d2d2d;
    color: #ffffff;
}

.sidebar-link.active {
    background-color: #0d6efd;
    color: #ffffff;
}

.sidebar-link i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.sidebar-divider {
    margin: 1rem 0;
    border-color: #2d2d2d;
}

.sidebar-toggle {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 40px;
    background: #0d6efd;
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background: #0b5ed7;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: none;
    }
}

/* Main Content Adjustment */
.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 40px;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
    }
}