/* Ortak arayüz primitifleri: avatar, düğmeler, çipler, menü, modal, palet, bildirim, boş durum. */

/* ---------- avatar & noktalar ---------- */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex: none; letter-spacing: -.02em; box-shadow: 0 0 0 1.5px #fff; }
.av.anon { background: repeating-linear-gradient(135deg, #b4b4bc 0 3px, #a1a1aa 3px 6px) !important; }
.ddot { width: 8px; height: 8px; border-radius: 3px; flex: none; display: inline-block; }
.ddot.round { border-radius: 50%; }
.flag { font-size: 13px; line-height: 1; width: 16px; text-align: center; flex: none; }

/* ---------- düğmeler ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-weight: 500; color: var(--text2); white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); border-color: #d4d4d8; color: var(--text); }
.btn.on { background: var(--hover2); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent-d); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { background: var(--accent-d); }
.btn.primary kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .28); color: #fff; }
.btn.ai.on { background: var(--accent-soft); border-color: var(--accent-soft2); color: var(--accent-d); }
.btn.sm { height: 26px; padding: 0 9px; font-size: var(--fs-sm); }
.btn.icon-only { padding: 0 8px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: #fecaca; }
.btn.dangerfill { background: var(--danger); border-color: #c93a3f; color: #fff; }
.btn.violet { color: var(--violet); }
.btn.violet:hover { background: var(--violet-soft); border-color: #ddd6fe; }
.btn.warnb { color: var(--amber); }
.btn.warnb:hover { background: #fffbeb; border-color: #fcd34d; }
.btn.armed { box-shadow: 0 0 0 3px rgba(229, 72, 77, .18); background: var(--danger-soft); border-color: #fca5a5; }
.btn.violet.armed { box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); background: var(--violet-soft); border-color: #c4b5fd; }
.btn kbd { margin-left: 2px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--muted); flex: none; }
.iconbtn:hover { background: var(--hover2); color: var(--text); }
.iconbtn:disabled { opacity: .35; pointer-events: none; }
.iconbtn.sm { width: 22px; height: 22px; }
.seg { display: inline-flex; padding: 2px; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; }
.seg button { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 6px; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .04); }

/* ---------- arama kutusu ---------- */
.filter { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 9px; border: 1px solid var(--line); border-radius: 7px; width: 220px; color: var(--faint); background: #fff; transition: border-color .15s, box-shadow .15s, width .2s; }
.filter:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); color: var(--muted); }
.filter input { border: 0; outline: 0; flex: 1; min-width: 0; background: none; color: var(--text); }
.filter input::placeholder { color: var(--faint); }

/* ---------- çipler ---------- */
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; border: 1px solid var(--line); color: var(--text2); font-size: var(--fs-sm); white-space: nowrap; background: #fff; transition: all .12s; }
.fchip:hover { border-color: #d0d0d6; background: var(--hover); }
.fchip.on { background: var(--text); border-color: var(--text); color: #fff; }
.fchip b { font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.fchip.on b { color: rgba(255, 255, 255, .65); }
.opt { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.opt:hover { background: var(--hover); color: var(--text); }
.opt b { color: var(--text2); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; white-space: nowrap; background: #fff; font-variant-numeric: tabular-nums; }
.chip.warn { border-color: #fed7aa; background: var(--warn-soft); color: #c2410c; }
.chip.red { border-color: #fecaca; background: var(--danger-soft); color: #dc2626; }
.chip.ghost { border-color: transparent; background: var(--hover); }
.chip.ochip { border-style: dashed; color: var(--faint); background: transparent; }
.chip.nchip { cursor: pointer; }
.chip.nchip:hover { background: var(--hover2); color: var(--text2); }
.chip.center { justify-content: center; }
.chip.mini-chip { height: 18px; padding: 0 5px; }
.cnt { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cnt.hot { color: var(--accent-d); font-weight: 600; }
.cnt.hotp { color: #fff; background: var(--accent); border-radius: 9px; padding: 0 6px; font-weight: 600; line-height: 17px; }
.cnt.amber { color: var(--amber); background: var(--amber-soft); border-radius: 9px; padding: 0 6px; font-weight: 600; line-height: 17px; }
.cnt .od { color: #c2410c; font-weight: 600; }
.vsep { display: inline-block; width: 1px; height: 14px; background: var(--line); margin: 0 4px; flex: none; }
.khint { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 11.5px; white-space: nowrap; padding-right: 4px; }
.khint kbd { margin-left: 6px; }
.khint b { color: var(--text2); font-weight: 600; }

/* ---------- küçük göstergeler ---------- */
.due { font-size: var(--fs-sm); color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.late { color: var(--danger); font-weight: 500; }
.due.soon { color: var(--warn); font-weight: 500; }
.mini { width: 28px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; display: inline-block; flex: none; }
.mini i, .bar i, .card-prog i { display: block; height: 100%; background: var(--accent); }
.bar { height: 4px; background: var(--line2); border-radius: 3px; overflow: hidden; width: 90px; }
.tid { font-size: var(--fs-sm); color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-pri, .cell-st, .cell-av { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; margin: -1px; flex: none; }
.cell-pri:hover, .cell-st:hover { background: var(--hover2); }
.cell-av { border-radius: 50%; }
.cell-av:hover { box-shadow: 0 0 0 2px var(--line); }
.banner { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; margin-top: 12px; line-height: 1.45; }
.banner.warn { background: var(--warn-soft); color: #9a3412; border: 1px solid #fed7aa; }
.banner.red { background: var(--danger-soft); color: #b91c1c; border: 1px solid #fecaca; }
.banner.violet { background: var(--violet-soft); color: #5b21b6; border: 1px solid #ddd6fe; }
.banner.green { background: var(--accent-soft); color: var(--accent-d); border: 1px solid var(--accent-soft2); }
.banner.info { background: var(--info-soft); color: #1e40af; border: 1px solid #dbe6fe; }
.banner.neutral { background: var(--hover); border: 1px solid var(--line); color: var(--text2); }
.ulink { text-decoration: underline; cursor: pointer; }

/* ---------- alt listeler (panel, yer tutucu) ---------- */
.sublist { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.srow { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.srow:last-child { border-bottom: 0; }
.srow:hover { background: #fafafa; }
.srow.on { background: var(--accent-soft); }
.srow .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .tid { font-size: 11.5px; }
.srow.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: #c8c8ce; }
.srow input { flex: 1; border: 0; outline: 0; background: none; height: 100%; }
.relg-e { font-size: var(--fs-sm); color: var(--faint); padding: 2px 0 2px 23px; }

/* ---------- menü & popover ---------- */
.menu { position: fixed; z-index: var(--z-menu); background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-lg); min-width: 210px; max-width: 320px; padding: 4px; animation: pop .12s ease-out; display: flex; flex-direction: column; }
.menu-title { padding: 6px 8px 4px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.menu-search { padding: 2px 2px 4px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.menu-search input { width: 100%; border: 0; outline: 0; height: 30px; padding: 0 6px; background: none; }
.menu-list { max-height: 340px; overflow-y: auto; }
.mi { display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 4px 8px; border-radius: 6px; cursor: pointer; user-select: none; color: var(--text2); }
.mi.act { background: var(--hover2); color: var(--text); }
.mi.danger { color: var(--danger); }
.mi.dis { opacity: .45; pointer-events: none; }
.mi-ic { width: 16px; display: flex; align-items: center; justify-content: center; flex: none; color: var(--muted); }
.mi-l { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.mi-l > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-l small { color: var(--faint); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-ck { color: var(--accent-d); }
.mi-arrow { color: var(--faint); }
.mi-tag { flex: none; font-size: 10.5px; font-weight: 500; padding: 1px 6px; border-radius: 5px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.mi-tag.ok { color: var(--accent-d); background: var(--accent-soft); }
.mi-tag.ap { color: var(--amber); background: var(--amber-soft); }
.menu-sep { height: 1px; background: var(--line2); margin: 4px -4px; }
.menu-h { padding: 8px 8px 3px; font-size: 11px; color: var(--faint); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.menu-empty { padding: 12px; color: var(--faint); text-align: center; }
.menu-note { padding: 6px 8px; font-size: 11.5px; color: var(--muted); background: var(--hover); border-radius: 6px; margin: 2px 2px 4px; }
.pop { padding: 12px 14px; width: 330px; max-width: 340px; }
.pop-h { display: flex; align-items: center; gap: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; margin-bottom: 6px; }
.pop-t { display: flex; gap: 7px; align-items: flex-start; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.pop-t .sti { margin-top: 2px; }
.pop-kv { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 5px 8px; font-size: var(--fs-sm); align-items: center; }
.pop-kv > span:nth-child(odd) { color: var(--muted); }
.pop-kv > span:nth-child(even) { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop p { margin: 8px 0 0; color: var(--text2); font-size: 12.5px; line-height: 1.5; }
.pop-f { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line2); font-size: 11.5px; color: var(--faint); }

/* ---------- boş durum ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 80px 20px; color: var(--muted); text-align: center; }
.empty.compact { padding: 0; }
.empty .ill { width: 56px; height: 56px; border-radius: 14px; background: var(--hover); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.empty h3 { margin: 0; font-size: var(--fs-md); color: var(--text); font-weight: 600; }
.empty-a { display: flex; gap: 8px; margin-top: 6px; }
.pempty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; padding: 30px; height: 100%; }

/* ---------- bildirim ---------- */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #1c1c1f; color: #f4f4f5; padding: 8px 10px 8px 12px; border-radius: 9px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); font-size: 12.5px; animation: tin .2s ease-out; }
.toast button { color: #9fe0aa; font-weight: 600; padding: 2px 6px; border-radius: 5px; }
.toast button:hover { background: rgba(255, 255, 255, .08); }
.toast .i { color: #7ccf8a; }

/* =====================================================================
   AI Proje Yazılımı — alan (domain) primitifleri
   ===================================================================== */
.av.ext { background: #fff !important; color: var(--muted); border: 1.5px dashed #c4c4cb; box-shadow: none; }
.avs { display: inline-flex; align-items: center; }
.avs .av + .av { margin-left: -5px; }
.av.more { background: var(--hover2); color: var(--muted); }
.ddot.infra { background: repeating-linear-gradient(135deg, #a1a1aa 0 2px, #d4d4d8 2px 4px); }

/* tür etiketi */
.ttag { display: inline-flex; align-items: center; justify-content: center; height: 17px; min-width: 28px; padding: 0 5px; border-radius: 4px; font-size: 10px; font-weight: 650; letter-spacing: .03em; flex: none; }
.ttag.t-ai { color: var(--t-ai); background: var(--t-ai-soft); }
.ttag.t-d365 { color: var(--t-d365); background: var(--t-d365-soft); }
.ttag.t-api { color: var(--t-api); background: var(--t-api-soft); }
.ttag.t-hub { color: var(--done); background: var(--done-soft); }

/* sağlık */
.hdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.hdot.h-late { background: var(--late); box-shadow: 0 0 0 3px var(--late-soft); }
.hdot.h-risk { background: var(--risk); box-shadow: 0 0 0 3px var(--risk-soft); }
.hdot.h-active { background: var(--active); box-shadow: 0 0 0 3px var(--active-soft); }
.hdot.h-idle { background: #fff; border: 1.5px solid var(--idle); }
.hdot.h-done { background: var(--done); box-shadow: 0 0 0 3px var(--done-soft); }
.hpill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 7px; border-radius: 11px; font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.hpill .hdot { box-shadow: none; width: 7px; height: 7px; }
.hpill b { font-weight: 500; opacity: .8; }
.hpill.h-late { background: var(--late-soft); color: #c62d32; }
.hpill.h-risk { background: var(--risk-soft); color: #8a6a00; }
.hpill.h-active { background: var(--active-soft); color: #b55a0c; }
.hpill.h-idle { background: var(--idle-soft); color: var(--muted); }
.hpill.h-done { background: var(--done-soft); color: var(--accent-d); }

/* 7 aşama şeridi */
.pbar { display: inline-flex; gap: 2px; flex: none; vertical-align: middle; }
.pbar i { display: block; width: 10px; height: 6px; border-radius: 2px; background: var(--line); position: relative; }
.pbar.md i { width: 16px; height: 8px; }
.pbar.lab { gap: 3px; width: 100%; }
.pbar.lab i { flex: 1; height: 24px; width: auto; border-radius: 5px; display: flex; align-items: center; justify-content: center; }
.pbar.lab i span { font-size: 10.5px; font-weight: 600; color: var(--muted); font-style: normal; }
.pbar i.pb-done { background: var(--done); }
.pbar i.pb-active { background: var(--active); }
.pbar i.pb-over { background: var(--late); }
.pbar i.pb-skip { background: repeating-linear-gradient(135deg, var(--line) 0 2px, #fff 2px 4px); }
.pbar i.cur { box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px currentColor; }
.pbar i.pb-wait.cur { color: var(--idle); }
.pbar i.pb-active.cur { color: var(--active); }
.pbar i.pb-over.cur { color: var(--late); }
.pbar.lab i.pb-done span, .pbar.lab i.pb-active span, .pbar.lab i.pb-over span { color: #fff; }

/* KPI kutusu */
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; min-width: 0; }
.kpi-l { font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.kpi-v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-s { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.kpi { text-align: left; transition: border-color .12s, box-shadow .12s; }
button.kpi:hover { border-color: #d4d4d8; box-shadow: var(--shadow); }

/* bölüm başlığı */
.sec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.sec-h .n { color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }
.sec-h .sub { color: var(--muted); font-weight: 400; font-size: var(--fs-sm); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }

/* süreç satırı (liste/öneri/arama) */
.prow { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 5px 10px; border-radius: 7px; cursor: pointer; min-width: 0; }
.prow:hover { background: var(--hover); }
.prow.on { background: var(--accent-soft); }
.prow .pn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.prow .ps { color: var(--faint); font-size: var(--fs-sm); white-space: nowrap; }

/* ton rozetleri (aşama/adım) */
.tone { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 550; white-space: nowrap; }
.tone.t-done { background: var(--done-soft); color: var(--accent-d); }
.tone.t-active { background: var(--active-soft); color: #b55a0c; }
.tone.t-over { background: var(--late-soft); color: #c62d32; }
.tone.t-today { background: var(--active-soft); color: #b55a0c; }
.tone.t-wait { background: var(--idle-soft); color: var(--muted); }
.tone.t-skip { background: #fff; border: 1px dashed var(--line); color: var(--faint); }
.rel { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rel.late { color: var(--late); font-weight: 550; }
.rel.today, .rel.soon { color: var(--active); font-weight: 550; }

/* bağlantı biçimli düğme */
.alink { color: var(--accent-d); font-weight: 500; cursor: pointer; }
.alink:hover { text-decoration: underline; }
.toast.err { background: #3a1416; }
.toast.err .i { color: #ff8b8f; }
