/**
 * Sidebar Styles
 */

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 900;
    transition: all var(--transition-base);
    overflow-y: auto;
    overflow-x: hidden;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item svg {
    flex-shrink: 0;
    color: inherit;
}

body.sidebar-collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-version {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

body.sidebar-collapsed .sidebar-version {
    display: none;
}

/* Mobile Overlay */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 899;
    }
}