/* Scoped pilot: Machine Register only. */
body.machine-record-workbench #content{background:#f2f5f8;color:#263f4d;font-family:"Segoe UI",Arial,sans-serif}
body.machine-record-workbench #content>.page-heading{padding:8px 0;margin:0 0 10px}
body.machine-record-workbench #content>.page-heading h1{font-size:19px;text-transform:uppercase}
body.machine-record-workbench #content>.page-heading p,body.machine-record-workbench #content>.page-heading .eyebrow{display:none}
body.machine-record-workbench #machine-register-layout-controls{display:none!important}
body.machine-record-workbench #content .md-shell{display:grid!important;grid-template-columns:240px minmax(0,1fr)!important;gap:0;overflow:visible;border:1px solid #d7e0e7;border-radius:6px;background:white;box-shadow:none}
body.machine-record-workbench #content .workspace-panel-toolbar{grid-column:1/-1;padding:7px 12px;border-bottom:1px solid #e0e7ec}
body.machine-record-workbench #content .md-list-pane{display:block!important;width:auto!important;min-width:0;border-right:1px solid #d7e0e7;background:#edf3f7;overflow:hidden}
body.machine-record-workbench #content .md-record-list{display:block!important;max-height:calc(100vh - 240px);overflow:auto}
body.machine-record-workbench #content .machine-layout-register{display:none!important}
body.machine-record-workbench #content .md-list-head{padding:12px;display:grid;gap:8px}
body.machine-record-workbench #content .md-list-head input{width:100%;box-sizing:border-box;font-size:12px;padding:8px;border:1px solid #bdcbd5;border-radius:4px}
body.machine-record-workbench #content .md-record{display:flex!important;width:100%;text-align:left;gap:7px;padding:11px 9px;border:0;border-bottom:1px solid #dce5ec;border-radius:0;background:transparent}
body.machine-record-workbench #content .md-record.selected{background:#dcebf6;border-left:3px solid #087bf0}
body.machine-record-workbench #content .md-record-copy{min-width:0;flex:1}.machine-record-workbench .md-record-copy b{font-size:12px;line-height:1.4}.machine-record-workbench .md-record-copy small{display:block;font-size:11px;margin-top:4px}
body.machine-record-workbench #content .md-record-status{display:none}
body.machine-record-workbench #content #md-detail-pane{display:block!important;min-width:0;width:auto!important;padding:16px;background:white;overflow:visible}
.mrw-record-nav{display:flex;align-items:center;gap:7px;margin-bottom:10px;color:#738792;font-size:11px}.mrw-record-nav span{margin-right:auto}
body.machine-record-workbench #content .md-profile-header{display:flex;align-items:center;gap:18px;border-bottom:1px solid #dfe6eb;padding:0 0 16px;margin-bottom:16px;background:white}
body.machine-record-workbench #content .md-machine-photo{width:120px;height:90px;object-fit:contain;border-radius:2px}
body.machine-record-workbench #content .md-profile-title{flex:1;min-width:0}.machine-record-workbench .md-kicker{display:none}
body.machine-record-workbench #content .md-profile-title h2{font-size:23px;margin:0 0 8px}.machine-record-workbench .md-profile-title h2 span{font-size:17px;font-weight:400;color:#627a88}
body.machine-record-workbench #content .md-profile-title p{font-size:12px;color:#627a88;margin:6px 0}
body.machine-record-workbench #content .profile-actions{gap:7px;margin-top:10px;display:flex;flex-wrap:wrap}
body.machine-record-workbench #content .btn{border-radius:4px;font-size:12px;padding:7px 12px;min-height:30px;box-shadow:none}
body.machine-record-workbench #content [data-md-edit-machine]{background:#087bf0;color:white;border-color:#087bf0}
body.machine-record-workbench #content .md-master-facts.mrw-facts{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:24px;padding:0;background:white;border:0;margin:0 0 20px}
body.machine-record-workbench #content .mrw-facts .mrw-section{padding:0;background:none;border:0;min-width:0}
.mrw-section h3{font-size:14px;font-weight:650;border-bottom:1px solid #bfcdd6;padding:0 0 10px;margin:0 0 12px}.mrw-section h3 span{margin-right:6px}
.mrw-section dl{margin:0}.mrw-section dl>div{display:grid;grid-template-columns:39% minmax(0,1fr);align-items:center;gap:8px;margin:5px 0}
.mrw-section dt{font-size:11px;color:#718692}.mrw-section dd{margin:0;padding:5px 7px;border:1px solid #cbd7df;border-radius:3px;font-size:11px;line-height:1.35;min-height:15px;overflow-wrap:anywhere;color:#344d5c}
.mrw-ledger-title{font-size:17px;border-top:1px solid #dfe7ec;padding-top:17px;margin:0 0 12px}
body.machine-record-workbench #content .md-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;background:white;border-bottom:1px solid #dce5ec;gap:12px;padding:0;margin-bottom:10px}
body.machine-record-workbench #content .md-tab{white-space:nowrap;border:0;border-bottom:3px solid transparent;background:none;color:#718692;padding:10px 4px;font-size:12px;border-radius:0}
body.machine-record-workbench #content .md-tab.active{color:#087bf0;border-bottom-color:#087bf0;background:none}
body.machine-record-workbench #content .md-tab-panel{padding:0;background:white}
body.machine-record-workbench #content table{font-size:12px;border-collapse:collapse;width:100%}
body.machine-record-workbench #content th{background:#eaf1f6;color:#4e6878;text-align:left;padding:10px;font-weight:600}
body.machine-record-workbench #content td{padding:9px 10px;border-bottom:1px solid #e2e9ef}
@media(max-width:1450px){body.machine-record-workbench #content .md-master-facts.mrw-facts{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px}.mrw-section:last-child{grid-column:1/-1}.mrw-section:last-child dl{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}}
@media(max-width:850px){body.machine-record-workbench #content .md-shell{grid-template-columns:190px minmax(0,1fr)!important}body.machine-record-workbench #content .md-master-facts.mrw-facts{grid-template-columns:1fr!important}.mrw-section:last-child{grid-column:auto}.mrw-section:last-child dl{display:block}.machine-record-workbench .md-profile-header{flex-wrap:wrap}}
@media(max-width:550px){body.machine-record-workbench #content .md-shell{grid-template-columns:minmax(0,1fr)!important}body.machine-record-workbench #content .md-record-list{max-height:180px}.machine-record-workbench .md-list-pane{border-bottom:1px solid #d7e0e7}}

/* Override legacy profile, saved sizing and global tab themes within this pilot. */
body.machine-record-workbench #content #md-detail-pane{max-height:none!important;height:auto!important;overflow:visible!important;display:block!important}
body.machine-record-workbench #content .machine-profile-top{display:block!important;grid-template-columns:none!important;min-height:0!important;height:auto!important;margin:0 0 12px!important}
body.machine-record-workbench #content .machine-profile-top>.md-profile-header{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;width:100%!important;min-width:0!important;min-height:0!important;box-sizing:border-box;position:static!important}
body.machine-record-workbench #content .md-profile-title{width:auto!important;flex:1 1 auto!important;min-width:0!important}
body.machine-record-workbench #content .md-profile-title h2,body.machine-record-workbench #content .md-profile-title p{white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}
body.machine-record-workbench #content .md-machine-photo{flex:0 0 110px!important;width:110px!important;height:85px!important;max-width:110px!important}
body.machine-record-workbench #content .machine-utility-panel{display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;min-height:0!important;margin:8px 0!important;width:100%!important}
body.machine-record-workbench #content .machine-utility-panel .asset-barcode-inline{display:flex!important;gap:8px!important;margin:0!important;padding:0!important}
body.machine-record-workbench #content .machine-utility-panel img,body.machine-record-workbench #content .machine-utility-panel svg{max-height:48px!important;width:auto!important}
body.machine-record-workbench #content .machine-secondary-actions{display:flex!important;flex-wrap:wrap;gap:7px}
body.machine-record-workbench #content .md-profile-header .profile-actions{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;position:static!important;gap:7px!important;width:auto!important}
body.machine-record-workbench #content .md-profile-header .profile-actions .btn{width:auto!important;white-space:nowrap!important}
body.machine-record-workbench #content .machine-list-column-head{display:none!important}
body.machine-record-workbench #content .md-record-list{width:100%!important;min-width:0!important;overflow-x:hidden!important}
body.machine-record-workbench #content .md-record{display:flex!important;grid-template-columns:none!important;min-width:0!important;width:100%!important;box-sizing:border-box!important}
body.machine-record-workbench #content .md-record-copy{width:auto!important;min-width:0!important;flex:1!important;overflow:visible!important}
body.machine-record-workbench #content .md-record-copy b,body.machine-record-workbench #content .md-record-copy small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important}
body.machine-record-workbench #content .md-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:12px!important;background:white!important;padding:0!important;position:static!important;min-height:0!important;border-radius:0!important}
body.machine-record-workbench #content .md-tabs>button{flex:0 0 auto!important;background:white!important;color:#627a88!important;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;padding:10px 4px!important}
body.machine-record-workbench #content .md-tabs>button.active{background:white!important;color:#087bf0!important;border-bottom-color:#087bf0!important}
body.machine-record-workbench #content .md-tab-panel{min-height:0!important;height:auto!important;margin:0!important;padding:0!important}
body.machine-record-workbench #content .md-tab-panel:empty{display:none!important}
body.machine-record-workbench #content .md-master-facts{margin-top:0!important}
@media(min-width:1250px){body.machine-record-workbench #content .md-master-facts.mrw-facts{grid-template-columns:repeat(3,minmax(0,1fr))!important}.mrw-section:last-child{grid-column:auto!important}.mrw-section:last-child dl{display:block!important}}

/* Four information columns with a compact top area. */
body.machine-record-workbench #content #md-detail-pane{padding:9px 12px!important}
body.machine-record-workbench #content .mrw-record-nav{margin:0 0 5px!important}
body.machine-record-workbench #content .machine-profile-top{margin-bottom:6px!important}
body.machine-record-workbench #content .md-profile-header{padding-bottom:7px!important;margin-bottom:5px!important}
body.machine-record-workbench #content .machine-utility-panel{margin:3px 0!important}
body.machine-record-workbench #content .md-master-facts.mrw-facts{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:0 0 10px!important}
body.machine-record-workbench #content .mrw-section:last-child{grid-column:auto!important}
body.machine-record-workbench #content .mrw-section:last-child dl{display:block!important}
body.machine-record-workbench #content .mrw-section h3{font-size:13px;margin-bottom:7px;padding-bottom:7px}
body.machine-record-workbench #content .mrw-section dl>div{grid-template-columns:1fr;gap:3px;margin:5px 0}
body.machine-record-workbench #content .mrw-ledger-title{padding-top:10px;margin-bottom:7px}
@media(max-width:1050px){body.machine-record-workbench #content .md-master-facts.mrw-facts{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:650px){body.machine-record-workbench #content .md-master-facts.mrw-facts{grid-template-columns:minmax(0,1fr)!important}}

/* Neutralise legacy register cell positions instead of inheriting saved column geometry. */
body.machine-record-workbench #content .md-record{display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;grid-template-rows:auto!important;align-items:start!important;gap:7px!important;min-height:54px!important;height:auto!important;max-height:none!important;padding:9px!important;line-height:1.35!important;overflow:visible!important;text-align:left!important}
body.machine-record-workbench #content .md-record>.machine-list-no{position:static!important;display:block!important;grid-column:1!important;grid-row:1!important;align-self:start!important;width:22px!important;min-width:0!important;font-size:10px!important;text-align:left!important;line-height:1.4!important;margin:0!important;padding:0!important;transform:none!important}
body.machine-record-workbench #content .md-record>.md-record-copy{position:static!important;display:block!important;grid-column:2!important;grid-row:1!important;width:auto!important;min-width:0!important;margin:0!important;padding:0!important;transform:none!important}
body.machine-record-workbench #content .md-record-copy b{display:block!important;font-size:12px!important;font-weight:600!important;line-height:1.4!important;margin:0!important}
body.machine-record-workbench #content .md-record-copy small{display:block!important;font-size:10px!important;line-height:1.35!important;margin:3px 0 0!important}
body.machine-record-workbench #content .machine-resize-handle{display:none!important}
body.machine-record-workbench #content .mrw-section dl>div{display:grid!important;grid-template-columns:minmax(90px,40%) minmax(0,1fr)!important;align-items:center!important;gap:6px!important;margin:4px 0!important;padding:0!important;border:0!important;background:none!important}
body.machine-record-workbench #content .mrw-section dt{font-size:10px!important;line-height:1.25!important}
body.machine-record-workbench #content .mrw-section dd{padding:4px 6px!important;min-height:14px!important;font-size:11px!important;line-height:1.25!important}
body.machine-record-workbench #content .mrw-facts{align-items:start!important}

/* Secondary machine tools live in a compact, accessible disclosure. */
body.machine-record-workbench #content .machine-profile-top{position:relative!important;padding-right:145px!important;box-sizing:border-box!important}
body.machine-record-workbench #content .mrw-more-actions{position:absolute;right:0;top:8px;z-index:5;max-width:340px}
body.machine-record-workbench #content .mrw-more-actions>summary{list-style:none;cursor:pointer;border:1px solid #b9cfdf;border-radius:4px;background:white;padding:8px 14px;font-size:12px;color:#165d9e}
body.machine-record-workbench #content .mrw-more-actions:not([open])>.machine-utility-panel{display:none!important}
body.machine-record-workbench #content .mrw-more-actions[open]>.machine-utility-panel{display:flex!important;background:white;border:1px solid #cbdbe6;box-shadow:0 5px 16px #203e5220;padding:12px!important;width:320px!important;max-width:75vw;box-sizing:border-box;justify-content:flex-start!important}
body.machine-record-workbench #content .mrw-more-actions .machine-secondary-actions{flex-direction:column!important;align-items:stretch!important;width:100%}
body.machine-record-workbench #content .md-machine-photo{height:78px!important}

/* Inline label/value pairs across four compact information columns. */
body.machine-record-workbench #content .mrw-section dl>div{display:grid!important;grid-template-columns:minmax(82px,38%) minmax(0,1fr)!important;align-items:center!important;column-gap:6px!important;margin:4px 0!important}
body.machine-record-workbench #content .mrw-section dt{display:block!important;margin:0!important;padding:0!important;font-size:10px!important;line-height:1.25!important}
body.machine-record-workbench #content .mrw-section dd{display:block!important;margin:0!important;padding:4px 6px!important;line-height:1.25!important;min-width:0!important}
body.machine-record-workbench #content .mrw-top-actions{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:7px!important;overflow-x:auto!important;padding:4px 0 9px!important;margin:0!important}
body.machine-record-workbench #content .mrw-top-actions>.profile-actions,body.machine-record-workbench #content .mrw-top-actions>.machine-secondary-actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:7px!important;margin:0!important;width:auto!important;flex:0 0 auto!important}
body.machine-record-workbench #content .mrw-top-actions button{white-space:nowrap!important;flex:0 0 auto!important;width:auto!important}
/* Consistent compact density across the entire Machine Register workbench. */
body.machine-record-workbench #content .mrw-section dl>div{grid-template-columns:minmax(80px,38%) minmax(0,1fr)!important;min-height:25px!important;margin:2px 0!important}
body.machine-record-workbench #content .mrw-section h3{margin:0 0 6px!important;padding:0 0 6px!important;line-height:1.3!important}
body.machine-record-workbench #content .mrw-section dd{padding:3px 5px!important;min-height:14px!important;border-radius:2px!important}
body.machine-record-workbench #content .md-master-facts.mrw-facts{gap:12px!important;padding:0!important;margin-bottom:8px!important}
body.machine-record-workbench #content .md-facts,body.machine-record-workbench #content .machine-detail-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px 12px!important;padding:6px 0!important}
body.machine-record-workbench #content .md-facts>div,body.machine-record-workbench #content .machine-detail-grid>.detail-fact{display:grid!important;grid-template-columns:minmax(80px,38%) minmax(0,1fr)!important;align-items:center!important;gap:6px!important;padding:3px 0!important;min-height:0!important;margin:0!important}
body.machine-record-workbench #content .md-facts small,body.machine-record-workbench #content .machine-detail-grid small{font-size:10px!important;margin:0!important}
body.machine-record-workbench #content .md-facts b,body.machine-record-workbench #content .machine-detail-grid b{font-size:11px!important;font-weight:400!important;margin:0!important;overflow-wrap:anywhere}
body.machine-record-workbench #content .md-profile-header{gap:12px!important;padding-bottom:5px!important}
body.machine-record-workbench #content .md-profile-title h2{font-size:20px!important;margin:0 0 4px!important}
body.machine-record-workbench #content .md-profile-title p{margin:3px 0!important;font-size:11px!important}
body.machine-record-workbench #content .md-machine-photo{height:65px!important;width:90px!important;max-width:90px!important;flex-basis:90px!important}
body.machine-record-workbench #content .md-badges{margin:3px 0!important;gap:4px!important}
body.machine-record-workbench #content .md-tabs>button{padding:7px 4px!important;font-size:11px!important}
body.machine-record-workbench #content .md-tab-panel table td,body.machine-record-workbench #content .md-tab-panel table th{padding:6px 8px!important;font-size:11px!important;line-height:1.35!important}
body.machine-record-workbench #content .md-tab-panel .profile-actions{margin:5px 0!important;gap:5px!important}
body.machine-record-workbench #content .md-tab-panel h3{font-size:14px!important;margin:9px 0 6px!important}
body.machine-record-workbench #content .md-tab-panel .v4-filter-row{display:flex!important;align-items:center!important;flex-wrap:wrap;gap:7px!important;margin:6px 0!important}
body.machine-record-workbench #content .md-tab-panel .v4-filter-row label{display:flex!important;align-items:center!important;gap:5px!important}
@media(max-width:1050px){body.machine-record-workbench #content .md-facts,body.machine-record-workbench #content .machine-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:650px){body.machine-record-workbench #content .md-facts,body.machine-record-workbench #content .machine-detail-grid{grid-template-columns:minmax(0,1fr)!important}}

/* Reference button arrangement: main actions beneath the title; navigation at right. */
body.machine-record-workbench #content #md-detail-pane{position:relative!important}
body.machine-record-workbench #content .mrw-record-nav{position:absolute!important;top:9px!important;right:12px!important;display:flex!important;align-items:center!important;gap:7px!important;margin:0!important;padding:0!important;z-index:6}
body.machine-record-workbench #content .mrw-record-nav>span{display:none!important}
body.machine-record-workbench #content .machine-profile-top{padding-right:160px!important;min-height:95px!important;margin-bottom:6px!important}
body.machine-record-workbench #content .md-profile-header{border-bottom:0!important;min-height:90px!important;align-items:flex-start!important;margin:0!important;padding:0!important}
body.machine-record-workbench #content .md-profile-header .profile-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:7px!important;margin-top:7px!important;overflow-x:auto!important;max-width:100%!important}
body.machine-record-workbench #content .md-profile-header .profile-actions>button{white-space:nowrap!important;flex:0 0 auto!important}
body.machine-record-workbench #content .mrw-more-actions{top:48px!important;right:0!important}
body.machine-record-workbench #content .md-machine-photo{height:95px!important;width:90px!important;max-width:90px!important}
@media(max-width:750px){body.machine-record-workbench #content .machine-profile-top{padding-right:0!important;padding-top:78px!important}body.machine-record-workbench #content .mrw-more-actions{top:38px!important}}
/* Keep secondary controls in normal flow inside the More actions panel. */
body.machine-record-workbench #content .mrw-more-actions[open]{width:340px;max-width:75vw;z-index:30}
body.machine-record-workbench #content .mrw-more-actions[open]>summary{width:max-content;margin-left:auto}
body.machine-record-workbench #content .mrw-more-actions[open]>.machine-utility-panel{position:relative!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important;margin:4px 0 0!important}
body.machine-record-workbench #content .mrw-more-actions .machine-secondary-actions,body.machine-record-workbench #content .mrw-more-actions .machine-source-actions{position:static!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px!important;width:100%!important;height:auto!important;margin:0!important;padding:0!important;float:none!important;transform:none!important}
body.machine-record-workbench #content .mrw-more-actions .btn{position:static!important;display:block!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important;margin:0!important;float:none!important;transform:none!important;white-space:normal!important;text-align:left!important}
body.machine-record-workbench #content .mrw-more-actions .asset-barcode-inline{position:static!important;display:flex!important;flex-wrap:wrap!important;gap:7px!important;width:100%!important;justify-content:flex-start!important}

/* Edit Machine: no redundant Entry Details navigation or divider. */
body.machine-record-workbench #md-inline-form .entry-section-breadcrumbs,body.machine-record-workbench #md-inline-form [data-entry-heading]{display:none!important}
body.machine-record-workbench #md-inline-form>.form-grid{border-top:0!important;padding-top:0!important;margin-top:0!important}

/* Photo uploader lives behind a small header icon; file input stays attached to the save form. */
body.machine-record-workbench .md-editor-heading .mrw-photo-menu{position:relative;margin-left:auto;flex:0 0 auto}
body.machine-record-workbench .mrw-photo-menu>summary{display:flex;align-items:center;justify-content:center;list-style:none;width:34px;height:34px;border:1px solid #c5d4e2;border-radius:5px;background:#f6f9fc;cursor:pointer;font-size:19px}
body.machine-record-workbench .mrw-photo-menu>summary::-webkit-details-marker{display:none}
body.machine-record-workbench .mrw-photo-menu>.machine-editor-photo{position:absolute;right:0;top:40px;z-index:30;width:min(290px,75vw);margin:0!important;padding:12px!important;display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid #c5d4e2;box-shadow:0 7px 20px #18354c22;border-radius:6px}
body.machine-record-workbench .mrw-photo-menu:not([open])>.machine-editor-photo{display:none!important}
body.machine-record-workbench .mrw-photo-menu .machine-editor-photo p{font-size:12px;margin:7px 0}
body.machine-record-workbench .mrw-photo-menu .machine-editor-photo img{width:100%;max-height:160px;object-fit:contain}
body.machine-record-workbench .mrw-photo-menu [data-machine-photo-status]{display:block;margin-top:7px;overflow-wrap:anywhere;font-size:11px}

.possession-certificate-field{padding:10px;border:1px solid #c9d7e4;border-radius:5px;display:grid;gap:5px}.possession-certificate-field[hidden]{display:none!important}.possession-certificate-field small{font-size:12px;color:#536b82}.registration-fleet-filter{display:inline-flex;align-items:center;gap:6px;font-size:12px}.registration-fleet-filter select{max-width:300px;font:inherit;padding:6px;border:1px solid #c9d7e4;border-radius:4px}

/* Registration and equipment description share one compact list line. */
body.machine-record-workbench .md-list-pane .md-record-copy>b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.machine-record-workbench .md-list-pane .md-record-copy>small[hidden]{display:none!important}

/* Edit Machine: three independent columns; labels/search/selects flow vertically. */
body.machine-record-workbench #content #md-inline-form>.form-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:auto!important;align-items:start!important;gap:12px 16px!important;width:100%!important;overflow:visible!important}
body.machine-record-workbench #content #md-inline-form>.form-grid>.classification-toolbar{display:contents!important}
body.machine-record-workbench #content #md-inline-form>.form-grid>label,
body.machine-record-workbench #content #md-inline-form .classification-toolbar>label{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:5px!important;min-width:0!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;position:static!important;overflow:visible!important;grid-row:auto!important}
body.machine-record-workbench #content #md-inline-form .classification-toolbar>label{grid-column:auto!important}
body.machine-record-workbench #content #md-inline-form .form-field.full:not(.classification-toolbar){grid-column:1/-1!important}
body.machine-record-workbench #content #md-inline-form input:not([type=checkbox]):not([type=file]):not([type=hidden]):not(.workspace-native-date),
body.machine-record-workbench #content #md-inline-form select{display:block!important;position:static!important;transform:none!important;float:none!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;height:36px!important;min-height:36px!important;max-height:none!important;padding:6px 9px!important;line-height:normal!important;margin:0!important;flex:0 0 auto!important}
body.machine-record-workbench #content #md-inline-form textarea{width:100%!important;min-height:60px;box-sizing:border-box}
body.machine-record-workbench #content #md-inline-form label>span{position:static!important;transform:none!important;margin:0!important;white-space:normal!important}
body.machine-record-workbench #content #md-inline-form .classification-toolbar>label>strong{display:flex;align-items:center;min-height:36px;padding:6px 9px;box-sizing:border-box;font-weight:400;border:1px solid #d1dce7;border-radius:4px;background:#f5f8fb}
body.machine-record-workbench #content #md-inline-form [hidden]{display:none!important}
body.machine-record-workbench #content #md-inline-form .dropdown-record-search+select{margin-top:0!important}
@media(max-width:1000px){body.machine-record-workbench #content #md-inline-form>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:650px){body.machine-record-workbench #content #md-inline-form>.form-grid{grid-template-columns:minmax(0,1fr)!important}}

.machine-identity-help,.machine-identity-warning{display:block;font-size:11px;line-height:1.4;white-space:normal}.machine-identity-help{color:#536b82}.machine-identity-warning{color:#99530b}.machine-identity-warning:empty{display:none}

/* Shared new/edit machine picture control. */
.machine-photo-toolbar{display:flex;justify-content:flex-end;align-items:center;margin:0 0 10px;gap:8px}
.machine-photo-toolbar .mrw-photo-menu,body.machine-record-workbench .md-editor-heading .mrw-photo-menu{position:relative;flex:0 0 auto;margin-left:auto}
.machine-photo-toolbar .mrw-photo-menu>summary,body.machine-record-workbench .mrw-photo-menu>summary{display:flex!important;align-items:center;justify-content:center;gap:8px;width:auto!important;height:auto!important;min-height:40px;padding:8px 13px;list-style:none;border:1px solid #b7cee3;border-radius:7px;background:#edf5fd;color:#235a8b;cursor:pointer;font:500 13px "Segoe UI",Arial,sans-serif;white-space:nowrap}
.machine-photo-toolbar .mrw-photo-menu>summary::-webkit-details-marker{display:none}
.mrw-photo-menu>summary svg{display:block;flex:0 0 20px}
.machine-photo-toolbar .mrw-photo-menu>.machine-editor-photo{position:absolute;right:0;top:46px;z-index:40;width:min(300px,80vw);margin:0!important;padding:13px!important;display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid #c5d4e2;box-shadow:0 7px 20px #18354c22;border-radius:6px;color:#18354c}
.machine-photo-toolbar .mrw-photo-menu:not([open])>.machine-editor-photo{display:none!important}
.machine-photo-toolbar .mrw-photo-menu .machine-editor-photo p{font-size:12px;margin:7px 0}
.machine-photo-toolbar .mrw-photo-menu .machine-editor-photo img{width:100%;max-height:160px;object-fit:contain}
.machine-photo-toolbar .mrw-photo-menu [data-machine-photo-status]{display:block;font-size:11px;overflow-wrap:anywhere;margin-top:7px}
body.machine-record-workbench .mrw-photo-menu>.machine-editor-photo{top:46px}

.machine-identity-confirm{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:6px!important;margin-top:6px!important;font-size:11px!important;font-weight:400!important;white-space:normal}
.machine-identity-confirm input{flex:0 0 auto!important;width:15px!important;height:15px!important;min-height:0!important;margin:2px 0 0!important}
.machine-identity-review-banner{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 12px;margin-bottom:10px;background:#fff6e7;border:1px solid #e3c18d;color:#76501b;border-radius:5px;font-size:12px}
.machine-identity-review-banner strong{font-weight:600}.machine-identity-review-banner button{margin-left:auto}

/* Keep the machine editor inside the available screen; only fields scroll. */
body.machine-record-workbench #content .md-inline-editor{display:flex!important;flex-direction:column!important;height:calc(100dvh - 190px)!important;max-height:calc(100dvh - 190px)!important;min-height:240px;overflow:hidden!important;box-sizing:border-box;padding-bottom:8px}
body.machine-record-workbench #content .md-inline-editor>.md-editor-heading{flex:0 0 auto;position:relative;background:#fff;margin-bottom:10px}
body.machine-record-workbench #content #md-inline-form{display:flex!important;flex-direction:column!important;flex:1 1 auto;min-height:0!important;overflow:hidden!important;margin:0!important}
body.machine-record-workbench #content #md-inline-form>.form-grid{flex:1 1 auto;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;align-content:start!important;padding:0 10px 24px 0!important;scroll-padding-block:16px 32px;scrollbar-gutter:stable}
body.machine-record-workbench #content #md-inline-form>.profile-actions{position:static!important;flex:0 0 auto;display:flex!important;justify-content:flex-end;background:#fff;border-top:1px solid #dce5ec;margin:0!important;padding:10px 0 2px!important;z-index:1}
body.machine-record-workbench #content #md-inline-error:empty{display:none}
body.machine-record-workbench #content #md-inline-error:not(:empty){flex:0 0 auto;max-height:70px;overflow:auto;margin:6px 0}
@media(max-height:500px){body.machine-record-workbench #content .md-inline-editor{height:calc(100dvh - 100px)!important;max-height:calc(100dvh - 100px)!important;min-height:180px}}
