/* 工程审计 AI 一体机 · 样式（克制配色：深蓝主色 + 风险三色，无渐变） */
:root {
  --bg: #F3F5F8; --card: #FFFFFF; --ink: #162030; --body: #384556; --muted: #687587; --faint: #98A3B3;
  --line: #E1E6ED; --line2: #ECEFF4; --hover: #F6F8FB;
  --brand: #1E4E8C; --brand-d: #153B6C; --brand-l: #EBF1F9; --brand-m: #C8D7EB;
  --side: #0F1F35; --side-2: #1A3253; --side-t: #A9BBD2; --side-h: #FFFFFF;
  --hi: #C42B2B; --hi-l: #FCEDED; --mid: #B86400; --mid-l: #FCF2E4; --lo: #2E6AAE; --lo-l: #EAF1FA; --ok: #1A7A4A; --ok-l: #E7F4EC;
  --gold: #E9A92E;
  --r: 8px; --r-s: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-l: 0 12px 32px rgba(16, 24, 40, .16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "SimSun", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --side-w: 224px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.6; color: var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-d); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.ic { flex: none; vertical-align: middle; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .xs { font-size: 11.5px; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12.5px; }
.b { font-weight: 600; color: var(--ink); } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.hi-t { color: var(--hi); } .mid-t { color: var(--mid); } .lo-t { color: var(--lo); } .ok-t { color: var(--ok); }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.sp { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.hide { display: none !important; }

/* ---------- 侧栏 ---------- */
.side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); background: var(--side); color: var(--side-t); display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand b { font-size: 15px; color: #fff; letter-spacing: .3px; }
.brand small { font-size: 11px; color: #8FA3BD; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { color: #fff; }
.nav { flex: 1; overflow-y: auto; padding: 8px 10px 12px; }
.nav-g { font-size: 11.5px; color: #6F86A4; padding: 14px 10px 6px; letter-spacing: .5px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--side-t); font-size: 14px; margin: 1px 0; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.on { background: var(--side-2); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--gold); }
.nav a .cnt { margin-left: auto; font-size: 11.5px; color: #fff; background: rgba(196, 43, 43, .9); border-radius: 9px; padding: 0 6px; line-height: 17px; min-width: 18px; text-align: center; }
.side-f { padding: 10px 12px 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.dev-mini { font-size: 11.5px; color: #8FA3BD; margin-bottom: 8px; }
.dev-mini .dm-r { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.dev-mini .dm-r span:first-child { width: 44px; flex: none; }
.dev-mini .dm-bar { flex: 1; height: 4px; background: rgba(255, 255, 255, .1); border-radius: 2px; overflow: hidden; }
.dev-mini .dm-bar i { display: block; height: 100%; background: #5B8FD6; border-radius: 2px; transition: width .8s; }
.dev-mini .dm-v { width: 32px; text-align: right; color: #C5D2E3; font-variant-numeric: tabular-nums; }
.aist { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #8FA3BD; }
.aist i { width: 7px; height: 7px; border-radius: 50%; background: #7C8BA0; flex: none; }
.aist.on i { background: #3BBF7A; box-shadow: 0 0 0 3px rgba(59, 191, 122, .18); }
.aist.off i { background: #D9A23B; }

/* ---------- 顶栏 ---------- */
.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 20px 0 24px; }
.menu-btn { display: none; }
.crumb { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; min-width: 0; }
.crumb b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--brand); }
.search { position: relative; margin-left: auto; width: 340px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid transparent; border-radius: 7px; padding: 0 10px; height: 34px; color: var(--muted); }
.search:focus-within { background: #fff; border-color: var(--brand-m); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; height: 100%; font-size: 13px; }
.sr { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-l); padding: 6px; display: none; max-height: 380px; overflow: auto; }
.sr.show { display: block; }
.sr a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 5px; color: var(--body); font-size: 13px; }
.sr a:hover, .sr a.act { background: var(--hover); }
.sr .k { font-size: 11.5px; color: var(--muted); width: 48px; flex: none; }
.sr .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb { display: flex; align-items: center; gap: 6px; position: relative; }
.net-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ok); background: var(--ok-l); border-radius: 5px; padding: 3px 8px; white-space: nowrap; margin-right: 4px; }
.tb-btn { position: relative; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 7px; color: var(--muted); cursor: pointer; }
.tb-btn:hover { background: var(--hover); color: var(--ink); }
.tb-btn .dot { position: absolute; top: 3px; right: 2px; background: var(--hi); color: #fff; font-size: 10px; line-height: 15px; min-width: 15px; padding: 0 4px; border-radius: 8px; }
.user { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 7px; }
.user:hover { background: var(--hover); }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; }
.user .nm { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.user .nm b { font-size: 13px; color: var(--ink); } .user .nm small { font-size: 11px; color: var(--muted); }
.pop { position: absolute; top: 46px; right: 0; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-l); display: none; z-index: 50; overflow: hidden; }
.pop.show { display: block; }
.pop-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.pop-b { max-height: 360px; overflow: auto; padding: 4px 0; }
.nt { display: flex; gap: 10px; padding: 9px 14px; color: var(--body); }
.nt:hover { background: var(--hover); }
.nt b { font-weight: 500; font-size: 13px; color: var(--ink); display: block; }
.nt small { font-size: 12px; color: var(--muted); }
.upop { width: 240px; }
.upop .u-h { padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.upop .u-h b { display: block; color: var(--ink); } .upop .u-h small { color: var(--muted); font-size: 12px; }
.upop a, .upop button.ua { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 14px; color: var(--body); font-size: 13px; background: none; border: 0; cursor: pointer; text-align: left; }
.upop a:hover, .upop button.ua:hover { background: var(--hover); }

/* ---------- 内容 ---------- */
.content { padding: 20px 24px 28px; flex: 1; min-width: 0; }
.foot { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); padding: 10px 24px 14px; border-top: 1px solid var(--line); background: #fff; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ph h1 { font-size: 20px; line-height: 1.35; }
.ph p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ph-a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ph-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.ph-meta b { color: var(--body); font-weight: 500; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line2); min-height: 48px; }
.card-h h3 { font-size: 14.5px; }
.card-h .sub { font-size: 12px; color: var(--muted); }
.card-h .act { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 14px 16px; }
.card-b.flush { padding: 0; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid, .note + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid > *, .col > .card, .docs-layout > * { margin-top: 0 !important; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-31 { grid-template-columns: minmax(0, 3fr) minmax(0, 1.25fr); } .g-11 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* KPI */
.kpis { display: grid; gap: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi { padding: 14px 16px; border-right: 1px solid var(--line2); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi .l { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-size: 24px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 2px; white-space: nowrap; }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); background: #F7F9FB; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.clk { cursor: pointer; }
.tbl tr.sel td { background: var(--brand-l) !important; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl.compact td { padding: 7px 10px; } .tbl.compact th { padding: 7px 10px; }
.tbl-wrap { overflow-x: auto; }
.t2 { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* 标签页 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { position: relative; padding: 9px 14px 10px; color: var(--muted); font-size: 14px; white-space: nowrap; border: 0; background: none; cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--brand); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.tabs .cnt { font-size: 11.5px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.seg { display: inline-flex; background: var(--bg); border-radius: 7px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 11px; border-radius: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); font-weight: 500; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--hover); border-color: #CCD4DF; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-p { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-p:hover { background: var(--brand-d); border-color: var(--brand-d); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--body); }
.btn-ghost:hover { background: var(--hover); border-color: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 5px; gap: 4px; }
.btn-icon { width: 34px; padding: 0; } .btn-sm.btn-icon { width: 28px; }
.btn-ok { color: var(--ok); } .btn-hi { color: var(--hi); }
.btn-link { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0; font-size: inherit; }
.btn-link:hover { text-decoration: underline; }

/* 风险等级 / 状态 */
.lv { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; white-space: nowrap; font-weight: 500; }
.lv::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; flex: none; }
.lv.hi { color: var(--hi); } .lv.mid { color: var(--mid); } .lv.lo { color: var(--lo); } .lv.ok { color: var(--ok); } .lv.na { color: var(--faint); }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; white-space: nowrap; color: var(--muted); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st.todo { color: var(--mid); } .st.done { color: var(--ok); } .st.excl { color: var(--faint); } .st.more { color: var(--lo); } .st.run { color: var(--brand); } .st.err { color: var(--hi); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; background: #F0F3F7; color: var(--body); font-size: 11.5px; white-space: nowrap; }
.tag.b { background: var(--brand-l); color: var(--brand); font-weight: 500; }
.tag.line { background: transparent; border: 1px solid var(--line); }
.rk { display: inline-flex; min-width: 22px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 4px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rk.hi { background: var(--hi-l); color: var(--hi); } .rk.mid { background: var(--mid-l); color: var(--mid); } .rk.lo { background: var(--lo-l); color: var(--lo); } .rk.z { background: #F2F4F7; color: var(--faint); font-weight: 500; }

/* 进度条 */
.bar { height: 6px; background: #EBEEF3; border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .4s; }
.bar.ok > i { background: var(--ok); } .bar.warn > i { background: var(--mid); } .bar.err > i { background: var(--hi); } .bar.thin { height: 4px; }
.meter { display: flex; align-items: center; gap: 8px; }
.meter .bar { flex: 1; }
.meter .v { width: 44px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--body); }

/* 表单 */
.inp, .sel, textarea.inp { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: #fff; outline: 0; font-size: 13.5px; min-width: 0; }
textarea.inp { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; width: 100%; }
.inp:focus, .sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30, 78, 140, .1); }
.inp.sm, .sel.sm { height: 28px; font-size: 12.5px; padding: 0 8px; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld label { font-size: 12.5px; color: var(--muted); }
.sw { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; background: #C9D1DC; border-radius: 10px; cursor: pointer; transition: .2s; }
.sw span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.sw input:checked + span { background: var(--brand); }
.sw input:checked + span::after { transform: translateX(14px); }

/* 提示 */
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 7px; background: var(--brand-l); color: var(--brand-d); font-size: 12.5px; line-height: 1.6; }
.note.warn { background: var(--mid-l); color: #8A4B00; } .note.gray { background: #F2F4F7; color: var(--body); } .note.ok { background: var(--ok-l); color: #145E39; } .note.err { background: var(--hi-l); color: #8F1F1F; }
.note .ic { margin-top: 2px; }
.ainote { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.ainote.busy { color: var(--brand); }
.ainote .btn-link { margin-left: 4px; font-size: 12px; }
.spin { width: 13px; height: 13px; border: 2px solid var(--brand-m); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #1D2939; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: 80vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #165C38; } .toast.err { background: #8F1F1F; }

/* 弹窗 / 抽屉 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 36, .42); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: 560px; max-width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-l); }
.modal.wide { width: 880px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.modal-h b { font-size: 15px; color: var(--ink); }
.modal-b { padding: 16px 18px; overflow: auto; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line2); display: flex; justify-content: flex-end; gap: 8px; }
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 36, .32); z-index: 90; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 600px; max-width: 100vw; background: #fff; z-index: 95; box-shadow: var(--shadow-l); display: flex; flex-direction: column; animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: .6; } }
.drawer-h { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.drawer-h .t { flex: 1; min-width: 0; }
.drawer-h .t b { display: block; font-size: 15.5px; color: var(--ink); line-height: 1.45; }
.drawer-b { flex: 1; overflow: auto; padding: 14px 18px 20px; }
.drawer-f { padding: 12px 18px; border-top: 1px solid var(--line2); display: flex; gap: 8px; align-items: center; }
body.modal-open { overflow: hidden; }
.sec-t { font-size: 13px; font-weight: 600; color: var(--ink); margin: 14px 0 8px; display: flex; align-items: center; gap: 6px; }
.sec-t:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); min-width: 0; }
.quote { border-left: 3px solid var(--brand-m); background: #F8FAFC; padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 13px; line-height: 1.7; color: var(--body); }
.quote .src { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.quote mark, .hl { background: #FFF1C2; color: inherit; padding: 0 1px; border-radius: 2px; }
.calc { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12.5px; background: #F7F9FB; border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; color: var(--body); white-space: pre-wrap; line-height: 1.7; }
.ai-out { font-size: 13.5px; line-height: 1.8; color: var(--body); }
.ai-out p { margin: 0 0 8px; } .ai-out ul, .ai-out ol { margin: 0 0 8px; padding-left: 20px; } .ai-out li { margin: 2px 0; }
.ai-out b, .ai-out strong { color: var(--ink); }
.ai-out h4 { font-size: 13.5px; margin: 10px 0 4px; }

/* 项目头 */
.proj-h { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.proj-h h1 { font-size: 20px; line-height: 1.35; }
.proj-h .code { font-size: 12.5px; color: var(--muted); font-family: Consolas, monospace; margin-right: 8px; }

/* 体检分 */
.score { display: flex; align-items: center; gap: 16px; }
.score-ring { position: relative; width: 104px; height: 104px; flex: none; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .v b { font-size: 28px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.score-ring .v small { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.dims { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.dim { padding: 10px 12px; border-right: 1px solid var(--line2); min-width: 0; }
.dim:last-child { border-right: 0; }
.dim .l { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dim .v { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }

/* 资料：分类树 + 列表 + 预览 */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
.ctree { font-size: 13px; }
.ctree .g { font-size: 12px; color: var(--muted); padding: 10px 12px 4px; font-weight: 500; }
.ctree a { display: flex; align-items: center; gap: 6px; padding: 5px 12px; color: var(--body); border-radius: 0; }
.ctree a:hover { background: var(--hover); }
.ctree a.on { background: var(--brand-l); color: var(--brand); font-weight: 500; }
.ctree a .n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ctree a.miss { color: var(--hi); } .ctree a.miss .n { color: var(--hi); }
.fi { display: inline-flex; width: 26px; height: 30px; border-radius: 3px; align-items: flex-end; justify-content: center; font-size: 8.5px; font-weight: 700; color: #fff; padding-bottom: 3px; flex: none; position: relative; letter-spacing: .2px; }
.fi::after { content: ""; position: absolute; right: 0; top: 0; border-left: 7px solid rgba(255, 255, 255, .45); border-bottom: 7px solid rgba(255, 255, 255, .45); border-top: 7px solid var(--bg); border-right: 7px solid var(--bg); }
.fi.pdf { background: #C9463D; } .fi.scan { background: #7A5AA8; } .fi.doc { background: #2E64B5; } .fi.xls { background: #2D7D4F; } .fi.img { background: #A86E1E; } .fi.zip { background: #5E6B7D; } .fi.rar { background: #6B4F7D; } .fi.txt { background: #6B7789; } .fi.dwg { background: #8A8F98; }

/* 文档原件 */
.viewer { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; }
.viewer-l { background: #E9ECF0; padding: 18px; overflow: auto; height: calc(100vh - 262px); min-height: 430px; border-right: 1px solid var(--line); }
.viewer-r { overflow: auto; height: calc(100vh - 262px); min-height: 430px; }
.paper { position: relative; background: #FFFEFA; width: 100%; max-width: 620px; margin: 0 auto; padding: 44px 48px 52px; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 6px 18px rgba(0, 0, 0, .06); font-family: var(--serif); color: #1B1B1B; font-size: 13.5px; line-height: 1.95; min-height: 760px; }
.paper.scan { background: #F8F6EF; transform: rotate(-.35deg); filter: contrast(1.03) saturate(.9); }
.paper.scan::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 10%, rgba(0, 0, 0, .025), transparent 60%), radial-gradient(ellipse at 90% 85%, rgba(0, 0, 0, .03), transparent 55%); pointer-events: none; }
.paper .p-no { text-align: right; font-size: 12px; color: #444; }
.paper h2 { font-family: var(--serif); text-align: center; font-size: 21px; letter-spacing: 3px; margin: 6px 0 18px; font-weight: 700; color: #111; }
.paper h3 { font-family: var(--serif); font-size: 14px; margin: 14px 0 4px; font-weight: 700; color: #111; }
.paper p { margin: 0 0 6px; text-indent: 2em; }
.paper p.ni { text-indent: 0; }
.paper table { width: 100%; border-collapse: collapse; margin: 8px 0 10px; font-size: 12.5px; line-height: 1.6; }
.paper th, .paper td { border: 1px solid #555; padding: 4px 6px; text-align: left; vertical-align: top; }
.paper th { background: rgba(0, 0, 0, .03); font-weight: 700; }
.paper td.num { text-align: right; font-family: "Times New Roman", serif; }
.paper .sig { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.paper .sig > div { min-width: 40%; position: relative; }
.paper .seal { position: absolute; width: 132px; height: 132px; opacity: .82; mix-blend-mode: multiply; pointer-events: none; }
.paper mark { background: transparent; color: inherit; border-bottom: 1.5px solid rgba(30, 78, 140, .45); transition: background .15s; padding: 0 1px; }
.paper mark.on { background: rgba(255, 214, 102, .55); border-bottom-color: #D49A00; }
.paper mark.bad { border-bottom: 2px solid var(--hi); }
.paper .blank-sign { display: inline-block; min-width: 80px; border-bottom: 1px solid #333; height: 1.2em; vertical-align: bottom; }
.paper .handw { font-family: "STKaiti", "KaiTi", "Kaiti SC", serif; color: #1F3A8A; font-size: 15px; }
.ocr-box { position: absolute; border: 1.5px solid rgba(30, 78, 140, .55); background: rgba(30, 78, 140, .05); border-radius: 2px; pointer-events: none; }
.vr-sec { padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.vr-sec h4 { font-size: 13px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.fld-row { display: grid; grid-template-columns: 108px minmax(0, 1fr) 46px; gap: 8px; padding: 5px 6px; border-radius: 5px; font-size: 13px; cursor: default; align-items: baseline; }
.fld-row:hover, .fld-row.on { background: #FFF6D9; }
.fld-row .k { color: var(--muted); } .fld-row .v { color: var(--ink); font-weight: 500; word-break: break-all; } .fld-row .c { font-size: 11.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.fld-row.bad .v { color: var(--hi); }
.outline { font-size: 13px; margin: 0; padding-left: 0; list-style: none; }
.outline li { padding: 2px 0; color: var(--body); }
.outline li.l2 { padding-left: 16px; color: var(--muted); }

/* 时间线 */
.tl-wrap { overflow-x: auto; padding: 6px 0 2px; }
.tl svg { display: block; }
.tl text { font-family: var(--font); }
.tl-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* 金额链 */
.chain { display: grid; gap: 10px; }
.chain-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) 118px; gap: 12px; align-items: center; font-size: 13px; }
.chain-row .lb { color: var(--body); white-space: nowrap; }
.chain-row .lb small { display: block; font-size: 11.5px; color: var(--muted); }
.chain-row .track { position: relative; height: 22px; background: #F2F4F8; border-radius: 4px; overflow: hidden; }
.chain-row .track i { position: absolute; top: 0; bottom: 0; left: 0; background: #9DB6D9; border-radius: 4px; }
.chain-row .track i.main { background: var(--brand); }
.chain-row .track i.add { background: #E9A92E; }
.chain-row .track i.bad { background: var(--hi); }
.chain-row .track b.ref { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1.5px dashed #3D4B5E; }
.chain-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; white-space: nowrap; }
.chain-row .val small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }

/* 关系图 */
.graph { position: relative; }
.graph svg { display: block; width: 100%; height: auto; }
.graph text { font-family: var(--font); }
.graph .nd { cursor: pointer; }
.graph .nd:hover rect { stroke: var(--brand); }

/* 聊天 */
.chat { display: flex; flex-direction: column; height: calc(100vh - 182px); min-height: 460px; }
.chat-log { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 920px; }
.msg .who { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.msg.u { align-self: flex-end; flex-direction: row-reverse; }
.msg.u .who { background: var(--brand); color: #fff; }
.msg.a .who { background: var(--brand-l); color: var(--brand); }
.msg .bub { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.8; min-width: 0; }
.msg.u .bub { background: var(--brand); color: #fff; border-top-right-radius: 3px; }
.msg.a .bub { background: #fff; border: 1px solid var(--line); border-top-left-radius: 3px; }
.cites { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.cites a, .cites span.cite { font-size: 12px; color: var(--muted); display: flex; gap: 6px; }
.cites a:hover { color: var(--brand); }
.cites .ci { color: var(--brand); font-weight: 600; flex: none; }
sup.ref { color: var(--brand); font-weight: 600; font-size: 10.5px; cursor: pointer; margin: 0 1px; }
.chat-in { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 8px; align-items: flex-end; }
.chat-in textarea { flex: 1; resize: none; height: 44px; max-height: 140px; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.sugg button { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 4px 12px; font-size: 12.5px; color: var(--body); cursor: pointer; }
.sugg button:hover { border-color: var(--brand-m); color: var(--brand); background: var(--brand-l); }

/* 上传 */
.drop { border: 1.5px dashed #B8C4D4; border-radius: 10px; background: #FAFBFD; padding: 22px; text-align: center; transition: .15s; }
.drop.over { border-color: var(--brand); background: var(--brand-l); }
.drop h3 { font-size: 15px; margin: 8px 0 4px; }
.drop p { margin: 0; font-size: 12.5px; color: var(--muted); }
.up-modes { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.xfer { display: grid; grid-template-columns: 30px minmax(0, 1fr) 150px 92px 70px; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.xfer:last-child { border-bottom: 0; }
.xfer .nm { min-width: 0; }
.xfer .nm b { font-weight: 500; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xfer .nm small { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xfer .sp { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--body); white-space: nowrap; }
.xfer .ops { display: flex; gap: 2px; justify-content: flex-end; }
.gauge { display: flex; align-items: flex-end; gap: 14px; }
.gauge .big { font-size: 30px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.gauge .big small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.spark { width: 100%; height: 54px; display: block; }
.stages { display: flex; gap: 3px; }
.stages i { flex: 1; height: 5px; border-radius: 2px; background: #E6EAF0; }
.stages i.done { background: var(--ok); } .stages i.run { background: var(--brand); animation: pulse 1s ease-in-out infinite; } .stages i.err { background: var(--hi); }
@keyframes pulse { 50% { opacity: .45; } }
.share-tree { font-size: 13px; border: 1px solid var(--line); border-radius: 8px; max-height: 320px; overflow: auto; }
.share-tree label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.share-tree label:hover { background: var(--hover); }
.share-tree .ind { display: inline-block; width: 16px; }

/* 规则 */
.rule-list .ri { padding: 10px 14px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.rule-list .ri:hover { background: var(--hover); }
.rule-list .ri.on { background: var(--brand-l); }
.rule-list .ri b { font-weight: 500; color: var(--ink); font-size: 13.5px; }
.param { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line2); font-size: 13px; }
.param:last-child { border-bottom: 0; }
.param .k { width: 120px; color: var(--muted); flex: none; }

/* 一体机 */
.npu { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.npu-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 8px; }
.npu-h b { color: var(--ink); font-weight: 600; }
.npu .meter { margin: 5px 0; font-size: 12px; }
.npu .meter span:first-child { width: 52px; color: var(--muted); flex: none; }
.ledger { font-size: 12.5px; }

/* 底稿 */
.wp { background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); padding: 34px 40px; font-family: var(--serif); color: #1B1B1B; font-size: 13.5px; line-height: 1.9; max-width: 820px; margin: 0 auto; }
.wp h2 { font-family: var(--serif); text-align: center; font-size: 20px; letter-spacing: 2px; margin: 0 0 14px; }
.wp table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0; }
.wp th, .wp td { border: 1px solid #666; padding: 5px 7px; vertical-align: top; text-align: left; }
.wp th { background: #F4F4F2; width: 108px; font-weight: 700; }
.wp .fill { background: #FFF8DD; }
.wp ol { margin: 4px 0; padding-left: 22px; }

/* 简易柱 */
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: 92px minmax(0, 1fr) 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.hbar .t { height: 14px; background: #F0F2F6; border-radius: 3px; overflow: hidden; display: flex; }
.hbar .t i { display: block; height: 100%; }
.hbar .t i.hi { background: var(--hi); } .hbar .t i.mid { background: #E9A92E; } .hbar .t i.lo { background: #7FA6D6; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; }
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.fstep { position: relative; padding: 12px 14px 12px 16px; background: #F7F9FC; border-right: 2px solid #fff; min-width: 0; }
.fstep:first-child { border-radius: 8px 0 0 8px; } .fstep:last-child { border-radius: 0 8px 8px 0; border-right: 0; }
.fstep .l { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fstep .v { font-size: 20px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.35; }
.fstep .s { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fstep.hl { background: var(--brand); } .fstep.hl .l, .fstep.hl .s { color: #C8D7EB; } .fstep.hl .v { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3n) { border-right: 0; }
  .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line2); }
  .search { width: 260px; }
}
@media (max-width: 1100px) {
  :root { --side-w: 0px; }
  .side { transform: translateX(-100%); width: 240px; transition: transform .2s; }
  body.nav-open .side { transform: none; }
  .mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 35; display: none; }
  body.nav-open .mask { display: block; }
  .menu-btn { display: inline-flex; }
  .g-21, .g-31, .g-12 { grid-template-columns: minmax(0, 1fr); }
  .viewer { grid-template-columns: minmax(0, 1fr); }
  .viewer-l { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .viewer-r { max-height: none; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .net-badge { display: none; }
}
@media (max-width: 760px) {
  .content { padding: 14px 12px 20px; }
  .top { padding: 0 10px; gap: 8px; }
  .search { display: none; }
  .user .nm { display: none; }
  .g2, .g3, .g4, .g6, .g-11 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-right: 1px solid var(--line2) !important; border-bottom: 1px solid var(--line2); }
  .kpi:nth-child(2n) { border-right: 0 !important; }
  .ph { flex-direction: column; align-items: flex-start; }
  .dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .fstep { border-radius: 6px !important; }
  .xfer { grid-template-columns: 30px minmax(0, 1fr) 70px; }
  .xfer .bar-c, .xfer .sp { display: none; }
  .paper { padding: 26px 22px; min-height: 0; }
  .drawer { width: 100vw; }
  .chain-row { grid-template-columns: 96px minmax(0, 1fr); }
  .chain-row .val { grid-column: 2; text-align: left; }
  .foot { padding: 10px 12px; }
}
