:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #17273c;
  background: #f3f6fb;
  --ink: #17273c;
  --muted: #53647c;
  --blue: #174fcc;
  --line: #dce4ef;
  --side: #101f36;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; }
a { color: #174cb9; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #5281ff; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.15rem); letter-spacing: -.04em; }
h2 { font-size: 1rem; }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; padding: 24px 14px 16px; color: #e5edfa; background: var(--side); }
.brand { display: inline-flex; align-items: center; font-weight: 750; gap: 11px; color: inherit; padding: 2px 8px; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand small, .current-user small { display: block; font-size: .76rem; margin-top: 5px; font-weight: 500; color: #a8bbd4; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; font-size: 1.35rem; background: #2764e6; color: white; }
.sidebar nav { margin-top: 34px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; color: #d8e4f4; padding: 11px 12px; margin-top: 3px; font-size: .92rem; font-weight: 600; border-radius: 7px; }
.sidebar nav a span { width: 17px; color: #9eb7df; text-align: center; }
.sidebar nav a:hover { background: #20334d; text-decoration: none; }
.sidebar nav a[aria-current] { background: #24477c; color: #fff; }
.nav-label { margin: 23px 12px 5px; color: #9eb0ca; font-size: .78rem; }
.sidebar-footer { margin-top: auto; padding: 32px 5px 0; display: flex; align-items: center; gap: 9px; font-size: .88rem; }
.current-user { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #30476b; flex-shrink: 0; }
.logout { background: transparent; color: #d8e4f4; border: 0; padding: 5px; font-size: .875rem; }
.topbar { min-height: 68px; padding: 12px clamp(16px, 4vw, 42px); border-bottom: 1px solid var(--line); background: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.breadcrumb { color: var(--muted); font-size: .875rem; }
.breadcrumb span { padding: 0 7px; }
.breadcrumb strong { color: var(--ink); }
.scope { display: flex; align-items: center; gap: 9px; font-size: .875rem; }
.scope label { white-space: nowrap; color: var(--muted); }
.main { max-width: 1520px; margin: auto; padding: 31px clamp(16px, 4vw, 42px) 46px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; }
.page-head p, .panel-head p { margin-top: 7px; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.date-chip { border: 1px solid var(--line); border-radius: 7px; background: white; padding: 7px 12px; font-size: .875rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 15px; margin-bottom: 17px; }
.metric, .panel { background: white; border: 1px solid var(--line); border-radius: 11px; }
.metric { padding: 17px 20px; }
.metric h2 { font-size: .9rem; color: var(--muted); }
.metric strong { display: block; font-size: 2rem; margin: 12px 0 5px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric p { color: var(--muted); font-size: .82rem; }
.panel { margin-bottom: 17px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 21px; }
.trend { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(4px, 2vw, 24px); padding: 0 21px 17px; }
.trend-day { display: grid; justify-items: center; gap: 7px; color: var(--muted); font-size: .85rem; }
.trend-day strong { font-variant-numeric: tabular-nums; font-size: .875rem; color: var(--ink); }
.bar-track { width: min(100%, 45px); height: 90px; background: #eef3ff; border-radius: 5px; overflow: hidden; display: flex; flex-direction: column; justify-content: end; }
.bar-track span { display: block; height: var(--bar-height); background: #3568e1; border-radius: 5px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid transparent; border-radius: 7px; padding: 7px 12px; font-size: .875rem; line-height: 1.4; font-weight: 650; white-space: nowrap; }
.button:hover { text-decoration: none; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: #123d9f; }
.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.secondary:hover { background: #f0f4fb; }
.link { color: var(--blue); font-size: inherit; border: 0; background: none; padding: 0; }
.link:hover { text-decoration: underline; }
.filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 17px 19px; }
.filters label { display: grid; gap: 6px; font-size: .875rem; font-weight: 600; }
input:not([type=checkbox], .el-input__inner, .el-range-input), select { min-height: 38px; min-width: 0; border: 1px solid #c9d5e5; border-radius: 6px; padding: 7px 10px; color: var(--ink); background-color: white; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #52647d 50%), linear-gradient(135deg, #52647d 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.filters input:not(.el-range-input) { width: min(270px, 100%); }
.legacy-date-field { display: grid; gap: 6px; width: min(100%, 430px); font-size: .875rem; font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { background: #f1f5fb; color: #435672; font-weight: 650; white-space: nowrap; }
th, td { padding: 12px 15px; border-bottom: 1px solid #e5ebf4; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.empty { padding: 27px 18px; text-align: center; color: var(--muted); }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.unbroken { white-space: nowrap; }
.strong { font-weight: 650; }
.subtext { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; }
.pill { display: inline-block; border-radius: 15px; padding: 3px 8px; background: #edf3ff; color: #234785; font-size: .79rem; white-space: nowrap; }
.pill.on, .notice { background: #e6f6ef; color: #1d6848; }
.pill.muted { background: #edf0f5; color: #4b5b71; }
.notice { padding: 10px 13px; border-radius: 7px; margin-bottom: 15px; }
.pager { padding: 12px 19px; border-top: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .875rem; }
.audit-detail summary { cursor: pointer; white-space: nowrap; }
.audit-detail dl { margin: 8px 0 0; }
.audit-detail dt { font-weight: 650; }
.audit-detail dd { margin: 0 0 7px; overflow-wrap: anywhere; }
.edit-panel { max-width: 660px; padding: 22px; }
.edit-form p { display: grid; gap: 7px; margin-bottom: 15px; }
.edit-form label { font-weight: 650; font-size: .925rem; }
.edit-form input:disabled, .edit-form select:disabled { background-color: #eef2f7; color: var(--muted); }
.helptext { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.errorlist { color: #8f2136; padding-left: 21px; margin: 0 0 12px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(125deg, #101f36 0 32%, #f1f5fd 32%); }
.login-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 29px; width: min(100%, 405px); box-shadow: 0 12px 28px #1227401a; }
.login-card .brand { padding: 0; margin-bottom: 22px; }
.login-card .brand small { color: var(--muted); }
.login-card h1 { margin-bottom: 18px; font-size: 1.6rem; }
.login-card .button { width: 100%; }
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { padding: 14px; }
  .sidebar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
  .sidebar nav a { padding: 7px 8px; }
  .nav-label { display: none; }
  .sidebar-footer { padding: 12px 6px 0; }
  .topbar { flex-wrap: wrap; }
}
@media (max-width: 390px) {
  .pager { flex-wrap: wrap; }
  .trend { padding-inline: 10px; }
}
