:root {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #192840;
  background: #f5f7fa;
  font-size: 15px;
  line-height: 1.5;
  --muted: #586880;
  --border: #dbe3ed;
  --accent: #174fb8;
  --soft-blue: #edf3ff;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: #22344c; background: white; border: 1px solid #c9d4e3; border-radius: 8px;
  min-height: 40px; padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
button:hover, .button:hover { background: var(--soft-blue); text-decoration: none; }
.primary { color: white; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.primary:hover { background: #0f3e99; }
button:disabled { opacity: .5; cursor: default; }
.danger { color: #9d2334; }
.quiet { background: transparent; border-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 24px; border-bottom: 1px solid var(--border);
  background: #fff; padding: 0 clamp(16px, 4vw, 60px); min-height: 66px;
}
.brand { font-size: 16px; font-weight: 760; color: #162740; display: inline-flex; align-items: center; gap: 10px; }
.mark { background: #184caa; color: white; border-radius: 8px; padding: 6px 9px; font-size: 11px; }
.site-header nav { display: flex; gap: 5px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); font-weight: 600; padding: 10px 12px; border-radius: 7px; }
.site-header nav a[aria-current] { color: var(--accent); background: var(--soft-blue); }
.account { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; }
main { width: 100%; max-width: 1680px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 60px); }
.standalone { padding-top: clamp(28px, 9vh, 100px); }
.site-icp-footer { margin-top: auto; text-align: center; padding: 12px 16px 24px; font-size: 0.875rem; }
.site-icp-footer a { color: var(--muted); }
h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.2; margin: 0 0 6px; letter-spacing: -.03em; }
h2 { font-size: 17px; margin: 0; }
p { margin: 0; }
.heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 23px; }
.heading h1:not(:first-child) { margin-top: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.muted, small { color: var(--muted); }
small { display: block; font-size: 12px; }
code { overflow-wrap: anywhere; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; min-width: 0; }
.login { max-width: 440px; margin: auto; padding: 28px; }
.login form { margin-top: 20px; }
.panel-heading, .form-panel { padding: 20px; }
.form-panel { max-width: 900px; }
.stack { display: grid; gap: 14px; }
.form-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-grid { max-width: 1260px; }
label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
input:not([type=checkbox]), select, textarea { width: 100%; border: 1px solid #c9d4e3; border-radius: 7px; background: white; padding: 8px 10px; color: #192840; min-height: 40px; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { accent-color: var(--accent); width: 17px; height: 17px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metrics div { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; }
.metrics span { display: block; color: var(--muted); font-size: 13px; }
.metrics strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; margin-top: 4px; overflow-wrap: anywhere; }
.snapshot { margin: 0; }
.toolbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.panel .toolbar { justify-content: start; padding: 14px; margin: 0; }
.search { min-width: min(260px, 100%); }
.notice { border-radius: 8px; background: var(--soft-blue); color: #24497d; padding: 10px 13px; margin-bottom: 14px; }
.notice.warning { background: #fff1e4; color: #78390e; }
details summary { cursor: pointer; }
.table-scroll { overflow: auto; max-height: 68vh; }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td { text-align: left; font-size: 13px; padding: 10px 12px; border-bottom: 1px solid #e7edf5; white-space: nowrap; }
thead { position: sticky; top: 0; z-index: 1; }
th { background: #edf2f8; color: #334966; }
tbody tr:hover td { background: #f8fafd; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 16px; background: #edf1f6; color: #445670; }
.pill.enabled { background: #e4f4eb; color: #245c41; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.empty .button { margin-top: 13px; }
.api-item { padding: 13px 20px; border-top: 1px solid var(--border); }
.api-item summary span { margin-left: 7px; }
.api-forms { display: grid; gap: 12px; max-width: 590px; padding-top: 14px; }
.grant, .pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.grant { border-top: 1px solid var(--border); padding-top: 10px; }
.pager { justify-content: center; padding: 12px; }
@media (max-width: 670px) {
  .site-header { padding: 10px 16px; gap: 7px; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .site-header nav a { padding: 7px 9px; font-size: 13px; }
  .form-grid, .settings-grid { grid-template-columns: 1fr; }
  .metrics { gap: 6px; }
  .metrics div { padding: 8px; }
  .metrics strong { font-size: 18px; }
  .metrics span { font-size: 11px; }
}
