/* Dispatch plans: make the handoff workflow visible at a glance. */
.dispatch-period-banner{display:flex;align-items:center;gap:14px;margin-bottom:14px;background:#edf7f2;border-color:#c9e1d4;border-left-color:var(--green);box-shadow:0 2px 8px rgba(25,40,48,.04)}
.dispatch-period-banner .alert-mark{background:var(--green)}
.dispatch-period-banner strong{font-size:12px;color:var(--ink)}
.dispatch-period-banner p{color:#4d675b}
.dispatch-source-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:-2px 0 12px;padding:9px 14px;border:1px solid var(--line);border-radius:5px;background:#fff}.dispatch-source-bar span{min-width:0;padding:0 13px;border-left:1px solid var(--line)}.dispatch-source-bar span:first-child{padding-left:0;border-left:0}.dispatch-source-bar small,.dispatch-source-bar strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-source-bar small{font-size:9px;color:var(--muted)}.dispatch-source-bar strong{margin-top:3px;font-size:11px;color:var(--ink)}
.dispatch-process-strip{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr);align-items:center;gap:0;margin:0 0 14px;padding:12px 14px;border:1px solid #dce7e1;border-radius:6px;background:#fff;box-shadow:0 2px 8px rgba(25,40,48,.04)}
.dispatch-process-step{display:flex;align-items:center;gap:9px;min-width:0;padding:4px 6px;border-radius:4px;color:var(--muted)}
.dispatch-process-step>span{display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px;border-radius:50%;background:#edf1f2;color:#64747c;font-size:11px;font-weight:800}
.dispatch-process-step strong,.dispatch-process-step small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-process-step strong{font-size:11px;color:var(--ink)}.dispatch-process-step small{margin-top:2px;font-size:9px;color:var(--muted)}
.dispatch-process-step.active{background:#f4faf7}.dispatch-process-step.active>span{background:var(--green);color:#fff}.dispatch-process-step.done>span{background:#d7efe2;color:var(--green)}.dispatch-process-step.pending{opacity:.72}.dispatch-process-strip>i{height:1px;background:#d6dfdc;position:relative}.dispatch-process-strip>i:after{content:'›';position:absolute;right:-2px;top:-8px;color:#a3b0ad;font-style:normal;font-size:13px}
.dispatch-step-panel{margin-top:14px}.dispatch-step-panel .panel-head{border-top:3px solid #e6efeb}.dispatch-step-one .panel-head{border-top-color:var(--blue)}.dispatch-step-two .panel-head{border-top-color:var(--amber)}.dispatch-step-three .panel-head{border-top-color:var(--green)}.dispatch-warning-compact{padding-block:10px}.dispatch-warning-compact p{margin-top:3px}
.dispatch-step-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;border-top:1px solid var(--line);background:#f7faf8}.dispatch-step-actions>span{color:var(--muted);font-size:10px}.dispatch-step-actions>div{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.dispatch-warning{display:flex;margin-bottom:14px}
.dispatch-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.dispatch-kpis .kpi{min-height:80px;padding:11px 14px;box-shadow:0 2px 8px rgba(25,40,48,.04)}
.dispatch-kpis .kpi-value{font-size:21px;margin:5px 0 3px}
.dispatch-kpis .kpi-foot{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dispatch-plan-panel{margin-top:0;overflow:hidden;box-shadow:0 3px 14px rgba(25,40,48,.06)}
.dispatch-plan-head{padding:16px 18px;align-items:flex-start;background:#fff}
.dispatch-plan-head h2{font-size:15px}
.dispatch-plan-note{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:8px 0 0;color:var(--muted);font-size:10px}
.dispatch-plan-note span{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--green2);color:var(--green);font-weight:800}
.dispatch-plan-note i{font-style:normal;color:#a2afb3;font-size:15px;line-height:1}
.dispatch-plan-controls{align-items:flex-end}
.dispatch-plan-controls .tag{height:34px;display:inline-flex;align-items:center;padding-inline:11px}
.dispatch-model-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:10px 12px;background:#f4f7f6;border-top:1px solid #edf0f1}
.dispatch-model-card{min-height:66px;padding:9px 11px;border-color:#d5e0dc;box-shadow:0 2px 7px rgba(25,40,48,.04);transition:border-color .15s,box-shadow .15s,transform .15s}
.dispatch-model-card:hover{border-color:#77a996;box-shadow:0 5px 13px rgba(25,40,48,.08);transform:translateY(-1px)}
.dispatch-model-card.active{border-color:var(--green);background:#f1f8f4;box-shadow:inset 4px 0 var(--green),0 4px 12px rgba(19,121,91,.12)}
.dispatch-model-card strong{font-size:19px}
.dispatch-selected-model{padding:12px 18px;border-left:4px solid var(--green);background:#fff}
.dispatch-selected-model small{display:block;margin-bottom:3px;color:var(--muted);font-size:9px}
.dispatch-selected-model strong{font-size:16px}
.dispatch-selected-model span{font-size:11px}
.dispatch-selected-model span b{color:#b6c0c4;margin:0 4px}
.dispatch-part-tabs{padding:0 16px;background:#fbfcfc}
.dispatch-part-tabs{grid-template-columns:repeat(2,minmax(180px,240px));gap:0}
.dispatch-part-tabs button{flex:1;min-width:180px}
.dispatch-whole-editor{background:#fff}
.dispatch-section-intro{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;border-bottom:1px solid #e7eeea;background:#f8fbf9}
.dispatch-section-intro strong,.dispatch-section-intro span{display:block}
.dispatch-section-intro strong{font-size:12px;color:var(--ink)}
.dispatch-section-intro div>span{margin-top:3px;font-size:10px;color:var(--muted)}
.dispatch-hierarchy-shell{border-bottom:1px solid #e7eeea;background:#fff}
.dispatch-hierarchy-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;border-bottom:1px solid #e7eeea;background:#f8fbf9}
.dispatch-hierarchy-head strong,.dispatch-hierarchy-head span{display:block}
.dispatch-hierarchy-head strong{font-size:12px;color:var(--ink)}
.dispatch-hierarchy-head div>span{margin-top:3px;color:var(--muted);font-size:10px}
.dispatch-hierarchy-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.dispatch-hierarchy-actions .tag{margin:0}
.dispatch-hierarchy-table{min-width:980px}
.dispatch-hierarchy-table th{background:#f1f6f3}
.dispatch-hierarchy-table td{padding:9px 12px;vertical-align:middle}
.dispatch-hierarchy-table td:nth-child(1){width:120px}
.dispatch-hierarchy-table td:nth-child(2){min-width:150px}
.dispatch-hierarchy-table td:nth-child(3),.dispatch-hierarchy-table td:nth-child(4){width:110px;white-space:nowrap}
.dispatch-hierarchy-table td:nth-child(5){min-width:170px}
.dispatch-hierarchy-table td:nth-last-child(1){font-weight:800}
.dispatch-tree-model td{background:#edf7f2;border-bottom:1px solid #cfe5d8;color:var(--ink)}
.dispatch-tree-model td:first-child{border-left:4px solid var(--green)}
.dispatch-tree-model span,.dispatch-tree-model b,.dispatch-tree-section span,.dispatch-tree-section b{display:inline-block}
.dispatch-tree-model b{margin-left:14px;color:var(--green)}
.dispatch-tree-section td{background:#f8faf9;border-bottom:1px solid #e7eeea;color:#42515b}
.dispatch-tree-section td:nth-child(2){font-weight:800}
.dispatch-tree-section b{margin-left:14px;color:var(--ink)}
.dispatch-tree-level-1{padding-left:16px;position:relative}
.dispatch-tree-level-1:before{content:'├';position:absolute;left:0;color:#91a69d}
.dispatch-tree-level-2{padding-left:34px;position:relative;color:#31505b;font-weight:700}
.dispatch-tree-level-2:before{content:'└';position:absolute;left:16px;color:#9cacb2}
.dispatch-tree-detail td{background:#fff}
.dispatch-tree-detail td:nth-child(3),.dispatch-tree-detail td:nth-child(4),.dispatch-tree-detail td:nth-child(5){font-size:11px}
.dispatch-edit-qty input{width:92px;height:34px;padding:0 9px;border:1px solid #cbd7d2;border-radius:4px;background:#fff;text-align:right;font-weight:800;color:var(--ink)}
.dispatch-edit-qty input:focus{border-color:var(--green);outline:3px solid rgba(19,121,91,.12)}
.dispatch-inline-bom{width:100%;min-width:260px;height:34px;border-color:#cbd7d2;background:#fff;font-weight:700;color:#33454d}
.dispatch-inline-bom.needs-match{border-color:#e1b85d;background:#fffaf0;color:#a36a00}
.dispatch-tree-empty td{padding:14px 12px;color:var(--muted);background:#fffaf0;font-size:10px}
.dispatch-selfmade-hierarchy .dispatch-tree-model td:first-child{border-left-color:var(--blue)}
.dispatch-selfmade-hierarchy .dispatch-tree-model b{color:var(--blue)}
.dispatch-whole-sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px 16px 16px;background:#f4f7f6;border-top:1px solid #edf0f1}
.dispatch-whole-section{min-width:0;border:1px solid #dce6e1;border-radius:6px;overflow:hidden;background:#fff;box-shadow:0 2px 8px rgba(25,40,48,.04)}
.dispatch-whole-section-head{display:flex;justify-content:space-between;gap:10px;padding:13px 14px 11px;border-bottom:1px solid #edf0f1;background:#fbfcfc}
.dispatch-whole-section-head h3{margin:3px 0 2px;font-size:14px;color:var(--ink)}
.dispatch-whole-section-head p{margin:0;color:var(--muted);font-size:10px;line-height:1.45}
.dispatch-section-kicker{font-size:9px;color:var(--muted);letter-spacing:.02em}
.dispatch-section-metrics{text-align:right;white-space:nowrap}
.dispatch-section-metrics b{display:block;font-size:16px;color:var(--ink)}
.dispatch-section-metrics span{display:block;margin-top:3px;font-size:9px;color:var(--muted)}
.dispatch-whole-green{border-top:3px solid var(--green)}
.dispatch-whole-blue{border-top:3px solid var(--blue)}
.dispatch-whole-amber{border-top:3px solid var(--amber)}
.dispatch-whole-section .table-wrap{max-height:270px;overflow:auto}
.dispatch-whole-section-table{min-width:0;width:100%;table-layout:fixed}
.dispatch-whole-section-table th:nth-child(1){width:22%}
.dispatch-whole-section-table th:nth-child(2){width:26%}
.dispatch-whole-section-table th:nth-child(3){width:16%}
.dispatch-whole-section-table th:nth-child(4){width:36%}
.dispatch-whole-section-table thead th{position:sticky;top:0;z-index:2;background:#f1f6f3}
.dispatch-whole-section-table td{padding:9px 10px;vertical-align:top;white-space:normal}
.dispatch-whole-section-table .dispatch-config{font-weight:700;color:#31505b;white-space:normal;line-height:1.4}
.dispatch-section-bom{white-space:normal;line-height:1.45;color:#45655a;font-size:10px}
.dispatch-section-bom span{display:block}
.dispatch-section-bom.needs-match{color:#a66a13}
.dispatch-whole-section-table td{overflow-wrap:anywhere;word-break:break-word}
.dispatch-whole-section-table td.code{word-break:break-all;line-height:1.3}
.dispatch-whole-section-table td.qty-cell{white-space:nowrap}
.dispatch-plan-panel>.table-wrap{max-height:430px;overflow:auto}
.dispatch-plan-table thead th{position:sticky;top:0;z-index:4;background:#edf4f1}
.dispatch-plan-table{min-width:1040px}
.dispatch-plan-table th:nth-child(1){width:110px}.dispatch-plan-table th:nth-child(2){min-width:140px}.dispatch-plan-table th:nth-child(3),.dispatch-plan-table th:nth-child(4){width:110px}.dispatch-plan-table th:nth-child(5){min-width:180px}.dispatch-plan-table th:nth-child(6){min-width:320px}
.dispatch-plan-table td{padding:11px 12px;vertical-align:middle}
.dispatch-plan-table input[type=number]{height:36px;min-width:100px;width:100%;padding:0 10px;border:1px solid #cfdadd;border-radius:4px;background:#fff;text-align:right;font-weight:700;color:var(--ink)}
.dispatch-plan-table input[type=number]:focus{border-color:var(--green);outline:3px solid rgba(19,121,91,.12)}
.dispatch-bom-select{height:36px;border-color:#cfdadd;background:#fff}
.dispatch-plan-actions{justify-content:space-between;padding:11px 16px;background:#f8faf9}
.dispatch-list-shell{margin-top:10px;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:#fff;box-shadow:0 3px 14px rgba(25,40,48,.05)}
.dispatch-list-head{padding:14px 16px;align-items:flex-start;background:#fff}
.dispatch-list-head h2{font-size:15px}
.dispatch-list-head p{font-size:10px}
.dispatch-downstream-tabs{flex:0 0 240px;min-width:240px}
.dispatch-list-metrics{gap:16px;padding-top:8px}
.dispatch-list-metrics b{font-size:14px}
.dispatch-output-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}
.dispatch-output-actions .btn{white-space:nowrap}
.dispatch-combined-hierarchy-table{min-width:1180px}
.dispatch-combined-hierarchy-table th:nth-child(1){width:76px}.dispatch-combined-hierarchy-table th:nth-child(2){width:110px}.dispatch-combined-hierarchy-table th:nth-child(3){min-width:150px}.dispatch-combined-hierarchy-table th:nth-child(4),.dispatch-combined-hierarchy-table th:nth-child(5){width:112px}.dispatch-combined-hierarchy-table th:nth-child(6){min-width:170px}.dispatch-combined-hierarchy-table th:nth-child(7){min-width:320px}
.dispatch-combined-hierarchy-table td{vertical-align:middle}
.dispatch-combined-hierarchy-table .dispatch-tree-selfmade td{background:#eef5fa;border-bottom-color:#cfdee8}
.dispatch-combined-hierarchy-table .dispatch-tree-selfmade td:first-child{border-left:4px solid var(--blue)}
.dispatch-combined-hierarchy-table .dispatch-tree-selfmade-row td{background:#fbfdfe}
.dispatch-combined-selector{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.dispatch-combined-selector>strong{min-width:62px;color:var(--ink);font-size:10px}
.dispatch-combined-output-table{min-width:1220px}
.dispatch-combined-output-table th:nth-child(1){width:70px}.dispatch-combined-output-table th:nth-child(2){width:110px}.dispatch-combined-output-table th:nth-child(3){width:150px}.dispatch-combined-output-table th:nth-child(4){min-width:190px}.dispatch-combined-output-table th:nth-child(5){width:120px}.dispatch-combined-output-table th:nth-child(6){width:100px}.dispatch-combined-output-table th:nth-child(7),.dispatch-combined-output-table th:nth-child(8),.dispatch-combined-output-table th:nth-child(9),.dispatch-combined-output-table th:nth-child(10){width:92px}.dispatch-combined-output-table th:nth-child(11){width:100px}
.dispatch-combined-selfmade td{background:#fbfdfe}
.dispatch-list-shell>.dispatch-workshop-summary{background:#f8faf9}
.dispatch-list-shell .dispatch-unified-table thead th{position:sticky;top:0;z-index:3;background:#edf4f1}
.dispatch-list-shell .dispatch-unified-table td{padding:11px 13px;vertical-align:middle}
.dispatch-list-shell .dispatch-unified-table tbody tr:hover{background:#f7fbf8}
.dispatch-selector-summary button{min-height:30px;padding:6px 9px;border:1px solid var(--line);border-radius:3px;background:#f5f7f7;color:var(--muted);font:inherit;cursor:pointer;text-align:left}
.dispatch-selector-summary button:hover{border-color:#8fb6a6;background:#f1f8f4;color:var(--ink)}
.dispatch-selector-summary button.active{border-color:var(--green);background:var(--green2);color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}
.dispatch-selector-summary button.active b{color:var(--green)}
.dispatch-filter-status{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 14px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fbfcfc;color:var(--muted);font-size:10px}
.dispatch-quantity-rule{padding:7px 14px;border-top:1px solid var(--line);background:#f8fbf9;color:#4d675b;font-size:10px}
.dispatch-filter-status b{color:var(--ink)}
.dispatch-filterable-table th{position:sticky;padding-right:38px!important}
.dispatch-filterable-table th.filter-active{background:#e4f2ea!important;color:var(--green)}
.dispatch-column-filter{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;border:0;border-radius:2px;background:transparent;color:#78878e;cursor:pointer}
.dispatch-column-filter:hover{background:#dfeae5;color:var(--green)}
.dispatch-column-filter.active{background:var(--green);color:#fff}
.dispatch-filter-range{display:grid;grid-template-columns:1fr auto 1fr auto;align-items:center;gap:7px;padding:9px 11px;border-bottom:1px solid var(--line)}
.dispatch-filter-range input{min-width:0;width:100%;height:32px;padding:0 8px;border:1px solid #ccd6da;border-radius:3px;font-size:10px}
.dispatch-filter-range span{color:var(--muted);font-size:10px}
.dispatch-filter-range button{height:32px;padding:0 10px;border:1px solid var(--green);border-radius:3px;background:var(--green);color:#fff;font-size:10px;cursor:pointer}
.dispatch-document-workflow{border-left:4px solid var(--green);overflow:hidden}
.dispatch-purchase-model-panel{margin-top:10px}.dispatch-purchase-model-panel .panel-head{padding:10px 14px}.dispatch-purchase-model-panel .panel-head h2{font-size:13px}.dispatch-purchase-model-panel .panel-head span{font-size:10px;color:var(--muted)}
.dispatch-document-workflow .panel-head{align-items:flex-start;background:#f8fbf9}
.dispatch-document-id{display:inline-flex;align-items:center;min-height:28px;padding:0 9px;border-left:1px solid var(--line);color:var(--ink);font-size:12px}
.dispatch-document-meta{grid-template-columns:repeat(6,minmax(130px,1fr))}
.dispatch-document-meta span{min-width:0}
.dispatch-document-meta strong{overflow-wrap:anywhere}
.dispatch-document-note{padding:9px 16px;border-top:1px solid var(--line);background:#fffaf0;color:#7f5c1d;font-size:10px}
.dispatch-receipts{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px 16px;border-top:1px solid var(--line);background:#f6fbf8}
.dispatch-history-note{margin-bottom:12px;padding:10px 12px;border-left:3px solid var(--green);background:#f4faf7;color:#455b51;font-size:11px;line-height:1.6}
.dispatch-version-table{min-width:960px}
.dispatch-version-table td{vertical-align:middle}
.dispatch-combined-output .dispatch-filter-status>div{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.dispatch-combined-output-table.dispatch-filterable-table th{padding-right:36px!important}
.dispatch-combined-output-table .dispatch-column-filter{right:7px}
@media(max-width:1250px){.dispatch-document-meta{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:760px){.dispatch-document-meta{grid-template-columns:1fr 1fr}.dispatch-document-workflow .workflow-actions{width:100%;justify-content:flex-start}.dispatch-combined-output .dispatch-filter-status{align-items:flex-start;flex-direction:column}}
@media(max-width:760px){.dispatch-source-bar{grid-template-columns:1fr 1fr;gap:8px}.dispatch-source-bar span:nth-child(3){padding-left:0;border-left:0}}
@media(max-width:900px){.dispatch-process-strip{grid-template-columns:1fr;gap:7px}.dispatch-process-strip>i{display:none}.dispatch-process-step{padding:7px 8px;border:1px solid #e1e9e5}.dispatch-process-step small{white-space:normal}.dispatch-step-actions{align-items:flex-start;flex-direction:column}.dispatch-step-actions>div{width:100%;justify-content:flex-start}}
@media(max-width:1100px){.dispatch-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dispatch-downstream-tabs{flex:1;min-width:210px}}
@media(max-width:760px){.dispatch-kpis{grid-template-columns:1fr 1fr}.dispatch-plan-head{gap:12px}.dispatch-plan-controls{width:100%;justify-content:flex-start}.dispatch-plan-controls label{flex:1}.dispatch-model-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dispatch-model-card strong{font-size:19px}.dispatch-plan-panel>.table-wrap{max-height:55vh}.dispatch-downstream-tabs{width:100%;min-width:0}.dispatch-list-metrics{width:100%;padding-top:0;justify-content:space-between}.dispatch-output-actions{width:100%;margin-left:0}.dispatch-output-actions .btn{flex:1}}
@media(max-width:1250px){.dispatch-whole-sections{grid-template-columns:1fr}.dispatch-whole-section .table-wrap{max-height:none}}
@media(max-width:520px){.dispatch-kpis{grid-template-columns:1fr}.dispatch-model-grid{grid-template-columns:1fr}.dispatch-plan-note{line-height:1.5}.dispatch-part-tabs{padding:0;grid-template-columns:1fr 1fr}.dispatch-part-tabs button{min-width:0}.dispatch-selected-model{padding-inline:14px}.dispatch-section-intro{align-items:flex-start;flex-direction:column}.dispatch-section-intro .tag{align-self:flex-start}}
