/* 分步作业单标签页样式（全部类名以 ws- 前缀命名，作用范围限于 .ws-root 之下，不设全局样式） */

.ws-root {
  --ws-primary: #1a73e8;
  --ws-p1: #d93025;
  --ws-p2: #e8710a;
  --ws-p3: #f9ab00;
  --ws-p4: #1a73e8;
  --ws-line: #e3e6ea;
  --ws-ink: #202124;
  --ws-muted: #5f6368;
  --ws-bg: #f7f8fa;
  --ws-gold: #b8860b;
  --ws-soft: #f1f3f4;

  color: var(--ws-ink);
  font-size: 14px;
  line-height: 1.65;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 14px 48px;
  background: var(--ws-bg);
  border-radius: 10px;
}

.ws-root * { box-sizing: border-box; }

/* ---------------- 二级导航 ---------------- */

.ws-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(32, 33, 36, .06);
  position: sticky;
  top: 0;
  z-index: 5;
}

.ws-subtab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ws-muted);
  font: inherit;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.ws-subtab:hover { background: var(--ws-soft); color: var(--ws-ink); }

.ws-subtab.active {
  background: var(--ws-primary);
  border-color: var(--ws-primary);
  color: #fff;
}

.ws-printhead { display: none; }

/* ---------------- 卡片与通用 ---------------- */

.ws-card {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(32, 33, 36, .05);
}

.ws-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ws-card-head-sub { margin: 0 0 8px; justify-content: flex-start; }

.ws-h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ws-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-card-head .ws-h3 { margin: 0; }

.ws-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--ws-muted);
  background: var(--ws-soft);
  border-radius: 20px;
  padding: 2px 9px;
}

.ws-p { margin: 0 0 8px; }
.ws-muted { color: var(--ws-muted); font-size: 13px; }

.ws-empty {
  padding: 18px;
  text-align: center;
  color: var(--ws-muted);
  background: #fff;
  border: 1px dashed var(--ws-line);
  border-radius: 10px;
}

.ws-empty-big { font-size: 16px; font-weight: 600; padding: 40px 18px; }

.ws-hint {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ws-muted);
  border-left: 3px solid var(--ws-line);
  padding-left: 8px;
}

.ws-hint-inline { font-size: 12.5px; color: var(--ws-muted); }

