:root {
  color-scheme: light;
  --ink: #142c43;
  --muted: #506477;
  --line: #d5e0ea;
  --canvas: #f1f5f9;
  --blue: #145ea8;
  --nav: #142b43;
  font: 15px/1.55 "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
h1 { font-size: 1.9rem; letter-spacing: -.025em; margin: 0 0 1.4rem; }
h2 { font-size: 1.08rem; margin: 0 0 1rem; }
p { margin: 0 0 1rem; }
a { color: #135797; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #458bdb; outline-offset: 3px;
}
aside { position: fixed; inset: 0 auto 0 0; width: 220px; background: var(--nav); padding: 24px 16px; overflow-y: auto; }
.brand { color: white; font-weight: 750; font-size: 1.16rem; margin: 0 7px 24px; }
.brand span { display: block; color: #bbd2e7; font-size: .77rem; font-weight: 500; margin-top: 3px; }
nav { display: grid; gap: 4px; }
nav a { color: #dbe6f3; border-radius: 8px; padding: 9px 12px; text-decoration: none; }
nav a[aria-current], nav a:hover { color: white; background: #294969; }
.workspace { margin-left: 220px; }
header { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-height: 62px; padding: 10px 24px; background: white; border-bottom: 1px solid var(--line); }
.top-actions { display: flex; align-items: center; gap: 16px; }
.top-actions button { color: var(--blue); background: #edf4fc; padding: 6px 12px; }
main { max-width: 1480px; margin: auto; padding: 26px; }
.metrics, .grid { display: grid; gap: 16px; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.metric, .panel { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.panel { margin-bottom: 16px; min-width: 0; }
.grid > .panel { height: 100%; }
.grid { margin-bottom: 16px; }
.metric strong { display: block; margin-top: 8px; font-size: 2rem; font-variant-numeric: tabular-nums; }
.metric span, .empty { color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; margin-bottom: 6px; }
th, td { border-bottom: 1px solid #e3ebf1; padding: 9px 10px; vertical-align: top; overflow-wrap: anywhere; }
th { background: #f4f7fb; color: #375369; }
form { margin: 0; }
.panel form + form { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.rowform { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.rowform label { margin-bottom: 0; flex: 1 1 240px; max-width: 470px; }
label { display: block; margin-bottom: 12px; font-weight: 630; }
input, select, textarea { display: block; margin-top: 4px; width: 100%; min-height: 38px; border: 1px solid #aabccc; border-radius: 7px; color: inherit; background: white; font: inherit; font-weight: 400; padding: 6px 10px; }
textarea { resize: vertical; }
button { border: 0; border-radius: 7px; background: var(--blue); color: white; font: inherit; font-weight: 650; padding: 8px 14px; cursor: pointer; }
button:hover { filter: brightness(.9); }
button.danger { background: #8d2836; }
.notice { color: #145441; background: #e0f5ee; border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; overflow-wrap: anywhere; }
.notice.error { color: #811f2c; background: #fdedf0; }
.quick-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.skip { position: absolute; top: 8px; left: -1000px; background: white; padding: 8px; z-index: 2; }
.skip:focus { left: 8px; }
.login { display: grid; place-items: center; min-height: 100vh; background: #142b43; }
.login main { width: min(390px, calc(100vw - 32px)); background: white; border-radius: 18px; padding: 26px; }
.login .brand { color: var(--ink); margin-left: 0; }
.login .brand span { color: var(--muted); }
.login button { width: 100%; margin-top: 8px; }
@media (max-width: 700px) {
  aside { position: static; width: auto; padding: 14px; }
  aside .brand { margin: 0 0 10px; }
  aside .brand span { display: inline; margin-left: 9px; }
  nav { display: flex; overflow-x: auto; white-space: nowrap; }
  nav a { padding: 7px 10px; }
  .workspace { margin: 0; }
  header { padding: 8px 14px; justify-content: space-between; flex-wrap: wrap; }
  main { padding: 16px; }
}
