/* =====================================================================
   Flow — Modern SaaS Kanban  |  Light mode
   ===================================================================== */

:root {
  /* Nötr palet */
  --bg:        #f6f7f9;
  --surface:   #ffffff;
  --surface-2: #fbfbfc;
  --border:    #e7e8ec;
  --border-2:  #dfe1e6;
  --text:      #16181d;
  --text-2:    #51596b;
  --text-3:    #6b7280;   /* WCAG AA (≈4.8:1) — küçük gri metinler okunur */

  /* Primary = siyah */
  --brand:     #18181b;
  --brand-600: #000000;
  --brand-soft:#f1f2f4;
  --blue:      #2563eb;
  --green:     #16a34a;
  --amber:     #d97706;
  --red:       #dc2626;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,18,29,.06), 0 1px 3px rgba(16,18,29,.04);
  --shadow-md: 0 4px 14px rgba(16,18,29,.08);
  --shadow-lg: 0 18px 50px rgba(16,18,29,.18);
  --ring:      0 0 0 3px rgba(24,24,27,.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; }

/* Lucide ikon temel boyutu / hizası */
[data-lucide], svg.lucide {
  width: 16px; height: 16px;
  stroke-width: 2; flex-shrink: 0;
  display: inline-block; vertical-align: middle;
}

body {
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.011em;            /* Geist için hafif optik sıkılaştırma */
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Sayısal değerler hizalı (zıplamayan rakamlar) */
.stat-value, .col-count, .badge-date, .badge-notes, .note-time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* ---------------- Üst aksiyonlar ---------------- */
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.page-actions { justify-content: flex-end; margin-bottom: 20px; }
.topbar-actions .icon-btn {
  width: 38px; height: 38px; border: 1px solid var(--border-2);
  border-radius: 10px; color: var(--text-2);
}
.topbar-actions .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.topbar-actions .icon-btn svg { width: 18px; height: 18px; }

/* ---------------- Konteyner ---------------- */
.container { max-width: 1400px; margin: 0 auto; padding: 22px 28px 60px; }

/* ---------------- İstatistikler ---------------- */
.stats {
  display: grid; gap: 14px;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 22px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 13px;
  transition: box-shadow .15s ease, transform .12s ease;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.stat-ico svg { width: 21px; height: 21px; }
.stat-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.si-total  { background: #f1f5f9; color: #475569; }
.si-prog   { background: #eff6ff; color: var(--blue); }
.si-done   { background: #ecfdf5; color: var(--green); }
.si-late   { background: #fef2f2; color: var(--red); }
.si-urgent { background: #fffbeb; color: var(--amber); }

/* ---------------- Araç çubuğu ---------------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.search-box { position: relative; flex: 1 1 240px; min-width: 200px; }
.search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); width: 17px; height: 17px; pointer-events: none;
}
.search-box input {
  width: 100%; padding: 10px 14px 10px 36px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 14px; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box input:hover { border-color: #c7cad2; }
.search-box input::placeholder { color: var(--text-3); }
/* Özel select — native ok kaldırıldı, kendi chevron'umuz */
.filter {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 10px 34px 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); background-color: var(--surface);
  font-size: 13px; font-family: inherit; font-weight: 500;
  color: var(--text); cursor: pointer; min-width: 150px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.filter:hover { border-color: #c7cad2; background-color: var(--surface-2); }

/* Özel checkbox */
.chk-overdue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 0 4px; cursor: pointer; user-select: none;
}
.chk-overdue:hover { color: var(--text); }
.chk-overdue input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; margin: 0; flex-shrink: 0;
  border: 1.5px solid var(--border-2); border-radius: 6px;
  background-color: var(--surface); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.chk-overdue input[type="checkbox"]:hover { border-color: #b9bcc6; }
.chk-overdue input[type="checkbox"]:checked {
  background-color: var(--brand); border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 13px;
}
.chk-overdue input[type="checkbox"]:focus-visible {
  outline: none; box-shadow: var(--ring); border-color: var(--brand);
}

/* ---------------- Aktif filtre rozetleri ---------------- */
.active-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 18px; margin-top: -6px;
}
.af-count { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.af-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 20px; padding: 4px 6px 4px 11px;
}
.af-chip .af-key { color: var(--text-3); }
.af-chip button {
  display: grid; place-items: center; width: 18px; height: 18px;
  border: none; background: var(--surface-2); border-radius: 50%;
  color: var(--text-3); cursor: pointer; padding: 0;
}
.af-chip button:hover { background: #ececef; color: var(--text); }
.af-chip button svg { width: 12px; height: 12px; }

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}

/* ---------------- Butonlar ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-600); }
.btn-soft { background: var(--brand-soft); color: var(--brand-600); }
.btn-soft:hover { background: #e6e6e9; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: #f3c2c2; }
.btn-danger-ghost:hover { background: #fdeaea; }

.icon-btn {
  background: transparent; border: none; cursor: pointer;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px; color: var(--text-3);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------------- Tahta ---------------- */
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}
.column {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  min-height: 140px;
}
.column-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px;
}
.col-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); }
.status-backlog     { background: #94a3b8; }
.status-todo        { background: #64748b; }
.status-in_progress { background: #2563eb; }
.status-review      { background: #d97706; }
.status-done        { background: #16a34a; }
.status-cancelled   { background: #ef4444; }
.col-count {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 9px; min-width: 24px; text-align: center;
}
.column-body {
  padding: 4px 10px 12px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 60px;
  flex: 1;
}

/* Kolon altı hızlı ekleme */
.column-foot { padding: 0 10px 10px; }
.quick-add-btn {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 8px 10px; border: 1px dashed var(--border-2);
  background: transparent; border-radius: var(--radius-sm);
  color: var(--text-3); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.quick-add-btn:hover { background: var(--surface); color: var(--text); border-color: #c7cad2; }
.quick-add-btn svg { width: 15px; height: 15px; }
.quick-add-input {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 13px;
  border: 1px solid var(--brand); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); box-shadow: var(--ring);
}
.quick-add-input:focus-visible { outline: none; }

/* ---------------- Kart ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 3px;            /* öncelik renk şeridi */
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, transform .06s ease;
  position: relative;
}
.card:hover { box-shadow: var(--shadow-md); }
.card.dragging { opacity: .5; }
/* Öncelik şeridi (sol kenar) */
.card.pr-low    { border-left-color: #cbd5e1; }
.card.pr-medium { border-left-color: #93c5fd; }
.card.pr-high   { border-left-color: #fdba74; }
.card.pr-urgent { border-left-color: #f87171; }
.card.overdue   { border-left-color: var(--red); }   /* gecikme önceliği ezer */

.card-top { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.card-title { font-weight: 600; font-size: 14px; line-height: 1.35; letter-spacing: -.01em; color: var(--text); margin: 0; word-break: break-word; }
.card-desc {
  color: var(--text-2); font-size: 13px; line-height: 1.5; margin: 6px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }

/* Badge'ler */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.prio-low    { background: #f1f5f9; color: #475569; }
.prio-medium { background: #eff6ff; color: #1d4ed8; }
.prio-high   { background: #fff7ed; color: #c2410c; }
.prio-urgent { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.badge-date { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-date.late { background: #fef2f2; color: var(--red); border-color: #fecaca; }
.badge-notes { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

.tag {
  font-size: 11px; color: var(--text-2);
  background: #f1f2f5; border-radius: 6px; padding: 2px 7px;
}
.tag.has-color {
  background: color-mix(in srgb, var(--tc) 16%, #fff);
  color: color-mix(in srgb, var(--tc), #111 30%);
}

/* Boş durum */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 26px 8px; color: var(--text-3); text-align: center;
}
.empty-state .empty-ico { width: 28px; height: 28px; opacity: .45; stroke-width: 1.6; }
.empty-state p { margin: 0; font-size: 13px; }
.column-body.has-cards .empty-state { display: none; }

/* SortableJS placeholder */
.sortable-ghost {
  opacity: .4;
  border: 1px dashed var(--brand) !important;
  background: var(--brand-soft) !important;
}

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(16,18,29,.42);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
#confirmModal { z-index: 60; }   /* onay her zaman diğer modalların üstünde */
.modal {
  width: 100%; max-width: 560px;
  background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.98); transition: transform .18s ease;
  overflow: hidden;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-sm { max-width: 400px; }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2);
}
.foot-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* Form alanları */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--red); }
.field .hint { color: var(--text-3); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: #c7cad2; }
/* Modal select'leri de özel chevron'lu */
.field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Notlar */
.notes-section { border-top: 1px dashed var(--border); padding-top: 16px; }
.note-add { display: flex; gap: 8px; }
.note-add input { flex: 1; }
.note-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.note-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
}
.note-item .note-body { font-size: 13px; color: var(--text); word-break: break-word; }
.note-item .note-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.note-del {
  background: transparent; border: none; cursor: pointer; color: var(--text-3);
  font-size: 13px; padding: 2px 6px; border-radius: 6px; flex-shrink: 0;
}
.note-del:hover { background: #fdeaea; color: var(--red); }
.note-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 10px; }

/* ---------------- Toast ---------------- */
.toast-wrap {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: #fff;
  padding: 12px 16px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500;
  min-width: 220px; max-width: 360px;
  animation: toastIn .22s ease;
}
.toast.success { background: #14532d; }
.toast.error   { background: #7f1d1d; }
.toast .t-ico { width: 17px; height: 17px; }
.toast .toast-action {
  margin-left: 6px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; border-radius: 8px;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.toast .toast-action:hover { background: rgba(255,255,255,.22); }

/* ---------------- Yönetim listeleri (çöp kutusu + etiketler) ---------------- */
.manage-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 60vh; overflow-y: auto;
}
.manage-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
}
.mi-main { flex: 1; min-width: 0; }
.mi-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mi-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.mi-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mi-actions .btn { padding: 6px 10px; font-size: 12px; }
.manage-empty { color: var(--text-3); text-align: center; padding: 26px 10px; font-size: 13px; }

/* Etiket satırı: renk + ad + sayı */
.tag-color {
  width: 30px; height: 30px; padding: 0; flex-shrink: 0;
  border: 1px solid var(--border-2); border-radius: 8px;
  background: none; cursor: pointer;
}
.tag-color::-webkit-color-swatch-wrapper { padding: 3px; }
.tag-color::-webkit-color-swatch { border: none; border-radius: 5px; }
.tag-color::-moz-color-swatch { border: none; border-radius: 5px; }
.tag-name {
  flex: 1; min-width: 0; padding: 7px 10px; font: inherit; font-size: 13px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tag-name:hover { border-color: #c7cad2; }
.tag-usage { font-size: 12px; color: var(--text-3); flex-shrink: 0; min-width: 54px; text-align: right; }

/* ---------------- Alt görevler (checklist) ---------------- */
.badge-sub { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-sub.done { background: #ecfdf5; color: var(--green); border-color: #bbf7d0; }

.subtasks-section { border-top: 1px dashed var(--border); padding-top: 16px; }
.sub-progress { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.subbar { height: 6px; background: var(--surface-2); border-radius: 20px; overflow: hidden; margin: 4px 0 12px; }
.subbar-fill { height: 100%; background: var(--green); border-radius: 20px; width: 0; transition: width .3s ease; }
.sub-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.sub-item { display: flex; align-items: center; gap: 9px; padding: 7px 4px; }
/* .field input kuralını ezmek için .sub-item ile özgüllük artırıldı */
.sub-item .sub-check {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; margin: 0; padding: 0; flex-shrink: 0; cursor: pointer;
  border: 1.5px solid var(--border-2); border-radius: 6px; background-color: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.sub-item .sub-check:hover { border-color: #b9bcc6; }
.sub-item .sub-check:checked {
  background-color: var(--green); border-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 13px;
}
.sub-title { flex: 1; min-width: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.sub-item.done .sub-title { text-decoration: line-through; color: var(--text-3); }
.sub-del { background: transparent; border: none; cursor: pointer; color: var(--text-3); padding: 2px 6px; border-radius: 6px; flex-shrink: 0; display: grid; place-items: center; }
.sub-del:hover { background: #fdeaea; color: var(--red); }
.sub-del svg { width: 14px; height: 14px; }

/* ---------------- Satır içi başlık düzenleme ---------------- */
.inline-edit {
  width: 100%; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid var(--brand); border-radius: 6px; padding: 2px 6px;
  background: var(--surface); color: var(--text); box-shadow: var(--ring);
}
.inline-edit:focus-visible { outline: none; }

/* ---------------- Boş durum CTA ---------------- */
.empty-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  padding: 6px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.empty-cta:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty-cta svg { width: 14px; height: 14px; }

/* ---------------- Insights (özet) ---------------- */
.insight-group { margin-bottom: 22px; }
.insight-group:last-child { margin-bottom: 0; }
.insight-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 0 0 12px; }
.insight-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.insight-label { width: 120px; font-size: 13px; color: var(--text-2); flex-shrink: 0; display: flex; align-items: center; gap: 7px; }
.insight-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 20px; overflow: hidden; }
.insight-fill { height: 100%; border-radius: 20px; background: var(--brand); transition: width .4s ease; }
.insight-val { width: 30px; text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.insight-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 10px; }
.toast.hide { animation: toastOut .22s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---------------- Bağlam menüsü (sağ tık / uzun basış) ---------------- */
.ctx-menu {
  position: fixed; z-index: 70; min-width: 210px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; animation: ctxIn .12s ease; user-select: none;
}
@keyframes ctxIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.ctx-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  text-align: left; background: transparent; border: none;
  padding: 8px 10px; border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--text); cursor: pointer;
}
.ctx-item:hover { background: var(--surface-2); }
.ctx-item.active { font-weight: 600; }
.ctx-item.danger { color: var(--red); }
.ctx-item.danger:hover { background: #fdeaea; }
.ctx-item .ctx-ico { width: 16px; height: 16px; color: var(--text-2); }
.ctx-item.danger .ctx-ico { color: var(--red); }
.ctx-item .ctx-check { margin-left: auto; color: var(--brand); width: 14px; height: 14px; }
.ctx-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ctx-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.ctx-label {
  font-size: 11px; color: var(--text-3); padding: 8px 10px 4px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}

/* Yardımcı: gizli */
[hidden] { display: none !important; }

/* Skeleton yükleme */
.card.skeleton { height: 78px; background: linear-gradient(90deg,#eee,#f6f6f8,#eee); background-size: 200% 100%; animation: sk 1.1s infinite; pointer-events: none; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .board {
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px;
  }
  .column { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .container { padding: 16px 14px 50px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .board { grid-auto-columns: 86%; }
  .grid-3 { grid-template-columns: 1fr; }
  .modal-overlay { padding: 16px 10px; }
}
