.pp { min-width: 0; }
.pp .cc-heading { align-items: center; }
.pp-state { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; padding: 12px 16px; border: 1px solid #d8e6f7; border-radius: 10px; background: #f6faff; }
.pp-state-info, .pp-state-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.pp-state-info { min-width: 0; }
.pp-state-actions { margin-left: auto; }
.pp-state strong { color: #354861; font-size: 14px; }
.pp-state small { color: #68788e; font-weight: 700; }
.pp-info { background: #eaf3ff; color: #2f73c7; }
.pp-workspace { display: grid; height: clamp(600px, calc(100dvh - 180px), 900px); min-height: 0; grid-template-columns: 285px 360px minmax(0, 1fr); overflow: hidden; border: 1px solid #dfe6ef; border-radius: 12px; background: #fff; }
.pp-workspace > * { min-width: 0; }
.pp-owner, .pp-route { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); padding: 14px; overflow: hidden; border-right: 1px solid #e3e9f0; }
.pp-owner h3, .pp-route h3, .pp-detail h3, .pp-subsection h4 { margin: 0; color: #34465e; }
.pp-owner-head { display: flex; min-height: 20px; align-items: center; justify-content: space-between; gap: 8px; }
.pp-owner-head small { color: #2f7df4; white-space: nowrap; }
.pp-segment { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; padding: 3px; border-radius: 8px; background: #edf2f7; }
.pp-tree { min-height: 0; margin: 10px -5px 0; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.pp-tree .cc-tree-row.pending { background: #f3f7fc; box-shadow: inset 2px 0 #2f7df4; }
.pp-tree .cc-tree-row.pending .cc-tree-select { color: #2f7df4; }
.pp-owner > label { display: grid; gap: 6px; color: #66768b; font-size: 12px; font-weight: 700; }
.pp-owner select, .pp-grid input, .pp-grid select, .pp-condition-row select, .pp-group-operator select, .pp-groups select, .pp-requirements input, .pp-requirements select { min-height: 38px; border: 1px solid #d9e2ed; border-radius: 7px; background: #fff; color: #35465d; }
.pp-route { background: #fbfcfe; }
.pp-route > header, .pp-detail > header, .pp-subsection > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-route > header p, .pp-detail > header p, .pp-subsection > header p { margin: 4px 0 0; color: #919cab; font-size: 11px; }
.pp-step-list { min-height: 0; margin-top: 12px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.pp-step { display: grid; width: 100%; min-height: 67px; grid-template-columns: 22px 34px minmax(0, 1fr) auto 12px; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px; border: 1px solid #e0e6ed; border-radius: 9px; background: #fff; color: #8190a3; text-align: left; cursor: pointer; }
.pp-step:hover, .pp-step.selected { border-color: #87b4ec; background: #eef6ff; }
.pp-step.dragging { opacity: .45; border-style: dashed; }
.pp-step .pp-grip { color: #94a4b7; font-size: 16px; font-style: normal; cursor: grab; }
.pp-step > b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #edf3fa; color: #58708d; }
.pp-step.selected > b { background: #dcecff; color: #216fd0; }
.pp-step span { min-width: 0; }
.pp-step strong, .pp-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-step strong { color: #3c4e66; font-size: 13px; }
.pp-step small { margin-top: 5px; color: #96a0ae; font-size: 10px; }
.pp-step em { padding: 5px 7px; border-radius: 5px; background: #f0f3f7; color: #7c8999; font-size: 10px; font-style: normal; white-space: nowrap; }
.pp-detail { display: grid; container-name: pp-condition-editor; container-type: inline-size; min-width: 0; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
.pp-detail > .cc-empty { grid-row: 1 / -1; }
.pp-detail > header { min-height: 82px; padding: 13px 17px; }
.pp-detail > header small { color: #2f7bd6; font-size: 10px; font-weight: 700; }
.pp-detail > nav { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #e5ebf2; border-bottom: 1px solid #e1e7ef; background: #f7f9fc; }
.pp-detail > nav button { position: relative; min-height: 50px; border: 0; background: transparent; color: #728197; font-weight: 700; cursor: pointer; }
.pp-detail > nav button.active { background: #fff; color: #2472cf; }
.pp-detail > nav button.active::after { position: absolute; right: 25%; bottom: -1px; left: 25%; height: 3px; border-radius: 3px 3px 0 0; background: #2f7df4; content: ''; }
.pp-detail > form { min-width: 0; min-height: 0; height: 100%; padding: 15px; overflow-x: hidden; overflow-y: auto; background: #fbfcfe; scrollbar-gutter: stable; }
.pp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
/* 控件行 auto 1fr：行内左右控件（输入框/选择器）随行高拉伸，保证同排等高 */
.pp-grid > label { display: grid; grid-template-rows: auto 1fr; gap: 6px; color: #68788e; font-size: 11px; font-weight: 700; }
.pp-grid input, .pp-grid select { width: 100%; padding: 0 10px; }
/* 只读框灰底：.pp 前缀提到与 catalog .cc input 同特异度（0,3,1），本文件后加载故胜出 */
.pp .pp-grid input[readonly] { background: var(--surface, #f7f9fc); }
/* 选择器控件名称与字段名（.pp-grid > label）同款 11px/700，触发框与输入框同为 38px */
.pp-grid .cc-multi { display: grid; grid-template-rows: auto 1fr; gap: 6px; }
.pp-grid .cc-multi .cc-picker-label { color: #68788e; font-size: 11px; font-weight: 700; }
.pp-grid .cc-multi-control { min-height: 38px; padding: 0 10px; }
/* 半宽列约 160px：收紧 chip 与触发器最小宽，避免单值也换行成两行 */
.pp-grid .cc-multi-chip { padding: 3px 6px; font-size: 11px; gap: 5px; }
.pp-grid .cc-multi-trigger { min-width: 60px; }
.pp-grid small { color: #9aa4b2; font-size: 10px; font-weight: 500; }
.pp-grid .wide { grid-column: 1 / -1; }
.pp-role-field { margin: 0; padding: 10px; border: 1px solid #dce4ee; border-radius: 8px; }
.pp-role-field legend { padding: 0 5px; color: #68788e; font-size: 11px; font-weight: 700; }
.pp-role-field > p { display: flex; min-height: 28px; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; color: #9aa4b2; font-size: 11px; }
.pp-role-field > p span { padding: 5px 7px; border: 1px solid #bed7f5; border-radius: 5px; background: #edf6ff; color: #286fc5; }
.pp-role-field > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pp-role-field label, .pp-inline-check { display: flex !important; min-height: 34px; align-items: center; gap: 7px !important; padding: 0 8px; border: 1px solid #e0e6ed; border-radius: 6px; background: #fff; color: #57697f; font-size: 11px; cursor: pointer; }
.pp-role-field input, .pp-inline-check input { width: 15px; height: 15px; accent-color: #2f7df4; }
.pp-subsection { margin-bottom: 13px; padding: 12px; border: 1px solid #dfe6ef; border-radius: 9px; background: #fff; }
.pp-subsection > header { margin-bottom: 10px; }
.pp-choice-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pp-choice-cards label, .pp-segment label { cursor: pointer; }
.pp-choice-cards input, .pp-segment input { position: absolute; opacity: 0; pointer-events: none; }
.pp-choice-cards span, .pp-segment span { display: grid; min-height: 54px; align-content: center; padding: 8px 10px; border: 1px solid #dfe6ef; border-radius: 7px; background: #fff; color: #68788e; }
.pp-choice-cards input:checked + span, .pp-segment input:checked + span { border-color: #8db8ed; background: #edf6ff; color: #226fcf; box-shadow: inset 0 0 0 1px #c5ddf8; }
.pp-choice-cards small { margin-top: 3px; color: #98a2b0; font-size: 10px; }
.pp-segment { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pp-segment span { min-height: 38px; place-items: center; padding: 6px; text-align: center; }
.pp-check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.pp-check-grid label { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid #e0e6ed; border-radius: 7px; }
.pp-check-grid strong, .pp-check-grid small { display: block; }
.pp-check-grid small { margin-top: 3px; color: #99a4b2; }
.pp-group-operator { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; min-width: 0; margin: 9px 0; padding: 10px 12px; border-radius: 8px; background: #f4f7fb; color: #718095; font-size: 11px; font-weight: 600; }
.pp-group-operator select { width: 100%; min-width: 0; padding: 0 8px; }
.pp-group-operator > .select-control, .pp-groups > section > header > .select-control, .pp-content-conditions-body > header .select-control, .pp-content-groups > section > header > .select-control { width: auto; max-width: 100%; min-width: 0; justify-self: stretch; }
.pp-groups { min-width: 0; }
.pp-groups > section { width: 100%; min-width: 0; margin-bottom: 8px; padding: 9px; border: 1px solid #dfe7f1; border-radius: 8px; background: #f9fbfd; }
.pp-groups > section > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto; align-items: center; gap: 10px; margin-bottom: 9px; padding-bottom: 9px; border-bottom: 1px solid #e8eef5; }
.pp-groups > section > header strong { display: grid; gap: 2px; color: #405169; }
.pp-groups > section > header strong small { color: #8b98a9; font-size: 10px; font-weight: 500; }
.pp-groups > section > header select { width: 100%; min-width: 0; }
.pp-condition-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(104px, .7fr) minmax(0, 1.35fr) auto; align-items: end; gap: 8px; margin-bottom: 9px; }
.pp-condition-row select { width: 100%; min-width: 0; padding: 0 7px; }
.pp-condition-control { display: grid; min-width: 0; gap: 5px; color: #718095; font-size: 11px; font-weight: 600; }
.pp-condition-control > span:first-child { min-height: 16px; }
.pp-condition-target { min-width: 0; }
.pp-condition-target .cc-picker-label { min-height: 16px; }
.pp-condition-action { align-self: end; min-width: 68px; min-height: 38px; padding-inline: 11px; white-space: nowrap; }
.pp-mold-switch { display: flex; min-height: 48px; align-items: center; gap: 8px; margin-bottom: 9px; padding: 0 11px; border: 1px solid #c8ddf6; border-radius: 8px; background: #f2f8ff; color: #3577c8; }
.pp-mold-switch strong { margin-right: auto; color: #405169; }
.pp-mold-switch input { width: 38px; height: 20px; accent-color: #269c75; }
.pp-content-list { display: grid; gap: 7px; }
.pp-content-card { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(170px, 1.2fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e0e7ef; border-radius: 8px; }
.pp-content-card span + span { padding-left: 10px; border-left: 1px solid #e7ecf2; }
.pp-content-card small, .pp-content-card strong { display: block; }
.pp-content-card small { margin: 2px 0; color: #96a1af; font-size: 10px; }
.pp-content-card strong { color: #405169; font-size: 11px; }
.pp-content-card > div { display: flex; gap: 5px; }
.pp-reminders { border-color: #eeddbf; }
.pp-reminder-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pp-reminder-grid label { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid #ead9bb; border-radius: 7px; background: #fffaf1; }
.pp-reminder-grid input { accent-color: #d88920; }
.pp-reminder-grid strong, .pp-reminder-grid small { display: block; }
.pp-reminder-grid strong { color: #4a576a; font-size: 11px; }
.pp-reminder-grid small { margin-top: 4px; color: #8f99a8; font-size: 10px; }
/* 575 reuses reminder cards as ordinary resource settings, without warning colors. */
.pp-mold-conditions .pp-reminder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pp-mold-conditions .pp-reminder-grid label { min-width: 0; border-color: var(--cc-line, #dfe6ef); background: var(--card, #fff); }
.pp-mold-conditions .pp-reminder-grid label > span { min-width: 0; overflow-wrap: anywhere; }
.cc .pp-mold-conditions .pp-reminder-grid input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--blue, #2f7df4); }
.pp-submission-section > header > span { min-width: 0; }
.pp-result-legend { display: flex; flex-wrap: wrap; gap: 7px; }
.pp-result-legend > span { display: inline-flex; min-height: 30px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #dfe7f1; border-radius: 7px; background: #f8faff; color: #52647b; font-size: 11px; }
.pp-result-legend i { width: 7px; height: 7px; border: 1px solid #2f7df4; border-radius: 2px; background: #eaf3ff; transform: rotate(45deg); }
.pp-requirements { display: grid; gap: 7px; }
.pp-requirement-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 10px; min-width: 0; padding: 10px; border: 1px solid #dfe7f1; border-radius: 7px; }
.pp-requirement-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(72px, .65fr); gap: 8px; min-width: 0; }
.pp-requirement-fields.has-reference { grid-template-columns: minmax(0, 1fr) minmax(72px, .65fr) minmax(0, .85fr); }
.pp-requirement-fields > label { display: grid; gap: 5px; min-width: 0; color: #78879b; font-size: 12px; }
.pp-requirement-fields > label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-requirement-matrix { display: grid; grid-template-columns: repeat(auto-fit, minmax(102px, 1fr)); grid-column: 1; gap: 8px; min-width: 0; }
.pp-requirement-matrix > label { display: grid; gap: 5px; min-width: 0; color: #78879b; font-size: 12px; }
.pp-requirement-matrix > label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-requirement-row input, .pp-requirement-row select, .pp-requirement-row .select-control, .pp-requirement-row .select-trigger { width: 100%; min-width: 0; padding-inline: 8px; }
.cc .pp-requirement-row input[name="requirementName"] { color: #25334b; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.4; }
.pp-requirement-row .select-trigger { padding-right: 28px; }
.pp-requirement-row .select-menu { right: 0; left: auto; width: max-content; min-width: max(100%, 132px); max-width: min(220px, calc(100vw - 32px)); }
.pp-requirement-row .select-option { white-space: nowrap; }
.pp-requirement-actions { display: flex; grid-column: 2; grid-row: 1 / span 2; align-items: stretch; align-self: start; flex-direction: column; gap: 6px; }
.pp-requirement-actions .btn { min-width: 48px; min-height: 38px; padding-inline: 9px; white-space: nowrap; }
.pp-requirement-remove { min-width: 64px; }
.pp-process-type { margin-bottom: 13px; }
@container pp-condition-editor (max-width: 520px) {
  .pp-requirement-row { grid-template-columns: minmax(0, 1fr); }
  .pp-requirement-fields.has-reference { grid-template-columns: minmax(0, 1fr) minmax(72px, .65fr); }
  .pp-requirement-fields.has-reference > label:last-child { grid-column: 1 / -1; }
  .pp-requirement-matrix, .pp-requirement-actions { grid-column: 1; grid-row: auto; }
  .pp-requirement-actions { align-items: center; flex-direction: row; justify-self: end; }
}
.pp-content-dialog { container-name: pp-content-condition-editor; container-type: inline-size; width: min(980px, calc(100vw - 40px)); max-height: calc(100vh - 36px); }
.pp-content-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.pp-content-dialog > form { display: flex; min-height: 0; max-height: inherit; flex-direction: column; }
.pp-content-dialog .cc-category-dialog-head, .pp-content-dialog .cc-dialog-actions, .pp-content-dialog form > .cc-notice { flex-shrink: 0; }
.pp-content-dialog .cc-category-dialog-head p { margin: 5px 0 0; color: #8794a6; font-size: 11px; }
.pp-content-dialog-body { display: grid; min-width: 0; min-height: 0; flex: 1 1 auto; gap: 12px; padding: 14px 16px; overflow-x: hidden; overflow-y: auto; }
.pp-content-block { padding: 13px; border: 1px solid #dfe6ef; border-radius: 9px; background: #fff; }
.pp-content-block > h4, .pp-content-block > header h4 { margin: 0 0 10px; color: #405169; }
.pp-content-block > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pp-content-block > header p { margin: -5px 0 10px; color: #919cab; font-size: 11px; }
.pp-content-block > header label { display: flex; align-items: center; gap: 7px; color: #66768b; font-size: 11px; }
.pp-content-block select, .pp-content-block input, .pp-content-block textarea { border: 1px solid #d9e2ed; border-radius: 7px; background: #fff; color: #35465d; }
.pp-content-block select, .pp-content-block input { min-height: 38px; padding: 0 8px; }
.pp-content-block textarea { width: 100%; min-height: 72px; padding: 9px; resize: vertical; font: inherit; }
.pp-content-dialog .cc-form-grid { padding: 0; }
.pp-content-dialog .cc-form-grid small, .pp-template-input small { color: #919cab; font-size: 10px; font-weight: 400; }
.pp-display-mode-options { margin-top: 2px; }
.pp-display-mode-options span { min-height: 68px; }
.pp-display-mode-options strong, .pp-display-mode-options small { display: block; }
.pp-display-mode-options small { margin-top: 5px; color: #8e9aac; font-size: 10px; line-height: 1.45; }
.pp-render-scope { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr); align-items: end; gap: 10px; margin-top: 12px; padding: 11px; border-radius: 8px; background: #f7faff; }
.pp-render-scope > label { display: grid; gap: 6px; color: #66768b; font-size: 11px; font-weight: 700; }
.pp-content-preview { margin-top: 11px; padding: 11px 12px; border: 1px solid #cfe0f5; border-radius: 8px; background: #f5f9ff; }
.pp-content-preview small, .pp-content-preview strong { display: block; }
.pp-content-preview small { color: #718197; font-size: 10px; }
.pp-content-preview strong { margin-top: 4px; color: #334860; font-size: 12px; }
.pp-content-preview p { margin: 5px 0 0; color: #52667f; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.pp-field-error { display: block; margin-top: 5px; color: #cc596a !important; font-size: 11px !important; font-weight: 500 !important; }
.pp-content-conditions { min-height: 58px; padding: 0; }
.pp-content-conditions[open] { height: max-content; }
.pp-content-conditions > summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 14px; padding: 0 14px; color: #405169; cursor: pointer; list-style: none; }
.pp-content-conditions > summary::-webkit-details-marker { display: none; }
.pp-content-conditions > summary::after { color: #66809e; content: '⌄'; font-size: 18px; transition: transform .15s ease; }
.pp-content-conditions[open] > summary::after { transform: rotate(180deg); }
.pp-content-conditions > summary span:first-child { display: grid; gap: 4px; }
.pp-content-conditions > summary span:last-child { margin-left: auto; color: #65788f; font-size: 11px; }
.pp-content-conditions > summary strong { font-size: 13px; }
.pp-content-conditions > summary small { color: #8b98a9; font-size: 10px; font-weight: 500; }
.pp-content-conditions-body { padding: 0 13px 13px; border-top: 1px solid #e8edf3; }
.pp-content-conditions-body > header { display: flex; min-height: 48px; align-items: center; justify-content: flex-end; gap: 10px; }
.pp-content-conditions-body > header p { margin-right: auto; color: #8b98a9; font-size: 11px; }
.pp-content-conditions-body > header label { display: grid; grid-template-columns: auto minmax(180px, 260px); align-items: center; justify-content: end; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; background: #f4f7fb; color: #66768b; font-size: 11px; font-weight: 600; }
.pp-content-conditions-body > header label select { width: 100%; min-width: 0; }
.pp-content-groups { display: grid; min-width: 0; gap: 8px; margin-bottom: 8px; }
.pp-content-groups > section { width: 100%; min-width: 0; padding: 9px; border: 1px solid #dfe7f1; border-radius: 8px; background: #f9fbfd; }
.pp-content-groups > section > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto; align-items: center; gap: 10px; margin-bottom: 9px; padding-bottom: 9px; border-bottom: 1px solid #e8eef5; }
.pp-content-groups > section > header strong { display: grid; gap: 2px; color: #405169; }
.pp-content-groups > section > header strong small { color: #8b98a9; font-size: 10px; font-weight: 500; }
.pp-content-groups > section > header select { width: 100%; min-width: 0; }
.pp-content-condition { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.1fr) minmax(104px, .7fr) minmax(0, 1.35fr) auto; align-items: end; gap: 8px; margin-bottom: 9px; }
.pp-content-condition:has([data-condition-source] option[value="FINAL_BOM"]:checked) { grid-template-columns: minmax(100px, .7fr) minmax(0, .9fr) minmax(0, 1.5fr) auto; }
.pp-content-condition .cc-picker-label { min-height: 18px; }
.pp-content-condition-field { min-width: 0; }
.pp-content-condition-target { min-width: 0; }
.pp-condition-placeholder { display: grid; min-height: 38px; align-items: center; padding: 0 10px; border: 1px dashed #d9e2ed; border-radius: 7px; color: #919cab; font-size: 11px; }
.pp-template-input { display: grid; gap: 6px; color: #66768b; font-size: 11px; font-weight: 700; }
.pp-token-section { display: grid; grid-template-columns: 150px minmax(260px, 1fr); align-items: end; gap: 10px; margin-top: 10px; }
.pp-token-section > strong { align-self: center; color: #66768b; font-size: 11px; }
.pp-template-references { display: grid; gap: 8px; margin-top: 10px; }
.pp-template-references > strong { color: #66768b; font-size: 11px; }
.pp-template-reference { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(180px, .7fr) minmax(260px, 1.2fr); align-items: end; gap: 10px; padding: 10px; border: 1px solid #dfe7f1; border-radius: 8px; background: #f9fbfd; }
.pp-template-reference > div:first-child { display: grid; align-self: center; gap: 3px; color: #405169; }
.pp-template-reference > div:first-child small { color: #8b98a9; font-size: 10px; font-weight: 500; }
.pp-template-reference > [data-template-reference-options] { min-width: 0; }
.pp-token-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-content-block .pp-token-buttons { margin: 10px 0; }
.pp-history-dialog { width: min(680px, calc(100vw - 40px)); }
.pp-history-dialog .cc-table-wrap { margin: 15px; }

@media (max-width: 1450px) {
  .pp-workspace { grid-template-columns: 245px 320px minmax(0, 1fr); }
  .pp-role-field > div { grid-template-columns: repeat(2, 1fr); }
  .pp-content-card { grid-template-columns: 1fr; }
  .pp-content-card span + span { padding-left: 0; border-left: 0; }
  .pp-condition-row { grid-template-columns: minmax(0, 1fr) minmax(112px, .7fr); }
  .pp-condition-row .pp-condition-target { grid-column: 1 / -1; }
  .pp-condition-row .pp-condition-action { grid-column: 1 / -1; justify-self: end; }
  .pp-content-condition { grid-template-columns: 1fr 1fr; }
  .pp-content-condition:has([data-condition-source] option[value="FINAL_BOM"]:checked) { grid-template-columns: 1fr 1fr; }
  .pp-content-condition .pp-content-condition-target { grid-column: 1 / -1; }
  .pp-content-condition .pp-condition-action { grid-column: 1 / -1; justify-self: end; }
  .pp-render-scope { grid-template-columns: 1fr; }
  .pp-template-reference { grid-template-columns: 1fr 1fr; }
  .pp-template-reference > [data-template-reference-options] { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .pp-workspace { grid-template-columns: minmax(190px, .75fr) minmax(240px, 1fr) minmax(0, 1.65fr); }
}

@media (max-width: 900px) {
  .pp-state-actions { width: 100%; margin-left: 0; }
  .pp-workspace { display: block; height: auto; min-height: 0; overflow: visible; }
  .pp-owner, .pp-route { display: block; overflow: visible; border-right: 0; border-bottom: 1px solid #e3e9f0; }
  .pp-tree, .pp-step-list { overflow: visible; }
  .pp-detail { display: block; overflow: visible; }
  .pp-detail > form { height: auto; max-height: none; }
}

@media (max-width: 760px) {
  .pp-group-operator, .pp-content-conditions-body > header label { grid-template-columns: 1fr; justify-content: stretch; }
  .pp-groups > section > header, .pp-content-groups > section > header { grid-template-columns: 1fr; }
  .pp-condition-row, .pp-content-condition, .pp-content-condition:has([data-condition-source] option[value="FINAL_BOM"]:checked) { grid-template-columns: 1fr; }
  .pp-condition-row .pp-condition-target, .pp-condition-row .pp-condition-action, .pp-content-condition .pp-content-condition-target, .pp-content-condition .pp-condition-action { grid-column: auto; }
  .pp-condition-action { justify-self: stretch; width: 100%; }
  .pp-token-section, .pp-template-reference { grid-template-columns: 1fr; }
  .pp-template-reference > [data-template-reference-options] { grid-column: auto; }
}

@container pp-condition-editor (max-width: 760px) {
  .pp-group-operator { grid-template-columns: 1fr; }
  .pp-groups > section > header { grid-template-columns: minmax(0, 1fr) auto; }
  .pp-groups > section > header > strong { grid-column: 1 / -1; }
  .pp-groups > section > header > .select-control { grid-column: 1; }
  .pp-groups > section > header > .pp-condition-action { grid-column: 2; }
  .pp-condition-row { grid-template-columns: minmax(0, 1fr) minmax(104px, .65fr); }
  .pp-condition-row .pp-condition-target { grid-column: 1 / -1; }
  .pp-condition-row .pp-condition-action { grid-column: 1 / -1; justify-self: end; }
}

@container pp-condition-editor (max-width: 480px) {
  .pp-groups > section > header, .pp-condition-row { grid-template-columns: 1fr; }
  .pp-groups > section > header > strong, .pp-groups > section > header > .select-control, .pp-groups > section > header > .pp-condition-action, .pp-condition-row .pp-condition-target, .pp-condition-row .pp-condition-action { grid-column: auto; }
  .pp-condition-row .pp-condition-action { justify-self: stretch; width: 100%; }
}

@container pp-content-condition-editor (max-width: 760px) {
  .pp-content-conditions-body > header label { grid-template-columns: 1fr; justify-content: stretch; }
  .pp-content-groups > section > header { grid-template-columns: minmax(0, 1fr) auto; }
  .pp-content-groups > section > header > strong { grid-column: 1 / -1; }
  .pp-content-groups > section > header > .select-control { grid-column: 1; }
  .pp-content-groups > section > header > .pp-condition-action { grid-column: 2; }
  .pp-content-condition, .pp-content-condition:has([data-condition-source] option[value="FINAL_BOM"]:checked) { grid-template-columns: 1fr 1fr; }
  .pp-content-condition .pp-content-condition-target { grid-column: 1 / -1; }
  .pp-content-condition .pp-condition-action { grid-column: 1 / -1; justify-self: end; }
}

@container pp-content-condition-editor (max-width: 480px) {
  .pp-content-groups > section > header, .pp-content-condition, .pp-content-condition:has([data-condition-source] option[value="FINAL_BOM"]:checked) { grid-template-columns: 1fr; }
  .pp-content-groups > section > header > strong, .pp-content-groups > section > header > .select-control, .pp-content-groups > section > header > .pp-condition-action, .pp-content-condition .pp-content-condition-target, .pp-content-condition .pp-condition-action { grid-column: auto; }
  .pp-content-condition .pp-condition-action { justify-self: stretch; width: 100%; }
}

/* PCC-PROCESS-STEP-TOGGLE-567：停用工序的灰色呈现与编辑器启停开关 */
.pp-step.is-disabled { background: #f6f7f9; border-color: #dfe3e9; }
.pp-step.is-disabled span strong, .pp-step.is-disabled span small, .pp-step.is-disabled em { color: #9aa4b2; }
.pp-step.is-disabled:hover { border-color: #c6cdd6; background: #f1f3f6; }
.pp-step-state { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #e8ebee; color: #7d8896; font-size: 11px; font-weight: 600; font-style: normal; line-height: 1.5; vertical-align: 1px; }
.pp-detail header .pp-step-state { margin-left: 8px; }
/* 工序启停段控：与销售配置“状态”字段同款两段式按钮 */
.pp-enable-choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; min-height: 42px; padding: 4px; border-radius: 8px; background: #edf1f6; }
.pp-enable-choice button { min-height: 34px; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: #718097; font-size: 11px; font-weight: 600; cursor: pointer; }
.pp-enable-choice button.active { background: #fff; color: #2f7df4; box-shadow: 0 1px 6px rgba(36, 56, 88, .14); }
