/* ============================================================
   Wegs Görev Takip — arayüz stilleri
   Tasarım ilkesi: yoğun bilgi, net hizalama, sakin renk.
   Renk yalnızca durum/uyarı taşır; dekoratif renk kullanılmaz.
   ============================================================ */

:root {
  /* Nötr skala (açık tema) */
  --c0: #ffffff;
  --c1: #f7f8fa;
  --c2: #eef0f4;
  --c3: #e2e5eb;
  --c4: #cbd0d9;
  --c6: #8b93a3;
  --c8: #4a515e;
  --c9: #1c2027;

  --bg: var(--c1);
  --surface: var(--c0);
  --surface-2: var(--c1);
  --line: var(--c3);
  --line-soft: var(--c2);
  --text: var(--c9);
  --text-2: var(--c8);
  --muted: var(--c6);

  --accent: #2f5fe0;
  --accent-hover: #2851c7;
  --accent-soft: #e8eefc;
  --accent-line: #b9cbf6;

  --danger: #cf2f34;
  --danger-soft: #fdeaea;
  --warn: #b26a00;
  --warn-soft: #fdf1dc;
  --ok: #12805c;
  --ok-soft: #e2f5ee;

  --r: 8px;
  --r-lg: 10px;
  --sidebar-w: 252px;
  --shadow-1: 0 1px 2px rgba(20, 25, 35, .05);
  --shadow-2: 0 4px 16px -6px rgba(20, 25, 35, .18);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --c0: #12151b;
    --c1: #0d1015;
    --c2: #1a1f27;
    --c3: #262c37;
    --c4: #3a424f;
    --c6: #8a93a3;
    --c8: #c2c9d4;
    --c9: #eef1f6;

    --bg: var(--c1);
    --surface: var(--c0);
    --surface-2: var(--c2);
    --line: var(--c3);
    --line-soft: #1e232c;

    --accent: #5b8cff;
    --accent-hover: #7ba2ff;
    --accent-soft: #16223c;
    --accent-line: #2c4272;

    --danger: #ff6b6b;
    --danger-soft: #33191c;
    --warn: #e0a044;
    --warn-soft: #2f2413;
    --ok: #3fc79a;
    --ok-soft: #11302a;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 8px 24px -10px rgba(0, 0, 0, .7);
  }
}

