/* ===== USER SIDEBAR STYLES ===== */

:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    --sidebar-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --sidebar-border: rgba(255, 255, 255, 0.1);
    --sidebar-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Container - Moved to Left Side */
.user-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: auto;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    border-left: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1020;
    overflow-y: auto;
    transition: var(--sidebar-transition);
    transform: translateX(0);
}

.user-sidebar.collapsed {
    transform: translateX(-100%);
}

.user-sidebar.show {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--sidebar-border);
    background: rgba(255, 255, 255, 0.05);
    position: relative;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.sidebar-brand-text {
    color: white;
}

.sidebar-brand-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-brand-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

/* Sidebar Close Button */
.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: none;
}

.sidebar-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar User Info */
.sidebar-user-info {
    padding: 20px 24px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.user-details {
    color: white;
}

.user-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.user-email {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 16px 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.nav-item.active a {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-text {
    font-weight: 500;
}

/* Sidebar Scrollbar */
.user-sidebar::-webkit-scrollbar {
    width: 6px;
}

.user-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.user-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.user-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== MOBILE RESPONSIVE SIDEBAR ===== */
@media (max-width: 768px) {
    .user-sidebar {
        width: 100%;
        max-width: 320px;
        transform: translateX(-100%);
        z-index: 1040;
        transition: transform 0.3s ease;
        position: fixed;
        top: 60px;
        left: 0;
        right: auto;
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .user-sidebar.show {
        transform: translateX(0);
    }
    
    .user-sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .sidebar-close {
        display: block !important;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: #6b7280;
        font-size: 1.25rem;
        cursor: pointer;
        padding: 8px;
        border-radius: 6px;
        z-index: 1050;
        transition: all 0.3s ease;
    }
    
    .sidebar-close:hover {
        color: #1f2937;
        background: #e5e7eb;
    }
    
    .sidebar-header {
        padding: 20px;
        position: relative;
        padding-right: 3rem;
    }
    
    .sidebar-nav .nav-link {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .sidebar-user-info {
        padding: 16px 20px;
    }
    
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-top: 60px !important;
        padding: 16px !important;
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    .user-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar-header {
        padding: 16px;
        padding-right: 3rem;
    }
    
    .sidebar-nav .nav-link {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .sidebar-user-info {
        padding: 12px 16px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .user-name {
        font-size: 0.9rem;
    }
    
    .user-email {
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 12px !important;
    }
}

/* ===== DESKTOP SIDEBAR ===== */
@media (min-width: 769px) {
    .user-sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        right: auto;
        width: 280px;
        height: calc(100vh - 70px);
        transform: translateX(0);
        transition: transform 0.3s ease;
    }
    
    .user-sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .sidebar-close {
        display: none !important;
    }
    
    .main-content {
        margin-left: 280px;
        margin-right: 0;
        margin-top: 70px;
        transition: margin-left 0.3s ease;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
}
