/* Modal altyapısı, onay kutusu, yardım, komut paleti, "Yeni görev" ve "Süreç ata" diyalogları. */
.backdrop { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(24, 24, 32, .22); backdrop-filter: blur(1.5px); display: flex; align-items: flex-start; justify-content: center; padding-top: 13vh; animation: fade .15s; }
.backdrop.hi { padding-top: 7vh; }
.modal { background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--line); width: 640px; max-width: calc(100vw - 32px); animation: pop .16s ease-out; overflow: hidden; }
.modal.narrow { width: 440px; }
.modal.wide { width: 920px; max-height: 84vh; display: flex; flex-direction: column; }
.confirm { padding: 20px 20px 16px; }
.confirm h3 { margin: 0 0 6px; font-size: 15px; }
.confirm p { margin: 0; color: var(--muted); line-height: 1.5; }
.confirm-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.help { padding: 6px 0 10px; max-height: calc(100vh - 64px); display: flex; flex-direction: column; }
.help-h { display: flex; align-items: center; gap: 8px; padding: 14px 18px 8px; font-weight: 600; font-size: var(--fs-md); }
.help-g { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 26px; padding: 0 18px; overflow-y: auto; min-height: 0; }
.help-g h4 { grid-column: 1 / -1; margin: 12px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 500; }
.hk { display: flex; align-items: center; justify-content: space-between; height: 30px; border-bottom: 1px solid var(--line2); color: var(--text2); }
.hk span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk span:last-child { display: flex; gap: 3px; flex-shrink: 0; white-space: nowrap; }

