/* Dense, aligned chrome. Home has a single page scroll; the paper window fits its slip. */
body.home-details-mode,body.paper-window-mode{height:auto;min-height:100vh;overflow:auto!important}
body.home-details-mode>main{height:auto!important;min-height:100vh;overflow:visible!important}
body.home-details-mode #content{height:auto!important;min-height:0!important;overflow:visible!important;padding:8px!important}
body.home-details-mode .home-split{height:auto!important;min-height:0!important;margin:0!important;gap:6px!important;display:block!important}
body.home-details-mode .home-split-body{display:grid!important;grid-template-columns:minmax(250px,var(--list-width,24%)) 6px minmax(0,1fr)!important;align-items:start;overflow:visible!important;height:auto!important}
body.home-details-mode .home-split-body>.hm-list{display:flex!important;flex-direction:column;position:sticky;top:6px;max-height:calc(100dvh - 12px);overflow:auto!important}
body.home-details-mode.home-list-in-paper .home-split-body{display:block!important}
body.home-details-mode.home-list-in-paper .home-split-body>.hm-list,body.home-details-mode.home-list-in-paper .home-divider{display:none!important}
body.home-details-mode .home-divider{display:block;min-height:calc(100dvh - 150px)}
body.home-details-mode #home-detail{width:100%!important;height:auto!important;overflow:visible!important;margin:0!important;padding:0!important;display:block!important}
body.home-details-mode .hm-heading,body.paper-window-mode .hm-heading{min-height:34px!important;height:auto!important;margin:0 0 5px!important;padding:0!important;justify-content:flex-start!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important;position:static!important}
body.home-details-mode .hm-heading h1{font-size:18px!important;margin:0 8px 0 0!important;order:-1}
.layout-instructions{font-size:12px;color:#597567;margin-left:auto}
.home-details-canvas{position:relative!important;width:100%!important;margin:8px 0 0!important;overflow:visible!important}
body.home-details-mode .home-details-canvas>section{overflow:visible!important;resize:none!important;min-width:0!important;padding:6px!important;font-size:var(--home-font,12px)!important;border:1px solid #c4d2c9}
.hm-resize-grip{position:absolute;right:1px;bottom:1px;width:18px;height:18px;cursor:nwse-resize;touch-action:none;background:repeating-linear-gradient(135deg,transparent 0 3px,#80a18c 3px 4px,transparent 4px 6px);clip-path:polygon(100% 0,100% 100%,0 100%)}
body.home-details-mode .hm-spec .warehouse-field{grid-column:1/-1!important}
body.home-details-mode .home-details-canvas>section>h2{font-size:13px!important;line-height:20px!important;margin:0 0 4px!important;padding:0 0 3px!important;display:flex;align-items:center;gap:5px;touch-action:none;cursor:grab!important;user-select:none}
body.home-details-mode .home-details-canvas .hm-fields{display:grid!important;gap:0 6px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.home-details-mode .home-details-canvas .hm-field{display:grid;grid-template-columns:68px minmax(0,1fr)!important;align-items:center;gap:4px!important;padding:1px 0!important;min-height:26px!important;line-height:18px!important}
body.home-details-mode .home-details-canvas .hm-field>span{font-size:11px;line-height:14px;color:#4d695b;overflow-wrap:anywhere}
body.home-details-mode .home-details-canvas .hm-field-wide{grid-column:1/-1}
body.home-details-mode .home-details-canvas .hm-value{font-size:12px;line-height:18px!important;min-width:0;margin:0!important}
body.home-details-mode .home-details-canvas input,body.home-details-mode .home-details-canvas select{height:24px;min-height:24px!important;padding:2px 5px!important;font-size:var(--home-font,12px)!important;line-height:18px!important;min-width:0;width:100%;box-sizing:border-box}
body.home-details-mode .hm-photo{height:85px!important;min-height:0!important;margin:0 0 3px!important}.home-details-mode .hm-photo img{height:100%!important;max-height:85px!important}
body.home-details-mode .hm-bom,body.home-details-mode .hm-copy{overflow:visible!important;max-height:none!important}
body.home-details-mode .customer-shortcuts{flex-wrap:wrap!important;gap:5px!important;font-size:12px!important;margin:5px 0!important}
.home-details-canvas>.hm-spec{container-type:inline-size}
@container(max-width:210px){body.home-details-mode .hm-spec .hm-fields{grid-template-columns:1fr!important}}
.layout-save-status{font-size:11px;color:#25654c;white-space:nowrap}
body.home-details-mode .topbar{height:auto!important;min-height:44px!important;padding:5px 8px!important;margin:0!important;align-items:center!important}
body.home-details-mode .topbar~#message[hidden]{display:none!important}
body.home-details-mode .paper-command-bar{margin:0!important}
.paper-command-bar button,.paper-command-bar .btn,.paper-command-bar summary,.hm-heading button,.hm-heading .btn,.hm-heading>.paper-more>summary{height:32px!important;min-height:32px!important;box-sizing:border-box!important;line-height:18px!important;padding:6px 9px!important;margin:0!important;border-width:1px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-shadow:none!important;font-size:12px!important}
.paper-command-bar{align-items:center!important;gap:5px!important;min-height:40px!important;flex-wrap:wrap!important;padding:4px!important}
.paper-command-bar #document-save-status{font-size:12px;line-height:18px;white-space:nowrap;align-self:center}
.hm-heading .paper-more{margin:0!important}.paper-command-bar .paper-more>summary{list-style:none}.paper-more>summary::before{content:'▸';margin-right:5px}.paper-more[open]>summary::before{content:'▾'}
body.paper-window-mode{height:100dvh!important;overflow:hidden!important}
body.paper-window-mode>main{height:100dvh!important;overflow:hidden!important;padding:0!important;display:flex!important;flex-direction:column!important}
body.paper-window-mode .topbar{display:none!important}
body.paper-window-mode #content{height:100%!important;min-height:0!important;padding:6px!important;overflow:hidden!important}
body.paper-window-mode .home-split{height:100%!important;min-height:0!important;gap:0!important;display:flex!important}
body.paper-window-mode .language-picker{margin:0!important;gap:3px!important}.paper-window-mode .language-picker button{height:27px!important;min-height:27px!important;padding:3px 6px!important;font-size:11px!important}
body.paper-window-mode .home-split-body{display:grid!important;grid-template-columns:minmax(210px,var(--list-width,26%)) 8px minmax(0,1fr)!important;flex:1!important;min-height:0!important;overflow:hidden!important}
body.paper-window-mode .home-split-body>.hm-list{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important;width:auto!important}
body.paper-window-mode #home-detail{display:flex!important;flex-direction:column!important;min-height:0!important;min-width:0!important;padding:0!important;overflow:hidden!important}
body.paper-window-mode .paper-command-bar{flex:none!important}
body.paper-window-mode .paper-fixed-stage{flex:1!important}
.paper-window-rows{flex:1;min-height:0;overflow:auto;border-top:1px solid #cddbd2}
.paper-window-row{display:flex;align-items:center;border-bottom:1px solid #d7e0d9;gap:3px;padding:0 3px}
.paper-window-row .km-check-hit{min-width:26px;min-height:30px;padding:3px}
.paper-window-row>button{flex:1;min-width:0;width:100%;padding:6px!important;border:0;background:transparent;text-align:left;line-height:1.3;border-radius:3px}
.paper-window-row>button.selected{background:#d9ebe0;box-shadow:inset 3px 0 #25654c}.paper-window-row>button:focus-visible{outline:2px solid #4d9775;outline-offset:-2px}
.paper-window-row strong{display:block;font-size:12px;overflow-wrap:anywhere}.paper-window-row span{display:flex;gap:6px;align-items:center;margin:3px 0;font-size:12px}.paper-window-row small{display:block;font-size:11px;color:#5a7165}.paper-window-row .tag{padding:2px 4px;font-size:10px}
@media(max-width:900px){.layout-instructions{display:none}body.paper-window-mode .home-split-body{grid-template-columns:minmax(180px,var(--list-width,26%)) 6px minmax(0,1fr)!important}.paper-command-bar .paper-order-id{flex-basis:100%}}

/* Legacy-density default: identity, specifications, customer, dates; same editors. */
body.home-details-mode .home-details-canvas{margin-top:6px!important}
body.home-details-mode .home-details-canvas:not([data-layout-ready]){visibility:hidden}
body.home-details-mode .hm-product .hm-field{grid-template-columns:52px minmax(0,1fr)!important;min-height:24px!important}
body.home-details-mode .hm-product .hm-value{font-size:11px!important;overflow-wrap:anywhere}
body.home-details-mode .hm-spec .hm-field{grid-template-columns:52px minmax(0,1fr)!important}
body.home-details-mode .hm-customer .hm-field>.hm-value:not(input){font-size:11px;white-space:nowrap!important}
body.home-details-mode #home-detail .home-details-canvas>section.hm-resizable{min-width:0!important}
body.home-details-mode #home-detail .hm-product .hm-value{white-space:normal!important;word-break:break-all}
body.home-details-mode [hidden]{display:none!important}
body.home-details-mode .hm-dates .hm-field{grid-template-columns:76px minmax(0,1fr)!important}
body.home-details-mode .hm-date-fields .hm-field:has(input[type=date]){grid-column:1/-1}
body.home-details-mode .hm-fees{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 6px!important;margin-top:4px!important}
body.home-details-mode .hm-customer .hm-field{grid-template-columns:65px minmax(0,1fr)!important}
body.home-details-mode .home-details-canvas[data-density=medium] .hm-customer .hm-fields{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body.home-details-mode .home-details-canvas[data-density=narrow] .hm-spec .hm-fields{grid-template-columns:1fr!important}
body.home-details-mode .home-details-canvas[data-density=medium] .hm-customer .hm-field-wide{grid-column:span 2}
body.home-details-mode .home-details-canvas .warehouse-field{min-height:28px!important}
body.home-details-mode .warehouse-field>div{display:flex;gap:4px;align-items:center;flex-wrap:wrap;font-size:11px}
body.home-details-mode .warehouse-toggle{padding:2px 4px!important;min-height:28px!important;gap:3px!important;margin:0!important}
body.home-details-mode .warehouse-field .km-check-hit{min-width:24px;min-height:24px;padding:2px}
body.home-details-mode .home-details-canvas input[type=checkbox]{width:16px!important;height:16px!important;min-width:16px;min-height:16px!important}
body.home-details-mode .hm-id{margin:0!important}
body.home-details-mode .home-details-canvas>section[data-layout-key=requests],
body.home-details-mode .home-details-canvas>section[data-layout-key=memo]{min-height:0!important}
body.home-details-mode .home-details-canvas textarea{height:60px!important;min-height:60px!important;width:100%;padding:4px 6px!important;font-size:12px;line-height:18px;box-sizing:border-box;resize:vertical}
body.home-details-mode .home-details-canvas>section>h2 .mini-btn{margin-left:auto;padding:2px 5px!important;min-height:24px!important;height:24px!important;font-size:11px}
body.home-details-mode .home-details-canvas .hm-actions{padding:2px 0!important;margin:0!important}
body.home-details-mode .home-details-canvas .hm-actions .mini-btn{padding:3px 6px!important;min-height:24px!important;font-size:11px}
body.home-details-mode .paper-command-bar{min-height:34px!important}
body.home-details-mode .paper-order-id{font-size:12px}
body.home-details-mode .paper-command-bar>.tag{font-size:11px;padding:3px 5px}
body.home-details-mode .paper-command-bar>.paper-more{margin-left:auto!important}
body.home-details-mode .home-filter-bar{margin:3px 0!important;gap:4px!important}
body.home-details-mode .home-filter-bar input,body.home-details-mode .home-filter-bar select{height:28px!important;min-height:28px!important;padding:3px 6px!important;font-size:12px}
body.home-details-mode .home-filter-bar .mini-btn{height:28px!important;min-height:28px!important;padding:3px 6px!important}
body.home-details-mode .topbar{min-height:36px!important;padding:4px 8px!important}
body.home-details-mode .topbar button,body.home-details-mode .topbar summary{height:28px!important;min-height:28px!important;padding:4px 8px!important;box-sizing:border-box;line-height:18px!important;font-size:12px!important;box-shadow:none!important}
body.home-details-mode .hm-list .km-select-all{margin:0!important;padding:3px!important;min-height:30px!important;font-size:12px}
body.home-details-mode .hm-list .km-check-hit{min-height:28px;min-width:28px;padding:4px}
body.home-details-mode .hm-list .home-selection-actions{padding:4px!important}
body.home-details-mode .hm-list .mini-btn{font-size:11px!important;min-height:26px!important;padding:3px 6px!important}
body.home-details-mode .hm-list .home-compact-table td{padding:4px!important}
body.home-details-mode .hm-list .order-group-heading{padding:5px!important;min-height:0!important}
body.home-details-mode .hm-list .group-line-one{font-size:12px!important;gap:4px!important}
body.home-details-mode .hm-list .group-line-two{font-size:10px!important;gap:3px!important}
body.home-details-mode .hm-list .home-card{gap:4px!important}
body.home-details-mode .hm-list .home-card img{width:30px!important;height:30px!important}
body.home-details-mode .hm-list .home-line{font-size:12px!important;gap:4px!important}
body.home-details-mode .hm-list .home-line small{font-size:10px!important;line-height:13px!important}
body.home-details-mode .hm-list .warehouse-toggle{font-size:11px!important}

/* A weight stays on the same row as its part. Type, unit input and scope are horizontal. */
body.home-details-mode #home-bom-form{font-size:12px}
body.home-details-mode #home-bom-form>strong{display:inline-block;margin:3px 6px 3px 0!important;font-size:12px}
body.home-details-mode #home-bom-form table{width:100%!important;min-width:0!important;table-layout:fixed;border-collapse:collapse}
body.home-details-mode #home-bom-form table:has(tbody:empty){display:none}
body.home-details-mode #home-bom-form th,body.home-details-mode #home-bom-form td{padding:3px!important;line-height:16px;vertical-align:middle;border-bottom:1px solid #d6e0d9}
body.home-details-mode #home-bom-form th{font-size:11px;font-weight:600;text-align:left;white-space:normal!important}
body.home-details-mode #home-bom-form input,body.home-details-mode #home-bom-form select{height:26px!important;min-height:26px!important;margin:0!important}
body.home-details-mode #home-bom-form .component-check{width:36px}
body.home-details-mode #home-bom-form .component-check label{display:flex;align-items:center;justify-content:center;font-size:0}
body.home-details-mode #home-bom-form .component-check .km-check-hit{min-width:24px;min-height:24px;padding:2px}
body.home-details-mode #home-bom-form .component-weight{width:38%}
body.home-details-mode #home-bom-form .component-weight{white-space:nowrap}
body.home-details-mode #home-bom-form .component-weight>select{display:inline-block;width:28%!important;vertical-align:middle;font-size:11px!important}
body.home-details-mode #home-bom-form .component-weight>label{display:inline-flex;align-items:center;gap:3px;width:39%;margin:0 1%!important;vertical-align:middle;font-size:10px;line-height:12px;white-space:normal}
body.home-details-mode #home-bom-form .component-weight label input{width:calc(100% - 26px)!important;min-width:36px;flex:1}
body.home-details-mode #home-bom-form .component-weight label>span{font-size:0;flex:none}
body.home-details-mode #home-bom-form .component-weight label>span::after{content:'g';font-size:11px}
body.home-details-mode #home-bom-form .component-weight:has([data-k=carat]) label>span::after{content:'ct'}
body.home-details-mode #home-bom-form .component-weight>small{display:none}
body.home-details-mode #home-bom-form .component-weight>select:last-child{width:29%!important}
body.home-details-mode #home-bom-form tr>td:last-child,body.home-details-mode #home-bom-form tr>th:last-child{width:28px}
body.home-details-mode #home-bom-form .remove-row{height:24px!important;min-height:24px!important;padding:0 6px!important;font-size:12px}
body.home-details-mode #home-bom-form>button{padding:2px 6px!important;min-height:24px!important;height:24px!important;font-size:11px;margin:3px 0 5px!important}
body.home-details-mode #home-bom-form .component-check .km-check-hit{font-size:12px}
body.home-details-mode #home-bom-form .component-check{font-size:0}
#home-expanded-text{width:100%;min-height:300px;font-size:15px;line-height:1.5}
.intake-batch{padding:8px!important;margin:6px 0!important;border-radius:3px!important}
.intake-batch>h2{font-size:15px!important;display:inline-block;margin:0 10px 4px 0!important}
.intake-batch>p{display:inline-block;font-size:12px;margin:0 6px 4px 0!important}
.intake-batch>small{display:block;font-size:11px;margin:0 0 5px}
.intake-table-wrap{overflow:auto}
.intake-review-table{width:100%;min-width:760px;border-collapse:collapse;table-layout:fixed;font-size:12px}
.intake-review-table th,.intake-review-table td{padding:5px 6px!important;line-height:18px;border-bottom:1px solid #d5e0d8;vertical-align:middle;text-align:left;overflow-wrap:anywhere}
.intake-review-table th{background:#e8efe9;font-size:11px}
.intake-review-table th:first-child,.intake-review-table td:first-child{width:32px}
.intake-review-table th:nth-child(2){width:23%}.intake-review-table th:nth-child(3){width:12%}
.intake-review-table th:nth-child(6){width:40px}.intake-review-table th:nth-child(8){width:120px}
.intake-review-table small{display:block}
.intake-review-table .km-check-hit{min-width:26px;min-height:26px;padding:2px}
.intake-review-table input[type=checkbox]{height:18px!important;width:18px!important;min-height:18px;min-width:18px}
.intake-review-table details>summary{font-size:11px;cursor:pointer}
.intake-review-table .intake-source-text{white-space:pre-wrap;font-size:12px;margin:4px 0}
#commit-form>.km-select-all{padding:2px 5px;margin:4px 0;min-height:30px;font-size:12px}
#commit-form>.km-select-all .km-check-hit{min-width:28px;min-height:28px;padding:3px}
@media(max-width:760px){body.home-details-mode .home-split-body{display:block!important}body.home-details-mode .home-split-body>.hm-list{position:static;max-height:240px;margin-bottom:6px!important}body.home-details-mode .home-divider{display:none}body.home-details-mode .home-details-canvas .hm-fields{grid-template-columns:1fr!important}}
