.ff-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:20px}
.ff-head h1{margin:4px 0 6px}.ff-tabs{display:flex;gap:4px;overflow:auto;padding:4px;background:#fff;border:1px solid var(--border,#e4e7ec);border-radius:12px;margin-bottom:16px}
.ff-tabs a{white-space:nowrap;padding:9px 12px;border-radius:9px;color:var(--muted,#667085);font-weight:600;font-size:13px}.ff-tabs a.active{background:#eef3ff;color:var(--accent,#3267e3)}
.ff-scope{display:grid;grid-template-columns:repeat(3,minmax(180px,260px));margin-bottom:20px}.ff-scope label,.stack-form label{display:grid;gap:6px;color:var(--muted,#667085);font-size:12px;font-weight:600}.ff-metrics{margin-bottom:20px}
.ff-workflow{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:20px}.panel h2{margin-top:0}.stepper{display:grid;gap:14px;list-style:none;padding:0;counter-reset:step}.stepper li{position:relative;padding-left:42px;min-height:34px}.stepper li:before{counter-increment:step;content:counter(step);position:absolute;left:0;top:0;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#eef3ff;color:#3267e3;font-weight:700}.stepper li span{display:block;color:#667085;font-size:13px;margin-top:2px}
.ff-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.client-card{border:1px solid #e4e7ec;border-radius:12px;padding:16px;display:grid;gap:8px}.client-card span{color:#667085}.stack-form{display:grid;gap:14px;max-width:620px}.stack-form input,.stack-form select,.stack-form textarea,.ff-scope select{width:100%;box-sizing:border-box}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center}
.compact-list{display:grid;gap:8px}.compact-list>div,.compact-list>a,.compact-list>label{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:12px;border:1px solid #e4e7ec;border-radius:10px;color:inherit}.selection-list label{cursor:pointer}.selection-list label:has(input:checked){border-color:#3267e3;background:#f5f8ff}.selection-list input{margin-right:8px}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.table-search{max-width:300px}.cell-badge{font:600 12px ui-monospace,monospace;background:#eef3ff;color:#2855c5;padding:5px 8px;border-radius:6px}.alert{border-radius:10px;padding:12px 14px;margin-bottom:16px}.alert.warning{background:#fff8e8;color:#8a4b00;border-left:3px solid #c77700}.alert.success{background:#edf9f3;color:#126b49;border-left:3px solid #16875b}.alert.error{background:#fff1f1;color:#8f2424;border-left:3px solid #d14343}
.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px;margin:16px 0}.summary-grid>div{display:grid;gap:4px;padding:12px;border:1px solid #e4e7ec;border-radius:10px}.summary-grid small{color:#667085}.confirm-form{display:grid;grid-template-columns:minmax(220px,360px) auto;align-items:end;gap:12px;margin:18px 0}.confirm-form label{display:grid;gap:6px}.file-grid{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.operation-confirm{max-width:1040px}
.inline-scan{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.inline-scan input{min-width:220px}.danger-zone{margin:18px 0;padding:16px;border:1px solid #f0b3b3;border-radius:12px}.button.danger{background:#d14343;color:#fff}.button.danger:hover{background:#b63232}
.timeline{display:grid;gap:0}.timeline>div{position:relative;padding:0 0 18px 24px;border-left:1px solid #dfe3ea}.timeline i{position:absolute;left:-5px;top:4px;width:9px;height:9px;background:#3267e3;border-radius:50%}.timeline small{display:block;color:#667085;margin-top:3px}
@media(max-width:1100px){.ff-workflow{grid-template-columns:1fr}.ff-scope{grid-template-columns:1fr 1fr 1fr}.ff-tabs{margin-left:-8px;margin-right:-8px}.data-table{min-width:850px}.summary-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.ff-head{display:block}.ff-scope,.two-col,.confirm-form{grid-template-columns:1fr}.ff-metrics{grid-template-columns:1fr 1fr}.panel-head{align-items:stretch;flex-direction:column}.table-search{max-width:none}}
.ff-card-grid a.client-card{transition:box-shadow .15s,transform .15s;cursor:pointer}.ff-card-grid a.client-card:hover{box-shadow:0 2px 10px rgba(0,0,0,.08);transform:translateY(-1px)}.badge.mp-wb{background:#8b3ffd22;color:#8b3ffd;font-weight:700}.badge.mp-ozon{background:#005bff22;color:#005bff;font-weight:700}.ff-action-bar{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{padding:8px;border-bottom:1px solid #e4e7ec;text-align:left}
.ff-order-views{display:flex;gap:8px;margin:14px 0}.ff-order-views a{padding:9px 14px;border-radius:9px;border:1px solid #dbe2ee;color:#475467;font-weight:600}.ff-order-views a.active{background:#eef3ff;border-color:#b9cbf5;color:#2855c5}.ff-orders-table td{vertical-align:middle}.ff-orders-table td small{display:block;margin-top:4px;color:#667085}.ff-orders-table .ff-row-action{white-space:nowrap;padding:7px 10px}.ff-marking-form{padding:14px;border:1px solid #dbe2ee;border-radius:10px;margin:14px 0}.ff-marking-form input{font-family:ui-monospace,monospace}.ff-claim-option{margin:16px 0}.ff-claim-option summary{cursor:pointer;color:#2855c5;font-weight:600}.ff-claim-option form{margin-top:14px}.button:disabled{opacity:.5;cursor:not-allowed}
.ff-order-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;margin:12px 0}.ff-order-metrics>div{display:grid;gap:3px;padding:13px 15px;border:1px solid #e4e7ec;border-radius:11px;background:#fff}.ff-order-metrics b{font-size:22px;color:#1d2939}.ff-order-metrics span{font-size:12px;color:#667085}.ff-auto-batch{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:12px 0 18px;padding:14px;border:1px solid #b9cbf5;border-radius:12px;background:#f5f8ff}.ff-auto-batch span{display:grid;gap:4px;color:#2855c5;font-size:13px}.ff-auto-batch small{color:#475467;font-size:12px}.ff-auto-error{color:#b42318!important;max-width:290px}
.ff-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:14px 0}.ff-filters label{display:grid;gap:5px;min-width:180px;font-size:12px;color:#667085;font-weight:600}.ff-filters select{min-height:38px;width:100%}.ff-scan-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px}.ff-scan-form{display:grid;gap:14px;margin:18px 0}.ff-scan-input-label,.ff-scan-kiz-form label{display:grid;gap:8px;font-weight:700}.ff-scan-input-label input,.ff-scan-kiz-form input{width:100%;font:600 20px ui-monospace,monospace;box-sizing:border-box;padding:14px;border:2px solid #8ba9ed;border-radius:10px}.ff-scan-form>.button{justify-self:start}.ff-scan-result-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 0;border-top:1px solid #e4e7ec}.ff-scan-result-head small{display:block;color:#667085;margin-top:5px}.ff-scan-products{display:grid;gap:12px}.ff-scan-product{display:flex;align-items:center;gap:16px;padding:14px;border:1px solid #e4e7ec;border-radius:12px}.ff-scan-product img{width:112px;height:112px;object-fit:contain;border-radius:8px;background:#f7f8fa}.ff-scan-product div{display:grid;gap:7px}.ff-scan-product strong{font-size:18px}.ff-scan-product span{color:#475467}.ff-scan-kiz,.ff-scan-next{padding:16px 0;border-top:1px solid #e4e7ec;margin-top:18px}.ff-scan-kiz-form,.ff-scan-next form{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:12px 0}.ff-scan-kiz-form label{flex:1;min-width:260px}.ff-scan-next{display:grid;justify-items:start;gap:9px}.ff-scan-side{align-self:start}.ff-shipment-stickers{display:flex;gap:9px;margin:16px 0;align-items:center}.ff-shipment-stickers select{width:auto}@media(max-width:900px){.ff-scan-layout{grid-template-columns:1fr}.ff-scan-side{order:2}}@media(max-width:600px){.ff-scan-product{align-items:flex-start}.ff-scan-product img{width:84px;height:84px}.ff-scan-result-head{align-items:flex-start;flex-direction:column}.ff-filters label{flex:1;min-width:140px}}
.ff-scan-commands{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.ff-scan-commands>div{border:1px solid #dbe2ee;border-radius:10px;padding:10px;text-align:center}.ff-scan-commands img{display:block;width:100%;max-width:110px;aspect-ratio:1;margin:auto;image-rendering:pixelated}.ff-scan-commands b{display:block;font-size:12px;margin-top:5px}.ff-scan-side>.button{margin:0 0 16px}.ff-scan-dialog{width:min(540px,calc(100vw - 32px));max-width:none;border:0;border-radius:18px;padding:30px;box-shadow:0 20px 60px #12203b55;color:#15243b}.ff-scan-dialog::backdrop{background:#101b35b0}.ff-scan-dialog h2{margin:0 0 8px}.ff-scan-dialog p{color:#667085}.ff-scan-dialog form[data-fbs-dialog-form]{display:grid;gap:12px}.ff-scan-dialog input{font:600 20px ui-monospace,monospace;width:100%;box-sizing:border-box;padding:14px;border:2px solid #3267e3;border-radius:10px}.ff-scan-dialog-close{float:right;background:transparent;border:0;font-size:28px;cursor:pointer}.ff-scan-dialog [data-fbs-dialog-feedback]{min-height:1.4em;color:#8a4b00}
.ff-delivery-route,.ff-pvz-boxes{border-top:1px solid #e4e7ec;padding:18px 0;margin-top:18px}.ff-delivery-route form,.ff-pvz-boxes form{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.ff-delivery-route label{display:flex;gap:6px;align-items:center}.ff-pvz-boxes input[type=number]{width:80px}
.ff-auto-batch{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:12px 0 18px;padding:14px;border:1px solid #b9cbf5;border-radius:12px;background:#f5f8ff}.ff-auto-batch span{color:#2855c5;font-size:13px}
.ff-scan-order-dialog{width:min(860px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto}.ff-scan-order-dialog .ff-scan-products{margin:16px 0}.ff-scan-dialog-actions{display:flex;gap:10px;flex-wrap:wrap;padding-top:14px;border-top:1px solid #e4e7ec}.ff-scan-order-dialog [data-fbs-order-feedback]{color:#126b49}
.ff-shipment-accounts{margin:16px 0 22px}.ff-shipment-accounts .client-card{color:inherit;background:#fff}.ff-shipment-accounts .client-card.active{border-color:#3267e3;background:#f5f8ff}.ff-shipment-accounts .client-card:hover{border-color:#8ba9ed}
.ff-tabs-more{position:relative;flex:0 0 auto}.ff-tabs-more>summary{list-style:none;white-space:nowrap;padding:9px 12px;border-radius:9px;color:var(--muted,#667085);font-weight:600;font-size:13px;cursor:pointer}.ff-tabs-more>summary::-webkit-details-marker{display:none}.ff-tabs-more[open]{background:#f5f8ff}.ff-tabs-more>div{position:absolute;z-index:8;top:calc(100% + 6px);right:0;min-width:210px;display:grid;gap:3px;padding:7px;background:#fff;border:1px solid var(--border,#e4e7ec);border-radius:12px;box-shadow:0 8px 24px #1018281a}.ff-tabs-more>div a{display:block;white-space:nowrap;padding:9px 10px;border-radius:8px;color:var(--muted,#667085);font-weight:600;font-size:13px}.ff-tabs-more>div a:hover,.ff-tabs-more>div a.active{background:#eef3ff;color:#2855c5}
.ff-order-tools{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:18px 0 12px}.ff-order-tools label{display:grid;gap:6px;width:min(420px,100%);font-size:13px;font-weight:600;color:#475467}.ff-order-tools input{width:100%;padding:11px 13px;border:1px solid #cbd5e1;border-radius:10px;font:inherit}.ff-order-tools .ff-select-visible{display:flex;align-items:center;gap:8px;width:auto;white-space:nowrap}.ff-order-tools .ff-select-visible input{width:18px;height:18px;padding:0}.ff-order-tools>span{color:#667085;font-size:13px;white-space:nowrap}.ff-order-list{display:grid;gap:12px}.ff-order-card{border:1px solid #dce3ed;border-radius:14px;background:#fff;overflow:hidden}.ff-order-card[hidden]{display:none}.ff-order-card-top{display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid #edf0f4}.ff-order-select{display:grid;place-items:center}.ff-order-select input{width:18px;height:18px}.ff-order-ident{flex:1;min-width:0}.ff-order-ident>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ff-order-ident small{display:block;margin-top:4px;color:#667085}.ff-order-card-body{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:18px;padding:16px}.ff-order-products{display:grid;gap:10px}.ff-order-product{display:flex;align-items:center;gap:13px;min-width:0}.ff-order-product img{width:66px;height:66px;object-fit:contain;border-radius:8px;background:#f7f8fa}.ff-order-product>div{min-width:0}.ff-order-product-name{font-weight:600;margin-bottom:4px}.ff-order-article{font-size:15px}.ff-order-article strong{font-size:17px;color:#1d2939;overflow-wrap:anywhere}.ff-order-product small{display:block;margin-top:4px;color:#667085;overflow-wrap:anywhere}.ff-order-check{display:grid;align-content:start;justify-items:start;gap:8px}.ff-order-check>div{display:flex;flex-wrap:wrap;gap:6px}.ff-order-check small{color:#667085}.ff-order-card-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:12px 16px;background:#f8fafc;border-top:1px solid #edf0f4}.ff-order-card-actions .button{font-size:13px}.ff-sticker-unavailable{margin-right:auto;color:#667085;font-size:13px}.ff-sticker-dialog{width:min(700px,calc(100vw - 28px));max-width:none;max-height:calc(100vh - 28px);box-sizing:border-box;padding:18px;border:0;border-radius:16px;box-shadow:0 20px 60px #12203b55}.ff-sticker-dialog::backdrop{background:#101b35b0}.ff-sticker-dialog-head{display:flex;justify-content:space-between;gap:16px}.ff-sticker-dialog h2{margin:0 0 4px}.ff-sticker-dialog p{margin:0 0 12px;color:#667085;font-size:13px}.ff-sticker-dialog-head button{align-self:start;background:none;border:0;font-size:27px;cursor:pointer}.ff-sticker-dialog iframe{display:block;width:100%;height:min(65vh,520px);border:1px solid #e4e7ec;border-radius:10px;margin-bottom:12px}.ff-supply-groups{display:grid;gap:14px}.ff-supply-group{padding:15px;border:1px solid #e4e7ec;border-radius:12px}.ff-supply-group h3{margin:0 0 10px}.ff-shipment-list{display:grid;gap:10px}.ff-shipment-card{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;align-items:center;gap:8px 16px;padding:14px;border:1px solid #e4e7ec;border-radius:12px;color:inherit}.ff-shipment-card:hover{border-color:#84adff;background:#f8fbff}.ff-shipment-card small{grid-column:1/3;color:#667085}.ff-shipment-card .status-badge{grid-column:3;grid-row:1/3}.ff-shipment-card strong{white-space:nowrap}
@media(max-width:720px){.ff-order-tools{align-items:stretch;flex-direction:column}.ff-order-card-body{grid-template-columns:1fr}.ff-order-card-actions{justify-content:flex-start}.ff-sticker-unavailable{width:100%}}
.ff-scan-sticker-number{display:grid;gap:4px;padding:14px 16px;margin:8px 0 14px;border:2px solid #8ba9ed;border-radius:12px;background:#f5f8ff}.ff-scan-sticker-number span{font-size:12px;font-weight:700;color:#2855c5}.ff-scan-sticker-number strong{font:700 24px ui-monospace,monospace;overflow-wrap:anywhere}.ff-scan-sticker-number small{color:#475467}.ff-scan-commands{grid-template-columns:repeat(3,1fr)}.ff-scan-commands>div{padding:7px 4px}.ff-scan-commands img{max-width:74px}.ff-scan-commands b{font-size:11px;line-height:1.2}@media(max-width:900px){.ff-scan-commands img{max-width:110px}}@media(max-width:420px){.ff-scan-commands{grid-template-columns:1fr 1fr}}

/* Fast packing workspace: primary actions and comparison data stay visible. */
.ff-action-bar-top{position:sticky;top:8px;z-index:7;margin:8px 0 14px;padding:10px;background:#fff;border:1px solid #cfdaf0;border-radius:12px;box-shadow:0 5px 18px #1d293912}
.ff-order-card-body{grid-template-columns:minmax(330px,1fr) 150px 190px;align-items:start}
.ff-product-meta{display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap;margin-top:6px;color:#667085;font-size:13px}.ff-product-meta span:first-child{padding:4px 8px;border-radius:7px;background:#fff3d6;color:#7a4b00}.ff-product-meta span:first-child b{font-size:16px;color:#542f00}
.ff-inline-sticker{display:grid;gap:7px;min-width:0;padding:10px;border:1px solid #dbe2ee;border-radius:10px;background:#f8fafc}.ff-inline-sticker iframe{display:block;width:100%;height:142px;border:0;border-radius:6px;background:#fff}.ff-inline-sticker small,.ff-inline-sticker span{color:#667085;font-size:12px}.ff-inline-sticker.empty{min-height:112px;align-content:center;text-align:center;border-style:dashed}
.ff-sticker-check{display:grid;justify-items:center;align-content:center;gap:2px;min-height:78px;padding:8px;border:1px dashed #cfd8e6;border-radius:10px;background:#f8fafc;text-align:center}.ff-sticker-check>span{font-size:11px;font-weight:700;color:#475467}.ff-sticker-check>strong{font:800 28px ui-monospace,monospace;letter-spacing:2px;color:#1d2939}.ff-sticker-check>small{font-size:10px;line-height:1.25;color:#667085}.ff-sticker-check.ready{border-style:solid;border-color:#9fc1ff;background:#f1f6ff}.ff-order-card-actions form{margin:0}
.ff-modal-commands{margin:18px 0;padding:15px;border:1px solid #dbe2ee;border-radius:12px;background:#f8fafc}.ff-modal-commands h3{margin:0 0 4px}.ff-modal-commands>p{margin:0 0 12px}.ff-modal-commands>div{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.ff-modal-commands figure{margin:0;padding:10px;text-align:center;background:#fff;border:1px solid #e4e7ec;border-radius:10px}.ff-modal-commands img{display:block;width:100%;max-width:130px;aspect-ratio:1;margin:0 auto 7px}.ff-modal-commands figcaption{font-weight:700;font-size:12px}
.ff-all-wb-shipments{margin:18px 0}.ff-all-wb-shipments details{padding:12px 0;border-top:1px solid #e4e7ec}.ff-all-wb-shipments details:first-of-type{border-top:0}.ff-all-wb-shipments summary{display:flex;justify-content:space-between;gap:16px;cursor:pointer}.ff-all-wb-shipments summary>span:last-child{color:#667085;font-size:13px}.ff-shipment-orders-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin:12px 0}.ff-shipment-orders-grid a{display:grid;gap:3px;padding:9px 11px;border:1px solid #dbe2ee;border-radius:8px;color:inherit}.ff-shipment-orders-grid a:hover{border-color:#84adff;background:#f5f8ff}.ff-shipment-orders-grid small{color:#667085}
@media(max-width:1050px){.ff-order-card-body{grid-template-columns:minmax(0,1fr) 220px}.ff-order-check{grid-column:1/-1}.ff-action-bar-top{position:static}}
@media(max-width:720px){.ff-order-card-body{grid-template-columns:1fr}.ff-order-check{grid-column:auto}.ff-inline-sticker iframe{height:190px}.ff-modal-commands>div{grid-template-columns:1fr 1fr}.ff-all-wb-shipments summary{display:grid;gap:4px}}

/* FBS orders list, marketplace-style (stage tabs, dense rows, bulk bar, drawer) */
.ff-head.ff-head-compact{align-items:baseline;justify-content:flex-start;gap:12px;margin-bottom:12px}
.ff-head.ff-head-compact h1{font-size:22px;margin:0}
.fo-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.fo-stages{display:flex;gap:2px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;border-bottom:1px solid var(--border);flex:1 1 auto;min-width:0}
.fo-stages a{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:10px 12px;color:var(--muted);font-weight:600;font-size:14px;text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}
.fo-stages a b{min-width:22px;padding:1px 7px;border-radius:999px;background:var(--surface-soft);color:var(--muted);font-size:12px;text-align:center}
.fo-stages a:hover{color:var(--text)}
.fo-stages a.active{color:var(--accent);border-bottom-color:var(--accent)}
.fo-stages a.active b{background:var(--accent-soft);color:var(--accent)}
.fo-toolbar-actions{display:flex;gap:6px;flex-wrap:wrap}
.fo-toolbar-actions form{margin:0}
.fo-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
.fo-segment{display:inline-flex;padding:3px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--r-sm)}
.fo-segment a{padding:5px 12px;border-radius:7px;color:var(--muted);font-weight:600;font-size:13px;text-decoration:none}
.fo-segment a.active{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #1018281a}
.fo-search{flex:1 1 260px;min-width:200px}
.fo-toggle{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);white-space:nowrap}
.fo-toggle input{height:auto}
.fo-quick{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
.fo-quick button{height:30px;padding:0 10px;border-radius:999px;font-size:13px;color:var(--text);background:var(--surface)}
.fo-quick button b{margin-left:4px;color:var(--muted);font-weight:600}
.fo-quick button.active{background:var(--accent-soft);border-color:#9db0f7;color:var(--accent)}
.fo-quick button.active b{color:var(--accent)}
.fo-count{margin-left:auto;color:var(--muted);font-size:13px}
.fo-table,.fo-grouped{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.fo-row{display:grid;grid-template-columns:36px minmax(220px,2.4fr) 60px minmax(170px,1.3fr) 150px 60px minmax(150px,1.2fr) 160px;align-items:center;gap:12px;padding:8px 14px;border-bottom:1px solid var(--border)}
.fo-row:last-child{border-bottom:0}
.fo-row[hidden]{display:none}
.fo-row:not(.fo-head):hover{background:var(--surface-soft)}
.fo-row.selected{background:var(--accent-soft)}
.fo-head{padding-top:9px;padding-bottom:9px;background:var(--surface-soft);font-size:11px;letter-spacing:.02em;text-transform:uppercase;color:var(--muted);font-weight:600}
.fo-check{display:flex;align-items:center;justify-content:center}
.fo-check input{width:17px;height:17px;padding:0;cursor:pointer}
.fo-product{display:flex;align-items:center;gap:10px;min-width:0;height:auto;padding:0;border:0;background:none;text-align:left;color:inherit;cursor:pointer}
.fo-product:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.fo-product img,.fo-noimg{flex:0 0 auto;width:40px;height:52px;object-fit:cover;border-radius:6px;background:var(--surface-soft);border:1px solid var(--border)}
.fo-product span{display:grid;min-width:0}
.fo-product b{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-product small{color:var(--muted);font-size:12px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-product .fo-unit-lines{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.fo-size{display:flex;align-items:baseline;gap:4px}
.fo-size.fo-size-lines{flex-direction:column;align-items:flex-start;gap:3px}
.fo-size b{display:inline-block;min-width:34px;padding:3px 7px;border-radius:7px;background:var(--warning-soft);color:var(--text);font-size:14px;text-align:center}
.fo-size b.fo-size-missing{background:var(--error-soft);color:var(--error)}
.fo-size small{color:var(--muted);font-weight:600}
.fo-order{min-width:0;font-size:13px}
.fo-order small{display:block;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-due{display:grid;font-size:13px;padding-left:9px;border-left:3px solid var(--border)}
.fo-due small{color:var(--muted);font-size:12px}
.fo-due-ok{border-left-color:var(--success)}
.fo-due-soon{border-left-color:var(--warning)}
.fo-due-soon small{color:var(--warning)}
.fo-due-late{border-left-color:var(--error)}
.fo-due-late b,.fo-due-late small{color:var(--error)}
.fo-sticker{font:700 17px/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;color:var(--muted)}
.fo-sticker.ready{color:var(--text)}
.fo-status{display:grid;gap:5px;justify-items:start}
.fo-status .status-badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:600;background:var(--surface-soft);color:var(--muted)}
.fo-status .status-badge.info{background:var(--accent-soft);color:var(--accent)}
.fo-status .status-badge.warning{background:var(--warning-soft);color:var(--warning)}
.fo-status .status-badge.success{background:var(--success-soft);color:var(--success)}
.fo-status .status-badge.error{background:var(--error-soft);color:var(--error)}
.fo-chips{display:flex;gap:4px;flex-wrap:wrap}
.fo-chips i{font-style:normal;font-size:11px;padding:1px 6px;border-radius:999px;background:var(--surface-soft);color:var(--muted);border:1px solid var(--border)}
.fo-chips i.ok{background:var(--success-soft);color:var(--success);border-color:transparent}
.fo-chips i.warn{background:var(--warning-soft);color:var(--warning);border-color:transparent}
.fo-chips i.bad{background:var(--error-soft);color:var(--error);border-color:transparent}
.fo-actions{display:flex;gap:6px;justify-content:flex-end}
.fo-actions form{margin:0}
.fo-actions .button{height:32px;padding:0 11px;font-size:13px}
.fo-group-row{grid-template-columns:minmax(220px,2.4fr) 70px 80px minmax(200px,3fr)}
.fo-qty{font-weight:700}
.fo-group-orders{color:var(--muted);font-size:12px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-word}
.fo-bulk{flex-wrap:wrap}
.fo-bulk[hidden],.fo-table[hidden],.fo-grouped[hidden]{display:none}
.fo-bulk .button{height:34px}
.fo-bulk .button.ghost{background:transparent;color:#fff;border-color:#ffffff55}
.fo-drawer{margin:0 0 0 auto;height:100vh;max-height:100vh;width:min(560px,100vw);padding:0;border:0;border-left:1px solid var(--border);background:var(--surface);color:var(--text);box-shadow:-12px 0 32px #10182826}
.fo-drawer::backdrop{background:#10182840}
.fo-drawer-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:8px;padding:14px 18px;background:var(--surface);border-bottom:1px solid var(--border)}
.fo-drawer-head h2{flex:1;margin:0;font-size:17px}
.fo-drawer-head button{width:36px;padding:0;font-size:20px;line-height:1}
.fo-drawer-body{padding:16px 18px 28px}
.fo-drawer-body .ff-scan-result-head>.button{display:none}
@media(max-width:1180px){.fo-row{grid-template-columns:32px minmax(200px,2fr) 56px minmax(140px,1.2fr) 130px 56px minmax(140px,1.2fr) 110px}.fo-actions [data-fbs-sticker-preview],.fo-actions form{display:none}}
@media(max-width:900px){
 .fo-head{display:none}
 .fo-row:not(.fo-group-row){grid-template-columns:28px 1fr auto;grid-template-areas:"check product size" "check order due" "check status actions";gap:6px 10px;padding:12px}
 .fo-row>.fo-check{grid-area:check;align-self:start;padding-top:14px}
 .fo-row>.fo-product{grid-area:product}
 .fo-row>.fo-size{grid-area:size}
 .fo-row>.fo-order{grid-area:order}
 .fo-row>.fo-due{grid-area:due}
 .fo-row>.fo-sticker{display:none}
 .fo-row>.fo-status{grid-area:status}
 .fo-row>.fo-actions{grid-area:actions}
 .fo-actions [data-fbs-sticker-preview],.fo-actions form{display:inline-flex}
 .fo-row>.fo-product b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 .fo-search{flex-basis:100%}
 .fo-group-row{grid-template-columns:1fr 50px 60px}
 .fo-group-orders{grid-column:1/-1}
 .fo-count{margin-left:0;width:100%}
 .fo-toolbar-actions{width:100%}
}

/* WB supply board */
.fo-sticker{font-size:15px;letter-spacing:.02em;white-space:nowrap}
.sb-list{display:grid;gap:14px}
.sb-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.sb-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid var(--border)}
.sb-head small{display:block;color:var(--muted);font-size:12px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.sb-stats{display:flex;align-items:center;gap:14px;font-size:13px;color:var(--muted)}
.sb-stats b{color:var(--text);font-size:15px}
.sb-stats .sb-bad b,.sb-stats .sb-bad{color:var(--error)}
.sb-stats .status-badge{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;background:var(--surface-soft);color:var(--muted)}
.sb-stats .status-badge.info{background:var(--accent-soft);color:var(--accent)}
.sb-stats .status-badge.success{background:var(--success-soft);color:var(--success)}
.sb-orders{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1px;background:var(--border)}
.sb-order{display:grid;grid-template-columns:34px 1fr auto auto;align-items:center;gap:10px;padding:8px 14px;background:var(--surface);color:inherit;text-decoration:none}
.sb-order:hover{background:var(--surface-soft)}
.sb-order img,.sb-order .fo-noimg{width:34px;height:44px;object-fit:cover;border-radius:5px;border:1px solid var(--border);background:var(--surface-soft)}
.sb-order span{min-width:0;display:grid}
.sb-order span b{font-size:12px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-order span small{color:var(--muted);font-size:12px}
.sb-order em{font-style:normal}
.sb-order .fo-size b{min-width:30px;font-size:13px}
.sb-order code{font:700 14px ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text)}
.sb-cancelled{opacity:.55}
.sb-cancelled span small{color:var(--error)}
.sb-empty{padding:14px 16px;margin:0}
.sb-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px;background:var(--surface-soft);border-top:1px solid var(--border)}
.sb-actions form{margin:0}
.sb-actions .button{height:34px}
.sb-boxes{display:flex;align-items:center;gap:6px}
.sb-boxes label{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.sb-boxes input{width:62px;height:34px}
.sb-spacer{flex:1}
@media(max-width:700px){.sb-spacer{display:none}.sb-actions .button{flex:1 1 auto}}

/* Warehouse visibility picker */
.fo-wh{position:relative}
.fo-wh>summary{list-style:none;display:inline-flex;align-items:center;cursor:pointer}
.fo-wh>summary::-webkit-details-marker{display:none}
.fo-wh>form{position:absolute;z-index:20;right:0;top:calc(100% + 6px);width:min(380px,90vw);display:grid;gap:8px;padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 32px #1018282e}
.fo-wh>form p{margin:0 0 4px;color:var(--muted);font-size:12px}
.fo-wh label{display:flex;align-items:center;gap:8px;font-size:13px}
.fo-wh label input{width:17px;height:17px;padding:0}
.fo-wh .button{justify-self:start}

/* Scanner & KIZ feedback */
.fo-flash{display:block;margin:10px 0;padding:14px 16px;border-radius:12px;font-size:17px;font-weight:700;line-height:1.35}
.fo-flash.ok{background:var(--success-soft);color:var(--success);border:2px solid var(--success)}
.fo-flash.err{background:var(--error-soft);color:var(--error);border:2px solid var(--error)}
.fo-summary{margin:12px 0;padding:16px;border-radius:12px;border:2px solid var(--success);background:var(--success-soft)}
.fo-summary.err{border-color:var(--error);background:var(--error-soft)}
.fo-summary h3{margin:0 0 6px}
.fo-summary ul{margin:6px 0 0;padding-left:18px}
.fo-summary a{font-weight:700;color:inherit}
.ff-scan-kiz .kiz-state{display:grid;gap:3px;margin:8px 0;padding:12px 14px;border-radius:10px;border:1px solid var(--border);font-size:14px}
.ff-scan-kiz .kiz-state span{color:var(--muted);font-size:13px}
.kiz-missing{background:var(--warning-soft);border-color:#f1cc86!important}
.kiz-wait{background:var(--accent-soft);border-color:#b9caf2!important}
.kiz-sent{background:var(--success-soft);border-color:#9ed8c1!important;color:var(--success)}
.kiz-failed{background:var(--error-soft);border-color:var(--error)!important}
.kiz-failed b{color:var(--error)}
.kiz-failed span:first-of-type{color:var(--error)!important;font-weight:600}
.ff-scan-kiz-form label{display:grid;gap:6px;font-weight:600}
.ff-scan-kiz-form input{height:48px;font-size:16px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.ff-order-panel{display:flex;flex-direction:column}.ff-order-panel>*{order:5}.ff-order-panel>.ff-source-alert{order:1}.ff-order-panel>.ff-scan-result-head{order:2}.ff-order-panel>.ff-scan-sticker-number{order:3}.ff-order-panel>.ff-scan-kiz{order:4}.ff-scan-order-dialog .ff-sticker-thumb{max-width:250px}.ff-scan-order-dialog .ff-sticker-thumb img{max-height:120px;object-fit:contain}.ff-scan-order-dialog .ff-scan-kiz{padding:14px 16px;margin-top:10px;border:2px solid #8ba9ed;border-radius:12px;background:#fff}.ff-scan-order-dialog .ff-scan-kiz h3{margin:0 0 8px}
.kiz-actions{display:flex;gap:8px;margin-top:8px}
.kiz-note{margin:8px 0 0;font-weight:600;color:var(--success)}
.kiz-note.error{color:var(--error)}

/* Label pictures inside the order window and the sticker dialog */
.ff-sticker-thumb{display:block;margin-top:10px;max-width:340px;border:1px solid var(--border);border-radius:10px;overflow:hidden;background:#fff}
.ff-sticker-thumb img{display:block;width:100%;height:auto}
.fo-sticker-img{display:block;width:100%;max-width:520px;margin:10px auto;border:1px solid var(--border);border-radius:10px;background:#fff}
.fo-sticker-img[hidden]{display:none}

/* Day summary, warehouse auto-assembly, scanner toggles, terminal mode */
.fo-day{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.fo-day span{padding:6px 12px;border-radius:999px;background:var(--surface);border:1px solid var(--border);font-size:13px;color:var(--muted)}
.fo-day b{color:var(--text);font-size:15px;margin-right:3px}
.fo-day .bad{background:var(--error-soft);border-color:transparent;color:var(--error)}
.fo-day .bad b{color:var(--error)}
.fo-wh-head{display:flex;justify-content:space-between;font-size:11px;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}
.fo-wh-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fo-wh-auto{flex:0 0 auto;color:var(--muted)}
.fo-scan-toggles{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.fo-scan-toggles label{display:flex;align-items:center;gap:8px;font-weight:600}
.fo-scan-toggles input{width:18px;height:18px;padding:0}
html.fbs-kiosk .sidebar,html.fbs-kiosk .topbar,html.fbs-kiosk .ff-head,html.fbs-kiosk .ff-tabs,html.fbs-kiosk .ff-scan-side,html.fbs-kiosk .ff-scan-panel .panel-head,html.fbs-kiosk .ff-scan-panel .ff-filters{display:none!important}
html.fbs-kiosk main{margin:0!important;width:100%!important;max-width:none!important}
html.fbs-kiosk .content{padding:12px!important;max-width:none!important}
html.fbs-kiosk .ff-scan-layout{display:block}
html.fbs-kiosk .ff-scan-input-label input{height:64px;font-size:22px}
html.fbs-kiosk .fo-flash{font-size:22px;padding:18px}
html.fbs-kiosk .ff-scan-dialog{width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;border-radius:0}
html.fbs-kiosk .ff-scan-kiz-form input{height:60px;font-size:20px}
html.fbs-kiosk .ff-scan-dialog .button{min-height:52px;font-size:17px}

/* Printing a label from the scanner: only the label, on a 58×40 mm page */
.fo-print-area{display:none}
@media print{
 @page{size:58mm 40mm;margin:0}
 html,body{margin:0!important;padding:0!important;background:#fff!important}
 body:has(.fo-print-area img)>*:not(.fo-print-area){display:none!important}
 body:has(.fo-print-area img) dialog{display:none!important}
 .fo-print-area:has(img){display:block!important}
 .fo-print-area img{display:block;width:58mm;height:40mm;object-fit:contain;break-after:page;page-break-after:always}
 .fo-print-area img:last-child{break-after:auto;page-break-after:auto}
}

.fo-print-qr{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:8px 0 16px}
.fo-print-qr figure{margin:0;padding:8px;border:1px solid var(--border);border-radius:10px;text-align:center;display:grid;gap:4px;justify-items:center}
.fo-print-qr img{width:84px;height:84px}
.fo-print-qr figcaption{font-size:12px;font-weight:600}
.fo-print-qr .button{height:30px;font-size:12px}

/* Unified FBS command center */
.fo-command-center{margin:0 0 18px;padding:22px;border:1px solid #cddbf8;border-radius:18px;background:linear-gradient(145deg,#f8fbff 0%,#fff 60%);box-shadow:0 8px 28px rgba(38,75,145,.08)}
.fo-center-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.fo-center-head h2{margin:2px 0 4px;font-size:24px}.fo-center-head p{margin:0;color:var(--muted)}.fo-center-head-actions{display:flex;gap:8px;flex-wrap:wrap}.fo-center-head-actions form{margin:0}
.fo-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:10px;margin-bottom:14px}.fo-kpi-grid button{display:grid!important;grid-template-rows:auto auto auto;align-content:center;gap:4px;min-width:0;min-height:92px;height:auto!important;max-height:none!important;overflow:visible!important;line-height:1.2;text-align:left;padding:13px 15px!important;border:1px solid var(--border);border-radius:13px;background:#fff;color:var(--text);cursor:pointer}.fo-kpi-grid button:hover{border-color:#84a9ff;box-shadow:0 4px 14px rgba(50,103,227,.1)}.fo-kpi-grid small{display:block;color:var(--muted);font-weight:700}.fo-kpi-grid b{display:block;font-size:30px;line-height:1}.fo-kpi-grid span{display:block;font-size:12px;color:var(--muted)}.fo-kpi-grid .attention{background:#fff9eb;border-color:#efd18c}.fo-kpi-grid .danger{background:#fff3f2;border-color:#efaaa4;color:#a5251b}
.fo-work-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.fo-work-card{display:grid;grid-template-columns:minmax(220px,1fr) auto;align-items:center;gap:12px 18px;min-width:0;padding:16px;border:1px solid var(--border);border-radius:14px;background:#fff}.fo-work-card.production{grid-template-columns:minmax(220px,.8fr) minmax(280px,1.2fr);border:2px solid #769cf2;background:#f4f7ff}.fo-work-card h3{display:inline;margin:0 0 5px;font-size:17px}.fo-work-card p{margin:5px 0 0;color:var(--muted);font-size:13px}.fo-step{display:inline-grid;place-items:center;width:25px;height:25px;margin-right:7px;border-radius:50%;background:#e7efff;color:#2855c5;font-weight:800}.fo-final-scan{display:flex;gap:8px;width:100%;min-width:0}.fo-final-scan input{min-width:0;flex:1;font:600 16px ui-monospace,monospace;border:2px solid #769cf2}.fo-work-card>[data-fbs-production-feedback]{position:static;grid-column:2;margin:0;min-height:18px}.fo-work-card.production{position:static;margin-bottom:0}
.fo-main-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding-top:2px}.fo-main-actions form{margin:0}.fo-main-actions>span{margin-left:auto;color:var(--muted);font-size:13px}.fo-main-actions>span b{color:var(--text);font-size:17px}.fo-main-actions .active{background:#e9f0ff;border-color:#789bf0}
.fo-tools-dialog{width:min(620px,calc(100vw - 32px));max-width:none;border:0;border-radius:18px;padding:26px;box-shadow:0 20px 70px #15264c55}.fo-tools-dialog::backdrop{background:#101b3588}.fo-dialog-close{float:right}.fo-dialog-close button{border:0;background:transparent;font-size:28px;cursor:pointer}.fo-tools-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.fo-filters[hidden],.fo-quick[hidden]{display:none!important}.fo-toolbar{margin-top:8px}.fo-stages{flex:1}.fo-row:not(.fo-head){transition:background .12s,border-color .12s}.fo-row:not(.fo-head):hover{background:#fbfdff;border-color:#b9cdf8}
@media(max-width:900px){.fo-center-head{align-items:stretch;flex-direction:column}.fo-center-head-actions{width:100%}.fo-work-card,.fo-work-card.production{grid-template-columns:1fr}.fo-work-card>[data-fbs-production-feedback]{grid-column:1}.fo-work-card>.button{justify-self:start}}
@media(max-width:650px){.fo-command-center{padding:14px}.fo-kpi-grid{grid-template-columns:1fr 1fr}.fo-final-scan{width:100%}.fo-main-actions>*{width:100%}.fo-main-actions .button{width:100%;justify-content:center}.fo-main-actions>span{margin-left:0}}
@media(max-width:420px){.fo-kpi-grid{grid-template-columns:1fr}.fo-final-scan{display:grid;grid-template-columns:1fr}.fo-final-scan .button{width:100%;justify-content:center}}
/* Order panel: the label is a small thumbnail next to its number, so the KIZ field below stays on screen */
.ff-scan-sticker-number{grid-template-columns:minmax(0,1fr) auto;column-gap:16px;align-items:center}
.ff-scan-sticker-number>:not(.ff-sticker-thumb){grid-column:1}
.ff-scan-sticker-number .ff-sticker-thumb{grid-column:2;grid-row:1/span 4;margin-top:0;width:150px;max-width:150px}
.ff-order-panel .ff-scan-kiz{margin-top:0;padding-top:4px;border-top:0}
.ff-order-panel .ff-scan-kiz h3{margin:0 0 4px}
@media(max-width:520px){.ff-scan-sticker-number .ff-sticker-thumb{width:110px;max-width:110px}}

/* Fulfilment source: a persistent operational cue, not just decoration. */
.fo-source{display:inline-flex;align-items:center;width:max-content;margin-top:5px;padding:3px 7px;border-radius:999px;font-style:normal;font-size:11px;font-weight:800;line-height:1.2}
.fo-source-own_stock,.ff-source-own_stock{color:#087443;background:#e8f8ef;border-color:#8bd6ad}
.fo-source-mixed,.ff-source-mixed{color:#7a4b00;background:#fff4d8;border-color:#e8c66d}
.fo-source-production,.ff-source-production{color:#2855c5;background:#edf3ff;border-color:#9db9f7}
.fo-source-shortage,.ff-source-shortage{color:#b42318;background:#fff0ee;border-color:#f0aaa4}
.fo-source-unknown,.ff-source-unknown{color:#475467;background:#f2f4f7;border-color:#cdd3dc}
.ff-source-alert{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px;padding:13px 16px;border:2px solid;border-radius:12px}
.ff-source-alert strong{font-size:16px}.ff-source-alert span{font-size:12px;font-weight:700;white-space:nowrap}
@media(max-width:600px){.ff-source-alert{align-items:flex-start;flex-direction:column;gap:3px}.ff-source-alert strong{font-size:14px}}

/* Final-scan folder: only actually completed items, grouped automatically. */
.fo-ready-dialog{width:min(900px,calc(100vw - 32px))}
.fo-ready-list{display:grid;gap:8px;max-height:min(65vh,650px);overflow:auto;margin-top:16px}
.fo-ready-row{display:grid;grid-template-columns:54px 56px minmax(220px,1fr) minmax(220px,.8fr);gap:12px;align-items:center;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:#fff}
.fo-ready-row time{font-weight:800;color:#2855c5}.fo-ready-row>div{display:grid;gap:3px}.fo-ready-row small{color:var(--muted)}
@media(max-width:650px){.fo-ready-row{grid-template-columns:48px auto 1fr}.fo-ready-row>div:last-child{grid-column:3}}

/* One-window operator mode */
.fo-one-window-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(290px,.75fr);gap:12px;margin-bottom:12px}
.fo-live-supply{min-width:0;padding:16px;border:1px solid #b9cdf8;border-radius:14px;background:#f8fbff}
.fo-live-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.fo-live-title>div{display:grid;gap:2px}.fo-live-title small,.fo-live-recent>small{font-size:10px;font-weight:900;letter-spacing:.06em;color:var(--muted)}.fo-live-title b{font-size:16px}.fo-live-dot{width:12px;height:12px;border-radius:50%;background:#19a463;box-shadow:0 0 0 5px #daf5e7}
.fo-live-supply>p,.fo-live-recent p{margin:6px 0;color:var(--muted);font-size:13px}.fo-live-supply-card{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:10px;margin-bottom:8px;border:1px solid var(--border);border-radius:11px;background:#fff}.fo-live-supply-card>span{display:grid}.fo-live-supply-card small{color:var(--muted)}.fo-live-supply-card strong{color:#2855c5}.fo-live-supply-card .button{grid-column:1/-1;justify-content:center}
.fo-live-recent{display:grid;gap:6px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.fo-live-recent span{display:flex;justify-content:space-between;gap:8px;font-size:12px}.fo-live-recent em{color:var(--muted);font-style:normal;text-align:right}
.fo-acceptance-dialog{width:min(1500px,calc(100vw - 24px));height:calc(100vh - 24px);max-width:none;max-height:none;padding:0;border:0;border-radius:16px;overflow:hidden;box-shadow:0 22px 80px #10204466}.fo-acceptance-dialog::backdrop{background:#101b3599}.fo-acceptance-dialog iframe{display:block;width:100%;height:100%;border:0;background:#f5f7fb}.fo-acceptance-close{position:absolute;z-index:3;top:10px;right:18px;margin:0;padding:0;border-radius:50%;background:#fff;box-shadow:0 2px 12px #10204433}.fo-acceptance-close button{width:40px;height:40px}
@media(max-width:980px){.fo-one-window-grid{grid-template-columns:1fr}}

/* The scanner shown from the command center is a clean workspace, not a nested portal. */
html.fbs-embedded .sidebar,html.fbs-embedded .topbar,html.fbs-embedded .ff-head,html.fbs-embedded .ff-tabs,html.fbs-embedded .ag-pop-btn,html.fbs-embedded .ag-pop{display:none!important}
html.fbs-embedded body{background:#f7f9fd}html.fbs-embedded main{margin-left:0!important;width:100%!important;min-height:100vh}html.fbs-embedded main>.content{max-width:none!important;padding:28px 34px 40px!important}
html.fbs-embedded .ff-scan-layout{grid-template-columns:minmax(0,1fr) 300px;gap:22px}html.fbs-embedded .ff-scan-panel{margin:0;box-shadow:none}html.fbs-embedded .ff-scan-side{margin:0}
@media(max-width:900px){html.fbs-embedded main>.content{padding:18px!important}html.fbs-embedded .ff-scan-layout{grid-template-columns:1fr}}

/* Dedicated final-scan workspace */
.fo-final-dialog{width:min(980px,calc(100vw - 32px));max-width:none}.fo-final-head h2{margin:2px 0 8px;font-size:26px}.fo-final-head>p:last-child{max-width:760px;color:var(--muted)}
.fo-final-workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:22px;margin-top:20px}.fo-final-workspace>section{padding:20px;border:2px solid #7c9ff1;border-radius:15px;background:#f7f9ff}.fo-final-workspace>aside{padding:18px;border:1px solid var(--border);border-radius:15px;background:#fafbfc}.fo-final-label{display:block;margin-bottom:8px;font-size:12px;font-weight:900;color:#344054}.fo-final-dialog .fo-final-scan input{padding:14px;font-size:19px}.fo-final-feedback{min-height:22px;margin:12px 0}.fo-final-rules{display:grid;grid-template-columns:28px 1fr;gap:10px 8px;margin-top:20px}.fo-final-rules>span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#e4edff;color:#2855c5;font-weight:900}.fo-final-rules p{display:grid;gap:2px;margin:0}.fo-final-rules small{color:var(--muted)}
.fo-final-caption{display:block;margin:0 0 8px;font-size:10px;font-weight:900;letter-spacing:.07em;color:var(--muted)}.fo-final-supplies,.fo-final-history{display:grid;gap:7px;margin-bottom:18px}.fo-final-supply,.fo-final-history span{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:10px;background:#fff}.fo-final-supply span,.fo-final-history span{display:grid}.fo-final-supply small,.fo-final-history small{color:var(--muted)}.fo-final-supply strong{color:#2855c5;white-space:nowrap}.fo-final-empty,.fo-final-history p{padding:12px;border:1px dashed var(--border);border-radius:10px;color:var(--muted);font-size:13px}
@media(max-width:760px){.fo-final-workspace{grid-template-columns:1fr}.fo-final-dialog{padding:18px}.fo-final-scan{display:grid}.fo-final-scan .button{width:100%;justify-content:center}}
.fo-print-all{display:grid;grid-template-columns:74px 1fr;gap:10px;align-items:center;margin:10px 0 14px;padding:10px;border:2px solid #769cf2;border-radius:12px;background:#f3f7ff}.fo-print-all img{grid-row:1/3;width:74px;height:74px}.fo-print-all span{display:grid}.fo-print-all small{color:var(--muted)}.fo-print-all .button{grid-column:2;justify-self:start}

/* article → product card in the portal */
.fo-card-link{cursor:pointer;text-decoration:underline dotted;text-underline-offset:2px}.fo-card-link:hover{color:#2952cc;text-decoration-style:solid}.fo-card-link::after{content:' ↗';font-size:10px;opacity:.6}.ff-card-link{color:inherit;text-decoration:underline dotted;text-underline-offset:3px}.ff-card-link:hover{color:#2952cc;text-decoration-style:solid}.ff-scan-product>a.ff-card-photo{flex:none;display:block;line-height:0}.ff-scan-product .ff-card-btn{justify-self:start;margin-top:2px;color:inherit}
