/* R6.17.7.23 — master-data continuity, unresolved-first workfaces */

/* Product master: keep the existing section navigator useful without consuming a second header row. */
.r617722-product-entry .r61636-page-tools{
  top:66px;
  min-height:46px;
  padding:6px 10px;
  gap:8px;
  border-radius:12px;
}
.r617722-product-entry .r61636-page-tools-copy{min-width:116px}
.r617722-product-entry .r61636-page-tools-copy small{font-size:10px}
.r617722-product-entry .r61636-page-tools-nav{flex:1 1 auto;min-width:240px}
.r617722-product-entry .r61636-page-tools-nav button{padding:6px 10px}
.r617722-product-entry .r61636-page-tools-actions{flex:0 0 auto}

/* BOM summary: information belongs to one horizontal row; editing stays on the right. */
.r617719-product-bom-page .bom-item-card.r61776-bom-row{
  grid-template-columns:48px minmax(260px,1fr) minmax(118px,150px) auto!important;
  min-height:62px!important;
  padding:8px 12px!important;
  gap:10px!important;
  align-items:center!important;
}
.r617719-product-bom-page .bom-item-image{width:42px!important;height:42px!important;min-width:42px!important}
.r617719-product-bom-page .bom-item-main{min-width:0}
.r617719-product-bom-page .bom-item-main p{margin:1px 0 3px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.r617719-product-bom-page .bom-item-meta{display:flex!important;gap:6px 12px!important;flex-wrap:wrap!important}
.r617719-product-bom-page .bom-item-cost{min-width:112px;text-align:right}
.r617719-product-bom-page .bom-group-list{gap:8px!important}
.r617719-product-bom-page .bom-group-card{margin-bottom:7px!important}

/* Inline builder: avoid the narrow centered form seen in screenshots; use the available work area. */
.r61778-inline-builder .r61777-part-create,
.r61778-inline-builder .r61777-new-part,
.r61778-inline-builder [data-r61777-part-create]{
  width:min(980px,100%)!important;
  max-width:980px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.r61778-inline-builder .r61777-unit-create,
.r61778-inline-builder .r61777-new-unit-create{max-width:760px}

/* Order desk: unresolved rows are visually first-class; resolved rows become compact evidence. */
.r617717-unified-order-page .r617717-fact-list{display:flex!important;flex-direction:column!important}
.r617717-unified-order-page .r617717-fact-row.needs-source,
.r617717-unified-order-page .r617717-fact-row.r617723-identity-issue{order:-1}
.r617717-unified-order-page .r617717-fact-row:not(.needs-source):not(.r617723-identity-issue){
  grid-template-columns:minmax(260px,1fr) 150px minmax(190px,280px)!important;
  padding-top:7px!important;
  padding-bottom:7px!important;
  min-height:52px;
}
.r617717-unified-order-page .r617717-fact-row:not(.needs-source):not(.r617723-identity-issue) .r617717-fact-main span,
.r617717-unified-order-page .r617717-fact-row:not(.needs-source):not(.r617723-identity-issue) .r617717-fact-source small{display:none}
.r617717-unified-order-page .r617717-fact-row.needs-source{
  border-left:3px solid #7c83ff;
  background:#fffdfa!important;
}
.r617717-unified-order-page .r617717-section-head{padding:12px 15px!important}
.r617717-unified-order-page .r617717-section-head h3{font-size:17px!important}
.r617717-unified-order-page .r617717-work-section{scroll-margin-top:58px}
.r617717-unified-order-page .r617717-doc-groups details:not([open]) summary{min-height:38px}

/* Quick supplier remains inline and grows enough to finish the job without a page jump. */
.r617717-unified-order-page .r617723-quick-supplier-panel{max-width:640px;margin-left:auto}
.r617717-unified-order-page .r617723-quick-supplier-panel form{grid-template-columns:minmax(190px,1.2fr) minmax(150px,.8fr)!important}

@media(max-width:1180px){
  .r617719-product-bom-page .bom-item-card.r61776-bom-row{grid-template-columns:44px minmax(220px,1fr) auto!important}
  .r617719-product-bom-page .bom-item-cost{grid-column:2;text-align:left}
  .r617717-unified-order-page .r617717-fact-row:not(.needs-source):not(.r617723-identity-issue){grid-template-columns:1fr 140px!important}
  .r617722-product-entry .r61636-page-tools{top:62px;flex-wrap:wrap}
  .r617722-product-entry .r61636-page-tools-nav{order:3;width:100%}
}
@media(max-width:820px){
  .r617719-product-bom-page .bom-item-card.r61776-bom-row{grid-template-columns:40px 1fr!important}
  .r617719-product-bom-page .bom-item-cost{grid-column:2}
  .r617719-product-bom-page .bom-item-card.r61776-bom-row>.btn{grid-column:2;justify-self:start}
  .r617717-unified-order-page .r617723-quick-supplier-panel form{grid-template-columns:1fr!important}
}
