/* CPGCBL EMD R11.5.9 — REFERENCE-MATCHED compact (NO TABS).
   Loaded AFTER r1158. All selectors exclude Daily Work and edit forms by
   requiring r1159-active (set only on R11.5.7 read-only drawer shells). */
body.r107-ui #drawer.r1159-active .drawerpanel{
  width:min(790px,calc(100vw - 24px))!important;
  min-width:0!important;max-width:100vw!important;
}
body.r107-ui #drawer.r1159-active .drawerbody{
  padding:7px 10px 13px!important;
  overflow-x:hidden!important;
}
#drawer.r1159-active .drawerhead{min-height:52px!important;padding:7px 10px!important;gap:8px!important}
#drawer.r1159-active .drawerhead>div{min-width:0!important;flex:1 1 auto!important}
#drawer.r1159-active .r1159-status-badge{
  flex:0 0 auto;font-size:10px;font-weight:750;line-height:1.25;
  padding:4px 8px;border:1px solid var(--r1155-line);border-radius:999px;
  color:var(--r1155-accent);background:var(--r1155-accent-soft);
  max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#drawer.r1159-active .r1159-redundant-hero{display:none!important}
#drawer.r1159-active .r1159-structural-shell,
#drawer.r1159-active .r1157-sections,
#drawer.r1159-active .r1156-group{gap:5px!important}
#drawer.r1159-active .r1155-top .r5-actions{padding:0!important;gap:5px!important}
#drawer.r1159-active .r1155-top .r5-actions :is(button,.btn){
  min-height:28px!important;padding:5px 9px!important;font-size:11px!important;
  border-radius:7px!important;
}
/* Make each module actually resemble the compact reference: a single image
   panel, a tight specifications panel, short KPI strip, then compact tables. */
body.r107-ui #drawer.r1159-active .r1159-primary-pair,
body.r107-ui #drawer.r1159-active .r1156-group-overview>.r79-bearing-top{
  display:grid!important;grid-template-columns:minmax(230px,.84fr) minmax(0,1.16fr)!important;
  gap:6px!important;align-items:start!important;margin:0!important;
}
#drawer.r1159-active .r1159-primary-pair>*{min-width:0!important;align-self:start!important}
#drawer.r1159-active .r1159-primary-pair>.r5-drawer-section,
#drawer.r1159-active .r1159-primary-pair>.r79-media-card,
#drawer.r1159-active .r1159-primary-pair>.r79-spec-card{
  min-height:0!important;padding:7px!important;border-radius:8px!important;
  border:1px solid var(--r1155-line)!important;box-shadow:none!important;
  background:var(--r1155-panel)!important;
}
#drawer.r1159-active .r1159-primary-pair :is(h3,.r1155-section-title){
  margin:0 0 4px!important;padding:0!important;
  color:var(--r1155-accent)!important;font-size:11.5px!important;
}
#drawer.r1159-active .r1157-photo-card{gap:3px!important}
#drawer.r1159-active .r1157-photo-card .emd-r93-gallery{gap:3px!important}
#drawer.r1159-active .r1157-photo-card .emd-r93-gallery-head{min-height:0!important;margin:0!important}
#drawer.r1159-active .r1157-photo-card .emd-r93-main-photo,
#drawer.r1159-active .r79-media-card .emd-r93-main-photo{
  height:152px!important;min-height:142px!important;max-height:152px!important;
  background:var(--r1155-alt)!important;border:1px solid var(--r1155-line)!important;
}
#drawer.r1159-active .r1157-photo-card .emd-r93-main-photo img,
#drawer.r1159-active .r79-media-card .emd-r93-main-photo img{
  width:100%!important;height:100%!important;object-fit:contain!important;
}
#drawer.r1159-active .r1157-photo-card .emd-r93-thumb-rail,
#drawer.r1159-active .r79-media-card .emd-r93-thumb-rail{gap:4px!important;max-height:40px!important;padding:1px 0!important}
#drawer.r1159-active .r1157-photo-card .emd-r93-thumb,
#drawer.r1159-active .r79-media-card .emd-r93-thumb{
  flex:0 0 38px!important;min-width:38px!important;max-width:38px!important;
  width:38px!important;height:36px!important;padding:2px!important;
}
#drawer.r1159-active .r1157-photo-card .r7-media-actions{display:flex!important;flex-wrap:wrap!important;gap:4px!important;margin:3px 0 0!important}
#drawer.r1159-active .r1157-photo-card .r7-media-actions .btn{min-height:25px!important;font-size:10px!important;padding:4px 7px!important}
#drawer.r1159-active .r79-media-card :is(.r79-section-head,.r79-catalog-copy){margin-bottom:3px!important}
#drawer.r1159-active .r79-media-card .r79-catalog-image{min-height:145px!important;max-height:155px!important}
#drawer.r1159-active .r79-media-card .r79-catalog-image img{max-height:145px!important}
#drawer.r1159-active .r79-dim-grid{gap:4px!important;margin:2px 0!important}
#drawer.r1159-active .r79-dim-grid>div{min-height:42px!important;padding:5px 6px!important}
#drawer.r1159-active .r79-dim-grid :is(b,strong){font-size:13px!important}
#drawer.r1159-active .r79-catalog-copy{gap:2px!important;margin-top:3px!important;font-size:10.5px!important}
#drawer.r1159-active .r79-ref-actions{margin-top:5px!important;gap:4px!important}
#drawer.r1159-active .r79-ref-actions :is(.btn,a){padding:5px 8px!important;min-height:27px!important;font-size:10.5px!important}
/* Actual structural fix for Assets: original Power/Voltage/Current/RPM
   are now within the nameplate card rather than marooned in a lower row. */
