@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #fcfcfb;
  --border: #e8e7e3;
  --soft: rgba(20, 20, 25, 0.05);
  --soft-2: rgba(20, 20, 25, 0.03);
  --col-bg: rgba(20, 20, 25, 0.028);
  --text: #18181b;
  --text-2: #67676e;
  --text-3: #9c9ca4;
  --accent: #5b5bd6;
  --accent-hover: #4949c4;
  --accent-soft: #ededfc;
  --accent-text: #3d3d9e;
  --ai-bg: #fbfaff;
  --ai-border: #dedbf7;
  --green: #1d9e75;
  --green-soft: #e2f5ec;
  --green-text: #0b5c44;
  --amber: #b97a17;
  --amber-soft: #faeeda;
  --amber-text: #6b420d;
  --red: #e0524f;
  --red-soft: #fcebea;
  --red-text: #8a2523;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 25, 0.04), 0 2px 8px rgba(20, 20, 25, 0.04);
  --shadow-md: 0 2px 4px rgba(20, 20, 25, 0.05), 0 8px 24px rgba(20, 20, 25, 0.08);
  --shadow-lg: 0 8px 16px rgba(20, 20, 25, 0.08), 0 24px 56px rgba(20, 20, 25, 0.16);
}

[data-theme="dark"] {
  --bg: #101014;
  --surface: #17171c;
  --surface-2: #1c1c22;
  --border: #26262e;
  --soft: rgba(255, 255, 255, 0.07);
  --soft-2: rgba(255, 255, 255, 0.04);
  --col-bg: rgba(255, 255, 255, 0.035);
  --text: #ececf1;
  --text-2: #a4a4af;
  --text-3: #6c6c78;
  --accent: #7a7af0;
  --accent-hover: #8f8ff5;
  --accent-soft: #26264a;
  --accent-text: #b9baf8;
  --ai-bg: #1a1a24;
  --ai-border: #32325a;
  --green: #34b58a;
  --green-soft: #102c23;
  --green-text: #7fd9b9;
  --amber: #d99a3d;
  --amber-soft: #2d2213;
  --amber-text: #e9bc76;
  --red: #e56865;
  --red-soft: #331a19;
  --red-text: #f0a19f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4), 0 24px 56px rgba(0, 0, 0, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
::selection { background: var(--accent-soft); }

/* ---------- Topbar ---------- */
.topbar {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #8b5bd6);
  color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent);
}
.top-right { display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--soft-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 6px 12px; color: var(--text-3); width: 220px; font-size: 13px; cursor: pointer;
  transition: border-color 0.15s ease;
}
.search:hover { border-color: var(--text-3); }
.search input { border: none; background: transparent; outline: none; font-size: 13px; width: 100%; color: var(--text); }
.search .kbd {
  margin-left: auto; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; background: var(--surface);
  flex-shrink: 0; font-family: inherit;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; cursor: pointer; flex-shrink: 0;
  transition: transform 0.15s ease;
}
.avatar:hover { transform: scale(1.06); }
.profile-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 5px; border: 1px solid var(--border); border-radius: 24px;
  background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text);
  box-shadow: var(--shadow-sm); flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.profile-btn:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.profile-btn:active { transform: scale(0.98); }
.profile-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.profile-btn .avatar:hover { transform: none; }
.profile-btn i { font-size: 15px; color: var(--text-3); }
.profile-btn.active i { color: var(--accent-text); }
@media (max-width: 700px) { .profile-btn .p-name { display: none; } }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  position: relative; flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--soft-2); border-color: var(--text-3); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red); border: 1.5px solid var(--surface);
}

/* ---------- Layout ---------- */
body { padding-left: 60px; }
.layout { display: flex; width: 100%; }
.sidebar { display: none; }

