* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body.drawer-open,
body.sidebar-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* WCAG 2.4.7 — klavyeyle gezinirken odak her zaman belirgin görünür. */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.hidden {
  display: none !important;
}

.role-hidden {
  display: none !important;
}

.view-hidden {
  display: none !important;
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--sidebar);
}

.auth-card {
  width: min(440px, 100%);
  border-radius: 16px;
  padding: 28px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.auth-brand {
  color: var(--text);
  margin-bottom: 22px;
}

.auth-brand .brand-mark {
  color: #ffffff;
  background: var(--primary-solid);
}

.auth-brand p {
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.auth-tab {
  border: 0;
  border-radius: 6px;
  padding: 10px;
  color: var(--text-secondary);
  background: transparent;
  font-weight: 700;
}

.auth-tab.active {
  color: var(--primary);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form-intro {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.auth-message.success {
  color: var(--success);
}

.auth-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  font-size: 20px;
}

.connection-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.connection-dot.online { background: var(--success); }
.connection-dot.syncing { background: var(--warning); }
.connection-dot.error { background: var(--danger); }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  color: #ffffff;
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: var(--sidebar);
  background: var(--surface);
  font-weight: 800;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 26px;
}

.brand p {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 13px;
}

.profile-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.profile-panel label {
  color: #dbe4ef;
  font-size: 13px;
}

.profile-panel select {
  width: 100%;
}

.profile-panel select:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.role-badge {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  color: #cdd5e6;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost-button,
.primary-button,
.danger-button,
.small-button {
  border: 0;
  border-radius: 8px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item {
  padding: 12px 14px;
  color: #dbe4ef;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.primary-button {
  padding: 11px 16px;
  color: #ffffff;
  background: var(--primary-solid);
  font-weight: 700;
}

.primary-button:hover {
  background: var(--primary-solid-hover);
}

.ghost-button {
  padding: 10px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.danger-button {
  padding: 8px 10px;
  color: #ffffff;
  background: var(--danger-solid);
}

.small-button {
  padding: 8px 10px;
  color: var(--text);
  background: var(--surface-soft);
}

main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h2,
.topbar p {
  margin: 0;
}

.topbar h2 {
  margin-top: 5px;
  font-size: 30px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
  border-top: 3px solid var(--primary);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
}

.content-grid,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 18px;
  margin-top: 18px;
}

.stack-layout {
  display: grid;
  align-self: start;
  gap: 18px;
}

.history-panel {
  margin-top: 18px;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header h3,
.panel-header span {
  margin: 0;
}

.panel-header h3 {
  font-size: 18px;
}

.panel-header span {
  color: var(--muted);
  font-size: 13px;
}

.form-panel {
  display: grid;
  gap: 14px;
  align-self: start;
}

.form-panel h3 {
  margin: 0 0 4px;
}

/* Proje yönetimi: Trello tarzı, ama renk sayısı azaltıldı — aynı varlık türü aynı rengi paylaşır
   (Proje = mavi, Kategori = yeşil, Davet/Üyelik = amber) */
#projectsView .panel {
  border-top-width: 4px;
}

#projectForm, #projectsListPanel { background: var(--accent-blue-soft); border-top-color: var(--accent-blue); }
#categoryForm, #categoriesListPanel { background: var(--accent-green-soft); border-top-color: var(--accent-green); }
#projectInviteForm, #projectMembershipPanel { background: var(--accent-amber-soft); border-top-color: var(--accent-amber); }

label {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: var(--surface);
}

select[multiple] {
  min-height: 96px;
  padding-top: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

select[multiple] option {
  padding: 6px 8px;
}

textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.filter-clear {
  min-height: 42px;
}

.project-list,
.category-list,
.task-list,
.score-list,
.mini-list,
.history-list {
  display: grid;
  gap: 12px;
}

.kanban-panel {
  margin-top: 18px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.kanban-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.kanban-column-header h4 {
  margin: 0;
  font-size: 15px;
}

.kanban-column-header span {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.kanban-column-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border-radius: 0 0 8px 8px;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.kanban-column-body.drop-target {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.project-card,
.category-card,
.task-card,
.score-card,
.mini-card,
.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.task-card-compact {
  padding: 12px;
  box-shadow: none;
}

.task-card-compact p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-card-compact .card-actions {
  gap: 6px;
}

.task-card.dragging {
  opacity: 0.55;
  transform: scale(0.99);
}

.project-card h4,
.category-card h4,
.task-card h4,
.mini-card h4 {
  margin: 0;
  font-size: 16px;
}

.project-card p,
.category-card p,
.task-card p,
.mini-card p,
.history-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.project-progress {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.project-progress strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.category-card,
.category-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.color-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line);
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.task-meta,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-soft);
}
.badge-category { gap: 6px; }
.badge-color-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.checkbox-field { display: flex !important; flex-direction: row; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.checkbox-field input { width: auto; min-height: 0; accent-color: var(--primary); }
.project-card.archived { opacity: .68; }
.archived-badge { color: var(--muted); background: var(--surface-soft); }

.badge.status-tamamlandi {
  color: var(--success);
  background: var(--success-soft);
}

.badge.status-bekliyor {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge.priority-yuksek {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge.priority-orta {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge.priority-dusuk {
  color: var(--primary);
  background: var(--primary-soft);
}

.badge.due-overdue {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge.due-soon {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge.due-complete {
  color: var(--success);
  background: var(--success-soft);
}

.score-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.score-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.score-card strong {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.role-inline {
  display: inline-block;
  margin-left: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 9px;
  font-weight: 800;
  vertical-align: middle;
}

.role-action { margin-top: 10px; }

.empty-state {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-soft);
}
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { margin-bottom: 5px; color: var(--text); }
.empty-state .small-button, .empty-state .primary-button { margin-top: 14px; }

.kanban-empty {
  padding: 14px;
  background: var(--surface);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(980px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h2,
.modal-header p {
  margin: 0;
}

.modal-header h2 {
  margin-top: 5px;
  font-size: 26px;
}

.task-detail-body {
  display: grid;
  gap: 16px;
}

.task-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
}

.detail-block {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-soft);
}

.detail-block h3 {
  margin: 0;
  font-size: 17px;
}

.detail-block p {
  margin: 0;
  color: var(--text);
}

.detail-meta,
.comment-list {
  display: grid;
  gap: 10px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-list div {
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.comment-item p {
  margin: 8px 0;
}

.comment-item span {
  color: var(--muted);
  font-size: 12px;
}

.comment-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 13px 15px;
  color: #ffffff;
  background: #262b26;
  box-shadow: 0 18px 45px rgba(20, 18, 12, 0.28);
  animation: toast-in 180ms ease-out;
}

.toast.success { border-left-color: #4ade80; }
.toast.error { border-left-color: #f87171; }

/* Silme sonrası "Geri al" bildirimi; normal bildirimin üstünde, ayrı bir bölgede durur. */
.undo-toast-region { bottom: 86px; }

.undo-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.toast-action {
  pointer-events: auto;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 6px 12px;
  color: #ffffff;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toast-action:hover { background: rgba(255, 255, 255, 0.14); }
.toast-action:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(300px, 88vw);
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 20px 0 45px rgba(15, 23, 42, 0.25);
  }

  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: grid; place-items: center; }

  .stats-grid,
  .content-grid,
  .split-layout,
  .filters,
  .kanban-board,
  .task-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main {
    padding: 18px;
  }

  .topbar,
  .panel-header,
  .history-item,
  .form-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    display: grid;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .modal-header,
  .detail-list {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Docket 2026 product redesign — Kağıt ve Mürekkep (rota ve raf paletinden ilham) */
:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --surface: #fffaf1;
  --surface-soft: #ece4d2;
  --surface-raised: #fffdf6;
  --text: #151515;
  --text-secondary: #3d372c;
  --text-tertiary: #8a8172;
  --muted: #666052;
  --line: #ded5c2;
  --line-soft: #ece5d6;
  --line-strong: #c7bba1;
  --primary: #21473a;
  --primary-dark: #17352b;
  --primary-soft: #e9efe9;
  --success: #21473a;
  --success-soft: #e9efe9;
  --warning: #83612e;
  --warning-soft: #f4ecd9;
  --danger: #a94432;
  --danger-soft: #f3e6e1;
  --note: #83612e;
  --note-soft: #f4ecd9;
  --accent-blue: #3d5a75;
  --accent-blue-soft: #e6ebee;
  --accent-green: #21473a;
  --accent-green-soft: #e9efe9;
  --accent-amber: #83612e;
  --accent-amber-soft: #f4ecd9;
  --accent-purple: #5c3f52;
  --accent-purple-soft: #efe7ec;
  --focus-ring: rgba(33, 71, 58, 0.22);
  --input-focus-ring: rgba(33, 71, 58, 0.14);
  --primary-tint-bg: rgba(33, 71, 58, 0.07);
  --primary-tint-border: rgba(33, 71, 58, 0.22);
  --primary-tint-strong: rgba(33, 71, 58, 0.28);
  --bg-glow: rgba(180, 138, 69, 0.1);
  --topbar-bg: rgba(244, 240, 232, 0.86);
  --panel-translucent: rgba(255, 250, 241, 0.92);
  --kanban-card-bg: rgba(255, 250, 241, 0.85);
  /* Düz dolgu (solid-fill) buton rengi: --primary/--danger koyu temada metin/ikon için
     parlatılıyor ama üzerine beyaz metin koyunca kontrast düşüyor — bu ikisi ayrık kalır. */
  --primary-solid: #21473a;
  --primary-solid-hover: #17352b;
  --danger-solid: #a94432;
  --sidebar: #1b201d;
  --sidebar-soft: #262b26;
  --shadow: 0 18px 55px rgba(31, 28, 22, 0.13);
  --shadow-lg: 0 26px 70px rgba(31, 28, 22, 0.2);
  --radius: 12px;
}

/* "Sistem" tercihi: kullanıcı açıkça bir tema seçmediyse (data-theme yok) işletim
   sistemi tercihini izle. Açık seçim varsa (data-theme="dark"/"light") aşağıdaki
   [data-theme] blokları önceliklidir. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121513;
    --surface: #1b201d;
    --surface-soft: #201c17;
    --surface-raised: #262019;
    --text: #f4efe5;
    --text-secondary: #d9d2c4;
    --text-tertiary: #9d9384;
    --muted: #b9b1a2;
    --line: #302c26;
    --line-soft: #262320;
    --line-strong: #453f34;
    --primary: #79a58d;
    --primary-dark: #93bda6;
    --primary-soft: #1c2b23;
    --success: #79a58d;
    --success-soft: #1c2b23;
    --warning: #d5aa62;
    --warning-soft: #2c2618;
    --danger: #e2836d;
    --danger-soft: #2c1c18;
    --note: #d5aa62;
    --note-soft: #2c2618;
    --accent-blue: #7fa3c2;
    --accent-blue-soft: #1c262e;
    --accent-green: #79a58d;
    --accent-green-soft: #1c2b23;
    --accent-amber: #d5aa62;
    --accent-amber-soft: #2c2618;
    --accent-purple: #b48aa3;
    --accent-purple-soft: #2b2027;
    --focus-ring: rgba(121, 165, 141, 0.32);
    --input-focus-ring: rgba(121, 165, 141, 0.22);
    --primary-tint-bg: rgba(121, 165, 141, 0.14);
    --primary-tint-border: rgba(121, 165, 141, 0.38);
    --primary-tint-strong: rgba(121, 165, 141, 0.42);
    --bg-glow: rgba(213, 170, 98, 0.12);
    --topbar-bg: rgba(18, 21, 19, 0.88);
    --panel-translucent: rgba(27, 32, 29, 0.92);
    --kanban-card-bg: rgba(27, 32, 29, 0.82);
    --primary-solid: #21473a;
    --primary-solid-hover: #17352b;
    --danger-solid: #a94432;
    --sidebar: #0e100e;
    --sidebar-soft: #181b17;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.55);
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121513;
  --surface: #1b201d;
  --surface-soft: #201c17;
  --surface-raised: #262019;
  --text: #f4efe5;
  --text-secondary: #d9d2c4;
  --text-tertiary: #9d9384;
  --muted: #b9b1a2;
  --line: #302c26;
  --line-soft: #262320;
  --line-strong: #453f34;
  --primary: #79a58d;
  --primary-dark: #93bda6;
  --primary-soft: #1c2b23;
  --success: #79a58d;
  --success-soft: #1c2b23;
  --warning: #d5aa62;
  --warning-soft: #2c2618;
  --danger: #e2836d;
  --danger-soft: #2c1c18;
  --note: #d5aa62;
  --note-soft: #2c2618;
  --accent-blue: #7fa3c2;
  --accent-blue-soft: #1c262e;
  --accent-green: #79a58d;
  --accent-green-soft: #1c2b23;
  --accent-amber: #d5aa62;
  --accent-amber-soft: #2c2618;
  --accent-purple: #b48aa3;
  --accent-purple-soft: #2b2027;
  --focus-ring: rgba(121, 165, 141, 0.32);
  --input-focus-ring: rgba(121, 165, 141, 0.22);
  --primary-tint-bg: rgba(121, 165, 141, 0.14);
  --primary-tint-border: rgba(121, 165, 141, 0.38);
  --primary-tint-strong: rgba(121, 165, 141, 0.42);
  --bg-glow: rgba(213, 170, 98, 0.12);
  --topbar-bg: rgba(18, 21, 19, 0.88);
  --panel-translucent: rgba(27, 32, 29, 0.92);
  --kanban-card-bg: rgba(27, 32, 29, 0.82);
  --primary-solid: #21473a;
  --primary-solid-hover: #17352b;
  --danger-solid: #a94432;
  --sidebar: #0e100e;
  --sidebar-soft: #181b17;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.55);
}

html { scroll-behavior: smooth; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  background:
    radial-gradient(circle at 80% -20%, var(--bg-glow), transparent 28%),
    var(--bg);
}

body.drawer-open { overflow: hidden; }

button, input, select, textarea { font: inherit; }
button { min-height: 40px; }

input,
select,
textarea {
  min-height: 44px;
  border-color: var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
  outline: 0;
}
input:disabled, select:disabled, textarea:disabled, button:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: var(--surface-soft);
}

/* Authentication */
.auth-screen {
  min-height: 100svh;
  padding: 32px;
  background: var(--sidebar);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.7fr);
  width: min(1180px, 100%);
  min-height: min(720px, calc(100svh - 64px));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(0,0,0,0.34);
}

.auth-showcase {
  position: relative;
  overflow: hidden;
  padding: 64px 56px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(121, 165, 141, 0.38), transparent 34%),
    linear-gradient(145deg, #14201b 0%, #1c3327 55%, #3f7660 125%);
}

.auth-showcase::after {
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  content: "";
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  padding: 7px 12px;
  color: #dcefe4;
  background: rgba(255,255,255,0.07);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.showcase-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8bf0c6;
  box-shadow: 0 0 0 4px rgba(139,240,198,0.1);
}

.auth-showcase h2 {
  max-width: 580px;
  margin: 28px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.auth-showcase > p {
  max-width: 520px;
  margin: 0;
  color: #c7c2b4;
  font-size: 16px;
  line-height: 1.7;
}

.showcase-preview {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-top: 38px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 25px 70px rgba(0,0,0,0.28);
  transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
}

.preview-top { display: flex; gap: 5px; height: 28px; padding: 10px 12px; background: #f6f3ec; }
.preview-top span { width: 7px; height: 7px; border-radius: 50%; background: #ded7c8; }
.preview-layout { display: grid; grid-template-columns: 76px 1fr; min-height: 230px; }
.preview-nav { display: grid; align-content: start; gap: 12px; padding: 20px 13px; background: #1a1712; }
.preview-nav i { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.17); }
.preview-nav i:first-child { background: rgba(63,118,96,0.9); }
.preview-content { padding: 22px; background: #f8f5ee; }
.preview-title { width: 34%; height: 12px; border-radius: 8px; background: #2b2822; }
.preview-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 20px; }
.preview-stats i { height: 54px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface); }
.preview-board { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 12px; }
.preview-board i { height: 90px; border: 1px solid var(--line-soft); border-radius: 9px; background: linear-gradient(#fffdf6 0 38%,#efe9dc 38% 45%,#fffdf6 45%); }
.showcase-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 25px; color: #d6d0c1; font-size: 12px; font-weight: 600; }

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  border-radius: 0;
  padding: 54px 52px;
  box-shadow: none;
}

.auth-brand { margin-bottom: 32px; }
.auth-brand .brand-mark { color: #fff; background: linear-gradient(135deg, #3f7660, #17352b); }
.auth-tabs { border-radius: 11px; background: var(--surface-soft); }
.auth-tab { border-radius: 8px; }
.auth-tab.active { color: var(--primary); box-shadow: 0 1px 3px rgba(24,26,32,.08); }
.auth-form { gap: 17px; }
.auth-form .primary-button { width: 100%; margin-top: 4px; }

/* Application shell */
.sidebar {
  gap: 18px;
  padding: 22px 16px 16px;
  background: var(--sidebar);
}

/* Masaüstü (>980px): menü sabit durur; logonun yanındaki düğmeyle simge şeridine daraltılır
   (tercih cihazda saklanır). Mobilde menü eskisi gibi ☰ ile açılan bir çekmecedir. */
.sidebar-collapse-toggle { display: none; }

@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
    transition: grid-template-columns 200ms ease;
  }
  .app-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  main { grid-column: 2; }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar-collapse-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    padding: 0;
    color: #a39a89;
    background: transparent;
    cursor: pointer;
  }
  .sidebar-collapse-toggle:hover { color: #fff; background: rgba(255,255,255,.07); }
  .sidebar-collapse-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms ease; }

  .sidebar-collapsed .sidebar { padding-inline: 12px; }
  .sidebar-collapsed .sidebar .brand { flex-direction: column; gap: 12px; padding: 0; }
  .sidebar-collapsed .sidebar-collapse-toggle { margin-left: 0; }
  .sidebar-collapsed .sidebar-collapse-toggle svg { transform: rotate(180deg); }
  .sidebar-collapsed .brand-text,
  .sidebar-collapsed .workspace-pill,
  .sidebar-collapsed .profile-panel,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-footnote { display: none; }
  .sidebar-collapsed .nav-item { position: relative; justify-content: center; padding: 9px; }
  .sidebar-collapsed .nav-item > span:not(.nav-badge) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
  }
  .sidebar-collapsed .nav-badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }
}

.sidebar .brand { padding: 0 8px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #3f7660 0%, #17352b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 22px rgba(33,71,58,.3);
}
.brand-mark img { display: block; width: 100%; height: 100%; border-radius: inherit; }
.brand h1 { font-family: Georgia, "Times New Roman", serif; font-size: 19px; letter-spacing: -0.02em; }
.brand p { margin-top: 1px; color: var(--text-tertiary); font-size: 11px; }

.workspace-pill {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px;
  color: #fff;
  background: rgba(255,255,255,0.035);
}
.workspace-avatar, .avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg,#21473a,#4a8069);
  font-weight: 750;
  letter-spacing: -0.02em;
}
.workspace-avatar { width: 32px; height: 32px; font-size: 11px; }
.workspace-pill strong, .workspace-pill small { display: block; }
.workspace-pill strong { font-size: 12px; }
.workspace-pill small { margin-top: 1px; color: #9c9384; font-size: 10px; }
.workspace-chevron { color: #8f866f; }

.profile-panel {
  order: 4;
  gap: 7px;
  border-color: rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.035);
}
.profile-panel label { color: #948a79; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.profile-panel select { min-height: 38px; border-color: rgba(255,255,255,.08); color: #efe9dd; background: #262b26; }
.profile-panel .ghost-button { min-height: 34px; padding: 7px 9px; color: #a89e8f; background: transparent; font-size: 11px; text-align: left; }
.profile-panel .ghost-button:hover { color: #fff; background: rgba(255,255,255,.07); }

.nav-list { gap: 4px; }
.nav-label { padding: 10px 10px 6px; color: #7d7462; font-size: 10px; font-weight: 750; letter-spacing: .11em; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 11px;
  color: #a39a89;
  font-size: 13px;
  font-weight: 600;
}
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item[data-view="dashboard"] svg { fill: currentColor; stroke: none; }
.nav-item:hover { color: #f0ece1; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; border-color: rgba(121,165,141,.35); background: rgba(121,165,141,.16); }
.nav-badge { display: grid; place-items: center; min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 999px; color: #fff; background: var(--primary-solid); font-size: 11px; font-weight: 700; }
.sidebar-spacer { flex: 1; }
.sidebar-footnote { margin: 0; padding: 0 10px; color: #726a5c; font-size: 10px; }

main { padding: 0 36px 48px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 100px;
  margin: 0 -6px 22px;
  padding: 22px 6px 16px;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
}
.topbar h2 { margin-top: 3px; font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; }
.eyebrow { color: var(--text-secondary); font-size: 10px; letter-spacing: .07em; }
.page-subtitle { margin: 7px 0 0 !important; color: var(--muted); font-size: 13px; }
.connection-dot { margin-right: 6px; }

.primary-button {
  min-height: 42px;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--primary-solid);
  box-shadow: 0 6px 16px var(--focus-ring);
}
.primary-button:hover { background: var(--primary-solid-hover); box-shadow: 0 8px 22px var(--primary-tint-strong); }
.topbar-cta { display: inline-flex; align-items: center; gap: 8px; }
.topbar-cta span { font-size: 19px; font-weight: 400; line-height: 1; }

.panel, .stat-card {
  border-color: var(--line);
  background: var(--panel-translucent);
  box-shadow: var(--shadow);
}
.panel { padding: 20px; }
.panel-header { align-items: center; margin-bottom: 17px; }
.panel-header h3 { font-size: 16px; letter-spacing: -0.02em; }
.panel-header > span { border-radius: 999px; padding: 4px 8px; background: var(--surface-soft); font-size: 11px; }

/* Dashboard */
.dashboard-section-tabs { display: inline-flex; gap: 5px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.dashboard-section-tab { min-height: 38px; padding: 8px 15px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.dashboard-section-tab.active { color: var(--primary); background: var(--surface); box-shadow: 0 3px 10px rgba(24,26,32,.08); }
[data-dashboard-panel] + [data-dashboard-panel] { margin-top: 16px; }
.stats-grid { grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  border-top: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.stat-card:hover { border-color: var(--line-strong); box-shadow: 0 10px 30px rgba(24,26,32,.07); transform: translateY(-2px); }
.stat-card::after { position: absolute; right: -28px; bottom: -38px; width: 100px; height: 100px; border-radius: 50%; background: var(--card-glow, rgba(33,71,58,.06)); content: ""; }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.stat-icon { display: grid !important; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--icon-color, var(--primary)); background: var(--icon-bg, var(--primary-soft)); font-size: 14px !important; font-weight: 800; }
.stat-kicker { color: var(--text-secondary) !important; font-size: 9px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.stat-label { color: var(--muted) !important; font-size: 12px !important; font-weight: 600; }
.stat-card strong { position: relative; z-index: 1; margin-top: 3px; font-size: 29px; line-height: 1.15; letter-spacing: -.04em; }
.stat-card small { position: relative; z-index: 1; display: block; margin-top: 3px; color: var(--text-tertiary); font-size: 10px; }
.stat-done { --icon-color: var(--success); --icon-bg: var(--success-soft); --card-glow: color-mix(in srgb, var(--success) 6%, transparent); }
.stat-rate { --icon-color: var(--success); --icon-bg: var(--success-soft); --card-glow: color-mix(in srgb, var(--success) 6%, transparent); }
.stat-overdue { --icon-color: var(--danger); --icon-bg: var(--danger-soft); --card-glow: color-mix(in srgb, var(--danger) 6%, transparent); }
.stat-streak { --icon-color: var(--accent-amber); --icon-bg: color-mix(in srgb, var(--accent-amber) 12%, transparent); --card-glow: color-mix(in srgb, var(--accent-amber) 6%, transparent); }
.dashboard-focus-panel {
  margin-top: 16px;
  background:
    linear-gradient(180deg, var(--surface), var(--surface-soft)),
    radial-gradient(circle at top right, var(--bg-glow), transparent 42%);
}
.focus-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.focus-metric {
  display: grid;
  gap: 4px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: var(--surface);
}
.focus-metric strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.04em;
}
.focus-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.focus-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.focus-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
}
.focus-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.focus-card-top h4 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -.02em;
}
.focus-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.notification-list {
  display: grid;
  gap: 10px;
}
.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--surface);
}
.notification-main strong {
  display: block;
  font-size: 13px;
}
.notification-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.notification-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.notification-overdue {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.notification-due_today {
  border-color: var(--accent-blue);
  background: var(--accent-blue-soft);
}
.notification-due_soon {
  border-color: var(--warning);
  background: var(--warning-soft);
}
.notification-comment {
  border-color: var(--success);
  background: var(--success-soft);
}
.notification-history {
  border-color: var(--line);
  background: var(--surface-soft);
}
.notification-weekly_summary {
  border-color: var(--accent-amber);
  background: var(--accent-amber-soft);
}
.user-modal {
  width: min(620px, 96vw);
}
.user-form {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}
.user-form-preview {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-soft);
}
.user-form-preview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.user-form-preview strong {
  font-size: 14px;
}
.user-form-preview small {
  color: var(--muted);
  font-size: 11px;
}
.file-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.attachment-limits {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.section-hint {
  margin: 2px 0 10px;
  color: var(--text);
  font-size: 12px;
}

.attachment-error {
  margin: 0;
  color: var(--danger, #a94432);
  font-size: 0.85rem;
  font-weight: 600;
}
.attachment-dropzone {
  display: grid;
  place-items: center;
  min-height: 78px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 14px;
  color: var(--text-tertiary);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}
.attachment-dropzone:hover,
.task-drawer.attachment-drop-active .attachment-dropzone {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}
.attachment-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.attachment-status {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--surface);
}
.attachment-status-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.attachment-status-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}
.attachment-status-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #4a8069);
  transition: width 180ms ease;
}
.attachment-preview-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
}
.attachment-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-soft);
}
.attachment-thumb-text,
.attachment-item-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.attachment-preview-meta strong,
.attachment-item-body strong {
  display: block;
  font-size: 13px;
}
.attachment-preview-meta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.attachment-groups {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}
.detail-attachment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 14px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.detail-attachment-form label { min-width: 0; }
.detail-attachment-form input[type="file"] { width: 100%; margin-top: 7px; }
.detail-attachment-form .attachment-limits { grid-column: 1 / -1; margin: 0; }
.document-assistant {
  display: grid;
  gap: 14px;
  border-color: var(--primary-tint-border);
  background: linear-gradient(145deg, rgba(233, 239, 233, .75), var(--surface));
}
.assistant-document-picker { max-width: 520px; }
.assistant-status {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}
.assistant-status[data-state="ready"] { color: var(--success); background: rgba(33, 71, 58, .09); }
.assistant-status[data-state="failed"] { color: var(--danger); background: rgba(169, 68, 50, .08); }
.assistant-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.assistant-messages {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
}
.assistant-message {
  max-width: 86%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  background: var(--surface);
}
.assistant-message.user {
  justify-self: end;
  border-color: var(--primary-tint-border);
  border-radius: 14px 14px 4px 14px;
  background: var(--primary-tint-bg);
}
.assistant-message > span { color: var(--primary); font-size: 11px; font-weight: 800; }
.assistant-message p { margin: 6px 0 0; line-height: 1.55; }
.assistant-message small { display: block; margin-top: 8px; color: var(--muted); }
.assistant-chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.assistant-chat-form textarea { resize: vertical; }
@media (max-width: 640px) {
  .assistant-chat-form { grid-template-columns: 1fr; }
  .assistant-message { max-width: 94%; }
}
.attachment-group {
  display: grid;
  gap: 10px;
}
.attachment-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.attachment-group-header h4 {
  margin: 0;
  font-size: 13px;
  letter-spacing: -.01em;
}
.attachment-group-header span {
  display: inline-flex;
  align-items: center;
  min-width: 24px;
  min-height: 24px;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
}
.attachment-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.attachment-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
  cursor: pointer;
}
.attachment-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.attachment-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-soft);
}
.attachment-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.attachment-item-actions .danger-button {
  min-height: 36px;
  border-radius: 9px;
}
.attachment-preview-modal {
  width: min(860px, 96vw);
}
.attachment-preview-body {
  margin-top: 4px;
}
.attachment-preview-view {
  display: grid;
  gap: 18px;
}
.attachment-preview-hero {
  width: 100%;
  max-height: 62vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  object-fit: contain;
  background: var(--surface-soft);
}
.attachment-preview-icon {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: .08em;
}
.attachment-preview-details {
  display: grid;
  gap: 12px;
}
.attachment-preview-details strong {
  font-size: 18px;
}
.attachment-preview-details p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.attachment-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.checklist-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--surface);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.checklist-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}
.checklist-item.completed {
  opacity: .72;
}
.checklist-item.completed span {
  text-decoration: line-through;
}
.checklist-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.detail-section-header {
  margin-bottom: 0;
}
.content-grid { grid-template-columns: minmax(300px,.85fr) minmax(0,1.35fr); gap: 16px; }
.history-panel { margin-top: 16px; }
.score-card, .mini-card, .history-item { border-color: var(--line); border-radius: 11px; box-shadow: none; }
.score-card { padding: 14px; }
.score-card strong { font-size: 13px; }
.score-card p { font-size: 11px; }
.score-bar { height: 7px; background: var(--line-soft); }
.score-fill { background: linear-gradient(90deg,var(--primary),#4a8069); }
.mini-card { position: relative; padding: 14px 14px 14px 17px; }
.mini-card::before { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 4px; background: var(--primary); content: ""; }
.history-item { padding: 13px 14px; }

/* Projects */
.split-layout { gap: 16px; }
.form-panel { border-radius: 14px; }
.form-panel h3 { font-size: 16px; }
.project-card, .category-card {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.project-card:hover, .category-card:hover { border-color: var(--line-strong); box-shadow: 0 10px 28px rgba(24,26,32,.06); transform: translateY(-1px); }
.project-card h4, .category-card h4 { letter-spacing: -.015em; }
.project-card p, .category-card p { font-size: 12px; line-height: 1.55; }
.small-button { min-height: 36px; border-radius: 9px; color: var(--text-secondary); background: var(--surface-soft); font-size: 12px; font-weight: 600; }
.small-button:hover { color: var(--text); background: var(--line-soft); }
.danger-button { min-height: 36px; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 12px; font-weight: 650; }
.danger-button:hover { color: #fff; background: var(--danger-solid); }

/* Task workspace */
.view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.view-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.view-switcher { display: inline-flex; gap: 3px; border: 1px solid var(--line); border-radius: 11px; padding: 3px; background: var(--surface); }
.view-switch { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; border: 0; border-radius: 8px; padding: 7px 12px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 650; }
.view-switch:hover { color: var(--text); background: var(--surface-soft); }
.view-switch.active { color: var(--text); background: var(--surface-soft); box-shadow: inset 0 0 0 1px rgba(0,0,0,.025); }
.view-switch span { color: var(--primary); font-size: 14px; }

.quick-add-panel { padding: 10px 12px; border-radius: 13px; }
.quick-add-row { display: flex; align-items: center; gap: 10px; }
.quick-add-icon { flex: 0 0 auto; color: var(--primary); font-size: 15px; }
.quick-add-row input { flex: 1 1 auto; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.quick-add-row .primary-button { flex: 0 0 auto; min-height: 40px; padding: 0 16px; }
.quick-add-preview { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.quick-add-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 11px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 650; }

.quick-add-help-toggle { margin-top: 8px; padding: 8px 0 0; border-top: 1px solid var(--line); border-bottom: 0; font-size: 12px; }
.quick-add-help { margin-top: 8px; padding-top: 4px; }
.quick-add-help ul { display: grid; gap: 7px; margin: 0 0 10px; padding-left: 18px; }
.quick-add-help li { color: var(--text); font-size: 12.5px; line-height: 1.5; }
.quick-add-help code, .section-hint code {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--primary-dark);
  background: var(--surface);
  font-size: 11.5px;
}

.filters {
  grid-template-columns: minmax(240px,1fr) auto;
  gap: 8px;
  padding: 12px;
  border-radius: 13px;
}
.filters input, .filters select, .filter-clear { min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: 12px; }
.advanced-filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.advanced-filters.hidden, .task-advanced-fields.hidden, .filter-count.hidden { display: none; }
.board-filter-mode #statusFilter, .board-filter-mode #priorityFilter, .board-filter-mode #categoryFilter, .board-filter-mode #sortFilter { display: none; }
.filter-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; }
.filter-count { display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; color: #fff; background: var(--primary-solid); font-size: 11px; }
.filter-clear { white-space: nowrap; }
.task-content-layout { display: block; margin-top: 14px; }
.task-layout-panel { border-radius: 14px; }
.task-list { gap: 8px; }

.task-card {
  position: relative;
  border-color: var(--line);
  border-radius: 12px;
  padding: 15px 16px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.task-card:hover { border-color: var(--line-strong); box-shadow: 0 9px 26px rgba(24,26,32,.065); transform: translateY(-1px); }
.task-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-card-title { display: flex; align-items: center; min-width: 0; gap: 10px; }
.task-status-dot { width: 9px; height: 9px; flex: 0 0 auto; border: 2px solid currentColor; border-radius: 50%; color: var(--text-tertiary); }
.status-dot-tamamlandi { color: var(--success); background: var(--success); }
.task-card h4 { overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; letter-spacing: -.01em; }
.task-card > p { display: -webkit-box; max-width: 800px; margin-top: 7px; overflow: hidden; color: var(--text-tertiary); font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.priority-chip { flex: 0 0 auto; border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.priority-chip.priority-yuksek { color: var(--danger); background: var(--danger-soft); }
.priority-chip.priority-orta { color: var(--warning); background: var(--warning-soft); }
.priority-chip.priority-dusuk { color: var(--primary); background: var(--primary-soft); }
.task-context { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 11px; color: var(--text-tertiary); font-size: 10px; font-weight: 600; }
.task-project { color: var(--primary); }
.context-separator { color: var(--text-tertiary); }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.task-assignee { display: flex; align-items: center; min-width: 0; gap: 7px; color: var(--text-tertiary); font-size: 10px; font-weight: 600; }
.avatar-sm { width: 25px; height: 25px; border-radius: 8px; font-size: 8px; }
.task-signals { display: flex; align-items: center; gap: 7px; }
.due-signal, .score-signal { border-radius: 7px; padding: 4px 7px; color: var(--text-tertiary); background: var(--surface-soft); font-size: 9px; font-weight: 700; }
.due-signal.due-overdue { color: var(--danger); background: var(--danger-soft); }
.due-signal.due-soon { color: var(--warning); background: var(--warning-soft); }
.due-signal.due-complete { color: var(--success); background: var(--success-soft); }
.task-card .card-actions { align-items: center; margin-top: 12px; opacity: .78; transition: opacity 160ms ease; }
.task-card:hover .card-actions,
.task-card:focus-within .card-actions { opacity: 1; }
.move-button { border: 1px solid var(--line); color: var(--primary); font-size: 12px; }
.move-button:hover { color: #fff; background: var(--primary-solid); }
.action-detail { color: var(--primary); background: var(--primary-soft); }
.action-detail:hover { color: #fff; background: var(--primary-solid); }
.action-status { margin-right: auto; }
.icon-button { display: grid; place-items: center; min-width: 34px; min-height: 34px; border: 0; border-radius: 8px; color: var(--text-tertiary); background: transparent; font-size: 15px; }
.icon-button:hover { color: var(--text); background: var(--surface-soft); }
.danger-icon:hover { color: var(--danger); background: var(--danger-soft); }

/* Takvim */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 18px; margin-top: 18px; }
.calendar-panel { padding: 18px; }
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.calendar-nav { display: flex; align-items: center; gap: 10px; }
.calendar-nav h3 { min-width: 150px; margin: 0; font-size: 15px; text-align: center; text-transform: capitalize; }
.calendar-hint { margin: 8px 0 10px; color: var(--muted); font-size: 12px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 14px; color: var(--muted); font-size: 11px; font-weight: 600; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-dot-task { background: var(--primary); }
.legend-dot-note { background: var(--note); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar-day {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 92px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.calendar-day:hover { border-color: var(--primary); }
.calendar-day.drop-target { border-color: var(--primary); background: var(--primary-soft); }
.calendar-day-outside { background: var(--surface-soft); opacity: .55; }
.calendar-day-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.calendar-day-number { font-size: 12px; font-weight: 700; color: var(--muted); }
.calendar-day-today .calendar-day-number { color: var(--primary); }
.calendar-day-has-note { background: var(--note-soft); border-left: 3px solid var(--note); }
.calendar-day-has-tasks { background: var(--primary-soft); }
.calendar-day-selected { border-color: var(--primary-dark); box-shadow: 0 0 0 2px var(--primary-soft); }
.calendar-day-note-badge { position: absolute; top: 6px; right: 7px; font-size: 11px; line-height: 1; }
.calendar-day-tasks { display: flex; flex-direction: column; gap: 4px; }
.calendar-chip {
  overflow: hidden;
  width: 100%;
  padding: 4px 7px;
  border: 0;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  color: var(--text);
  background: var(--primary-soft);
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: grab;
}
.calendar-chip:hover { filter: brightness(0.97); }
.calendar-chip.dragging { opacity: .4; }
.calendar-chip.priority-yuksek { border-left-color: var(--danger); background: var(--danger-soft); }
.calendar-chip.priority-orta { border-left-color: var(--warning); background: var(--warning-soft); }
.calendar-chip.priority-dusuk { border-left-color: var(--success); background: var(--success-soft); }
.calendar-chip-done { color: var(--muted); text-decoration: line-through; }
.calendar-chip-mark { margin-right: 4px; font-weight: 800; opacity: .75; }
.calendar-chip-more { padding: 2px 4px; color: var(--muted); font-size: 10px; font-weight: 700; }

.day-planner-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.day-planner-panel h3 { margin: 0; font-size: 16px; text-transform: capitalize; }
.planner-task-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.planner-task-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.planner-task-item:hover { filter: brightness(0.97); }
.planner-task-item.priority-yuksek { border-left-color: var(--danger); background: var(--danger-soft); }
.planner-task-item.priority-orta { border-left-color: var(--warning); background: var(--warning-soft); }
.planner-task-item.priority-dusuk { border-left-color: var(--success); background: var(--success-soft); }
.planner-task-title { font-size: 13px; font-weight: 700; }
.planner-task-meta { color: var(--muted); font-size: 11px; }
.planner-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.planner-note-form { display: flex; flex-direction: column; gap: 10px; }
.planner-note-form small { color: var(--muted); font-size: 11px; }

/* Kanban */
.kanban-panel { margin-top: 14px; padding: 16px; }
.kanban-board { grid-template-columns: repeat(2,minmax(270px,1fr)); gap: 12px; }
.kanban-column { min-height: 360px; border-color: var(--line-soft); border-radius: 12px; background: var(--surface-soft); }
.kanban-column-header { border-bottom-color: var(--line-soft); padding: 11px 12px; }
.kanban-column-header h4 { font-size: 12px; }
.kanban-column-header span { min-width: 23px; min-height: 23px; color: var(--text-tertiary); background: var(--surface-soft); font-size: 10px; }
.kanban-column-body { gap: 8px; padding: 9px; }
.task-card-compact { padding: 12px; }
.task-card-compact .task-card-footer { padding-top: 9px; }
.task-card-compact .task-assignee > span:last-child, .task-card-compact .score-signal { display: none; }
.task-card-compact .card-actions { gap: 4px; }
.task-card-compact .action-detail { padding: 6px 8px; }
.task-card-compact .icon-button { min-width: 31px; min-height: 31px; }
.task-card-compact .danger-icon { display: none; }

/* Task drawer */
.task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 45;
  display: block;
  width: min(560px, 94vw);
  height: 100svh;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 24px 26px 32px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 220ms ease-out, visibility 220ms;
}
.task-drawer.open { transform: translateX(0); visibility: visible; }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 23px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.drawer-header h3 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.03em; }
.drawer-kicker { color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.drawer-close { display: grid; place-items: center; min-width: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-tertiary); background: var(--surface); font-size: 24px; font-weight: 300; }
.drawer-close:hover { color: var(--text); background: var(--surface-soft); }
.task-drawer > label, .task-drawer > .form-row, .task-drawer > .form-actions { margin-top: 15px; }
.task-advanced-fields > label, .task-advanced-fields > .form-row, .task-advanced-fields > .file-field, .task-advanced-fields > .attachment-dropzone, .task-advanced-fields > .subtask-field, .task-advanced-fields > .tag-field { display: block; margin-top: 15px; }
.details-toggle { width: 100%; margin-top: 14px; padding: 11px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--primary); background: transparent; text-align: left; font-weight: 750; cursor: pointer; }
.history-toggle { margin-top: 0; padding: 0; border: 0; font-size: 17px; }
.details-toggle span { float: right; transition: transform .2s ease; }
.details-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.detail-action-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.detail-action-row h3 { margin: 0; }
.detail-action-row label { width: min(210px, 100%); color: var(--muted); font-size: 11px; }
.detail-action-row select { margin-top: 5px; }
.membership-list { display: grid; gap: 9px; }
.membership-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.membership-item > div { display: grid; min-width: 0; margin-right: auto; gap: 3px; }
.membership-item strong, .membership-item span { overflow-wrap: anywhere; }
.membership-item > div span { color: var(--muted); font-size: 11px; }
.chip-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.subtask-field-label { display: block; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.subtask-draft-list { display: grid; gap: 8px; margin-top: 7px; }
.subtask-empty { padding: 12px; font-size: 12px; }
.subtask-draft-row { display: flex; align-items: center; gap: 8px; }
.subtask-draft-row .subtask-title-input { min-height: 38px; }
.subtask-draft-row.completed .subtask-title-input { color: var(--muted); text-decoration: line-through; }
.subtask-done-badge { display: grid; place-items: center; min-width: 22px; min-height: 22px; border-radius: 999px; color: #fff; background: var(--primary-solid); font-size: 12px; }
.subtask-add-row { display: flex; gap: 8px; margin-top: 8px; }
.subtask-add-row input { min-height: 38px; }
.tag-field-label { display: block; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 12px; font-weight: 700; }
.tag-chip button { display: grid; place-items: center; min-width: 20px; min-height: 20px; border: 0; border-radius: 999px; color: inherit; background: transparent; font-size: 13px; line-height: 1; cursor: pointer; }
.tag-chip button:hover { background: var(--primary-tint-strong); }
.tag-add-row { display: flex; gap: 8px; margin-top: 8px; }
.tag-add-row input { min-height: 38px; }
.task-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-badge { color: var(--primary); background: var(--primary-soft); }
.selection-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); cursor: pointer; }
.selection-chip.selected { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 44; background: rgba(18,20,27,.4); backdrop-filter: blur(2px); }

/* Modal and feedback */
.modal-backdrop { background: rgba(18,20,27,.56); backdrop-filter: blur(3px); }
.modal-panel { border: 1px solid rgba(255,255,255,.3); border-radius: 20px; box-shadow: var(--shadow-lg); }
.detail-block { border-color: var(--line); border-radius: 12px; background: var(--surface-soft); }
.comment-item { border-color: var(--line); border-radius: 10px; }
.mention {
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 700;
}
.mention-suggestions {
  display: grid;
  gap: 2px;
  margin-top: -6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.mention-suggestion {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 5px 9px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.mention-suggestion:hover { background: var(--surface-soft); }
.mention-suggestion.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.notification-mention {
  border-color: var(--accent-purple);
  background: var(--accent-purple-soft);
}
.toast { border-radius: 12px; background: #262b26; }

@media (max-width: 1240px) {
  .stats-grid { grid-template-columns: repeat(3,minmax(150px,1fr)); }
  .focus-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(3,minmax(150px,1fr)); }
}

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; width: min(520px,100%); }
  .auth-showcase { display: none; }
  .auth-card { min-height: 650px; border-radius: 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; width: min(280px,88vw); height: 100svh; }
  .sidebar-backdrop { display: block; }
  main { padding: 0 20px 90px; }
  .topbar { min-height: 92px; margin-bottom: 16px; padding-top: 18px; }
  .content-grid, .split-layout, .task-detail-grid, .calendar-layout { grid-template-columns: 1fr; }
  .focus-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kanban-board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .kanban-column { flex: 0 0 min(340px,86vw); scroll-snap-align: start; }
  .kanban-board::-webkit-scrollbar { height: 8px; }
  .kanban-board::-webkit-scrollbar-thumb { border-radius: 10px; background: var(--line-strong); }
}

@media (max-width: 680px) {
  .membership-item { align-items: flex-start; flex-wrap: wrap; }
  .dashboard-section-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .dashboard-section-tab { padding-inline: 8px; }
  .auth-screen { padding: 14px; }
  .auth-layout { min-height: calc(100svh - 28px); border-radius: 22px; }
  .auth-card { min-height: auto; padding: 36px 24px; }
  main { padding-inline: 14px; }
  .topbar { align-items: flex-start; }
  .topbar h2 { font-size: 24px; }
  .page-subtitle { display: none; }
  .topbar-cta { position: fixed; right: 18px; bottom: 18px; z-index: 20; width: 52px; height: 52px; justify-content: center; overflow: hidden; border-radius: 16px; padding: 0; color: transparent; box-shadow: 0 14px 30px var(--primary-tint-strong); }
  .topbar-cta span { position: absolute; color: #fff; font-size: 27px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card { min-height: 150px; }
  .focus-overview { grid-template-columns: 1fr; }
  .content-grid { margin-top: 14px; }
  .attachment-preview-card, .attachment-item { align-items: flex-start; grid-template-columns: 1fr; }
  .attachment-item-actions { width: 100%; justify-content: space-between; }
  .attachment-thumb, .attachment-item-thumb { width: 100%; height: 160px; }
  .attachment-status-bar { height: 7px; }
  .attachment-preview-hero { max-height: 48vh; }
  .checklist-item { align-items: flex-start; }
  .notification-item { align-items: flex-start; flex-direction: column; }
  .calendar-toolbar { flex-direction: column; align-items: stretch; }
  .calendar-nav { justify-content: center; }
  .calendar-weekdays span:nth-child(n) { font-size: 9px; }
  .calendar-day { min-height: 64px; padding: 5px; }
  .calendar-chip { font-size: 10px; padding: 3px 5px; }
  .view-toolbar { align-items: flex-start; }
  .view-toolbar p { display: none; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters #searchInput { grid-column: 1 / -1; }
  .filter-clear { grid-column: 1 / -1; }
  .task-card { padding: 14px; }
  .task-card-footer { align-items: flex-end; }
  .task-assignee > span:last-child { display: none; }
  .task-card .card-actions { opacity: 1; }
  .action-detail { flex: 1; }
  .task-drawer { width: 100%; padding: 20px 18px 28px; }
  .modal { padding: 0; }
  .modal-panel { width: 100%; max-height: 100svh; min-height: 100svh; border-radius: 0; }
  .category-card { align-items: flex-start; }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notifications-wrap {
  position: relative;
}

.notifications-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
}

.notifications-toggle:hover,
.notifications-toggle[aria-expanded="true"] {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--primary-tint-strong);
}

.notifications-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger-solid);
  font-size: 10px;
  font-weight: 700;
}

.notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(380px, 90vw);
  max-height: 75vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 680px) {
  .notifications-panel {
    position: fixed;
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    max-height: 70vh;
  }
}

.theme-panel {
  width: min(220px, 90vw);
}

.theme-option-list {
  display: grid;
  gap: 4px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.theme-option:hover {
  background: var(--surface-soft);
}

.theme-option[aria-checked="true"] {
  color: var(--primary-dark);
  border-color: var(--primary-tint-strong);
  background: var(--primary-soft);
}

.theme-option-icon {
  font-size: 15px;
}

/* Trello tarzı, azaltılmış palet: sadece 4 renk (amber/mor/yeşil/mavi), her biri anlamlı şekilde
   tekrar kullanılıyor. En az önemli panel (Son görev hareketleri) renksiz/nötr kalıyor. */
.dashboard-focus-panel,
.quick-add-panel,
#userScoresPanel,
#upcomingTasksPanel {
  border-top-width: 4px;
}

.dashboard-focus-panel { background: var(--accent-amber-soft); border-top-color: var(--accent-amber); }
.quick-add-panel { background: var(--accent-purple-soft); border-top-color: var(--accent-purple); }
#userScoresPanel { background: var(--accent-green-soft); border-top-color: var(--accent-green); }
#upcomingTasksPanel { background: var(--accent-blue-soft); border-top-color: var(--accent-blue); }

.kanban-column {
  border-top-width: 4px;
}

.kanban-column[data-kanban-status="bekliyor"] { background: var(--surface-soft); border-top-color: var(--text-tertiary); }
.kanban-column[data-kanban-status="tamamlandi"] { background: var(--accent-green-soft); border-top-color: var(--accent-green); }

.kanban-column .task-card,
.kanban-column .empty-state {
  background: var(--kanban-card-bg);
}

/* Şifre değiştirme modalı */
.change-password-modal {
  width: min(460px, 96vw);
  border-top: 4px solid var(--accent-blue);
}

.modal-header-with-icon {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
}

.modal-icon-badge svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-section-divider::before,
.form-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --- Eşitleme çakışma kartı ("Hangisi kalsın?") --- */
.conflict-modal {
  width: min(640px, 100%);
}

.conflict-modal-hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.conflict-list {
  display: grid;
  gap: 14px;
}

.conflict-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.conflict-card-title {
  margin: 0;
  font-size: 1rem;
}

.conflict-columns-head,
.conflict-field {
  display: grid;
  grid-template-columns: minmax(90px, 130px) 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.conflict-columns-head {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.conflict-field-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.conflict-value {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.conflict-value.mine {
  background: var(--accent-blue-soft);
  border: 1px solid var(--accent-blue);
}

.conflict-value.cloud {
  background: var(--surface);
  border: 1px solid var(--line);
}

.conflict-delete-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 0.92rem;
}

.conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .conflict-columns-head,
  .conflict-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .conflict-columns-head span:first-child {
    display: none;
  }
}

.toast-subnote {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  opacity: 0.94;
}

/* ===== Revizyon 2026-10: liste satırları, tarih grupları, pano gruplama, takvim haftası, mobil alt çubuk, onay penceresi ===== */

/* Görev listesi: tarih grupları */
.task-group { display: grid; gap: 6px; }
.task-group + .task-group { margin-top: 14px; }
.task-group-header { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.task-group-header h4 { margin: 0; color: var(--text-secondary); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.task-group-header span { min-width: 22px; border-radius: 999px; padding: 1px 7px; color: var(--text-tertiary); background: var(--surface-soft); font-size: 11px; font-weight: 700; text-align: center; }
.task-group-overdue .task-group-header h4 { color: var(--danger); }
.task-group-today .task-group-header h4 { color: var(--primary); }

/* Görev listesi: kompakt satır */
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 11px 14px; cursor: pointer; }
.task-row:hover { transform: none; }
.task-check { display: grid; place-items: center; width: 24px; height: 24px; min-width: 24px; min-height: 24px; margin-top: 1px; padding: 0; border: 2px solid var(--line-strong); border-radius: 50%; color: transparent; background: transparent; cursor: pointer; transition: border-color 140ms ease, background 140ms ease, color 140ms ease; }
.task-check svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.task-check:hover { border-color: var(--success); color: var(--success); }
.task-row.is-done .task-check { border-color: var(--success); color: var(--surface); background: var(--success); }
.task-row.is-done .task-title-button { color: var(--text-tertiary); text-decoration: line-through; }
.task-row-main { min-width: 0; }
.task-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.task-row h4 { margin: 0; }
.task-row-main > p { margin: 3px 0 0; overflow: hidden; color: var(--text-tertiary); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.task-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 7px; color: var(--text-tertiary); font-size: 11px; font-weight: 600; }
.task-row-meta .task-assignee { gap: 5px; }
.task-row-meta .avatar-sm { width: 20px; height: 20px; border-radius: 6px; font-size: 8px; }
.task-row .card-actions { gap: 2px; margin: 0; opacity: 0; }
.task-row:hover .card-actions,
.task-row:focus-within .card-actions { opacity: 1; }
@media (hover: none) { .task-row .card-actions { opacity: 1; } }
.task-title-button { min-height: 0; padding: 0; border: 0; color: inherit; background: none; font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.task-title-button:hover { color: var(--primary); }

/* Kanban: gruplama seçici ve sütunlar */
.kanban-group-control { display: inline-flex; align-items: center; gap: 8px; }
.panel-header .kanban-group-control > span { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.kanban-group-control select { width: auto; min-height: 34px; padding-block: 4px; font-size: 12px; }
.kanban-group-hint { margin: -8px 0 12px; }
.kanban-board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); overflow-x: auto; padding-bottom: 6px; }
.kanban-column[data-kanban-priority="yuksek"] { background: var(--danger-soft); border-top-color: var(--danger); }
.kanban-column[data-kanban-priority="orta"] { background: var(--warning-soft); border-top-color: var(--warning); }
.kanban-column[data-kanban-priority="dusuk"] { background: var(--accent-blue-soft); border-top-color: var(--accent-blue); }
.kanban-column.kanban-group-assignee,
.kanban-column.kanban-group-project { background: var(--surface-soft); border-top-color: var(--accent-purple); }
.kanban-board > .kanban-empty { grid-column: 1 / -1; }

/* Takvim: okunur çipler ve hafta görünümü */
.calendar-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.segmented-toggle { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: var(--surface-soft); }
.segmented-toggle .small-button { min-height: 30px; border: 0; padding: 4px 12px; background: transparent; }
.segmented-toggle .small-button[aria-pressed="true"] { color: #fff; background: var(--primary-solid); }
.calendar-chip { display: -webkit-box; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.calendar-grid-week .calendar-day { min-height: 260px; }
.calendar-grid-week .calendar-chip { display: block; padding: 6px 8px; font-size: 12px; -webkit-line-clamp: unset; }

/* Panel kartları: kart sayısına göre satırı doldur */
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* Onay penceresi */
.confirm-modal { z-index: 55; }
.confirm-modal .modal-panel { gap: 10px; width: min(440px, calc(100% - 32px)); min-height: 0; max-height: none; border-radius: 16px; padding: 22px; }
.confirm-modal h2 { margin: 0; font-size: 19px; }
.confirm-modal p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* Mobil alt gezinme çubuğu */
.mobile-tabbar { display: none; }

@media (max-width: 680px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-card { min-height: 0; }

  .topbar { display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .topbar-title { min-width: 0; }
  .topbar-actions { flex: 0 0 auto; }
  /* backdrop-filter sabit konumlu "+" düğmesini başlığa hapsediyordu; mobilde opak zemin kullan. */
  .topbar { backdrop-filter: none; background: var(--bg); }

  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
  }
  .mobile-tab { display: grid; justify-items: center; gap: 3px; min-height: 48px; border: 0; border-radius: 10px; padding: 5px 2px; color: var(--text-tertiary); background: transparent; font-size: 10px; font-weight: 650; }
  .mobile-tab svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-tab.active { color: var(--primary); background: var(--primary-soft); }
  .topbar-cta { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .toast-region { bottom: calc(76px + env(safe-area-inset-bottom)); }

  .task-row { position: relative; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 11px 12px; }
  .task-row .card-actions { position: absolute; right: 6px; bottom: 6px; }
  .task-row .card-actions .icon-button { min-width: 32px; min-height: 32px; }
  .task-row-meta { padding-right: 70px; }
  .task-row-meta .score-signal { display: none; }
  .kanban-group-control select { max-width: 150px; }
  .calendar-grid-week { grid-template-columns: 1fr; }
  .calendar-grid-week .calendar-day { min-height: 0; }
}
.calendar-day-weekday { display: none; }
@media (max-width: 680px) {
  .calendar-panel:has(.calendar-grid-week) .calendar-weekdays { display: none; }
  .calendar-day-weekday { display: inline; }
}