#drawer.r1159-active .r1159-nameplate-quick{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:4px!important;margin:0 0 4px!important;
}
#drawer.r1159-active .r1159-nameplate-quick>.r5-detail{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  gap:1px!important;min-height:37px!important;padding:4px 7px!important;
  background:var(--r1155-alt)!important;border:1px solid var(--r1155-line)!important;
  border-radius:6px!important;
}
#drawer.r1159-active .r1159-nameplate-quick>.r5-detail small{font-size:10px!important;line-height:1.2!important}
#drawer.r1159-active .r1159-nameplate-quick>.r5-detail b{font-size:13px!important;line-height:1.15!important}
#drawer.r1159-active .r1157-media-details .r5-detail-grid{gap:0 5px!important}
#drawer.r1159-active .r1157-media-details .r5-detail-grid>.r5-detail{
  display:grid!important;grid-template-columns:minmax(68px,.42fr) minmax(0,1fr)!important;
  padding:4px 2px!important;min-height:25px!important;gap:4px!important;
}
#drawer.r1159-active .r1157-media-details .r5-detail-grid>.r5-detail small{font-size:10px!important}
#drawer.r1159-active .r1157-media-details .r5-detail-grid>.r5-detail b{font-size:11.3px!important}
/* Keep the leading four stock counters, not an additional wall of stock cards. */
#drawer.r1159-active .r1156-metrics,
#drawer.r1159-active .r1157-stock-kpis,
#drawer.r1159-active .r1157-grease-kpis{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;margin:0!important;
}
#drawer.r1159-active .r1156-metrics>*{
  min-height:45px!important;padding:5px 8px!important;
  border:1px solid var(--r1155-line)!important;
  background:var(--r1155-panel)!important;
  border-radius:7px!important;box-shadow:none!important;
}
#drawer.r1159-active .r1156-metrics>* :is(b,strong,.num){font-size:15px!important;line-height:1.1!important}
#drawer.r1159-active .r1156-metrics>* :is(small,span){font-size:10px!important;line-height:1.2!important}
#drawer.r1159-active .r1159-more-stock{
  border:1px solid var(--r1155-line);border-radius:7px;
  background:var(--r1155-panel);padding:0;overflow:hidden;
}
#drawer.r1159-active .r1159-more-stock>summary{
  cursor:pointer;padding:8px 10px;color:var(--r1155-muted);
  font-size:11.5px;font-weight:700;
}
#drawer.r1159-active .r1159-more-stock[open]>summary{border-bottom:1px solid var(--r1155-line)}
#drawer.r1159-active .r1159-more-stock>.r1156-stock-fields{padding:7px!important;background:transparent!important;border:0!important}
#drawer.r1159-active .r1159-more-stock .r79-tech-grid{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;
}
#drawer.r1159-active .r1159-more-stock .r79-tech-grid>*{min-height:36px!important;padding:5px!important;border:1px solid var(--r1155-line)!important;border-radius:6px!important;background:var(--r1155-alt)!important}
/* Readable dense details, never 100px of padding around a two-word item. */
#drawer.r1159-active .r1156-group>.r5-drawer-section,
#drawer.r1159-active .r1156-group>.r1155-card{padding:7px 9px!important;border-radius:8px!important;box-shadow:none!important}
#drawer.r1159-active .r1156-group :is(.r5-drawer-section h3,.r1155-section-title,.r79-section-head h3){
  margin:0 0 5px!important;padding:0!important;font-size:11.5px!important;
}
#drawer.r1159-active .r1156-group .r5-detail{min-height:25px!important;padding:4px 3px!important}
#drawer.r1159-active .r1156-group .r5-detail small{font-size:10px!important}
#drawer.r1159-active .r1156-group .r5-detail b{font-size:11.4px!important}
#drawer.r1159-active .r1156-group :is(.tablewrap,.r5-tablewrap){
  max-height:155px!important;min-height:0!important;overflow:auto!important;
  border:1px solid var(--r1155-line)!important;border-radius:6px!important;
}
#drawer.r1159-active .r1156-group :is(.table,.r5-table) :is(th,td){
  padding:4px 6px!important;font-size:10.5px!important;line-height:1.25!important;
}
#drawer.r1159-active .r1156-group-stock td :is(button,.btn){
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:auto!important;min-height:24px!important;padding:2px 5px!important;
  font-size:10px!important;margin:1px 2px!important;
}
#drawer.r1159-active .r1159-empty-table{
  max-height:45px!important;height:auto!important;min-height:0!important;overflow:hidden!important;
}
#drawer.r1159-active .r1159-empty-table :is(table,.table,.r5-table){min-width:0!important;width:100%!important;}
#drawer.r1159-active .r1159-empty-table thead{display:none!important}
#drawer.r1159-active .r1159-empty-table tbody td{height:36px!important;min-height:0!important;padding:8px!important;text-align:center!important}
#drawer.r1159-active .r1155-empty{padding:9px!important;font-size:11px!important}
#drawer.r1159-active .r1156-group-history .r711-maint-grid{gap:5px!important}
#drawer.r1159-active .r1156-group-history .r711-maint-grid>div{padding:7px!important}
#drawer.r1159-active .r1156-group .r1158-audit-notes{padding:6px 8px!important}
#drawer.r1159-active :is(button,.btn,a,[role="button"]):focus-visible{outline:2px solid var(--r1155-accent)!important;outline-offset:2px!important}
@media(max-width:700px){
 body.r107-ui #drawer.r1159-active .drawerpanel{width:100vw!important;max-width:100vw!important}
 #drawer.r1159-active .r1159-primary-pair,
 #drawer.r1159-active .r1156-group-overview>.r79-bearing-top{grid-template-columns:1fr!important}
 #drawer.r1159-active .r1159-nameplate-quick{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #drawer.r1159-active .r1156-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #drawer.r1159-active .r1159-more-stock .r79-tech-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #drawer.r1159-active .r1159-status-badge{max-width:95px}
}
@media(prefers-reduced-motion:reduce){#drawer.r1159-active *{animation:none!important;scroll-behavior:auto!important}}
/* The pre-R1159 hero uses an equally forceful display:flex!important rule.
   This higher-specificity rule eliminates its duplicate status strip entirely. */
body.r107-ui #drawer.r1159-active .r1156-group-overview > .r1159-redundant-hero {
  display:none!important;
}
