/* KRITM Planner — arayüz stilleri (Figma tasarım sistemine göre) */
:root {
  --bg: #eff5f0;
  --surface: #ffffff;
  --surface-2: #f5faf6;
  --border: #d4e4d7;
  --border-strong: #b0ccba;
  --text: #0f2318;
  --muted: #4a6b55;
  --faint: #7c9b87;
  --accent: #1a8c47;
  --accent-hover: #157a3d;
  --accent-soft: #dbf0e3;
  --accent-muted: #a3d9b5;
  --danger: #d92d4a;
  --danger-soft: #fdecef;
  --warn: #d4880a;
  --warn-soft: #fef5e0;
  --ok: #0ea16e;
  --ok-soft: #e2f7ed;
  --info: #1b7fb8;
  --info-soft: #e1f0fa;
  --shadow: 0 1px 2px rgba(17, 22, 40, .06), 0 8px 24px rgba(17, 22, 40, .07);
  --sidebar-w: 240px;
}

html[data-theme='dark'] {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #18181b;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #34d97a;
  --accent-hover: #28c46c;
  --accent-soft: #132e20;
  --accent-muted: #1b4030;
  --danger: #f04060;
  --danger-soft: #2c141a;
  --warn: #f5b731;
  --warn-soft: #2c2210;
  --ok: #34d399;
  --ok-soft: #0f2a1f;
  --info: #38bdf8;
  --info-soft: #0f2133;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.5 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

/* ---------- düzen ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 14px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px;
  display: grid; place-items: center; letter-spacing: .02em;
}
.brand-name { font-weight: 700; letter-spacing: -.01em; font-size: 14.5px; }
.brand-name small { display: block; font-weight: 400; font-size: 11px; color: var(--faint); letter-spacing: 0; }

/* ekip seçici */
.team-bar { padding: 0 16px 14px; }
.team-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 9px 11px; text-align: left;
}
.team-btn:hover { border-color: var(--accent-muted); background: var(--surface-2); }
.team-mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700;
}
.team-name { flex: 1; min-width: 0; }
.team-name b { display: block; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-name small { font-size: 11px; color: var(--faint); }
.team-btn .chev { color: var(--faint); font-size: 11px; }

.side-scroll { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.side-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px 8px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--faint);
}
.side-label button {
  border: 0; background: none; color: var(--faint); font-size: 16px; line-height: 1;
  padding: 0 4px; border-radius: 6px;
}
.side-label button:hover { color: var(--accent); background: var(--accent-soft); }

button.cat {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 10px; border-radius: 9px; color: var(--text);
  font-size: 13.5px; margin-bottom: 2px;
}
button.cat:hover { background: var(--surface-2); }
button.cat.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
button.cat .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.cat .count {
  font-size: 11px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); padding: 0 7px; border-radius: 20px; min-width: 24px; text-align: center;
}
button.cat.active .count { background: var(--surface); border-color: transparent; color: var(--accent); }
button.cat .count.note-count { background: none; white-space: nowrap; padding: 0 5px; min-width: 0; font-size: 10.5px; }
button.cat.new-cat { margin-top: 10px; color: var(--muted); border: 1px dashed var(--border-strong); }
button.cat.new-cat:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
button.cat .plus { width: 10px; text-align: center; font-size: 15px; line-height: 1; flex: none; }

.side-foot { border-top: 1px solid var(--border); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 650;
}
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who span { font-size: 11px; color: var(--faint); }

.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px;
}
.icon-btn:hover { background: var(--accent-soft); border-color: var(--accent-muted); color: var(--accent); }

