.stats-redesign { background: #0b0b0c; color: #f7f7f8; }
.stats-page-main { min-height: calc(100vh - 214px); padding-top: 78px; }
.stats-page-section { padding: 68px 0 104px; }
.stats-shell { max-width: 1160px; }
.stats-account-link svg { width: 17px; height: 17px; }

.stats-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid #2a2a2e;
}
.stats-redesign .section-label,
.stats-kicker {
  color: var(--accent);
  font: 600 11px/1.5 Consolas, monospace;
  text-transform: uppercase;
}
.stats-redesign .section-label {
  display: inline-block;
  width: auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.stats-kicker { display: block; }
.stats-heading h1 {
  margin: 12px 0 0;
  color: #f7f7f8;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 750;
  line-height: 1.02;
}
.stats-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.stats-sync-status { max-width: 310px; color: #85858c; font-size: 12px; line-height: 1.45; text-align: right; }
.stats-sync-status[data-tone="success"] { color: #9dcac2; }
.stats-sync-status[data-tone="error"] { color: #ff8f8f; }
.stats-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  color: #e9e9ec;
  background: #141416;
  border: 1px solid #36363b;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.stats-refresh-button:hover { color: #fff; border-color: #5d837c; transform: translateY(-1px); }
.stats-refresh-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.stats-refresh-button svg { width: 15px; height: 15px; }
.stats-refresh-button.is-loading svg { animation: stats-spin 700ms linear infinite; }
@keyframes stats-spin { to { transform: rotate(360deg); } }
.stats-dashboard { margin-top: 36px; overflow: hidden; background: #111113; border: 1px solid #2a2a2e; border-radius: 7px; }
.stats-command-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  min-height: 230px;
  padding: 38px 42px;
  background: #141416;
  border-bottom: 1px solid #2a2a2e;
}
.stats-command-copy > strong { display: block; margin-top: 7px; color: #fff; font-size: clamp(72px, 10vw, 118px); font-weight: 760; line-height: .95; }
.stats-command-copy p { margin: 17px 0 0; color: #85858c; font-size: 13px; }
.stats-reliability { display: flex; align-items: center; gap: 19px; min-width: 294px; padding-left: 36px; border-left: 1px solid #303034; }
.stats-reliability > div { display: grid; gap: 2px; }
.stats-reliability > div strong { color: #ededf0; font-size: 14px; }
.stats-reliability > div span { max-width: 130px; color: #77777e; font-size: 11px; line-height: 1.45; }
.stats-ring {
  --stats-rate: 0;
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--stats-rate) * 1%), #29292e 0);
  position: relative;
}
.stats-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #141416; }
.stats-ring strong { position: relative; z-index: 1; color: #f7f7f8; font-size: 22px; }

.stats-summary-grid { display: grid; grid-template-columns: 1fr 1.35fr 1fr; border-bottom: 1px solid #2a2a2e; }
.stats-summary-grid article { display: flex; align-items: center; gap: 15px; min-width: 0; padding: 22px 27px; border-left: 1px solid #2a2a2e; }
.stats-summary-grid article:first-child { border-left: 0; }
.stats-summary-icon { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; color: var(--accent); background: #17211f; border: 1px solid #2d4d47; border-radius: 50%; }
.stats-summary-icon svg { width: 16px; height: 16px; }
.stats-summary-grid article > div { display: grid; min-width: 0; }
.stats-summary-grid article span:not(.stats-summary-icon) { color: #76767d; font: 600 10px/1.4 Consolas, monospace; text-transform: uppercase; }
.stats-summary-grid article strong { overflow: hidden; color: #ededf0; font-size: 17px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }

.stats-detail-layout { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(280px, .78fr); }
.stats-feature-panel,
.stats-command-panel { min-width: 0; padding: 34px; }
.stats-command-panel { border-left: 1px solid #2a2a2e; }
.stats-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.stats-panel-heading h2 { margin: 7px 0 0; color: #efeff1; font-size: 21px; line-height: 1.2; }
.stats-panel-heading > span { color: #6f6f76; font-size: 11px; }
.stats-activity-list { display: grid; }
.stats-activity-row { --stat-progress: 0%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid #29292d; }
.stats-activity-row:first-child { border-top-color: #37373c; }
.stats-activity-icon { display: grid; place-items: center; width: 32px; height: 32px; color: #a3a3aa; }
.stats-activity-icon svg { width: 16px; height: 16px; }
.stats-activity-row > div { display: grid; gap: 7px; min-width: 0; }
.stats-activity-row > div > span:first-child { color: #bcbcc2; font-size: 12px; }
.stats-activity-row > strong { min-width: 42px; color: #f0f0f2; font: 650 14px/1.2 Consolas, monospace; text-align: right; }
.stats-progress { display: block; width: 100%; height: 3px; overflow: hidden; background: #28282d; }
.stats-progress i { display: block; width: var(--stat-progress); height: 100%; background: var(--accent); transition: width 500ms cubic-bezier(.16, 1, .3, 1); }

.stats-health-list { margin: 0; border-block: 1px solid #303035; }
.stats-health-list > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 0; border-top: 1px solid #27272b; }
.stats-health-list > div:first-child { border-top: 0; }
.stats-health-list dt { display: flex; align-items: center; gap: 9px; color: #aaaab1; font-size: 12px; }
.stats-health-list dd { margin: 0; color: #f1f1f3; font: 650 14px/1.2 Consolas, monospace; }
.stats-health-dot { width: 7px; height: 7px; border-radius: 50%; background: #85858c; }
.stats-health-dot.is-success { background: var(--accent); box-shadow: 0 0 8px rgb(115 245 223 / 30%); }
.stats-health-dot.is-failed { background: #ff7979; }
.stats-health-dot.is-manual { background: #c8a7ff; }
.stats-secondary-list { margin-top: 22px; }
.stats-secondary-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; color: #77777e; font-size: 11px; }
.stats-secondary-list strong { color: #bebec4; font: 600 12px Consolas, monospace; }
.stats-account-action { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; color: #e8e8eb; font-size: 12px; font-weight: 650; }
.stats-account-action:hover { color: var(--accent); }
.stats-account-action svg { width: 14px; height: 14px; transition: transform 160ms ease; }
.stats-account-action:hover svg { transform: translateX(3px); }

.stats-signin-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-top: 32px; padding: 27px 30px; background: #121214; border: 1px solid #2b2b30; border-radius: 6px; }
.stats-signin-panel[hidden] { display: none !important; }
.stats-signin-icon { display: grid; place-items: center; width: 50px; height: 50px; color: var(--accent); background: #17211f; border: 1px solid #31534d; border-radius: 50%; }
.stats-signin-icon svg { width: 20px; height: 20px; }
.stats-signin-panel h2 { margin: 4px 0 2px; color: #efeff1; font-size: 21px; }
.stats-signin-panel p { margin: 0; color: #85858c; font-size: 13px; }
.stats-signin-panel .lp-button { min-height: 44px; padding: 10px 17px; font-size: 12px; }
.stats-redesign.stats-is-signed-out .stats-dashboard { display: none; }
.stats-redesign.stats-is-signed-out .stats-heading-actions { display: none; }

@media (max-width: 900px) {
  .stats-page-section { padding-top: 50px; }
  .stats-heading { align-items: flex-start; }
  .stats-heading-actions { flex-direction: column-reverse; align-items: flex-end; }
  .stats-command-hero { padding: 34px; }
  .stats-reliability { min-width: 260px; padding-left: 28px; }
  .stats-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-summary-grid article:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid #2a2a2e; border-left: 0; }
  .stats-detail-layout { grid-template-columns: 1fr; }
  .stats-command-panel { border-top: 1px solid #2a2a2e; border-left: 0; }
}

@media (max-width: 700px) {
  .stats-page-main { padding-top: 70px; }
  .stats-page-section { padding: 42px 0 72px; }
  .stats-redesign .lp-shell { width: min(100% - 34px, 1160px); }
  .stats-heading { display: grid; }
  .stats-heading-actions { align-items: flex-start; }
  .stats-sync-status { text-align: left; }
  .stats-dashboard { margin-top: 28px; }
  .stats-command-hero { grid-template-columns: 1fr; gap: 26px; padding: 29px 24px; }
  .stats-reliability { min-width: 0; padding: 24px 0 0; border-top: 1px solid #303034; border-left: 0; }
  .stats-ring { width: 88px; }
  .stats-ring strong { font-size: 19px; }
  .stats-summary-grid { grid-template-columns: 1fr; }
  .stats-summary-grid article { border-top: 1px solid #2a2a2e; border-left: 0; }
  .stats-summary-grid article:first-child { border-top: 0; }
  .stats-summary-grid article:nth-child(3) { grid-column: auto; }
  .stats-feature-panel, .stats-command-panel { padding: 28px 23px; }
  .stats-panel-heading > span { display: none; }
  .stats-signin-panel { grid-template-columns: auto minmax(0, 1fr); padding: 24px; }
  .stats-signin-panel .lp-button { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .stats-progress i { transition: none; }
  .stats-refresh-button.is-loading svg { animation: none; }
}
