/* Shared department pages and task scheduling use the same viewport shell as R&D. */
#panel>.task-workspace-scroll{padding-top:16px;padding-bottom:20px}
.task-workspace-scroll .task-empty{min-height:110px;padding:22px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.task-resource-links{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:18px;margin:-8px 0 16px;min-height:18px}
.task-resource-links button{padding:0;font-size:var(--text-meta);color:var(--muted);cursor:pointer;line-height:20px}
.task-resource-links button:hover{color:var(--blue)}
.task-filters .task-project-filter select{max-width:168px}
.task-filters .rd-search input{width:170px}
.task-workspace-table th:first-child,.task-workspace-table td:first-child{width:26%}
.task-workspace-table th:nth-child(2),.task-workspace-table th:nth-child(3){width:9%}
.task-workspace-table th:nth-child(4),.task-workspace-table th:nth-child(5){width:17%}
.task-workspace-table th:last-child,.task-workspace-table td:last-child{width:22%;padding:12px 20px}
.task-workspace-table .rd-date-cell{white-space:nowrap;font-size:var(--text-meta)!important}
.task-workspace-table .rd-project{text-align:left;line-height:1.7}
.table-overflow>.task-workspace-table{min-width:980px}
.task-empty{min-height:180px;padding:28px 20px;text-align:center}
.task-mode .project-toolbar{gap:16px;align-items:center;margin-top:18px;padding:16px 0;border-block:1px solid var(--line)}
.task-mode .project-meta{column-gap:18px;row-gap:12px}
.task-mode .project-meta>div{border:0;padding:0;gap:8px;white-space:nowrap}
.task-mode .project-meta dt{font-size:var(--text-meta)}
.task-mode .project-meta dd{font-size:var(--text-ui);max-width:none}
.task-mode .project-toolbar .page-actions{margin:0}
.task-mode .sections{gap:20px}
.task-note h2{font-size:var(--text-ui);font-weight:500;color:var(--muted);margin:0 0 12px}
.task-note p{font-size:var(--text-body);line-height:1.9;white-space:normal;overflow-wrap:anywhere;color:var(--ink);margin:0}
.task-note{padding:0 0 20px;border-bottom:1px solid var(--line)}
.task-legacy-time{color:var(--muted);font-size:var(--text-meta);margin:0;line-height:1.6}
.task-form .field-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}
.task-form .field{grid-column:span 2}
.task-form .field-name,.task-form .field-project{grid-column:span 3}
.task-form .field-grid:has(.field-space) .field-name,.task-form .field-grid:has(.field-space) .field-project,.task-form .field-space{grid-column:span 2}
.task-form .field.full{grid-column:1/-1}
.task-form .field>label{margin-bottom:8px}
.task-form .field em{color:var(--blue)}
.task-form textarea{height:80px}
.task-form .upload{padding:16px}
.task-form .upload small{display:inline;margin:0 0 0 16px}
.task-form .upload input{margin-top:12px}
.task-upload{display:flex;align-items:center;gap:20px;min-height:34px}
.task-upload input{width:min(320px,65%);font-size:var(--text-meta);color:var(--muted)}
.task-upload input::file-selector-button{height:32px;border:1px solid var(--line);border-radius:5px;background:var(--soft);color:var(--blue);padding:0 12px;margin-right:12px;cursor:pointer;font:inherit}
.task-upload small{font-size:var(--text-meta);color:var(--muted)}
.task-form .file-names:empty{display:none}
.task-form .form-footer{margin-top:20px;padding-top:20px}
.task-form-mode .page-header{margin-bottom:20px}
.task-form-mode .page-header .page-actions:empty{display:none}
@media(max-width:1200px){.task-mode .project-toolbar{align-items:flex-start}.task-mode .project-meta{flex:1 1 620px}.task-filters .rd-search{flex:1 1 200px}.task-filters .rd-search input{width:100%;min-width:0}}
@media(max-width:800px){
 .task-form .field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
 .task-form .field,.task-form .field-name,.task-form .field-project,.task-form .field-grid:has(.field-space) .field-name,.task-form .field-grid:has(.field-space) .field-project,.task-form .field-space{grid-column:span 1}
 .task-form .field-owner{grid-column:1/-1}.task-form .field.full{grid-column:1/-1}
 .task-mode .project-toolbar .page-actions{width:100%}
 .task-resource-links{gap:12px;margin-top:-6px}
 .task-form .upload small{display:block;margin:8px 0 0}
 .task-upload{flex-wrap:wrap;gap:8px}.task-upload input{width:100%}
}
/* Inline planning keeps the table calm at rest and exposes row actions only for drafts. */
.task-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.table-overflow>.task-workspace-table{min-width:1260px;table-layout:fixed}
.task-workspace-table th,.task-workspace-table td{padding:12px 10px!important;vertical-align:middle}
.task-workspace-table th:first-child,.task-workspace-table td:first-child{width:22%;padding-left:16px!important}
.task-workspace-table th:nth-child(2){width:10%}.task-workspace-table th:nth-child(3){width:9%}
.task-workspace-table th:nth-child(4),.task-workspace-table th:nth-child(5){width:15%}
.task-workspace-table th:nth-child(6){width:15%}.task-workspace-table th:nth-child(7){width:6%}
.task-workspace-table th:last-child,.task-workspace-table td:last-child{width:8%;padding-right:16px!important}
.task-workspace-table [data-task-inline]{cursor:default}
.task-workspace-table [data-task-inline]:hover{background:#f8faff}
.task-workspace-table [data-task-inline].is-dirty{background:#f3f6ff}
.task-workspace-table [data-task-inline].has-error{background:#fff7f6}
.task-workspace-table [data-task-inline-field]{min-width:0;max-width:100%;width:100%;height:36px;border:1px solid transparent;border-radius:4px;padding:7px 5px;background:transparent;color:var(--ink);font:var(--text-ui) var(--font-ui);line-height:20px}
.task-workspace-table input[data-task-inline-field][type=datetime-local]{font-size:13px;letter-spacing:-.25px}
.task-workspace-table [data-task-inline-field]:hover{border-color:var(--line);background:#fff}
.task-workspace-table [data-task-inline-field]:focus{outline:0;border-color:var(--blue);background:#fff;box-shadow:0 0 0 2px #2448e515}
.task-workspace-table [data-task-inline-field]:disabled{opacity:.65;cursor:wait}
.task-workspace-table [data-task-inline-field]::placeholder{color:var(--muted)}
.task-inline-name,.task-inline-project,.task-inline-status{display:flex;align-items:center;gap:5px;min-width:0}
.task-inline-name .rd-row-number{flex-shrink:0;margin:0 6px 0 0}
.task-inline-name input,.task-inline-project select{flex:1;width:0}
.task-inline-status .compact-status-dot{margin:0 1px 0 0;flex-shrink:0}
.task-inline-status select{padding-left:0}
.task-detail-link{flex:0 0 24px;width:24px;height:30px;padding:0;color:var(--muted);cursor:pointer;display:grid;place-items:center;border-radius:4px}
.task-detail-link:hover{color:var(--blue);background:#e9efff}
.task-title-link,.task-project-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6;text-align:left;color:var(--ink)}
.task-title-link{cursor:pointer}.task-title-link:hover{text-decoration:underline}
.task-comment-count{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:42px;height:32px;padding:4px 6px;border-radius:5px;color:var(--muted);font:var(--text-ui) var(--font-ui);cursor:pointer}
.task-comment-count.has-comments{color:var(--blue);background:var(--soft)}.task-comment-count:hover{background:#e7eeff;color:var(--blue)}
.task-inline-actions{display:flex;align-items:center;gap:4px;white-space:nowrap}.task-inline-actions[hidden]{display:none}
.task-inline-actions button{padding:5px;min-height:32px;font:13px var(--font-ui);color:var(--muted);cursor:pointer;border-radius:4px}
.task-inline-actions .task-inline-save{color:var(--blue);font-weight:600}.task-inline-actions button:hover{background:#e4ebff}.task-inline-actions button:disabled{opacity:.5;cursor:wait}
.task-inline-idle{font-size:12px;color:var(--muted)}
.task-inline-draft-notice{margin:8px 0 12px;padding:9px 12px;border-radius:5px;background:var(--soft);color:var(--muted);font-size:13px;line-height:1.6}
.task-inline-draft-notice button{margin-left:10px;color:var(--blue);font:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.task-inline-extra[hidden]{display:none}
.task-workspace-table .task-inline-extra>td{padding:0 16px 14px!important;width:auto!important;background:#f3f6ff}
.task-inline-extra-content{display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap;min-width:0}
.task-inline-note{display:flex;align-items:flex-start;gap:14px;flex:1;min-width:300px}.task-inline-note[hidden]{display:none}.task-inline-note>span{font-size:var(--text-ui);color:var(--muted);padding-top:10px;white-space:nowrap}
.task-workspace-table textarea[data-task-inline-field]{height:60px;min-height:60px;resize:vertical;border-color:var(--line);background:white}
.task-inline-extra [data-task-inline-feedback]{margin:9px 0 0;color:var(--muted);font-size:13px;line-height:1.6;white-space:pre-line}
.task-inline-extra [data-task-inline-feedback]:empty{display:none}.task-inline-extra [data-task-inline-feedback].is-error{color:#b54747}
.task-comment-count:focus-visible,.task-detail-link:focus-visible,.task-inline-actions button:focus-visible,.task-title-link:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media(max-width:800px){.table-overflow>.task-workspace-table{width:1000px;min-width:1000px}.task-workspace-table th:first-child,.task-workspace-table td:first-child{width:130px}.task-workspace-table th:nth-child(2){width:110px}.task-workspace-table th:nth-child(3){width:100px}.task-workspace-table th:nth-child(4),.task-workspace-table th:nth-child(5){width:170px}.task-workspace-table th:nth-child(6){width:160px}.task-workspace-table th:nth-child(7){width:70px}.task-workspace-table th:last-child,.task-workspace-table td:last-child{width:90px}.task-inline-name .rd-row-number{display:none}.task-workspace-scroll .rd-table-heading>span{font-size:12px}.task-workspace-table th:first-child,.task-workspace-table td:first-child{position:sticky;left:0;z-index:1;background:#fff}.task-workspace-table th:first-child{background:#f8faff}.task-workspace-table tr.is-dirty td:first-child{background:#f3f6ff}.task-workspace-table tr.has-error td:first-child{background:#fff7f6}.task-workspace-table .task-inline-extra>td{position:static}.task-workspace-table [data-task-inline-field]:focus{font-size:16px}}
@media(max-width:520px){
 .task-form .field-grid{grid-template-columns:1fr}
 .task-form .field{grid-column:1/-1!important}
 .task-mode .project-meta{display:grid;grid-template-columns:1fr;gap:12px;flex-basis:100%}
 .task-mode .project-meta>div{justify-content:space-between;white-space:normal}
 .task-mode .project-meta dd{text-align:right}
 .task-mode .project-toolbar{margin-top:16px}
 .task-resource-links{justify-content:flex-start;gap:6px 14px}
 .task-filters .rd-search{flex-basis:100%}
 .task-filters .task-project-filter select{max-width:none}
 .task-empty{padding-inline:16px}
}

/* Arrangement and results are visible at the point of work. */
.table-overflow>.task-workspace-table{min-width:1420px}
.task-workspace-table th:first-child,.task-workspace-table td:first-child{width:20%}
.task-workspace-table th:nth-child(2){width:10%}.task-workspace-table th:nth-child(3){width:9%}
.task-workspace-table th:nth-child(4),.task-workspace-table th:nth-child(5){width:14%}
.task-workspace-table th:nth-child(6){width:10%}.task-workspace-table th:nth-child(7){width:10%}.task-workspace-table th:nth-child(8){width:5%}
.task-workspace-table th:last-child,.task-workspace-table td:last-child{width:8%}
.task-planning-cell{position:relative;min-width:0;border:1px solid transparent;border-radius:5px;padding:2px}
.task-planning-cell.needs-arrangement{background:#fff9e8;border-color:#f4dc98}
.task-planning-cell.is-missing{background:#fff4cf;border-color:#eab84b}
.task-planning-cell.needs-arrangement [data-task-inline-field]{color:#745313}
.task-planning-cell.needs-arrangement [data-task-inline-field]:focus{color:var(--ink)}
.task-planning-required{position:absolute;right:7px;top:-8px;padding:0 4px;border-radius:3px;background:#fff4cf;color:#8a6418;font-size:11px;line-height:15px;pointer-events:none}
.task-overdue-phase{display:block;margin:1px 0 0 16px;font-size:12px;line-height:16px;color:#b45249}
.task-workspace-table .is-overdue>.rd-date-cell:nth-child(5){color:#b45249}
.task-inline-files{display:flex;align-items:center;gap:5px 8px;flex-wrap:wrap;min-width:0;font-size:13px}
.task-file-empty{color:var(--muted);padding:0 4px}
.task-file-upload{position:relative;display:inline-flex;align-items:center;min-height:30px;padding:4px 5px;border:1px solid transparent;border-radius:4px;white-space:nowrap;color:var(--blue);cursor:pointer}
.task-file-upload:hover{background:var(--soft);border-color:var(--line)}
.task-file-upload:focus-within{outline:2px solid var(--blue);outline-offset:2px}
.task-file-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.task-file-upload:has(input:disabled){opacity:.6;cursor:wait}.task-file-upload input:disabled{cursor:wait}
.task-file-list{min-width:0;max-width:100%}.task-file-list summary{list-style:none;display:flex;gap:4px;align-items:center;cursor:pointer;min-height:30px;color:var(--blue);padding:4px}
.task-file-list summary::-webkit-details-marker{display:none}.task-file-list summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.task-file-list[open]{flex-basis:100%}.task-file-list>div{display:grid;gap:4px;max-height:132px;overflow:auto;padding:4px 6px 8px;background:var(--soft);border-radius:4px}
.task-file-list a{font-size:12px;line-height:1.5;overflow-wrap:anywhere;color:var(--ink);text-decoration:none}.task-file-list a:hover{text-decoration:underline}
.task-file-draft{display:block;flex-basis:100%;color:#906a20;font-size:12px;line-height:16px}.task-file-draft[hidden]{display:none}
@media(max-width:800px){
 .table-overflow>.task-workspace-table{width:1170px;min-width:1170px}
 .task-workspace-table th:first-child,.task-workspace-table td:first-child{width:130px}
 .task-workspace-table th:nth-child(2){width:116px}.task-workspace-table th:nth-child(3){width:120px}
 .task-workspace-table th:nth-child(4),.task-workspace-table th:nth-child(5){width:174px}
 .task-workspace-table th:nth-child(6){width:150px}.task-workspace-table th:nth-child(7){width:140px}.task-workspace-table th:nth-child(8){width:70px}
 .task-workspace-table th:last-child,.task-workspace-table td:last-child{width:90px}
}

/* Task creation uses the same content edges and two writing areas as R&D. */
.task-form-mode .rd-banner{min-height:96px;padding-block:16px}
.task-form-mode #panel>.panel-scroll{padding-block:16px 0;scroll-padding-bottom:68px}
.task-form-mode #panel>.panel-scroll>.sections{max-width:none;margin-inline:0}
.task-editor{container:task-editor / inline-size;width:100%;min-width:0}
.task-editor-columns{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:clamp(16px,2vw,28px);align-items:stretch}
.task-editor-basics{display:flex;min-width:0;flex-direction:column;gap:14px}
.task-editor-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;min-width:0}
.task-editor-dates{grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr))}
.task-editor .task-editor-pair>.field,.task-editor .product-context .field{grid-column:auto}
.task-editor .field>label{margin-bottom:7px}
.task-editor-optional{font-size:var(--text-meta);font-weight:400;color:var(--muted)}
.task-editor .field input:not([type=file]),.task-editor .field select{display:block;min-width:0;width:100%;height:42px;min-height:42px;padding-block:8px}
.task-editor .task-upload{padding:8px 12px;min-height:50px;flex-wrap:wrap;gap:6px 12px;border:1px dashed #b3c8f5;border-radius:6px;background:#f8faff}
.task-editor .task-upload input{flex:1 1 13rem;min-width:0;max-width:100%;width:auto}
.task-editor .task-upload small{font-size:var(--text-meta);white-space:normal}
.task-editor .file-names{max-height:4.6em;overflow:auto;overflow-wrap:anywhere}
.task-editor .task-editor-description,.task-editor .task-editor-description .field{min-width:0;display:flex;flex-direction:column}
.task-editor .task-editor-description .field{flex:1}
.task-editor .task-editor-description textarea{flex:1;width:100%;height:auto;min-height:clamp(17rem,38dvh,25rem);padding:14px 16px;line-height:1.8;resize:vertical;font-size:var(--text-body)}
.task-editor.product-task-form .product-context{margin:0;padding:10px 12px;gap:12px 16px}
.task-editor>.form-error:empty{display:none}
.task-editor .form-footer{position:sticky;bottom:0;z-index:2;margin-top:14px;padding:12px 0 max(12px,env(safe-area-inset-bottom));background:white}
@container task-editor (max-width:1080px){.task-editor-columns{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}}
@container task-editor (max-width:750px){.task-editor-columns{grid-template-columns:minmax(0,1fr);gap:18px}.task-editor .task-editor-description textarea{height:15rem;min-height:15rem;flex:auto}}
@container task-editor (max-width:410px){.task-editor-pair,.task-editor.product-task-form .product-context{grid-template-columns:minmax(0,1fr)}}
@media(max-height:780px) and (min-width:801px){.task-form-mode .rd-banner{min-height:80px;padding-block:10px}.task-editor-basics{gap:10px}.task-editor .form-footer{margin-top:10px;padding-block:10px}}
@media(max-width:800px){.task-editor-columns{grid-template-columns:minmax(0,1fr)}.task-editor .field input:not([type=file]),.task-editor .field select,.task-editor .field textarea{font-size:max(16px,var(--text-body))}}

/* Source is attached to the name, never to the status dot or an editable field. */
.task-origin-chip{flex:none;align-self:center;white-space:nowrap;line-height:17px;padding:0 5px;border:1px solid #9aadd7;border-radius:3px;color:#4d608a;background:#f8faff;font:500 12px/17px var(--font-ui)}
.task-origin-chip[data-origin=design]{border-color:#70a8b6;color:#346879;background:#f1fcff}
.task-origin-chip[data-origin=project]{border-color:#aba1c6;color:#655880;background:#f8f6fc}
.task-origin-chip[data-origin=department]{border-style:dashed}
.task-origin-chip[data-origin=unknown]{border-style:dotted;color:#596885;border-color:#a3aec2;background:#fafbfe}
.task-inline-name>.task-title-link{flex:1 1 0}
@media(max-width:800px){
 .task-inline-name:has(.task-origin-chip){display:grid;grid-template-columns:minmax(0,1fr) 24px;align-content:center;gap:1px 3px}
 .task-inline-name:has(.task-origin-chip)>:is(input,.task-title-link){grid-column:1;grid-row:1;width:100%;min-width:0}
 .task-inline-name:has(.task-origin-chip)>.task-detail-link{grid-column:2;grid-row:1}
 .task-inline-name>.task-origin-chip{grid-column:1/-1;grid-row:2;justify-self:start}
}

.task-editor [data-task-workflow-field][hidden]{display:none}
.task-stage-summary,.task-stage-summary form{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.task-stage-summary{font-size:var(--text-ui);color:var(--muted)}
.task-stage-summary select{border:1px solid #c7d6fb;border-radius:5px;background:white;color:var(--ink);font:inherit;padding:7px 10px}
.task-stage-summary .ui-button{min-height:34px;padding:5px 12px}
.task-stage-summary .form-error:empty{display:none}

.task-inline-project:has(.design-dispatch-link){flex-wrap:wrap}
.design-dispatch-link{background:none;border:0;color:#244dd7;padding:.15rem 0;font:inherit;font-size:.8rem;white-space:nowrap;cursor:pointer}
.design-dispatch-link:hover{text-decoration:underline}
.design-dispatch-link:focus-visible{outline:2px solid #244dd7;outline-offset:2px}

/* Keep an open return separate from the employee's original delivery. */
.task-return-feedback{padding:14px 18px;border-inline-start:3px solid #c07824;background:#fff8eb;color:#5a391b;border-radius:4px;overflow-wrap:anywhere}
.task-return-feedback>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.task-return-feedback h2{font:600 16px/1.5 var(--font-ui),sans-serif;margin:0}
.task-return-feedback p{margin:6px 0;white-space:pre-wrap;line-height:1.6}
.task-return-feedback small{font:400 13px/1.5 var(--font-ui),sans-serif;color:#6a5134}
