: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: 14px;
  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: 19px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 8px; }
ul, ol { margin: 0 0 8px; padding-left: 1.25em; }
small { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, "SFMono-Regular", monospace; }
.muted { color: var(--muted); font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.strong { font-weight: 650; }

/* ---------- 布局 ---------- */
.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: 15px 14px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  background: linear-gradient(145deg, #f5ce63, #d99a1a);
  color: #231701; display: grid; place-items: center; font-weight: 900; font-size: 16px;
  box-shadow: 0 6px 18px rgba(217,154,26,.3);
}
.brand strong { display: block; color: #fff; font-size: 15px; letter-spacing: .02em; }
.brand span { display: block; color: #e6c55a; font-size: 11px; letter-spacing: .06em; }
.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: 11px; 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: 10px; color: #6f8599; }
.nav-block.collapsed .nav-block-h::after { content: "▸"; }
.nav-block.collapsed a { display: none; }
.sidebar nav a.nav-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 10px 6px 13px;
  color: #a9bccf; font-size: 13px; 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: 10px; 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: 12px; }
.user-box .name { color: #fff; font-size: 13px; font-weight: 650; }
.user-box .role { color: #9fb3c8; }
.user-links { display: flex; gap: 12px; margin-top: 7px; }
.user-links a { color: #c6d5e4; font-size: 12px; }
.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: 16px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { color: var(--muted); font-size: 12px; 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: 16px;
}
.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: 11px; 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: 11px; 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: 11px; 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: 14px; 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: 12px; }
.section-title { font-size: 13px; 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: 12px; color: var(--muted); display: block; }
.kpi b { display: block; font-size: 24px; font-weight: 750; margin-top: 2px; letter-spacing: -.02em; }
.kpi .sub { font-size: 11px; 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: 13px; 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: 12px; border-radius: 7px; }
.btn.lg { padding: 9px 18px; font-size: 14px; }
.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: 12px; }
.link-btn.danger { color: var(--danger); }
.link-btn:hover { text-decoration: underline; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; 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.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: 13px; }
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: 12px; 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: 12px; 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: 12px;
}
.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: 12px; 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: 11px; color: #98a2b3; margin-top: 3px; }
input, select, textarea {
  width: 100%; border: 1px solid #d5dce6; border-radius: 8px; padding: 7px 9px;
  font: inherit; font-size: 13px; 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: 13px; color: var(--ink); min-height: 34px; }
.check input { margin: 0; }
.readonly { background: #f8fafc; color: #475467; }
.help-text { font-size: 12px; color: var(--muted); margin-top: 4px; }
.help-list { margin: 6px 0 0; padding-left: 18px; font-size: 12px; 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: 12px; 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: 12px; font-weight: 650; display: flex; align-items: center; justify-content: space-between; color: #344054; }
.cal-cell .cal-date em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); }
.cal-cell.today .cal-date { color: var(--amber); }
.cal-chip { display: block; font-size: 11px; 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: 13px; margin-right: 6px; }
.trade-item .trade-act { display: flex; align-items: center; gap: 6px; }
.trade-item .trade-act select { font-size: 11px; 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: 12px; margin-top: 3px; }

.alert { padding: 10px 13px; border-radius: 9px; margin-bottom: 12px; font-size: 13px; }
.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: 13px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 14px; }
.hint-bar { background: #fffaf0; border: 1px solid #f5e3b8; color: #6b5313; padding: 9px 12px; border-radius: 9px; font-size: 12px; 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: 12px; }
.dl .item .v { font-size: 13px; 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: 12px; 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: 13px; 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: 11px; 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: 12px; 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: 11px; }
.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: 11px; color: var(--muted); display: flex; justify-content: space-between; }
.wo-card .t { font-size: 13px; font-weight: 650; margin: 3px 0; line-height: 1.4; }
.wo-card .meta { font-size: 11px; 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: 13px; }
.tl-item .meta { font-size: 11px; color: var(--muted); }
.tl-item .note { font-size: 12px; 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; }
.gantt { font-size: 12px; }
.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: 11px; text-align: right; }
.legend { display: flex; gap: 12px; font-size: 11px; 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: 12px; }
.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: 12px; 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: 12px; font-variant-numeric: tabular-nums; }
.pie-legend { display: grid; gap: 6px; font-size: 12px; }
.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: 11px; color: var(--muted); }
.donut .mid b { display: block; font-size: 20px; 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: 16px; margin: 0; color: #fff; }
.m-head .sub { font-size: 11px; 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: 12px; 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: 14px; margin: 0 0 4px; }
.m-card .muted { font-size: 11px; }
.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: 11px; color: #667085; }
.m-nav a.on { color: var(--amber); font-weight: 700; }
.m-nav a .ic { display: block; font-size: 17px; 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: 20px; }
.m-kpi span { font-size: 11px; 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: 12px; 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: 12px; 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: 15px; 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: 12px; 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: 22px; color: #fff; }
.login-copy .stats span { font-size: 11px; 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: 18px; margin: 0 0 2px; }
.login-panel .sub { color: var(--muted); font-size: 12px; 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: 12px; }
.login-panel .demo span { font-size: 11px; 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: 11px; 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: 13px; }
.print-page h1 { text-align: center; font-size: 22px; letter-spacing: .1em; margin-bottom: 4px; }
.print-page .print-sub { text-align: center; color: #555; font-size: 12px; margin-bottom: 16px; }
.print-page table { width: 100%; border-collapse: collapse; font-size: 12px; }
.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: 12px; }
.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: 20px; }
  .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: 19px; }
  .card { padding: 11px; }
  .hide-sm { display: none !important; }
}

