/* ============================================================
   TASK KANBAN BOARD - tkk-* classes
   ============================================================ */

/* ── Board grid ───────────────────────────────────────────── */
.tkk-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
    min-height: 600px;
}

@media (max-width: 1024px) {
    .tkk-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .tkk-board {
        grid-template-columns: 1fr;
    }
}

/* ── Column ───────────────────────────────────────────────── */
.tkk-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tkk-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px 8px 0 0;
}

.tkk-column-header--neutral  { background: #F3F4F6; }
.tkk-column-header--accent   { background: #EEF2FF; }
.tkk-column-header--success  { background: #ECFDF5; }
.tkk-column-header--danger   { background: #FEF2F2; }

.tkk-column-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.tkk-col-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tkk-col-dot--neutral { background: #6B7280; }
.tkk-col-dot--accent  { background: #6366F1; }
.tkk-col-dot--success { background: #10B981; }
.tkk-col-dot--danger  { background: #EF4444; }

.tkk-column-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.tkk-column-count {
    font-size: 12px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
    padding: 1px 7px;
    border-radius: 9999px;
}

.tkk-column-body {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tkk-empty-col {
    text-align: center;
    padding: 32px 16px;
    font-size: 13px;
    color: #D1D5DB;
}

.tkk-add-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px dashed #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
    color: #9CA3AF;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.tkk-add-btn:hover {
    border-color: #6366F1;
    color: #6366F1;
    background: #EEF2FF;
}

/* ── Card ─────────────────────────────────────────────────── */
.tkk-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: box-shadow 150ms ease, border-color 150ms ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tkk-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border-color: #6366F1;
}

.tkk-card--blocked {
    border-left: 3px solid #F59E0B;
}

.tkk-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* ── Priority badge ───────────────────────────────────────── */
.tkk-priority {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 9999px;
}

.tkk-priority--critical { background: #FEF2F2; color: #EF4444; }
.tkk-priority--high     { background: #FFFBEB; color: #F59E0B; }
.tkk-priority--medium   { background: #EEF2FF; color: #6366F1; }
.tkk-priority--low      { background: #F3F4F6; color: #6B7280; }

.tkk-blocked-badge {
    font-size: 11px;
    font-weight: 500;
    color: #F59E0B;
    background: #FFFBEB;
    padding: 2px 7px;
    border-radius: 9999px;
}

/* ── Card text ────────────────────────────────────────────── */
.tkk-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    line-height: 1.4;
    margin: 0;
}

.tkk-card-title--done {
    text-decoration: line-through;
    color: #9CA3AF;
}

.tkk-card-desc {
    font-size: 12px;
    color: #9CA3AF;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tkk-card-category {
    font-size: 11px;
    background: #F3F4F6;
    color: #374151;
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

/* ── Card footer ──────────────────────────────────────────── */
.tkk-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.tkk-card-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6B7280;
    min-width: 0;
    overflow: hidden;
}

.tkk-card-assignee-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.tkk-unassigned {
    font-size: 12px;
    color: #D1D5DB;
}

.tkk-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6366F1;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Due date ─────────────────────────────────────────────── */
.tkk-due {
    font-size: 12px;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tkk-due--overdue { color: #EF4444; }
.tkk-due--today   { color: #F59E0B; }

/* ── Action buttons ───────────────────────────────────────── */
.tkk-action-btn {
    width: 100%;
    padding: 6px;
    background: #EEF2FF;
    color: #6366F1;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    text-align: center;
}

.tkk-action-btn:hover {
    background: #6366F1;
    color: #FFFFFF;
}

.tkk-action-btn--success {
    background: #ECFDF5;
    color: #10B981;
}

.tkk-action-btn--success:hover {
    background: #10B981;
    color: #FFFFFF;
}

/* ── Drag and drop ────────────────────────────────────────── */
.tkk-col--drag-over {
    background: #EEF2FF;
    border: 2px dashed #6366F1;
    border-radius: 0 0 8px 8px;
}

.tkk-card--dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ── Skeleton ─────────────────────────────────────────────── */
.tkk-skeleton-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tkk-skeleton {
    background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
    background-size: 200% 100%;
    animation: tkk-shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes tkk-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.tkk-skeleton--badge { height: 18px; width: 60px; border-radius: 9999px; }
.tkk-skeleton--text  { height: 14px; width: 100%; }
.tkk-skeleton--short { height: 12px; width: 60%; }
