.wf-page-header { margin-bottom: 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.wf-page-title { font-size: 1.4rem; font-weight: 700; color: #1e293b; }
.wf-grid-container { background: #fff; border-radius: 1rem; border: 1px solid #e9ecef; overflow: hidden; box-shadow: 0 4px 12px rgba(15,23,42,.06); }
.wf-list { display: flex; flex-direction: column; }
.wf-list-item { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .15s ease; }
.wf-list-item:last-child { border-bottom: none; }
.wf-list-item:hover { background: #f8fbff; }
.wf-list-icon { width: 36px; height: 36px; border-radius: .55rem; background: linear-gradient(180deg, #2563eb, #1e40af); display: flex; align-items: center; justify-content: center; flex: 0 0 36px; color: #fff; }
.wf-list-main { flex: 0 0 200px; min-width: 0; }
.wf-list-title { font-size: .88rem; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-list-sub { font-size: .7rem; color: #64748b; display: flex; align-items: center; gap: .25rem; margin-top: .1rem; }
.wf-list-details { flex: 1; display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.wf-list-detail { display: flex; align-items: center; gap: .3rem; font-size: .74rem; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-list-progress { flex: 0 0 120px; display: flex; align-items: center; gap: .5rem; }
.wf-list-actions { display: flex; gap: .3rem; flex: 0 0 auto; }
.wf-card-icon-svg { width: 18px; height: 18px; display: block; }
.wf-card-inline-icon { width: 13px; height: 13px; display: block; flex: 0 0 13px; color: #94a3b8; }
.wf-card-progress-bar { flex: 1; height: 6px; border-radius: 999px; background: #e9eff8; overflow: hidden; }
.wf-card-progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #3b82f6); transition: width .3s ease; }
.wf-card-progress-text { font-weight: 700; font-size: .78rem; color: #2563eb; white-space: nowrap; min-width: 36px; text-align: right; }
.wf-card-action-btn { width: 28px; height: 28px; border-radius: .5rem; border: 1px solid #e2e8f0; background: #f8fafc; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #475569; transition: all .15s ease; padding: 0; }
.wf-card-action-btn:hover { background: #eef4ff; border-color: #93c5fd; color: #2563eb; }
.wf-card-action-btn-danger:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.wf-card-action-btn-add { color: #2563eb; border-color: #bfdbfe; }
.wf-card-action-btn-add:hover { background: #dbeafe; border-color: #60a5fa; color: #1d4ed8; }
.wf-list-status-pill, .wf-list-priority-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: .18rem .55rem; font-size: .62rem; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.wf-ps-planning { background: #e0e7ff; color: #3730a3; }
.wf-ps-progress { background: #dbeafe; color: #1d4ed8; }
.wf-ps-completed { background: #dcfce7; color: #15803d; }
.wf-ps-pending { background: #e2e8f0; color: #334155; }
.wf-ps-cancelled { background: #fee2e2; color: #dc2626; }
.wf-pr-urgent { background: #fee2e2; color: #dc2626; }
.wf-pr-high { background: #fff7ed; color: #ea580c; }
.wf-pr-normal { background: #f0fdf4; color: #16a34a; }
.wf-pr-low { background: #f1f5f9; color: #64748b; }
.wf-card-action-icon { width: 14px; height: 14px; display: block; }
.wf-detail-header { margin-bottom: 1rem; }
.workflow-root-card { border: 2px solid #3b82f6; background: #f0f7ff; }
.workflow-step-theme-root { background: linear-gradient(180deg, #1e40af, #1e3a8a); }
.workflow-builder { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
.workflow-builder-full { grid-template-columns: 1fr; }
.workflow-canvas { background: #fff; border-radius: 1rem; border: 1px solid #e9ecef; position: relative; overflow: hidden; }
.workflow-canvas-tools { position: absolute; left: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .4rem; z-index: 2; }
.workflow-tool-btn, .workflow-tool-zoom { width: 42px; height: 42px; border-radius: .8rem; border: 1px solid #dbe4f0; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(15,23,42,.08); cursor: pointer; }
.workflow-tool-zoom { width: 50px; font-size: .8rem; font-weight: 700; color: #475569; }
.workflow-tool-btn svg { width: 18px; height: 18px; display: block; }
.workflow-step-flow { padding: 1.5rem 1.5rem 4.5rem; display: flex; flex-direction: column; align-items: center; gap: .75rem; min-height: 640px; overflow-x: auto; background-image: radial-gradient(#e6ebf5 1px, transparent 1px); background-size: 18px 18px; }
.workflow-zoom-container { transition: transform .2s ease; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.workflow-children-group { display: flex; flex-direction: row; justify-content: center; position: relative; gap: 0; }
.workflow-children-group > .workflow-step-column { position: relative; padding: 28px 1.25rem 0; }
.workflow-children-group > .workflow-step-column::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 2px solid #94a3b8; }
.workflow-children-group > .workflow-step-column:first-child::before { left: 50%; }
.workflow-children-group > .workflow-step-column:last-child::before { right: 50%; }
.workflow-children-group > .workflow-step-column:only-child::before, .workflow-children-group > .workflow-step-column:only-child::after { display: none; }
.workflow-children-group > .workflow-step-column:only-child { padding-top: 0; }
.workflow-children-group > .workflow-step-column::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 28px; background: #94a3b8; }
.workflow-step-column { display: flex; flex-direction: column; align-items: center; min-width: 260px; max-width: 300px; }
.workflow-step-node { width: 100%; display: flex; flex-direction: column; align-items: center; transition: transform .15s ease; }
.workflow-step-node.drag-over .workflow-step-card-wrapper { transform: scale(1.01); }
.workflow-step-card-wrapper { display: flex; flex-direction: row; align-items: stretch; width: 100%; gap: 0; transition: transform .15s ease; }
.workflow-step-card-inner { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.workflow-dropzone { display: none; align-items: center; justify-content: center; font-size: .65rem; color: #94a3b8; border: 2px dashed transparent; border-radius: .4rem; transition: all .2s ease; z-index: 1; position: relative; }
.workflow-step-node.drag-over .workflow-dropzone, .workflow-step-node:not(:has(.workflow-step-node.drag-over)) .workflow-dropzone { display: flex; }
.workflow-dropzone.active { border-color: #3b82f6; background: rgba(59, 130, 246, .08); color: #2563eb; }
.workflow-dropzone-left, .workflow-dropzone-right { width: 32px; min-height: 48px; flex: 0 0 32px; }
.workflow-dropzone-left.active, .workflow-dropzone-right.active { border-color: transparent; background: transparent; }
.workflow-dropzone-left.active::before, .workflow-dropzone-right.active::before { content: ''; position: absolute; top: 50%; width: 28px; height: 3px; background: #3b82f6; border-radius: 999px; }
.workflow-dropzone-left.active::after, .workflow-dropzone-right.active::after { content: ''; position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; transform: translateY(-50%); }
.workflow-dropzone-left.active::before { right: 0; }
.workflow-dropzone-left.active::after { left: 0; transform: translateY(-50%); }
.workflow-dropzone-right.active::before { left: 0; }
.workflow-dropzone-right.active::after { right: 0; transform: translateY(-50%); }
.workflow-dropzone-bottom { height: 22px; width: 100%; }
.workflow-dropzone-bottom.active { border-color: transparent; background: transparent; }
.workflow-dropzone-bottom.active::before { content: ''; position: absolute; left: 50%; top: 0; width: 3px; height: 100%; background: #3b82f6; border-radius: 999px; transform: translateX(-50%); }
.workflow-dropzone-bottom.active::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; transform: translateX(-50%); }
.workflow-branch-label, .workflow-decision-label { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; padding: .28rem .75rem; border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 700; margin: .2rem 0 .55rem; }
.workflow-branch-label { background: #3b82f6; }
.workflow-decision-label.approve { background: #22c55e; }
.workflow-decision-label.deny { background: #ef4444; }
.workflow-step-card { width: 100%; background: #fff; border: 2px solid #dbe4f0; border-radius: .7rem; box-shadow: 0 6px 14px rgba(15, 23, 42, .06); }
.workflow-step-card-status-pending { border-color: #94a3b8; }
.workflow-step-card-status-progress { border-color: #3b82f6; }
.workflow-step-card-status-completed { border-color: #22c55e; }
.workflow-step-card-status-blocked { border-color: #f59e0b; }
.workflow-step-card-status-cancelled { border-color: #dc2626; background: #fef2f2; box-shadow: 0 0 0 2px rgba(220, 38, 38, .18); }
.workflow-step-card-warning { border-color: #f87171; box-shadow: 0 0 0 2px rgba(248, 113, 113, .18); }
.workflow-step-heading { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.workflow-step-type-icon { width: 30px; height: 30px; border-radius: .5rem; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.workflow-step-glyph-svg { width: 16px; height: 16px; display: block; }
.workflow-step-theme-task { background: linear-gradient(180deg, #2f80ed, #2563eb); }
.workflow-step-theme-approval { background: linear-gradient(180deg, #10b981, #059669); }
.workflow-step-theme-email { background: linear-gradient(180deg, #312e81, #1e1b4b); }
.workflow-step-theme-document { background: linear-gradient(180deg, #f97316, #ea580c); }
.workflow-step-theme-form { background: linear-gradient(180deg, #fb923c, #f97316); }
.workflow-step-content { padding: .65rem .75rem; }
.workflow-step-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .4rem; }
.workflow-step-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; }
.workflow-status-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: .3rem .7rem; font-size: .64rem; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.workflow-status-pill-pending { background: #e2e8f0; color: #334155; }
.workflow-status-pill-progress { background: #dbeafe; color: #1d4ed8; }
.workflow-status-pill-completed { background: #dcfce7; color: #15803d; }
.workflow-status-pill-blocked { background: #fef3c7; color: #b45309; }
.workflow-status-pill-cancelled { background: #dc2626; color: #fff; }
.workflow-step-subtitle { font-size: .62rem; color: #64748b; font-weight: 600; }
.workflow-step-title { font-size: .88rem; font-weight: 700; color: #1e293b; }
.workflow-step-meta { color: #64748b; font-size: .72rem; margin-bottom: .2rem; }
.workflow-step-progress { font-weight: 700; margin: .35rem 0; font-size: .78rem; color: #334155; }
.workflow-step-progress-bar { height: 6px; border-radius: 999px; background: #e9eff8; overflow: hidden; margin-bottom: .45rem; }
.workflow-step-progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.workflow-step-actions { display: flex; gap: .35rem; margin-top: .5rem; flex-wrap: wrap; }
.workflow-action-btn { display: inline-flex; align-items: center; border: 1px solid #dbe4f0; background: #fff; border-radius: .6rem; padding: 0; color: #3156d3; font-size: .78rem; font-weight: 700; width: 30px; height: 30px; justify-content: center; }
.workflow-action-btn.primary { background: #eef4ff; border-color: #c9dbff; }
.workflow-action-icon-svg { width: 15px; height: 15px; display: block; }
.workflow-inline-meta-icon { width: 12px; height: 12px; display: inline-block; vertical-align: -2px; margin-right: .2rem; }
.workflow-step-connector-vertical { width: 3px; height: 40px; background: linear-gradient(180deg, #94a3b8, #60a5fa); border-radius: 999px; margin: .25rem 0; box-shadow: 0 0 0 1px rgba(37, 99, 235, .08); }
.workflow-decision-wrapper { width: 100%; display: flex; justify-content: center; margin-top: .15rem; }
.workflow-decision-branches { width: min(100%, 520px); display: grid; grid-template-columns: 1fr 44px 1fr; align-items: start; gap: .5rem; }
.workflow-decision-column { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.workflow-decision-split { position: relative; height: 100%; min-height: 120px; }
.workflow-decision-split::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 4px; height: 26px; background: #94a3b8; border-radius: 999px; }
.workflow-decision-split::after { content: ""; position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 90px; height: 4px; background: #94a3b8; border-radius: 999px; }
.workflow-add-node-btn { border: 1px dashed #0d6efd; background: #eef5ff; color: #0d6efd; border-radius: 999px; width: 34px; height: 34px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin-top: .5rem; }
.workflow-action-btn-delete { color: #dc2626; border-color: #fecaca; }
.workflow-action-btn-delete:hover { background: #fee2e2; }
.workflow-delete-modal { max-width: 480px; }
.workflow-doc-icon-svg { width: 14px; height: 14px; display: block; }
.workflow-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 1050; padding: 1rem; }
.workflow-modal { width: min(760px, 100%); background: #fff; border-radius: 1rem; box-shadow: 0 24px 60px rgba(15, 23, 42, .2); overflow: hidden; animation: workflow-modal-in .18s ease-out; }
.workflow-step-modal { max-width: 760px; }
.workflow-add-step-modal { max-width: 860px; }
.workflow-modal-header, .workflow-modal-footer { padding: 1rem 1.25rem; border-bottom: 1px solid #eef1f4; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.workflow-modal-footer { border-bottom: 0; border-top: 1px solid #eef1f4; justify-content: flex-end; }
.workflow-modal-body { padding: 1.25rem; }
.workflow-modal-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; padding: .9rem 1rem; border-radius: .85rem; background: #f8fbff; }
.workflow-doc-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.workflow-doc-chip { display: inline-flex; align-items: center; gap: .45rem; background: #eef5ff; border: 1px solid #cfe0ff; border-radius: 999px; padding: .35rem .7rem; font-size: .85rem; color: inherit; text-decoration: none; }
.workflow-doc-chip.pending { background: #fff7ed; border-color: #fdba74; }
.workflow-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; padding: .65rem 1.1rem; border-radius: .65rem; font-size: .85rem; font-weight: 600; color: #fff; z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: workflow-toast-in .25s ease-out; max-width: 420px; word-break: break-word; }
.workflow-toast-success { background: #16a34a; }
.workflow-toast-error { background: #dc2626; }
.workflow-dropzone-icon { width: 14px; height: 14px; display: block; }
.workflow-note-timeline { border-left: 2px solid #e2e8f0; padding-left: .75rem; margin-top: .5rem; max-height: 240px; overflow-y: auto; }
.workflow-note-item { position: relative; padding-bottom: .75rem; padding-left: .5rem; }
.workflow-note-dot { position: absolute; left: -.94rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: #3b82f6; border: 2px solid #fff; box-shadow: 0 0 0 2px #e2e8f0; }
.workflow-note-header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .15rem; }
.workflow-note-author { font-weight: 700; font-size: .75rem; color: #1e293b; }
.workflow-note-date { font-size: .68rem; color: #94a3b8; }
.workflow-note-text { font-size: .8rem; color: #475569; line-height: 1.4; }
.workflow-step-last-note { display: flex; align-items: flex-start; gap: .3rem; margin-top: .25rem; padding: .3rem .5rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .4rem; font-size: .68rem; color: #475569; }
.workflow-step-last-note-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
@keyframes workflow-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes workflow-modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 1100px) { .workflow-decision-branches { grid-template-columns: 1fr; } .workflow-decision-split { display: none; } }
@media (max-width: 992px) { .workflow-modal-summary { grid-template-columns: 1fr; } .workflow-step-flow { flex-direction: column; align-items: center; overflow-x: visible; } .wf-grid-container { overflow-x: auto; } .wf-list-item { flex-wrap: wrap; gap: .5rem; } .wf-list-main { flex: 1 1 auto; } .wf-list-details { flex-basis: 100%; flex-wrap: wrap; gap: .5rem .75rem; } .wf-list-progress { flex: 1 1 auto; } }
