/* Freight scanner and shipment review. Scoped to mobile workflows only. */
#workflow.freight-dialog{width:100%;max-width:680px;height:100dvh;max-height:100dvh;margin:0 auto;border:0;border-radius:0;background:var(--bg);padding:0;overflow-y:auto;overscroll-behavior:contain}#workflow.freight-dialog .dialog-header{position:sticky;top:0;z-index:5;background:#102a43;color:#fff;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;min-height:64px;gap:10px}#workflow.freight-dialog .dialog-header h2{font-size:1.15rem;flex:1}#workflow.freight-dialog .dialog-header button{background:#ffffff09;border-color:#ffffff20;color:#fff;min-height:44px;width:44px}#workflow.freight-dialog #workflowBody{padding:12px 14px calc(18px + env(safe-area-inset-bottom))}.freight-workspace{min-width:0}.freight-preview{height:clamp(225px,36dvh,380px);position:relative;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#101925}.freight-video{position:absolute!important;inset:0;border:0!important}.freight-video video{width:100%!important;height:100%!important;object-fit:cover}.freight-video #qr-shaded-region,.freight-video>span{display:none!important}.freight-frame{position:absolute;pointer-events:none;left:12%;right:12%;top:27%;height:46%;border-radius:14px;box-shadow:0 0 0 180px #0006}.freight-frame i{position:absolute;width:28px;height:28px;border:3px solid #60a5fa}.freight-frame i:nth-child(1){top:0;left:0;border-right:0;border-bottom:0;border-radius:12px 0 0}.freight-frame i:nth-child(2){top:0;right:0;border-left:0;border-bottom:0;border-radius:0 12px 0 0}.freight-frame i:nth-child(3){bottom:0;left:0;border-right:0;border-top:0;border-radius:0 0 0 12px}.freight-frame i:nth-child(4){bottom:0;right:0;border-left:0;border-top:0;border-radius:0 0 12px}.freight-camera-state{position:absolute;z-index:1;top:12px;left:12px;max-width:70%;font-size:.72rem;padding:5px 9px;background:#10251be6;color:#9df1bc;border-radius:20px}.freight-preview [data-torch]{position:absolute;z-index:1;top:8px;right:10px;min-height:44px;width:44px;padding:0;border-radius:50%;background:#101925e6;color:#fff;font-size:1.7rem}.freight-guide{margin-top:10px;text-align:center;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.freight-guide b,.freight-guide small{display:block}.freight-guide b{font-size:.9rem}.freight-guide small{font-size:.72rem;margin-top:3px;color:var(--muted);letter-spacing:.08em}.freight-workspace [data-camera-status]{font-size:.78rem;min-height:24px;margin:8px 0;color:var(--muted)}.freight-workspace [data-camera-toggle]{width:100%;min-height:50px}.freight-search{margin:22px 0 16px}.freight-search label{font-size:.86rem;margin:0 0 8px}.freight-search>div{display:flex;gap:8px}.freight-search input{min-width:0;width:100%;font-size:16px;scroll-margin:90px;margin:0}.freight-search button{flex:none;min-height:50px}.freight-search small{display:block;font-size:.72rem;color:var(--muted);margin-top:8px}.freight-card{background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:14px;margin:12px 0;min-width:0}.freight-card h3{font-size:1rem;margin:0 0 12px}.freight-summary h2{margin:0;font-size:1.5rem;line-height:1.2}.freight-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;flex-wrap:wrap}.freight-summary>p{font-size:.85rem;margin:8px 0 12px;color:var(--muted)}.freight-status{display:inline-block;padding:5px 8px;border-radius:9px;font-size:.7rem;background:#18583d;color:#bdf9d7;flex-shrink:0}.freight-status.pending{background:#f4a72a;color:#19202c}.freight-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0}.freight-totals>div{border:1px solid var(--line);border-radius:10px;padding:9px;min-width:0}.freight-totals dt{font-size:.66rem;color:var(--muted);line-height:1.4}.freight-totals dd{margin:8px 0 0;font-size:1rem;font-weight:700;line-height:1.3}.freight-totals>div:last-child dd{font-size:.78rem}.freight-info{background:var(--soft);padding:10px;border-radius:9px;font-size:.78rem!important;margin:0!important}.freight-delivery{margin:0}.freight-delivery dt{font-size:.72rem;color:var(--muted);margin-top:10px}.freight-delivery dd{margin:3px 0;font-size:.88rem;white-space:pre-wrap}.freight-notes,.freight-description{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.88rem}.freight-structured{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:14px 0 0}.freight-structured>div{border:1px solid var(--line);padding:10px;border-radius:10px}.freight-structured dt{font-size:.7rem;color:var(--muted)}.freight-structured dd{margin:5px 0 0;font-size:.8rem}.freight-primary-actions{display:grid;gap:8px;padding:10px 0}.freight-primary-actions button{width:100%;min-height:52px}.freight-primary-actions .primary,.freight-workspace .primary{background:#2563eb;border-color:#2563eb;color:#fff}.freight-recent{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;margin:8px 0;padding:12px;gap:8px}.freight-recent span{min-width:0}.freight-recent b,.freight-recent small{display:block}.freight-recent small{font-size:.73rem;color:var(--muted);font-weight:400;margin-top:4px}.freight-unmatched{border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:12px;margin-bottom:14px}.freight-unmatched p{font-family:monospace;white-space:pre-wrap}.freight-unmatched .actions{gap:6px}.freight-unmatched button{font-size:.76rem;padding:8px;flex:1}.freight-receive-return{display:flex;gap:8px;margin-top:10px}.freight-receive-return button{flex:1}@media(max-width:360px){#workflow.freight-dialog #workflowBody{padding-left:10px;padding-right:10px}.freight-card{padding:11px}.freight-totals>div{padding:7px}.freight-totals dt{font-size:.62rem}.freight-totals dd{font-size:.9rem}.freight-search button{padding:8px 12px}}

#workflow.freight-dialog .dialog-header h2{display:flex;align-items:center;gap:10px}#workflow.freight-dialog .dialog-header h2 svg{width:25px;height:25px;fill:none;stroke:#76b5ff;stroke-width:1.8;flex-shrink:0}

.freight-card h3{display:flex;align-items:center;gap:9px}.freight-card h3 svg,.freight-info svg{width:23px;height:23px;stroke:#60a5fa;stroke-width:1.8;fill:none;flex-shrink:0}.freight-info{display:flex;align-items:center;gap:8px}.freight-info svg{width:18px;height:18px}.freight-primary-actions{position:sticky;bottom:0;z-index:3;background:var(--bg);border-top:1px solid var(--line);padding:10px 0 calc(10px + env(safe-area-inset-bottom));margin-bottom:calc(-18px - env(safe-area-inset-bottom))}.freight-more{font-size:.78rem;margin:2px 0 10px;width:100%;color:var(--muted)}

.freight-totals .freight-stage-value{font-size:14px;line-height:1.3;overflow-wrap:normal;word-break:normal}
