:root {
  color-scheme: light;
  --canvas: #f5f7fa;
  --surface: #fff;
  --sidebar: #f9fafc;
  --ink: #172232;
  --muted: #576577;
  --line: #dce3ec;
  --accent: #1d52a1;
  --accent-soft: #e8f0fc;
  --control: #a6b2c1;
  font: 14px/1.55 "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: #143d7e; }
button, input, select { font: inherit; }
button, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}
button:hover { background: #184584; }
button:disabled { color: #56667a; background: #e7ecf3; cursor: default; }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--control); }
.secondary:hover { background: var(--accent-soft); color: #143d7e; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #c8ddfc; color: #142d52; }
input:not([type=checkbox], [type=hidden]), select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control);
  border-radius: 7px;
}
input::placeholder { color: var(--muted); }
input[type=checkbox] { accent-color: var(--accent); }
input[type=file] { max-width: 36rem; }
label { display: block; }
label > input:not([type=checkbox]), label > select { margin-top: 5px; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
h1 { margin: 0 0 6px; font-size: 29px; font-weight: 700; letter-spacing: -.02em; }
h2 { margin: 0 0 10px; font-size: 17px; }
h3 { margin: 0 0 7px; font-size: 15px; }
p { margin: 0 0 12px; overflow-wrap: anywhere; }
p + form { margin-top: 16px; }
code, pre { overflow-wrap: anywhere; white-space: pre-wrap; }
.muted, small { color: var(--muted); }
.skip { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 10px 16px; transform: translateY(-180%); background: var(--surface); }
.skip:focus { transform: none; }

.console { min-height: 100vh; display: grid; grid-template-columns: 212px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); padding: 23px 15px; }
.brand, .login-brand { display: flex; align-items: baseline; gap: 9px; color: var(--ink); }
.brand { margin: 0 9px 29px; text-decoration: none; }
.brand-name { font-size: 19px; font-weight: 750; letter-spacing: .02em; }
.brand-role { color: var(--muted); font-size: 12px; }
.nav-group { display: grid; gap: 3px; }
.nav-group + .nav-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.nav-group a { padding: 9px 11px; color: var(--ink); border-radius: 6px; text-decoration: none; }
.nav-group a:hover { background: #edf1f7; }
.nav-group a[aria-current] { background: var(--accent-soft); color: #1a4d98; font-weight: 700; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 63px;
  padding: 8px 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar .secondary { min-height: 34px; font-size: 13px; }
.identity { display: flex; align-items: center; gap: 13px; overflow-wrap: anywhere; }
.content { max-width: 1630px; margin: 0 auto; padding: 26px 30px 42px; }
.content > .muted { margin-bottom: 18px; }
.content section { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 17px 0; min-width: 0; }
.content section form:not(.filters) { max-width: 38rem; }
.content section form label { margin-bottom: 12px; }
.content section form + form { margin-top: 12px; }
.section-heading, .actions, .pagination { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-heading { justify-content: space-between; margin-bottom: 10px; }
.section-heading h2 { margin: 0; }
.actions { margin-top: 12px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 11px; margin: 18px 0; }
.filters label { flex: 0 1 148px; min-width: 0; }
.filters label:has(input[type=search]) { flex-basis: 230px; }
.notice { border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: #edf3fc; color: #1d426e; }
.warning { color: #7a4a0b; }
.error { background: #fff1ef; border-color: #f1c2b9; color: #95291d; }
.status { padding: 12px; background: var(--canvas); border-radius: 8px; }
.status p:last-child { margin-bottom: 0; }
.empty { margin: 5px 0; color: var(--muted); }
.overview-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; margin: 17px 0; background: var(--surface); }
.overview-strip a { min-width: 0; padding: 14px 19px; text-decoration: none; }
.overview-strip a + a { border-left: 1px solid var(--line); }
.overview-strip a:hover { background: #f2f6fd; }
.overview-strip a:first-child { border-radius: 11px 0 0 11px; }
.overview-strip a:last-child { border-radius: 0 11px 11px 0; }
.overview-strip span { color: var(--muted); display: block; margin-bottom: 4px; }
.overview-strip strong { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 24px; font-variant-numeric: tabular-nums; }
.overview-strip small { font-size: 12px; font-weight: 500; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.overview-grid section { margin-top: 0; }
.recent { margin: 0; padding: 0; list-style: none; }
.recent li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.recent li:last-child { border-bottom: none; }
.recent a { overflow-wrap: anywhere; }
.recent time { font-size: 12px; color: var(--muted); margin-left: auto; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
td, th { border-bottom: 1px solid var(--line); padding: 10px 11px; text-align: left; vertical-align: top; }
th { background: #f3f6fa; color: #3b4b5f; font-size: 12px; white-space: nowrap; }
td { overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
td small { display: block; }
.numeric { text-align: right; white-space: nowrap; }
.table td > a { white-space: nowrap; }
.tag { background: #edf1f6; color: #435469; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.tag.success { background: #e8f4ed; color: #1a5f42; }
.pagination { justify-content: flex-end; padding-top: 12px; color: var(--muted); }
.pagination .secondary { min-height: 33px; }
.report-list article { padding: 12px 0; border-top: 1px solid var(--line); }
.report-list article:last-child, .report-list article > :last-child { margin-bottom: 0; }
.report-list article h2 { font-size: 15px; margin-bottom: 6px; }
details { border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
summary { cursor: pointer; }
.contact-preview { display: block; width: min(280px, 100%); max-height: 360px; object-fit: contain; margin: 15px 0; background: var(--canvas); }
.wechat-qr { display: block; max-width: 100%; height: auto; margin: 15px 0; }

.login-page { max-width: 432px; margin: 0 auto; padding: max(54px, 14vh) 20px 32px; }
.login-brand { margin: 0 0 20px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 29px; }
.login-card h1 { font-size: 25px; }
.login-card p { margin: 7px 0 19px; }
.login-card label { margin: 14px 0 5px; font-weight: 600; }
.login-card button { width: 100%; margin-top: 21px; min-height: 42px; }

@media (max-width: 1040px) { .overview-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (max-width: 740px) {
  .console { display: block; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 13px 15px; }
  .brand { margin: 0 4px 10px; }
  .sidebar nav { display: flex; gap: 7px 12px; flex-wrap: wrap; }
  .nav-group { display: flex; gap: 2px; flex-wrap: wrap; }
  .nav-group + .nav-group { margin: 0; padding: 0; border: 0; }
  .nav-group a { padding: 7px 8px; }
  .topbar { padding: 8px 15px; min-height: 52px; }
  .content { padding: 19px 15px 30px; }
  .content section { padding: 15px; }
  h1 { font-size: 25px; }
}
@media (max-width: 475px) {
  .overview-strip { grid-template-columns: minmax(0, 1fr); }
  .overview-strip a + a { border-left: 0; border-top: 1px solid var(--line); }
  .overview-strip a:first-child { border-radius: 11px 11px 0 0; }
  .overview-strip a:last-child { border-radius: 0 0 11px 11px; }
  .overview-strip a { padding: 10px 14px; }
  .filters label { flex: 1 1 130px; }
}
