:root {
  color-scheme: light;
  font-family: "Inter", "Microsoft YaHei UI", system-ui, sans-serif;
  color: #162331;
  background: #edf2f6;
  --accent: #2463eb;
  --line: #d8e3e9;
  --muted: #536774;
}
* { box-sizing: border-box; }
body { margin: 0; }
.rail { position: fixed; inset: 0 auto 0 0; width: 224px; background: #fff; border-right: 1px solid var(--line); color: #172b4d; display: flex; flex-direction: column; padding: 28px 20px; gap: 34px; }
.brand { display: flex; flex-direction: column; align-items: start; gap: 8px; color: inherit; text-decoration: none; font-weight: 750; }
.brand-logo { display: block; max-width: 100%; height: auto; object-fit: contain; }
.brand-home { display: inline-block; }
.brand small { color: var(--muted); margin-top: 1px; }
.rail nav { display: grid; gap: 4px; }
.rail nav a { display: flex; align-items: center; gap: 8px; color: inherit; border-radius: 7px; padding: 10px 12px; text-decoration: none; }
.rail nav a:hover, .rail nav a:focus-visible { background: #eaf0ff; }
.nav-count { margin-left: auto; border-radius: 999px; padding: 1px 7px; background: #eaf0ff; color: #1743a4; font-size: 12px; font-weight: 750; }
.rail-end { margin-top: auto; color: var(--muted); }
.rail-end button { background: var(--accent); }
main { margin: 0 0 0 224px; padding: 32px clamp(16px, 4vw, 64px) 52px; max-width: 1700px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h1 { margin: 7px 0 0; font-size: clamp(25px, 4vw, 36px); line-height: 1.1; }
h2 { font-size: 19px; margin: 0 0 13px; }
h3 { font-size: 15px; margin: 20px 0 8px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 750; }
.panel, .notice, .login-card { border: 1px solid var(--line); border-radius: 12px; padding: clamp(14px, 2.5vw, 24px); background: #fff; margin-bottom: 14px; scroll-margin-top: 16px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; margin: 0; }
.metric { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.metric dt { font-size: 12px; color: var(--muted); }
.metric dd { margin: 5px 0 0; font-weight: 760; font-size: 24px; }
.compact .metric dd { font-size: 18px; }
.muted, .empty, small { color: var(--muted); }
small { display: block; margin-top: 4px; }
.muted { margin-top: 0; font-size: 13px; }
.empty { margin: 12px 0; font-size: 13px; }
.fields { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
input, select, button { min-height: 33px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; padding: 5px 8px; color: inherit; }
input, select { max-width: 100%; }
button { cursor: pointer; background: var(--accent); color: #fff; border: 0; font-weight: 650; padding-inline: 12px; }
button:hover { filter: brightness(1.1); }
button.danger { background: #a3393d; }
.check { display: flex; align-items: center; min-height: 33px; gap: 5px; }
.check input { min-height: auto; accent-color: var(--accent); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
th { color: var(--muted); background: #f5f8fa; white-space: nowrap; }
td .fields { margin: 0 0 4px; }
td label, td button { white-space: nowrap; }
td input:not([type="checkbox"]) { width: 145px; }
.review-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 14px; }
.review-actions input[type="number"] { width: 86px; }
.review-actions summary { padding: 7px 0; color: var(--muted); }
.review-actions details[open] .fields { padding-top: 5px; }
.review-history { margin-top: 14px; }
.review-history .table-scroll { margin-top: 8px; }
.review-history a { color: var(--accent); }
.review-status { display: inline-block; border-radius: 999px; padding: 3px 7px; white-space: nowrap; background: #edf2f6; color: var(--muted); }
.review-status.pending { background: #fff0d8; color: #744c13; }
.review-status.approved { background: #e5f6ef; color: #195146; }
.review-status.rejected { background: #fce8e6; color: #732e31; }
.license-anchor { scroll-margin-top: 16px; }
.license-anchor:target { border-radius: 3px; background: #d0f2e6; }
summary { cursor: pointer; white-space: nowrap; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { background: #e5f6ef; color: #173a32; }
.error { background: #fce8e6; color: #732e31; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.login-card { margin: 0; width: min(100%, 420px); padding: 28px; }
.login-card .eyebrow { display: block; margin-top: 15px; }
.login-card h1 { font-size: 26px; margin-bottom: 16px; }
.login-card .fields { display: grid; gap: 11px; }
.login-card .fields button { margin-top: 8px; }
@media (max-width: 820px) {
  .rail { position: static; width: auto; padding: 14px 16px; gap: 12px; }
  .rail nav { display: flex; flex-wrap: wrap; }
  .rail nav a { padding: 5px 7px; }
  .rail-end { display: flex; align-items: center; gap: 8px; }
  .rail-end form { margin: 0; }
  main { margin-left: 0; }
  .page-head { align-items: start; flex-direction: column; }
}
