:root {
  color-scheme: light;
  --text: #1b1b1d;
  --muted: #5e5e5e;
  --surface: #fff;
  --canvas: #f2f5f6;
  --outline: #dfe6eb;
  --primary: #0a7cbf;
  --hover: #08679e;
  --selected: #dbeaf5;
  --action: linear-gradient(135deg, #0a7ab0, #2f5fef);
  font: 14px/1.5 "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 340px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--outline);
  display: flex; flex-direction: column; padding: 20px 12px; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 18px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--action); flex: none; }
nav { display: grid; gap: 2px; }
nav button { text-align: left; width: 100%; border: 0; border-radius: 10px; padding: 9px 12px; background: transparent; color: var(--text); }
nav button:enabled:hover, nav button[aria-current] { background: var(--selected); }
nav button[aria-current] { font-weight: 700; }
nav button:disabled { color: var(--muted); }
.admin-identity { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--outline); color: var(--muted); overflow-wrap: anywhere; }
.admin-identity span { display: block; margin-bottom: 4px; }
main { min-width: 0; padding: 20px 24px; }
h1, h2, h3 { margin: 0 0 14px; line-height: 1.2; }
h1 { font-size: 22px; margin-bottom: 16px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
.muted, .empty, small { color: var(--muted); }
.empty { margin: 0; padding: 12px 0; }
.error, .request-error [role="alert"] { color: #b00020; }
.login-panel, .panel, .metrics article { background: var(--surface); border: 1px solid var(--outline); border-radius: 12px; }
.login-panel { width: min(100%, 380px); margin: 74px auto 30px; padding: 27px 28px; border-radius: 16px; }
.login-panel h2 { font-size: 19px; }
.login-panel p { margin-bottom: 14px; }
fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
label { color: var(--muted); }
label > input:not([type="radio"]) { width: 100%; display: block; height: 38px; border: 1px solid #bdc4ce;
  color: var(--text); background: var(--surface); border-radius: 10px; padding: 8px 11px; margin-top: 5px; }
.login-panel label { display: block; margin-bottom: 13px; }
.primary, .secondary { padding: 7px 15px; border-radius: 999px; min-height: 36px; font-weight: 650; }
.primary { background: var(--action); color: #fff; border: 0; }
.primary:disabled { opacity: .55; }
.login-panel .primary { width: 100%; text-align: left; }
.secondary { color: var(--primary); background: var(--surface); border: 1px solid var(--outline); }
.text-button { padding: 0; border: 0; color: var(--primary); background: transparent; text-align: left; }
.text-button:enabled:hover { color: var(--hover); text-decoration: underline; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.metrics article { padding: 14px 16px; }
.metrics p { color: var(--muted); margin-bottom: 2px; }
.metrics strong { display: block; font-size: 25px; line-height: 1.3; overflow-wrap: anywhere; }
.metrics small { display: block; margin-top: 4px; }
.panel { padding: 16px 18px; margin-bottom: 14px; }
.panel > .muted { margin: 12px 0 0; }
.table-wrap { overflow: auto; border: 1px solid var(--outline); border-radius: 11px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { min-width: 100px; padding: 12px 15px; border-bottom: 1px solid var(--outline); vertical-align: top; }
th { background: var(--canvas); font-size: 13px; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.pill { background: #edf1f4; padding: 2px 8px; border-radius: 8px; font-size: 12px; white-space: nowrap; }
.pill.positive { background: #e0f4eb; color: #006e4b; }
dl { display: grid; grid-template-columns: minmax(105px, 145px) minmax(0, 1fr); gap: 8px 10px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.report-evidence { padding: 0; list-style: none; }
.report-evidence li { padding: 12px; margin-top: 8px; border: 1px solid var(--outline); border-radius: 8px; }
.report-evidence p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.report-resolution-note { display: block; width: min(100%, 420px); }
.report-resolution button:disabled { opacity: .55; }
.report-disable { background: #d93025; color: #fff; border-color: transparent; }
.top-action { margin-bottom: 12px; }
.registration-fieldset legend { font-weight: 650; margin-bottom: 7px; }
.registration-fieldset > label { display: block; margin-bottom: 7px; }
.registration-fieldset h3 { margin-top: 17px; }
.registration-limits { display: grid; grid-template-columns: repeat(2, minmax(155px, 240px)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 820px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell { grid-template-columns: 172px minmax(0, 1fr); }
  .brand { font-size: 14px; gap: 5px; }
  .brand-icon { width: 22px; height: 22px; }
}
@media (max-width: 580px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--outline); }
  .brand { margin-bottom: 8px; }
  nav { display: flex; flex-wrap: wrap; }
  nav button { width: auto; }
  main { padding: 14px; }
  .login-panel { margin-top: 16px; padding: 18px; }
  .registration-limits { grid-template-columns: 1fr; }
}
