/* Approved mobile harvest layout; desktop controls retain their existing CSS. */
/* A completed bag lookup shows its information first at every viewport width. */
#scanDialog.scan-bag-trace .scan-camera-panel,#scanDialog.scan-bag-trace .scan-camera-controls,#scanDialog.scan-bag-trace #scanCameraStatus,#scanDialog.scan-bag-trace #scanDialogHint,#scanDialog.scan-bag-trace #scanManualDetails{display:none!important}
#scanDialog.scan-bag-trace #scanResult{display:block;padding:0;background:transparent;border:0}
.bag-trace-head{display:grid;gap:6px;background:#edf4ff;border-radius:10px;padding:14px}
.scan-harvest-correction{display:flex;justify-content:flex-end;margin:8px 0 2px}
.scan-harvest-correction .btn{min-height:40px;padding:8px 14px;font-size:14px}
.bag-print-source-card .scan-harvest-correction{justify-content:flex-start;margin:10px 0 0}
.bag-trace-head>span{font-size:12px;color:#7386a0}.bag-trace-head>strong{font-size:20px;line-height:1.5}.bag-trace-head>b{font-size:26px}.bag-trace-head small{font-size:12px;font-weight:400;color:#7386a0}
.bag-trace-sources h3{font-size:14px;color:#527297;margin:14px 0 8px}
.bag-print-source{display:grid;gap:5px;padding:12px 0;border-bottom:1px solid #dfe8f5;overflow-wrap:anywhere;line-height:1.6}
.bag-print-source>strong{font-size:20px;color:#203452}.bag-print-source>span{font-size:14px}.bag-print-source details,.bag-trace-older{font-size:12px;color:#7386a0;margin-top:8px}.bag-print-source p{margin:6px 0}
.harvest-bag-dialog .dialog-card{display:grid;gap:12px;box-sizing:border-box}
.harvest-bag-dialog .dialog-head h2{font-size:20px;line-height:1.4}
.harvest-bag-dialog .dialog-head p{margin:4px 0 0}
.harvest-bag-dialog .dialog-head>button{min-width:40px;min-height:40px;flex-shrink:0}
.harvest-bag-summary{background:#edf4ff;border-radius:10px;padding:14px;display:grid;gap:6px;overflow-wrap:anywhere}
.harvest-bag-summary>strong{font-size:20px;line-height:1.4}
.harvest-bag-summary .mobile-harvest-eyebrow,.harvest-bag-summary .meta{font-size:13px;color:#7386a0}
.harvest-bag-summary .mobile-harvest-good-counts{margin:4px 0 0}
.harvest-bag-summary .mobile-harvest-good-counts>div{padding:0;background:transparent}
.harvest-bag-summary .mobile-harvest-good-counts span{display:block;font-size:13px;color:#7386a0;margin-bottom:4px}
.harvest-bag-summary .mobile-harvest-good-counts strong{font-size:26px!important;line-height:1.4}
.harvest-bag-correction{display:flex;justify-content:flex-end;margin:-2px 0 2px}
.harvest-bag-correction .btn{min-height:40px;padding:8px 14px;font-size:14px}
.harvest-bag-code-label{font-size:14px;margin:0!important}
.harvest-bag-code-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.harvest-bag-code-row input,.harvest-bag-code-row button{min-width:0;min-height:44px;margin:0;font-size:16px}
.harvest-bag-dialog .mobile-harvest-info{margin:0;padding:12px;background:#e6f5f2;color:#527b76;font-size:14px;line-height:1.6;border-radius:8px;overflow-wrap:anywhere}
.harvest-bag-dialog .dialog-actions{display:flex;gap:8px;margin:0;padding-top:12px;border-top:1px solid #dfe8f5}
.harvest-bag-dialog .dialog-actions>button{flex:1;min-width:0;min-height:46px;font-size:15px;border-radius:10px}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){.harvest-bag-dialog .dialog-card{padding:16px}.harvest-bag-dialog .btn.primary{background:#246bef;border-color:#246bef}}

/* History quantity correction follows the same compact, abnormal-harvest form. */
#harvestHistoryCorrectionDialog{width:min(640px,94vw);max-height:calc(100dvh - 24px);padding:0;border-radius:18px;overflow:auto}
#harvestHistoryCorrectionDialog .dialog-card{padding:16px;gap:12px}
#harvestHistoryCorrectionDialog .dialog-head{align-items:flex-start;margin:0}
#harvestHistoryCorrectionDialog .dialog-head h2{font-size:20px;line-height:1.4}
.harvest-correction-summary{display:grid;gap:5px;padding:14px;background:#edf4ff;border-radius:10px;overflow-wrap:anywhere}
.harvest-correction-summary strong{font-size:20px;line-height:1.4;color:#203452}
.harvest-correction-summary .meta{font-size:13px;color:#7386a0}
.harvest-correction-fields{display:grid;gap:12px;border:0;padding:0;margin:0}
.harvest-correction-results{display:flex;flex-wrap:nowrap;gap:4px;padding:4px;background:#f3f7fd;border-radius:10px}
.harvest-correction-results button{flex:1;min-width:0;min-height:44px;padding:6px 4px;border:1px solid transparent;border-radius:8px;background:transparent;color:#52657d;font-size:13px}
.harvest-correction-results button.active{background:#fff;border-color:#dfe8f5;color:#246bef}
.harvest-correction-results button.active[data-harvest-correction-result="partial_loss"]{background:#fff7e6;border-color:#f0c96b;color:#8a5a00}
.harvest-correction-results button.active[data-harvest-correction-result="whole_board_failed"]{background:#fecaca;border-color:#dc2626;color:#991b1b;font-weight:600}
.harvest-correction-loss-card{display:grid;gap:8px;padding:12px;background:#fff3e5;border-radius:10px}
.harvest-correction-loss-card .field-label{font-size:13px;color:#8b6d46}
.harvest-correction-quantity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.harvest-correction-quantity-grid label,.harvest-correction-fields>label{display:grid;gap:6px;font-size:13px;color:#304f70}
.harvest-correction-fields input,.harvest-correction-fields textarea{width:100%;min-width:0;min-height:44px;margin:0;padding:8px;border:1px solid #dce6f3;border-radius:9px;background:#fff;font-size:16px;box-sizing:border-box}
.harvest-correction-fields textarea{resize:vertical}
.harvest-correction-more{border-top:1px solid #dfe8f5;padding-top:4px;color:#7386a0;font-size:13px}
.harvest-correction-more summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
.harvest-correction-more label{margin-top:8px}
.harvest-correction-history{display:grid;gap:4px;color:#7386a0;font-size:12px;line-height:1.5}
#harvestHistoryCorrectionStatus:empty{display:none}
#harvestHistoryCorrectionDialog .dialog-actions{position:sticky;bottom:-16px;background:#fff;padding:12px 0 4px;margin-top:0;z-index:2}
#harvestHistoryCorrectionDialog .dialog-actions>button{min-height:46px}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){#harvestHistoryCorrectionDialog{width:calc(100vw - 20px)}#harvestHistoryCorrectionDialog .dialog-card{padding:16px}.harvest-correction-summary strong{font-size:18px}}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
 #mobileHarvestRecordTools{display:flex;align-items:center;gap:4px;margin:0 0 8px;flex-wrap:wrap}
 #mobileHarvestRecordTools.hidden{display:none}
 #mobileHarvestRecordTools #mobilePersonalHistoryBtn,#mobileHarvestRecordTools #harvestRecoveryEntry{position:static;display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;min-height:44px;margin:0;padding:8px 10px;border-color:transparent;background:transparent;font-size:14px;color:#246bef}
 #mobileHarvestRecordTools #harvestRecoveryEntry{margin-left:auto}
 .mobile-history-filter-flags{display:flex;gap:16px;align-items:center;width:100%}
 .mobile-history-filter-flags label{display:flex;gap:4px;align-items:center;font-size:13px;min-height:32px}
 .mobile-history-filter-flags input[type=checkbox]{width:18px;min-height:18px;height:18px;margin:0;padding:0}
 #mobileHistoryMoreManagement>summary{min-height:32px;font-size:12px;color:#587a9f;cursor:pointer}
 #mobileHistoryManagementTools .btn{font-size:12px;min-height:40px;margin:4px 4px 0 0}
 .mobile-history-row-actions label{display:flex;align-items:center;gap:4px;margin-right:auto}
 .mobile-history-row-actions input[type=checkbox]{width:18px;height:18px;margin:0}
 .mobile-harvest-multi-tools{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin:8px 0 12px}
 .mobile-harvest-multi-tools>span{display:flex;gap:4px;flex-wrap:wrap}
 .mobile-harvest-multi-tools .hidden,.mobile-harvest-multi-tools.hidden{display:none}
 .mobile-harvest-multi-tools button{min-height:44px;padding:6px 10px;border:1px solid #dfe8f5;border-radius:8px;background:#fff;font-size:13px;color:#365476}
 #mobileHarvestAgeFilter{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:13px;width:100%}
 #mobileHarvestAgeDays{width:72px;min-height:44px;margin:0;font-size:16px}
 #mobileHarvestMultiTools button:disabled{opacity:.5}
 #harvestPage .mobile-ops-stats{gap:8px;margin:4px 0 12px}
 #harvestPage .mobile-ops-stat{padding:8px 4px;border-radius:10px;min-height:64px}
 #harvestPage .mobile-ops-stat b{font-size:23px;line-height:1.25}
 #harvestPage .mobile-ops-stat span{font-size:12px}
 #harvestPage #harvestWorkspaceStatus{font-size:12px;line-height:1.5;margin:4px 0 8px}
 #harvestPage .mobile-machine-group{border-radius:12px;margin-bottom:10px}
 #harvestPage .mobile-harvest-info{padding:8px;background:transparent}
 #harvestPage .mobile-harvest-info strong{font-size:14px;white-space:normal;overflow-wrap:anywhere}
 #harvestPage .mobile-harvest-quantity{white-space:normal;overflow:visible;text-overflow:clip;max-width:none;text-align:left;font-size:13px;line-height:1.5}
 #harvestPage .mobile-harvest-line{grid-template-columns:24px minmax(0,1fr) auto;gap:8px}
 #harvestPage .mobile-harvest-info{grid-column:2;grid-row:1}
 #harvestPage .mobile-harvest-quantity{grid-column:2;grid-row:2;margin-top:-8px}
 #harvestPage .mobile-harvest-check{grid-row:1/3}
 #harvestPage .mobile-inline-action{grid-column:3;grid-row:1/3;min-height:44px;padding:8px}
 #harvestPage .assignment-change-notice{grid-column:2/-1;margin-top:4px;padding:8px;font-size:12px}
 #harvestPage .mobile-ops-bar{gap:6px;padding:8px 12px}
 #harvestPage .mobile-ops-bar .mobile-ops-button{min-height:44px;font-size:14px;padding:8px}
 #harvestDialog .dialog-card{padding:16px;gap:12px}
 #harvestDialog .dialog-head{margin:0;align-items:flex-start}
 #harvestDialogTitle{font-size:20px}
 #harvestDialogMeta{font-size:12px;color:#7386a0;margin:4px 0 0}
 #harvestDialog #harvestNameSnapshot{margin:0;padding:0;background:transparent;border:0}
 #harvestDialog .mobile-harvest-recognition{gap:8px;margin:0}
 #harvestDialog .mobile-harvest-recognition strong{font-size:20px;line-height:1.4;overflow-wrap:anywhere}
 .mobile-harvest-eyebrow{font-size:12px;color:#7386a0;display:block;margin-bottom:4px}
 #harvestDialog .mobile-harvest-recognition button{min-height:44px;padding:8px 10px;background:transparent;color:#246bef;border-color:transparent;font-size:14px;flex-shrink:0}
 #harvestDialog .mobile-harvest-tag{margin:8px 6px 0 0;padding:3px 8px;font-size:12px;border-radius:6px}
 #mobileHarvestSummary{padding:0!important;background:transparent!important;border:0!important;display:block}
 .mobile-harvest-good-counts{display:flex;gap:12px;margin:4px 0 12px}
 .mobile-harvest-good-counts>div{flex:1;min-width:0;padding:12px;background:#edf4ff;border-radius:10px}
 .mobile-harvest-good-counts span{display:block;font-size:12px;color:#7386a0;margin-bottom:4px}
 .mobile-harvest-good-counts strong{font-size:30px!important;line-height:1.3;color:#203452;overflow-wrap:anywhere}
 .mobile-harvest-good-counts small{font-size:14px;margin-left:4px}
 #mobileHarvestSummary .production-goal-hint{font-size:12px;padding:8px 0;background:transparent;border:0}
 #harvestDialog #harvestNameSnapshot{padding:12px;background:#edf4ff;border-radius:8px}
 #harvestDialog #mobileHarvestSummary{margin-top:-12px;padding:0 12px 12px!important;background:#edf4ff!important;border-radius:0 0 10px 10px}
 #harvestDialog #harvestNameSnapshot.harvest-card-failed,#harvestDialog #mobileHarvestSummary.harvest-card-failed{background:#fecaca!important}
 #harvestDialog #harvestNameSnapshot.harvest-card-failed strong,#harvestDialog #mobileHarvestSummary.harvest-card-failed strong{color:#991b1b}
 #harvestDialog #harvestNameSnapshot.harvest-card-partial,#harvestDialog #mobileHarvestSummary.harvest-card-partial{background:#fff3d6!important}
 #harvestDialog .mobile-harvest-good-counts{margin:0;gap:12px}
 #harvestDialog .mobile-harvest-good-counts>div{padding:4px 0 0;background:transparent}
 #harvestDialog .mobile-harvest-good-counts strong{font-size:28px!important}
 #mobileHarvestPlan{padding:12px;background:#e6f5f2;border-left:3px solid #0d9488;border-radius:8px}
 #mobileHarvestPlan h3{font-size:13px;color:#527b76;margin:0 0 5px;font-weight:500}
 #mobileHarvestPlan .assignment-change-notice{padding:0;margin:0;border:0;border-radius:0}
 #mobileHarvestPlan .assignment-change-notice strong{font-size:16px;line-height:1.6;overflow-wrap:anywhere}
 #mobileHarvestPlan p{margin:0}
 #mobileHarvestFileChoices{display:grid;gap:8px}
 #mobileHarvestFileChoices:empty{display:none}
 #mobileHarvestFileChoices button{white-space:normal;overflow-wrap:anywhere;text-align:left;min-height:44px;font-size:14px;padding:10px 12px}
 #mobileHarvestFields{display:grid;gap:12px}
 #mobileHarvestFields>label,#mobileHarvestManual>label{display:grid;gap:6px;font-size:13px;margin:0}
 #mobileHarvestFields input,#mobileHarvestFields select,#mobileHarvestManual input,#mobileHarvestManual select{width:100%;min-width:0;min-height:44px;font-size:16px;margin:0}
 #mobileHarvestFields .mobile-harvest-quantity-input{display:grid;grid-template-columns:minmax(0,1fr) 72px;gap:8px}
 #mobileHarvestFields .harvest-loss-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #mobileHarvestManual{display:grid;gap:12px}
 #mobileHarvestManual p{margin:0;font-size:12px;line-height:1.5}
 #harvestDialog .hidden{display:none!important}
 #mobileHarvestOutcome:empty{display:none}
 #mobileHarvestFile:before{content:attr(data-kind);display:block;color:#7386a0;margin-bottom:4px}
 #mobileHarvestResultPanel{display:grid;gap:12px}
 #harvestDialog .mobile-harvest-results{display:flex;flex-wrap:nowrap;gap:4px;padding:4px;background:#f3f7fd;border-radius:10px}
 #harvestDialog .mobile-harvest-results legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #harvestDialog .mobile-harvest-results label{flex:1;min-width:0;min-height:44px;font-size:13px;padding:6px 4px;justify-content:center;text-align:center;border:1px solid transparent;border-radius:8px}
 #harvestDialog .mobile-harvest-results label:has(input:checked){background:#fff;border-color:#dfe8f5;color:#246bef}
 #harvestDialog .mobile-harvest-results label:has(input[value="partial_loss"]:checked){background:#fff7e6;border-color:#f0c96b;color:#8a5a00}
 #harvestDialog .mobile-harvest-results label:has(input[value="whole_board_failed"]:checked){background:#fecaca;border-color:#dc2626;color:#991b1b;font-weight:600}
 #harvestDialog .mobile-harvest-results input{position:absolute;opacity:0;width:1px;height:1px}
 #harvestDialog .mobile-harvest-results label:focus-within{outline:2px solid #246bef}
 #mobileHarvestResultPanel #harvestLossQtyWrap{padding:12px;background:#fff3e5}
 #mobileHarvestResultPanel .harvest-loss-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #mobileHarvestResultPanel .harvest-loss-grid label{min-width:0;margin:0;font-size:13px;display:grid;gap:6px}
 #mobileHarvestResultPanel input,#mobileHarvestResultPanel select{width:100%;min-width:0;min-height:44px;font-size:16px;margin:0}
 #mobileHarvestOutcome{font-size:12px;color:#617d9e;background:transparent;padding:0}
 #mobileHarvestOther{font-size:13px;color:#7386a0;border-top:1px solid #dfe8f5;padding-top:4px}
 #mobileHarvestOther>summary{min-height:44px;display:flex;align-items:center}
 #mobileHarvestFile{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 #harvestDialog .dialog-actions{display:flex;gap:8px;border-top:1px solid #dfe8f5;padding-top:12px;margin-top:0}
 #harvestDialog .dialog-actions>button{min-height:44px;min-width:0;font-size:15px;border-radius:10px}
 #scanDialog.scan-mobile-compact .dialog-card{padding:16px;gap:12px}
 #scanDialog.scan-mobile-compact #scanTitle{font-size:20px}
 #scanDialog.scan-mobile-compact #scanDialogHint{font-size:13px;line-height:1.5;margin:8px 0 0}
 #scanDialog.scan-mobile-compact .scan-camera-panel{aspect-ratio:1.15;min-height:0;max-height:none;border-radius:12px}
 #scanDialog.scan-mobile-compact #scanVideo{height:100%;object-fit:cover}
 #scanDialog.scan-mobile-compact #scanCameraStatus{padding:4px 0;background:transparent;border:0;font-size:13px}
 #scanDialog.scan-mobile-compact .scan-camera-controls{display:flex;flex-wrap:wrap;gap:8px}
 #scanDialog.scan-mobile-compact .scan-camera-controls>select{width:100%;min-height:44px;font-size:16px}
 #scanDialog.scan-mobile-compact .scan-camera-controls>button{flex:1;min-height:44px}
 #scanDialog.scan-mobile-compact #scanStartCamera:disabled,#scanDialog.scan-mobile-compact #scanStopCamera:disabled,#scanDialog.scan-mobile-compact .scan-manual-label,#scanDialog.scan-mobile-compact #scanManualSubmit{display:none}
 #scanDialog.scan-mobile-compact .dialog-actions{display:flex;gap:8px}
 #scanDialog.scan-mobile-compact .dialog-actions>button{flex:1;min-height:44px;padding:8px;font-size:14px}
 #mobileHarvestManagementDialog .mobile-history-management-body{padding:0 16px 16px}
 #mobileHarvestManagementDialog .mobile-personal-history-legacy{border:0;padding:0}
 #mobileHarvestManagementDialog .mobile-personal-history-legacy>summary{display:none}
 #mobileHarvestManagementDialog .harvest-history-filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
 #mobileHarvestManagementDialog .harvest-history-filters label{font-size:13px;min-height:44px}
 #mobileHarvestManagementDialog .harvest-history-filters>input{flex-basis:100%;min-height:44px;font-size:16px}
 #mobileHarvestManagementDialog #harvestHistoryStatus{font-size:12px;color:#7386a0;margin:8px 0}
 #mobileHarvestManagementDialog .review-row{padding:12px 0;margin:0;background:transparent;border:0;border-bottom:1px solid #dfe8f5;border-radius:0;gap:8px}
 #mobileHarvestManagementDialog .review-row strong{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 #mobileHarvestManagementDialog .review-row .meta{font-size:12px;line-height:1.7}
 #mobileHarvestManagementDialog .mobile-history-record-quantity{font-size:18px;color:#18845d;margin:4px 0}
 #mobileHarvestManagementDialog .review-row button{min-height:44px;padding:8px 10px;font-size:13px}
 #mobileHarvestManagementDialog .assignment-change-notice{font-size:12px;padding:8px;margin:8px 0}
 .mobile-bulk-body{padding:0 16px 16px;overflow:auto;min-height:0}
 #mobileBulkHarvestDialog,.manual-harvest-dialog{height:auto;max-height:calc(100dvh - 32px)}
 #mobileBulkHarvestSummary{font-size:14px}
 .mobile-bulk-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:12px 0;border-bottom:1px solid #dfe8f5}
 .mobile-bulk-row>.formal-version-notice,.mobile-bulk-row>.assignment-change-notice,.mobile-bulk-problem{grid-column:1/-1;min-width:0;margin:0}
 .mobile-bulk-problem{font-size:13px;line-height:1.6;color:#a96820;overflow-wrap:anywhere}
 .mobile-bulk-problem p{margin:0 0 6px}.mobile-bulk-problem details{margin-bottom:8px}
 .mobile-bulk-problem button{white-space:normal;min-height:44px}
 .mobile-bulk-row strong{display:block;font-size:14px;overflow-wrap:anywhere}
 .mobile-bulk-row .meta{display:block;font-size:12px;line-height:1.7}
 .mobile-bulk-row>span{font-size:12px;overflow-wrap:anywhere;text-align:right}
 .mobile-bulk-ok{color:#18845d}.mobile-bulk-error{color:#a96820}
 #mobileBulkHarvestStatus{font-size:13px;color:#7386a0;line-height:1.6}
 #mobileBulkHarvestDialog .dialog-actions{display:flex;gap:8px;margin-top:12px}
 #mobileBulkHarvestDialog .dialog-actions button{flex:1;min-height:44px;min-width:0;font-size:14px;padding:8px}
 .manual-harvest-body{padding:0 16px 16px;overflow:auto}
 .manual-harvest-body>label{display:grid;gap:6px;margin:14px 0;font-size:13px}
 .manual-harvest-body input{width:100%;min-width:0;min-height:44px;font-size:16px}
 .manual-harvest-body .dialog-actions{display:flex;gap:8px}
 .manual-harvest-body .dialog-actions button{min-height:44px;min-width:0;white-space:normal}
 #harvestHistoryPrinter{min-height:44px;max-width:100%;font-size:16px}
}
@media(min-width:761px) and (min-height:561px){#mobileHarvestRecordTools,#mobileHarvestMultiTools,#mobileHarvestBulkRecovery{display:none!important}}

@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
 #mobileHarvestManual .mobile-harvest-machine-button{width:100%;min-height:48px;text-align:left;padding:10px 14px;border:1px solid #dce7f5;border-radius:10px;background:#fff;color:#213a58;font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:space-between}
 #mobileHarvestManual .mobile-harvest-machine-button::after{content:'⌕';color:#2670c9;font-size:23px}
 #mobileHarvestMachineDialog{width:calc(100vw - 24px);max-width:560px;height:min(80dvh,760px);max-height:calc(100dvh - 32px);background:#fff;border-radius:18px}
 #mobileHarvestMachineDialog .mobile-picker-head{padding:15px 16px;border-bottom:1px solid #e1eaf5}
 #mobileHarvestMachineDialog .mobile-picker-head h3{font-size:19px}
 #mobileHarvestMachineSearch{margin:12px 14px 4px;padding:10px 12px;width:calc(100% - 28px);height:48px;flex-shrink:0;border:1px solid #d4e2f3;border-radius:11px;font-size:16px;background:#f5f8ff}
 #mobileHarvestMachineStatus{padding:5px 16px 8px;color:#7085a1;font-size:12px;flex-shrink:0}
 #mobileHarvestMachineRows{overflow-y:auto;min-height:0;flex:1;padding:0 14px 16px;overscroll-behavior:contain}
 #mobileHarvestMachineRows .mobile-machine-section{font-size:12px;font-weight:600;color:#6b7f9b;margin:14px 2px 8px}
 #mobileHarvestMachineRows .mobile-machine-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 #mobileHarvestMachineRows .mobile-machine-choice{min-width:0;min-height:60px;padding:11px;border:1px solid #dce7f5;border-radius:11px;background:#f6f9ff;color:#203650;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px}
 #mobileHarvestMachineRows .mobile-machine-choice strong{max-width:100%;font-size:15px;overflow-wrap:anywhere}
 #mobileHarvestMachineRows .mobile-machine-choice small{font-size:11px;color:#768ba7;overflow-wrap:anywhere}
 #mobileHarvestMachineRows .mobile-machine-choice small:empty{display:none}
 #mobileHarvestMachineRows .mobile-machine-choice.selected{background:#eaf4ff;border-color:#397be0;color:#1356ba}
 #mobileHarvestMachineRows .mobile-machine-empty{padding:25px 10px;text-align:center;color:#8191aa;font-size:13px}
}

@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
 #harvestDialog #mobileHarvestPlanChoiceWrap{display:grid;gap:6px;margin:0;padding:10px 12px;border:1px solid #d9e7f8;border-radius:10px;background:#f5f9ff;font-size:13px;color:#304e70}
 #harvestDialog #mobileHarvestPlanChoiceWrap.hidden{display:none!important}
 #mobileHarvestPlanChoice{min-width:0;width:100%;height:46px;padding:8px 10px;font-size:15px;color:#203650;background:white;border:1px solid #cbdcef;border-radius:9px}
 #mobileHarvestPlanHint{display:block;line-height:1.5;font-size:12px;color:#6480a1}
}

@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
 #handworkCreateDemandBtn,#handworkInventoryDemandBtn{display:none!important}
 #scanDialog .bag-trace-sources h3{font-size:15px;font-weight:700;color:#304f73;margin:16px 0 8px}
 #scanDialog .bag-print-source-card{display:block;border:1px solid #dbe5ef;border-radius:10px;background:#fff;padding:12px;margin:0 0 12px;line-height:1.5}
 .bag-print-source-card>header{display:flex;align-items:center;justify-content:space-between;gap:8px}
 .bag-print-source-card>header>strong{font-size:18px;color:#203650;font-weight:750;overflow-wrap:anywhere}
 .bag-source-result{font-size:12px;font-weight:650;white-space:nowrap;padding:4px 8px;border-radius:6px;background:#f0f3f7;color:#53677f}
 .bag-source-result.success{background:#e6f5ed;color:#187447}.bag-source-result.warning{background:#fff1dd;color:#9b5e12}.bag-source-result.danger{background:#fde9e9;color:#b83232}
 .bag-source-product{font-size:13px;color:#49627e;margin-top:8px;overflow-wrap:anywhere}
 .bag-source-quantity{display:flex;align-items:center;justify-content:space-between;margin:8px 0;padding:8px 0;border-bottom:1px solid #e6edf5;font-size:13px;color:#49627e}
 .bag-source-quantity b{font-size:21px;color:#24486a}.bag-source-quantity small{font-size:13px;font-weight:500}
 .bag-source-facts{display:grid;gap:8px;margin:0}.bag-source-facts>div{display:grid;grid-template-columns:76px minmax(0,1fr);gap:8px}
 .bag-source-facts dt{font-size:12px;color:#647993}.bag-source-facts dd{margin:0;font-size:13px;color:#263e58;font-weight:600;overflow-wrap:anywhere}
 .bag-source-file{border-top:1px solid #e6edf5;margin-top:12px;padding-top:8px}.bag-source-file>span{display:block;color:#647993;font-size:12px;margin-bottom:4px}.bag-source-file>strong{display:block;font-size:13px;color:#304d6a;font-weight:550;overflow-wrap:anywhere;line-height:1.6}
 .bag-print-source-card details{font-size:12px;color:#536f8e}.bag-source-empty{font-size:13px;line-height:1.6;color:#6a7c92;padding:12px;background:#f5f7fa;border-radius:8px}
 #harvestDialog #mobileHarvestManual{padding:12px;border:1px solid #dce7f2;border-radius:10px;background:#f7faff;gap:12px}
 #harvestDialog #mobileHarvestManual>label{font-size:13px;font-weight:650;color:#304f70}
 #mobileHarvestManual>p.meta{font-size:12px;line-height:1.6;color:#637991;margin:0;font-weight:400}
 #mobileHarvestPlanButton{font-size:15px;font-weight:650;color:#234969;background:#fff;min-height:46px;border:1px solid #cbdcef;border-radius:8px;text-align:left;padding:10px 12px}
 #mobileHarvestPlanDialog{width:calc(100vw - 24px);max-width:560px;max-height:calc(100dvh - 24px);height:min(82dvh,760px);background:#fff;border-radius:14px}
 #mobileHarvestPlanDialog .mobile-picker-head{padding:12px 16px;border-bottom:1px solid #e2eaf4}#mobileHarvestPlanDialog h3{font-size:18px;font-weight:700}
 #mobileHarvestPlanSearch{margin:12px 16px 8px;width:calc(100% - 32px);min-height:44px;font-size:16px;border:1px solid #cfdded;border-radius:8px;padding:8px 12px}
 .mobile-plan-scope{padding:0 16px 8px;font-size:12px;color:#627c98}
 #mobileHarvestPlanRows{padding:0 16px 12px;overflow:auto;min-height:0;flex:1;overscroll-behavior:contain}
 .mobile-plan-choice{display:block;text-align:left;width:100%;border:1px solid #d9e4f0;background:#fff;border-radius:10px;padding:12px;margin-bottom:8px;min-height:74px;color:#243e5c}
 .mobile-plan-choice>span{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.mobile-plan-choice strong{font-size:15px;overflow-wrap:anywhere;min-width:0}.mobile-plan-choice small{font-size:12px;color:#617c98;flex:none}.mobile-plan-choice>b{display:block;font-size:16px;color:#245f9d;margin-top:8px}.mobile-plan-choice em{display:block;font-size:12px;font-style:normal;color:#9b6a23;margin-top:4px}.mobile-plan-choice.selected{background:#edf5ff;border-color:#4b8dd7}.mobile-plan-choice:disabled{background:#f5f7fa;color:#738198}
 .mobile-plan-manual{margin:0 16px 12px;min-height:44px;border:1px solid #d8e3ee;border-radius:8px;background:#f5f8fc;color:#3b5f85;font-size:13px}
}
/* The net part need is shared with the desktop board, below the actual batch. */
.mobile-harvest-demand{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 12px;margin:0 0 4px 38px;color:var(--muted,#64748b);font-size:12px;line-height:1.5}

/* 打完停止：手机上必须一眼看到，单独用高对比警示块，不跟普通说明混在一起。 */
.mobile-harvest-stop{margin:8px 0;padding:12px 14px;border-left:6px solid #d9480f;border-radius:8px;background:#fff4e6;color:#8f3b00;font-size:15px;line-height:1.65}
.mobile-harvest-stop>strong{display:block;font-size:17px;font-weight:700;margin-bottom:4px}

/* 收菜前的下一轮安排确认层：盖住整页，先看清这板收完接着做什么，点确认才填数据。 */
.mobile-harvest-gate{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:18px 14px;background:rgba(9,24,44,.45);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.mobile-harvest-gate.hidden{display:none}
/* 卡片：正文区自己滚，确认按钮永远钉在底部——安排写得再长也能看全，也不会滚到看不见按钮。 */
.mobile-harvest-gate-card{width:100%;max-width:430px;max-height:calc(100dvh - 32px);display:flex;flex-direction:column;overflow:hidden;background:#fff;border-radius:18px;box-shadow:0 20px 52px rgba(9,24,44,.34);border-top:6px solid #1963d9}
.mobile-harvest-gate-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 18px 2px}
.mobile-harvest-gate-kicker{font-size:13px;font-weight:700;letter-spacing:.12em;color:#1963d9}
.mobile-harvest-gate-text{margin-top:10px;font-size:19px;line-height:1.55;font-weight:700;color:#10233b;overflow-wrap:anywhere;white-space:normal}
.mobile-harvest-gate-text .assignment-change-notice{border:0;background:transparent;padding:0;margin:0;display:block}
/* 安排原文是整段话，任何宽度下都换行显示，不做省略号截断。 */
.mobile-harvest-gate-text .assignment-change-notice strong{display:block;font-size:inherit;line-height:inherit;font-weight:700;overflow-wrap:anywhere;white-space:normal}
.mobile-harvest-gate .mobile-harvest-gate-text .assignment-change-notice a,.mobile-harvest-gate .mobile-harvest-stop .assignment-change-notice a{display:inline-block;margin-top:10px;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
/* 停止警示块里再套一层通知会变成“框里套框”，这里只留文字。 */
.mobile-harvest-gate .mobile-harvest-stop .assignment-change-notice{border:0;background:transparent;padding:0;margin:6px 0 0;display:block}
.mobile-harvest-gate .mobile-harvest-stop .assignment-change-notice strong{display:block;font-size:inherit;line-height:inherit;overflow-wrap:anywhere;white-space:normal}
.mobile-harvest-gate-demand{margin-top:8px;font-size:15px;line-height:1.55;color:#41536b;overflow-wrap:anywhere}
.mobile-harvest-gate-hint{margin:12px 0 0;font-size:13px;color:#7b8798}
.mobile-harvest-gate-confirm{display:block;flex:0 0 auto;width:calc(100% - 36px);min-height:54px;margin:12px 18px 16px;border:0;border-radius:14px;background:#1963d9;color:#fff;font-size:18px;font-weight:700}
.mobile-harvest-gate-confirm:active{background:#144fa8}
/* 定量停止：收菜这一刻只突出一个结论——收完还要不要继续打。 */
.mobile-harvest-stop-plan{margin:12px 0 0;padding:14px;border-radius:12px;border:1px solid #f0c9a8;background:#fffaf4}
.mobile-harvest-stop-plan.is-enough{border-color:#b9e0c4;background:#f3fbf5}
.mobile-harvest-stop-plan-head{font-size:13px;font-weight:600;letter-spacing:.06em;color:#a1650f}
.mobile-harvest-stop-plan.is-enough .mobile-harvest-stop-plan-head{color:#1b7f45}
.mobile-harvest-stop-verdict{margin-top:8px;padding:11px 12px;border-radius:10px;font-size:19px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.mobile-harvest-stop-verdict.enough{background:#e7f7ec;color:#146c3a}
.mobile-harvest-stop-verdict.short{background:#fff1e6;color:#8f3b00}
.mobile-harvest-stop-line{margin-top:8px;font-size:14px;line-height:1.55;color:#54657c;overflow-wrap:anywhere}
.mobile-harvest-stop-models{margin-top:6px;font-size:13px;line-height:1.55;color:#7b8798;overflow-wrap:anywhere}
.mobile-harvest-gate-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.mobile-harvest-stop-done{margin:8px 0;padding:12px 14px;border-left:6px solid #1b7f45;border-radius:8px;background:#eefaf2;color:#146c3a;font-size:15px;line-height:1.6}
.mobile-harvest-stop-done>strong{display:block;font-size:17px;margin-bottom:2px}
/* 收菜流水：一条记录一行，最新在最上面；手机上按时间对班最直观。 */
.mobile-history-views{display:flex;gap:6px;padding:0 12px 6px;flex-shrink:0}
.mobile-history-views>button{flex:1;min-height:34px;border:1px solid #dce7f6;border-radius:9px;background:#fff;color:#587a9f;font-size:12px}
.mobile-history-views>button.active{border-color:#236ff4;background:#edf4ff;color:#1c5cc4;font-weight:600}
.mobile-history-stream{overflow:auto;flex:1;min-height:0;padding:0 12px 12px}
.mobile-history-stream-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:4px 8px;align-items:center;background:#fff;border:1px solid #e1eafa;border-radius:10px;padding:8px 10px;margin:6px 0}
.mobile-history-stream-row>time{font-size:11px;color:#6b83a2;white-space:nowrap}
.mobile-history-stream-main{display:flex;flex-direction:column;min-width:0}
.mobile-history-stream-main>strong{font-size:12px;overflow-wrap:anywhere}
.mobile-history-stream-main>span{font-size:11px;color:#7b90ad;overflow-wrap:anywhere}
.mobile-history-stream-main>small{font-size:10px;color:#8a9cb5;overflow-wrap:anywhere}
.mobile-history-stream-qty{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:11px;white-space:nowrap}
.mobile-history-stream-qty>b{color:#06966b;font-size:12px}
/* 收菜弹窗精简：产品 → 数量 → 结果 → 下一轮，一屏看完；成功页只留关键几行。 */
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  #harvestDialog .mobile-harvest-form{gap:8px}
  #harvestDialog .mobile-harvest-eyebrow{font-size:11px;color:#7b8eaa;letter-spacing:0}
  #mobileHarvestPlan{margin:0}
  #mobileHarvestPlan.hidden{display:none}
  #mobileHarvestPlan>h3{font-size:12px;color:#5c7594;margin:0 0 6px;font-weight:600}
  .mobile-harvest-success{font-size:18px;padding:10px 0}
  .mobile-harvest-receipt dl{gap:8px 12px;padding:12px}
  .mobile-harvest-receipt dl dt{font-size:12px}
  .mobile-harvest-receipt dl dd{font-size:13px}
  .mobile-harvest-info{font-size:11px;line-height:17px;padding:8px 10px}
  #harvestDialog .dialog-actions{padding-top:8px}
}
/* 收菜/补录弹窗的层级：产品与数量是主信息，机器/时间/方案退成辅助，说明文字不再显示。 */
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  #harvestDialog .dialog-head p{display:none!important}
  #mobileHarvestManual>p.meta{display:none!important}
  #mobileHarvestPlanHint{display:none!important}
  #harvestDialog #mobileHarvestManual{padding:0;border:0;background:transparent;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0}
  #harvestDialog #mobileHarvestManual>label{font-weight:400;font-size:11px;color:#7b8eaa;gap:4px}
  #harvestDialog #mobileHarvestManual .mobile-harvest-machine-button,#harvestDialog #mobileHarvestManual input{min-height:40px;font-size:13px;font-weight:500;color:#26364d}
  #harvestDialog #mobileHarvestPlanChoiceWrap{padding:0;border:0;background:transparent;gap:4px;margin:0;font-size:11px;color:#7b8eaa}
  #harvestNameSnapshot strong{font-size:17px;line-height:1.45}
  #harvestDialog #mobileHarvestFields>label{font-size:11px;color:#7b8eaa;gap:4px}
  #harvestDialog #mobileHarvestFields input[type=number]{font-size:22px;font-weight:500;min-height:54px}
  #harvestDialog .mobile-harvest-results legend{font-size:11px;color:#7b8eaa;margin-bottom:6px}
  #harvestDialog .mobile-harvest-results label{font-size:13px}
}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  #harvestDialog #mobileHarvestUnit.hidden{display:none!important}
  #harvestDialog .mobile-harvest-quantity-input.single-unit{grid-template-columns:minmax(0,1fr)}
}
#harvestPage .mobile-harvest-line .mobile-harvest-info{flex-direction:row!important;align-items:center;gap:7px}
#harvestPage .mobile-harvest-line .mobile-harvest-info>div{display:flex;flex-direction:column;gap:3px;min-width:0}

/* 收菜流程精简：第 1 步只留核对，后续安排折成一行；第 2 步直接在同一页扫码。 */
.harvest-step-badge{display:inline-flex;align-items:center;min-height:22px;margin-bottom:4px;padding:2px 8px;border-radius:999px;background:#eaf2ff;color:#246bef;font-size:11px;font-weight:700;letter-spacing:.02em}
#mobileHarvestPlan{padding:0!important;background:transparent!important;border-left:0!important;border-radius:0!important}
.mobile-harvest-next{display:grid;gap:3px;padding:10px 12px;border-left:3px solid #e0a23a;border-radius:8px;background:#fff8ea;color:#6f4a12}
.mobile-harvest-next.is-enough{border-left-color:#2f9b63;background:#eefaf3;color:#146c3a}
.mobile-harvest-next>span{font-size:11px;font-weight:700;letter-spacing:.04em;opacity:.72}
.mobile-harvest-next>strong{font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.mobile-harvest-next>small{font-size:12px;line-height:1.5;opacity:.82;overflow-wrap:anywhere}
.scan-harvest-summary{display:grid;gap:7px;padding:13px 14px;border:1px solid #cfe8db;border-radius:12px;background:#f3fbf7;overflow-wrap:anywhere}
.scan-harvest-summary.hidden{display:none!important}
.scan-harvest-step{font-size:11px;font-weight:700;letter-spacing:.06em;color:#1b7f5a}
.scan-harvest-title{font-size:19px;font-weight:800;line-height:1.35;color:#0f6b47}
.scan-harvest-product{font-size:13px;line-height:1.45;color:#3f6378}
.scan-harvest-metrics{display:flex;align-items:baseline;gap:6px;min-width:0}
.scan-harvest-metrics strong{font-size:26px;line-height:1.2;color:#123f2e;overflow-wrap:anywhere}
.scan-harvest-metrics span{font-size:12px;color:#527b76}
.scan-harvest-metrics em{margin-left:auto;padding:3px 8px;border-radius:999px;background:#e3f3ea;color:#1b7f5a;font-size:11px;font-style:normal;white-space:nowrap}
.scan-harvest-note{font-size:12px;line-height:1.5;color:#527b76}
.scan-harvest-bag{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:8px;background:#e8f4ff;color:#245f9d;font-size:12px}
.scan-harvest-bag b{font-size:16px;color:#164b80;overflow-wrap:anywhere}
.scan-harvest-next{display:grid;gap:2px;padding:8px 10px;border-radius:8px;background:#fff4e5;color:#8f3b00;font-size:12px}
.scan-harvest-next.done{background:#e7f7ec;color:#146c3a}
.scan-harvest-next strong{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.scan-harvest-next small{font-size:11px;opacity:.82}
#scanDialog.scan-harvest-completion .scan-camera-panel{aspect-ratio:1.65;max-height:238px}
#scanDialog.scan-harvest-completion #scanResult{display:none}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  #scanDialog.scan-harvest-completion .dialog-card{gap:9px}
  #scanDialog.scan-harvest-completion #scanDialogHint{margin:2px 0 0}
  #scanDialog.scan-harvest-completion .scan-camera-controls{gap:6px}
  #scanDialog.scan-harvest-completion .scan-camera-controls>button{min-height:40px;font-size:13px}
  #scanDialog.scan-harvest-completion .dialog-actions>button{min-height:46px}
}
#scanDialog.scan-harvest-completion .scan-camera-panel{height:clamp(180px,28dvh,230px);min-height:0;max-height:none;aspect-ratio:auto}
#scanDialog.scan-harvest-completion .dialog-actions{justify-content:center}
#scanDialog.scan-harvest-completion .dialog-actions>button{flex:0 1 170px}
