:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  --background: #f4f5f7;
  --surface: #ffffff;
  --text: #25272c;
  --muted: #5a606a;
  --line: #d9dce2;
  --edge: #8b919c;
  --action: #303239;
  --action-text: #ffffff;
  --focus: #315f9e;
  --error: #a02742;
  --good: #22644d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1e2024;
    --surface: #27292e;
    --text: #f1f2f4;
    --muted: #b8bec9;
    --line: #444954;
    --edge: #828b99;
    --action: #e8ebf1;
    --action-text: #23262c;
    --focus: #9dc3f6;
    --error: #ffa8b8;
    --good: #a7dfc7;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

button, input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: 28px; font-weight: 650; }
h2 { font-size: 18px; font-weight: 640; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.dashboard {
  width: min(1100px, calc(100% - 64px));
  margin-inline: auto;
}

.header-inner,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-inner { padding-block: 13px; }
.brand, .session { display: flex; align-items: center; gap: 11px; }
.brand { font-size: 17px; font-weight: 650; white-space: nowrap; }
.brand img { display: block; flex: none; }
.brand-context { margin-inline-start: 13px; font-size: 13px; font-weight: 500; color: var(--muted); }
.session { font-size: 13px; overflow-wrap: anywhere; }

.login {
  width: min(400px, calc(100% - 44px));
  margin: clamp(52px, 11vh, 132px) auto 48px;
  padding: 28px 0;
  border-top: 2px solid var(--action);
}

.login h1 { margin-bottom: 24px; }
#verify-title { margin-bottom: 6px; }
#delivery { margin-bottom: 22px; overflow-wrap: anywhere; }
.login label { display: block; margin: 14px 0 6px; font-weight: 580; }

.login input {
  width: 100%;
  min-height: 44px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 7px 12px;
}

#code { font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

button {
  cursor: pointer;
  border: 1px solid transparent;
  color: inherit;
  min-height: 36px;
  background: transparent;
  border-radius: 8px;
  padding: 5px 12px;
  font-weight: 560;
}

button:disabled { cursor: default; opacity: .52; }
.primary { width: 100%; margin-top: 22px; min-height: 44px; color: var(--action-text); background: var(--action); }
.primary:hover:enabled { opacity: .9; }
.secondary:hover:enabled { border-color: var(--line); background: var(--surface); }
.form-tools { display: flex; justify-content: space-between; margin-top: 10px; }
.error { color: var(--error); margin-top: 14px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
#retry { margin-top: 10px; }

.dashboard { padding-block: 46px 60px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0 36px;
  border-block: 1px solid var(--line);
}

.metrics div { padding: 17px 18px; border-inline-start: 1px solid var(--line); }
.metrics div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.metrics dt, .range { font-size: 13px; color: var(--muted); }
.metrics dd { font-size: 29px; font-weight: 610; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.accounts-heading { margin-bottom: 10px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }

th, td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th { background: var(--surface); color: var(--muted); font-weight: 630; white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
td:first-child { overflow-wrap: anywhere; font-weight: 560; }
td:not(:first-child) { white-space: nowrap; }
.right { text-align: right; }
.synced { color: var(--good); }
.empty { padding-block: 30px; text-align: center; }
.pagination { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }

@media (max-width: 660px) {
  .header-inner, .dashboard { width: calc(100% - 36px); }
  .header-inner { flex-wrap: wrap; }
  .session { width: 100%; justify-content: space-between; }
  .dashboard { padding-top: 30px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .metrics div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  th, td { padding-inline: 10px; }
}
