/* Editable task fields follow the same edge-to-edge grid as read-only details. */
.workspace-tools>.new-task-button{width:100px;height:34px;min-height:34px;padding:0 10px;border-radius:9px;font-size:12px;white-space:nowrap}
.task-editor{min-height:100%;display:flex;flex-direction:column}
.task-editor>.task-meta-table,.task-editor>.task-description-table{margin:0}
.task-editor .task-meta-table td{vertical-align:middle}
.task-editor input:not([type=file]),.task-editor textarea{width:100%;min-width:0;border:1px solid var(--site-line);border-radius:6px;background:#fff;padding:7px 8px;font-size:12px;font-weight:400;line-height:1.6}
.task-editor input:focus,.task-editor textarea:focus{outline:none;box-shadow:none}
.task-editor .standard-select,.task-editor .select-trigger{width:100%;min-width:0;font-size:12px}
.task-editor .select-trigger{min-height:34px;padding:6px 8px;border-radius:6px;gap:7px}
.task-editor .task-meta-table td{padding:6px 9px}
.task-editor .task-meta-table td:has(input[type=datetime-local]){overflow:visible;white-space:normal}
.task-editor .task-description-cell{padding:10px}
.task-editor .task-description-cell textarea{display:block;min-height:340px;height:100%;resize:vertical;border:0;padding:3px 0;line-height:1.9}
.task-editor .task-description-table td{height:385px}
.task-image-tools{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.task-image-tools button{min-height:32px;padding:5px 12px;border:1px solid var(--site-line);border-radius:7px;background:#fff;font-size:12px}
.task-editor-gallery figure{position:relative;margin:0 0 12px}
.task-editor-gallery img{max-height:300px;margin:0}
.task-editor-gallery figure button{position:absolute;top:7px;right:7px;background:#fff;padding:4px 9px;border:1px solid var(--site-line);border-radius:6px;font-size:11px}
.task-editor .task-image-empty{min-height:260px;background:#fff}
.task-editor-hint{font-size:11px;line-height:1.7;margin:9px 0 0}
.task-editor .drag-over{outline:2px dashed #a1be53;outline-offset:-4px;background:#f3f8e8}
.task-editor-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;position:sticky;bottom:0;z-index:2;background:#fff;padding:12px;border-top:1px solid var(--site-line);margin-top:auto}
.task-editor-actions button{width:100px;min-height:32px;padding:5px 8px;border-radius:7px;font-size:12px;flex-shrink:0}

.task-editor-error{margin:10px 12px;padding:9px 12px;border:1px solid #d8afa9;border-radius:7px;background:#f9efed;font-size:12px}
@media(max-width:600px){.workspace-tools{gap:6px}.workspace-tools>.new-task-button{width:80px}.task-editor-actions{flex-wrap:wrap}.task-editor .task-description-cell textarea{min-height:280px}.task-editor .task-meta-table td{padding:7px}}

.task-editor-gallery>svg{display:block;width:100%;height:auto}

/* Image actions live at the right edge of the screenshot half of the heading. */
.task-image-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;width:50%;padding-right:10px;flex-wrap:wrap}
.task-image-heading .task-image-tools{margin:0;gap:6px}
.task-image-heading button{font-size:11px;font-weight:400;padding:4px 9px;min-height:28px;white-space:nowrap}

/* Plain text entry and muted, system-owned values. */
.task-editor .task-overview-copy input{border:0;border-radius:0;background:transparent;padding-inline:0;outline:none;box-shadow:none}
.task-editor-hint{font-size:11px;font-weight:400;margin:5px 0 0;line-height:1.6}
.task-system-value{display:flex;align-items:center;min-height:34px;width:100%;max-width:100%;padding:7px 8px;border-radius:6px;background:#f0f2ee;overflow:hidden}
main .task-system-value,main .task-system-value *{color:#737a70!important;-webkit-text-fill-color:#737a70}
.task-editor-gallery figure .image-icon-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:30px;padding:0;background:#fff;border:1px solid var(--site-line);border-radius:6px}
.image-icon-button svg{display:block;width:17px;height:17px}
.task-editor-gallery figure>.image-original-button{left:7px;right:auto}
#image-original-dialog{width:min(1100px,calc(100vw - 32px));height:min(900px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:16px;border-radius:16px;overflow:hidden}
#image-original-dialog[open]{display:flex;flex-direction:column;gap:12px}
#image-original-dialog .dialog-header{margin:0;flex-shrink:0;align-items:center}
#image-original-dialog h2{font-size:17px;font-weight:500}
#image-original-info{margin-right:auto;font-size:12px}
.image-original-viewport{position:relative;flex:1;min-height:0;overflow:hidden;background:#eef1eb;border:1px solid var(--site-line);border-radius:8px;cursor:grab;touch-action:none;user-select:none}
.image-original-viewport.is-panning{cursor:grabbing}
#image-original-image{position:absolute;left:0;top:0;display:block;max-width:none;max-height:none;margin:0;transform-origin:0 0;pointer-events:none;user-select:none}
#image-remove-dialog{width:360px;max-width:calc(100vw - 28px);border-radius:16px;padding:20px}
#image-remove-dialog h2{font-size:17px;font-weight:500}
#image-remove-dialog p{font-size:13px;margin:18px 0}
#image-remove-dialog .dialog-actions button{min-width:88px;height:32px;padding:0 10px;border-radius:7px;font-size:12px}

.task-view{display:flex;flex-direction:column;min-height:100%}.task-view>table{margin:0}
.task-view .task-image-cell figure{position:relative;margin:0 0 8px}.task-view .image-original-button{position:absolute;left:7px;top:7px;width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:6px;background:#fff}
#image-capture-dialog{width:420px;max-width:calc(100vw - 28px);padding:20px;border-radius:16px}
#image-capture-dialog h2{font-size:17px;font-weight:500}#image-capture-dialog p{font-size:13px;line-height:1.9}#image-capture-dialog kbd{display:inline-block;padding:2px 7px;border:1px solid var(--site-line);border-radius:5px;font:inherit;background:#f5f7f2}
#image-capture-paste{padding:24px 15px;text-align:center;border:1px dashed #c7d0c0;border-radius:8px;font-size:13px;background:#fafbf7;outline:none}

.task-image-heading{width:100%;flex-wrap:nowrap;padding:0;gap:12px}
.task-description-label{display:flex;align-items:center;flex-wrap:wrap;gap:0;line-height:1.7}
.task-description-label .task-editor-hint{margin:0;font-weight:400}
.task-image-heading .task-image-tools{flex-shrink:0;margin-right:0}
.task-editor .task-description-table td{height:320px;padding:10px;vertical-align:top}
.task-editor .task-image-empty{height:280px;min-height:280px}
.task-editor .task-description-cell textarea{height:280px;min-height:280px;resize:vertical}
.task-editor-gallery figure:last-child{margin-bottom:0}
main .task-editor-actions button:disabled{background:#eff0ed;color:#969b92!important;border-color:#dce1d8;cursor:not-allowed}
@media(max-width:1100px){.task-image-heading .task-image-tools{margin-right:0}}

/* View and edit share the same grid, field metrics and attachment layout. */
.task-record-detail{--task-field-height:34px;--task-row-height:48px;--task-content-height:320px}
.task-record-detail .task-meta-table tr{height:var(--task-row-height)}
.task-record-detail .task-meta-table th,.task-record-detail .task-meta-table td,.task-editor .task-meta-table td{height:var(--task-row-height);padding:6px 9px;vertical-align:middle}
.task-record-detail .task-meta-table input,.task-record-detail .task-system-value,.task-editor .select-trigger{height:var(--task-field-height);min-height:var(--task-field-height)}
.task-record-detail .task-description-table th{height:48px;padding:8px 10px;vertical-align:middle}
.task-record-detail .task-description-table td,.task-editor .task-description-table td{height:var(--task-content-height);padding:10px;vertical-align:top}
.task-record-detail .task-image-cell img,.task-editor-gallery img{max-height:300px;margin:0}
.task-record-detail .task-image-empty{height:280px;min-height:280px}
.task-record-detail .task-description-cell>.preserve,.task-editor .task-description-cell textarea{min-height:280px;margin:0;padding:3px 0;font-size:12px;line-height:1.9}
.task-editor-actions{min-height:57px}
#task-accept-dialog{width:420px;max-width:calc(100vw - 28px);padding:20px;border-radius:16px}
#task-accept-dialog h2{font-size:17px;font-weight:500}#task-accept-dialog p{font-size:13px;overflow-wrap:anywhere;margin:16px 0}
#task-accept-dialog button{min-width:88px;height:32px;padding:0 10px;border-radius:7px;font-size:12px}
.task-image-cell .task-image-tools{display:flex;justify-content:flex-end;align-items:center;height:32px;gap:8px;margin:0 0 10px}
.task-image-cell .task-image-tools button{width:100px;height:var(--feedback-control-height,32px);min-height:var(--feedback-control-height,32px);padding:0 8px;border-radius:var(--feedback-control-radius,8px);font-size:var(--feedback-control-font,12px)}
.task-image-tools-placeholder{visibility:hidden}
.task-record-detail .task-description-table td{height:362px}
.task-record-detail .task-image-cell figure,.task-editor-gallery figure{margin:0 0 12px}
.task-record-detail .task-image-cell figure:last-child,.task-editor-gallery figure:last-child{margin-bottom:0}
#task-accept-dialog .dialog-actions button,#image-remove-dialog .dialog-actions button,#image-capture-dialog .dialog-actions button{display:inline-flex;align-items:center;justify-content:center;width:100px;height:32px;min-height:32px;max-height:32px;padding:0 10px;border-radius:7px;font-size:12px;line-height:1.5}

/* Capture controls belong to the left column heading. */
.task-description-table .task-image-heading{flex-wrap:wrap;gap:6px 10px}.task-image-heading .task-description-label{flex:1 1 240px}.task-description-table th .task-image-tools{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;gap:8px;height:32px;margin:0}.task-description-table th .task-image-tools button,.task-description-table th .task-image-tools-placeholder span{width:100px;height:var(--feedback-control-height,32px);min-height:var(--feedback-control-height,32px);padding:0 8px;border-radius:var(--feedback-control-radius,8px);font-size:var(--feedback-control-font,12px)}.task-description-table th .task-image-tools-placeholder span{display:block}.task-record-detail .task-description-table td{height:320px}

.task-description-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.task-template-tools{display:flex;gap:8px;align-items:center}.task-template-tools button,.task-template-placeholder span{display:inline-flex;align-items:center;justify-content:center;width:100px;height:var(--feedback-control-height,32px);min-height:var(--feedback-control-height,32px);padding:0 8px;border-radius:var(--feedback-control-radius,8px);font-size:var(--feedback-control-font,12px);font-weight:400;background:transparent;border:0}.task-template-placeholder{visibility:hidden}
