/* Approved task workspace: one list, one detail surface, no nested cards. */
.task-page tr.row-warning td{background:rgba(204,143,54,.08)}
.product-issue-note{display:block;margin-top:4px;font-size:12px;overflow-wrap:anywhere}
.product-issue-note.error{color:var(--red)}.product-issue-note.warning{color:#80582b}
.task-page .field-guide{margin-top:20px}.task-page .correction-table{min-width:880px}.task-page .correction-table td:first-child{width:18%}.task-page .correction-table td:nth-child(2){width:27%}.task-page .correction-table td:nth-child(3){width:28%}.task-page .correction-table td:nth-child(4){width:27%}.task-page .correction-table p{margin-top:8px}.task-page .field-options{margin:8px 0;padding-left:24px}.task-page .field-options li{padding:2px 0;overflow-wrap:anywhere}.task-page .correction-source+.correction-source{margin-top:12px;padding-top:8px;border-top:1px solid var(--line)}
.task-page .product-item-inner{display:grid;grid-template-columns:52px minmax(0,1fr);gap:12px;align-items:start}.task-page .product-item-text,.task-page .product-identity{min-width:0}
.product-photo{position:relative;display:block;aspect-ratio:1;background:#fff;border:1px solid #e2e7ee;border-radius:4px;overflow:hidden}.product-photo img{display:block;width:100%;height:100%;object-fit:contain;opacity:0}.product-photo.photo-loaded img{opacity:1}.product-photo .photo-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#5d697a;font-size:12px;font-weight:400;text-align:center;padding:4px}.product-photo.photo-loaded .photo-placeholder{display:none}.product-photo.photo-unavailable img{display:none}.task-page .list-photo{width:52px;height:52px}.task-page .photo-empty{display:flex;align-items:center;justify-content:center;font-size:11px;color:#5d697a}
.task-page .main-picture{display:block;min-width:0;border:0;background:none;padding:0;white-space:normal}.task-page .main-picture:hover{background:none;border:0}.task-page .main-picture:hover .product-photo{border-color:#9baac0}.task-page .main-picture-caption{display:block;margin-top:4px;font-size:12px;color:var(--muted)}.task-page .no-main-images{grid-column:1/-1;font-size:12px;color:var(--muted)}
#task-inspect .large-photo{width:min(100%,720px);max-height:65vh;aspect-ratio:auto;height:65vh;margin:auto}#task-inspect .large-photo img{height:100%;object-fit:contain}
.category-inline{border:0;border-left:2px solid #c7d1e0;border-radius:0;padding:8px 12px;margin:8px 0;font-size:12px;max-width:80ch}.category-inline .category-owner{display:inline;font-size:12px;color:#5d697a}.category-inline button{padding:2px 8px;min-height:24px;font-size:12px;margin-left:8px}.category-inline .error-list{margin:4px 0;padding-left:16px}.category-inline small{margin-left:8px}
.task-page #tw-batch-note button{font-size:12px;border:0;color:#2457c6;background:none;padding:0 8px;min-height:24px}
.task-page{--line:var(--border);--accent:var(--blue);--muted:#5d697a;--red:#b43340;--green:#1d754e;--blue:#2867a9;--failed:rgba(196,58,72,.055);--success:rgba(38,147,94,.055);--running:rgba(44,117,195,.065);font:14px/1.6 "Microsoft YaHei UI","Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--ink)}
.task-page h2,.task-page h3,.task-page p,.task-page dl{margin:0}.task-page h2{font-size:24px;font-weight:600;line-height:1.4}.task-page h3{font-size:16px;font-weight:600;line-height:1.5}
.task-page button{min-height:32px;border:1px solid #cdd5e0;border-radius:5px;background:#fff;color:inherit;padding:5px 12px;font:inherit;white-space:nowrap;cursor:pointer}
.task-page button:hover{background:#f1f4f9;border-color:#9baac0}.task-page button.primary{background:#2457c6;color:#fff;border-color:#2457c6}.task-page button:disabled{opacity:.5;cursor:default}
.task-page input,.task-page select{min-height:36px;border:1px solid #cdd5e0;border-radius:5px;background:#fff;padding:6px 12px;min-width:0;font:inherit}
.task-page button:focus-visible,.task-page input:focus-visible,.task-page select:focus-visible,.task-page [tabindex]:focus-visible{outline:3px solid #7aa3ff;outline-offset:3px}
.task-page small,.task-page .helper{color:#5d697a;font-size:12px}.task-page .helper{max-width:90ch;overflow-wrap:anywhere}.task-page .empty{padding:32px 24px;text-align:center;color:#5d697a;font-size:13px}
.task-page .product-item{display:block;width:100%;text-align:left;white-space:normal;border:0;border-top:1px solid var(--line);border-radius:0;min-height:100px;padding:16px;position:relative;font-weight:400;background:#fff}.task-page .product-item.failed{background:var(--failed)}.task-page .product-item.success{background:var(--success)}.task-page .product-item.running{background:var(--running)}.task-page .product-item:hover{background:#edf1f8}.task-page .product-item[aria-current=true]{background:#eaf0fb;box-shadow:inset 3px 0 0 var(--accent)}
.task-page .product-first{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:4px}.task-page .product-first strong{font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.task-page .product-stage{font-size:12px;color:var(--muted);display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task-page .product-last{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);margin-top:8px;font-variant-numeric:tabular-nums}
.task-page .badge{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;font-size:12px;line-height:1.6;font-weight:500;background:none;padding:0;border:0;color:#526074}.task-page .badge:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.task-page .badge.failed{color:var(--red)}.task-page .badge.success{color:var(--green)}.task-page .badge.running{color:var(--blue)}
.task-page .result-banner{margin-top:24px;padding:16px 20px;background:var(--failed);border-left:3px solid var(--red);border-radius:0 4px 4px 0}.task-page .result-banner h3{font-size:16px;color:#872b35}.task-page .result-banner p{font-size:13px;color:#5f4e56;margin-top:4px;max-width:86ch;overflow-wrap:anywhere}.task-page .result-banner.success{background:var(--success);border-color:var(--green)}.task-page .result-banner.success h3{color:#1e6445}.task-page .result-banner.success p{color:#466657}.task-page .result-banner.running{background:var(--running);border-color:var(--blue)}.task-page .result-banner.running h3{color:#245b90}.task-page .result-banner.running p{color:#4c6580}
.task-page .stage-line{display:flex;align-items:center;gap:8px;margin:20px 0;color:var(--muted);font-size:12px}.task-page .stage{display:flex;align-items:center;gap:6px;white-space:nowrap}.task-page .stage i{width:16px;height:16px;border:1px solid #cfd5de;border-radius:50%;display:grid;place-items:center;font:10px normal}.task-page .stage.done i{background:#edf4f0;color:var(--green);border-color:#9dc6b0}.task-page .stage.fail{color:var(--red)}.task-page .stage.fail i{background:#fff0f2;color:var(--red);border-color:#df9ca4}.task-page .stage.active{color:var(--blue)}.task-page .stage.active i{background:#e7f0ff;border-color:#95b2df}.task-page .stage-rule{height:1px;max-width:48px;flex:1;background:var(--line)}
.task-page .detail-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:thin}.task-page .detail-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:12px 0;min-height:48px;color:var(--muted);font-weight:400}.task-page .detail-tabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}.task-page .tab-number{font-size:12px;color:var(--muted);font-weight:400}.task-page .tab-content{padding:16px 24px 24px}.task-page .content-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px;flex-wrap:wrap}.task-page .content-heading button{font-size:12px;margin-left:8px}
.task-page .fact-line{display:flex;gap:32px;margin:20px 0 24px;flex-wrap:wrap}.task-page .fact{padding-right:24px;border-right:1px solid var(--line)}.task-page .fact:last-child{border:0;padding:0}.task-page .fact dt{font-size:12px;color:var(--muted);margin-bottom:4px}.task-page .fact dd{margin:0;font-size:16px;font-weight:500}.task-page .danger{color:var(--red)}
.task-page .table-wrap{overflow:auto;scrollbar-width:thin;max-width:100%;border-top:1px solid var(--line);margin-top:16px}.task-page table{width:100%;border-collapse:collapse;text-align:left;font-size:12px;line-height:1.65}.task-page th{font-weight:500;color:var(--muted);background:#f8f9fb;white-space:nowrap;padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}.task-page td{padding:12px;border-bottom:1px solid var(--line);vertical-align:top;white-space:normal;overflow-wrap:anywhere;max-width:40ch;min-width:80px}.task-page td small{display:block;margin-top:4px;color:var(--muted)}.task-page td strong{font-weight:500}.task-page td button{font-size:12px;border:0;background:none;padding:4px 0;color:#2457c6}.task-page .field-table{min-width:720px}.task-page .field-table td:nth-child(2),.task-page .field-table td:nth-child(3){max-width:28ch;width:19%}.task-page .out-key{font-size:11px;color:#69758a;overflow-wrap:anywhere}.task-page .type-tag{display:inline-block;background:#edf2fb;color:#3a608e;padding:1px 6px;border-radius:3px;font-size:11px;margin-bottom:4px}.task-page .code-label{display:block;margin-top:4px;font:11px/1.65 Consolas,monospace;color:#6e6873;overflow-wrap:anywhere}
.task-page tr.row-failed td{background:var(--failed)}.task-page tr.row-success td{background:var(--success)}.task-page tr.row-running td{background:var(--running)}.task-page .table-pager{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:12px;font-size:12px;color:var(--muted)}.task-page .table-pager button{font-size:12px;min-height:28px;padding:4px 12px}
.task-page .section-divider{height:1px;background:var(--line);margin:24px 0}.task-page .timeline{list-style:none;margin:12px 0 0;padding:0}.task-page .timeline li{display:grid;grid-template-columns:160px 1fr;gap:16px;padding:8px 0;font-size:12px}.task-page .timeline time{color:var(--muted);font-variant-numeric:tabular-nums}.task-page .timeline button{border:0;color:var(--accent);padding:0 8px;font-size:12px}
.task-page .filters{display:flex;align-items:end;gap:12px;margin:20px 0 12px;flex-wrap:wrap}.task-page .filters label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}.task-page .filters select{font-size:12px;min-width:112px;max-width:220px}.task-page .filters input{font-size:12px;width:220px}.task-page .filters .grow{flex:1}.task-page .filters .grow input{width:100%;min-width:160px}
.task-page .inline-note{padding:12px 16px;background:#f4f7fc;color:#455e7c;border-left:2px solid #a6bbde;margin:16px 0;font-size:12px;max-width:100%;overflow-wrap:anywhere}.task-page .inline-note.warning{background:#fff7eb;color:#80582b;border-color:#e4b778}.task-page .category-check{border-radius:0;border-top:0;border-right:0;border-bottom:0}.task-page .policy-line{display:flex;gap:8px 24px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-top:12px}.task-page .policy-line strong{font-weight:500;color:#202b3b}.task-page .sub-switch{display:flex;gap:16px;margin:16px 0;border-bottom:1px solid var(--line)}.task-page .sub-switch button{padding:6px 0;border:0;border-bottom:2px solid transparent;background:none;border-radius:0;color:var(--muted);font-size:12px}.task-page .sub-switch button[aria-pressed=true]{color:var(--accent);border-bottom-color:var(--accent)}.task-page .compare-categories{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin:24px 0}.task-page .compare-categories span{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}.task-page .compare-categories p{font-size:14px;max-width:55ch;overflow-wrap:anywhere}
.task-page .log-status{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0;font-size:12px;color:var(--muted)}.task-page .success{color:var(--green)}.task-page .evidence-files{margin:16px 0;font-size:12px}.task-page .evidence-files>div{padding:8px 0;border-bottom:1px solid var(--line);display:flex;gap:8px 16px;align-items:center;flex-wrap:wrap}.task-page .evidence-files button{font-size:12px;min-height:24px;padding:2px 8px}.task-page .evidence-files>div>small{flex-basis:100%}.task-page .log-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:20px 0 12px;flex-wrap:wrap}.task-page .log-toolbar .sub-switch{margin:0;border:0}.task-page .log-tools{display:flex;gap:8px;margin:0;flex-wrap:wrap}.task-page .log-tools input{max-width:240px}.task-page .log-tools input,.task-page .log-tools select,.task-page .log-tools button{font-size:12px}.task-page .log-window{border:1px solid var(--line);border-radius:4px;background:#f9fafc;height:400px;overflow:auto;scrollbar-width:thin;font:12px/1.85 Consolas,"Microsoft YaHei UI",monospace}.task-page .log-row{display:flex;gap:16px;padding:0 16px;white-space:pre-wrap;word-break:break-word}.task-page .line-no{width:40px;text-align:right;flex-shrink:0;color:#7d8897;user-select:none}.task-page .log-text{flex:1;min-width:0;color:#3e4b60}.task-page .log-row.error{background:rgba(196,58,72,.07)}.task-page .log-row.error .log-text{color:#9c3341}.task-page .log-footer{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:12px}.task-page .log-footer button{font-size:12px}
#task-inspect{border:1px solid #e2e7ee;border-radius:8px;padding:24px;width:min(880px,calc(100vw - 32px));max-height:85vh;box-shadow:0 20px 60px rgba(20,37,67,.18)}#task-inspect::backdrop{background:rgba(20,31,49,.3)}.task-modal-head{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:16px}.task-modal-head h2{font-size:20px}.task-modal-head button{width:32px;height:32px;border:0;font-size:24px;padding:0}.task-modal-head+div table{font-size:12px}#task-inspect pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:520px;background:#f6f8fb}#task-inspect td{overflow-wrap:anywhere;white-space:normal;vertical-align:top}
@media(prefers-reduced-motion:reduce){.task-page *{scroll-behavior:auto!important;transition:none!important}}

.operator-guide{margin:12px 0;padding:12px 14px;background:rgba(255,255,255,.7);border-left:3px solid #b94d4d;line-height:1.65}.operator-guide p{margin:6px 0}.operator-example{margin:10px 0;padding:10px;background:#f7f8fa;border:1px solid #e1e5eb}.operator-example p{margin:4px 0}.operator-guide small{display:block;color:#596678;overflow-wrap:anywhere}

.product-image-error{display:block;margin-top:8px;color:var(--red);font-size:12px;line-height:1.6;overflow-wrap:anywhere}.product-image-error small,.image-problem-table small{display:block;overflow-wrap:anywhere}.image-problem-table td{vertical-align:top}.image-problem-table p{margin:0 0 8px}.image-problem-table td:nth-child(2){font-variant-numeric:tabular-nums}

.task-page .resend-action:not([hidden]){
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 12px;
  margin-top:12px;
  font-size:13px;
  color:var(--muted);
}

/* Task result uses the same page frame as the list. */
#batch-dialog{width:100%;min-width:0;margin:0;padding:0;background:transparent;border:0}
#batch-dialog .task-back{margin-bottom:16px}
#close-detail{display:inline-flex;align-items:center;gap:8px;color:var(--blue);font-weight:650;padding:0;background:transparent;border:0}
#detail-message{margin-bottom:12px;color:var(--muted)}
#tw-product-header{margin-bottom:20px}
.task-page .detail-top{display:flex;justify-content:space-between;align-items:flex-end;gap:16px 24px}
.task-page .product-identity{min-width:0}
.task-page .product-identity h1{font-size:32px;line-height:1.25;overflow-wrap:anywhere;margin:6px 0}
.task-page .product-identity .badge{padding:3px 7px;border-radius:4px;background:#edf1f5}
.task-page .product-identity .badge.failed{background:#fbefee}
.task-page .product-identity .badge.success{background:#edf6ef}
.task-page .product-identity .badge.running{background:#eaf2fc}
.task-page .detail-sub{display:flex;gap:4px 12px;flex-wrap:wrap;color:var(--muted);font-size:13px}
.task-page .main-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:min(100%,226px);flex:none}
.task-page .main-gallery .product-photo{background:#f4f7fa;border-color:var(--border)}
.task-page .workbench{display:grid;grid-template-columns:minmax(0,1fr) minmax(232px,278px);gap:32px;align-items:start}
.task-page .detail-pane{min-width:0;background:var(--paper);border:1px solid var(--border);border-radius:var(--surface-radius)}
.task-page .detail-pane .detail-tabs{padding-inline:16px}
.task-page .tab-content{padding:16px 24px 24px}
.task-page #tw-overview{padding:16px 24px 0}
.task-page #tw-overview[hidden]{display:none}
.task-page .result-banner{margin:0}
.task-page .stage-line{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0 0}
.task-page .stage-line .stage{border-top:2px solid var(--border);padding:8px 0 0;white-space:normal;align-items:flex-start}
.task-page .stage-line .stage.done{border-color:#8db89f}
.task-page .stage-line .stage.fail{border-color:#bf6159}
.task-page .stage-line .stage.active{border-color:#7099ca}
.task-page .stage-line .stage-rule{display:none}
.task-page .detail-side{min-width:0;border-left:1px solid var(--border);padding-left:24px}
.task-page .detail-side h2{font-size:18px}
.task-page .task-facts{margin:8px 0 16px}
.task-facts>div{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--border)}
.task-facts dt{color:var(--muted);font-size:12px}
.task-facts dd{margin:0;max-width:65%;font-size:12px;font-weight:600;text-align:right;overflow-wrap:anywhere}
.task-page .detail-files{font-size:13px;overflow-wrap:anywhere}
.task-page #tw-batch-name,.task-page #tw-batch-id{display:block;margin:3px 0}
.task-page .detail-actions{display:grid;gap:6px;margin-top:8px}
.task-page .detail-actions button{font-size:12px;text-align:left;white-space:normal}
.task-page #tw-batch-note{margin-top:6px;font-size:12px;color:var(--muted)}
.task-page .product-pane{min-width:0;border-top:1px solid var(--border);padding-top:8px;margin-top:16px}
.task-page .product-pane>summary{font-size:13px;color:var(--blue)}
.task-page #tw-search{display:block;width:100%;margin-top:8px;font-size:12px}
.task-page .product-list{max-height:380px;overflow:auto;scrollbar-width:thin}
.task-page .list-meta{display:flex;justify-content:space-between;padding:4px 0;font-size:12px;color:var(--muted)}
.task-page .segmented,.task-page .batch-counts{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:12px;margin-top:8px;color:var(--muted)}
.task-page .segmented button{min-height:26px;padding:2px 5px;font-size:11px;border-color:transparent}
.task-page .segmented button[aria-pressed=true]{background:#eaf2fc;color:var(--blue)}
.task-page .batch-counts b{margin-right:2px;color:var(--ink)}
.task-page .product-item{min-height:0;padding:8px 6px}
.task-page .product-item-inner{grid-template-columns:36px minmax(0,1fr);gap:8px}
.task-page .product-item .list-photo{width:36px;height:36px}
.task-page .product-first{flex-wrap:wrap;gap:1px 6px}
.task-page .product-first strong{font-size:12px}
@media(max-width:930px){
  .task-page .workbench{grid-template-columns:minmax(0,1fr);gap:24px}
  .task-page .detail-side{border-left:0;border-top:1px solid var(--border);padding:16px 0 0}
  .task-page .task-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}
  .task-page .detail-actions{display:flex;flex-wrap:wrap}
}
@media(max-width:680px){
  .task-page .detail-top{align-items:flex-start;flex-direction:column}
  .task-page .product-identity h1{font-size:26px}
  .task-page #tw-overview,.task-page .tab-content{padding:16px}
  .task-page .detail-tabs{gap:14px}
  .task-page .stage-line{grid-template-columns:repeat(2,minmax(0,1fr))}
}
