/* ============================================
   Reusable Sidebar Component Styles
   Used across all dashboard pages
   ============================================ */

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.dashboard-sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    padding: 0;
    position: fixed;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    flex-shrink: 0;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Header */
.sidebar-header {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    padding: 10px;
}

.sidebar-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.sidebar-logo:hover img {
    transform: scale(1.05);
}

.sidebar-logo span {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

/* User Profile */
.user-profile {
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-tier {
    font-size: 11px;
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.15);
    padding: 5px 12px;
    border-radius: 15px;
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    border: 1px solid rgba(255, 107, 0, 0.3);
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2), transparent);
    color: #fff;
    border-left: 3px solid #667eea;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-text {
    font-size: 15px;
    font-weight: 500;
}

.nav-section {
    padding: 15px 20px 8px;
    transition: all 0.3s ease;
}

.nav-section.active-section .nav-section-title {
    color: rgba(102, 126, 234, 0.8);
    font-weight: 700;
}

.nav-section-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Logout Button */
.logout-btn {
    width: calc(100% - 40px);
    margin: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #dc3545;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .dashboard-sidebar.active {
        transform: translateX(0);
    }

    /* Adjust logo size for mobile */
    .sidebar-logo img {
        height: 60px;
    }

    .sidebar-logo span {
        font-size: 18px;
    }

    /* Smaller avatar on mobile */
    .user-avatar {
        width: 50px;
        height: 50px;
    }

    .avatar-initials {
        font-size: 20px;
    }

    .user-name {
        font-size: 15px;
    }

    .user-email {
        font-size: 12px;
    }
}
