/* ==========================================================================
   PIPELINE EDITOR  (assets/css/pipeline-editor.css)
   --------------------------------------------------------------------------
   Settings > Objects > <object> > Pipelines: overview, tags, Manage pipeline
   (Configure / Pipeline Rules / Automate / Tags), panels and dialogs.
   Markup: assets/js/pipeline-editor.js (mounted by object-settings.php)
   ========================================================================== */

.pe { --pe-line: var(--border); --pe-dark: #213343; width: 100%; min-width: 0; }
.pe-i { width: 16px; height: 16px; flex: none; }
.pe-i--sm { width: 13px; height: 13px; vertical-align: -2px; }
.pe-caret { width: 14px; height: 14px; margin-left: 4px; }
.pe-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pe-p { margin: 0 0 var(--sp-3); line-height: 1.55; color: var(--text); }
.pe-help { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.pe-muted { color: var(--text-muted); }
.pe-strong { margin: 0; font-weight: 600; }
.pe-label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; font-weight: 700; color: var(--text); }
.pe-big { margin: 4px 0 var(--sp-5); font-size: 16px; }
.pe-h1 { margin: var(--sp-3) 0 var(--sp-4); font-size: 22px; }
.pe-h3 { margin: 0 0 6px; font-size: 16px; }
.pe-gap { margin-top: var(--sp-5); }
.pe-pad { padding: 10px; }
.pe-flex1 { flex: 1; margin: 0; }
.pe-r { text-align: right; }
.pe-error { margin: var(--sp-2) 0 0; color: var(--danger); font-size: 13px; }
.pe-hr { border: 0; border-top: 1px solid var(--pe-line, var(--border)); margin: var(--sp-5) 0; }
.pe-new { display: inline-block; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--brand-soft); color: var(--brand-ink, var(--brand)); font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.pe-noscroll { overflow: hidden; }
.pe :focus-visible, .pe-pop :focus-visible, .pe-modal-ov :focus-visible, .pe-panel-ov :focus-visible, .pe-full :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* buttons ------------------------------------------------------------------ */
.pe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius); background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none; }
.pe-btn:disabled { opacity: .45; cursor: not-allowed; }
.pe-btn--primary { background: var(--brand); color: var(--brand-contrast, #fff); }
.pe-btn--primary:hover:not(:disabled) { background: var(--brand-hover, var(--brand)); }
.pe-btn--outline { border-color: var(--border-strong, var(--border)); background: var(--surface); }
.pe-btn--outline:hover:not(:disabled) { background: var(--surface-2); }
.pe-btn--danger { background: var(--danger); color: #fff; }
.pe-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.pe-btn--pill { height: 32px; padding: 0 14px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius-pill); background: var(--surface); font-size: 13px; }
.pe-btn--pill:hover { background: var(--surface-2); }
.pe-btn--xs { height: 26px; padding: 0 10px; font-size: 12px; }
.pe-btn--onDark { color: #fff; border-color: rgba(255,255,255,.55); }
.pe-btn--onDark:hover { background: rgba(255,255,255,.1); }
.pe-btn--light { background: #fff; color: var(--pe-dark, #213343); }
.pe-textlink { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--brand-ink, var(--brand)); cursor: pointer; }
.pe-textlink:hover:not(:disabled) { text-decoration: underline; }
.pe-textlink:disabled { color: var(--text-subtle); cursor: default; }
.pe-textlink--danger { color: var(--danger); }
.pe-link { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--brand-ink, var(--brand)); }
.pe-x, .pe-iconbtn, .pe-pencil { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--text-muted); cursor: pointer; flex: none; }
.pe-x:hover, .pe-iconbtn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.pe-iconbtn:disabled { opacity: .35; cursor: default; }
.pe-iconbtn--danger:hover:not(:disabled) { color: var(--danger); }
.pe-pencil { width: 28px; height: 28px; border: 1px solid var(--border-strong, var(--border)); border-radius: 50%; opacity: 0; }
.pe-pencil .pe-i { width: 13px; height: 13px; }
.pe-inline-v:hover .pe-pencil, tr:hover .pe-pencil, .pe-pencil:focus-visible { opacity: 1; }
.pe-pencil:hover { background: var(--surface-2); color: var(--text); }

/* editor header ------------------------------------------------------------ */
.pe-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand-ink, var(--brand)); text-decoration: none; }
.pe-back:hover { text-decoration: underline; }
.pe-card { padding: var(--sp-5); border: 1px solid var(--pe-line); border-radius: var(--radius-lg); background: var(--surface); }
.pe-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.pe-select, .pe-dd { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 240px; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 15px; color: var(--text); cursor: pointer; }
.pe-dd { min-width: 148px; height: 38px; font-size: 14px; white-space: nowrap; }
.settings .pe table th, .settings .pe table td, .pe-modal table th, .pe-modal table td, .pe-panel table th, .pe-panel table td { text-transform: none; }
.pe-select:hover, .pe-dd:hover { border-color: var(--brand); }
.pe-board-link { margin-top: 2px; }
.pe-tabs { display: flex; gap: 4px; margin: var(--sp-4) 0 var(--sp-5); border-bottom: 1px solid var(--pe-line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pe-tab { position: relative; padding: 12px 20px; font-size: 15px; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.pe-tab:hover { color: var(--text); }
.pe-tab.is-on { color: var(--text); font-weight: 600; }
.pe-tab.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 2px 2px 0 0; background: var(--text); }
.pe-desc { margin-bottom: var(--sp-4); }
.pe-inline-v { display: flex; align-items: center; gap: var(--sp-2); min-height: 32px; }
.pe-inline { max-width: 560px; margin-top: 6px; }

/* tables ------------------------------------------------------------------- */
.pe-tablewrap { overflow-x: auto; }
.pe-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pe-table th { height: 44px; padding: 0 12px; border-bottom: 1px solid var(--text); text-align: left; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--text); }
.pe-table td { padding: 12px; border-bottom: 1px solid var(--pe-line, var(--border)); vertical-align: middle; color: var(--text); }
.pe-table tbody tr:hover { background: var(--surface-hover, var(--surface-2)); }
.pe-table--mini th { border-bottom-color: var(--pe-line, var(--border)); font-size: 13px; }
.pe-stages td { padding: 14px 12px; }
.pe-stages tr.is-drag { opacity: .45; }
.pe-stages tr.is-over td { box-shadow: inset 0 2px 0 var(--brand); }
.pe-col-grip { width: 28px; padding-right: 0 !important; }
.pe-grip { display: inline-grid; place-items: center; width: 22px; height: 30px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--text-muted); cursor: grab; }
.pe-grip:hover { background: var(--surface-2); color: var(--text); }
.pe-cell-name { min-width: 230px; }
.pe-cell-desc { min-width: 200px; }
.pe-input { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius); background: var(--surface-2); font: inherit; font-size: 14px; color: var(--text); }
textarea.pe-input { resize: none; line-height: 1.5; }
.pe-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring, 0 0 0 3px var(--brand-soft)); background: var(--surface); }
.pe-input:disabled { opacity: .65; cursor: not-allowed; }
.pe-input--cell { min-width: 200px; }
.pe-num-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--brand-ink, var(--brand)); cursor: pointer; }
.pe-num-link:hover { text-decoration: underline; }
.pe-cell-logic { white-space: nowrap; }
.pe-cell-logic > * + * { margin-left: var(--sp-3); }
.pe-logic-n { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.pe-code { font-size: 13px; color: var(--text); }
.pe-code + .pe-iconbtn { width: 26px; height: 26px; margin-left: 2px; opacity: 0; }
tr:hover .pe-code + .pe-iconbtn, .pe-code + .pe-iconbtn:focus-visible { opacity: 1; }
.pe-addstage { margin: var(--sp-4) 0 0 40px; }
.pe-rowacts { display: inline-flex; gap: var(--sp-2); }

/* switch ------------------------------------------------------------------- */
.pe-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.pe-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pe-switch__ui { position: relative; width: 44px; height: 24px; border-radius: 12px; background: var(--surface-3, #cbd6e2); transition: background .15s; }
.pe-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.pe-switch input:checked + .pe-switch__ui { background: var(--brand); }
.pe-switch input:checked + .pe-switch__ui::after { transform: translateX(20px); }
.pe-switch input:focus-visible + .pe-switch__ui { outline: 2px solid var(--brand); outline-offset: 2px; }
.pe-switch__t { min-width: 26px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.pe-switch--row { display: flex; justify-content: space-between; width: 100%; }
.pe-switch--row > span:first-child { flex: 1; font-size: 14px; }

/* rules / automate / tags -------------------------------------------------- */
.pe-note { margin: var(--sp-3) 0 var(--sp-5); padding: var(--sp-3) var(--sp-4); border: 1px solid #7fd1de; border-radius: var(--radius); background: #e5f5f8; color: #213343; line-height: 1.5; }
.pe-rules td:first-child { width: 55%; }
.pe-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.pe-chip { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-2); font-size: 12px; }
.pe-sec + .pe-sec { margin-top: var(--sp-6); }
.pe-flows { display: flex; gap: var(--sp-3); overflow-x: auto; padding: var(--sp-3) 0 var(--sp-2); }
.pe-flow { flex: 0 0 210px; display: flex; flex-direction: column; gap: 8px; padding: var(--sp-3); border: 1px solid var(--pe-line, var(--border)); border-radius: var(--radius); background: var(--surface-2); }
.pe-flow__k { margin: 0; font-size: 12px; color: var(--text-muted); }
.pe-flow__s { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pe-flow__item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--radius-sm, 4px); background: var(--surface); font-size: 13px; }
.pe-flow__item span { flex: 1; }
.pe-flow__item .pe-iconbtn { width: 22px; height: 22px; }
.pe-flow__add { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 64px; border: 1px dashed var(--border-strong, var(--border)); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--brand-ink, var(--brand)); cursor: pointer; }
.pe-flow__add:hover { border-color: var(--brand); }
.pe-tagrow { display: flex; align-items: center; gap: var(--sp-3); }
.pe-swatch { width: 28px; height: 28px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.06); }
.pe-pager { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-4); font-size: 14px; }
.pe-pager [aria-current] { min-width: 28px; padding: 4px 8px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius); text-align: center; font-weight: 600; }

