/* Shared density and visual rules for every ERP section. Print documents use their own CSS. */
:root{--ui-border:#e2e7ee;--ui-muted:#728095;--ui-radius:8px}
body{background:#f6f7f9;font-size:13px}.page{padding:24px 28px}.topbar{height:64px;padding:0 28px}.page-head{margin-bottom:20px;gap:16px}.page-head h1{font-size:25px;letter-spacing:-.6px}.page-head p{font-size:12px;margin-top:6px}.eyebrow{display:none}.page-head .actions{gap:8px}.btn{border-radius:6px;padding:9px 13px;font-size:12px;box-shadow:none}.btn.secondary{background:#fff}.panel{border-color:var(--ui-border);border-radius:var(--ui-radius);box-shadow:none;margin-bottom:18px}.panel-head{padding:14px 16px}.panel-head h2{font-size:15px}.panel-head p{font-size:12px}.filters{padding:14px 16px;gap:10px}input,select,textarea{border-radius:6px;padding:8px 10px;min-height:36px;font-size:12px}label{font-size:12px}.filters input,.filters select{margin:0}th{font-size:10px;color:var(--ui-muted);letter-spacing:.3px;background:#fafbfc}td{font-size:12px}.panel th,.panel td{padding:11px 14px}.badge{font-size:10px;border-radius:4px}.sub{font-size:11px}.queue-tabs{gap:20px;margin-bottom:16px}.queue-tabs button{font-size:12px;padding:10px 0}.queue-summary{padding:10px 16px}.compact-order{padding:16px;gap:18px}.product-batch{padding:10px 16px}.product-batch b{font-weight:500}.product-panel .name-cell>b,.stock-table .name-cell>b,.combo-list strong{font-weight:400}.dialog-head{padding:16px 20px}.dialog-head h2{font-size:17px}.dialog-body{padding:20px}.dialog-footer{padding:12px 20px}.detail-grid{gap:12px}.section-label{margin:20px 0 10px;font-size:11px}.notice{border-radius:6px;font-size:12px}.roles-help{background:#fafbfc;padding:16px;border-color:var(--ui-border)}.roles-help>div{gap:16px}.assembly-edit{padding:12px;background:#f7f9fc}.assembly-heading{margin:16px 0 10px}.assembly-product{border-radius:6px}.assembly-product>summary{padding:10px;background:#fafbfc}.order-toolbar{padding:10px 0;margin-bottom:12px}.total{font-size:19px}.auth .eyebrow{display:block}
/* One compact summary strip replaces oversized metric cards. */
.metrics{display:flex;flex-wrap:wrap;gap:0;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:white;margin:0 0 18px;overflow:hidden}.metric{flex:1 1 150px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;border:0;border-right:1px solid var(--ui-border);border-radius:0;background:transparent;box-shadow:none;min-width:0}.metric:last-child{border-right:0}.metric-top{font-size:11px;color:var(--ui-muted);margin:0;line-height:1.35}.metric strong{font-size:18px;line-height:1.2;margin:0;white-space:nowrap;font-weight:600}.metric small,.metric-icon{display:none}
/* Keep the warehouse table wide; supporting information sits below, collapsed. */
.stock-layout{display:block}.stock-side{display:block}.stock-extras{border:1px solid var(--ui-border);border-radius:8px;background:white;margin-top:14px}.stock-extras>summary{padding:12px 16px;cursor:pointer;font-size:12px;color:#52637b}.stock-extras[open]>.stock-side{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:0 16px 16px}.stock-side .panel{margin:0}.stock-card-rows{padding:0 16px 12px}.stock-card .actions{padding:0 16px 12px}.stock-card .panel-head{padding:12px 16px}
.order-line{grid-template-columns:minmax(150px,1.5fr) 110px minmax(115px,1fr) 70px 100px 32px}.sku-help{font-size:11px;line-height:1.5;color:var(--ui-muted);margin-top:7px}.sku-generate{margin:8px 0 0}.batch-empty{display:none}
@media(max-width:1100px){.page{padding:20px}.topbar{padding:0 20px}.metric{flex-basis:180px}.order-line{grid-template-columns:minmax(120px,1fr) 100px minmax(110px,1fr) 65px 90px 32px}}
@media(max-width:720px){.page{padding:18px 12px}.topbar{padding:0 12px}.page-head{margin-bottom:16px}.page-head h1{font-size:23px}.metrics{display:grid;grid-template-columns:1fr 1fr}.metric{padding:11px 12px;border-bottom:1px solid var(--ui-border)}.metric strong{font-size:16px}.metric-top{font-size:10px}.metric:last-child{border-bottom:0}.page-head>.actions{flex-wrap:wrap}.filters{padding:12px}.dialog-body{padding:16px}.stock-extras[open]>.stock-side{grid-template-columns:1fr;padding:0 12px 12px}.order-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 32px;gap:8px}.order-line label:first-child{grid-column:1/3}.order-line label:nth-child(2){grid-column:1}.order-line label:nth-child(3){grid-column:2}.order-line label:nth-child(4){grid-column:1}.order-line label:nth-child(5){grid-column:2}.order-line .close{grid-column:3;grid-row:1/4}.stock-tabs{gap:14px}.roles-help>div{gap:12px}}

.serial-search-results{margin-top:12px;padding:10px 12px;border-left:2px solid #8badff;background:#f6f9ff;border-radius:4px}.serial-search-results>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px;font-size:12px;overflow-wrap:anywhere}.serial-search-results mark{background:#e1ebff;color:#163b84;border-radius:3px;padding:2px 5px}.serial-search-results>div>span{color:#728095}
/* Order creation/editing: essentials first, optional settings behind disclosures. */
#dialog.order-editor{width:860px;max-width:calc(100vw - 24px);padding:0;max-height:94dvh;border-radius:12px}#dialog.order-editor form{display:flex;flex-direction:column;max-height:94dvh}.order-editor .dialog-head{padding:20px 22px;flex-shrink:0}.order-editor .dialog-head h2{font-size:21px}.order-editor .dialog-body{padding:0 22px 18px;overflow-y:auto;min-height:0;flex:1}.order-editor .dialog-footer{flex-shrink:0;padding:15px 22px}.order-editor-intro{margin:0 0 16px;padding:11px 14px;background:#edf3ff;color:#546d96;border-radius:6px;font-size:12px}.order-editor-section{border:1px solid #dce4f1;border-radius:7px;margin-bottom:12px;overflow:visible}.order-editor-section>summary{display:flex;align-items:center;gap:16px;cursor:pointer;list-style:none;padding:14px 16px;background:#f5f7fc;border-radius:7px;font-size:14px}.order-editor-section>summary::-webkit-details-marker{display:none}.order-editor-section>summary:after{content:'⌄';margin-left:auto;font-size:18px;color:#536a90}.order-editor-section[open]>summary{border-radius:7px 7px 0 0;background:#edf2fa}.order-editor-section[open]>summary:after{content:'⌃'}.order-editor-section>summary>span{font-size:11px;color:#728095;font-weight:400}.order-editor-section-body{padding:15px}.order-editor .form-grid{gap:15px}.order-editor .form-grid>label{margin:0}.order-editor label input,.order-editor label select,.order-editor label textarea{margin-top:7px}.order-editor .order-stage{font-size:12px;display:flex;flex-wrap:wrap;align-items:center;gap:8px}.order-stage>span:first-child{flex-basis:100%;color:#728095}.order-stage small{font-size:10px;color:#728095}.order-editor-section-body>label+label{margin-top:15px}.order-editor .order-line{display:grid;grid-template-columns:minmax(160px,1fr) 106px 85px 105px 28px;gap:10px;padding:0 0 12px;margin:0 0 12px;border-bottom:1px solid #edf0f5;align-items:start}.order-editor .order-line label:has([name=product_name]){grid-column:1;grid-row:1}.order-editor .order-line label:has([name=sku]){grid-column:2;grid-row:1}.order-editor .order-line label:has([name=qty]){grid-column:3;grid-row:1}.order-editor .order-line label:has([name=price]){grid-column:4;grid-row:1}.order-editor .order-line>.close{grid-column:5;grid-row:1;margin-top:25px;width:28px;height:28px}.order-editor .line-category{grid-column:1/-1;grid-row:2;margin-top:0}.line-category>summary{font-size:10px;color:#78889e;cursor:pointer}.line-category label{max-width:320px;margin-top:9px}.order-editor .order-line .combo-list{z-index:12}.order-editor-hint{font-size:11px;line-height:1.6;color:#78889e;margin:10px 0 0}.order-editor-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:3px 0}.order-editor-bottom .check{margin:0;white-space:nowrap}.order-editor-bottom .check input{margin:0}.order-editor-bottom .total{font-size:18px;line-height:1.5;margin:0;text-align:right}.order-editor input,.order-editor select{min-width:0}.order-editor .combo input{font-size:12px}
@media(max-width:700px){#dialog.order-editor{max-height:96dvh}.order-editor .dialog-body{padding:0 14px 16px}.order-editor .dialog-head,.order-editor .dialog-footer{padding:15px}.order-editor-section>summary{padding:12px;gap:8px;flex-wrap:wrap}.order-editor-section>summary>span{display:none}.order-editor-section-body{padding:12px}.order-editor .form-grid{grid-template-columns:1fr}.order-editor .order-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 28px;gap:10px}.order-editor .order-line label:has([name=product_name]){grid-column:1/3;grid-row:1}.order-editor .order-line label:has([name=sku]){grid-column:1/3;grid-row:2}.order-editor .order-line label:has([name=qty]){grid-column:1;grid-row:3}.order-editor .order-line label:has([name=price]){grid-column:2;grid-row:3}.order-editor .order-line>.close{grid-column:3;grid-row:1}.order-editor .line-category{grid-row:4}.order-editor-bottom{align-items:flex-start;flex-direction:column}.order-editor-bottom .total{font-size:16px;text-align:left}.order-editor .dialog-footer .btn{min-height:40px}}
.kit-actions{display:flex;gap:10px;margin:4px 0 12px;flex-wrap:wrap}.kit-block{border:1px solid #dce4f1;border-radius:7px;margin:0 0 12px;background:#f8faff}.kit-block>summary{display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;list-style:none}.kit-block>summary::-webkit-details-marker{display:none}.kit-block>summary input{flex:1;min-width:0}.kit-ico{color:#3b5bdb;font-size:16px}.kit-lines{padding:2px 12px 0}.kit-lines .order-line:last-child{border-bottom:0;margin-bottom:6px}.kit-add{margin:0 12px 12px}.kit-total{margin-left:auto;font-weight:600;white-space:nowrap}.kit-badge{display:inline-block;background:#edf3ff;color:#3b5bdb;border-radius:4px;padding:1px 7px;font-size:11px;margin-right:6px;vertical-align:1px}.kit-head{display:flex;justify-content:space-between;gap:10px;background:#f5f7fc;border-radius:6px;padding:8px 12px;margin:10px 0 4px;font-size:13px}
