.task-page-shell {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.task-page-header {
    border: 1px solid var(--border-main);
    border-radius: 16px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.task-title-group {
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
}

.task-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border-main);
    background: var(--bg-elevated);
    color: var(--brand-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-title-group h1 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-strong);
}

.task-table-shell {
    border: 1px solid var(--border-main);
    border-radius: 14px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.task-table-scroll {
    overflow-x: auto;
}

.task-unified-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.task-unified-table thead {
    background: var(--bg-elevated);
}

.task-th {
    padding: 0.72rem 0.9rem;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-main);
    white-space: nowrap;
}

#tasksList tr {
    border-bottom: 1px solid var(--border-soft);
}

#tasksList tr:last-child {
    border-bottom: none;
}

.task-td {
    padding: 0.78rem 0.9rem;
    font-size: 13px;
    color: var(--text-main);
    vertical-align: middle;
}

.task-td-nowrap {
    white-space: nowrap;
}

.task-empty-row {
    text-align: center;
    padding: 1.25rem 0.9rem;
}

.task-empty-text {
    color: var(--text-muted);
    font-size: 13px;
}

.task-type-badge,
.task-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 0.28rem 0.52rem;
    border: 1px solid transparent;
}

.task-type-badge.type-app {
    color: #166534;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.16);
}

.task-type-badge.type-workflow {
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.16);
}

.task-status-badge.status-0 {
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.16);
}

.task-status-badge.status-1 {
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.16);
}

.task-status-badge.status-2 {
    color: #166534;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.16);
}

.task-status-badge.status-3 {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.16);
}

.task-status-badge.status-4 {
    color: #0369a1;
    border-color: rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.16);
}

.task-duration {
    margin-left: 0.45rem;
    color: #16a34a;
    font-size: 12px;
    font-weight: 600;
}

.task-result-empty {
    color: var(--text-muted);
}

.task-text-preview {
    max-width: 250px;
}

.task-text-content {
    color: var(--text-main);
    font-size: 13px;
    margin: 0;
}

.task-text-view-btn {
    border: none;
    background: transparent;
    color: var(--brand-500);
    font-size: 12px;
    padding: 0;
    margin-top: 0.2rem;
    cursor: pointer;
}

.task-text-view-btn:hover {
    color: var(--brand-600);
}

.task-result-group {
    display: flex;
    gap: 4px;
}

.task-result-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-main);
    cursor: pointer;
}

.task-result-more {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid var(--border-main);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.task-pagination-shell {
    border: 1px solid var(--border-main);
    border-radius: 14px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.task-pagination-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.task-total {
    color: var(--text-main);
    font-size: 13px;
}

.task-pagination {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.task-no-pagination {
    color: var(--text-muted);
    font-size: 12px;
}

.task-page-btn {
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--border-main);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    padding: 0 0.68rem;
    transition: all 0.2s ease;
}

.task-page-btn:hover:not(:disabled):not(.is-active) {
    border-color: var(--brand-500);
    color: var(--brand-500);
}

.task-page-btn.is-active {
    background: var(--brand-500);
    border-color: var(--brand-600);
    color: #fff;
}

.task-page-btn.is-disabled,
.task-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

:root[data-theme="dark"] .task-type-badge.type-app,
:root[data-theme="dark"] .task-status-badge.status-2 {
    color: #86efac;
}

:root[data-theme="dark"] .task-type-badge.type-workflow,
:root[data-theme="dark"] .task-status-badge.status-1 {
    color: #93c5fd;
}

:root[data-theme="dark"] .task-status-badge.status-0 {
    color: #fcd34d;
}

:root[data-theme="dark"] .task-status-badge.status-3 {
    color: #fca5a5;
}

:root[data-theme="dark"] .task-status-badge.status-4 {
    color: #7dd3fc;
}

@media (max-width: 768px) {
    .task-pagination-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
