/* Readable task cards. Loaded last for overrides. */
.kanban-task-list {
    gap: 16px;
}

.kanban-column .task-item {
    height: auto;
    min-height: 240px;
    padding: 48px 16px 16px;
    gap: 12px;
    overflow: visible;
}

.task-quick-actions {
    top: 12px;
    right: 12px;
    left: auto;
    gap: 6px;
}

.task-action-button {
    width: 32px;
    height: 32px;
    font-size: 0.86rem;
}

.kanban-column .task-content {
    gap: 10px;
    min-height: 0;
    overflow: visible;
}

.task-card-top {
    align-items: flex-start;
    gap: 10px;
    padding-right: 96px;
}

.task-title {
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.status-badge {
    flex: 0 0 auto;
    padding: 4px 9px;
    font-size: 0.66rem;
    white-space: nowrap;
}

.status-badge-todo::before,
.status-badge-progress::before {
    display: none;
}

.task-mini-meta {
    gap: 7px;
    margin-top: 2px;
    max-height: none;
    overflow: visible;
}

.mini-chip,
.icon-chip {
    padding: 5px 9px;
    font-size: 0.72rem;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.task-notes {
    margin: 0;
    padding-right: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    -webkit-line-clamp: 4;
}

.task-card-actions,
.task-resources {
    position: static;
}

.task-card-actions {
    align-self: stretch;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.task-just-added {
    animation: taskHighlight 1.8s ease;
}

@keyframes taskHighlight {
    0%, 100% {
        box-shadow: 0 14px 24px rgba(35, 48, 47, 0.08), 0 4px 0 rgba(9, 82, 77, 0.05);
    }

    30% {
        box-shadow: 0 0 0 4px rgba(15, 124, 114, 0.22), 0 24px 42px rgba(15, 124, 114, 0.2);
    }
}

@media (max-width: 700px) {
    .kanban-column .task-item {
        min-height: 220px;
        padding: 46px 12px 14px;
    }

    .task-card-top {
        padding-right: 92px;
    }
}

/* Tasks tab UX polish: clearer board controls, lane guidance, and calmer card hierarchy. */
.board-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 0, rgba(103, 87, 216, 0.12), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 248, 245, 0.72));
}

.board-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #0f7c72, #6757d8, #ffb447);
}

.board-title-block h2 {
    margin-bottom: 6px;
}

.board-helper {
    max-width: 540px;
    margin: 0;
    color: var(--muted, #555);
    font-size: 0.94rem;
    line-height: 1.5;
}

.board-controls {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.board-meta-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.board-meta-pills span {
    padding: 7px 10px;
    border: 1px solid rgba(15, 124, 114, 0.12);
    border-radius: 999px;
    color: #09524d;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(35, 48, 47, 0.06);
}

.kanban-column {
    position: relative;
    overflow: visible;
}

.kanban-column::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    border-radius: 24px 24px 0 0;
    background: var(--lane-accent, #0f7c72);
}

.kanban-column-todo {
    --lane-accent: #6757d8;
}

.kanban-column-progress {
    --lane-accent: #ff9f1c;
}

.kanban-column-done {
    --lane-accent: #0f7c72;
}

.kanban-lane-copy {
    display: grid;
    gap: 3px;
}

.kanban-lane-hint {
    margin: 0;
    color: var(--muted, #666);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
}

.kanban-count {
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.12);
}

.kanban-column .task-item {
    border-top: 1px solid rgba(255, 255, 255, 0.92);
}

.kanban-column .task-item::marker {
    content: "";
}

.task-title {
    letter-spacing: -0.01em;
}

.task-card-actions {
    align-items: center;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--accent, #0f7c72);
}

.task-action-button:focus-visible,
.delete-button:focus-visible,
.filter-button:focus-visible,
.todo-start-button:focus-visible {
    outline: 3px solid rgba(15, 124, 114, 0.28);
    outline-offset: 3px;
}

:root[data-theme="dark"] .board-card {
    background:
        radial-gradient(circle at 12% 0, rgba(144, 123, 255, 0.14), transparent 30%),
        linear-gradient(145deg, rgba(20, 32, 29, 0.92), rgba(12, 22, 20, 0.82));
}

:root[data-theme="dark"] .board-helper,
:root[data-theme="dark"] .kanban-lane-hint {
    color: var(--muted, #a8b6b2);
}

:root[data-theme="dark"] .board-meta-pills span {
    border-color: rgba(53, 199, 184, 0.16);
    color: var(--accent-dark, #b9f4ec);
    background: rgba(53, 199, 184, 0.10);
}

@media (max-width: 900px) {
    .board-controls,
    .board-meta-pills {
        justify-items: start;
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .board-helper {
        font-size: 0.9rem;
    }

    .board-meta-pills {
        display: none;
    }

    .kanban-lane-hint {
        font-size: 0.74rem;
    }
}
