/* ===== İş Akışları (Workspace detayı listesi + Views/Workflows/Edit editörü) ===== */

/* Workspace detayı: sol sütun (Tablolar + İş Akışları) */
.detail-main { min-width: 0; }

/* Liste satırı */
.wf-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.wf-chain { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); }
.wf-chain svg { width: 14px; height: 14px; }
.wf-status { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; color: var(--text-muted); background: var(--bg-surface-2); }
.wf-status.ok { color: var(--accent-bright); background: var(--accent-soft); }
.wf-status.err { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.wf-status.run { color: var(--accent2); background: var(--accent2-soft); }

/* Başlık */
.wf-head { align-items: center; }
.wf-title-box { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 4px; }
.wf-name, .wf-desc { width: 100%; background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text-primary); outline: none; padding: 4px 8px; margin-left: -8px; }
.wf-name { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.wf-desc { font-size: 14px; color: var(--text-secondary); }
.wf-name:hover, .wf-desc:hover { border-color: var(--border); }
.wf-name:focus, .wf-desc:focus { border-color: var(--accent); background: var(--bg-surface); }
.wf-name:disabled, .wf-desc:disabled { border-color: transparent; background: transparent; }
.wf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-actions .btn-sm { width: auto; }
.wf-actions form { display: inline-flex; }
.wf-dirty { font-size: 12px; font-weight: 600; color: var(--warning); }
.wf-banner { margin-top: 14px; display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.45; border: 1px solid var(--border); background: var(--bg-surface); }
.wf-banner[hidden] { display: none; }
.wf-banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.wf-banner.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.wf-banner.ok { color: var(--accent-bright); border-color: var(--accent-dim); background: var(--accent-soft); }
.wf-banner.info { color: var(--text-secondary); border-color: var(--accent2); background: var(--accent2-soft); }

/* Yerleşim */
.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; margin-top: 8px; }
.wf-steps-col { position: relative; z-index: 2; min-width: 0; } /* .rise animasyonu katman açar: ekle menüsü yan panelin üstünde kalsın */
.wf-side { position: sticky; top: 84px; min-width: 0; z-index: 1; }
.wf-side .section { margin-bottom: 20px; }

/* Adım kartları */
.wf-steps { display: flex; flex-direction: column; }
.wf-steps .placeholder.sm { min-height: 170px; }
.wf-step { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s ease; }
.wf-step:hover, .wf-step.open { border-color: var(--accent-dim); }
.wf-step-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.wf-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--text-muted); background: var(--bg-surface-2); }
.wf-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--accent-bright); background: var(--accent-soft); }
.wf-ic svg { width: 17px; height: 17px; }
.wf-step-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wf-type { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); }
.wf-step-name { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; margin-left: -6px; color: var(--text-primary); font-size: 14.5px; font-weight: 600; outline: none; }
.wf-step-name:focus { border-color: var(--accent); background: var(--bg-base); }
.wf-step-tools { display: flex; gap: 2px; flex-shrink: 0; }
.wf-step-tools .icon-mini:disabled { opacity: .35; pointer-events: none; }
.wf-step-body { display: none; padding: 4px 16px 14px; border-top: 1px solid var(--border); }
.wf-step.open .wf-step-body { display: block; padding-top: 16px; }
.wf-step-body .field { margin-bottom: 14px; }
.wf-step-body .field textarea { min-height: 80px; }
.wf-step-body .field-row { flex-wrap: wrap; }
.wf-step-body .field-row .field { min-width: 180px; }
.wf-step-body .field-row .wf-method { flex: 0 0 120px; min-width: 110px; }
.wf-arrow { display: flex; justify-content: center; padding: 4px 0; color: var(--text-muted); }
.wf-arrow svg { width: 18px; height: 18px; }

