:root {
  color-scheme: dark;
  --bg: #0b1212;
  --surface: #121e1e;
  --text: #eef5ef;
  --muted: #a3b6b1;
  --line: #2b3c39;
  --accent: #7ae4be;
  --warning: #e6c487;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; }
button { color: inherit; font: inherit; cursor: pointer; min-height: 44px; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.shell { max-width: 1080px; margin: auto; padding: 28px 40px 32px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; }
.brand strong { font-size: 25px; letter-spacing: -.6px; font-weight: 700; }
.brand span, .event-range { font-size: 13px; color: var(--muted); }
.event-range { white-space: nowrap; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 32px 0 26px; }
h1 { font-size: clamp(23px, 3vw, 32px); font-weight: 600; line-height: 1.4; letter-spacing: -.5px; }
.page-heading p { margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.refresh-button { flex: 0 0 auto; padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.refresh-button:hover:not(:disabled) { border-color: var(--accent); }
.period-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.period-tabs button { background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 10px 6px; color: var(--muted); font-size: 15px; }
.period-tabs button:hover { color: var(--text); background: var(--surface); }
.period-tabs button[aria-selected="true"] { color: var(--accent); background: #18342c; border-color: #416859; font-weight: 600; }
.data-status { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 17px 1px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.connection-status { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.connection-status::before { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.connection-status.stale { color: var(--warning); }
.connection-status.stale::before { background: var(--warning); }
.summary-panel { padding: 28px 30px 22px; background: #132b24; border: 1px solid #365449; border-radius: 16px; }
.summary-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.summary-heading h2 { font-size: 17px; font-weight: 600; }
.summary-heading > span { color: #afcbbd; font-size: 13px; }
.summary-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.summary-metrics > div + div { border-left: 1px solid #3d5c50; padding-left: 30px; }
.metric-label { display: block; font-size: 14px; color: #c2d9ce; }
.metric-note { display: inline-block; font-size: 11px; margin-left: 9px; color: #9cb8a8; }
.summary-metrics p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.summary-metrics strong { font-size: clamp(31px, 4.6vw, 54px); font-weight: 600; letter-spacing: -1.5px; line-height: 1.2; }
.unit { font-size: 12px; color: #afcbbd; }
.summary-footnote { border-top: 1px solid #2b483b; padding-top: 15px; margin-top: 23px; color: #a7c1b1; font-size: 12px; line-height: 1.6; }
.accounts-panel { margin-top: 22px; padding: 24px 30px 2px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.accounts-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 7px; }
.accounts-heading h2 { font-size: 17px; font-weight: 600; }
.accounts-heading > span { font-size: 12px; color: var(--muted); }
.account-list { list-style: none; margin: 0; padding: 0; }
.account-row { padding: 22px 0 24px; }
.account-row + .account-row { border-top: 1px solid #233530; }
.account-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 130px) minmax(90px, 130px); gap: 20px; align-items: center; }
.account-name { font-size: 17px; font-weight: 500; line-height: 1.45; }
.account-id { margin-top: 5px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.account-count { text-align: right; }
.account-count span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.account-count strong { font-size: 25px; font-weight: 600; letter-spacing: -.5px; }
.account-meter { display: block; appearance: none; -webkit-appearance: none; border: 0; width: 100%; height: 5px; margin-top: 16px; background: #253b35; border-radius: 4px; }
.account-meter::-webkit-meter-bar { height: 5px; border: 0; background: #253b35; border-radius: 4px; }
.account-meter::-webkit-meter-optimum-value { background: #79ae98; border-radius: 4px; }
.account-meter::-moz-meter-bar { background: #79ae98; border-radius: 4px; }
.loading, .empty-notice { margin: 18px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-notice { padding: 12px 14px; border-left: 2px solid #527b67; background: #162923; }
.error-panel { margin: 16px 0; padding: 14px 16px; border: 1px solid #806a43; border-radius: 8px; color: #f0d6a8; background: #30291f; font-size: 13px; line-height: 1.7; }
.error-panel button { margin-top: 9px; padding: 5px 12px; background: transparent; border: 1px solid #a28a60; border-radius: 6px; }
.page-footer { padding: 22px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.page-footer p + p { margin-top: 4px; }
@media (max-width: 600px) {
  .shell { padding: 20px 18px 28px; }
  .topbar { padding-bottom: 18px; align-items: flex-start; }
  .brand { flex-direction: column; gap: 3px; }
  .brand strong { font-size: 22px; }
  .brand span, .event-range { font-size: 11px; }
  .event-range { padding-top: 5px; }
  .page-heading { gap: 12px; margin: 25px 0 20px; }
  .page-heading p { font-size: 11px; max-width: 220px; }
  h1 { font-size: 23px; }
  .refresh-button { font-size: 12px; padding: 6px 11px; }
  .period-tabs { gap: 4px; padding-bottom: 13px; }
  .period-tabs button { font-size: 13px; padding: 9px 3px; }
  .data-status { font-size: 10px; gap: 5px; }
  .summary-panel { padding: 21px 20px 17px; border-radius: 13px; }
  .summary-heading { margin-bottom: 21px; }
  .summary-heading h2, .accounts-heading h2 { font-size: 16px; }
  .summary-heading > span { font-size: 10px; }
  .summary-metrics { gap: 18px; }
  .summary-metrics > div + div { padding-left: 18px; }
  .metric-label { font-size: 12px; }
  .metric-note { display: block; margin: 3px 0 0; font-size: 10px; }
  .summary-metrics > div + div .metric-label { padding-bottom: 17px; }
  .summary-metrics strong { font-size: clamp(26px, 7vw, 38px); letter-spacing: -1px; }
  .summary-metrics p { gap: 5px; }
  .unit { font-size: 10px; }
  .summary-footnote { font-size: 10px; margin-top: 19px; padding-top: 12px; }
  .accounts-panel { padding: 21px 20px 0; margin-top: 17px; border-radius: 13px; }
  .accounts-heading > span { font-size: 10px; }
  .account-main { grid-template-columns: minmax(0, 1fr) minmax(58px, .62fr) minmax(58px, .62fr); gap: 10px; }
  .account-name { font-size: 15px; }
  .account-id { font-size: 10px; }
  .account-count strong { font-size: 21px; }
  .account-count span { font-size: 10px; }
  .account-row { padding: 20px 0 22px; }
  .page-footer { font-size: 10px; }
}
@media (max-width: 360px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .period-tabs button { font-size: 12px; }
  .summary-panel, .accounts-panel { padding-left: 15px; padding-right: 15px; }
  .summary-metrics { gap: 12px; }
  .summary-metrics > div + div { padding-left: 12px; }
  .account-main { gap: 8px; }
  .account-name { font-size: 13px; }
  .account-count strong { font-size: 19px; }
  h1 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

#identities .account-name { overflow-wrap: anywhere; }
