#sidebar {
    width: 250px;
    transition: width 0.3s;
    background-color: #F7F8F9;
    color: black;
    display: flex;
    flex-direction: column;
    border-right: 3px solid rgba(188, 188, 188, 0.89);
    height: 100%;
    overflow: hidden;


    &.collapsed {
        width: 0;
    }

    .sidebar-content {
        width: 250px;
        transition: opacity 0.3s;
    }

    &.collapsed .sidebar-content {
        opacity: 0;
    }
    .user-info {
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;

        h5 {
            margin: 0;
            font-size: 18px;
        }

        small {
            color: black;
            font-size: 14px;
        }
    }

    .nav-link {
        color: black;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-decoration: none;
        &:hover {
            background-color: var(--secondary-color);
        }

        &.active {
            background-color: #e6e6e6;
            font-weight: bold;
        }

        i {
            margin-right: 10px;
        }

        &[aria-expanded="true"] .fa-chevron-down {
            transform: rotate(180deg);
        }

        .fa-chevron-down {
            transition: transform 0.2s;
        }
    }

    &.collapsed .nav-link .fa-chevron-down {
        display: none;
    }
    .nav .nav {
        background-color: transparent;

        .nav-link {
            padding: 10px 20px;
            font-size: 14px;
            &:hover {
                background-color: var(--secondary-color);
            }
            &.active {
                background-color: #e6e6e6;
                font-weight: bold;
            }
        }
    }
    .nav-item {
        border-bottom: 1px solid rgb(0, 0, 0);

        &:last-child {
            border-bottom: none;
        }
    }
}
#main-content {
    flex: 1;
    padding: 20px;
}
#sidebarCollapse {
    margin-bottom: 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
}
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 999;
        background-color: #F7F8F9;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    #sidebar.expanded {
        transform: translateX(0);
    }

    #main-content {
        position: relative;
        z-index: 1;
    }

    #sidebar.expanded ~ #main-content #sidebarCollapse {
        display: none;
    }
}

#sidebar-overlay {
    display: none;
}

@media (max-width: 768px) {
    #sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        display: none;
    }

    #sidebar.expanded ~ #sidebar-overlay {
        display: block;
    }
}
