/* ============================================================
   KANBAN.CSS — Kanban Board (Sprint 3)
   ============================================================ */

/* ---- Board container ---- */
.kanban-board {
  display: flex;
  gap: 16px;
  padding: 4px 0;
  overflow-x: auto;
  min-height: 500px;
  align-items: flex-start;
}

/* ---- Cột kanban ---- */
.kanban-column {
  flex: 1 0 240px;
  max-width: 320px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

/* ---- Header cột ---- */
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 2px solid;
  font-weight: 700;
  font-size: 13px;
}

/* Màu sắc border-bottom theo cột */
.kanban-column[data-status="To Do"]      .kanban-col-header { border-color: #93c5fd; color: #2563eb; }
.kanban-column[data-status="In Progress"] .kanban-col-header { border-color: #fde68a; color: #d97706; }
.kanban-column[data-status="Done"]        .kanban-col-header { border-color: #86efac; color: #16a34a; }
.kanban-column[data-status="On Hold"]     .kanban-col-header { border-color: #fed7aa; color: #ea580c; }

.kanban-col-title { font-size: 13.5px; }
.kanban-col-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: #e5e7eb;
  color: #374151;
  font-size: 11.5px;
  font-weight: 700;
  padding: 0 6px;
}

/* ---- Card container (drop zone) ---- */
.kanban-col-cards {
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  flex: 1;
  transition: background .15s;
}

.kanban-col-cards.drag-over {
  background: #dbeafe;
  outline: 2px dashed #2563eb;
  outline-offset: -4px;
  border-radius: 6px;
}

/* ---- Card ---- */
.kanban-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  cursor: grab;
  transition: box-shadow .15s, transform .1s;
  user-select: none;
  position: relative;
}

.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  border-color: #cbd5e1;
}

.kanban-card:active,
.kanban-card.dragging {
  cursor: grabbing;
  opacity: .6;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transform: rotate(2deg) scale(1.02);
}

/* ---- Card nội dung ---- */
.kanban-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  line-height: 1.4;
  /* Giới hạn 2 dòng */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card-project  { color: #4b5563; }
.kanban-card-assignee { color: #4b5563; }

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  gap: 8px;
  flex-wrap: wrap;
}

.kanban-card-due {
  font-size: 11.5px;
  color: #6b7280;
}
.kanban-card-due.overdue { color: #dc2626; font-weight: 600; }

/* ---- Loading placeholder ---- */
.kanban-loading {
  text-align: center;
  padding: 30px 10px;
  color: #9ca3af;
  font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .kanban-board {
    flex-direction: column;
    overflow-x: hidden;
  }
  .kanban-column {
    flex: none;
    min-width: auto;
    max-width: 100%;
    width: 100%;
  }
}
