:root {
  color-scheme: light;
  --ink: #142628;
  --muted: #536668;
  --paper: #f3f6f5;
  --card: #fff;
  --line: #dbe5e2;
  --accent: #066655;
  --accent-soft: #e4f4ee;
  --warn: #895018;
  font: 15px/1.55 "Inter", "Segoe UI", "Microsoft YaHei UI", sans-serif;
}
* { box-sizing: border-box; }
body { color: var(--ink); background: var(--paper); margin: 0; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.55rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.25rem; }
h3 { font-size: .86rem; font-weight: 650; }
a, button, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1160px; margin: 0 auto; min-height: 64px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: var(--ink); font-weight: 750; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand-mark { background: var(--accent); width: 25px; height: 25px; border-radius: 7px; position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 7px; border: 2px solid #fff; border-radius: 50%; }
nav { align-self: stretch; display: flex; gap: clamp(10px, 3vw, 28px); align-items: center; }
nav a { display: grid; place-items: center; min-height: 64px; text-decoration: none; color: var(--muted); border-top: 2px solid transparent; border-bottom: 2px solid transparent; }
nav a[aria-current] { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.shell { width: min(1160px, 100%); margin: auto; padding: 38px 28px 56px; }
.heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.heading p { color: var(--muted); margin-top: 8px; }
.timezone { color: var(--muted); white-space: nowrap; font-size: .78rem; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; }
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
#dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.node-card { padding: 22px; }
.node-heading, .node-title, .section-label, .action-row { display: flex; align-items: center; gap: 10px; }
.node-heading, .section-label { justify-content: space-between; }
.node-heading { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.node-code { font: 700 .78rem/1 ui-monospace, monospace; background: var(--accent-soft); color: var(--accent); padding: 7px 8px; border-radius: 6px; }
.status { background: var(--accent-soft); color: var(--accent); padding: 4px 9px; border-radius: 20px; font-size: .75rem; }
.status.pending { background: #faf0e1; color: var(--warn); }
.section-label { margin: 18px 0 12px; }
.section-label span, .detail, .published, .empty { color: var(--muted); font-size: .76rem; }
.metric-grid, .client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 11px; }
.metric.over { background: #fff7ed; border-color: #ecd6b7; }
.metric > span { color: var(--muted); font-size: .8rem; }
.value { font-size: 1.28rem; font-weight: 750; font-variant-numeric: tabular-nums; margin: 2px 0; overflow-wrap: anywhere; }
.value small { color: var(--muted); font-weight: 650; font-size: .65rem; }
.client-grid { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.client-addresses { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.client-addresses summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.client-addresses > p { margin-top: 7px; }
.client-address-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.client-address-grid ul { margin: 4px 0 0; padding-left: 16px; overflow-wrap: anywhere; }
.account-card { max-width: 470px; }
.trend { margin: 18px 0 0; }
.trend figcaption { display: flex; justify-content: space-between; color: var(--muted); font-size: .76rem; margin-bottom: 4px; }
canvas { display: block; width: 100%; height: 110px; }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 400px); padding: 30px; }
.login-card h1 { margin: 18px 0; font-size: 1.65rem; }
.stack { display: grid; gap: 13px; }
label { display: grid; gap: 5px; font-weight: 650; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid #afbfbb; border-radius: 7px; padding: 8px 10px; }
textarea { font-family: ui-monospace, monospace; resize: vertical; }
button { font: inherit; font-weight: 650; border: 0; border-radius: 7px; padding: 8px 15px; cursor: pointer; background: var(--accent); color: white; }
.text-button { padding: 5px 1px; background: transparent; color: var(--muted); }
.text-button.revoke { color: #a13527; }
.notice { background: var(--accent-soft); padding: 12px 15px; border-radius: 7px; margin-bottom: 16px; }
.notice.error { color: #8a270f; background: #ffede8; }
.notice input { margin: 3px 0; }
.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.form-card { padding: 21px; }
.form-card h2 { margin-bottom: 12px; }
.published { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 8px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .76rem; }
@media (max-width: 950px) { #dashboard { grid-template-columns: 1fr; } }
@media (max-width: 660px) {
  .topbar-inner, .shell { padding-left: 14px; padding-right: 14px; }
  .shell { padding-top: 25px; }
  .heading { align-items: start; }
  .timezone { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .node-card { padding: 14px; }
  .metric { padding: 7px; }
  .value { font-size: 1.12rem; }
}
