/* R6.16.95 commercial-flow closure: compact template center, adaptive pickers, safe desktop sidebar */

/* Template center: keep the actual templates in the first screen. */
body.r61695-template-center .cui-main{padding-top:14px}
.r61695-template-center .r61695-template-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 20px;margin-bottom:10px;min-height:0}
.r61695-template-center .r61695-template-hero .eyebrow{display:none}
.r61695-template-center .r61695-template-hero h2{margin:0 0 3px;font-size:20px;line-height:1.25}
.r61695-template-center .r61695-template-hero p{margin:0;font-size:12px;color:var(--fp-muted)}
.r61695-template-center .r61695-template-hero .actions{flex-wrap:nowrap}
.r61695-template-flowbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:10px 16px;margin-bottom:10px;min-height:58px}
.r61695-flow-main{min-width:0;display:flex;align-items:center;gap:14px;flex:1}
.r61695-flow-main>strong{font-size:12px;white-space:nowrap;color:var(--fp-text)}
.r61695-flow-steps{display:flex;align-items:center;min-width:0;overflow-x:auto;scrollbar-width:thin}
.r61695-flow-steps span{display:flex;align-items:center;white-space:nowrap;font-size:11px;font-weight:700;color:var(--fp-muted)}
.r61695-flow-steps span:not(:last-child)::after{content:'›';margin:0 9px;color:var(--fp-faint);font-size:15px}
.r61695-brand-link{display:flex;align-items:center;gap:8px;padding-left:14px;border-left:1px solid var(--fp-border);font-size:11px;color:var(--fp-muted);white-space:nowrap}
.r61695-brand-link a{font-weight:800;color:var(--fp-primary)}
.r61695-template-center .r61630-source-tabs{margin-bottom:8px}
.r61695-template-center .r61630-template-panel{padding-top:0}
.r61695-template-center .r61630-panel-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 0 7px}
.r61695-template-center .r61630-panel-header h3{margin:0 0 2px;font-size:15px}
.r61695-template-center .r61630-panel-header p{margin:0;font-size:11px}
.r61695-template-center .r61623-template-search{min-width:280px}
.r61695-template-center .r61630-filter-card{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:9px 11px;border-radius:12px;margin-bottom:6px}
.r61695-template-center .r61630-category-block{min-width:0;flex:1}
.r61695-template-center .r61630-category-filter{gap:5px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:1px}
.r61695-template-center .r61630-category-filter button{min-height:32px;padding:5px 9px;white-space:nowrap}
.r61695-template-center .r61630-form-block{flex:0 0 auto}
.r61695-template-center .r61630-form-switch{min-width:220px}
.r61695-template-center .r61630-form-switch button{min-height:34px;padding:6px 11px}
.r61695-template-center .r61630-filter-label{font-size:9px;margin-bottom:4px}
.r61695-total-logic-note{display:flex;align-items:center;gap:10px;margin:4px 0 6px;padding:6px 10px;border-radius:9px;background:var(--fp-primary-soft);color:var(--fp-muted);font-size:10.5px;line-height:1.35}
.r61695-total-logic-note strong{color:var(--fp-primary-strong);white-space:nowrap}
.r61695-template-center .r61630-current-view{min-height:30px;padding:4px 2px 6px;margin:0}
.r61695-template-center .r61630-current-view strong{font-size:12px}
.r61695-template-center .r61630-current-view span{font-size:10px}
.r61695-template-center .r61630-template-list{gap:7px}
.r61695-template-center .r61630-template-row{padding:10px 12px;min-height:82px}
.r61695-template-center .r61623-template-copy h4{font-size:13px;margin-bottom:2px}
.r61695-template-center .r61623-template-copy>p{font-size:11px}
.r61695-template-center .r61623-template-detail{margin-top:4px}
.r61695-template-center .r61627-template-facts{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}

