.operation-period,.operation-actions,.operation-pagination{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin:12px 0}
.operation-history .operation-products{white-space:pre-line;min-width:230px;max-width:380px;line-height:1.6}
#correction-product-section h3{font-size:14px;margin:12px 0 8px}#correction-products .table-wrap{max-height:260px;background:#fff}#correction-products table{table-layout:auto}#correction-products :is(th,td){padding:9px;font-size:13px}#correction-products :is(th,td):nth-child(2){white-space:normal;overflow-wrap:anywhere}#correction-products :is(th,td):nth-child(3){text-align:right;white-space:nowrap}
.operation-period label{min-width:160px}.operation-history .table-wrap{max-height:50dvh;background:#fff}.operation-history table{min-width:1000px;table-layout:auto}
.operation-history th,.operation-history td{font-size:13px;padding:9px;white-space:normal}.operation-history :is(th,td):first-child{width:85px;white-space:nowrap}.operation-history input[type=radio]{width:17px;min-height:0}
.operation-history tr{cursor:pointer}.operation-history tr.selected{background:#c4daf8!important}.operation-voided{color:#79504b;background:#fff1ec!important}
.operation-history td:last-child{max-width:380px;overflow-wrap:anywhere}.operation-pagination{justify-content:flex-end;align-items:center}.correction-details{white-space:pre-wrap;line-height:1.6}
#correction-dialog{border:2px solid #829cbb;background:#e8eff7}#correction-form{margin-bottom:0}#user-corrections{border:1px solid #a4b8d0;border-radius:6px;padding:12px;display:grid;gap:8px}#user-corrections legend{font-weight:700;font-size:13px}
@media(max-width:760px){.operation-period label{flex:1 1 130px}.operation-actions button{flex:1}.operation-pagination{justify-content:space-between}}
.manufacturing-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.manufacturing-toolbar h2{margin:0}.manufacturing-toolbar p{margin:5px 0 0}.manufacturing-toolbar .search{margin:0;min-width:240px}
#structures .search{max-width:460px;margin:10px 0 14px}
#structures .table-wrap{max-height:55dvh}
.manufacturing-number{text-align:right;white-space:nowrap}
#structure-list td:last-child{white-space:nowrap}
.manufacturing-dialog{width:min(1180px,calc(100vw - 32px));max-width:1180px}
.manufacturing-dialog form{grid-template-columns:2fr 1fr 2fr;margin-bottom:0}
.structure-add-row{display:grid;grid-template-columns:minmax(180px,1fr) 160px auto;gap:10px;align-items:end;padding:12px;border:1px solid #d8e4f3;border-radius:9px;background:#f5f9ff}
.structure-add-row>label{min-width:0;font-size:11px}
.structure-add-row input{padding:8px;min-width:0}
#structure-editor-items table{min-width:1000px;table-layout:fixed}
#structure-editor-items :is(th,td):nth-child(1){width:65px}
#structure-editor-items :is(th,td):nth-child(2){width:245px}
#structure-editor-items :is(th,td):nth-child(3){width:75px}
#structure-editor-items :is(th,td):nth-child(4){width:135px}
#structure-editor-items :is(th,td):nth-child(5){width:140px}
#structure-editor-items :is(th,td):nth-child(6){width:120px}
#structure-editor-items :is(th,td):nth-child(7){width:100px}
#structure-editor-items input{min-width:0;max-width:none;width:100%;padding:8px;font-size:12px}
#structure-editor-items input[type=number]{text-align:right}
#structure-editor-items .table-wrap{max-height:32dvh}
.manufacturing-totals{display:flex;align-items:center;gap:20px;flex-wrap:wrap;background:#f5f9fd;border:1px solid #dce6f1;border-radius:9px;padding:14px 18px;margin-top:14px}
.manufacturing-totals>div{min-width:150px;flex:1}.manufacturing-totals span{display:block;font-size:12px;color:#53647b}
.manufacturing-totals strong{display:block;font-size:23px;color:#183b5a;line-height:1.3;margin-top:5px}
.manufacturing-totals>p{flex-basis:100%;margin:0;font-size:12px;color:#596b82}
.manufacturing-total{border-left:2px solid #bdd3ef;padding-left:20px}
.manufacturing-total strong{color:#175cc9}
.manufacturing-section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:4px 0 12px;flex-wrap:wrap}
.manufacturing-section-heading h3{margin:0;font-size:16px}.manufacturing-section-heading span{font-size:12px;color:#53647b}
.manufacturing-placeholder{padding:26px;border:1px dashed #b7cbe4;border-radius:9px;color:#53647b;background:#f8fbff;font-size:14px}
.manufacturing-placeholder button{margin-left:10px}
#production-form{grid-template-columns:2fr 1fr 2fr;margin-bottom:0}
#production,#structures,#production>article,#production-form,#production-form>*,.manufacturing-dialog form>*{min-width:0;max-width:100%}
#production .table-wrap,.manufacturing-dialog .table-wrap{max-width:100%;width:100%}
.manufacturing-form-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #e3eaf4;padding-top:14px}
.production-entry-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
@media(max-width:760px){.production-entry-actions{width:100%}.production-entry-actions button{flex:1}}
#production-preview table,#production-detail table{min-width:850px}
#production-preview th:nth-child(n+4),#production-preview td:nth-child(n+4),#production-detail th:nth-child(n+4),#production-detail td:nth-child(n+4){text-align:right}
#production-preview .table-wrap{max-height:38dvh}
#production-detail-dialog{max-height:90dvh}.manufacturing-notes{white-space:pre-wrap;overflow-wrap:anywhere}
#production-history-count{font-size:12px;margin-bottom:0}
@media(max-width:1000px){#production-form,.manufacturing-dialog form{grid-template-columns:repeat(2,minmax(0,1fr))}#production-form>label:first-child{grid-column:1/-1}.structure-add-row{grid-template-columns:2fr 1fr}.structure-add-row>button{grid-column:1/-1}.manufacturing-toolbar .search{min-width:0}}
@media(max-width:760px){#production-form,.manufacturing-dialog form,.structure-add-row{grid-template-columns:1fr}.manufacturing-totals{gap:12px;padding:12px}.manufacturing-totals strong{font-size:20px}.manufacturing-total{border:0;padding-left:0}.manufacturing-toolbar{align-items:flex-start}.manufacturing-toolbar .search{width:100%}.manufacturing-form-actions button{width:100%}.manufacturing-dialog{width:calc(100vw - 20px)}}
/* Production workspace: clear stages, grouped inputs and a dedicated review area. */
#production>article{padding:0;overflow:hidden;border:2px solid #7f9bbd;box-shadow:0 2px 8px #203c6010;border-radius:9px;background:#dce6f2}
#production .production-heading{padding:10px 14px;margin:0;background:#c8d8eb;border-bottom:1px solid #8ea9c9;align-items:center}
.production-eyebrow{display:block;color:#3869a6;font-size:11px;font-weight:700;letter-spacing:1.4px;margin-bottom:3px}
#production .production-heading h2{font-size:19px;letter-spacing:-.5px;color:#183654}
#production .production-heading p{font-size:11px;margin-top:2px}
.production-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;margin:0;padding:9px 14px;gap:12px;border-bottom:1px solid #9fb4ce;background:#d5e1ef}
.production-steps li{display:flex;gap:8px;align-items:center;color:#64748b;position:relative}
.production-steps li>span{display:grid;place-items:center;flex-shrink:0;width:26px;height:26px;border:1px solid #dce5ef;border-radius:50%;background:#f5f7fa;font-size:13px;font-weight:700}
.production-steps strong,.production-steps small{display:block}.production-steps strong{font-size:13px}.production-steps small{font-size:11px;margin-top:2px}
.production-steps .is-current{color:#245ab5}.production-steps .is-current>span{background:#2563eb;color:white;border-color:#2563eb;box-shadow:0 0 0 4px #edf3ff}
.production-steps .is-complete>span{background:#e8f7ef;border-color:#bde4cf;color:#167347}
#production-form{padding:12px 14px;margin:0;gap:10px;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2fr)}
.production-form-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.production-form-title h3{margin:0;font-size:15px;color:#203c58}.production-form-title>span{font-size:12px;color:#64748b}
#production-form>label{font-weight:600;color:#3c506b;font-size:13px}#production-form input,#production-form select{min-height:36px;padding:7px 10px;background:#fff;border-color:#8fa7c5;margin-top:4px;font-weight:400}
#production-form :is(input,select,button):focus-visible{outline:3px solid #a9c9ff;outline-offset:3px}
#production .production-empty{display:flex;align-items:center;justify-content:center;gap:12px;padding:16px;min-height:96px;border:1px solid #95acc8;background:#cddbec;text-align:left}
.production-empty-icon{display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;background:#b9cde5;border-radius:8px;color:#517db5}.production-empty-icon svg{width:26px;height:26px}
.production-empty strong{font-size:14px;color:#244364}.production-empty p{margin:4px 0;font-size:12px}.production-empty div>span{font-size:12px;color:#64748b}
#production .manufacturing-form-actions{padding-top:10px;margin-top:0;border-color:#9fb4ce}.production-stock-note{display:flex;align-items:center;gap:10px;flex:1;min-width:220px}.production-stock-note>svg{width:21px;height:21px;color:#52769c;flex-shrink:0}.production-stock-note strong,.production-stock-note span{display:block}.production-stock-note strong{font-size:12px;color:#3b526d;margin-bottom:4px}.production-stock-note span{font-size:12px;color:#64748b}
#production-confirm{min-height:36px;padding:8px 16px}#production-confirm:disabled{background:#dce5f3;color:#536781;opacity:1;border-color:#dce5f3;cursor:not-allowed}
#production-preview .manufacturing-totals{background:#c6d7eb;padding:12px 14px;border:1px solid #8fa7c5;margin-top:10px}#production-preview .manufacturing-total{border-left:3px solid #2563eb}#production-preview .manufacturing-total strong{font-size:24px}
@media(max-width:1000px){#production-form{grid-template-columns:repeat(2,minmax(0,1fr))}#production-form>label:first-of-type{grid-column:1/-1}}
@media(max-width:760px){#production .production-heading{padding:12px}.production-steps{padding:10px 12px;gap:8px}.production-steps li{flex-direction:column;align-items:flex-start;gap:8px}.production-steps strong{font-size:12px}.production-steps small{display:none}#production-form{padding:12px;grid-template-columns:1fr}.production-form-title{align-items:flex-start;flex-direction:column;gap:5px}#production .production-empty{padding:14px 12px;align-items:flex-start;gap:12px}.production-empty-icon{width:38px;height:38px}.production-empty p{line-height:1.6}.production-entry-actions{flex-direction:column}.production-entry-actions button{width:100%}#production-preview .manufacturing-total{border-left:0;border-top:2px solid #cbdcf5;padding:12px 0 0;flex-basis:100%}}

/* Dense desktop layout for notebook displays; retain readable field sizes. */
main:has(#production:not([hidden])){padding-top:8px}
main:has(#production:not([hidden])) .page-heading{margin-bottom:8px;min-height:26px}
main:has(#production:not([hidden])) .page-heading h1{font-size:21px}
main:has(#production:not([hidden])) .page-heading p{font-size:12px;margin:0}
main:has(#production:not([hidden])) .order-draft-banner{padding:6px 12px;margin:0 0 8px;gap:8px;font-size:12px}
main:has(#production:not([hidden])) .order-draft-banner button{padding:6px 10px;min-height:32px;font-size:12px}
#production .production-heading button,#production .production-entry-actions button{min-height:36px;padding:7px 12px;font-size:12px}
#production .production-form-title h3{font-size:13px}
#production-preview .manufacturing-section-heading{margin:0 0 8px}
#production-preview .manufacturing-section-heading h3{font-size:14px}
#production-preview .table-wrap{border:1px solid #91a8c4;border-radius:6px;background:#fff;max-height:36dvh}
#production-preview th{background:#bdd0e6;color:#294666}
#production-preview :is(th,td){padding:8px 10px}
#production-preview .manufacturing-totals strong{font-size:21px;margin-top:3px}
#production-preview .manufacturing-total strong{font-size:24px}
@media(min-width:1101px){#production-form{grid-template-columns:minmax(0,2fr) minmax(120px,.8fr) minmax(0,1.7fr)}}
@media(min-width:761px) and (max-height:800px){.production-steps small{display:none}#production .production-heading p{margin-top:2px}.production-steps{padding-top:7px;padding-bottom:7px}}
/* Compact report header and Kardex summary for notebook screens. */
main:has(#reports:not([hidden])){padding-top:6px}
main:has(#reports:not([hidden])) .page-heading{margin-bottom:6px;min-height:25px}
#reports>article{padding:10px 12px;margin-bottom:8px}
#reports .report-toolbar{margin-bottom:8px;gap:8px}
#reports .report-toolbar h2{font-size:15px}
#reports .report-toolbar p{font-size:11px;margin:2px 0 0}
#reports #report-form{gap:8px;margin-bottom:5px}
#report-form>label{font-size:11px}
#report-form :is(input,select){min-height:32px;padding:6px 8px;font-size:12px;margin-top:3px}
#reports .report-actions button{min-height:32px;padding:6px 10px;font-size:11px}
#reports #report-filter-note,#reports #report-note,#reports .report-export-note{font-size:11px;margin:5px 0;line-height:1.4}
#reports .report-output-heading{padding-bottom:5px;margin-bottom:6px}
#reports .report-output-heading h2{font-size:15px}
#reports .report-output-heading p{font-size:11px}
#reports .report-metrics.is-kardex{display:block;margin-bottom:6px}
.kardex-summary{border:1px solid #869ebc;border-radius:5px;overflow:hidden;background:#e3ebf5;color:#203b58}
.kardex-caption{padding:5px 9px;background:#294666;color:white;font-size:12px;font-weight:700}
.kardex-product{display:flex;gap:5px 22px;flex-wrap:wrap;padding:7px 9px;font-size:11px;border-bottom:1px solid #a8bcd4}
.kardex-product strong{flex-basis:100%;font-size:12px}
#reports .kardex-summary table{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed}
#reports .kardex-summary :is(th,td){padding:4px 9px;font-size:11px;border-bottom:1px solid #c1cede;white-space:normal;min-width:0}
#reports .kardex-summary th{background:#d6e1ef;color:#294666;text-transform:none;letter-spacing:0}
#reports .kardex-summary :is(th,td):not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
#reports .kardex-summary tbody tr:nth-child(2){background:#cfdfef;font-weight:700}
#reports:has(.is-kardex) #report-table :is(th,td){padding:5px 8px;font-size:11px}
#reports:has(.is-kardex) #report-table th{background:#d6e1ef;color:#294666}
#reports:has(.is-kardex) #report-table tbody tr:nth-child(even){background:#f0f4f9}
#reports:has(.is-kardex) #report-table .table-wrap{max-height:49dvh}
@media(max-width:760px){.kardex-product{gap:5px 12px}#reports .kardex-summary :is(th,td){padding:5px;font-size:10px}}
/* Bordered report panels with a darker blue-gray surface. */
#reports>article{border:2px solid #829cbb;border-radius:8px;background:#dce6f2;box-shadow:0 2px 6px #203c6010}
#reports .report-toolbar{border-bottom:1px solid #a4b8d0;padding-bottom:8px}
#reports .report-toolbar h2,#reports .report-output-heading h2{color:#203e60}
#reports .report-toolbar p,#reports #report-filter-note,#reports #report-note,#reports .report-export-note{color:#435b78}
#reports #report-form>label{color:#304d6d;font-weight:600}
#reports #report-form :is(input,select){background:#fff;border:1px solid #8da5c3;color:#203b58}
#reports #report-form :is(input,select):focus-visible{outline:2px solid #3978d4;outline-offset:2px}
#reports #report-empty{background:#d4e0ee;color:#405b7b}
#reports .report-output-heading{border-color:#a4b8d0}
#reports .report-metric{background:#cbdbee;border:1px solid #92aaca;border-radius:6px}
#reports .report-metric span{color:#405b7b}
#reports .report-metric strong{color:#203e60}
#reports #report-table .table-wrap{border:1px solid #8da5c3;border-radius:5px;background:#fff}
#reports #report-table th{background:#bdcfe4;color:#294666;border-bottom:1px solid #95acc8}
#reports #report-table tbody tr:nth-child(even){background:#edf2f8}
#reports #report-table tbody tr:hover{background:#deebfa}
#reports .report-pagination{border-top:1px solid #a4b8d0;padding-top:7px}
#reports .kardex-summary{background:#d3e0ef;border-color:#829cbb}
#reports .kardex-summary th{background:#c2d3e7}
#reports .kardex-summary tbody tr:nth-child(2){background:#bcd1e8}
/* Keep the stock product identity visible during horizontal scrolling. */
#reports #report-table .report-frozen-product{border-collapse:separate;border-spacing:0;--frozen-code-width:98px}
#reports #report-table .report-frozen-product tr>:nth-child(-n+2){position:sticky;left:0;z-index:2;background:#fff}
#reports #report-table .report-frozen-product tr>:nth-child(2){left:var(--frozen-code-width);box-shadow:2px 0 0 #95acc8}
#reports #report-table .report-frozen-product thead tr>:nth-child(-n+2){top:0;z-index:4;background:#bdcfe4}
#reports #report-table .report-frozen-product tbody tr:nth-child(even)>:nth-child(-n+2){background:#edf2f8}
#reports #report-table .report-frozen-product tbody tr:hover>:nth-child(-n+2){background:#deebfa}
/* Shared framed surfaces for the daily dashboard and registration modules. */
:is(#overview,#products,#structures,#customers,#integrations){--module-surface:#dce6f2;--module-border:#829cbb;--module-heading:#203e60;--module-muted:#435b78}
:is(#overview,#products,#structures,#customers,#integrations) article{border:1px solid var(--module-border);border-radius:8px;background:var(--module-surface);box-shadow:0 2px 6px #203c6010}
:is(#products,#structures,#customers,#integrations)>article{border-width:2px;padding:12px 14px}
:is(#overview,#products,#structures,#customers,#integrations) :is(h2,h3){color:var(--module-heading)}
:is(#overview,#products,#structures,#customers,#integrations) .muted{color:var(--module-muted)}
:is(#products,#structures,#customers) :is(.registry-toolbar,.manufacturing-toolbar){border-bottom:1px solid #a4b8d0;padding-bottom:10px;margin-bottom:10px;gap:10px}
:is(#products,#structures,#customers,#integrations) label{color:#304d6d}
:is(#products,#structures,#customers,#integrations) :is(input,select,textarea){background:#fff;border-color:#8da5c3;color:#203b58}
:is(#products,#structures,#customers,#integrations) :is(input,select,textarea):focus-visible{outline:2px solid #3978d4;outline-offset:2px}
:is(#overview,#products,#structures,#customers,#integrations) .table-wrap{border:1px solid #91a8c4;border-radius:6px;background:#fff}
:is(#overview,#products,#structures,#customers,#integrations) thead th{background:#bdcfe4;color:#294666;border-bottom:1px solid #95acc8}
:is(#overview,#products,#structures,#customers,#integrations) tbody td{border-bottom-color:#dde5ef}
:is(#overview,#products,#structures,#customers,#integrations) tbody tr:nth-child(even){background:#edf2f8}
:is(#overview,#products,#structures,#customers,#integrations) tbody tr:hover{background:#deebfa}
:is(#products,#customers) .registry-table tbody tr.selected{background:#c4daf8;color:#163e72;box-shadow:inset 3px 0 #246bfd}
:is(#products,#customers) .registry-table tbody tr.selected:hover{background:#b9d3f5}
:is(#products,#structures,#customers,#integrations) .notice{background:#cbdbee;border:1px solid #96adcb;color:#304d6d}
#overview .overview-daybar{padding:7px 10px;border:1px solid #a0b5cf;border-radius:7px;background:#d5e1ef}
#overview .overview-kpi{background:#d5e2f1;border:1px solid #829cbb;color:#203e60}
#overview .overview-kpi:hover{background:#c8dbf0;border-color:#547eaf}
#overview .overview-kpi :is(.overview-kpi-label,small){color:#435b78}
#overview .overview-kpi.needs-attention{background:#fff0e8;border-color:#ce947b}
#overview .overview-kpi.needs-attention strong{color:#963e28}
#overview .overview-stock-alerts{background:#f4e8ce;border:1px solid #c4a164;border-left:4px solid #ba852b}
#overview .overview-stock-alerts h2{color:#694c1b}
#overview .overview-stock-alerts .panel-title p{color:#715c38}
#overview .overview-stock-values>div{border-color:#9fb5d0}
#overview .overview-stock-values :is(span,strong){color:#304d6d}
#overview :is(.monthly-summary,.monthly-detail){background:#cbdbee;border:1px solid #9bb1cd;border-radius:6px}
#overview .overview-meta{border-top-color:#9fb5d0;color:#435b78}
:is(#product-dialog,#customer-dialog,#structure-dialog){border:2px solid #829cbb;background:#dce6f2;border-radius:9px}
:is(#product-dialog,#customer-dialog,#structure-dialog) :is(.dialog-header,.form-actions){border-color:#a4b8d0}
:is(#product-dialog,#customer-dialog,#structure-dialog) :is(h2,h3,label){color:#203e60}
:is(#product-dialog,#customer-dialog,#structure-dialog) :is(input,select,textarea){background:#fff;border-color:#8da5c3}
:is(#product-dialog,#customer-dialog,#structure-dialog) .muted{color:#435b78}
#structure-dialog .structure-add-row,#structure-dialog .manufacturing-totals{background:#cbdbee;border-color:#96adcb}
@media(max-width:760px){:is(#products,#structures,#customers,#integrations)>article{padding:10px 12px}#overview .overview-daybar{gap:6px}}
/* Dashboard refinement: lighter interiors and more room for daily work. */
#overview article{background:#edf2f8}
#overview .overview-daybar{background:#e6edf6}
#overview .overview-kpi{background:#e4edf7}
#overview .overview-kpi:hover{background:#d8e6f6}
#overview .overview-kpi.needs-attention{background:#fff0e8}
#overview .overview-stock-alerts{background:#faf1dd}
#overview .overview-availability{display:flex;align-items:center;flex-wrap:wrap;gap:5px 14px;margin:-2px 0 8px;padding:6px 10px;border:1px solid #afbed0;border-radius:6px;background:#eef2f7;color:#52667f;font-size:11px}
#overview .overview-availability .overview-stock-zero{margin:0;padding:0;background:transparent;font-size:11px;font-weight:600;color:#334d6b}
#overview .monthly-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0;background:#e0eaf5;border-color:#a8bbd3}
#overview .monthly-summary>div{min-width:0;padding:8px 12px}
#overview .monthly-summary>div+div{border-left:1px solid #b2c3d8}
#overview .monthly-summary strong{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#overview .monthly-summary span{color:#435b78}
#overview .monthly-detail{background:#e6edf6;padding:8px 12px}
#overview .monthly-chart{height:166px;padding:5px 4px 4px;gap:8px;align-items:stretch}
#overview .month-bar{min-height:0;padding:3px;min-width:68px}
#overview .month-bar-track{height:108px;min-height:0;flex:1 1 auto;margin:5px 0}
#overview .month-bar-value{font-size:10px;line-height:15px}
#overview .month-bar-label{font-size:11px;line-height:16px}
#overview .month-bar[aria-pressed=true]{background:#dce8f9;box-shadow:inset 0 0 0 1px #a9c2e6}
@media(max-height:800px) and (min-width:761px){#overview .monthly-chart{height:144px}#overview .month-bar-track{height:86px}}
@media(max-width:760px){#overview .monthly-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#overview .monthly-summary>div:nth-child(3){border-left:0}#overview .monthly-summary>div:nth-child(n+3){border-top:1px solid #b2c3d8}#overview .monthly-summary>div{padding:8px 10px}#overview .monthly-chart{height:156px}#overview .overview-availability{gap:4px}}
/* Product list: compact controls, readable headings and operational emphasis. */
#products>article{background:#e8eff7;padding:10px 12px}
#products .registry-toolbar{padding-bottom:8px;margin-bottom:8px;gap:8px}
#products .registry-actions button{min-height:34px;padding:7px 12px;font-size:12px}
#products .registry-toolbar .search{font-size:12px;gap:3px}
#products .registry-toolbar .search input{min-height:35px;padding:7px 10px;font-size:13px}
#products-table table{width:100%;min-width:1280px;table-layout:fixed}
#products-table :is(th,td){padding:8px;font-size:12px;overflow:visible;text-overflow:clip}
#products-table th{white-space:normal;line-height:1.3;font-weight:700}
#products-table :is(th,td):first-child{width:68px;text-align:center;white-space:normal}
#products-table :is(th,td):nth-child(2){width:96px;white-space:nowrap}
#products-table :is(th,td):nth-child(3){width:auto;min-width:0;white-space:normal;overflow-wrap:anywhere}
#products-table :is(th,td):nth-child(4){width:64px;text-align:center}
#products-table :is(th,td):nth-child(5),#products-table :is(th,td):nth-child(6),#products-table :is(th,td):nth-child(7){width:84px;text-align:right}
#products-table :is(th,td):nth-child(8){width:116px;text-align:right}
#products-table :is(th,td):nth-child(9){width:132px;text-align:right}
#products-table :is(th,td):nth-child(10){width:76px;text-align:right}
#products-table :is(th,td):nth-child(11){width:120px;white-space:normal;overflow-wrap:anywhere}
#products-table th:nth-child(7){background:#aac5e3;color:#203e60}
#products-table .product-available{font-weight:700;font-variant-numeric:tabular-nums;box-shadow:inset 1px 0 #c8d7e9,inset -1px 0 #c8d7e9}
#products-table .stock-badge{font-size:10px;line-height:1.3;margin-top:3px}
#products-table .product-cost-warning{display:block;margin-top:3px;font-size:10px;font-weight:600;line-height:1.3;color:#81530b;white-space:normal}
#products-table .product-price-warning{box-shadow:inset 0 -2px #c58f32}
#products-count{margin-top:7px;font-size:12px}
@media(max-width:760px){#products .registry-toolbar .search{width:100%;max-width:none}#products .registry-actions{gap:5px}}
/* Structure registry: prioritize the product description and per-unit cost. */
#structures>article{background:#e8eff7;padding:10px 12px}
#structures .manufacturing-toolbar{padding-bottom:8px;margin-bottom:8px}
#structures .manufacturing-toolbar h2{font-size:16px}
#structures .manufacturing-toolbar p{font-size:12px;margin-top:4px}
#structures .structure-list-toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:10px}
#structures .structure-list-toolbar .search{margin:0;max-width:460px;width:100%;font-size:12px;gap:3px}
#structures .structure-list-toolbar input{min-height:35px;padding:7px 10px;font-size:13px}
#structures #structure-new{min-height:35px;padding:7px 12px;font-size:12px;white-space:nowrap}
#structures #structure-list table{width:100%;table-layout:fixed;min-width:1040px}
#structures #structure-list :is(th,td){padding:8px;font-size:12px;line-height:1.4}
#structures #structure-list th{white-space:normal;text-transform:none;letter-spacing:0}
#structures #structure-list :is(th,td):nth-child(1){width:100px;white-space:nowrap}
#structures #structure-list :is(th,td):nth-child(2){width:auto;min-width:0;white-space:normal;overflow-wrap:anywhere}
#structures #structure-list :is(th,td):nth-child(3){width:90px;text-align:right;white-space:nowrap}
#structures #structure-list :is(th,td):nth-child(4){width:100px;text-align:center}
#structures #structure-list :is(th,td):nth-child(5){width:130px;text-align:right;white-space:nowrap}
#structures #structure-list :is(th,td):nth-child(6){width:140px;text-align:right;white-space:nowrap}
#structures #structure-list td:nth-child(6){font-weight:700;color:#203e60;box-shadow:inset 1px 0 #c8d7e9,inset -1px 0 #c8d7e9;font-variant-numeric:tabular-nums}
#structures #structure-list th:nth-child(6){background:#aac5e3}
#structures #structure-list :is(th,td):nth-child(7){width:70px;text-align:center}
#structures #structure-list :is(th,td):nth-child(8){width:200px;text-align:right;white-space:nowrap}
#structures #structure-list button{min-height:32px;padding:6px 10px;font-size:12px}
#structures #structure-list [data-delete-structure]{margin-left:8px}
#structures #structure-count{font-size:12px;margin:7px 0 0;color:#435b78}
@media(max-width:760px){#structures .structure-list-toolbar{flex-wrap:wrap;gap:8px}#structures .structure-list-toolbar .search{max-width:none}#structures #structure-new{margin-left:auto}}
/* Customer registry: compact contacts, clear consent and neutral missing values. */
#customers>article{background:#e8eff7;padding:10px 12px}
#customers .registry-toolbar{padding-bottom:8px;margin-bottom:8px;gap:8px}
#customers .registry-actions button{min-height:34px;padding:7px 12px;font-size:12px}
#customers .registry-toolbar .search{font-size:12px;gap:3px}
#customers .registry-toolbar .search input{min-height:35px;padding:7px 10px;font-size:13px}
#customers .notice{margin:6px 0 8px;padding:6px 9px;border-radius:5px;background:#e0e9f4;border-color:#afc1d8;font-size:11px;line-height:1.4}
#customers-table table{width:100%;min-width:1060px;table-layout:fixed}
#customers-table :is(th,td){padding:8px;font-size:12px;line-height:1.4}
#customers-table th{white-space:normal}
#customers-table :is(th,td):first-child{width:68px;text-align:center;white-space:normal}
#customers-table :is(th,td):nth-child(2){width:64px;text-align:center}
#customers-table :is(th,td):nth-child(3){width:29%;white-space:normal;overflow-wrap:anywhere}
#customers-table td:nth-child(3){font-weight:400;color:inherit}
#customers-table :is(th,td):nth-child(4){width:16%;white-space:normal;overflow-wrap:anywhere}
#customers-table :is(th,td):nth-child(5){width:auto;white-space:normal;overflow-wrap:anywhere}
#customers-table :is(th,td):nth-child(6){width:146px;white-space:nowrap;font-variant-numeric:tabular-nums}
#customers-table :is(th,td):nth-child(7){width:144px;white-space:normal}
#customers-table .customer-missing{color:#718096}
#customers-table .customer-consent{display:inline-block;padding:3px 7px;border:1px solid #c3cfdd;border-radius:5px;font-size:10px;font-weight:600;line-height:1.4;white-space:nowrap}
#customers-table .customer-consent.is-authorized{background:#e3f2e9;color:#256344;border-color:#acd0bc}
#customers-table .customer-consent.is-neutral{background:#edf1f6;color:#53647b;border-color:#c3cfdd}
#customers-count{margin-top:7px;font-size:12px}
@media(max-width:760px){#customers .registry-toolbar .search{width:100%;max-width:none}#customers .registry-actions{gap:5px}}
/* Sender settings: grouped identity and connection fields. */
#integrations>article{background:#e8eff7;padding:12px 14px}
#integrations .sender-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;border-bottom:1px solid #a4b8d0;padding-bottom:10px;margin-bottom:10px}
#integrations .sender-heading h2{font-size:16px;margin:0}
#integrations .sender-status{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin:0;font-size:11px;color:#435b78}
#integrations .sender-status-badge{padding:4px 8px;border:1px solid #b5c4d8;border-radius:5px;font-weight:600}
#integrations .sender-status-badge.is-ready{background:#e3f2e9;color:#256344;border-color:#acd0bc}
#integrations .sender-status-badge.is-pending{background:#fff3db;color:#795310;border-color:#d8bb80}
#integrations #integration-form{grid-template-columns:1fr;gap:12px;margin:0}
#integrations fieldset{min-width:0;margin:0;padding:10px 12px 12px;border:1px solid #9fb4ce;border-radius:6px;background:#dce7f3;display:grid;gap:10px 12px}
#integrations legend{padding:0 7px;font-size:13px;font-weight:700;color:#294666}
#integrations .sender-identity{grid-template-columns:repeat(2,minmax(0,1fr))}
#integrations .sender-connection{grid-template-columns:minmax(0,1.3fr) 110px minmax(140px,.7fr) minmax(0,1fr) minmax(0,1fr)}
#integrations fieldset label{font-size:12px;gap:4px;min-width:0}
#integrations fieldset :is(input,select){width:100%;min-width:0;min-height:36px;padding:7px 10px;font-size:13px}
#integrations #smtp-secret-note{font-size:11px;line-height:1.4;font-weight:400}
#integrations .form-actions{margin:0;padding-top:10px;border-color:#a4b8d0}
#integrations .form-actions button{min-height:35px;padding:7px 12px;font-size:12px}
#integrations #clear-email-config{margin-right:auto}
#integrations .sender-security-note{font-size:11px;line-height:1.5;margin:10px 0 0;color:#52667f}
@media(max-width:1200px){#integrations .sender-connection{grid-template-columns:minmax(0,1fr) 110px minmax(0,1fr)}#integrations .sender-connection label:nth-child(4){grid-column:1/3}}
@media(max-width:760px){#integrations .sender-identity,#integrations .sender-connection{grid-template-columns:1fr}#integrations .sender-connection label:nth-child(4){grid-column:auto}#integrations .form-actions{justify-content:space-between;flex-wrap:wrap}#integrations .form-actions button{flex:1}#integrations #clear-email-config{margin-right:0}}
/* Production refinement: lighter form, compact guidance and explicit unit. */
#production>article{background:#e8eff7}
#production .production-heading{padding:9px 14px;background:#d3e0ef}
#production .production-heading h2{font-size:17px}
#production .production-steps{background:#e0eaf5;padding-top:8px;padding-bottom:8px}
#production #production-form{background:#edf2f8;padding-top:12px;gap:10px}
#production .production-empty{min-height:70px;padding:12px 16px;background:#e0eaf5;border-color:#a5bad3}
#production .production-empty strong{font-size:13px}
#production .production-empty p{margin:3px 0}
#production .production-empty div>span{font-size:11px}
#production .production-quantity-field{display:flex;align-items:stretch;min-width:0;margin-top:4px;border:1px solid #8fa7c5;border-radius:8px;overflow:hidden;background:#fff}
#production .production-quantity-field input{flex:1;min-width:0;width:100%;margin:0;border:0;border-radius:0;box-shadow:none}
#production #production-unit{display:flex;align-items:center;justify-content:center;min-width:46px;max-width:90px;padding:0 8px;background:#d7e4f3;border-left:1px solid #a5bad3;color:#304d6d;font-size:12px;font-weight:700;overflow-wrap:anywhere}
#production .production-quantity-field:focus-within{outline:2px solid #3978d4;outline-offset:2px}
#production #production-confirm:disabled{background:#d0dceb;color:#52647b;border:1px solid #9eb0c8;opacity:1}
#production #production-recalculate:disabled{background:#e7edf5;color:#63758d;border-color:#adbed2;opacity:1;cursor:default}
#production .manufacturing-totals{background:#dce8f5}
@media(max-width:760px){#production .production-heading{padding:10px 12px}#production .production-empty{padding:12px}}
/* Inventory adjustments: match the compact framed registry modules. */
#movements>article{border:2px solid #829cbb;border-radius:8px;background:#e8eff7;box-shadow:0 2px 6px #203c6010;padding:10px 12px}
#movements .registry-toolbar{border-bottom:1px solid #a4b8d0;padding-bottom:8px;margin-bottom:8px;gap:8px}
#movements .registry-actions button{min-height:34px;padding:7px 12px;font-size:12px}
#movements .registry-toolbar .search{font-size:12px;gap:3px;color:#304d6d}
#movements .registry-toolbar .search input{min-height:35px;padding:7px 10px;font-size:13px;background:#fff;border-color:#8da5c3;color:#203b58}
#movements .registry-toolbar input:focus-visible{outline:2px solid #3978d4;outline-offset:2px}
#movements>article>p.muted{font-size:11px;line-height:1.4;margin:6px 0 8px;color:#435b78}
#movements .table-wrap{border:1px solid #91a8c4;border-radius:6px;background:#fff}
#movements-table table{width:100%;min-width:1120px;table-layout:fixed}
#movements-table :is(th,td){padding:8px;font-size:12px;line-height:1.4}
#movements-table th{background:#bdcfe4;color:#294666;border-bottom:1px solid #95acc8;white-space:normal}
#movements-table td{border-bottom-color:#dde5ef}
#movements-table :is(th,td):first-child{width:68px;text-align:center;white-space:normal}
#movements-table :is(th,td):nth-child(2){width:150px;white-space:normal}
#movements-table :is(th,td):nth-child(3){width:auto;white-space:normal;overflow-wrap:anywhere}
#movements-table :is(th,td):nth-child(4){width:146px;white-space:normal}
#movements-table :is(th,td):nth-child(5){width:100px;text-align:right;font-weight:700}
#movements-table :is(th,td):nth-child(6),#movements-table :is(th,td):nth-child(7){width:120px;text-align:right;font-variant-numeric:tabular-nums}
#movements-table :is(th,td):nth-child(8){width:132px;white-space:normal;overflow-wrap:anywhere}
#movements-table tbody tr:nth-child(even){background:#edf2f8}
#movements-table tbody tr:hover{background:#deebfa}
#movements-table tbody tr.selected{background:#c4daf8;color:#163e72;box-shadow:inset 3px 0 #246bfd}
#movements-table tbody tr.selected:hover{background:#b9d3f5}
#movements-table .empty-state{padding:22px 14px;border:1px dashed #9fb4ce;border-radius:6px;background:#dce7f3;color:#304d6d;margin:8px 0}
#movements-table .empty-state strong{font-size:13px}
#movements-table .empty-state p{font-size:12px;margin:6px 0 0;color:#52667f}
#movements #movement-count{font-size:12px;margin:7px 0 0;color:#435b78}
#movement-dialog{border:2px solid #829cbb;border-radius:9px;background:#e8eff7;padding:16px}
#movement-dialog :is(.dialog-header,.form-actions){border-color:#a4b8d0}
#movement-dialog .dialog-header{padding-bottom:10px}
#movement-dialog .dialog-header h2{font-size:18px;color:#203e60}
#movement-dialog .muted{font-size:12px;color:#435b78}
#movement-dialog form{gap:12px;margin-top:12px}
#movement-dialog label{font-size:12px;color:#304d6d}
#movement-dialog :is(input,select){min-height:36px;padding:7px 10px;font-size:13px;background:#fff;border-color:#8da5c3;color:#203b58}
#movement-dialog :is(input,select):focus-visible{outline:2px solid #3978d4;outline-offset:2px}
#movement-dialog .form-actions button{min-height:35px;padding:7px 12px;font-size:12px}
#movement-dialog #movement-cost{border:1px solid #a8bcd5;background:#dce7f3;border-radius:6px;padding:9px 11px}
@media(max-width:760px){#movements .registry-toolbar .search{width:100%;max-width:none}#movements .registry-actions{gap:5px}#movement-dialog{padding:12px}}
/* Sales workspace: compact entry with review actions alongside the total. */
#sales>article{padding:10px 12px;margin-bottom:9px;border:2px solid #829cbb;border-radius:8px;background:#e8eff7;box-shadow:0 2px 6px #203c6010}
#sales :is(h2,h3){color:#203e60}
#sales .muted{color:#435b78}
#sales .open-orders-panel .panel-title{margin-bottom:0;gap:10px;align-items:center}
#sales .open-orders-panel h2{font-size:15px;margin:0}
#sales #open-orders-count{font-size:12px;margin:4px 0 0}
#sales .order-entry{padding:10px 12px;margin:0 0 10px;background:#dce7f3;border:1px solid #91aaca;border-radius:7px}
#sales .order-heading{gap:10px;margin-bottom:8px;align-items:center}
#sales .order-heading h2{font-size:16px;margin:0}
#sales .order-number{font-size:12px;padding:3px 8px}
#sales .order-step{font-size:11px;color:#435b78}
#sales #sale-form{margin:0 0 6px;gap:10px 12px}
#sales :is(#sale-form,#sale-item-form) label{font-size:13px;gap:4px;color:#304d6d}
#sales :is(#sale-form,#sale-item-form) :is(input:not([type=checkbox]),select){min-height:36px;padding:7px 10px;font-size:14px;background:#fff;border-color:#8da5c3}
#sales #order-client-contact{font-size:12px;margin:5px 0;line-height:1.4}
#sales .order-email-option{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin:6px 0 10px;padding:6px 9px;border:1px solid #abc0d9;border-radius:5px;background:#edf3fa}
#sales .order-email-option label{margin:0;font-size:12px;gap:7px}
#sales .order-email-option small{margin:0;padding:0;font-size:11px;color:#52667f}
#sales #sale-item-form{grid-template-columns:minmax(0,2.5fr) minmax(110px,.7fr) minmax(160px,1fr) minmax(100px,.6fr);gap:9px 12px;margin:0;padding-top:8px;border-top:1px solid #a9bdd6}
#sales #sales-discount-help{font-size:10px;line-height:1.3}
#sales #item-price-preview{margin:0;padding:6px 9px;min-height:0;font-size:12px;line-height:1.4;border-color:#abc0d9;background:#edf3fa}
#sales #sale-item-form>.wide:last-child{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
#sales button{min-height:35px;padding:7px 12px;font-size:13px}
#sales #sale-items{margin:8px 0;font-size:13px;color:#435b78}
#sales .table-wrap{background:#fff;border:1px solid #91a8c4;border-radius:6px}
#sales .table-wrap th{background:#bdcfe4;color:#294666;border-bottom-color:#95acc8}
#sales .table-wrap :is(th,td){padding:8px 10px;font-size:12px}
#sales .table-wrap tbody tr:nth-child(even){background:#edf2f8}
#sales .table-wrap tbody tr:hover{background:#deebfa}
#sales .sale-finish{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 18px;padding:10px 12px;margin:8px 0;background:#cfdef0;border:1px solid #96adcb;border-radius:6px}
#sales .sale-finish #order-discount-summary{flex:1;font-size:12px;min-width:200px}
#sales .sale-finish>div:has(#sale-total){margin-left:auto;font-size:12px;text-align:right;color:#304d6d}
#sales #sale-total{display:block;font-size:24px;line-height:1.25;margin-top:2px;color:#183e6c;font-variant-numeric:tabular-nums}
#sales .sale-finish .order-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0}
#sales #clear-order{margin-right:8px}
#sales #finish-sale:disabled{background:#dce5f3;color:#536781;border:1px solid #9eb0c8;opacity:1}
#sales>article>p.muted{font-size:11px;margin:6px 0 0;line-height:1.4}
#sales>article:last-child>h2{font-size:15px;margin-bottom:5px}
#sales #sales-history-period{font-size:12px;margin:4px 0 8px}
@media(max-width:1100px){#sales #sale-item-form{grid-template-columns:repeat(3,minmax(0,1fr))}#sales #sale-item-form>label:first-child{grid-column:1/-1}#sales .sale-finish .order-buttons{justify-content:flex-end;width:100%}}
@media(max-width:760px){#sales #sale-form,#sales #sale-item-form{grid-template-columns:1fr}#sales .order-heading{align-items:flex-start;flex-wrap:wrap}#sales .order-email-option{align-items:flex-start}#sales .sale-finish{padding:9px}#sales .sale-finish .order-buttons button{flex:1}#sales #clear-order{margin-right:0}#sales .order-entry{padding:10px}}
/* Sales sections: assemble first, then pending orders, then completed sales. */
#sales>article.sales-assembly-panel{background:#edf4fc;border-color:#769bc7;border-top:4px solid #3978c6}
#sales .sales-assembly-panel .order-entry{background:#e0ebf8;border-color:#a1b9d7}
#sales .sales-assembly-panel .order-heading{padding-bottom:8px;border-bottom:1px solid #abc0db}
#sales .sales-assembly-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
#sales .sales-assembly-heading-actions #new-order{order:2}
#sales .sales-assembly-panel .sale-finish{background:#d7e6f8;border-color:#9eb9da}
#sales .sales-assembly-panel .table-wrap th{background:#c5d8ef}
#sales>article.open-orders-panel{background:#fbf4e5;border-color:#c4a265;border-top:4px solid #b9862e}
#sales .open-orders-panel .panel-title{padding-bottom:7px;margin-bottom:8px;border-bottom:1px solid #ddc89e}
#sales .open-orders-panel h2{color:#775218}
#sales .open-orders-panel #open-orders-count{color:#7a6440}
#sales .open-orders-panel .table-wrap{border-color:#cdb582}
#sales .open-orders-panel .table-wrap th{background:#eaddbd;color:#654b1f;border-bottom-color:#cdb582}
#sales .open-orders-panel .table-wrap tbody tr:nth-child(even){background:#faf5e9}
#sales .open-orders-panel .table-wrap tbody tr:hover{background:#f4e8cc}
#sales .open-orders-panel .table-wrap tbody tr.active-order{background:#f1e2bf}
#sales>article.sales-history-panel{background:#eef6f1;border-color:#87ad99;border-top:4px solid #438562}
#sales .sales-history-panel>h2{color:#2c6247;padding-bottom:7px;border-bottom:1px solid #b2cdbd}
#sales .sales-history-panel #sales-history-period{color:#4f705d}
#sales .sales-history-panel .table-wrap{border-color:#99bba9}
#sales .sales-history-panel .table-wrap th{background:#cee2d6;color:#305b43;border-bottom-color:#99bba9}
#sales .sales-history-panel .table-wrap tbody tr:nth-child(even){background:#eff6f1}
#sales .sales-history-panel .table-wrap tbody tr:hover{background:#e0eee5}
#sales .open-orders-panel .table-wrap{max-height:230px}
#sales .sales-history-panel .table-wrap{max-height:280px}
@media(max-width:760px){#sales .sales-assembly-heading-actions{width:100%;justify-content:space-between}#sales .sales-assembly-heading-actions #new-order{order:0}}
/* Keep saved status within assembly; separate cancellation from completion. */
#sales #order-draft-status.order-inline-status{margin:0 0 8px;padding:6px 9px;min-height:0;border-radius:5px;font-size:12px;line-height:1.4;box-shadow:none}
#sales #order-draft-status.order-inline-status.is-saved{background:#e4f1ea;border:1px solid #a6cbb5;color:#2c6043}
#sales .sale-finish>#clear-order{margin:0 18px 0 0;background:#fff8f8;color:#a54141;border:1px solid #d7a5a5}
#sales .sale-finish>#clear-order:hover{background:#fbeaea;border-color:#bf7777}
#sales .sale-finish>#clear-order:disabled{opacity:.5}
@media(max-width:1100px){#sales .sale-finish>#clear-order{margin-right:0}#sales .sale-finish .order-buttons{border-top:1px solid #a9bdd6;padding-top:8px}}
@media(max-width:760px){#sales .sale-finish>#clear-order{flex:0 1 auto}}
/* Report refinement: clear separation between query and results. */
#reports>article:first-child{background:#e8eff7;border-color:#829cbb}
#reports .report-toolbar{padding-bottom:8px;margin-bottom:10px}
#reports .report-toolbar h2{font-size:16px}
#reports .report-toolbar p{font-size:12px;line-height:1.4}
#reports #report-form{gap:9px 10px}
#reports #report-form>label{font-size:12px;font-weight:600}
#reports #report-form :is(input,select){min-height:36px;font-size:13px;padding:7px 9px}
#reports #report-form .report-actions{gap:7px}
#reports #report-form .report-actions button{min-height:36px;padding:7px 12px;font-size:13px}
#reports #report-generate{box-shadow:0 2px 4px #246bfd20;font-weight:700}
#reports #report-filter-note{font-size:12px;line-height:1.4;margin:7px 0 0}
#reports #report-empty{border:1px dashed #a6b8cf;background:#f3f6fa;color:#52667f;padding:16px 12px;font-size:13px;box-shadow:none}
#reports #report-output{background:#f7f9fc;border-color:#92aac7;border-top:3px solid #547eaf}
#reports .report-output-heading{padding-bottom:9px;margin-bottom:9px;align-items:flex-start;gap:10px 16px}
#reports .report-output-heading h2{font-size:17px}
#reports .report-output-heading p{font-size:12px}
#reports .report-output-heading>.report-result-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
#reports .report-result-actions .report-actions{display:flex;gap:7px;flex-wrap:wrap}
#reports .report-result-actions button{min-height:35px;padding:7px 11px;font-size:12px}
#reports .report-metric{background:#e4edf7}
#reports #report-note,#reports .report-export-note{font-size:12px;line-height:1.4}
@media(max-width:760px){#reports .report-output-heading>.report-result-actions{align-items:flex-start;width:100%}#reports .report-result-actions .report-actions{width:100%}#reports .report-result-actions button{flex:1}}
/* User administration: consistent framed surfaces and readable role widths. */
#users>article{padding:10px 12px;border:2px solid #829cbb;border-radius:8px;background:#e8eff7;box-shadow:0 2px 6px #203c6010}
#users .panel-title{align-items:center;gap:10px;border-bottom:1px solid #a4b8d0;padding-bottom:9px;margin-bottom:10px}
#users .panel-title h2{font-size:16px;color:#203e60;margin:0}
#users .panel-title p{font-size:12px;line-height:1.4;color:#435b78;margin:4px 0 0}
#users #user-include,#users-table button{min-height:34px;padding:7px 12px;font-size:12px}
#users-table .table-wrap{border:1px solid #91a8c4;border-radius:6px;background:#fff;max-height:60dvh}
#users-table table{width:100%;min-width:760px;table-layout:fixed}
#users-table :is(th,td){padding:9px 10px;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:normal;word-break:normal}
#users-table th{background:#bdcfe4;color:#294666;border-bottom:1px solid #95acc8}
#users-table td{border-bottom-color:#dde5ef}
#users-table :is(th,td):nth-child(1){width:34%;overflow-wrap:anywhere}
#users-table td:nth-child(1){font-weight:600;color:#294666}
#users-table :is(th,td):nth-child(2){width:auto;overflow-wrap:anywhere}
#users-table :is(th,td):nth-child(3){width:215px}
#users-table :is(th,td):nth-child(4){width:100px}
#users-table :is(th,td):nth-child(5){width:96px;text-align:center}
#users-table tbody tr:nth-child(even){background:#edf2f8}
#users-table tbody tr:hover{background:#deebfa}
#users-table .user-status{display:inline-block;padding:3px 7px;font-size:11px;font-weight:600;border:1px solid #c3cfdd;border-radius:5px;white-space:nowrap}
#users-table .user-status.is-active{background:#e3f2e9;color:#256344;border-color:#acd0bc}
#users-table .user-status.is-inactive{background:#edf1f6;color:#53647b;border-color:#c3cfdd}
#user-dialog{padding:16px;border:2px solid #829cbb;border-radius:9px;background:#e8eff7}
#user-dialog :is(.dialog-header,.form-actions){border-color:#a4b8d0}
#user-dialog .dialog-header h2{font-size:18px;color:#203e60}
#user-dialog form{gap:12px;margin-top:12px}
#user-dialog label{font-size:12px;color:#304d6d}
#user-dialog :is(input:not([type=checkbox]),select){min-height:36px;padding:7px 10px;font-size:14px;background:#fff;border-color:#8da5c3;color:#203b58}
#user-dialog :is(input,select):focus-visible{outline:2px solid #3978d4;outline-offset:2px}
#user-dialog .muted{font-size:12px;color:#435b78}
#user-dialog .form-actions button{min-height:35px;padding:7px 12px;font-size:13px}
@media(max-width:760px){#users>article{padding:10px}#user-dialog{padding:12px}}
#user-permissions{margin:0;border:1px solid #a4b8d0;border-radius:6px;padding:10px 12px;background:#dce7f3;min-width:0}
#user-permissions legend{font-size:13px;font-weight:700;color:#294666;padding:0 6px}
#user-permission-flags{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
#user-permission-flags .check{font-size:12px;display:flex;align-items:center;gap:7px;line-height:1.4}
#user-permission-flags input[type=checkbox]{width:16px;height:16px;min-height:0;accent-color:#246bfd;opacity:1}
#user-permissions p{margin:8px 0 0;font-size:11px}
#own-password-open{font-size:12px;min-height:34px;padding:6px 9px}
#own-password-dialog{border:2px solid #829cbb;background:#e8eff7;max-width:650px}
#own-password-form{grid-template-columns:1fr;gap:12px}
#sales :is(#sales-price,#sales-discount)[readonly]{background:#edf1f6;color:#52667f;border-color:#b4c3d5}
#user-form input:disabled{background:#edf1f6}
@media(max-width:760px){#user-permission-flags{grid-template-columns:1fr}}
/* Backup workspace: separate creating copies from replacing live data. */
#backups>article{padding:12px 14px;margin-bottom:10px;border:2px solid #829cbb;border-radius:8px;background:#e8eff7;box-shadow:0 2px 6px #203c6010}
#backups .backup-create-panel{border-top:4px solid #3978c6}
#backups .backup-panel-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 16px;padding-bottom:9px;margin-bottom:10px;border-bottom:1px solid #a4b8d0}
#backups h2{font-size:16px;color:#203e60;margin:0}
#backups .backup-panel-heading p{font-size:12px;color:#435b78;margin:4px 0 0;line-height:1.4}
#backups .backup-panel-tag{padding:4px 8px;border:1px solid #a8bdd6;border-radius:5px;font-size:11px;color:#405b7b;background:#dbe7f5}
#backups .backup-last{padding:7px 10px;background:#dce7f3;border:1px solid #a8bdd6;border-radius:6px;margin-bottom:10px;overflow-wrap:anywhere}
#backups .backup-last>span{display:block;font-size:11px;color:#52667f}
#backups #last-backup{font-size:12px;margin:3px 0 0;color:#304d6d}
#backups .backup-save-controls,#backups .backup-restore-controls{display:flex;align-items:flex-end;gap:10px 14px;flex-wrap:wrap}
#backups label{font-size:12px;color:#304d6d;gap:4px;min-width:0}
#backups .backup-save-controls label{flex:0 1 330px}
#backups :is(input,select){min-height:36px;padding:7px 10px;font-size:13px;border-color:#8da5c3;background:#fff;color:#203b58;min-width:0;max-width:100%}
#backups :is(input,select):focus-visible{outline:2px solid #3978d4;outline-offset:2px}
#backups button{min-height:36px;padding:7px 12px;font-size:13px}
#backups .muted{font-size:12px;color:#435b78;line-height:1.5}
#backups #backup-save-help{margin:7px 0}
#backups .notice{background:#edf3fa;border:1px solid #b4c5da;border-radius:6px;padding:8px 10px;font-size:12px;line-height:1.5;margin:10px 0 6px;color:#435b78}
#backups .backup-account-note{margin:6px 0 0;font-size:11px}
#backups .backup-ready{padding:10px 12px;border:1px solid #a3c7b2;border-radius:6px;background:#e7f3ec;margin:10px 0;color:#305c43}
#backups .backup-ready strong{display:block;font-size:13px;margin-bottom:8px}
#backups .backup-download-link{display:inline-block;border:1px solid #94b8a2;border-radius:5px;background:white;padding:6px 10px;color:#245d3d;font-size:13px;font-weight:600;text-decoration:underline}
#backups .backup-ready p{font-size:12px;line-height:1.5;margin:8px 0 0}
#backups .backup-restore-panel{background:#faf3e7;border-color:#c3a26d;border-top:4px solid #b9862e}
#backups .backup-restore-panel h2{color:#775218}
#backups .backup-restore-panel .backup-panel-heading{border-color:#ddc89e}
#backups .backup-restore-panel .backup-panel-tag{background:#f4e8cf;border-color:#cdb582;color:#775218}
#backups .backup-restore-controls .search{margin:0;max-width:520px;flex:1 1 300px}
#backups #backup-restore-help{margin:9px 0 0}
@media(max-width:760px){#backups>article{padding:10px 12px}#backups .backup-save-controls label{flex:1 1 100%}#backups .backup-save-controls button,#backups .backup-restore-controls button{width:100%}}
/* Compact module navigation: readable labels with a stable network footer. */
.sidebar nav button>span{min-width:0;flex:1}
.sidebar nav button .nav-access-lock{width:13px;height:13px;margin:0 0 0 3px;opacity:.85}
.sidebar nav button.is-restricted{color:#9bb0c4}
.sidebar nav button.is-restricted:hover{background:#164361;color:#d9e4ed}
.sidebar nav button:focus-visible{outline:2px solid #b3d1ff;outline-offset:-2px}
@media(min-width:761px){
 .sidebar{padding:10px 10px 8px;overflow:hidden}
 .sidebar .client-brand{gap:4px;padding:0 0 8px;margin-bottom:6px}
 .sidebar .client-brand img{width:112px;height:auto}
 .sidebar .client-brand small{font-size:8px;letter-spacing:1px}
 .sidebar>.nav-caption{padding:0 8px;margin:0 0 5px;font-size:10px}
 .sidebar nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;gap:3px;scrollbar-width:thin;scrollbar-color:#52718a transparent;padding:2px 0}
 .sidebar nav button{min-height:36px;padding:7px 8px;font-size:13px;line-height:1.3;border-radius:7px;white-space:normal}
 .sidebar nav button svg{width:18px;height:18px;margin-right:8px;flex-shrink:0}
 .sidebar .nav-group{gap:2px;margin-top:5px;padding-top:7px}
 .sidebar .nav-group .nav-caption{font-size:10px;letter-spacing:.8px;margin:0 0 3px;padding:0 8px}
 .sidebar .sidebar-bottom{flex:0 0 auto;margin-top:7px;padding:7px 6px 0;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
 .sidebar #server-data-label{font-size:10px}
}
@media(min-width:761px) and (max-height:740px){.sidebar .client-brand img{width:94px}.sidebar nav button{min-height:34px;padding-top:6px;padding-bottom:6px}.sidebar .nav-group{margin-top:3px;padding-top:5px}.sidebar .client-brand{margin-bottom:4px;padding-bottom:6px}}
@media(max-width:760px){.sidebar nav button>span{white-space:nowrap}.sidebar nav button .nav-access-lock{width:12px;height:12px}}
/* Comfortable reading at 100% zoom without enlarging empty spacing. */
main :is(#products,#structures,#customers,#movements,#users,#sales,#production,#reports,#integrations,#backups) :is(label,.registry-toolbar .search){font-size:13px;line-height:1.4}
main :is(#products,#structures,#customers,#movements,#users,#sales,#production,#reports,#integrations,#backups) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:14px;min-height:36px}
main :is(#products,#structures,#customers,#movements,#users,#sales,#production,#reports,#integrations,#backups) :is(button,.registry-actions button,.report-actions button){font-size:13px;line-height:1.4}
main :is(#products,#structures,#customers,#movements,#users) :is(#products-table,#structure-list,#customers-table,#movements-table,#users-table) :is(th,td){font-size:14px;padding:7px 9px;line-height:1.45}
main :is(#products,#structures,#customers,#movements,#users) :is(#products-table,#structure-list,#customers-table,#movements-table,#users-table) th{font-size:13px;word-break:normal;overflow-wrap:normal}
main :is(#products-table,#customers-table,#movements-table) :is(th,td):first-child{width:80px}
main #products-table table{min-width:1340px}
main #products-table :is(th,td):nth-child(8){width:128px}
main #products-table :is(th,td):nth-child(9){width:148px}
main #products-table .stock-badge,main #products-table .product-cost-warning{font-size:11px;line-height:1.4}
main #customers-table :is(th,td):nth-child(6){width:156px}
main #customers-table :is(th,td):nth-child(7){width:156px}
main #customers-table .customer-consent{font-size:11px}
main #structures #structure-list :is(th,td):nth-child(8){width:214px}
main #structures #structure-list :is(th,td):nth-child(5){width:140px}
main #structures #structure-list :is(th,td):nth-child(6){width:152px}
main #users-table .user-status{font-size:12px}
main #reports #report-table .table-wrap :is(th,td){font-size:13px;padding:7px 9px;line-height:1.4}
main #reports .kardex-summary :is(th,td){font-size:12px;line-height:1.4}
main #reports .kardex-product{font-size:12px}
main #reports .kardex-product strong{font-size:13px}
main #reports :is(.report-metric span,#report-period,#report-generated){font-size:13px}
main #sales .table-wrap :is(th,td),main #production #production-preview .table-wrap :is(th,td){font-size:14px;padding:7px 9px}
main #sales .table-wrap th,main #production #production-preview .table-wrap th{font-size:13px}
main #sales #item-price-preview{font-size:13px}
main #sales #item-price-preview strong{font-size:18px}
main #sales .sale-finish #order-discount-summary{font-size:13px}
main #production :is(.production-steps strong,.production-empty strong){font-size:14px}
main #overview :is(.overview-kpi-label,.overview-daybar strong){font-size:13px}
main #overview :is(.monthly-summary span,.monthly-detail span){font-size:12px}
main #overview :is(.monthly-summary strong,.monthly-detail strong){font-size:20px}
main #overview .overview-kpi strong{font-size:26px}
main #overview .overview-stock-values strong{font-size:22px}
main #overview .table-wrap :is(th,td){font-size:13px}
main #overview .month-bar-value{font-size:11px}
:is(#products-dialog,#customers-dialog,#structure-dialog,#movement-dialog,#user-dialog,#own-password-dialog) :is(label,input:not([type=checkbox]):not([type=radio]),select,textarea,button){font-size:14px}
#structure-dialog #structure-editor-items input{font-size:13px}
#user-permission-flags .check{font-size:13px}
@media(min-width:761px) and (min-height:741px){.sidebar nav button{font-size:14px;min-height:38px}.sidebar .nav-group .nav-caption{font-size:11px}}