html[data-theme="dark"] {
  --c0: #12151b;
  --c1: #0d1015;
  --c2: #1a1f27;
  --c3: #262c37;
  --c4: #3a424f;
  --c6: #8a93a3;
  --c8: #c2c9d4;
  --c9: #eef1f6;

  --bg: var(--c1);
  --surface: var(--c0);
  --surface-2: var(--c2);
  --line: var(--c3);
  --line-soft: #1e232c;

  --accent: #5b8cff;
  --accent-hover: #7ba2ff;
  --accent-soft: #16223c;
  --accent-line: #2c4272;

  --danger: #ff6b6b;
  --danger-soft: #33191c;
  --warn: #e0a044;
  --warn-soft: #2f2413;
  --ok: #3fc79a;
  --ok-soft: #11302a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 8px 24px -10px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.011em; }
p { margin: 0; }
input, select, textarea, button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.danger { color: var(--danger); }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.pad { padding: 14px 16px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.right { display: flex; justify-content: flex-end; gap: 8px; }
.link { color: var(--accent); font-size: 12.5px; font-weight: 500; }
.link:hover { text-decoration: underline; }
.sep { color: var(--c4); margin: 0 2px; }

/* ---------- İskelet ---------- */

body.app { display: flex; min-height: 100vh; }
.scrim { display: none; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--accent), #7b5bd6);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.brand-mark.lg { width: 44px; height: 44px; font-size: 21px; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; line-height: 1.25; }
.brand-text small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.sidebar-close { display: none; margin-left: auto; }

.nav-scroll { flex: 1; overflow-y: auto; padding: 0 10px 10px; }
.nav-new {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 14px;
}
.nav-new kbd {
  font: 600 10.5px var(--mono); background: rgba(255, 255, 255, .22);
  border-radius: 4px; padding: 1px 5px;
}

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 6px; color: var(--text-2);
  font-size: 13.5px; font-weight: 450; line-height: 1.3;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 16px; text-align: center; font-size: 12px; opacity: .75; flex: none; }
.nav-item.active .ico { opacity: 1; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count {
  font: 500 11.5px/1 var(--mono); color: var(--muted);
  background: var(--surface-2); border-radius: 20px; padding: 3px 6px; min-width: 20px; text-align: center;
}
.nav-item.active .nav-count { background: rgba(255, 255, 255, .5); color: var(--accent); }
.pip {
  font: 700 10.5px/1 var(--mono); color: #fff; background: var(--danger);
  border-radius: 20px; padding: 3px 5px; min-width: 17px; text-align: center;
}
.nav-sep {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600;
  color: var(--muted); padding: 16px 9px 5px;
}

.sidebar-foot { border-top: 1px solid var(--line); padding: 8px 10px 10px; }
.badge {
  margin-left: auto; background: var(--danger); color: #fff;
  border-radius: 20px; padding: 2px 7px; font: 700 11px/1.3 var(--mono);
}
.user-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.user-chip { flex: 1; display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 6px; min-width: 0; }
.user-chip:hover { background: var(--surface-2); }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-meta strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px; background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 17px; line-height: 1.3; }
.topbar-title p { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topbar-search input { width: 220px; }
.menu-btn { display: none; }

.content { padding: 20px 24px 40px; width: 100%; max-width: 1560px; }

/* ---------- Düğmeler ---------- */

.btn, .btn-ghost, .btn-danger {
  border: 1px solid var(--line); background: var(--surface);
  padding: 7px 13px; border-radius: var(--r); cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--text);
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
}
.btn:hover, .btn-ghost:hover { background: var(--surface-2); border-color: var(--c4); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.full { width: 100%; }

.icon-btn {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  font-size: 14px; line-height: 1; padding: 6px 7px; border-radius: 6px;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Paneller ---------- */

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 16px; box-shadow: var(--shadow-1);
  overflow: hidden;
}
.group-head {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.group-head h2 { font-size: 13.5px; font-weight: 600; }
.group-head .link { margin-left: auto; }
.count {
  font: 500 11.5px/1 var(--mono); color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 20px; padding: 3px 8px;
}
.panel.danger-edge { border-color: var(--danger); }
.panel.danger-edge .group-head { background: var(--danger-soft); border-bottom-color: transparent; }
.panel.danger-edge .group-head h2 { color: var(--danger); }

.flash {
  margin: 12px 24px -4px; padding: 10px 14px; border-radius: var(--r);
  background: var(--warn-soft); border: 1px solid var(--warn); color: var(--warn);
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
}
.flash.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.flash .icon-btn { margin-left: auto; color: inherit; }
.alert {
  background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger);
  padding: 10px 13px; border-radius: var(--r); font-size: 13.5px; margin-bottom: 14px;
}
.hint { font-size: 12.5px; color: var(--muted); }
.field-note { font-size: 12px; color: var(--muted); margin-top: -4px; }

/* ---------- Form öğeleri ---------- */

.form { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.form label, .side-fields label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12px; color: var(--muted); font-weight: 500;
}
label.inline { flex-direction: row !important; align-items: center; gap: 8px; color: var(--text); font-weight: 400; font-size: 13.5px; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=search], input[type=file], input:not([type]), select, textarea {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--text); width: 100%; outline: none;
  font-size: 13.5px; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type=color] {
  padding: 2px; height: 34px; width: 100%; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); cursor: pointer;
}
textarea { resize: vertical; font-family: inherit; line-height: 1.55; }
select { cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-add {
  display: flex; gap: 8px; align-items: center; padding: 11px 16px;
  border-top: 1px solid var(--line-soft); flex-wrap: wrap; background: var(--surface-2);
}
.inline-add input[name=title] { flex: 1; min-width: 200px; }
.inline-add select, .inline-add input[type=file] { width: auto; }
.sel { flex-direction: row !important; align-items: center; gap: 6px; white-space: nowrap; }
.sel select { width: auto; }

fieldset.chips {
  border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px;
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0;
}
fieldset.chips legend { font-size: 11.5px; color: var(--muted); padding: 0 4px; font-weight: 500; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); cursor: pointer; user-select: none;
}
.chip:has(input:checked) {
  border-color: var(--c, var(--accent));
  background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent);
  font-weight: 500;
}
.chip input { accent-color: var(--c, var(--accent)); margin: 0; }
.colors { gap: 8px; }
.color-opt input { position: absolute; opacity: 0; }
.color-opt span {
  width: 24px; height: 24px; border-radius: 50%; background: var(--c);
  display: block; border: 2px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px var(--line);
}
.color-opt input:checked + span { border-color: var(--surface); box-shadow: 0 0 0 2px var(--text); }

/* ---------- Rozetler ---------- */

.avatar {
  display: inline-grid; place-items: center; border-radius: 50%;
  color: #fff; font-weight: 600; flex: none; letter-spacing: -.02em;
  box-shadow: 0 0 0 1.5px var(--surface);
}
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.md { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 52px; height: 52px; font-size: 19px; }
.avatar.empty { background: var(--c3) !important; color: var(--muted); }

