:root {
    --navy: #294c63;
    --green: #1e493b;
    --red: #a43e43;
    --purple: #8370b9;
    --ink: #26394b;
    --line: #e1e5e8;
    --page: #f7f8f9;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

.hero img {
    display: block;
    width: 100%;
    max-height: 230px;
    object-fit: cover;
}

.dashboard {
    padding-top: 15px;
    padding-bottom: 24px;
}

.dashboard-toolbar { min-height: 32px; }
.import-note { margin-top: -5px; margin-bottom: 12px; }
.upload-label { cursor: pointer; }

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 150px;
    padding: 17px 17px 14px;
    overflow: hidden;
    border-radius: 7px;
    color: #fff;
}

.stat-card > i { margin-bottom: 11px; font-size: 28px; opacity: .95; }
.stat-green { background: #1d493a; }
.stat-blue { background: #2d5067; }
.stat-red { background: #a04448; }
.stat-slate { background: #a6b5c4; }
.stat-light { background: #f0f2f4; color: #2e4557; }

.stat-label {
    min-height: 30px;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.stat-value {
    font-size: clamp(23px, 2.2vw, 36px);
    font-weight: 750;
    line-height: 1.15;
    white-space: nowrap;
}

.stat-small-value {
    margin-top: 5px;
    overflow-wrap: anywhere;
    font-size: 19px;
    font-weight: 700;
}

.chart-card,
.table-card {
    min-width: 0;
    padding: 15px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.chart-card h2,
.table-card h2 {
    margin: 0 0 13px;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.chart-wrap { position: relative; height: 220px; }
.donut-wrap { display: flex; align-items: center; gap: 15px; min-height: 220px; }
.donut-canvas { position: relative; width: 58%; min-width: 0; height: 220px; }

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 12px;
}

.donut-center strong { font-size: 14px; }
.custom-legend { display: flex; flex: 1; flex-direction: column; gap: 15px; min-width: 0; font-size: 12px; }
.legend-item { display: grid; grid-template-columns: 12px 1fr; align-items: start; gap: 8px; }
.legend-dot { width: 12px; height: 12px; margin-top: 2px; border-radius: 50%; }
.legend-name { display: flex; justify-content: space-between; gap: 8px; }
.legend-name span:last-child { white-space: nowrap; }

.table-card { padding: 15px; }
.table thead th { color: #627181; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.table tbody td { font-size: 12px; }
.table tbody td:nth-child(4) { min-width: 140px; }
.footer-banner { padding: 0 16px 18px; }
.footer-banner img { display: block; width: 100%; height: auto; border-radius: 7px; }

@media (max-width: 767px) {
    .hero img { min-height: 120px; object-fit: cover; }
    .stat-card { min-height: 132px; padding: 13px; }
    .stat-card > i { margin-bottom: 8px; font-size: 23px; }
    .stat-label { font-size: 10px; }
    .stat-value { font-size: 24px; }
    .stat-small-value { font-size: 17px; }
    .donut-wrap { flex-direction: column; }
    .donut-canvas { width: 100%; height: 200px; }
    .custom-legend { width: 100%; gap: 10px; }
    .chart-wrap { height: 240px; }
    .footer-banner { padding: 0 12px 14px; }
}
