/* ==========================================================================
   安诚平台 · 设计系统（app.css）
   所有页面共用的基础样式。页面级样式写在 pages-a/b/c/d.css。
   ========================================================================== */
:root {
  --brand: #1256a6;
  --brand-2: #1f74d8;
  --brand-3: #e9f2fe;
  --brand-4: #0d3f7c;
  --accent: #e08a1e;
  --ink: #1b2430;
  --ink-2: #4a5869;
  --ink-3: #8494a6;
  --line: #e4eaf3;
  --line-2: #eef2f8;
  --bg: #f2f5fa;
  --card: #ffffff;
  --ok: #17936a;
  --ok-bg: #e7f6f0;
  --warn: #c47c07;
  --warn-bg: #fdf3e2;
  --bad: #cf3f36;
  --bad-bg: #fdeceb;
  --info: #2b6fd8;
  --info-bg: #eaf1fd;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-1: 0 1px 2px rgba(16, 40, 80, .06);
  --shadow-2: 0 6px 20px rgba(16, 40, 80, .08);
  --shadow-3: 0 18px 48px rgba(16, 40, 80, .18);
  --sidebar-w: 234px;
  --topbar-h: 56px;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.2px; }
p { margin: 0 0 8px; }
button { font-family: inherit; }
::selection { background: #cfe3ff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b7c3d6; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(140deg, #0d3f7c 0%, #1256a6 45%, #1f74d8 100%);
  color: #fff; transition: opacity .35s ease;
}
.boot-logo { font-size: 30px; font-weight: 750; letter-spacing: 4px; }
.boot-sub { font-size: 13px; opacity: .8; letter-spacing: 1px; }
.boot-bar { width: 200px; height: 3px; background: rgba(255,255,255,.22); border-radius: 3px; overflow: hidden; margin-top: 14px; }
.boot-bar i { display: block; width: 40%; height: 100%; background: #fff; border-radius: 3px; animation: bootslide 1s ease-in-out infinite; }
@keyframes bootslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #0c2c52; color: #cfdcee;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #e08a1e, #c96b12); color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 10px rgba(224,138,30,.35);
}
.brand-txt b { display: block; color: #fff; font-size: 15px; letter-spacing: .5px; }
.brand-txt span { display: block; font-size: 10.5px; opacity: .62; letter-spacing: .3px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 8px 24px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-color: transparent; }
.nav-group { margin-top: 10px; }
.nav-group > h5 { font-size: 10.5px; letter-spacing: 1.2px; color: #6f8cb0; padding: 8px 12px 4px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px; margin: 1px 4px; border-radius: 7px;
  color: #c2d2e6; font-size: 13px; cursor: pointer; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active { background: linear-gradient(90deg, rgba(31,116,216,.95), rgba(31,116,216,.55)); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.nav-item.active::before { content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #e08a1e; }
.nav-item .ic { width: 16px; height: 16px; opacity: .9; flex: 0 0 16px; }
.nav-item .badge-dot { margin-left: auto; background: #e05252; color: #fff; font-size: 10px; padding: 0 5px; border-radius: 8px; line-height: 16px; }
.sidebar-foot { padding: 10px 16px 14px; font-size: 10.5px; color: #5d7ba2; border-top: 1px solid rgba(255,255,255,.07); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 20px; position: sticky; top: 0; z-index: 15;
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.crumb b { color: var(--ink); font-weight: 600; font-size: 14px; }
.crumb .sep { opacity: .45; }
.topbar .grow { flex: 1; }
.role-switch { display: flex; align-items: center; gap: 7px; background: var(--brand-3); border: 1px solid #cfe0f7; border-radius: 8px; padding: 4px 8px 4px 10px; }
.role-switch label { font-size: 11px; color: var(--brand-4); font-weight: 600; }
.role-switch select { border: 0; background: transparent; font-size: 12px; color: var(--brand-4); font-weight: 600; outline: none; cursor: pointer; max-width: 190px; }
.iconbtn { position: relative; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.iconbtn:hover { background: var(--line-2); color: var(--brand); }
.iconbtn .dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: #e05252; }
.who { display: flex; align-items: center; gap: 8px; padding-left: 6px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; background: linear-gradient(135deg, #2b6fd8, #1256a6); flex: 0 0 auto; }
.who .nm { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.who .dp { font-size: 10.5px; color: var(--ink-3); line-height: 1.2; }
.content { flex: 1; padding: 18px 20px 40px; min-width: 0; }
.appfoot { padding: 10px 20px 16px; font-size: 11px; color: #9aa8b9; text-align: center; }

/* ---------- page ---------- */
.page { max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h2 { font-size: 19px; letter-spacing: -.3px; }
.page-head .sub { color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.page-head .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 14px; }
.card-head .sub { font-size: 11.5px; color: var(--ink-3); }
.card-head .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px; }
.card-body.tight { padding: 10px 14px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 340px; }
.grid-side-l { grid-template-columns: 340px minmax(0, 1fr); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 650; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.mt0 { margin-top: 0 !important; } .mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; } .mt20 { margin-top: 20px; }
.mb0 { margin-bottom: 0 !important; } .mb6 { margin-bottom: 6px; } .mb10 { margin-bottom: 10px; } .mb14 { margin-bottom: 14px; }
.w100 { width: 100%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 7px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
  transition: all .15s ease; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: #c4d3e8; color: var(--brand); background: #fbfdff; text-decoration: none; }
.btn .ic { width: 14px; height: 14px; }
.btn-primary { background: linear-gradient(180deg, #2472d6, #1256a6); border-color: #1256a6; color: #fff; box-shadow: 0 2px 6px rgba(18,86,166,.28); }
.btn-primary:hover { background: linear-gradient(180deg, #2b7de2, #1560b8); color: #fff; border-color: #1560b8; }
.btn-accent { background: linear-gradient(180deg, #ef9f33, #dd8318); border-color: #d47c12; color: #fff; box-shadow: 0 2px 6px rgba(221,131,24,.28); }
.btn-accent:hover { background: linear-gradient(180deg, #f4a942, #e08a1e); color: #fff; }
.btn-danger { background: #fff; border-color: #f0c4c1; color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); border-color: #e9a7a2; color: var(--bad); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #14805c; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-2); }
.btn-ghost:hover { background: var(--brand-3); }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn-lg { height: 38px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 7px 0 0 7px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 7px 7px 0; }
.btn-group .btn.active { background: var(--brand-3); color: var(--brand); border-color: #bcd5f5; font-weight: 600; position: relative; z-index: 1; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.form-grid.c1 { grid-template-columns: 1fr; }
.form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-item.span2 { grid-column: span 2; }
.form-item.span3 { grid-column: span 3; }
.label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 4px; }
.label .req, .req { color: #e05252; font-weight: 700; }
.hint { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.err { font-size: 11.5px; color: var(--bad); display: flex; align-items: center; gap: 4px; }
.input, .select, .textarea {
  width: 100%; height: 32px; padding: 0 10px; font-size: 13px; color: var(--ink);
  border: 1px solid #d4ddec; border-radius: 7px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.textarea { height: auto; min-height: 74px; padding: 8px 10px; line-height: 1.55; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31,116,216,.12); }
.input[readonly], .input:disabled, .select:disabled, .textarea[readonly] { background: #f4f6fa; color: var(--ink-2); cursor: default; }
.input.invalid, .select.invalid, .textarea.invalid { border-color: #e05252; background: #fffafa; }
.input.sm, .select.sm { height: 28px; font-size: 12px; }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); pointer-events: none; }
.input-ic .input { padding-left: 30px; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.checkbox input, .radio input { width: 15px; height: 15px; accent-color: var(--brand-2); cursor: pointer; }
.switch { position: relative; width: 38px; height: 21px; border-radius: 999px; background: #ccd6e4; cursor: pointer; transition: .18s; flex: 0 0 38px; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch.on { background: var(--brand-2); }
.switch.on::after { left: 19px; }

/* ---------- toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fbfcfe; border-radius: var(--radius) var(--radius) 0 0; }
.toolbar .grow { flex: 1; }
.filter { display: flex; align-items: center; gap: 6px; }
.filter > .label { white-space: nowrap; font-size: 12px; color: var(--ink-3); }
.filter .input, .filter .select { width: auto; min-width: 130px; height: 30px; font-size: 12.5px; }
.searchbox { position: relative; }
.searchbox .ic { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-3); }
.searchbox .input { padding-left: 29px; width: 240px; height: 30px; }

/* ---------- table ---------- */
.tablewrap { overflow: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.table th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-2);
  background: #f7f9fd; padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.table tbody tr:hover { background: #f8fbff; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table.compact th { padding: 7px 10px; }
table.table.compact td { padding: 7px 10px; }
table.table .num { font-variant-numeric: tabular-nums; }
table.table .actions { white-space: nowrap; }
table.table .actions .btn + .btn { margin-left: 4px; }
table.table tr.selected { background: #eef5ff !important; }
table.table tr.clickable { cursor: pointer; }
table.table th .sort { cursor: pointer; user-select: none; }
.table-empty { padding: 44px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.table-empty .big { font-size: 26px; opacity: .35; margin-bottom: 8px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3); }
.pager .grow { flex: 1; }
.pager .btn { height: 26px; padding: 0 8px; min-width: 26px; }
.pager .btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- tags / status ---------- */
.tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; background: var(--line-2); color: var(--ink-2); white-space: nowrap; line-height: 1; }
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.tag-blue { background: var(--info-bg); color: #1f5fbf; }
.tag-green, .tag-ok { background: var(--ok-bg); color: #0f7a55; }
.tag-orange, .tag-warn { background: var(--warn-bg); color: #a8680a; }
.tag-red, .tag-bad { background: var(--bad-bg); color: #bf2f26; }
.tag-gray { background: #f0f2f6; color: #66769b; }
.tag-purple { background: #f1ecfd; color: #6b45c9; }
.tag-cyan { background: #e6f6fa; color: #0d7c95; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; background: var(--brand-3); color: var(--brand); font-weight: 600; }
.pill-light { background: #f0f3f8; color: var(--ink-3); font-weight: 500; }

/* ---------- stats / kpi ---------- */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.stat .k { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 25px; font-weight: 720; letter-spacing: -.6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.stat .d { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.stat .up { color: var(--ok); } .stat .down { color: var(--bad); }
.stat .spark { position: absolute; right: 10px; bottom: 8px; opacity: .55; }
.stat.accent { border-top: 2px solid var(--accent); }
.stat.brand { border-top: 2px solid var(--brand-2); }
.stat.ok { border-top: 2px solid var(--ok); }
.stat.bad { border-top: 2px solid var(--bad); }
.stat .ico-box { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-3); color: var(--brand); }
.stat .ico-box .ic { width: 17px; height: 17px; }

/* ---------- tabs / steps / timeline ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 8px 14px; font-size: 13px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab .count { font-size: 10.5px; background: var(--line-2); border-radius: 8px; padding: 0 5px; margin-left: 4px; color: var(--ink-3); }
.tab.active .count { background: var(--brand-3); color: var(--brand); }
.steps { display: flex; align-items: flex-start; gap: 0; }
.step { flex: 1; display: flex; align-items: flex-start; gap: 9px; position: relative; min-width: 0; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 26px; right: 6px; top: 13px; height: 1px; background: var(--line); }
.step.done:not(:last-child)::after { background: #a8d6c5; }
.step .no { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--ink-3); flex: 0 0 26px; z-index: 1; }
.step.done .no { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.cur .no { background: #fff; border-color: var(--brand-2); color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31,116,216,.15); }
.step .st { padding-right: 10px; min-width: 0; }
.step .st b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.step .st span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.step.done .st b { color: var(--ok); }
.step.cur .st b { color: var(--brand); }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 14px 0; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--line); }
.tl-item.act::before { border-color: var(--brand-2); background: var(--brand-2); }
.tl-item.ok::before { border-color: var(--ok); background: var(--ok); }
.tl-item.bad::before { border-color: var(--bad); background: var(--bad); }
.tl-item b { font-size: 12.5px; font-weight: 600; }
.tl-item .tm { font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.tl-item p { font-size: 12px; color: var(--ink-2); margin: 3px 0 0; }

/* ---------- modal / drawer / toast ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(13, 28, 48, .45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadein .16s ease; backdrop-filter: blur(2px); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow-3); width: 640px; max-width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: popin .18s cubic-bezier(.2,.9,.3,1.3); }
@keyframes popin { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; }
.modal-head .sub { font-size: 11.5px; color: var(--ink-3); }
.modal-head .x { margin-left: auto; width: 28px; height: 28px; border-radius: 6px; border: 0; background: transparent; cursor: pointer; color: var(--ink-3); font-size: 17px; line-height: 1; }
.modal-head .x:hover { background: var(--line-2); color: var(--ink); }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfcfe; border-radius: 0 0 12px 12px; }
.drawer-mask { position: fixed; inset: 0; background: rgba(13,28,48,.35); z-index: 1000; animation: fadein .16s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 720px; max-width: 94vw; background: #fff; box-shadow: -12px 0 40px rgba(13,28,48,.18); z-index: 1001; display: flex; flex-direction: column; animation: slidein .22s ease; }
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 5000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1d2a3a; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 8px; animation: toastin .2s ease; max-width: 560px; }
.toast.ok { background: #0f7a55; } .toast.bad { background: #b8342b; } .toast.warn { background: #98620b; }
@keyframes toastin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- misc ---------- */
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty .big { font-size: 34px; opacity: .28; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.kv.wide { grid-template-columns: 128px 1fr; }
.kv.inline { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.kv.inline .pair { display: flex; gap: 8px; align-items: baseline; }
.kv.inline .pair span { color: var(--ink-3); font-size: 12.5px; }
.info-box { background: #f7faff; border: 1px solid #dbe7f8; border-left: 3px solid var(--brand-2); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); }
.warn-box { background: var(--warn-bg); border: 1px solid #f2dcb5; border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #7d5106; }
.bad-box { background: var(--bad-bg); border: 1px solid #f3cbc6; border-left: 3px solid var(--bad); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #93241c; }
.ok-box { background: var(--ok-bg); border: 1px solid #c8e9dc; border-left: 3px solid var(--ok); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #0b6b4b; }
.progress { height: 7px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), #4f97ea); transition: width .4s ease; }
.progress.ok > i { background: linear-gradient(90deg, #19a06f, #4cc39a); }
.progress.warn > i { background: linear-gradient(90deg, #dd8318, #f0a84a); }
.progress.bad > i { background: linear-gradient(90deg, #cf3f36, #e8786f); }
.bar-row { display: grid; grid-template-columns: 110px 1fr 56px; align-items: center; gap: 10px; font-size: 12.5px; padding: 5px 0; }
.bar-row .track { height: 8px; border-radius: 4px; background: #eef2f8; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2472d6, #6aa9ef); }
.bar-row .val { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.avatar-sm { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; color: #fff; font-weight: 700; background: linear-gradient(135deg, #2b6fd8, #1256a6); flex: 0 0 auto; }
.avatar-lg { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; color: #fff; font-weight: 700; background: linear-gradient(135deg, #2b6fd8, #1256a6); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; background: #f0f4fa; border: 1px solid var(--line); color: var(--ink-2); border-radius: 6px; padding: 1px 7px; }
.chip.hi { background: #fff7e8; border-color: #f3dfb8; color: #8a5a08; }
.filelist { display: flex; flex-direction: column; gap: 6px; }
.filerow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: #fafcff; border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 9px; }
.filerow .ic { width: 16px; height: 16px; color: var(--brand-2); flex: 0 0 auto; }
.filerow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filerow .sz { color: var(--ink-3); font-size: 11px; }
.filerow .del { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 13px; padding: 0 2px; }
.filerow .del:hover { color: var(--bad); }
.dropzone { border: 1.5px dashed #c9d6e8; border-radius: 9px; background: #fbfdff; padding: 16px; text-align: center; color: var(--ink-3); font-size: 12.5px; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand-2); background: #f5faff; color: var(--brand); }
.upload-btn { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 8px; font-size: 11.5px; border: 1px solid #b9cbe6; border-radius: 5px; background: linear-gradient(180deg, #fdfefe, #eef4fc); color: #1a4f8f; cursor: pointer; white-space: nowrap; }
.upload-btn:hover { background: #e6f0fe; border-color: #8fb2e0; }
.upload-btn .ic { width: 12px; height: 12px; }
.kbd { font-family: var(--mono); font-size: 11px; background: #f0f3f8; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--ink-2); }
.notice { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.notice .ic { width: 13px; height: 13px; }
.split-line { height: 1px; background: var(--line-2); margin: 10px 0; }
.badge-num { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: var(--brand-3); color: var(--brand); font-size: 10.5px; font-weight: 700; padding: 0 5px; }
.scroll-y { overflow-y: auto; }
.hide { display: none !important; }
.pointer { cursor: pointer; }
.flex1 { flex: 1; min-width: 0; }

/* ---------- charts ---------- */
.chart { width: 100%; overflow: visible; }
.chart text { font-size: 10.5px; fill: #8494a6; font-family: -apple-system, "Microsoft YaHei", sans-serif; }
.chart .axis { stroke: #e8edf5; stroke-width: 1; }
.chart .gl { stroke: #f1f4f9; stroke-width: 1; stroke-dasharray: 3 3; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

/* ---------- print ---------- */
@media print {
  .sidebar, .topbar, .page-head .acts, .toolbar, .appfoot { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; }
  body { background: #fff; }
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-side, .grid-side-l { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sidebar { position: fixed; left: -240px; transition: left .2s; }
  .sidebar.open { left: 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .crumb .grp { display: none; }
}
