/* Shared manager CRM design for the established production screens. */
:root{font:14px 'Segoe UI',Arial,sans-serif;color:var(--crm-text);background:var(--crm-bg)}body{margin:0;min-height:100vh;background:var(--crm-bg);color:var(--crm-text)}body>header{margin-left:228px;min-height:72px;padding:14px 28px;background:#fff;color:#24433d;border-bottom:1px solid #e1e6e0}#productionSidebar{position:fixed;inset:0 auto 0 0;width:228px;background:#153d38;color:#dde9e4;overflow:auto;padding:25px 16px;z-index:8}.unified-brand{font-size:25px;font-weight:700;letter-spacing:2px;padding:0 12px;margin-bottom:28px}.unified-brand span{color:var(--crm-selected)}.unified-brand small{display:block;font-size:12px;font-weight:400;letter-spacing:0;color:#a9c5b9;margin-top:4px}nav#mainNav{display:flex;flex-direction:column;max-width:none;margin:0;padding:0;gap:5px}.navButton,#mainNav .unified-sales-link{display:block;background:transparent;color:#bed2c9;border:0;text-decoration:none;border-radius:8px;text-align:left;padding:12px 14px;font-size:14px}.navButton.selected{background:var(--crm-selected);color:#1b3e33;font-weight:600}.navButton:hover:not(.selected),#mainNav .unified-sales-link:hover{background:#234e46;color:#fff}body>main#app{margin:0 0 0 228px;max-width:none;padding:26px 34px 40px;min-width:0}h1{font-size:28px;font-weight:600;letter-spacing:-.6px}h2{font-size:18px;font-weight:600}section,.card,.stockGroup,.routeCard{border-color:var(--crm-border);background:#fff;color:var(--crm-strong);border-radius:12px}button{background:var(--crm-primary);border:1px solid var(--crm-primary);border-radius:8px;color:#fff;padding:10px 15px;font:inherit}button:hover{background:#276255}button.secondary,button.linkButton,body>header button{background:white;color:#24433d;border-color:#d8dfda}button.secondary:hover{background:var(--crm-hover)}.segmented button,.stock-mode-switch button,.staff-mode-switch button{background:#edf1e9;color:#52735e;border-color:#d8dfda}.segmented button.selected,.stock-mode-switch button.active,.staff-mode-switch button.active{background:var(--crm-selected);color:#1b3e33;border-color:#b6d394}input,select,textarea{background:white;color:#234237;border:1px solid var(--crm-controlBorder);border-radius:7px;font:inherit;padding:10px 12px}.muted,small{color:var(--crm-muted)}th{background:var(--crm-table);color:#7d8e82;font-size:11px;letter-spacing:.5px;text-transform:uppercase;border-color:#e5eae3}td{color:#365048;border-color:var(--crm-line)}.order-number,.size{color:var(--crm-strong)}.order-group:not(:first-of-type) .order-head td{border-top-color:var(--crm-bg)}.stockGroup[open] summary,.operation .num,.routeSteps span{background:var(--crm-hover);color:#44614d}.operation.done .num{background:var(--crm-selected)}.operation.active .num{background:#ffe2a7}.admin{border-top-color:var(--crm-primary)}.warning,.hint{background:#fcfaf1;color:#8a7850;border-color:#e9e3ce}.login{max-width:420px;margin:30px auto;padding:30px}a{color:var(--crm-link)}.crm-history-controls button{background:white;color:#24433d;border-color:#d8dfda}.linkButton{color:var(--crm-link)}.stock-mode-switch{gap:6px}@media(max-width:1100px){#productionSidebar{width:190px;padding:20px 12px}body>header{margin-left:190px}body>main#app{margin-left:190px;padding:24px}}@media(max-width:700px){#productionSidebar{position:static;width:auto;padding:14px;height:auto}.unified-brand{font-size:22px;margin-bottom:10px}.unified-brand small{display:none}nav#mainNav{flex-direction:row;flex-wrap:nowrap;overflow:auto}.navButton,#mainNav .unified-sales-link{white-space:nowrap;padding:10px;font-size:12px}body>header{margin-left:0;min-height:65px;padding:12px 16px}body>main#app{margin-left:0;padding:20px 14px}.grid{grid-template-columns:1fr}}
body>main#app{width:calc(100% - 228px)}.orders-list-table{min-width:950px;font-size:12px}.orders-list-table td.orders-list-number,.orders-list-table .order-number{white-space:nowrap;overflow-wrap:normal}.orders-list-section{overflow:hidden}.orders-list-container{overflow:auto}.order-line{grid-template-columns:repeat(4,minmax(0,1fr));min-width:0}.grid>*{min-width:0}input,select,textarea{max-width:100%;min-width:0}.orders-sort{background:transparent;border:0;padding:0}.orders-view-switch{background:#edf1e9}.orders-view-switch button.active{background:var(--crm-selected);color:#1b3e33}.orders-list-table th{background:var(--crm-table);color:#7d8e82}.orders-list-table td.orders-list-number,.orders-list-table td.orders-list-client,.orders-list-table td.orders-list-status{background:#f6f8f3}.orders-list-table tr.orders-list-group-start td{border-top-color:var(--crm-border)}label{font-size:12px;font-weight:600;color:#607a69}@media(max-width:1100px){body>main#app{width:calc(100% - 190px)}}@media(max-width:700px){body>main#app{width:100%}.order-line{grid-template-columns:1fr}}

/* Keep buyer order metrics legible without breaking words or dates. */
.orders-list-table{table-layout:auto;min-width:1180px}.orders-list-table th:nth-child(n){width:auto;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:13px;padding:8px 7px}.orders-list-table td{overflow-wrap:normal;word-break:normal}.orders-list-table .order-metric{white-space:nowrap;overflow-wrap:normal;word-break:normal}.orders-list-table td.order-metric{font-size:15px;line-height:1.35;padding:7px 8px;color:#294a3e}.orders-list-table .order-metric small{font-size:13px;line-height:1.35}.orders-list-table .order-metric-progress{min-width:132px}.orders-list-table .order-metric-remaining{min-width:104px}.orders-list-table .order-metric-length,.orders-list-table .order-metric-ordered,.orders-list-table .order-metric-ready{min-width:82px}.orders-list-table .order-metric-due{min-width:100px}

/* Match sales controls and surfaces without changing manufacturing layouts. */
button{background:#fff;color:#24433d;border-color:#d8dfda}button:hover{background:var(--crm-hover)}
button.primary,button[type="submit"],.admin>button:not(.secondary),.login #login,#changePassword,.operation .operation-complete{background:var(--crm-primary);border-color:var(--crm-primary);color:#fff}
button.primary:hover,button[type="submit"]:hover,.admin>button:not(.secondary):hover,.login #login:hover,.operation .operation-complete:hover{background:#276255}
button.linkButton,.stock-group-toggle,.production-board .heat-link,.stock-table .heat-link{background:transparent;color:var(--crm-link);border-color:transparent}
.orders-view-switch,.stock-mode-switch,.staff-mode-switch{background:var(--crm-hover)}
.orders-view-switch button.active,.stock-mode-switch button.active,.staff-mode-switch button.active,.segmented button.selected{background:var(--crm-selected);color:#1b3e33}
.production-board th,.stock-table th,.orders-list-table th,.compact-orders-table th{background:var(--crm-table);color:#7d8e82;border-color:var(--crm-border)}
.production-board td,.stock-table td{border-color:var(--crm-border);color:#365048}
.orders-list-table td.orders-list-number,.orders-list-table td.orders-list-client,.orders-list-table td.orders-list-status{background:#fff}
.production-board tbody tr:hover,.stock-table tbody tr:hover,.orders-list-table tbody tr:hover,.compact-orders-table tbody tr:hover{background:#fafcf8}
.production-board .route-cell.work,.operation.active .num{background:var(--crm-yellow);color:var(--crm-yellowText)}
.production-board .route-cell.done,.operation.done .num{background:var(--crm-green);color:var(--crm-greenText)}
.operation.active{border-color:#e9e3ce}.operation.done{border-color:#dce6d8}
.production-placed:disabled,.compact-orders-table button.production-placed:disabled{background:var(--crm-hover);color:#52735e;border-color:var(--crm-border)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--crm-primary);outline-offset:2px}
dialog{color:var(--crm-text);background:#fff;box-shadow:0 22px 80px #0a271b40}dialog::backdrop{background:#082d245b}

/* Compact reference position in the production queue. */
.production-board .material-cell .position-size{display:block;font-size:20px;font-weight:700;white-space:nowrap;line-height:1.25}
.production-board .queue-position-grade{display:block;font-size:13px;font-weight:400;color:var(--crm-muted);margin-top:4px;overflow-wrap:normal}
.production-board th:nth-child(8){width:96px;white-space:nowrap;overflow-wrap:normal}
.production-board .length-spec-cell{overflow-wrap:normal;word-break:normal}

.unified-brand{text-align:center}

.stock-table .stock-size-cell{text-align:left;padding-left:10px}.stock-table .stock-size-cell>button{display:block;position:relative;margin-left:18px;max-width:calc(100% - 18px);padding:2px;text-align:left}.stock-size-cell .stock-group-toggle[aria-expanded]::before{content:"";position:absolute;left:-15px;top:50%;width:0;height:0;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:6px solid currentColor;transform:translateY(-50%)}.stock-size-cell .stock-group-toggle[aria-expanded="true"]::before{border-top:6px solid currentColor;border-right:4px solid transparent;border-bottom:0;border-left:4px solid transparent}

.list-create-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;margin-bottom:12px}.list-create-heading h1{margin:0}.production-entry-dialog{width:min(1100px,94vw);max-height:90vh;padding:20px;border:1px solid var(--crm-border);border-radius:12px;overflow:auto;color:var(--crm-text);background:white}.production-entry-dialog::backdrop{background:#082d245b}.entry-dialog-close{display:flex;justify-content:flex-end;margin-bottom:10px}.production-entry-dialog .admin{margin:0;border:0;padding:10px}.production-entry-dialog .grid label{min-width:0}@media(max-width:700px){.list-create-heading{align-items:flex-start;flex-wrap:wrap}.production-entry-dialog{width:96vw;padding:12px}.production-entry-dialog .grid.three{grid-template-columns:1fr}}

.production-entry-dialog .error:empty{display:none}

/* Compact production orders register. */
body>header:has([data-orders-header-switch])>b{display:none}
body>header [data-orders-header-switch]{margin:0;flex-shrink:0}
body>header [data-orders-header-switch] button{padding:8px 14px}
body>main#app:has(.orders-compact-heading){padding-top:8px}
.orders-compact-heading{justify-content:flex-start;gap:14px;margin:0 0 6px}
.orders-compact-heading .orders-sort{padding:0;margin:0;border:0;box-shadow:none;background:transparent}
.orders-compact-heading .orders-sort select{padding:7px 10px}
.orders-compact-heading>button{margin-left:auto;padding:8px 14px}
.orders-compact-heading+.orders-sort{display:none}
@media(max-width:700px){body>header:has([data-orders-header-switch]){flex-wrap:wrap}.orders-compact-heading{flex-wrap:wrap;gap:8px}.orders-compact-heading .orders-sort label{flex-wrap:wrap}.orders-compact-heading>button{margin-left:0}}

.production-mail-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.production-mail-heading p{margin:4px 0}.production-mail-dialog{max-width:760px}.production-mail-dialog input,.production-mail-dialog textarea{width:100%}

body>header:has(.production-mail-top-heading)>b{display:none}
.production-mail-top-heading{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.production-mail-top-heading h1{margin:0;font-size:24px}
.production-mail-top-heading .crm-history-controls{margin:0;padding:0;max-width:none;display:flex;gap:6px}
.production-mail-top-heading .crm-history-controls button{white-space:nowrap;padding:8px 12px}
body>main#app:has([data-production-mail-view]){padding-top:8px}
body>main#app>[data-production-mail-view]{margin-top:0;padding:12px 16px}

/* Compact production queue and route actions, v250 */
.production-board table th.queue-date-heading{width:102px}
.production-board table th.queue-due-heading{width:96px}
.production-board table th.queue-order-heading{width:88px}
.production-board table th.category-heading{width:40px}
.production-board table th.queue-position-heading{width:95px}
.production-board table th.queue-quantity-heading{width:100px}
.production-board table th.queue-length-heading{width:96px;white-space:nowrap}
.production-board table th.queue-input-heading{width:110px;white-space:normal}
.production-board table th.queue-heat-heading{width:70px}
.production-board table th.route-heading{width:auto}
.production-board table{min-width:1400px}
.production-board .queue-job-row td{padding-top:5px;padding-bottom:5px}
.production-board .queue-job-row .stage{padding:6px 2px}
.production-board .queue-job-row.order-group-start td{border-top-width:4px}
.queue-job-row{cursor:pointer}
.queue-job-row:hover td:not(.route-cell){background:#edf4e7}
.queue-job-row:focus-visible{outline:2px solid #588445;outline-offset:-2px}
.route-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.route-header .completed-route-label,.route-header h2{margin:0}
.route-print-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}

/* Queue printing and category readability, v251 */
.production-board table th.queue-order-heading{width:116px}
.production-board .order-cell small{white-space:nowrap;overflow-wrap:normal}
.production-board .order-category{font-size:21px;font-weight:700;line-height:1.2}

.operation.operation-qr-target{outline:2px solid #588445;outline-offset:3px}

body.production-tasks-active #productionSidebar{width:170px;padding-left:10px;padding-right:10px}body.production-tasks-active>header{margin-left:170px}body.production-tasks-active>main#app{margin-left:170px;padding:0 12px 12px}#production-tasks-frame{display:block;width:100%;height:calc(100dvh - 110px);min-height:460px;border:0}@media(max-width:700px){body.production-tasks-active #productionSidebar{width:100%;}body.production-tasks-active>header,body.production-tasks-active>main#app{margin-left:0}#production-tasks-frame{height:calc(100dvh - 180px)}}

/* Compact order register: one header toolbar and full available workspace. */
body.production-orders-active>main#app{box-sizing:border-box;padding:6px 12px 16px}
body.production-orders-active>header{padding:8px 12px;gap:10px;min-height:58px;flex-wrap:wrap}
[data-orders-toolbar]{display:flex;align-items:center;gap:10px;flex:1;min-width:0;flex-wrap:wrap;justify-content:flex-start}
[data-orders-toolbar] .stock-mode-switch{margin:0;padding:3px;gap:3px;flex-wrap:nowrap}
[data-orders-toolbar] button{padding:7px 9px;font-size:12px;margin:0;white-space:nowrap}
[data-orders-toolbar] .crm-history-controls{margin:0;gap:4px;flex:none}
[data-orders-toolbar] .orders-sort{padding:0;margin:0;flex:none}
[data-orders-toolbar] .orders-sort label{gap:5px;margin:0}
[data-orders-toolbar] .orders-sort select{min-width:0;width:205px;padding:6px;font-size:12px}
body.production-orders-active .orders-list-section{padding:4px;margin:0 0 6px}
body.production-orders-active .orders-list-container{max-height:calc(100dvh - 110px)}
body.production-orders-active .orders-list-table{min-width:1000px;font-size:12px}
body.production-orders-active .orders-list-table th:nth-child(n){font-size:11px;padding:5px}
body.production-orders-active .orders-list-table td{padding:4px 5px;line-height:1.25}
body.production-orders-active .orders-list-table .size,body.production-orders-active .orders-list-table .position-size{font-size:14px;line-height:1.2}
body.production-orders-active .orders-list-table .order-number,body.production-orders-active .orders-list-table .orders-list-number button{font-size:14px}
body.production-orders-active .orders-list-table .orders-list-client{font-size:12px}
body.production-orders-active .orders-list-table td.order-metric{font-size:13px;padding:4px 5px}
body.production-orders-active .orders-list-table .order-metric small{font-size:11px}
body.production-orders-active .orders-list-table .order-metric-progress{min-width:108px}
body.production-orders-active .orders-list-table .order-metric-remaining{min-width:85px}
body.production-orders-active .orders-list-table .order-metric-length,body.production-orders-active .orders-list-table .order-metric-ordered,body.production-orders-active .orders-list-table .order-metric-ready{min-width:65px}
body.production-orders-active .orders-list-table tr.orders-list-group-start td{border-top-width:4px}
body.production-orders-active .orders-list-table tbody tr:first-child td{border-top-width:1px}
@media(max-width:700px){[data-orders-toolbar]{gap:6px}[data-orders-toolbar] .orders-sort select{width:190px}body.production-orders-active .orders-list-container{max-height:70vh}}

body.production-orders-active>header>b{display:none}
body.production-orders-active .orders-list-table{table-layout:fixed;min-width:900px;width:100%}
body.production-orders-active .orders-list-table th:nth-child(n){white-space:normal;overflow-wrap:normal;width:auto}
body.production-orders-active .orders-list-table th:nth-child(1){width:6%}
body.production-orders-active .orders-list-table th.category-heading{width:3%}
body.production-orders-active .orders-list-table th:nth-child(3){width:12%}
body.production-orders-active .orders-list-table th:nth-child(4){width:13%}
body.production-orders-active .orders-list-table th:nth-child(7){width:10%}
body.production-orders-active .orders-list-table th:nth-last-child(3){width:9%}
body.production-orders-active .orders-list-table th:nth-last-child(2){width:10%}
body.production-orders-active .orders-list-table th:last-child{width:11%}
body.production-orders-active .orders-list-table .order-metric{min-width:0;white-space:normal}
body.production-orders-active .orders-list-table button{font-size:12px;padding:5px 6px}
body.production-orders-active .orders-list-table .orders-list-status{font-size:12px}
@media(min-width:701px) and (max-width:1450px){
 body.production-orders-active [data-orders-toolbar]{flex-basis:100%;gap:8px}
 body.production-orders-active #account{flex-basis:100%;display:flex;align-items:center;justify-content:flex-end;gap:8px;font-size:12px}
 body.production-orders-active #account button{padding:5px 8px}
 body.production-orders-active [data-orders-toolbar] .orders-sort label>b{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

body.production-orders-active .orders-without-client{min-width:840px}

/* Production orders, queue, warehouse and job card: approved sales-style typography and a quiet client tag. */
body.production-orders-active .orders-list-table .size,
body.production-orders-active .orders-list-table .position-size,
body.production-orders-active .orders-list-table .order-number,
body.production-orders-active .orders-list-table .orders-list-number button,
.production-board .material-cell .position-size,
.production-board .queue-order-number,
.worker-queue-card .worker-queue-position strong,
.worker-queue-card .worker-queue-order,
.stock-table .stock-size-cell>button,
.stock-table .stock-batch-number,
h1.job-card-heading,
.job-pipe-size,
.job-batch-number,
.job-summary-grid .packing-summary-batch h3,
.packaging-plan .packing-batch>summary strong{
 font-family:'Segoe UI',Arial,sans-serif;font-size:14px;font-weight:600;line-height:1.3;letter-spacing:normal
}
body.production-orders-active .orders-list-table .order-number{text-decoration:none}
body.production-orders-active .orders-list-table .production-client-ls,
.production-board .production-client-ls,
.worker-queue-card .production-client-ls{
 margin-left:6px;padding:2px 4px;vertical-align:1px;font-family:'Segoe UI',Arial,sans-serif;font-size:10px;font-weight:600;line-height:1.2;letter-spacing:normal;
 color:#527549;background:#f0f5eb;border:1px solid #cddcc8;border-radius:4px
}
.production-board .queue-batch-number,.worker-queue-order small{font-size:12px;font-weight:400}
body.production-orders-active .orders-without-client th:nth-child(3){width:18%}
body.production-orders-active .orders-without-client th:nth-child(4){width:8%}
body.production-orders-active .orders-without-client th:nth-child(6){width:11%}
body.production-orders-active .orders-without-client th:nth-child(7){width:8%}

/* Keep material descriptions and quantities compact without forcing extra lines. */
body.production-orders-active .orders-list-table{table-layout:auto;min-width:900px}
body.production-orders-active .orders-list-table th:nth-child(n){width:auto;white-space:nowrap}
body.production-orders-active .orders-list-table .order-metric{white-space:nowrap}
body.production-orders-active .orders-list-table .order-metric small{white-space:nowrap}
body.production-orders-active .orders-list-table td .size+br+small{font-size:11px;line-height:1.2;white-space:nowrap}
body.production-orders-active .orders-list-table .orders-list-status{font-size:11px}
body.production-orders-active .orders-without-client{min-width:840px}

/* Keep warehouse type consistent inside mobile cards without reducing touch targets. */
@media(max-width:800px){
 .stock-table.mobile-card-table .stock-size-cell>button{font-size:14px!important}
}

/* Warehouse codes are generated on demand, never for every repaint of the list. */
.stock-table .stock-qr-heading{width:42px}
.stock-table .stock-qr-cell{text-align:center;white-space:nowrap;padding-inline:4px}
.stock-table .stock-qr-button{min-width:30px;min-height:30px;padding:3px 5px;border:1px solid #cbd9cb;border-radius:5px;background:#f0f5eb;color:#365c47;font-size:11px;line-height:1;font-weight:600;letter-spacing:.2px}
.stock-qr-toolbar-button{align-self:end;white-space:nowrap}
.stock-qr-dialog{width:min(1000px,94vw);max-height:90vh;padding:20px;border:1px solid var(--crm-border);border-radius:12px;color:var(--crm-text);background:white;overflow:auto}
.stock-qr-dialog::backdrop{background:#082d2466}
.stock-qr-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.stock-qr-dialog-heading h2{margin:0}
.stock-qr-dialog>p{line-height:1.4}
.stock-qr-cards{display:grid;gap:12px}
.stock-qr-card{display:grid;grid-template-columns:minmax(0,1fr) 142px;gap:16px;padding:14px;border:1px solid var(--crm-border);border-radius:8px;background:#fafcf8;overflow-wrap:anywhere}
.stock-qr-card h3{font:600 14px/1.3 'Segoe UI',Arial,sans-serif;margin:0 0 6px}
.stock-qr-card p{margin:6px 0}
.stock-qr-card dl{display:grid;grid-template-columns:110px minmax(0,1fr);gap:5px 10px;margin:12px 0;font-size:13px}
.stock-qr-card dt{color:var(--crm-muted)}.stock-qr-card dd{margin:0}
.stock-qr-card small{font-size:11px;overflow-wrap:anywhere}
.stock-qr-code{align-self:center;display:block;width:142px;height:142px;max-width:100%}
.stock-qr-code svg{display:block;width:100%;height:100%}
.stock-qr-dialog>.actions{margin-top:16px}
@media(max-width:800px){.stock-table.mobile-card-table .stock-qr-button{min-width:44px;min-height:40px}.stock-qr-dialog{padding:14px}.stock-qr-card{grid-template-columns:minmax(0,1fr);gap:8px;padding:12px}.stock-qr-code{justify-self:center;width:160px;height:160px}.stock-qr-card dl{grid-template-columns:96px minmax(0,1fr)}}
.stock-lot-movements{width:100%;overflow-x:auto}.stock-lot-movements table{min-width:450px}
/* Compact production warehouse; data and controls remain in the same table. */
body>main#app:has(.stock-table){padding:14px 18px 22px}
#app:has(.stock-table)>.list-create-heading,#app:has(.stock-table)>.crm-page-heading{margin-bottom:5px;gap:8px}
#app:has(.stock-table)>section:has(.stock-table){padding:8px 10px;margin:4px 0}
#app:has(.stock-table)>.stock-mode-heading>.stock-mode-switch{margin:4px 0;padding:2px;gap:4px}
#app:has(.stock-table)>.stock-mode-heading>.stock-mode-switch button{padding:6px 10px;font-size:13px;line-height:1.2}
.stock-filters{gap:8px;margin-bottom:6px}
.stock-filters label{font-size:12px;line-height:1.2}
.stock-filters input,.stock-filters select{min-width:180px;font-size:13px;padding:6px 8px}
.stock-filters button{font-size:12px;padding:6px 10px;line-height:1.2}
.stock-table{font-size:13px;line-height:1.2}
.stock-table th{font-size:11px;line-height:1.2;letter-spacing:.25px}
.stock-table th,.stock-table td{padding:3px 4px}
.stock-table small{font-size:12px;line-height:1.15}
.stock-table button{font-size:12px;line-height:1.2;padding:2px 3px}
.stock-table .stock-size-cell{padding-left:8px}
.stock-table .stock-size-cell>button,.stock-table .stock-batch-number{font-size:14px;line-height:1.2}
.stock-table .stock-qr-button{width:28px;min-height:28px;padding:2px;font-size:11px}
@media(max-width:800px){
 body>main#app:has(.stock-table){padding:10px 12px 16px}
 .stock-filters{gap:6px}
 .stock-filters input,.stock-filters select{min-width:0;font-size:16px;min-height:44px}
 .stock-filters button,#app:has(.stock-table)>.stock-mode-heading>.stock-mode-switch button{min-height:44px}
 .stock-scroll:has(.stock-table){max-height:none;overflow:visible}
 .stock-table.mobile-card-table tbody tr{margin:5px 0;padding:4px}
 .stock-table.mobile-card-table tbody td{padding:4px!important;font-size:13px!important;line-height:1.2}
 .stock-table.mobile-card-table td::before{font-size:11px!important;line-height:1.2}
 .stock-table.mobile-card-table td button{min-height:44px}
 .stock-table.mobile-card-table .stock-qr-button{width:44px;min-height:44px}
}
.stock-table button{margin-block:0}
.stock-table .stock-size-cell>button{white-space:nowrap}
.stock-table .stock-grade,.stock-table .stock-state{white-space:nowrap;font-size:12px}
@media(max-width:800px){.stock-table.mobile-card-table .stock-grade,.stock-table.mobile-card-table .stock-state{white-space:normal}}

/* Physical stock across all tabs/searches; no additional data request. */
.stock-mode-heading{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin:4px 0}.stock-mode-heading .stock-mode-switch{margin:0}.stock-total{margin:0 0 0 auto;text-align:right;font-size:13px;line-height:1.3;white-space:nowrap}.stock-total strong{font-size:15px;font-variant-numeric:tabular-nums}@media(max-width:800px){.stock-mode-heading{gap:6px}.stock-mode-heading .stock-mode-switch{flex-wrap:wrap}.stock-total{font-size:12px}.stock-total strong{font-size:14px}}

/* Shared production search reuses the loaded register, including its archive. */
.production-register-search{display:flex;align-items:center;gap:5px;flex:1 1 280px;min-width:320px;max-width:510px}.production-register-search label{flex:1;min-width:175px;margin:0}.production-register-search input{width:100%;min-width:0;padding:6px 9px;font-size:12px;line-height:1.25}.production-register-search button{padding:3px 7px;margin:0;font-size:16px}.production-register-search button[hidden]{display:none}.production-register-search small{font-size:11px;color:var(--crm-muted);white-space:nowrap}.production-register-search .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.production-board .blank-material-cell{white-space:normal;vertical-align:middle}.production-board .queue-input-size{display:block;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;font-size:14px;font-weight:600;line-height:1.2;white-space:nowrap}.production-board .queue-input-detail{display:block;margin-top:3px;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;font-size:11px;line-height:1.2;color:var(--crm-muted);white-space:normal;overflow-wrap:normal}@media(max-width:800px){.production-register-search{flex-basis:100%;min-width:0;max-width:none;flex-wrap:wrap}.production-register-search input{font-size:16px;min-height:38px}.production-register-search small{flex-basis:100%;white-space:normal}}

#app>.crm-page-heading:has(.production-register-search){flex-wrap:wrap}#app>.crm-page-heading:has(.production-register-search)>h1{flex:0 0 auto;white-space:nowrap;font-size:24px}#app>.crm-page-heading:has(.production-register-search)>button{flex:0 0 auto;white-space:nowrap}@media(max-width:800px){#app>.crm-page-heading:has(.production-register-search)>h1{font-size:21px;white-space:normal}}

/* Production order rows use the office register density and a single pipe identity line. */
body.production-orders-active .orders-list-table th,body.production-orders-active .orders-list-table td{padding-top:3px;padding-bottom:3px}
body.production-orders-active .orders-list-table .order-position-main{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;vertical-align:middle}
body.production-orders-active .orders-list-table .order-position-main small{font-size:11px;line-height:1.2;white-space:nowrap}
body.production-orders-active .orders-list-table .order-outsource-waiting{white-space:nowrap;font-size:11px}
body.production-orders-active .orders-list-table .order-position-cell .order-sources{display:inline-block;margin:0 0 0 4px;vertical-align:middle}
body.production-orders-active .orders-list-table .order-position-cell .order-sources>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;font-size:0;border-radius:4px}
body.production-orders-active .orders-list-table .order-position-cell .order-sources>summary::-webkit-details-marker{display:none}
body.production-orders-active .orders-list-table .order-position-cell .order-sources>summary::before{content:'›';font-size:18px;line-height:1;transform-origin:center;transition:transform .12s}
body.production-orders-active .orders-list-table .order-position-cell .order-sources[open]{display:block;white-space:normal;margin-left:0}
body.production-orders-active .orders-list-table .order-position-cell .order-sources[open]>summary::before{transform:rotate(90deg)}
body.production-orders-active .orders-list-table .order-position-cell .order-sources>summary:hover{background:var(--crm-hover)}
body.production-orders-active .orders-list-table td.order-metric{min-width:0;font-size:12px;line-height:1.2}

body.production-orders-active .orders-list-table .order-metric{min-width:0}
body.production-orders-active .orders-list-table .order-position-main{display:flex;gap:5px;align-items:center}
body.production-orders-active .orders-list-table .order-position-main:has(.order-sources[open]){flex-wrap:wrap}
body.production-orders-active .orders-list-table .order-position-main>.order-sources{flex:none}
body.production-orders-active .orders-list-table .order-position-main>.order-sources[open]{flex-basis:100%;width:100%}
body.production-orders-active .orders-list-table button,body.production-orders-active .orders-list-table .orders-list-status{white-space:nowrap}
body.production-orders-active .orders-list-table th,body.production-orders-active .orders-list-table td{padding-left:3px;padding-right:3px}
body.production-orders-active .orders-list-table .order-position-main>.order-sources:not([open]){width:20px;min-width:20px;max-width:20px}
body.production-orders-active .orders-list-table td button{padding:3px 4px;min-height:24px}
