:root {
    --dashboard-background: #f8fafc;
    --dashboard-text: #1e293b;
    --dashboard-muted-text: #64748b;
    --dashboard-card-background: var(--white);
    --dashboard-primary-gradient: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
    --dashboard-trend-up-bg: #d1fae5;
    --dashboard-trend-up-text: #059669;
    --dashboard-trend-down-bg: #fee2e2;
    --dashboard-trend-down-text: #dc2626;
    --dashboard-grid-border: #e2e8f0;
}

body.dashboard-body {
    background: var(--dashboard-background);
    color: var(--dashboard-text);
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: var(--dashboard-muted-text);
    font-size: 0.9375rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.kpi-card {
    background: var(--dashboard-card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kpi-card.primary {
    background: var(--dashboard-primary-gradient);
    color: white;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.kpi-card.primary .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
}

.kpi-card:not(.primary) .kpi-icon {
    background: var(--blue-bg);
    color: var(--primary);
}

.kpi-trend {
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.trend-up {
    background: var(--dashboard-trend-up-bg);
    color: var(--dashboard-trend-up-text);
}

.trend-down {
    background: var(--dashboard-trend-down-bg);
    color: var(--dashboard-trend-down-text);
}

.kpi-card.primary .trend-up {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.kpi-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.kpi-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
}

.analytics-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.section-header p {
    color: var(--dashboard-muted-text);
    font-size: 0.875rem;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--dashboard-card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
     border: 1px solid var(--border);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chart-subtitle {
    font-size: 0.8125rem;
    color: var(--dashboard-muted-text);
}

.chart-trend {
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--dashboard-trend-up-bg);
    color: var(--dashboard-trend-up-text);
}

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

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
