/* SiteSync (ŞantiyeAkış) — sade, yüksek okunabilirlikli, dokunmatik öncelikli arayüz */
:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --ink: #16191d;
  --ink-2: #4a5059;
  --ink-3: #868c95;
  --line: #e4e2dc;
  --accent: #f2a900;      /* şantiye sarısı */
  --accent-ink: #1c1600;
  --danger: #c62828;
  --ok: #2e7d32;
  --warn: #b26a00;
  --info: #1d5fbf;
  --radius: 14px;
  --tap: 48px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-size: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

/* ---------- Üst bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 56px; padding: 0 6px;
  padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box;
  display: flex; align-items: center; gap: 4px; background: var(--ink); color: #fff;
}
.topbar .title { flex: 1; min-width: 0; }
.topbar .title b { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title small { display: block; font-size: .72rem; color: #aab0b8; }
.icon-btn {
  width: var(--tap); height: var(--tap); border: 0; background: transparent; border-radius: 12px;
  display: inline-grid; place-items: center; position: relative; flex: none;
}
.icon-btn:active { background: rgba(255,255,255,.12); }
.icon-btn svg { width: 24px; height: 24px; }
.badge-dot {
  position: absolute; top: 8px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.net-pill { font-size: .7rem; padding: 3px 8px; border-radius: 999px; background: #5a3a00; color: #ffd27a; white-space: nowrap; }

/* ---------- İçerik ---------- */
main { padding: 14px 14px calc(150px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
h1 { font-size: 1.35rem; margin: 6px 0 12px; }
h2 { font-size: 1.05rem; margin: 22px 0 10px; }
.muted { color: var(--ink-3); }
.small { font-size: .82rem; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 10px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.card + .card { margin-top: 10px; }
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-item {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface); width: 100%; text-align: left; border-left: 0; border-right: 0; border-top: 0;
  text-decoration: none;
}
.list-item:last-child { border-bottom: 0; }
.list-item:active { background: #f7f6f2; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 600; }
.list-item .s { font-size: .8rem; color: var(--ink-3); margin-top: 2px; }
.chev { color: var(--ink-3); flex: none; }

.banner {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius);
  background: #fff6dc; border: 1px solid #f3dc9a; text-decoration: none; margin-bottom: 10px; font-weight: 600;
}
.banner.info { background: #eaf1fb; border-color: #c7d8f2; }

/* sayaç rozetleri */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #efeee9; color: var(--ink-2); white-space: nowrap; }
.pill.star { background: #fdecea; color: var(--danger); }
.pill.review { background: #fff3cd; color: var(--warn); }
.pill.done { background: #e8f5e9; color: var(--ok); }
.pill.info { background: #eaf1fb; color: var(--info); }
.pill.pro { background: var(--ink); color: var(--accent); }

/* ---------- Butonlar ---------- */
.btn {
  min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.danger { color: var(--danger); border-color: #f0c9c9; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Form ---------- */
label.f { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin: 12px 0 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 1rem;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); }
.switch input { width: 22px; height: 22px; accent-color: var(--ink); }

/* segment / sekmeler */
.seg { display: flex; background: #e9e7e1; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg button { flex: 1; min-height: 40px; border: 0; background: transparent; border-radius: 9px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -14px 10px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .88rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Disiplin / görev ---------- */
.disc-num { width: 36px; height: 36px; border-radius: 10px; background: #efeee9; display: grid; place-items: center; font-weight: 700; flex: none; }
.subcat { margin-top: 14px; }
.subcat-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 8px; font-weight: 700; }
.subcat-head .n { color: var(--ink-3); }
.task {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--surface); border-radius: 12px;
  box-shadow: var(--shadow); margin-bottom: 8px; border-left: 4px solid transparent;
}
.task.starred { border-left-color: var(--danger); }
.task.review { border-left-color: var(--accent); }
.task.completed { opacity: .85; }
.task .grow { flex: 1; min-width: 0; }
.task .t { font-weight: 600; }
.task .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.star-btn { width: 40px; height: 40px; margin: -6px -4px -6px -6px; border: 0; background: transparent; font-size: 1.35rem; color: #c9c6bd; flex: none; }
.star-btn.on { color: var(--danger); }
.star-static { width: 30px; text-align: center; font-size: 1.2rem; color: #d3d0c7; flex: none; }
.star-static.on { color: var(--danger); }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #eee; flex: none; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eee; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; }
.add-photo { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: .8rem; background: #fafaf8; }
.reject-note { background: #fdecea; color: var(--danger); padding: 10px 12px; border-radius: 10px; font-size: .88rem; }
.empty { text-align: center; padding: 28px 10px; color: var(--ink-3); }

/* ---------- Sohbet ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); align-self: flex-start; }
.msg.me { align-self: flex-end; background: #fffaf0; border: 1px solid #f3e3b8; }
.msg .who { font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.msg .body { white-space: pre-wrap; word-wrap: break-word; margin-top: 2px; }
.msg .time { font-size: .7rem; color: var(--ink-3); }
.msg .rx { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.rx-btn { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .8rem; }
.rx-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.converted { font-size: .75rem; color: var(--ok); font-weight: 600; margin-top: 6px; }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-b)); z-index: 15; background: var(--bg);
  padding: 8px 12px; display: flex; gap: 8px; border-top: 1px solid var(--line); max-width: 760px; margin: 0 auto;
}
.composer .input { min-height: 46px; }

/* ---------- Alt sekme çubuğu ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--surface);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b); height: calc(64px + var(--safe-b));
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .7rem; font-weight: 600; text-decoration: none; color: var(--ink-3); position: relative; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tabbar svg { width: 24px; height: 24px; }

/* ---------- Bize Yazın (sağ alt sabit) ---------- */
.fab {
  position: fixed; right: 14px; bottom: calc(78px + var(--safe-b)); z-index: 25; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,.18); display: grid; place-items: center;
}
.fab svg { width: 22px; height: 22px; }
body.has-composer .fab { bottom: calc(142px + var(--safe-b)); }

/* ---------- Çekmece (☰) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10,12,15,.45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); z-index: 50; background: var(--surface);
  transform: translateX(-102%); transition: transform .22s ease; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
.drawer.on { transform: none; }
.drawer .head { padding: 18px 16px 14px; border-bottom: 1px solid var(--line); }
.drawer .head b { display: block; font-size: 1.05rem; }
.drawer .scroll { flex: 1; overflow-y: auto; padding: 6px 0; }
.drawer .sec { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 14px 16px 6px; }
.drawer .item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; width: 100%; border: 0; background: none; text-align: left; text-decoration: none; font-weight: 500; }
.drawer .item:active { background: #f4f3ef; }
.drawer .item.on { font-weight: 700; background: #faf6ea; box-shadow: inset 3px 0 0 var(--accent); }
.drawer .item .s { font-size: .75rem; color: var(--ink-3); }
.drawer .credit { border-top: 1px solid var(--line); padding: 14px 16px calc(14px + var(--safe-b)); text-align: center; }
.credit .lbl { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.credit img { height: 22px; width: auto; display: inline-block; }

/* ---------- Alt pencere (bottom sheet) ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-radius: 20px 20px 0 0;
  max-height: 88vh; display: flex; flex-direction: column; transform: translateY(105%); transition: transform .24s ease;
  max-width: 760px; margin: 0 auto; padding-bottom: var(--safe-b); box-shadow: 0 -8px 30px rgba(0,0,0,.15);
}
.sheet.on { transform: none; }
.sheet.half { max-height: 62vh; }
.sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: #d8d5cd; margin: 8px auto 2px; flex: none; }
.sheet .sh-head { display: flex; align-items: center; padding: 4px 8px 4px 16px; flex: none; }
.sheet .sh-head b { flex: 1; font-size: 1.05rem; }
.sheet .sh-body { overflow-y: auto; padding: 4px 16px 18px; -webkit-overflow-scrolling: touch; }
.sheet-scrim { z-index: 55; }

/* ---------- Bildirim (toast) ---------- */
.toast {
  position: fixed; left: 50%; top: calc(66px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -20px); z-index: 80; opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: .9rem; font-weight: 500;
  transition: all .2s; max-width: calc(100vw - 32px); pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand .mark { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.brand b { font-size: 1.5rem; display: block; }
.login .credit { margin-top: 40px; text-align: center; }

.notif { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.notif.unread { background: #fffaf0; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex: none; }
.notif.read .dot { background: transparent; }
.prio { width: 10px; align-self: stretch; border-radius: 5px; flex: none; }
.prio.p1 { background: var(--danger); } .prio.p2 { background: var(--accent); } .prio.p3 { background: #b9c3cf; }
.queued { font-size: .72rem; color: var(--warn); font-weight: 600; }

@media (min-width: 900px) {
  .sheet { border-radius: 20px; bottom: 24px; }
}

/* ---------- v1.1 arayüz düzenlemeleri ---------- */
.credit { display: flex; align-items: center; justify-content: center; gap: 10px; }
.credit .lbl { margin: 0; text-transform: none; letter-spacing: .02em; font-size: .78rem; color: var(--ink-3); }
.credit img { height: 16px; }
.disc-sub { font-size: .86rem; color: var(--ink-3); margin: 4px 0 6px; }
.disc-sub b { color: var(--ok); font-weight: 600; }
.menu-check { color: var(--accent); display: grid; }
.sh-body .list-item svg { color: var(--ink-2); flex: none; }
.det-wrap { position: relative; }
.det-wrap textarea.input { padding-right: 56px; }
.save-ic { position: absolute; right: 8px; bottom: 12px; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.save-ic:active { transform: scale(.94); }
.chat-head { font-size: .88rem; color: var(--ink-3); margin: 0 0 12px; }
.rx-btn { font-size: 1.05rem; min-width: 46px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.rx-n { font-size: .74rem; font-weight: 650; margin-left: 4px; }
.rx-btn[data-totask] { font-size: .8rem; }
.msg .who .abbr { font-size: .64rem; font-weight: 650; color: var(--ink-2); background: #efefec; padding: 1px 5px; border-radius: 5px; margin-left: 2px; letter-spacing: .03em; }
.topbar .icon-btn { width: 44px; }
.topbar .title small { font-size: .78rem; }
.subcat-head { min-height: 40px; }
.add-ic { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); display: grid; place-items: center; flex: none; }
.help-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px 14px; margin-bottom: 8px; font-size: .9rem; }
.help-card ol { margin: 4px 0 8px; padding-left: 20px; }
.help-card li { margin: 6px 0; color: var(--ink-2); }
.help-card p { margin: 0; font-size: .8rem; color: var(--ink-3); }
.prio-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.prio-dot.p1 { background: var(--danger); } .prio-dot.p2 { background: #d9a300; } .prio-dot.p3 { background: #b9c3cf; }
.note-group { margin-top: 18px; }
.note-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; margin: 0 2px 8px; color: var(--ink); cursor: pointer; }
details.note-group summary { list-style: none; }
details.note-group summary::-webkit-details-marker { display: none; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #c9cdca; background: #fff; flex: none; display: grid; place-items: center; color: #fff; margin-top: -2px; }
.note.done .note-check { background: var(--accent); border-color: var(--accent); }
.note.done .note-t { text-decoration: line-through; color: var(--ink-3); }
.note .s { font-size: .75rem; color: var(--ink-3); margin-top: 4px; }
.note-task { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; border: 0; background: #ebf2ee; color: var(--accent); font-size: .75rem; font-weight: 600; padding: 4px 8px; border-radius: 8px; text-align: left; }

/* ---------- v3: sade iş kartları, yüzen sohbet şeridi, ayarlar ---------- */
/* Disiplin satırı: ad + yanında sayaçlar */
.disc-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.disc-line .t { min-width: 0; }
.disc-pills { display: inline-flex; gap: 5px; }
.mine-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* İş maddesi kartı (akordeon) */
.task { display: block; padding: 0; border-left: 0; position: relative; overflow: hidden; }
.task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #c4c8c5; }
.task.st-review::before { background: #d99a00; }
.task.st-rejected::before { background: var(--danger); }
.task.st-done::before { background: var(--ok); }
.task-top { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 12px 6px 10px; cursor: pointer; }
.task-top:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 16px; }
.task .t { flex: 1; min-width: 0; font-weight: 400; line-height: 1.35; }
.task.st-done .t { color: var(--ink-2); }
.star-btn, .star-static, .star-gap { width: 44px; height: 44px; margin: 0; display: grid; place-items: center; flex: none; }
.micro { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--ink-2); }
.mi { display: inline-grid; place-items: center; height: 20px; }
.mi.late { color: var(--danger); }
.mi.at, .kv .at { font-weight: 650; font-size: .95rem; }
.task-more { display: none; padding: 0 14px 14px 54px; }
.task.open .task-more { display: block; }
.task.open .task-top { padding-bottom: 2px; }
.kv { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: .92rem; color: var(--ink); }
.kv > span:first-child { color: var(--ink-2); flex: none; width: 18px; display: grid; place-items: center; margin-top: 1px; }
.kv.late, .kv.late > span:first-child { color: var(--danger); }
.kv .pre { white-space: pre-wrap; }
.task-more .btn { margin-top: 10px; }

/* Yüzen sohbet şeridi */
#chatbar { position: fixed; z-index: 18; }
.chatbar { left: 14px; right: 14px; bottom: calc(86px + var(--safe-b)); max-width: 732px; margin: 0 auto; display: flex; align-items: center;
  gap: 2px; padding: 4px 4px 4px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 22px rgba(28,30,29,.10); }
.cb-grip { position: absolute; left: 50%; top: 4px; width: 34px; height: 4px; margin-left: -17px; border-radius: 2px; background: #d5d7d3; }
.cb-grip::after { content: ""; position: absolute; inset: -10px -20px; }
.cb-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; min-height: 52px; padding: 6px 4px 4px 12px; }
.cb-ic { position: relative; width: 40px; height: 40px; border-radius: 12px; background: #ebf2ee; color: var(--accent); display: grid; place-items: center; flex: none; }
.cb-n { position: absolute; top: -5px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff;
  font-size: .72rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.cb-txt { min-width: 0; display: flex; flex-direction: column; }
.cb-txt b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-last { font-size: .82rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.cb-btn:active { background: #efefec; }
.chatbubble { right: 18px; bottom: calc(88px + var(--safe-b)); }
.cb-bubble { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--accent);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(28,30,29,.14); }
body.has-chatbar main { padding-bottom: calc(170px + var(--safe-b)); }
body.has-chatbar.chat-min main { padding-bottom: calc(160px + var(--safe-b)); }

/* Açılan sohbet paneli */
#chatscrim { z-index: 44; }
#chatpanel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 82vh; max-width: 760px; margin: 0 auto; background: var(--bg);
  border-radius: 26px 26px 0 0; display: flex; flex-direction: column; transform: translateY(105%); transition: transform .24s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.15); }
#chatpanel.on { transform: none; }
.cp-head { padding: 4px 8px 10px 18px; background: var(--surface); border-radius: 26px 26px 0 0; border-bottom: 1px solid var(--line); flex: none; }
.cp-head .grip { width: 40px; height: 5px; border-radius: 3px; background: #d5d7d3; margin: 6px auto 4px; }
.cp-head b { font-size: 1.02rem; font-weight: 650; }
.cp-body { flex: 1; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.cp-composer { display: flex; gap: 8px; padding: 10px 14px calc(10px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); flex: none; }
.cp-composer .input { border-radius: 999px; padding-left: 18px; min-height: 48px; }
.cp-composer .btn { width: 48px; padding: 0; border-radius: 50%; background: var(--accent); border-color: var(--accent); color: #fff; flex: none; }

/* Ayarlar: yazı boyutu */
.fs-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; min-height: 44px; }
.fs-row input[type=range] { flex: 1; accent-color: var(--accent); height: 44px; }
.fs-a { font-weight: 600; color: var(--ink-2); width: 22px; text-align: center; }
.card + .card { margin-top: 12px; }

/* 44×44 dokunma alanları */
.rx-btn { min-height: 44px; min-width: 48px; }
.add-ic { width: 44px; height: 44px; }
.btn.sm { min-height: 44px; }
.chip { min-height: 44px; }
.tabbar a { font-size: .76rem; }
#chatpanel .cp-composer .btn { background: var(--accent); border-color: var(--accent); color: #fff; }

/* v3.1: tam unvan, @ etiket */
.msg .who .role { font-size: .72rem; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.msg .who { display: inline-flex; flex-wrap: wrap; align-items: baseline; }
.ment { color: var(--accent); font-weight: 650; }
.cb-at { position: absolute; top: -5px; left: -6px; width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff;
  font-size: .78rem; font-weight: 750; display: grid; place-items: center; border: 2px solid var(--surface); line-height: 1; }
.cb-bubble .cb-n { top: -2px; right: -2px; }
.cb-bubble .cb-at { top: -2px; left: -2px; }
.cf { position: relative; }
.ment-pick { display: none; position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 8px 24px rgba(28,30,29,.12); max-height: 240px; overflow-y: auto; padding: 4px; z-index: 5; }
.ment-pick.on { display: block; }
.ment-opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; border: 0; background: none; text-align: left; padding: 0 12px; border-radius: 12px; }
.ment-opt:active { background: #f1f1ee; }
.ment-opt b { font-weight: 600; }
.ment-opt span { color: var(--ink-3); font-size: .8rem; }

/* v4 — Aksiyon planı: öncelik ve durum (Excel/PDF ile aynı soft renkler) */
:root .pill.p-acil, .seg .p-acil.on { background: #F4D3D0; color: #9B2C2C; }
:root .pill.p-yuksek, .seg .p-yuksek.on { background: #FBE0C8; color: #8A4A14; }
:root .pill.p-normal, .seg .p-normal.on { background: #FFF1BF; color: #6E5600; }
:root .pill.p-dusuk, .seg .p-dusuk.on { background: #DCEED6; color: #2F6B3A; }
:root .pill.d-wait, .seg .d-wait.on { background: #E6E1F2; color: #4A3F73; }
:root .pill.d-prog, .seg .d-prog.on { background: #D8E7F5; color: #23507A; }
:root .pill.d-done { background: #D5EBDD; color: #2C6B4F; }
html .seg.tprio, html .seg.dur { display: flex; gap: 6px; padding: 0; background: none; border: 0; border-radius: 0; margin-bottom: 4px; }
html .seg.tprio button, html .seg.dur button { flex: 1; min-height: 44px; padding: 0 6px; border-radius: 11px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-weight: 600; box-shadow: none; margin: 0; }
html .seg.tprio button.on, html .seg.dur button.on { border-color: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.task .t .place { display: block; font-size: .8rem; color: var(--ink-3, #676c68); margin-top: 1px; }
.task.st-progress::before { background: #5b8fc4; }
.pdot { width: 9px; height: 9px; border-radius: 50%; background: #E9A86B; display: inline-block; }
.kv .st-txt .pill { margin-right: 4px; }
:root .pill.d-rev { background: #F6E3EE; color: #7A2E5F; }
.task.st-review::before { background: #c27aa3; }
/* Genel Kurallar */
.rules { display: grid; gap: 10px; }
.rule { padding: 14px 16px; margin: 0; }
.rule[role="button"] { cursor: pointer; }
.rule-h { display: flex; gap: 10px; align-items: baseline; }
.rule-no { flex: none; min-width: 24px; height: 24px; border-radius: 8px; background: #2E3A4B; color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.rule-t { margin: 6px 0 0 34px; white-space: pre-wrap; line-height: 1.45; }
.rule-m { margin: 8px 0 0 34px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Excel geri yükleme önizlemesi */
.imp-list { display: grid; gap: 8px; max-height: 46vh; overflow: auto; }
.imp-it { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.imp-it .small { margin-top: 2px; }
/* SITE SYNC simgesi */
html:root .brand .mark { background: #FAC302; padding: 0; overflow: hidden; border-radius: 14px; }
.brand .mark img { width: 100%; height: 100%; display: block; }
