/* ================================================================
   Mol Ticketing Kanban Board — columns, cards, DnD states, SLA indicators
   ================================================================ */

.kanban-board {
    display: flex;
    gap: 12px;
    padding: 12px;
    height: 100%;
    align-items: flex-start;
    min-height: 200px;
}

/* ---- Column ---- */
.kanban-column {
    min-width: 260px;
    max-width: 300px;
    flex: 0 0 270px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    transition: box-shadow 0.2s;
}

.kanban-column__header {
    padding: 10px 14px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #94a3b8;
    border-radius: 8px 8px 0 0;
    background: #e2e8f0;
    user-select: none;
}

.kanban-column__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kanban-column__count {
    background: #cbd5e1;
    color: #334155;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 11px;
    min-width: 22px;
    text-align: center;
    font-weight: 700;
}

.kanban-column__body {
    padding: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 60px;
}

.kanban-column__body.sortable-drag-over {
    background: #dbeafe;
    border-radius: 0 0 8px 8px;
}

/* ---- Card ---- */
.kanban-card {
    background: #ffffff;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    cursor: grab;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    border-left: 4px solid transparent;
    user-select: none;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

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

/* DnD states */
.kanban-card--ghost {
    opacity: 0.35;
    background: #dbeafe;
    box-shadow: none;
    transform: none;
}

.kanban-card--chosen {
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
    transform: rotate(1.5deg) scale(1.02);
    z-index: 10000;
}

.kanban-card--drag {
    opacity: 0.9;
}

/* ---- Card Header ---- */
.kanban-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.kanban-card__code {
    font-size: 11px;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 0.3px;
}

.kanban-card__priority {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ---- Card Title ---- */
.kanban-card__title {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---- Card Meta ---- */
.kanban-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kanban-card__spacer {
    flex: 1;
}

.kanban-card__tag {
    font-size: 10px;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kanban-card__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.kanban-card__avatar--team {
    background: #8b5cf6;
}

/* ---- SLA indicator ---- */
.kanban-card__sla {
    margin-top: 6px;
    font-size: 11px;
    padding-top: 5px;
    border-top: 1px solid #f1f5f9;
}

.kanban-card__sla--ok {
    color: #10b981;
}

.kanban-card__sla--warning {
    color: #f59e0b;
    font-weight: 600;
}

.kanban-card__sla--critical {
    color: #ef4444;
    font-weight: 700;
}

.kanban-card__sla--breached {
    color: #ef4444;
    font-weight: 700;
}

/* ---- Overdue / Breached cards ---- */
.kanban-card--overdue {
    border-left-color: #f59e0b;
}

.kanban-card--breached {
    border-left-color: #ef4444;
    animation: kanban-breach-pulse 2s ease-in-out infinite;
}

@keyframes kanban-breach-pulse {
    0%, 100% { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
    50% { box-shadow: 0 0 0 3px rgba(239,68,68,0.15), 0 1px 3px rgba(0,0,0,0.08); }
}

/* ---- Empty column placeholder ---- */
.kanban-column__body:empty::after {
    content: 'No tickets';
    display: block;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 20px 0;
    font-style: italic;
}

/* ---- Scrollbar styling ---- */
.kanban-column__body::-webkit-scrollbar {
    width: 5px;
}
.kanban-column__body::-webkit-scrollbar-track {
    background: transparent;
}
.kanban-column__body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.kanban-column__body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.kanban-board::-webkit-scrollbar {
    height: 8px;
}
.kanban-board::-webkit-scrollbar-track {
    background: #f8fafc;
}
.kanban-board::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