/* ---------- İkon rayı ---------- */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: 60px; z-index: 60;
  background: #17171c; display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 5px;
}
.rail .mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; flex-shrink: 0; overflow: hidden;
  transition: transform 0.15s ease;
}
.rail .mark:hover { transform: scale(1.07); }
.rail .mark img { width: 100%; height: 100%; display: block; border-radius: 11px; }
.rail > a:not(.mark) {
  width: 42px; height: 42px; border-radius: 12px; color: #9a9aa8;
  font-size: 19px; display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.rail > a:not(.mark):hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail > a.on { background: rgba(122, 122, 240, 0.22); color: #b9baf8; }
.rail .b {
  position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px;
  border-radius: 8px; background: var(--accent); color: #fff;
  font-size: 9.5px; font-weight: 600; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; font-variant-numeric: tabular-nums;
}
.rail .div { width: 26px; height: 1px; background: rgba(255, 255, 255, 0.12); margin: 5px 0; flex-shrink: 0; }
.rail .sp { flex: 1; }
.rail a[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 12px); top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: #26262e; color: #f2f2f7;
  font-size: 12px; font-weight: 500; letter-spacing: 0;
  padding: 6px 11px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 120;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.rail a[data-tip]::before {
  content: "";
  position: absolute; left: calc(100% + 6px); top: 50%;
  transform: translateY(-50%) translateX(-6px);
  border: 5px solid transparent; border-right-color: #26262e;
  opacity: 0; pointer-events: none; z-index: 120;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.rail a[data-tip]:hover::after, .rail a[data-tip]:hover::before {
  opacity: 1; transform: translateY(-50%) translateX(0);
}
.page-crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
}
.page-crumb i { font-size: 17px; color: var(--text-2); }
.sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar a i { font-size: 17px; }
.sidebar a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.sidebar a:hover:not(.active) { background: var(--soft-2); color: var(--text); }
.sidebar .section { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 18px 12px 6px; font-weight: 600; }
.sidebar a .cnt {
  margin-left: auto; font-size: 11px; color: var(--text-3);
  background: var(--soft); border-radius: 10px; padding: 0 7px; font-variant-numeric: tabular-nums;
}
.main { flex: 1; padding: 24px 28px 48px; min-width: 0; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.page-head p { color: var(--text-2); margin-top: 3px; font-size: 13px; }
.head-actions { display: flex; gap: 8px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 500; font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--soft-2); border-color: var(--text-3); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--red-text); border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 13px; font-family: inherit; background: var(--surface); color: var(--text); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 70px; }
.field .hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-row { display: flex; gap: 10px; }
.form-row .field { flex: 1; }

/* ---------- Cards & metrics ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; letter-spacing: -0.01em; }
.card h3 i { font-size: 17px; color: var(--text-2); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.metric {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.metric:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.metric .label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.metric .value { font-size: 26px; font-weight: 650; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric .delta { font-size: 12px; margin-top: 2px; color: var(--text-3); }
.delta.up { color: var(--green); }
.delta.warn { color: var(--amber); }

/* ---------- Kanban ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; align-items: start; }
.col { background: var(--col-bg); border-radius: var(--radius-lg); padding: 10px; }
.col.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.col-head .name { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.col-head .name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.col[data-status="todo"] .name::before { background: var(--text-3); }
.col[data-status="doing"] .name::before { background: var(--amber); }
.col[data-status="done"] .name::before { background: var(--green); }
.col-head .count { font-size: 12px; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; }
.task {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.task:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--text-3); }
.task.dragging { opacity: 0.5; }
.task.pr-urgent { box-shadow: inset 3px 0 0 var(--red), var(--shadow-sm); }
.task.pr-high { box-shadow: inset 3px 0 0 var(--amber), var(--shadow-sm); }
.task .title { font-size: 13px; margin-bottom: 8px; line-height: 1.45; }
.task .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task .meta .spacer { flex: 1; }
.task.completed .title { text-decoration: line-through; color: var(--text-3); }
.task .done-at { font-size: 11px; color: var(--green); display: flex; align-items: center; gap: 4px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.tag.urgent { background: var(--red-soft); color: var(--red-text); }
.tag.high { background: var(--amber-soft); color: var(--amber-text); }
.tag.normal { background: var(--soft); color: var(--text-2); }
.tag.low { background: var(--green-soft); color: var(--green-text); }
.tag.gmail { background: var(--green-soft); color: var(--green-text); }
.tag.due { background: var(--amber-soft); color: var(--amber-text); }
.tag.overdue { background: var(--red-soft); color: var(--red-text); }
.tag.project { background: var(--accent-soft); color: var(--accent-text); }
.mini-avatar {
  width: 22px; height: 22px; border-radius: 50%; font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.add-task {
  width: 100%; border: 1px dashed var(--border); background: transparent;
  border-radius: var(--radius); padding: 8px; color: var(--text-3); font-size: 12px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.add-task:hover { background: var(--surface); color: var(--text-2); }

/* ---------- AI panel ---------- */
.ai-panel { margin-bottom: 20px; border: 1px solid var(--ai-border); background: var(--ai-bg); }
.ai-panel h3 i { color: var(--accent); }
.ai-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius); margin-bottom: 8px;
  font-size: 13px; line-height: 1.5;
}
.ai-item:last-child { margin-bottom: 0; }
.ai-item.suggest { background: var(--accent-soft); color: var(--accent-text); }
.ai-item.mail { background: var(--amber-soft); color: var(--amber-text); }
.ai-item.info { background: var(--green-soft); color: var(--green-text); }
.ai-item i { font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.ai-item .actions { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.ai-item button { border: none; border-radius: 7px; padding: 5px 10px; font-size: 12px; font-weight: 500; cursor: pointer; }
.ai-item.suggest button.yes { background: var(--accent); color: #fff; }
.ai-item.mail button.yes { background: var(--amber); color: #fff; }
.ai-item.info button.yes { background: var(--green); color: #fff; }
.ai-item button.no { background: var(--soft); color: inherit; }

/* ---------- AI asistan kısayolu ---------- */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; width: 52px; height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #8b5bd6);
  color: #fff; border: none;
  font-size: 22px; cursor: pointer; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 55%, transparent); }

/* ---------- Komut paleti ---------- */
.cmdk-backdrop {
  position: fixed; inset: 0; background: rgba(10, 10, 14, 0.45); z-index: 150;
  display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  backdrop-filter: blur(2px);
}
.cmdk-backdrop.open { display: flex; }
.cmdk {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.cmdk .cmdk-input {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); color: var(--text-3);
}
.cmdk .cmdk-input input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; font-family: inherit; color: var(--text);
}
.cmdk .cmdk-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.cmdk .cmdk-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
}
.cmdk .cmdk-item i { font-size: 16px; flex-shrink: 0; }
.cmdk .cmdk-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cmdk .cmdk-item .sub { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; }
.cmdk .cmdk-item.sel { background: var(--accent-soft); }
.cmdk .cmdk-item.sel .lbl { color: var(--accent-text); }
.cmdk .cmdk-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }
.cmdk .cmdk-hint {
  display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-3);
}
.cmdk .cmdk-hint b { font-weight: 600; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 10, 14, 0.45); z-index: 100;
  display: none; align-items: flex-start; justify-content: center; padding: 60px 16px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.modal-head .close { cursor: pointer; color: var(--text-3); background: none; border: none; font-size: 18px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; }