.wf-check { display: flex; width: fit-content; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-secondary); margin: 0 0 14px; cursor: pointer; }
.wf-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.wf-lock { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.wf-lock svg { width: 11px; height: 11px; }
.wf-secret { display: flex; gap: 8px; align-items: center; }
.wf-secret input { flex: 1; }
.wf-secret .btn-sm, .wf-kv .btn-sm { width: auto; }
.wf-kv { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.wf-kv-row { display: flex; gap: 6px; width: 100%; }
.wf-kv-row input { flex: 1; min-width: 0; }
.field .wf-kv-row input { padding: 9px 11px; }

/* Adım ekle */
.wf-add { position: relative; margin-top: 14px; }
.wf-add-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border-radius: var(--radius); border: 1.5px dashed var(--border-strong); color: var(--text-secondary); font-weight: 600; font-size: 14px; background: transparent; transition: all .15s ease; }
.wf-add-btn:hover { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }
.wf-add-btn:disabled, .wf-add-btn[hidden] { display: none; }
.wf-add-btn svg { width: 17px; height: 17px; }
.wf-add-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.wf-add-menu[hidden] { display: none; }
.wf-add-menu button { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 10px; border-radius: var(--radius-sm); color: var(--text-primary); background: transparent; }
.wf-add-menu button:hover { background: var(--bg-surface-2); }
.wf-add-menu button svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--accent); }
.wf-add-menu b { display: block; font-size: 13.5px; }
.wf-add-menu small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }
.wf-add-sep { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.wf-hint { margin-top: 14px; }
.wf-hint code { background: var(--bg-surface); padding: 1px 6px; border-radius: 6px; color: var(--accent-bright); font-size: 11.5px; white-space: nowrap; }

/* Çalıştırma paneli */
.wf-run, .wf-history { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.wf-run-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wf-run-meta { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.wf-run-steps { display: flex; flex-direction: column; gap: 10px; }
.wf-run-step { display: flex; gap: 10px; align-items: flex-start; }
.wf-run-step > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }
.wf-run-step.succeeded > svg { color: var(--accent); }
.wf-run-step.failed > svg { color: var(--danger); }
.wf-run-step.running > svg { color: var(--accent2); animation: wf-spin 1s linear infinite; }
.wf-run-step.skipped { opacity: .6; }
.wf-run-main { flex: 1; min-width: 0; }
.wf-run-name { font-size: 13.5px; font-weight: 600; }
.wf-run-err { margin-top: 4px; font-size: 12.5px; color: var(--danger); line-height: 1.45; word-break: break-word; }
.wf-run-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wf-run-files .btn-sm { width: auto; padding: 6px 10px; }
.wf-run-out { margin-top: 6px; }
.wf-run-out summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent); }
.wf-run-out pre { margin-top: 6px; max-height: 260px; overflow: auto; font-size: 11.5px; background: var(--bg-base); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; white-space: pre-wrap; word-break: break-word; }
.wf-run-out .aic-tbl { max-height: 300px; overflow: auto; }
.wf-run-out .aic-tbl table { font-size: 12px; }
.wf-run-out .aia-answer { font-size: 13px; line-height: 1.5; margin-top: 6px; }
.wf-run-out .aia-answer p { margin: 0 0 6px; }
.wf-run-out .aia-answer ul { margin: 0 0 6px 18px; }
#wfRun svg { transition: none; }
#wfRun:disabled svg { animation: wf-spin 1s linear infinite; }
@keyframes wf-spin { to { transform: rotate(360deg); } }

/* Geçmiş */
.wf-history { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.wf-history > .field-hint { margin: 6px; }
.wf-hist-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-sm); text-align: left; color: var(--text-primary); background: transparent; width: 100%; }
.wf-hist-row:hover { background: var(--bg-surface-2); }
.wf-hist-date { font-size: 13px; }
.wf-hist-err { grid-column: 1 / -1; font-size: 12px; color: var(--danger); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1100px) {
    .wf-layout { grid-template-columns: 1fr; }
    .wf-side { position: static; }
}
@media (max-width: 640px) {
    .wf-name { font-size: 20px; }
    .wf-actions { width: 100%; }
    .wf-actions .btn-primary { flex: 1; }
    .wf-add-menu { grid-template-columns: 1fr; }
    .wf-step-head { padding: 10px; gap: 8px; }
    .wf-ic { display: none; }
    .wf-step-body { padding-left: 12px; padding-right: 12px; }
}

