/* A-style desktop preview for project execution. Original and mobile views remain unchanged. */
@media (min-width: 769px) {
  body.pc-ui-preview .execution-page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    padding: 20px 24px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    background: #fff;
  }

  body.pc-ui-preview .execution-eyebrow {
    color: #175fc6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
  }

  body.pc-ui-preview .execution-page-intro h2 {
    margin: 5px 0 4px;
    color: #20262d;
    font-size: 23px;
    line-height: 1.3;
  }

  body.pc-ui-preview .execution-page-intro p,
  body.pc-ui-preview .execution-panel-head p,
  body.pc-ui-preview .execution-list-heading p {
    margin: 0;
    color: #66717e;
    font-size: 13px;
    line-height: 1.55;
  }

  body.pc-ui-preview .execution-page-metric {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    padding-left: 24px;
    border-left: 1px solid #e7ebef;
  }

  body.pc-ui-preview .execution-page-metric strong {
    color: #175fc6;
    font-size: 27px;
    line-height: 1.1;
  }

  body.pc-ui-preview .execution-page-metric span,
  body.pc-ui-preview .execution-count {
    color: #687583;
    font-size: 12px;
    white-space: nowrap;
  }

  body.pc-ui-preview .execution-panel-head,
  body.pc-ui-preview .execution-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e7ebef;
  }

  body.pc-ui-preview .execution-panel-head h3,
  body.pc-ui-preview .execution-list-heading h4 {
    margin: 0 0 3px;
    font-size: 16px;
    color: #20262d;
  }

  body.pc-ui-preview .execution-create-toggle {
    flex: 0 0 auto;
    width: auto;
    min-width: 116px;
    margin: 0;
    background: #175fc6;
    border-color: #175fc6;
    color: #fff;
  }

  body.pc-ui-preview .execution-create-toggle:hover { background: #124b9c; color: #fff; }
  body.pc-ui-preview .execution-form-collapsed { display: none !important; }

  body.pc-ui-preview .execution-task-create-panel .task-dispatch-form,
  body.pc-ui-preview .execution-asset-panel .asset-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 17px;
    padding: 18px;
    border: 1px solid #e3e8ee;
    border-radius: 6px;
    background: #f9fafb;
  }

  body.pc-ui-preview .execution-form-field,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date,
  body.pc-ui-preview .execution-asset-edit-card .task-schedule-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    height: auto;
    margin: 0;
    color: #4e5967;
    font-size: 12px;
    font-weight: 600;
  }

  body.pc-ui-preview .execution-form-field > span,
  body.pc-ui-preview .execution-asset-edit-card .task-schedule-field > span { line-height: 1.3; }

  body.pc-ui-preview .execution-form-field > input,
  body.pc-ui-preview .execution-form-field > select,
  body.pc-ui-preview .execution-form-field > textarea,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date > input,
  body.pc-ui-preview .execution-asset-edit-card .task-schedule-field > input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    height: 38px;
    margin: 0;
    border-color: #d7dfe8;
    background: #fff;
    color: #20262d;
    font-size: 13px;
  }

  body.pc-ui-preview .execution-form-field > textarea {
    min-height: 80px;
    height: auto;
    resize: vertical;
  }

  body.pc-ui-preview .execution-task-create-panel .task-inline-date-label {
    position: static;
    order: -1;
    transform: none;
    color: #4e5967;
    font-size: 12px;
    font-weight: 600;
    opacity: 1;
  }

  body.pc-ui-preview .execution-task-create-panel .task-inline-date.has-value .task-inline-date-label { opacity: 1; }
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input { color: #20262d; caret-color: #20262d; }
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit-fields-wrapper,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit-text,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit-year-field,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit-month-field,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit-day-field,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit-hour-field,
  body.pc-ui-preview .execution-task-create-panel .task-inline-date:not(.has-value) > input::-webkit-datetime-edit-minute-field { color: #20262d; }

  body.pc-ui-preview .execution-task-create-panel .execution-form-field-description,
  body.pc-ui-preview .execution-task-create-panel .execution-form-field-address { grid-column: span 2; }

  body.pc-ui-preview .execution-task-create-panel .project-permission-picker { align-self: end; min-width: 0; height: auto; }
  body.pc-ui-preview .execution-task-create-panel .task-dispatch-form > button[type="submit"] { grid-column: 1 / -1; justify-self: end; width: auto; min-width: 124px; height: 38px; }

  body.pc-ui-preview .execution-task-board-panel .task-board-filters { margin: 16px 0 10px; }
  body.pc-ui-preview .execution-task-board-panel .task-board-filter {
    padding: 8px 13px;
    border-color: #d9e0e7;
    border-radius: 5px;
    background: #f7f9fb;
    color: #4e5967;
  }
  body.pc-ui-preview .execution-task-board-panel .task-board-filter.active { background: #eaf1ff; border-color: #a9c5f4; color: #124b9c; }
  body.pc-ui-preview .execution-task-board-panel .task-inline-note { margin-bottom: 12px; color: #75808d; font-size: 12px; }
  body.pc-ui-preview .execution-task-board-panel .task-board-list { gap: 9px; }
  body.pc-ui-preview .execution-task-board-panel .task-card { border-color: #e0e6ec; border-radius: 6px; box-shadow: none; }
  body.pc-ui-preview .execution-task-board-panel .task-card.expanded { border-color: #a9c5f4; box-shadow: 0 6px 18px rgba(24, 71, 130, .07); }
  body.pc-ui-preview .execution-task-board-panel .task-card-toggle { padding: 16px 18px; background: #fff; }
  body.pc-ui-preview .execution-task-board-panel .task-card-toggle:hover { background: #f8fbff; }
  body.pc-ui-preview .execution-task-board-panel .task-card-detail { padding: 16px 18px 18px; }
  body.pc-ui-preview .execution-task-board-panel .task-summary-card,
  body.pc-ui-preview .execution-task-board-panel .task-card-section { border-radius: 5px; }

  body.pc-ui-preview .execution-stat-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: -2px 0 14px;
  }
  body.pc-ui-preview .execution-stat-strip > span {
    padding: 7px 11px;
    border: 1px solid #e0e6ec;
    border-radius: 5px;
    background: #fff;
    color: #66717e;
    font-size: 12px;
  }
  body.pc-ui-preview .execution-stat-strip strong { margin-left: 4px; color: #175fc6; font-size: 14px; }
  body.pc-ui-preview .execution-asset-panel .asset-form-grid { margin-bottom: 18px; }
  body.pc-ui-preview .execution-asset-panel .asset-form-inline-field { display: flex; min-height: 38px; height: 38px; align-self: end; }
  body.pc-ui-preview .execution-asset-panel .asset-form-inline-field > input { height: 100%; }
  body.pc-ui-preview .execution-asset-panel .execution-form-field-notes { grid-column: 1 / -1; }
  body.pc-ui-preview .execution-asset-panel .asset-form-submit { grid-column: 1 / -1; justify-self: end; width: auto; min-width: 124px; min-height: 38px; }
  body.pc-ui-preview .execution-asset-panel .execution-list-heading { margin: 18px 0 14px; }
  body.pc-ui-preview .execution-asset-panel .asset-table-filter-grid { grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(160px, 1fr)) auto; gap: 10px; }
  body.pc-ui-preview .execution-asset-panel .asset-table-filter-grid > button { width: auto; margin: 0; }
  body.pc-ui-preview .execution-asset-panel .asset-project-group { border-color: #dfe5ec; border-radius: 6px; background: #fff; box-shadow: none; }
  body.pc-ui-preview .execution-asset-panel .asset-project-group-head h4 { font-size: 15px; }
  body.pc-ui-preview .execution-asset-panel .asset-location-group { border-radius: 5px; }
  body.pc-ui-preview .execution-asset-panel .asset-location-group .table-scroll { max-width: 100%; overflow-x: auto; }
  body.pc-ui-preview .execution-asset-panel .asset-location-group table { min-width: 1080px; }
  body.pc-ui-preview .execution-asset-panel .asset-project-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.pc-ui-preview .execution-asset-panel .asset-project-filter-row > button { margin: 0; }

  body.pc-ui-preview .execution-asset-edit-card { width: min(94vw, 960px); min-width: 0; max-height: 92vh; overflow-y: auto; }
  body.pc-ui-preview #assetEditModal,
  body.pc-ui-preview #maintenanceTaskModal,
  body.pc-ui-preview #maintenanceRepairTaskModal,
  body.pc-ui-preview #maintenancePhotoModal,
  body.pc-ui-preview #taskPhotoModal { z-index: 110; }
  body.pc-ui-preview #assetEditModal .preview-modal-close,
  body.pc-ui-preview #maintenanceTaskModal .preview-modal-close,
  body.pc-ui-preview #maintenanceRepairTaskModal .preview-modal-close,
  body.pc-ui-preview #maintenancePhotoModal .preview-modal-close,
  body.pc-ui-preview #taskPhotoModal .preview-modal-close { margin: 0 0 10px auto; }
  body.pc-ui-preview .execution-asset-edit-card h3 { padding-right: 78px; }
  body.pc-ui-preview .execution-asset-edit-card #assetEditForm { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; min-width: 0; }
  body.pc-ui-preview .execution-asset-edit-card #assetEditForm > * { min-width: 0; }
  body.pc-ui-preview .execution-asset-edit-card #assetEditForm .execution-form-field-notes { grid-column: 1 / -1; }
  body.pc-ui-preview .execution-asset-edit-card #assetEditForm .modal-actions { grid-column: 1 / -1; justify-content: flex-end; }
  body.pc-ui-preview .execution-asset-edit-card #assetEditForm .modal-actions button { width: auto; }

  body.pc-ui-preview .execution-maintenance-home .maintenance-project-home-head { padding-bottom: 13px; border-bottom: 1px solid #e7ebef; }
  body.pc-ui-preview .execution-maintenance-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 18px; }
  body.pc-ui-preview .execution-maintenance-stats .maintenance-plan-stat { min-width: 0; border-radius: 6px; box-shadow: none; }
  body.pc-ui-preview .execution-maintenance-home .maintenance-project-filters { margin-bottom: 15px; }
  body.pc-ui-preview .execution-maintenance-home .maintenance-project-table-wrap { max-width: 100%; overflow-x: auto; }
  body.pc-ui-preview .execution-maintenance-home .maintenance-project-table { min-width: 900px; }
  body.pc-ui-preview .execution-maintenance-home .maintenance-project-table th { background: #f6f8fa; }

  body.pc-ui-preview .execution-maintenance-detail .maintenance-project-detail-head { padding-bottom: 14px; border-bottom: 1px solid #e7ebef; }
  body.pc-ui-preview .execution-detail-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
  body.pc-ui-preview .execution-detail-facts > div { min-width: 0; padding: 11px 13px; border: 1px solid #e0e6ec; border-radius: 5px; background: #f8fafc; }
  body.pc-ui-preview .execution-detail-facts span { display: block; color: #697583; font-size: 12px; }
  body.pc-ui-preview .execution-detail-facts strong { display: block; margin-top: 5px; color: #26323e; font-size: 15px; overflow-wrap: anywhere; }
  body.pc-ui-preview .execution-section-nav { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 17px; }
  body.pc-ui-preview .execution-section-nav button { width: auto; margin: 0; padding: 8px 13px; border: 1px solid #d6e0ee; border-radius: 5px; background: #eef4fc; color: #175fc6; font-size: 12px; }
  body.pc-ui-preview .execution-section-nav button:hover { background: #dfeafb; }
  body.pc-ui-preview .execution-maintenance-detail .maintenance-entry-date-bar,
  body.pc-ui-preview .execution-maintenance-detail .maintenance-task-board,
  body.pc-ui-preview .execution-maintenance-detail .maintenance-period-board,
  body.pc-ui-preview .execution-maintenance-detail .maintenance-ledger-board,
  body.pc-ui-preview .execution-maintenance-detail .maintenance-form-section { border: 1px solid #e0e6ec; border-radius: 6px; background: #fff; }
  body.pc-ui-preview .execution-maintenance-detail .maintenance-entry-date-bar { background: #f9fafb; }
  body.pc-ui-preview .execution-maintenance-detail .maintenance-task-board,
  body.pc-ui-preview .execution-maintenance-detail .maintenance-period-board,
  body.pc-ui-preview .execution-maintenance-detail .maintenance-ledger-board { margin: 14px 0; padding: 17px; scroll-margin-top: 82px; }
  body.pc-ui-preview .execution-maintenance-detail .maintenance-record-table-wrap { max-width: 100%; overflow-x: auto; scroll-margin-top: 82px; }
  body.pc-ui-preview .execution-maintenance-detail .maintenance-ledger-table-wrap { max-width: 100%; overflow-x: auto; }
  body.pc-ui-preview .execution-maintenance-detail .maintenance-form-section { padding: 17px; }

  body.pc-ui-preview .execution-log-panel .execution-log-filters { grid-template-columns: minmax(200px, 1.5fr) minmax(180px, 1fr) auto auto; gap: 10px; margin: 16px 0 10px; }
  body.pc-ui-preview .execution-log-panel .execution-log-filters > button { width: auto; margin: 0; }
  body.pc-ui-preview .execution-log-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e1e6ec; border-radius: 5px; }
  body.pc-ui-preview .execution-log-table-wrap table { min-width: 0; width: 100%; table-layout: fixed; margin: 0; }
  body.pc-ui-preview .execution-log-table-wrap th { background: #f6f8fa; white-space: nowrap; }
  body.pc-ui-preview .execution-log-table-wrap td { vertical-align: top; }
  body.pc-ui-preview .execution-log-table-wrap td { white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
  body.pc-ui-preview .execution-log-table-wrap th:nth-child(1) { width: 17%; }
  body.pc-ui-preview .execution-log-table-wrap th:nth-child(2) { width: 19%; }
  body.pc-ui-preview .execution-log-table-wrap th:nth-child(3) { width: 36%; }
  body.pc-ui-preview .execution-log-table-wrap th:nth-child(4) { width: 12%; }
  body.pc-ui-preview .execution-log-table-wrap th:nth-child(5) { width: 16%; }
  body.pc-ui-preview .execution-log-pager,
  body.pc-ui-preview .execution-log-pager > div { display: flex; align-items: center; gap: 10px; }
  body.pc-ui-preview .execution-log-pager { justify-content: space-between; flex-wrap: wrap; margin-top: 13px; color: #687583; font-size: 12px; }
  body.pc-ui-preview .execution-log-pager button { width: auto; min-width: 72px; margin: 0; padding: 6px 10px; }
  body.pc-ui-preview .execution-log-pager button:disabled { opacity: .45; cursor: default; }
}

.activity-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.activity-filters label { display: block; min-width: 0; font-size: 13px; }
.activity-filters input,.activity-filters select { width: 100%; margin-top: 5px; }
.activity-buttons { display: flex; align-items: end; gap: 6px; }
.activity-buttons button { margin: 0; width: auto; }
.activity-sub { display: block; font-size: 12px; color: #657588; margin-top: 5px; }
.activity-content { margin-top: 6px; white-space: pre-wrap; }
.activity-status,.activity-error { margin: 12px 0; font-size: 13px; }
.activity-status { color: #657588; }
.activity-error { padding: 10px; color: #973514; background: #fff3e9; border: 1px solid #f0c6ab; border-radius: 5px; }
.execution-log-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid #e1e6ec; border-radius: 5px; }
.execution-log-table-wrap table { min-width: 560px; width: 100%; table-layout: fixed; margin: 0; }
.execution-log-table-wrap th { white-space: nowrap; }
.execution-log-table-wrap td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.activity-record-dialog { width: min(640px,90vw); max-height: 85vh; overflow: auto; padding: 24px; border: 1px solid #d8e0eb; border-radius: 10px; }
.activity-record-dialog::backdrop { background: #13243566; }
.activity-record-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.activity-record-head h3 { margin: 0; }
.activity-record-head > button { width: auto; flex: 0 0 auto; }
.activity-record-dialog dl { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.activity-record-dialog dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media(max-width:1100px) { .activity-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }

@media (min-width: 769px) and (max-width: 1199px) {
  body.pc-ui-preview .execution-task-create-panel .task-dispatch-form,
  body.pc-ui-preview .execution-asset-panel .asset-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-ui-preview .execution-maintenance-stats,
  body.pc-ui-preview .execution-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-ui-preview .execution-asset-panel .asset-table-filter-grid,
  body.pc-ui-preview .execution-log-panel .execution-log-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-ui-preview .execution-asset-edit-card #assetEditForm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop task workspace: keep these rules local to the task page. */
@media (min-width: 769px) {
  body.pc-ui-preview .task-workspace {
    --task-columns: minmax(240px, 1fr) minmax(150px, .18fr) 180px 154px 48px;
    color: #243247;
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
  }
  body.pc-ui-preview .task-workspace :is(button, input, select, textarea) { font-family: inherit; }
  body.pc-ui-preview .task-workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 2px 0 22px;
    padding: 2px 2px 0;
  }
  body.pc-ui-preview .task-workspace-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 20px; }
  body.pc-ui-preview .task-workspace-header h2 { margin: 0; color: #172b46; font-size: 25px; font-weight: 700; letter-spacing: -.5px; line-height: 1.4; }
  body.pc-ui-preview .task-workspace-counts { color: #748094; font-size: 13px; }
  body.pc-ui-preview .task-workspace-counts strong { color: #1b5dba; font-weight: 600; font-variant-numeric: tabular-nums; }
  body.pc-ui-preview .task-workspace-header .execution-create-toggle { padding: 10px 18px; min-height: 42px; border-radius: 8px; font-size: 14px; font-weight: 600; box-shadow: 0 3px 6px #175fc615; }
  body.pc-ui-preview .task-workspace .execution-task-create-panel { padding: 16px; margin: 0 0 16px; border-color: #e0e6ef; border-radius: 10px; box-shadow: none; }
  body.pc-ui-preview .task-workspace .execution-task-create-panel .task-dispatch-form { gap: 10px 16px; margin-top: 0; padding: 0; border: 0; background: none; }
  body.pc-ui-preview #taskForm .execution-form-field { gap: 4px; }
  body.pc-ui-preview #taskForm .task-dispatch-section { grid-column: 1 / -1; min-width: 0; padding: 0 0 12px; margin: 0; border-bottom: 1px solid #e7edf5; }
  body.pc-ui-preview #taskForm .task-dispatch-section-heading { margin: 0 0 8px; color: #243c5b; font-size: 15px; font-weight: 600; }
  body.pc-ui-preview #taskForm .task-dispatch-section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; align-items: start; }
  body.pc-ui-preview #taskForm .task-dispatch-span-all { grid-column: 1 / -1; }
  body.pc-ui-preview #taskForm .task-dispatch-span-2 { grid-column: span 2; }
  body.pc-ui-preview #taskForm .task-dispatch-hint { display: block; margin: 0; color: #718096; font-size: 12px; font-weight: 400; line-height: 1.45; }
  body.pc-ui-preview #taskForm .execution-form-field-description > textarea { min-height: 64px; }
  body.pc-ui-preview #taskForm .execution-form-field-address { grid-column: auto; }
  body.pc-ui-preview #taskForm .task-dispatch-person { min-width: 0; }
  body.pc-ui-preview #taskForm .task-dispatch-person .project-permission-panel { position: static; max-height: 220px; margin-top: 7px; box-shadow: none; }
  body.pc-ui-preview #taskForm .task-dispatch-person input[type="search"] { width: 100%; margin: 0 0 8px; min-height: 34px; }
  body.pc-ui-preview #taskForm .task-dispatch-upload { grid-column: 1 / -1; min-width: 0; display: grid; gap: 5px; padding: 9px 12px; border: 1px dashed #b9cce4; border-radius: 8px; background: #f8fbff; outline-offset: 3px; }
  body.pc-ui-preview #taskForm .task-dispatch-upload.is-drag-over { border-color: #1c63c7; background: #eef5ff; }
  body.pc-ui-preview #taskForm .task-dispatch-upload-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
  body.pc-ui-preview #taskForm .task-dispatch-file-picker { position: relative; display: inline-flex; align-items: center; width: auto; margin: 0; padding: 7px 13px; overflow: hidden; border: 1px solid #b9cfee; border-radius: 6px; background: #fff; color: #205fb3; font-size: 13px; font-weight: 500; cursor: pointer; }
  body.pc-ui-preview #taskForm .task-dispatch-file-picker:hover { background: #eef5ff; }
  body.pc-ui-preview #taskForm .task-dispatch-file-picker:focus-within { outline: 2px solid #2d72d2; outline-offset: 2px; }
  body.pc-ui-preview #taskForm .task-dispatch-file-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
  body.pc-ui-preview #taskForm .task-dispatch-file-picker:has(input:disabled) { opacity: .5; cursor: wait; }
  body.pc-ui-preview #taskForm .task-dispatch-upload > button { width: auto; margin: 0; padding: 8px 14px; border-radius: 6px; font-size: 13px; }
  body.pc-ui-preview #taskForm .task-dispatch-file-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 3px; }
  body.pc-ui-preview #taskForm .task-dispatch-file-list:empty { display: none; }
  body.pc-ui-preview #taskForm .task-dispatch-file { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 11px; border: 1px solid #e0e7f0; border-radius: 7px; background: #fff; }
  body.pc-ui-preview #taskForm .task-dispatch-file img { display: block; width: 48px; height: 48px; flex: 0 0 auto; object-fit: cover; border-radius: 5px; }
  body.pc-ui-preview #taskForm .task-dispatch-file :is(button, a) { width: auto; margin: 0; font-size: 12px; }
  body.pc-ui-preview #taskForm .task-dispatch-file .task-dispatch-preview { flex: 0 0 auto; padding: 0; border: 0; background: none; }
  body.pc-ui-preview #taskForm .task-dispatch-file > a { flex-shrink: 0; white-space: nowrap; }
  body.pc-ui-preview #taskForm .task-dispatch-file > :last-child { margin-left: auto; flex-shrink: 0; }
  body.pc-ui-preview #taskForm .task-dispatch-file-name { min-width: 0; overflow-wrap: anywhere; color: #304b6b; font-size: 13px; }
  body.pc-ui-preview #taskForm .task-dispatch-extra { border: 0; background: #f8fafc; padding: 8px 12px; border-radius: 7px; }
  body.pc-ui-preview #taskForm .task-extra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
  body.pc-ui-preview #taskDispatchSiteHint button { width: auto; margin: 5px 5px 0 0; }
  body.pc-ui-preview .task-detail-dispatch-files .task-dispatch-file-list { display: flex; flex-wrap: wrap; gap: 8px; }
  body.pc-ui-preview .task-detail-dispatch-files .task-dispatch-file { display: flex; align-items: center; gap: 14px; min-width: 0; max-width: 100%; padding: 12px 14px; border: 1px solid #e0e7f0; border-radius: 7px; background: #f8fafc; }
  body.pc-ui-preview .task-detail-dispatch-files .task-dispatch-file-name { min-width: 0; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-dispatch-files .task-dispatch-hint { display: block; margin-top: 3px; color: #718096; font-size: 12px; }
  body.pc-ui-preview .task-detail-dispatch-files :is(button, a) { width: auto; margin: 0; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-dispatch-files button { flex-shrink: 0; border: 1px solid #cbdcf3; background: #fff; color: #205fb3; font-weight: 500; }
  body.pc-ui-preview:has(.task-workspace) .af-header h3 { flex: 1; min-width: 0; }
  body.pc-ui-preview:has(.task-workspace) .af-header button { flex: 0 0 auto; width: auto; margin: 0; padding: 7px 16px; border: 1px solid #d6e0ee; background: #f5f8fc; color: #345477; }
  body.pc-ui-preview .task-workspace-board {
    padding: 0 22px 20px;
    margin: 0;
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 5px #21385404;
  }
  body.pc-ui-preview .task-workspace-board .task-board-filters {
    align-items: stretch;
    gap: 24px;
    margin: 0 0 20px;
    padding: 0;
    border-bottom: 1px solid #e9edf3;
  }
  body.pc-ui-preview .task-workspace-board .task-board-filter {
    position: relative;
    min-height: 59px;
    margin: 0;
    padding: 17px 2px 15px;
    border: 0;
    border-radius: 0;
    background: none;
    color: #647187;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
  }
  body.pc-ui-preview .task-workspace-board .task-board-filter:hover { color: #175fc6; background: none; }
  body.pc-ui-preview .task-workspace-board .task-board-filter.active { color: #175fc6; background: none; font-weight: 600; }
  body.pc-ui-preview .task-workspace-board .task-board-filter.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; border-radius: 3px 3px 0 0; background: #2165cc; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form { grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(120px, 1fr)) auto auto auto; gap: 10px; margin: 0; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > :is(input, select) { height: 38px; min-width: 0; padding: 7px 11px; border: 1px solid #dce3ec; border-radius: 7px; background: #fff; color: #34445b; font-size: 13px; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > input::placeholder { color: #8b96a5; }
  body.pc-ui-preview .task-workspace-board .task-attention-filter { gap: 6px; color: #637188; font-size: 12px; font-weight: 400; }
  body.pc-ui-preview .task-workspace-board .task-attention-filter input { accent-color: #175fc6; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > button { width: auto; min-height: 38px; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; }
  body.pc-ui-preview .task-workspace-board .task-filter-clear { border: 1px solid #dce3ec; background: #fff; color: #52627a; }
  body.pc-ui-preview .task-workspace-board .task-filter-clear:hover { background: #f4f7fb; color: #243247; }
  body.pc-ui-preview .task-workspace-list-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0; color: #8390a2; font-size: 12px; }
  body.pc-ui-preview .task-workspace-list-summary strong { color: #52627a; font-weight: 500; }
  body.pc-ui-preview .task-workspace-columns,
  body.pc-ui-preview .task-workspace-board .task-workspace-row { display: grid; grid-template-columns: var(--task-columns); gap: 20px; align-items: center; text-align: left; }
  body.pc-ui-preview .task-workspace-columns { padding: 11px 18px; border-radius: 6px; background: #f5f7fa; color: #7c8899; font-size: 12px; font-weight: 400; }
  body.pc-ui-preview .task-workspace-board .task-board-list { display: block; }
  body.pc-ui-preview .task-workspace-board .task-card { overflow: hidden; border: 0; border-bottom: 1px solid #e9edf3; border-radius: 0; box-shadow: none; }
  body.pc-ui-preview .task-workspace-board .task-card:last-child { border-bottom-color: transparent; }
  body.pc-ui-preview .task-workspace-board .task-card.expanded { margin: 0; border: 0; border-bottom: 1px solid #d7e4f5; border-radius: 0; box-shadow: none; }
  body.pc-ui-preview .task-workspace-board .task-workspace-row { width: 100%; padding: 20px 18px; border-radius: 0; color: #304157; font-size: 13px; font-weight: 400; line-height: 1.55; }
  body.pc-ui-preview .task-workspace-board .task-workspace-row > * { min-width: 0; }
  body.pc-ui-preview .task-workspace-board .task-card.expanded > .task-workspace-row { background: #f5f9ff; }
  body.pc-ui-preview .task-workspace-board .task-workspace-row:hover { background: #f8faff; }
  body.pc-ui-preview .task-workspace :is(button, input, select, textarea):focus-visible { outline: 2px solid #2d72d2; outline-offset: 3px; }
  body.pc-ui-preview .task-workspace-task { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-workspace-task .task-card-title { display: block; color: #243650; font-size: 14px; font-weight: 600; line-height: 1.65; }
  body.pc-ui-preview .task-workspace-task .task-card-meta { display: block; margin: 0; color: #7d899b; font-size: 12px; font-weight: 400; line-height: 1.5; }
  body.pc-ui-preview .task-workspace-task .task-card-sub { margin: 0; color: #64748b; font-size: 12px; font-weight: 400; line-height: 1.5; }
  body.pc-ui-preview .task-workspace-assignee { color: #45556d; overflow-wrap: anywhere; font-size: 13px; }
  body.pc-ui-preview .task-workspace-time { display: flex; flex-direction: column; gap: 5px; color: #45556d; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-workspace-time > :nth-child(2) { color: #8491a3; font-size: 11px; }
  body.pc-ui-preview .task-workspace-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  body.pc-ui-preview .task-workspace-status .badge { margin: 0; padding: 3px 8px; border: 0; border-radius: 5px; background: #eef3f9; color: #5e7491; font-size: 11px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
  body.pc-ui-preview .task-workspace-status .badge.warn { background: #fff4e2; color: #a66b19; }
  body.pc-ui-preview .task-workspace-status .badge.success { background: #eaf7f0; color: #318260; }
  body.pc-ui-preview .task-workspace-status .badge.danger { background: #fff0f0; color: #c45151; }
  body.pc-ui-preview .task-workspace-open { color: #2464b8; font-size: 12px; font-weight: 500; text-align: right; white-space: nowrap; }
  body.pc-ui-preview .task-workspace-board .task-card-detail { padding: 20px; background: #fcfdff; border-top: 1px solid #e7eef8; font-size: 13px; }
  body.pc-ui-preview .task-workspace-board .task-summary-card { padding: 12px 14px; border-color: #e5eaf2; border-radius: 7px; background: #fff; }
  body.pc-ui-preview .task-workspace-board .task-summary-value { font-size: 13px; font-weight: 500; }
}

@media (min-width: 769px) and (max-width: 1399px) {
  body.pc-ui-preview .task-workspace { --task-columns: minmax(190px, 1fr) 130px 154px 108px 44px; }
  body.pc-ui-preview .task-workspace-columns,
  body.pc-ui-preview .task-workspace-board .task-workspace-row { gap: 14px; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form { gap: 8px; grid-template-columns: minmax(180px, 1.5fr) repeat(2, minmax(110px, 1fr)) auto auto auto; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > button { padding-inline: 11px; }
}
@media (min-width: 769px) and (max-width: 1150px) {
  body.pc-ui-preview .task-workspace { --task-columns: minmax(150px, 1fr) 96px 128px 94px 42px; }
  body.pc-ui-preview .task-workspace-header { margin-bottom: 16px; }
  body.pc-ui-preview .task-workspace-heading { gap: 4px 14px; }
  body.pc-ui-preview .task-workspace-board { padding: 0 16px 16px; }
  body.pc-ui-preview .task-workspace-board .task-board-filters { gap: 16px; margin-bottom: 16px; }
  body.pc-ui-preview .task-workspace-board .task-board-filter { font-size: 13px; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form { grid-template-columns: minmax(160px, 1.25fr) repeat(2, minmax(100px, 1fr)); }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > button { justify-self: end; }
  body.pc-ui-preview .task-workspace-columns,
  body.pc-ui-preview .task-workspace-board .task-workspace-row { gap: 10px; padding-inline: 12px; }
}
@media (min-width: 769px) and (max-width: 999px) {
  body.pc-ui-preview .task-workspace { --task-columns: minmax(65px, 1fr) minmax(110px, 1.4fr) 90px 42px; }
  body.pc-ui-preview .task-workspace-heading { display: block; }
  body.pc-ui-preview .task-workspace-header h2 { font-size: 22px; }
  body.pc-ui-preview .task-workspace-counts { margin-top: 4px; }
  body.pc-ui-preview .task-workspace-board .task-board-filters { gap: 12px; }
  body.pc-ui-preview .task-workspace-board .task-board-filter { font-size: 12px; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > input[name="keyword"] { grid-column: 1 / -1; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > .task-attention-filter { grid-column: 1 / -1; }
  body.pc-ui-preview .task-workspace-board .task-list-filter-form > button { justify-self: stretch; }
  body.pc-ui-preview .task-workspace-columns { display: none; }
  body.pc-ui-preview .task-workspace-task { grid-column: 1 / -1; }
  body.pc-ui-preview .task-workspace-assignee::before { content: "处理人"; display: block; margin-bottom: 4px; color: #8491a3; font-size: 11px; }
}

/* A dedicated detail surface for desktop work orders. */
@media (min-width: 769px) {
  body.pc-ui-preview .task-detail-view { color: #26374d; font-size: 14px; line-height: 1.6; }
  body.pc-ui-preview .task-detail-view .task-card { overflow: visible; border: 0; border-radius: 0; background: transparent !important; box-shadow: none; animation: none; }
  body.pc-ui-preview .task-detail-view .task-card-detail { padding: 0; border: 0; background: none; }
  body.pc-ui-preview .task-detail-header { margin: 0 0 22px; }
  body.pc-ui-preview .task-detail-back { display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0 0 8px; padding: 5px 0; border: 0; background: none; color: #63758c; font-size: 13px; font-weight: 400; }
  body.pc-ui-preview .task-detail-back:hover { background: none; color: #175fc6; }
  body.pc-ui-preview .task-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
  body.pc-ui-preview .task-detail-heading h2 { margin: 0; color: #172b46; font-size: 23px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-heading-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 5px; color: #748197; font-size: 12px; }
  body.pc-ui-preview .task-detail-view .badge { padding: 3px 9px; border: 0; border-radius: 5px; background: #edf2f8; color: #5c708c; font-size: 12px; font-weight: 500; line-height: 1.7; }
  body.pc-ui-preview .task-detail-view .badge.success { background: #e8f6ee; color: #28805a; }
  body.pc-ui-preview .task-detail-view .badge.warn { background: #fff4e1; color: #a46a15; }
  body.pc-ui-preview .task-detail-view .badge.danger { background: #ffeded; color: #c45050; }
  body.pc-ui-preview .task-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
  body.pc-ui-preview .task-detail-main,
  body.pc-ui-preview .task-detail-sidebar { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  body.pc-ui-preview .task-detail-feedback-slot:empty { display: none; }
  body.pc-ui-preview .task-detail-section { min-width: 0; margin: 0; padding: 20px 22px; border: 1px solid #e0e7f0; border-radius: 10px; background: #fff; box-shadow: 0 2px 5px #21385403; }
  body.pc-ui-preview .task-detail-section > :is(h3,h4),
  body.pc-ui-preview .task-detail-section .task-history-title { margin: 0 0 16px; color: #243953; font-size: 16px; font-weight: 600; }
  body.pc-ui-preview .task-detail-section .muted { color: #7b889b; font-size: 12px; line-height: 1.65; }
  body.pc-ui-preview .task-detail-fields { margin: 0; }
  body.pc-ui-preview .task-detail-fields > div { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 12px; align-items: baseline; margin-bottom: 14px; }
  body.pc-ui-preview .task-detail-fields > div:last-child { margin-bottom: 0; }
  body.pc-ui-preview .task-detail-fields dt { margin: 0; color: #8490a1; font-size: 12px; font-weight: 400; }
  body.pc-ui-preview .task-detail-fields dd { margin: 0; color: #41536b; font-size: 13px; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid #eef1f5; }
  body.pc-ui-preview .task-detail-amounts > div { min-width: 0; }
  body.pc-ui-preview .task-detail-amounts span { display: block; color: #8090a3; font-size: 12px; }
  body.pc-ui-preview .task-detail-amounts strong { display: block; margin-top: 6px; color: #314864; font-size: 23px; line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-amounts > div:last-child strong { color: #c05244; }
  body.pc-ui-preview .task-detail-business-context > h3 { margin-bottom: 12px; }
  body.pc-ui-preview .task-detail-business-context .task-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  body.pc-ui-preview .task-detail-business-context .task-detail-fields > div { margin-bottom: 0; }
  body.pc-ui-preview .task-detail-requirements .client-detail-list { display: grid; gap: 6px; }
  body.pc-ui-preview .task-detail-requirements .client-detail-item { margin: 0; padding: 4px 0; border: 0; border-radius: 0; background: none; color: #53637a; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-requirements .client-detail-item strong { font-weight: 500; color: #354b64; }
  body.pc-ui-preview details.task-detail-requirements > summary { cursor: pointer; color: #637b98; font-size: 13px; font-weight: 500; }
  body.pc-ui-preview details.task-detail-requirements[open] > summary { margin-bottom: 12px; }
  body.pc-ui-preview .task-detail-view .task-result-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
  body.pc-ui-preview .task-detail-view .task-schedule-field { min-width: 0; margin: 0; gap: 7px; color: #64748b; font-size: 12px; font-weight: 400; }
  body.pc-ui-preview #taskForm .execution-form-field-projectId > label { margin: 0; color: #5e7088; font-size: 12px; }
  body.pc-ui-preview #taskForm .task-project-picker { position: relative; min-width: 0; }
  body.pc-ui-preview #taskForm .task-project-picker > input:not([type="hidden"]) { width: 100%; margin: 0; }
  body.pc-ui-preview #taskForm .task-project-menu { position: absolute; z-index: 40; inset: calc(100% + 4px) 0 auto; max-height: 260px; overflow-y: auto; padding: 5px; border: 1px solid #dce5f0; border-radius: 7px; background: #fff; box-shadow: 0 8px 24px #203a5920; }
  body.pc-ui-preview #taskForm .task-project-menu > button { display: grid; gap: 4px; width: 100%; min-height: 0; height: auto; margin: 0; padding: 9px 10px; border: 0; border-radius: 4px; background: #fff; text-align: left; color: #30465f; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
  body.pc-ui-preview #taskForm .task-project-menu > button:is(:hover,:focus) { background: #edf4ff; outline: 2px solid #cbdfff; outline-offset: -2px; }
  body.pc-ui-preview #taskForm .task-project-menu small { color: #8290a2; font-size: 11px; }
  body.pc-ui-preview #taskForm .task-project-menu > p { margin: 6px; }
  body.pc-ui-preview .task-project-unlinked-hint { margin: 14px 0 0; font-size: 12px; line-height: 1.7; }
  body.pc-ui-preview .task-link-project-details { margin-top: 13px; }
  body.pc-ui-preview .task-link-project-details > summary { width: fit-content; color: #2862a6; cursor: pointer; font-size: 13px; }
  body.pc-ui-preview .task-link-project-form { display: grid; gap: 10px; margin: 14px 0 0; }
  body.pc-ui-preview .task-link-project-form > p { margin: 0; font-size: 12px; line-height: 1.7; }
  body.pc-ui-preview .task-link-project-form > button { justify-self: start; width: auto; min-height: 34px; margin: 0; padding: 7px 10px; font-size: 12px; }
  body.pc-ui-preview .task-detail-view .task-schedule-field > :is(input,select,textarea) { width: 100%; min-width: 0; margin: 0; border: 1px solid #dce4ee; border-radius: 7px; background: #fff; color: #30435b; font-size: 13px; font-weight: 400; }
  body.pc-ui-preview .task-detail-view .task-schedule-field > :is(input,select) { min-height: 39px; padding: 8px 10px; }
  body.pc-ui-preview .task-detail-view .task-schedule-field > textarea { min-height: 112px; padding: 11px 12px; resize: vertical; line-height: 1.7; }
  body.pc-ui-preview .task-detail-view .task-result-main { grid-column: 1 / -1; }
  body.pc-ui-preview .task-detail-view .task-result-main > textarea { min-height: 138px; }
  body.pc-ui-preview .task-detail-view .task-renewal-followup { min-width: 0; min-height: 0; height: auto; grid-column: 1 / -1; }
  body.pc-ui-preview .task-detail-view .task-renewal-followup > .task-schedule-field { max-width: 320px; }
  body.pc-ui-preview .task-detail-view .task-renewal-followup .task-arrangement-editor-actions { margin-top: 8px; }
  body.pc-ui-preview .task-detail-view .task-result-extra { border-color: #e5ebf3; border-radius: 7px; background: #fafbfd; }
  body.pc-ui-preview .task-detail-view .task-result-extra > summary { font-size: 12px; font-weight: 400; color: #647991; }
  body.pc-ui-preview .task-detail-submit-actions { position: sticky; bottom: 12px; z-index: 5; grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; height: auto; min-height: 61px; margin: 3px -6px -4px; padding: 12px 6px 8px; border-top: 1px solid #e8edf4; background: #fff; box-shadow: 0 -5px 10px #ffffffd9; }
  body.pc-ui-preview .task-detail-submit-actions > button { width: auto; min-width: 120px; min-height: 40px; margin: 0; padding: 9px 16px; border-radius: 7px; font-size: 13px; font-weight: 500; }
  body.pc-ui-preview .task-detail-submit-actions > button.secondary { border: 1px solid #ccdaec; background: #f5f8fd; color: #2f608f; }
  body.pc-ui-preview .task-followup-state { display: flex; flex-direction: column; gap: 9px; }
  body.pc-ui-preview .task-followup-state > strong { padding: 9px 0; color: #53637a; font-size: 13px; font-weight: 500; }
  body.pc-ui-preview .task-followup-action-hint { margin: 0; font-size: 12px; line-height: 1.7; }
  body.pc-ui-preview .task-detail-view .task-photo-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
  body.pc-ui-preview .task-detail-view .task-photo-picker > input { min-width: 0; font-size: 12px; }
  body.pc-ui-preview .task-detail-view .task-inline-note { border-color: #e0e9f6; background: #f5f8fd; color: #657890; font-size: 12px; line-height: 1.7; }
  body.pc-ui-preview .task-detail-sidebar :is(.task-card-actions,.task-detail-actions) { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
  body.pc-ui-preview .task-detail-view .tiny { padding: 7px 11px; min-height: 33px; margin: 0; border-radius: 6px; font-size: 12px; font-weight: 500; }
  body.pc-ui-preview .task-detail-sidebar .secondary,
  body.pc-ui-preview .task-detail-history .secondary { border: 1px solid #dce5f0; background: #f7f9fc; color: #526b88; }
  body.pc-ui-preview .task-detail-status-menu { margin-top: 16px; border-top: 1px solid #edf1f5; padding-top: 13px; }
  body.pc-ui-preview .task-detail-status-menu > summary { cursor: pointer; color: #748298; font-size: 12px; font-weight: 400; }
  body.pc-ui-preview .task-detail-status-menu .task-card-actions { margin-top: 12px; }
  body.pc-ui-preview .task-detail-history .task-history-item { margin: 0; padding: 16px 0; border: 0; border-bottom: 1px solid #edf1f6; border-radius: 0; background: none; }
  body.pc-ui-preview .task-detail-history .task-history-item:first-of-type { padding-top: 2px; }
  body.pc-ui-preview .task-detail-history .task-history-item:last-child { border-bottom: 0; padding-bottom: 0; }
  body.pc-ui-preview .task-detail-history .task-history-index { font-size: 13px; font-weight: 500; color: #315373; }
  body.pc-ui-preview .task-detail-history .task-history-meta { margin-top: 5px; gap: 4px 12px; color: #8a97a8; font-size: 11px; }
  body.pc-ui-preview .task-detail-history .task-history-grid { margin-top: 10px; color: #53647b; font-size: 13px; }
  body.pc-ui-preview .task-detail-history .task-history-grid strong { font-weight: 500; }
  body.pc-ui-preview .task-detail-history .task-history-head .badge { font-size: 11px; }
  body.pc-ui-preview .task-detail-view .task-admin-details { border: 0; padding: 0; background: none; }
  body.pc-ui-preview .task-detail-view .task-admin-details > summary { color: #42638c; font-size: 13px; font-weight: 500; }
  body.pc-ui-preview .task-detail-sidebar .task-reassign-form { grid-template-columns: minmax(0, 1fr); margin-top: 16px; gap: 12px; }
  body.pc-ui-preview .task-detail-sidebar .task-reassign-form > * { grid-column: 1; }
  body.pc-ui-preview .task-arrangement-setting + .task-arrangement-setting { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e9eef5; }
  body.pc-ui-preview .task-arrangement-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
  body.pc-ui-preview .task-arrangement-label { margin-bottom: 6px; color: #738298; font-size: 12px; }
  body.pc-ui-preview .task-arrangement-value { color: #344a64; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-arrangement-line .task-arrangement-toggle { width: auto; min-width: 104px; min-height: 34px; margin: 0; padding: 7px 10px; border: 1px solid #d5e1ef; border-radius: 6px; background: #f7faff; color: #285d98; font-size: 12px; font-weight: 500; white-space: nowrap; }
  body.pc-ui-preview .task-arrangement-overdue { display: inline-block; margin-left: 6px; color: #bb4c43; font-size: 11px; white-space: nowrap; }
  body.pc-ui-preview .task-arrangement-hint { margin: 6px 0 0; color: #7b889b; font-size: 11px; line-height: 1.65; }
  body.pc-ui-preview .task-arrangement-editor { margin-top: 14px; padding: 14px; border: 1px solid #e1e8f2; border-radius: 7px; background: #fafcff; }
  body.pc-ui-preview .task-arrangement-editor .task-reassign-form { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; gap: 10px; }
  body.pc-ui-preview .task-arrangement-editor .task-reassign-form > * { grid-column: 1 / -1; }
  body.pc-ui-preview .task-arrangement-editor .task-reassign-form > button { grid-column: auto; }
  body.pc-ui-preview .task-arrangement-editor .task-reminder-form { display: grid; gap: 10px; margin: 0; }
  body.pc-ui-preview .task-arrangement-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  body.pc-ui-preview .task-arrangement-editor-actions > button,
  body.pc-ui-preview .task-arrangement-editor .task-reassign-form > button { width: auto; min-height: 34px; margin: 0; padding: 7px 10px; border-radius: 6px; font-size: 12px; }
  body.pc-ui-preview .task-arrangement-editor .project-permission-picker { min-width: 0; }
  body.pc-ui-preview .task-arrangement-editor .project-permission-toggle { width: 100%; white-space: normal; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-arrangement-editor .project-permission-panel { position: static; margin-top: 8px; max-height: 210px; box-shadow: none; }
  body.pc-ui-preview .task-arrangement-editor .project-permission-option { padding: 6px; font-size: 12px; }
  body.pc-ui-preview .task-detail-result { color: #465d77; line-height: 1.8; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-cancelled-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
  body.pc-ui-preview .task-cancelled-heading h3 { margin: 0 0 7px; color: #30465f; font-size: 17px; font-weight: 600; }
  body.pc-ui-preview .task-cancelled-heading p { margin: 0; font-size: 12px; line-height: 1.7; }
  body.pc-ui-preview .task-cancelled-heading .task-detail-add-record { flex: 0 0 auto; width: auto; border: 1px solid #dce5f0; background: #f7f9fc; color: #526b88; }
  body.pc-ui-preview .task-cancelled-reason { margin: 19px 0 17px; }
  body.pc-ui-preview .task-cancelled-reason > span { color: #8490a1; font-size: 12px; }
  body.pc-ui-preview .task-cancelled-reason > p { margin: 7px 0 0; color: #41536b; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-cancelled .task-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
  body.pc-ui-preview .task-detail-cancelled .task-detail-fields > div { margin-bottom: 0; }
  body.pc-ui-preview .task-cancelled-compose .task-followup-action-hint,
  body.pc-ui-preview .task-completed-compose .task-followup-action-hint { height: auto; min-height: 0; }
  body.pc-ui-preview .task-cancelled-compose .task-detail-submit-actions,
  body.pc-ui-preview .task-completed-compose .task-detail-submit-actions { position: static; }
  body.pc-ui-preview .task-detail-source .task-source-state { margin: 0 0 12px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-detail-feedback { margin-bottom: 16px; padding: 11px 15px; border: 1px solid #cce6d8; border-radius: 7px; background: #f0faf5; color: #367553; font-size: 13px; }
  body.pc-ui-preview .task-detail-acceptance { border-color: #d5e3f4; background: #f8fbff; }
  body.pc-ui-preview .task-detail-acceptance > p { margin: 0 0 16px; color: #6b7d94; font-size: 13px; line-height: 1.8; }
  body.pc-ui-preview .task-detail-acceptance .task-accept-action { width: auto; min-height: 40px; margin: 0; padding: 9px 18px; border-radius: 7px; font-size: 14px; font-weight: 500; }
  body.pc-ui-preview .task-acceptance-info { margin: 0 0 14px; color: #58728f; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
  body.pc-ui-preview .task-acceptance-info:empty { display: none; }
  body.pc-ui-preview .task-cancel-details { margin-top: 18px; padding-top: 13px; border-top: 1px solid #e3ebf6; }
  body.pc-ui-preview .task-cancel-details > summary { width: fit-content; cursor: pointer; color: #758196; font-size: 12px; }
  body.pc-ui-preview .task-cancel-form { display: grid; gap: 10px; margin-top: 12px; }
  body.pc-ui-preview .task-cancel-form textarea { min-height: 78px; margin: 0; padding: 10px 12px; border: 1px solid #dce4ee; border-radius: 7px; font-size: 13px; line-height: 1.7; resize: vertical; }
  body.pc-ui-preview .task-cancel-form button { justify-self: start; width: auto; min-height: 34px; margin: 0; padding: 7px 12px; border-radius: 6px; font-size: 12px; }
  body.pc-ui-preview .main-view:has(> .task-source-return-bar) { grid-template-rows: 64px auto minmax(calc(100vh - 129px), auto); }
  body.pc-ui-preview .main-view:has(> .task-source-return-bar) > .tabs { grid-row: 1 / 4; }
  body.pc-ui-preview .task-source-return-bar { grid-column: 2; grid-row: 2; position: sticky; top: 64px; z-index: 79; min-width: 0; padding: 16px 24px 12px; background: #f4f6f8; }
  body.pc-ui-preview .task-source-return-bar + main { grid-row: 3; }
  body.pc-ui-preview .task-source-return { width: auto; margin: 0; padding: 8px 12px; border: 1px solid #dbe5f1; border-radius: 7px; background: #fff; color: #2862a6; font-size: 13px; }
}
@media (min-width: 1200px) {
  body.pc-ui-preview #taskForm .execution-form-field-description { grid-column: span 2; height: 100%; }
  body.pc-ui-preview #taskForm .execution-form-field-description > textarea { flex: 1; }
  body.pc-ui-preview #taskForm .task-dispatch-upload { grid-column: span 1; }
  body.pc-ui-preview #taskForm .task-dispatch-file-list { grid-template-columns: minmax(0, 1fr); max-height: 180px; overflow-y: auto; }
  body.pc-ui-preview #taskForm > .task-dispatch-extra { grid-column: 1 / 3; }
  body.pc-ui-preview .execution-task-create-panel #taskForm > button[type="submit"] { grid-column: 3; align-self: start; }
}
@media (min-width: 1600px) {
  body.pc-ui-preview .task-detail-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
}
@media (min-width: 981px) and (max-width: 1199px) {
  body.pc-ui-preview #taskForm .task-dispatch-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-ui-preview .task-detail-layout { grid-template-columns: minmax(0, 1fr) 252px; gap: 14px; }
  body.pc-ui-preview .task-detail-section { padding: 16px; }
  body.pc-ui-preview .task-detail-amounts { gap: 10px; }
  body.pc-ui-preview .task-detail-amounts strong { font-size: 18px; }
  body.pc-ui-preview .task-detail-business-context .task-detail-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 769px) and (max-width: 980px) {
  body.pc-ui-preview #taskForm .task-dispatch-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-ui-preview #taskForm .task-dispatch-file-list { grid-template-columns: minmax(0, 1fr); }
  body.pc-ui-preview .task-detail-layout { grid-template-columns: minmax(0, 1fr); }
  body.pc-ui-preview .task-detail-heading h2 { font-size: 20px; }
  body.pc-ui-preview .task-detail-section { padding: 18px; }
  body.pc-ui-preview .task-detail-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  body.pc-ui-preview .task-detail-amounts strong { font-size: 20px; }
  body.pc-ui-preview .task-detail-business-context .task-detail-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Field-work detail: one overview, a primary work area, quiet supporting tools. */
@media (min-width: 769px) {
  body.pc-ui-preview .task-detail-refined { max-width: 1480px; margin: 0 auto; }
  body.pc-ui-preview .task-detail-refined .task-detail-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 14px; }
  body.pc-ui-preview .task-detail-refined .task-detail-nav .business-return-bar { position: static; padding: 0; background: none; }
  body.pc-ui-preview .task-detail-refined .task-detail-nav :is(.task-detail-back,.business-return-bar > button) { width: auto; min-height: 32px; margin: 0; padding: 4px 0; border: 0; background: none; color: #526d8d; font-size: 14px; font-weight: 400; }
  body.pc-ui-preview .task-detail-refined .task-detail-nav button:hover { color: #175fc6; text-decoration: underline; }
  body.pc-ui-preview .task-detail-refined .task-detail-header { padding: 22px 24px 0; margin: 0 0 18px; border: 1px solid #dfe6ef; border-radius: 10px; background: #fff; }
  body.pc-ui-preview .task-detail-refined .task-detail-heading { align-items: center; justify-content: flex-start; gap: 16px; }
  body.pc-ui-preview .task-detail-refined .task-detail-heading h2 { font-size: 23px; line-height: 1.45; }
  body.pc-ui-preview .task-detail-refined .task-detail-heading-meta { font-size: 13px; color: #697a90; margin-bottom: 6px; }
  body.pc-ui-preview .task-detail-refined .task-detail-heading > .badge { flex-shrink: 0; padding: 4px 10px; font-size: 13px; }
  body.pc-ui-preview .task-detail-refined .task-detail-basics { padding: 18px 0; border: 0; border-radius: 0; box-shadow: none; }
  body.pc-ui-preview .task-detail-refined .task-detail-basics .task-detail-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px 24px; }
  body.pc-ui-preview .task-detail-refined .task-detail-fields > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; }
  body.pc-ui-preview .task-detail-refined .task-detail-fields dt { font-size: 13px; color: #758297; }
  body.pc-ui-preview .task-detail-refined .task-detail-fields dd { font-size: 15px; color: #263c57; }
  body.pc-ui-preview .task-detail-refined .task-detail-requirements { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border: 0; border-top: 1px solid #edf0f5; border-radius: 0; box-shadow: none; }
  body.pc-ui-preview .task-detail-refined .task-detail-requirements > h4 { flex-shrink: 0; margin: 0; font-size: 13px; font-weight: 400; color: #758297; }
  body.pc-ui-preview .task-detail-refined .task-detail-requirements .client-detail-item { padding: 0; font-size: 14px; }
  body.pc-ui-preview .task-detail-refined .task-asset-ledger-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding: 12px 0; border: 0; border-top: 1px solid #edf0f5; border-radius: 0; box-shadow: none; }
  body.pc-ui-preview .task-detail-refined .task-asset-ledger-link p { margin: 0; flex: 1 1 320px; font-size: 13px; }
  body.pc-ui-preview .task-detail-refined .task-open-asset-ledger { width: auto; min-height: 32px; margin: 0; padding: 5px 11px; border: 1px solid #d5e1f0; border-radius: 6px; background: #fff; color: #245fa7; font-size: 13px; }
  body.pc-ui-preview .task-detail-refined .task-detail-layout { grid-template-columns: minmax(0,1fr) 290px; gap: 18px; }
  body.pc-ui-preview .task-detail-refined :is(.task-detail-main,.task-detail-sidebar) { gap: 14px; }
  body.pc-ui-preview .task-detail-refined .task-detail-section { box-shadow: none; }
  body.pc-ui-preview .task-detail-refined .task-detail-acceptance { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-color: #cddff5; background: #f7faff; }
  body.pc-ui-preview .task-detail-refined .task-acceptance-copy { flex: 1; min-width: 0; }
  body.pc-ui-preview .task-detail-refined .task-acceptance-copy h3 { margin: 0 0 6px; font-size: 18px; color: #243c5b; }
  body.pc-ui-preview .task-detail-refined .task-acceptance-copy p { margin: 3px 0; color: #627791; font-size: 14px; }
  body.pc-ui-preview .task-detail-refined .task-accept-action { flex-shrink: 0; width: auto; min-height: 42px; margin: 0; padding: 10px 18px; font-size: 14px; }
  body.pc-ui-preview .task-detail-refined .task-detail-auxiliary { min-width: 0; border: 1px solid #dfe6ef; border-radius: 8px; background: #fff; }
  body.pc-ui-preview .task-detail-refined .task-detail-auxiliary > summary { padding: 14px 16px; color: #3c526e; font-size: 14px; cursor: pointer; }
  body.pc-ui-preview .task-detail-refined .task-detail-auxiliary > .task-detail-section { padding: 0 16px 16px; border: 0; border-radius: 0; }
  body.pc-ui-preview .task-detail-refined .task-detail-auxiliary .task-detail-issues > h3,
  body.pc-ui-preview .task-detail-refined .task-detail-arrangement .task-admin-details > summary { display: none; }
  body.pc-ui-preview .task-detail-refined .task-detail-arrangement .task-detail-fields { display: flex; flex-wrap: wrap; gap: 12px; }
  body.pc-ui-preview .task-detail-refined .task-issue-count { display: block; margin: 3px 0 0 15px; color: #758297; font-size: 12px; }
  body.pc-ui-preview .task-detail-refined .task-detail-sidebar > .task-cancel-details { order: 10; padding: 12px 16px; border-color: #e4e9f0; background: transparent; }
  body.pc-ui-preview .task-detail-refined .task-detail-sidebar > .task-cancel-details > summary { color: #7c8796; font-size: 13px; cursor: pointer; }
  body.pc-ui-preview .task-detail-refined .task-detail-status-menu { margin: 0; }
  body.pc-ui-preview .task-detail-refined .task-detail-submit-actions { position: static; min-height: 0; margin: 0; padding: 14px 0 0; box-shadow: none; }
  body.pc-ui-preview .task-detail-refined .task-result-form > p { height: auto; min-height: 0; }
  body.pc-ui-preview .task-detail-refined .task-schedule-field,
  body.pc-ui-preview .task-detail-refined .task-schedule-field > :is(input,select,textarea) { font-size: 14px; }
  body.pc-ui-preview .task-detail-refined .task-detail-compose .task-asset-completion { height: auto; min-height: 0; margin: 0; padding: 14px 16px; border: 1px solid #dce5f0; border-radius: 8px; background: #f8faff; }
  body.pc-ui-preview .task-detail-refined .task-asset-completion .grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  body.pc-ui-preview .task-detail-refined .task-asset-completion label { font-size: 13px; }
  body.pc-ui-preview .task-detail-refined .task-asset-completion :is(input,select) { min-width: 0; font-size: 14px; }
}
@media (min-width: 769px) and (max-width: 1199px) {
  body.pc-ui-preview .task-detail-refined .task-detail-layout { grid-template-columns: minmax(0,1fr); }
  body.pc-ui-preview .task-detail-refined .task-detail-sidebar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  body.pc-ui-preview .task-detail-refined .task-detail-basics .task-detail-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Desktop task detail stays in the available viewport; original forms keep their own actions. */
@media (min-width: 769px) {
  body.pc-ui-preview:not(.mobile-ui-active) .main-view:has(.task-detail-compact) { height:100dvh;min-height:0;grid-template-rows:64px minmax(0,1fr); }
  body.pc-ui-preview:not(.mobile-ui-active) .main-view:has(.task-detail-compact):has(> .business-return-bar,> .task-source-return-bar) { grid-template-rows:64px auto minmax(0,1fr); }
  body.pc-ui-preview:not(.mobile-ui-active) #content:has(.task-detail-compact) { display:flex;flex-direction:column;min-height:0;overflow:hidden;padding-top:10px;padding-bottom:12px; }
  body.pc-ui-preview .task-workspace:has(.task-detail-compact) { display:flex;flex-direction:column;flex:1;min-height:0;gap:8px; }
  body.pc-ui-preview .task-workspace:has(.task-detail-compact) > .task-inline-note { flex:none;max-height:80px;overflow:auto;margin:0; }
  body.pc-ui-preview .task-detail-compact { display:flex;flex-direction:column;flex:1;min-height:0;max-width:none;width:100%;margin:0; }
  body.pc-ui-preview .task-detail-compact > .task-card { display:flex;flex-direction:column;flex:1;min-height:0; }
  body.pc-ui-preview .task-detail-compact .task-detail-nav { display:flex;align-items:center;flex-wrap:wrap;flex:none;gap:6px 16px;margin:0 0 5px; }
  body.pc-ui-preview .task-detail-compact .task-detail-nav :is(.task-detail-back,.business-return-bar > button) { min-height:26px;margin:0;padding:2px 0;font-size:12px; }
  body.pc-ui-preview .task-detail-compact .task-detail-header { flex:none;max-height:95px;overflow:auto;margin:0 0 8px;padding:8px 12px;border:1px solid #e0e7f0;border-radius:7px;background:#fff; }
  body.pc-ui-preview .task-detail-compact .task-detail-heading { align-items:center;justify-content:space-between;gap:10px; }
  body.pc-ui-preview .task-detail-compact .task-detail-heading h2 { font-size:19px;line-height:1.35; }
  body.pc-ui-preview .task-detail-compact .task-detail-heading-meta { margin:0 0 3px;font-size:12px;line-height:1.4; }
  body.pc-ui-preview .task-detail-compact .task-card-detail { display:flex;flex:1;min-height:0; }
  body.pc-ui-preview .task-detail-compact .task-detail-layout { flex:1;min-height:0;grid-template-columns:minmax(0,1fr) minmax(245px,30%);gap:10px;align-items:stretch; }
  body.pc-ui-preview .task-detail-compact :is(.task-detail-main,.task-detail-sidebar) { display:flex;flex-direction:column;gap:8px;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scroll-padding:8px; }
  body.pc-ui-preview .task-detail-compact .task-detail-main:has(.task-detail-compose:not(.hidden)) { overflow:hidden; }
  body.pc-ui-preview .task-detail-compact .task-detail-sidebar > * { flex:none; }
  body.pc-ui-preview .task-detail-compact .task-detail-section { padding:10px 12px;border-radius:7px;box-shadow:none; }
  body.pc-ui-preview .task-detail-compact .task-detail-section > :is(h3,h4),
  body.pc-ui-preview .task-detail-compact .task-detail-section .task-history-title { margin:0 0 7px;font-size:14px;line-height:1.4; }
  body.pc-ui-preview .task-detail-compact .task-detail-fields > div { display:grid;grid-template-columns:66px minmax(0,1fr);gap:7px;margin-bottom:6px;align-items:baseline; }
  body.pc-ui-preview .task-detail-compact .task-detail-fields dt { font-size:12px; }
  body.pc-ui-preview .task-detail-compact .task-detail-fields dd { font-size:13px;line-height:1.5; }
  body.pc-ui-preview .task-detail-compact .task-detail-basics .task-detail-fields { display:block; }
  body.pc-ui-preview .task-detail-compact :is(.task-detail-business-context,.task-detail-cancelled,.task-detail-result) { flex:none;max-height:145px;overflow:auto; }
  body.pc-ui-preview .task-detail-compact .task-detail-amounts { grid-template-columns:repeat(3,minmax(max-content,1fr));gap:10px;margin:0 0 6px;padding-bottom:6px;overflow-x:auto; }
  body.pc-ui-preview .task-detail-compact .task-detail-amounts strong { margin-top:2px;font-size:20px;line-height:1.25;white-space:nowrap; }
  body.pc-ui-preview .task-detail-compact .task-detail-business-context .task-detail-fields { grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 14px; }
  body.pc-ui-preview .task-detail-compact .task-detail-compose:not(.hidden) { display:flex;flex-direction:column;flex:0 1 auto;min-height:0;overflow:hidden; }
  body.pc-ui-preview .task-detail-compact .task-detail-compose > :is(h3,h4,.task-acceptance-info) { flex:none; }
  body.pc-ui-preview .task-detail-compact .task-acceptance-info { margin:0 0 5px;max-height:38px;overflow:auto;font-size:12px;line-height:1.5; }
  body.pc-ui-preview .task-detail-compact .task-result-form { display:flex;flex-direction:column;align-items:stretch;flex:1;min-height:0;gap:0; }
  body.pc-ui-preview .task-detail-compact .task-detail-form-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;align-self:stretch;align-content:start;gap:8px 10px;flex:1;min-height:0;height:auto;overflow:auto;overscroll-behavior:contain;scroll-padding:8px;padding-right:3px; }
  body.pc-ui-preview .task-detail-compact .task-detail-form-fields > * { min-width:0;min-height:0;height:auto; }
  body.pc-ui-preview .task-detail-compact .task-detail-form-fields > :is(.task-photo-picker,.task-photo-state,.task-photo-preview) { grid-column:1/-1; }
  body.pc-ui-preview .task-detail-compact .task-schedule-field { gap:4px;font-size:12px; }
  body.pc-ui-preview .task-detail-compact .task-schedule-field > :is(input,select) { min-height:32px;padding:5px 8px;font-size:13px; }
  body.pc-ui-preview .task-detail-compact .task-schedule-field > textarea { height:76px;min-height:60px;padding:7px 9px;font-size:13px;line-height:1.5; }
  body.pc-ui-preview .task-detail-compact .task-result-main > textarea { height:clamp(76px,calc(100dvh - 610px),160px); }
  body.pc-ui-preview .task-detail-compact .task-followup-state { gap:4px; }
  body.pc-ui-preview .task-detail-compact .task-followup-state > strong { padding:5px 0; }
  body.pc-ui-preview .task-detail-compact .task-followup-action-hint { margin:0;font-size:12px;line-height:1.5; }
  body.pc-ui-preview .task-detail-compact .task-detail-submit-actions { position:static;display:flex;align-self:stretch;flex:none;justify-content:flex-end;gap:8px;min-height:0;height:auto;margin:7px 0 0;padding:8px 0 0;box-shadow:none; }
  body.pc-ui-preview .task-detail-compact .task-detail-submit-actions > button { min-width:0;min-height:34px;padding:6px 12px;font-size:13px; }
  body.pc-ui-preview .task-detail-compact .task-detail-acceptance { display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:12px; }
  body.pc-ui-preview .task-detail-compact .task-detail-acceptance > :is(h3,p,.task-acceptance-copy) { margin:0;flex:1 1 240px; }
  body.pc-ui-preview .task-detail-compact .task-detail-acceptance .task-accept-action { min-height:34px;padding:6px 14px;font-size:13px; }
  body.pc-ui-preview .task-detail-compact .task-detail-acceptance .task-cancel-details { flex-basis:100%;margin-top:3px;padding-top:7px; }
  body.pc-ui-preview .task-detail-compact .task-detail-history { max-height:260px;overflow:auto;overscroll-behavior:contain; }
  body.pc-ui-preview .task-detail-compact .task-detail-main > .task-detail-history { flex:1;min-height:100px;max-height:none; }
  body.pc-ui-preview .task-detail-compact .task-detail-history .task-history-item { padding:9px 0; }
  body.pc-ui-preview .task-detail-compact .task-detail-history .task-history-grid { margin-top:6px;font-size:12px; }
  body.pc-ui-preview .task-detail-compact .task-detail-requirements { display:block;border:1px solid #e0e7f0;padding:10px 12px; }
  body.pc-ui-preview .task-detail-compact .task-detail-requirements :is(p,.client-detail-item) { margin:0;font-size:13px;line-height:1.55; }
  body.pc-ui-preview .task-detail-compact .task-detail-auxiliary > summary { padding:9px 12px;font-size:13px; }
  body.pc-ui-preview .task-detail-compact .task-detail-auxiliary > .task-detail-section { padding:0 12px 10px; }
  body.pc-ui-preview .task-detail-compact .task-arrangement-setting + .task-arrangement-setting { margin-top:10px;padding-top:10px; }
  body.pc-ui-preview .task-detail-compact .task-arrangement-label { margin-bottom:3px; }
  body.pc-ui-preview .task-detail-compact .task-arrangement-line { gap:7px; }
  body.pc-ui-preview .task-detail-compact .task-arrangement-line .task-arrangement-toggle { min-width:0;min-height:30px;padding:4px 7px;font-size:12px; }
  body.pc-ui-preview .task-detail-compact .task-arrangement-editor { margin-top:8px;padding:9px; }
  body.pc-ui-preview .task-detail-compact .task-detail-sidebar .task-reassign-form { margin-top:8px;gap:8px; }
  body.pc-ui-preview .task-detail-compact .task-detail-sidebar :is(.task-card-actions,.task-detail-actions) { margin-top:7px;gap:6px; }
  body.pc-ui-preview .task-detail-compact .task-detail-status-menu { margin-top:0;padding-top:10px; }
  body.pc-ui-preview .task-detail-compact .task-detail-feedback { margin:0;padding:7px 10px;max-height:50px;overflow:auto; }
  body.pc-ui-preview .task-detail-compact .task-cancelled-reason { margin:7px 0; }
  body.pc-ui-preview .task-detail-compact .task-cancelled-reason > p { margin:3px 0 0;font-size:13px;line-height:1.5; }
  body.pc-ui-preview .task-detail-compact .task-photo-preview:empty { display:none; }
  body.pc-ui-preview .task-detail-compact .task-asset-completion { padding:8px 10px; }
}
@media (min-width:769px) and (max-width:1100px) {
  body.pc-ui-preview .task-detail-compact .task-detail-layout { grid-template-columns:minmax(0,1fr) 228px; }
  body.pc-ui-preview .task-detail-compact .task-detail-amounts strong { font-size:15px; }
  body.pc-ui-preview .task-detail-compact .task-detail-business-context .task-detail-fields { grid-template-columns:minmax(0,1fr); }
  body.pc-ui-preview .task-detail-compact .task-detail-section { padding:8px 10px; }
  body.pc-ui-preview .task-detail-compact .task-detail-submit-actions > button { padding:6px 8px;font-size:12px; }
}
/* Task list only: leave dispatch forms and the existing fixed detail workspace intact. */
@media(min-width:769px){
  body.pc-ui-preview:not(.mobile-ui-active) .task-workspace-list.task-list-fixed{height:var(--task-list-height);min-height:0;display:flex;flex-direction:column;overflow:hidden}
  body.pc-ui-preview .task-list-fixed>.task-workspace-header{flex:none;margin-bottom:14px}
  body.pc-ui-preview .task-list-fixed>.task-workspace-board{display:flex;flex-direction:column;flex:1;min-height:0!important;overflow:hidden;margin-bottom:0}
  body.pc-ui-preview .task-list-fixed .task-workspace-board>:not(.task-board-page-wrap){flex:none}
  body.pc-ui-preview .task-list-fixed .task-board-page-wrap{flex:1;min-height:0!important;height:auto!important;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  body.pc-ui-preview .task-workspace-header #taskDispatchToggle:hover{background:#124b9c;color:#fff}
}
@media(min-width:769px) and (max-height:700px){
  body.pc-ui-preview .task-list-fixed .task-workspace-board{padding:0 16px 10px}
  body.pc-ui-preview .task-list-fixed .task-board-filters{margin-bottom:12px;padding-top:4px}
  body.pc-ui-preview .task-list-fixed .task-workspace-list-summary{margin:8px 0}
  body.pc-ui-preview .task-list-fixed .task-workspace-row{padding-block:12px}
}

/* Payment nodes are supporting context, including inside the task detail. */
.task-card .task-title-context, .mobile-workflow-home-task .task-title-context { display:block; margin:4px 0; color:#66758b; font-size:12px; font-weight:400; line-height:1.5; overflow-wrap:anywhere; text-align:left; }
