/* ============================================================
   流程图（P&ID）样式 · 第二版：简洁、实用
   ============================================================ */
.pid-wrap{background:var(--card);border:1px solid var(--line);border-radius:4px;
  box-shadow:var(--shadow);overflow:hidden;margin-bottom:14px}
.pid-head{padding:10px 16px;border-bottom:1px solid var(--line);display:flex;
  align-items:center;gap:10px;flex-wrap:wrap;background:#FBFCFD}
.pid-head h3{font-size:14px;font-weight:600}
.pid-head .sp{flex:1}
.pid-head .hint{font-size:11.5px;color:var(--ink3)}
.pid-scroll{overflow:auto;padding:8px 4px 2px;background:#FCFDFE}

.pid{width:100%;min-width:1200px;height:auto;display:block}
.pid .pipe{fill:none;stroke:#4A6FB5;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.pid .pipe.thin{stroke-width:1.1;stroke:#6E8CC4}
.pid .pipe.lpw{stroke:#C9A227;stroke-width:1.8}
.pid .pipe.water{stroke:#2E9E6B;stroke-width:1.8}
/* UPW 超纯水 / SF 表面活性剂定量添加 */
.pid .pipe.upw{stroke:#4C9A2A;stroke-width:1.8}
.pid .pipe.sf{stroke:#E8A33D;stroke-width:1.8}

.pid .tank-body{fill:#D7E0EE;stroke:#4A6FB5;stroke-width:1.4}
.pid .tank-liquid{fill:#8FB3DF;opacity:.92;transition:y2 .6s ease,height2 .6s ease}
.pid .tank-liquid.warn{fill:#E8C46A}
.pid .tank-liquid.low{fill:#7FC4B0}
.pid .tank-label{font-size:10px;fill:#28405F;font-weight:600;text-anchor:middle}
.pid .tank-level{font-size:11px;fill:#14304F;text-anchor:middle;font-weight:700;
  font-family:"SF Mono",Menlo,monospace}
.pid .tank-pct{font-size:8.5px;fill:#5D7592;font-weight:600}
.pid .plant-label{font-size:10px;fill:#28405F;font-weight:600;text-anchor:middle}

/* 罐可点击 */
.pid .pid-tank{cursor:pointer}
.pid .pid-tank:hover .tank-body{stroke:#2A6FB0;stroke-width:2.2}
.pid .pid-tank:hover .tank-body{fill:#E4EBF5}
.pid .pid-tank:focus{outline:none}
.pid .pid-tank:focus .tank-body{stroke:#2A6FB0;stroke-width:2.4}
.pid .pid-badge{pointer-events:none}

.pid .col-body{fill:#F2F5F9;stroke:#4A6FB5;stroke-width:1.3}
.pid .col-resin{fill:#CBD9EC;stroke:#7C97BE;stroke-width:.8}
/* 树脂柱状态四色（在用绿 / 再生琥珀 / 报废红 / 待用蓝） */
.pid .pid-col{fill:none}
.pid .pid-col{cursor:pointer;transition:opacity .15s ease}
.pid .pid-col:hover{opacity:.86}
.pid .pid-col.in_use .col-body{fill:#DFF2E8;stroke:#1E9E6A;stroke-width:1.6}
.pid .pid-col.in_use .col-resin{fill:#A8DCC2;stroke:#4FAE86}
.pid .pid-col.regen .col-body{fill:#FBF0D8;stroke:#B8892B;stroke-width:1.6}
.pid .pid-col.regen .col-resin{fill:#E6CE96;stroke:#C9A44E}
.pid .pid-col.scrapped .col-body{fill:#F7E2E2;stroke:#D14343;stroke-width:1.6}
.pid .pid-col.scrapped .col-resin{fill:#EFC9C9;stroke:#C97B7B}
.pid .pid-col.standby .col-body{fill:#F2F5F9;stroke:#4A6FB5}
.pid .col-label{font-size:9.5px;fill:#28405F;text-anchor:middle;font-weight:600}
.pid .col-state{font-size:8px;text-anchor:middle}

.pid .cp{fill:#D14343;stroke:#fff;stroke-width:1.4}
.pid .cp-t{font-size:9.5px;fill:#fff;text-anchor:middle;font-weight:700}
.pid .cp.ok .cp{fill:#1E9E6A}
.pid .cp.warn .cp{fill:#B8892B}
.pid .cp.ng .cp{fill:#D14343}
.pid .cp.idle .cp{fill:#8A97A8}

.pid .box-fill{fill:#EAF3E4;stroke:#7BA05B;stroke-width:1.2}
.pid .box-label{font-size:9.5px;fill:#3E5C2A;font-weight:600;text-anchor:middle}
.pid .sub-label{font-size:9px;fill:#5D7592;text-anchor:middle}
.pid .drum{fill:#C6D4E6;stroke:#4A6FB5;stroke-width:1.1}
.pid .nozzle{fill:#4A6FB5}
.pid .filter-icon{fill:none;stroke:#4A6FB5;stroke-width:1.1}
.pid .pid-filter{cursor:help}
.pid .pid-filter:hover rect{stroke-width:1.9}
.pid .pid-overlay{pointer-events:none}

/* 流程图下方的控制点条 */
.pid-legend-row{display:flex;gap:6px;flex-wrap:wrap;padding:9px 16px 11px;
  border-top:1px solid var(--line);background:#FBFCFD}
.pid-chip{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--ink2);
  border:1px solid var(--line);border-radius:3px;padding:2px 8px;background:var(--card)}
.pid-chip i{width:7px;height:7px;border-radius:50%;flex:none}
.pid-chip.ok i{background:var(--green)} .pid-chip.warn i{background:var(--amber)}
.pid-chip.ng i{background:var(--red)} .pid-chip.idle i{background:#8A97A8}

/* Visio 底图工具条 */
.pid-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:9px 16px;border-bottom:1px solid var(--line);background:#FAFBFD;font-size:12px}
.pid-tools .sep{width:1px;height:16px;background:var(--line)}
.pid-tools .lbl{color:var(--ink3);font-size:11.5px}
.pid-tools input[type=file]{font-size:11.5px}

/* 节点绑定列表 */
.bind-list{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.bind-row{display:flex;align-items:center;gap:10px;padding:7px 11px;
  border:1px solid var(--line);border-radius:3px;background:var(--card);font-size:12.5px}
.bind-row .code{font-family:"SF Mono",Menlo,monospace;font-size:11.5px;
  color:var(--ink2);min-width:96px}
.bind-row .nm{flex:1;color:var(--ink)}
.bind-row select{font-size:12px;padding:3px 8px;border:1px solid var(--line);
  border-radius:3px;background:var(--card)}

@media print{.pid-scroll{overflow:visible}.pid{min-width:0}}

/* 组内串联段（与进料母管蓝、UPW 绿、SF 橙区分开） */
.pid .pipe.serie{stroke:#6E5AA8;stroke-width:1.9}
.pid .grp-label{font-size:8.5px;fill:#8A97A8;text-anchor:end;letter-spacing:.03em}