/* ===== Faz 2: girdi seçimi, değişken çipleri, filtre koşulları ===== */
.wf-input { margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--border); }
.wf-input label { display: flex; align-items: center; gap: 6px; }
.wf-input label svg { width: 14px; height: 14px; color: var(--accent); }
.wf-in-badge { margin-left: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--accent2); background: var(--accent2-soft); padding: 1px 7px; border-radius: 20px; }
.wf-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.wf-vars > span { font-size: 12px; color: var(--text-muted); margin-right: 2px; }
.wf-var { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--bg-base); color: var(--accent-bright); cursor: pointer; }
.wf-var:hover { border-color: var(--accent); background: var(--accent-soft); }
.wf-var:disabled { opacity: .5; cursor: default; }
.wf-conds { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-bottom: 14px; }
.wf-conds .btn-sm { width: auto; }
.wf-cond { display: grid; grid-template-columns: minmax(0, 1.2fr) 110px minmax(0, 1.4fr) auto; gap: 6px; width: 100%; }
.wf-cond input, .wf-cond select { min-width: 0; padding: 9px 11px; background: var(--bg-base); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13.5px; outline: none; }
.wf-cond input:focus, .wf-cond select:focus { border-color: var(--accent); }
.wf-cond input[hidden] { display: block; visibility: hidden; }
@media (max-width: 640px) {
    .wf-cond { grid-template-columns: 1fr 96px auto; }
    .wf-cond input[data-part="value"] { grid-column: 1 / 3; grid-row: 2; }
    .wf-cond input[data-part="value"][hidden] { display: none; }
}

/* ===== Faz 3: zamanlama ===== */
.wf-sched { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.wf-switch { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; width: fit-content; }
.wf-switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.wf-switch input:disabled + span { color: var(--text-muted); }
.wf-sched-body { margin-top: 14px; }
.wf-sched-body .field { margin-bottom: 12px; }
.wf-sched-body .field-row .field { min-width: 0; }
.wf-days { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-day { min-width: 42px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-base); color: var(--text-secondary); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wf-day.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-bright); }
.wf-day:disabled { cursor: default; opacity: .7; }
.wf-sched-info { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.wf-sched-info:empty { display: none; }
.wf-sched-sum { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-primary); }
.wf-sched-sum svg, .wf-sched-warn svg { width: 15px; height: 15px; flex-shrink: 0; }
.wf-sched-warn { display: flex; gap: 6px; align-items: flex-start; color: var(--warning); font-weight: 600; }
.wf-muted { color: var(--text-muted); font-size: 12px; }
.wf-trig { display: inline-flex; vertical-align: -2px; color: var(--accent2); }
.wf-trig svg { width: 13px; height: 13px; }
.wf-sched-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--accent2); background: var(--accent2-soft); padding: 1px 8px; border-radius: 20px; }
.wf-sched-chip svg { width: 12px; height: 12px; }

