/* ============================================================
   算数-合肥聚研生物 · 业务管理系统
   轻量样式：无外部依赖，兼容低配主机与老旧浏览器
   ============================================================ */

:root {
  --brand-900: #0b1f33;
  --brand-800: #10293f;
  --brand-700: #143249;
  --brand-600: #1a405b;
  --accent: #12a594;
  --accent-dark: #0d867a;
  --accent-soft: #e6f6f3;
  --ink: #17222e;
  --ink-2: #3d4c5c;
  --ink-3: #6b7b8c;
  --ink-4: #9aa8b6;
  --line: #e3e9f0;
  --line-2: #eef2f7;
  --bg: #f3f6fa;
  --card: #ffffff;
  --blue: #2f6fed;
  --green: #129c74;
  --amber: #c47a12;
  --red: #d64545;
  --purple: #7b5bd6;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 41, 63, .04), 0 8px 24px rgba(16, 41, 63, .05);
  --shadow-lg: 0 24px 60px rgba(11, 31, 51, .18);
  --side-w: 232px;
  --top-h: 58px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* ---------- 全局滚动条：细窄、圆角、贴合浅色底 ---------- */
html { scrollbar-width: thin; scrollbar-color: #c6d1de transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #c6d1de; border-radius: 999px;
  border: 2px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: #a7b5c6; background-clip: content-box; }
*::-webkit-scrollbar-thumb:active { background: #8fa0b3; background-clip: content-box; }
*::-webkit-scrollbar-corner { background: transparent; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 8px; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-4); }
.tiny { font-size: 12px; }
.small { font-size: 12.5px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.mt0 { margin-top: 0 !important; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0 !important; }
.mb8 { margin-bottom: 8px; }
.mb4 { margin-bottom: 4px; }
.mb16 { margin-bottom: 16px; }
.flex { display: flex; gap: 8px; align-items: center; }
.flex-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.w-full { width: 100%; }
.hide { display: none !important; }

/* ---------- 基础框架 ---------- */
.app { min-height: 100vh; }
.side {
  position: fixed; z-index: 40; top: 0; bottom: 0; left: 0;
  width: var(--side-w);
  background: linear-gradient(178deg, #0c2135 0%, #0a1a2a 100%);
  color: #cfdae6;
  display: flex; flex-direction: column;
  transition: transform .22s ease;
}
.side-brand {
  padding: 16px 16px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  min-height: 62px;
}
.side-logo {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
  background: linear-gradient(140deg, #18c2ad, #0b7c92);
  display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 14px; letter-spacing: -.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.side-name { font-size: 14px; font-weight: 650; color: #fff; line-height: 1.3; }
.side-name em { display: block; font-style: normal; font-size: 10.5px; color: #7f97ad; font-weight: 400; letter-spacing: .06em; margin-top: 2px; }
.side-nav { flex: 1 1 auto; overflow-y: auto; padding: 10px 8px 24px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 6px; }
.side-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .26); }
.nav-group { margin: 4px 0 10px; }
.nav-group-title {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px 5px; font-size: 10.5px; letter-spacing: .08em;
  color: #6d8299; text-transform: uppercase; font-weight: 600;
}
.nav-group-title b { color: #8ea6bd; font-weight: 700; font-variant-numeric: tabular-nums; }
.nav-group-title s { flex: 1; height: 1px; background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; margin: 1px 0; border-radius: 7px;
  color: #b4c3d2; font-size: 12.5px; line-height: 1.5;
  text-decoration: none; white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.nav-item.active { background: linear-gradient(90deg, rgba(18, 165, 148, .22), rgba(18, 165, 148, .06)); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-item .ico { width: 16px; height: 16px; flex: 0 0 16px; opacity: .8; }
.nav-item.active .ico { opacity: 1; color: #35d0bd; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; }
.nav-item .no { margin-left: auto; font-size: 10px; color: #5f7488; font-variant-numeric: tabular-nums; }
.side-foot { padding: 10px 14px 14px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 11px; color: #5f7488; line-height: 1.7; }
.side-foot a { color: #8ea6bd; }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
}
.burger { display: none; }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb .c-group { font-size: 11.5px; color: var(--ink-4); white-space: nowrap; }
.crumb .c-no {
  font-size: 10.5px; font-weight: 700; color: var(--accent-dark);
  background: var(--accent-soft); border-radius: 4px; padding: 1px 5px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.crumb .c-title { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb .sep { color: #c9d3de; }
.topbar .grow { flex: 1; }
.search-box { position: relative; max-width: 280px; width: 100%; }
.search-box input {
  width: 100%; height: 32px; border: 1px solid var(--line); background: #f7f9fc;
  border-radius: 8px; padding: 0 10px 0 32px; font-size: 12.5px; color: var(--ink); outline: none;
}
.search-box input:focus { border-color: #b9cfd9; background: #fff; box-shadow: 0 0 0 3px rgba(18, 165, 148, .1); }
.search-box svg { position: absolute; left: 10px; top: 8px; width: 15px; height: 15px; color: var(--ink-4); }
.tb-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative; width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; color: var(--ink-2); background: transparent; border: 0; cursor: pointer;
}
.icon-btn:hover { background: #f1f5f9; color: var(--ink); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 3px;
  background: var(--red); color: #fff; border-radius: 8px; font-size: 9.5px;
  display: grid; place-items: center; font-weight: 700; border: 2px solid #fff;
}
.who { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 8px; border-radius: 8px; cursor: pointer; position: relative; }
.who:hover { background: #f1f5f9; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px;
  background: linear-gradient(140deg, #2d7ff9, #12a594);
  color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
}
.who .wname { font-size: 12.5px; line-height: 1.2; }
.who .wrole { font-size: 10.5px; color: var(--ink-4); line-height: 1.4; }
.menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 196px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.menu.open { display: block; }
.menu a, .menu button {
  display: flex; width: 100%; align-items: center; gap: 8px; text-align: left;
  padding: 7px 9px; border-radius: 6px; border: 0; background: none; font: inherit;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.menu a:hover, .menu button:hover { background: #f4f7fb; text-decoration: none; }
.menu .sep { height: 1px; background: var(--line-2); margin: 5px 4px; }
.menu .m-title { padding: 6px 9px 4px; font-size: 10.5px; color: var(--ink-4); letter-spacing: .06em; }

.page { padding: 18px 20px 44px; max-width: 1560px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head .ph-main { flex: 1 1 320px; min-width: 0; }
.page-title { font-size: 19px; line-height: 1.4; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.page-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 13px; font-weight: 650; color: var(--ink-2); margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }
.section-title .hint { font-weight: 400; font-size: 11.5px; color: var(--ink-4); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: .12s;
}
.btn:hover { border-color: #c9d6e3; color: var(--ink); text-decoration: none; background: #fbfcfe; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: #f0cccc; background: #fff7f7; }
.btn-danger:hover { background: #fdeaea; color: #b93232; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: #f1f5f9; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 6px; }
.btn-lg { height: 38px; padding: 0 18px; font-size: 13.5px; }
.btn[disabled], .btn.is-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; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 13px; font-weight: 650; }
.card-head .sub { font-size: 11.5px; color: var(--ink-4); }
.card-head .grow { flex: 1; }
.card-body { padding: 14px; }
.card-body.tight { padding: 10px 14px; }
.card-foot { padding: 9px 14px; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); font-size: 12px; color: var(--ink-3); }
.grid { display: grid; gap: 14px; }
.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)); }
.g23 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g32 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.side-col .card + .card { margin-top: 14px; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.kpi .k-label { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .k-label svg { width: 13px; height: 13px; color: var(--ink-4); }
.kpi .k-value { font-size: 23px; font-weight: 650; line-height: 1.3; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .k-value small { font-size: 11.5px; font-weight: 400; color: var(--ink-4); margin-left: 3px; }
.kpi .k-foot { font-size: 11px; color: var(--ink-4); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.kpi .k-foot .up { color: var(--green); }
.kpi .k-foot .down { color: var(--red); }
.kpi .k-mark { position: absolute; right: -10px; top: -10px; width: 62px; height: 62px; border-radius: 50%; background: var(--accent-soft); opacity: .55; }
.kpi.k-blue .k-mark { background: #e8f0ff; }
.kpi.k-amber .k-mark { background: #fdf2df; }
.kpi.k-red .k-mark { background: #fdeaea; }
.kpi.k-green .k-mark { background: #e6f6ef; }
.kpi .k-value.is-red { color: var(--red); }
.kpi .k-value.is-green { color: var(--green); }

/* ---------- 表格 ---------- */
.tbl-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--ink-3);
  background: #f8fafc; padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .01em;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover td { background: #fafcfe; }
.tbl tbody tr.is-warn td { background: #fffdf6; }
.tbl tbody tr.is-danger td { background: #fff9f9; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .no { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.tbl .cell-main { font-weight: 550; color: var(--ink); }
.tbl .cell-sub { font-size: 11px; color: var(--ink-4); margin-top: 1px; }
.tbl .ops { white-space: nowrap; text-align: right; }
.tbl .ops a { font-size: 12px; margin-left: 8px; }
.tbl .ops a:first-child { margin-left: 0; }
.tbl-compact td { padding: 6px 9px; }
.tbl thead.sticky th { position: sticky; top: 0; z-index: 2; }
.tbl tfoot td { background: #f8fafc; font-weight: 600; border-top: 1px solid var(--line); }
.tbl .num, .tbl .right { text-align: right; font-variant-numeric: tabular-nums; }

.pager { display: flex; align-items: center; gap: 5px; padding: 11px 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager .pg { min-width: 27px; height: 27px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 12px; background: #fff; }
.pager .pg:hover { border-color: #c9d6e3; text-decoration: none; }
.pager .pg.is-cur { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pager .pg-dot { color: var(--ink-4); padding: 0 2px; }
.pager .pg-info { margin-left: auto; font-size: 11.5px; color: var(--ink-4); }

/* ---------- 徽标 / 标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 550; white-space: nowrap; line-height: 1; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-green { color: #0d7a5a; background: #e6f6ef; }
.b-blue { color: #2359b8; background: #e9f1ff; }
.b-amber { color: #96600c; background: #fdf3e0; }
.b-red { color: #b93232; background: #fdeaea; }
.b-gray { color: #5d6b7a; background: #f0f3f7; }
.b-purple { color: #6146b5; background: #f0ecfd; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #f2f5f9; color: var(--ink-3); font-size: 10.5px; white-space: nowrap; }
.tag-accent { background: var(--accent-soft); color: var(--accent-dark); }
.tag-warn { background: #fdf3e0; color: #96600c; }
.tag-red { background: #fdeaea; color: #b93232; }
.tag-blue { background: #e9f1ff; color: #2359b8; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 12px; font-size: 11.5px; color: var(--ink-2); background: #fff; }
.chip .x { color: var(--ink-4); }
.chip.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.dot-mark { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.dot-mark.green { background: var(--green); }
.dot-mark.amber { background: var(--amber); }
.dot-mark.red { background: var(--red); }
.dot-mark.blue { background: var(--blue); }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .lbl { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.field .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; padding: 0 9px; font: inherit; font-size: 12.5px; color: var(--ink);
  outline: none; transition: .12s; min-width: 0;
}
.textarea { height: auto; min-height: 70px; padding: 7px 9px; line-height: 1.7; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #8fc5bf; box-shadow: 0 0 0 3px rgba(18, 165, 148, .12); }
.input::placeholder, .textarea::placeholder { color: #b3bfcb; }
.input[readonly], .input[disabled], .select[disabled] { background: #f6f8fb; color: var(--ink-3); }
.input-sm { height: 27px; font-size: 12px; }
.hint { font-size: 11px; color: var(--ink-4); }
.err { color: var(--red); font-size: 11.5px; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line-2); background: #fcfdfe; }
.filters .input, .filters .select { width: auto; min-width: 130px; height: 30px; }
.filters .grow { flex: 1; }
.checkline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.checkline input { accent-color: var(--accent); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 14px; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }
fieldset { border: 0; padding: 0; margin: 0; }
.legend { font-size: 12px; font-weight: 650; color: var(--ink-2); display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.legend::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); }
.quote-calc { background: #f8fafc; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12px; }
.quote-calc .row { display: flex; justify-content: space-between; padding: 2px 0; }
.quote-calc .row b { font-variant-numeric: tabular-nums; }
.quote-calc .total { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; font-size: 13.5px; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 4px; overflow-x: auto; }
.tab { padding: 9px 12px; font-size: 12.5px; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-700); border-bottom-color: var(--accent); font-weight: 600; }
.tab .cnt { font-size: 10.5px; background: #f0f3f7; color: var(--ink-3); border-radius: 8px; padding: 0 5px; margin-left: 4px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- 描述列表 ---------- */
.dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 7px 12px; font-size: 12.5px; margin: 0; }
.dl dt { color: var(--ink-4); font-size: 11.5px; padding-top: 1px; }
.dl dd { margin: 0; color: var(--ink); word-break: break-word; }
.dl.dl-wide { grid-template-columns: 120px minmax(0, 1fr); }
.dl-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.dl-2 .dl { grid-template-columns: 84px minmax(0, 1fr); }

/* ---------- 时间线 / 步骤 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 13px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -17px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #c3d0dd; box-shadow: 0 0 0 3px #fff; }
.tl-item.ok::before { background: var(--green); }
.tl-item.warn::before { background: var(--amber); }
.tl-item.danger::before { background: var(--red); }
.tl-item .tl-head { font-size: 12.5px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tl-item .tl-time { font-size: 11px; color: var(--ink-4); }
.tl-item .tl-body { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.steps { display: flex; gap: 0; align-items: stretch; margin: 2px 0 4px; }
.step { flex: 1; position: relative; padding: 8px 8px 8px 16px; font-size: 11.5px; color: var(--ink-4); background: #f6f8fb; }
.step:first-child { border-radius: 7px 0 0 7px; padding-left: 12px; }
.step:last-child { border-radius: 0 7px 7px 0; }
.step + .step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: inherit; clip-path: polygon(0 0, 100% 50%, 0 100%, 55% 50%); }
.step.done { background: #e6f6ef; color: #0d7a5a; }
.step.cur { background: #e9f1ff; color: #2359b8; font-weight: 600; }
.step.bad { background: #fdeaea; color: #b93232; }

/* ---------- 进度 ---------- */
.progress { height: 6px; background: #edf1f6; border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #2dc7b4, #12a594); border-radius: 4px; }
.progress.is-amber > i { background: linear-gradient(90deg, #f0b95a, #c47a12); }
.progress.is-red > i { background: linear-gradient(90deg, #ef8484, #d64545); }
.progress-line { display: flex; align-items: center; gap: 8px; }
.progress-line .progress { flex: 1; }
.progress-line .pv { font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 图表（纯 CSS） ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 6px 2px 0; }
.chart-bars .cb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; height: 100%; }
.chart-bars .cb i { display: block; width: 100%; max-width: 34px; background: linear-gradient(180deg, #35d0bd, #12a594); border-radius: 4px 4px 2px 2px; min-height: 2px; }
.chart-bars .cb.alt i { background: linear-gradient(180deg, #8fb4f5, #2f6fed); }
.chart-bars .cb .cb-v { font-size: 10px; color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-bars .cb .cb-l { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 58px; gap: 8px; align-items: center; font-size: 11.5px; }
.hbar .hb-l { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .hb-t { height: 7px; background: #f0f4f8; border-radius: 4px; overflow: hidden; }
.hbar .hb-t i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.hbar .hb-v { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.donut { width: 110px; height: 110px; border-radius: 50%; position: relative; flex: 0 0 110px; background: conic-gradient(var(--accent) 0 60%, #e9eef4 60% 100%); }
.donut::after { content: ""; position: absolute; inset: 16px; background: #fff; border-radius: 50%; }
.donut .dv { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.legend-list { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.legend-list .lg { display: flex; align-items: center; gap: 6px; }
.legend-list .lg i { width: 8px; height: 8px; border-radius: 2px; }
.legend-list .lg b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- 看板 ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 10px; align-items: start; }
.kb-col { background: #f7f9fc; border: 1px solid var(--line-2); border-radius: 9px; padding: 8px; min-height: 120px; }
.kb-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 2px 4px 8px; }
.kb-head .cnt { margin-left: auto; font-size: 10.5px; color: var(--ink-4); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0 5px; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; margin-bottom: 6px; box-shadow: 0 1px 1px rgba(16, 41, 63, .03); }
.kb-card .kb-t { font-size: 12px; font-weight: 550; line-height: 1.5; }
.kb-card .kb-m { font-size: 10.5px; color: var(--ink-4); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kb-card .kb-f { display: flex; align-items: center; gap: 6px; margin-top: 5px; }

/* ---------- 空状态 / 提示 ---------- */
.empty { padding: 34px 16px; text-align: center; color: var(--ink-4); font-size: 12.5px; }
.empty .e-ico { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; color: #b3c0cd; }
.empty .e-ico svg { width: 20px; height: 20px; }
.notice { display: flex; gap: 9px; padding: 9px 12px; border-radius: 8px; font-size: 12px; background: #f0f7ff; color: #2359b8; border: 1px solid #dbe8ff; }
.notice.warn { background: #fff8e8; border-color: #f7e3bc; color: #8a5c0d; }
.notice.danger { background: #fff4f4; border-color: #f6d7d7; color: #ab3535; }
.notice.ok { background: #eef9f4; border-color: #cdeede; color: #0d7a5a; }
.notice svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; }
.toast-wrap { position: fixed; top: 14px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 220px; max-width: 380px; background: #10293f; color: #fff; border-radius: 8px; padding: 9px 13px; font-size: 12.5px; box-shadow: var(--shadow-lg); animation: toastIn .18s ease; }
.toast.ok { background: #0d7a5a; }
.toast.err { background: #b93232; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- 弹层 ---------- */
dialog.modal {
  border: 0; padding: 0; border-radius: 12px; width: min(620px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg); color: var(--ink); background: #fff;
}
dialog.modal::backdrop { background: rgba(11, 31, 51, .42); backdrop-filter: blur(2px); }
dialog.modal .m-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
dialog.modal .m-head h3 { font-size: 14px; }
dialog.modal .m-head .x { margin-left: auto; }
dialog.modal .m-body { padding: 14px 16px; max-height: min(70vh, 640px); overflow: auto; }
dialog.modal .m-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 12px 12px; }
dialog.modal.wide { width: min(900px, calc(100vw - 32px)); }

/* ---------- 提示浮层 ---------- */
[data-tip] { position: relative; cursor: help; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px);
  transform: translateX(-50%); background: #10293f; color: #fff; font-size: 11px; font-weight: 400;
  padding: 4px 8px; border-radius: 5px; white-space: nowrap; z-index: 60; pointer-events: none;
}

/* ---------- 登录 ---------- */
body.login { background: #0b1f33; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(400px, .85fr); }
.login-hero {
  position: relative; color: #e6eef5; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(18, 165, 148, .28), transparent 60%),
    radial-gradient(700px 420px at 85% 85%, rgba(47, 111, 237, .22), transparent 62%),
    linear-gradient(150deg, #0c2237, #081726);
  overflow: hidden;
}
.login-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 40% 40%, #000 30%, transparent 78%);
}
.login-hero > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .side-logo { width: 40px; height: 40px; border-radius: 11px; font-size: 16px; }
.login-brand .lb-name { font-size: 16px; font-weight: 650; color: #fff; }
.login-brand .lb-sub { font-size: 11px; color: #8ba3b9; letter-spacing: .08em; }
.login-slogan h1 { font-size: 34px; line-height: 1.35; letter-spacing: -.02em; color: #fff; margin-bottom: 12px; }
.login-slogan h1 em { font-style: normal; color: #48d9c6; }
.login-slogan p { color: #9fb5c9; font-size: 13px; max-width: 460px; line-height: 1.9; }
.login-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; max-width: 520px; margin-top: 26px; }
.login-points .lp { display: flex; gap: 8px; font-size: 12px; color: #b8cadb; align-items: flex-start; }
.login-points .lp i { width: 18px; height: 18px; border-radius: 5px; background: rgba(72, 217, 198, .14); color: #48d9c6; display: grid; place-items: center; flex: 0 0 18px; font-size: 10px; margin-top: 1px; }
.login-hero .lf { font-size: 11px; color: #6d859a; }
.login-panel { background: #fff; display: flex; align-items: center; justify-content: center; padding: 34px; }
.login-card { width: 100%; max-width: 350px; }
.login-card h2 { font-size: 21px; margin-bottom: 4px; }
.login-card .lc-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 22px; }
.login-card .field { margin-bottom: 12px; }
.login-card .input { height: 38px; font-size: 13px; }
.login-card .btn { height: 38px; width: 100%; font-size: 13.5px; }
.demo-users { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 14px; }
.demo-users .du-title { font-size: 11px; color: var(--ink-4); margin-bottom: 7px; letter-spacing: .04em; }
.demo-users .du-list { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-users .du { font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; color: var(--ink-2); background: #fbfcfe; cursor: pointer; }
.demo-users .du:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- 门户 ---------- */
.portal-top { background: #fff; border-bottom: 1px solid var(--line); }
.portal-top .inner { max-width: 1080px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.portal-brand { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.portal-brand .side-logo { width: 30px; height: 30px; }
.portal-body { max-width: 1080px; margin: 0 auto; padding: 22px 20px 50px; }
.portal-hero { background: linear-gradient(130deg, #0f2d45, #123f4f); color: #fff; border-radius: 12px; padding: 22px 24px; margin-bottom: 16px; }
.portal-hero h1 { font-size: 20px; margin-bottom: 5px; }
.portal-hero p { color: #a9c2d3; font-size: 12.5px; margin: 0; }

/* ---------- 打印 ---------- */
.print-sheet { background: #fff; width: 210mm; min-height: 297mm; margin: 18px auto; padding: 14mm 15mm; box-shadow: var(--shadow-lg); color: #111; font-size: 12px; }
.print-sheet h1 { text-align: center; font-size: 19px; letter-spacing: .1em; margin-bottom: 4px; }
.print-sheet .ps-sub { text-align: center; font-size: 11px; color: #555; margin-bottom: 14px; }
.print-sheet .ps-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 18px; font-size: 11.5px; margin-bottom: 10px; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: 11px; }
.print-sheet th, .print-sheet td { border: 1px solid #333; padding: 4px 6px; }
.print-sheet th { background: #f2f2f2; font-weight: 600; }
.print-sheet .ps-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; font-size: 11.5px; }
.print-sheet .sign-line { border-bottom: 1px solid #333; height: 26px; }
.print-toolbar { max-width: 210mm; margin: 14px auto 0; display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- 自适应 ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 1080px) {
  .side { transform: translateX(-100%); }
  body.side-open .side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  .main { margin-left: 0; }
  .burger { display: grid; }
  .split, .g23, .g32, .g3 { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 14px 14px 40px; }
  .topbar { padding: 0 12px; }
  .search-box { display: none; }
  body.side-open::after { content: ""; position: fixed; inset: 0; background: rgba(11, 31, 51, .35); z-index: 35; }
}
@media (max-width: 720px) {
  .kpis, .kpis.k5 { grid-template-columns: minmax(0, 1fr); }
  .g2, .g4, .form-grid, .form-grid.g3, .kanban { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 17px; }
  .login-wrap { grid-template-columns: minmax(0, 1fr); }
  .login-hero { display: none; }
  .dl { grid-template-columns: 82px minmax(0, 1fr); }
  .print-sheet { width: auto; margin: 0; box-shadow: none; padding: 10mm; }
  .who .wname, .who .wrole { display: none; }
}
@media print {
  .side, .topbar, .page-head .page-actions, .print-toolbar, .no-print { display: none !important; }
  .main { margin: 0; }
  .page { padding: 0; max-width: none; }
  .print-sheet { box-shadow: none; margin: 0; width: auto; min-height: auto; padding: 0; }
  body { background: #fff; }
}

/* ---- 通用补充：键值行 / 警示行 / 大弹窗 / 任务卡 ---- */
.kv { display: flex; gap: 10px; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--ink-4); }
.kv > b { font-weight: 650; text-align: right; }
tr.row-warn > td { background: #fff8f4; }
.modal-lg { max-width: 880px; }
.modal .m-body { max-height: 68vh; overflow: auto; }
.task-card { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.task-card:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgba(15, 60, 90, .07); }
.task-card .tc-no { font-family: var(--mono); font-size: 11px; color: var(--ink-4); }
.task-card .tc-name { font-weight: 600; font-size: 13px; margin: 2px 0 6px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--ink-4); }
.sched-grid { display: grid; grid-template-columns: minmax(0, 1fr) 130px 150px; gap: 8px; align-items: center; }
.flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--ink-4); }
.flow i { font-style: normal; color: var(--ink-3); }
.flow .on { color: var(--brand-7); font-weight: 600; }
.note { padding: 9px 12px; border-radius: 8px; background: #f4f8fb; border: 1px solid #e3edf5; color: var(--ink-3); font-size: 12px; line-height: 1.7; }
.note b { color: var(--ink-1); }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.tag-ok { background: #e6f6ee; color: #17784a; }
.tag-danger { background: #fdeaea; color: #b93232; }
.text-danger { color: #c23a3a; }
.text-ok { color: #17784a; }
.record-item { padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.record-item:last-child { border-bottom: 0; }
.record-item .rh { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--ink-4); }
.record-item .rc { margin-top: 5px; font-size: 12.5px; white-space: pre-wrap; }

/* ============ 财务 / 第三方 补充组件 ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.mt12 { margin-top: 12px; }
.w120 { width: 120px; }
.filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-head .filter .select, .card-head .filter .input { width: auto; min-width: 120px; height: 30px; }
.is-red { color: var(--red); }
.is-green { color: var(--green); }
.is-amber { color: #b7791f; }
.kv-list { display: flex; flex-direction: column; gap: 0; }
.kv-list .kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.kv-list .kv:last-child { border-bottom: 0; }
.kv-list .k { color: var(--ink-3); }
.kv-list .v { font-weight: 550; color: var(--ink-1); text-align: right; }
.sec-title { font-size: 12px; font-weight: 650; color: var(--ink-1); margin-bottom: 8px; padding-left: 8px; border-left: 3px solid var(--brand-700); line-height: 1.2; }
.hint-bar { padding: 8px 11px; border-radius: 7px; background: #f4f8fb; border: 1px solid #e3edf5; color: var(--ink-3); font-size: 11.5px; line-height: 1.7; }
.bar-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 4px 0; }
.bar-track { height: 9px; border-radius: 5px; background: #eef3f8; overflow: hidden; }
.bar-track .bar { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brand-700), #4fb3a6); }
.bar-lb { color: var(--ink-4); font-family: var(--mono); }
.bar-v { text-align: right; color: var(--ink-2); }
.doc-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--ink-1); }
.doc-title { font-size: 22px; font-weight: 700; letter-spacing: .08em; }
.doc-meta { font-size: 12px; color: var(--ink-3); text-align: right; line-height: 1.9; }
@media print {
  .page-actions, .sidebar, .topbar, .filter, .pager { display: none !important; }
  .card { box-shadow: none; border: 0; }
}

/* ---------- 工具类补齐（视图里在用、此前 CSS 未定义，导致区块退化成裸 div） ---------- */
.main-col { min-width: 0; }              /* 两栏详情页主列：防止长表格把侧栏挤出屏幕 */
.ml8 { margin-left: 8px; }               /* 标题后紧跟的小标签 */
.mt4 { margin-top: 4px; }                /* 分类说明这类紧跟标题的一行小字 */
.mb12 { margin-bottom: 12px; }           /* 抽屉/详情里 kv-list 的分段间距 */
.gap8 { gap: 8px; }                      /* 行内表单（如企微推送配置）字段间距 */
.wrap { flex-wrap: wrap; }               /* 与 .row 搭配：字段多了自动换行 */
.flex-col { flex-direction: column; align-items: stretch; }  /* 字典类型竖排列表 */
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.link { color: var(--brand-700); text-decoration: none; }     /* 表格内的纯文本链接 */
.link:hover { text-decoration: underline; }

/* 行内横向排版：企微推送配置这类「字段 + 按钮」一行摆开，窄屏自动换行 */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* 金额小计块里的 row 是「名称 —— 金额」两端对齐，不要换行 */
.quote-calc .row { justify-content: space-between; flex-wrap: nowrap; padding: 2px 0; font-size: 12.5px; }
.quote-calc .row b { font-variant-numeric: tabular-nums; }

/* 报价明细行内编辑：表格里的输入框回到紧凑尺寸，不然一行抵三行高 */
.input.input-xs, .select.select-xs {
  height: 28px; min-height: 28px; padding: 2px 6px; font-size: 12px; line-height: 1.3;
  border-radius: 6px;
}
.input.input-xs.right { text-align: right; }

/* 登录页底部入口（忘记密码 / 首次登录说明） */
.lc-links a { color: var(--brand-700); text-decoration: none; }
.lc-links a:hover { text-decoration: underline; }

/* 顶栏「数据大屏」按钮：窄屏隐藏，把位置留给筛选与搜索 */
@media (max-width: 900px) { .tb-screen { display: none; } }

/* 绩效方案：按角色分组的三块配置，纵向排开、块间留白 */
.wgroup { display: flex; flex-direction: column; gap: 10px; }
.wgroup .form-grid { gap: 10px 14px; }