/* popovers ----------------------------------------------------------------- */
.pe-pop { position: fixed; z-index: 1300; max-height: min(420px, 70vh); overflow: auto; padding: 6px; border: 1px solid var(--pe-line, var(--border)); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.15)); color: var(--text); }
.pe-pop--menu { min-width: 180px; }
.pe-menu__item, .pe-opt { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: var(--radius-sm, 4px); background: none; font: inherit; font-size: 14px; color: var(--text); text-align: left; cursor: pointer; }
.pe-menu__item:hover:not(:disabled), .pe-menu__item:focus, .pe-opt:hover, .pe-opt:focus { background: var(--surface-2); outline: none; }
.pe-menu__item.is-danger { color: var(--danger); }
.pe-menu__item:disabled { opacity: .45; cursor: not-allowed; }
.pe-opt.is-on { background: var(--brand-soft); font-weight: 600; }
.pe-menu__sep { height: 1px; margin: 4px 0; background: var(--pe-line, var(--border)); }
.pe-menu__id { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 8px 12px; }
.pe-menu__id > span { display: flex; flex-direction: column; }
.pe-menu__id .pe-label { font-size: 11px; letter-spacing: .04em; }
.pe-menu__id code { font-size: 13px; }
.pe-search { position: relative; display: flex; align-items: center; }
.pe-search input { width: 100%; height: 36px; padding: 0 34px 0 12px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius-pill); background: var(--surface); font: inherit; font-size: 14px; color: var(--text); }
.pe-search .pe-i { position: absolute; right: 12px; color: var(--text-muted); pointer-events: none; }
.pe-search--pop { margin: 2px 2px 6px; }
.pe-search--ov { width: 300px; max-width: 100%; }
.pe-search--full { margin-bottom: var(--sp-3); }
.pe-pop--logic { padding: var(--sp-3) var(--sp-4); }
.pe-logicpop ol { margin: var(--sp-2) 0 0; padding-left: 18px; }
.pe-logicpop li { margin-bottom: 6px; }
.pe-logicpop li > div { display: inline-flex; flex-direction: column; font-size: 13px; vertical-align: top; max-width: 210px; }
.pe-logicpop small { color: var(--text-muted); }
.pe-logicpop__acts { float: right; display: inline-flex; gap: 2px; }

