:root {
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  color: #202d3a;
  background: #f4f7fa;
  line-height: 1.5;
  --ink: #202d3a;
  --muted: #526375;
  --accent: #075c64;
  --line: #d9e2e9;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #087e8a; outline-offset: 3px; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem max(1.25rem, calc((100% - 1180px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 1.08rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.identity, .section-head { display: flex; align-items: center; gap: 0.65rem; }
.identity a { white-space: nowrap; }
.identity a[aria-current="page"] { font-weight: 700; }
.section-head { justify-content: space-between; }
main { max-width: 1220px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
main.auth { max-width: 460px; padding-top: 3.5rem; }
nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
nav a { display: block; padding: 0.4rem 0.7rem; color: var(--muted); border-radius: 0.45rem; text-decoration: none; }
nav a[aria-current], nav a:hover { background: #e0eff0; color: var(--accent); }
h1 { font-size: clamp(1.45rem, 4vw, 2rem); margin: 0 0 1.2rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.9rem; }
p { margin: 0; }
.auth > p { margin-top: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 0.65rem; padding: 1rem; }
.stack { display: grid; gap: 0.7rem; align-content: start; }
.stack h2 { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
label { display: grid; gap: 0.27rem; font-size: 0.92rem; font-weight: 600; }
label.check { display: flex; align-items: baseline; gap: 0.35rem; font-weight: 500; }
input:not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; border: 1px solid #b9c9d5; border-radius: 0.4rem; padding: 0.42rem 0.55rem; background: white; color: var(--ink); }
input[type="checkbox"] { accent-color: var(--accent); }
textarea { resize: vertical; }
textarea, code { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
button { justify-self: start; border: 1px solid transparent; border-radius: 0.4rem; background: var(--accent); color: #fff; padding: 0.42rem 0.82rem; font-weight: 650; white-space: nowrap; }
button:hover { filter: brightness(0.9); }
button.secondary { padding: 0.25rem 0.5rem; color: var(--accent); background: #f1f7f8; border-color: #cbdee0; font-weight: 500; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 0.4rem; padding: 0.4rem 0.6rem 0.55rem; }
legend { padding: 0 0.25rem; }
.hint { color: var(--muted); font-size: 0.875rem; }
.active { color: #126342; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.89rem; }
th, td { padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.alert { padding: 0.7rem 0.85rem; margin-bottom: 1rem; border: 1px solid #b5dadd; border-radius: 0.45rem; background: #eaf7f7; }
.error { color: #802f28; border-color: #ecc8c1; background: #fff1ef; overflow-wrap: anywhere; }
.code { padding: 0.5rem 0.65rem; border-radius: 0.35rem; background: #edf3f6; }
.account { max-width: 32rem; }
.plain-list { margin: 0; padding-left: 1.3rem; }
.traffic-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 0.65rem; }
.traffic-table th, .traffic-table td { white-space: nowrap; }
.traffic-table tr > :not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.traffic-table tfoot { border-top: 1px solid var(--line); font-weight: 700; }

@media (max-width: 810px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 440px) { .field-row { grid-template-columns: 1fr; } .topbar { padding-inline: 0.75rem; } main { padding-inline: 0.75rem; } }
