/* R6.16.55 final visual runtime identity, critical layout and task-surface closure */
html,body{max-width:100%}
.cui-wrapper,.cui-main,.v070-main,.cui-main>*{min-width:0;max-width:100%;box-sizing:border-box}


/* Marker legends inside grid forms occupy a full row and never displace business columns. */
.r61655-marker-legend{grid-column:1/-1;min-width:0;max-width:100%;box-sizing:border-box}
.r61518-product-intake-page .r68-intake-shell>.r61655-marker-legend{grid-column:1/-1}
.r61518-product-intake-page .r68-main-column{grid-column:1;grid-row:auto}
.r61518-product-intake-page .r68-side-column{grid-column:2;grid-row:auto}

/* Product quick intake: keep all fields inside the working canvas. */
.r61518-product-intake-page .r68-intake-hero{min-width:0;max-width:100%;flex-wrap:wrap}
.r61518-product-intake-page .r68-intake-shell{width:100%;max-width:100%;grid-template-columns:minmax(0,1fr) minmax(250px,290px);gap:14px}
.r61518-product-intake-page .r68-main-column,.r61518-product-intake-page .r68-side-column,.r61518-product-intake-page .r68-step-card,.r61518-product-intake-page .r68-identity-grid,.r61518-product-intake-page .r68-identity-fields,.r61518-product-intake-page .r68-image-panel{min-width:0;max-width:100%}
.r61518-product-intake-page .r68-identity-grid{grid-template-columns:minmax(210px,32%) minmax(0,1fr);gap:14px}
.r61518-product-intake-page .r68-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.r61518-product-intake-page .r68-choice-card,.r61518-product-intake-page .field,.r61518-product-intake-page input,.r61518-product-intake-page select,.r61518-product-intake-page textarea{min-width:0;max-width:100%;box-sizing:border-box}
.r61518-product-intake-page .r68-save-bar{max-width:calc(100vw - var(--sidebar-width,216px));box-sizing:border-box}
.sidebar-collapsed .r61518-product-intake-page .r68-save-bar{max-width:calc(100vw - 72px)}
.r61518-product-intake-page .r68-save-bar .actions{min-width:0}

/* Order workbench: flexible filters and rows instead of fixed widths. */
.r61622-orders-page .r6141-orders-page,.r61622-orders-page .r6141-order-table,.r61622-orders-page #batchDocumentForm{min-width:0;max-width:100%}
.r61622-orders-page .r6151-flow-strip{max-width:100%;overflow-x:auto;scrollbar-width:thin}
.r61622-orders-page .r6141-filterbar{grid-template-columns:minmax(240px,1.7fr) minmax(150px,.8fr) minmax(130px,.65fr) minmax(120px,.6fr) minmax(135px,.7fr) auto auto}
.r61622-orders-page .r6141-order-head,.r61622-orders-page .r6141-order-row{grid-template-columns:42px minmax(170px,1.15fr) minmax(150px,1fr) 78px 112px minmax(145px,.85fr) minmax(125px,auto);gap:8px}
.r61622-orders-page .r6141-order-head,.r61622-orders-page .r6141-order-row{padding-left:12px;padding-right:12px}
.r61622-orders-page .r6141-next{min-width:0;flex-wrap:wrap}
.r61622-orders-page .r6141-next .btn{white-space:nowrap}
.r61622-orders-page .r61641-action-panel{right:0;left:auto;max-width:min(280px,calc(100vw - 24px))}
.r61622-orders-page .r6141-viewbar{min-width:0;gap:10px;flex-wrap:wrap}