/* ---------- görev oluşturma ---------- */
.cm-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; }
.cm-crumb { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--hover); font-size: var(--fs-sm); font-weight: 500; color: var(--text2); }
.cm-par { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--muted); max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-title { display: block; width: 100%; border: 0; outline: 0; font-size: 18px; font-weight: 600; padding: 14px 18px 4px; }
.cm-title::placeholder { color: #c4c4cb; }
.cm-desc { display: block; width: 100%; border: 0; outline: 0; resize: none; padding: 4px 18px 10px; color: var(--text2); font-size: 13.5px; }
.cm-desc::placeholder { color: #b6b6bd; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text2); background: #fff; white-space: nowrap; cursor: pointer; max-width: 260px; overflow: hidden; }
.pill:hover { background: var(--hover); border-color: #d4d4d8; }
.pill.static { cursor: default; }
.pill[disabled] { opacity: .55; cursor: not-allowed; }
.pill input[type=date] { border: 0; outline: 0; background: none; font-size: var(--fs-sm); color: var(--text2); padding: 0; width: 108px; }
.cm-f { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line2); background: var(--surface-2); }
.cm-note { max-width: 330px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tog { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: var(--fs-sm); cursor: pointer; user-select: none; }
.tog input { accent-color: var(--accent); margin: 0; }

/* ---------- süreç ata ---------- */
.pa { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 0; overflow: auto; margin-top: 8px; border-top: 1px solid var(--line2); }
.pa-form { padding-bottom: 10px; min-width: 0; }
.pa-form .cm-title { padding-top: 12px; }
.pa-form .cm-chips { padding-bottom: 10px; }
.pa-banner { margin: 12px 16px 0; }
.pa-prev { background: var(--surface-2); border-left: 1px solid var(--line2); padding: 14px 14px 16px; }
.pa-sec { padding: 4px 18px 10px; }
.pa-lbl { font-size: var(--fs-sm); font-weight: 600; color: var(--text2); margin-bottom: 6px; display: flex; gap: 6px; align-items: baseline; }
.pa-lbl span { font-weight: 400; color: var(--faint); font-size: 11.5px; }
.pa-ta { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: 0; resize: none; min-height: 50px; line-height: 1.5; }
.pa-ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.route { margin: 0 16px 12px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; }
.route .av { vertical-align: -4px; }
.route.ap { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.route.ok { background: var(--accent-soft); border: 1px solid var(--accent-soft2); color: var(--accent-d); }
.route.none { background: var(--hover); color: var(--muted); border: 1px solid var(--line); }
.pa-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.vt-row { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; user-select: none; background: #fff; text-align: left; }
.vt-row:hover { border-color: #d4d4d8; background: #fcfcfc; }
.vt-row .vl { flex: 1; min-width: 0; line-height: 1.25; }
.vt-row .vl b { font-weight: 500; display: block; font-size: 12.5px; }
.vt-row .vl small { color: var(--faint); font-size: 11px; }
.sw { width: 28px; height: 16px; border-radius: 9px; background: #d4d4d8; position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.sw.on { background: var(--accent); }
.sw.on::after { transform: translateX(12px); }
.pv-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.pv-who { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }
.pv-who b { color: var(--text2); font-weight: 500; }
.ip { display: block; margin: -1px 0; }
.pv-task { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 9px 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.pv-title { display: flex; gap: 7px; align-items: flex-start; font-weight: 500; line-height: 1.38; margin-bottom: 8px; }
.pv-note { font-size: 11.5px; color: var(--faint); margin-top: 12px; line-height: 1.5; }
.card-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pb { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 5px; flex: none; }

/* ---------- komut paleti ---------- */
.pal { background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--line); width: 660px; max-width: calc(100vw - 32px); overflow: hidden; animation: pop .14s ease-out; display: flex; flex-direction: column; max-height: 74vh; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 52px; border-bottom: 1px solid var(--line2); color: var(--muted); }
.pal-in input { flex: 1; border: 0; outline: 0; font-size: 15px; color: var(--text); background: none; }
.pal-in input::placeholder { color: var(--faint); }
.pal.ai .pal-in { color: var(--accent); }
.pal-mode { display: none; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-d); font-size: 11.5px; font-weight: 600; }
.pal.ai .pal-mode { display: inline-flex; }
.pal-list { overflow-y: auto; padding: 6px; flex: 1; min-height: 0; }
.pg { padding: 8px 10px 4px; font-size: 11px; color: var(--faint); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.pi { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 7px; cursor: pointer; color: var(--text2); }
.pi.act { background: var(--hover2); color: var(--text); }
.pi .pi-ic { width: 18px; display: flex; justify-content: center; color: var(--muted); flex: none; }
.pi .pi-l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi .pi-s { color: var(--faint); font-size: var(--fs-sm); white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.pi .pi-go { color: var(--faint); opacity: 0; }
.pi.act .pi-go { opacity: 1; }
.pal-f { display: flex; align-items: center; gap: 14px; padding: 0 14px; height: 36px; border-top: 1px solid var(--line2); color: var(--faint); font-size: 11.5px; background: var(--surface-2); }
.pal-f span { display: inline-flex; align-items: center; gap: 4px; }
.pal-ai { padding: 14px 18px; border-bottom: 1px solid var(--line2); max-height: 340px; overflow-y: auto; background: linear-gradient(180deg, #f8fbf8, #fff); }
.pal-ai-q { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.pal-ai-a { color: var(--text2); line-height: 1.6; }
.pal-ai-f { display: flex; gap: 8px; margin-top: 10px; }

/* --- AI Proje eklemeleri --- */
.modal.xl { width: 1100px; max-height: 88vh; display: flex; flex-direction: column; }
.m-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.m-h h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.m-b { padding: 16px 18px; overflow-y: auto; min-height: 0; }
.m-f { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line2); background: var(--surface-2); }
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.fld > label { font-size: var(--fs-sm); font-weight: 550; color: var(--text2); }
.fld > label small { font-weight: 400; color: var(--faint); margin-left: 4px; }
.inp, .sel, .ta { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 0 10px; height: 32px; outline: 0; transition: border-color .12s, box-shadow .12s; }
.ta { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.inp:focus, .sel:focus, .ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fgrid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.seg.full { display: flex; }
.seg.full button { flex: 1; justify-content: center; }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.opt-card { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; text-align: left; background: #fff; }
.opt-card:hover { border-color: #d0d0d6; }
.opt-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--ring); }
.opt-card b { font-weight: 600; font-size: 12.5px; }
.opt-card small { color: var(--muted); font-size: 11px; }
.hintbox { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; line-height: 1.5; }

/* ---------- ilişki seçici (Yeni süreç) ---------- */
.rp { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.rp-tabs { display: flex; border-bottom: 1px solid var(--line2); background: var(--surface-2); }
.rp-tabs button { flex: 1; height: 34px; font-size: 12.5px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; }
.rp-tabs button.on { color: var(--text); border-bottom-color: var(--accent); background: #fff; }
.rp-tabs b { font-weight: 600; color: var(--faint); margin-left: 3px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 10px; min-height: 38px; align-items: center; }
.rp-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 3px 0 8px; border-radius: 12px; background: var(--hover); border: 1px solid var(--line); font-size: 12px; max-width: 280px; }
.rp-chip button { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.rp-chip button:hover { background: var(--danger-soft); color: var(--danger); }
.rp-search { margin: 0 10px 6px; width: auto; }
.rp-list { max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line2); padding: 4px; }
.rp-g { position: sticky; top: -4px; background: #fff; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 6px 3px; display: flex; align-items: center; gap: 6px; z-index: 1; }
.rp-row { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 30px; padding: 3px 6px; border-radius: 6px; text-align: left; font-size: 12.5px; }
.rp-row:hover { background: var(--hover); }
.rp-row.on { background: var(--accent-soft); }
.rp-ck { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #cfcfd6; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.rp-row.on .rp-ck { background: var(--accent); border-color: var(--accent); }

/* ---------- öneriler (onay kutusu) ---------- */
.inbox { position: fixed; inset: 0; z-index: var(--z-inbox); }
.ib-back { position: absolute; inset: 0; background: rgba(24, 24, 32, .18); animation: fade .15s; }
.ib-card { position: absolute; top: calc(var(--hdr-h) + 4px); right: 8px; bottom: 8px; width: min(980px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: pop .16s ease-out; }
.ib-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.ib-h h3 { margin: 0; font-size: 15px; }
.ib-h .seg b { font-weight: 600; margin-left: 3px; }
.ib-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.ib-list { border-right: 1px solid var(--line2); overflow-y: auto; padding: 6px; }
.ib-row { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px; border-radius: 8px; }
.ib-row:hover { background: var(--hover); }
.ib-row.on { background: var(--accent-soft); }
.ib-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-row-t b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-row-t small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-detail { overflow-y: auto; padding: 16px 20px; }
.ib-d-h { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.ib-diff { margin-bottom: 14px; }
.ib-diff label, .ib-kv label { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.ib-old { padding: 8px 10px; background: var(--danger-soft); border-radius: 8px 8px 0 0; color: #7f1d1d; text-decoration: line-through; text-decoration-color: rgba(127, 29, 29, .35); white-space: pre-line; line-height: 1.5; font-size: 12.5px; }
.ib-new-v { padding: 8px 10px; background: var(--done-soft); border-radius: 0 0 8px 8px; color: #14532d; white-space: pre-line; line-height: 1.5; font-size: 12.5px; }
.ib-new { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.ib-new-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.ib-kv { margin-bottom: 10px; }
.ib-kv p { margin: 0; line-height: 1.55; white-space: pre-line; color: var(--text2); }
.ib-meta, .ib-rels { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ib-act { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line2); }
.ib-act-b { display: flex; gap: 8px; margin-top: 8px; }
