:root {
  --blue: #2f80ed;
  --blue-dark: #2067c7;
  --blue-soft: #edf4ff;
  --ink: #192332;
  --muted: #7b8491;
  --line: #e6e9ed;
  --surface: #fff;
  --canvas: #f7f8fa;
  --sidebar: 238px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.65 "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a9ceff; outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 8px 14px; background: var(--blue); color: #fff; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 20px 22px 10px; color: var(--ink); font-weight: 700; letter-spacing: -.3px; }
.brand-logo { display: block; width: 100%; max-width: 320px; height: auto; object-fit: contain; }
.brand-system-name { font-size: 12px; font-weight: 600; }
.brand-caption { margin: 0 22px 20px; font-size: 10px; color: #969eaa; letter-spacing: 2px; }
.nav { overflow-y: auto; min-height: 0; padding: 0 12px 18px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #dce1e8 transparent; }
.nav-group + .nav-group { margin-top: 20px; }
.nav-heading { padding: 0 12px 7px; font-size: 10px; font-weight: 600; letter-spacing: 1.6px; color: #969eaa; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; margin: 3px 0; padding: 9px 12px; min-height: 39px; border-radius: 8px; color: #535e6c; font-size: 12px; line-height: 1.5; transition: color .15s, background .15s; }
.nav a:hover { background: #f5f7fa; color: var(--blue-dark); }
.nav a.active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 3px; background: var(--blue); border-radius: 0 3px 3px 0; }
.ui-icon { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.side-footer { margin-top: auto; padding: 14px 22px; border-top: 1px solid var(--line); color: #87909c; font-size: 10px; background: #fff; }
.side-footer span { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--blue); }
.main { margin-left: var(--sidebar); padding: 36px 40px 56px; min-width: 0; max-width: 1900px; }
.sidebar-hidden .side { display: none; }
.sidebar-hidden .main { margin-left: 0; }
.page-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.page-tools .page-eyebrow { margin: 0; }
button.sidebar-toggle { background: #fff; color: #5b6573; border: 1px solid var(--line); min-height: 32px; padding: 5px 10px; font-size: 11px; font-weight: 500; }
button.sidebar-toggle:hover { background: var(--blue-soft); border-color: #bfd7f6; color: var(--blue-dark); }
@media print { .page-tools { display: none; } }
.top { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.page-eyebrow { margin-bottom: 8px; color: var(--blue-dark); font-size: 10px; font-weight: 600; letter-spacing: 2px; }
.top h1 { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; font-size: clamp(27px, 2.3vw, 34px); font-weight: 700; letter-spacing: -.8px; line-height: 1.35; margin: 0 0 9px; }
.top .muted { font-size: 12px; }
.user { display: flex; align-items: center; gap: 12px; color: #67717f; font-size: 12px; flex-wrap: wrap; }
.user-name { padding: 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: 99px; }
.user-name .ui-icon { margin-right: 6px; width: 13px; height: 13px; color: var(--blue); }
.user a { color: #687484; }
.user a:hover { color: var(--blue-dark); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card, section { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 3px #19233202; min-width: 0; }
.card { padding: 22px 24px; }
section { padding: 24px; }
section + section { margin-top: 20px; }
section h2 { font-size: 18px; font-weight: 600; line-height: 1.5; margin-top: 0; letter-spacing: -.3px; }
.metric { font: 700 30px/1.25 Arial, "Microsoft YaHei", sans-serif; margin: 12px 0 8px; letter-spacing: -1px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.grid > .card:first-child .metric { color: var(--blue-dark); }
.muted { color: var(--muted); }
.card > .muted { font-size: 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 18px; }
form.toolbar { background: #f6f7f9; padding: 16px; border: 1px solid #eceef1; border-radius: 12px; align-items: flex-end; }
form.toolbar > div { min-width: 0; }
form.toolbar label { font-size: 11px; color: #7b8491; font-weight: 400; margin-bottom: 5px; }
form.toolbar input, form.toolbar select { background: #fff; }
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.6; transition: background .15s, border-color .15s; }
.btn:hover, button:hover { background: var(--blue-dark); color: #fff; }
.btn.secondary { background: #fff; color: #5b6573; border-color: #dfe4eb; }
.btn.secondary:hover { background: var(--blue-soft); border-color: #bfd7f6; color: var(--blue-dark); }
.btn.danger { background: #fff0f0; color: #b54545; border-color: #f1cece; }
.btn.danger:hover { background: #ffe3e3; }
button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.65; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid #eceef1; vertical-align: top; }
th { background: #f4f5f7; color: #7c8591; font-size: 11px; font-weight: 500; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f2f7ff; }
td strong { font-weight: 600; }
td .btn { min-height: 30px; padding: 5px 10px; font-size: 11px; }
td input, td select { min-width: 100px; }
input, select, textarea { width: 100%; max-width: 100%; padding: 9px 12px; border: 1px solid #dfe3e9; border-radius: 9px; background: #fff; color: var(--ink); font-size: 13px; line-height: 1.6; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #a2a9b3; }
input:focus, select:focus, textarea:focus { border-color: #8bbcf7; box-shadow: 0 0 0 3px #2f80ed12; }
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; accent-color: var(--blue); box-shadow: none; }
input[type="file"] { padding: 8px; background: #f9fafb; }
textarea { min-height: 100px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; font-weight: 500; font-size: 12px; color: #586372; }
.badge { display: inline-block; padding: 3px 9px; border: 1px solid #dce9fc; border-radius: 99px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; line-height: 1.5; }
.badge.high { background: #fff1f1; color: #b94d4d; border-color: #f3d7d7; }
.badge.low { background: #eef7f0; color: #40815c; border-color: #d4e9db; }
.notice { margin: 0 0 18px; padding: 13px 16px; background: var(--blue-soft); color: var(--blue-dark); border: 1px solid #dce9fc; border-radius: 10px; font-size: 13px; }
body dialog:not(#keyword-cover-dialog) { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 80px #19233220; }
body dialog::backdrop { background: #19233266; }
body .pagination { font-size: 12px; }
.right { text-align: right; font-variant-numeric: tabular-nums; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; background: radial-gradient(ellipse at 25% 10%, #eaf2ff, transparent 55%), #f7f8fa; }
.auth-page .box { width: min(100%, 460px); padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 40px #19233206; }
.auth-page .brand { padding: 0; font-size: 16px; margin-bottom: 32px; }
.auth-page h1 { font-family: "Songti SC", "SimSun", serif; font-size: 30px; line-height: 1.4; margin: 0 0 8px; }
.auth-page .muted { font-size: 12px; }
.auth-page .field { margin-top: 20px; }
.auth-page button { width: 100%; margin-top: 28px; font-size: 14px; min-height: 44px; }
.auth-page .error { margin-top: 18px; padding: 12px; background: #fff2f2; border: 1px solid #f5d8d8; color: #a64949; border-radius: 10px; font-size: 12px; }
@media (max-width: 1200px) { .main { padding: 30px 26px 48px; } .top { align-items: flex-start; } .grid { gap: 12px; } .card { padding: 18px; } }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .top { flex-direction: column; gap: 14px; } }
@media (max-width: 760px) {
  .side { position: static; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 16px 20px 8px; }
  .brand-caption, .nav-heading, .side-footer { display: none; }
  .nav { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 10px; }
  .nav-group { display: flex; flex: 0 0 auto; gap: 4px; }
  .nav-group + .nav-group { margin-top: 0; }
  .nav a { white-space: nowrap; padding: 8px 11px; }
  .nav a.active::before { display: none; }
  .main { margin-left: 0; padding: 24px 16px 40px; }
  .top { margin-bottom: 24px; }
  .top h1 { font-size: 28px; }
  .page-eyebrow { font-size: 9px; }
  section { padding: 18px; border-radius: 14px; }
  .card { border-radius: 14px; padding: 16px; }
  .metric { font-size: 26px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  form.toolbar > div { flex: 1 1 150px; }
  .table-wrap table { min-width: 640px; }
  .auth-page .box { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
