/* ==========================================================================
   豚生科研系统 · 模板 / 空间 / 客户空间 / 试点清单 专属样式
   仅使用 .tpl- / .ws- / .cust- / .pilot- 前缀，避免污染基础设计系统
   ========================================================================== */

/* ---------------------------------------------------------------- 通用 */
.tpl-tone-green { background: var(--primary-soft); color: var(--primary-deep); }
.tpl-tone-blue { background: var(--blue-soft); color: var(--blue); }
.tpl-tone-teal { background: var(--teal-soft); color: var(--teal); }
.tpl-tone-amber { background: var(--amber-soft); color: var(--amber); }
.tpl-tone-violet { background: var(--violet-soft); color: var(--violet); }
.tpl-tone-gray { background: var(--surface-3); color: var(--muted); }

.tpl-page .section-head { margin-top: 2px; }

/* ================================================================ 模板列表 */
.tpl-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, #0c2f25 0%, #114434 58%, #1a5b45 100%);
  color: #eef5e9;
  padding: 22px 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 10px 28px rgba(10, 41, 31, .13);
}
.tpl-hero::before {
  content: "";
  position: absolute;
  width: 380px; height: 380px; border-radius: 50%;
  right: -110px; top: -190px;
  background: radial-gradient(circle, rgba(200, 233, 107, .2), transparent 66%);
  pointer-events: none;
}
.tpl-hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
  pointer-events: none;
}
.tpl-hero-main { position: relative; z-index: 1; min-width: 0; flex: 1; }
.tpl-kicker { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .09em; font-weight: 600; text-transform: uppercase; color: rgba(230, 242, 223, .5); }
.tpl-kicker .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(200, 233, 107, .12); }
.tpl-hero-title { font-size: 20px; line-height: 1.35; font-weight: 700; letter-spacing: -.025em; color: #f5f9ef; margin-top: 9px; }
.tpl-hero-desc { font-size: 12px; line-height: 1.7; color: rgba(236, 246, 231, .62); margin-top: 7px; max-width: 760px; }
.tpl-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tpl-hero-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 9px; border-radius: 20px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  font-size: 10.5px; color: rgba(238, 246, 232, .66);
}
.tpl-hero-chip svg { color: rgba(200, 233, 107, .8); }
.tpl-hero-chip strong { color: #e9f7c8; font-weight: 700; }
.tpl-hero-side {
  position: relative; z-index: 1; flex: none; width: 262px;
  border-radius: 13px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  padding: 13px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.tpl-hero-side-label { font-size: 10px; letter-spacing: .06em; color: rgba(238, 246, 232, .45); font-weight: 600; }
.tpl-hero-steps { display: flex; flex-direction: column; gap: 8px; }
.tpl-hero-step { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: rgba(244, 250, 240, .86); }
.tpl-hero-step i {
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(200, 233, 107, .16); color: var(--lime);
  font-style: normal; font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center; flex: none;
}
.tpl-hero-side-foot { display: flex; align-items: flex-start; gap: 5px; font-size: 9.5px; line-height: 1.5; color: rgba(230, 242, 223, .42); padding-top: 9px; border-top: 1px solid rgba(255,255,255,.09); }
.tpl-hero-side-foot svg { flex: none; margin-top: 1px; color: rgba(200, 233, 107, .6); }

/* 模板卡片 */
.tpl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.tpl-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  padding: 17px 18px 15px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.tpl-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tpl-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.tpl-card.is-full::before { background: linear-gradient(180deg, var(--primary), var(--lime)); }
.tpl-card.is-light::before { background: linear-gradient(180deg, var(--blue), #9dc0de); }
.tpl-card.is-light { background: linear-gradient(180deg, #fbfdff, #fff 42%); }
.tpl-card-top { display: flex; align-items: flex-start; gap: 11px; }
.tpl-card-icon {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-deep);
}
.tpl-card.is-light .tpl-card-icon { background: var(--blue-soft); color: var(--blue); }
.tpl-card-title-wrap { flex: 1; min-width: 0; }
.tpl-card-name { font-size: 14.5px; font-weight: 680; letter-spacing: -.015em; color: var(--ink); line-height: 1.4; }
.tpl-card-industry { font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.tpl-card-summary { font-size: 11.5px; line-height: 1.65; color: var(--muted); min-height: 38px; }
.tpl-card-stats {
  display: flex; align-items: center; gap: 0;
  padding: 9px 0; border-top: 1px solid #eef0ea; border-bottom: 1px solid #eef0ea;
}
.tpl-card-stats span { flex: 1; display: flex; align-items: baseline; gap: 4px; font-size: 10px; color: var(--faint); padding-left: 10px; border-left: 1px solid #eef0ea; }
.tpl-card-stats span:first-child { padding-left: 0; border-left: 0; }
.tpl-card-stats strong { font-size: 16px; font-weight: 720; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tpl-mini-flow { display: flex; flex-wrap: wrap; gap: 5px; }
.tpl-mini-phase {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 4px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 10px; color: var(--ink-2);
}
.tpl-mini-phase i {
  width: 15px; height: 15px; border-radius: 5px;
  font-style: normal; font-size: 8.5px; font-weight: 700;
  display: grid; place-items: center;
}
.tpl-highlights { margin-top: 1px; }
.tpl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.tpl-card-actions { display: flex; align-items: center; gap: 7px; }

/* 横向流程 */
.tpl-flow-card { margin-bottom: 18px; }
.tpl-flow-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--faint); }
.tpl-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 14px; align-items: start; }
.tpl-flow-phase { position: relative; min-width: 0; }
.tpl-flow-phase + .tpl-flow-phase::before {
  content: "›";
  position: absolute; left: -11px; top: 26px;
  font-size: 17px; line-height: 1; color: #b9c8ba; font-weight: 600;
}
.tpl-flow-phase-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px dashed var(--line); }
.tpl-flow-index {
  width: 19px; height: 19px; border-radius: 6px; flex: none;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700;
}
.tpl-flow-phase-name { font-size: 11.5px; font-weight: 660; color: var(--ink-2); flex: 1; min-width: 0; }
.tpl-flow-phase-count { font-size: 9px; color: var(--faint); white-space: nowrap; }
.tpl-flow-nodes { display: flex; flex-direction: column; gap: 7px; }
.tpl-node {
  width: 100%; display: flex; align-items: center; gap: 8px;
  text-align: left; padding: 8px 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
  color: var(--ink-2);
}
.tpl-node:hover { border-color: #b8d5c1; box-shadow: var(--shadow-xs); transform: translateY(-1px); background: var(--primary-faint); }
.tpl-node:hover .tpl-node-arrow { color: var(--primary); }
.tpl-node-seq {
  width: 21px; height: 21px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
  font-size: 9.5px; font-weight: 700;
}
.tpl-node-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tpl-node-name { font-size: 11.3px; font-weight: 600; color: var(--ink-2); line-height: 1.4; }
.tpl-node-meta { font-size: 9.2px; color: var(--faint); line-height: 1.45; }
.tpl-node-side { display: inline-flex; align-items: center; gap: 4px; flex: none; color: #b5c1b7; }
.tpl-node-gate {
  display: inline-flex; align-items: center; gap: 2px;
  height: 17px; padding: 0 5px; border-radius: 5px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 8.5px; font-weight: 700;
}
.tpl-flow-empty { display: flex; align-items: center; gap: 8px; padding: 24px; color: var(--faint); font-size: 11.5px; justify-content: center; }

/* 对照表 */
.tpl-compare { margin-bottom: 18px; overflow: hidden; }
.tpl-compare-legend { display: flex; align-items: center; gap: 7px; }
.tpl-compare-table { min-width: 640px; }
.tpl-compare-table thead th { padding-top: 11px; padding-bottom: 11px; }
.tpl-th { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.tpl-th-full { color: var(--primary-deep); }
.tpl-th-light { color: var(--blue); }
.tpl-dim { width: 168px; background: var(--surface-2); }
.tpl-dim-name { font-size: 11.5px; font-weight: 620; color: var(--ink-2); }
.tpl-compare-cell { font-size: 11.5px; line-height: 1.6; color: var(--ink-2); }
.tpl-compare-table tbody tr td:nth-child(2) { background: rgba(242, 248, 244, .62); }
.tpl-compare-table tbody tr td:nth-child(3) { background: rgba(234, 241, 248, .38); }
.tpl-compare-foot {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 18px; border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 10.5px; line-height: 1.65; color: var(--muted);
  border-radius: 0 0 var(--radius) var(--radius);
}
.tpl-compare-foot svg { flex: none; margin-top: 2px; color: var(--primary); }

/* CTA */
.tpl-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid #dce8d5;
  background: linear-gradient(120deg, #f7fbf4, #eef6ea);
  margin-top: 2px;
}
.tpl-cta-main { min-width: 0; }
.tpl-cta-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 670; color: var(--ink); }
.tpl-cta-title svg { color: var(--primary); }
.tpl-cta-desc { font-size: 11px; line-height: 1.65; color: var(--muted); margin-top: 4px; max-width: 820px; }
.tpl-cta-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* ================================================================ 模板详情 */
.tpl-detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tpl-detail-meta-item { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--faint); padding: 0 2px; }
.tpl-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tpl-detail-layout { margin-top: 16px; }
.tpl-phase-card { padding: 0; overflow: hidden; }
.tpl-phase-head {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 16px;
  background: linear-gradient(180deg, var(--surface-2), #fff);
  border-bottom: 1px solid var(--line);
}
.tpl-phase-index {
  width: 27px; height: 27px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 720;
}
.tpl-phase-main { flex: 1; min-width: 0; }
.tpl-phase-name { font-size: 13px; font-weight: 680; color: var(--ink); letter-spacing: -.01em; }
.tpl-phase-sub { font-size: 10px; color: var(--faint); margin-top: 2px; }
.tpl-phase-roles { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.tpl-stage-list { display: flex; flex-direction: column; }
.tpl-stage-row {
  width: 100%; text-align: left;
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 16px;
  background: #fff; border: 0; border-bottom: 1px solid #eef0ea;
  transition: background .14s;
}
.tpl-stage-row:last-child { border-bottom: 0; }
.tpl-stage-row:hover { background: #fbfdf9; }
.tpl-stage-row:hover .tpl-stage-cta { color: var(--primary); }
.tpl-stage-seq {
  width: 25px; height: 25px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
  font-size: 10px; font-weight: 700; margin-top: 1px;
}
.tpl-stage-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tpl-stage-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 620; color: var(--ink); }
.tpl-stage-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10px; color: var(--faint); }
.tpl-stage-meta .role-tag { height: 19px; font-size: 9.5px; }
.tpl-stage-dot { width: 3px; height: 3px; border-radius: 50%; background: #cdd6cc; }
.tpl-stage-handoff {
  display: flex; align-items: flex-start; gap: 5px;
  font-size: 10.5px; line-height: 1.55; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis;
}
.tpl-stage-handoff svg { flex: none; margin-top: 2px; color: #a9b5aa; }
.tpl-stage-cta {
  flex: none; display: inline-flex; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 650; color: var(--faint);
  padding-top: 4px; transition: color .14s;
}
.tpl-gate-summary { display: flex; flex-direction: column; gap: 6px; }
.tpl-gate-stage {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 9px;
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); text-align: left;
  transition: border-color .15s, background .15s;
}
.tpl-gate-stage:hover { border-color: #e2cfa7; background: var(--amber-soft); }
.tpl-gate-stage-main { min-width: 0; }
.tpl-gate-stage-name { display: block; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.tpl-gate-stage-meta { display: block; font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.tpl-gate-stage-count { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--amber); flex: none; }
.tpl-use-card { padding: 15px 16px; display: flex; flex-direction: column; gap: 8px; }
.tpl-use-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 660; color: var(--ink); }
.tpl-use-title svg { color: var(--primary); }
.tpl-use-desc { font-size: 10.8px; line-height: 1.65; color: var(--muted); }
.tpl-ai-overview { padding: 16px 17px; }
.tpl-ai-panel { padding: 14px 15px; border-radius: 12px; }

/* 阶段抽屉 */
.tpl-drawer-hero { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: var(--surface-2); }
.tpl-drawer-tags { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 11px; }
.tpl-drawer-sla { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.tpl-drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 16px; }
.tpl-drawer-section { margin-top: 18px; }
.tpl-drawer-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 660; color: var(--ink); margin-bottom: 9px; }
.tpl-drawer-title svg { color: var(--primary); }
.tpl-drawer-section .section-head { margin-bottom: 10px; }
.tpl-drawer-section .section-head .section-title { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.tpl-drawer-section .section-head .section-title svg { color: var(--primary); }
.tpl-field-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tpl-field-list li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 11.5px; line-height: 1.55; color: var(--ink-2);
}
.tpl-field-mark {
  width: 17px; height: 17px; border-radius: 5px; flex: none;
  display: grid; place-items: center; margin-top: 1px;
  background: var(--primary-soft); color: var(--primary-deep);
}
.tpl-decision-list { list-style: none; counter-reset: tpl-decision; display: flex; flex-direction: column; gap: 7px; }
.tpl-decision-list li {
  position: relative; padding: 9px 11px 9px 32px;
  border: 1px solid #dfe8f1; border-radius: 9px;
  background: #f6fafd; font-size: 11.5px; line-height: 1.6; color: #3c5468;
  counter-increment: tpl-decision;
}
.tpl-decision-list li::before {
  content: counter(tpl-decision);
  position: absolute; left: 9px; top: 9px;
  width: 17px; height: 17px; border-radius: 5px;
  background: var(--blue-soft); color: var(--blue);
  font-size: 9px; font-weight: 700; display: grid; place-items: center;
}
.tpl-gate-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tpl-gate-list li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border: 1px solid #efe2c9; border-radius: 9px;
  background: var(--amber-soft); font-size: 11.5px; line-height: 1.55; color: #6f5119;
}
.tpl-gate-icon {
  width: 17px; height: 17px; border-radius: 5px; flex: none;
  display: grid; place-items: center; margin-top: 1px;
  background: #f3e2c4; color: var(--amber);
}
.tpl-drawer-none { font-size: 10.5px; color: var(--faint); padding: 4px 0; }
.tpl-drawer-note { margin-top: 18px; }

/* ================================================================ 空间与流程 */
.ws-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ws-layout { margin-top: 16px; }
.ws-perm-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--primary-deep); background: var(--primary-faint); border: 1px solid #d9e8de; border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
.ws-perm-hint.is-locked { color: var(--faint); background: var(--surface-2); border-color: var(--line); }
.ws-space-form .form-actions { margin-top: 16px; }
.ws-space-form .form-actions .left { display: flex; align-items: center; gap: 5px; }
.ws-space-form .form-actions .left svg { color: var(--faint); }

/* 模块 */
.ws-chain {
  display: flex; align-items: stretch; gap: 10px;
  padding: 11px 13px; margin-bottom: 14px;
  border: 1px dashed var(--line-strong); border-radius: 11px;
  background: var(--surface-2);
}
.ws-chain-step { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ws-chain-node {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  height: 24px; padding: 0 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 650;
}
.ws-chain-node.req { background: var(--blue-soft); color: var(--blue); }
.ws-chain-node.chg { background: var(--violet-soft); color: var(--violet); }
.ws-chain-node.out { background: var(--primary-soft); color: var(--primary-deep); }
.ws-chain-desc { font-size: 9.8px; line-height: 1.5; color: var(--faint); }
.ws-chain-arrow { display: grid; place-items: center; color: #b9c6bb; flex: none; }
.ws-modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ws-module {
  position: relative;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; transition: border-color .16s, box-shadow .16s;
  overflow: hidden;
}
.ws-module.is-on { border-color: #b9d5c3; box-shadow: 0 2px 10px rgba(23, 107, 82, .06); }
.ws-module.is-off { background: var(--surface-2); }
.ws-module.is-off .ws-module-name,
.ws-module.is-off .ws-module-desc { color: var(--faint); }
.ws-module-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px 10px; }
.ws-module-icon {
  width: 33px; height: 33px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
}
.ws-module-icon.req { background: var(--blue-soft); color: var(--blue); }
.ws-module-icon.chg { background: var(--violet-soft); color: var(--violet); }
.ws-module-main { flex: 1; min-width: 0; }
.ws-module-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.3px; font-weight: 650; color: var(--ink); }
.ws-module-no { font-size: 9px; font-weight: 600; color: var(--faint); background: var(--surface-3); border-radius: 4px; padding: 1px 4px; }
.ws-module-desc { font-size: 10.3px; line-height: 1.55; color: var(--muted); margin-top: 4px; }
.ws-module-switch { margin-top: 3px; }
.ws-module-foot { padding: 7px 13px 9px; border-top: 1px solid #f0f2ec; }
.ws-module-foot-item { display: flex; align-items: flex-start; gap: 5px; font-size: 9.5px; line-height: 1.5; color: var(--faint); }
.ws-module-foot-item svg { flex: none; margin-top: 1px; }
.ws-module-actions { margin-top: 14px; }
.ws-modules-card .callout { margin-top: 2px; }

/* 流程步骤 */
.ws-process-head-side { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--faint); white-space: nowrap; padding-top: 3px; }
.ws-process-head-side svg { color: #a6b2a7; }
.ws-process-body { padding-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.ws-phase { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ws-phase-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.ws-phase-index {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-deep);
  font-size: 9.5px; font-weight: 700;
}
.ws-phase-name { font-size: 11.5px; font-weight: 650; color: var(--ink-2); flex: 1; }
.ws-phase-count { font-size: 9.5px; color: var(--faint); }
.ws-step-list { display: flex; flex-direction: column; }
.ws-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 12px; border-bottom: 1px solid #eef0ea;
  transition: background .14s;
}
.ws-step:last-child { border-bottom: 0; }
.ws-step:hover { background: #fbfdf9; }
.ws-step-seq {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
  font-size: 9.5px; font-weight: 700; margin-top: 1px;
}
.ws-step-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-step-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.2px; font-weight: 620; color: var(--ink); }
.ws-badge-custom { background: var(--blue-soft); color: var(--blue); }
.ws-step-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 9.8px; color: var(--faint); }
.ws-step-meta .role-tag { height: 19px; font-size: 9.5px; }
.ws-step-dot { width: 3px; height: 3px; border-radius: 50%; background: #cdd6cc; }
.ws-step-handoff { display: flex; align-items: flex-start; gap: 5px; font-size: 10px; line-height: 1.55; color: var(--muted); }
.ws-step-handoff svg { flex: none; margin-top: 2px; color: #a9b5aa; }
.ws-step-actions { flex: none; padding-top: 1px; }

/* 健康度 / 侧栏 */
.ws-health-main { display: flex; align-items: baseline; gap: 7px; margin-bottom: 9px; }
.ws-health-num { font-size: 28px; font-weight: 720; letter-spacing: -.04em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.ws-health-num em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
.ws-health-label { font-size: 10.5px; color: var(--faint); }
.ws-health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 13px; }
.ws-health-item { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.ws-health-k { font-size: 9px; color: var(--faint); }
.ws-health-v { font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.ws-health-tip { display: flex; align-items: flex-start; gap: 5px; font-size: 9.8px; line-height: 1.55; color: var(--faint); margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.ws-health-tip svg { flex: none; margin-top: 1px; }
.ws-ai-note { padding: 15px 16px; }
.ws-action-list { display: flex; flex-direction: column; gap: 2px; }
.ws-action {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 9px; margin: 0 -8px;
  transition: background .14s;
}
.ws-action:hover { background: var(--surface-2); }
.ws-action > svg { color: #b5c1b6; flex: none; }
.ws-action-icon {
  width: 29px; height: 29px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.ws-action-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ws-action-title { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.ws-action-desc { font-size: 9.5px; color: var(--faint); line-height: 1.45; }

/* 流程环节编辑 */
.ws-step-editor-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.ws-step-editor .callout { margin-top: 16px; }
.ws-step-editor .form-grid { gap: 13px 16px; }

/* ================================================================ 成员与权限 */
.ws-member-summary {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 13px 18px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.ws-sum-item { display: flex; flex-direction: column; gap: 1px; min-width: 72px; }
.ws-sum-num { font-size: 22px; font-weight: 720; letter-spacing: -.035em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ws-sum-label { font-size: 9.5px; color: var(--faint); }
.ws-sum-note { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 10px; color: var(--faint); max-width: 520px; line-height: 1.5; }
.ws-sum-note svg { flex: none; color: var(--primary); }
.ws-members-layout { margin-bottom: 8px; }
.ws-member-table td { vertical-align: middle; }
.ws-member-cell { display: flex; align-items: center; gap: 10px; }
.ws-member-main { min-width: 0; }
.ws-member-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 620; color: var(--ink); }
.ws-member-mail { font-size: 10px; color: var(--faint); margin-top: 2px; }
.ws-member-title { margin-top: 3px; }
.ws-role-matrix-card { overflow: hidden; }
.ws-role-matrix td { font-size: 11px; vertical-align: top; }
.ws-role-matrix .role-tag { margin-bottom: 4px; }
.ws-role-duty { line-height: 1.6; color: var(--muted); min-width: 230px; }
.ws-role-data { font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.ws-iso-list { display: flex; flex-direction: column; gap: 11px; }
.ws-iso-item { display: flex; align-items: flex-start; gap: 9px; }
.ws-iso-item > svg { flex: none; margin-top: 2px; color: var(--primary); }
.ws-iso-item strong { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.ws-iso-item span { display: block; font-size: 10.3px; line-height: 1.55; color: var(--muted); margin-top: 1px; }
.ws-role-tip { padding: 15px 16px; display: flex; flex-direction: column; gap: 8px; }
.ws-role-tip-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 660; color: var(--ink); }
.ws-role-tip-title svg { color: var(--primary); }
.ws-role-tip-desc { font-size: 10.8px; line-height: 1.7; color: var(--muted); }
.ws-role-tip .btn { align-self: flex-start; }
.ws-member-edit-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 13px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.ws-member-edit-note svg { flex: none; margin-top: 1px; color: var(--primary); }

/* ================================================================ AI 模型服务 */
.ws-ai-hero { padding: 17px 18px; margin-bottom: 16px; }
.ws-ai-layout { margin-bottom: 8px; }
.ws-ai-form-card .callout { margin-top: 14px; }
.ws-ai-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 17px; }
.ai-provider {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.ai-provider:hover { border-color: var(--line-strong); }
.ai-provider input { position: absolute; opacity: 0; width: 0; height: 0; }
.ai-provider.is-active { border-color: #a9cbb7; background: var(--primary-faint); box-shadow: inset 0 0 0 1px rgba(23,107,82,.12); }
.ai-provider-icon {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
}
.ai-provider.is-active .ai-provider-icon { background: var(--primary-soft); color: var(--primary-deep); }
.ai-provider-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-provider-name { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.ai-provider-desc { font-size: 10px; line-height: 1.5; color: var(--faint); }
.ai-provider-check { color: #c3cec4; flex: none; margin-top: 2px; }
.ai-provider.is-active .ai-provider-check { color: var(--primary); }
.ws-ai-fields { transition: opacity .16s; }
.ws-ai-fields.is-disabled { opacity: .55; }
.ws-ai-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ws-ai-switch-title { font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.ws-ai-form .form-actions { flex-wrap: wrap; gap: 8px; }
.ws-ai-form .form-actions .left { flex: 1 1 220px; display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--faint); }
.ws-ai-form .form-actions .left svg { flex: none; }
.ws-test-ok { display: inline-flex; align-items: flex-start; gap: 5px; color: var(--primary-deep); line-height: 1.5; }
.ws-test-ok svg { flex: none; margin-top: 1px; color: var(--primary); }
.ws-test-fail { display: inline-flex; align-items: flex-start; gap: 5px; color: var(--red); line-height: 1.5; }
.ws-test-fail svg { flex: none; margin-top: 1px; }
.ws-ai-form .spinner { width: 12px; height: 12px; border: 2px solid rgba(20,33,29,.18); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -1px; }
@keyframes wsSpin { to { transform: rotate(360deg); } }
.ws-ai-kv { gap: 11px 16px; }
.ws-ai-status-card .callout { margin-top: 12px; }
.ws-ai-security .card-body { padding-top: 12px; }
.ws-ai-tip { padding: 15px 16px; }
.ws-scenes { display: flex; flex-direction: column; gap: 8px; }
.ws-scene {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
}
.ws-scene-main { min-width: 0; }
.ws-scene-name { font-size: 11.8px; font-weight: 620; color: var(--ink); }
.ws-scene-note { font-size: 10.3px; line-height: 1.55; color: var(--muted); margin-top: 3px; }
.ws-scene-confirm { display: flex; align-items: center; gap: 5px; flex: none; font-size: 9.5px; color: var(--faint); padding-top: 2px; }
.ws-scene-confirm svg { color: var(--primary); }
.ws-scene-confirm .role-tag { height: 19px; font-size: 9px; }
.ws-ai-principle { margin-top: 12px; }

/* ================================================================ 客户空间 */
.cust-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cust-iso-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  padding: 15px 18px; margin: 16px 0;
  border-radius: var(--radius);
  background: linear-gradient(112deg, #0e3026 0%, #144938 62%, #1c5a44 100%);
  color: #edf5e9;
  box-shadow: 0 8px 22px rgba(10, 41, 31, .12);
}
.cust-iso-banner::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, #000, transparent 68%);
  pointer-events: none;
}
.cust-iso-icon {
  position: relative; z-index: 1;
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: rgba(200, 233, 107, .14); color: var(--lime);
  border: 1px solid rgba(200, 233, 107, .18);
}
.cust-iso-main { position: relative; z-index: 1; min-width: 0; flex: 1; }
.cust-iso-title { font-size: 13px; font-weight: 680; color: #f1f8ec; }
.cust-iso-desc { font-size: 10.5px; line-height: 1.6; color: rgba(236, 246, 231, .55); margin-top: 3px; max-width: 620px; }
.cust-iso-points { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; flex: none; }
.cust-iso-point { display: flex; align-items: center; gap: 6px; font-size: 10px; color: rgba(238, 246, 232, .72); }
.cust-iso-point svg { color: rgba(200, 233, 107, .72); flex: none; }
.cust-table td { vertical-align: middle; }
.cust-space-cell { display: flex; align-items: center; gap: 10px; }
.cust-space-icon {
  width: 31px; height: 31px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.cust-space-main { min-width: 0; }
.cust-space-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 620; color: var(--ink); white-space: nowrap; }
.cust-space-slug { font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.cust-industry { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cust-template { display: flex; flex-direction: column; gap: 3px; max-width: 200px; }
.cust-template-name { font-size: 11px; color: var(--ink-2); line-height: 1.45; }
.cust-template .badge { width: fit-content; }
.cust-module-chips { max-width: 210px; }
.cust-admin { display: flex; flex-direction: column; gap: 1px; }
.cust-admin-name { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.cust-admin-mail { font-size: 9.5px; color: var(--faint); }
.cust-counts { display: flex; align-items: baseline; gap: 10px; justify-content: flex-end; }
.cust-counts span { display: inline-flex; align-items: baseline; gap: 3px; font-size: 9.5px; color: var(--faint); white-space: nowrap; }
.cust-counts strong { font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.cust-time { display: flex; flex-direction: column; gap: 2px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.cust-foot-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 14px; padding: 10px 13px;
  border: 1px dashed var(--line-strong); border-radius: 10px;
  background: rgba(255,255,255,.5);
  font-size: 10.5px; line-height: 1.6; color: var(--faint);
}
.cust-foot-note svg { flex: none; margin-top: 1px; color: var(--faint); }
.cust-module-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.cust-module-options .checkbox-line { align-items: flex-start; }
.cust-module-options .checkbox-line > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cust-module-options .cl-title { display: block; }
.cust-create-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 0; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 10.5px; font-weight: 650; color: var(--faint);
  letter-spacing: .04em;
}
.cust-create-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 创建成功 / 一次性账号 */
.cust-created-hero { display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; border-radius: 12px; background: linear-gradient(120deg, var(--primary-faint), #f4faf0); border: 1px solid #d8e8da; }
.cust-created-hero > svg { color: var(--primary); flex: none; margin-top: 1px; }
.cust-created-title { font-size: 14px; font-weight: 680; color: var(--ink); }
.cust-created-sub { font-size: 10.8px; line-height: 1.6; color: var(--muted); margin-top: 3px; }
.cust-created-kv { margin-top: 15px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.cust-created-warn {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 14px; padding: 11px 13px;
  border-radius: 10px; border: 1px solid #f0ddbd; background: var(--amber-soft);
  font-size: 11px; line-height: 1.6; color: #7d5a25;
}
.cust-created-warn svg { flex: none; margin-top: 1px; color: var(--amber); }
.cust-created-accounts-head { margin-top: 18px; }
.cust-account {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
}
.cust-account:last-of-type { margin-bottom: 0; }
.cust-account-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 650;
}
.cust-account-main { flex: 1; min-width: 0; }
.cust-account-name { display: flex; align-items: center; gap: 6px; font-size: 12.3px; font-weight: 650; color: var(--ink); }
.cust-account-cred { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.cust-password { color: #8a5b19; background: var(--amber-soft); border: 1px solid #f0ddbd; border-radius: 5px; padding: 1px 6px; font-weight: 650; }
.cust-cred-sep { color: #c6cfc5; }
.cust-created-modules { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.cust-created-modules .chips { margin-top: 0; }

/* 元信息抽屉 */
.cust-detail-hero { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cust-detail-avatar { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.cust-detail-main { min-width: 0; }
.cust-detail-name { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 680; color: var(--ink); }
.cust-detail-slug { font-size: 10px; color: var(--faint); margin-top: 2px; }
.cust-detail-kv { margin-top: 16px; }
.cust-detail-modules { margin: 16px 0 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.cust-detail-modules .section-title { margin-bottom: 8px; }

/* ================================================================ 试点清单 */
.pilot-summary {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 11px 16px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-xs);
}
.pilot-summary-item { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--faint); }
.pilot-summary-item svg { color: #9aa89c; flex: none; }
.pilot-summary-item strong { font-size: 14px; font-weight: 720; color: var(--ink); letter-spacing: -.02em; }
.pilot-summary-note { margin-left: auto; color: var(--faint); }
.pilot-summary-note svg { color: var(--primary); }
.pilot-layout { margin-bottom: 8px; }
.pilot-config-card .card-body { padding-top: 13px; }
.pilot-section-label { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 11.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 9px; }
.pilot-section-label .req { color: var(--red); }
.pilot-section-hint { font-size: 9.5px; font-weight: 450; color: var(--faint); }
.pilot-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
.pilot-option {
  position: relative;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.pilot-option.is-checked,
.pilot-option:has(input:checked) { border-color: #a9cbb7; background: var(--primary-faint); box-shadow: inset 0 0 0 1px rgba(23,107,82,.1); }
.pilot-option.is-disabled { background: var(--surface-2); }
.pilot-option-label { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; cursor: pointer; }
.pilot-option.is-disabled .pilot-option-label { cursor: not-allowed; }
.pilot-option-label > input { margin: 2px 0 0; width: 15px; height: 15px; accent-color: var(--primary); flex: none; }
.pilot-option-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pilot-option-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pilot-option-icon { width: 27px; height: 27px; border-radius: 8px; flex: none; display: grid; place-items: center; }
.pilot-option-icon.req { background: var(--blue-soft); color: var(--blue); }
.pilot-option-icon.chg { background: var(--violet-soft); color: var(--violet); }
.pilot-option-name { font-size: 12.3px; font-weight: 650; color: var(--ink); }
.pilot-option-desc { font-size: 10.3px; line-height: 1.55; color: var(--muted); }
.pilot-option.is-disabled .pilot-option-name,
.pilot-option.is-disabled .pilot-option-desc { color: var(--faint); }
.pilot-option-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 9.3px; color: var(--faint); }
.pilot-option-meta span { display: inline-flex; align-items: center; gap: 3px; }
.pilot-option-meta svg { color: #a3afa5; }
.pilot-option-enable {
  display: inline-flex; align-items: center; gap: 4px;
  margin: -2px 13px 11px 42px;
  font-size: 10px; font-weight: 600; color: var(--primary);
}
.pilot-option-enable:hover { text-decoration: underline; text-underline-offset: 2px; }
.pilot-form-grid { gap: 13px 16px; }
.pilot-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pilot-actions-main { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pilot-stale { display: inline-flex; align-items: center; gap: 4px; font-size: 9.8px; color: var(--amber); }
.pilot-stale[hidden] { display: none; }
.pilot-export-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pilot-export-label { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--faint); }
.pilot-hint-row { display: flex; align-items: center; gap: 5px; margin-top: 11px; font-size: 9.8px; color: var(--faint); }
.pilot-hint-row svg { flex: none; }
.pilot-config-card .callout { margin-bottom: 12px; }

/* 预览空态 */
.pilot-preview-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 36px 26px;
  background: linear-gradient(180deg, #fbfdf9, #fff);
}
.pilot-empty-art {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
  margin-bottom: 13px;
}
.pilot-empty-title { font-size: 13.5px; font-weight: 680; color: var(--ink); }
.pilot-empty-desc { font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: 5px; max-width: 560px; }
.pilot-empty-flow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center; margin-top: 15px; font-size: 10px; color: var(--faint); }
.pilot-empty-flow svg { color: #c1cbc2; }
.pilot-empty-flow span { padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

/* 预览内容 */
.pilot-preview { overflow: hidden; }
.pilot-preview.is-stale { opacity: .72; }
.pilot-preview-generated { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--faint); }
.pilot-snapshot-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.pilot-snapshot-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: var(--primary-faint); border: 1px solid #dce8d9; font-size: 10.8px; line-height: 1.6; color: #3f5c4b; }
.pilot-snapshot-note svg { flex: none; margin-top: 1px; color: var(--primary); }
.pilot-snapshot-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 14px 0 4px; }
.pilot-snap-stat { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 1px; }
.pilot-snap-num { font-size: 21px; font-weight: 720; letter-spacing: -.035em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pilot-snap-label { font-size: 9.5px; color: var(--faint); }
.pilot-preview-foot { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--faint); }
.pilot-preview-foot svg { flex: none; }
.pilot-preview-module { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pilot-preview-module + .pilot-preview-module { margin-top: 14px; }
.pilot-pm-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pilot-pm-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; }
.pilot-pm-icon.req { background: var(--blue-soft); color: var(--blue); }
.pilot-pm-icon.chg { background: var(--violet-soft); color: var(--violet); }
.pilot-pm-main { flex: 1; min-width: 0; }
.pilot-pm-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; font-weight: 680; color: var(--ink); }
.pil-pm-index { font-size: 9px; font-weight: 600; color: var(--faint); background: var(--surface-3); border-radius: 4px; padding: 1px 5px; }
.pilot-pm-summary { font-size: 10.5px; line-height: 1.55; color: var(--muted); margin-top: 3px; }
.pilot-pm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 14px; }
.pilot-pm-block { min-width: 0; }
.pilot-pm-wide { grid-column: 1 / -1; }
.pilot-pm-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.pilot-pm-title svg { color: var(--primary); flex: none; }
.pilot-pm-title .badge { margin-left: 1px; }
.pilot-pm-duration { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.pilot-duration-value { font-size: 18px; font-weight: 720; color: var(--ink); letter-spacing: -.03em; }
.pilot-coverage { display: flex; flex-wrap: wrap; gap: 6px; }
.pilot-coverage-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 10.3px; color: var(--ink-2); }
.pilot-coverage-item i { width: 17px; height: 17px; border-radius: 5px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-deep); font-style: normal; font-size: 8.5px; font-weight: 700; }
.pilot-roles { display: flex; flex-direction: column; gap: 6px; }
.pilot-role-row { display: flex; align-items: flex-start; gap: 8px; }
.pilot-role-resp { flex: 1; min-width: 0; font-size: 10.3px; line-height: 1.5; color: var(--muted); }
.pilot-material-table td { font-size: 10.8px; }
.pilot-material-table thead th { font-size: 9.5px; }
.pilot-material-name { font-weight: 550; color: var(--ink-2); }
.pilot-metrics { display: flex; flex-direction: column; gap: 6px; }
.pilot-metric { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(140px, 1.2fr) minmax(120px, .9fr); gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 10.3px; }
.pilot-metric-name { font-weight: 600; color: var(--ink-2); }
.pilot-metric-target { color: var(--ink); font-weight: 600; }
.pilot-metric-verify { display: inline-flex; align-items: flex-start; gap: 4px; color: var(--faint); }
.pilot-metric-verify svg { flex: none; margin-top: 1px; color: #8fae9a; }

/* 历史记录 */
.pilot-history { overflow: hidden; }
.pilot-history-name { font-size: 11.8px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.pilot-history-table td { vertical-align: middle; }
.pilot-downloads { display: flex; align-items: center; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }

/* 侧栏 */
.pilot-steps { display: flex; flex-direction: column; gap: 13px; }
.pilot-step { display: flex; align-items: flex-start; gap: 10px; }
.pilot-step i {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-deep);
  font-style: normal; font-size: 10px; font-weight: 700;
}
.pilot-step strong { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.pilot-step span { display: block; font-size: 10px; line-height: 1.55; color: var(--faint); margin-top: 2px; }
.pilot-module-status { display: flex; flex-direction: column; gap: 8px; }
.pilot-module-status-row { display: flex; align-items: center; gap: 8px; }
.pilot-module-status-icon { width: 25px; height: 25px; border-radius: 7px; flex: none; display: grid; place-items: center; }
.pilot-module-status-icon.req { background: var(--blue-soft); color: var(--blue); }
.pilot-module-status-icon.chg { background: var(--violet-soft); color: var(--violet); }
.pilot-module-status-name { flex: 1; min-width: 0; font-size: 10.8px; color: var(--ink-2); line-height: 1.4; }
.pilot-side-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 11px; font-size: 10px; font-weight: 600; color: var(--primary); }
.pilot-format-list { display: flex; flex-direction: column; gap: 10px; }
.pilot-format { display: flex; align-items: flex-start; gap: 9px; }
.pilot-format-badge {
  flex: none; min-width: 44px; height: 19px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 5px; background: var(--surface-3); color: var(--muted);
  font-size: 8.5px; font-weight: 700; margin-top: 1px;
}
.pilot-format strong { display: block; font-size: 10.8px; font-weight: 650; color: var(--ink-2); }
.pilot-format span { display: block; font-size: 9.8px; line-height: 1.5; color: var(--faint); margin-top: 1px; }
.pilot-side-tip { display: flex; align-items: flex-start; gap: 6px; font-size: 10.5px; line-height: 1.6; color: var(--muted); }
.pilot-side-tip svg { flex: none; margin-top: 1px; color: var(--primary); }
.pilot-side .card { padding-bottom: 2px; }

/* ================================================================ 响应式 */
@media (max-width: 1320px) {
  .ws-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws-stat-grid .stat-card:nth-child(4),
  .ws-stat-grid .stat-card:nth-child(5) { grid-column: span 1; }
  .tpl-hero-side { width: 236px; }
}
@media (max-width: 1180px) {
  .tpl-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cust-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-ai-providers { grid-template-columns: 1fr; }
  .tpl-hero { flex-direction: column; }
  .tpl-hero-side { width: 100%; }
  .tpl-hero-steps { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
}
@media (max-width: 1080px) {
  .tpl-cards { grid-template-columns: 1fr; }
  .ws-modules { grid-template-columns: 1fr; }
  .ws-module + .ws-module { margin-top: 2px; }
  .pilot-options { grid-template-columns: 1fr; }
  .pilot-metric { grid-template-columns: minmax(100px, .9fr) minmax(120px, 1.1fr); }
  .pilot-metric-verify { grid-column: 1 / -1; }
  .pilot-snapshot-meta { grid-template-columns: 1fr 1fr; }
  .cust-iso-banner { flex-wrap: wrap; }
  .cust-iso-points { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; width: 100%; }
}
@media (max-width: 900px) {
  .ws-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-flow { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .tpl-flow-phase + .tpl-flow-phase::before { display: none; }
  .ws-chain { flex-direction: column; }
  .ws-chain-arrow { transform: rotate(90deg); align-self: flex-start; margin-left: 12px; }
  .ws-member-summary { gap: 18px; }
  .ws-sum-note { margin-left: 0; width: 100%; }
  .pilot-summary { gap: 12px; }
  .pilot-summary-note { margin-left: 0; width: 100%; }
  .pilot-actions { align-items: flex-start; flex-direction: column; }
  .pilot-pm-grid { grid-template-columns: 1fr; }
  .pilot-pm-wide { grid-column: auto; }
  .pilot-snapshot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-cta { flex-direction: column; align-items: flex-start; }
  .tpl-cta-actions { width: 100%; }
  .tpl-cta-actions .btn { flex: 1; justify-content: center; }
  .cust-created-kv { grid-template-columns: 1fr 1fr; }
  .tpl-phase-roles { display: none; }
}
@media (max-width: 620px) {
  .ws-stat-grid, .tpl-stat-grid, .cust-stat-grid { grid-template-columns: 1fr; }
  .pilot-snapshot-meta, .pilot-snapshot-stats, .cust-created-kv, .tpl-drawer-grid { grid-template-columns: 1fr; }
  .ws-ai-providers { grid-template-columns: 1fr; }
  .tpl-card-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .tpl-card-actions .btn { justify-content: center; }
  .tpl-card-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tpl-hero { padding: 17px; }
  .tpl-hero-title { font-size: 17px; }
  .cust-module-options { grid-template-columns: 1fr; }
  .cust-created-modules { align-items: flex-start; flex-direction: column; gap: 6px; }
  .pilot-format-badge { min-width: 38px; }
  .pilot-options { grid-template-columns: 1fr; }
  .ws-ai-switch-row { flex-direction: column; align-items: flex-start; gap: 9px; }
  .tpl-compare-table { min-width: 560px; }
  .tpl-dim { width: 120px; }
  .ws-process-head-side { display: none; }
}

/* ---------------------------------------------------------------- 打印 */
@media print {
  .tpl-hero-side, .page-actions, .tpl-cta-actions, .pilot-actions, .pilot-export-group { display: none !important; }
  .tpl-card, .tpl-phase-card, .tpl-compare, .pilot-preview { break-inside: avoid; }
  .tpl-node:hover { transform: none; }
}

/* 模板页：用业态洞察卡补足三模板的 2×2 视觉网格 */
.tpl-insight-card {
  position: relative; overflow: hidden; min-height: 250px; border-radius: var(--radius);
  padding: 20px 21px; display: flex; flex-direction: column;
  background: linear-gradient(135deg, #0d3027 0%, #124536 60%, #185640 100%);
  color: #eef5e9; box-shadow: 0 10px 28px rgba(10,41,31,.13);
}
.tpl-insight-card::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -100px; top: -120px; background: radial-gradient(circle, rgba(200,233,107,.2), transparent 65%); }
.tpl-insight-card::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(90deg, #000, transparent 75%); pointer-events: none; }
.tpl-insight-card > * { position: relative; z-index: 1; }
.tpl-insight-kicker { display: flex; align-items: center; gap: 5px; color: #d7eea7; font-size: 9.5px; font-weight: 650; letter-spacing: .04em; }
.tpl-insight-card h3 { font-size: 21px; line-height: 1.35; letter-spacing: -.03em; color: #f5f9ef; margin-top: 10px; }
.tpl-insight-card p { font-size: 10.5px; line-height: 1.7; color: rgba(236,245,231,.52); margin-top: 7px; max-width: 440px; }
.tpl-insight-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.tpl-insight-tags span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: rgba(240,247,235,.75); font-size: 9px; }
.tpl-insight-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.tpl-insight-actions .btn { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #eef5e9; box-shadow: none; }
.tpl-insight-actions .btn:hover { background: rgba(255,255,255,.14); }
.tpl-insight-actions .btn.btn-lime { background: var(--lime); border-color: var(--lime); color: #1a331f; }
.tpl-insight-foot { display: flex; align-items: center; gap: 4px; font-size: 8.5px; color: rgba(236,245,231,.35); margin-top: 11px; }
