﻿.tasks-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
}

.task-panel {
    display: grid;
    grid-template-rows: 38px 1fr;
    min-height: 0;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255,255,255,0.78), rgba(255,255,255,0.52));
    border: 1px solid rgba(255,255,255,0.52);
    box-shadow: var(--shadow-md);
    position: relative;
}

    .task-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(130, 208, 213, 0.08), transparent 42%);
    }

.task-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 10px 3px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--surface-dark);
    border-bottom: 1px solid rgba(72, 113, 159, 0.08);
    position: relative;
    z-index: 1;
}

.task-counter {
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(72, 113, 159, 0.16), rgba(130, 208, 213, 0.20));
    color: var(--surface-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.task-panel-body {
    padding: 6px 8px 8px;
    overflow: auto;
    position: relative;
    z-index: 1;
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.task-item {
    min-height: 28px;
    padding: 4px 6px;
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(72, 113, 159, 0.08);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(53, 55, 71, 0.04);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

    .task-item:hover {
        transform: translateY(-1px);
        border-color: rgba(130, 208, 213, 0.42);
        box-shadow: 0 8px 16px rgba(53, 55, 71, 0.07);
    }

.task-inline-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.task-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-project,
.task-date {
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    white-space: nowrap;
}

.task-project {
    color: var(--surface-dark);
    background: rgba(130, 208, 213, 0.12);
}

.task-date {
    color: var(--primary);
    background: rgba(72, 113, 159, 0.10);
}

.task-item-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.task-inline-form {
    margin: 0;
}

.task-action-btn {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(72, 113, 159, 0.10);
    border-radius: 7px;
    background: rgba(255,255,255,0.9);
    color: var(--surface-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.task-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(53, 55, 71, 0.07);
}

.task-action-btn.success {
    background: rgba(130, 213, 171, 0.18);
    border-color: rgba(130, 213, 171, 0.30);
}

.task-action-btn.edit {
    background: rgba(130, 208, 213, 0.18);
    border-color: rgba(130, 208, 213, 0.34);
}

.task-action-btn.note {
    background: rgba(157, 167, 189, 0.20);
    border-color: rgba(157, 167, 189, 0.30);
}

.task-action-btn.danger {
    background: rgba(231, 137, 137, 0.18);
    border-color: rgba(231, 137, 137, 0.32);
}

.task-item-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    color: var(--text-soft);
    font-size: 0.82rem;
}

@media (max-width: 980px) {
    .tasks-row {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 820px) and (min-width: 981px) {
    :root {
        --topbar-height: 56px;
        --tasks-height: 138px;
    }

    .page-shell {
        gap: 8px;
        padding: 10px 12px 8px;
    }

    .task-panel {
        grid-template-rows: 34px 1fr;
    }

    .task-panel-header {
        padding: 2px 10px;
        font-size: 0.78rem;
    }

    .task-panel-body {
        padding: 5px 6px 6px;
        overflow: hidden;
    }

    .task-list {
        gap: 4px;
    }

    .task-item {
        padding: 5px 7px;
    }

    .task-title {
        font-size: 0.74rem;
    }

    .task-action-btn {
        width: 20px;
        height: 20px;
        font-size: 0.66rem;
    }
}