/* ===== Faz 4: çalıştırma koşulu, AI ile oluştur ===== */
.wf-runif-box { margin: 4px 0 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.wf-runif-box .wf-check { margin-bottom: 10px; }
.wf-runif-box .wf-cond { margin-bottom: 8px; }
.wf-runif-else { width: 100%; padding: 9px 11px; background: var(--bg-base); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13.5px; outline: none; }
.wf-runif-else:focus { border-color: var(--accent); }
.wf-if-badge { display: inline-flex; align-items: center; gap: 3px; color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.wf-if-badge svg { width: 11px; height: 11px; }
.wf-run-note { margin-top: 3px; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.wf-banner ul { margin: 6px 0 0 18px; padding: 0; }
.wf-banner li { margin: 2px 0; }
.wf-ai-btn svg { color: var(--accent); }
.wf-ai-modal { max-width: 620px; width: 100%; }
.wf-ai-modal textarea { min-height: 120px; }
.wf-ai-examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 6px; }
.wf-ai-examples > span { font-size: 12px; color: var(--text-muted); }
.wf-ai-examples .wf-var { font-family: inherit; color: var(--text-secondary); text-align: left; }
#wfAiGo:disabled svg { animation: wf-spin 1s linear infinite; }

/* ===== Karar adımı ve Evet / Hayır yolları ===== */
.wf-step.wf-dec { border-color: color-mix(in srgb, var(--accent2) 45%, var(--border)); }
.wf-step.wf-dec .wf-ic { color: var(--accent2); background: var(--accent2-soft); }
.wf-branches { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 2px 16px; }
.wf-branch { position: relative; padding: 10px 0 10px 16px; border-left: 3px solid var(--accent); }
.wf-branch.no { border-left-color: var(--warning); }
.wf-branch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wf-branch-tag { font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 9px; border-radius: 20px; color: var(--accent-bright); background: var(--accent-soft); }
.wf-branch.no .wf-branch-tag { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.wf-branch-meta { font-size: 12px; color: var(--text-muted); }
.wf-branch-add { margin-top: 8px; width: 100%; padding: 9px 11px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; outline: none; }
.wf-branch-add:hover, .wf-branch-add:focus { border-color: var(--accent); color: var(--accent-bright); }
.wf-branch-add option { background: var(--bg-surface-2); color: var(--text-primary); }
.wf-dec-note { color: var(--accent2); font-weight: 600; }
@media (max-width: 640px) { .wf-branches { margin-left: 6px; } .wf-branch { padding-left: 10px; } }

/* ===== Onay İste: onay sayfaları ===== */
.wf-appr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.wf-appr-msg { white-space: pre-wrap; background: var(--bg-surface); border: 1px solid var(--border); border-left: 3px solid var(--accent2); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 18px; font-size: 14px; line-height: 1.5; }
.wf-appr-data { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.wf-appr-tbl { max-height: 520px; overflow: auto; }
.wf-appr-tbl td { padding: 0; }
.wf-appr-tbl td:not(:has(input)) { padding: 6px 9px; }
.wf-appr-tbl input { width: 100%; min-width: 90px; border: 0; background: transparent; color: var(--text-primary); padding: 6px 9px; font-size: 13px; outline: none; }
.wf-appr-tbl input:focus { background: var(--accent-soft); }
.wf-appr-tbl td.wf-cell-diff { background: color-mix(in srgb, var(--warning) 18%, transparent); }
.wf-appr-text { width: 100%; min-height: 220px; padding: 10px 12px; background: var(--bg-base); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13.5px; line-height: 1.5; }
.wf-appr-pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; margin: 0; max-height: 520px; overflow: auto; }
.wf-appr-info { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.wf-appr-actions { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 8px; }
.wf-appr-actions .btn-sm { width: auto; }
.wf-appr-link { width: auto; margin-top: 6px; padding: 5px 10px; }
.wf-appr-row { color: inherit; }
.wf-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.wf-pager .btn-sm { width: auto; }
@media (max-width: 1000px) { .wf-appr-layout { grid-template-columns: minmax(0, 1fr); } }

/* ===== Hata olursa (yeniden deneme) ===== */
.wf-retry { margin: 4px 0 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.wf-retry > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-secondary); list-style: none; }
.wf-retry > summary::-webkit-details-marker { display: none; }
.wf-retry > summary svg { width: 15px; height: 15px; color: var(--accent2); }
.wf-retry[open] > summary { margin-bottom: 12px; }
.wf-retry .field select:disabled { opacity: .55; }
.wf-retry-note svg { width: 12px; height: 12px; vertical-align: -1px; }
.wf-in-badge { display: inline-flex; align-items: center; gap: 3px; }
.wf-in-badge svg { width: 11px; height: 11px; }
.wf-par-badge { color: var(--accent-bright); background: var(--accent-soft); }
.wf-loop-body .wf-branch.yes { border-left-color: var(--accent2); }
.wf-loop-body .wf-branch.yes .wf-branch-tag { color: var(--accent2); background: var(--accent2-soft); }

/* ---- Hazır entegrasyonlar ---- */
.wf-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-head-actions .btn-sm, .wf-head-actions .btn-inline { width: auto; }
.wf-conn { display: flex; align-items: center; gap: 6px; }
.wf-conn select { flex: 1 1 auto; width: auto; min-width: 0; }
.wf-conn > .btn-sm, .wf-conn > .icon-mini { flex: 0 0 auto; width: auto; white-space: nowrap; }
.wf-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.wf-asset { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wf-asset-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.wf-asset-name svg { width: 16px; height: 16px; }
.wf-asset label.btn-sm { cursor: pointer; }
.wf-hook-url { display: flex; gap: 6px; margin: 8px 0 6px; }
.wf-hook-url input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
#wfHook .btn-sm { margin-top: 8px; }

/* Bağlantılar sayfası */
.wc-row { align-items: center; gap: 12px; flex-wrap: wrap; }
.wc-row .table-info { flex: 1; min-width: 240px; }
.wc-actions { display: flex; align-items: center; gap: 6px; }
.wc-test-msg { margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.wc-test-msg.err { color: var(--danger); }
.wc-note { margin-top: 14px; display: flex; gap: 6px; align-items: flex-start; }
.wc-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.wc-modal { max-width: 620px; width: 100%; }
.wc-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.wc-type { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: inherit; cursor: pointer; font-size: 13px; }
.wc-type svg { width: 15px; height: 15px; }
.wc-type.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.wc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.wc-grid .wc-wide { grid-column: 1 / -1; }
.wc-file { margin-top: 6px; cursor: pointer; display: inline-flex; }
.wc-help { margin-top: 6px; }
@media (max-width: 640px) {
    .wc-grid { grid-template-columns: 1fr; }
    .wc-actions { width: 100%; justify-content: flex-end; }
}

/* ---- Alt akış ---- */
.wf-sub-used { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--text-secondary); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 10px; }
.wf-sub-used svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--accent); }

/* ---- Dönüştür / Eşleştir ---- */
.wf-tf { display: flex; flex-direction: column; gap: 8px; }
.wf-tf-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; background: var(--bg-surface-2); }
.wf-tf-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr) 130px auto; gap: 6px; align-items: center; }
.wf-tf-main input, .wf-tf-main select { min-width: 0; width: 100%; }
.wf-tf-arrow { color: var(--text-muted); font-weight: 600; }
.wf-tf-opts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; }
.wf-tf-opt { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--text-muted); min-width: 110px; flex: 1 1 110px; max-width: 220px; }
.wf-tf-opt input, .wf-tf-opt select, .wf-tf-opt textarea { font-size: 13px; }
.wf-tf-opt.wf-tf-wide { flex-basis: 100%; max-width: none; }
.wf-tf-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.wf-tf-tools > *, .field .wf-tf-tools > select { flex: 0 0 auto; width: auto; max-width: 100%; }
.wf-tf-ai { display: flex; gap: 6px; align-items: center; margin: 10px 0 4px; }
.wf-tf-ai > input { flex: 1 1 auto; width: auto; min-width: 0; }
.wf-tf-ai > .btn-sm { flex: 0 0 auto; width: auto; white-space: nowrap; }
@media (max-width: 640px) {
    .wf-tf-main { grid-template-columns: minmax(0, 1fr) auto; }
    .wf-tf-arrow { display: none; }
}

