/* ════════════ KANBAN PAGE ════════════ */

.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.kanban-toolbar__left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-box svg { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.search-box input {
  border: none; background: none; color: var(--text);
  font-size: 0.85rem; width: 160px; outline: none;
}
.search-box input::placeholder { color: var(--muted); }

.filter-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--t);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn svg { width: 14px; height: 14px; }

.sprint-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
}

/* ── Board ── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  align-items: start;
  min-width: 0;
}

/* ── Column ── */
.kanban-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 400px;
  transition: border-color var(--t);
}
.kanban-column.drag-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }

.column-head {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.column-head__left { display: flex; align-items: center; gap: 8px; }
.col-indicator {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.column-head__title { font-size: 0.875rem; font-weight: 700; }
.col-count {
  font-size: 0.7rem;
  background: var(--surface2);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.col-add-btn {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t);
  flex-shrink: 0;
}
.col-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.col-add-btn svg { width: 13px; height: 13px; }

/* ── Cards Area ── */
.cards-area {
  flex: 1;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 200px;
}

.drop-placeholder {
  height: 80px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: none;
}

/* ── Card ── */
.kanban-card {
  background: var(--surface2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  cursor: grab;
  transition: transform var(--t-fast), box-shadow var(--t), border-color var(--t), opacity var(--t-fast);
  position: relative;
  overflow: hidden;
}
.kanban-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}
.kanban-card.high::before { background: var(--red); }
.kanban-card.med::before  { background: var(--yellow); }
.kanban-card.low::before  { background: var(--green); }

.kanban-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
  transform: translateY(-1px);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .35; transform: scale(.97); }

.card__tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: var(--space-sm); }

.card__title { font-size: 0.875rem; font-weight: 600; line-height: 1.4; margin-bottom: 10px; }

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.card__assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-soft);
}

.card__due {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.card__due svg { width: 11px; height: 11px; }
.card__due.overdue { color: var(--red); }

.card__progress-wrap { margin-top: 10px; }
.card__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.card__footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.card__story-pts {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--surface3);
  padding: 1px 7px;
  border-radius: 99px;
}

.card__actions {
  position: absolute;
  top: 8px; right: 8px;
  display: none;
  gap: 4px;
}
.kanban-card:hover .card__actions { display: flex; }
.card-action-btn {
  width: 24px; height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}
.card-action-btn:hover { color: var(--red); border-color: var(--red); background: var(--red-dim); }
.card-action-btn svg { width: 11px; height: 11px; }

/* ── Column Footer ── */
.column-foot {
  padding: var(--space-sm);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.add-card-ghost {
  width: 100%;
  padding: 7px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--t);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.add-card-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.add-card-ghost svg { width: 13px; height: 13px; }

/* ════════════ RESPONSIVE ════════════ */
@media (max-width: 1200px) { .kanban-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  {
  .kanban-board { grid-template-columns: 1fr; }
  .search-box input { width: 120px; }
}
@media (max-width: 480px) {
  .kanban-toolbar { flex-direction: column; align-items: stretch; }
  .kanban-toolbar__left { flex-wrap: wrap; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
}