/* modals + side panels ----------------------------------------------------- */
.pe-modal-ov, .pe-panel-ov { position: fixed; inset: 0; z-index: 1250; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .45); }
.pe-panel-ov { justify-content: flex-end; padding: 0; }
.pe-modal { width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); color: var(--text); }
.pe-modal.is-wide { width: min(760px, 100%); }
.pe-panel { width: min(520px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); animation: pe-slide .2s ease-out; }
.pe-panel.is-wide { width: min(640px, 100%); }
@keyframes pe-slide { from { transform: translateX(40px); opacity: 0; } }
.pe-layer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--pe-line, var(--border)); }
.pe-layer__head h2 { margin: 0; font-size: 20px; }
.pe-layer__body { flex: 1; overflow-y: auto; padding: var(--sp-5); }
.pe-layer__foot { display: flex; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--pe-line, var(--border)); }
.pe-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.pe-fs { margin: 0 0 var(--sp-4); padding: 0; border: 0; }
.pe-fs legend { margin-bottom: 8px; }
.pe-check, .pe-radio { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.pe-check input, .pe-radio input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.pe-check small { margin-left: 4px; color: var(--text-muted); }
.pe-check--inline { margin: 0; align-items: center; }
.pe-check[hidden] { display: none; }
.pe-radios { margin-bottom: var(--sp-4); }
.pe-who { margin: 0; padding: var(--sp-3); border: 1px solid var(--pe-line, var(--border)); border-radius: var(--radius); }
.pe-who[hidden] { display: none; }
.pe-wholist { max-height: 300px; overflow-y: auto; }
.pe-acc { border-bottom: 1px solid var(--pe-line, var(--border)); }
.pe-acc summary { display: flex; align-items: center; gap: 6px; padding: 14px 2px; font-weight: 600; cursor: pointer; list-style: none; }
.pe-acc summary::-webkit-details-marker { display: none; }
.pe-acc__i { transition: transform .15s; }
.pe-acc[open] .pe-acc__i { transform: rotate(90deg); }
.pe-acc > :not(summary) { margin-left: 22px; }
.pe-acc .pe-table { margin-bottom: var(--sp-4); width: calc(100% - 22px); }
.pe-list { margin: 0 0 var(--sp-4); padding-left: 40px; font-size: 14px; line-height: 1.7; }
.pe-tpls { display: grid; gap: var(--sp-3); }
.pe-tpl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius); cursor: pointer; }
.pe-tpl:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pe-tpl input { grid-row: span 3; margin-top: 3px; accent-color: var(--brand); }
.pe-tpl__t { font-weight: 600; }
.pe-tpl__stages { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pe-tpl__stages span { padding: 1px 8px; border-radius: var(--radius-pill); background: var(--surface-2); font-size: 12px; }
.pe-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-color { position: relative; cursor: pointer; }
.pe-color input { position: absolute; opacity: 0; }
.pe-color span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.pe-color input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.pe-color input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 4px; }
.pe-cond { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--sp-2); }
.pe-boardpv { display: flex; justify-content: center; padding: var(--sp-4); border-radius: var(--radius); background: var(--surface-2); }
.pe-boardpv__col { width: 220px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius-sm, 4px); background: var(--surface); }
.pe-boardpv__h { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--pe-line, var(--border)); font-size: 11px; font-weight: 700; }
.pe-boardpv__card { display: flex; flex-direction: column; gap: 6px; margin: 8px; padding: 10px; border: 1px solid var(--pe-line, var(--border)); border-radius: var(--radius); }
.pe-boardpv__card i { height: 8px; border-radius: 4px; background: var(--surface-3, #eaf0f6); }
.pe-boardpv__card i:last-child { width: 60%; }
.pe-boardpv__sum { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-top: 1px solid var(--pe-line, var(--border)); font-size: 13px; }
.pe-boardpv__h + .pe-boardpv__sum { border-top: 0; border-bottom: 1px solid var(--pe-line, var(--border)); }
.pe-sumprop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 6px 8px; border: 1px solid var(--pe-line, var(--border)); border-radius: var(--radius); font-size: 14px; }
.pe-sumprop span:nth-child(2) { flex: 1; }
.pe-grip-s { color: var(--text-muted); display: inline-flex; }
.pe-warn { margin: var(--sp-3) 0; padding: var(--sp-3); border: 1px solid #f5c26b; border-radius: var(--radius); background: #fef8f0; color: #213343; font-size: 13px; line-height: 1.6; }

/* full-screen logic editor ------------------------------------------------- */
.pe-full { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column; background: var(--bg, var(--surface)); color: var(--text); }
.pe-full__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: 10px var(--sp-5); background: var(--pe-dark, #213343); color: #fff; }
.pe-full__bar h2 { margin: 0; font-size: 18px; color: inherit; }
.pe-full__bar span { font-size: 13px; opacity: .8; }
.pe-full__acts { display: flex; gap: var(--sp-2); }
.pe-logic { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); min-height: 0; }
.pe-logic__edit { overflow-y: auto; padding: var(--sp-5); border-right: 1px solid var(--pe-line, var(--border)); }
.pe-logic__edit > .pe-input { margin-bottom: var(--sp-3); }
.pe-logic__preview { overflow-y: auto; padding: var(--sp-5); background: var(--surface-2); }
.pe-logic__card { display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin: var(--sp-4) auto 0; padding: var(--sp-5); border: 1px solid var(--pe-line, var(--border)); border-radius: var(--radius); background: var(--surface); }
.pe-logic__deps { margin-top: var(--sp-3); color: var(--text-muted); text-align: center; }
.pe-logic__deps .pe-field { text-align: left; }
.pe-dep { margin-bottom: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--pe-line, var(--border)); border-radius: var(--radius); }
.pe-dep__head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.pe-dep__head > .pe-label { flex: 1; }
.pe-dep__arrows { display: inline-flex; }
.pe-dep__arrows .pe-iconbtn { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .pe-card { padding: var(--sp-4) 12px; }
  .pe-select { min-width: 0; width: 100%; }
  .pe-logic { grid-template-columns: 1fr; overflow-y: auto; }
  .pe-logic__edit, .pe-logic__preview { overflow: visible; border-right: 0; }
  .pe-cond { grid-template-columns: 1fr; }
  .pe-pencil, .pe-code + .pe-iconbtn { opacity: 1; }
}

/* ==========================================================================
   Buttons use the CRM button style (.btn-crm in base.css): 8px corners,
   brand-blue primary, bordered outline. No pill or circle buttons.
   ========================================================================== */
.pe-btn, .pe-btn--pill, .pe-select, .pe-dd, .pe-x, .pe-iconbtn, .pe-pencil, .pe-flow__add { border-radius: var(--radius-sm, 8px); }
.pe-search input { border-radius: var(--radius-sm, 8px); }
.pe-btn { height: 42px; padding: 0 18px; font-size: 14.5px; font-weight: 600; }
.pe-btn--sm, .pe-btn--pill { height: 34px; padding: 0 12px; font-size: 13.5px; }
.pe-btn--xs { height: 30px; padding: 0 10px; font-size: 13px; }
.pe-btn--outline, .pe-btn--pill { border-color: var(--border-strong, var(--border)); background: var(--surface); color: var(--text); }
.pe-btn--outline:hover:not(:disabled), .pe-btn--pill:hover:not(:disabled) { border-color: var(--text-subtle); background: var(--surface-hover, var(--surface-2)); }
.pe-btn--primary { border-color: var(--brand); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .14); }
.pe-btn--danger { border-color: var(--danger); }
