:root {
  --navy: #0a1a2b;
  --navy-2: #122c46;
  --ink: #16212e;
  --muted: #64748b;
  --line: #e3e8ef;
  --line-2: #eef1f5;
  --bg: #f4f6f9;
  --card: #fff;
  --amber: #d99a1a;
  --amber-2: #f0bb45;
  --teal: #0f766e;
  --blue: #1d4ed8;
  --ok: #067647;
  --warn: #b54708;
  --danger: #b42318;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size:var(--fs-md);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: #0a5c56; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.35; }
h1 { font-size:var(--fs-xl); }
h2 { font-size:var(--fs-lg); }
h3 { font-size:var(--fs-md); }
p { margin: 0 0 8px; }
ul, ol { margin: 0 0 8px; padding-left: 1.25em; }
small { font-size:var(--fs-sm); }
.mono { font-family: ui-monospace, Consolas, "SFMono-Regular", monospace; }
.muted { color: var(--muted); font-size:var(--fs-sm); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.strong { font-weight: 650; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex: 0 0 224px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0a1a2b 0%, #08131f 100%);
  color: #cbd8e5; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.sidebar-head { padding: 14px 12px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
  display: block; object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  background: transparent !important;
}
.brand-copy { min-width: 0; }
.brand strong {
  display: block; color: #fff; font-size: 15px; font-weight: 700;
  letter-spacing: .01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-copy > span {
  display: block; color: #9ec4d6; font-size: 11px; letter-spacing: .04em;
  margin-top: 2px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.nav-home {
  display: flex; align-items: center; gap: 8px; color: #eaf2fb; font-weight: 650;
  padding: 8px 10px; border-radius: 8px; margin-bottom: 6px;
}
.nav-home:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-block { margin-top: 6px; }
.nav-block-h {
  font-size:var(--fs-xs); color: #8fa3b8; letter-spacing: .1em; padding: 7px 10px 4px;
  text-transform: uppercase; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none;
}
.nav-block-h::after { content: "▾"; font-size:var(--fs-2xs); color: #6f8599; }
.nav-block.collapsed .nav-block-h::after { content: "▸"; }
/* 折叠：必须打过 .sidebar nav a.nav-item 的 display:flex，否则收起不生效 */
.sidebar nav .nav-block.collapsed a.nav-item { display: none; }
.sidebar nav .nav-block.collapsed .nav-sec-h { display: none; }
/* 二级小节：更轻的分组标签 + 竖向引导线 */
.nav-sec { position: relative; }
.nav-sec-h {
  font-size:var(--fs-xs); color: #6e8399; letter-spacing: .08em;
  padding: 6px 10px 3px 13px; line-height: 1.4;
}
.nav-sec-h:first-child { padding-top: 2px; }
.nav-block:not(.collapsed) .nav-sec + .nav-sec { margin-top: 2px; }
.nav-item.hide-by-search, .nav-sec.hide-by-search, .nav-block.hide-by-search { display: none !important; }
.sidebar nav a.nav-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 10px 6px 13px;
  color: #a9bccf; font-size:var(--fs-base); border-radius: 7px; position: relative;
}
.sidebar nav a.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.nav-item.active { background: rgba(217,154,26,.16); color: #fff; font-weight: 650; }
.sidebar nav a.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 3px; background: var(--amber-2);
}
.sidebar nav a.nav-item .n {
  margin-left: auto; font-size:var(--fs-2xs); background: rgba(255,255,255,.1); color: #cfe0f0;
  border-radius: 99px; padding: 0 6px; line-height: 16px;
}
.user-box { padding: 11px 13px 13px; border-top: 1px solid rgba(255,255,255,.08); font-size:var(--fs-sm); }
.user-box .name { color: #fff; font-size:var(--fs-base); font-weight: 650; }
.user-box .role { color: #9fb3c8; }
.user-links { display: flex; gap: 12px; margin-top: 7px; }
.user-links a { color: #c6d5e4; font-size:var(--fs-sm); }
.user-links a:hover { color: var(--amber-2); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 54px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 18px;
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size:var(--fs-lg); margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { color: var(--muted); font-size:var(--fs-sm); font-weight: 400; margin-left: 8px; }
.icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--navy); font-size:var(--fs-lg);
}
.icon-btn:hover { background: #f8fafc; border-color: #cfd8e3; }
.nav-mask { display: none; }
.content { padding: 14px 18px 28px; flex: 1; min-width: 0; max-width: 1440px; width: 100%; margin: 0 auto; }
.site-foot { padding: 10px 18px 18px; color: #98a2b3; font-size:var(--fs-xs); text-align: center; }
.site-foot a, .m-foot a, .brand-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.site-foot a:hover, .m-foot a:hover, .brand-link:hover { color: var(--amber); }
.sidebar-foot {
  padding: 8px 13px 2px; border-top: 1px solid rgba(255,255,255,.06);
  font-size:var(--fs-xs); color: #8fa3b8; text-align: center;
}
.sidebar-foot .brand-link { color: #9fb3c8; text-decoration: none; }
.sidebar-foot .brand-link:hover { color: var(--amber-2); text-decoration: underline; }
.m-foot { padding: 14px 12px 4px; text-align: center; font-size:var(--fs-xs); color: #98a2b3; }
.m-foot .brand-link { text-decoration: none; }

/* ---------- 全站演示水印：疏斜纹、低对比、不拦截操作 ---------- */
.sys-watermark {
  pointer-events: none; position: fixed; inset: -20%; z-index: 99999; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9rem 6rem;
  padding: 4rem 3rem; transform: rotate(-24deg); transform-origin: center center;
  user-select: none; -webkit-user-select: none;
}
.sys-watermark span {
  white-space: pre; font-size:var(--fs-md); font-weight: 500; letter-spacing: .06em;
  color: rgba(100, 116, 139, .13); text-align: center;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media print { .sys-watermark { display: none !important; } }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; margin-bottom: 12px; min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-h h2, .card-h h3 { margin: 0; flex: 1; }
.card-h .more { font-size:var(--fs-sm); }
.section-title { font-size:var(--fs-base); font-weight: 700; color: var(--navy); margin: 16px 0 8px; padding-left: 8px; border-left: 3px solid var(--amber); }
.grid { display: grid; gap: 12px; }
.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-main { grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; position: relative; overflow: hidden; }
.kpi span { font-size:var(--fs-sm); color: var(--muted); display: block; }
.kpi b { display: block; font-size:var(--fs-3xl); font-weight: 750; margin-top: 2px; letter-spacing: -.02em; }
.kpi .sub { font-size:var(--fs-xs); color: var(--muted); margin-top: 2px; }
.kpi.amber b { color: #9a6a0a; }
.kpi.teal b { color: var(--teal); }
.kpi.red b { color: var(--danger); }
.kpi.blue b { color: var(--blue); }
.kpi::after { content: ""; position: absolute; right: -18px; top: -18px; width: 56px; height: 56px; border-radius: 50%; background: rgba(217,154,26,.07); }
.kpi.teal::after { background: rgba(15,118,110,.07); }
.kpi.red::after { background: rgba(180,35,24,.06); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: var(--navy); color: #fff; padding: 7px 13px; border-radius: 8px;
  font-size:var(--fs-base); font-family: inherit; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn.amber { background: var(--amber); color: #211601; }
.btn.amber:hover { background: #c58a14; color: #211601; }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f7f9fc; color: var(--navy); }
.btn.teal { background: var(--teal); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 4px 9px; font-size:var(--fs-sm); border-radius: 7px; }
.btn.lg { padding: 9px 18px; font-size:var(--fs-md); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.row-actions .spacer { flex: 1; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal); cursor: pointer; font: inherit; font-size:var(--fs-sm); }
.link-btn.danger { color: var(--danger); }
.link-btn:hover { text-decoration: underline; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size:var(--fs-sm); background: #f2f4f7; color: #475467; white-space: nowrap; }
.badge.ok, .badge.done, .badge.paid, .badge.pass { background: #ecfdf3; color: var(--ok); }
.badge.warn, .badge.pending, .badge.high { background: #fffaeb; color: var(--warn); }
.badge.danger, .badge.overdue, .badge.fail { background: #fef3f2; color: var(--danger); }
.badge.info, .badge.doing, .badge.active { background: #eff8ff; color: #175cd3; }
.badge.amber { background: #fff6df; color: #8a5d07; }
.badge.gray { background: #f2f4f7; color: #667085; }
.badge.red { background: #fef3f2; color: var(--danger); }
.badge.teal { background: #ecfdf5; color: var(--teal); }
.badge.blue { background: #eff8ff; color: #175cd3; }
.badge.key { background: #fff4d6; color: #8a6d12; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #d0d5dd; margin-right: 5px; vertical-align: middle; }
.dot.green { background: #12b76a; }
.dot.red { background: #f04438; }
.dot.amber { background: #f79009; }
.dot.blue { background: #2e90fa; }

.table-wrap { overflow: auto; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size:var(--fs-base); }
table.data th, table.data td { padding: 8px 9px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
table.data th { background: #f8fafc; color: #475467; font-weight: 650; font-size:var(--fs-sm); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.data tr:hover td { background: #fcfdff; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.clip { max-width: 18em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data tr.total td { background: #fffaf0; font-weight: 700; }
table.data tr.warn-row td { background: #fffcf5; }
table.data tr.danger-row td { background: #fff7f6; }
table.data.compact th, table.data.compact td { padding: 5px 7px; }
table.data td a.strong { color: var(--ink); }
table.data td a.strong:hover { color: var(--teal); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0 2px; flex-wrap: wrap; font-size:var(--fs-sm); color: var(--muted); }
.pager { display: flex; gap: 5px; align-items: center; }
.pager a, .pager span {
  min-width: 30px; height: 28px; padding: 0 8px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size:var(--fs-sm);
}
.pager .on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager .off { color: #c5cbd3; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.filters label.f { min-width: 120px; margin: 0; }
.filters .grow { flex: 1 1 200px; }
.filters input, .filters select { min-height: 34px; }
label.f { display: block; font-size:var(--fs-sm); color: var(--muted); }
label.f > span.lab { display: block; margin-bottom: 4px; }
label.f .req { color: var(--danger); margin-left: 2px; }
label.f .hint { display: block; font-size:var(--fs-xs); color: #98a2b3; margin-top: 3px; }
input, select, textarea {
  width: 100%; border: 1px solid #d5dce6; border-radius: 8px; padding: 7px 9px;
  font: inherit; font-size:var(--fs-base); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(217,154,26,.25); border-color: var(--amber); }
textarea { min-height: 78px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 12px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }
.check { display: flex; align-items: center; gap: 7px; font-size:var(--fs-base); color: var(--ink); min-height: 34px; }
.check input { margin: 0; }
.readonly { background: #f8fafc; color: #475467; }
.help-text { font-size:var(--fs-sm); color: var(--muted); margin-top: 4px; }
.help-list { margin: 6px 0 0; padding-left: 18px; font-size:var(--fs-sm); color: var(--muted); line-height: 1.9; }
.help-list li { margin-bottom: 2px; }

/* 调度日历（月视图） */
.cal-wrap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { font-size:var(--fs-sm); font-weight: 650; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-cell { min-height: 108px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.cal-cell.blank { background: transparent; border-style: dashed; }
.cal-cell.today { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.cal-cell .cal-date { font-size:var(--fs-sm); font-weight: 650; display: flex; align-items: center; justify-content: space-between; color: #344054; }
.cal-cell .cal-date em { font-style: normal; font-size:var(--fs-xs); font-weight: 500; color: var(--muted); }
.cal-cell.today .cal-date { color: var(--amber); }
.cal-chip { display: block; font-size:var(--fs-xs); line-height: 1.4; padding: 2px 5px; border-radius: 4px; background: #eff8ff; color: #175cd3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip.doing { background: #fffaeb; color: var(--warn); }
.cal-chip.done { background: #ecfdf3; color: var(--ok); }
.cal-chip.overdue { background: #fef3f2; color: var(--danger); }
.cal-chip.more { background: #f2f4f7; color: var(--muted); text-align: center; }

/* 多工种协同 */
.trade-list { display: flex; flex-direction: column; gap: 6px; }
.trade-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; }
.trade-item .trade-main { min-width: 0; }
.trade-item .trade-main b { font-size:var(--fs-base); margin-right: 6px; }
.trade-item .trade-act { display: flex; align-items: center; gap: 6px; }
.trade-item .trade-act select { font-size:var(--fs-xs); padding: 2px 4px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.field-error { border-color: var(--danger) !important; background: #fff8f7; }
.error-text { color: var(--danger); font-size:var(--fs-sm); margin-top: 3px; }

.alert { padding: 10px 13px; border-radius: 9px; margin-bottom: 12px; font-size:var(--fs-base); }
.alert-success { background: #ecfdf3; color: var(--ok); border: 1px solid #abefc6; }
.alert-error { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.alert-info { background: #eff8ff; color: #175cd3; border: 1px solid #b2ddff; }
.alert-warn { background: #fffaeb; color: var(--warn); border: 1px solid #fedf89; }
.empty { padding: 22px 10px; text-align: center; color: var(--muted); font-size:var(--fs-base); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; font-size:var(--fs-md); }
.hint-bar { background: #fffaf0; border: 1px solid #f5e3b8; color: #6b5313; padding: 9px 12px; border-radius: 9px; font-size:var(--fs-sm); margin-bottom: 10px; }

/* ---------- 描述列表 / 详情 ---------- */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 18px; }
.dl .item { border-bottom: 1px dashed var(--line-2); padding: 5px 0; min-width: 0; }
.dl .item .k { color: var(--muted); font-size:var(--fs-sm); }
.dl .item .v { font-size:var(--fs-base); word-break: break-word; }
.dl .item.block { grid-column: 1 / -1; }
.dl .item.block .v { white-space: pre-wrap; line-height: 1.7; }
.dl.tight .item { padding: 3px 0; }
.sub-title { font-size:var(--fs-sm); color: var(--muted); margin: 12px 0 7px; letter-spacing: .04em; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs a {
  padding: 8px 13px; font-size:var(--fs-base); color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--navy); border-color: var(--amber); font-weight: 650; }
.tabs a .n { font-size:var(--fs-xs); color: var(--muted); margin-left: 3px; }

/* ---------- 看板 ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 10px; align-items: start; overflow-x: auto; padding-bottom: 4px; }
.board-col { background: #eef2f7; border-radius: 10px; padding: 8px; min-height: 160px; }
.board-col h3 { font-size:var(--fs-sm); color: #475467; margin: 2px 4px 8px; display: flex; justify-content: space-between; }
.board-col h3 .n { background: #fff; color: var(--navy); border-radius: 99px; padding: 0 7px; font-size:var(--fs-xs); }
.wo-card {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: 8px; padding: 8px 9px; margin-bottom: 7px; cursor: grab;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.wo-card:active { cursor: grabbing; }
.wo-card.drag { opacity: .5; }
.wo-card .code { font-size:var(--fs-xs); color: var(--muted); display: flex; justify-content: space-between; }
.wo-card .t { font-size:var(--fs-base); font-weight: 650; margin: 3px 0; line-height: 1.4; }
.wo-card .meta { font-size:var(--fs-xs); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.wo-card .meta span { background: #f6f8fb; border-radius: 5px; padding: 0 5px; }
.wo-card.urgent { border-left-color: var(--danger); }
.wo-card.risk { border-left-color: var(--warn); }
.board-col.drop { outline: 2px dashed var(--amber); outline-offset: -3px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 5px; bottom: 4px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 12px; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid #c7d2de;
}
.tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl-item.on::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 3px rgba(217,154,26,.18); }
.tl-item.late::before { background: var(--danger); border-color: var(--danger); }
.tl-item h4 { margin: 0 0 2px; font-size:var(--fs-base); }
.tl-item .meta { font-size:var(--fs-xs); color: var(--muted); }
.tl-item .note { font-size:var(--fs-sm); color: #475467; margin-top: 3px; }

/* ---------- 进度 / 甘特 ---------- */
.bar { height: 6px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.bar > i.amber { background: var(--amber); }
.bar > i.red { background: var(--danger); }
.bar.lg { height: 9px; }
.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size:var(--fs-sm); }
.score-row > span { flex: 0 0 62px; color: var(--muted); }
.score-row input[type="range"] { flex: 1 1 auto; accent-color: var(--amber); min-width: 0; }
.score-row > b { flex: 0 0 24px; text-align: right; font-size:var(--fs-sm); color: var(--ink); }
.gantt { font-size:var(--fs-sm); }
.gantt-row { display: grid; grid-template-columns: 150px 1fr 130px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.gantt-row:last-child { border-bottom: 0; }
.gantt-track { position: relative; height: 16px; background: #f3f6fa; border-radius: 5px; overflow: hidden; }
.gantt-track i { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: #98d3cb; }
.gantt-track i.done { background: var(--teal); }
.gantt-track i.late { background: #f2a29b; }
.gantt-track i.plan { background: #c7d7ea; }
.gantt-meta { color: var(--muted); font-size:var(--fs-xs); text-align: right; }
.legend { display: flex; gap: 12px; font-size:var(--fs-xs); color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; margin-right: 4px; }

/* ---------- 图表（纯 CSS） ---------- */
.bars { display: grid; gap: 7px; }
.bars .row { display: grid; grid-template-columns: 90px 1fr 64px; gap: 8px; align-items: center; font-size:var(--fs-sm); }
.bars .row .track { height: 14px; background: #f2f5f9; border-radius: 4px; overflow: hidden; }
.bars .row .track i { display: block; height: 100%; background: linear-gradient(90deg, #2a7f78, #5fb3a8); border-radius: 4px; }
.bars .row .track i.amber { background: linear-gradient(90deg, #d99a1a, #f0bb45); }
.bars .row .n { text-align: right; color: #475467; font-variant-numeric: tabular-nums; }
.funnel { display: grid; gap: 6px; }
.funnel .step { display: flex; align-items: center; gap: 8px; }
.funnel .step .name { width: 96px; font-size:var(--fs-sm); color: #475467; }
.funnel .step .fill { flex: 1; height: 24px; background: #f2f5f9; border-radius: 6px; overflow: hidden; }
.funnel .step .fill i { display: block; height: 100%; background: linear-gradient(90deg, #134e6f, #2b7a9b); }
.funnel .step .val { width: 88px; text-align: right; font-size:var(--fs-sm); font-variant-numeric: tabular-nums; }
.pie-legend { display: grid; gap: 6px; font-size:var(--fs-sm); }
.pie-legend .row { display: flex; align-items: center; gap: 7px; }
.pie-legend .sw { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 9px; }
.pie-legend .n { margin-left: auto; color: #475467; }
.donut { width: 132px; height: 132px; border-radius: 50%; position: relative; flex: 0 0 132px; }
.donut::after { content: ""; position: absolute; inset: 20px; background: #fff; border-radius: 50%; }
.donut .mid { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; font-size:var(--fs-xs); color: var(--muted); }
.donut .mid b { display: block; font-size:var(--fs-2xl); color: var(--ink); }

/* ---------- 移动端（H5） ---------- */
body.mobile-bg { background: #eef2f6; }
.m-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f6f8fb; position: relative; padding-bottom: 64px; }
.m-head {
  background: linear-gradient(135deg, #0a1a2b, #173a58); color: #fff; padding: 14px 16px 16px;
  position: sticky; top: 0; z-index: 20;
}
.m-head h1 { font-size:var(--fs-lg); margin: 0; color: #fff; }
.m-head .sub { font-size:var(--fs-xs); color: #b9cbdc; margin-top: 2px; }
.m-body { padding: 12px; }
.m-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; }
.m-tabs a { padding: 6px 11px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size:var(--fs-sm); color: #475467; white-space: nowrap; }
.m-tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.m-card h3 { font-size:var(--fs-md); margin: 0 0 4px; }
.m-card .muted { font-size:var(--fs-xs); }
.m-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%);
  background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr);
  z-index: 30; padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.m-nav a { text-align: center; font-size:var(--fs-xs); color: #667085; }
.m-nav a.on { color: var(--amber); font-weight: 700; }
.m-nav a .ic { display: block; font-size:var(--fs-lg); line-height: 1.2; }
.m-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.m-kpi { background: #fff; border-radius: 10px; padding: 9px 11px; border: 1px solid var(--line); }
.m-kpi b { display: block; font-size:var(--fs-2xl); }
.m-kpi span { font-size:var(--fs-xs); color: var(--muted); }
.m-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.m-photo { width: 100%; aspect-ratio: 4/3; border-radius: 9px; border: 1px dashed #cfd8e3; background: #f8fafc; display: grid; place-items: center; color: #98a2b3; font-size:var(--fs-sm); overflow: hidden; }
.m-photo img { width: 100%; height: 100%; object-fit: cover; }
.sign-pad { width: 100%; height: 150px; border: 1px dashed #cfd8e3; border-radius: 9px; background: #fff; touch-action: none; }

/* ---------- 登录 ---------- */
.login-page { min-height: 100vh; background: #071018; color: #fff; position: relative; overflow: hidden; }
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 560px at 10% 15%, rgba(217,154,26,.25), transparent 60%),
    radial-gradient(700px 500px at 85% 80%, rgba(15,118,110,.28), transparent 62%),
    linear-gradient(120deg, #071018 0%, #0b2237 55%, #0a1a2b 100%);
}
.login-grid {
  position: relative; z-index: 1; min-height: 100vh; display: grid;
  grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  padding: 40px max(5vw, 28px); max-width: 1240px; margin: 0 auto;
}
.login-copy .eyebrow { color: var(--amber-2); font-size:var(--fs-sm); letter-spacing: .2em; font-weight: 700; margin-bottom: 12px; }
.login-copy h1 { font-size: clamp(28px, 3.8vw, 46px); line-height: 1.18; margin: 0 0 14px; letter-spacing: -.02em; }
.login-copy p { color: rgba(255,255,255,.72); font-size:var(--fs-md); max-width: 32em; }
.login-copy .flow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.login-copy .flow span { border: 1px solid rgba(240,187,69,.35); color: #f5d98a; font-size:var(--fs-sm); border-radius: 99px; padding: 4px 10px; background: rgba(240,187,69,.08); }
.login-copy .stats { display: flex; gap: 26px; margin-top: 26px; }
.login-copy .stats b { display: block; font-size:var(--fs-2xl); color: #fff; }
.login-copy .stats span { font-size:var(--fs-xs); color: #9fb3c8; }
.login-panel {
  background: rgba(255,255,255,.97); color: var(--ink); border-radius: 18px; padding: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.42); max-width: 440px; width: 100%; justify-self: end;
}
.login-panel h2 { font-size:var(--fs-xl); margin: 0 0 2px; }
.login-panel .sub { color: var(--muted); font-size:var(--fs-sm); margin-bottom: 14px; }
.login-panel .demo-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; max-height: 208px; overflow: auto; margin: 10px 0 4px; }
.login-panel .demo {
  border: 1px solid var(--line); background: #f8fafc; border-radius: 9px; padding: 6px 9px;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.login-panel .demo:hover { border-color: var(--amber); background: #fffaf0; }
.login-panel .demo strong { display: block; font-size:var(--fs-sm); }
.login-panel .demo span { font-size:var(--fs-xs); color: var(--muted); }
.login-panel .go { width: 100%; height: 42px; margin-top: 10px; font-weight: 700; }
.login-foot { text-align: center; color: #7e93a8; font-size:var(--fs-xs); margin-top: 10px; }
@media (max-width: 940px) {
  .login-grid { grid-template-columns: 1fr; gap: 20px; padding-top: 26px; }
  .login-copy .stats, .login-copy .flow { display: none; }
  .login-panel { justify-self: stretch; max-width: none; }
}

/* ---------- 打印 ---------- */
.print-page { background: #fff; color: #000; max-width: 820px; margin: 0 auto; padding: 26px 30px; font-size:var(--fs-base); }
.print-page h1 { text-align: center; font-size:var(--fs-2xl); letter-spacing: .1em; margin-bottom: 4px; }
.print-page .print-sub { text-align: center; color: #555; font-size:var(--fs-sm); margin-bottom: 16px; }
.print-page table { width: 100%; border-collapse: collapse; font-size:var(--fs-sm); }
.print-page th, .print-page td { border: 1px solid #333; padding: 6px 8px; }
.print-page th { background: #f2f2f2; }
.print-page .sign-row { display: flex; justify-content: space-between; margin-top: 34px; font-size:var(--fs-sm); }
.print-toolbar { max-width: 820px; margin: 12px auto; display: flex; gap: 8px; justify-content: flex-end; }
@media print {
  body { background: #fff; }
  .print-toolbar, .sidebar, .topbar, .site-foot { display: none !important; }
  .print-page { padding: 0; max-width: none; }
  @page { margin: 14mm; }
}

/* ---------- 响应式 ---------- */
@media (min-width: 981px) {
  body:not(.nav-collapsed) .topbar .nav-toggle { display: none; }
  body.nav-collapsed .sidebar { width: 64px; flex-basis: 64px; }
  body.nav-collapsed .sidebar .brand-copy,
  body.nav-collapsed .sidebar nav,
  body.nav-collapsed .sidebar .user-box { display: none; }
  body.nav-collapsed .sidebar-head { display: flex; justify-content: center; padding: 12px 6px; }
}
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .layout { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; height: 100%; width: min(280px, 86vw); transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  .nav-mask { display: none; position: fixed; inset: 0; background: rgba(8,20,33,.45); z-index: 35; }
  body.nav-open .nav-mask { display: block; }
  .topbar { padding: 0 12px; }
  .content { padding: 12px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .form-grid, .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .board { grid-template-columns: repeat(4, 250px); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi b { font-size:var(--fs-2xl); }
  .gantt-row { grid-template-columns: 110px 1fr; }
  .gantt-meta { display: none; }
  .dl { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .row-actions .btn { flex: 1 1 auto; }
  .kpi b { font-size:var(--fs-xl); }
  .card { padding: 11px; }
  .hide-sm { display: none !important; }
}

/* ---------- 表单块 / 行内编辑 / 弹层行 ---------- */
.form .field { margin-bottom: 10px; }
.form .field > label { display: block; font-size:var(--fs-sm); color: var(--muted); margin-bottom: 4px; }
.form .grid { gap: 0 10px; }
.modal-row > td { background: #fbfcfe; border-top: 1px solid var(--line); }
.modal-row .inline-form { flex-wrap: wrap; width: 100%; }
.modal-row .inline-form input, .modal-row .inline-form select { width: auto; min-width: 110px; flex: 1 1 110px; }
td .inline-form { flex-wrap: wrap; width: 100%; }
td .inline-form input, td .inline-form select { width: auto; min-width: 96px; flex: 1 1 96px; }
.pager a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- 移动端扩展 ---------- */
.m-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 12px; }
.m-stats > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; }
.m-stats b { display: block; font-size:var(--fs-xl); color: var(--navy); line-height: 1.25; }
.m-stats span { font-size:var(--fs-2xs); color: var(--muted); }
.m-section-h { font-size:var(--fs-sm); color: var(--muted); margin: 14px 2px 7px; letter-spacing: .04em; }
.m-task { display: block; color: inherit; }
.m-task-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.m-task-t { font-size:var(--fs-md); font-weight: 650; color: var(--ink); margin-bottom: 3px; }
.m-task-m { font-size:var(--fs-sm); color: #667085; line-height: 1.6; }
.m-task-f { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size:var(--fs-xs); color: var(--muted); flex-wrap: wrap; }
.m-go { margin-left: auto; color: var(--amber); font-weight: 650; font-size:var(--fs-sm); }
.m-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-link { text-align: center; font-size:var(--fs-2xl); line-height: 1.1; }
.m-link b { display: block; font-size:var(--fs-base); color: var(--ink); margin: 5px 0 2px; }
.m-link span { font-size:var(--fs-xs); color: var(--muted); }
.m-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size:var(--fs-2xl); font-weight: 700; flex: 0 0 48px; }
.m-profile { display: flex; gap: 12px; align-items: center; }
.m-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.m-card .field { margin-bottom: 9px; }
.m-card .field > label { display: block; font-size:var(--fs-xs); color: var(--muted); margin-bottom: 3px; }
.m-card input, .m-card select, .m-card textarea { font-size:var(--fs-base); min-height: 38px; }
.m-card .btn { width: 100%; justify-content: center; min-height: 42px; }
.m-card .btn.sm { min-height: 34px; width: auto; }
.m-body .btn { min-height: 40px; }
.m-body .btn.sm { min-height: 32px; }
.m-body .m-tabbar a { min-height: 48px; }
.m-inline { display: flex; gap: 6px; align-items: center; }
.m-inline > * { flex: 1; }


/* ==========================================================================
   统一界面增强（v2）：导航、顶栏、弹层、抽屉、批量条、分页、导入导出、皮肤
   ========================================================================== */

/* ---- 图标 ---- */
svg.ic { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn svg.ic, .icon-btn svg.ic { pointer-events: none; }

/* ---- 侧栏 ---- */
.sidebar { width: 232px; flex: 0 0 232px; transition: width .16s ease, flex-basis .16s ease; }
.sidebar-head { display: flex; align-items: center; gap: 6px; }
.sidebar-head .brand { flex: 1; min-width: 0; }
.sidebar-head .side-toggle {
  color: #b7c9d8; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
}
.sidebar-head .side-toggle:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-head .side-toggle svg { width: 15px; height: 15px; }
body.nav-collapsed .sidebar-head { flex-direction: column; gap: 8px; padding: 10px 6px; }
body.nav-collapsed .brand { justify-content: center; }
body.nav-collapsed .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
.nav-search { display: flex; align-items: center; gap: 6px; margin: 8px 10px 4px; padding: 0 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.04); color: #8fa3b8; }
.nav-search input { border: 0; background: transparent; color: #eaf2fb; height: 30px; font-size:var(--fs-sm); padding: 0; width: 100%; }
.nav-search input::placeholder { color: #7d91a6; }
.nav-search input:focus { outline: none; }
.sidebar nav { padding: 6px 8px 10px; }
.sidebar nav a.nav-item { gap: 9px; padding: 7px 10px 7px 12px; font-size:var(--fs-base); }
.nav-block-h { gap: 7px; }
.nav-block-h svg.ic { width: 14px; height: 14px; flex: 0 0 14px; color: #7f95a9; }
.nav-block-h .g-label { flex: 1; }
.nav-home { gap: 9px; }
.nav-item.hide-by-search, .nav-block.hide-by-search { display: none !important; }
.sidebar-foot { margin-top: auto; }
.user-box .name { display: flex; align-items: center; gap: 6px; }
.role-chip { font-size:var(--fs-2xs); font-weight: 500; color: #e6c55a; border: 1px solid rgba(230,197,90,.35); border-radius: 99px; padding: 0 6px; line-height: 15px; }
body.nav-collapsed .sidebar { width: 64px; flex-basis: 64px; }
body.nav-collapsed .brand-copy, body.nav-collapsed .nav-search, body.nav-collapsed .nav-block-h,
body.nav-collapsed .nav-sec-h,
body.nav-collapsed .sidebar-foot, body.nav-collapsed .user-box,
body.nav-collapsed .nav-item .nav-text { display: none !important; }
body.nav-collapsed .sidebar nav { padding: 6px 6px 10px; }
body.nav-collapsed .nav-block { margin-top: 2px; }
body.nav-collapsed .nav-block.collapsed a.nav-item { display: flex !important; }
body.nav-collapsed .sidebar nav a.nav-item, body.nav-collapsed .nav-home { justify-content: center; padding: 8px 0; }
body.nav-collapsed .sidebar nav a.nav-item::before { display: none; }
body.nav-collapsed .nav-home span { display: none; }

/* ---- 顶栏 ---- */
.topbar { height: 56px; gap: 8px; }
.topbar h1 { font-size:var(--fs-lg); flex: 0 1 auto; max-width: 30%; }
.topbar .back-btn { color: var(--navy); }
.top-search { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: 1 1 240px; max-width: 380px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; padding: 0 4px 0 10px; }
.top-search input { border: 0; background: transparent; height: 34px; padding: 0; font-size:var(--fs-sm); min-width: 0; }
.top-search input:focus { outline: none; }
.top-search .icon-btn { border: 0; background: transparent; width: 28px; height: 28px; }
.top-tools { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.top-tools .icon-btn { position: relative; }
.top-tools .badge.dot { position: absolute; top: -6px; right: -6px; padding: 0 4px; font-size:var(--fs-2xs); line-height: 15px; border-radius: 99px; }
.user-chip { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 9px 3px 3px; cursor: pointer; }
.user-chip .avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(145deg,#f5ce63,#d99a1a); color: #231701; font-weight: 800; display: grid; place-items: center; font-size:var(--fs-sm); }
.user-chip .uc-text { font-size:var(--fs-sm); color: var(--navy); line-height: 1.15; text-align: left; }
.user-chip .uc-text i { display: block; font-style: normal; font-size:var(--fs-2xs); color: var(--muted); }

/* ---- 下拉菜单 ---- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 18px 44px rgba(16,24,40,.14); padding: 5px; z-index: 120; display: none; }
.menu.open { display: block; }
.menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; font-size:var(--fs-base); color: #344054; }
.menu a:hover { background: #f4f7fb; color: var(--navy); }
.menu-head { padding: 8px 10px 9px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; font-size:var(--fs-sm); font-weight: 650; color: var(--navy); line-height: 1.6; }
.menu-head span { font-weight: 400; color: var(--muted); font-size:var(--fs-xs); }
.menu-empty { display: block; padding: 8px 10px; color: var(--muted); font-size:var(--fs-sm); }

/* ---- 页面标题区 ---- */
.page-head { display: flex; align-items: flex-end; gap: 12px; margin: 2px 0 12px; flex-wrap: wrap; }
.page-head .ph-text { flex: 1; min-width: 220px; }
.page-head h2 { font-size:var(--fs-lg); margin: 0 0 3px; color: var(--navy); }
.page-head p { margin: 0; color: var(--muted); font-size:var(--fs-sm); line-height: 1.7; }
.page-head .ph-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.page-head .ph-actions .btn { white-space: nowrap; }

/* ---- 弹层（可最大化） ---- */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(8,20,33,.46); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 14px; width: min(720px, 100%); max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.modal-box.modal-sm { width: min(420px, 100%); }
.modal-box.modal-md { width: min(640px, 100%); }
.modal-box.modal-lg { width: min(960px, 100%); }
.modal-box.max { width: 96vw; max-height: 94vh; }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { margin: 0; flex: 1; font-size:var(--fs-md); display: flex; align-items: center; gap: 7px; }
.modal-tools { display: flex; gap: 4px; }
.modal-tools .icon-btn { width: 30px; height: 30px; }
.modal-b { padding: 14px; overflow: auto; flex: 1; }
.modal-f { padding: 10px 14px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }
body.modal-open { overflow: hidden; }

/* ---- 右侧抽屉 ---- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: #fff; z-index: 210; box-shadow: -20px 0 60px rgba(16,24,40,.18); display: flex; flex-direction: column; }
.drawer[hidden] { display: none; }
.drawer-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.drawer-h h3 { margin: 0; flex: 1; font-size:var(--fs-md); display: flex; align-items: center; gap: 7px; }
.drawer-b { padding: 14px 16px; overflow: auto; }
.drawer-desc { margin: 0 0 14px; font-size:var(--fs-base); line-height: 1.9; color: #344054; }
.drawer-sub { font-size:var(--fs-xs); color: var(--muted); letter-spacing: .08em; margin: 6px 0 6px; }
.tips { margin: 0; padding-left: 18px; color: #475467; font-size:var(--fs-sm); line-height: 1.9; }
.drawer-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.drawer-chip { font-size:var(--fs-xs); color: #475467; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.drawer-foot { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
.todo-list { display: grid; gap: 6px; }
.todo-list a { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.todo-list a:hover { border-color: var(--amber); background: #fffdf7; }
.todo-list a span { display: block; line-height: 1.35; }
.todo-list a b { display: block; font-size:var(--fs-base); }
.todo-list a i { font-style: normal; font-size:var(--fs-xs); color: var(--muted); }

/* ---- 二维码 ---- */
.qr-box { text-align: center; padding: 6px 0 12px; }
.qr-img { display: inline-flex; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; min-width: 168px; min-height: 168px; align-items: center; justify-content: center; }
.qr-img img, .qr-img canvas { display: block; width: 168px; height: 168px; }
.qr-tip { font-size:var(--fs-sm); color: var(--muted); margin-top: 8px; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { flex: 1; font-size:var(--fs-sm); }

/* ---- 批量操作条 ---- */
.batch-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 8px; background: #fffaf0; border: 1px solid #f1dfb4; border-radius: 9px; font-size:var(--fs-sm); color: #7a5a12; position: sticky; top: 58px; z-index: 20; }
.batch-bar[hidden] { display: none; }
.batch-bar b { color: #9a6a0a; }
td.pick, th.pick { width: 34px; text-align: center; }
td.pick input, th.pick input { width: 15px; height: 15px; accent-color: var(--amber); }
.th-sort { color: inherit; }
.th-sort:hover { color: var(--teal); }

/* ---- 分页 ---- */
.list-foot, .table-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; padding: 10px 2px 2px;
}
.table-foot .foot-info { flex: 1; min-width: 160px; }
.pager .pg { min-width: 30px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #475467; font-size:var(--fs-sm); }
.pager .pg:hover { border-color: var(--amber); color: #9a6a0a; }
.pager .pg.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager .pg.off { border-color: transparent; background: transparent; color: #98a2b3; }
.size-pick { display: flex; align-items: center; gap: 5px; font-size:var(--fs-sm); color: var(--muted); }
.size-pick select { width: auto; min-height: 28px; padding: 0 6px; font-size:var(--fs-sm); }

/* ---- 看板口径提示 ---- */
.drill-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: 9px; background: #f2f8ff; border: 1px solid #cfe3f7; color: #1e4c74; font-size:var(--fs-sm); }
.drill-bar b { margin-left: auto; }

/* ---- 导入错误 ---- */
.import-errors summary { cursor: pointer; font-weight: 600; }
.import-errors ul { margin: 8px 0 0 18px; font-size:var(--fs-sm); line-height: 1.9; }

/* ---- 表单增强 ---- */
.form-card { padding: 14px 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; }
.form-grid .f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-grid .f .lab { font-size:var(--fs-sm); color: #475467; display: flex; align-items: center; gap: 4px; }
.form-grid .f .hint { font-size:var(--fs-xs); color: #98a2b3; line-height: 1.6; }
.form-grid textarea { resize: vertical; min-height: 76px; }
.dict-link { color: #98a2b3; font-size:var(--fs-xs); }
.dict-link:hover { color: var(--amber); }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line-2); padding: 10px 0 2px; margin-top: 14px; z-index: 5; }
.region-picker { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.region-picker select, .region-picker input { min-width: 0; }
input.readonly { background: #f8fafc; color: #667085; }
.danger-text { color: var(--danger) !important; }
.stack { display: grid; gap: 6px; }

/* ---- 空状态 ---- */
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.empty .empty-ic { font-size:var(--fs-3xl); color: #cbd5e1; line-height: 1; margin-bottom: 6px; }
.empty strong { display: block; color: #475467; font-size:var(--fs-base); margin-bottom: 2px; }
.empty span { display: block; font-size:var(--fs-sm); }
.empty .empty-act { margin-top: 10px; }

/* ---- 提示条 ---- */
.toast-wrap { position: fixed; right: 16px; bottom: 18px; z-index: 300; display: grid; gap: 8px; }
.toast { background: #0b2540; color: #fff; border-radius: 9px; padding: 9px 13px; font-size:var(--fs-sm); box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; transform: translateY(6px); transition: .2s; }
.toast.on { opacity: 1; transform: none; }
.toast.ok { background: #0f766e; }
.toast.err { background: #b42318; }

/* ---- 骨架屏 ---- */
.skeleton { position: relative; overflow: hidden; background: #eef2f7; border-radius: 6px; color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: sk 1.1s infinite; }
@keyframes sk { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---- 紧凑 / 皮肤 ---- */
body.ui-compact .card { padding: 10px 11px; margin-bottom: 9px; }
body.ui-compact table.data th, body.ui-compact table.data td { padding: 5px 7px; }
body.ui-compact .content { padding: 10px 14px 22px; }
body.theme-teal { --amber: #0f766e; --amber-2: #2a9d8f; }
body.theme-blue { --amber: #1d4ed8; --amber-2: #3b82f6; }
body.theme-slate { --amber: #475467; --amber-2: #667085; }
body.theme-teal img.brand-mark, body.theme-blue img.brand-mark { filter: none; }
body.theme-teal .nav-home, body.theme-blue .nav-home { color: #eaf2fb; }

/* ---- 打印（批量记录） ---- */
.print-record .print-foot { margin-top: 14px; padding-top: 8px; border-top: 1px dashed #999; color: #555; font-size:var(--fs-xs); text-align: center; }
.print-record table { margin-top: 10px; }
.print-record th { font-weight: 600; }
.no-print { }
@media print { .no-print, .drawer, .modal, .toast-wrap, .batch-bar, .sys-watermark { display: none !important; } }

/* ---- 小屏顶栏 ---- */
@media (max-width: 1100px) { .top-search { display: none; } }
@media (max-width: 980px) {
  .sidebar { width: 262px; flex-basis: 262px; }
  body.nav-collapsed .sidebar { width: 262px; flex-basis: 262px; }
  body.nav-collapsed .brand-copy, body.nav-collapsed .nav-search, body.nav-collapsed .nav-block-h,
  body.nav-collapsed .nav-item .nav-text, body.nav-collapsed .sidebar-foot, body.nav-collapsed .user-box { display: revert !important; }
  body.nav-collapsed .nav-sec-h { display: revert !important; }
  body.nav-collapsed .nav-block.collapsed a.nav-item { display: none !important; }
  body.nav-collapsed .sidebar nav a.nav-item, body.nav-collapsed .nav-home { justify-content: flex-start; padding: 7px 10px 7px 12px; }
  .sidebar-head .side-toggle { display: none; }
  .topbar h1 { max-width: 40%; font-size:var(--fs-md); }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 8px; }
  .modal-box { max-height: 94vh; }
  .drawer { width: 100%; }
}

/* ==========================================================================
   移动端 H5（现场版）：应用栏、任务时间线、快捷宫格、底部导航、抽屉、表单
   ========================================================================== */
body.mobile-bg { background: #e8edf4; }
.m-shell { max-width: 480px; background: #f4f7fb; box-shadow: 0 0 44px rgba(16,24,40,.10); padding-bottom: 86px; }
@media (min-width: 640px) { .m-shell { margin: 0 auto; min-height: 100vh; } }
.m-appbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 9px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: linear-gradient(135deg, #08192a, #123a56); color: #fff;
}
.m-logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(145deg,#f5ce63,#d99a1a); color: #241701; font-weight: 800; display: grid; place-items: center; font-size:var(--fs-md); }
.m-appbar-t { flex: 1; min-width: 0; line-height: 1.25; }
.m-appbar-t b { display: block; font-size:var(--fs-md); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-appbar-t span { font-size:var(--fs-xs); color: #a8bdd2; }
.m-icon-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #eaf2fb; display: inline-grid; place-items: center; position: relative; flex: 0 0 32px; }
.m-icon-btn svg.ic { width: 17px; height: 17px; }
.m-appbar .m-icon-btn { color: #eaf2fb; }
.m-dot { position: absolute; top: -5px; right: -5px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 99px; background: #e0453a; color: #fff; font-size:var(--fs-2xs); line-height: 15px; text-align: center; font-style: normal; }
.m-body { padding: 12px 12px 18px; min-height: 60vh; }

/* 下拉刷新 */
.m-ptr { position: fixed; top: 0; left: 50%; transform: translate(-50%, -34px); width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 60; display: grid; place-items: center; transition: transform .18s; }
.m-ptr span { width: 14px; height: 14px; border: 2px solid #cfd8e3; border-top-color: var(--amber); border-radius: 50%; }
body.ptr-on .m-ptr { transform: translate(-50%, 10px); }
body.ptr-on .m-ptr span { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 首页头部 */
.m-hero { background: linear-gradient(140deg, #0d3050 0%, #17496a 60%, #1c5a7a 100%); border-radius: 16px; color: #eaf2fb; padding: 14px; margin-bottom: 10px; box-shadow: 0 10px 24px rgba(13,48,80,.18); }
.m-hero-top { display: flex; align-items: center; gap: 10px; }
.m-ava { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(145deg,#f5ce63,#d99a1a); color: #241701; display: grid; place-items: center; font-weight: 800; font-size:var(--fs-lg); flex: 0 0 40px; }
.m-ava.lg { width: 54px; height: 54px; font-size:var(--fs-2xl); flex-basis: 54px; }
.m-hello { font-size:var(--fs-md); font-weight: 700; }
.m-sub { font-size:var(--fs-xs); color: #a9c1d7; margin-top: 2px; }
.m-weather { margin-left: auto; text-align: right; background: rgba(255,255,255,.08); border-radius: 9px; padding: 4px 8px; }
.m-weather b { display: block; font-size:var(--fs-base); color: #fff; }
.m-weather span { font-size:var(--fs-2xs); color: #b7cbde; }
.m-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.m-hero-stats a { text-align: center; color: #eaf2fb; }
.m-hero-stats b { display: block; font-size:var(--fs-xl); font-weight: 750; color: #fff; line-height: 1.2; }
.m-hero-stats span { font-size:var(--fs-2xs); color: #a9c1d7; }

/* 提醒条 */
.m-banner { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #f1dfb4; border-radius: 12px; padding: 9px 11px; margin-bottom: 10px; color: #6c4b06; }
.b-ic { width: 30px; height: 30px; border-radius: 8px; background: #fff6e0; color: #b57d0a; display: grid; place-items: center; flex: 0 0 30px; }
.b-text { flex: 1; min-width: 0; line-height: 1.35; }
.b-text b { display: block; font-size:var(--fs-sm); color: #4a3505; }
.b-text i { font-style: normal; font-size:var(--fs-xs); color: #8a7133; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-more { font-size:var(--fs-xs); color: #9a6a0a; white-space: nowrap; }

/* 分区标题 */
.m-section { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 8px; }
.m-section b { font-size:var(--fs-md); color: #213a52; }
.m-section > span, .m-section > a { font-size:var(--fs-xs); color: var(--muted); }
.m-list-head { display: flex; justify-content: space-between; font-size:var(--fs-xs); color: var(--muted); margin: 4px 2px 8px; }

/* 任务时间线 */
.m-timeline { position: relative; }
.m-task-card { display: flex; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px; margin-bottom: 8px; color: inherit; position: relative; overflow: hidden; }
.m-task-card.ing { border-color: #f0cd7d; background: linear-gradient(180deg,#fffdf6,#fff); }
.m-task-card.ing::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--amber); }
.tc-time { width: 46px; flex: 0 0 46px; text-align: right; padding-top: 2px; }
.tc-time b { display: block; font-size:var(--fs-md); color: #17395c; font-variant-numeric: tabular-nums; }
.tc-time span { font-size:var(--fs-2xs); color: #b42318; }
.tc-dot { width: 8px; flex: 0 0 8px; position: relative; }
.tc-dot::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.tc-dot::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: -12px; width: 1px; background: var(--line); }
.m-task-card:last-child .tc-dot::after { display: none; }
.tc-body { flex: 1; min-width: 0; }
.tc-h { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }
.tc-risk { font-size:var(--fs-2xs); color: var(--muted); }
.tc-code { margin-left: auto; font-size:var(--fs-2xs); color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.tc-title { display: block; font-size:var(--fs-md); line-height: 1.4; color: #16212e; }
.tc-meta { font-size:var(--fs-xs); color: var(--muted); margin-top: 3px; }
.tc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size:var(--fs-xs); color: #7b8da1; }
.tc-foot em { font-style: normal; color: var(--amber); font-weight: 600; }

/* 快捷宫格 */
.m-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.m-quick-grid a, .m-quick-grid button { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 4px; text-align: center; font-size:var(--fs-xs); color: #344054; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.m-quick-grid b { font-size:var(--fs-sm); font-weight: 600; }
.m-quick-grid i { font-style: normal; font-size:var(--fs-2xs); color: var(--muted); }
.m-quick-lg { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.m-quick-lg a { flex-direction: row; text-align: left; padding: 10px; gap: 9px; flex-wrap: wrap; }
.m-quick-lg a b { flex: 1; font-size:var(--fs-base); }
.m-quick-lg a i { flex-basis: 100%; padding-left: 37px; margin-top: -2px; }
.q-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 28px; }
.q-ic.blue { background: #e8f1ff; color: #1d4ed8; }
.q-ic.red { background: #fdecea; color: #b42318; }
.q-ic.teal { background: #e6f6f4; color: #0f766e; }
.q-ic.amber { background: #fff6e0; color: #b57d0a; }

/* 统计/小节 */
.m-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 10px; }
.m-stat-grid > div { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 9px 6px; text-align: center; }
.m-stat-grid b { display: block; font-size:var(--fs-xl); color: #17395c; line-height: 1.25; }
.m-stat-grid span { font-size:var(--fs-2xs); color: var(--muted); }
.m-check-rows { padding: 4px 12px; }
.m-check-rows .cr { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size:var(--fs-sm); color: #344054; }
.m-check-rows .cr:last-child { border-bottom: 0; }
.m-check-rows .cr > span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.m-check-rows .cr svg.ic { color: #98a2b3; }
.m-check-rows .cr i { font-style: normal; font-size:var(--fs-2xs); }
.m-tip-card { background: #f2f8ff; border: 1px solid #d6e8f8; border-radius: 12px; padding: 11px 12px; margin-top: 12px; }
.m-tip-card.danger { background: #fff7f6; border-color: #f6d5d1; }
.m-tip-card b { font-size:var(--fs-sm); color: #17456b; }
.m-tip-card.danger b { color: #92251c; }
.m-tip-card p { margin: 4px 0 6px; font-size:var(--fs-sm); line-height: 1.75; color: #4a6580; }
.m-tip-card a { font-size:var(--fs-sm); color: #1d6fa5; }
.m-tip-like { margin-top: 12px; }

/* 待办提示条（抢单 / 审批） */
.m-todo-row { display: grid; gap: 8px; margin-bottom: 10px; }
.m-todo-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e4e9f0; border-radius: 13px; padding: 10px 12px; color: inherit; }
.m-todo-chip svg.ic { width: 22px; height: 22px; color: #1d6fa5; flex: 0 0 22px; }
.m-todo-chip span { display: flex; flex-direction: column; min-width: 0; }
.m-todo-chip b { font-size:var(--fs-base); color: #101828; }
.m-todo-chip i { font-style: normal; font-size:var(--fs-xs); color: #667085; }
.m-todo-chip.hot { border-color: #f1dfb4; background: linear-gradient(180deg,#fffdf7,#fff); }
.m-todo-chip.hot svg.ic { color: #d99a1a; }

/* 抢单卡片 */
.m-grab { display: block; background: #fff; border: 1px solid #e4e9f0; border-radius: 14px; padding: 12px; margin-bottom: 9px; color: inherit; }
.m-grab.hot { border-color: #f6c6c0; background: linear-gradient(180deg,#fff9f8,#fff); box-shadow: 0 2px 8px rgba(217,45,32,.06); }
.m-grab.done { opacity: .92; }
.m-grab .g-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-grab .g-code { font-size:var(--fs-xs); color: #667085; }
.m-grab .g-title { display: block; font-size:var(--fs-md); margin: 6px 0 4px; color: #101828; line-height: 1.45; }
.m-grab .g-meta { font-size:var(--fs-sm); color: #475467; line-height: 1.65; }
.m-grab .g-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.m-grab .g-foot span { font-size:var(--fs-sm); color: #475467; }
.m-grab .g-foot span i { font-style: normal; color: #98a2b3; }
.m-grab .g-foot span b { color: #101828; font-size:var(--fs-base); }
.m-grab-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 8px 18px; background: linear-gradient(135deg,#d99a1a,#c07d0c); color: #241704; font: inherit; font-size:var(--fs-base); font-weight: 700; cursor: pointer; }
.m-grab-btn svg.ic { width: 15px; height: 15px; }
.m-grab-btn[disabled] { background: #e4e9f0; color: #98a2b3; cursor: not-allowed; }
.m-grab .g-note { margin-top: 8px; padding: 7px 9px; background: #f8fafc; border-radius: 8px; font-size:var(--fs-xs); color: #667085; line-height: 1.6; }
.m-grab.done em { font-style: normal; font-size:var(--fs-sm); color: #1d6fa5; }

/* 列表卡片 */
.m-card-list { display: grid; gap: 8px; }
.m-list-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 11px; color: inherit; }
.m-list-item.unread { border-left: 3px solid var(--danger); }
.li-h { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.li-code { margin-left: auto; font-size:var(--fs-2xs); color: var(--muted); }
.li-title { display: block; font-size:var(--fs-md); color: #16212e; line-height: 1.4; }
.li-meta { display: grid; gap: 2px; margin-top: 4px; font-size:var(--fs-xs); color: var(--muted); }
.li-meta span { display: flex; align-items: center; gap: 4px; }
.li-meta svg.ic { width: 13px; height: 13px; flex-basis: 13px; }
.li-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; font-size:var(--fs-xs); color: #7b8da1; }
.li-foot span { display: flex; align-items: center; gap: 4px; }
.li-foot em { font-style: normal; color: var(--amber); }
.m-empty { text-align: center; padding: 22px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.m-empty .e-ic { width: 42px; height: 42px; border-radius: 50%; background: #eef3f9; color: #98a2b3; display: grid; place-items: center; margin-bottom: 2px; }
.m-empty .e-ic svg.ic { width: 20px; height: 20px; }
.m-empty b { font-size:var(--fs-base); color: #344054; }
.m-empty span { font-size:var(--fs-sm); color: var(--muted); line-height: 1.7; }
.m-empty .btn { margin-top: 7px; }

/* 搜索与状态筛选 */
.m-search { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 3px 4px 3px 11px; margin-bottom: 8px; }
.m-search input { border: 0; background: transparent; height: 34px; padding: 0; font-size:var(--fs-base); flex: 1; min-width: 0; }
.m-search input:focus { outline: none; }
.m-search .m-icon-btn { border: 0; background: #f4f7fb; color: #17395c; }
.m-chip-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.m-chip-row::-webkit-scrollbar { display: none; }
.m-chip { white-space: nowrap; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size:var(--fs-sm); color: #4a5b6d; }
.m-chip.on { background: #0d3050; border-color: #0d3050; color: #fff; }
.m-chip i { font-style: normal; font-size:var(--fs-2xs); margin-left: 3px; opacity: .8; }
.m-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 4px; font-size:var(--fs-sm); }
.m-pager a { padding: 6px 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: #17395c; }
.m-pager span { padding: 6px 14px; color: #b8c2cf; border: 1px solid var(--line-2); border-radius: 8px; }
.m-pager b { color: var(--muted); font-weight: 500; }

/* 工单详情 */
.m-work-hero { background: linear-gradient(145deg, #0d3050, #17496a); border-radius: 16px; color: #eaf2fb; padding: 13px 14px; margin-bottom: 10px; }
.wh-h { display: flex; align-items: center; gap: 6px; }
.m-work-hero h2 { font-size:var(--fs-lg); margin: 7px 0 6px; color: #fff; line-height: 1.4; }
.wh-meta { display: grid; gap: 3px; font-size:var(--fs-sm); color: #b6cbdd; }
.wh-meta span { display: flex; align-items: center; gap: 5px; }
.wh-meta svg.ic { width: 13px; height: 13px; flex-basis: 13px; }
.wh-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.wh-actions .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #eaf2fb; }
.wh-actions .btn svg.ic { width: 14px; height: 14px; }

/* 步骤条 */
.m-steps { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; margin-bottom: 10px; }
.m-steps .st { flex: 1; text-align: center; position: relative; }
.m-steps .st i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #eef2f7; color: #98a2b3; font-style: normal; font-size:var(--fs-xs); font-weight: 700; }
.m-steps .st span { display: block; font-size:var(--fs-2xs); color: #98a2b3; margin-top: 3px; }
.m-steps .st.done i { background: #d7f0eb; color: #0f766e; }
.m-steps .st.done span { color: #0f766e; }
.m-steps .st.now i { background: var(--amber); color: #241701; }
.m-steps .st.now span { color: #9a6a0a; font-weight: 600; }

/* 分段 tabs */
.m-tabs2 { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin-bottom: 10px; overflow-x: auto; }
.m-tabs2 button { flex: 1; white-space: nowrap; border: 0; background: transparent; border-radius: 8px; padding: 6px 8px; font-size:var(--fs-sm); color: #667085; }
.m-tabs2 button.on { background: #0d3050; color: #fff; font-weight: 600; }
.m-tabs2 button i { font-style: normal; font-size:var(--fs-2xs); opacity: .75; }

/* 表单 */
.m-form-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.m-form-card .field { margin-bottom: 10px; }
.m-form-card label { font-size:var(--fs-sm); color: #475467; display: block; margin-bottom: 4px; }
.m-form-card input, .m-form-card select, .m-form-card textarea { width: 100%; min-height: 40px; font-size:var(--fs-md); border-radius: 9px; }
.m-form-card textarea { min-height: 92px; }
.m-input-row { display: flex; gap: 6px; }
.m-input-row input { flex: 1; }
.m-inline { display: flex; gap: 5px; align-items: center; flex-wrap: nowrap; }
.m-inline select, .m-inline input { min-width: 0; min-height: 36px; font-size:var(--fs-base); }
.m-card-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.m-card-h b { font-size:var(--fs-base); color: #16212e; }
.m-card-h span { font-size:var(--fs-xs); }
.m-kv { display: grid; gap: 0; padding: 2px 12px; }
.m-kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size:var(--fs-sm); }
.m-kv > div:last-child { border-bottom: 0; }
.m-kv > div.block { display: block; }
.m-kv > div.block b { display: block; margin-top: 3px; font-weight: 500; color: #344054; line-height: 1.65; }
.m-kv span { color: var(--muted); flex: 0 0 auto; }
.m-kv b { color: #213a52; text-align: right; font-weight: 600; }
.m-kv > div.block b { text-align: left; }
.m-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.m-photo-grid a { display: block; position: relative; border-radius: 9px; overflow: hidden; background: #eef2f7; }
.m-photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.m-photo-grid span { position: absolute; left: 4px; bottom: 4px; background: rgba(8,20,33,.65); color: #fff; font-size:var(--fs-2xs); padding: 1px 5px; border-radius: 4px; }
.m-photo-grid a::after { content: ""; }
.m-profile { display: flex; align-items: center; gap: 11px; background: linear-gradient(140deg,#0d3050,#17496a); color: #eaf2fb; border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.pf-text { flex: 1; min-width: 0; line-height: 1.45; }
.pf-text b { display: block; font-size:var(--fs-lg); color: #fff; }
.pf-text span { display: block; font-size:var(--fs-sm); color: #b6cbdd; }
.m-menu-list { background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.m-menu-list a { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-bottom: 1px solid var(--line-2); color: #344054; font-size:var(--fs-base); }
.m-menu-list a:last-child { border-bottom: 0; }
.m-menu-list a span { flex: 1; }
.m-menu-list a em { font-style: normal; font-size:var(--fs-xs); color: var(--muted); }
.m-menu-list svg.ic { color: #667085; }
.m-foot-brand { text-align: center; font-size:var(--fs-xs); color: var(--muted); padding: 18px 0 4px; }
.m-foot-note { text-align: center; font-size:var(--fs-xs); color: #a4b0be; margin-top: 10px; }

/* 底部导航 + 浮动按钮 */
.m-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, 1fr); z-index: 50; padding: 6px 0 calc(4px + env(safe-area-inset-bottom)); }
.m-nav a { position: relative; text-align: center; font-size:var(--fs-xs); color: #7b8da1; padding: 2px 0; }
.m-nav a.on { color: #0d3050; font-weight: 700; }
.m-nav a .ic { display: block; margin: 0 auto 2px; width: 20px; height: 20px; }
.m-nav a.on .ic { color: var(--amber); }
.m-nav a .m-dot { top: 0; right: 18%; }
.m-fab { position: fixed; right: max(14px, calc(50% - 226px)); bottom: calc(74px + env(safe-area-inset-bottom)); width: 48px; height: 48px; border-radius: 50%; border: 0; background: linear-gradient(145deg,#f0bb45,#d99a1a); color: #241701; display: grid; place-items: center; z-index: 45; box-shadow: 0 10px 24px rgba(217,154,26,.38); }
.m-fab svg.ic { width: 22px; height: 22px; stroke-width: 2.2; }

/* 快捷操作抽屉 */
.m-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.m-sheet[hidden] { display: none; }
.m-sheet-mask { position: absolute; inset: 0; background: rgba(8,20,33,.42); }
.m-sheet-body { position: relative; width: min(480px, 100%); background: #fff; border-radius: 18px 18px 0 0; padding: 12px 14px calc(18px + env(safe-area-inset-bottom)); animation: sheetUp .2s ease; }
@keyframes sheetUp { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.m-sheet-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-sheet-h b { font-size:var(--fs-md); color: #17395c; }
.m-sheet-h .m-icon-btn { border-color: var(--line); background: #f6f8fb; color: #667085; }
.m-sheet .m-quick-grid a { background: #f8fafc; border-color: var(--line); }

@media (max-width: 560px) {
  .m-body { padding: 10px 10px 16px; }
  .m-quick-grid { gap: 6px; }
  .m-hero { padding: 12px; }
  .m-hero-stats b { font-size:var(--fs-lg); }
}

/* ==========================================================================
   设置页 / 搜索 / 权限矩阵 / 字典
   ========================================================================== */
.theme-picks { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-pick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; font-size:var(--fs-sm); cursor: pointer; background: #fff; }
.theme-pick:has(input:checked) { border-color: var(--amber); background: #fffdf6; box-shadow: 0 0 0 2px rgba(217,154,26,.12); }
.theme-pick input { accent-color: var(--amber); }
.theme-pick .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.theme-preview { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #f6f8fb; }
.tp-bar { height: 20px; background: #0d2238; display: flex; align-items: center; gap: 4px; padding: 0 7px; }
.tp-bar i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.35); }
.tp-body { display: flex; height: 150px; }
.tp-side { width: 44px; background: #102b45; padding: 8px 6px; display: grid; gap: 7px; align-content: start; }
.tp-side span { height: 5px; border-radius: 2px; background: rgba(255,255,255,.22); }
.tp-side span.on { background: var(--amber); }
.tp-main { flex: 1; padding: 10px; }
.tp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 9px; }
.tp-kpis b { height: 26px; border-radius: 5px; background: #fff; border: 1px solid #e6ecf3; }
.tp-line { height: 6px; background: #e3eaf2; border-radius: 3px; margin-bottom: 6px; }
.tp-line.w80 { width: 80%; } .tp-line.w70 { width: 70%; } .tp-line.w60 { width: 60%; }
.print-mini { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; font-size:var(--fs-xs); }
.pm-title { text-align: center; font-size:var(--fs-md); font-weight: 700; letter-spacing: .06em; }
.pm-sub { text-align: center; color: #667085; font-size:var(--fs-2xs); margin: 2px 0 9px; }
.print-mini table { width: 100%; border-collapse: collapse; }
.print-mini th, .print-mini td { border: 1px solid #cfd6df; padding: 5px 6px; }
.print-mini th { background: #f5f7fa; width: 84px; font-weight: 600; }
.pm-foot { margin-top: 10px; padding-top: 6px; border-top: 1px dashed #b9c3ce; color: #667085; font-size:var(--fs-2xs); text-align: center; }
.code-block { background: #0c2238; color: #cfe3f5; border-radius: 8px; padding: 9px 11px; font-family: ui-monospace, Consolas, monospace; font-size:var(--fs-sm); line-height: 1.75; word-break: break-all; }
.perm-wrap { max-height: 64vh; overflow: auto; }
.perm-table th.perm-mod { position: sticky; left: 0; z-index: 3; background: #f8fafc; min-width: 150px; }
.perm-table td.perm-mod { position: sticky; left: 0; background: #fff; z-index: 2; border-right: 1px solid var(--line-2); }
.perm-table td.perm-mod b { display: block; font-size:var(--fs-sm); color: #213a52; }
.perm-table td.perm-mod span { font-size:var(--fs-2xs); }
.perm-role { min-width: 82px; text-align: center !important; }
.perm-role span { display: block; font-size:var(--fs-sm); }
.perm-role .link-btn { font-size:var(--fs-2xs); font-weight: 400; color: var(--muted); }
.perm-cell { text-align: center !important; }
.perm-cell input { width: 15px; height: 15px; accent-color: var(--amber); }
.dict-summary { font-size:var(--fs-sm); color: var(--muted); margin: 0 2px 10px; }
.dict-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.dict-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; color: inherit; }
.dict-card:hover { border-color: var(--amber); box-shadow: 0 6px 18px rgba(16,24,40,.06); }
.dc-h { display: flex; align-items: center; gap: 8px; }
.dc-h b { flex: 1; font-size:var(--fs-base); color: #213a52; }
.dc-key { font-size:var(--fs-2xs); color: #98a2b3; margin-top: 2px; }
.dc-preview { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chip { font-size:var(--fs-xs); background: #f2f6fa; border: 1px solid #e4ebf2; border-radius: 99px; padding: 1px 7px; color: #4a5b6d; }
.chip.off { opacity: .5; text-decoration: line-through; }
.search-list { display: grid; gap: 2px; }
.search-list a { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 7px; color: inherit; font-size:var(--fs-sm); border-bottom: 1px dashed var(--line-2); }
.search-list a:last-child { border-bottom: 0; }
.search-list a:hover { background: #f7fafc; }
.search-list b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #213a52; }
.search-list span { color: var(--muted); font-size:var(--fs-xs); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn-num { color: #b57d0a !important; }

/* ---------- 大屏指标下钻 ---------- */
.drill-banner { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px 12px; margin-bottom:10px; border-radius:9px; background:#f2f8ff; border:1px solid #cfe3f7; color:#1e4c74; font-size:var(--fs-sm); }
.drill-banner .link-btn { margin-left:auto; }
.kpis.drill-kpis .kpi { text-decoration:none; color:inherit; transition:transform .12s ease, box-shadow .12s ease; }
.kpis.drill-kpis .kpi:hover { transform:translateY(-1px); box-shadow:0 6px 16px rgba(12,34,56,.10); }
.kpis.drill-kpis .kpi.active { outline:2px solid var(--amber); outline-offset:1px; }
.w-check { width:36px; text-align:center; }
.w-check input { width:15px; height:15px; accent-color:var(--amber); }

/* ---------- 工作台快捷入口 ---------- */
.quick-tiles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.quick-tiles .qt { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fbfcfe; color:var(--ink); transition:border-color .12s ease, background .12s ease; }
.quick-tiles .qt:hover { border-color:var(--amber); background:#fffdf7; }
.quick-tiles .qt b { font-size:var(--fs-xl); line-height:1.15; font-variant-numeric:tabular-nums; }
.quick-tiles .qt i { font-style:normal; font-size:var(--fs-xs); color:#667085; }
.quick-tiles .qt .qt-ic { color:var(--amber); }
.quick-tiles .qt .qt-ic svg { width:16px; height:16px; }

/* ---------- 批量打印分页 ---------- */
.print-page.print-break { page-break-before: always; break-before: page; }
.print-page .print-foot { margin-top:14px; padding-top:8px; border-top:1px dashed #999; color:#555; font-size:var(--fs-xs); text-align:center; }

@media print {
  .print-toolbar { display:none !important; }
  .print-page { box-shadow:none; margin:0; }
}

/* ---------- 设置页二级导航 ---------- */
.subnav { display:flex; align-items:center; gap:2px; flex-wrap:wrap; padding:4px; margin-bottom:12px; background:#fff; border:1px solid var(--line); border-radius:11px; }
.subnav a { padding:6px 11px; border-radius:8px; font-size:var(--fs-sm); color:#475467; white-space:nowrap; }
.subnav a:hover { background:#f2f6fa; color:var(--navy); }
.subnav a.on { background:var(--navy); color:#fff; font-weight:600; }
.subnav .spacer { flex:1; }

/* ---------- 工作台紧凑布局（系统设置可切换） ---------- */
body.home-compact .content { padding-top: 6px; }
body.home-compact .kpis { gap: 6px; margin-bottom: 8px; }
body.home-compact .kpi { padding: 8px 10px; }
body.home-compact .kpi b { font-size:var(--fs-lg); }
body.home-compact .card { padding: 10px 12px; }
body.home-compact .grid-main { gap: 10px; }
body.home-compact .quick-panel .quick-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.home-compact .quick-tiles .qt { padding: 7px 9px; }

/* 指标卡作为链接时保持卡片观感 */
a.kpi { color: inherit; }
a.kpi:hover { color: inherit; border-color: var(--amber); }

/* ── 交期徽标：全系统统一口径 ───────────────────── */
.due-chip { display:inline-flex; align-items:center; gap:4px; padding:2px 7px; border-radius:99px; font-size:var(--fs-xs); font-weight:600; white-space:nowrap; border:1px solid transparent; }
.due-chip.overdue { background:#fdecea; color:#b42318; border-color:#f7c9c4; }
.due-chip.today { background:#fff4e5; color:#9a6a0a; border-color:#f3d6a4; }
.due-chip.d3 { background:#fff8e6; color:#8a6100; border-color:#f0dfae; }
.due-chip.d7 { background:#eff8ff; color:#175cd3; border-color:#c7dffb; }
.due-chip.later { background:#ecfdf5; color:#0f766e; border-color:#bfe9df; }
.due-chip.soon { background:#fff8e6; color:#8a6100; border-color:#f0dfae; }
.due-chip.normal { background:#ecfdf5; color:#0f766e; border-color:#bfe9df; }
.due-chip.done { background:#f2f4f7; color:#667085; border-color:#e4e7ec; }
.due-chip.none { background:#fff; color:#b42318; border-color:#f0c2bd; border-style:dashed; }

/* ── 逆向处理卡片 ─────────────────────────────── */
.reverse-card { border-color:#f0c2bd; background:linear-gradient(180deg,#fffafa,#fff); }
.reverse-card .card-h h3 { display:flex; align-items:center; gap:6px; }
.reverse-card .card-h h3 svg.ic { width:14px; height:14px; color:#b42318; }
.reverse-form .f input { width:100%; }
.reverse-history { margin-top:12px; border-top:1px dashed var(--line); padding-top:10px; }
.rv-item { display:grid; gap:1px; padding:6px 0; border-bottom:1px dashed var(--line-2); font-size:var(--fs-sm); }
.rv-item b { color:#b42318; font-weight:650; }
.rv-item i { color:#475467; font-style:normal; }
.rv-item em { color:var(--muted); font-style:normal; font-size:var(--fs-xs); }

/* ── 交期分类签 ───────────────────────────────── */
.due-tabs { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:-2px 0 12px; }
.due-tabs-label { font-size:var(--fs-xs); color:var(--muted); letter-spacing:.08em; }
.due-tab { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:99px; border:1px solid var(--line); background:#fff; font-size:var(--fs-sm); color:#344054; }
.due-tab b { font-weight:750; }
.due-tab.overdue b { color:#b42318; }
.due-tab.soon b { color:#9a6a0a; }
.due-tab.none b { color:#667085; }
.due-tab.on { border-color:var(--amber); box-shadow:0 0 0 2px rgba(217,154,26,.15); background:#fffdf6; }
.due-tab.overdue.on { border-color:#b42318; box-shadow:0 0 0 2px rgba(180,35,24,.12); background:#fffafa; }

/* ── 交期中心 / 逆向台账 ─────────────────────── */
.guide { border:1px solid #dbe7f5; background:linear-gradient(180deg,#f7fbff,#fff); border-radius:12px; padding:11px 14px 12px; margin-bottom:12px; }
.guide-h { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.guide-h b { font-size:var(--fs-base); color:var(--navy); }
.guide-h span { font-size:var(--fs-xs); color:#175cd3; background:#eff8ff; border:1px solid #c7dffb; border-radius:99px; padding:1px 8px; }
.guide-list { margin:0; padding-left:18px; display:grid; gap:4px; font-size:var(--fs-sm); line-height:1.65; color:#475467; }
.guide-list b { color:#344054; font-weight:650; }
.due-kpis { grid-template-columns:repeat(auto-fit,minmax(128px,1fr)); }
.sla-kpi b small { font-size:var(--fs-sm); margin-left:1px; }
.due-note { display:flex; flex-wrap:wrap; gap:14px; font-size:var(--fs-sm); color:var(--muted); margin:-4px 0 12px; }
.due-note b { font-size:var(--fs-md); color:#344054; margin-right:3px; }
.due-note .warn b { color:#b42318; }
.due-layout { display:grid; grid-template-columns:minmax(0,1fr) 318px; gap:12px; align-items:start; }
.due-main { min-width:0; }
.due-side { display:grid; gap:10px; }
.due-card { overflow:visible; }
.card.flush.due-card { overflow:visible; }
.due-wrap { overflow:visible; }
.due-table td { vertical-align:top; }
.due-table tr.is-overdue td:first-child { box-shadow:inset 3px 0 0 #b42318; }
.due-foot { font-size:var(--fs-sm); color:var(--muted); margin:8px 2px 0; }
.due-panel { margin-bottom:12px; }
.guide-list { margin:6px 0 0 18px; padding:0; line-height:1.85; font-size:var(--fs-sm); }
.guide-list li { margin:0; }
.due-panel .card-h { flex-wrap:wrap; }
.due-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; margin:8px 0 10px; }
.due-stats > div { border:1px solid var(--line-2); border-radius:8px; padding:7px 9px; background:#fcfcfd; display:grid; gap:2px; }
.due-stats span { font-size:var(--fs-xs); color:var(--muted); }
.due-stats b { font-size:var(--fs-base); color:#344054; font-weight:700; }
.due-stats b.bad { color:#b42318; } .due-stats b.warn { color:#9a6a0a; } .due-stats b.ok { color:#0f766e; }
.due-tips { font-size:var(--fs-sm); line-height:1.7; color:#475467; background:#fffdf6; border:1px dashed #f0dfae; border-radius:8px; padding:7px 10px; margin-bottom:10px; }
.due-tips b { color:#8a6100; }
.due-tool-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; }
.due-tool-grid form { border:1px solid var(--line-2); border-radius:9px; padding:8px 10px 10px; display:grid; gap:6px; background:#fff; }
.due-tool-grid .btn { justify-self:start; }
.qa { position:relative; display:inline-block; }
.qa > summary { list-style:none; cursor:pointer; display:inline-flex; }
.qa > summary::-webkit-details-marker { display:none; }
.qa-body { position:absolute; right:0; top:22px; z-index:20; width:330px; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 14px 40px rgba(12,34,56,.16); padding:10px 12px 12px; display:grid; gap:6px; text-align:left; }
.qa-body form { display:grid; gap:5px; padding:6px 0; border-bottom:1px dashed var(--line-2); }
.qa-body form:last-of-type { border-bottom:0; }
.qa-title { font-size:var(--fs-sm); font-weight:700; color:var(--navy); }
.qa-hint { font-size:var(--fs-xs); color:var(--muted); margin:0; }
.qa-input { width:100%; height:30px; border:1px solid var(--line); border-radius:6px; padding:0 7px; font-size:var(--fs-sm); background:#fff; }
.qa-link { font-size:var(--fs-sm); color:#175cd3; padding-top:6px; display:block; }
.mini-list { list-style:none; margin:0; padding:0; display:grid; gap:7px; font-size:var(--fs-sm); }
.mini-list li { border-bottom:1px dashed var(--line-2); padding-bottom:6px; }
.mini-list li:last-child { border-bottom:0; padding-bottom:0; }
.mini-list .muted { font-size:var(--fs-xs); margin-top:1px; }
.mini-tag { display:inline-block; margin-left:5px; font-size:var(--fs-2xs); color:#9a6a0a; background:#fff8e6; border:1px solid #f0dfae; border-radius:99px; padding:0 6px; }
.mini-table { width:100%; font-size:var(--fs-sm); border-collapse:collapse; }
.mini-table th { text-align:left; font-weight:500; color:var(--muted); font-size:var(--fs-xs); padding:0 0 4px; }
.mini-table td { padding:3px 0; border-top:1px dashed var(--line-2); }
.mini-table .right { text-align:right; }
.ok { color:#0f766e; } .warn { color:#9a6a0a; } .bad { color:#b42318; }
.bars { display:grid; gap:6px; }
.bar-row { display:grid; grid-template-columns:78px 1fr 28px; align-items:center; gap:7px; font-size:var(--fs-sm); }
.bar-row.link { color:inherit; text-decoration:none; }
.bar-row.link:hover .bar-lab { color:#175cd3; }
.bar-lab { color:#475467; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bar-track { height:8px; border-radius:99px; background:#f0f3f7; overflow:hidden; }
.bar-track i { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#f0c168,#d99a1a); }
.bar-n { text-align:right; font-weight:650; color:#344054; }
.rev-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:12px; align-items:start; }
.rev-side { display:grid; gap:10px; }
.rev-tag { display:inline-block; font-size:var(--fs-xs); font-weight:650; padding:1px 8px; border-radius:99px; background:#f2f4f7; color:#475467; border:1px solid #e4e7ec; }
.rev-tag.rev-红冲, .rev-tag.rev-作废 { background:#fdecea; color:#b42318; border-color:#f7c9c4; }
.rev-tag.rev-退回, .rev-tag.rev-驳回 { background:#fff4e5; color:#9a6a0a; border-color:#f3d6a4; }
.rev-tag.rev-撤销 { background:#eff8ff; color:#175cd3; border-color:#c7dffb; }
.rev-tag.rev-恢复, .rev-tag.rev-豁免 { background:#ecfdf5; color:#0f766e; border-color:#bfe9df; }
.rev-dict { list-style:none; margin:0; padding:0; display:grid; gap:6px; font-size:var(--fs-sm); color:#475467; line-height:1.6; }
.rev-dict b { color:#344054; }
@media (max-width:1180px) {
  .due-layout, .rev-layout { grid-template-columns:1fr; }
  .due-side, .rev-side { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
}
@media (max-width:720px) {
  .qa-body { width:min(300px, 86vw); }
  .due-wrap { overflow-x:auto; }
}

/* ---------- 抢单池 ---------- */
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pool-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: #fff; display: flex; flex-direction: column; gap: 7px; }
.pool-card.late { border-color: #fecdca; background: #fffbfa; }
.pool-card h3 { font-size:var(--fs-md); margin: 0; color: var(--navy); line-height: 1.4; }
.pool-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size:var(--fs-xs); }
.pool-meta { display: grid; gap: 3px; font-size:var(--fs-sm); color: #475467; line-height: 1.6; }
.pool-meta b { display: inline-block; min-width: 42px; color: var(--muted); font-weight: 500; }
.pool-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.pool-actions form { display: flex; align-items: center; gap: 6px; }

/* placeholder */
/* ============================================================
   统一视觉基线（字号 / 间距 / 焦点态）
   字号规范：10 极小标注 · 11 辅助 · 12 次级 · 13 正文 · 14 强调
             16 标题 · 18 卡片大数 · 20 指标 · 24 大屏主数
   任何新增样式请复用下列变量，不要再写 11.5px / 12.5px 这类半步字号。
   ============================================================ */
:root {
  --fs-2xs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 20px;
  --fs-3xl: 24px;
  --fs-hero: 30px;
  --control-h: 34px;
  --line-strong: #d5dce6;
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
table.data td, table.data th, .filters input, .filters select, input, select, textarea { font-size: var(--fs-base); }
.muted, .help-text, .table-foot, .site-foot { font-size: var(--fs-sm); }
:focus-visible { outline: 2px solid rgba(217,154,26,.55); outline-offset: 1px; border-radius: 4px; }

/* ---------- 顶栏：角色快捷指标 ---------- */
.top-tools { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.tool-div { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.quick-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 99px; background: #fff; color: #344054;
  font-size: var(--fs-sm); white-space: nowrap; transition: border-color .15s, background .15s;
}
.quick-chip svg.ic { width: 14px; height: 14px; color: #667085; }
.quick-chip:hover { border-color: var(--amber); background: #fffdf5; color: var(--navy); }
.quick-chip b { font-size: var(--fs-sm); font-weight: 750; color: #b42318; font-variant-numeric: tabular-nums; }
.quick-chip:hover b { color: #912018; }
@media (max-width: 1360px) { .quick-chip .qc-label { display: none; } .quick-chip { padding: 0 8px; } }
@media (max-width: 900px) { .quick-chip, .tool-div { display: none; } }

/* ---------- 侧栏：分组计数 / 展开收起 / 外链标记 ---------- */
.nav-cats { display: flex; gap: 6px; padding: 0 10px 6px; }
.nav-cat {
  flex: 1; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03);
  color: #9fb3c8; font-size: var(--fs-xs); padding: 3px 6px; border-radius: 6px; cursor: pointer;
}
.nav-cat:hover { color: #fff; border-color: rgba(230,197,90,.5); background: rgba(217,154,26,.12); }
.nav-block-h .g-count { font-size: var(--fs-2xs); color: #6f8599; letter-spacing: 0; font-weight: 400; margin-right: 2px; }
.nav-item .nav-ext { margin-left: auto; font-size: var(--fs-2xs); color: #6f8599; }
.nav-item:hover .nav-ext { color: var(--amber-2); }

/* ---------- 大屏与看板中心 ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hub-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 15px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  position: relative; overflow: hidden; transition: transform .16s, box-shadow .16s, border-color .16s;
}
.hub-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: rgba(217,154,26,.07); }
.hub-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(10,26,43,.12); border-color: #d8c391; color: var(--ink); }
.hub-card.tone-teal::after { background: rgba(15,118,110,.08); }
.hub-card.tone-blue::after { background: rgba(29,78,216,.08); }
.hub-top { display: flex; align-items: center; gap: 8px; }
.hub-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff6df; color: #9a6a0a; flex: 0 0 30px; }
.hub-ic svg.ic { width: 16px; height: 16px; }
.tone-teal .hub-ic { background: #ecfdf5; color: #0f766e; }
.tone-blue .hub-ic { background: #eff8ff; color: #175cd3; }
.hub-name { font-size: var(--fs-md); font-weight: 700; color: var(--navy); }
.hub-open { margin-left: auto; font-size: var(--fs-xs); color: #98a2b3; display: inline-flex; align-items: center; gap: 3px; }
.hub-open svg.ic { width: 11px; height: 11px; transform: rotate(135deg); }
.hub-card:hover .hub-open { color: var(--amber); }
.hub-card-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.hub-card-hit:focus-visible { outline: 2px solid var(--amber); outline-offset: -3px; }
.hub-desc { font-size: var(--fs-sm); color: #667085; line-height: 1.55; }
.hub-kpis { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line-2); margin-top: auto; position: relative; z-index: 2; }
.hub-kpis > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hub-kpis > .hub-kpi { display: flex; flex-direction: column; gap: 1px; min-width: 0; color: inherit; text-decoration: none; border-radius: 8px; padding: 2px 6px; margin: -2px -6px; position: relative; transition: background .15s ease; }
.hub-kpis > .hub-kpi:hover { background: rgba(10,26,43,.05); }
.hub-kpis > .hub-kpi:hover b { color: var(--amber); }
.hub-kpis > .hub-kpi::after { content: "↗"; font-size: var(--fs-2xs); color: #b8c0cc; position: absolute; }
.hub-kpis span { font-size: var(--fs-xs); color: #98a2b3; }
.hub-kpis b { font-size: var(--fs-lg); font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ---------- 弹层：最大化更彻底、留白更少 ---------- */
.modal-box.max { width: 97vw; height: 94vh; max-height: 94vh; }
.modal-box.max .modal-b { padding: 16px 18px; }
.modal-box.max .modal-h { padding: 10px 16px; }
.modal-tools [data-max-toggle] { font-size: var(--fs-md); line-height: 1; }
.modal-tools [data-max-toggle].on { background: #fff8e6; border-color: var(--amber); color: #9a6a0a; }
.modal-b > :last-child { margin-bottom: 0; }

/* ---------- 返回按钮：子页面始终可见 ---------- */
.back-btn { color: var(--navy); }
.back-btn:hover { color: var(--amber); }

/* ---------- 懒加载占位（避免图片撑开抖动） ---------- */
img[loading="lazy"] { background: #f2f4f7; }
img[loading="lazy"].loaded { background: transparent; }

/* ---------- 表格：大数据量渲染优化 ---------- */
/* ---------- 移动端通用组件（考勤 / 快速报修） ---------- */
.m-hero-card { background: linear-gradient(140deg,#0d3050 0%,#17496a 58%,#1d5f80 100%); border-radius: 16px; color: #eaf2fb; padding: 14px; margin-bottom: 12px; box-shadow: 0 10px 24px rgba(13,48,80,.18); }
.m-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.m-hero-kicker { display: block; font-size: var(--fs-2xs); color: #a9c1d7; letter-spacing: .08em; }
.m-hero-num { display: block; font-size:var(--fs-hero); font-weight: 750; color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
.m-hero-sub { display: block; font-size: var(--fs-2xs); color: #a9c1d7; }
.m-hero-ring { width: 62px; height: 62px; border-radius: 50%; border: 3px solid rgba(255,255,255,.22); display: grid; place-items: center; font-size: var(--fs-2xs); color: #cfe0ef; text-align: center; }
.m-hero-ring.on { border-color: #f2b544; color: #fff; }
.m-hero-ring.ok { border-color: #3fbf87; color: #fff; }
.m-hero-pills { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.m-hero-pills span { flex: 1; text-align: center; font-size: var(--fs-2xs); color: #cfe0ef; background: rgba(255,255,255,.07); border-radius: 8px; padding: 5px 2px; }

.m-sec-title { font-size: var(--fs-sm); font-weight: 650; color: #17395c; margin: 12px 2px 8px; }
.m-stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.m-btn-row { display: flex; gap: 8px; margin-top: 4px; }

.m-seg { display: flex; gap: 6px; }
.m-seg label { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 8px 4px; font-size: var(--fs-sm); background: #fff; color: #475467; cursor: pointer; }
.m-seg label.on { border-color: var(--amber); background: #fff8e6; color: #9a6a0a; font-weight: 650; }
.m-seg input { position: absolute; opacity: 0; pointer-events: none; }

.m-list { display: flex; flex-direction: column; gap: 7px; }
.m-list-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.m-list-main { min-width: 0; }
.m-list-main b { display: block; font-size: var(--fs-sm); color: #17395c; }
.m-list-main span { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.m-list-side { text-align: right; flex-shrink: 0; }
.m-list-side em { display: block; font-style: normal; font-size: var(--fs-md); font-weight: 700; color: #475467; font-variant-numeric: tabular-nums; }
.m-list-side em.ok { color: #0f7b4f; }

.table-wrap.long { content-visibility: auto; contain-intrinsic-size: 800px; }

/* ---------- 移动端顶部说明/操作 ---------- */
@media (max-width: 900px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar h1 { font-size: var(--fs-md); }
  .top-search { display: none; }
  .content { padding: 10px 10px 24px; }
  .hub-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   一级导航「数据分析」通用版式（每域一套，结构一致）
   ============================================================ */
.domain-head { align-items: flex-start; }
.domain-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.domain-facts span {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 9px;
  border: 1px solid var(--line); border-radius: 99px; background: #fbfcfe; font-size: var(--fs-xs); color: var(--muted);
}
.domain-facts i { font-style: normal; }
.domain-facts b { color: var(--navy); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.domain-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.domain-kpis .kpi { transition: border-color .15s, transform .15s, box-shadow .15s; }
.domain-kpis a.kpi:hover { border-color: #d8c391; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(10,26,43,.08); }
.domain-kpis .kpi b { font-size: var(--fs-2xl); }
.domain-charts { margin-bottom: 12px; }
.domain-charts .card, .domain-tables .card { content-visibility: auto; contain-intrinsic-size: 260px; }
.domain-trend { margin-bottom: 12px; }
.domain-legend { display: flex; gap: 16px; font-size: var(--fs-xs); color: var(--muted); margin: 2px 0 10px; }
.domain-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.domain-legend i.d1, .domain-columns .dc-bars i.d1 { background: linear-gradient(180deg, #2a7f78, #5fb3a8); }
.domain-legend i.d2, .domain-columns .dc-bars i.d2 { background: linear-gradient(180deg, #d99a1a, #f0bb45); }
.domain-columns {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(56px, 1fr); gap: 10px;
  align-items: end; min-height: 150px; overflow-x: auto; padding-bottom: 2px;
}
.domain-columns .dc-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.domain-columns .dc-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 112px; }
.domain-columns .dc-bars i { width: 42%; max-width: 22px; border-radius: 4px 4px 2px 2px; min-height: 3px; transition: opacity .15s; }
.domain-columns .dc-col:hover .dc-bars i { opacity: .82; }
.domain-columns .dc-val { font-size: var(--fs-2xs); color: #475467; font-variant-numeric: tabular-nums; white-space: nowrap; }
.domain-columns .dc-lab { font-size: var(--fs-xs); color: var(--muted); }
.domain-tables { margin-bottom: 12px; }
.domain-tables tr.clickable { cursor: pointer; }
.domain-tables tr.clickable:hover td { background: #fbfcfe; }
.domain-bottom { margin-bottom: 10px; }
.domain-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.domain-shortcuts a {
  display: flex; align-items: center; gap: 7px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: #344054; font-size: var(--fs-sm); transition: .15s;
}
.domain-shortcuts a:hover { border-color: var(--amber); background: #fffdf7; color: var(--navy); transform: translateY(-1px); }
.domain-shortcuts svg.ic { width: 15px; height: 15px; color: #667085; flex: 0 0 15px; }
.domain-insights { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.domain-insights li { font-size: var(--fs-sm); color: #344054; line-height: 1.7; }
.domain-insights li::marker { color: var(--amber); }

/* 数字统一使用等宽数字，表格与指标对齐更稳 */
.kpi b, .scr-kpi b, table.data td.num, table.data td.right, .dc-val, .table-foot b { font-variant-numeric: tabular-nums; }
/* 表格行可点击 */
tr[data-href] { cursor: pointer; }

@media (max-width: 980px) {
  .domain-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .domain-columns { gap: 8px; }
  .domain-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .domain-head .ph-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .domain-kpis .kpi b { font-size: var(--fs-xl); }
  .domain-columns .dc-bars { height: 96px; }
}
@media print {
  .domain-head .ph-actions, .domain-shortcuts, .topbar, .sidebar, .site-foot { display: none !important; }
  .domain-charts .card, .domain-tables .card, .domain-trend { break-inside: avoid; content-visibility: visible; }
}

/* ============================================================
   H5 移动端：数据看板 / 全部模块 / 通用可用性
   ============================================================ */
.m-dash-hero {
  border-radius: 16px; padding: 14px 14px 12px; margin-bottom: 10px; color: #eaf2fb;
  background: radial-gradient(420px 200px at 100% 0%, rgba(240,187,69,.28), transparent 62%),
              linear-gradient(140deg, #0b2237 0%, #123a56 55%, #14506a 100%);
  box-shadow: 0 12px 26px rgba(10,26,43,.18);
}
.mdh-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mdh-kicker { font-size: var(--fs-2xs); letter-spacing: .12em; color: #a9c1d7; }
.mdh-role { font-size: var(--fs-xs); color: #0b2237; background: #e6c55a; border-radius: 99px; padding: 2px 9px; font-weight: 700; }
.mdh-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 8px; }
.mdh-main b { display: block; font-size: var(--fs-xl); letter-spacing: -.01em; }
.mdh-main span { display: block; font-size: var(--fs-xs); color: #b8cde0; margin-top: 2px; }
.mdh-refresh { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #eaf2fb; background: rgba(255,255,255,.12); font-size: var(--fs-lg); flex: 0 0 34px; }
.mdh-refresh:active { background: rgba(255,255,255,.22); }
.mdh-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.14); }
.mdh-pills > span { display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(255,255,255,.06); border-radius: 9px; padding: 5px 2px; }
.mdh-pills i { font-style: normal; font-size: var(--fs-2xs); color: #b8cde0; }
.mdh-pills b { font-size: var(--fs-md); color: #fff; font-variant-numeric: tabular-nums; }
.mdh-pills b.hot { color: #ffb4a8; }

.m-kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-kpi {
  display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); min-height: 82px;
  transition: transform .14s, border-color .14s;
}
.m-kpi:active { transform: scale(.985); border-color: #d8c391; }
.m-kpi span { font-size: var(--fs-xs); color: var(--muted); }
.m-kpi b { font-size: var(--fs-2xl); line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }
.m-kpi i { font-style: normal; font-size: var(--fs-2xs); color: #98a2b3; }
.m-kpi.amber b { color: #9a6a0a; }
.m-kpi.teal b { color: var(--teal); }
.m-kpi.red { border-color: #fecdca; background: #fffbfa; }
.m-kpi.red b { color: var(--danger); }
.m-kpi.blue b { color: var(--blue); }

.m-chart-card { margin-top: 10px; }
.m-chart-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.m-chart-h b { font-size: var(--fs-md); color: #17395c; }
.m-chart-h span { font-size: var(--fs-2xs); color: var(--muted); }
.m-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; align-items: end; height: 132px; margin: 12px 0 4px; }
.mc-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.mc-col i {
  position: relative; display: block; width: 68%; max-width: 26px; min-height: 4px;
  border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #f0bb45, #d99a1a);
}
.mc-col i em { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9px; color: #667085; white-space: nowrap; }
.mc-col span { font-size: var(--fs-2xs); color: var(--muted); }
.m-chart-foot { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line-2); margin-top: 4px; }
.m-chart-foot a { flex: 1; min-width: 88px; text-align: center; font-size: var(--fs-xs); color: #475467; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; }

.m-list .m-list-row { display: flex; align-items: center; gap: 9px; padding: 10px 11px; min-height: 56px; }
.ml-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 32px; background: #f2f4f7; color: #475467; }
.ml-ic.red { background: #fef3f2; color: #b42318; }
.ml-ic.amber { background: #fff8e6; color: #9a6a0a; }
.ml-ic.teal { background: #ecfdf5; color: #0f766e; }
.ml-ic.blue { background: #eff8ff; color: #175cd3; }
.ml-ic svg.ic { width: 16px; height: 16px; }

/* 全部模块 */
.m-mod-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 10px; }
.m-mod-head b { display: block; font-size: var(--fs-lg); color: #17395c; }
.m-mod-head span { display: block; font-size: var(--fs-xs); color: var(--muted); }
.m-mod-search { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; height: 40px; margin-bottom: 12px; }
.m-mod-search svg.ic { width: 16px; height: 16px; color: #98a2b3; }
.m-mod-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: var(--fs-base); background: transparent; }
.m-mod-group { margin-bottom: 14px; }
.m-mod-group-h { display: flex; align-items: center; gap: 7px; margin: 0 2px 7px; }
.mg-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: #f2f4f7; color: #475467; }
.mg-ic svg.ic { width: 14px; height: 14px; }
.m-mod-group-h b { font-size: var(--fs-md); color: #17395c; }
.m-mod-group-h em { margin-left: auto; font-style: normal; font-size: var(--fs-2xs); color: var(--muted); }
.m-mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-mod-tile {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 9px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px; color: #344054;
}
.m-mod-tile:active { border-color: #d8c391; background: #fffdf7; }
.mt-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #f8fafc; color: #475467; flex: 0 0 28px; }
.mt-ic svg.ic { width: 15px; height: 15px; }
.m-mod-tile b { font-size: var(--fs-sm); color: #17395c; font-weight: 650; min-width: 0; }
.mt-tag { position: absolute; top: 5px; right: 6px; font-style: normal; font-size: 9px; line-height: 14px; padding: 0 5px; border-radius: 99px; background: #fff6df; color: #9a6a0a; }
.mt-tag.ghost { background: #f2f4f7; color: #98a2b3; }

/* 移动端通用可点区域与横向表格 */
.m-body { padding-left: 12px; padding-right: 12px; }
@media (max-width: 560px) {
  .m-body { padding-left: 10px; padding-right: 10px; }
  .m-mod-grid { gap: 7px; }
  .m-kpi { min-height: 78px; }
}
.table-wrap { -webkit-overflow-scrolling: touch; }
.m-shell .table-wrap table.data { min-width: 620px; }

/* ---------- 顶栏演示岗位切换 / 通用搜索隐藏 ---------- */
.icon-btn.demo-switch {
  width: auto; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-sm); font-weight: 650; color: #8a5b00;
  border-color: #f0dcb0; background: #fffaf0;
}
.icon-btn.demo-switch svg.ic { width: 16px; height: 16px; }
.icon-btn.demo-switch:hover { background: #fff3d8; border-color: #e6c55a; }
.hide-by-search { display: none !important; }
@media (max-width: 1180px) { .demo-switch .hide-sm { display: none; } }

/* ---------- 移动端分域分析 ---------- */
.ma-hero { background: radial-gradient(120% 120% at 0% 0%, #17395c 0%, #0a1a2b 60%, #071421 100%); color: #fff; border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.ma-kicker { display: block; font-size: var(--fs-2xs); letter-spacing: .08em; color: #e7c26a; margin-bottom: 5px; }
.ma-hero > b { display: block; font-size: var(--fs-xl); line-height: 1.25; }
.ma-hero p { margin: 6px 0 0; font-size: var(--fs-xs); line-height: 1.55; color: #c9d4e2; }
.ma-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 11px; }
.ma-pills span { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; padding: 7px 8px; min-width: 0; }
.ma-pills i { display: block; font-style: normal; font-size: var(--fs-2xs); color: #a9b8c9; }
.ma-pills b { display: block; font-size: var(--fs-base); color: #fff; margin-top: 1px; font-variant-numeric: tabular-nums; }
.ma-hero-detail { padding-bottom: 12px; }
.ma-extra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ma-extra span { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 8px; border-radius: 99px; background: rgba(231,194,106,.13); border: 1px solid rgba(231,194,106,.25); }
.ma-extra i { font-style: normal; font-size: var(--fs-2xs); color: #c9d4e2; }
.ma-extra b { font-size: var(--fs-xs); color: #f0d290; }

.ma-domain-grid { display: grid; gap: 8px; }
.ma-domain-card { display: flex; align-items: center; gap: 9px; padding: 11px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: #344054; }
.ma-domain-card:active { border-color: #d8c391; background: #fffdf7; }
.ma-dc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff8e6; color: #9a6a0a; flex: 0 0 34px; }
.ma-dc-ic svg.ic { width: 17px; height: 17px; }
.ma-dc-body { min-width: 0; flex: 1; }
.ma-dc-body b { display: block; font-size: var(--fs-sm); color: #17395c; }
.ma-dc-body i { display: block; font-style: normal; font-size: var(--fs-2xs); color: #98a2b3; margin-top: 2px; line-height: 1.45; }
.ma-domain-card em { font-style: normal; color: #98a2b3; font-size: 18px; }

.ma-insight { border-left: 3px solid #e0b24b; }
.ma-insight ul { margin: 6px 0 0; padding-left: 16px; }
.ma-insight li { font-size: var(--fs-xs); line-height: 1.6; color: #475467; margin-bottom: 5px; }
.ma-insight li:last-child { margin-bottom: 0; }
.ma-legend { display: flex; gap: 10px; margin-top: 6px; }
.ma-legend span { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-2xs); color: #667085; }
.ma-legend i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.ma-legend i.d1, .ma-dual i.d1 { background: linear-gradient(180deg, #f0bb45, #d99a1a); }
.ma-legend i.d2, .ma-dual i.d2 { background: linear-gradient(180deg, #9fd8d2, #2f8f86); }
.ma-chart-dual { height: 142px; margin-top: 8px; }
.ma-dual { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 100%; }
.ma-dual i { position: static; width: 28%; max-width: 12px; min-height: 4px; border-radius: 4px 4px 2px 2px; }
.ma-val { font-style: normal; font-size: var(--fs-2xs); color: #667085; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ma-bars { display: grid; gap: 8px; margin-top: 7px; }
.ma-bar { display: grid; grid-template-columns: minmax(58px, 1fr) 1.6fr 30px; align-items: center; gap: 8px; color: #475467; }
.ma-bar > span { font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-bar .track { display: block; height: 7px; border-radius: 99px; background: #f2f4f7; overflow: hidden; }
.ma-bar .track em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e0b24b, #c58c12); }
.ma-bar > b { font-size: var(--fs-xs); text-align: right; color: #17395c; font-variant-numeric: tabular-nums; }
.ma-table { min-width: 540px !important; }
.ma-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ma-shortcuts a { display: flex; align-items: center; gap: 7px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: var(--fs-xs); color: #344054; }
.ma-shortcuts a svg.ic { width: 15px; height: 15px; color: #9a6a0a; flex: 0 0 15px; }
.ma-sources b { font-size: var(--fs-sm); color: #17395c; }
.ma-sources p { margin: 5px 0 8px; font-size: var(--fs-2xs); color: #98a2b3; line-height: 1.5; }
.ma-foot-links { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.ma-foot-links a { font-size: var(--fs-xs); color: #175cd3; }
@media (max-width: 360px) {
  .ma-bar { grid-template-columns: minmax(48px, 1fr) 1.4fr 26px; gap: 6px; }
  .ma-shortcuts { grid-template-columns: 1fr; }
}


/* ===== 状态色（对齐工单体系，主色由文末浅色壳层接管） ===== */
:root {
  --accent: #00a86a;
  --accent-2: #0d9488;
  --accent-soft: #e6f8f1;
  --brand: #0f766e;
  --sidebar-bg: #ffffff;
  --sidebar-active: #00c17c;
  --ok: #1b7a4e;
  --warn: #b45309;
  --danger: #b91c1c;
}
.tag-ok { background: #dcfce7; color: #166534; }
.tag-warn { background: #ffedd5; color: #9a3412; }
.tag-muted { background: #f1f5f9; color: #475569; }
.tag-info { background: #e0f2fe; color: #075985; }
.tag-danger { background: #fee2e2; color: #991b1b; }
.metric-card.danger { border-top-color: #b91c1c; }
.overspend { background: #fef2f2 !important; color: #991b1b; font-weight: 600; }

/* ===== 壳层接线补强 ===== */
.menu-wrap { position: relative; }
.menu-wrap .menu { right: 0; left: auto; max-height: 70vh; overflow: auto; }
.menu .menu-hint, .menu .menu-empty { padding: 8px 10px; font-size: var(--fs-sm); }
.menu .menu-role-form { margin: 0; }
.menu .menu-role-form button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; cursor: pointer;
  font: inherit; color: #344054; text-align: left;
}
.menu .menu-role-form button:hover, .menu .menu-role-form button.on { background: #f4f7fb; }
.quick-chip b {
  min-width: 16px; height: 16px; padding: 0 5px; border-radius: 99px; background: #b42318; color: #fff;
  font-size: var(--fs-2xs); display: inline-grid; place-items: center;
}
.nav-search-wrap { padding: 6px 10px 4px; }
.nav-search {
  width: 100%; height: 30px; border-radius: 7px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color: #e8f1f8; padding: 0 10px; font-size: var(--fs-sm);
}
.nav-search::placeholder { color: #8fa3b8; }
.page-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.drawer {
  position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.35);
  display: flex; justify-content: flex-end;
}
.drawer[hidden] { display: none !important; }
.drawer-box {
  width: min(380px, 92vw); height: 100%; background: #fff; box-shadow: -12px 0 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column; transition: width .15s ease;
}
.drawer-box.max, .drawer.max > .drawer-box, .drawer.max {
  width: min(920px, 96vw);
}
.drawer-tools { display: inline-flex; gap: 4px; align-items: center; }
.drawer-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.drawer-b { padding: 14px 16px 24px; overflow: auto; flex: 1; }
.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.45);
  display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px;
}
.modal-open { overflow: hidden; }
.qr-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.qr-box { width: 168px; height: 168px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; }
.qr-box img { display: block; border-radius: 6px; }
.qr-meta { flex: 1; min-width: 200px; display: grid; gap: 10px; }
.help-list { margin: 8px 0 0; padding-left: 1.1em; color: #475467; font-size: var(--fs-sm); line-height: 1.7; }

/* 投屏大屏 — 对齐算数工单浅色决策页 */
.screen-body {
  margin: 0; min-height: 100vh;
  background: #f6f8f9;
  color: #1a1a1a;
}
.screen-wrap {
  padding: 16px 18px 20px;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}
.screen-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px 16px;
}
.screen-head h1 {
  margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #111827; letter-spacing: .01em;
}
.screen-head .screen-sub { margin: 0; color: #666; font-size: 12px; line-height: 1.5; }
.screen-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.screen-actions .btn {
  background: #fff !important; color: #3d4f45 !important; border: 1px solid #e8e8e8 !important;
  border-radius: 6px !important; height: 30px; padding: 0 10px; font-size: 12px;
}
.screen-actions .btn:hover {
  background: rgba(0,193,124,.12) !important; border-color: rgba(0,168,106,.45) !important; color: #0f766e !important;
}
.screen-actions .btn.on {
  background: #00c17c !important; border-color: #00c17c !important; color: #fff !important;
}
.screen-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.screen-kpi {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 12px;
  padding: 14px 16px; color: inherit; text-decoration: none; min-height: 84px;
  box-shadow: 0 4px 14px rgba(0,0,0,.03); transition: border-color .15s, transform .12s;
}
.screen-kpi:hover { border-color: #c5d4cc; transform: translateY(-1px); }
.screen-kpi span { display: block; color: #666; font-size: 12px; }
.screen-kpi b {
  display: block; margin-top: 8px; font-size: 24px; font-weight: 700;
  color: #111827; letter-spacing: -.02em; line-height: 1.15;
}
.screen-kpi.warn b { color: #d97706; }
.screen-kpi.risk b { color: #e5484d; }
.screen-kpi.ok b { color: #00a86a; }
.screen-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; flex: 1; align-items: stretch;
}
.screen-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.screen-one { min-height: 0; }
.screen-card {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 12px;
  padding: 12px 14px 10px; display: flex; flex-direction: column; min-height: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.03);
}
.screen-card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.screen-card h3 {
  margin: 0; font-size: 14px; font-weight: 700; color: #152018;
}
.screen-card .more {
  font-size: 12px; color: #00a86a; text-decoration: none; white-space: nowrap;
}
.screen-card .more:hover { color: #0f766e; text-decoration: underline; }
.screen-card .screen-table-wrap { flex: 1; overflow: auto; }
.screen-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.screen-card th, .screen-card td {
  padding: 8px 6px; border-bottom: 1px solid #eef1f2; text-align: left; vertical-align: middle;
}
.screen-card thead th {
  background: #f3faf7; color: #1a1a1a; font-weight: 600; font-size: 12px;
  position: sticky; top: 0;
}
.screen-card tbody tr:hover td { background: rgba(0,168,106,.05); }
.screen-card a { color: #00a86a; font-weight: 600; text-decoration: none; }
.screen-card a:hover { color: #0f766e; text-decoration: underline; }
.screen-card .muted, .screen-foot {
  margin: 8px 0 0; color: #666; font-size: 12px;
}
.screen-alerts {
  display: grid; gap: 8px; margin-bottom: 10px;
}
.screen-alert {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 8px; background: #f7fbf8; border: 1px solid #d7e3dc;
  color: #152018; text-decoration: none; font-size: 13px;
}
.screen-alert:hover { border-color: rgba(0,168,106,.45); background: rgba(0,168,106,.08); }
.screen-alert b { color: #00a86a; }
.screen-alert.risk { background: #fff5f5; border-color: #f3c1c1; }
.screen-alert.risk b { color: #e5484d; }
.screen-badge {
  display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 11px;
  background: #f1f5f9; color: #475569;
}
.screen-badge.warn { background: #ffedd5; color: #9a3412; }
.screen-badge.ok { background: #dcfce7; color: #166534; }
@media (max-width: 980px) {
  .screen-kpis { grid-template-columns: repeat(2, 1fr); }
  .screen-grid, .screen-grid-3 { grid-template-columns: 1fr; }
}

/* 分析页 KPI */
.analytics-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.analytics-kpis a.kpi, .analytics-kpis .kpi {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px 14px;
  text-decoration: none; color: inherit; box-shadow: 0 4px 14px rgba(0,0,0,.03);
}
.analytics-kpis a.kpi span { display: block; color: #666; font-size: 12px; }
.analytics-kpis a.kpi b { display: block; margin-top: 6px; font-size: 22px; font-weight: 700; color: #111827; }
.analytics-kpis a.kpi:hover { border-color: #c5d4cc; }
@media (max-width: 900px) { .analytics-kpis { grid-template-columns: repeat(2, 1fr); } }

/* H5 底栏 */
.m-shell { max-width: 480px; margin: 0 auto; padding: 12px 12px 72px; min-height: 100vh; background: #e8eef2; }
.m-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  max-width: 480px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom);
}
.m-tabbar a {
  flex: 1; text-align: center; padding: 8px 4px; font-size: var(--fs-xs); color: #64748b; text-decoration: none;
}
.m-tabbar a.on { color: #0e4d66; font-weight: 650; }
.m-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(11,58,77,.08); }
.m-bal { font-size: var(--fs-3xl); font-weight: 750; color: #0b3a4d; }
.toolbar-io { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.related-block { margin-top: 14px; }
.related-block .card { padding: 12px 14px; }

/* ============================================================
   中式业财后台习惯（密度 / 查询区 / 操作列 / 金额右齐）
   对齐国内 ERP/OA：信息偏密、查询在上、操作在右、状态色标
   ============================================================ */
body.app-body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}
.content { padding: 12px 16px 20px; max-width: none; }
.page-head {
  margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2);
  align-items: center;
}
.page-head .ph-text h2 { font-size: 16px; font-weight: 700; color: #0b3a4d; margin: 0 0 2px; }
.page-head .ph-text p { font-size: 12px; color: #667085; margin: 0; line-height: 1.5; }
.page-head .ph-actions { gap: 6px; }
.page-toolbar { margin-bottom: 8px; }

/* 查询条件区：灰底条 + 标签 + 查询/重置 */
.filters, form.filters, .query-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px;
  margin: 0 0 10px; padding: 10px 12px;
  background: #f5f7fa; border: 1px solid #e4e7ed; border-radius: 4px;
}
.filters .f, .query-bar .f { min-width: 140px; margin: 0; }
.filters .f .lab, .query-bar .f .lab {
  display: block; margin-bottom: 3px; font-size: 12px; color: #606266; line-height: 1.2;
}
.filters input, .filters select, .query-bar input, .query-bar select {
  min-height: 32px; border-radius: 4px; border-color: #dcdfe6;
}
.filters .btn, .query-bar .btn { min-height: 32px; border-radius: 4px; padding: 0 14px; }
.btn { border-radius: 4px; padding: 6px 14px; font-weight: 500; }
.btn.sm { border-radius: 4px; padding: 3px 10px; }
.btn.primary, .btn-primary { background: #1a6b8a !important; border: 1px solid #1a6b8a; }
.btn.ghost { border-radius: 4px; }

/* 表格：更密、表头深一点、操作列固定右侧 */
.card { border-radius: 4px; box-shadow: none; border: 1px solid #e4e7ed; }
.table-wrap { border: 1px solid #ebeef5; border-radius: 4px; background: #fff; }
table.data { font-size: 13px; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid #ebeef5; }
table.data th {
  background: #f5f7fa; color: #606266; font-weight: 600; font-size: 12px;
  border-bottom: 1px solid #e4e7ed;
}
table.data tbody tr:hover td { background: #f0f9ff; cursor: pointer; }
table.data td.num, table.data th.num,
table.data td.money, table.data th.money {
  text-align: right; font-variant-numeric: tabular-nums; font-family: Consolas, "Courier New", monospace;
}
table.data th.ops, table.data td.ops {
  text-align: center; white-space: nowrap; position: sticky; right: 0;
  background: #fff; box-shadow: -4px 0 8px rgba(0,0,0,.04); z-index: 2;
}
table.data th.ops { background: #f5f7fa; z-index: 3; }
table.data td.ops a, table.data td.ops .btn { margin: 0 2px; }
table.data td.ops .link-btn { color: #1a6b8a; padding: 0 4px; }
.badge, .tag {
  border-radius: 2px; padding: 1px 6px; font-size: 12px; font-weight: 500;
}

/* 顶栏：少胶囊感，偏工具条 */
.topbar { height: 48px; padding: 0 14px; }
.topbar h1 { font-size: 15px; font-weight: 650; color: #0b3a4d; }
.quick-chip {
  border-radius: 4px; height: 28px; background: #f5f7fa; border-color: #dcdfe6;
}
.quick-chip b {
  border-radius: 2px; min-width: 16px; height: 16px; background: #f56c6c;
}

/* 表单：标签在上、控件直角一点 */
label.f > span.lab, label.field > span { color: #606266; font-size: 12px; }
input, select, textarea { border-radius: 4px; border-color: #dcdfe6; min-height: 32px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #1a6b8a; box-shadow: 0 0 0 2px rgba(26,107,138,.12);
}
.form-actions {
  display: flex; gap: 8px; justify-content: flex-start; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid #ebeef5;
}
.form-actions .btn.primary { min-width: 88px; }

/* 侧栏文案更像国内后台 */
.nav-search { border-radius: 4px; }
.sidebar nav a.nav-item { border-radius: 4px; padding: 7px 10px 7px 12px; }
.nav-block-h { letter-spacing: .06em; }

/* 金额强调色：收入绿、支出/透支红（国内财务习惯） */
.amt-in { color: #067647; }
.amt-out, .amt-debt { color: #b42318; }
.amt-zero { color: #98a2b3; }

/* ============================================================
   对齐「算数·工单」清爽浅色壳层（白侧栏 / 绿强调 / 轻阴影）
   ============================================================ */
:root {
  --xh-bg: #f6f8f9;
  --xh-panel: #fff;
  --xh-border: #e8e8e8;
  --xh-border-soft: #eef1f2;
  --xh-text: #1a1a1a;
  --xh-muted: #666;
  --xh-green: #00c17c;
  --xh-green-2: #00a86a;
  --xh-green-soft: rgba(0, 193, 124, .12);
  --xh-sider-w: 220px;
  --navy: #0f766e;
  --navy-2: #0d9488;
  --bg: var(--xh-bg);
  --ink: var(--xh-text);
  --muted: var(--xh-muted);
  --line: var(--xh-border);
  --line-2: var(--xh-border-soft);
  --teal: #0d9488;
  --primary: #00a86a;
  --radius: 8px;
}
body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--xh-bg);
  color: var(--xh-text);
  font-size: 13px;
}
a { color: var(--xh-green-2); }
a:hover { color: #0f766e; }

/* 壳层：白侧栏 */
.sidebar {
  width: var(--xh-sider-w) !important;
  flex-basis: var(--xh-sider-w) !important;
  background: #fff !important;
  color: #3d4f45 !important;
  border-right: 1px solid var(--xh-border);
  box-shadow: 1px 0 0 rgba(0,0,0,.02);
}
.sidebar-head {
  border-bottom: 1px solid var(--xh-border-soft) !important;
  padding: 14px 12px !important;
}
.brand strong { color: #111827 !important; font-size: 15px !important; }
.brand-copy > span { color: #7a8a80 !important; font-size: 11px !important; letter-spacing: .02em !important; }
.sidebar-head .side-toggle {
  color: #5b6a60 !important;
  border-color: var(--xh-border) !important;
  background: #fff !important;
}
.sidebar-head .side-toggle:hover { background: var(--xh-green-soft) !important; color: #0f766e !important; }
.nav-search, .nav-search-wrap .nav-search {
  background: #f7fbf8 !important;
  border: 1px solid var(--xh-border) !important;
  color: #3d4f45 !important;
}
.nav-search::placeholder { color: #9aa8a0 !important; }
.sidebar nav a.nav-item, .nav-home {
  color: #3d4f45 !important;
  border-radius: 4px !important;
}
.sidebar nav a.nav-item:hover, .nav-home:hover {
  background: var(--xh-green-soft) !important;
  color: #152018 !important;
}
.sidebar nav a.nav-item.on, .sidebar nav a.nav-item.active,
.nav-home.on, .nav-home.active {
  background: var(--xh-green) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
.sidebar nav a.nav-item.on svg, .nav-home.on svg { color: #fff !important; }
.nav-block-h {
  color: #7a8a80 !important;
  letter-spacing: .06em !important;
  font-size: 12px !important;
}
.user-box, .sidebar-foot {
  border-top: 1px solid var(--xh-border-soft);
  color: #3d4f45 !important;
  background: #fff !important;
}
.user-box .name { color: #111827 !important; }
.user-box .role, .role-chip {
  color: #0f766e !important;
  border-color: rgba(13,148,136,.28) !important;
}
.user-links a { color: #5b6a60 !important; }
.user-links a:hover { color: var(--xh-green-2) !important; }

body.nav-collapsed .sidebar { width: 64px !important; flex-basis: 64px !important; }

/* 顶栏 */
.topbar {
  height: 48px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--xh-border-soft) !important;
  box-shadow: none !important;
}
.topbar .page-title, .crumb .current { color: var(--xh-green-2) !important; }
.quick-chip {
  background: #fff !important;
  border: 1px solid var(--xh-border) !important;
  color: #3d4f45 !important;
  border-radius: 6px !important;
}
.quick-chip:hover, .quick-chip.on {
  border-color: rgba(0,168,106,.45) !important;
  background: var(--xh-green-soft) !important;
  color: #0f766e !important;
}
.quick-chip b { background: var(--xh-green) !important; color: #fff !important; }

/* 主色按钮 / 分页 */
.btn.primary, .btn-primary {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #fff !important;
}
.btn.primary:hover, .btn-primary:hover {
  background: #0f766e !important;
  border-color: #0f766e !important;
}
.btn.ghost { border-radius: 6px; }
.pager .pg.on, .pager .on { background: #0d9488 !important; border-color: #0d9488 !important; }

/* 卡片 / 表头 / KPI */
.card, .metric-card, .hub-card {
  border: 1px solid var(--xh-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.04) !important;
}
table.data thead th, .xh-table thead th {
  background: #f3faf7 !important;
  color: #1a1a1a !important;
  border-bottom: 1px solid var(--xh-border) !important;
}
.page-head h2, .page-head h1 { color: #111827 !important; }
.query-bar {
  background: #fff !important;
  border: 1px solid var(--xh-border) !important;
  border-radius: 8px !important;
}
.metric-card { border-top: 3px solid #00a86a !important; }

/* 登录：对齐工单浅色双栏 */
.login-page.cn-login.xh-login,
.login-page.xh-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(900px 520px at 18% 12%, rgba(0, 193, 124, .22), transparent 58%),
    radial-gradient(700px 480px at 88% 78%, rgba(16, 185, 129, .16), transparent 55%),
    linear-gradient(145deg, #e8f5ef 0%, #f3faf6 42%, #eef6f2 100%);
  color: #1a1a1a;
}
.login-layout {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}
.login-box {
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px 28px;
  box-shadow: 0 18px 48px rgba(15, 40, 30, .12);
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login-logo img { border-radius: 10px; }
.login-brand { font-size: 20px; font-weight: 700; letter-spacing: .04em; color: #0f766e; }
.login-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: #111827; }
.login-sub { color: #6b7280; margin: 0 0 22px; font-size: 13px; }
.login-field { display: block; margin-bottom: 16px; }
.login-field span { display: block; color: #374151; margin-bottom: 7px; font-size: 13px; font-weight: 500; }
.login-field input {
  width: 100%; height: 40px; padding: 0 12px; background: #f8fafb;
  border: 1px solid #d1d5db; border-radius: 8px; color: #111827; font-size: 14px;
}
.login-field input:focus {
  outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.15); background: #fff;
}
.login-submit {
  width: 100%; height: 42px; margin-top: 6px; border-radius: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: .12em;
}
.login-mobile {
  margin-top: 16px; padding: 12px 14px; border: 1px dashed #b7d4c8;
  border-radius: 10px; background: #f4faf7; text-align: center;
}
.login-mobile-label { font-size: 12px; color: #5b6a60; margin-bottom: 6px; }
.login-mobile-url {
  display: block; color: #0d9488; font-size: 12px; font-weight: 600;
  word-break: break-all; line-height: 1.5; margin-top: 6px;
}
.login-mobile-acts { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.login-links {
  margin-top: 18px; text-align: center; color: #9ca3af; font-size: 13px;
  display: flex; justify-content: center; gap: 8px;
}
.login-links a { color: #0d9488; }
.login-roles {
  background: #fff; border: 1px solid #d7e3dc; border-radius: 14px;
  padding: 28px 24px 22px; box-shadow: 0 12px 36px rgba(15, 40, 30, .08);
}
.login-roles h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: #152018; }
.login-roles-tip { margin: 0 0 18px; color: #5b6a60; font-size: 13px; line-height: 1.5; }
.login-role-group-title {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; color: #7a8a80; margin-bottom: 10px;
}
.login-role-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.login-role-form { margin: 0; }
.login-role-card {
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 10px;
  border: 1px solid #d7e3dc; background: #f7fbf8; color: #152018; cursor: pointer;
}
.login-role-card:hover {
  border-color: rgba(0, 168, 106, .55); background: rgba(0, 168, 106, .08);
}
.login-role-card strong {
  display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-bottom: 4px;
}
.login-portal {
  font-style: normal; font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 999px; background: #e6f8f1; color: #0f766e;
}
.login-role-cred {
  display: block; font-size: 12px; color: #3d4f45; font-family: ui-monospace, Consolas, monospace; margin-bottom: 4px;
}
.login-role-card em { display: block; font-style: normal; font-size: 12px; color: #5b6a60; }
@media (max-width: 860px) {
  .login-layout { grid-template-columns: 1fr; max-width: 420px; }
  .login-role-grid { grid-template-columns: 1fr 1fr; }
}

/* 覆盖旧深色皮肤强制规则 */
.sidebar { background: #fff !important; }
body.skin-navy .sidebar,
body.skin-slate .sidebar { background: #fff !important; }
body.skin-navy .brand-mark,
body.skin-slate .brand-mark,
.brand-mark, .logo-mark { background: transparent !important; }
img.brand-mark { box-shadow: 0 2px 8px rgba(13, 122, 106, .18) !important; }

/* ===== 表格统一标准 v2 ===== */
/* 列表页 table.data 与详情页 table.table 统一观感：浅灰表头、紧凑行高、分隔线 */
table.data, table.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.table { font-size: 13px; }
table.data th, table.data td { padding: 7px 9px; text-align: left; vertical-align: middle; border-bottom: 1px solid #ebeef5; }
table.table th, table.table td { padding: 8px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid #ebeef5; }
table.data th, table.table th {
  background: #f3faf7; color: #1a1a1a; font-weight: 600; font-size: 12px;
  border-bottom: 1px solid #e4e7ed;
}
table.table thead th { position: sticky; top: 0; z-index: 1; }
table.data tbody tr:hover td, table.table tbody tr:hover td { background: #f0f9ff; }
/* 列表：默认单行 + 列宽上限，长文本列加 class="wrap" 才换行，避免行高被撑到 200px */
table.data td { white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
table.data td.wrap { white-space: normal; min-width: 200px; max-width: 34em; }
table.data td.clip { max-width: 16em; overflow: hidden; text-overflow: ellipsis; }
/* 数字列 */
table.data td.num, table.data th.num, table.data td.money, table.data th.money,
table.table td.num, table.table th.num, table.table td.money, table.table th.money {
  text-align: right; font-variant-numeric: tabular-nums; font-family: Consolas, "Courier New", monospace;
}
/* 操作列：只放紧凑文字按钮，永远单行；行内表单请用 data-quick-edit 弹层 */
table.data th.ops, table.data td.ops,
table.table th.ops, table.table td.ops {
  white-space: nowrap; text-align: center; width: 1%; padding-left: 10px; padding-right: 10px;
}
table.data td.ops .link-btn, table.table td.ops .link-btn,
table.data td.ops .btn.sm, table.table td.ops .btn.sm { margin: 0; padding: 0 8px; font-size: 13px; }
table.data td.ops .link-btn + .link-btn, table.table td.ops .link-btn + .link-btn { border-left: 1px solid #e4e7ed; }
table.data td.ops form, table.table td.ops form { display: inline; margin: 0; }
table.data td.ops .inline-form, table.table td.ops .inline-form {
  display: inline-flex; flex-wrap: nowrap; width: auto; gap: 6px; align-items: center;
}
table.data td.ops .inline-form input, table.data td.ops .inline-form select,
table.table td.ops .inline-form input, table.table td.ops .inline-form select { flex: 0 0 auto; }
/* 非操作列里的行内表单仍允许换行 */
td:not(.ops) .inline-form { flex-wrap: wrap; width: 100%; }
td:not(.ops) .inline-form input, td:not(.ops) .inline-form select { width: auto; min-width: 96px; flex: 1 1 96px; }
/* 快捷编辑弹层 */
.quick-form { display: grid; gap: 12px; }
.quick-form .qf-row { display: grid; gap: 5px; }
.quick-form label { font-size: 13px; color: #606266; }
.quick-form select, .quick-form input { height: 34px; }
.quick-form .qf-note { font-size: 12px; color: #909399; }

/* ===== 打印版式只作用于打印 ===== */
/* 之前 .print-page 在屏幕端也套了 A4 纸宽 820px，列表页被挤成半屏，
   表格只能换行或横向滚动——这是很多页面显得拥挤、难看的根因。 */
@media screen {
  .print-page:not(.screen-wrap) { max-width: none; margin: 0; padding: 0; }
  .print-toolbar { max-width: none; margin: 8px 0; }
  .print-page:not(.screen-wrap) th,
  .print-page:not(.screen-wrap) td { border: 0; border-bottom: 1px solid #ebeef5; padding: 7px 9px; }
  .print-page:not(.screen-wrap) th { background: #f5f7fa; }
}
@media print {
  .print-page { max-width: none; padding: 0; }
}

/* ===== 操作面板 / 子表单 ===== */
/* 批量动作区：标题 + 说明 + 按钮成组，避免按钮散落、右侧大片留白 */
.panel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.panel-head h3, .panel-head h4 { margin: 0; }
.panel-head .hint { color: #909399; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sub-panel { margin-top: 14px; padding: 12px 14px; border: 1px solid #eef1f5; background: #fafcfe; border-radius: 8px; }
.sub-panel-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 600; color: #303133; }
.sub-panel-h .hint { font-weight: 400; color: #909399; font-size: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 12px; align-items: end; }
.form-row .field { margin: 0; }
.form-row .field .lab { display: block; margin-bottom: 3px; font-size: 12px; color: #606266; }
.form-row .field select, .form-row .field input { width: 100%; min-height: 32px; }
.form-row .form-actions { display: flex; gap: 8px; align-items: center; }

/* ===== 列表打印增强 ===== */
@media print {
  /* 打印时去掉筛选条、操作按钮、分页与返回，纸面只留数据 */
  .query-bar, .filters, .ph-actions, .list-foot, .page-toolbar,
  .toolbar-io, .batch-bar, .no-print, .drawer, .modal, .toast-wrap { display: none !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .table-wrap { border: 0 !important; overflow: visible !important; }
  table.data, table.table { width: 100% !important; font-size: 10.5pt; }
  table.data thead, table.table thead { display: table-header-group; }
  table.data tr, table.table tr { break-inside: avoid; page-break-inside: avoid; }
  table.data td { white-space: normal !important; max-width: none !important; overflow: visible !important; }
  a { color: #000 !important; text-decoration: none !important; }
  .page-head h2 { font-size: 15pt; }
  .kpis, .analytics-kpis { break-inside: avoid; }
}

/* ===== 标题层级统一 ===== */
/* 之前部分页面用 <h1>、部分用 <h2>，字号差一档，肉眼很明显。统一到同一视觉层级。 */
.page-head h1, .page-head h2,
.page-head .ph-text h1, .page-head .ph-text h2 {
  font-size: 16px !important; font-weight: 700; line-height: 1.35;
  color: #0b3a4d; margin: 0 0 2px; letter-spacing: 0;
}
.page-head p, .page-head .ph-text p { font-size: 12px; line-height: 1.55; color: #667085; margin: 0; }
.card > h3, .card > h4,
.card > .card-h h3, .card > .card-h h4 {
  font-size: 14px; font-weight: 650; color: #1f2d3d; margin: 0 0 10px;
}
.card h4 { font-size: 13px; font-weight: 600; }
.section-title { font-size: 13px; }
/* 说明文字与标签统一 12px，避免同一行出现 11/12/13/14 四种字号 */
.muted, .ph-text p, .query-bar .lab, .filters .lab, .form .field > label,
label.f .lab, .modal-b p, .drawer-b p, .hint, .qf-note { font-size: 12px; }

/* ===== 跳转进度条 ===== */
.nav-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 9999;
  background: linear-gradient(90deg, #00a86a, #12b886, #f0bb45);
  box-shadow: 0 0 8px rgba(0,168,106,.5); opacity: 0;
  transition: width .22s ease, opacity .18s ease; pointer-events: none;
}
.nav-progress.on { opacity: 1; }

/* 长页面中远离视口的卡片延迟渲染，减少首屏布局开销（不动含表格的卡片，避免 sticky 表头异常） */
.sub-panel, .analytics-kpis, .kpi-row { content-visibility: auto; contain-intrinsic-size: auto 180px; }
@media print { .card, .sub-panel, .kpi, .kpi-row { content-visibility: visible; } }

/* ==========================================================
   视觉规范 v3
   目的：把散落的 badge / tag / due-chip / query-bar / table 收成一套
   1) 状态标签统一几何（圆角 4px、描边、同高同行、语义色）
   2) 查询条收成紧凑工具条（不再是一整条灰底空荡）
   3) 表格：表头更清晰、数字列贴紧、操作列留呼吸、悬停整行一致
   4) KPI 卡片同高同字号；空状态统一
   5) 详情页时间线 / 分节表单
   ========================================================== */
:root {
  --v3-border: #e5e9f0;
  --v3-border-2: #eef1f6;
  --v3-head: #f7f9fc;
  --v3-hover: #f6fafc;
  --v3-ink: #1f2937;
  --v3-ink-2: #5b6b7c;
  --v3-ink-3: #8a97a6;
  --v3-link: #0f766e;
}

/* ---------- 1. 状态标签：一套几何 ---------- */
.badge, .tag, .due-chip, .pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 7px;
  border-radius: 4px; border: 1px solid transparent;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  letter-spacing: 0; white-space: nowrap; vertical-align: middle;
  background: #f5f7fa; color: #475467; border-color: #e3e8ef;
}
.badge.ok, .badge.done, .badge.paid, .badge.pass,
.tag-ok, .due-chip.later, .due-chip.normal,
.pill.ok {
  background: #ecfdf3; color: #067647; border-color: #bbf0cf;
}
.badge.warn, .badge.pending, .badge.high, .badge.amber,
.tag-warn, .due-chip.today, .due-chip.d3, .due-chip.soon,
.pill.warn {
  background: #fffaeb; color: #8a5d07; border-color: #f5e0a9;
}
.badge.danger, .badge.overdue, .badge.fail, .badge.red,
.tag-danger, .due-chip.overdue, .pill.danger {
  background: #fef3f2; color: #b42318; border-color: #f7cdc8;
}
.badge.info, .badge.doing, .badge.active, .badge.blue,
.tag-info, .due-chip.d7, .pill.info {
  background: #eff8ff; color: #175cd3; border-color: #c9e2fd;
}
.badge.gray, .badge.teal, .tag-muted, .due-chip.done, .pill.muted {
  background: #f4f6f8; color: #52606d; border-color: #e4e9ef;
}
.badge.key { background: #fff8e6; color: #8a6d12; border-color: #f0e0b4; }
.due-chip.none { background: #fff; color: #b42318; border-color: #f0c2bd; border-style: dashed; }
/* 标签内的小数字/小字 */
.badge b, .tag b, .pill b { font-weight: 700; }

/* ---------- 2. 查询条：紧凑工具条 ---------- */
.query-bar, form.filters, .filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  width: fit-content; max-width: 100%;
  margin: 0 0 12px; padding: 8px 10px;
  background: #fff; border: 1px solid var(--v3-border); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.query-bar .f, form.filters .f, .filters .f {
  display: flex; align-items: center; gap: 6px;
  margin: 0; min-width: 0; font-size: 12px;
}
.query-bar .f .lab, form.filters .f .lab, .filters .f .lab {
  display: inline-block; margin: 0; color: #475467; font-size: 12px;
  white-space: nowrap; flex: 0 0 auto;
}
.query-bar .f .lab::after, form.filters .f .lab::after { content: ""; }
.query-bar select, .query-bar input:not([type=hidden]), .filters select, .filters input:not([type=hidden]) {
  height: 30px; min-width: 120px; padding: 0 9px; font-size: 12.5px;
  border: 1px solid #dbe1e9; border-radius: 6px; background: #fff;
}
.query-bar select { padding-right: 26px; }
.query-bar input[type=date] { min-width: 138px; }
.query-bar input::placeholder { color: #a9b4c0; }
.query-bar .btn, .filters .btn { height: 30px; padding: 0 13px; font-size: 12.5px; }
.query-bar .sep { width: 1px; height: 18px; background: var(--v3-border); }
/* 让「查询/重置」与筛选项之间稍微拉开，视觉分组 */
.query-bar .btn.primary { margin-left: 2px; }

/* ---------- 3. 表格 ---------- */
table.data, table.table {
  font-size: 13px; border-collapse: separate; border-spacing: 0; width: 100%;
}
table.data th, table.table th {
  background: var(--v3-head); color: #56616f;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 9px 12px; border-bottom: 1px solid var(--v3-border);
  white-space: nowrap; text-align: left;
}
table.data td, table.table td {
  padding: 8px 12px; border-bottom: 1px solid var(--v3-border-2);
  color: var(--v3-ink); vertical-align: middle;
}
table.data tbody tr:last-child td, table.table tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td, table.table tbody tr:hover td { background: var(--v3-hover); cursor: default; }
tr[data-href]:hover td { cursor: pointer; }
/* 数字列：贴紧内容、右对齐、等宽数字 */
table.data th.money, table.data td.money,
table.data th.num, table.data td.num,
table.table th.money, table.table td.money,
table.table th.num, table.table td.num {
  width: 1%; white-space: nowrap; text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 12.5px; color: #24303d;
}
table.data td.money, table.table td.money { font-weight: 600; }
/* 状态列：不要被拉宽 */
table.data th:has(+ th.ops) { }
/* 操作列 */
table.data th.ops, table.data td.ops,
table.table th.ops, table.table td.ops {
  width: 1%; white-space: nowrap; text-align: right; padding-right: 14px;
}
table.data th.ops, table.table th.ops { text-align: right; padding-right: 14px; }
table.data td.ops .link-btn, table.table td.ops .link-btn,
table.data td.ops .btn.sm, table.table td.ops .btn.sm {
  display: inline-flex; align-items: center; height: 22px;
  margin: 0; padding: 0 9px; font-size: 12.5px; border-radius: 4px;
  color: var(--v3-link); background: transparent;
}
table.data td.ops .link-btn:hover, table.table td.ops .link-btn:hover { background: #eef7f4; text-decoration: none; }
table.data td.ops .link-btn + .link-btn, table.table td.ops .link-btn + .link-btn {
  border-left: 1px solid var(--v3-border); border-radius: 0;
}
table.data td.ops .link-btn + .link-btn:hover { border-radius: 4px; }
table.data td.ops .link-btn:first-child, table.table td.ops .link-btn:first-child { padding-left: 4px; }
table.data td.ops .link-btn:last-child, table.table td.ops .link-btn:last-child { padding-right: 4px; }
table.data td.ops .link-btn.danger, table.table td.ops .link-btn.danger { color: #b42318; }
/* 固定操作列：随行悬停一起变色，避免白块 */
table.data th.ops, table.data td.ops { background: #fff; }
table.data th.ops, table.table th.ops { background: var(--v3-head); }
table.data tbody tr:hover td.ops { background: var(--v3-hover); }
table.data tbody tr:nth-child(even) td.ops { background: #fcfdfe; }
/* 单元格内两行信息（主 + 次） */
.cell-main { font-weight: 600; color: #1f2937; }
.cell-sub { font-size: 11.5px; color: var(--v3-ink-3); margin-top: 1px; line-height: 1.4; }
/* 空状态 */
table.data td.empty-cell, table.table td.empty-cell,
table.data td.center.muted, table.table td.center.muted {
  padding: 34px 12px; color: var(--v3-ink-3); font-size: 12.5px; text-align: center;
}

/* ---------- 4. KPI / 卡片一致性 ---------- */
.analytics-kpis { gap: 12px; }
.analytics-kpis a.kpi, .analytics-kpis .kpi, .analytics-kpis > .kpi {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 78px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--v3-border); box-shadow: none;
  position: relative; overflow: hidden;
}
.analytics-kpis .kpi span { font-size: 12px; color: var(--v3-ink-3); line-height: 1.2; }
.analytics-kpis .kpi b {
  font-size: 21px; font-weight: 700; margin-top: 5px; line-height: 1.2;
  color: #10202f; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.analytics-kpis .kpi small, .analytics-kpis .kpi .sub {
  font-size: 11.5px; color: var(--v3-ink-3); margin-top: 4px; line-height: 1.2;
}
.analytics-kpis .kpi::after { display: none; }
/* 强调色只用于真正需要关注的卡片，默认不再整卡染色 */
.analytics-kpis .kpi.active { border-color: #f0c9c4; background: #fffafa; }
.analytics-kpis .kpi.active b { color: #b42318; }
.analytics-kpis a.kpi:hover { border-color: #bcd7cf; background: #fbfefd; }

/* ---------- 5. 详情页：时间线 / 键值对 / 分节 ---------- */
.stepper { display: flex; align-items: flex-start; gap: 0; flex-wrap: wrap; }
.step { display: flex; align-items: flex-start; gap: 8px; flex: 1 1 0; min-width: 130px; position: relative; }
.step + .step::before {
  content: ""; position: absolute; left: -8px; top: 11px; width: 16px; height: 2px; background: var(--v3-border);
}
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  border: 2px solid var(--v3-border); background: #fff; color: var(--v3-ink-3);
}
.step.on .step-dot { border-color: #067647; background: #ecfdf3; color: #067647; }
.step-body { min-width: 0; }
.step-name { font-size: 12.5px; font-weight: 600; color: #344054; line-height: 1.3; }
.step.on .step-name { color: #05603a; }
.step-time { font-size: 11.5px; color: var(--v3-ink-3); line-height: 1.4; }

.kv { width: 100%; border-collapse: collapse; }
.kv th {
  width: 92px; padding: 7px 8px 7px 0; text-align: left; vertical-align: top;
  font-size: 12.5px; font-weight: 400; color: var(--v3-ink-3); white-space: nowrap;
}
.kv td { padding: 7px 0; font-size: 13px; color: var(--v3-ink); border-bottom: 1px dashed #f0f3f7; }
.kv tr:last-child td { border-bottom: 0; }

/* ---------- 6. 表单：分节 + 等宽栅格 ---------- */
.form-card { max-width: 1080px; }
.form-section { padding: 16px 0; border-top: 1px solid var(--v3-border-2); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section > h3 {
  font-size: 13px; font-weight: 700; color: #10202f; margin: 0 0 3px;
  display: flex; align-items: center; gap: 8px;
}
.form-section > h3::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px; background: #12b886;
}
.form-section > .sec-hint { font-size: 12px; color: var(--v3-ink-3); margin: 0 0 12px; }
.field-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 16px; align-items: end;
}
.field-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.form-actions {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--v3-border-2);
}
.form-actions .muted { margin-left: 4px; }

/* ---------- 7. 列表卡片里的提示条 ---------- */
.notice-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 8px; margin-bottom: 12px;
  font-size: 12.5px; background: #fff7f6; border: 1px solid #f7d3ce; color: #96322a;
}
.notice-strip a { font-weight: 600; color: #b42318; }
.notice-strip .spacer { flex: 1; }

/* ---------- 8. 项目/工单列表：状态列不换行 ---------- */
table.data td .badge + .badge, table.data td .tag + .tag { margin-left: 4px; }

/* ---------- 9. 工作台：归属/待办/通知列表 ---------- */
.own-block-h {
  font-size: 12px; color: var(--v3-ink-3); font-weight: 600;
  letter-spacing: .02em; margin-bottom: 8px;
}
.own-list { display: grid; gap: 0; }
.own-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; border-radius: 6px; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--v3-border-2);
}
.own-row:last-child { border-bottom: 0; }
.own-row:hover { background: var(--v3-hover); color: inherit; }
.own-name { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #24303d; min-width: 0; }
.own-name .muted { font-size: 11.5px; }
.own-num {
  font-family: "SF Mono", Consolas, monospace; font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600; color: #067647; white-space: nowrap;
}
.own-row.danger .own-num { color: #b42318; }

.home-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start;
}
.notice-list { display: grid; gap: 0; }
.notice-row {
  display: block; padding: 9px 10px; border-radius: 6px; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--v3-border-2);
}
.notice-row:last-child { border-bottom: 0; }
.notice-row:hover { background: var(--v3-hover); color: inherit; }
.notice-title { display: block; font-size: 13px; font-weight: 600; color: #24303d; }
.notice-body { display: block; font-size: 11.5px; color: var(--v3-ink-3); margin-top: 1px; }

@media (max-width: 980px) {
  .home-cols { grid-template-columns: 1fr; }
}

/* ---------- 10. 收尾微调 ---------- */
/* 支出/成本用中性深色，只有「欠款/超支」用红，避免整屏发红 */
.amt-out { color: #344054; }
.amt-debt { color: #b42318; font-weight: 600; }

/* 权限矩阵：限高滚动，表头吸顶，首列吸附 */
.perm-matrix { max-height: 560px; overflow: auto; border: 1px solid var(--v3-border); border-radius: 8px; }
.perm-matrix thead th { position: sticky; top: 0; z-index: 3; }
.perm-matrix thead th:first-child { z-index: 4; }
.perm-matrix tbody td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.perm-matrix tbody tr:hover td:first-child { background: var(--v3-hover); }
.perm-matrix table.data { border: 0; }

/* 进度条（清单完成度 / 节点进度） */
.bar { display: inline-block; vertical-align: middle; height: 5px; width: 88px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #12b886, #0f9d76); }
.bar.warn > i { background: linear-gradient(90deg, #f0bb45, #d99a1a); }
.bar.danger > i { background: linear-gradient(90deg, #f2777a, #d92d20); }
.bar-row { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--v3-ink-3); }

/* 紧凑型面板头（标题 + 右侧说明/操作） */
.panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-head h3, .panel-head h4 { margin: 0; flex: 0 0 auto; }
.panel-head .hint { font-size: 12px; color: var(--v3-ink-3); flex: 1 1 auto; min-width: 0; }
.panel-head .link-btn { margin-left: auto; flex: 0 0 auto; }

/* 按钮行 */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row form { margin: 0; }

/* 两栏卡片区（详情页） */
.split-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin-bottom: 12px; align-items: start; }
@media (max-width: 980px) { .split-2 { grid-template-columns: 1fr; } }

/* 列表页表头右侧的说明小字 */
.table-note { font-size: 12px; color: var(--v3-ink-3); margin: 0 0 8px; }

/* ---------- 11. 折叠面板 ---------- */
.fold > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 6px;
  border: 1px solid #dbe1e9; background: #fff;
  font-size: 12.5px; font-weight: 600; color: #344054;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "+"; font-size: 14px; line-height: 1; color: #667085; }
.fold[open] > summary::before { content: "−"; }
.fold > summary:hover { border-color: #bcd7cf; color: var(--v3-link); background: #f7fdfb; }
.fold[open] > summary { margin-bottom: 4px; }

/* 表格内空单元格占位（保持行高一致） */
td .muted:only-child { color: var(--v3-ink-3); }

/* ---------- 12. 最大化弹层内容自适应 ----------
   弹层放大后内容不能还挤在左上角一小块，否则就是「大片留白」 */
.modal-box.max, .drawer-box.max, .drawer.max { display: flex; flex-direction: column; }
.modal-box.max .modal-b, .drawer-box.max .drawer-b {
  padding: 18px 20px; width: 100%; max-width: 1180px; margin: 0 auto;
}
.modal-box.max .quick-form {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 18px;
}
.modal-box.max .quick-form .qf-row { min-width: 0; }
.modal-box.max .quick-form select,
.modal-box.max .quick-form input { width: 100%; }
.modal-box.max .modal-f { padding: 12px 20px; }
.modal-box.max table.data, .drawer-box.max table.data { width: 100%; }
/* 小弹层（3~5 个字段的快捷表单）放大后宽而扁，避免变成巨大空框 */
.modal-box.modal-sm.max { width: min(1080px, 92vw); height: auto; max-height: 88vh; }
.modal-box.modal-sm.max .modal-b { max-width: none; }

/* ---------- 13. 打印清理：屏幕上要的交互件，纸上都不要 ---------- */
@media print {
  .back-btn, .btn-row, .form-actions, .page-toolbar, .drill-banner,
  .toolbar, .toolbar-io, .batch-bar, .toast-wrap, .nav-progress,
  .quick-chip, .side-help, .help-panel, .offcanvas, .backdrop { display: none !important; }
  body { background: #fff !important; }
  .content { padding: 0 !important; }
  .card + .card { margin-top: 10px; }
  h2, h3 { break-after: avoid; }
  .badge, .tag, .due-chip {
    border: 1px solid #cbd5e1 !important; background: #fff !important; color: #111 !important;
  }
  .money, .num { font-family: Consolas, "Courier New", monospace; }
}

/* ---------- 14. 移动端触控尺寸（≥32px 才好点） ---------- */
@media (max-width: 640px) {
  .btn.sm, .btn.ghost.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .link-btn { display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; }
  .m-head .btn, .m-top .btn { height: 34px; }
  .query-bar { width: 100%; }
  .query-bar .f { flex: 1 1 100%; }
  .query-bar select, .query-bar input:not([type=hidden]) { width: 100%; }
  .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table.data th, table.table th { font-size: 11.5px; }
}

/* ---------- 15. 报表中心：柱状图与报表卡片 ---------- */
.chart-bars {
  display: flex; align-items: flex-end; gap: 10px;
  height: 168px; padding: 8px 4px 0;
}
.chart-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.chart-bars-inner {
  display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  height: 118px; width: 100%;
}
.chart-bar {
  width: 14px; border-radius: 3px 3px 0 0; min-height: 3px;
  transition: opacity .15s ease;
}
.chart-bar.inv { background: linear-gradient(180deg, #34d399, #12b886); }
.chart-bar.inflow { background: linear-gradient(180deg, #93c5fd, #3b82f6); }
.chart-bar:hover { opacity: .78; }
.chart-label { font-size: 11.5px; color: var(--v3-ink-3); margin-top: 6px; }
.chart-val { font-size: 11px; color: #475467; font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 14px; justify-content: center; margin-top: 8px; font-size: 12px; color: var(--v3-ink-3); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend .lg { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.chart-legend .lg.inv { background: #12b886; }
.chart-legend .lg.inflow { background: #3b82f6; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.report-card {
  display: block; padding: 14px 15px; border: 1px solid var(--v3-border); border-radius: 9px;
  background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.report-card:hover {
  border-color: #bcd7cf; background: #fbfefd; color: inherit;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .06);
}
.report-card h4 { margin: 0 0 6px; font-size: 13.5px; font-weight: 650; color: #10202f; }
.report-card p { margin: 0 0 8px; font-size: 12px; color: var(--v3-ink-3); line-height: 1.55; }
.report-meta {
  display: inline-block; font-size: 11.5px; color: #067647;
  background: #ecfdf3; border: 1px solid #bbf0cf; border-radius: 4px; padding: 1px 7px;
}

/* ---------- 16. 日志变更展开 ---------- */
.fold-inline { display: inline-block; }
.fold-inline > summary {
  cursor: pointer; list-style: none; font-size: 11.5px; font-weight: 600;
  color: #175cd3; padding: 1px 7px; border-radius: 4px;
  background: #eff8ff; border: 1px solid #c9e2fd;
}
.fold-inline > summary::-webkit-details-marker { display: none; }
.fold-inline[open] > summary { background: #dbeafe; }
.log-diff {
  position: absolute; z-index: 20; margin-top: 6px; min-width: 260px; max-width: 420px;
  background: #fff; border: 1px solid var(--v3-border); border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16,24,40,.12); padding: 10px 12px;
}
.log-diff > div + div { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #eef1f5; }
.log-diff b { font-size: 11.5px; color: #475467; display: block; margin-bottom: 3px; }
.log-diff pre {
  margin: 0; font-size: 11.5px; line-height: 1.55; color: #344054;
  white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow: auto;
  background: #f8fafc; border-radius: 5px; padding: 6px 8px;
}

/* 移动端可读性兜底：标注/辅助文字不小于 11px，避免小屏过细 */
@media (max-width: 720px) {
  .m-hero-kicker, .m-hero-sub, .m-hero-pills span, .m-hero-ring,
  .m-list-main span, .m-stats span, .m-stat-grid span,
  .mdh-kicker, .mdh-pills i, .m-kpi i, .m-chart-h span, .mc-col span,
  .ma-kicker, .ma-pills i, .ma-extra i, .ma-legend span, .ma-val, .ma-sources p,
  .m-quick-grid i, .m-chip i, .m-steps .st span, .m-tabs2 button i, .m-mod-group-h em {
    font-size: 11px;
  }
}
