.mf-panel{position:fixed;inset:0;z-index:10000;overflow:auto;background:#f3f5f8;color:#142033;padding:20px max(16px,calc((100vw - 1240px)/2));font:15px/1.45 system-ui,sans-serif}.mf-panel *{box-sizing:border-box}.mf-panel h1{font-size:24px;margin:2px 0}.mf-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.mf-panel button,.mf-panel a{background:white;color:#142033;border:1px solid #c9d3e1;border-radius:8px;padding:10px 14px;min-height:44px;cursor:pointer;font:inherit;text-decoration:none}.mf-panel button:hover{background:#edf2fa}.mf-panel button.active,.mf-panel button[type=submit]{background:#164cc6;color:#fff}.mf-panel button:disabled{opacity:.5}.mf-panel nav,.mf-tools{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0;align-items:end}.mf-panel label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:600}.mf-panel input,.mf-panel select{background:#fff;color:#142033;padding:10px;border:1px solid #bcc9da;border-radius:7px;min-height:44px;font:inherit;max-width:100%}.mf-panel input{min-width:210px}.mf-panel .mf-notice:not(:empty){padding:14px;border-radius:9px;margin:12px 0;font-weight:700}.mf-danger{background:#ffe1e3;color:#9b1022;border:2px solid #d32139}.mf-success{background:#dcf4e7;color:#145635}.mf-order{background:#fff;border:1px solid #dbe2eb;border-radius:9px;margin:7px 0;padding:12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.mf-order>div:first-child{flex:1;min-width:180px}.mf-order small{display:block;color:#4b5e76;font-size:13px}.mf-trip,.mf-selection{background:#fff;border:1px solid #d2dbe7;border-radius:12px;padding:18px;margin:15px 0}.mf-cancelled{border:3px solid #d31c35;background:#fff0f1}.mf-warning{color:#a91629;font-weight:700}.mf-logo{width:24px;height:24px;object-fit:contain;vertical-align:middle;margin-right:7px;flex:none}.mf-muted{color:#53667f}.mf-scan{max-width:800px;margin:0 auto}.mf-scan>label{margin:12px 0}.mf-camera{margin:15px 0;background:#e4eaf2;border-radius:10px;padding:10px}.mf-camera video{display:block;width:100%;max-height:300px;background:#182334;border-radius:8px;margin-bottom:8px}.mf-camera video:not([src]){min-height:100px}.mf-panel form{display:flex;align-items:end;gap:8px}.mf-panel form label{flex:1}.mf-panel details{margin-top:12px}.oh-row-store>.mf-logo{float:left;margin-top:3px}.oh-fulfillment-actions{display:flex;gap:8px;flex-wrap:wrap;padding:8px 0}.mf-panel a:focus-visible,.mf-panel button:focus-visible{outline:3px solid #1666ff;outline-offset:2px}@media(max-width:600px){.mf-panel{padding:12px}.mf-header h1{font-size:20px}.mf-panel nav{position:sticky;top:0;background:#f3f5f8;padding:7px 0;z-index:1}.mf-panel nav button{padding:8px;font-size:13px}.mf-panel input{min-width:0;width:100%}.mf-panel form{flex-wrap:wrap}.mf-panel form label{width:100%;flex-basis:100%}.mf-tools label{flex:1;min-width:140px}.mf-tools select{width:100%}.mf-order button{flex:1}.mf-order>div:first-child{flex-basis:100%}}

/* Wide label view preserves the entire camera frame without stretching. */
.mf-camera-frame{position:relative;width:100%;aspect-ratio:16/7;background:#182334;overflow:hidden;border-radius:8px}
.mf-camera .mf-camera-frame video{position:absolute;inset:0;width:100%;height:100%;max-height:none;min-height:0;margin:0;object-fit:contain}
.mf-camera-guide{position:absolute;inset:18% 7%;border:2px solid #fff9;border-radius:8px;pointer-events:none}
.mf-new-badge,.mf-urgent-badge{display:inline-block;margin:0 7px 5px 0;padding:3px 7px;border-radius:6px;background:#dceeff;color:#144c9b;font-size:12px}
.mf-urgent-badge{background:#fff0cf;color:#844600}.mf-panel #mfNewOrders{position:sticky;top:70px;z-index:2;background:#164cc6;color:#fff;width:100%;margin:8px 0}.mf-panel #mfNewOrders[hidden]{display:none}
.packing-mobile-workspace .packing-screen-hidden{display:none!important}
.packing-mobile-workspace #employeeStageQueue,.packing-mobile-workspace #multiRoleWorkspace{order:3}
.packing-mobile-workspace #paintDefectInspection{order:20;margin-top:16px}
.packing-mobile-workspace #employeePersonalStatsV08{order:25}
.packing-mobile-workspace #packingTeamTabs{order:2;display:flex;gap:8px;margin:12px 0}
.packing-mobile-workspace #packingTeamTabs button{min-height:44px;padding:10px 18px}
.packing-mobile-workspace #packingTeamTabs .active{background:#274751;color:white}
.packing-mobile-workspace #packingMobileNav{order:30}
.packing-mobile-workspace .employee-header{order:-2}.packing-mobile-workspace .employee-welcome{order:-1}
.packing-mobile-workspace .employee-panel,.packing-mobile-workspace .multirole-card{min-width:0;max-width:100%}
@media(max-width:760px){
 .packing-mobile-workspace{padding-bottom:calc(88px + env(safe-area-inset-bottom))!important}
 .packing-mobile-workspace #packingMobileNav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));bottom:calc(8px + env(safe-area-inset-bottom));max-width:calc(100vw - 16px)}
 .packing-mobile-workspace #packingMobileNav button{font-size:10px;line-height:1.15;overflow-wrap:anywhere}
 .packing-mobile-workspace .multirole-workspace,.packing-mobile-workspace .employee-grid-main{grid-template-columns:minmax(0,1fr)}
 .packing-mobile-workspace .employee-form{grid-template-columns:minmax(0,1fr)!important}
 .packing-mobile-workspace input,.packing-mobile-workspace select{min-width:0;max-width:100%;font-size:16px}
 .packing-mobile-workspace .employee-profile{flex-wrap:wrap;gap:8px}
 .mf-panel{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
}
/* Match the visible horizontal crop to the decoder's canvas, even on portrait cameras. */
#mfPanel .mf-camera-frame{aspect-ratio:16/6!important;height:auto!important;min-height:0!important;max-width:100%;position:relative;overflow:hidden}
#mfPanel .mf-camera .mf-camera-frame video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;object-fit:cover!important;object-position:center!important;margin:0!important}
#mfCameraStatus{font-size:13px;margin:8px 0 0}.mf-scan-purpose{font-weight:600}.mf-pages{display:flex;gap:14px;align-items:center;justify-content:center;margin:15px 0}
#employeeDashboard.packing-mobile-workspace:not(.hidden){display:flex!important;flex-direction:column!important;gap:12px}
#employeeDashboard.packing-mobile-workspace>[id],#employeeDashboard.packing-mobile-workspace>.employee-panel{width:100%;box-sizing:border-box}
#employeeDashboard.packing-mobile-workspace .employee-header{order:-3}
#employeeDashboard.packing-mobile-workspace .employee-welcome{order:-2}
#employeeDashboard.packing-mobile-workspace #multiRoleWorkspace{order:1}
#employeeDashboard.packing-mobile-workspace #employeeStageQueue{order:2}
#employeeDashboard.packing-mobile-workspace #packingPaintCheck{order:20;padding:12px 15px}
#packingPaintCheck>summary{cursor:pointer;font-weight:700;min-height:24px;line-height:24px}
#packingPaintCheck #paintDefectInspection{margin:10px 0 0;padding:0;border:0;box-shadow:none}
#packingPaintCheck #paintDefectInspection .employee-panel-head{display:none}
#packingPaintCheck #paintDefectInspection>p{font-size:13px;margin:0 0 10px}
#packingPaintCheck #paintDefectInspection>label{display:block;margin:8px 0;font-size:13px}
#packingPaintCheck #paintDefectInspection :is(input,select){min-height:40px!important;width:100%;box-sizing:border-box}
#employeeDashboard.packing-mobile-workspace #employeePersonalStatsV08{order:3}
#employeeDashboard.packing-mobile-workspace .employee-route-panel{order:4;width:100%}
#employeeDashboard.packing-mobile-workspace .production-flow-board{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));overflow:auto}
#employeeDashboard.packing-mobile-workspace :is(.employee-profile,.employee-shift){flex-wrap:wrap}
#employeeDashboard.packing-mobile-workspace .employee-profile [data-mf-entry],#employeeDashboard.packing-mobile-workspace .employee-profile [data-mf-trips]{min-height:44px}
@media(max-width:760px){
 #employeeDashboard.packing-mobile-workspace #packingMobileNav{grid-template-columns:repeat(5,minmax(0,1fr));width:calc(100vw - 16px)}
 #employeeDashboard.packing-mobile-workspace #multiRoleWorkspace{display:block}
 #employeeDashboard.packing-mobile-workspace #multiRoleWorkspace .multirole-card{width:100%;box-sizing:border-box;margin:0}
 #employeeDashboard.packing-mobile-workspace .employee-welcome{display:block}
 #employeeDashboard.packing-mobile-workspace .employee-welcome .employee-shift{margin-top:10px}
 #employeeDashboard.packing-mobile-workspace .production-flow-board{grid-template-columns:minmax(0,1fr);overflow:visible}
 #employeeDashboard.packing-mobile-workspace .flow-stage-items{max-height:230px;overflow:auto}
 #packingPaintCheck #paintDefectInspection button{width:100%;min-height:44px}
 #mfPanel .mf-camera{padding:6px;margin:8px 0}
}
#employeeDashboard.packing-mobile-workspace #multiRoleWorkspace .multirole-stat{display:none!important}

/* Compact order rows share the director list's column order. */
#mfPanel .mf-line-head,#mfPanel .mf-order-summary{display:grid;grid-template-columns:minmax(200px,2.1fr) minmax(115px,1fr) minmax(155px,1.2fr) minmax(110px,.8fr) minmax(120px,1fr) 20px;align-items:center;gap:12px;padding:10px 12px;box-sizing:border-box}
#mfPanel .mf-line-head{font-size:12px;color:#405870;padding-top:4px;padding-bottom:6px}
#mfPanel .mf-line-order{display:block;padding:0;margin:0;border:0;border-bottom:1px solid #dbe2eb;border-radius:0;background:#fff}
#mfPanel .mf-order-lines{border:1px solid #dbe2eb;border-radius:9px;overflow:hidden}
#mfPanel .mf-line-order:last-child{border-bottom:0}
#mfPanel details.mf-line-order{margin-top:0}
#mfPanel .mf-order-summary{list-style:none;cursor:default;min-width:0}
#mfPanel details>.mf-order-summary{cursor:pointer}
#mfPanel .mf-order-summary::-webkit-details-marker{display:none}
#mfPanel .mf-order-summary::marker{content:''}
#mfPanel .mf-order-summary>span,#mfPanel .mf-title-status{min-width:0;overflow-wrap:anywhere}
#mfPanel .mf-title-status{display:flex;flex-wrap:wrap;gap:5px 8px;align-items:center}
#mfPanel .mf-title-status b{font-size:14px;overflow-wrap:anywhere}
#mfPanel .mf-state-badge{font-size:11px;font-weight:600;line-height:1.4;padding:3px 6px;border-radius:5px;background:#e5edf6;color:#294865}
#mfPanel .mf-state-packed{background:#def3e7;color:#195f3c}
#mfPanel .mf-state-cancelled{background:#ffe1e3;color:#9b1022}
#mfPanel .mf-line-order.mf-cancelled{border-left:3px solid #d31c35;background:#fff0f1}
#mfPanel .mf-row-title small{font-size:11px;margin-top:3px}
#mfPanel .mf-row-number{font-size:13px;overflow-wrap:anywhere}
#mfPanel .mf-row-time{display:grid;gap:4px;font-size:12px}
#mfPanel .mf-row-age{display:block;width:fit-content;padding:2px 5px;border-radius:4px;background:#edf2f7;color:#344d64;font-size:12px;line-height:1.4}
#mfPanel .mf-row-amount{white-space:nowrap;font-size:14px}
#mfPanel .mf-row-store{font-size:13px;overflow-wrap:anywhere}
#mfPanel .mf-row-store small{display:block;font-size:11px}
#mfPanel .mf-row-store>.mf-logo{float:left;width:20px;height:20px;margin:3px 5px 0 0}
#mfPanel .mf-row-arrow{justify-self:center;font-size:20px;transition:transform .15s}
#mfPanel details[open]>.mf-order-summary .mf-row-arrow{transform:rotate(180deg)}
#mfPanel details[open]>.mf-order-summary{background:#edf3fb}
#mfPanel .mf-inline-body{padding:0 12px 12px;border-top:1px solid #dbe2eb}
#mfPanel .mf-inline-body:empty{display:none}
#mfPanel .mf-inline-body .mf-selection{border:0;border-radius:0;margin:0;padding:12px 0 0}
#mfPanel .mf-inline-body .mf-selection h2{font-size:16px;margin:0 0 8px}
#mfPanel .mf-order-summary:focus-visible{outline:3px solid #1666ff;outline-offset:-3px}
@media(max-width:1100px){
 #mfPanel .mf-line-head{display:none}
 #mfPanel .mf-order-summary{grid-template-columns:minmax(0,1fr) auto 20px;gap:5px 10px;padding:10px 12px}
 #mfPanel .mf-row-title{grid-column:1/3;grid-row:1}
 #mfPanel .mf-row-arrow{grid-column:3;grid-row:1}
 #mfPanel .mf-row-number{grid-column:1;grid-row:2;font-size:12px}
 #mfPanel .mf-row-amount{grid-column:2/4;grid-row:2;text-align:right}
 #mfPanel .mf-row-time{grid-column:1;grid-row:3}
 #mfPanel .mf-row-store{grid-column:2/4;grid-row:3;text-align:right;max-width:160px}
 #mfPanel .mf-inline-body .mf-tools{align-items:stretch}
 #mfPanel .mf-inline-body .mf-tools>a,#mfPanel .mf-inline-body .mf-tools>button{flex:1;min-width:125px;text-align:center}
}

#mfPanel .mf-row-title .mf-new-badge,#mfPanel .mf-row-title .mf-urgent-badge{display:inline-block;width:auto;margin-right:5px}
#mfPanel .mf-row-store{display:grid;grid-template-columns:20px minmax(0,1fr);column-gap:5px;align-items:center}
#mfPanel .mf-row-store>.mf-logo{float:none;grid-column:1;grid-row:1;margin:0}
#mfPanel .mf-row-store small{grid-column:1/-1}
@media(max-width:1100px){#mfPanel .mf-row-store{min-width:100px;justify-self:end}}

/* Time since marketplace order creation; only unassembled orders get collection urgency. */
#mfPanel .mf-line-order.mf-priority-new{border-left:3px solid #16824d}
#mfPanel .mf-line-order.mf-priority-due{border-left:3px solid #c78a10}
#mfPanel .mf-line-order.mf-priority-urgent{border-left:3px solid #cf293c}
#mfPanel .mf-row-title .mf-age-badge{display:inline-block;width:auto;border-radius:5px;padding:3px 7px;margin:4px 5px 0 0;font-size:12px;font-weight:650}
#mfPanel .mf-age-new{background:#dff3e7;color:#14532d}
#mfPanel .mf-age-due{background:#fff0c2;color:#734b00}
#mfPanel .mf-age-urgent{background:#ffe1e5;color:#a1182b}

#mfPanel .mf-age-critical{background:#8f1027;color:#fff;font-weight:800}

#mfPanel .mf-print-button{display:inline-flex;align-items:center;gap:7px;min-height:40px}
#mfPanel .mf-print-button:disabled{opacity:.5;cursor:default}
#mfPanel .mf-row-check,#mfPanel .mf-select-all{display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-size:12px}
#mfPanel .mf-row-check{float:left;margin:0 9px 7px 0}
#mfPanel input[type=checkbox]{width:20px;height:20px;min-width:20px;accent-color:#155fa0;cursor:pointer;margin:0}
#mfPanel .mf-row-check span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

#mfPanel .mf-tools .mf-select-all{flex-direction:row;align-items:center;align-self:end;gap:7px;padding-bottom:10px}
#mfPanel .mf-age-debt{background:#6540a2;color:white;font-weight:750}
#mfPanel .mf-line-order.mf-priority-debt{border-left:4px solid #6540a2}
#mfPanel[data-view=scanner]{background:#111;padding:0;overflow:hidden}
#mfPanel[data-view=scanner] .mf-header{position:fixed;z-index:4;top:10px;left:12px;right:12px;pointer-events:none}
#mfPanel[data-view=scanner] .mf-header>div,#mfPanel[data-view=scanner] #mfTabs{display:none}
#mfPanel[data-view=scanner] .mf-header button{pointer-events:auto;margin-left:auto;background:#fff;color:#13243b}
#mfPanel[data-view=scanner] .mf-camera-frame{position:fixed;inset:0;width:100vw;height:100dvh!important;aspect-ratio:auto!important;border:0;border-radius:0}
#mfPanel[data-view=scanner] video{width:100%;height:100%;object-fit:cover!important}
#mfPanel[data-view=scanner] .mf-camera-guide{position:absolute;inset:36% 7%;border:2px solid #fff;border-radius:10px;box-shadow:0 0 0 80vmax #0005}
#mfPanel[data-view=scanner] #mfCameraStatus{position:fixed;bottom:105px;left:18px;right:18px;color:white;z-index:2;text-align:center;text-shadow:0 1px 3px #000}
#mfPanel[data-view=scanner] #mfNotice:not(:empty){position:fixed;top:65px;left:12px;right:12px;z-index:7;padding:9px;border-radius:8px}
#mfPanel .mf-manual{position:fixed;left:12px;right:12px;bottom:18px;z-index:3;color:#17263b;background:#fffe;padding:12px;border-radius:8px}
#mfPanel .mf-manual summary{cursor:pointer}
#mfPanel[data-view=scanner] #mfSelection:not(:empty){position:fixed;inset:auto 0 0;z-index:6;max-height:77dvh;overflow:auto;background:#fff;color:#17263b;padding:18px 16px calc(18px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0;box-shadow:0 -8px 30px #0006}
#mfPanel .mf-scan-card h2{font-size:21px;margin:0 0 12px;overflow-wrap:anywhere}
#mfPanel .mf-scan-actions{display:grid;gap:10px;margin-top:15px}
#mfPanel .mf-scan-actions button{min-height:48px;font-size:16px}
#mfPanel .mf-scan-actions [data-action=pack]{background:#166842;color:#fff}
#mfPanel .mf-scan-actions [data-action=debt]{background:#6540a2;color:#fff}


#mfPanel .mf-pack-ready{background:#19734b;color:#fff;border-color:#19734b}
#mfPanel .mf-loading-check{background:#edf3fc;border:1px solid #b6cbe6;border-radius:12px;padding:14px;margin:12px 0;overflow-wrap:anywhere}
#mfPanel .mf-loading-check h3{margin:0 0 8px;font-size:18px}
#mfPanel .mf-loading-check p{margin:8px 0}
#mfPanel .mf-loading-check label{max-width:440px}
#mfPanel .mf-loading-check ul{max-height:240px;overflow:auto;padding-left:22px;font-size:14px}
#mfPanel .mf-loading-check [data-mf=depart]{background:#19734b;color:#fff;border-color:#19734b;margin-top:10px;width:100%;max-width:440px;font-weight:700}
#mfPanel .mf-loading-ok{color:#145c37;font-weight:650}

.mf-label-preview{margin-top:12px;padding:12px;background:#fff;color:#111;border:1px solid #cbd5e1;border-radius:10px}.mf-label-preview h3{margin:0 0 8px;font-size:16px}.mf-label-preview iframe{display:block;width:100%;height:320px;border:0}.mf-label-preview img{display:block;max-width:100%;max-height:360px;object-fit:contain;margin:auto}.mf-label-preview a{display:block;margin-top:8px;color:#174fb4;text-decoration:underline}



#mfPanel .mf-cargo-danger{margin:10px 16px;padding:16px;border:3px solid #a51c30;border-radius:12px;background:#ffe4e8;color:#641020}#mfPanel .mf-cargo-danger strong{display:block;color:#641020;font-size:20px}#mfPanel .mf-cargo-danger p{margin:10px 0;color:#641020}#mfPanel .mf-trip-totals{margin:12px 0;padding:14px;border:1px solid #9eafc8;background:#eef4ff;color:#18304e;border-radius:10px}#mfPanel .mf-trip-totals p{margin:6px 0}
#mfPanel[data-view=scanner] #mfCargoAlerts:not(:empty){position:fixed;top:65px;left:0;right:0;z-index:8;max-height:30dvh;overflow:auto}#mfPanel[data-view=scanner] .mf-cargo-danger{margin:0 12px;padding:12px;font-size:14px}#mfPanel[data-view=scanner] .mf-cargo-danger strong{font-size:16px}

.mf-scan-numbers{display:grid;gap:12px;padding:14px;background:#f8fafc;border-radius:12px;margin:12px 0}
.mf-scan-numbers>div{display:grid;gap:4px}
.mf-scan-numbers strong{display:block;font-size:clamp(22px,5vw,32px);font-weight:800;line-height:1.3;overflow-wrap:anywhere}
.mf-scan-numbers .mf-posting-number{color:#1748b5}
.mf-scan-numbers .mf-instance-number{color:#7524a6}
.mf-scan-numbers span{color:#334155}
.mf-scan-numbers .mf-instance-missing{color:#6b7280}

/* Compact scan result; preserve all text, buttons and overflow safety. */
@media(max-width:600px){
 #mfPanel[data-view=scanner] #mfSelection:not(:empty){max-height:calc(100dvh - 60px);padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-radius:14px 14px 0 0}
 #mfPanel .mf-scan-card{font-size:13px;line-height:1.25}
 #mfPanel .mf-scan-card h2{font-size:17px;line-height:1.2;margin:0 0 5px}
 #mfPanel .mf-scan-card>p{margin:4px 0}
 #mfPanel .mf-scan-card .mf-logo{width:18px;height:18px;margin-right:4px}
 #mfPanel .mf-scan-card .mf-scan-numbers{gap:6px;padding:8px;margin:6px 0}
 #mfPanel .mf-scan-card .mf-scan-numbers>div{gap:1px}
 #mfPanel .mf-scan-card .mf-scan-numbers strong{font-size:22px;line-height:1.15;font-weight:800}
 #mfPanel .mf-scan-card .mf-scan-numbers span{font-size:12px}
 #mfPanel .mf-scan-card .mf-scan-actions{gap:5px;margin-top:8px}
 #mfPanel .mf-scan-card .mf-scan-actions button{min-height:44px;padding:8px 10px;font-size:14px;line-height:1.2}
 #mfPanel .mf-scan-card .mf-loading-check{padding:8px;margin:6px 0;font-size:12px}
 #mfPanel .mf-scan-card .mf-loading-check h3{font-size:15px;margin-bottom:4px}
 #mfPanel .mf-scan-card .mf-loading-check p{margin:4px 0}
}

#mfPanel .mf-scan-loading{margin-top:6px}#mfPanel .mf-scan-loading>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;padding:8px;background:#edf3fc;color:#18304e;border:1px solid #b6cbe6;border-radius:8px;font-size:13px;font-weight:700}#mfPanel .mf-scan-loading>summary::before{content:"▸";margin-right:8px}#mfPanel .mf-scan-loading[open]>summary::before{content:"▾"}

#mfPanel .mf-scan-actions:has([data-action=clear_debt]){grid-template-columns:1fr 1fr}#mfPanel .mf-scan-actions:has([data-action=clear_debt]) [data-action=pack]{grid-column:1/-1}#mfPanel [data-action=clear_debt]{background:#fff;color:#45304f;border-color:#997ca6}

/* Compact debt marker and shipment tint. */
#mfPanel .mf-debt-notice,#mfPanel .mf-scan-card .mf-debt-notice{display:inline-block;margin:0 0 6px;padding:0;border:0;border-radius:0;background:transparent;color:#b42332;font-size:14px;font-weight:800;line-height:1.3;text-align:left}
#mfPanel .mf-debt-card{background:#fff5f5;border:1px solid #efc2c8;border-left:4px solid #c53040;border-radius:10px}
#mfPanel .mf-line-order.mf-priority-debt{background:#fff5f5;border-left:4px solid #c53040}
#mfPanel .mf-age-debt{background:#ffe3e7;color:#a7192c}

/* Marketplace status remains distinct from internal debt and packing labels. */
#mfPanel .mf-platform-status{display:inline-block;max-width:100%;padding:3px 8px;border:1px solid #b9d1f3;border-radius:6px;background:#e7f0ff;color:#174681;font-size:13px;font-weight:750;line-height:1.3;vertical-align:middle;overflow-wrap:anywhere}
#mfPanel .mf-scan-card .mf-platform-status{padding:2px 7px;font-size:12px}
/* Label-only debt, prepared physical goods and loaded replenishment are separate. */
#mfPanel .mf-debt-ready{background:#eff6ff;border:1px solid #bfd5f2;border-left:4px solid #3465ac;border-radius:10px}
#mfPanel .mf-debt-ready .mf-debt-notice{color:#174681}
#mfPanel .mf-dovoz-card{background:#f6f1fb;border:1px solid #d3c2e9;border-left:4px solid #7950a6;border-radius:10px}
#mfPanel .mf-dovoz-notice{display:inline-block;color:#624080;font-weight:750;margin-bottom:6px}
#mfPanel .mf-list-ii{display:block;color:inherit;font:inherit;overflow-wrap:anywhere;margin-top:2px}
#mfPanel .mf-list-ii .mf-ii-tail{font-size:1.12em;color:#000;font-weight:800;white-space:nowrap}
#mfPanel .mf-list-ii.mf-code-missing{font-size:12px;color:#53667e}

.mf-yandex-mark{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:24px;padding:0 4px;margin-right:6px;border-radius:6px;background:#ffdf42;color:#111;font-size:12px;font-weight:800;vertical-align:middle}

/* Separate order lookup from list refresh. */
#mfPanel .mf-header{flex-wrap:wrap}
#mfPanel .mf-header-actions{display:flex;gap:8px;align-items:center;margin-left:auto;flex-shrink:0}
#mfPanel .mf-header-actions [hidden]{display:none}
#mfPanel .mf-search-controls{display:flex;align-items:center;gap:6px;min-width:0}
#mfPanel .mf-search-controls input{flex:1;min-width:0;width:210px}
#mfPanel .mf-search-controls button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;padding:8px}
@media(max-width:600px){#mfPanel .mf-tools .mf-search-label{min-width:100%}#mfPanel .mf-search-controls input{width:100%}}

/* Scanner role is chosen before camera activation. */
.mf-role-choice{display:grid;gap:16px;padding:20px;max-width:520px;margin:auto}.mf-role-choice button{min-height:64px;font-size:18px;font-weight:700}.mf-scanner-mode{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;background:#f1f5f9;color:#17202a;border-radius:8px;flex-wrap:wrap}.mf-scanner-mode button{font-size:13px;padding:6px 10px}.mf-scan-actions [data-action="pack_load"]{background:#168340;color:#fff;grid-column:1/-1;min-height:52px;font-weight:800}.mf-header-actions{display:flex;gap:6px;flex-shrink:0}@media(max-width:480px){.mf-header{padding:8px;gap:6px;align-items:center}.mf-header h1{font-size:18px}.mf-header small{font-size:9px}.mf-header-actions button{font-size:12px;padding:9px 7px}.mf-search-label{width:100%;min-width:0}.mf-search-controls{display:flex;width:100%;min-width:0}.mf-search-controls input{min-width:0;flex:1}.mf-search-controls button{flex:0 0 42px}}
#mfPanel[data-view=scanner] .mf-header .mf-header-actions{display:flex;pointer-events:auto}#mfPanel[data-view=scanner] .mf-scanner-mode{position:fixed;top:62px;left:12px;right:12px;z-index:5;background:#fff;color:#17202a;box-shadow:0 2px 10px #0004}#mfPanel[data-view=scanner] .mf-role-choice{position:relative;z-index:5;margin:100px auto 20px;background:#fff;color:#17202a;border-radius:12px}#mfPanel[data-view=scanner] .mf-scanner-mode button{min-height:36px}
#mfPanel[data-view=scanner] .mf-scanner-mode{z-index:9}#mfPanel[data-view=scanner] #mfNotice:not(:empty){top:114px;pointer-events:none}#mfPanel[data-view=scanner] #mfSelection:not(:empty){max-height:calc(100dvh - 162px)}

/* Keep scanner actions reachable above long shipment details. */
#mfPanel .mf-scan-card>.mf-scan-actions{margin:8px 0 12px}
