:root {
  color-scheme: dark;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  --background: #0b1320;
  --panel: #121e2f;
  --line: #293a53;
  --text: #ecf3ff;
  --muted: #a4b7cf;
  --cyan: #94e6f3;
  --mint: #85eac0;
  --amber: #ffd194;
  --rose: #ffa6ad;
  --mono: "IBM Plex Mono", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at 74% 0%, #163343 0, transparent 48%), var(--background);
}
h1, h2, p, dl, dd { margin: 0; }
button, input, select { font: inherit; }
:is(a, button, input, select):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.status-page {
  width: min(100% - 40px, 1060px);
  margin-inline: auto;
  padding: clamp(30px, 5vw, 67px) 0 52px;
}

.page-heading, .overview-heading, .account-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
}
.page-heading { margin-bottom: 22px; }
h1 { font-size: clamp(27px, 4vw, 44px); letter-spacing: -.045em; line-height: 1.16; }
h2 { font-size: 18px; font-weight: 650; }
.status-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid #3d556e;
  border-radius: 8px;
  color: var(--cyan);
  background: #16253a;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.status-button:hover { background: #20364d; }
.status-button:disabled { opacity: .48; cursor: default; }

.status-overview, .account-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.status-overview {
  padding: clamp(15px, 2.6vw, 27px);
  background: linear-gradient(135deg, #152537, var(--panel) 68%);
}
.data-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--amber);
}
.data-state[data-state="available"] { color: var(--mint); }
.data-state::before, .account-badge::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.data-state::before { box-shadow: 0 0 10px currentColor; }
.updated-time, .account-count {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.status-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}
.status-metrics > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-top: 2px solid #8294a9;
  border-radius: 8px;
  background: #111c2b;
}
.status-metrics dt { color: var(--muted); font-size: 12px; }
.status-metrics dd {
  margin-top: 6px;
  font: 600 clamp(19px, 2.7vw, 29px)/1.15 var(--mono);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.status-metrics .metric-available { border-top-color: var(--mint); color: var(--mint); }
.status-metrics .metric-limited { border-top-color: var(--amber); color: var(--amber); }
.status-metrics .metric-unavailable { border-top-color: var(--rose); color: var(--rose); }

.account-panel { margin-top: 16px; overflow: hidden; }
.account-toolbar { flex-wrap: wrap; padding: 16px clamp(15px, 2.6vw, 27px); }
.account-filters { display: flex; flex-wrap: wrap; gap: 9px; }
.account-filters label { color: var(--muted); font-size: 12px; }
.account-filters input, .account-filters select {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 5px;
  padding: 6px 10px;
  border: 1px solid #3c536c;
  border-radius: 7px;
  color: var(--text);
  background: #0d1726;
  font-size: 13px;
}
.account-filters input::placeholder { color: var(--muted); }
.account-message {
  margin: 0 clamp(15px, 2.6vw, 27px) 17px;
  padding: 28px 15px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.account-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.account-table :is(th, td) {
  padding: 10px clamp(15px, 2.6vw, 27px);
  border-top: 1px solid var(--line);
}
.account-table th { color: var(--muted); background: #101b2c; font-weight: 500; }
.account-table :is(th, td):last-child { width: 150px; }
.account-id { color: var(--cyan); font-family: var(--mono); overflow-wrap: anywhere; }
.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #3a4c64;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.account-badge::before { width: 5px; height: 5px; }
.account-badge[data-state="available"] { color: var(--mint); }
.account-badge[data-state="limited"] { color: var(--amber); }
.account-badge[data-state="unavailable"] { color: var(--rose); }
.account-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 13px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 12px var(--mono);
}

@media (max-width: 600px) {
  .status-page { width: calc(100% - 22px); }
  .status-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-metrics > div:first-child { grid-column: 1 / -1; }
  .account-filters { width: 100%; }
  .account-filters label:first-child { flex: 1 1 125px; }
  .account-table :is(th, td):last-child { width: 90px; }
}
