.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 4000;
    border-right: 1px solid var(--glass-border);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    width: 140px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.nav-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 6px;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.nav-actions button {
    background: transparent;
    color: var(--text-dim);
    text-align: left;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 12px;
    width: 100%;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-actions button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
}

.nav-actions button.active {
    background: rgba(0, 122, 255, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.nav-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-border), transparent);
    margin: 15px 10px;
    flex-shrink: 0;
}

.sidebar-label {
    margin: 15px 16px 8px;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 20px;
    background: rgba(0,0,0,0.1);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.logout-btn-sidebar {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    width: 100%;
    padding: 12px !important;
}

.logout-btn-sidebar:hover {
    background: #ef4444 !important;
    color: white !important;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        border-right: none;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }
    .sidebar.active { transform: translateX(0); }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.8);
        backdrop-filter: blur(4px);
        z-index: 3500;
        display: none;
        animation: fadeInOverlay 0.3s ease;
    }
    @keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
    .sidebar.active + .sidebar-overlay { display: block; }
}
