/* ── Layout ─────────────────────────────────────────── */
body { background: #f8f9fa; font-size: 14px; }

/* ── Toolbar ────────────────────────────────────────── */
.toolbar-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 17px;
  padding: 5px 7px;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.1s, background 0.1s;
}
.toolbar-btn:hover { background: #f1f3f5; color: #374151; }
.toolbar-btn.active { color: #111827; }
.toolbar-btn.filter-active { color: #4f46e5; }

/* ── Kanban view ────────────────────────────────────── */
.kanban-view {
  display: flex;
  align-items: flex-start;
}

/* List view hidden by default on desktop */
.list-view { display: none; }

@media (max-width: 767px) {
  .kanban-view { display: none; }
  .list-view   { display: block; }
}

/* ── Kanban column ──────────────────────────────────── */
.kanban-col {
  flex: 1;
  min-width: 220px;
  max-width: 360px;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.col-title { font-weight: 600; font-size: 13px; }
.col-count { color: #adb5bd; font-size: 12px; }

.add-btn {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}
.add-btn:hover { background: #e9ecef; color: #212529; }

/* ── List view ──────────────────────────────────────── */
.list-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 4px;
}

/* ── Sortable container ─────────────────────────────── */
.sortable-tasks {
  flex: 1;
  min-height: 80px; /* always a droppable surface even when empty */
}

/* ── Task card ──────────────────────────────────────── */
.task-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.task-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* SortableJS ghost / chosen */
.sortable-ghost  { opacity: .4; }
.sortable-chosen { box-shadow: 0 4px 16px rgba(0,0,0,.12); }

.task-body {
  padding: 8px 10px;
  cursor: grab;
}
.task-body:active { cursor: grabbing; }

.task-title { font-weight: 500; word-break: break-word; }

.task-desc {
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Collapse button ────────────────────────────────── */
.collapse-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.collapse-btn:hover { color: #374151; background: #e9ecef; }

/* List view: single-line cards */
.list-view .task-card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #e9ecef;
  margin: 0;
}
.list-view .task-card:hover { box-shadow: none; background: #f8f9fa; }
.list-view .task-body {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: grab;
}
.list-view .task-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}
.list-view .task-desc { display: none; }
.list-view .task-tags {
  margin: 0 !important;
  flex-shrink: 0;
  display: flex;
  gap: 3px;
}

/* ── Tags ───────────────────────────────────────────── */
.tag-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.tag-check-label { cursor: pointer; }
.tag-selectable  { cursor: pointer; opacity: 0.5; transition: opacity 0.1s; }
.tag-checkbox:checked + .tag-selectable { opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
