/* ===== 审批流程设置中心（1.83.5）===== */

/* 列表 */
.af-panel { padding-bottom: 8px; }
.af-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #e8e6e1); margin: 4px 0 14px; }
.af-tabs button { border: 0; background: none; padding: 9px 14px; font-size: 14px; color: #6b6b66; cursor: pointer; border-bottom: 2px solid transparent; }
.af-tabs button.active { color: #ef7523; border-bottom-color: #ef7523; font-weight: 500; }
.af-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.af-toolbar select { min-width: 140px; }
.af-search { flex: 1 1 220px; max-width: 320px; }
.af-toolbar-actions { margin-left: auto; display: flex; gap: 8px; }
.af-table td { vertical-align: middle; }
.af-name b { font-weight: 500; }
.af-off { display: inline-block; margin-left: 8px; font-size: 11px; color: #8a8a85; border: 1px solid #ddd; border-radius: 4px; padding: 0 5px; }
.af-api { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #6b6b66; }
.af-ops { white-space: nowrap; }
.af-link { border: 0; background: none; color: #2f6fd0; font-size: 13px; cursor: pointer; padding: 2px 6px; }
.af-link:hover { text-decoration: underline; }
.af-link.mg-danger { color: #c0392b; }

/* 编辑器 */
.af-editor { position: fixed; inset: 0; z-index: 90; background: #f6f6f4; display: flex; flex-direction: column; }
.af-editor-head { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: #fff; border-bottom: 1px solid #e8e6e1; }
.af-back { border: 0; background: none; color: #2f6fd0; cursor: pointer; font-size: 14px; }
.af-editor-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.af-editor-title b { font-size: 15px; font-weight: 500; }
.af-editor-title small { color: #8a8a85; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-editor-actions { margin-left: auto; display: flex; gap: 8px; }
.af-editor-body { flex: 1; display: flex; min-height: 0; }

/* 画布 */
.af-canvas { flex: 1; overflow: auto; padding: 20px 24px 40px; }
.af-flow-meta { max-width: 720px; margin: 0 auto 22px; background: #fff; border: 1px solid #e8e6e1; border-radius: 10px; padding: 16px 18px; display: grid; gap: 10px; }
.af-flow-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.af-actions-pick { display: flex; gap: 14px; padding-top: 7px; }
.af-chip-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #3a3a36; white-space: nowrap; flex: none; }

.af-flow { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.af-start,.af-end { background: #fff; border: 1px solid #d9d6cf; border-radius: 999px; padding: 5px 16px; font-size: 12px; color: #6b6b66; }
.af-link-line { width: 1px; height: 18px; background: #d9d6cf; }
.af-node { width: 100%; background: #fff; border: 1px solid #ddd9d2; border-radius: 10px; padding: 11px 13px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.af-node:hover { border-color: #c9c4ba; }
.af-node.is-on { border-color: #ef7523; box-shadow: 0 0 0 2px rgba(239,117,35,.12); }
.af-node-head { display: flex; align-items: flex-start; gap: 8px; }
.af-node-head b { font-size: 14px; font-weight: 500; flex: 1; }
.af-node-del { border: 0; background: none; color: #b3b0a8; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.af-node-del:hover { color: #c0392b; }
.af-node-meta { margin-top: 4px; font-size: 12px; color: #8a8a85; }
.af-node-cond { margin-top: 6px; font-size: 12px; color: #a8641b; background: #fdf5e9; border-radius: 5px; padding: 3px 7px; display: inline-block; }
.af-add-node { width: 100%; border: 1px dashed #cfc9bf; background: none; border-radius: 10px; padding: 10px; color: #7a766e; font-size: 13px; cursor: pointer; }
.af-add-node:hover { border-color: #ef7523; color: #ef7523; background: #fff9f3; }

/* 属性面板 */
.af-props { width: 340px; flex: none; background: #fff; border-left: 1px solid #e8e6e1; overflow: auto; padding: 16px 18px 30px; display: grid; gap: 12px; align-content: start; }
.af-props-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid #f0eee9; }
.af-props-head b { font-size: 14px; font-weight: 500; }
.af-props .mg-field { margin: 0; }
.af-actors { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; min-height: 22px; }
.af-actor { display: inline-flex; align-items: center; gap: 4px; background: #f3f1ec; border-radius: 999px; padding: 2px 4px 2px 9px; font-size: 12px; color: #3a3a36; }
.af-actor button { border: 0; background: none; color: #9a968e; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 3px; }
.af-actor button:hover { color: #c0392b; }
.af-actor-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 108px; overflow: auto; padding: 6px; background: #faf9f6; border: 1px solid #efede8; border-radius: 7px; }
.af-actor-opt { border: 1px solid #e2ded6; background: #fff; border-radius: 999px; padding: 2px 9px; font-size: 12px; color: #3a3a36; cursor: pointer; }
.af-actor-opt:hover { border-color: #ef7523; color: #ef7523; }
.af-muted { color: #a3a099; font-size: 12px; }
.af-check { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: #3a3a36; line-height: 1.5; }
.af-props .note { margin: 2px 0 0; }

/* 窄屏 */
@media (max-width: 900px) {
  .af-editor-body { flex-direction: column; }
  .af-canvas { padding: 14px 12px 20px; }
  .af-flow-meta { padding: 12px; }
  .af-flow-row { grid-template-columns: 1fr; }
  .af-props { width: auto; max-height: 46vh; border-left: 0; border-top: 1px solid #e8e6e1; }
  .af-toolbar-actions { margin-left: 0; width: 100%; }
}
