/* ─── Kanban Columns ─────────────────────────────────────────────── */
.kanban-col {
  width: 280px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  background: rgba(24, 24, 27, 0.4);
  border: 1px solid rgba(39, 39, 42, 0.6);
  border-radius: 0.75rem;
}

.kanban-col.pinned {
  flex-shrink: 0;
  width: 300px;
}

.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(39, 39, 42, 0.6);
}

.col-count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #71717a;
  background: rgba(39, 39, 42, 0.6);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.col-cards {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-height: 60px;
  transition: background-color 150ms ease;
}

.col-cards.drag-over {
  background: rgba(161, 161, 170, 0.06);
  border-radius: 0 0 0.75rem 0.75rem;
}

/* ─── Task Cards ─────────────────────────────────────────────────── */
.task-card {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  cursor: grab;
  transition: all 150ms ease;
  user-select: none;
}

.task-card:hover {
  border-color: #3f3f46;
  background: #1f1f23;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.3;
  transform: scale(0.98);
}

.card-title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: #e4e4e7;
  margin-bottom: 0.375rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 0.6875rem;
  color: #a1a1aa;
  background: rgba(63, 63, 70, 0.5);
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
}

/* Priority badges */
.card-priority {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
}

.card-priority.p0 { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.card-priority.p1 { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.card-priority.p2 { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.card-priority.p3 { background: rgba(113, 113, 122, 0.15); color: #a1a1aa; }

/* Assignee */
.card-assignee {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.assignee-dot {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  font-size: 0.5625rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* AI pulse */
.ai-pulse {
  position: relative;
}

.ai-pulse::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 9999px;
  animation: ai-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ai-ping {
  0% { opacity: 1; transform: scale(1); }
  75%, 100% { opacity: 0; transform: scale(2); }
}

/* Blocked indicator */
.card-blocked {
  font-size: 0.625rem;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

/* ─── Activity Feed ──────────────────────────────────────────────── */
.activity-item {
  font-size: 0.75rem;
  color: #a1a1aa;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  transition: background 150ms ease;
}

.activity-item:hover {
  background: rgba(39, 39, 42, 0.4);
}

.activity-item strong {
  color: #e4e4e7;
  font-weight: 500;
}

.activity-time {
  font-size: 0.625rem;
  color: #52525b;
  margin-top: 0.125rem;
}

/* ─── Dialog Backdrop ────────────────────────────────────────────── */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

dialog {
  animation: dialog-in 150ms ease;
}

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

/* ─── Ingest Preview ─────────────────────────────────────────────── */
.ingest-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(39, 39, 42, 0.4);
}

.ingest-item:last-child {
  border-bottom: none;
}

.ingest-title {
  flex: 1;
  color: #e4e4e7;
}

/* ─── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(63, 63, 70, 0.5);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(63, 63, 70, 0.8);
}

/* ─── Empty State ────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: #52525b;
  font-size: 0.75rem;
  text-align: center;
}

/* ─── Column Select-All ─────────────────────────────────────────── */
.col-select-all {
  width: 13px;
  height: 13px;
  border: 1.5px solid #3f3f46;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 100ms ease;
  position: relative;
}

.col-select-all:checked {
  background: #a1a1aa;
  border-color: #a1a1aa;
}

.col-select-all:checked::after {
  content: '';
  position: absolute;
  top: 0px;
  left: 3px;
  width: 4px;
  height: 7px;
  border: solid #18181b;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* ─── Selection / Bulk ───────────────────────────────────────────── */
.task-card .card-checkbox {
  width: 14px;
  height: 14px;
  border: 1.5px solid #3f3f46;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: all 100ms ease;
  position: relative;
}

.task-card .card-checkbox:checked {
  background: #e4e4e7;
  border-color: #e4e4e7;
}

.task-card .card-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3.5px;
  width: 4px;
  height: 7px;
  border: solid #18181b;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.task-card.selected {
  border-color: #52525b;
  background: #1f1f23;
}

@keyframes slide-up {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.animate-slide-up {
  animation: slide-up 150ms ease;
}

/* ─── Disabled buttons ───────────────────────────────────────────── */
#ingest-dialog button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── GitHub Panel ──────────────────────────────────────────────── */
.gh-pr-item {
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  transition: background 150ms ease;
}

.gh-pr-item:hover {
  background: rgba(39, 39, 42, 0.4);
}

.gh-branch-item {
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  transition: background 150ms ease;
}

.gh-branch-item:hover {
  background: rgba(39, 39, 42, 0.4);
}

.gh-badge {
  font-size: 0.5625rem;
  font-weight: 600;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.gh-badge-draft {
  background: rgba(113, 113, 122, 0.15);
  color: #a1a1aa;
}

.gh-badge-review {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.gh-badge-approved {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.gh-badge-changes {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}
