/* ===== 原生流程设计器样式（wfd）v2 ===== */
.wfd-dialog { display: flex; flex-direction: column; width: 100% !important; max-width: 100% !important; height: 100% !important; max-height: 100% !important; border-radius: 0 !important; }
.wfd-dialog .dlg-head { display: flex; align-items: center; gap: 12px; }
.wfd-zoom { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.wfd-zoom button { height: 26px; min-width: 28px; border: 1px solid #e3e8f0; background: #fff; border-radius: 7px; cursor: pointer; font-size: 12px; color: #4b5563; }
.wfd-zoom button:hover { border-color: #2b6cf6; color: #2b6cf6; }
.wfd-zoom span { font-size: 12px; color: #8b93a2; min-width: 42px; text-align: center; }

.wfd-main { flex: 1; display: flex; min-height: 0; }
.wfd-stage { flex: 1; overflow: auto; background: #f7f8fa; background-image: radial-gradient(#e4e9f2 1px, transparent 1px); background-size: 18px 18px; }
#wfd-canvas { transform-origin: top center; padding: 32px 24px 64px; display: flex; flex-direction: column; align-items: center; width: max-content; min-width: 100%; }
.wfd-side { width: 296px; flex: 0 0 296px; border-left: 1px solid #eef1f6; background: #fff; padding: 16px; overflow-y: auto; }

/* 卡片 */
.wfd-start, .wfd-card { width: 236px; background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 24px -18px rgba(16,24,40,.28); overflow: hidden; flex: 0 0 auto; }
.wfd-start { border: 1px solid #c9d9fb; }
.wfd-card { border: 1px solid #eef1f6; }
.wfd-card.orange { border-color: #f7d4bd; }
.wfd-card.green { border-color: #c9e8d6; }
.wfd-card.sel { outline: 2px solid #2b6cf6; outline-offset: 2px; }
.wfd-head { height: 26px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; color: #fff; background: #2b6cf6; }
.wfd-card.orange .wfd-head { background: #e8590c; }
.wfd-card.green .wfd-head { background: #12874a; }
.wfd-head-t { font-weight: 500; letter-spacing: .2px; }
.wfd-del { margin-left: auto; width: 16px; height: 16px; line-height: 15px; text-align: center; border-radius: 4px; cursor: pointer; opacity: .55; font-size: 13px; }
.wfd-start:hover .wfd-del, .wfd-card:hover .wfd-del, .wfd-cond:hover .wfd-del { opacity: 1; }
.wfd-del:hover { background: rgba(255,255,255,.22); }
.wfd-body { padding: 10px 12px; font-size: 13px; color: #1f2937; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wfd-card .wfd-body:hover { background: #fafcff; }
.wfd-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfd-arrow { color: #c3c9d4; font-size: 14px; }

/* 加号 */
.wfd-plus { width: 24px; height: 24px; border-radius: 50%; border: 0; background: #2b6cf6; color: #fff; font-size: 15px; line-height: 1; cursor: pointer; margin: 12px 0; box-shadow: 0 2px 8px rgba(43,108,246,.35); flex: 0 0 auto; }
.wfd-plus:hover { background: #1d5ae0; }

/* 条件分支 */
.wfd-branch { display: flex; flex-direction: column; align-items: center; width: 100%; }
.wfd-gate { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px dashed #c9d9fb; color: #2b6cf6; font-size: 12px; }
.wfd-gate-label::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #2b6cf6; margin-right: 6px; vertical-align: middle; }
.wfd-add-cond { border: 0; background: transparent; color: #2b6cf6; font-size: 12px; cursor: pointer; padding: 0 0 0 8px; border-left: 1px solid #e3e9f5; }
.wfd-add-cond:hover { color: #1d5ae0; text-decoration: underline; }

.wfd-cols { display: flex; justify-content: center; gap: 22px; position: relative; padding-top: 18px; padding-bottom: 18px; }
.wfd-cols::before { content: ''; position: absolute; top: 0; left: 118px; right: 118px; height: 1px; background: #e3e8f0; }
.wfd-col { position: relative; display: flex; flex-direction: column; align-items: center; width: 236px; flex: 0 0 236px; }
.wfd-col::before { content: ''; position: absolute; top: -18px; left: 50%; width: 1px; height: 18px; background: #e3e8f0; }
.wfd-col::after { content: ''; position: absolute; bottom: -18px; left: 50%; width: 1px; height: 18px; background: #e3e8f0; }
.wfd-merge-bar { height: 1px; background: #e3e8f0; width: calc(100% - 236px); margin: 0 auto; }
.wfd-branch > .wfd-plus { margin-top: 14px; }

/* 条件卡 */
.wfd-cond { width: 100%; background: #fff; border: 1px solid #dfe8f6; border-radius: 10px; padding: 9px 11px; cursor: pointer; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.wfd-cond:hover { border-color: #2b6cf6; }
.wfd-cond.sel { outline: 2px solid #2b6cf6; outline-offset: 2px; }
.wfd-cond.dragging { opacity: .45; }
.wfd-cond-head { display: flex; align-items: center; font-size: 11.5px; margin-bottom: 5px; }
.wfd-cond-name { color: #1f2937; font-weight: 600; }
.wfd-cond.is-else .wfd-cond-name { color: #8b93a2; font-weight: 500; }
.wfd-cond-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.wfd-pri { color: #b0b7c3; font-size: 11px; }
.wfd-cond .wfd-del { color: #98a2b3; }
.wfd-cond .wfd-del:hover { background: #f3f5f9; color: #d92d20; }
.wfd-cond-text { font-size: 12.5px; color: #1f2937; }
.wfd-col-body { display: flex; flex-direction: column; align-items: center; width: 100%; margin-top: 12px; }
.wfd-empty { margin-top: 12px; width: 100%; height: 42px; border: 1px dashed #d5dbe6; background: #fff; border-radius: 10px; color: #98a2b3; font-size: 12.5px; cursor: pointer; }
.wfd-empty:hover { border-color: #2b6cf6; color: #2b6cf6; }

/* 结束 */
.wfd-end { display: flex; align-items: center; gap: 8px; color: #98a2b3; font-size: 12.5px; margin-top: 16px; }
.wfd-dot { width: 9px; height: 9px; border-radius: 50%; background: #d8dde6; }

/* 加节点菜单 */
.wfd-add-menu { position: fixed; z-index: 9999; background: #fff; border: 1px solid #e3e8f0; border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.16); padding: 6px; min-width: 122px; }
.wfd-add-menu div { padding: 8px 10px; font-size: 13px; border-radius: 7px; cursor: pointer; color: #1f2937; }
.wfd-add-menu div:hover { background: #f2f6ff; color: #2b6cf6; }

/* 右侧面板 */
.wfd-side h4 { font-size: 13px; margin: 0 0 14px; color: #1f2937; }
.wfd-field { margin-bottom: 13px; }
.wfd-field label { display: block; font-size: 12px; color: #8b93a2; margin-bottom: 6px; }
.wfd-field select, .wfd-field input { width: 100%; height: 32px; border: 1px solid #d8dde6; border-radius: 8px; padding: 0 10px; font-size: 13px; background: #fff; color: #1f2937; }
.wfd-btn { height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid #d8dde6; background: #fff; font-size: 13px; cursor: pointer; }
.wfd-btn.primary { background: #2b6cf6; border-color: #2b6cf6; color: #fff; margin-right: 8px; }
.wfd-btn.primary:hover { background: #1d5ae0; }
.wfd-btn.danger { color: #d92d20; border-color: #f5c2c0; margin-top: 10px; }
.wfd-btn.danger:hover { background: #fff5f4; }
.wfd-ins-empty { color: #98a2b3; font-size: 12.5px; text-align: center; padding: 44px 10px; line-height: 1.9; }
.wfd-tip { margin-top: 12px; font-size: 11.5px; color: #98a2b3; line-height: 1.8; }

@media (max-width: 1100px) {
  .wfd-side { width: 250px; flex-basis: 250px; }
  .wfd-cols { flex-wrap: wrap; gap: 16px; }
  .wfd-cols::before, .wfd-merge-bar { display: none; }
  .wfd-col::before, .wfd-col::after { display: none; }
}

.wfd-readonly { height: 32px; line-height: 32px; padding: 0 10px; border: 1px solid #e3e8f0; border-radius: 8px; background: #fafbfd; color: #1f2937; font-size: 13px; }
.wfd-note { font-size: 12px; color: #8b93a2; line-height: 1.85; margin-top: 12px; }
.wfd-start { cursor: pointer; }
.wfd-start:hover { border-color: #2b6cf6; }
