.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    z-index: 100;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.toggleBtn {
    position: absolute;
    right: -12px;
    top: 24px;
    width: 24px;
    height: 24px;
    padding: 1rem;
    cursor: pointer;
    text-align: right;
    color: var(--text-secondary);
}

.sidebar.collapsed .toggleBtn {
    text-align: center;
}

.nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar styling for nav */
.nav::-webkit-scrollbar {
    width: 4px;
}

.nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navItem {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    position: relative;
    user-select: none;
}

.navItem:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.navItem.active {
    background-color: rgba(56, 189, 248, 0.1);
    border-right: 3px solid var(--accent-primary);
    color: var(--accent-primary);
}

.icon {
    font-size: 1.2rem;
    margin-right: 1rem;
    min-width: 24px;
    text-align: center;
}

.sidebar.collapsed .icon {
    margin-right: 0;
}

.label {
    flex: 1;
    font-size: 0.95rem;
}

.arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
    margin-left: 0.5rem;
}

.arrow.expanded {
    transform: rotate(90deg);
}

.userProfile {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
    overflow: hidden;
}

.userProfile:hover {
    background-color: rgba(255, 255, 255, 0.05);
}