.pill {
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 500;
}
.pill.st-in_progress { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.pill.st-review { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.st-done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.st-cancelled { background: var(--surface-2); color: var(--muted); border-color: var(--line); text-decoration: line-through; }

.pri { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.pri-low { background: var(--c4); }
.pri-medium { background: #4b7bec; }
.pri-high { background: #e8873a; }
.pri-urgent { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.tag {
  font-size: 11px; padding: 1px 7px; border-radius: 5px; white-space: nowrap; font-weight: 500;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}
.ref {
  font: 600 11px/1.5 var(--mono); color: var(--c, var(--muted));
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
  background: color-mix(in srgb, var(--c, var(--c4)) 11%, transparent);
}
.ref-inline { font: 600 11.5px var(--mono); color: var(--accent); }
.due {
  font: 500 12px/1.5 var(--mono); color: var(--text-2); white-space: nowrap;
  padding: 1px 6px; border-radius: 5px;
}
.due.overdue { color: var(--danger); background: var(--danger-soft); font-weight: 600; }
.due.today { color: var(--warn); background: var(--warn-soft); font-weight: 600; }
.due.none { color: var(--c4); }
.mini { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* Atama zinciri */
.chain { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.chain-arrow { color: var(--c4); font-size: 11px; }
.chain-self, .chain-none { font-size: 11.5px; color: var(--muted); margin-left: 3px; }
.chain-none { font-style: italic; }

/* ---------- İstatistik kutuları ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 13px 15px; display: flex; flex-direction: column; gap: 1px; box-shadow: var(--shadow-1);
  transition: border-color .12s;
}
.stat:hover { border-color: var(--c4); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-num { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 11.5px; color: var(--muted); }
.stat.danger { border-color: var(--danger); }
.stat.danger .stat-num, .stat.danger .stat-label { color: var(--danger); }
.stat.warn .stat-num { color: var(--warn); }
.stat.ok .stat-num { color: var(--ok); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 16px; align-items: start; }

/* ---------- Görev listesi (sütunlu) ---------- */

.tlist-head, .trow {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 118px 108px 92px;
  align-items: center;
}
.tlist-head {
  padding: 7px 14px 7px 0;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}
.trow { border-bottom: 1px solid var(--line-soft); padding-right: 14px; min-height: 46px; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--surface-2); }
.trow.is-late { box-shadow: inset 2px 0 0 var(--danger); }
.trow.is-done .trow-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--c4); }

.cell-check { display: grid; place-items: center; }
.check {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--c4);
  background: transparent; cursor: pointer; padding: 0; position: relative; transition: .12s;
}
.check:hover { border-color: var(--ok); background: var(--ok-soft); }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on::after {
  content: "✓"; color: #fff; font-size: 11px; font-weight: 700;
  position: absolute; inset: 0; display: grid; place-items: center;
}

.cell-main { display: flex; flex-direction: column; gap: 2px; padding: 7px 12px 7px 0; min-width: 0; }
.trow-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.trow-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main:hover .trow-title { color: var(--accent); }
.trow-sub { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-left: 14px; }
.cell-assign { display: flex; justify-content: flex-start; }
.cell-status, .cell-due { display: flex; justify-content: flex-start; }

/* ---------- Araç çubuğu / filtreler ---------- */

.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 12px;
}
.filters select, .filters input { width: auto; }
.f-search { flex: 1; min-width: 180px; }

.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: space-between; margin-bottom: 12px;
}
.toolbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.summary { font-size: 12.5px; color: var(--muted); }
.summary b { color: var(--text); font-weight: 600; }
.summary b.danger { color: var(--danger); }
.summary b.warn { color: var(--warn); }

.chip-row { display: flex; gap: 5px; flex-wrap: wrap; }
.fchip {
  font-size: 12.5px; padding: 4px 11px; border-radius: 20px; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
}
.fchip:hover { border-color: var(--c4); }
.fchip.on { background: var(--text); border-color: var(--text); color: var(--surface); }

/* ---------- Pano ---------- */

.board {
  display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 12px; align-items: start;
}
.bcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.bcol-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 13px;
  border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600;
}
.bcol-name { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.bcol-name.st-todo { color: var(--muted); }
.bcol-name.st-in_progress { color: var(--accent); }
.bcol-name.st-review { color: var(--warn); }
.bcol-name.st-done { color: var(--ok); }
.bcol-body { padding: 9px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.bcol-body.drag-over { background: var(--accent-soft); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 11px; display: flex; flex-direction: column; gap: 7px;
  cursor: grab; box-shadow: var(--shadow-1);
}
.card:hover { border-color: var(--c4); }
.card.dragging { opacity: .4; }
.card.is-late { box-shadow: inset 2px 0 0 var(--danger), var(--shadow-1); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 13px; line-height: 1.45; }
.card-title:hover { color: var(--accent); }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board-hint { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ---------- Projeler ---------- */

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 15px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow-1);
}
.pcard.archived { opacity: .55; }
.pcard-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard-head h3 { font-size: 14.5px; }
.pcard-stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.pcard-stats b { color: var(--text); font-weight: 600; }
.pcard-foot { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; padding-top: 4px; }
.pbar { height: 5px; background: var(--c2); border-radius: 20px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 20px; transition: width .3s; }
.pedit { border-top: 1px solid var(--line); margin-top: 8px; }
.danger-form { display: flex; gap: 8px; padding: 0 16px 14px; align-items: center; }

.plist { display: flex; flex-direction: column; }
.prow {
  display: grid; grid-template-columns: 9px minmax(0, 1fr) 64px 30px; gap: 10px; align-items: center;
  padding: 9px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.prow:last-child { border-bottom: 0; }
.prow:hover { background: var(--surface-2); }
.pdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcount { font: 500 12px var(--mono); color: var(--muted); text-align: right; }

/* ---------- Görev detayı ---------- */

.task-page { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 16px; align-items: start; }
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--accent); }
.title-form { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.title-input {
  font-size: 20px; font-weight: 650; letter-spacing: -.02em;
  border-color: transparent; background: transparent; padding: 6px 9px;
}
.title-input:hover { border-color: var(--line); background: var(--surface); }

.assign-card {
  display: grid; grid-template-columns: 1fr 28px 1fr minmax(190px, auto);
  gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 13px 16px; margin-bottom: 16px; box-shadow: var(--shadow-1);
}
.assign-side { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.assign-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-arrow { font-size: 16px; color: var(--c4); text-align: center; }
.assign-meta {
  display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted);
  border-left: 1px solid var(--line-soft); padding-left: 14px;
}
.assign-meta strong { color: var(--text); font-weight: 500; }
/* Durum renkleri, .assign-meta strong kuralını geçebilmeli */
.assign-meta strong.danger { color: var(--danger); font-weight: 600; }
.assign-meta strong.ok { color: var(--ok); }

.side-form, .side-block { margin-bottom: 14px; }
.side-fields { padding: 13px 15px; display: flex; flex-direction: column; gap: 11px; }
.watchers { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }

.files { display: flex; flex-direction: column; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.file:last-of-type { border-bottom: 0; }
.file-thumb {
  width: 42px; height: 42px; border-radius: 6px; overflow: hidden; flex: none;
  background: var(--surface-2); display: grid; place-items: center; border: 1px solid var(--line);
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb.ext { font: 600 9px var(--mono); color: var(--muted); letter-spacing: .04em; }
.file-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.file-meta strong { font-size: 13px; font-weight: 500; }
.file-meta small { color: var(--muted); font-size: 11.5px; }

.comments { display: flex; flex-direction: column; }
.comment { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; }
.comment-head strong { font-size: 13px; }
.comment-head small { color: var(--muted); font-size: 11.5px; }
.comment-head form { margin-left: auto; }
.comment-text { font-size: 13.5px; line-height: 1.6; word-wrap: break-word; color: var(--text-2); }
.comment-form { border-top: 1px solid var(--line-soft); background: var(--surface-2); }

.feed { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.feed li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; }
.feed li > div { min-width: 0; }
.feed p { line-height: 1.45; }
.feed strong { font-weight: 600; }
.feed small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }

.notif li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.notif li:last-child { border-bottom: 0; }
.notif li.unread { background: var(--accent-soft); }
.notif-body { flex: 1; min-width: 0; }
.notif-body p { font-size: 13.5px; }
.notif-body small { color: var(--muted); font-size: 11.5px; }

/* ---------- Takım ---------- */

.wl-head, .wl-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(90px, 2fr) 66px 84px 76px 84px;
  align-items: center; gap: 10px;
}
.wl-head {
  padding: 7px 16px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line-soft);
}
.wl-row { padding: 9px 16px; border-bottom: 1px solid var(--line-soft); }
.wl-row:last-child { border-bottom: 0; }
.wl-row:hover { background: var(--surface-2); }
.wl-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wl-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.wl-name strong { font-size: 13.5px; font-weight: 600; }
.wl-name small { color: var(--muted); font-size: 11.5px; }
.wl-bar { height: 7px; background: var(--c2); border-radius: 20px; overflow: hidden; }
.wl-bar i { display: block; height: 100%; min-width: 3px; border-radius: 20px; }
.wl-num { font: 500 13px var(--mono); color: var(--muted); }
.wl-num b { color: var(--text); font-weight: 600; }
.wl-num.danger b { color: var(--danger); }
.wl-num.ok b { color: var(--ok); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--line);
  font-weight: 600; white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: center; font-family: var(--mono); font-size: 12.5px; }
