.stats-page { min-height: 100vh; padding: 0 24px 72px; color: var(--ink); background: #f4f8f5; }
.stats-header { max-width: 1180px; min-height: 84px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.stats-back { color: var(--green-deep); font-size: 14px; font-weight: 780; text-decoration: none; }
.stats-hero { max-width: 1180px; margin: 0 auto 24px; padding: 64px; color: var(--white); background: linear-gradient(135deg, #075e54, #087666); border-radius: 30px; box-shadow: var(--shadow); }
.stats-hero .eyebrow { color: #9be9bd; }
.stats-hero h1 { margin-bottom: 18px; color: var(--white); }
.stats-hero > p:not(.eyebrow) { max-width: 720px; margin: 0; color: #d9eee6; font-size: 18px; }
.stats-periods { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.stats-periods button { appearance: none; padding: 10px 15px; color: #d9eee6; background: transparent; border: 1px solid rgba(255,255,255,0.24); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.stats-periods button:hover { border-color: rgba(255,255,255,0.65); }
.stats-periods button[aria-current="page"] { color: var(--green-deep); background: var(--white); border-color: var(--white); }
.stats-load-status { max-width: 1180px; margin: 0 auto 24px; padding: 13px 18px; color: var(--green-deep); background: #e5f5ed; border: 1px solid #b5decc; border-radius: 12px; font-size: 13px; font-weight: 700; }
.stats-load-status.is-error { color: #7c2d12; background: #fff7ed; border-color: #fed7aa; }
.stats-load-status[hidden] { display: none; }
.stats-kpis { max-width: 1180px; margin: 0 auto 24px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.stats-kpis article, .stats-panel { background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 34px rgba(13,69,52,0.06); }
.stats-kpis article { min-height: 145px; padding: 25px; display: grid; align-content: space-between; }
.stats-kpis span { color: var(--muted); font-size: 13px; font-weight: 760; }
.stats-kpis strong { color: var(--green-deep); font-size: clamp(30px, 3.4vw, 44px); font-variant-numeric: tabular-nums; }
.stats-kpis .stats-date { font-size: 19px; line-height: 1.25; }
.stats-panel { padding: 30px; }
.stats-chart-panel { max-width: 1180px; margin: 0 auto 24px; }
.stats-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.stats-panel-heading .eyebrow { margin-bottom: 9px; }
.stats-panel-heading h2, .stats-panel h2 { margin-bottom: 0; font-size: 25px; }
.stats-panel-heading > span { color: var(--muted); font-size: 12px; }
.stats-chart { height: 235px; margin-top: 35px; display: flex; align-items: stretch; gap: clamp(3px, 0.7vw, 9px); overflow-x: auto; border-bottom: 1px solid var(--line); }
.stats-chart > .stats-empty { width: 100%; margin: auto 0; }
.stats-chart > div { min-width: 4px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.stats-chart span { width: 100%; max-width: 24px; min-height: 3px; background: linear-gradient(180deg, var(--green), var(--green-deep)); border-radius: 5px 5px 0 0; }
.stats-chart small { height: 18px; color: var(--muted); font-size: 9px; }
.stats-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stats-ranking { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.stats-ranking li { position: relative; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 10px; overflow: hidden; border-radius: 8px; }
.stats-ranking li::before { width: var(--bar-width); content: ""; position: absolute; inset: 0 auto 0 0; background: var(--green-soft); border-radius: inherit; }
.stats-ranking li > * { position: relative; z-index: 1; }
.stats-ranking li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.stats-ranking strong { white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.stats-ranking small { margin-left: 4px; color: var(--muted); font-size: 10px; }
.stats-empty { margin: 24px 0 0; color: var(--muted); }
.stats-note { max-width: 1180px; margin: 16px auto 0; padding: 24px 28px; color: #d9eee6; background: #0f211b; border-radius: 18px; }
.stats-note p { margin: 7px 0 0; color: #b8c9c2; font-size: 13px; }

@media (max-width: 1050px) {
  .stats-kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .stats-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .stats-page { padding-inline: 14px; }
  .stats-header { min-height: 70px; }
  .stats-hero { padding: 40px 25px; border-radius: 22px; }
  .stats-kpis, .stats-grid { grid-template-columns: 1fr; }
  .stats-kpis article { min-height: 118px; }
  .stats-panel { padding: 24px 20px; }
  .stats-chart { height: 190px; }
}
