:root {
    --primary: #1a365d;
    --secondary: #2b6cb0;
    --background: #f7fafc;
    --card-bg: #ffffff;
    --text: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --success: #38a169;
    --warning: #ed8936;
    --accent: #805ad5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 8px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-select, .search-input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--card-bg);
}

.filter-select {
    min-width: 150px;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.export-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.export-btn:hover {
    background: var(--secondary);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-variance {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 4px;
    min-height: 20px;
}

.stat-variance.positive {
    color: #c53030;
}

.stat-variance.negative {
    color: #38a169;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-sublabel {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-top: 2px;
}

/* Table */
.table-container {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px;
    margin-bottom: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.table-header h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0;
}

.data-footnote {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
}

.chart-card h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--primary);
}

.chart-card canvas {
    max-height: 350px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.footer a {
    color: var(--secondary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .filters {
        flex-direction: column;
    }

    .filter-select, .search-input {
        width: 100%;
    }
}
