/* V271.5.35 — Compact two-tab Customer / Supplier detail windows.
   Approved: medium-weight company name only, normal-weight field values. */
#cust-view-modal .modal, #sup-view-modal .modal{
  width:min(1180px,96vw)!important;max-width:1180px!important;
  height:min(88vh,850px)!important;display:flex;flex-direction:column;
}
#cust-view-modal .modal-header,#sup-view-modal .modal-header{min-height:46px;flex:none}
#cust-view-modal .modal-header h2,#sup-view-modal .modal-header h2{font-size:16px!important;font-weight:500!important}
#cust-view-modal .modal-body,#sup-view-modal .modal-body{
  min-height:0;flex:1;overflow-y:auto!important;overscroll-behavior:contain;
  scrollbar-width:thin;background:#f8fafc;padding:0!important;
}
#cust-view-modal .modal-footer,#sup-view-modal .modal-footer{flex:none;min-height:52px}
#cust-view-modal .business-profile,#sup-view-modal .business-profile{padding:12px 16px 14px;font-size:13px;color:#344255}
#cust-view-modal .product-profile-hero,#sup-view-modal .product-profile-hero{padding:10px 14px;min-height:66px;margin-bottom:8px;gap:12px}
#cust-view-modal .product-profile-identity h3,#sup-view-modal .product-profile-identity h3{font-size:17px!important;font-weight:500!important;color:#234a75!important;margin:0 0 3px}
#cust-view-modal .product-profile-eyebrow,#sup-view-modal .product-profile-eyebrow{font-size:10px;font-weight:400;letter-spacing:.035em}
#cust-view-modal .product-profile-meta,#sup-view-modal .product-profile-meta{font-size:12px;font-weight:400}
#cust-view-modal .product-profile-status,#sup-view-modal .product-profile-status{font-size:12px;font-weight:400}
#cust-view-modal .product-profile-icon,#sup-view-modal .product-profile-icon{width:40px;height:40px}
.bc-party-tabs{display:flex;align-items:center;border-bottom:1px solid #d3dfec;gap:10px;margin:0 0 10px}
.bc-party-tab{display:flex;align-items:center;gap:7px;padding:9px 13px;background:transparent;border:0;border-bottom:2px solid transparent;font:inherit;font-size:14px;font-weight:400;color:#4b6078;cursor:pointer}
.bc-party-tab.active{border-bottom-color:var(--blue,#2563eb);color:#244a76;font-weight:500;background:#eaf2fb;border-radius:6px 6px 0 0}
.bc-party-tab:focus-visible{outline:2px solid #60a5fa;outline-offset:-2px}
.bc-party-pane[hidden]{display:none!important}
.bc-party-pane{display:flex;flex-direction:column;gap:10px}
#cust-view-modal .product-profile-grid,#sup-view-modal .product-profile-grid{margin:0;gap:10px}
#cust-view-modal .product-profile-card,#sup-view-modal .product-profile-card{margin:0;box-shadow:none;border-color:#dce5ef}
#cust-view-modal .product-profile-section-title,#sup-view-modal .product-profile-section-title{height:32px;padding:0 12px;font-size:13px!important;font-weight:500!important;letter-spacing:0;text-transform:none;background:#f0f5fb}
#cust-view-modal .product-profile-fields>div,#sup-view-modal .product-profile-fields>div{min-height:47px;padding:6px 11px}
#cust-view-modal .product-profile-fields label,#sup-view-modal .product-profile-fields label{font-size:12px!important;font-weight:400!important;color:#64748b}
#cust-view-modal .product-profile-fields strong,#sup-view-modal .product-profile-fields strong,
#cust-view-modal .product-profile-fields span,#sup-view-modal .product-profile-fields span,
#cust-view-modal .party-address-readable strong,#sup-view-modal .party-address-readable strong,
#cust-view-modal .party-address-facts strong,#sup-view-modal .party-address-facts strong,
#cust-view-modal .profile-contact-row strong,#sup-view-modal .profile-contact-row strong{
  font-size:13px!important;font-weight:400!important;color:#334155;
}
#cust-view-modal .party-address-layout,#sup-view-modal .party-address-layout{padding:8px 12px;gap:12px}
#cust-view-modal .party-address-facts>div,#sup-view-modal .party-address-facts>div{padding:7px 10px}
#cust-view-modal .party-address-facts label,#sup-view-modal .party-address-facts label{font-size:12px;font-weight:400}
#cust-view-modal .profile-contact-row,#sup-view-modal .profile-contact-row{min-height:37px}
#cust-view-modal .profile-default-chip,#sup-view-modal .profile-default-chip{font-size:11px!important;font-weight:400!important}
#cust-view-modal .bch-card,#sup-view-modal .bch-card{max-height:220px;overflow:auto}
#cust-view-modal .profile-recent,#sup-view-modal .profile-recent{margin:0}
#cust-view-modal .profile-recent-head,#sup-view-modal .profile-recent-head{height:34px;background:#f0f5fb}
#cust-view-modal .profile-recent-head>span:first-child,#sup-view-modal .profile-recent-head>span:first-child{font-size:13px;font-weight:500;letter-spacing:0;text-transform:none}
#cust-view-modal .product-profile-usage,#sup-view-modal .product-profile-usage{padding:10px;gap:6px}
#cust-view-modal .product-profile-usage strong,#sup-view-modal .profile-compact-stats strong{font-weight:500!important}
#cust-view-modal .profile-txn-table th,#sup-view-modal .profile-txn-table th{font-size:12px!important;font-weight:500!important}
#cust-view-modal .profile-txn-table td,#sup-view-modal .profile-txn-table td{font-size:13px!important;font-weight:400!important}
#cust-view-modal .profile-doc-link,#sup-view-modal .profile-doc-link{font-weight:400!important}
#cust-view-modal .btn,#sup-view-modal .btn{font-weight:500}
@media(max-width:760px){
  #cust-view-modal .modal,#sup-view-modal .modal{width:96vw!important;height:92vh!important}
  #cust-view-modal .product-profile-grid,#sup-view-modal .product-profile-grid{grid-template-columns:1fr}
  .bc-party-tabs{gap:3px}.bc-party-tab{font-size:12px;padding:9px 8px}
}

/* Only the customer/supplier company-name field uses a medium accent. */
#cust-view-modal .product-profile-fields>div:first-child strong,
#sup-view-modal .product-profile-fields>div:first-child strong{font-weight:500!important;color:#234a75!important}
#cust-view-modal .product-profile-section-title span,
#sup-view-modal .product-profile-section-title span{font-weight:500!important}
#cust-view-modal .profile-txn-table td .badge,
#sup-view-modal .profile-txn-table td .badge{font-weight:400!important}

/* V271.5.35.1 — Approved compact Customer / Supplier detail layout, not a skin over the old grids. */
#cust-view-modal .modal,#sup-view-modal .modal {height:auto!important;max-height:min(88vh,850px)!important;min-height:0!important;overflow:hidden}
#cust-view-modal .modal-body,#sup-view-modal .modal-body {flex:0 1 auto!important;overflow-y:auto!important;min-height:0; scrollbar-width:thin; background:#f8fafc}
#cust-view-modal .modal-footer,#sup-view-modal .modal-footer {margin-top:0!important}
#cust-view-modal .business-profile,#sup-view-modal .business-profile {padding:12px 16px!important}
#cust-view-modal .product-profile-hero,#sup-view-modal .product-profile-hero {padding:10px 14px!important;min-height:65px!important;margin-bottom:8px!important;background:linear-gradient(112deg,#f1f7ff,#e8f2ff)!important}
#cust-view-modal .product-profile-icon,#sup-view-modal .product-profile-icon {flex-shrink:0}
#cust-view-modal .product-profile-identity h3,#sup-view-modal .product-profile-identity h3 {font-size:17px!important;font-weight:500!important;color:#25517b!important}
#cust-view-modal .bc-party-tabs,#sup-view-modal .bc-party-tabs {margin-bottom:10px}
#cust-view-modal .bc-party-pane,#sup-view-modal .bc-party-pane {gap:10px}
#cust-view-modal .bc-detail-top,#sup-view-modal .bc-detail-top {display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);gap:10px;align-items:stretch}
#cust-view-modal .bc-detail-card,#sup-view-modal .bc-detail-card {margin:0!important;min-height:0;border:1px solid #d3e1ef!important;background:#fff;border-radius:9px;overflow:hidden}
#cust-view-modal .bc-detail-card .product-profile-section-title,#sup-view-modal .bc-detail-card .product-profile-section-title {background:#eef4fb!important;height:32px;min-height:32px;padding:0 12px!important;font-size:13px!important;font-weight:500!important;text-transform:none!important}
#cust-view-modal .bc-detail-fields,#sup-view-modal .bc-detail-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start}
#cust-view-modal .bc-detail-field,#sup-view-modal .bc-detail-field {display:flex;align-items:center;justify-content:flex-start;gap:8px;min-height:38px;padding:6px 12px;border-bottom:1px solid #e7edf5;min-width:0}
#cust-view-modal .bc-detail-field:nth-child(odd),#sup-view-modal .bc-detail-field:nth-child(odd) {border-right:1px solid #e7edf5}
#cust-view-modal .bc-detail-field:nth-last-child(-n+2),#sup-view-modal .bc-detail-field:nth-last-child(-n+2) {border-bottom:0}
#cust-view-modal .bc-detail-label,#sup-view-modal .bc-detail-label {color:#64748b;font-size:12px!important;font-weight:400!important;flex:0 0 39%;letter-spacing:0!important;text-transform:none!important}
#cust-view-modal .bc-detail-value,#sup-view-modal .bc-detail-value {color:#334155;font-size:13px!important;font-weight:400!important;min-width:0;overflow-wrap:anywhere}
#cust-view-modal .bc-company-name,#sup-view-modal .bc-company-name {font-weight:500!important;color:#25517b!important}
#cust-view-modal .bc-contacts-compact,#sup-view-modal .bc-contacts-compact {padding:4px 12px}
#cust-view-modal .bc-contacts-compact .profile-contact-row,#sup-view-modal .bc-contacts-compact .profile-contact-row {min-height:37px!important;line-height:1.35}
#cust-view-modal .bc-contacts-compact strong,#sup-view-modal .bc-contacts-compact strong {font-weight:400!important;color:#334155!important}
#cust-view-modal .bc-address-inline,#sup-view-modal .bc-address-inline {display:grid;grid-template-columns:minmax(210px,1.15fr) minmax(0,2.8fr);gap:10px;padding:8px 12px;align-items:center}
#cust-view-modal .bc-address-main,#sup-view-modal .bc-address-main {display:flex;flex-direction:column;gap:2px;color:#334155;font-size:13px;line-height:1.45}
#cust-view-modal .bc-address-facts,#sup-view-modal .bc-address-facts {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-left:1px solid #d7e2ed}
#cust-view-modal .bc-address-facts>div,#sup-view-modal .bc-address-facts>div {display:flex;flex-direction:column;gap:3px;padding:5px 10px;border-right:1px solid #e1e9f1;min-width:0}
#cust-view-modal .bc-address-facts>div:last-child,#sup-view-modal .bc-address-facts>div:last-child {border-right:0}
#cust-view-modal .bc-address-facts .bc-detail-label,#sup-view-modal .bc-address-facts .bc-detail-label {flex:0 0 auto;font-size:11px!important}
#cust-view-modal .bch-card,#sup-view-modal .bch-card {max-height:165px!important;overflow-y:auto!important}
#cust-view-modal .bch-empty,#sup-view-modal .bch-empty {padding:9px 12px!important;font-size:12px!important}
#cust-view-modal .bch-row,#sup-view-modal .bch-row {font-size:12px!important;padding:5px 10px!important}
#cust-view-modal .bch-who,#sup-view-modal .bch-who {font-weight:400!important}
#cust-view-modal .bc-detail-notes,#sup-view-modal .bc-detail-notes {padding:9px 12px;font-size:13px;font-weight:400;color:#334155;line-height:1.45;white-space:pre-wrap}
#cust-view-modal .product-profile-empty,#sup-view-modal .product-profile-empty {padding:10px 0;font-size:12px}
@media(max-width:800px) {
 #cust-view-modal .bc-detail-top,#sup-view-modal .bc-detail-top {grid-template-columns:1fr}
 #cust-view-modal .bc-address-inline,#sup-view-modal .bc-address-inline {grid-template-columns:1fr}
 #cust-view-modal .bc-address-facts,#sup-view-modal .bc-address-facts {border-left:0;border-top:1px solid #d7e2ed;padding-top:6px;grid-template-columns:repeat(2,minmax(0,1fr));row-gap:6px}
}
@media(max-width:500px) {
 #cust-view-modal .bc-detail-fields,#sup-view-modal .bc-detail-fields {grid-template-columns:1fr}
 #cust-view-modal .bc-detail-field:nth-child(odd),#sup-view-modal .bc-detail-field:nth-child(odd) {border-right:0}
 #cust-view-modal .bc-detail-field:nth-last-child(2),#sup-view-modal .bc-detail-field:nth-last-child(2) {border-bottom:1px solid #e7edf5}
}

/* V271.5.36 — Approved prominent party detail windows and horizontal profile facts. */
@media(min-width:801px){
  #cust-view-modal .modal,#sup-view-modal .modal{
    width:min(1290px,calc(100vw - 64px))!important;max-width:1290px!important;
    height:min(82vh,780px)!important;max-height:calc(100dvh - 44px)!important;
    min-height:min(670px,calc(100dvh - 44px))!important;
  }
  #cust-view-modal .modal-body,#sup-view-modal .modal-body{flex:1 1 auto!important;}
}
#cust-view-modal .bc-party-hero,#sup-view-modal .bc-party-hero{
  display:grid!important;grid-template-columns:minmax(0,2.65fr) minmax(112px,1fr) minmax(126px,1.05fr) minmax(115px,.85fr) auto;
  align-items:center;gap:0!important;min-height:94px!important;padding:12px 15px!important;
}
#cust-view-modal .bc-party-name-group,#sup-view-modal .bc-party-name-group{display:flex;gap:12px;align-items:center;min-width:0;padding-right:14px}
#cust-view-modal .bc-party-name-text,#sup-view-modal .bc-party-name-text{min-width:0;flex:1}
#cust-view-modal .bc-party-name-text h3,#sup-view-modal .bc-party-name-text h3{
  display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500!important;font-size:17px!important;
  line-height:1.4;color:#234a75!important;max-width:100%;
}
#cust-view-modal .bc-party-city,#sup-view-modal .bc-party-city{display:block;font-size:12px;font-weight:400;color:#52677e;margin-top:3px}
#cust-view-modal .bc-party-hero-fact,#sup-view-modal .bc-party-hero-fact{
  display:flex;flex-direction:column;gap:6px;min-width:0;padding:4px 13px;
  border-left:1px solid #c8d9ec;font-size:12px;color:#607287;font-weight:400;
}
#cust-view-modal .bc-party-hero-fact strong,#sup-view-modal .bc-party-hero-fact strong{
  display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:13px;font-weight:400!important;color:#2c3e53!important;
}
#cust-view-modal .bc-party-hero .product-profile-status,#sup-view-modal .bc-party-hero .product-profile-status{margin-left:12px;justify-self:end;white-space:nowrap}
@media(max-width:1050px){
 #cust-view-modal .bc-party-hero,#sup-view-modal .bc-party-hero{grid-template-columns:minmax(0,2fr) minmax(85px,1fr) minmax(100px,1fr) minmax(80px,.8fr) auto;}
 #cust-view-modal .bc-party-hero-fact,#sup-view-modal .bc-party-hero-fact{padding:3px 8px}
}
@media(max-width:800px){
 #cust-view-modal .bc-party-hero,#sup-view-modal .bc-party-hero{display:flex!important;flex-wrap:wrap;gap:8px!important;}
 #cust-view-modal .bc-party-name-group,#sup-view-modal .bc-party-name-group{flex:1 1 100%}
 #cust-view-modal .bc-party-hero-fact,#sup-view-modal .bc-party-hero-fact{flex:1 1 25%;}
 #cust-view-modal .modal,#sup-view-modal .modal{height:min(90dvh,800px)!important;max-height:96dvh!important;}
 #cust-view-modal .modal-body,#sup-view-modal .modal-body{flex:1 1 auto!important;}
}
