.statistics-page {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 12px 0 28px;
}

.statistics-header {
    margin-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.statistics-header h1 {
    margin: 0 0 4px;
    color: #263238;
    font-size: clamp(1.7rem, 2.2vw, 2.45rem);
    line-height: 1.15;
}

.statistics-header p {
    margin: 0 0 14px;
    color: #475569;
}

.stats-kpi-grid,
.stats-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.stats-kpi,
.stats-status-card,
.stats-panel {
    border: 1px solid #d8e0e8;
    background: #fff;
}

.stats-kpi,
.stats-status-card {
    padding: 12px;
}

.stats-kpi span,
.stats-status-card span,
.stats-panel-heading span {
    display: block;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
}

.stats-kpi strong,
.stats-status-card strong {
    display: block;
    color: #1f2937;
    font-size: clamp(1.45rem, 2.1vw, 2.1rem);
    line-height: 1.15;
}

.stats-kpi small,
.stats-status-card small {
    color: #64748b;
}

.stats-panel {
    margin-top: 16px;
    padding: 14px;
}

.stats-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.stats-panel-heading h2 {
    margin: 0;
    color: #263238;
    font-size: 1.2rem;
}

.stats-select-control {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stats-select-control span {
    white-space: nowrap;
}

.stats-select-control select {
    min-width: 150px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-weight: 700;
    padding: 6px 8px;
}

.stats-meter {
    height: 9px;
    overflow: hidden;
    background: #e2e8f0;
}

.stats-meter span {
    display: block;
    height: 100%;
    min-width: 2px;
    background: #b91c1c;
}

.stats-status-card .stats-meter {
    margin: 8px 0 4px;
}

.stats-weekly-chart {
    display: grid;
    grid-template-columns: repeat(52, minmax(3px, 1fr));
    gap: 2px;
    align-items: end;
    height: 260px;
    padding: 10px 8px 0;
    border: 1px solid #e2e8f0;
    background: linear-gradient(to top, #f8fafc, #fff);
}

.stats-weekly-bar {
    display: flex;
    align-items: end;
    height: 100%;
}

.stats-weekly-bar span {
    display: block;
    width: 100%;
    min-height: 2px;
    background: #dc2626;
}

.stats-age-list {
    display: grid;
    gap: 8px;
}

.stats-age-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    gap: 10px;
    align-items: center;
}

.stats-age-row strong {
    text-align: right;
}

@media (max-width: 900px) {
    .stats-kpi-grid,
    .stats-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .stats-kpi-grid,
    .stats-status-grid {
        grid-template-columns: 1fr;
    }

    .stats-panel-heading {
        display: block;
    }

    .stats-select-control {
        margin-top: 10px;
        justify-content: space-between;
    }

    .stats-select-control select {
        min-width: 0;
        width: min(190px, 52vw);
    }

    .stats-weekly-chart {
        height: 180px;
    }
}
