:root {
    --sidebar-width: 320px;
    --spring-easing: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--nav-border-light);
}

.sidebar-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--nav-border-light);
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary-light);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sidebar-close:hover {
    background: rgba(109, 40, 217, 0.1);
    color: var(--primary-violet);
    transform: rotate(90deg);
}

.sidebar-close svg {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .sidebar-close {
    border-color: var(--nav-border-dark);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary-dark);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-mobile {
    position: fixed;
    top: 0;
    right: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--glass-bg-light);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    border-left: 1px solid var(--nav-border-light);
    z-index: 2001;
    transition: transform 0.6s var(--spring-easing);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .sidebar-mobile {
    background: var(--glass-bg-dark);
    border-color: var(--nav-border-dark);
}

.sidebar-mobile.active {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.sidebar-user-profile {
    margin-top: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--nav-border-light);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(109, 40, 217, 0.05);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--nav-border-light);
}

[data-theme="dark"] .sidebar-user {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--nav-border-dark);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
}

.logout-btn-container {
    padding: 12px;
    border-radius: 12px;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.logout-btn-container:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: translateY(-2px);
}

[data-theme="dark"] .sidebar-user {
    border-color: var(--nav-border-dark);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-violet), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.user-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary-light);
}

.user-info p {
    font-size: 13px;
    color: var(--text-muted);
}

[data-theme="dark"] .user-info h4 {
    color: var(--text-primary-dark);
}

/* Sidebar Nav */
.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 24px;
}

.nav-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--text-primary-light);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.2px;
    transition: var(--transition-smooth);
    margin-bottom: 8px;
}

[data-theme="dark"] .nav-link-mobile {
    color: var(--text-primary-dark);
}

.nav-link-mobile:hover,
.nav-link-mobile.active {
    background: rgba(109, 40, 217, 0.08);
    transform: translateX(-4px);
    color: var(--primary-violet);
}

.nav-link-mobile.active {
    background: rgba(109, 40, 217, 0.1) !important;
    font-weight: 700;
    border-right: 4px solid var(--primary-violet);
}

[data-theme="dark"] .nav-link-mobile.active {
    background: rgba(255, 255, 255, 0.05) !important;
}

.nav-link-mobile.has-dropdown svg {
    transition: transform 0.4s var(--spring-easing);
}

.nav-link-mobile.active svg {
    transform: rotate(180deg);
}

.dropdown-content {
    height: 0;
    overflow: hidden;
    transition: height 0.4s var(--spring-easing);
    padding-left: 40px;
}

.dropdown-link {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.dropdown-link:hover {
    color: var(--primary-violet);
}
@media (min-width: 993px) {
    body.dashboard-page .sidebar-mobile {
        position: fixed;
        right: auto;
        left: 0;
        transform: none;
        visibility: visible;
        border-right: 1px solid var(--nav-border-light);
        border-left: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.4);
    }
    
    [data-theme="dark"] body.dashboard-page .sidebar-mobile {
        background: rgba(11, 11, 15, 0.4);
        border-color: var(--nav-border-dark);
    }
    
    body.dashboard-page .main-content {
        margin-left: var(--sidebar-width);
    }
    
    body.dashboard-page .navbar-wrapper {
        padding-left: calc(var(--sidebar-width) + 24px);
    }
}

/* Dashboard Sidebar Specifics */
.dashboard-sidebar {
    background: white !important;
    border-right: 1px solid rgba(0,0,0,0.08) !important;
    border-left: none !important;
    box-shadow: 10px 0 40px rgba(0,0,0,0.03) !important;
}

[data-theme="dark"] .dashboard-sidebar {
    background: #0f172a !important;
    border-color: rgba(255,255,255,0.05) !important;
}

.dashboard-sidebar .nav-link-mobile {
    font-size: 14px;
    padding: 12px 16px;
    margin-bottom: 4px;
}

.dashboard-sidebar .nav-group-title {
    margin-top: 20px;
    color: #94a3b8;
}
