.employee-tasks {
    display: grid;
    gap: 12px;
    padding: 14px;
    min-width: 0;
}

.employee-tasks .task-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: var(--surface);
}

.employee-tasks .task-scope-note {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

.employee-tasks .task-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.employee-tasks .task-bar {
    margin-top: 12px;
}

.employee-tasks .task-bar > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.employee-tasks progress {
    width: 100%;
    height: 8px;
    accent-color: var(--primary);
}

.employee-tasks .task-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
}

.employee-tasks table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    text-align: start;
}

.employee-tasks th,
.employee-tasks td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: start;
}

.employee-tasks th {
    background: var(--surface-soft);
}

.employee-tasks tr:hover td {
    background: var(--selection);
}

.employee-tasks .task-status {
    display: inline-block;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--selection);
    color: var(--text);
}

.employee-tasks .task-status--Completed {
    color: var(--success);
}

.employee-tasks .task-empty {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 14px;
    padding: 28px 16px;
    border: 1px dashed var(--line);
    border-radius: var(--panel-radius);
    background: var(--surface);
}

.employee-tasks .task-empty > i {
    color: var(--primary);
    font-size: 40px;
}

.employee-tasks [hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .employee-tasks .task-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.employee-tasks .workspace-card,
.employee-tasks form {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: var(--surface);
    margin-block-end: 12px;
}

.employee-tasks .modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
}

.employee-tasks .modal-actions > div {
    flex: 0 1 240px;
    width: 240px;
    max-width: 100%;
}

.employee-tasks h1 {
    font-size: 22px;
    line-height: 1.7;
}

.employee-tasks h2 {
    font-size: 18px;
    line-height: 1.7;
}

.employee-tasks p {
    margin-block: 8px;
    overflow-wrap: anywhere;
}

.employee-tasks form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.employee-tasks label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.employee-tasks input,
.employee-tasks select,
.employee-tasks textarea {
    max-width: 100%;
    width: 100%;
}

.employee-tasks form h2,
.employee-tasks form > p {
    grid-column: 1 / -1;
}

.employee-tasks .task-entry {
    align-items: start;
    border: 0;
    padding: 0;
    background: transparent;
}

.employee-tasks .task-entry-wide {
    grid-column: 1 / -1;
}

.employee-tasks .task-entry-search {
    display: flex;
    align-items: end;
    gap: 10px;
}

.employee-tasks .task-entry-search label {
    flex: 1;
    max-width: 520px;
}

.employee-tasks .task-entry-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 16px;
}

.employee-tasks .task-entry .modal-actions {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    justify-content: flex-start;
}

.employee-tasks .task-entry .modal-actions button {
    flex: 0 0 auto;
    width: auto;
}

.employee-tasks [data-error]:empty {
    display: none;
}

.employee-tasks [aria-busy='true'] {
    cursor: progress;
}

@media (max-width: 600px) {
    .employee-tasks {
        padding: 12px;
    }

    .employee-tasks form {
        grid-template-columns: 1fr;
    }

    .employee-tasks .task-filters,
    .employee-tasks .task-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .employee-tasks .task-charts {
        grid-template-columns: 1fr;
    }

    .employee-tasks .task-kpis article {
        padding: 12px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .employee-tasks .task-entry-dates {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
}