/* ---------- ana alan ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.page-title { font-size: 19px; font-weight: 650; letter-spacing: -.015em; display: flex; align-items: center; gap: 9px; min-width: 0; }
.page-title .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.page-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); padding: 3px; border-radius: 10px; }
.tabs button {
  border: 0; background: none; color: var(--muted);
  padding: 6px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 35, 24, .07); }
.tabs .tab-n {
  margin-left: 7px; font-size: 10.5px; font-weight: 600;
  background: var(--bg); color: var(--muted); padding: 1px 7px; border-radius: 20px;
}
.tabs button.active .tab-n { background: var(--accent-soft); color: var(--accent); }

.top-right { display: flex; align-items: center; gap: 12px; justify-content: flex-end; min-width: 0; }
.spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 12px; width: 190px;
}
.search:focus-within { border-color: var(--accent-muted); }
.search input { border: 0; background: none; outline: none; width: 100%; font-size: 13px; }
.search input::placeholder { color: var(--faint); }
.search span { color: var(--faint); font-size: 13px; }

.btn {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--surface-2); border-color: var(--accent-muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--danger); border-color: transparent; background: none; }
.btn.danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.content { flex: 1; overflow: auto; min-height: 0; }

/* ---------- kanban ---------- */
.board { display: flex; gap: 16px; padding: 22px; align-items: stretch; min-height: 100%; }
.col {
  width: 292px; flex: none; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 110px);
}
.col-head {
  display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px;
  cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none;
}
.col-head:active { cursor: grabbing; }
.col-head .name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-head .n {
  font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  padding: 0 7px; border-radius: 20px;
}
.col-head .spacer { flex: 1; }
.col-head .icon-btn { width: 26px; height: 26px; border-color: transparent; background: none; font-size: 15px; }
.col-head .icon-btn.more { opacity: 0; }
.col:hover .col-head .icon-btn.more { opacity: 1; }
.col-body { padding: 4px 12px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 90px; }
.col.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.col.drag-over .col-body { background: var(--accent-soft); border-radius: 9px; }
.col-empty {
  border: 1px dashed var(--border-strong); border-radius: 9px; color: var(--faint);
  font-size: 12.5px; padding: 26px 10px; text-align: center;
}
.col-add {
  margin: 0 12px 12px; border: 1px dashed var(--border-strong); background: none;
  color: var(--muted); border-radius: 9px; padding: 9px; font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.col-add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.add-col {
  width: 200px; flex: none; border: 1px dashed var(--border-strong); background: none;
  border-radius: 12px; color: var(--muted); padding: 18px; font-size: 13px; align-self: flex-start;
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 128px;
}
.add-col:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 13px; cursor: grab;
  display: flex; flex-direction: column; gap: 8px;
}
.card:hover { border-color: var(--accent-muted); }
.card, .cal-task, .tl-item { touch-action: none; -webkit-user-select: none; user-select: none; }
.card.placeholder, .cal-task.placeholder, .tl-item.placeholder { opacity: .3; }
.col.placeholder { opacity: .35; }
.card.prio-high { border-left: 3px solid var(--warn); }
.card.prio-urgent { border-left: 3px solid var(--danger); }
.card.done .card-title { color: var(--muted); text-decoration: line-through; }
.card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-top .spacer { flex: 1; }
.card-title { font-size: 14px; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card-desc { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* sürüklenen kopyanın imleci takip eden hayaleti */
.drag-ghost {
  position: fixed; z-index: 200; pointer-events: none; margin: 0 !important;
  transform: rotate(1.5deg); box-shadow: var(--shadow); opacity: .96;
}
.drag-ghost.ghost-col { max-height: 340px; overflow: hidden; transform: rotate(1deg); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

/* ---------- rozetler ---------- */
.chip {
  font-size: 11.5px; padding: 3px 8px; border-radius: 7px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.chip.tag, .chip.tag-mini { border-color: transparent; font-weight: 600; font-size: 11px; }
.chip.due.today { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.due.late { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chip.due.soon { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.prio-2 { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.prio-3 { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chip.check { font-variant-numeric: tabular-nums; }
.chip.who { margin-left: auto; gap: 6px; padding: 2px 9px 2px 2px; border-color: transparent; background: none; color: var(--muted); }
.chip.who.none { padding: 3px 8px; color: var(--faint); background: var(--surface-2); border-color: var(--border); }
.avatar.mini { width: 20px; height: 20px; font-size: 9px; }

/* görev yaşı: 1. hafta yeşil → 2-3. hafta sarı → 4+ kırmızı */
.chip.age { gap: 6px; border-color: transparent; background: none; color: var(--faint); padding: 2px 0; font-size: 11.5px; }
.age-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.chip.age.lvl-1 .age-dot { background: var(--ok); }
.chip.age.lvl-2 .age-dot { background: var(--warn); }
.chip.age.lvl-3 .age-dot { background: var(--danger); }
.chip.age.lvl-2 { color: var(--warn); }
.chip.age.lvl-3 { color: var(--danger); }

.card-cover { position: relative; border-radius: 8px; overflow: hidden; }
.card-cover img { display: block; width: 100%; height: 120px; object-fit: cover; }
.card-cover .cover-n {
  position: absolute; right: 7px; bottom: 7px; background: rgba(15, 35, 24, .72);
  color: #fff; font-size: 10.5px; padding: 1px 7px; border-radius: 20px;
}

/* kulvarlar: "Tüm kategoriler" panosu */
.lanes { display: flex; flex-direction: column; padding-bottom: 24px; }
.lane { border-bottom: 1px solid var(--border); }
.lane:last-child { border-bottom: 0; }
.lane-head { display: flex; align-items: center; gap: 12px; padding: 22px 22px 0; }
.lane-head b { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.lane-head .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lane-head .n {
  font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 20px;
}
.lane-head .btn { padding: 6px 12px; font-size: 12.5px; }
.board.inline { padding: 14px 22px 22px; overflow-x: auto; align-items: flex-start; min-height: 0; }
.board.inline .col { width: 264px; max-height: 400px; }
.board.inline .add-col { width: 140px; min-height: 120px; padding: 14px 10px; font-size: 12.5px; }

/* ---------- planlama ---------- */
.plan { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 18px; padding: 0 22px 24px; align-items: start; }
@media (max-width: 1100px) { .plan { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.panel-head h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.panel-body { padding: 4px 18px 16px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cal-dow {
  padding: 10px 6px; font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; text-align: center;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.cal-day {
  min-height: 112px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border);
  padding: 7px 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.cal-day:nth-child(7n+1) { border-left: 0; }
.cal-day.other .cal-num { color: var(--faint); }
.cal-day.today .cal-num { background: var(--accent); color: #fff; }
.cal-day.drag-over { background: var(--accent-soft); }
.cal-num { font-size: 12px; font-weight: 550; color: var(--muted); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal-task {
  font-size: 11.5px; padding: 3px 7px; border-radius: 6px; cursor: grab;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-task:hover { border-color: var(--accent-muted); }
.cal-task.done { opacity: .5; text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--faint); padding-left: 4px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 22px 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.stat span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat.late b { color: var(--danger); }
.stat.today b { color: var(--warn); }
.stat.done b { color: var(--accent); }

.tl-group + .tl-group { margin-top: 18px; }
.tl-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 8px; }
.tl-group.late .tl-title { color: var(--danger); }
.tl-group.today .tl-title { color: var(--warn); }
.tl-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 8px; cursor: pointer;
}
.tl-item:hover { background: var(--surface-2); }
.tl-item .t { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-item .d { font-size: 12px; color: var(--faint); white-space: nowrap; }
.tl-item.late .d { color: var(--danger); font-weight: 600; }
.tl-item.today .d { color: var(--warn); font-weight: 600; }

/* ---------- notlar ---------- */
.notes-grid { display: grid; grid-template-columns: 312px minmax(0, 1fr); gap: 18px; padding: 22px; height: 100%; }
.note-list { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 2px; }
.note-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; cursor: pointer;
}
.note-item:hover { border-color: var(--accent-muted); }
.note-item.active { background: var(--accent-soft); border-color: var(--accent-muted); box-shadow: inset 3px 0 0 var(--accent); }
.note-item .head { display: flex; align-items: baseline; gap: 8px; }
.note-item b { flex: 1; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item .stamp { font-size: 11px; color: var(--faint); white-space: nowrap; }
.note-item p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-item .row { display: flex; align-items: center; gap: 6px; margin-top: 10px; }

.note-editor {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.note-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.note-bar .saved { font-size: 12px; color: var(--faint); }
.note-bar .cat-select {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 20px; padding: 6px 12px; font-size: 12.5px; font-weight: 550;
}
.note-bar .pin { border-radius: 20px; padding: 6px 12px; font-size: 12.5px; }
.note-bar .trash {
  border: 1px solid transparent; background: var(--danger-soft); color: var(--danger);
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 14px;
}
.note-bar .trash:hover { border-color: var(--danger); }
.note-editor input.title {
  border: 0; outline: none; background: none; font-size: 23px; font-weight: 700;
  padding: 16px 20px 8px; letter-spacing: -.02em;
}
.note-editor textarea {
  flex: 1; border: 0; outline: none; background: none; resize: none;
  padding: 6px 20px 24px; font-size: 13.5px; line-height: 1.75;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
.note-gallery { padding: 6px 20px 0; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 35, 24, .42);
  display: grid; place-items: center; padding: 24px; z-index: 50; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
  width: min(640px, 100%); max-height: 88vh; overflow: auto; border: 1px solid var(--border);
}
.modal.sm { width: min(440px, 100%); }
.modal-head {
  display: flex; align-items: center; gap: 10px; padding: 18px 22px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.modal-head .spacer { flex: 1; }
.modal-head .close {
  border: 0; background: none; color: var(--muted); font-size: 17px;
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
}
.modal-head .close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot {
  display: flex; gap: 10px; padding: 16px 22px; align-items: center;
  border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface);
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field input:not([type=checkbox]), .field textarea, .field select {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 9px; padding: 10px 12px; outline: none; width: 100%; font-size: 13.5px;
}
.field input:not([type=checkbox]):focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); background: var(--surface);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field textarea { resize: vertical; min-height: 88px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.checklist { display: flex; flex-direction: column; gap: 4px; }
.check-row { display: flex; align-items: center; gap: 10px; }
.check-row input[type=checkbox] { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.check-row input[type=text] { border: 0; background: none; flex: 1; outline: none; padding: 5px 0; font-size: 13.5px; }
.check-row.done input[type=text] { color: var(--muted); text-decoration: line-through; }
.check-row .x { border: 0; background: none; color: var(--faint); font-size: 15px; padding: 0 4px; opacity: 0; }
.check-row:hover .x { opacity: 1; }
.check-row .x:hover { color: var(--danger); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress { height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; flex: 1; }
.progress i { display: block; height: 100%; background: var(--accent); }
.progress-row .pct { font-size: 11.5px; font-weight: 650; color: var(--accent); }
.check-add { border: 0; background: none; color: var(--muted); font-size: 13px; text-align: left; padding: 6px 0; width: 100%; }
.check-add:focus { outline: none; color: var(--text); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; }
.swatch.on { border-color: var(--text); }

.empty { padding: 70px 20px; text-align: center; color: var(--faint); }
.empty h3 { margin: 0 0 8px; color: var(--muted); font-size: 15px; font-weight: 650; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface); padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 90; box-shadow: var(--shadow);
}

/* ---------- görseller ---------- */
.gallery { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb {
  position: relative; width: 88px; height: 66px; flex: none;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2);
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.thumb .x {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border: 0; border-radius: 50%; background: rgba(15, 35, 24, .7); color: #fff;
  font-size: 14px; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .12s;
}
.thumb:hover .x, .thumb:focus-within .x { opacity: 1; }
.thumb.add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px dashed var(--border-strong); color: var(--muted); background: none;
}
.thumb.add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.thumb.add span { font-size: 17px; line-height: 1; }
.thumb.add small { font-size: 10.5px; }
.gallery.compact .thumb { width: 150px; height: 95px; }

/* kırpma penceresi */
.crop-wrap { display: flex; justify-content: center; }
.crop-frame {
  position: relative; width: min(520px, 78vw); aspect-ratio: 4 / 3;
  overflow: hidden; border-radius: 12px; background: #0b1410;
  cursor: grab; touch-action: none;
}
.crop-frame:active { cursor: grabbing; }
.crop-img {
  position: absolute; left: 50%; top: 50%; max-width: none;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.crop-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crop-zoom { flex: 1; min-width: 120px; accent-color: var(--accent); }
.crop-zoom-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.crop-ratios { display: flex; gap: 4px; }
.crop-ratios .btn { padding: 6px 11px; font-size: 12px; }
.crop-ratios .btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-muted); font-weight: 600; }
.crop-info { font-size: 11.5px; color: var(--faint); }

/* tam ekran görüntüleyici */
.overlay.lb { background: rgba(8, 14, 10, .9); }
.lb-box { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 92vw; }
.lb-img { max-width: 92vw; max-height: 76vh; border-radius: 12px; box-shadow: var(--shadow); }
.lb-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 12px; padding: 8px 12px;
}
.lb-cap { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- etiketler ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted);
  border-radius: 20px; padding: 5px 14px; font-size: 12.5px; font-weight: 550; line-height: 1.4;
}
.tag-chip:hover { border-color: var(--accent-muted); color: var(--text); }
.tag-chip.on { color: #fff; font-weight: 600; }
.tag-chip.add { border-style: dashed; color: var(--muted); }
.tag-chip.add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- ekip seçici menüsü ---------- */
.menu {
  position: fixed; z-index: 80; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; min-width: 236px; max-height: 70vh; overflow: auto;
}
.menu-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); padding: 8px 10px 6px;
}
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; color: var(--text);
  padding: 9px 10px; border-radius: 9px; font-size: 13.5px; text-align: left;
}
.menu-item:hover:not(:disabled) { background: var(--surface-2); }
.menu-item:disabled { opacity: .5; }
.menu-item.on { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.menu-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.menu-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- ekip üyeleri ---------- */
.member-list { display: flex; flex-direction: column; gap: 8px; }
.member-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface-2);
}
.member-row .who { flex: 1; min-width: 0; }
.member-row .who b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .who span { font-size: 11px; color: var(--faint); }
.member-row select {
  width: auto; flex: none; border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; padding: 5px 8px; font-size: 12px;
}
.member-add { display: flex; gap: 8px; margin-top: 10px; }
.member-add select {
  flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 9px; padding: 8px 10px; font-size: 12.5px;
}
.hint { font-size: 12px; color: var(--muted); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: content-box; }

/* ---------- ikonlar ---------- */
.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic svg { display: block; }

/* ---------- seçim kutusu (shadcn tarzı) ---------- */
.sel { display: block; position: relative; }
.sel-trigger {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 9px; padding: 9px 11px; font-size: 13.5px; text-align: left;
}
.sel-trigger:hover:not(:disabled) { border-color: var(--accent-muted); }
.sel-trigger[aria-expanded='true'] { border-color: var(--accent); background: var(--surface); }
.sel-trigger:disabled { opacity: .6; cursor: not-allowed; }
.sel-trigger .ic { color: var(--faint); }
.sel-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-label.ph { color: var(--faint); }
.sel-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sel-trigger.pill { border-radius: 20px; padding: 6px 12px; font-size: 12.5px; font-weight: 550; }

.sel-panel {
  position: fixed; z-index: 120; background: var(--surface);
  border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow);
  padding: 5px; max-height: 300px; overflow: auto; min-width: 180px;
}
.sel-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 0; background: none; color: var(--text); text-align: left;
  padding: 8px 10px; border-radius: 8px; font-size: 13.5px;
}
.sel-item:hover:not(:disabled), .sel-item.hl { background: var(--surface-2); }
.sel-item.on { color: var(--accent); font-weight: 600; }
.sel-item .sel-hint { font-size: 11px; color: var(--faint); }
.sel-item .sel-check { width: 16px; display: inline-flex; justify-content: center; color: var(--accent); }

.note-bar .sel { flex: none; }
.member-row .sel { width: 136px; flex: none; }
.member-add .sel { width: 140px; flex: none; }
.member-add .sel:first-child { flex: 1; min-width: 0; }

/* ---------- ayarlar ---------- */
.modal.lg { width: min(840px, 100%); }
.modal.settings { overflow: hidden; }
/* Ayarlar penceresi sekme değiştikçe boy değiştirmesin: yükseklik sabit,
   içerik kendi alanında kayar. */
.set-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); height: min(620px, 76vh); }
.set-nav { border-right: 1px solid var(--border); padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; overflow: auto; min-height: 0; }
.set-tab {
  display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--muted);
  padding: 9px 10px; border-radius: 9px; font-size: 13.5px; text-align: left;
}
.set-tab:hover { background: var(--surface-2); color: var(--text); }
.set-tab.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.set-body { padding: 20px 24px 24px; overflow: auto; min-height: 0; }
.set-section { display: flex; flex-direction: column; gap: 14px; }
.set-title { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.set-row { display: flex; align-items: center; gap: 12px; }
.set-row b { font-size: 14px; font-weight: 650; }
.set-sep { height: 1px; background: var(--border); margin: 6px 0; }
.set-body .btn { align-self: flex-start; }
.set-body .swatches { max-width: 360px; }

/* izin tablosu */
.perm { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.perm th, .perm td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: center; }
.perm th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700; border-bottom-color: var(--border-strong);
}
.perm th:first-child, .perm td.lbl { text-align: left; }
.perm .yes { color: var(--accent); display: inline-flex; }
.perm .no { color: var(--faint); opacity: .45; display: inline-flex; }

/* ---------- bildirim merkezi ---------- */
.bell { position: relative; }
.bell.has-unread { color: var(--accent); border-color: var(--accent-muted); }
.bell-dot {
  position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 20px;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.menu.notif { padding: 6px; }
.menu.notif .menu-label { display: flex; align-items: center; }
.link-btn { border: 0; background: none; color: var(--accent); font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.notif-item {
  display: flex; gap: 9px; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 10px; border-radius: 9px; color: var(--text);
}
.notif-item:hover { background: var(--surface-2); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; margin-top: 6px; flex: none; }
.notif-item.unread .notif-dot { background: var(--accent); }
.notif-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-text b { font-size: 13px; font-weight: 600; }
.notif-text span { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-text small { font-size: 10.5px; color: var(--faint); }

/* ---------- hızlı filtreler ---------- */
button.cat.filter { font-size: 13px; color: var(--muted); }
button.cat.filter.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
button.cat.filter.clear { color: var(--faint); }
.filter-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 10px 2px; }
.filter-tags .chip { cursor: pointer; }

/* ---------- kart eklentileri ---------- */
.card-pick {
  width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--border-strong);
  background: var(--surface); display: inline-grid; place-items: center; margin-right: 7px;
  vertical-align: -3px; opacity: 0; transition: opacity .12s; color: #fff;
}
.card:hover .card-pick, .card-pick.on { opacity: 1; }
.card-pick.on { background: var(--accent); border-color: var(--accent); }
.chip.blocked { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.col-head .n.over { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 700; }

/* ---------- toplu işlem çubuğu ---------- */
.bulk-bar {
  position: sticky; bottom: 14px; margin: 0 22px; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow);
}
.bulk-bar b { font-size: 13px; }
.bulk-bar .sel { width: 190px; }
.bulk-bar .sel-trigger { padding: 7px 10px; font-size: 12.5px; }
.bulk-bar .btn { padding: 7px 12px; font-size: 12.5px; }

/* ---------- alt görev, bağımlılık, yorum ---------- */
.sub-list, .dep-list { display: flex; flex-direction: column; gap: 5px; }
.sub-row, .dep-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
}
.sub-row.done .sub-title, .dep-row.done .sub-title { color: var(--muted); text-decoration: line-through; }
.sub-title { flex: 1; border: 0; background: none; text-align: left; font-size: 13px; color: var(--text); padding: 0; }
.sub-title:hover { color: var(--accent); }
.sub-row .x, .dep-row .x { border: 0; background: none; color: var(--faint); padding: 0 2px; }
.sub-row .x:hover, .dep-row .x:hover { color: var(--danger); }
.sub-add input { width: 100%; border: 1px dashed var(--border-strong); background: none; border-radius: 8px; padding: 7px 9px; font-size: 13px; outline: none; }
.sub-add input:focus { border-style: solid; border-color: var(--accent); }
.dep-add { display: flex; gap: 8px; margin-top: 4px; }
.dep-add .sel { flex: 1; min-width: 0; }
.blocked-note {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  background: var(--warn-soft); color: var(--warn); border-radius: 9px; padding: 9px 12px;
}

.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.comment .meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.comment .meta b { font-size: 12.5px; font-weight: 650; }
.comment .meta span { font-size: 11px; color: var(--faint); }
.comment .meta .x { margin-left: auto; border: 0; background: none; color: var(--faint); padding: 0 2px; opacity: 0; }
.comment:hover .meta .x { opacity: 1; }
.comment .meta .x:hover { color: var(--danger); }
.comment p { margin: 0; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.comment-input {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px;
  padding: 10px 12px; font-size: 13.5px; resize: vertical; outline: none; font-family: inherit;
}
.comment-input:focus { border-color: var(--accent); background: var(--surface); }
.comment-form .btn { align-self: flex-start; }

/* ---------- dosya ekleri ---------- */
.file-chip {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 9px; padding: 8px 10px; font-size: 12.5px; max-width: 230px;
}
.file-chip:hover { border-color: var(--accent-muted); }
.file-chip .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { color: var(--faint); font-size: 10.5px; }
.file-chip .x { border: 0; background: none; color: var(--faint); padding: 0 2px; }
.file-chip .x:hover { color: var(--danger); }

/* ---------- takvim: başlangıç-bitiş aralığı ---------- */
.cal-task.span-mid, .cal-task.span-end { background: var(--accent-soft); border-color: transparent; color: var(--muted); }
.cal-task.span-start { border-radius: 6px 2px 2px 6px; }
.cal-task.span-end { border-radius: 2px 6px 6px 2px; }
.cal-task.span-mid { border-radius: 2px; min-height: 20px; }
.span-line { display: block; height: 3px; border-radius: 3px; background: currentColor; opacity: .35; }

/* ---------- markdown önizleme ---------- */
.md-preview { padding: 6px 20px 24px; font-size: 14px; line-height: 1.7; overflow: auto; }
.md-preview h1 { font-size: 20px; margin: 18px 0 8px; }
.md-preview h2 { font-size: 17px; margin: 16px 0 8px; }
.md-preview h3, .md-preview h4 { font-size: 15px; margin: 14px 0 6px; }
.md-preview p { margin: 0 0 10px; }
.md-preview ul, .md-preview ol { margin: 0 0 10px; padding-left: 22px; }
.md-preview li { margin: 3px 0; }
.md-preview code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }
.md-preview a { color: var(--accent); }
.md-tasks { list-style: none; padding-left: 2px; }
.md-tasks li { display: flex; align-items: baseline; gap: 8px; }
.md-tasks li.done { color: var(--muted); text-decoration: line-through; }
.md-box {
  width: 15px; height: 15px; border: 1px solid var(--border-strong); border-radius: 4px;
  display: inline-grid; place-items: center; font-size: 10px; color: var(--accent); flex: none;
}

/* ---------- rapor ---------- */
.rep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 0 22px 24px; }
@media (max-width: 1100px) { .rep-grid { grid-template-columns: 1fr; } }
.rep-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.rep-name { width: 120px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-bar { flex: 1; height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.rep-bar i { display: block; height: 100%; }
.rep-num { font-size: 12px; color: var(--muted); min-width: 52px; text-align: right; }
.rep-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.rep-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.rep-col-bar { width: 100%; max-width: 34px; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 3px; }
.rep-col-val { font-size: 11px; color: var(--muted); font-weight: 600; }
.rep-col-lbl { font-size: 10.5px; color: var(--faint); }
.panel-body.activity { max-height: 340px; overflow: auto; }
.act-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.act-row:last-child { border-bottom: 0; }
.act-text { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.act-text b { color: var(--text); font-weight: 600; }
.act-sum { color: var(--text); }
.act-time { font-size: 11px; color: var(--faint); white-space: nowrap; }

kbd {
  background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 7px; font-size: 12px; font-family: inherit; font-weight: 600;
}

/* ---------- mobil ---------- */
.side-toggle, .side-close { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60;
    transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow);
  }
  body.side-open .sidebar { transform: none; }
  body.side-open::after {
    content: ''; position: fixed; inset: 0; background: rgba(15, 35, 24, .35); z-index: 55;
  }
  /* Pencereler kenar çubuğunun (60) üstünde kalsın; içlerindeki menüler (80+) üstte kalmaya devam eder */
  .overlay { z-index: 70; padding: 12px; }
  .side-toggle, .side-close { display: grid; }
  .brand { justify-content: space-between; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 14px; }
  .page-title { font-size: 16px; }
  .tabs { justify-self: center; }
  .tabs button { padding: 6px 10px; font-size: 12.5px; }
  .search { width: 128px; }
  .top-right { gap: 8px; }
  .board { padding: 14px; gap: 12px; }
  .col { width: 84vw; max-width: 320px; }
  .plan, .rep-grid, .notes-grid { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .notes-grid { height: auto; }
  .note-list { max-height: 40vh; }
  .stat-row { grid-template-columns: repeat(2, 1fr); padding: 14px 14px 8px; gap: 10px; }
  .lane-head { padding: 16px 14px 0; flex-wrap: wrap; }
  .board.inline { padding: 10px 14px 16px; }
  .modal, .modal.sm, .modal.lg { width: 100%; max-height: 92vh; }
  .set-wrap { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: 78vh; }
  .set-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--border); }
  .set-tab { white-space: nowrap; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .bulk-bar { margin: 0 14px; }
  .cal-day { min-height: 78px; }
}