/* ---------- 表单块 / 行内编辑 / 弹层行 ---------- */
.form .field { margin-bottom: 10px; }
.form .field > label { display: block; font-size: 12px; 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: 18px; color: var(--navy); line-height: 1.25; }
.m-stats span { font-size: 10px; color: var(--muted); }
.m-section-h { font-size: 12px; 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: 14px; font-weight: 650; color: var(--ink); margin-bottom: 3px; }
.m-task-m { font-size: 12px; color: #667085; line-height: 1.6; }
.m-task-f { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.m-go { margin-left: auto; color: var(--amber); font-weight: 650; font-size: 12px; }
.m-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-link { text-align: center; font-size: 20px; line-height: 1.1; }
.m-link b { display: block; font-size: 13px; color: var(--ink); margin: 5px 0 2px; }
.m-link span { font-size: 11px; color: var(--muted); }
.m-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 20px; 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: 11px; color: var(--muted); margin-bottom: 3px; }
.m-card input, .m-card select, .m-card textarea { font-size: 13px; min-height: 38px; }
.m-card .btn { width: 100%; justify-content: center; }
.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: #9fb3c8; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); width: 26px; height: 26px; flex: 0 0 26px; }
.sidebar-head .side-toggle svg { transform: rotate(180deg); width: 14px; height: 14px; }
body.nav-collapsed .sidebar-head { flex-direction: column; gap: 8px; padding: 10px 6px; }
body.nav-collapsed .sidebar-head .side-toggle svg { transform: none; }
.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: 12px; 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: 13px; }
.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: 10px; 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 .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 { display: flex; }
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: 16px; 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: 12px; 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: 10px; 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: 12px; }
.user-chip .uc-text { font-size: 12px; color: var(--navy); line-height: 1.15; text-align: left; }
.user-chip .uc-text i { display: block; font-style: normal; font-size: 10px; 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: 13px; 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: 12px; font-weight: 650; color: var(--navy); line-height: 1.6; }
.menu-head span { font-weight: 400; color: var(--muted); font-size: 11px; }
.menu-empty { display: block; padding: 8px 10px; color: var(--muted); font-size: 12px; }

