/* ══════════════════════════════════════════════════════════
   Dashboard — Stats, Charts, Activity Feed
   ══════════════════════════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    backdrop-filter: blur(12px);
    transition: all var(--transition-base);
    animation: slideInUp 0.4s ease forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
    border-color: rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: var(--space-md);
}

.stat-icon.jobs { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.stat-icon.candidates { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.stat-icon.interviews { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.stat-icon.offers { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-xs);
    animation: countUp 0.5s ease forwards;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    backdrop-filter: blur(12px);
}

.chart-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* ── Funnel Chart (CSS) ── */
.funnel-chart {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
}

.funnel-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.funnel-label {
    width: 100px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
    text-align: right;
}

.funnel-track {
    flex: 1;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.funnel-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    padding: 0 var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: white;
    transition: width 0.8s ease;
    min-width: 30px;
}

.funnel-fill.sourced { background: var(--stage-sourced); }
.funnel-fill.screening { background: var(--stage-screening); }
.funnel-fill.interviewing { background: var(--stage-interviewing); }
.funnel-fill.evaluation { background: var(--stage-evaluation); }
.funnel-fill.offer { background: var(--stage-offer); }
.funnel-fill.onboarding { background: var(--stage-onboarding); }
.funnel-fill.hired { background: var(--stage-hired); }

/* ── Recent Activity ── */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

.activity-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}
