body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #222;
}

.page { padding: 24px; max-width: 1920px; margin: 0 auto; }
.header { margin-bottom: 24px; }
.header h1 { margin: 0; font-size: 30px; }
.section-title { font-size: 22px; margin: 28px 0 16px; }

.dashboard-controls {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}
.dashboard-controls > div:first-child { width: 260px; max-width: 100%; }
.dashboard-controls label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.reset-button {
    border: 0;
    border-radius: 6px;
    padding: 10px 18px;
    background: #222;
    color: white;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    min-height: 36px;
}
.reset-button:hover { background: #444; }
.reset-button:focus-visible { outline: 3px solid #1E90FF; outline-offset: 3px; }

.kpi-section {
    margin-bottom: 20px;
}
.kpi-as-of-label {
    margin-bottom: 10px;
    color: #555;
    font-size: 11px;
    line-height: 1.2;
    text-align: right;
}
.kpi-grid {
    display: grid;
    gap: 20px;
}
.kpi-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 20px;
}
.kpi-card {
    box-sizing: border-box;
    flex: 0 1 calc((100% - 40px) / 3);
    min-width: 0;
    min-height: 132px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.kpi-title {
    margin: 0 0 12px;
    color: #444;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.kpi-value {
    color: #1625A3;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.chart-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
.chart-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart-card {
    min-width: 0;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}
.active-filter-label {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: white;
    border-left: 4px solid #222;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Stack before two cards become too narrow for labels and dual axes. */
@media (max-width: 1100px) {
    .chart-grid.two-columns { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .kpi-row { flex-wrap: wrap; }
    .kpi-card { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 550px) {
    .kpi-card { flex-basis: 100%; }
}
@media (max-width: 700px) {
    .page { padding: 12px; }
    .header h1 { font-size: 25px; }
    .chart-card { padding: 6px; }
    .dashboard-controls { flex-wrap: wrap; }
}
