/* Company workspace: fixed menus, contextual actions, document-first layout. */
.rail{display:none!important}body main,.orders-view main{margin-left:0!important;padding:0 12px 10px!important}.topbar,.orders-view .topbar,.aux .topbar{height:38px!important;min-height:38px!important;display:flex!important;gap:12px;padding:0!important;justify-content:flex-start!important;border-bottom:1px solid #cbd5ca!important}.topbar>div:first-child{display:block!important}.topbar [hidden]{display:none!important}.app-menu{display:flex;gap:2px;flex:none;z-index:60}.app-menu details{position:relative}.app-menu summary{list-style:none;cursor:pointer;padding:7px 10px;font-size:13px;border-radius:4px}.app-menu details[open] summary{background:#dce9dd}.app-menu details>div{position:absolute;top:100%;left:0;display:grid;width:235px;padding:6px;background:#fff;border:1px solid #b7c9b6;box-shadow:0 5px 18px #0002}.app-menu button{text-align:left;border:0;background:#fff;padding:10px;font-size:13px;cursor:pointer}.app-menu button:hover{background:#e9f2e5}.app-menu button:active,.mini-btn:active,.btn:active{transform:translateY(1px);box-shadow:none}#top-progress{flex:1;min-width:0}#top-progress .pipeline{height:29px!important;margin:0;padding:0 7px}#top-progress .step{font-size:10px}#signed-user{font-size:12px;white-space:nowrap}.workspace .piece-card{display:grid!important;grid-template-columns:58px minmax(0,1fr)!important;gap:5px 9px!important;padding:8px!important}.card-status,.card-date{grid-column:1/-1}.card-status{display:flex;gap:4px;flex-wrap:wrap}.card-date{white-space:nowrap;font-size:11px;color:#586b59;border-top:1px solid #e5eae3;padding-top:5px}.piece-card small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.hold-tag{background:#ffe2c3;color:#884300}.changed-tag{background:#ffe4e0;color:#a5251b}.piece-card .thumb{width:58px!important;height:58px!important}.piece-card .order-number{font-size:14px}.module-panel{background:#fff;border:1px solid #d5dfcf;margin:12px 0;padding:18px}.module-panel h2{font-size:21px;margin-bottom:14px}.module-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}.filter-grid{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px}.filter-grid input,.filter-grid select{width:100%;min-height:36px}.filter-grid .field{margin:0}.search-results{overflow:auto;max-height:65vh}.search-results tr:hover{background:#eef4e9}.search-results button{white-space:nowrap}.todo-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:14px}.todo-section{border:1px solid #d5dfcf;background:#fff;padding:14px}.todo-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;border-bottom:1px solid #e3e9e0;background:white;padding:12px 0;cursor:pointer}.todo-item img{width:55px;height:48px;object-fit:contain}.todo-item small{display:block;margin-top:3px}.attention{background:#fff4df;border-left:3px solid #c79030;padding:9px;font-size:13px;margin-bottom:9px;white-space:pre-wrap}.change-table td{white-space:pre-wrap;overflow-wrap:anywhere;max-width:260px}.change-table th{position:sticky;top:0}.auth-panel{max-width:440px;margin:8vh auto;background:#fff;padding:30px;border:1px solid #c6d4c0;border-radius:8px}.auth-panel input{width:100%}.auth-panel p{line-height:1.6;margin-bottom:15px}.recipe-rule{border:1px solid #c6d4c0;margin:15px 0;padding:14px}.recipe-grid{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:10px}.recipe-rule table input,.recipe-rule table select{width:100%;min-width:60px;padding:6px}.recipe-rule table{table-layout:fixed}.recipe-rule th,.recipe-rule td{padding:4px}.recipe-rule .field{margin:0}dialog:has(#recipe-form){width:min(1150px,96vw);max-width:96vw}.recipe-toolbar{display:flex;justify-content:space-between;align-items:center}.audit-event{border:1px solid #d7dece;margin:12px 0;padding:12px}.audit-event summary{cursor:pointer}.module-panel .field input{font-size:14px}.status-help{font-size:12px;color:#6b7865}.today-metric{font-size:24px;color:#245b44}.order-group-label{background:#e8efe4;font-weight:bold}.module-panel .catalog-grid{max-height:70vh;overflow:auto}.auth-panel .btn{width:100%}#top-progress .step small{max-width:100px}#top-progress .pipeline{gap:4px}#top-progress .step{gap:3px}#top-progress .step span{width:16px;height:16px}.app-menu summary::-webkit-details-marker{display:none}
@media(min-width:1000px) and (min-height:640px){.orders-view .workspace{height:calc(100dvh - 46px)!important;grid-template-columns:228px minmax(0,1fr)}.orders-view .ticket-work{grid-template-rows:32px minmax(0,1fr)!important}.orders-view .ticket-work>.paper{grid-row:2!important}.orders-view .welcome{grid-row:1/3!important}.orders-view.list-collapsed .workspace{grid-template-columns:minmax(0,1fr)}.orders-view .slip-desk{height:100%}.orders-view .order-pane{padding-top:6px}.orders-view .desk-toolbar{gap:8px}.orders-view .order-pane .pane-heading{margin:0 0 6px}.orders-view .piece-list{overflow:auto}}
@media(max-width:1100px){#top-progress .step:not(.current) b{display:none}#top-progress .step small{display:none}.filter-grid,.recipe-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}.todo-grid{grid-template-columns:1fr 1fr}.app-menu summary{padding:6px}#signed-user{max-width:100px;overflow:hidden}}
@media(max-width:700px){.topbar{flex-wrap:wrap;height:auto!important}#top-progress{flex-basis:100%}.todo-grid{grid-template-columns:1fr}.filter-grid{grid-template-columns:1fr 1fr}.recipe-rule{overflow:auto}}

.logged-out .app-menu{visibility:hidden}.attention p{margin:7px 0;font-size:13px;line-height:1.5}

.app-menu>.home-shortcut{background:#e4eee2;border:1px solid #b7cbb2;border-bottom-width:2px;border-radius:5px;padding:5px 9px;white-space:nowrap;line-height:1.2;align-self:center;font-weight:600}.app-menu>.home-shortcut:hover{background:#d3e5ce}

.language-picker{display:flex;gap:2px;flex:none;white-space:nowrap}.language-picker button{font:inherit;font-size:11px;padding:4px 6px;border:1px solid transparent;border-radius:4px;background:transparent;cursor:pointer}.language-picker button[aria-pressed="true"]{background:#245b44;color:#fff;border-color:#174735}.language-picker button:hover{border-color:#73947c}.language-picker button:focus-visible{outline:2px solid #245b44;outline-offset:1px}:lang(vi) .app-menu summary,:lang(en) .app-menu summary{padding-left:6px;padding-right:6px}.logged-out .language-picker{margin-left:auto}

#top-progress .pipeline>.step{min-width:0;flex-shrink:1}#top-progress .pipeline>.step>b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#top-progress .pipeline>.step.current{flex-shrink:1;min-width:100px}#top-progress .step summary{min-width:0;overflow:hidden}#top-progress .step summary b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:lang(vi){font-family:Arial,sans-serif}.file-control{display:flex;align-items:center;gap:8px}.file-control input[type=file]{position:absolute;width:1px!important;height:1px!important;opacity:0;padding:0!important}.file-control .file-name{overflow-wrap:anywhere;font-size:12px}

/* Let the actual toolbar height, including wrapping/zoom, determine list space. */
body.orders-view main{height:100dvh;display:flex;flex-direction:column;box-sizing:border-box;min-height:0}
body.orders-view .topbar{flex:0 0 auto}
body.orders-view #content{flex:1 1 0;min-height:0;overflow:hidden}
body.orders-view .workspace{height:100%!important;min-height:0;display:grid}
body.orders-view .order-pane{height:100%;min-height:0;overflow:hidden;box-sizing:border-box;display:flex;flex-direction:column}
body.orders-view .order-pane>*:not(.piece-list){flex-shrink:0}
body.orders-view .piece-list{display:block!important;flex:1 1 0;min-height:0;max-height:none!important;overflow-y:auto;margin-bottom:0;overscroll-behavior:contain;scrollbar-gutter:stable;padding-bottom:10px}
body.orders-view .ticket-work{min-height:0;overflow:hidden}
.customer-search{display:flex;align-items:end;gap:12px;max-width:850px}
.customer-search .field{flex:1;margin:0}.customer-search .btn{margin-bottom:0}
.customer-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;margin:16px 0}
.customer-fields>div{min-width:0}.customer-fields dt{color:#63746b;font-size:13px}.customer-fields dd{margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;font-size:17px}
.customer-fields>div:last-child{grid-column:1/-1}
.customer-sidebar{border-bottom:1px solid var(--line);padding:12px 0}.customer-sidebar summary{font-weight:bold;cursor:pointer}.customer-sidebar .customer-fields{grid-template-columns:1fr}.customer-sidebar small{display:block;margin-top:8px}
.customer-detail{background:#f6f9f5;padding:16px 20px;border:1px solid var(--line);border-radius:8px}.customer-pagination{display:flex;gap:10px;align-items:center;margin:16px 0}
.customer-table{width:100%;border-collapse:collapse}.customer-table td,.customer-table th{padding:12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}.customer-table small{display:block}.customer-link{border:0;background:none;color:#1b5746;text-decoration:underline;cursor:pointer;font:inherit;font-weight:bold;padding:0;text-align:left}.customer-table td{overflow-wrap:anywhere;max-width:280px}
@media(max-width:700px){.customer-fields{grid-template-columns:1fr}.customer-search{align-items:stretch;flex-direction:column}}

.orders-view .slip-desk .work-notes{display:block;overflow:auto;height:100%;min-height:0}.orders-view .work-notes>section{overflow:visible}.orders-view .work-notes .internal-section{display:block;overflow:visible}.orders-view .work-notes .internal-section textarea{min-height:220px}.orders-view .work-notes .customer-sidebar{max-height:none;overflow:visible}

@media(max-width:999px),(max-height:639px){body.orders-view .ticket-work{height:100%;overflow:auto}.orders-view .slip-desk .work-notes{height:auto;overflow:visible}}

.todo-entry{padding-bottom:10px;border-bottom:1px solid var(--line)}.todo-entry .todo-item{border-bottom:0}.todo-entry>.mini-btn{margin-left:10px}#status-correction-form{display:grid;gap:12px}#status-correction-form p{line-height:1.6}

dialog#modal{overflow:visible;padding:0;max-width:calc(100vw - 100px);max-height:none;border-radius:12px}.modal-scroll{max-height:85dvh;overflow:auto;padding:24px;border-radius:12px}.modal-outside-close{position:absolute;right:-48px;top:0;background:white!important;border:1px solid #9baea4;box-shadow:0 2px 8px #0003;z-index:3;width:42px;height:42px}.modal-scroll>header{position:sticky;top:-24px;background:white;z-index:1;padding:12px 0}
.order-table-window{height:calc(100dvh - 90px);display:flex;flex-direction:column;min-height:0}.order-table-window>.module-head,.order-table-window>.list-filters,.bulk-tools{flex-shrink:0}.order-table-window .orders-table-scroll{flex:1;min-height:120px;max-height:none;overflow:auto}.order-table-window .bulk-tools{position:sticky;top:0;background:var(--canvas);z-index:2;padding:8px 0;gap:6px}.bulk-tools .mini-btn{padding:7px 10px}.bulk-tools small{flex-basis:100%}.orders-table-scroll .date-cell{white-space:nowrap}.source-notes{margin-top:12px}.source-notes summary{cursor:pointer;font-weight:bold}

.home-desk-view #content{padding:10px 14px}.home-desk-view #top-progress{display:none}.home-desk{font-size:13px;color:#20343a}.hm-heading{display:flex;gap:10px;align-items:center;margin-bottom:8px;flex-wrap:wrap}.hm-heading h1{font-size:22px;margin:0 10px 0 0}.hm-heading>span{flex:1;color:#66746d}.hm-top{display:grid;grid-template-columns:170px 1.2fr 1.3fr 1fr;gap:10px}.hm-top section,.hm-middle>section{background:white;border:1px solid #bdcbc2;padding:10px;min-width:0}.home-desk h2{font-size:14px;margin:0 0 6px;color:#1e5949;display:flex;align-items:center;justify-content:space-between}.hm-photo{height:116px;display:grid;place-items:center;background:#f7faf7;border:1px solid #dce3dc}.hm-photo img{max-width:100%;height:110px;object-fit:contain}.hm-field{display:flex;min-width:0;align-items:stretch;border-bottom:1px solid #e5ebe5;min-height:29px}.hm-field>span{width:79px;flex-shrink:0;display:flex;align-items:center;color:#556e65;font-size:12px}.hm-value{flex:1;min-width:0;padding:5px 4px;overflow-wrap:anywhere;font-size:13px;color:#162e35}.hm-edit{border:0;border-radius:0;background:#f3f8f3;text-align:left;cursor:pointer;box-shadow:none}.hm-edit:hover{background:#dceee3}.hm-fields{display:grid;grid-template-columns:1fr 1fr;column-gap:10px}.hm-id .hm-field{display:block}.hm-id .hm-value{font-weight:700}.hm-fees{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}.hm-middle{display:grid;grid-template-columns:1.5fr 1fr 1.1fr;gap:10px;margin-top:10px}.hm-bom,.hm-copy{height:128px;overflow:auto}.hm-copy{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.home-desk table{border-collapse:collapse;width:100%;font-size:13px}.home-desk th,.home-desk td{padding:7px 8px;text-align:left;border-bottom:1px solid #d5dfd7;vertical-align:middle}.home-desk th{background:#eaf0e9;white-space:nowrap;font-weight:600}.hm-bom td{padding:5px}.home-desk textarea{width:100%;height:74px;min-height:0;padding:6px;font-size:14px;box-sizing:border-box}.hm-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:4px;align-items:center}.home-desk .mini-btn{font-size:12px;padding:6px 9px;min-height:30px}.home-desk .btn{font-size:13px;padding:6px 12px;min-height:30px}.hm-search{display:flex;gap:7px;align-items:center;margin:10px 0 6px;flex-wrap:wrap}.hm-search input,.hm-search select{padding:8px;font-size:14px;height:36px;width:auto;min-width:0}.hm-search #home-query{flex:1;min-width:180px}.hm-search #home-date{width:175px}.hm-bulk{display:flex;gap:7px;align-items:center;margin-bottom:6px;flex-wrap:wrap}.hm-table-scroll{height:clamp(250px,35vh,560px);overflow:auto;background:white;border:1px solid #bdcbc2}.hm-table-scroll table{min-width:1250px}.hm-table-scroll th{position:sticky;top:0;z-index:1}.hm-table-scroll td{height:65px}.hm-table-scroll tr{cursor:pointer}.hm-table-scroll tr:hover{background:#edf6f0}.hm-table-scroll tr.selected{background:#d6ebdf;outline:2px solid #2a705a;outline-offset:-2px}.hm-table-scroll small{display:block;font-size:12px;color:#607269;margin-top:4px}.hm-customer-name{font-size:16px;font-weight:700;min-width:100px}.hm-options{min-width:190px;max-width:270px;line-height:1.5;word-break:normal}.hm-thumb img{width:58px;height:56px;object-fit:contain}.hm-thumb .no-image{font-size:10px;width:58px}.hm-table-scroll td:nth-child(2){min-width:175px;font-size:14px}.hm-table-scroll td:nth-child(6){min-width:140px;max-width:220px}.hm-table-scroll td:nth-child(n+10){white-space:nowrap}.home-desk input[type=checkbox]{width:18px;height:18px}.home-desk .tag{font-size:12px;white-space:nowrap}@media(max-width:1100px){.hm-top{grid-template-columns:135px 1fr 1.2fr}.hm-dates{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr);gap:0 10px}.hm-dates h2{grid-column:1/-1}.hm-middle{grid-template-columns:1fr 1fr}.hm-middle>section:last-child{grid-column:1/-1}.hm-table-scroll{height:360px}}@media(max-width:650px){.hm-top{grid-template-columns:1fr}.hm-dates,.hm-middle{display:block}.hm-fields{grid-template-columns:1fr}.hm-photo{height:90px}.hm-top section,.hm-middle>section{margin-bottom:6px}}

.home-desk .hm-dates{display:grid;grid-template-columns:1fr 1fr;gap:0 8px;align-content:start}.home-desk .hm-dates h2,.home-desk .hm-dates .hm-fees{grid-column:1/-1}.home-desk .hm-dates>.hm-field{display:block}.home-desk .hm-dates>.hm-field>span{width:auto;white-space:nowrap}.home-desk .hm-dates>.hm-field>.hm-value{min-height:21px;padding:3px}.home-desk .hm-field{min-height:25px}.home-desk .hm-value{padding:3px 4px}.home-desk .hm-field>span{width:72px}.home-desk .hm-bom,.home-desk .hm-copy{height:96px}.home-desk textarea{height:48px}.home-desk .hm-actions .mini-btn,.home-desk .hm-bulk .mini-btn{flex:none;margin:0}.home-desk .hm-actions{gap:4px}.home-desk .hm-middle>section{padding:8px}.home-desk .hm-table-scroll{height:clamp(230px,36vh,560px)}

.hm-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hm-edit-grid input{width:100%;box-sizing:border-box}.home-desk .hm-edit{min-height:26px}.home-desk .hm-edit:focus-visible{outline:2px solid #24705b}@media(max-width:650px){.hm-edit-grid{grid-template-columns:1fr}}

.home-list-detached #home-detail,.home-list-detached .hm-heading,.home-list-detached [data-home-detach]{display:none}.home-list-detached .hm-table-scroll{max-height:calc(100vh - 280px)}[data-home-row].bulk-selected{background:#d6eadf}[data-home-row]{user-select:none}

.hm-top,.hm-middle{display:flex;flex-wrap:wrap;align-items:flex-start}.hm-top>section{width:calc(28% - 10px);box-sizing:border-box}.hm-top>.hm-product{width:16%}.hm-middle>section{width:calc(33.33% - 8px);box-sizing:border-box}.hm-resizable{resize:both;overflow:auto;min-width:180px;min-height:100px;max-width:4000px;max-height:2400px;font-size:var(--home-font,14px)}.hm-resizable .hm-value,.hm-resizable input,.hm-resizable select,.hm-resizable textarea,.hm-resizable td,.hm-resizable th,.hm-resizable .hm-field>span,.hm-resizable small,.hm-resizable .hm-customer-name{font-size:var(--home-font,14px)}.hm-layout-tools{display:flex;justify-content:flex-end;gap:4px;margin-bottom:4px}.hm-layout-tools button{padding:2px 6px;font-size:12px}.hm-bom{height:auto;max-height:none}.hm-bom input{min-width:65px;width:100%;box-sizing:border-box}.hm-bom select{min-width:75px;width:100%}.hm-bom table{min-width:460px}.hm-inline{border:1px solid transparent;background:#f7faf6;width:100%;padding:4px;box-sizing:border-box}.hm-inline:focus{border-color:#23745d;background:white}.hm-copy{height:auto}.hm-list{width:100%;box-sizing:border-box}.hm-resizable .hm-table-scroll{height:calc(100% - 160px);min-height:250px;max-height:none}.hm-resizable[style*="height"] .hm-bom{max-height:calc(100% - 65px);overflow:auto}#home-save-scope{background:#edf4e9;padding:8px}#home-save-scope[hidden]{display:none}.home-list-detached .hm-list{width:100%}@media(max-width:800px){.hm-top>section,.hm-top>.hm-product,.hm-middle>section{width:100%}}

.ticket-date-tools{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.ticket-date-tools label{display:flex;flex-direction:column;gap:3px;min-width:100px;flex:1}.ticket-date-tools input,.ticket-date-tools select{width:100%;box-sizing:border-box;padding:8px}.csv-group-heading{background:#e5eee6;padding:9px 10px;color:#244a3c;border-bottom:1px solid #bbcdbf}.csv-group-heading strong,.csv-group-heading small{display:block}.piece-list .csv-group-heading{position:sticky;top:0;z-index:1}.csv-group-heading td{height:auto!important;padding:7px!important}.order-pane .ticket-date-tools{font-size:12px}

.hm-top,.hm-middle{align-items:stretch}.hm-top>.hm-resizable,.hm-middle>.hm-resizable{flex-shrink:0}.hm-layout-tools{display:none!important}

.order-date-sort{border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;cursor:pointer;padding:6px;white-space:nowrap}.order-date-sort:hover{color:#205b49;text-decoration:underline}.order-date-sort:focus-visible{outline:2px solid #205b49}

#home-detail{display:flex;flex-wrap:wrap;gap:14px;align-items:stretch}
#home-detail .hm-top,#home-detail .hm-middle{display:contents}
#home-detail .hm-resizable{flex:0 0 auto;width:calc((100% - 42px)/4);max-width:100%;min-width:220px;box-sizing:border-box;overflow:auto}
#home-detail .hm-resizable.hm-options-panel,#home-detail .hm-resizable.hm-requests-panel{overflow:auto;min-height:220px}
.hm-options-panel textarea,.hm-requests-panel textarea{display:block;width:100%;max-width:100%;min-width:0;height:calc(100% - 65px);min-height:150px;box-sizing:border-box;resize:none;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
.hm-drag-handle{cursor:grab;user-select:none}.hm-drag-handle:active{cursor:grabbing}.hm-dragging{opacity:.45}.hm-drop-target{outline:3px dashed #28745d;outline-offset:-3px}
/* The resizable panel owns scrolling; its BOM must not keep a fixed inner viewport. */
#home-detail .hm-resizable .hm-bom,
#home-detail .hm-resizable[style*="height"] .hm-bom {
 height:auto;
 max-height:none;
 overflow:visible;
}
#home-detail .hm-resizable[data-layout-key="bom"] > h2 {
 position:sticky;
 top:-8px;
 z-index:2;
 background:white;
 padding:4px 0;
}

.pipeline button.step{font:inherit;text-align:left;cursor:pointer;border:0;background:transparent;color:inherit}.pipeline button.step:hover{background:#dbeadf}.stage-work-actions{display:flex;gap:12px;flex-wrap:wrap}

#master-shortcuts{display:inline-flex;gap:4px}.test-reset-button{color:#a33!important}.logged-out #master-shortcuts{display:none}.master-list{display:flex;flex-direction:column;gap:6px;max-height:55vh;overflow:auto}.master-list button{text-align:left}.master-list button[hidden]{display:none}



/* PRODUCT REGISTRATION DESK */
#master-shortcuts{gap:6px;align-items:center;padding-left:10px;margin-left:6px;border-left:1px solid #d5dfd7}
.app-menu #master-shortcuts button.mini-btn{font:inherit;font-size:13px;line-height:1.25;padding:8px 12px;border:1px solid #cdd9d0;border-radius:7px;background:#f7faf7;white-space:nowrap;min-height:34px}
.app-menu #master-shortcuts button:hover{background:#e5eee7}
.app-menu #master-shortcuts .test-reset-button{background:#fff9f6;border-color:#e5cec4;color:#a44c35!important}
.np-workspace{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;max-width:1600px;margin:0 auto;padding:24px}
.np-existing{min-width:0}.np-existing h2{font-size:18px}.np-existing>.mini-btn{margin:4px 0;width:100%}.np-order-list{margin-top:16px;max-height:75vh;overflow:auto}.np-order{display:flex;align-items:center;gap:10px;width:100%;padding:14px 6px;border:0;border-bottom:1px solid #d9e2dc;background:transparent;text-align:left}.np-order img,.np-order .no-image{width:52px;height:52px;object-fit:contain}.np-order span{min-width:0}.np-order small{display:block;overflow-wrap:anywhere;font-size:12px;margin-top:4px}.np-order b{font-size:15px}
.np-toolbar{display:flex;gap:12px;align-items:center;position:sticky;top:0;background:#f0f4ef;z-index:3;padding:12px 0}.np-toolbar>div{margin-right:auto}.np-toolbar b{font-size:18px}.np-toolbar small{display:block;margin-top:5px;color:#687b72}
.np-paper{background:white;border:1px solid #c3cec6;padding:30px;box-shadow:0 6px 22px #2944390a}.np-paper-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 25px}.np-paper-title h1{margin:0;font-size:32px;letter-spacing:.08em}.np-paper-title span{padding:6px 10px;background:#f4efe3;border-radius:4px;color:#8a6b2b;font-size:13px}
.np-identity{display:grid;grid-template-columns:minmax(0,1fr) 240px;border:1px solid #aebbb3}.np-fields{padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.np-fields>.field:first-child{grid-column:1/-1}.np-fields [name=id]{font-size:25px;font-weight:700;letter-spacing:.03em}.np-fields>.field:nth-child(2),.np-fields>.field:last-child{grid-column:1/-1}.np-form .field{display:flex;flex-direction:column;gap:7px;font-size:13px}.np-form input,.np-form select,.np-form textarea{width:100%;min-width:0;padding:9px 10px;border:1px solid #ccd7cf;border-radius:5px;font:inherit;font-size:15px;background:#fbfcfa;color:#243c33}.np-photo{border-left:1px solid #aebbb3;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:12px;cursor:pointer}.np-photo input{font-size:11px}.np-photo img{width:100%;height:210px;object-fit:contain}#np-photo-preview{width:100%;min-height:180px;display:grid;place-items:center;text-align:center;color:#7a8980}#np-photo-preview small{font-size:11px}.np-form fieldset{margin:0;padding:0;border:0}.np-vendors,.np-costs{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}.np-section-title{display:flex;align-items:center;justify-content:space-between;margin:24px 0 10px}.np-section-title h2{font-size:18px;margin:0}.np-help{font-size:12px;color:#697e73;margin:0 0 10px}.np-table-wrap{overflow:auto}.np-form table{border-collapse:collapse;width:100%;table-layout:fixed}.np-form th,.np-form td{border:1px solid #cbd5cd;padding:8px;text-align:left}.np-form th{background:#eef3ee;font-size:13px}.np-form th:nth-child(3){width:78px}.np-form th:last-child{width:46px}.np-form table input,.np-form table select{padding:7px 5px;font-size:13px}.np-form table button{padding:4px 7px}.np-order-option{display:flex;align-items:center;gap:4px;font-size:11px;margin-top:7px;white-space:nowrap}.np-order-option input{width:auto!important}.np-paper-footer{margin-top:26px;padding-top:14px;border-top:1px solid #dce3de;color:#708174;font-size:12px}.np-stock-note{padding:24px;color:#526f5c;background:#f4f8f3}
.product-gallery{max-width:1600px;margin:auto;padding:30px}.pg-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.pg-eyebrow{font-size:11px;letter-spacing:.14em;color:#8a7958}.pg-header h1{font-size:30px;margin:5px 0 10px}.pg-header p{margin:0;font-size:14px;color:#7c897e}.pg-filters{display:flex;align-items:center;gap:12px;margin-bottom:22px;flex-wrap:wrap}.pg-filters input{flex:1;min-width:240px;border-radius:24px;padding:12px 18px}.pg-filters select{width:auto;min-width:150px;border-radius:8px;padding:12px}.pg-filters input,.pg-filters select{border:1px solid #d1dacf;background:white;font-size:14px}.pg-filters span{color:#7a897d;font-size:13px;min-width:65px}.pg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:20px}.pg-card{background:white;border:1px solid #dce2d8;border-radius:12px;overflow:hidden;box-shadow:0 3px 14px #24402b08;transition:box-shadow .15s}.pg-card:hover{box-shadow:0 7px 22px #24402b16}.pg-photo{width:100%;aspect-ratio:1;display:grid;place-items:center;border:0;border-bottom:1px solid #eff2eb;background:#fff;padding:15px;cursor:pointer}.pg-photo img{width:100%;height:100%;object-fit:contain;max-height:255px}.pg-no-photo{color:#a1ab9e;font-size:14px}.pg-info{padding:15px}.pg-info h2{font-size:20px;margin:9px 0 7px;overflow-wrap:anywhere}.pg-info>p{font-size:13px;line-height:1.6;margin:0 0 10px;min-height:42px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.pg-info>small{font-size:12px;color:#788879}.pg-status{font-size:11px;padding:3px 7px;border-radius:4px;background:#f0f1eb;color:#7b8277}.pg-status.active{background:#eaf3e8;color:#4c7854}.pg-status.inactive{background:#f6eae3;color:#a66b47}.pg-actions{display:flex;gap:6px;margin-top:13px}.pg-actions button{flex:1;font-size:12px;padding:7px 4px}.pg-pages{display:flex;align-items:center;justify-content:center;gap:18px;margin:30px 0}.pg-pages span{font-size:13px}
@media(max-width:1000px){.np-workspace{grid-template-columns:1fr;padding:15px}.np-existing{display:none}.np-identity{grid-template-columns:1fr 200px}.np-paper{padding:20px}.product-gallery{padding:20px}.np-form table{min-width:650px}}
@media(max-width:650px){.np-identity{grid-template-columns:1fr}.np-photo{border-left:0;border-top:1px solid #aebbb3}.np-toolbar{flex-wrap:wrap}.np-toolbar small{display:none}.np-vendors,.np-costs{grid-template-columns:1fr}.pg-header{align-items:flex-start;flex-direction:column}.pg-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pg-info{padding:10px}.pg-info h2{font-size:16px}}

.inventory-status{margin-top:8px;display:flex;flex-direction:column;align-items:flex-start;gap:5px}.inventory-status .inventory-available{background:#d9eee2;color:#16553e;border-color:#6b9b80;font-weight:700}.inventory-status small{white-space:normal}.inventory-product{display:flex;gap:18px;align-items:center;margin:12px 0;padding:12px;border:1px solid #ccd8ce}.inventory-product img,.inventory-gallery img{width:110px;height:110px;object-fit:contain}.inventory-product small,.inventory-gallery small{display:block;white-space:pre-wrap;overflow-wrap:anywhere}.inventory-review{max-height:40vh;overflow:auto}.inventory-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:15px}.inventory-gallery article{border:1px solid #ccd8ce;padding:15px;display:flex;gap:15px}.inventory-product>div{min-width:0}.inventory-gallery article>div{min-width:0}

.shipping-desk{padding:24px;max-width:1600px;margin:auto}.shipping-order{background:white;border:1px solid #cbd8d1;border-radius:12px;padding:20px;margin:18px 0}.shipping-order header{display:flex;justify-content:space-between;gap:20px;align-items:center}.shipping-products{display:flex;gap:16px;flex-wrap:wrap}.shipping-product{display:flex;align-items:center;gap:14px;border:1px solid #dce5df;border-radius:8px;padding:14px;min-width:300px}.shipping-product img{width:96px;height:96px;object-fit:contain}.shipping-product input{width:22px;height:22px}.shipping-product p{margin:8px 0}.shipping-desk .search{max-width:700px}.shipping-product .mini-btn{display:block;margin-top:8px}

.assistant-desk{padding:24px;max-width:1300px;margin:auto}.ai-metrics{display:flex;gap:18px;flex-wrap:wrap;padding:18px;background:#e5eee7;border-radius:10px}.ai-quick,.ai-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:18px 0}.ai-controls label{display:flex;gap:10px;align-items:center}.ai-answer{background:white;border:1px solid #c7d8cd;border-radius:12px;padding:22px;margin:20px 0}.ai-prose{white-space:pre-wrap;line-height:1.75}.ai-plan{border-top:1px solid #d1dcd5;margin-top:18px;padding-top:14px}.ai-plan pre{white-space:pre-wrap;overflow:auto;max-height:400px}.ai-change{display:flex;gap:12px;align-items:center;margin:10px 0}.ai-change img{width:65px;height:65px;object-fit:contain}.ai-change .no-image{width:65px;font-size:10px}.assistant-desk textarea{width:100%;box-sizing:border-box}

/* The global menu stays visible; wrapped menus reserve their actual height. */
body main>.topbar,.orders-view .topbar,.aux .topbar{position:sticky!important;top:0;z-index:100;height:auto!important;min-height:42px!important;flex-wrap:wrap;background:#f1f4ee;align-items:center;isolation:isolate;box-shadow:0 2px 5px #173d3310;padding:3px 0!important}
.app-menu{align-items:center;flex-wrap:wrap;min-width:0;max-width:100%}.app-menu>[data-ai-nav]{margin:0 5px}.topbar #top-progress{min-width:0;flex:1 1 160px}.topbar .language-picker{margin-left:auto;flex-wrap:wrap}.topbar #signed-user{flex:0 0 auto}.app-menu details>div{z-index:120}.topbar #master-shortcuts{display:flex;flex-wrap:wrap}
body.orders-view .workspace{height:calc(100dvh - var(--km-menu-height,46px))!important}html{scroll-padding-top:var(--km-menu-height,46px)}
.assistant-desk{max-width:1120px}.ai-composer{position:sticky;bottom:0;z-index:5;background:#f1f4ee;padding:12px 0 6px;border-top:1px solid #d1ddd5}.ai-composer textarea{resize:vertical;min-height:80px;max-height:30vh;font-size:16px;border:1px solid #b8cabe;border-radius:12px;padding:14px}.ai-composer .field{margin:0}.ai-composer .ai-controls{margin:8px 0;gap:12px}.ai-composer .ai-send{margin-left:auto;min-width:46px;font-size:24px;line-height:1}.ai-composer .muted{font-size:12px;margin:5px 0}.ai-drop-hint{font-size:12px;color:#5b7468;margin-bottom:6px}.ai-composer.drag-over{outline:3px dashed #24624d;outline-offset:5px;background:#e2eee5}.ai-file-chip{display:inline-flex;gap:10px;align-items:center;background:#e1ece4;border-radius:7px;padding:5px 10px;margin-top:6px}.ai-file-chip button{font-size:20px}.ai-user-message{max-width:80%;margin:24px 0 12px auto;padding:15px 20px;background:#dcebe3;border-radius:16px 16px 3px 16px;white-space:pre-wrap;overflow-wrap:anywhere}.ai-user-message p{margin:4px 0}.ai-speaker{font-size:12px;color:#416553}.ai-answer{margin-top:12px}.ai-empty{padding:32px 10px;text-align:center;color:#64776b}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:700px){.assistant-desk{padding:12px}.ai-controls label{flex-wrap:wrap}.ai-user-message{max-width:95%}.ai-composer select{max-width:65vw}.topbar #top-progress{flex-basis:100%}.language-picker{font-size:12px}}
@media print{body main>.topbar{display:none!important}.ai-composer{position:static}}

.hm-options-panel[hidden]{display:none!important} #modal-feedback{padding:14px;border:1px solid currentColor;position:sticky;top:0;z-index:5;background:#fff1eb} .ai-answer{scroll-margin-top:calc(var(--km-menu-height,60px) + 16px)} #ai-new-answer{margin-bottom:10px}

.home-order-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:12px 16px;margin:0 0 12px;background:#fff;border:1px solid #bccfc4}.home-order-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.home-order-actions #home-save-scope{flex-basis:100%}

#home-detail section[hidden]{display:none!important}.home-special-alert{background:#fff1df;padding:12px;margin-bottom:12px}.slip-return-bar,.document-tabs{display:flex;gap:10px;margin-bottom:12px}.document-library{max-width:1300px;margin:auto;padding:20px}.document-library #document-filter{display:flex;gap:12px;margin:20px 0}.document-entry{display:flex;align-items:center;gap:18px;background:white;border:1px solid #ccd8d2;padding:16px;margin:10px 0}.document-entry img,.document-entry .no-image{width:100px;height:100px;object-fit:contain}.document-entry>div:nth-child(2){flex:1}.document-entry small{display:block}.document-entry>div:last-child{display:flex;gap:8px;flex-wrap:wrap}

.workflow-overlay{position:fixed;inset:2vh 1vw;z-index:180;background:#f2f4ef;border:1px solid #a9c1b5;border-radius:12px;box-shadow:0 0 0 100vmax #132d2580;display:flex;flex-direction:column;overflow:hidden}.workflow-overlay>header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;gap:12px;background:white;border-bottom:1px solid #ccd8d2}.workflow-overlay iframe{width:100%;flex:1;min-height:0;border:0}.workflow-row-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.document-entry .workflow-row-actions{max-width:440px}.workflow-bulk{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 0;position:sticky;top:var(--km-menu-height,48px);z-index:3;background:#f2f4ef}.workflow-embedded .rail,.workflow-embedded .topbar,.workflow-embedded .slip-return-bar,.workflow-embedded .order-pane,.workflow-embedded .casting-scanner,.workflow-embedded #content>.module-head{display:none!important}.workflow-embedded main{margin:0!important;padding:8px!important}.workflow-embedded .workspace{grid-template-columns:minmax(0,1fr)!important;height:calc(100dvh - 65px)!important}.workflow-embedded .ticket-work{min-width:0}.workflow-embedded #content>.cast-tools{display:none}.workflow-embedded .casting-document>header{position:sticky;top:0;background:#f2f4ef;z-index:5;padding:8px}.workflow-embedded .casting-document{margin:0}.workflow-slip-actions{display:flex;gap:8px;padding:6px;flex-wrap:wrap}.workflow-embedded .document-tools [data-print]{display:inline-flex!important}.workflow-embedded .casting-paper-scroll{overflow:visible}.workflow-embedded .casting-paper-frame{min-width:1000px}.workflow-embedded .work-notes{max-width:280px}#import-form.drop-active{outline:3px dashed #286850;background:#e0eee5}.print-preferences{border:1px solid #c1d5c6;padding:16px;background:#fff;margin:16px 0}.print-preferences textarea{width:100%;min-height:120px}.ai-context{padding:10px 14px;border:1px solid #c1d5c6;border-radius:8px;background:#fff;margin-bottom:12px}.document-entry{flex-wrap:wrap}.document-entry>input{flex:none}.document-entry .document-summary{flex:1;min-width:240px}.document-entry .document-actions{flex:0 1 440px}.workflow-overlay+dialog{z-index:190}@media(max-width:900px){.workflow-overlay{inset:0;border-radius:0}.workflow-embedded .work-notes{display:none}.workflow-embedded .slip-desk{grid-template-columns:1fr}.document-library #document-filter{flex-wrap:wrap}}

/* Keep one bounded workspace: list, sheet and notes each own their scroll. */
body.orders-view #content{display:flex;flex-direction:column;min-height:0}
body.orders-view #content>.workflow-slip-actions{flex:0 0 auto;margin:0}
body.orders-view #content>.workspace{flex:1 1 0;height:auto!important;min-height:0;grid-template-columns:240px minmax(0,1fr)!important}
body.orders-view.workflow-embedded .order-pane{display:flex!important}
body.orders-view .ticket-work{display:flex!important;flex-direction:column;min-width:0;min-height:0;height:100%;overflow:hidden}
body.orders-view .ticket-work>*{flex:0 0 auto}
body.orders-view .ticket-work>.slip-desk{flex:1 1 0;height:auto!important;min-height:0;overflow:hidden;grid-template-columns:minmax(0,1fr) 260px}
body.orders-view .ticket-work>.paper{flex:1 1 0;min-height:0;overflow:auto}
body.orders-view .document-view{height:100%;min-height:0;min-width:0;overflow:hidden}
body.orders-view .document-frame{flex:1 1 0;height:100%!important;min-height:0;width:100%;display:block}
body.orders-view .slip-desk .work-notes{display:block!important;max-height:none;height:100%;min-height:0;overflow:auto!important;max-width:none}
body.orders-view .slip-desk .work-notes>section{overflow:visible;max-height:none}
body.orders-view .desk-toolbar,body.orders-view .document-tools{flex-wrap:wrap;height:auto!important;min-height:32px}
.slip-view-control{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;margin-left:auto}
.slip-view-control select{padding:4px;min-height:28px}
body.orders-view.slip-list-hidden #content>.workspace{grid-template-columns:minmax(0,1fr)!important}
body.orders-view.slip-list-hidden .order-pane{display:none!important}
@media(max-width:900px){body.orders-view #content>.workspace{grid-template-columns:190px minmax(0,1fr)!important}body.orders-view .ticket-work>.slip-desk{grid-template-columns:minmax(0,1fr)}body.orders-view .slip-desk .work-notes{display:none!important}}

.paper-workspace-tabs{display:flex;gap:8px;flex:0 0 auto;padding:5px}.paper-workspace-tabs .active{background:#205944;color:white}
.hm-table-scroll td{padding-top:5px!important;padding-bottom:5px!important;height:auto!important}
.hm-table-scroll .hm-thumb img{max-height:48px!important;width:56px!important;object-fit:contain}
.hm-table-scroll td:nth-child(6){min-width:330px;max-width:520px}
.hm-table-scroll td:nth-child(6)>b{display:inline!important;margin-right:8px}
.hm-table-scroll td:nth-child(6)>small{display:inline-block!important;max-width:280px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:bottom}
.hm-table-scroll .inventory-status,.hm-table-scroll .workflow-row-actions{display:inline-flex!important;gap:4px;vertical-align:middle;margin:3px 4px 0 0!important;flex-wrap:wrap}
.hm-table-scroll .inventory-status button,.hm-table-scroll .workflow-row-actions button{min-height:24px!important;padding:3px 6px!important;font-size:12px!important;margin:0!important}
.hm-table-scroll .inventory-status small{display:block;color:#a52820}
dialog:has(#cast-paper-confirm){width:96vw;max-width:96vw;height:94dvh;max-height:94dvh;padding:10px}
dialog:has(#cast-paper-confirm) .modal-scroll{height:100%;overflow:auto}
.cast-draft-frame{display:block;width:100%;height:76dvh;border:0;background:#e7ebe7;margin:8px 0}
.cast-confirm-tools{display:flex;gap:15px;align-items:center;position:sticky;top:0;background:#f2f4ef;padding:6px;z-index:3}

.paper-list-tools{display:flex;flex-wrap:wrap;gap:4px;margin:5px 0}.paper-list-tools button{padding:4px;font-size:11px}
.piece-card{position:relative}.piece-card>[data-paper-pick]{position:absolute;right:4px;top:5px;width:17px;height:17px;z-index:2}.piece-card .card-status{padding-right:20px}
body.orders-view .slip-desk .work-notes{display:none!important}body.orders-view .ticket-work>.slip-desk{grid-template-columns:minmax(0,1fr)!important}
body.orders-view.notes-open .slip-desk .work-notes{display:block!important}body.orders-view.notes-open .ticket-work>.slip-desk{grid-template-columns:minmax(0,1fr) 260px!important}
