/* Board page fixed kanban layout */

.kanban-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 18px;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, 330px);
    gap: 16px;
    align-items: start;
    width: max-content;
    min-width: 100%;
}

.kanban-column {
    width: 330px;
    min-width: 330px;
    background: rgba(17, 24, 39, .72);
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    padding: 12px;
    height: calc(100vh - 265px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    color: #F9FAFB;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}

    .kanban-header b {
        background: rgba(59, 130, 246, .18);
        color: #93C5FD;
        padding: 3px 9px;
        border-radius: 999px;
        font-size: 13px;
    }

.kanban-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.empty-column {
    color: #64748B;
    border: 1px dashed rgba(148, 163, 184, .2);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    font-size: 13px;
}

.task-card {
    display: block;
    width: 100%;
    background: rgba(30, 41, 59, .9);
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 16px;
    padding: 13px;
    margin-bottom: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
    overflow: hidden;
}

    .task-card.critical {
        border-color: rgba(239, 68, 68, .48);
    }

    .task-card.high {
        border-color: rgba(245, 158, 11, .40);
    }

    .task-card.medium {
        border-color: rgba(245, 158, 11, .32);
    }

    .task-card.low {
        border-color: rgba(34, 197, 94, .30);
    }

.task-card-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

    .task-card-open:hover .task-title {
        color: #93C5FD;
        text-decoration: underline;
    }

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

.kanban-board .badge,
.kanban-board .progress-pill,
.kanban-board .board-activity-row span {
    position: static !important;
    white-space: nowrap;
}

.progress-pill {
    color: #BFDBFE;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(59, 130, 246, .28);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 900;
}

.task-title {
    display: block;
    color: #F9FAFB;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 7px;
    overflow-wrap: anywhere;
}

.task-desc {
    color: #9CA3AF;
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 8px;
}

    .task-meta-grid div {
        min-width: 0;
        padding: 7px 8px;
        border-radius: 11px;
        background: rgba(15, 23, 42, .42);
        border: 1px solid rgba(148, 163, 184, .12);
    }

    .task-meta-grid span {
        display: block;
        color: #64748B;
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .task-meta-grid b {
        display: block;
        color: #93C5FD;
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.board-activity-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

    .board-activity-row span {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #CBD5E1;
        padding: 3px 7px;
        border-radius: 999px;
        background: rgba(148, 163, 184, .10);
        border: 1px solid rgba(148, 163, 184, .14);
        font-size: 12px;
    }

.task-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, .12);
}

@media (max-width: 900px) {
    .kanban-board {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .kanban-column {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
    }
}
/* -----------------------------
   Light mode fixes for Board page
------------------------------ */

.light-mode .kanban-scroll {
    background: transparent;
}

.light-mode .kanban-column {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.light-mode .kanban-header {
    color: #111827;
    border-bottom: 1px solid #E5E7EB;
}

    .light-mode .kanban-header b {
        background: #DBEAFE;
        color: #2563EB;
    }

.light-mode .empty-column {
    color: #64748B;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
}

/* Cards */
.light-mode .task-card {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

    .light-mode .task-card.critical {
        border-color: rgba(239, 68, 68, .45);
    }

    .light-mode .task-card.high {
        border-color: rgba(245, 158, 11, .45);
    }

    .light-mode .task-card.medium {
        border-color: rgba(245, 158, 11, .35);
    }

    .light-mode .task-card.low {
        border-color: rgba(34, 197, 94, .35);
    }

.light-mode .task-title {
    color: #111827;
}

.light-mode .task-card-open:hover .task-title {
    color: #2563EB;
}

.light-mode .task-desc {
    color: #475569;
}

/* Project / Assignee boxes */
.light-mode .task-meta-grid div {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
}

.light-mode .task-meta-grid span {
    color: #64748B;
}

.light-mode .task-meta-grid b {
    color: #2563EB;
}

/* Activity chips */
.light-mode .board-activity-row span {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #334155;
}

/* Progress pill */
.light-mode .progress-pill {
    background: #DBEAFE;
    border: 1px solid #93C5FD;
    color: #1D4ED8;
}

/* Actions */
.light-mode .task-actions {
    border-top: 1px solid #E5E7EB;
}

    .light-mode .task-actions .mud-button-root {
        color: #2563EB;
    }

/* Priority badges stay colored but cleaner */
.light-mode .badge.priority.low {
    color: #15803D;
    background: #DCFCE7;
    border-color: #86EFAC;
}

.light-mode .badge.priority.medium {
    color: #92400E;
    background: #FEF3C7;
    border-color: #FCD34D;
}

.light-mode .badge.priority.high,
.light-mode .badge.priority.critical {
    color: #B91C1C;
    background: #FEE2E2;
    border-color: #FCA5A5;
}
/* Shared pill badge polish for Board cards */
.kanban-board .badge {
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    gap: 7px;
    background: rgba(15, 23, 42, .48);
}

.kanban-board .badge::before {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 14px currentColor;
}

.kanban-board .badge.priority.medium { color: #F59E0B; border-color: rgba(245,158,11,.48); background: rgba(245,158,11,.10); }
.kanban-board .badge.priority.high,
.kanban-board .badge.priority.critical { color: #FF4D57; border-color: rgba(239,68,68,.50); background: rgba(239,68,68,.10); }
.kanban-board .badge.priority.low { color: #22C55E; border-color: rgba(34,197,94,.38); background: rgba(34,197,94,.10); }

.kanban-board .task-card {
    background: rgba(30, 41, 59, .82);
    border-radius: 16px;
}
