/**********************************************************************
 * Left Sidebar Styles
 **********************************************************************/

#leftSidebar {
    background: var(--left-sidebar-bg);
    width: var(--left-sidebar-width, 280px);
    min-width: var(--left-sidebar-width, 280px);
    max-width: var(--left-sidebar-width, 280px);
    flex: 0 0 var(--left-sidebar-width, 280px);
    overflow: auto;
    position: relative;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(231, 238, 248, 0.82);
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(6, 99, 249, 0.1);
    border-color: rgba(6, 99, 249, 0.18);
    color: #fff;
}

.nav-item.active {
    background: rgba(6, 99, 249, 0.14);
    border-color: rgba(6, 99, 249, 0.24);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(6, 99, 249, 0.1) inset;
}

details.dropdown {
    position: relative;
}

details.dropdown summary {
    list-style: none;
    cursor: pointer;
}

.sidebar-resize-handle {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 5;
}

.sidebar-resize-handle::after {
    content: "";
    position: absolute;
    top: 0;
    right: 2px;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.06);
    opacity: 0;
    transition: opacity 0.15s ease;
}

#leftSidebar:hover .sidebar-resize-handle::after {
    opacity: 1;
}

details.dropdown summary::-webkit-details-marker {
    display: none;
}

.dropdown-content {
    margin-left: 10px;
    padding-left: 15px;
    border-left: 1px solid rgba(6, 99, 249, 0.15);
    display: none;
    margin-top: 6px;
    margin-bottom: 6px;
}

details.dropdown[open] .dropdown-content {
    display: block;
}

.dropdown-content .nav-item {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    margin-left: -5px;
}

.dropdown-content .nav-item:hover {
    background: rgba(6, 99, 249, 0.1);
    border-left: 2px solid rgba(6, 99, 249, 0.3);
}

details.dropdown summary::after {
    content: '▸';
    position: absolute;
    right: 20px;
    transition: transform 0.2s;
    font-size: 10px;
    color: rgba(147, 164, 184, 0.6);
    font-weight: 300;
}

details.dropdown[open] summary::after {
    transform: rotate(90deg);
    color: rgba(147, 164, 184, 0.8);
}

@media (max-width: 840px) {
    #leftSidebar {
        position: fixed;
        left: 0;
        top: 64px;
        bottom: 48px;
        width: 280px;
        transform: translateX(-110%);
        transition: transform 220ms ease;
        z-index: 100;
    }
    #leftSidebar.open {
        transform: translateX(0%);
    }
    #leftSidebarBackdrop {
        display: none;
        position: fixed;
        inset: 64px 0 48px 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 90;
    }
    #leftSidebarBackdrop.open {
        display: block;
    }
}