/* ---- 页面标题区 ---- */
.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: 17px; margin: 0 0 3px; color: var(--navy); }
.page-head p { margin: 0; color: var(--muted); font-size: 12px; 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-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: 14px; 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: 14px; display: flex; align-items: center; gap: 7px; }
.drawer-b { padding: 14px 16px; overflow: auto; }
.drawer-desc { margin: 0 0 14px; font-size: 13px; line-height: 1.9; color: #344054; }
.drawer-sub { font-size: 11px; color: var(--muted); letter-spacing: .08em; margin: 6px 0 6px; }
.tips { margin: 0; padding-left: 18px; color: #475467; font-size: 12px; line-height: 1.9; }
.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: 13px; }
.todo-list a i { font-style: normal; font-size: 11px; 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: 12px; color: var(--muted); margin-top: 8px; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { flex: 1; font-size: 12px; }

/* ---- 批量操作条 ---- */
.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: 12px; 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); }

/* ---- 分页 ---- */
.table-foot { gap: 8px; }
.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: 12px; }
.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: 12px; color: var(--muted); }
.size-pick select { width: auto; min-height: 28px; padding: 0 6px; font-size: 12px; }

/* ---- 看板口径提示 ---- */
.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: 12px; }
.drill-bar b { margin-left: auto; }