.table .num b { font-weight: 600; }
.matrix .who { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.matrix .arrow { color: var(--c4); text-align: center; padding: 0; }

/* ---------- Kullanıcı yönetimi ---------- */

.ulist { display: flex; flex-direction: column; }
.urow { border-bottom: 1px solid var(--line-soft); }
.urow:last-child { border-bottom: 0; }
.urow.inactive { opacity: .55; }
.urow-head { display: flex; align-items: center; gap: 11px; padding: 11px 16px; flex-wrap: wrap; }
.urow-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.urow-name strong { font-size: 13.5px; }
.urow-name small { color: var(--muted); font-size: 11.5px; }
.uedit { border-top: 1px dashed var(--line); background: var(--surface-2); }

/* ---------- Boş durumlar ---------- */

.empty-state {
  padding: 30px 20px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.empty-state .empty-title { font-size: 14px; font-weight: 600; color: var(--text); }
.empty-state p { font-size: 13px; max-width: 46ch; }
.empty-state .btn { margin-top: 8px; }
.empty-state.big { padding: 70px 20px; }
.err-code { font-size: 44px; font-weight: 700; color: var(--c4); letter-spacing: -.03em; }

/* ---------- Kip penceresi ---------- */

.modal {
  position: fixed; inset: 0; background: rgba(15, 20, 30, .5);
  display: grid; place-items: center; z-index: 100; padding: 18px;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  width: min(600px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-2);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { font-size: 15px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* ---------- Giriş ---------- */

body.bare { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--bg); }
.login-wrap { width: min(384px, 100%); }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 26px; box-shadow: var(--shadow-2);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 20px; text-align: center; }
.login-brand h1 { font-size: 19px; margin-top: 8px; }
.login-brand p { color: var(--muted); font-size: 13px; }
.login-card .form { padding: 0; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

/* ---------- Duyarlı ---------- */

@media (max-width: 1180px) {
  .cols, .task-page { grid-template-columns: 1fr; }
  .assign-card { grid-template-columns: 1fr 24px 1fr; }
  .assign-meta { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line-soft); padding: 10px 0 0; flex-direction: row; flex-wrap: wrap; gap: 14px; }
}

@media (max-width: 980px) {
  .tlist-head { display: none; }
  .trow { grid-template-columns: 32px minmax(0, 1fr) auto; row-gap: 4px; padding: 8px 12px 8px 0; }
  .cell-assign { grid-column: 3; }
  .cell-status { grid-column: 2 / 4; padding-left: 14px; }
  .cell-due { grid-column: 2 / 4; padding-left: 14px; margin-top: -22px; justify-content: flex-end; }
  .wl-head { display: none; }
  .wl-row { grid-template-columns: minmax(140px, 1fr) 56px 56px 56px 56px; }
  .wl-bar { display: none; }
}

@media (max-width: 820px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; transform: translateX(-100%);
    transition: transform .18s ease; box-shadow: var(--shadow-2);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .scrim {
    display: block; position: fixed; inset: 0; z-index: 50; background: rgba(10, 15, 25, .45);
  }
  .sidebar-close, .menu-btn { display: block; }
  .content { padding: 14px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .topbar-search { display: none; }
  .topbar-title h1 { font-size: 15.5px; }
  .topbar-title p { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .bcol { min-width: 84vw; scroll-snap-align: start; }
  .flash { margin: 10px 14px -2px; }
  .toolbar { gap: 8px; }
  .assign-card { grid-template-columns: 1fr; gap: 10px; }
  .assign-arrow { display: none; }
}

/* ---------- Geriye dönük sınıf adları (diğer sayfalar) ---------- */
.panel-head {
  display: flex; align-items: center; gap: 9px; padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft); font-size: 13.5px; font-weight: 600;
}
.list-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: space-between; margin-bottom: 12px;
}
.list-tools { display: flex; align-items: center; gap: 10px; }
.profile-avatar { display: flex; justify-content: center; padding: 4px 0 10px; }
.side-block h3 { font-size: 12px; color: var(--muted); font-weight: 600; }
.notif { display: flex; flex-direction: column; }
