#sidebar{
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100vh;
    width: 280px;
    padding: 24px 16px;

    border-right: 1px solid #DFE2E6;
    background: #F8F8F9;

    position: sticky;
    top: 0;
    align-self: start;
    transition: 300ms ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

#sidebar.close{
    width: 80px;
    padding: 24px 6px;
    opacity: 1;

    .logo{
        display: flex;
        justify-content: center;
    }

    .dropdown-btn{
        gap: 0;
    }

    span{
        display: none;
    }

    .copyright{
        opacity: 0;
    }
}

#sidebar .logo{
    display: block;
    padding-bottom: 32px;
    margin-bottom: 24px;
    border-bottom: 1px solid #DFE2E6;
}

#logo {
    height: 40px;
}

#sidebar .copyright{
    text-wrap: nowrap;
    text-align: center;
    left: 0;
    right: 0;
    margin-top: auto;
    bottom: 25px;
    color: #919EAB;
    line-height: 24px;
    transition: 300ms ease;
}

#sidebar ul li.active a{
    color: var(--dashboard-orange) !important;
    background: var(--dashboard-orange-transparent);
    font-weight: 600;

    svg path{
        fill: var(--dashboard-orange);
    }
}

#sidebar ul {
    padding: 0 !important;
    list-style: none !important;
}

#sidebar a, #sidebar .dropdown-btn{
    display: flex;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    text-wrap: nowrap;
    align-items: center;
    color: var(--text-primary);
    border-radius: 8px;
    border: none;
    padding: 16px;
    gap: 16px;

    svg{
        width: 24px;
        height: 24px;
    }
}

.dropdown-btn{
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
}

#sidebar svg{
    flex-shrink: 0;

    svg path{
        fill: var(--text-primary);
    }
}

.dropdown-btn img {
    margin-left: auto;
    max-height: 16px;
    max-width: 16px;
}

#sidebar a:hover, #sidebar .dropdown-btn:hover {
    background: #eeeeee;
}

#sidebar .sub-menu{
    display: grid;
    grid-template-rows: 0fr;
    transition: 300ms ease-in-out;

    > div{
        overflow: hidden;
    }
}

#sidebar .sub-menu.show{
    grid-template-rows: 1fr;
}

#sidebar .sub-sub-menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: 300ms ease-in-out;

    > div{
        overflow: hidden;
    }
}

.no-transition {
    transition: none !important;
}

#sidebar .sub-sub-menu.show{
    grid-template-rows: 1fr;
}

#sidebar .sub-sub-menu a{
    padding: 8px 16p !important;
    padding-left: 32px !important;
}

#sidebar .sub-menu button {
    line-height: 140%;
    padding: 10px 16px;
}

#sidebar .sub-menu a {
    line-height: 140%;
    padding: 10px 16px;
}

.dropdown-btn img{
    transition: 300ms ease-in-out;
}

.rotate img{
    rotate: 90deg;
}

#sidebar::-webkit-scrollbar {
    width: 8px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr !important;
    }

    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        height: 100%;
        background: #F8F8F9;
        border-right: 1px solid #DFE2E6;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1038;
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, .3);
        z-index: 1037;
    }

    #sidebar-overlay.show {
        display: block;
    }

    #sidebar.close {
        width: 280px;
        padding: 24px 16px;
    }
}