/* Closure timeline must stay readable and never expose internal status values. */
[data-r61653-page="order-closure"] .closure-stage-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
[data-r61653-page="order-closure"] .closure-stage{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0;padding:14px;border:1px solid #e3e7f1;border-radius:14px;background:#fff}
[data-r61653-page="order-closure"] .closure-stage-index{position:static;display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#eef0ff;color:#4f56d9;font-weight:800}
[data-r61653-page="order-closure"] .closure-stage-copy{min-width:0}
[data-r61653-page="order-closure"] .closure-stage-status{white-space:nowrap;writing-mode:horizontal-tb!important;word-break:keep-all;padding:4px 8px;border-radius:999px;background:#f3f5f9;color:#667085;font-size:11px}
[data-r61653-page="order-closure"] .closure-stage.done .closure-stage-status{background:#eaf8ef;color:#18794e}
[data-r61653-page="order-closure"] .closure-stage.current .closure-stage-status{background:#eef0ff;color:#4f56d9}
[data-r61653-page="order-closure"] .closure-stage.blocked .closure-stage-status{background:#fff0e6;color:#b05b12}

/* First-use guidance is useful once, not on every business page. */
.r61636-onboarding{margin-bottom:14px}

/* Compact product cards without hiding key facts. */
.r61634-products-page .r61634-product-grid,.r61634-product-card-grid{gap:12px!important}
.r61634-product-card .r61634-product-facts,.r61634-product-card .r61635-product-facts{gap:7px!important}
.r61634-product-card .r61634-product-actions{gap:6px!important}

/* Prevent action bars and menus from extending page width. */
.actions,.actions-between,.section-title,.r6141-orders-hero,.r6153-orders-summary{min-width:0;max-width:100%}
.uc-more-actions,.r61633-action-menu,.r61647-order-actions{max-width:100%}

@media(max-width:1280px){
 .r61518-product-intake-page .r68-intake-shell{grid-template-columns:minmax(0,1fr) 250px}
 .r61518-product-intake-page .r68-identity-grid{grid-template-columns:1fr}
 .r61518-product-intake-page .r68-image-panel{max-width:520px}
 .r61622-orders-page .r6141-filterbar{grid-template-columns:repeat(3,minmax(0,1fr))}
 .r61622-orders-page .r6141-order-head{display:none}
 .r61622-orders-page .r6141-order-row{grid-template-columns:36px minmax(0,1.15fr) minmax(0,1fr) 96px;align-items:start}
 .r61622-orders-page .r6141-quantity,.r61622-orders-page .r6141-due{grid-column:auto}
 .r61622-orders-page .r6141-issue{grid-column:2/4}
 .r61622-orders-page .r6141-next{grid-column:4;grid-row:1/4;align-self:center;justify-content:flex-end}
 [data-r61653-page="order-closure"] .closure-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
 .r61518-product-intake-page .r68-intake-shell{display:block;padding-bottom:0}
 .r61518-product-intake-page .r68-side-column{position:static;grid-template-columns:1fr 1fr;margin-top:14px}
 .r61518-product-intake-page .r68-save-bar{position:sticky;left:auto;right:auto;bottom:0;max-width:100%;margin-top:14px;padding:10px 12px;flex-direction:column;align-items:stretch}
 .r61518-product-intake-page .r68-save-bar .actions{justify-content:stretch}
 .r61518-product-intake-page .r68-save-bar .actions>.btn{flex:1}
 .r61622-orders-page .r6141-filterbar{grid-template-columns:1fr 1fr}
 .r61622-orders-page .r6141-order-row{grid-template-columns:32px minmax(0,1fr)}
 .r61622-orders-page .r6141-products,.r61622-orders-page .r6141-quantity,.r61622-orders-page .r6141-due,.r61622-orders-page .r6141-issue,.r61622-orders-page .r6141-next{grid-column:2}
 .r61622-orders-page .r6141-next{grid-row:auto;justify-content:flex-start}
 [data-r61653-page="order-closure"] .closure-stage-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
 .r61518-product-intake-page .r68-intake-hero{padding:15px}
 .r61518-product-intake-page .r68-choice-grid,.r61518-product-intake-page .r68-side-column,.r61518-product-intake-page .r68-base-fields{grid-template-columns:1fr!important}
 .r61518-product-intake-page .r68-step-card{padding:14px}
 .r61518-product-intake-page .r68-save-bar .actions{display:grid;grid-template-columns:1fr 1fr}
 .r61518-product-intake-page .r61521-save-more{grid-column:1/-1}
 .r61622-orders-page .r6141-filterbar{grid-template-columns:1fr}
 .r61622-orders-page .r6141-filterbar .btn{width:100%}
 .r61622-orders-page .r6141-viewbar .segmented{max-width:100%;overflow:auto}
 .r61622-orders-page .r6141-order-kpis{grid-template-columns:1fr 1fr}
 [data-r61653-page="order-closure"] .closure-stage{grid-template-columns:30px minmax(0,1fr)}
 [data-r61653-page="order-closure"] .closure-stage-status{grid-column:2;justify-self:start}
}


@media(max-width:600px){
 .r61622-orders-page .r6151-flow-strip{display:grid!important;grid-template-columns:1fr 1fr;gap:7px;overflow:visible!important}
 .r61622-orders-page .r6151-flow-strip>span{width:auto!important;min-width:0!important;white-space:normal;text-align:center;padding:8px 5px}
 .r61622-orders-page .r6141-products,.r61622-orders-page .r6141-products>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .r61622-orders-page .r6141-products span{display:block;white-space:normal;overflow:visible;text-overflow:clip}
}

/* Product library: compact cards keep image-led browsing without five-screen cards. */
.r61634-product-library-page .r61634-product-grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:12px}
.r61634-product-library-page .r61634-card-visual{min-height:170px}
.r61634-product-library-page .r61634-card-image{height:170px;padding:8px}
.r61634-product-library-page .r61634-card-body{padding:12px}
.r61634-product-library-page .r61634-card-title h3{font-size:16px}
.r61634-product-library-page .r61634-card-title p{margin-top:3px;font-size:10.5px}
.r61634-product-library-page .r61634-card-category{margin:8px 0;padding:6px 8px}
.r61634-product-library-page .r61634-card-facts{gap:6px}
.r61634-product-library-page .r61634-card-facts>div{padding:6px 7px}
.r61634-product-library-page .r61634-card-facts dd{min-height:19px;-webkit-line-clamp:1;font-size:11px}
.r61634-product-library-page .r61634-packaging-line{margin-top:7px;padding:6px 8px}
.r61634-product-library-page .r61634-card-metrics{margin-top:7px;gap:5px}
.r61634-product-library-page .r61634-card-metrics a{padding:6px 4px}
.r61634-product-library-page .r61634-readiness{margin-top:8px}
.r61634-product-library-page .r61634-next-action{margin-top:8px;padding:8px 9px}
.r61634-product-library-page .r61634-next-action small{-webkit-line-clamp:1}
.r61634-product-library-page .r61634-card-actions{padding:8px 10px}

/* Supplier advanced task pagination keeps the current decision surface short. */
.r61655-client-pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 14px;border-top:1px solid var(--fp-border);background:var(--fp-surface-2)}
.r61655-client-pager span{min-width:90px;text-align:center;color:var(--fp-muted);font-size:11px}
.r61655-client-pager button:disabled{opacity:.45;cursor:not-allowed}

@media(max-width:720px){
 .r61634-product-library-page .r61634-product-grid{grid-template-columns:1fr}
 .r61634-product-library-page .r61634-product-card{display:grid;grid-template-columns:104px minmax(0,1fr)}
 .r61634-product-library-page .r61634-card-visual{grid-column:1;min-height:118px;height:100%;border-right:1px solid var(--fp-border);border-bottom:0}
 .r61634-product-library-page .r61634-card-image{height:118px;padding:7px}
 .r61634-product-library-page .r61634-card-check{left:5px;top:5px;padding:4px 5px;font-size:9px}
 .r61634-product-library-page .r61634-card-check span{display:none}
 .r61634-product-library-page .r61634-card-state{right:5px;top:5px;padding:3px 5px;font-size:9px}
 .r61634-product-library-page .r61634-image-meta{display:none}
 .r61634-product-library-page .r61634-card-body{grid-column:2;padding:10px}
 .r61634-product-library-page .r61634-card-title h3{font-size:15px}
 .r61634-product-library-page .r61634-card-title p span{display:none}
 .r61634-product-library-page .r61634-card-category,
 .r61634-product-library-page .r61634-card-facts,
 .r61634-product-library-page .r61634-packaging-line,
 .r61634-product-library-page .r61634-readiness{display:none}
 .r61634-product-library-page .r61634-card-metrics{grid-template-columns:1fr 1fr;margin-top:7px}
 .r61634-product-library-page .r61634-card-metrics a:nth-child(1),
 .r61634-product-library-page .r61634-card-metrics a:nth-child(4){display:none}
 .r61634-product-library-page .r61634-next-action{margin-top:7px}
 .r61634-product-library-page .r61634-next-action span,.r61634-product-library-page .r61634-next-action small{display:none}
 .r61634-product-library-page .r61634-card-actions{grid-column:1/-1;position:static!important;padding:7px;gap:5px}
 .r61634-product-library-page .r61634-card-actions .btn{padding:7px 5px;font-size:11px}
 .r61655-client-pager{justify-content:center;position:sticky;bottom:38px;z-index:5}
}
