.tasks-explain {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 5px solid var(--red);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
}

.tasks-explain strong {
    display: block;
    margin-bottom: 6px;
}

.tasks-explain p,
.subtitle {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.tasks-kpi-grid {
    display: grid;
    grid-template-columns: repeat(8,1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.task-kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    min-height: 145px;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

.task-kpi .label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.task-kpi .value {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.task-kpi .hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 8px;
}

.task-kpi .note {
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
}

.task-kpi .note.warning {
    color: var(--yellow);
}

.task-kpi .note.danger {
    color: var(--red);
}

.task-page-grid {
    display: grid;
    grid-template-columns: 280px 1fr 360px;
    gap: 20px;
    align-items: start;
}

.tasks-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

.tasks-panel h2 {
    margin-bottom: 8px;
}

.task-filter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: .2s;
}

.task-filter:hover {
    transform: translateY(-2px);
}

.task-filter.active {
    background: #fef2f2;
    border-color: #fecaca;
}

.task-filter span:last-child {
    font-weight: 700;
}

.task-board {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin-top: 18px;
}

.task-column {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
}

.task-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.task-column-header h3 {
    font-size: 15px;
}

.task-count {
    background: #e2e8f0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.task-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.task-card strong {
    display: block;
    margin-bottom: 10px;
    line-height: 1.35;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.priority {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.priority.critical {
    background: #fee2e2;
    color: #991b1b;
}

.priority.high {
    background: #fef3c7;
    color: #92400e;
}

.priority.medium {
    background: #dbeafe;
    color: #1e40af;
}

.priority.low {
    background: #dcfce7;
    color: #166534;
}

.task-card.critical {
    border-left: 4px solid #dc2626;
}

.task-card.high {
    border-left: 4px solid #f59e0b;
}

.task-card.medium {
    border-left: 4px solid #2563eb;
}

.task-card.done {
    border-left: 4px solid #16a34a;
}

.control-item {
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.control-item strong {
    display: block;
    margin-bottom: 6px;
}

.control-item.good {
    background: var(--good-bg);
}

.control-item.warn {
    background: var(--warn-bg);
}

.control-item.bad {
    background: var(--danger-bg);
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin-top: 18px;
}

.staff-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.staff-card strong {
    display: block;
    margin-bottom: 8px;
}

.staff-card p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.staff-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.staff-row:last-child {
    border-bottom: none;
}

.staff-row span {
    color: var(--muted);
}

@media (max-width: 1800px) {

    .tasks-kpi-grid {
        grid-template-columns: repeat(4,1fr);
    }

    .task-page-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1400px) {

    .task-board {
        grid-template-columns: repeat(2,1fr);
    }

    .staff-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 900px) {

    .task-board,
    .staff-grid,
    .tasks-kpi-grid {
        grid-template-columns: 1fr;
    }
}