/* ---- Olay tetikleyicileri ---- */
.wf-trig-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px; background: var(--bg-surface-2); }
.wf-trig-card.off { opacity: .65; }
.wf-trig-head { display: flex; align-items: center; gap: 8px; }
.wf-trig-head > svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.wf-trig-title { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.wf-trig-title span { color: var(--text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.wf-trig-head .wf-switch.sm input { margin: 0; }
.wf-trig-form { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.wf-trig-err { color: var(--danger); font-size: 12px; margin-top: 4px; }
.wf-trig-vars { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.7; }
.wf-trig-add { width: 100%; margin: 4px 0 8px; }

/* ---- AI Ajan ---- */
.wf-agent-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 180px; overflow: auto; padding: 4px 0; }
.wf-agent-checks .wf-check { margin: 0; }

.wf-appr-msg.md { white-space: normal; }
.wf-appr-msg.md p { margin: 0 0 6px; }
.wf-appr-msg.md ul { margin: 0 0 8px 18px; padding: 0; }

/* ---- Belgeler / Karşılaştır ---- */
.wf-doc-fields { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
/* Sonuç kontrolü */
.wf-ck-sec { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.wf-ck-title { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; }
.wf-ck .wf-doc-field.wf-ck-5 { grid-template-columns: minmax(0, 1.2fr) 120px minmax(0, 1.2fr) 110px auto; }
.wf-ck .wf-doc-field.wf-ck-rule { grid-template-columns: minmax(0, 1fr) 110px auto; }
.wf-ck .wf-doc-field .wf-check { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; font-size: 12px; font-weight: 500; }
.wf-ck .wf-doc-field input[type=checkbox] { width: auto; flex: none; }
@media (max-width: 640px) {
    .wf-ck .wf-doc-field, .wf-ck .wf-doc-field.wf-ck-5 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
}
.wf-doc-field { display: grid; grid-template-columns: minmax(0, 1.2fr) 120px minmax(0, 1.4fr) auto; gap: 6px; align-items: center; }
.wf-doc-field input, .wf-doc-field select { min-width: 0; width: 100%; }
.wf-asset-name .icon-mini { margin-left: 2px; }
.wf-run-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
@media (max-width: 640px) { .wf-doc-field { grid-template-columns: minmax(0, 1fr) 110px auto; } .wf-doc-field input[data-df="hint"], .wf-doc-field input[data-cc="tolerance"] { grid-column: 1 / -1; } }

/* Çalıştırma geçmişi: maliyet + maskeleme notu */
.wf-cost { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--accent2); white-space: nowrap; }
.wf-cost svg { width: 12px; height: 12px; }
.wf-run-in > summary { color: var(--text-secondary); }
.wf-run-mask { margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; }
.wf-run-mask svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }

/* Ekip yetkileri */
.wf-lock-ic { width: 13px; height: 13px; vertical-align: -1px; color: var(--text-muted); }
.wf-acc-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.wf-acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.wf-acc-row .name { font-weight: 600; font-size: 13.5px; }
.wf-acc-row .wf-muted { font-size: 12px; }
.wf-acc-row select { width: auto; min-width: 140px; }
#wfAccSave { width: auto; margin-top: 6px; }
.wc-access { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.wc-access > label svg { width: 14px; height: 14px; vertical-align: -2px; }
.wc-access .wf-check { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-weight: 500; }
.wc-access .wf-check input { width: auto; flex: none; margin: 0; }
.wc-users { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 4px 22px; max-height: 180px; overflow: auto; }
.wp-me { margin-bottom: 12px; }
.wp-row { align-items: center; gap: 12px; flex-wrap: wrap; }
.wp-row .table-info { flex: 1; min-width: 220px; }
.wp-role select { width: auto; min-width: 160px; }
.wp-roles { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.5; }

/* Adımı test et */
.wf-test-modal { max-width: 760px; width: 100%; max-height: 92vh; overflow: auto; }
.wf-test-sample { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.wf-test-live { margin: 10px 0 2px; }
.wf-test-cost { display: flex; gap: 6px; align-items: center; }
.wf-test-cost svg { width: 13px; height: 13px; }
.wf-test-result:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.wf-test-out { margin-top: 8px; max-height: 420px; overflow: auto; }
.wf-test-pdf { width: 100%; height: 480px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 8px; background: #fff; }
.wf-test-mail { width: 100%; height: 360px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.wf-test-result .wf-run-err ul { margin: 6px 0 0 18px; }
