/* ===== DASHBOARD LAYOUT ===== */
.dashboard {
    padding: 2rem 0;
    background: var(--gray-50);
    min-height: calc(100vh - 80px);
    margin-top: 80px;
}

/* Reduce top offset on small screens so header overlap is correct */
@media (max-width: 767px) {
    .dashboard {
        margin-top: 60px;
        min-height: calc(100vh - 60px);
        padding-top: 1rem;
    }
    .sidebar {
        position: static;
        top: auto;
    }
}

.dashboard .container {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}

.sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.user-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.user-details p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

.nav-item.active {
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--primary-600);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
}

.nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 1rem 0;
}

/* ===== DASHBOARD CONTENT ===== */
.dashboard-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: transparent;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--radius-xl);
    padding: 3rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%);
    pointer-events: none;
}



.welcome-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.welcome-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
}

.welcome-image {
    font-size: 6rem;
    opacity: 0.2;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Activity Section */
.activity-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}

.activity-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

body.dashboard-page {
    background: var(--gray-50);
    background-image:
            radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.05) 0%, transparent 25%);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--gray-500);
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .dashboard .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .welcome-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .welcome-image {
        display: none;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .welcome-content h1 {
        font-size: 1.5rem;
    }

    .welcome-content p {
        font-size: 1rem;
    }
}

/* Activity Items */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 0.875rem;
}

.activity-content p {
    margin-bottom: 0.25rem;
    color: var(--gray-800);
}

.activity-content small {
    color: var(--gray-500);
    font-size: 0.75rem;
}