.ws-btn {
  appearance: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ws-primary);
  background: #fff;
  border: 1px solid var(--ws-primary);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.ws-btn:hover { background: var(--ws-primary); color: #fff; }

.ws-tools { display: inline-flex; gap: 6px; }

/* ---------------- 徽章 ---------------- */

.ws-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.ws-bd {
  display: inline-block;
  font-size: 12px;
  line-height: 1.5;
  padding: 1px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.ws-bd-scope {
  background: #fff;
  border: 1px solid var(--ws-muted);
  font-weight: 600;
}

.ws-bd-kind {
  color: #fff;
  font-weight: 600;
}

.ws-bd-lv {
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
}

.ws-bd-plain { background: var(--ws-muted); }
.ws-bd-soft { background: var(--ws-soft); color: var(--ws-muted); }

.ws-bd-who {
  background: #e8f0fe;
  color: #174ea6;
  font-weight: 600;
}

.ws-bd-budget {
  background: #fff;
  border: 1px dashed var(--ws-line);
  color: var(--ws-muted);
}

.ws-bd-probe {
  background: #ede7f6;
  color: #5e35b1;
  font-weight: 600;
}

.ws-bd-star {
  background: linear-gradient(135deg, #fff8e1, #ffe9a8);
  border: 1px solid #e0b400;
  color: #8a6100;
  font-weight: 700;
}

/* ---------------- 第 0 步 ---------------- */

.ws-zero {
  background: #fff;
  border: 2px solid var(--ws-primary);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(26, 115, 232, .12);
}

.ws-zero-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.ws-zero-ord {
  background: var(--ws-primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 6px;
}

.ws-zero-title { margin: 0; font-size: 18px; }

/* ---------------- 分类选择 ---------------- */

.ws-catbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.ws-catbtn {
  appearance: none;
  font: inherit;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--ws-line);
  background: #fff;
  color: var(--ws-ink);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.ws-catbtn:hover { border-color: var(--ws-primary); color: var(--ws-primary); }

.ws-catbtn.active {
  background: var(--ws-primary);
  border-color: var(--ws-primary);
  color: #fff;
  font-weight: 600;
}

/* 图标位：内联 SVG 垂直居中、按自身尺寸绘制，不随字号缩放变形 */
.ws-cat-icon, .ws-pf-icon {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ws-cat-icon { font-size: 14px; }
.ws-cat-icon .ic-svg, .ws-pf-icon .ic-svg { display: block; }

.ws-ctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.ws-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.ws-switch input { width: 15px; height: 15px; accent-color: var(--ws-gold); }

/* ---------------- 分类区块与步骤卡片 ---------------- */

.ws-catblock { margin-bottom: 18px; }

.ws-cathead {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ws-line);
  margin-bottom: 10px;
}

.ws-cat-name { margin: 0; font-size: 16px; font-weight: 700; }
.ws-cat-stat { font-size: 12.5px; color: var(--ws-muted); }
.ws-cat-desc { font-size: 13px; color: var(--ws-muted); margin: -4px 0 10px; }

.ws-steps { display: flex; flex-direction: column; gap: 10px; }

.ws-step {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-left: 4px solid var(--ws-primary);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(32, 33, 36, .06);
}

.ws-step-check { border-left-color: var(--ws-primary); }
.ws-step-cause { border-left-color: var(--ws-p3); background: #fffdf7; }
.ws-step-goto {
  border-left-color: #7b3fe4;
  background: #faf7ff;
  padding: 8px 12px;
}

.ws-step-cause.ws-lv-P1 { border-left-color: var(--ws-p1); }
.ws-step-cause.ws-lv-P2 { border-left-color: var(--ws-p2); }
.ws-step-cause.ws-lv-P3 { border-left-color: var(--ws-p3); }
.ws-step-cause.ws-lv-P4 { border-left-color: var(--ws-p4); }

.ws-step-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-ord {
  font-size: 15px;
  font-weight: 800;
  color: var(--ws-primary);
  letter-spacing: .5px;
}

.ws-ord-cause { color: var(--ws-gold); font-size: 13px; }
.ws-ord-goto { color: #7b3fe4; font-size: 13px; }

.ws-step-title { margin: 0; font-size: 15px; font-weight: 600; flex: 1 1 240px; }

.ws-goto-note { margin-top: 4px; }

.ws-field {
  display: flex;
  gap: 8px;
  margin: 4px 0;
  align-items: flex-start;
}

.ws-lb {
  flex: 0 0 auto;
  min-width: 60px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ws-muted);
  padding-top: 1px;
}

.ws-lb-ok { color: #188038; }
.ws-lb-no { color: var(--ws-p1); }

.ws-v { flex: 1 1 auto; min-width: 0; }

.ws-field-entry .ws-v {
  background: var(--ws-soft);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 13px;
  color: #3c4043;
}

.ws-field-pass .ws-v { font-weight: 600; }
.ws-field-sla .ws-v { color: #174ea6; }

.ws-block { margin: 6px 0; }

.ws-block .ws-lb { margin-bottom: 2px; }

ul.ws-howlist,
ul.ws-fixlist,
ul.ws-actlist,
ul.ws-cando,
ul.ws-cantdo,
ul.ws-fieldlist,
ul.ws-plain,
ul.ws-rules,
ul.ws-forbid,
ul.ws-deliver {
  margin: 0;
  padding-left: 18px;
}

ul.ws-howlist li { margin: 2px 0; }
ul.ws-fixlist li,
ul.ws-actlist li { margin: 3px 0; }

li.ws-cmd {
  list-style: none;
  margin-left: -14px;
}

li.ws-cmd code {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #202124;
  color: #e8eaed;
  padding: 2px 8px;
  border-radius: 4px;
}

.ws-probeline { font-size: 12.5px; color: var(--ws-muted); margin-top: 4px; }
.ws-probeline code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--ws-soft);
  padding: 0 4px;
  border-radius: 3px;
}

.ws-tip {
  margin: 6px 0;
  font-size: 13px;
  background: #fffde7;
  border-left: 3px solid #f9ab00;
  border-radius: 4px;
  padding: 5px 9px;
}

.ws-note {
  margin: 6px 0;
  font-size: 13px;
  background: #fce8e6;
  border-left: 3px solid var(--ws-p1);
  border-radius: 4px;
  padding: 6px 9px;
  color: #8c2d24;
}

.ws-note-escalate { background: #fff3e0; border-left-color: var(--ws-p2); color: #8a4b06; }
.ws-note-handoff { background: #e8f0fe; border-left-color: var(--ws-primary); color: #174ea6; }

.ws-alert {
  background: #fff3e0;
  border: 1px solid var(--ws-p2);
  border-radius: 8px;
  padding: 8px 11px;
  font-weight: 600;
  color: #8a4b06;
}

.ws-alert-tag {
  display: inline-block;
  background: var(--ws-p2);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  padding: 0 6px;
  margin-right: 6px;
}

/* 分支去向 */

.ws-branches {
  margin-top: 8px;
  border-top: 1px dashed var(--ws-line);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ws-branch { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.ws-branch .ws-lb { min-width: 40px; }

.ws-branch-yes .ws-lb { color: #188038; }
.ws-branch-no .ws-lb { color: var(--ws-p1); }

.ws-branch-step { font-weight: 600; }
.ws-branch-cause { color: #8a6100; font-weight: 600; }
.ws-branch-goto { color: #7b3fe4; font-weight: 600; }

/* ---------------- 表格 ---------------- */

.ws-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
}

.ws-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.ws-table th,
.ws-table td {
  border-bottom: 1px solid var(--ws-line);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
}

.ws-table thead th {
  background: var(--ws-soft);
  font-weight: 700;
  color: var(--ws-ink);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.ws-table tbody tr:last-child td { border-bottom: none; }
.ws-table tbody tr:nth-child(even) { background: #fcfcfd; }
.ws-td-lv { white-space: nowrap; }
.ws-td-strong { font-weight: 600; }
.ws-td-impact { font-weight: 600; min-width: 200px; }
.ws-td-note { min-width: 280px; color: #3c4043; }

/* ---------------- 规则命中明细（可折叠） ---------------- */

.ws-rule-details {
  margin-top: 10px;
  border: 1px solid var(--ws-line);
  border-left: 3px solid var(--ws-primary);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ws-rule-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 600;
  color: #202124;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fcfcfd;
}

/* 去掉各浏览器自带的三角，自己画一个，折起来朝右、展开朝下 */
.ws-rule-details > summary::-webkit-details-marker { display: none; }
.ws-rule-details > summary::before {
  content: '▸';
  color: var(--ws-muted);
  font-size: 11px;
  flex: none;
}
.ws-rule-details[open] > summary::before { content: '▾'; }
.ws-rule-details > summary:hover { background: var(--ws-soft); }
.ws-rule-details .ws-count { margin-left: auto; }
.ws-rule-details .ws-tablewrap { border-top: 1px solid var(--ws-line); }

/* ---------------- 级别卡片 ---------------- */

.ws-lvgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.ws-lvcard {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-left: 5px solid var(--ws-primary);
  border-radius: 8px;
  padding: 9px 11px;
}

.ws-lvcard-head { margin-bottom: 4px; }
.ws-lvcard-row { display: flex; gap: 8px; font-size: 13px; }

/* ---------------- 升级阶梯时间线 ---------------- */

.ws-timeline { position: relative; padding-left: 6px; }

.ws-tl-item {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  position: relative;
}

.ws-tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(#c7d3e3, #e3e6ea);
}

.ws-tl-axis { flex: 0 0 44px; }

.ws-tl-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 26px;
  border-radius: 14px;
  background: var(--ws-primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(26, 115, 232, .3);
}

.ws-tl-body {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  padding: 9px 12px;
  box-shadow: 0 1px 2px rgba(32, 33, 36, .05);
}

.ws-tl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.ws-tl-name { margin: 0; font-size: 15px; }

.ws-tl-window {
  font-size: 12.5px;
  font-weight: 700;
  color: #174ea6;
  background: #e8f0fe;
  border-radius: 20px;
  padding: 1px 9px;
}

/* ---------------- 角色卡片 ---------------- */

.ws-rolegrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.ws-rolecard {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-left: 5px solid var(--ws-primary);
  border-radius: 8px;
  padding: 10px 12px;
}

.ws-role-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ws-role-name { margin: 0; font-size: 15px; }

.ws-role-short {
  font-size: 12px;
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  padding: 0 6px;
}

ul.ws-cando li::marker { color: #188038; }
ul.ws-cantdo li::marker { color: var(--ws-p1); }

ul.ws-cantdo {
  background: #fdf3f2;
  border: 1px solid #f6c9c4;
  border-radius: 6px;
  padding: 6px 0 6px 20px;
}

ul.ws-cantdo li { color: #8c2d24; margin: 2px 0; }

/* ---------------- 报送模板与留证 ---------------- */

.ws-repgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.ws-repcard {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.ws-rep-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ws-rep-name { margin: 0; font-size: 15px; color: var(--ws-primary); }

.ws-tpl {
  margin: 4px 0 0;
  padding: 9px 11px;
  max-height: 320px;
  overflow: auto;
  background: #f8f9fa;
  border: 1px solid var(--ws-line);
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: #202124;
}

.ws-evgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.ws-evg {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  padding: 10px 12px;
}

.ws-evg-name { margin: 0 0 6px; font-size: 14.5px; color: #174ea6; }

ul.ws-check-list { list-style: none; margin: 6px 0 0; padding: 0; }

.ws-check-item { margin: 3px 0; }

.ws-check-item label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
}

.ws-check-item input {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  accent-color: var(--ws-primary);
}

.ws-check-item .ws-check-text { flex: 1 1 auto; }
.ws-check-item.done .ws-check-text { color: #80868b; text-decoration: line-through; }

/* 富条目：一条包含标题 + 若干补充行（协作单位那种「管什么/报障渠道/响应时限」）。
   整条勾选后只给标题划删除线，补充行转灰不划线——那些是仍要照着做的联系信息。 */
.ws-check-item-rich { margin: 8px 0; }

.ws-check-item-rich .ws-check-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ws-check-item .ws-check-title { font-size: 13px; }
.ws-check-item-rich .ws-check-title { font-weight: 600; color: #174ea6; }
.ws-check-item-rich.done .ws-check-title { color: #80868b; }
.ws-check-item-rich.done .ws-check-meta,
.ws-check-item-rich.done .ws-check-note { color: #9aa0a6; }

.ws-check-item .ws-check-note { font-size: 12.5px; color: #5f6368; }

.ws-check-meta { display: flex; flex-direction: column; gap: 1px; }

.ws-check-meta .ws-meta-line {
  font-size: 12.5px;
  line-height: 1.55;
  color: #5f6368;
}

.ws-check-item-rich.done .ws-check-meta .ws-meta-line { text-decoration: none; }

@media print {
  .ws-check-item-rich { break-inside: avoid; page-break-inside: avoid; }
}

/* ---------------- 客户类型 ---------------- */

.ws-pfgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
}

.ws-pfcard {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  padding: 10px 12px;
}

.ws-pf-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ws-line);
}

.ws-pf-icon {
  font-size: 20px;
  line-height: 1;
}
.ws-pf-name { margin: 0; font-size: 15px; }

ul.ws-forbid {
  background: #fdf3f2;
  border: 1px solid #f6c9c4;
  border-radius: 6px;
  padding: 6px 0 6px 20px;
}

ul.ws-forbid li { color: #8c2d24; margin: 2px 0; }
ul.ws-forbid li::marker { color: var(--ws-p1); }

ul.ws-deliver li::marker { color: var(--ws-primary); }

/* ---- 画像切换器与四阶段清单 ---- */

.ws-pfbar { margin-bottom: 4px; }

.ws-pfbtn .ws-pfbtn-dot {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--ws-soft);
  color: var(--ws-muted);
  border-radius: 20px;
  padding: 0 6px;
  margin-left: 2px;
}

.ws-pfbtn.active .ws-pfbtn-dot { background: rgba(255, 255, 255, .28); color: #fff; }

/* 清单卡片头：取证/常备等清单原本只用标题，改成 flex 后阶段名与进度才能同行 */
.ws-evg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ws-pfhead {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ws-line);
}

.ws-pf-title { margin: 0; font-size: 15.5px; font-weight: 700; }

.ws-pfstages { display: flex; flex-direction: column; gap: 10px; }

/* 单个阶段：左侧一道竖条标出阶段性质，红线阶段单独用红 */
.ws-pfstage {
  border-left: 3px solid var(--ws-line);
  padding-left: 10px;
}

.ws-pfstage-redline { border-left-color: var(--ws-p1); }

.ws-pfstage .ws-evgrid { margin-top: 2px; }

/* 阶段名：开工前 / 处置中 / 收尾前 / 收尾后 */
.ws-grp-phase {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #174ea6;
  background: #e8f0fe;
  border-radius: 4px;
  padding: 1px 7px;
}

.ws-grp-bar {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ws-muted);
  background: var(--ws-soft);
  border-radius: 20px;
  padding: 1px 9px;
}

.ws-grp-bar-redline { color: #8c2d24; background: #fce8e6; }

.ws-grp-hint {
  margin: 2px 0 4px;
  font-size: 12.5px;
  color: var(--ws-muted);
  line-height: 1.55;
}

.ws-grp-hint-redline { color: #8c2d24; }

.ws-evg-redline { border-color: #f6c9c4; background: #fffbfb; }

.ws-pfall {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--ws-line);
}


ul.ws-fieldlist li::marker { color: var(--ws-primary); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .ws-root { padding: 8px 8px 40px; font-size: 13.5px; }

  .ws-subnav { position: static; }
  .ws-subtab { flex: 1 1 auto; text-align: center; padding: 7px 8px; }

  .ws-catbar { gap: 5px; }
  .ws-catbtn { font-size: 12.5px; padding: 4px 9px; }

  .ws-rolegrid,
  .ws-repgrid,
  .ws-evgrid,
  .ws-pfgrid,
  .ws-lvgrid { grid-template-columns: 1fr; }

  .ws-pfstage { padding-left: 7px; }
  .ws-pfhead { gap: 6px; }
  .ws-pfall { justify-content: stretch; }
  .ws-pfall .ws-btn { flex: 1 1 auto; }

  .ws-step-title { flex: 1 1 100%; }
  .ws-field { flex-direction: column; gap: 0; }
  .ws-lb { min-width: 0; }

  .ws-tl-item { gap: 8px; }
  .ws-tl-item:not(:last-child)::before { left: 17px; }
  .ws-tl-dot { width: 36px; height: 24px; font-size: 12px; }
  .ws-tl-axis { flex: 0 0 36px; }

  /* 表格在窄屏允许内部横向滚动，但滚动必须留在 .ws-tablewrap 里。
     这里不能写 min-width——它会把祖先网格列一起撑开，溢出跑到整个页面上。 */
  .ws-table { min-width: 0; }
  .ws-table th,
  .ws-table td { white-space: normal; }

  /* 网格子项默认 min-width:auto，内容一宽就把列顶出去；显式归零后才肯收缩 */
  .ws-rolegrid > *,
  .ws-repgrid > *,
  .ws-evgrid > *,
  .ws-pfgrid > *,
  .ws-lvgrid > * { min-width: 0; }
}

@media (max-width: 520px) {
  .ws-tpl { max-height: 240px; }
  .ws-zero-title { font-size: 16px; }
}

/* ---------------- 打印 ---------------- */

@media print {
  .ws-root {
    background: #fff;
    color: #000;
    max-width: none;
    padding: 0;
    margin: 0;
    font-size: 11pt;
  }

  /* 去掉导航、按钮与交互控件 */
  .ws-noprint,
  .ws-subnav,
  .ws-btn,
  .ws-catbar,
  .ws-ctrl,
  .ws-tools { display: none !important; }

  .ws-printhead {
    display: block;
    font-size: 15pt;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid #000;
    padding-bottom: 6px;
    margin-bottom: 10px;
  }

  .ws-grp-bar { background: transparent !important; color: #000 !important; }
  .ws-pfstage { break-inside: avoid; page-break-inside: avoid; }
  .ws-evg-redline,
  .ws-pfstage-redline { border-color: #999 !important; }

  /* 打印时只保留「分步作业单」区块，其余区块整块隐藏，便于整页干净打印 */
  .ws-panel { display: none !important; }
  .ws-panel[data-ws-panel="plan"] { display: block !important; }
  .ws-panel[data-ws-panel="plan"][hidden] { display: block !important; }

  .ws-step,
  .ws-card,
  .ws-zero,
  .ws-tl-body,
  .ws-rolecard,
  .ws-repcard,
  .ws-pfcard,
  .ws-evg,
  .ws-lvcard {
    background: #fff !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ws-step { border-color: #999; }
  .ws-step-cause { background: #fff !important; }
  .ws-step-goto { background: #fff !important; }
  .ws-tip, .ws-note, .ws-note-escalate, .ws-note-handoff { background: #fff !important; border: 1px solid #999; }
  .ws-note { border-left-width: 3px; }
  .ws-bd-star { background: #fff !important; }
  .ws-tpl { max-height: none; overflow: visible; background: #fff; }
  .ws-tablewrap { overflow: visible; }
  .ws-table { min-width: 0; }
  .ws-table thead th { background: #f0f0f0 !important; position: static; }
  .ws-catblock { break-before: auto; }
  .ws-cathead { break-after: avoid; }
}
