:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24172f;
  background: #f7f4fa;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f7f4fa; color: #24172f; }
a { color: #6a3ea1; }
.stats-wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.stats-header { background: #1e102f; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.stats-header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.stats-brand { display: inline-flex; align-items: center; }
.stats-brand img { display: block; width: 150px; height: auto; }
.header-actions { display: flex; align-items: center; gap: 18px; font-size: 14px; color: #d4c9de; }
.header-actions a { color: #fff; text-underline-offset: 3px; }
main.stats-wrap { padding: 42px 0 56px; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 4px; color: #6a3ea1; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; }
h2 { margin: 0 0 16px; font-size: 22px; }
h3 { margin: 0 0 16px; font-size: 15px; color: #5e5069; }
.subtle, .hint { color: #716679; }
.subtle { margin: 10px 0 0; }
.hint { margin: 12px 0 0; font-size: 13px; }
.period-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 34px; }
.period-card, .metric-card, .panel { background: #fff; border: 1px solid #e9e1ef; border-radius: 16px; box-shadow: 0 8px 30px rgba(55,32,75,.05); }
.period-card { padding: 20px; }
.metric-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-pair div { min-width: 0; }
.metric-pair strong, .metric-card strong { display: block; font-size: 28px; line-height: 1.1; color: #352046; }
.metric-pair span, .metric-card span { display: block; margin-top: 5px; color: #7d7185; font-size: 12px; }
.detail-section { margin: 0 0 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.period-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.period-tabs a { padding: 7px 11px; border-radius: 999px; text-decoration: none; border: 1px solid #dfd3e7; background: #fff; color: #5f4e69; font-size: 13px; }
.period-tabs a[aria-current="page"] { background: #4e2f66; color: #fff; border-color: #4e2f66; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; }
.metric-card { padding: 16px; }
.metric-card strong { margin-top: 8px; font-size: 24px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.panel { padding: 20px; margin: 18px 0; overflow: hidden; }
.two-col .panel { margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 10px; text-align: left; border-bottom: 1px solid #eee8f2; vertical-align: top; }
th { color: #6f6179; font-size: 12px; text-transform: uppercase; letter-spacing: .035em; background: #fbf9fc; }
tbody tr:last-child td { border-bottom: 0; }
.path-cell { max-width: 420px; overflow-wrap: anywhere; }
progress { width: min(240px, 28vw); height: 10px; accent-color: #6a3ea1; }
.alert { border: 1px solid #e7c8c8; background: #fff1f1; color: #7c2727; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.stats-footer { border-top: 1px solid #e5ddeb; padding: 22px 0; color: #756a7c; font-size: 13px; }
.stats-footer .stats-wrap { display: flex; justify-content: space-between; gap: 20px; }
.stats-login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #1e102f; }
.login-shell { width: min(430px, 100%); }
.login-card { background: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.login-card .stats-brand { margin-bottom: 26px; }
.login-card h1 { font-size: 32px; }
.login-card p { color: #74687b; }
.login-card form { display: grid; gap: 9px; margin-top: 22px; }
.login-card label { font-weight: 700; font-size: 14px; }
.login-card input { width: 100%; border: 1px solid #cfc3d8; border-radius: 10px; padding: 12px 13px; font: inherit; }
.login-card input:focus { outline: 3px solid rgba(106,62,161,.18); border-color: #6a3ea1; }
.login-card button { border: 0; border-radius: 10px; padding: 12px 14px; background: #4e2f66; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.back-link { display: inline-block; margin-top: 18px; font-size: 14px; }
@media (max-width: 980px) {
  .period-grid { grid-template-columns: repeat(2,1fr); }
  .metric-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 720px) {
  .stats-wrap { width: min(100% - 22px, 1180px); }
  .stats-header-inner, .title-row, .section-heading { align-items: flex-start; flex-direction: column; }
  .stats-header-inner { justify-content: center; padding: 14px 0; }
  .header-actions { width: 100%; justify-content: space-between; }
  main.stats-wrap { padding-top: 28px; }
  .period-grid, .metric-grid, .two-col { grid-template-columns: 1fr; }
  .metric-pair strong { font-size: 24px; }
  .period-tabs { width: 100%; }
  .period-tabs a { flex: 1; text-align: center; }
  .stats-footer .stats-wrap { flex-direction: column; }
  progress { width: 140px; }
}