/* Product picker: content-sized for small result sets; scroll only when results need it. */
.r61650-order-entry .product-picker-sheet.r61686-product-picker.classic-picker-open{
  inset:auto max(18px,calc((100vw - 1240px)/2))!important;
  top:50%!important;
  transform:translateY(-50%);
  width:auto!important;
  height:auto!important;
  max-height:min(82vh,760px)!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:14px!important;
}
.r61650-order-entry .product-picker-sheet.r61686-product-picker .r61638-picker-close{display:inline-flex!important}
.r61650-order-entry .product-picker-sheet.r61686-product-picker .order-product-picker{flex:0 1 auto!important;min-height:0!important;max-height:min(50vh,500px)!important;overflow:auto!important;padding-right:4px}
.r61650-order-entry .product-picker-sheet.r61686-product-picker .product-picker-summary{position:sticky;bottom:0;top:auto!important;z-index:5;margin-top:8px;padding:9px 2px 0;background:var(--fp-surface);border-top:1px solid var(--fp-border);border-bottom:0!important}
.r61650-order-entry .product-picker-sheet.r61686-product-picker .r613-product-row{min-height:66px}
.r61650-order-entry .product-picker-sheet.r61686-product-picker .r613-picker-qty input::placeholder{color:var(--fp-faint);opacity:.9}
.r61650-order-entry .product-picker-sheet.r61686-product-picker .r61638-picker-actions{display:flex;gap:7px;align-items:center}

/* Multi-order procurement filter: one total entry, explicit category, supplier-safe split. */
.r61695-purchase-total-filter{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px;padding:10px 12px;border:1px solid var(--fp-border);border-radius:12px;background:var(--fp-surface)}
.r61695-purchase-total-filter>div:first-child{display:grid;gap:2px;min-width:0}
.r61695-purchase-total-filter strong{font-size:12px}
.r61695-purchase-total-filter small{font-size:10px;color:var(--fp-muted)}
.r61695-purchase-category-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.r61695-purchase-category-actions a{display:inline-flex;align-items:center;min-height:30px;padding:5px 9px;border:1px solid var(--fp-border);border-radius:8px;background:var(--fp-surface-2);font-size:10.5px;font-weight:750}
.r61695-purchase-category-actions a.active{border-color:var(--fp-primary);background:var(--fp-primary-soft);color:var(--fp-primary-strong)}

/* Desktop collapsed sidebar must remain a clean icon rail, even around zoom/breakpoint edges. */
@media(min-width:821px){
 .sidebar-collapsed .v070-sidebar{overflow-x:hidden!important}
 .sidebar-collapsed .v070-sidebar .mobile-only,.sidebar-collapsed .v070-sidebar .sidebar-close{display:none!important}
 .sidebar-collapsed .v070-sidebar .v070-brand{display:flex!important;justify-content:center!important;align-items:center!important;padding-inline:0!important}
 .sidebar-collapsed .v070-sidebar .brand-mark{margin:0!important;flex:0 0 auto}
 .sidebar-collapsed .v070-sidebar .brand-copy,.sidebar-collapsed .v070-sidebar .cui-nav-link>span:not(.v070-nav-symbol),.sidebar-collapsed .v070-sidebar .r6151-lite-hint,.sidebar-collapsed .v070-sidebar .r61633-nav-divider,.sidebar-collapsed .v070-sidebar .v070-management summary,.sidebar-collapsed .v070-sidebar .v070-enterprise,.sidebar-collapsed .v070-sidebar .v070-user-row div,.sidebar-collapsed .v070-sidebar .v070-sidebar-bottom>a,.sidebar-collapsed .v070-sidebar .r67-sidebar-preferences b,.sidebar-collapsed .v070-sidebar .v070-collapse-button b,.sidebar-collapsed .v070-sidebar .version-pill{display:none!important}
 .sidebar-collapsed .v070-sidebar .v070-nav .cui-nav-link,.sidebar-collapsed .v070-sidebar .r67-sidebar-preferences,.sidebar-collapsed .v070-sidebar .v070-user-row,.sidebar-collapsed .v070-sidebar .v070-collapse-button{justify-content:center!important}
}

@media(max-width:1250px) and (min-width:821px){
 .r61695-template-center .r61630-filter-card{display:grid;grid-template-columns:minmax(0,1fr) auto}
 .r61695-template-flowbar{align-items:flex-start}
 .r61695-flow-main{display:grid;gap:5px}
}
@media(max-width:900px){
 .r61695-template-center .r61695-template-hero,.r61695-template-flowbar{display:grid}
 .r61695-brand-link{padding:6px 0 0;border-left:0;border-top:1px solid var(--fp-border)}
 .r61650-order-entry .product-picker-sheet.r61686-product-picker.classic-picker-open{inset:12px!important;top:auto!important;transform:none;max-height:calc(100vh - 24px)!important}
}