.modal-foot .right { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Görev detayı ---------- */
.modal.modal-lg { max-width: 940px; }
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 264px; }
.td-left { padding: 20px 22px; min-width: 0; }
.td-title {
  width: 100%; border: 1px solid transparent; background: transparent; color: var(--text);
  font-family: inherit; font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  padding: 6px 8px; margin-left: -8px; border-radius: 8px; outline: none;
}
.td-title:hover { border-color: var(--border); }
.td-title:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.td-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.td-meta .m { display: flex; flex-direction: column; gap: 3px; }
.td-meta label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--text-3); }
.td-meta select, .td-meta input {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 12.5px;
  font-family: inherit; background: var(--surface); color: var(--text); outline: none; width: 100%;
}
.td-meta select:focus, .td-meta input:focus { border-color: var(--accent); }
.td-sec { margin-bottom: 16px; }
.td-sec > .h {
  font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.td-sec > .h i { font-size: 14px; }
.td-sec > .h .act { margin-left: auto; }
.td-desc {
  width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px;
  font-size: 13px; font-family: inherit; background: var(--surface); color: var(--text);
  outline: none; resize: vertical; min-height: 56px; line-height: 1.55;
}
.td-desc:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.td-atts { display: flex; gap: 8px; flex-wrap: wrap; }
.att-card {
  width: 92px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--surface); position: relative; cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.att-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.att-card .thumb {
  height: 60px; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--soft-2); color: var(--text-3); font-size: 22px;
}
.att-card .nm {
  font-size: 10.5px; padding: 4px 6px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.att-card .rm {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px;
  border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center;
}
.att-card:hover .rm { display: flex; }
.att-add {
  width: 92px; height: 84px; border: 1px dashed var(--border); border-radius: 10px;
  background: transparent; color: var(--text-3); cursor: pointer; font-size: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.att-add:hover { background: var(--soft-2); color: var(--text-2); }
.att-add i { font-size: 18px; }
.td-input-row { display: flex; gap: 8px; margin-top: 8px; }
.td-input-row input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 13px; font-family: inherit; background: var(--surface); color: var(--text); outline: none;
}
.td-input-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.td-ai { border: 1px solid var(--ai-border); background: var(--ai-bg); border-radius: 12px; padding: 12px; }
.td-ai-log { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.td-ai-log:empty { margin-bottom: 0; }
.td-ai-log .q { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 10px 10px 4px 10px; padding: 7px 11px; font-size: 12.5px; max-width: 88%; }
.td-ai-log .a { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 10px 10px 10px 4px; padding: 8px 12px; font-size: 12.5px; line-height: 1.55; max-width: 92%; overflow-x: auto; }
.td-ai-log .a.thinking { color: var(--text-3); font-style: italic; }
.td-side {
  background: var(--soft-2); border-left: 1px solid var(--border);
  padding: 18px 16px; border-radius: 0 16px 16px 0;
  display: flex; flex-direction: column; min-height: 100%;
}
.td-side .h { font-size: 12px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.td-side .h i { font-size: 14px; }
.td-side .h .act { margin-left: auto; }
.td-rem-form { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 12px; }
.td-rem-form .row { display: flex; gap: 6px; margin-bottom: 8px; }
.td-rem-form input { flex: 1; border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px; font-size: 12px; font-family: inherit; background: var(--surface); color: var(--text); outline: none; min-width: 0; }
.td-timeline { flex: 1; overflow-y: auto; max-height: 420px; }
.tl-item { position: relative; padding: 0 0 16px 24px; }
.tl-item::before {
  content: ""; position: absolute; left: 5px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--text-3);
}
.tl-item::after {
  content: ""; position: absolute; left: 9px; top: 16px; bottom: -2px; width: 1px; background: var(--border);
}
.tl-item:last-child::after { display: none; }
.tl-item.t-created::before { border-color: var(--accent); }
.tl-item.t-status::before { border-color: var(--green); }
.tl-item.t-comment::before { border-color: var(--amber); }
.tl-item.t-file::before { border-color: var(--accent); }
.tl-item.t-reminder::before { border-color: var(--amber); }
.tl-item.t-ai::before { border-color: var(--accent); }
.tl-item .tx { font-size: 12px; color: var(--text); line-height: 1.45; }
.tl-item .wh { font-size: 11px; color: var(--text-3); margin-top: 2px; }

@media (max-width: 900px) {
  .td-grid { grid-template-columns: 1fr; }
  .td-side { border-left: none; border-top: 1px solid var(--border); border-radius: 0 0 16px 16px; }
}

/* ---------- Tables & lists ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); padding: 8px 12px; border-bottom: 1px solid var(--border); font-weight: 600; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--soft-2); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.empty { text-align: center; color: var(--text-3); padding: 32px 16px; font-size: 13px; }
.empty i { font-size: 28px; display: block; margin-bottom: 8px; }

/* ---------- Charts ---------- */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 110px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; justify-content: flex-end; height: 100%; }
.bar .fill { width: 100%; border-radius: 5px 5px 0 0; background: #5dcaa5; min-height: 2px; transition: height 0.3s ease; }
.bar .day { font-size: 11px; color: var(--text-3); }
.bar .val { font-size: 11px; color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-row { display: flex; align-items: center; gap: 20px; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.legend .item { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Gelen kutusu & yorumlar ---------- */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; margin-left: 6px; padding: 0 5px;
  background: var(--accent); color: #fff; border-radius: 10px;
  font-size: 10.5px; font-weight: 600; vertical-align: 1px; font-variant-numeric: tabular-nums;
}
.inb-item {
  display: flex; gap: 12px; padding: 13px 14px; border-radius: var(--radius);
  cursor: pointer; align-items: flex-start; margin-bottom: 4px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.inb-item:hover { background: var(--soft-2); border-color: var(--border); }
.inb-item.unread { background: var(--accent-soft); }
.inb-item.unread:hover { border-color: var(--accent); }
.inb-item .type-ico {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.inb-item .type-ico.assign { background: var(--accent-soft); color: var(--accent-text); }
.inb-item .type-ico.comment { background: var(--amber-soft); color: var(--amber-text); }
.inb-item .type-ico.mention { background: var(--green-soft); color: var(--green-text); }
.inb-item.unread .type-ico.assign { background: var(--surface); }
.inb-item .body { flex: 1; min-width: 0; }
.inb-item .head-line { font-size: 13px; color: var(--text); line-height: 1.5; }
.inb-item .head-line b { font-weight: 600; }
.inb-item .snippet {
  font-size: 12.5px; color: var(--text-2); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.inb-item .when { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; margin-top: 2px; }
.inb-item .dot-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 8px; }
.inb-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 20px; padding: 5px 13px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--text-3); }
.chip.active { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.mention { color: var(--accent-text); background: var(--accent-soft); border-radius: 5px; padding: 0 4px; font-weight: 500; }
.comment-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.comment-row:last-child { border-bottom: none; }
.comment-row .c-body { flex: 1; min-width: 0; }
.comment-row .c-head { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.comment-row .c-head b { color: var(--text); font-weight: 600; }
.comment-row .c-text { font-size: 13px; line-height: 1.55; color: var(--text-2); word-wrap: break-word; }
.comments-box { max-height: 200px; overflow-y: auto; margin-bottom: 8px; }

/* ---------- Gelen kutusu (kenar çubuğu bölümü) ---------- */
.inb-sec {
  margin-top: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.inb-sec.active { border-color: var(--accent); }
.inb-sec-head {
  display: flex; width: 100%; align-items: center; gap: 8px;
  padding: 10px 12px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text);
  transition: background 0.15s ease;
}
.inb-sec-head:hover { background: var(--soft-2); }
.inb-sec-head > i:first-child { font-size: 16px; color: var(--text-2); }
.inb-sec-head .chev { margin-left: auto; color: var(--text-3); font-size: 14px; transition: transform 0.2s ease; }
.inb-sec.open .inb-sec-head .chev { transform: rotate(180deg); }
.inb-sec-list { border-top: 1px solid var(--border); padding: 4px; animation: sec-in 0.15s ease; }
@keyframes sec-in { from { opacity: 0; } to { opacity: 1; } }
.inb-sec-list .inb-item { padding: 8px; margin-bottom: 0; gap: 9px; }
.inb-sec-list .inb-item .type-ico { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
.inb-sec-list .inb-item .head-line { font-size: 12px; line-height: 1.4; }
.inb-sec-list .inb-item .snippet { font-size: 11.5px; -webkit-line-clamp: 1; margin-top: 1px; }
.inb-sec-list .inb-item .dot-unread { margin-top: 6px; width: 7px; height: 7px; }
.inb-sec-empty { text-align: center; color: var(--text-3); font-size: 12px; padding: 14px 8px; }
.inb-sec-empty i { font-size: 15px; vertical-align: -3px; margin-right: 4px; }
.inb-sec-foot {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px; font-size: 12px; font-weight: 500; color: var(--accent-text);
  border-top: 1px solid var(--border); margin-top: 2px;
  transition: background 0.15s ease;
}
.inb-sec-foot:hover { background: var(--accent-soft); }
.inb-sec-foot i { font-size: 12px; }

/* ---------- Misc ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.badge { font-size: 11px; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.badge.on { background: var(--green-soft); color: var(--green-text); }
.badge.off { background: var(--soft); color: var(--text-2); }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  font-size: 13px; transition: transform 0.25s ease; z-index: 200; max-width: 90vw;
  box-shadow: var(--shadow-md);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.footer { text-align: center; color: var(--text-3); font-size: 12px; padding: 24px; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
  .search { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