/* ---- 导入错误 ---- */
.import-errors summary { cursor: pointer; font-weight: 600; }
.import-errors ul { margin: 8px 0 0 18px; font-size: 12px; 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: 12px; color: #475467; display: flex; align-items: center; gap: 4px; }
.form-grid .f .hint { font-size: 11px; color: #98a2b3; line-height: 1.6; }
.form-grid textarea { resize: vertical; min-height: 76px; }
.dict-link { color: #98a2b3; font-size: 11px; }
.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: 26px; color: #cbd5e1; line-height: 1; margin-bottom: 6px; }
.empty strong { display: block; color: #475467; font-size: 13px; margin-bottom: 2px; }
.empty span { display: block; font-size: 12px; }
.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: 12.5px; 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 .brand-mark, body.theme-blue .brand-mark { color: #fff; }
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: 11px; 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-block.collapsed a { display: none; }
  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: 15px; }
  .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: 14px; }
.m-appbar-t { flex: 1; min-width: 0; line-height: 1.25; }
.m-appbar-t b { display: block; font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-appbar-t span { font-size: 11px; 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: 9px; 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: 16px; flex: 0 0 40px; }
.m-ava.lg { width: 54px; height: 54px; font-size: 20px; flex-basis: 54px; }
.m-hello { font-size: 15px; font-weight: 700; }
.m-sub { font-size: 11px; 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: 13px; color: #fff; }
.m-weather span { font-size: 10px; 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: 19px; font-weight: 750; color: #fff; line-height: 1.2; }
.m-hero-stats span { font-size: 10px; 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: 12.5px; color: #4a3505; }
.b-text i { font-style: normal; font-size: 11px; color: #8a7133; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-more { font-size: 11px; 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: 14px; color: #213a52; }
.m-section > span, .m-section > a { font-size: 11px; color: var(--muted); }
.m-list-head { display: flex; justify-content: space-between; font-size: 11px; 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: 14px; color: #17395c; font-variant-numeric: tabular-nums; }
.tc-time span { font-size: 10px; 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: 10px; color: var(--muted); }
.tc-code { margin-left: auto; font-size: 10px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.tc-title { display: block; font-size: 14px; line-height: 1.4; color: #16212e; }
.tc-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.tc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11px; 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: 11px; color: #344054; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.m-quick-grid b { font-size: 11.5px; font-weight: 600; }
.m-quick-grid i { font-style: normal; font-size: 9.5px; 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: 13px; }
.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: 18px; color: #17395c; line-height: 1.25; }
.m-stat-grid span { font-size: 10px; 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: 12px; 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: 10px; }
.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: 12.5px; color: #17456b; }
.m-tip-card.danger b { color: #92251c; }
.m-tip-card p { margin: 4px 0 6px; font-size: 11.5px; line-height: 1.75; color: #4a6580; }
.m-tip-card a { font-size: 11.5px; 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: 13px; color: #101828; }
.m-todo-chip i { font-style: normal; font-size: 11px; 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: 11px; color: #667085; }
.m-grab .g-title { display: block; font-size: 14px; margin: 6px 0 4px; color: #101828; line-height: 1.45; }
.m-grab .g-meta { font-size: 11.5px; 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: 11.5px; color: #475467; }
.m-grab .g-foot span i { font-style: normal; color: #98a2b3; }
.m-grab .g-foot span b { color: #101828; font-size: 13px; }
.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: 13px; 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: 11px; color: #667085; line-height: 1.6; }
.m-grab.done em { font-style: normal; font-size: 11.5px; 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: 10px; color: var(--muted); }
.li-title { display: block; font-size: 14px; color: #16212e; line-height: 1.4; }
.li-meta { display: grid; gap: 2px; margin-top: 4px; font-size: 11px; 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: 11px; 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: 13.5px; color: #344054; }
.m-empty span { font-size: 11.5px; 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: 13px; 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: 12px; color: #4a5b6d; }
.m-chip.on { background: #0d3050; border-color: #0d3050; color: #fff; }
.m-chip i { font-style: normal; font-size: 10px; margin-left: 3px; opacity: .8; }
.m-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 4px; font-size: 12px; }
.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: 16px; margin: 7px 0 6px; color: #fff; line-height: 1.4; }
.wh-meta { display: grid; gap: 3px; font-size: 11.5px; 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: 11px; font-weight: 700; }
.m-steps .st span { display: block; font-size: 10px; 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: 12px; color: #667085; }
.m-tabs2 button.on { background: #0d3050; color: #fff; font-weight: 600; }
.m-tabs2 button i { font-style: normal; font-size: 10px; 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: 12px; 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: 14px; 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: 13px; }
.m-card-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.m-card-h b { font-size: 13px; color: #16212e; }
.m-card-h span { font-size: 11px; }
.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: 12px; }
.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: 9px; 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: 17px; color: #fff; }
.pf-text span { display: block; font-size: 11.5px; 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: 13px; }
.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: 11px; color: var(--muted); }
.m-menu-list svg.ic { color: #667085; }
.m-foot-brand { text-align: center; font-size: 11px; color: var(--muted); padding: 18px 0 4px; }
.m-foot-note { text-align: center; font-size: 10.5px; 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: 10.5px; 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: 14px; 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: 17px; }
}

/* ==========================================================================
   设置页 / 搜索 / 权限矩阵 / 字典
   ========================================================================== */
.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: 12px; 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: 11px; }
.pm-title { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: .06em; }
.pm-sub { text-align: center; color: #667085; font-size: 10px; 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: 10px; text-align: center; }
.code-block { background: #0c2238; color: #cfe3f5; border-radius: 8px; padding: 9px 11px; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; 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: 12.5px; color: #213a52; }
.perm-table td.perm-mod span { font-size: 10px; }
.perm-role { min-width: 82px; text-align: center !important; }
.perm-role span { display: block; font-size: 11.5px; }
.perm-role .link-btn { font-size: 10px; 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: 12px; 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: 13px; color: #213a52; }
.dc-key { font-size: 10px; color: #98a2b3; margin-top: 2px; }
.dc-preview { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chip { font-size: 10.5px; 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: 12.5px; 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: 11px; 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:12px; }
.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:19px; line-height:1.15; font-variant-numeric:tabular-nums; }
.quick-tiles .qt i { font-style:normal; font-size:11px; 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:11px; 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:12px; 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: 17px; }
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:11px; 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.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:12px; }
.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:11px; }

/* ── 交期分类签 ───────────────────────────────── */
.due-tabs { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:-2px 0 12px; }
.due-tabs-label { font-size:11px; 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:12px; 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; }

/* ---------- 抢单池 ---------- */
.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: 14px; margin: 0; color: var(--navy); line-height: 1.4; }
.pool-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.pool-meta { display: grid; gap: 3px; font-size: 12px; 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; }
