[hidden] { display: none !important; }
.task-main { padding: 32px; }
.task-main .page-header { align-items: center; gap: 20px; }
.task-main { min-width: 0; }
.task-list-view, .task-editor-view { margin: 0; }
.task-editor-view { width: 100%; max-width: 1800px; margin-inline: auto; padding: 32px; }
.task-editor-view .section-title { font-size: 22px; }
.task-editor-view .section-subtitle { font-size: 14px; }
.task-editor-view .form-grid { gap: 20px; }
.task-editor-view .form-grid label, .task-editor-view .xddm-planned-action-editor-head { font-size: 14px; }
.task-editor-view .form-grid :is(input, select), .task-editor-view textarea { min-height: 48px; padding: 12px 14px; font-size: 15px; }
.task-editor-view textarea { min-height: 88px; line-height: 1.6; }
.task-main fieldset { border: 0; padding: 0; margin: 24px 0 0; min-width: 0; }
.task-main .form-grid textarea { resize: vertical; }
.task-main .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.task-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.task-main input[readonly], .task-main select:disabled { background: #f1f5f9; color: #334155; opacity: 1; }
.task-main .form-actions { margin-top: 20px; justify-content: flex-end; }
.task-main .btn, .task-main .nav-item, .nav a.nav-item { text-decoration: none; }
.task-table-scroll { overflow-x: auto; }
.task-table { width: 100%; min-width: 1310px; table-layout: fixed; border-collapse: collapse; }
.task-table th, .task-table td { padding: 16px 14px; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid #e7edf3; }
.task-table th { color: #64748b; font-size: 12px; font-weight: 600; background: #f8fafc; }
.task-table td { line-height: 1.6; }
.task-table tbody tr:last-child td { border-bottom: 0; }
.task-table tbody tr:hover { background: #f8fafc; }
.task-draft-row { cursor: pointer; }
.task-draft-row[data-just-saved] { background: #f0fdfa; }
.task-name-link { display: block; font-weight: 600; color: #101827; text-decoration: none; }
.task-name-link:hover { color: #0f766e; text-decoration: underline; }
.task-draft-context { display: block; color: #64748b; font-size: 12px; margin: 4px 0 8px; }
.task-table .task-content { white-space: pre-wrap; }
.task-table .row-btn { text-decoration: none; display: inline-flex; white-space: nowrap; }
.task-row-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.task-row-actions .row-btn { max-width: 100%; }
.task-table .task-result-link { white-space: normal; height: auto; min-height: 32px; padding: 6px 10px; line-height: 1.35; }
.task-result-summary { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #f8fafc; border: 1px solid #e7edf3; border-radius: 10px; padding: 16px; }
.task-result-summary dt { font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 6px; }
.task-result-summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.task-result-updated { display: block; font-size: 12px; color: #64748b; margin-top: 8px; white-space: pre-line; }
.task-result-updated:empty { display: none; }
.task-table .task-empty { color: #64748b; padding: 40px 16px; text-align: center; line-height: 1.7; }
.task-main a:focus-visible, .task-table-scroll:focus-visible { outline: 2px solid #0f766e; outline-offset: 3px; }
.task-error { color: #b42318; }
.task-access-status { margin: 32px; }
#taskFormStatus, #taskListStatus, #taskResultStatus { white-space: pre-line; }
#taskListStatus:empty { display: none; }
@media (max-width: 640px) { .task-main { padding: 20px 12px; } .task-editor-view { padding: 20px 16px; } .task-main .form-grid { grid-template-columns: 1fr; } .task-main .span-2 { grid-column: auto; } .task-main .page-header { align-items: flex-start; flex-direction: column; } }
@media (max-width: 640px) { .task-result-summary { grid-template-columns: 1fr; } }

/* The inner four-column action/result grid uses the original XDDM styles. */
.task-table th:nth-child(1) { width: 200px; }
.task-table th:nth-child(3) { width: 130px; }
.task-table .task-pairs-cell { padding-top: 6px; padding-bottom: 6px; }
.task-pair-head { display: grid; grid-template-columns: minmax(280px, 1fr) 180px minmax(280px, 1fr) 180px; }
.task-pair-head span:not(:first-child) { padding-left: 12px; }
.task-table th:nth-child(2) { min-width: 920px; }
.task-table .xddm-planned-action-check { flex-shrink: 0; }
.task-result-summary { grid-template-columns: 1fr; }

.task-create-pairs { margin: 20px 0; }
.task-create-pairs .section-subtitle { margin: 8px 0 0; }
.task-confirm-dialog { width: min(440px, calc(100vw - 32px)); box-sizing: border-box; max-height: calc(100vh - 32px); overflow: auto; border: 1px solid #e7edf3; border-radius: 16px; padding: 24px; color: #101827; background: #fff; box-shadow: 0 24px 64px #10182733; }
.task-confirm-dialog::backdrop { background: #10182766; }
.task-confirm-dialog h2 { margin: 0 0 12px; font-size: 20px; }
.task-confirm-dialog p { margin: 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }

.task-delete-button { color: #b42318; border-color: #f4b4ae; }
.task-delete-button:hover:not(:disabled) { background: #fff1f0; border-color: #b42318; }
