:root {
    --navy: #10243f;
    --navy-2: #173454;
    --blue: #1c70e8;
    --blue-soft: #eaf2ff;
    --orange: #ff8a3d;
    --green: #21a875;
    --purple: #7357db;
    --ink: #17263b;
    --muted: #6d7b8e;
    --line: #e5eaf1;
    --page: #f5f7fa;
    --white: #fff;
    --shadow: 0 10px 30px rgba(22, 42, 70, .07);
}

.sales-line-builder{border:1px solid #cbd6df;background:#f8fafc;padding:14px}
.line-builder-controls{display:grid;grid-template-columns:minmax(280px,1fr) 160px auto;gap:12px;align-items:end}
.line-builder-controls .button{height:32px}
.sales-line-empty{margin-top:0;padding:34px 26px;text-align:center;color:#6c7a89;border:1px dashed #c5d0da;background:#fff;cursor:pointer}
.sales-line-empty strong{display:block;color:#25343e;font-size:12px;margin-bottom:6px}
.sales-line-empty span{font-size:10px;line-height:1.5}
.sales-line-empty:focus{outline:2px solid var(--blue);outline-offset:2px}
.sales-line-table-wrap{margin-top:0;border:1px solid #cbd6df;background:#fff}
.sales-entry-modal .modal-card{max-width:920px}
.sales-entry-head .modal-header{border-bottom:0}
.sales-order-setup-bar{margin-top:-1px}
.sales-entry-form{display:flex;flex-direction:column;min-height:0}
.sales-order-setup-bar{padding:12px 18px 14px;background:linear-gradient(180deg,#f7fafc 0%,#eef3f7 100%);border-top:1px solid #d7e0e7;border-bottom:1px solid #d7e0e7}
.sales-setup-primary{display:grid;grid-template-columns:minmax(150px,1fr) minmax(220px,1.4fr) 150px;gap:10px;align-items:end}
.sales-setup-primary label{display:grid;gap:4px;margin:0}
.sales-setup-primary .field-label{font-size:9px;font-weight:700;text-transform:uppercase;color:#607080;letter-spacing:.35px}
.sales-setup-primary input,.sales-setup-primary select{width:100%;height:32px;padding:0 10px;border:1px solid #c5d0da;background:#fff;font-size:11px}
.sales-setup-primary .field-search{position:relative}
.sales-setup-primary .field-search input[type="text"]{width:100%}
.field-search-results{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:30;margin:0;padding:4px 0;max-height:220px;overflow:auto;list-style:none;background:#fff;border:1px solid #b9c8d4;box-shadow:0 10px 24px rgba(16,36,63,.14)}
.field-search-results[hidden]{display:none!important}
.field-search-results li{padding:8px 10px;display:grid;gap:2px;cursor:pointer;border-bottom:1px solid #eef2f6}
.field-search-results li:last-child{border-bottom:0}
.field-search-results li strong{color:#1f3442;font-size:11px}
.field-search-results li span{color:#748392;font-size:10px}
.field-search-results li.is-highlighted,.field-search-results li:hover{background:#edf6fc}
.field-search-empty{padding:10px;color:#748392;font-size:10px;cursor:default}
.sales-customer-field{position:relative}
.sales-setup-workflow{margin-top:10px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sales-setup-workflow .workflow-hint{padding:6px 10px;background:#e8f4fc;border:1px solid #b9d9ef;color:#1f5f86;font-size:10px;border-radius:3px}
.sales-setup-status{font-size:10px;color:#748392}
.sales-setup-status strong{color:#25343e}
.sales-setup-more{margin-top:10px}
.sales-setup-more summary{font-size:10px;color:#0b78bd;cursor:pointer;user-select:none}
.sales-setup-more-fields{margin-top:10px;display:grid;gap:10px}
.sales-setup-notes textarea{width:100%;min-height:64px;padding:8px 10px;border:1px solid #c5d0da;font-size:11px;resize:vertical}
.sales-logistics-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.sales-logistics-fields label{display:grid;gap:4px;margin:0;font-size:9px;font-weight:700;text-transform:uppercase;color:#607080}
.sales-logistics-fields input{height:32px;padding:0 10px;border:1px solid #c5d0da;font-size:11px}
.sales-order-body{padding:14px 18px 6px;flex:1;min-height:0;overflow:auto}
.sales-items-toolbar{margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.sales-items-toolbar strong{display:block;color:#25343e;font-size:12px}
.sales-items-toolbar span{display:block;margin-top:2px;color:#748392;font-size:10px}
.sales-entry-footer .sales-order-summary{color:#586570;font-size:10px;font-weight:600}
.sales-entry-footer .sales-order-summary:empty{display:none}
.line-add-popup{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:24px}
.line-add-popup[hidden]{display:none!important}
.line-add-popup-backdrop{position:absolute;inset:0;background:rgba(16,36,63,.52)}
.line-add-popup-card{position:relative;z-index:1;width:min(640px,calc(100% - 32px));max-height:min(88vh,760px);display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #b8c7d2;box-shadow:0 24px 60px rgba(13,31,47,.28)}
.line-add-popup-header{padding:16px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid #e1e6eb;background:linear-gradient(180deg,#fff 0%,#f8fbfd 100%)}
.line-add-popup-header h3{margin:4px 0 0;color:#25343e;font-size:18px}
.line-add-popup-lead{margin:4px 0 0;color:#748392;font-size:10px;line-height:1.45}
.line-add-popup-body{padding:18px 20px;display:grid;gap:16px;overflow:auto;flex:1;min-height:0}
.line-add-popup-body label{display:grid;gap:6px;margin:0}
.line-add-popup-body .field-label{font-size:9px;font-weight:700;text-transform:uppercase;color:#607080;letter-spacing:.35px}
.line-add-popup-body input[type="search"],.line-add-popup-body input[type="number"]{width:100%;height:40px;padding:0 12px;border:1px solid #c5d0da;font-size:12px;background:#fff}
.line-add-popup-body input[type="search"]:focus,.line-add-popup-body input[type="number"]:focus{border-color:var(--erp-blue);box-shadow:0 0 0 1px var(--erp-blue);outline:0}
.line-add-search-zone{display:grid;gap:12px}
.line-add-results-panel{border:1px solid #dbe4ea;background:#fbfdfe;max-height:260px;overflow:auto;border-radius:2px}
.line-add-results-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-bottom:1px solid #e8eef2;background:#f3f7fa;position:sticky;top:0;z-index:1}
.line-add-results-head span{font-size:9px;font-weight:700;text-transform:uppercase;color:#607080;letter-spacing:.35px}
.line-add-results-head span:last-child{color:#84909a;font-weight:600}
.line-add-results-list{list-style:none;margin:0;padding:0}
.line-add-results-list li{padding:11px 12px;border-bottom:1px solid #eef2f6;cursor:pointer;display:grid;gap:4px}
.line-add-results-list li:last-child{border-bottom:0}
.line-add-results-list li:hover,.line-add-results-list li.is-highlighted{background:#edf6fc}
.line-add-results-list li strong{font-size:11px;color:#1f3442;line-height:1.35}
.line-add-results-list li span{font-size:10px;color:#748392;line-height:1.4}
.line-add-result-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:2px}
.line-add-result-badge{padding:2px 7px;font-size:8px;font-weight:700;text-transform:uppercase;border-radius:2px;background:#eef2f6;color:#607080}
.line-add-result-badge.is-available{background:#e8f4ec;color:#087551}
.line-add-result-badge.is-low{background:#fff3e6;color:#b54708}
.line-add-result-badge.is-out{background:#fdecec;color:#b42318}
.line-add-results-empty{margin:0;padding:18px 12px;color:#748392;font-size:10px;text-align:center}
.line-add-results-panel[hidden],.line-add-selected[hidden]{display:none!important}
.line-add-selected{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;background:#edf7ff;border:1px solid #c5deef}
.line-add-selected small{display:block;margin-bottom:3px;color:#607080;font-size:8px;text-transform:uppercase;font-weight:700}
.line-add-selected strong{display:block;color:#1f3442;font-size:11px;line-height:1.35}
.button-small{min-height:28px;padding:0 10px;font-size:9px}
.line-add-product-meta{padding:14px;background:#f7fafc;border:1px solid #dbe4ea;border-radius:2px}
.line-add-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.line-add-meta-grid>div small{display:block;margin-bottom:4px;color:#7a8791;font-size:8px;text-transform:uppercase;font-weight:600}
.line-add-meta-grid>div strong{display:block;color:#25343e;font-size:12px;line-height:1.35}
.line-add-meta-grid>div span{display:block;margin-top:3px;color:#748392;font-size:10px}
.line-add-availability.is-available{color:#087551}
.line-add-availability.is-low{color:#b54708}
.line-add-availability.is-out{color:#b42318}
.line-add-qty-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:end;padding-top:2px}
.line-add-qty-row.is-disabled{opacity:.5}
.line-add-qty-row.is-disabled input{pointer-events:none;background:#f3f6f8}
.line-add-cap-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:end;padding-top:2px}
.line-add-cap-row.is-disabled{opacity:.5}
.line-add-cap-row.is-disabled select{pointer-events:none;background:#f3f6f8}
.line-add-cap-row[hidden]{display:none!important}
.line-add-cap-row .field-hint{display:block;margin-top:4px;color:#748392;font-size:10px;line-height:1.4}
.line-add-qty-preview{padding:11px 12px;background:#fff;border:1px solid #dbe4ea;border-radius:2px;min-height:62px}
.line-add-qty-preview small{display:block;color:#7a8791;font-size:8px;text-transform:uppercase;font-weight:600}
.line-add-qty-preview strong{display:block;margin-top:4px;color:#25343e;font-size:15px}
.line-add-qty-preview span{display:block;margin-top:2px;color:#748392;font-size:10px}
.line-add-popup-footer{padding:14px 20px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #e1e6eb;background:#f7fafc}
.line-add-popup-footer .button-primary:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:640px){.line-add-meta-grid,.line-add-qty-row,.line-add-cap-row{grid-template-columns:1fr}}
@media(max-width:760px){.sales-setup-primary,.sales-logistics-fields{grid-template-columns:1fr}.sales-items-toolbar{align-items:flex-start;flex-direction:column}}
.sales-line-table{width:100%;border-collapse:collapse}
.sales-line-table th,.sales-line-table td,.order-lines-panel th,.order-lines-panel td{padding:10px 12px;text-align:left;border-bottom:1px solid #e1e6eb}
.sales-line-table th,.order-lines-panel th{font-size:10px;text-transform:uppercase;color:#607080;background:#edf3f7}
.sales-line-table td small,.order-lines-panel td small{display:block;color:#748392;margin-top:3px}
.sales-line-table tfoot td{font-weight:700;background:#f5f8fa}
.line-remove{width:28px;height:28px;border:1px solid #c8d2dc;background:#fff;color:#b42318;cursor:pointer}
.order-lines-panel{margin-top:16px;border:1px solid #d7e0e7;background:#fff;overflow:auto}
.order-lines-panel h3{margin:0;padding:12px;border-bottom:1px solid #d7e0e7}
.order-lines-panel table{width:100%;border-collapse:collapse}
.loaded-line-entry{display:grid;gap:10px}
.loaded-line-entry label small{display:block;margin-top:4px;color:#6d7b88}
.workflow-waiting{padding:24px;border:1px solid #d7e0e7;background:#f7f9fb}
@media(max-width:760px){.line-builder-controls{grid-template-columns:1fr}.sales-line-builder{padding:10px}}

.view-selector a{height:32px;padding:0 14px;display:flex;align-items:center;color:#52606b;border-bottom:2px solid transparent;font-size:9px}
.view-selector a.active{color:var(--erp-blue);border-color:var(--erp-blue);font-weight:600}
.department-summary{margin-bottom:12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.department-summary article{min-height:82px;padding:13px 15px;background:#fff;border:1px solid #cbd5dd;border-top:3px solid var(--erp-blue)}
.department-summary span,.department-summary small{display:block;color:#697783;font-size:8px}
.department-summary strong{margin:5px 0 3px;display:block;color:#172b3d;font-size:20px;font-weight:600}
.production-flow-strip{margin-bottom:12px;padding:12px 18px;display:grid;grid-template-columns:repeat(6,1fr);background:#fff;border:1px solid #cbd5dd}
.production-flow-strip div{position:relative;display:flex;align-items:center;gap:8px;color:#4f6371;font-size:8px;font-weight:600}.production-flow-strip div:not(:last-child)::after{content:"";position:absolute;right:10px;width:22px;height:1px;background:#b8cad5}.production-flow-strip b{width:23px;height:23px;display:grid;place-items:center;color:#fff;background:var(--erp-blue);border-radius:50%;font-size:8px}
.production-kpis{margin-bottom:12px;display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.production-kpis article{padding:13px 15px;background:#fff;border:1px solid #cbd5dd;border-top:3px solid var(--erp-blue)}.production-kpis span,.production-kpis small{display:block;color:#6c7a86;font-size:8px}.production-kpis strong{margin:5px 0 3px;display:block;font-size:20px}
.forecast-panel{margin-bottom:12px;padding:13px 15px;background:#eef6fa;border:1px solid #c7dce8}.forecast-panel>div:first-child strong,.forecast-panel>div:first-child span{display:block}.forecast-panel>div:first-child strong{font-size:10px}.forecast-panel>div:first-child span{margin-top:3px;color:#617887;font-size:8px}.forecast-items{margin-top:10px;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.forecast-items a{padding:10px;background:#fff;border:1px solid #c7d7e1}.forecast-items strong,.forecast-items span,.forecast-items small{display:block}.forecast-items strong{font-size:9px}.forecast-items span{margin-top:4px;color:#0879be;font-size:9px;font-weight:600}.forecast-items small{margin-top:3px;color:#74828c;font-size:7px}
.production-run-card{position:relative;z-index:2;width:min(1080px,calc(100vw - 40px));max-height:calc(100vh - 40px);overflow:auto;background:#fff;border:1px solid #bfcbd4;box-shadow:0 24px 70px rgba(13,31,47,.28)}.production-run-modal{align-items:center}.production-run-header{padding:20px 22px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #d5dee5}.production-run-header h2{margin:4px 0;font-size:22px}.production-run-header p{margin:0;color:#71808b;font-size:9px}.production-run-header>div:last-child{width:260px;text-align:right}.production-run-header small,.production-run-header strong{display:block}.production-run-header strong{margin:5px 0 8px}
.production-run-body{display:grid;grid-template-columns:1fr 340px}.production-run-body main{padding:20px}.production-run-body aside{padding:20px;background:#eef5f9;border-left:1px solid #d2dce3}.production-run-body aside h3{margin:5px 0}.production-run-body aside>p{color:#6e7e89;font-size:9px;line-height:1.5}
.shift-background-modal .production-run-card{display:none}
.shift-posting-modal{align-items:center}.shift-posting-card{position:relative;z-index:4;width:min(650px,calc(100vw - 30px));max-height:calc(100vh - 36px);overflow:auto;background:#fff;border:1px solid #bfcbd4;box-shadow:0 24px 70px rgba(13,31,47,.3)}
.shift-posting-header{padding:20px 22px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #d5dee5}.shift-posting-header h2{margin:5px 0 3px;font-size:21px}.shift-posting-header p{margin:0;color:#71808b;font-size:9px}.shift-posting-header>div:last-child{text-align:right}.shift-posting-header small,.shift-posting-header strong{display:block}.shift-posting-header small{color:#788691;font-size:8px;text-transform:uppercase}.shift-posting-header strong{margin-top:5px;font-size:13px}
.shift-form-actions button:disabled{opacity:.42;cursor:not-allowed}
.production-assignment-grid{display:grid;grid-template-columns:1fr 1fr;border:1px solid #d4dee5}.production-assignment-grid>div{padding:13px;border-right:1px solid #d4dee5;border-bottom:1px solid #d4dee5}.production-assignment-grid small,.production-assignment-grid strong,.production-assignment-grid span{display:block}.production-assignment-grid small{color:#7a8791;font-size:7px;text-transform:uppercase}.production-assignment-grid strong{margin-top:5px;font-size:10px}.production-assignment-grid span{margin-top:3px;color:#69808e;font-size:8px}
.shift-history{margin-top:15px}.shift-history h3{font-size:13px}.shift-history>div{padding:10px 0;border-top:1px solid #e0e6ea}.shift-history strong,.shift-history span,.shift-history small{display:block}.shift-history strong{font-size:9px}.shift-history span{margin-top:3px;font-size:8px}.shift-history small{margin-top:3px;color:#798791;font-size:7px}
.shift-entry-form{padding:18px 22px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.shift-entry-form label{font-size:8px;color:#52636e}.shift-entry-form input,.shift-entry-form select,.shift-entry-form textarea{width:100%;margin-top:4px;padding:0 9px;border:1px solid #bccad3;background:#fff;font-size:9px}.shift-entry-form input,.shift-entry-form select{height:34px}.shift-entry-form textarea{padding-top:7px}.shift-entry-form .wide{grid-column:1/-1}.shift-section{padding:9px 11px;background:#edf4f8;border:1px solid #cfdae1}.shift-section strong,.shift-section span{display:block}.shift-section strong{font-size:9px}.shift-section span{margin-top:2px;color:#71818c;font-size:8px}.shift-conversion{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #c8d8e1;background:#f2f8fb}.shift-conversion div{padding:10px;border-right:1px solid #d2dfe6}.shift-conversion div:last-child{border-right:0}.shift-conversion span,.shift-conversion strong{display:block}.shift-conversion span{color:#6d7e89;font-size:7px}.shift-conversion strong{margin-top:4px;color:#18384c;font-size:10px}.shift-form-actions{display:flex;justify-content:flex-end;gap:8px}.auto-post-note{padding:9px;color:#3c6478;background:#e2f1f8;border:1px solid #bfd8e5;font-size:8px;line-height:1.5}.campaign-complete{padding:18px;color:#176f51;background:#e4f6ef;border:1px solid #a9dbc9}.campaign-complete strong,.campaign-complete span{display:block}.campaign-complete span{margin-top:5px;font-size:8px}
@media(max-width:900px){.production-flow-strip{grid-template-columns:repeat(3,1fr);gap:10px}.production-kpis,.forecast-items{grid-template-columns:1fr 1fr}.production-run-body{grid-template-columns:1fr}.production-run-body aside{border-left:0;border-top:1px solid #d2dce3}}
.payments-overview{margin-bottom:12px;display:grid;grid-template-columns:1.25fr repeat(3,1fr);gap:10px}
.payment-kpi{min-height:94px;padding:15px;display:flex;align-items:center;gap:13px;background:#fff;border:1px solid #cbd5dd;border-radius:3px;box-shadow:0 2px 7px rgba(19,43,63,.04);text-decoration:none;color:inherit;transition:border-color .15s,box-shadow .15s,transform .15s}
a.payment-kpi:hover{border-color:#7fb4d4;box-shadow:0 4px 12px rgba(19,43,63,.08);transform:translateY(-1px)}
a.payment-kpi-primary:hover{border-color:#0872af}
.payment-kpi-primary{color:#fff;background:linear-gradient(135deg,#0879be,#0a639e);border-color:#0872af}
.payment-kpi-icon{width:36px;height:36px;display:grid;place-items:center;flex:0 0 auto;color:#0879be;background:#e5f3fb;border-radius:50%;font-size:15px;font-weight:700}
.payment-kpi-icon-green{color:#13845b;background:#e2f5ed}.payment-kpi-icon-orange{color:#b56a13;background:#fff0d9}.payment-kpi-icon-purple{color:#6953b8;background:#eeeafd}
.payment-kpi span,.payment-kpi strong,.payment-kpi small{display:block}.payment-kpi span{color:#6c7a86;font-size:8px;text-transform:uppercase;letter-spacing:.35px}.payment-kpi strong{margin:5px 0 3px;color:#172b3d;font-size:18px;font-weight:650}.payment-kpi small{color:#778590;font-size:8px}
.payment-kpi-primary span,.payment-kpi-primary small{color:#cceafa}.payment-kpi-primary strong{color:#fff;font-size:20px}.payment-kpi-primary .payment-kpi-icon{color:#fff;background:rgba(255,255,255,.16)}
.payments-callout{margin-bottom:12px;padding:10px 15px;display:flex;align-items:center;justify-content:space-between;gap:18px;color:#425969;background:#eef6fa;border:1px solid #c7dce8;border-left:3px solid var(--erp-blue)}
.payments-callout strong,.payments-callout span{display:block}.payments-callout strong{color:#17384d;font-size:9px}.payments-callout>div span{margin-top:2px;font-size:8px}
.payments-callout-path{display:flex!important;align-items:center;gap:7px;white-space:nowrap;font-size:8px}.payments-callout-path b{width:19px;height:19px;display:grid;place-items:center;color:#fff;background:var(--erp-blue);border-radius:50%;font-size:8px}.payments-callout-path i{width:22px;height:1px;background:#a8c7d8}
.payment-views a{gap:6px}.payment-views a span,.sales-views a span{min-width:17px;height:17px;padding:0 5px;display:grid;place-items:center;color:#577080;background:#e7eef3;border-radius:9px;font-size:7px}.payment-views a.active span,.sales-views a.active span{color:#fff;background:var(--erp-blue)}
.sales-views{overflow-x:auto;max-width:100%}
.sales-views a{white-space:nowrap}
.payments-table tbody tr.row-needs-action td:first-child{box-shadow:inset 3px 0 var(--erp-blue)}.payments-table tbody tr:hover{background:#f6fbfe}
.payment-state{display:flex;align-items:center;gap:6px;color:#5d6e79;font-size:9px;font-weight:600}.payment-state i{width:7px;height:7px;border-radius:50%;background:#d1952b;box-shadow:0 0 0 3px #fff3dc}.payment-state.is-paid{color:#187552}.payment-state.is-paid i{background:#25a875;box-shadow:0 0 0 3px #e4f6ef}
.payment-state.is-partial{color:#1763bd}.payment-state.is-partial i{background:#2b7fd3;box-shadow:0 0 0 3px #e7f1ff}
.payment-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}.payment-action-primary,.payment-action-secondary{min-height:29px;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;font-size:8px;font-weight:650}.payment-action-primary{color:#fff;background:var(--erp-blue);border:1px solid var(--erp-blue)}.payment-action-primary:hover{background:#086ba8}.payment-action-secondary{color:#37566a;background:#fff;border:1px solid #bccbd5}.payment-action-secondary:hover{color:var(--erp-blue);border-color:#7fb4d4}
.production-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}
@media(max-width:1050px){.payments-overview{grid-template-columns:1fr 1fr}.payments-callout{align-items:flex-start;flex-direction:column}}
@media(max-width:650px){.payments-overview{grid-template-columns:1fr}.payments-callout-path{display:none!important}.payment-views{overflow-x:auto}.cashier-close-summary{grid-template-columns:1fr 1fr}.cashier-close-actions{flex-wrap:wrap}}
.cashier-close{margin-bottom:12px;padding:14px 16px;background:#fff;border:1px solid #cbd5dd;border-radius:6px;box-shadow:0 2px 7px rgba(19,43,63,.04)}
.cashier-close-head{margin-bottom:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.cashier-close-eyebrow{display:block;color:#6c7a86;font-size:8px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.cashier-close-head strong{display:block;margin-top:3px;color:#172b3d;font-size:14px}
.cashier-close-head small{display:block;margin-top:2px;color:#778590;font-size:9px}
.cashier-close-actions{display:flex;gap:6px;flex-wrap:wrap}
.cashier-close-summary{margin-bottom:12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cashier-close-summary article{padding:10px 12px;background:#f7fafc;border:1px solid #d8e2ea;border-radius:6px}
.cashier-close-summary span{display:block;color:#6c7a86;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.cashier-close-summary strong{display:block;margin-top:5px;color:#172b3d;font-size:16px;font-weight:650}
.cashier-close-summary small{display:block;margin-top:2px;color:#778590;font-size:8px}
.cashier-close-variance-ok{color:#13845b!important}
.cashier-close-variance-warn{color:#b56a13!important}
.cashier-close-table-wrap{overflow:auto;border:1px solid #d0d6dc;border-radius:4px}
.cashier-close-table{width:100%;border-collapse:collapse;font-size:10px}
.cashier-close-table thead th{height:30px;padding:0 10px;text-align:left;color:#3a4650;background:#eef2f5;border-bottom:1px solid #d0d6dc;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.cashier-close-table tbody td{height:32px;padding:0 10px;color:#2f3b45;border-bottom:1px solid #e8edf1;vertical-align:middle}
.cashier-close-table tbody tr:nth-child(even) td{background:#fafbfc}
.cashier-close-total td{background:#f3f7fa!important;font-weight:600}
.cashier-close-receipts{margin-top:10px}
.cashier-close-receipts summary{cursor:pointer;color:#0879be;font-size:10px;font-weight:600}
.cashier-close-receipts-wrap{margin-top:8px;overflow:auto;border:1px solid #d0d6dc;border-radius:4px}
.cashier-close-receipts-table{width:100%;border-collapse:collapse;font-size:9px}
.cashier-close-receipts-table th,.cashier-close-receipts-table td{padding:6px 8px;border-bottom:1px solid #e8edf1;text-align:left}
.cashier-close-receipts-table th{background:#eef2f5;font-size:8px;text-transform:uppercase;color:#5f6d77}
@media print{
    .cashier-close,.cashier-close *{visibility:visible}
    .cashier-close{position:relative;page-break-inside:avoid}
    .cashier-close-actions,.cashier-close-receipts summary{display:none!important}
    .cashier-close-receipts[open] .cashier-close-receipts-wrap{display:block!important}
}
.cashier-close-launcher{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;padding:12px 16px}
.cashier-close-launcher-copy strong{display:block;color:#172b3d;font-size:14px}
.cashier-close-launcher-copy small{display:block;margin-top:3px;color:#778590;font-size:9px;line-height:1.45}
.cashier-close-launcher-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.cashier-close-summary-compact{margin-bottom:12px}
.cashier-close-overview-card{width:min(820px,calc(100vw - 32px))}
.cashier-close-overview-popup{z-index:1400}
.cashier-close-overview,.cashier-close-history,.cashier-close-readonly{margin-top:12px;padding:14px 16px}
.cashier-close-launch-actions{display:flex;gap:8px;flex-wrap:wrap}
.cashier-close-popup{position:fixed;inset:0;z-index:1500;display:grid;place-items:center;padding:24px}
.cashier-close-popup[hidden]{display:none!important}
.cashier-close-popup-backdrop{position:absolute;inset:0;background:rgba(16,36,63,.52)}
.cashier-close-popup-card{position:relative;z-index:1;width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 48px);display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #bfcbd4;box-shadow:0 24px 70px rgba(13,31,47,.28)}
.cashier-close-popup-header{padding:18px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid #e1e6eb;background:linear-gradient(180deg,#fff 0%,#f8fbfd 100%)}
.cashier-close-popup-header h2{margin:4px 0 0;color:#25343e;font-size:18px}
.cashier-close-popup-header p{margin:4px 0 0;color:#748392;font-size:10px;line-height:1.45}
.cashier-close-popup-body{padding:16px 20px;overflow:auto;flex:1;min-height:0}
.cashier-close-popup-footer{padding:14px 20px;display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;border-top:1px solid #e1e6eb;background:#f7fafc}
.cashier-close-form{margin:0;display:flex;flex-direction:column;min-height:0;flex:1}
.cashier-close-form-head{margin-bottom:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.cashier-close-form-head strong{display:block;color:#172b3d;font-size:13px}
.cashier-close-form-head span{display:block;margin-top:2px;color:#778590;font-size:9px}
.cashier-close-entry-table input{width:100%;max-width:120px;height:28px;padding:0 8px;border:1px solid #c5d0d8;border-radius:4px;font-size:10px}
.cashier-close-collector{display:block;margin-bottom:12px}
.cashier-close-collector select{width:100%;max-width:280px;height:34px;padding:0 10px;border:1px solid #c5d0d8;border-radius:4px;font-size:11px;background:#fff}
.cashier-close-notes textarea{width:100%;margin-top:6px;padding:8px 10px;border:1px solid #c5d0d8;border-radius:4px;font-size:10px;resize:vertical}
.cashier-close-form-actions{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap}
.cashier-close-help{margin-top:10px;color:#6c7a86;font-size:9px;line-height:1.5}
.cashier-close-banner{margin:0 0 12px;padding:10px 12px;border-radius:6px;font-size:10px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cashier-close-banner-closed{background:#edf8f2;border:1px solid #b8e0cb;color:#176644}
.gi-tool-btn-primary{background:#0879be!important;color:#fff!important;border-color:#0879be!important}
.cashier-report-sheet{max-width:860px;margin:24px auto;padding:28px;background:#fff;border:1px solid #d8e2ea;border-radius:8px}
.cashier-report-head{display:flex;justify-content:space-between;gap:20px;margin-bottom:18px}
.cashier-report-brand{font-size:11px;font-weight:700;letter-spacing:.08em;color:#0879be}
.cashier-report-right{text-align:right}
.cashier-report-right h1{margin:0 0 6px;font-size:16px;color:#172b3d}
.cashier-report-muted{margin:2px 0 0;color:#778590;font-size:10px}
.cashier-report-badge{display:inline-block;margin-top:8px;padding:4px 8px;border-radius:999px;background:#eef4fa;color:#0879be;font-size:8px;font-weight:700;letter-spacing:.06em}
.cashier-report-badge-z{background:#edf8f2;color:#176644}
.cashier-report-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
.cashier-report-meta div{padding:10px 12px;background:#f7fafc;border:1px solid #e2e8ee;border-radius:6px}
.cashier-report-meta strong{display:block;color:#6c7a86;font-size:8px;text-transform:uppercase}
.cashier-report-meta span{display:block;margin-top:4px;color:#172b3d;font-size:11px}
.cashier-report-table{width:100%;border-collapse:collapse;font-size:10px;margin-bottom:16px}
.cashier-report-table th,.cashier-report-table td{padding:8px 10px;border-bottom:1px solid #e8edf1;text-align:left}
.cashier-report-table th{background:#eef2f5;font-size:8px;text-transform:uppercase;color:#5f6d77}
.cashier-report-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.cashier-report-summary article{padding:10px 12px;background:#f7fafc;border:1px solid #e2e8ee;border-radius:6px}
.cashier-report-summary span{display:block;color:#6c7a86;font-size:8px;text-transform:uppercase}
.cashier-report-summary strong{display:block;margin-top:4px;color:#172b3d;font-size:14px}
.cashier-report-notes{margin-bottom:16px;padding:10px 12px;background:#fffbeb;border:1px solid #f0dfaa;border-radius:6px;font-size:10px}
.cashier-report-signoff{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding-top:18px;border-top:1px solid #e2e8ee}
.cashier-report-signoff span{display:block;color:#6c7a86;font-size:8px;text-transform:uppercase}
.cashier-report-signoff strong{display:block;margin-top:28px;border-bottom:1px solid #172b3d;min-height:18px}
@media print{
    .cashier-report-page{background:#fff}
    .standalone-toolbar{display:none!important}
    .cashier-report-sheet{margin:0;border:none;box-shadow:none}
}
.quick-action-form{margin:0}
.quick-action-button{min-width:92px;height:28px;padding:0 11px;color:#fff;background:var(--erp-blue);border:1px solid var(--erp-blue);font-size:9px;font-weight:600;cursor:pointer}
.quick-action-button:hover{background:#066cae}
.auto-entry-note{padding:10px;color:#45606f;background:#eaf4fa;border:1px solid #c7dce8;font-size:8px;line-height:1.5}
.workflow-load-card{display:flex;flex-direction:column;flex:1;min-height:0}
.workflow-truck-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;width:100%;padding:0;background:#f7f9fa;border:0;border-bottom:1px solid #ccd6dd;text-align:left;cursor:pointer;font:inherit;color:inherit}
.workflow-truck-summary>div{min-height:72px;padding:12px 16px;border-right:1px solid #d8dfe4}
.workflow-truck-summary>div small{display:block;margin-bottom:6px;color:#84909a;font-size:7px;text-transform:uppercase;font-weight:500}
.workflow-truck-summary>div strong{display:block;font-size:10px;font-weight:600;color:#2c3943}
.workflow-truck-summary:not(.is-complete)>div strong[data-truck-vehicle-display]{color:#066cae}
.workflow-truck-summary:hover{background:#eef6fb}
.workflow-truck-summary.is-complete .workflow-truck-edit{color:#066cae}
.workflow-truck-edit{align-self:center;padding:0 18px;color:#607582;font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
@media (max-width:820px){.workflow-truck-summary{grid-template-columns:1fr 1fr}.workflow-truck-summary>div:nth-child(3){grid-column:1/-1}.workflow-truck-edit{grid-column:1/-1;justify-self:end;padding:8px 16px 12px}}
.workflow-load-card .workflow-body{flex:1}
.workflow-body-load{grid-template-columns:minmax(0,1fr)!important}
.workflow-load-footer{display:flex;align-items:center;gap:14px 18px;padding:14px 20px;background:#f1f6f9;border-top:1px solid #ccd6dd;flex-wrap:wrap}
.workflow-load-footer .load-entry-summary{flex:0 0 auto;margin:0}
.workflow-load-footer .workflow-load-confirm{flex:1 1 220px;margin:0;min-width:200px}
.workflow-load-footer .workflow-load-note{flex:0 0 auto;margin:0;font-size:9px}
.workflow-load-footer .workflow-load-note summary{cursor:pointer;color:#607582}
.workflow-load-footer .workflow-load-note textarea{width:220px;height:52px;margin-top:4px;font-size:9px}
.workflow-load-actions{margin-left:auto;display:flex;gap:8px}
.workflow-load-actions .button{min-width:190px}
@media (max-width:820px){.workflow-load-footer{align-items:stretch;flex-direction:column}.workflow-load-actions{margin-left:0}.workflow-load-actions .button{width:100%}}
.workflow-load-form .dispatch-final-check{font-size:8px;line-height:1.45}
.load-entry-hint{margin:-4px 0 10px;color:#607582;font-size:9px}
.load-entry-table tbody tr.load-line-row{cursor:pointer;transition:background .15s}
.load-entry-table tbody tr.load-line-row:hover,.load-entry-table tbody tr.load-line-row:focus{background:#eef6fb;outline:0}
.load-entry-table tbody tr.load-line-row.is-entered{background:#f3faf6}
.load-entry-table .load-line-qty-display{color:#8a96a0;font-style:italic}
.load-entry-table tr.is-entered .load-line-qty-display{color:#087551;font-style:normal;font-weight:600}
.load-entry-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;background:#fff;border:1px solid #cdd8df}
.load-entry-summary span{text-align:center}
.load-entry-summary small,.load-entry-summary em,.load-entry-summary strong{display:block}
.load-entry-summary small{color:#7a8791;font-size:7px;text-transform:uppercase}
.load-entry-summary strong{margin-top:4px;font-size:14px}
.load-entry-summary em{margin-top:2px;color:#7a8791;font-size:8px;font-style:normal}
.load-line-popup{position:absolute;inset:0;z-index:20;display:grid;place-items:center;padding:20px}
.load-line-popup[hidden]{display:none!important}
.load-line-backdrop{position:absolute;inset:0;background:rgba(16,36,63,.45)}
.load-line-card{position:relative;z-index:1;width:min(420px,calc(100% - 24px));background:#fff;border:1px solid #bfcbd4;box-shadow:0 18px 50px rgba(13,31,47,.22)}
.load-line-header{padding:18px 20px;border-bottom:1px solid #d5dee5}
.load-line-header h2{margin:6px 0 4px;font-size:18px}
.load-line-header p{margin:0;color:#72808b;font-size:10px}
.load-line-header p strong{color:#2c3943}
.load-line-form{padding:18px 20px 20px;display:grid;gap:12px}
.load-line-form label{font-size:9px;font-weight:500;color:#4f5d67}
.load-line-form input{width:100%;height:38px;margin-top:5px;padding:0 10px;font-size:12px;border:1px solid #bdc9d1}
.load-line-note{margin:0;color:#6f7c86;font-size:9px;line-height:1.45}
.load-line-actions{display:flex;justify-content:flex-end;gap:8px}
.workflow-card{position:relative}
.dispatch-confirmation{display:grid;gap:8px}
.dispatch-confirmation-head{padding:10px;background:#eaf4fa;border:1px solid #c7dce8}
.dispatch-confirmation-head strong,.dispatch-confirmation-head span{display:block}
.dispatch-confirmation-head span{margin-top:3px;color:#607582;font-size:8px}
.dispatch-confirm-row{padding:10px;display:grid;grid-template-columns:28px 1fr 105px;gap:9px;align-items:center;background:#fff;border:1px solid #cbd6de}
.dispatch-confirm-row strong,.dispatch-confirm-row small{display:block}.dispatch-confirm-row small{margin-top:3px;color:#6f7e89;font-size:7px;line-height:1.5}
.dispatch-check{display:grid;place-items:center}.dispatch-check input{width:18px;height:18px;margin:0;accent-color:var(--erp-blue)}
.dispatch-confirm-row label:last-child{margin:0}
.dispatch-final-check{padding:10px;display:flex!important;gap:8px;align-items:flex-start;background:#fff8e7;border:1px solid #ead7a3;line-height:1.45!important}
.dispatch-final-check input{width:16px!important;height:16px!important;margin:0!important;flex:0 0 auto;accent-color:var(--erp-blue)}
.dispatch-vehicle-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding-bottom:4px}
.dispatch-vehicle-fields label:last-child{grid-column:1/-1}
.dispatch-confirm-popup{position:fixed;inset:0;z-index:1400;display:none;place-items:center;padding:24px}
.dispatch-confirm-popup.is-open{display:grid}
.dispatch-confirm-backdrop{position:absolute;inset:0;background:rgba(16,36,63,.52)}
.dispatch-confirm-card{position:relative;z-index:1;width:min(580px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:auto;background:#fff;border:1px solid #bfcbd4;box-shadow:0 24px 70px rgba(13,31,47,.28)}
.dispatch-confirm-header{padding:20px 22px;display:flex;justify-content:space-between;gap:20px;align-items:flex-start;border-bottom:1px solid #d5dee5}
.dispatch-confirm-header h2{margin:5px 0 4px;font-size:20px}
.dispatch-confirm-header p{margin:0;color:#72808b;font-size:10px}
.dispatch-confirm-header>div:last-child{text-align:right}
.dispatch-confirm-header small,.dispatch-confirm-header strong{display:block}
.dispatch-confirm-header small{color:#7a8791;font-size:8px;text-transform:uppercase}
.dispatch-confirm-header strong{margin-top:5px;font-size:18px}
.dispatch-confirm-meta{display:block;margin-top:5px;color:#72808b;font-size:9px}
.dispatch-confirm-empty{padding:12px;color:#748392;font-size:10px;background:#f7fafc;border:1px solid #d7e0e7}
.dispatch-confirm-form{padding:18px 22px 22px;display:grid;gap:12px}
.dispatch-confirm-form .dispatch-confirmation-head strong{font-size:11px}
.dispatch-confirm-form .dispatch-confirmation-head span{font-size:9px}
.dispatch-confirm-form .dispatch-confirm-row strong{font-size:10px}
.dispatch-confirm-form .dispatch-confirm-row small{font-size:8px}
.dispatch-confirm-form .dispatch-confirm-row input{height:34px;font-size:10px}
.dispatch-confirm-form .dispatch-final-check{font-size:9px}
.dispatch-confirm-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:4px}
.dispatch-confirm-actions .button{min-width:130px}
.department-handoff .workflow-step{min-width:130px}
.department-handoff .workflow-step strong{font-size:11px}
.audit-history{margin-top:14px;border:1px solid #d7e0e7;background:#fff}
.audit-history summary,.optional-note summary{padding:10px;color:#45606f;cursor:pointer;font-size:8px;font-weight:600}
.audit-history>div{margin-left:18px;margin-right:12px}.audit-history>div:last-child{margin-bottom:12px}
.optional-note{border:1px solid #d7e0e7;background:#fff}.optional-note[open]{padding-bottom:9px}.optional-note label{padding:0 9px;display:block}
.payment-confirm-modal{align-items:center}
.payment-confirm-card{position:relative;z-index:2;width:min(520px,calc(100vw - 30px));overflow:hidden;background:#fff;border:1px solid #bfcbd4;box-shadow:0 24px 70px rgba(13,31,47,.28)}
.payment-confirm-header{padding:22px;display:flex;justify-content:space-between;gap:20px;align-items:flex-start;border-bottom:1px solid #d5dee5}
.payment-confirm-header h2{margin:5px 0 4px;font-size:21px}.payment-confirm-header p{margin:0;color:#72808b;font-size:9px}
.payment-confirm-header>div:last-child{text-align:right}.payment-confirm-header small,.payment-confirm-header strong{display:block}.payment-confirm-header small{color:#7a8791;font-size:8px;text-transform:uppercase}.payment-confirm-header strong{margin-top:5px;font-size:19px}
.payment-prior-paid{margin-top:4px;display:block;color:#16805a;font-size:8px}
.payment-confirm-form{padding:20px 22px;display:grid;grid-template-columns:1fr 1fr;gap:13px}
.payment-confirm-form label{color:#4f5d67;font-size:8px;font-weight:500}.payment-confirm-form input,.payment-confirm-form select,.payment-confirm-form textarea{width:100%;margin-top:5px;padding:0 10px;border:1px solid #bfcbd4;background:#fff;font-size:10px}.payment-confirm-form input,.payment-confirm-form select{height:36px}.payment-confirm-form textarea{padding-top:8px}
.payment-order-summary{grid-column:1/-1;padding:12px 14px;display:grid;grid-template-columns:1fr auto auto;gap:16px;align-items:center;background:#edf5fa;border:1px solid #c9dce8;color:#536875;font-size:9px}.payment-order-summary strong{color:#1d3445}
.payment-confirm-form .optional-note,.payment-confirm-actions{grid-column:1/-1}
.payment-reference-field small{margin-top:5px;display:block;color:#72818c;font-size:7px;line-height:1.4}
.payment-reference-field:not([hidden]){animation:paymentReferenceIn .16s ease-out}
@keyframes paymentReferenceIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
.payment-allocations{grid-column:1/-1;display:grid;gap:9px}
.payment-allocation-heading strong,.payment-allocation-heading span{display:block}.payment-allocation-heading span{margin-top:3px;color:#72818c;font-size:8px}
.payment-allocation-row{padding:10px;display:grid;grid-template-columns:145px 120px 1fr 28px;gap:9px;align-items:end;background:#f7f9fb;border:1px solid #cbd6de}
.cheque-payment-fields{grid-column:1/-2;display:grid;grid-template-columns:1fr 150px;gap:9px}.cheque-payment-fields[hidden]{display:none}
.payment-allocation-row label{margin:0}.payment-allocation-row small{margin-top:4px;display:block;color:#71808b;font-size:7px}
.payment-row-remove{width:28px;height:36px;color:#a52a2a;background:#fff;border:1px solid #c8d2da;cursor:pointer}
.add-payment-button{width:max-content;padding:7px 10px;color:var(--erp-blue);background:#fff;border:1px solid #9fc4db;font-size:9px;cursor:pointer}
.payment-balance{padding:9px 11px;display:flex;justify-content:flex-end;gap:25px;background:#edf5fa;border:1px solid #c9dce8;font-size:9px}.payment-balance strong{margin-left:5px}.payment-balance .balance-due{color:#b42318}.payment-balance .balance-change{color:#16805a}
.payment-confirm-actions button:disabled{opacity:.42;cursor:not-allowed;background:#71899a;border-color:#71899a}
.payment-allocation-row input:invalid:not(:placeholder-shown){border-color:#c53b32;background:#fff7f6}
@media(max-width:700px){.payment-allocation-row{grid-template-columns:1fr 1fr}.payment-allocation-row label:nth-child(3){grid-column:1/-1}.payment-row-remove{grid-column:2;justify-self:end}}
.payment-confirm-actions{padding-top:4px;display:flex;justify-content:flex-end;gap:8px}.payment-confirm-actions .button{min-width:120px;text-align:center}
@media(max-width:580px){.payment-confirm-form{grid-template-columns:1fr}.payment-confirm-header{padding:17px}.payment-confirm-form{padding:16px}.payment-order-summary{grid-template-columns:1fr auto}}
@media(max-width:900px){.department-summary{grid-template-columns:1fr 1fr}}

/* Visual depth and Product Master workspace */
body:not(.login-page){background:#f3f6f9}
.global-bar{background:linear-gradient(90deg,#0879c9 0%,#056aae 62%,#075c94 100%);box-shadow:0 2px 9px rgba(10,57,90,.24)}
.sidebar{background:linear-gradient(180deg,#f9fbfc 0%,#edf2f5 100%);box-shadow:3px 0 14px rgba(35,57,72,.04)}
.nav a:hover,.sidebar-footer a:hover{background:#e5f0f7}
.nav a.active{background:linear-gradient(90deg,#0879c9,#0b8fd5);box-shadow:inset 3px 0 rgba(255,255,255,.72),0 4px 12px rgba(8,121,201,.14)}
.topbar{background:rgba(255,255,255,.97);box-shadow:0 2px 9px rgba(31,55,72,.04)}
.content{padding:16px 16px 38px}
.panel{border-radius:3px;box-shadow:0 4px 16px rgba(24,48,65,.05)}
.record-command-bar{height:40px;padding:5px 8px;background:linear-gradient(#f8fafb,#eef2f5)}
.record-command-bar button{height:29px;border-radius:2px}.record-command-bar button:hover{box-shadow:0 2px 6px rgba(30,55,72,.07)}
.record-command-bar .command-primary{background:linear-gradient(#1290da,#0879c9);box-shadow:0 3px 8px rgba(8,121,201,.18)}
.data-panel table td{height:42px;padding:8px 9px}
.data-panel tbody tr{transition:background .15s ease,box-shadow .15s ease}
.data-panel tbody tr:nth-child(even){background:#fbfcfd}
.data-panel tbody tr:hover{position:relative;background:#eff8fd;box-shadow:inset 3px 0 #1493d2}
.search-box:focus-within{border-color:#258cc9;box-shadow:0 0 0 2px rgba(37,140,201,.1)}

.product-overview{margin-bottom:10px;display:grid;grid-template-columns:1.45fr repeat(3,1fr);gap:10px}
.product-overview article{min-height:105px;border:1px solid #d0dae1;border-radius:4px;box-shadow:0 5px 18px rgba(31,58,76,.055)}
.product-hero-card{position:relative;overflow:hidden;padding:18px 20px;color:#fff;background:linear-gradient(135deg,#086fae,#0b8acb 60%,#18a2cc)}
.product-card-label{display:block;color:#c9edff;font-size:8px;font-weight:700;letter-spacing:.7px;text-transform:uppercase}
.product-hero-card strong{margin-top:8px;display:block;font-size:23px;font-weight:600}.product-hero-card p{max-width:370px;margin:5px 0 0;color:#d9effa;font-size:9px;line-height:1.45}
.product-hero-glyph{position:absolute;right:20px;bottom:10px;width:82px;height:82px;opacity:.24}.product-hero-glyph span{position:absolute;bottom:0;width:20px;border:2px solid #fff;border-radius:7px 7px 10px 10px}.product-hero-glyph span::before{content:"";position:absolute;top:-10px;left:5px;width:7px;height:10px;border:2px solid #fff;border-bottom:0}.product-hero-glyph span:nth-child(1){left:0;height:48px}.product-hero-glyph span:nth-child(2){left:29px;height:68px}.product-hero-glyph span:nth-child(3){left:58px;height:38px}
.product-stat-card{--accent:#1686c4;--soft:#e6f3fa;padding:15px;display:flex;align-items:center;gap:13px;background:#fff;border-top:3px solid var(--accent)!important}
.product-stat-icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 auto;color:var(--accent);background:var(--soft);border-radius:10px;font-size:16px;font-weight:700}
.product-stat-card span,.product-stat-card strong,.product-stat-card small{display:block}.product-stat-card span{color:#72808a;font-size:8px;text-transform:uppercase}.product-stat-card strong{margin:5px 0 3px;color:#1f3442;font-size:21px}.product-stat-card small{color:#81909a;font-size:8px}
.accent-cyan{--accent:#0e9bb5;--soft:#e3f7fa}.accent-violet{--accent:#7459bf;--soft:#f0edfb}.accent-amber{--accent:#e29a22;--soft:#fff2da}.accent-green{--accent:#20a875;--soft:#e5f6ef}
.product-insight-bar{margin-bottom:10px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fff;border:1px solid #d2dce3;border-left:3px solid #1591cf;border-radius:3px}
.product-categories{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.category-chip{padding:5px 8px;display:flex;align-items:center;gap:5px;color:#526571;background:#f3f6f8;border:1px solid #dde4e8;border-radius:12px;font-size:8px}.category-chip i{width:7px;height:7px;background:#198fc7;border-radius:50%}.category-chip b{color:#18394d}.category-2 i{background:#755bc0}.category-3 i{background:#e29a22}.category-4 i{background:#20a875}
.product-insight-metrics{display:flex;gap:18px;color:#71808a;font-size:8px}.product-insight-metrics strong{margin-left:5px;color:#263d4c;font-size:9px}
.product-identity{display:flex;align-items:center;gap:9px}.product-type-mark{width:27px;height:27px;display:grid;place-items:center;flex:0 0 auto;color:#0879c9;background:#e5f2fa;border-radius:7px;font-size:9px;font-weight:700}.product-row-preform .product-type-mark{color:#6f53b7;background:#eeeafa}.product-row-raw-material .product-type-mark{color:#a46619;background:#fff0d7}.product-row-closure .product-type-mark{color:#128160;background:#e4f5ef}
.stock-cell>div:first-child{color:#44535e}.stock-cell>div:first-child strong{color:#1f3442}.stock-level{width:90px;height:4px;margin:5px 0 2px;overflow:hidden;background:#e5ebef;border-radius:4px}.stock-level span{height:100%;display:block;background:linear-gradient(90deg,#0b8ccc,#24a779);border-radius:4px}.stock-level.is-low span{background:linear-gradient(90deg,#e4a02a,#dc5a45)}
@media(max-width:1050px){.product-overview{grid-template-columns:1fr 1fr}.product-hero-card{grid-column:1/-1}}
@media(max-width:650px){.product-overview{grid-template-columns:1fr}.product-hero-card{grid-column:auto}.product-insight-bar{align-items:flex-start;flex-direction:column}.product-insight-metrics{flex-wrap:wrap}}
.customer-overview{margin-bottom:10px;display:grid;grid-template-columns:1.45fr repeat(3,1fr);gap:10px}
.customer-overview article{min-height:105px;border:1px solid #d0dae1;border-radius:4px;box-shadow:0 5px 18px rgba(31,58,76,.055)}
.customer-hero-card{position:relative;overflow:hidden;padding:18px 20px;color:#fff;background:linear-gradient(135deg,#0d7a52,#12a06b 60%,#1dbb7d)}
.customer-card-label{display:block;color:#d8f5e8;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.45px}
.customer-hero-card strong{margin-top:8px;display:block;font-size:23px;font-weight:600}
.customer-hero-card p{max-width:390px;margin:5px 0 0;color:#d8f5e8;font-size:9px;line-height:1.45}
.customer-hero-glyph{position:absolute;right:20px;bottom:12px;width:82px;height:82px;opacity:.22}
.customer-hero-glyph span{position:absolute;bottom:0;width:24px;height:24px;border:2px solid #fff;border-radius:50%}
.customer-hero-glyph span:nth-child(1){left:0}.customer-hero-glyph span:nth-child(2){left:29px;transform:scale(1.15)}.customer-hero-glyph span:nth-child(3){left:58px;transform:scale(.9)}
.customer-stat-card{--accent:#1686c4;--soft:#e6f3fa;padding:15px;display:flex;align-items:center;gap:13px;background:#fff;border-top:3px solid var(--accent)!important}
.customer-stat-card.accent-green{--accent:#15966b;--soft:#e4f7ef}
.customer-stat-card.accent-cyan{--accent:#1686c4;--soft:#e6f3fa}
.customer-stat-card.accent-amber{--accent:#d58a1d;--soft:#fff4df}
.customer-stat-card.accent-violet{--accent:#6d56c8;--soft:#f0ecfb}
.customer-stat-icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 auto;color:var(--accent);background:var(--soft);border-radius:10px;font-size:16px;font-weight:700}
.customer-stat-card span,.customer-stat-card strong,.customer-stat-card small{display:block}
.customer-stat-card span{color:#72808a;font-size:8px;text-transform:uppercase}
.customer-stat-card strong{margin:5px 0 3px;color:#1f3442;font-size:21px}
.customer-stat-card small{color:#81909a;font-size:8px}
.customer-insight-bar{margin-bottom:10px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #d0dae1;border-radius:4px}
.customer-watch-list{display:flex;flex-wrap:wrap;gap:8px}
.customer-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;color:#4d6270;background:#f4f8fa;border:1px solid #d2dee6;border-radius:16px;font-size:10px;text-decoration:none}
.customer-chip i{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.55}
.customer-chip b{color:#1f3442}
.customer-chip-ok{color:#0f7a57;background:#e8f7f0;border-color:#b7e4cf}
.customer-chip-1 i{background:#d58a1d}.customer-chip-2 i{background:#c45151}.customer-chip-3 i{background:#8d63cf}
.customer-insight-metrics{display:flex;gap:16px;color:#6d7f8c;font-size:10px}
.customer-insight-metrics strong{color:#1f3442}
.customer-recent-panel{margin-bottom:10px;padding:14px 16px;background:#fff;border:1px solid #d0dae1;border-radius:4px}
.customer-recent-panel > div strong{display:block;color:#25343e;font-size:12px}
.customer-recent-panel > div span{display:block;margin-top:3px;color:#748392;font-size:10px}
.customer-recent-items{margin-top:12px;display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.customer-recent-items a{padding:10px 12px;display:grid;gap:3px;background:#f7fafc;border:1px solid #d7e0e7;text-decoration:none}
.customer-recent-items a strong{color:#1f3442;font-size:11px}
.customer-recent-items a span,.customer-recent-items a small{color:#748392;font-size:9px}
.customer-identity{display:flex;align-items:center;gap:10px}
.customer-type-mark{width:30px;height:30px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#12a06b,#0d7a52);border-radius:8px;font-size:12px;font-weight:700}
.customer-detail-symbol{background:linear-gradient(145deg,#12a06b,#0d7a52)!important}
.customer-row:hover{background:#f7fbfd}
@media(max-width:1050px){.customer-overview{grid-template-columns:1fr 1fr}.customer-hero-card{grid-column:1/-1}.customer-recent-items{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.customer-overview{grid-template-columns:1fr}.customer-hero-card{grid-column:auto}.customer-insight-bar{flex-direction:column;align-items:flex-start}.customer-recent-items{grid-template-columns:1fr}}
.sales-overview{margin-bottom:10px;display:grid;grid-template-columns:1.45fr repeat(3,1fr);gap:10px}
.sales-overview article{min-height:105px;border:1px solid #d0dae1;border-radius:4px;box-shadow:0 5px 18px rgba(31,58,76,.055)}
.sales-hero-card{position:relative;overflow:hidden;padding:18px 20px;color:#fff;background:linear-gradient(135deg,#0b6ea8,#0b8acb 60%,#18a2cc)}
.sales-card-label{display:block;color:#d9effa;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.45px}
.sales-hero-card strong{margin-top:8px;display:block;font-size:23px;font-weight:600}
.sales-hero-card p{max-width:390px;margin:5px 0 0;color:#d9effa;font-size:9px;line-height:1.45}
.sales-hero-glyph{position:absolute;right:20px;bottom:12px;width:82px;height:82px;opacity:.22}
.sales-hero-glyph span{position:absolute;bottom:0;width:22px;height:30px;border:2px solid #fff;border-radius:4px 4px 2px 2px}
.sales-hero-glyph span:nth-child(1){left:0;height:42px}.sales-hero-glyph span:nth-child(2){left:29px;height:58px}.sales-hero-glyph span:nth-child(3){left:58px;height:34px}
.sales-stat-card{--accent:#1686c4;--soft:#e6f3fa;padding:15px;display:flex;align-items:center;gap:13px;background:#fff;border-top:3px solid var(--accent)!important}
.sales-stat-card.accent-cyan{--accent:#1686c4;--soft:#e6f3fa}
.sales-stat-card.accent-green{--accent:#15966b;--soft:#e4f7ef}
.sales-stat-card.accent-amber{--accent:#d58a1d;--soft:#fff4df}
.sales-stat-card.accent-violet{--accent:#6d56c8;--soft:#f0ecfb}
.sales-stat-icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 auto;color:var(--accent);background:var(--soft);border-radius:10px;font-size:16px;font-weight:700}
.sales-stat-card span,.sales-stat-card strong,.sales-stat-card small{display:block}
.sales-stat-card span{color:#72808a;font-size:8px;text-transform:uppercase}
.sales-stat-card strong{margin:5px 0 3px;color:#1f3442;font-size:21px}
.sales-stat-card small{color:#81909a;font-size:8px}
.sales-insight-bar{margin-bottom:10px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #d0dae1;border-radius:4px}
.sales-type-list{display:flex;flex-wrap:wrap;gap:8px}
.sales-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;color:#4d6270;background:#f4f8fa;border:1px solid #d2dee6;border-radius:16px;font-size:10px}
.sales-chip i{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.55}
.sales-chip b{color:#1f3442}
.sales-chip-ok{color:#0f7a57;background:#e8f7f0;border-color:#b7e4cf}
.sales-chip-1 i{background:#1686c4}.sales-chip-2 i{background:#12a06b}.sales-chip-3 i{background:#8d63cf}
.sales-insight-metrics{display:flex;gap:16px;color:#6d7f8c;font-size:10px}
.sales-insight-metrics strong{color:#1f3442}
.sales-order-row:hover{background:#f7fbfd;cursor:pointer}
@media(max-width:1050px){.sales-overview{grid-template-columns:1fr 1fr}.sales-hero-card{grid-column:1/-1}}
@media(max-width:650px){.sales-overview{grid-template-columns:1fr}.sales-hero-card{grid-column:auto}.sales-insight-bar{flex-direction:column;align-items:flex-start}}
.inventory-overview{margin-bottom:10px;display:grid;grid-template-columns:1.45fr repeat(3,1fr);gap:10px}
.inventory-overview article{min-height:105px;border:1px solid #d0dae1;border-radius:4px;box-shadow:0 5px 18px rgba(31,58,76,.055)}
.inventory-hero-card{position:relative;overflow:hidden;padding:18px 20px;color:#fff;background:linear-gradient(135deg,#7a5c18,#a67c1a 60%,#c49a2c)}
.inventory-card-label{display:block;color:#f8edd2;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.45px}
.inventory-hero-card strong{margin-top:8px;display:block;font-size:23px;font-weight:600}
.inventory-hero-card p{max-width:390px;margin:5px 0 0;color:#f8edd2;font-size:9px;line-height:1.45}
.inventory-hero-glyph{position:absolute;right:20px;bottom:12px;width:82px;height:82px;opacity:.22}
.inventory-hero-glyph span{position:absolute;bottom:0;width:26px;height:18px;border:2px solid #fff;border-radius:3px}
.inventory-hero-glyph span:nth-child(1){left:0}.inventory-hero-glyph span:nth-child(2){left:28px;width:30px}.inventory-hero-glyph span:nth-child(3){left:58px}
.inventory-stat-card{--accent:#1686c4;--soft:#e6f3fa;padding:15px;display:flex;align-items:center;gap:13px;background:#fff;border-top:3px solid var(--accent)!important}
.inventory-stat-card.accent-cyan{--accent:#1686c4;--soft:#e6f3fa}
.inventory-stat-card.accent-green{--accent:#15966b;--soft:#e4f7ef}
.inventory-stat-card.accent-amber{--accent:#d58a1d;--soft:#fff4df}
.inventory-stat-card.accent-violet{--accent:#6d56c8;--soft:#f0ecfb}
.inventory-stat-icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 auto;color:var(--accent);background:var(--soft);border-radius:10px;font-size:16px;font-weight:700}
.inventory-stat-card span,.inventory-stat-card strong,.inventory-stat-card small{display:block}
.inventory-stat-card span{color:#72808a;font-size:8px;text-transform:uppercase}
.inventory-stat-card strong{margin:5px 0 3px;color:#1f3442;font-size:21px}
.inventory-stat-card small{color:#81909a;font-size:8px}
.inventory-insight-bar{margin-bottom:10px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #d0dae1;border-radius:4px}
.inventory-type-list{display:flex;flex-wrap:wrap;gap:8px}
.inventory-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: #4d6270;
    background: #f4f8fa;
    border: 1px solid #d2dee6;
    border-radius: 16px;
    font-size: 10px;
    text-decoration: none;
}
.inventory-exception-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.module-heading.is-hidden {
    display: none;
}
.inventory-subnav {
    margin: 0 -20px 12px;
    padding: 0;
    overflow: hidden;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.inventory-subnav .table-toolbar,
.inventory-subnav .inventory-toolbar-layout {
    padding: 0 20px 8px;
    background: transparent;
    border-bottom: 1px solid #e1e6eb;
}
.inventory-subnav .inventory-toolbar-primary {
    justify-content: flex-start;
}
.inventory-subnav .inventory-views {
    flex: none;
    width: auto;
    max-width: 100%;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    justify-content: flex-start;
}
.inventory-subnav .inventory-views a {
    padding: 0 0 8px;
    margin-right: 18px;
    color: #607582;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    white-space: nowrap;
}
.inventory-subnav .inventory-views a:last-child {
    margin-right: 0;
}
.inventory-subnav .inventory-views a:hover {
    color: #1686c4;
    background: transparent !important;
}
.inventory-subnav .inventory-views a.active {
    color: #1686c4 !important;
    background: transparent !important;
    border-bottom-color: #1686c4 !important;
    font-weight: 600;
}
.inventory-subnav .inventory-views a .inventory-tab-count {
    background: #1686c4;
    color: #fff;
}
.inventory-subnav .inventory-category-tabs {
    margin-top: 0;
    padding-top: 8px;
    border-top: none;
    justify-content: flex-start;
    background: transparent !important;
    border: none !important;
}
.inventory-subnav .inventory-category-tabs a {
    color: #607582;
    background: transparent !important;
    border-bottom: 2px solid transparent !important;
}
.inventory-subnav .inventory-category-tabs a.active {
    color: #1686c4 !important;
    background: transparent !important;
    border-bottom-color: #1686c4 !important;
}
.inventory-subnav .inventory-category-tabs a.active span {
    color: #fff;
    background: #1686c4;
}
.inventory-index-kpis {
    margin-bottom: 12px;
}
.inventory-index-attention,
.inventory-index-workspaces {
    margin-bottom: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #d0dae1;
    border-radius: 4px;
}
.inventory-index-attention header,
.inventory-index-workspaces header {
    margin-bottom: 12px;
}
.inventory-index-attention header strong,
.inventory-index-workspaces header strong {
    display: block;
    color: #25343e;
    font-size: 12px;
}
.inventory-index-attention header span,
.inventory-index-workspaces header span {
    display: block;
    margin-top: 3px;
    color: #748392;
    font-size: 10px;
}
.inventory-attention-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.inventory-attention-item {
    padding: 12px 14px;
    display: grid;
    gap: 4px;
    color: inherit;
    background: #f8fafc;
    border: 1px solid #d7e0e7;
    border-radius: 6px;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.inventory-attention-item:hover {
    background: #f2f8fc;
    border-color: #b8d4e8;
}
.inventory-attention-item span {
    color: #607582;
    font-size: 9px;
    text-transform: uppercase;
}
.inventory-attention-item strong {
    color: #1f3442;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}
.inventory-attention-item small {
    color: #748392;
    font-size: 9px;
}
.inventory-workspace-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.inventory-workspace-grid a {
    min-height: 88px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #4d6270;
    background: #f8fafc;
    border: 1px solid #d7e0e7;
    border-radius: 6px;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.inventory-workspace-grid a:hover {
    color: #1f3442;
    background: #eef6fb;
    border-color: #b8d4e8;
}
.inventory-workspace-grid b {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #1686c4;
    background: #fff;
    border-radius: 6px;
    font-size: 14px;
}
.inventory-workspace-grid span {
    color: #25343e;
    font-size: 11px;
    font-weight: 700;
}
.inventory-workspace-grid small {
    color: #81909a;
    font-size: 9px;
}
.inventory-index-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
@media(max-width:1050px){.inventory-workspace-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.inventory-workspace-grid{grid-template-columns:1fr}.inventory-attention-list{grid-template-columns:1fr}}
@media(max-width:650px){
    .inventory-subnav{margin-left:-10px;margin-right:-10px}
    .inventory-subnav .inventory-toolbar-layout{padding-left:10px;padding-right:10px}
}
.inventory-grn-panel {
    min-height: auto;
}
.inventory-chip:hover {
    color: #1f3442;
    background: #eef6fb;
    border-color: #b8d4e8;
}
.inventory-chip i{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.55}
.inventory-chip b{color:#1f3442}
.inventory-chip-ok{color:#0f7a57;background:#e8f7f0;border-color:#b7e4cf}
.inventory-chip-1 i{background:#a67c1a}.inventory-chip-2 i{background:#1686c4}.inventory-chip-3 i{background:#c45151}
.inventory-insight-metrics{display:flex;gap:16px;color:#6d7f8c;font-size:10px}
.inventory-insight-metrics strong{color:#1f3442}
.inventory-dual-panel{margin-bottom:10px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.inventory-alert-panel,.inventory-recent-panel{padding:14px 16px;background:#fff;border:1px solid #d0dae1;border-radius:4px}
.inventory-alert-panel > div strong,.inventory-recent-panel > div strong{display:block;color:#25343e;font-size:12px}
.inventory-alert-panel > div span,.inventory-recent-panel > div span{display:block;margin-top:3px;color:#748392;font-size:10px}
.inventory-alert-items,.inventory-recent-items{margin-top:12px;display:grid;gap:8px}
.inventory-alert-items a,.inventory-recent-items a{padding:10px 12px;display:grid;gap:3px;background:#f7fafc;border:1px solid #d7e0e7;text-decoration:none}
.inventory-alert-items a strong,.inventory-recent-items a strong{color:#1f3442;font-size:11px}
.inventory-alert-items a span,.inventory-alert-items a small,.inventory-recent-items a span,.inventory-recent-items a small{color:#748392;font-size:9px}
@media(max-width:1050px){.inventory-overview{grid-template-columns:1fr 1fr}.inventory-hero-card{grid-column:1/-1}.inventory-dual-panel{grid-template-columns:1fr}}
@media(max-width:650px){.inventory-overview{grid-template-columns:1fr}.inventory-hero-card{grid-column:auto}.inventory-insight-bar{flex-direction:column;align-items:flex-start}}

* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "DM Sans", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .brand strong, .metric-card > strong { font-family: "Manrope", sans-serif; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 248px; padding: 28px 18px 20px; display: flex; flex-direction: column; overflow-y: auto; color: #d4deeb; background: linear-gradient(180deg, #10243f 0%, #0b1c31 100%); }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 30px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #2b83ff, #0d56c8); border-radius: 11px; font: 800 21px "Manrope"; box-shadow: 0 8px 20px rgba(28,112,232,.3); }
.brand strong { display: block; color: white; font-size: 19px; line-height: 1; letter-spacing: .4px; }
.brand small { display: block; margin-top: 5px; color: #8298b3; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.plant-switcher { margin-bottom: 25px; padding: 12px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; }
.plant-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: #8dc0ff; background: rgba(49,132,238,.16); font-size: 11px; font-weight: 800; }
.plant-switcher small, .plant-switcher strong { display: block; }
.plant-switcher small { margin-bottom: 3px; color: #758ca8; font-size: 10px; }
.plant-switcher strong { color: #e8eef6; font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { padding: 0 12px 9px; color: #647d9a; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.nav a, .sidebar-footer a { min-height: 43px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border-radius: 9px; color: #9db0c6; font-size: 13px; font-weight: 600; transition: .2s ease; }
.nav a:hover, .sidebar-footer a:hover { color: white; background: rgba(255,255,255,.055); }
.nav a.active { color: white; background: linear-gradient(90deg, rgba(28,112,232,.34), rgba(28,112,232,.12)); box-shadow: inset 3px 0 #438ef4; }
.nav-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: #8ba4c0; background: rgba(255,255,255,.055); font-size: 10px; font-weight: 800; }
.nav a.active .nav-icon { color: #a9ceff; background: rgba(54,137,244,.2); }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); }
.main-shell { width: calc(100% - 248px); min-height: 100vh; margin-left: 248px; display: flex; flex-direction: column; }
.topbar { min-height: 86px; padding: 19px 34px; display: flex; align-items: center; gap: 16px; background: white; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.4px; }
.eyebrow { color: #8793a3; font-size: 9px; font-weight: 800; letter-spacing: 1.25px; text-transform: uppercase; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.date-chip { padding: 8px 12px; color: var(--muted); background: #f6f8fb; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 600; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu .avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(145deg, var(--blue), #66a5ff); font-weight: 700; }
.user-menu strong, .user-menu span { display: block; }
.user-menu strong { font-size: 12px; }
.user-menu span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.menu-toggle { display: none; }
.content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 30px 34px 38px; flex: 1; }
.footer { padding: 18px 34px; color: #99a4b1; border-top: 1px solid var(--line); font-size: 10px; }
.footer span { margin: 0 7px; }

.welcome-row { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.welcome-row h2 { margin-bottom: 5px; font-size: 22px; letter-spacing: -.5px; }
.welcome-row p { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 9px; }
.button { min-height: 40px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 700; transition: .2s ease; }
.button-primary { color: white; background: var(--blue); box-shadow: 0 7px 16px rgba(28,112,232,.19); }
.button-primary:hover { background: #145fc9; transform: translateY(-1px); }
.button-secondary { color: #536176; background: white; border-color: var(--line); }
.button-secondary:hover { color: var(--blue); border-color: #a9c8f6; }
.button-block { width: 100%; min-height: 47px; }

.metric-grid { margin-bottom: 22px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.metric-card { position: relative; overflow: hidden; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 5px 18px rgba(22,42,70,.035); }
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--card-accent); }
.metric-top { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--card-accent); background: var(--card-soft); font-size: 11px; font-weight: 800; }
.metric-card > strong { display: block; margin-bottom: 7px; font-size: 24px; letter-spacing: -.8px; }
.metric-card small { color: #929cab; font-size: 10px; }
.metric-card small b { margin-left: 5px; color: var(--green); }
.accent-blue { --card-accent: var(--blue); --card-soft: var(--blue-soft); }
.accent-orange { --card-accent: var(--orange); --card-soft: #fff1e8; }
.accent-green { --card-accent: var(--green); --card-soft: #e9f8f2; }
.accent-purple { --card-accent: var(--purple); --card-soft: #f0edff; }

.dashboard-grid { margin-bottom: 22px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: stretch; }
.panel { padding: 21px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.panel-header { min-height: 38px; margin-bottom: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-header h3 { margin: 4px 0 0; font-size: 15px; letter-spacing: -.2px; }
.panel-header > a { margin-top: 7px; color: var(--blue); font-size: 10px; font-weight: 700; }
.production-item { padding: 13px 0; display: grid; grid-template-columns: 90px minmax(180px,1fr) minmax(150px,.8fr) 80px; align-items: center; gap: 14px; border-top: 1px solid #edf0f4; }
.production-item:first-child { border-top: 0; }
.item-code { color: #566579; font-size: 10px; font-weight: 800; }
.item-main strong, .item-main span { display: block; }
.item-main strong { margin-bottom: 4px; font-size: 11px; }
.item-main span { color: #8b96a5; font-size: 9px; }
.progress-meta { margin-bottom: 6px; display: flex; justify-content: space-between; color: #8a95a4; font-size: 8px; }
.progress-meta strong { color: #546477; }
.progress { height: 5px; overflow: hidden; background: #edf1f5; border-radius: 5px; }
.progress span { height: 100%; display: block; background: linear-gradient(90deg, var(--blue), #62a3ff); border-radius: 5px; }
.badge { padding: 5px 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 20px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.badge-success { color: #15805a; background: #e5f7f0; }
.badge-info { color: #1763bd; background: #e7f1ff; }
.badge-warning { color: #a96516; background: #fff2d9; }
.badge-danger { color: #b34444; background: #ffe8e8; }
.badge-muted { color: #667387; background: #edf0f4; }
.alert-item { padding: 14px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid #edf0f4; }
.alert-item:first-of-type { border-top: 0; }
.stock-dot { width: 9px; height: 9px; border: 2px solid #ff9c59; border-radius: 50%; box-shadow: 0 0 0 4px #fff0e7; }
.alert-item div { min-width: 0; flex: 1; }
.alert-item strong, .alert-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-item strong { margin-bottom: 4px; font-size: 10px; }
.alert-item small { color: #919baa; font-size: 9px; }
.empty-mini { padding: 25px; color: var(--muted); text-align: center; font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 11px; color: #8c97a5; background: #f7f9fb; font-size: 8px; font-weight: 800; letter-spacing: .6px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 11px; color: #526075; border-bottom: 1px solid #edf0f4; font-size: 10px; white-space: nowrap; }
td strong { color: var(--ink); }
tbody tr:hover { background: #fafcff; }
.cell-sub { margin-top: 4px; display: block; color: #98a2af; font-size: 8px; }
.tiny-alert { margin-left: 4px; padding: 2px 5px; color: #b34444; background: #ffe8e8; border-radius: 6px; font-size: 7px; font-weight: 800; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-grid a { min-height: 77px; padding: 13px; display: flex; flex-direction: column; justify-content: center; gap: 8px; color: #657386; background: #f8fafc; border: 1px solid #edf0f4; border-radius: 10px; font-size: 9px; font-weight: 700; transition: .2s ease; }
.quick-grid a:hover { color: var(--blue); background: var(--blue-soft); border-color: #c8dcfa; transform: translateY(-1px); }
.quick-grid span { width: 24px; height: 24px; display: grid; place-items: center; color: var(--blue); background: white; border-radius: 7px; box-shadow: 0 3px 8px rgba(22,42,70,.08); font-size: 14px; }

.module-heading { margin-bottom: 20px; }
.data-panel { padding: 0; overflow: hidden; }
.table-toolbar { padding: 16px 18px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.search-box { width: min(330px, 65%); height: 37px; padding: 0 12px; display: flex; align-items: center; gap: 9px; color: #929dab; background: #f7f9fb; border: 1px solid #e8ecf1; border-radius: 8px; }
.search-box span { font-size: 9px; font-weight: 800; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.toolbar-filter { height: 37px; padding: 0 14px; display: flex; align-items: center; color: #667386; background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; }
.data-panel th:first-child, .data-panel td:first-child { padding-left: 19px; }
.data-panel th:last-child, .data-panel td:last-child { padding-right: 19px; }
.data-panel tbody tr:last-child td { border-bottom: 0; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7, 20, 36, .61); backdrop-filter: blur(3px); }
.modal-card { position: relative; z-index: 1; width: min(820px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px; background: white; border-radius: 15px; box-shadow: 0 25px 80px rgba(5,20,40,.25); }
.modal-header { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; }
.modal-header h2 { margin: 4px 0 0; font-size: 19px; }
.modal-close { width: 33px; height: 33px; color: #7e8a99; background: #f5f7fa; border: 0; border-radius: 8px; font-size: 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .form-stack label { color: #566579; font-size: 10px; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea, .form-stack input { width: 100%; margin-top: 7px; padding: 0 12px; color: var(--ink); background: white; border: 1px solid #dfe5ec; border-radius: 8px; outline: 0; font-size: 11px; transition: .2s; }
.form-grid input, .form-grid select, .form-stack input { height: 41px; }
.form-grid textarea { padding-top: 11px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .form-stack input:focus { border-color: #72a9f3; box-shadow: 0 0 0 3px #eaf2ff; }
.form-span { grid-column: 1 / -1; }
.form-section { margin-top: 8px; padding: 12px 14px; background: #f5f8fc; border-left: 3px solid var(--blue); border-radius: 7px; }
.form-section:first-of-type { margin-top: 0; }
.form-section strong, .form-section span { display: block; }
.form-section strong { margin-bottom: 3px; color: var(--ink); font-size: 11px; }
.form-section span { color: #8793a3; font-size: 9px; }
.form-actions { padding-top: 6px; display: flex; justify-content: flex-end; gap: 8px; }
.table-action { color: var(--blue); font-size: 9px; font-weight: 700; }
.action-links { display: flex; gap: 10px; }
.text-danger { color: #b34444; font-weight: 700; }
.mini-progress { width: 80px; height: 4px; margin: 5px 0 2px; overflow: hidden; background: #edf1f5; border-radius: 4px; }
.mini-progress span { height: 100%; display: block; background: linear-gradient(90deg,var(--green),var(--orange)); border-radius: 4px; }
.empty-table { padding: 45px !important; color: var(--muted); text-align: center; }
.report-grid { margin-bottom: 17px; display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; }
.report-card { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.report-card strong { margin: 14px 0 6px; display: block; font: 700 19px "Manrope"; }
.report-card p { color: var(--muted); font-size: 10px; }
.report-card a { color: var(--blue); font-size: 9px; font-weight: 700; }
.chart { height: 280px; padding: 15px 5px 0; display: flex; align-items: flex-end; gap: 16px; border-bottom: 1px solid var(--line); }
.chart > div { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.chart span { width: min(34px,75%); min-height: 8px; background: linear-gradient(180deg, #5d9ff8, var(--blue)); border-radius: 6px 6px 2px 2px; }
.chart small { color: #909baa; font-size: 8px; }
.settings-panel { max-width: 850px; }
.settings-module,
.settings-layout {
    display: grid;
    gap: 14px;
}
.settings-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}
.settings-tabs a {
    min-height: 70px;
    padding: 11px 12px;
    display: block;
    color: #506373;
    background: #fff;
    border: 1px solid #d8e1e8;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(28, 56, 83, .04);
}
.settings-tabs a.active {
    color: #0d588b;
    border-color: #83bce4;
    background: #f2f8fc;
    box-shadow: inset 0 -3px 0 #0b83cf;
}
.settings-tabs strong,
.settings-tabs span {
    display: block;
}
.settings-tabs strong { margin-bottom: 4px; font-size: 11px; }
.settings-tabs span { font-size: 9px; line-height: 1.35; }
.settings-quality-panel { max-width: none; }
.settings-access-panel { max-width: none; }
.settings-wide { max-width: none; }
.settings-two-column {
    display: grid;
    grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.settings-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    background: linear-gradient(135deg, #0d6ea7, #1286c7);
    color: #fff;
}
.settings-kicker {
    display: block;
    margin-bottom: 8px;
    color: #bfe3ff;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.settings-hero h2 { margin: 0 0 7px; color: #fff; font-size: 24px; }
.settings-hero p { max-width: 680px; color: #d7ecfb; font-size: 12px; line-height: 1.6; }
.settings-health {
    min-width: 170px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.11);
    border-radius: 8px;
}
.settings-health strong,
.settings-health span { display: block; }
.settings-health strong { font-size: 18px; }
.settings-health span { margin-top: 4px; color: #cde6f8; font-size: 10px; }
.settings-stat-grid,
.settings-overview-grid,
.settings-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 10px;
}
.settings-stat-grid article,
.settings-overview-card,
.settings-data-grid section {
    padding: 14px;
    color: #22313d;
    background: #fff;
    border: 1px solid #d8e1e8;
    border-radius: 8px;
}
.settings-stat-grid span,
.settings-stat-grid small,
.settings-overview-card span,
.settings-data-grid span {
    display: block;
    color: #627481;
    font-size: 10px;
}
.settings-stat-grid strong {
    display: block;
    margin: 5px 0 3px;
    font: 800 24px "Manrope", sans-serif;
}
.settings-overview-card strong,
.settings-data-grid strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
}
.settings-data-grid strong {
    overflow-wrap: anywhere;
    font-size: 13px;
}
.settings-section-heading {
    margin-bottom: 14px;
}
.settings-section-heading strong {
    display: block;
    font-size: 13px;
}
.settings-section-heading span {
    display: block;
    margin-top: 4px;
    color: #627481;
    font-size: 11px;
}
.settings-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.settings-role-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    border: 1px solid #d5dee4;
    background: #f8fbfd;
}
.settings-role-matrix section { padding: 13px; border-right: 1px solid #dfe6eb; border-bottom: 1px solid #dfe6eb; }
.settings-role-matrix strong { display: block; font-size: 12px; }
.settings-role-matrix span { display: block; min-height: 34px; margin-top: 4px; color: #627481; font-size: 10px; line-height: 1.45; }
.settings-role-matrix ul { margin: 9px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; list-style: none; }
.settings-role-matrix li { padding: 3px 6px; color: #315a76; background: #e8f2f8; border: 1px solid #cfe1ec; font-size: 9px; }
.settings-role-matrix-large section { min-height: 150px; }
.settings-user-table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid #d5dee4; }
.settings-user-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.settings-user-table th,
.settings-user-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8ed; text-align: left; vertical-align: middle; font-size: 11px; }
.settings-user-table th { color: #526a7a; background: #f5f8fa; font-size: 9px; text-transform: uppercase; }
.settings-user-table td strong,
.settings-user-table td small { display: block; }
.settings-user-table td small { margin-top: 3px; color: #6a7c89; font-size: 9px; }
.settings-user-table code { color: #174f75; font-size: 11px; font-weight: 700; }
.settings-user-access-form { display: grid; grid-template-columns: minmax(145px, 1fr) auto auto; align-items: center; gap: 8px; }
.settings-user-access-form select { width: 100%; min-height: 32px; }
.settings-reset-form { display: grid; grid-template-columns: minmax(160px, 1fr) auto; gap: 8px; align-items: center; }
.settings-reset-form input { width: 100%; min-height: 32px; }
.settings-account-toggle { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 10px; }
.settings-create-user { grid-template-columns: 1fr; }
.settings-checklist {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.settings-data-form { margin-top: 14px; }
@media (max-width: 760px) {
    .settings-role-matrix { grid-template-columns: 1fr; }
    .settings-two-column { grid-template-columns: 1fr; }
    .settings-hero { display: grid; }
    .settings-tabs { grid-template-columns: 1fr 1fr; }
    .settings-tabs a { min-height: 62px; }
}
.settings-template-card {
    border: 1px solid #d5dee4;
    background: #f8fbfd;
    padding: 12px;
}
.settings-template-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.settings-template-card-head strong { display: block; font-size: 12px; }
.settings-template-card-head span { display: block; margin-top: 3px; color: #6a7c89; font-size: 10px; }
.settings-template-table {
    width: 100%;
    border-collapse: collapse;
}
.settings-template-table th,
.settings-template-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #e2e8ed;
    text-align: left;
    vertical-align: middle;
    font-size: 11px;
}
.settings-template-table input[type="text"] {
    width: 100%;
    min-width: 0;
}
.settings-required-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}
.settings-template-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.button-small {
    min-height: 28px;
    padding: 0 10px;
    font-size: 10px;
}

.alert { position: relative; margin-bottom: 15px; padding: 12px 40px 12px 14px; border: 1px solid; border-radius: 9px; font-size: 11px; }
.alert button { position: absolute; top: 7px; right: 9px; color: inherit; background: none; border: 0; font-size: 17px; }
.alert-success { color: #167457; background: #e9f8f2; border-color: #c7eadc; }
.alert-error { color: #a64040; background: #fff0f0; border-color: #f3cccc; }

.login-page { min-height: 100vh; background: white; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; }
.login-story { position: relative; overflow: hidden; padding: 40px 55px; color: white; background: radial-gradient(circle at 80% 20%, #245282 0%, transparent 35%), linear-gradient(150deg, #102b4b, #091b31 75%); }
.brand-light { position: relative; z-index: 2; margin: 0; }
.story-copy { position: relative; z-index: 3; max-width: 530px; margin-top: 16vh; }
.story-tag { margin-bottom: 20px; padding: 7px 11px; display: inline-block; color: #96c4ff; background: rgba(60,139,239,.13); border: 1px solid rgba(106,166,240,.2); border-radius: 20px; font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.story-copy h1 { margin-bottom: 20px; font-size: clamp(42px,5vw,70px); line-height: 1.03; letter-spacing: -3px; }
.story-copy > p { max-width: 480px; color: #9cb0c7; font-size: 14px; line-height: 1.8; }
.story-stats { margin-top: 45px; display: flex; gap: 45px; }
.story-stats strong, .story-stats span { display: block; }
.story-stats strong { margin-bottom: 5px; color: #dcecff; font: 700 16px "Manrope"; }
.story-stats span { color: #7189a4; font-size: 10px; }
.factory-visual { position: absolute; inset: auto -3% -8% 0; height: 39%; opacity: .26; }
.line { position: absolute; height: 2px; background: linear-gradient(90deg, transparent, #4e89c5, transparent); transform: rotate(-5deg); }
.line-one { width: 85%; right: 0; top: 45%; }
.line-two { width: 70%; left: 0; top: 70%; }
.bottle { position: absolute; bottom: 15%; width: 70px; height: 170px; border: 2px solid #5590ca; border-radius: 20px 20px 28px 28px; }
.bottle::before { content: ""; position: absolute; top: -28px; left: 20px; width: 27px; height: 28px; border: 2px solid #5590ca; border-bottom: 0; border-radius: 5px 5px 0 0; }
.bottle-one { right: 12%; transform: scale(1.35); }
.bottle-two { right: 35%; transform: scale(.8); }
.bottle-three { right: 52%; transform: scale(.55); }
.login-panel { padding: 45px; display: grid; place-items: center; background: #fbfcfe; }
.login-card { width: min(390px,100%); }
.mobile-brand { display: none; }
.login-card h2 { margin: 7px 0 8px; font-size: 27px; letter-spacing: -1px; }
.subtle { margin-bottom: 31px; color: var(--muted); font-size: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-stack input { height: 45px; }
.form-options { display: flex; justify-content: space-between; color: #7e8998; font-size: 10px; }
.form-options a { color: var(--blue); font-weight: 700; }
.checkbox { display: flex; align-items: center; gap: 7px; font-weight: 500 !important; }
.checkbox input { width: 14px; height: 14px; margin: 0; }
.demo-note { margin-top: 25px; padding: 12px 14px; display: flex; justify-content: space-between; color: #748195; background: #f1f5fa; border-radius: 8px; font-size: 9px; }
.demo-note strong { color: #526177; }

@media (max-width: 1100px) {
    .metric-grid, .report-grid { grid-template-columns: 1fr 1fr; }
    .production-item { grid-template-columns: 78px 1fr 130px; }
    .production-item > .badge { display: none; }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.is-open { transform: translateX(0); box-shadow: 20px 0 50px rgba(7,20,36,.25); }
    .main-shell { width: 100%; margin-left: 0; }
    .menu-toggle { width: 37px; height: 37px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #f5f7fa; border: 0; border-radius: 8px; }
    .menu-toggle span { width: 16px; height: 2px; background: #607087; }
    .topbar { padding: 16px 20px; }
    .content { padding: 24px 20px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .date-chip { display: none; }
    .login-shell { grid-template-columns: 1fr; }
    .login-story { display: none; }
    .login-panel { padding: 30px 20px; }
    .mobile-brand { margin-bottom: 35px; display: block; color: var(--blue); font: 800 20px "Manrope"; letter-spacing: .5px; }
}
@media (max-width: 580px) {
    .metric-grid, .report-grid { grid-template-columns: 1fr; }
    .welcome-row { align-items: flex-start; flex-direction: column; }
    .page-actions { width: 100%; }
    .page-actions .button { flex: 1; padding: 0 10px; }
    .user-menu div:last-child { display: none; }
    .topbar h1 { font-size: 17px; }
    .production-item { grid-template-columns: 1fr auto; }
    .production-item .item-code { grid-column: 1; }
    .production-item .item-main { grid-column: 1; }
    .production-item .progress-wrap { grid-column: 2; grid-row: 1 / 3; width: 100px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-span { grid-column: auto; }
    .modal-card { padding: 20px; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
    .footer { padding: 16px 20px; }
}

/* Enterprise ERP workspace */
:root {
    --erp-blue: #0879c9;
    --erp-blue-dark: #0566ac;
    --erp-blue-soft: #e7f3fb;
    --erp-border: #cfd7df;
    --erp-grid: #e0e5ea;
    --erp-sidebar: #f4f6f8;
    --erp-text: #242a30;
}
body:not(.login-page) { padding-top: 50px; background: #fff; color: var(--erp-text); font-family: Inter, Arial, sans-serif; font-size: 13px; }
body:not(.login-page) h1, body:not(.login-page) h2, body:not(.login-page) h3 { font-family: Inter, Arial, sans-serif; font-weight: 500; letter-spacing: 0; }
.global-bar { position: fixed; z-index: 70; inset: 0 0 auto 0; height: 50px; display: flex; align-items: stretch; color: #fff; background: var(--erp-blue); box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.global-brand { width: 205px; padding: 0 18px; display: flex; align-items: center; gap: 9px; border-right: 1px solid rgba(255,255,255,.35); }
.brand-glyph { width: 23px; height: 23px; display: grid; place-items: center; color: var(--erp-blue); background: #fff; border-radius: 6px; font-size: 14px; font-weight: 800; }
.global-brand strong { font-size: 20px; font-weight: 600; }
.global-search { width: 310px; height: 32px; margin: 9px 14px; display: flex; align-items: center; color: var(--erp-blue); background: #fff; border: 1px solid rgba(0,0,0,.18); }
.global-search span { order: 2; padding: 0 10px; font-size: 14px; }
.global-search input { min-width: 0; height: 100%; padding: 0 8px; flex: 1; border: 0; outline: 0; color: #333; font-size: 12px; font-style: italic; }
.global-icon { width: 51px; color: #fff; background: transparent; border: 0; border-left: 1px solid rgba(255,255,255,.28); font-size: 20px; }
.global-icon:hover { background: rgba(0,0,0,.08); }
.global-spacer { flex: 1; }
.company-context { min-width: 145px; padding: 7px 14px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid rgba(255,255,255,.28); }
.company-context small, .company-context strong { display: block; }
.company-context small { margin-bottom: 2px; color: rgba(255,255,255,.72); font-size: 9px; text-transform: uppercase; }
.company-context strong { max-width: 180px; overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.global-user { min-width: 190px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border-left: 1px solid rgba(255,255,255,.28); }
.global-user .avatar { width: 27px; height: 27px; display: grid; place-items: center; color: var(--erp-blue); background: #fff; border-radius: 50%; font-size: 11px; font-weight: 700; }
.global-user span strong, .global-user span small { display: block; }
.global-user span strong { font-size: 11px; font-weight: 500; }
.global-user span small { margin-top: 1px; color: rgba(255,255,255,.7); font-size: 8px; }
.global-user b { margin-left: auto; font-size: 9px; }

.sidebar { top: 50px; width: 205px; padding: 9px 0 40px; color: #28323c; background: var(--erp-sidebar); border-right: 1px solid #cbd3db; }
.nav { gap: 0; }
.nav-label { padding: 12px 18px 8px; color: #7b8792; font-size: 8px; letter-spacing: 1px; }
.nav a, .sidebar-footer a { min-height: 45px; padding: 0 14px 0 17px; gap: 12px; color: #27313b; border-radius: 0; font-size: 11px; font-weight: 400; }
.nav a:hover, .sidebar-footer a:hover { color: var(--erp-blue); background: #e8edf2; }
.nav a.active { color: #fff; background: var(--erp-blue); box-shadow: none; }
.nav-icon { width: 24px; height: 28px; color: var(--erp-blue); background: transparent; border-radius: 0; font-size: 17px; font-weight: 400; }
.nav a.active .nav-icon { color: #fff; background: transparent; }
.sidebar-footer { padding-top: 7px; background: var(--erp-sidebar); border-top: 1px solid #d6dce2; }
.main-shell { width: calc(100% - 205px); min-height: calc(100vh - 50px); margin-left: 205px; }
.topbar { min-height: 69px; padding: 10px 16px 8px; align-items: flex-end; background: #fff; border-bottom: 1px solid #ccd4dc; }
.topbar h1 { margin: 4px 0 0; font-size: 18px; font-weight: 500; }
.breadcrumb { color: #71808d; font-size: 9px; }
.screen-commands { margin-left: auto; align-self: center; display: flex; }
.screen-commands button { height: 28px; padding: 0 12px; color: #26333e; background: transparent; border: 0; font-size: 9px; text-transform: uppercase; }
.screen-commands button:hover { color: var(--erp-blue); background: #edf5fa; }
.content { max-width: none; padding: 13px 12px 35px; }
.footer { position: fixed; z-index: 60; inset: auto 0 0 0; height: 26px; padding: 0 12px; display: flex; align-items: center; color: #fff; background: var(--erp-blue); border: 0; font-size: 9px; }
.footer-center { margin: 0 auto; }
.footer strong { font-weight: 600; text-transform: uppercase; }
.menu-toggle { display: none; }

.workspace-title, .module-heading { min-height: 42px; margin: 0 0 9px; padding: 3px 4px 8px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d5dbe1; }
.workspace-title h2 { margin: 0 0 3px; font-size: 15px; }
.workspace-title p, .module-heading p { margin: 0; color: #66737e; font-size: 10px; }
.button { min-height: 29px; padding: 0 12px; border-radius: 2px; font-size: 10px; box-shadow: none; }
.button-primary { background: var(--erp-blue); }
.button-primary:hover { background: var(--erp-blue-dark); transform: none; }
.button-secondary { border-color: #bdc7d0; }
.erp-section { margin-bottom: 14px; }
.section-caption { height: 28px; display: flex; align-items: center; gap: 10px; color: #3b454e; font-size: 11px; text-transform: uppercase; }
.section-caption div { height: 1px; flex: 1; background: #d7dde2; }
.section-caption a { color: var(--erp-blue); font-size: 9px; text-transform: none; }
.exception-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 9px; }
.exception-tile { position: relative; min-height: 91px; padding: 12px 13px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: 1fr auto; align-items: start; color: #fff; border: 1px solid rgba(0,0,0,.09); }
.exception-tile .tile-icon { grid-row: 1 / 3; font-size: 25px; opacity: .92; }
.exception-tile strong { justify-self: end; font-size: 26px; font-weight: 400; }
.exception-tile small { grid-column: 2; align-self: end; justify-self: end; font-size: 9px; text-transform: uppercase; }
.tile-amber { background: #f5b916; }.tile-green { background: #20a64a; }.tile-red { background: #dc3545; }.tile-blue { background: #287bc1; }.tile-purple { background: #7254b5; }
.analytics-grid { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.erp-widget, .erp-grid-panel { min-height: 260px; background: #fff; border: 1px solid #cfd6dc; }
.widget-title { min-height: 36px; padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; color: #3d474f; border-bottom: 1px solid #d8dee3; font-size: 10px; text-transform: uppercase; }
.widget-title a, .widget-title > span:last-child { color: var(--erp-blue); font-size: 8px; text-transform: none; }
.donut-layout { height: 220px; padding: 20px; display: flex; align-items: center; justify-content: center; gap: 28px; }
.donut { width: 150px; height: 150px; display: grid; place-items: center; background: conic-gradient(#347fc8 0 var(--a),#13ad98 var(--a) var(--b),#efba51 var(--b) 100%); border-radius: 50%; }
.donut::before { content: ""; width: 78px; height: 78px; grid-area: 1/1; background: #fff; border-radius: 50%; }
.donut > span { z-index: 1; grid-area: 1/1; text-align: center; }
.donut strong,.donut small { display: block; }.donut strong { font-size: 23px; font-weight: 500; }.donut small { color: #78848e; font-size: 8px; }
.chart-legend { display: flex; flex-direction: column; gap: 13px; }
.chart-legend span { min-width: 110px; display: flex; align-items: center; gap: 7px; color: #56616b; font-size: 9px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; }.chart-legend b { margin-left: auto; color: #202931; }
.legend-blue{background:#347fc8}.legend-green{background:#13ad98}.legend-amber{background:#efba51}
.horizontal-bars { padding: 20px 18px 5px; display: flex; flex-direction: column; gap: 15px; }
.horizontal-bars label { margin-bottom: 4px; display: flex; justify-content: space-between; color: #586570; font-size: 9px; }
.hbar { height: 12px; background: #e8edf1; }.hbar span { height: 100%; display: block; background: #347fc8; }
.horizontal-bars > div:nth-child(2) .hbar span { background:#16a77d }.horizontal-bars > div:nth-child(3) .hbar span { background:#efb73e }
.widget-stat-row { margin: 12px 18px 0; padding-top: 11px; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid #e0e5e9; }
.widget-stat-row span { text-align: center; border-left: 1px solid #e0e5e9; }.widget-stat-row span:first-child{border:0}
.widget-stat-row small,.widget-stat-row strong{display:block}.widget-stat-row small{color:#84909a;font-size:7px;text-transform:uppercase}.widget-stat-row strong{margin-top:3px;font-size:13px}
.big-number { padding: 19px 15px 13px; background: #f7fafc; border-bottom: 1px solid #dfe5ea; }
.big-number strong,.big-number span{display:block}.big-number strong{font-size:22px;font-weight:500}.big-number span{margin-top:4px;color:#7c8993;font-size:8px;text-transform:uppercase}
.stock-exceptions > div { min-height: 39px; padding: 6px 11px; display: grid; grid-template-columns: 1fr auto auto; align-items:center; gap:10px; border-bottom:1px solid #e4e8ec; }
.stock-exceptions span b,.stock-exceptions span{display:block}.stock-exceptions span{color:#77838d;font-size:8px}.stock-exceptions span b{margin-bottom:2px;color:#28333c;font-size:9px}.stock-exceptions strong{font-size:10px}.stock-exceptions i{padding:3px 5px;color:#ad3c3c;background:#fae3e3;font-size:7px;font-style:normal}
.kpi-pairs { display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #dde3e8 }.kpi-pairs div{padding:16px;border-left:1px solid #dde3e8}.kpi-pairs div:first-child{border:0}.kpi-pairs small,.kpi-pairs strong{display:block}.kpi-pairs small{color:#76838e;font-size:8px;text-transform:uppercase}.kpi-pairs strong{margin-top:6px;font-size:17px;font-weight:500}
.spark-bars { height:112px;padding:15px 16px 0;display:flex;align-items:flex-end;gap:6px;border-bottom:1px solid #dfe4e8}.spark-bars span{flex:1;min-width:5px;background:#347fc8}.month-axis{padding:4px 13px;display:flex;justify-content:space-between;color:#8a949c;font-size:7px}
.erp-grid-panel { min-height:0; }
.erp-grid-panel table th,.data-panel table th { color:#37424b;background:#eef2f5;border:1px solid #d3d9de;font-size:8px;font-weight:600;letter-spacing:0;text-transform:none }
.erp-grid-panel table td,.data-panel table td { height:32px;padding:6px 8px;color:#303a43;border:1px solid #e0e4e8;font-size:9px }
.grid-link,.table-action{color:#086fc0;text-decoration:underline;font-size:9px}
.grid-progress{width:70px;height:5px;display:inline-block;margin-right:5px;background:#e5eaee;vertical-align:middle}.grid-progress span{height:100%;display:block;background:#3381ca}
.bottom-workspace { display:grid;grid-template-columns:1.4fr 1fr;gap:10px;margin-bottom:8px }.bottom-workspace .erp-widget{min-height:205px}
.compact-list > div { min-height:40px;padding:7px 10px;display:grid;grid-template-columns:85px 1fr 110px 72px;align-items:center;gap:8px;border-bottom:1px solid #e1e6ea;font-size:9px}.compact-list a{color:var(--erp-blue);text-decoration:underline}.compact-list i{font-style:normal}
.transaction-grid{padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.transaction-grid a{min-height:62px;padding:10px;display:flex;align-items:center;gap:10px;color:#35414a;background:#f6f8fa;border:1px solid #dce2e7;font-size:9px}.transaction-grid a:hover{color:var(--erp-blue);border-color:#8ebfe0}.transaction-grid b{width:27px;height:27px;display:grid;place-items:center;color:#fff;background:var(--erp-blue);font-size:16px;font-weight:400}

.panel { border-color:#cfd6dc;border-radius:0;box-shadow:none }.data-panel{border:1px solid #c7d0d8}
.record-command-bar { height:36px;padding:3px 7px;display:flex;align-items:center;background:#f2f5f7;border-bottom:1px solid #cbd3da}.record-command-bar span{flex:1}.record-command-bar button{height:27px;padding:0 11px;color:#37434d;background:transparent;border:1px solid transparent;font-size:9px}.record-command-bar button:hover{background:#fff;border-color:#bfc9d1}.record-command-bar .command-primary{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.table-toolbar { height:44px;padding:5px 8px;align-items:center;background:#fff;border-bottom:1px solid #ccd4db}.view-selector{display:flex;height:32px}.view-selector button{padding:0 13px;color:#52606b;background:#fff;border:0;border-bottom:2px solid transparent;font-size:9px}.view-selector button.active{color:var(--erp-blue);border-color:var(--erp-blue)}.toolbar-right{margin-left:auto;display:flex;align-items:center;gap:4px}
.search-box{width:290px;height:29px;background:#fff;border-color:#bfc8d0;border-radius:0}.search-box input{font-size:9px}.grid-tool{width:29px;height:29px;color:#52606a;background:#fff;border:1px solid #bfc8d0}
.toolbar-filter{border-radius:0}.grid-footer{height:28px;padding:0 9px;display:flex;align-items:center;gap:20px;color:#75818b;background:#f2f5f7;border-top:1px solid #cbd3da;font-size:8px}.grid-footer strong{margin-left:auto}
.badge{padding:3px 6px;border-radius:2px;font-size:7px}

.modal { justify-content:flex-end;padding:0; }
.modal-backdrop { background:rgba(20,37,51,.34);backdrop-filter:none }
.modal-card { width:min(880px,88vw);height:calc(100vh - 50px);max-height:none;margin-top:50px;padding:0;border-left:1px solid #8d9aa5;border-radius:0;box-shadow:-12px 0 35px rgba(18,37,51,.2)}
.entry-command-bar{position:sticky;z-index:5;top:0;height:39px;padding:4px 9px;display:flex;align-items:center;gap:3px;background:#f0f3f5;border-bottom:1px solid #c9d0d7}.entry-command-bar span{flex:1}.entry-command-bar button{height:29px;padding:0 12px;color:#35414a;background:transparent;border:1px solid transparent;font-size:9px}.entry-command-bar button:hover{background:#fff;border-color:#bbc6ce}.entry-command-bar .entry-save{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}.entry-command-bar .modal-close{width:31px;padding:0;font-size:19px}
.modal-header{margin:0;padding:15px 20px 12px;background:#fff}.modal-header h2{margin:3px 0 4px;font-size:18px}.modal-header p{margin:0;color:#72808a;font-size:9px}.record-type{color:var(--erp-blue);font-size:8px;font-weight:700;letter-spacing:1px}
.entry-tabs{height:35px;padding:0 18px;display:flex;gap:3px;border-bottom:1px solid #bfc8d0}.entry-tabs button{padding:0 14px;color:#586570;background:#fff;border:0;border-bottom:3px solid transparent;font-size:9px}.entry-tabs button.active{color:var(--erp-blue);border-color:var(--erp-blue)}
.modal-card .form-grid{padding:17px 20px 35px;gap:11px 16px}.form-grid label{font-size:9px;font-weight:500}.form-grid input,.form-grid select,.form-grid textarea{margin-top:4px;border-color:#bfc9d1;border-radius:1px;font-size:10px}.form-grid input,.form-grid select{height:31px}.form-grid textarea{padding-top:8px}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:var(--erp-blue);box-shadow:0 0 0 1px var(--erp-blue)}
.form-section{margin:7px -20px 2px;padding:8px 20px;background:#edf3f7;border-left:0;border-top:1px solid #d2dbe2;border-bottom:1px solid #d2dbe2;border-radius:0}.form-section strong{font-size:10px;font-weight:600}.form-section span{font-size:8px}.form-actions{border-top:1px solid #d4dbe1;padding-top:13px}
.report-command-bar{height:39px;margin-bottom:10px;padding:4px 7px;display:flex;gap:5px;background:#f1f4f6;border:1px solid #cbd3da}.report-command-bar button,.chart-tools button{padding:0 12px;color:#41505b;background:#fff;border:1px solid #bec8d0;font-size:9px}.report-command-bar .button-primary{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.report-grid{gap:9px;margin-bottom:12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.report-grid-secondary{grid-template-columns:repeat(3,minmax(0,1fr))}
.report-card{position:relative;padding:16px 16px 14px 18px;border-radius:10px;border:1px solid #dbe4ec;background:linear-gradient(180deg,#fff 0%,#f8fbfd 100%);box-shadow:0 8px 24px rgba(16,36,63,.05);transition:transform .18s ease,box-shadow .18s ease}
.report-card:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(16,36,63,.08)}
.report-card::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;border-radius:10px 0 0 10px;background:linear-gradient(180deg,#4ea3df,#0879c9)}.report-accent-2::before{background:linear-gradient(180deg,#5ec4a0,#13a678)}.report-accent-3::before{background:linear-gradient(180deg,#f3c969,#efad32)}.report-accent-4::before{background:linear-gradient(180deg,#9b7fd9,#7958b8)}
.report-card .eyebrow,.reports-kpi-label{font-size:8px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#7a8791}
.report-card strong,.reports-kpi-value{margin:10px 0 4px;display:block;font:700 22px/1 Manrope,Inter,sans-serif;color:#1a2b38}
.report-card strong small,.reports-kpi-value small{font-size:12px;font-weight:600;color:#748392}
.report-card p,.reports-kpi-detail{margin:0;color:#607080;font-size:10px;line-height:1.45}
.content-reports{padding:0 12px 35px}
.content-reports .reports-analytics{display:grid;gap:0;margin:0;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}
.reports-toolbar{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:10px 0 12px;border-bottom:1px solid #d5dbe1;margin-bottom:10px}
.reports-toolbar-meta{display:grid;gap:3px}
.reports-toolbar-label{font-size:8px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8a97a3}
.reports-toolbar-meta strong{font-size:13px;color:#25343e;font-weight:600}
.reports-toolbar-preset{display:inline-flex;align-items:center;width:fit-content;padding:2px 8px;color:#0b5f9a;background:#e7f3fb;border-radius:999px;font-size:8px;font-weight:700}
.reports-toolbar-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin-left:auto}
.reports-date-stack{display:flex;gap:8px}
.reports-date-stack label{display:grid;gap:4px;font-size:8px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#607080}
.reports-date-stack input{height:34px;min-width:132px;padding:0 10px;border:1px solid #c5d0da;background:#fff;font-size:11px;border-radius:4px}
.reports-apply-btn{height:34px;padding:0 14px;border-radius:4px}
.reports-command-actions{display:flex;flex-wrap:wrap;gap:6px}
.reports-action-btn{height:34px;padding:0 12px;display:inline-flex;align-items:center;color:#37566a;background:#fff;border:1px solid #bccbd5;border-radius:4px;font-size:9px;font-weight:700;text-decoration:none;cursor:pointer}
.reports-action-btn:hover{color:var(--erp-blue);border-color:#7fb4d4}
.reports-action-accent{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.reports-action-accent:hover{color:#fff;background:var(--erp-blue-dark);border-color:var(--erp-blue-dark)}
.reports-presets{display:flex;flex-wrap:wrap;gap:6px;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #e4e9ed}
.reports-presets a{height:28px;padding:0 12px;display:inline-flex;align-items:center;color:#52606b;background:#fff;border:1px solid #c5d0da;border-radius:999px;font-size:9px;font-weight:600;text-decoration:none}
.reports-presets a.active{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.reports-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:14px;align-items:start}
.reports-layout-single{grid-template-columns:minmax(0,1fr)}
.reports-sidebar{padding:0 10px 0 0;border-right:1px solid #e4e9ed;background:transparent;overflow:auto}
.reports-sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.reports-sidebar-head strong{font-size:10px;color:#25343e;text-transform:uppercase;letter-spacing:.06em}
.reports-sidebar-toggle{display:none;height:28px;padding:0 10px;color:#52606b;background:#fff;border:1px solid #c5d0da;border-radius:4px;font-size:9px}
.reports-nav-group{margin-bottom:12px}
.reports-nav-group-label{display:block;margin:0 0 6px;font-size:8px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#8a97a3}
.reports-nav-list{display:grid;gap:3px}
.reports-nav-item{display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;align-items:start;padding:8px;color:inherit;text-decoration:none;border:1px solid transparent;border-radius:6px}
.reports-nav-item:hover{background:#f3f7fa;border-color:#e0e7ed}
.reports-nav-item.is-active{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.reports-nav-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;background:#eef3f7;color:var(--erp-blue);font-size:11px;font-weight:800}
.reports-nav-item.is-active .reports-nav-icon{color:var(--erp-blue);background:#fff}
.reports-nav-copy{display:grid;gap:2px}
.reports-nav-copy strong{font-size:10px;line-height:1.3;color:#25343e}
.reports-nav-copy small{font-size:8px;line-height:1.35;color:#748392}
.reports-nav-item.is-active .reports-nav-copy strong,.reports-nav-item.is-active .reports-nav-copy small{color:#fff}
.reports-canvas{padding:0;background:transparent}
.reports-canvas-inner{display:grid;gap:14px}
.reports-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.reports-kpi-grid-compact{grid-template-columns:repeat(4,minmax(0,1fr))}
.reports-kpi-card{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:start;padding:16px;border:1px solid #dbe4ec;border-radius:12px;background:linear-gradient(180deg,#fff 0%,#f8fbfd 100%);box-shadow:0 10px 28px rgba(16,36,63,.05);overflow:hidden}
.reports-kpi-card::after{content:"";position:absolute;inset:auto 0 0 0;height:3px;background:var(--kpi-accent,#0879c9)}
.reports-kpi-blue{--kpi-accent:#0879c9}.reports-kpi-green{--kpi-accent:#13a678}.reports-kpi-amber{--kpi-accent:#efad32}.reports-kpi-violet{--kpi-accent:#7958b8}
.reports-kpi-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;color:var(--kpi-accent,#0879c9);background:color-mix(in srgb,var(--kpi-accent,#0879c9) 12%,#fff);font-size:16px}
.reports-kpi-chip{position:absolute;top:12px;right:12px;padding:3px 8px;color:#087551;background:#e8f8f1;border-radius:999px;font-size:7px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.reports-panel{border:1px solid #dbe4ec;border-radius:12px;background:#fff;box-shadow:0 10px 30px rgba(16,36,63,.04);overflow:hidden}
.reports-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px 12px;background:linear-gradient(180deg,#fbfdff 0%,#f4f8fb 100%);border-bottom:1px solid #e4ebf0}
.reports-panel-head.is-compact{padding:0 0 10px;background:transparent;border-bottom:0}
.reports-panel-eyebrow{display:block;font-size:8px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8a97a3}
.reports-panel-head h3{margin:4px 0 0;font-size:14px;color:#1a2b38}
.reports-panel-link{color:var(--erp-blue);font-size:9px;font-weight:700;text-decoration:none}
.reports-panel-body{padding:14px 16px 16px}
.reports-panel-split{display:grid;grid-template-columns:180px minmax(0,1fr);gap:18px;align-items:start}
.reports-panel-alert{border-color:#f0dcc0;background:linear-gradient(180deg,#fffaf3 0%,#fff 100%)}
.reports-badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:8px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.reports-badge-warn{color:#9a5b00;background:#fff3dd}
.reports-chart{position:relative;min-height:210px;padding:8px 4px 0}
.reports-chart-grid{position:absolute;inset:0 0 28px 0;background:repeating-linear-gradient(to top,rgba(228,235,240,.55) 0,rgba(228,235,240,.55) 1px,transparent 1px,transparent 42px);border-left:1px solid #e4ebf0;border-bottom:1px solid #e4ebf0;border-radius:0 0 4px 0}
.reports-chart-bars{position:relative;z-index:1;display:grid;grid-template-columns:repeat(auto-fit,minmax(68px,1fr));gap:10px;align-items:end;min-height:182px}
.reports-chart-bar-wrap{display:grid;gap:5px;justify-items:center;text-align:center}
.reports-chart-bar{position:relative;width:100%;max-width:46px;border-radius:8px 8px 4px 4px;background:linear-gradient(180deg,#62b3ea 0%,#0879c9 100%);box-shadow:0 8px 18px rgba(8,121,201,.18);transition:transform .18s ease,filter .18s ease}
.reports-chart-bar.is-green{background:linear-gradient(180deg,#5ec4a0 0%,#13a678 100%);box-shadow:0 8px 18px rgba(19,166,120,.18)}
.reports-chart-bar.is-violet{background:linear-gradient(180deg,#9b7fd9 0%,#7958b8 100%);box-shadow:0 8px 18px rgba(121,88,184,.18)}
.reports-chart-bar:hover{transform:translateY(-3px);filter:saturate(1.08)}
.reports-chart-tooltip{position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%) scale(.92);padding:4px 7px;color:#fff;background:#1a2b38;border-radius:6px;font-size:8px;font-weight:600;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease,transform .15s ease}
.reports-chart-bar:hover .reports-chart-tooltip{opacity:1;transform:translateX(-50%) scale(1)}
.reports-chart-label{font-size:9px;font-weight:600;color:#41505b}
.reports-chart-meta{font-size:8px;line-height:1.35;color:#748392}
.reports-donut{display:grid;justify-items:center;gap:8px;text-align:center}
.reports-donut-ring{width:118px;height:118px;border-radius:50%;background:conic-gradient(#13a678 calc(var(--pct) * 1%),#e7eef3 0);box-shadow:inset 0 0 0 12px #fff,0 8px 24px rgba(16,36,63,.06);position:relative}
.reports-donut-ring::after{content:"";position:absolute;inset:18px;border-radius:50%;background:#fff}
.reports-donut-center{position:relative;margin-top:-92px;display:grid;gap:2px}
.reports-donut-center strong{font-size:22px;color:#1a2b38}
.reports-donut-center span{font-size:9px;color:#748392;text-transform:uppercase;letter-spacing:.06em}
.reports-donut-detail{margin:0;font-size:9px;color:#607080}
.reports-empty-state{margin:0;padding:28px 12px;text-align:center;color:#748392;font-size:10px;background:#f7fafc;border:1px dashed #d5dde4;border-radius:8px}
.reports-two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.reports-chart-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.reports-table-wrap{overflow:auto;border:1px solid #e4ebf0;border-radius:8px}
.reports-table{width:100%;border-collapse:collapse;font-size:10px}
.reports-table thead th{padding:10px 12px;text-align:left;color:#607080;background:#f3f7fa;border-bottom:1px solid #e4ebf0;font-size:8px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.reports-table tbody td{padding:10px 12px;border-bottom:1px solid #eef2f6;color:#25343e;vertical-align:top}
.reports-table tbody tr:nth-child(even){background:#fbfdff}
.reports-table tbody tr:hover{background:#f0f8fd}
.reports-canvas .panel,.reports-panel{border:1px solid #dbe4ec;border-radius:12px;background:#fff;box-shadow:0 10px 30px rgba(16,36,63,.04)}
.reports-canvas .panel-header,.reports-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px 12px;background:linear-gradient(180deg,#fbfdff 0%,#f4f8fb 100%);border-bottom:1px solid #e4ebf0}
.reports-canvas .panel-header h3,.reports-panel-head h3{margin:4px 0 0;font-size:14px}
.reports-canvas .detail-table-wrap{border:1px solid #e4ebf0;border-radius:0 0 12px 12px;overflow:hidden}
.reports-canvas .detail-table-wrap table{width:100%}
.reports-canvas .detail-table-wrap thead th{padding:10px 12px;background:#f3f7fa;font-size:8px;text-transform:uppercase;letter-spacing:.06em;color:#607080}
.reports-canvas .detail-table-wrap tbody td{padding:10px 12px;border-top:1px solid #eef2f6}
.reports-canvas .detail-table-wrap tbody tr:nth-child(even){background:#fbfdff}
.reports-alert-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;padding:0 16px 16px}
.reports-alert-card{display:grid;gap:4px;padding:12px 14px;border:1px solid #e4ebf0;border-radius:10px;background:#fff;text-decoration:none;color:inherit;transition:transform .15s ease,box-shadow .15s ease}
.reports-alert-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(16,36,63,.08)}
.reports-alert-level{font-size:7px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#748392}
.reports-alert-card strong{font-size:11px;color:#1a2b38}
.reports-alert-card span{font-size:10px;color:#607080;line-height:1.4}
.reports-alert-critical{border-left:4px solid #d64545;background:linear-gradient(180deg,#fff7f7 0%,#fff 100%)}
.reports-alert-warn{border-left:4px solid #efad32;background:linear-gradient(180deg,#fffaf0 0%,#fff 100%)}
.reports-alert-info{border-left:4px solid #0879c9;background:linear-gradient(180deg,#f3f9fd 0%,#fff 100%)}
.reports-dept-health{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.reports-dept-health-card{position:relative;display:grid;gap:4px;padding:14px 14px 14px 48px;border:1px solid #dbe4ec;border-radius:12px;background:#fff;text-decoration:none;color:inherit;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.reports-dept-health-card:hover{transform:translateY(-2px);border-color:#9fc4df;box-shadow:0 12px 28px rgba(16,36,63,.08)}
.reports-dept-icon,.reports-dept-card .reports-dept-icon{position:absolute;top:14px;left:14px;width:28px;height:28px;display:grid;place-items:center;border-radius:8px;color:var(--erp-blue);background:var(--erp-blue-soft);font-size:13px}
.reports-dept-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.reports-dept-card{position:relative;display:grid;gap:6px;min-height:132px;padding:16px 16px 16px 52px;border:1px solid #dbe4ec;border-radius:12px;background:linear-gradient(180deg,#fff 0%,#f8fbfd 100%);text-decoration:none;color:inherit;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.reports-dept-card:hover{transform:translateY(-2px);border-color:#87b8da;box-shadow:0 14px 32px rgba(8,121,201,.12)}
.reports-dept-card strong{font-size:12px;color:#1a2b38}
.reports-dept-card span{font-size:10px;color:#748392;line-height:1.45}
.reports-dept-card em{font-size:9px;color:var(--erp-blue);font-style:normal;font-weight:700}
.reports-section-head{grid-column:1/-1;display:grid;gap:4px;margin:2px 0 4px}
.reports-section-head h3{margin:0;font-size:15px;color:#1a2b38}
.reports-kpi-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;padding:4px}
.reports-kpi-strip div{display:grid;gap:4px;padding:12px;background:#f7fafc;border:1px solid #e4ebf0;border-radius:10px}
.reports-kpi-strip span{font-size:8px;color:#748392;text-transform:uppercase;letter-spacing:.06em}
.reports-kpi-strip strong{font-size:15px;color:#1a2b38}
.reports-bar-chart{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:10px;align-items:end;min-height:180px;padding:8px 4px 0}
.reports-bar-item{display:grid;gap:4px;justify-items:center;text-align:center}
.reports-bar{width:100%;max-width:42px;border-radius:8px 8px 4px 4px;background:linear-gradient(180deg,#62b3ea 0%,#0879c9 100%)}
.reports-bar-good{background:linear-gradient(180deg,#5ec4a0 0%,#13a678 100%)}
.reports-bar-item span{font-size:9px;font-weight:600;color:#41505b}
.reports-bar-item small{display:block;font-size:8px;color:#748392;line-height:1.35}

.module-heading-tabs{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.module-view-tabs{display:flex;gap:4px;background:#eef2f6;border:1px solid #cbd3da;padding:3px;border-radius:8px}
.module-view-tabs a{height:30px;padding:0 14px;display:flex;align-items:center;font-size:10px;color:#52606b;text-decoration:none;border-radius:6px}
.module-view-tabs a.active{color:#fff;background:var(--erp-blue)}

/* Accumatica Generic Inquiry style */
.content-gi{padding:0 12px 35px;background:#f0f2f5}
.content-reports-module .topbar-reports h1{font-size:18px}
.content-reports-inquiry .topbar-reports{min-height:42px;padding-top:8px;padding-bottom:8px}
.content-reports-inquiry .topbar-reports h1{display:none}
.gi-workspace-tabs{display:flex;gap:6px;padding:8px 12px;background:#eef2f5;border-bottom:1px solid #d0d6dc}
.gi-workspace-tabs a{height:28px;padding:0 12px;display:inline-flex;align-items:center;color:#52606b;background:#fff;border:1px solid #c5ced6;font-size:9px;font-weight:700;text-decoration:none}
.gi-workspace-tabs a.is-active{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.gi-tree-home{display:block;margin:8px 10px 10px;padding:6px 8px;color:var(--erp-blue);background:#fff;border:1px solid #c5ced6;font-size:9px;font-weight:700;text-decoration:none}
.gi-tree-home:hover{background:#edf6fc;border-color:#7aaed0}
.reports-catalog{display:grid;gap:14px;padding:12px 0 18px}
.reports-catalog-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px;background:#fff;border:1px solid #c5ced6}
.reports-catalog-eyebrow{display:block;margin-bottom:6px;font-size:8px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#6d7a84}
.reports-catalog-hero h2{margin:0 0 8px;font-size:20px;color:#1f2a33}
.reports-catalog-hero p{margin:0;max-width:640px;color:#607080;font-size:11px;line-height:1.5}
.reports-catalog-meta{display:grid;gap:10px;min-width:220px}
.reports-catalog-meta div{padding:8px 10px;background:#f8fafb;border:1px solid #dde3e8}
.reports-catalog-meta small{display:block;font-size:8px;font-weight:700;text-transform:uppercase;color:#7a8791}
.reports-catalog-meta strong{display:block;margin-top:4px;font-size:12px;color:#25343e}
.reports-catalog-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.reports-catalog-kpi{padding:12px 14px;background:#fff;border:1px solid #c5ced6}
.reports-catalog-kpi span{display:block;font-size:8px;font-weight:700;text-transform:uppercase;color:#7a8791}
.reports-catalog-kpi strong{display:block;margin:8px 0 4px;font-size:22px;color:#1f2a33}
.reports-catalog-kpi small{color:#7a8791;font-size:9px}
.reports-catalog-alerts{padding:12px 14px;background:#fff;border:1px solid #c5ced6}
.reports-catalog-alerts header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.reports-catalog-alert-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.reports-catalog-alert{display:grid;gap:4px;padding:10px 12px;color:inherit;text-decoration:none;border:1px solid #dde3e8;background:#f8fafb}
.reports-catalog-alert strong{font-size:10px;color:#25343e}
.reports-catalog-alert span{font-size:9px;color:#607080}
.reports-catalog-alert-warning{border-color:#f0d9a8;background:#fffaf0}
.reports-catalog-alert-critical{border-color:#efb8b8;background:#fff5f5}
.reports-catalog-panels{display:grid;gap:14px}
.reports-catalog-group{padding:12px 14px;background:#fff;border:1px solid #c5ced6}
.reports-catalog-group-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.reports-catalog-group-head strong{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#3a4650}
.reports-catalog-group-head span{font-size:9px;color:#7a8791}
.reports-catalog-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.reports-catalog-cards-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
.reports-catalog-card{display:grid;gap:6px;padding:12px;color:inherit;text-decoration:none;border:1px solid #dde3e8;background:#f8fafb}
.reports-catalog-card:hover{border-color:#7aaed0;background:#edf6fc}
.reports-catalog-card-id{font-size:8px;font-weight:700;letter-spacing:.04em;color:#6d7a84}
.reports-catalog-card strong{font-size:11px;color:#25343e}
.reports-catalog-card p{margin:0;font-size:9px;line-height:1.45;color:#607080}
.reports-catalog-card-action{font-size:8px;font-weight:700;color:var(--erp-blue)}
.gi-inquiry{display:grid;gap:0;border:1px solid #b5bcc3;background:#fff;min-height:calc(100vh - 190px)}
.gi-screen-bar{min-height:42px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(180deg,#f8f9fa 0%,#eceff2 100%);border-bottom:1px solid #b5bcc3}
.gi-screen-title{display:flex;align-items:center;gap:10px}
.gi-screen-id{padding:2px 8px;color:#2f3b45;background:#dfe6ec;border:1px solid #b8c3cc;font-size:9px;font-weight:700;letter-spacing:.04em}
.gi-screen-title strong{font-size:13px;font-weight:600;color:#1f2a33}
.gi-screen-actions{display:flex;gap:4px;flex-wrap:wrap}
.gi-tool-btn{height:28px;padding:0 12px;display:inline-flex;align-items:center;color:#2f3b45;background:#fff;border:1px solid #b5bcc3;font-size:9px;font-weight:600;text-decoration:none;cursor:pointer}
.gi-tool-btn:hover{color:var(--erp-blue);border-color:#7aaed0;background:#f5faff}
.gi-tool-primary{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.gi-tool-primary:hover{color:#fff;background:var(--erp-blue-dark);border-color:var(--erp-blue-dark)}
.gi-body{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:480px}
.gi-body-single{grid-template-columns:minmax(0,1fr)}
.gi-body.gi-body-single .gi-main{width:100%;min-width:0}
.gi-tree{padding:8px 0;background:#f4f6f8;border-right:1px solid #d0d6dc;overflow:auto}
.gi-tree-head{padding:8px 12px 10px;font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#6d7a84;border-bottom:1px solid #dde3e8}
.gi-tree-group{border-bottom:1px solid #e3e8ec}
.gi-tree-group summary{padding:8px 12px;list-style:none;cursor:pointer;font-size:10px;font-weight:700;color:#3a4650;background:#eef2f5}
.gi-tree-group summary::-webkit-details-marker{display:none}
.gi-tree-list{display:grid;gap:1px;padding:4px 6px 8px}
.gi-tree-item{display:grid;grid-template-columns:72px minmax(0,1fr);gap:6px;align-items:center;padding:6px 8px;color:#2f3b45;text-decoration:none;font-size:9px;border:1px solid transparent}
.gi-tree-item:hover{background:#fff;border-color:#c9d4dc}
.gi-tree-item.is-active{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.gi-tree-code{font-size:8px;font-weight:700;letter-spacing:.03em;opacity:.85}
.gi-main{display:grid;grid-template-rows:auto minmax(320px,1fr);background:#fff}
.gi-parameters{border-bottom:1px solid #d0d6dc;background:#fafbfc}
.gi-parameters-head{min-height:34px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;background:#eef2f5;border-bottom:1px solid #d8dee4}
.gi-parameters-head span{font-size:9px;font-weight:700;letter-spacing:.08em;color:#5f6d77}
.gi-param-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px;padding:12px}
.gi-param-field{display:grid;gap:4px}
.gi-param-field>span{font-size:8px;font-weight:600;text-transform:uppercase;color:#6d7a84}
.gi-param-field input{height:30px;padding:0 8px;border:1px solid #b5bcc3;background:#fff;font-size:10px}
.gi-param-field input[readonly]{background:#f3f5f7;color:#5f6d77}
.gi-param-wide{grid-column:span 2}
.gi-preset-row{display:flex;flex-wrap:wrap;gap:4px}
.gi-preset-link{height:26px;padding:0 10px;display:inline-flex;align-items:center;color:#4a5862;background:#fff;border:1px solid #c5ced6;font-size:8px;font-weight:600;text-decoration:none}
.gi-preset-link.is-active,.gi-preset-link:hover{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue)}
.gi-results{display:grid;grid-template-rows:auto minmax(240px,1fr) auto;min-height:0}
.gi-results-head{min-height:32px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;background:#eef2f5;border-bottom:1px solid #d8dee4}
.gi-results-head span{font-size:9px;font-weight:700;letter-spacing:.08em;color:#5f6d77}
.gi-results-head small{font-size:9px;color:#7a8791}
.gi-results-body{padding:10px 12px 14px;display:grid;gap:12px;overflow:auto;background:#fff;min-height:240px}
.gi-status-bar{min-height:24px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f4f6f8;border-top:1px solid #d0d6dc;font-size:8px;color:#6d7a84}
.gi-summary-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1px;background:#d0d6dc;border:1px solid #d0d6dc}
.gi-summary-cell{padding:8px 10px;background:#f8fafb}
.gi-summary-cell span{display:block;font-size:8px;font-weight:600;text-transform:uppercase;color:#6d7a84}
.gi-summary-cell strong{display:block;margin-top:4px;font-size:14px;font-weight:600;color:#1f2a33}
.gi-summary-cell small{display:block;margin-top:2px;font-size:8px;color:#7a8791}
.gi-grid-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gi-grid-block{border:1px solid #c5ced6;background:#fff}
.gi-grid-head{min-height:30px;padding:0 10px;display:flex;align-items:center;justify-content:space-between;background:#eef2f5;border-bottom:1px solid #d8dee4}
.gi-grid-head strong{font-size:10px;font-weight:600;color:#2f3b45}
.gi-grid-head span{font-size:8px;color:#7a8791}
.gi-grid-link{font-size:8px;font-weight:700;color:var(--erp-blue);text-decoration:none}
.gi-grid-wrap{overflow:auto}
.gi-grid{width:100%;border-collapse:collapse;font-size:9px}
.gi-grid thead th{height:28px;padding:0 8px;text-align:left;color:#3a4650;background:#e8edf1;border:1px solid #c5ced6;border-top:0;font-size:8px;font-weight:700;white-space:nowrap}
.gi-grid tbody td{height:26px;padding:0 8px;color:#2f3b45;border:1px solid #dde3e8;vertical-align:middle}
.gi-grid tbody tr:nth-child(even) td{background:#f8fafb}
.gi-grid tbody tr:hover td{background:#edf6fc}
.gi-grid-empty{padding:16px 8px!important;text-align:center;color:#7a8791;font-style:italic}
.gi-report-tabs{display:flex;flex-direction:column;gap:0;min-height:320px}
.gi-report-tabs-toolbar{display:flex;align-items:center;gap:12px;padding:0 0 10px;border-bottom:1px solid #d0d6dc;flex-wrap:wrap}
.gi-report-tab-nav{display:flex;flex-wrap:wrap;gap:6px;min-width:0;flex:1}
.gi-report-tab{height:32px;padding:0 12px;display:inline-flex;align-items:center;gap:6px;color:#2f3b45;background:#fff;border:1px solid #c5ced6;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease}
.gi-report-tab:hover{color:var(--erp-blue);border-color:#7aaed0;background:#f5faff}
.gi-report-tab.is-active{color:#fff;background:var(--erp-blue);border-color:var(--erp-blue);box-shadow:inset 0 -2px 0 rgba(255,255,255,.18)}
.gi-report-tab-count{min-width:18px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-size:9px;font-weight:700;background:rgba(255,255,255,.18)}
.gi-report-tab:not(.is-active) .gi-report-tab-count{color:#52606b;background:#eef2f5}
.gi-report-tab-filter{margin-left:auto;min-width:220px;max-width:280px;flex:0 1 280px}
.gi-report-tab-filter input{width:100%;height:32px;padding:0 10px;border:1px solid #c5ced6;border-radius:6px;font-size:11px;background:#fff}
.gi-report-tab-filter input:focus{outline:none;border-color:var(--erp-blue);box-shadow:0 0 0 2px rgba(15,108,189,.12)}
.gi-report-tab-panels{min-height:280px;padding-top:10px}
.gi-report-tab-panel{display:none}
.gi-report-tab-panel.is-active{display:block}
.gi-report-tab-panel .gi-grid-block{border-color:#c5ced6;border-radius:6px;overflow:hidden}
.gi-report-tab-panel .gi-grid-wrap{max-height:min(62vh,720px);overflow:auto}
@media (max-width:820px){.gi-report-tab-filter{min-width:100%;max-width:none;flex:1 1 100%;order:3}}
@media print{
    .sidebar,.global-bar,.topbar,.footer,.gi-parameters,.gi-tree,.gi-screen-actions,.screen-commands{display:none!important}
    .main-shell,.content{margin:0;padding:0}
    .gi-inquiry,.gi-grid-block{break-inside:avoid;box-shadow:none}
    .gi-body{grid-template-columns:1fr}
}

@media (max-width: 1180px) {
    .company-context:first-of-type{display:none}.exception-grid{grid-template-columns:repeat(3,1fr)}.analytics-grid{grid-template-columns:1fr 1fr}.global-search{width:250px}
}
@media (max-width: 820px) {
    body:not(.login-page){padding-top:50px}.global-brand{width:auto;padding:0 10px}.global-brand strong{display:none}.global-search{width:auto;flex:1;margin-right:5px}.company-context,.global-user span,.global-user b{display:none}.global-user{min-width:48px;padding:0 10px}.global-icon{width:40px}
    .sidebar{top:50px}.main-shell{width:100%;margin-left:0}.menu-toggle{width:42px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#fff;background:transparent;border:0}.menu-toggle span{width:17px;height:2px;background:#fff}
    .topbar{padding:9px 12px}.screen-commands button:nth-child(n+3){display:none}.content{padding:10px 8px 35px}.exception-grid{grid-template-columns:1fr 1fr}.analytics-grid,.bottom-workspace{grid-template-columns:1fr}.modal-card{width:94vw}.report-grid,.reports-kpi-grid,.reports-kpi-grid-compact{grid-template-columns:1fr 1fr}.reports-two-col,.report-grid-secondary,.reports-dept-grid,.reports-chart-row,.reports-dept-health,.reports-panel-split,.gi-grid-pair{grid-template-columns:1fr}.reports-layout,.gi-body{grid-template-columns:1fr}.gi-param-grid{grid-template-columns:1fr}.gi-param-wide{grid-column:span 1}.gi-summary-strip{grid-template-columns:1fr 1fr}.reports-catalog-kpis,.reports-catalog-cards,.reports-catalog-alert-list{grid-template-columns:1fr}
}
@media (max-width: 580px) {
    .exception-grid,.report-grid{grid-template-columns:1fr}.workspace-title{align-items:flex-start;flex-direction:column}.analytics-grid{grid-template-columns:1fr}.record-command-bar button:nth-of-type(n+3){display:none}.view-selector button:nth-child(n+2){display:none}.search-box{width:180px}.modal-card{width:100vw}.modal-card .form-grid{grid-template-columns:1fr}.compact-list>div{grid-template-columns:70px 1fr}.compact-list strong,.compact-list i{display:none}
}

/* Centered, tabbed record entry */
body.modal-open { overflow: hidden; }
.modal {
    padding: 24px;
    align-items: center;
    justify-content: center;
}
.modal-backdrop {
    background: rgba(20, 35, 48, .58);
    backdrop-filter: blur(2px);
}
.modal-card {
    width: min(1040px, calc(100vw - 48px));
    height: auto;
    min-height: 540px;
    max-height: calc(100vh - 88px);
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #8796a3;
    border-radius: 5px;
    box-shadow: 0 24px 70px rgba(12, 29, 43, .32);
}
.entry-command-bar {
    position: static;
    min-height: 38px;
    flex: 0 0 38px;
    padding: 0 10px 0 15px;
    background: #f0f3f5;
}
.dialog-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #5f6c76;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}
.dialog-status i {
    width: 7px;
    height: 7px;
    background: #20a66a;
    border-radius: 50%;
}
.entry-command-bar .modal-close {
    color: #4e5a64;
    background: transparent;
    border: 0;
}
.entry-command-bar .modal-close:hover {
    color: #9d2525;
    background: #f9dddd;
}
.modal-header {
    flex: 0 0 auto;
    min-height: 88px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 13px;
    background: linear-gradient(135deg, #fff 0%, #f6fafd 100%);
    border-bottom: 1px solid #d8dee3;
}
.modal-title-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, #168bd8, #0567ae);
    border-radius: 9px;
    box-shadow: 0 5px 13px rgba(8, 121, 201, .24);
    font-size: 16px;
    font-weight: 700;
}
.modal-header h2 { font-size: 19px; }
.modal-header p { max-width: 690px; font-size: 9px; }
.modal-header-meta {
    margin-left: auto;
    padding-left: 22px;
    text-align: right;
    border-left: 1px solid #dae1e6;
}
.modal-header-meta small,
.modal-header-meta strong { display: block; }
.modal-header-meta small {
    margin-bottom: 4px;
    color: #82909a;
    font-size: 7px;
    text-transform: uppercase;
}
.modal-header-meta strong {
    color: #3d4a54;
    font-size: 10px;
    font-weight: 600;
}
.entry-tabs {
    min-height: 54px;
    height: auto;
    padding: 0 18px;
    flex: 0 0 auto;
    gap: 2px;
    overflow-x: auto;
    background: #fafbfc;
    border-bottom: 1px solid #bfc8d0;
    scrollbar-width: none;
}
.entry-tabs::-webkit-scrollbar { display: none; }

/* Sales workflow control */
.order-type-pill {
    padding: 4px 7px;
    display: inline-block;
    color: #17679e;
    background: #e8f3fa;
    border: 1px solid #c9e0ef;
    border-radius: 3px;
    font-size: 7px;
    font-weight: 600;
}
.sales-progress {
    width: 120px;
    height: 6px;
    overflow: hidden;
    background: #e3e9ed;
    border-radius: 5px;
}
.sales-progress span {
    height: 100%;
    display: block;
    background: linear-gradient(90deg, #1686d1, #20aa79);
    border-radius: 5px;
}
.workflow-link {
    color: var(--erp-blue);
    font-size: 8px;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}
.workflow-card {
    width: min(1100px, calc(100vw - 48px));
    min-height: 590px;
    height: auto;
    display: flex;
    flex-direction: column;
}
.workflow-card .modal-close {
    display: grid;
    place-items: center;
    text-decoration: none;
}
.workflow-header {
    min-height: 95px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #fff, #f2f8fc);
    border-bottom: 1px solid #ccd6dd;
}
.workflow-header h2 { margin: 5px 0 4px; font-size: 22px; }
.workflow-header p { margin: 0; color: #71808b; font-size: 9px; }
.workflow-amount {
    margin-left: auto;
    min-width: 180px;
    text-align: right;
}
.workflow-amount small,
.workflow-amount strong { display: block; }
.workflow-amount small { color: #84919b; font-size: 7px; text-transform: uppercase; }
.workflow-amount strong { margin: 5px 0 7px; font-size: 18px; font-weight: 600; }
.workflow-body {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    flex: 1;
    overflow: hidden;
}
.workflow-main {
    min-width: 0;
    padding: 22px;
    overflow-y: auto;
}
.workflow-stepper {
    margin-bottom: 21px;
    display: flex;
    align-items: flex-start;
}
.workflow-step {
    position: relative;
    min-width: 0;
    flex: 1;
    color: #919ba3;
    text-align: center;
}
.workflow-step::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 14px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: #d9e0e5;
}
.workflow-step:first-child::before { display: none; }
.workflow-step span {
    position: relative;
    z-index: 1;
    width: 29px;
    height: 29px;
    margin: 0 auto 8px;
    display: grid;
    place-items: center;
    background: #e7ecef;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #cbd4da;
    font-size: 8px;
    font-weight: 700;
}
.workflow-step strong {
    display: block;
    font-size: 7px;
    font-weight: 600;
    line-height: 1.35;
}
.workflow-step.done { color: #16855e; }
.workflow-step.done::before { background: #29aa7d; }
.workflow-step.done span { color: #fff; background: #20a875; box-shadow: 0 0 0 1px #20a875; }
.workflow-step.current { color: var(--erp-blue); }
.workflow-step.current::before { background: linear-gradient(90deg, #29aa7d 0 50%, #d9e0e5 50%); }
.workflow-step.current span { color: #fff; background: var(--erp-blue); box-shadow: 0 0 0 2px #b9dbef; }
.order-facts {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f7f9fa;
    border: 1px solid #d8dfe4;
}
.order-facts div { min-height: 62px; padding: 12px; border-right: 1px solid #d8dfe4; border-bottom: 1px solid #d8dfe4; }
.order-facts small,.order-facts strong{display:block}.order-facts small{margin-bottom:6px;color:#84909a;font-size:7px;text-transform:uppercase}.order-facts strong{font-size:9px;font-weight:600}
.transition-history h3 { margin-bottom: 12px; font-size: 11px; font-weight: 600; }
.transition-history > div { position: relative; min-height: 50px; padding: 0 0 13px 24px; }
.transition-history > div::before { content:""; position:absolute; top:10px; bottom:-3px; left:6px; width:1px; background:#d6dee4; }
.transition-history > div:last-child::before { display:none; }
.transition-history > div > span { position:absolute; top:4px; left:0; width:13px; height:13px; background:#fff; border:3px solid var(--erp-blue); border-radius:50%; }
.transition-history p,.transition-history strong,.transition-history small,.transition-history em{display:block}.transition-history p{margin:0}.transition-history strong{font-size:9px}.transition-history small{margin-top:3px;color:#7f8b95;font-size:7px}.transition-history em{margin-top:4px;color:#63717c;font-size:8px;font-style:normal}
.workflow-action-panel {
    padding: 22px 20px;
    overflow-y: auto;
    background: #f1f6f9;
    border-left: 1px solid #cdd8df;
}
.workflow-action-panel h3 { margin: 6px 0 7px; font-size: 17px; font-weight: 600; }
.workflow-action-panel > p { margin-bottom: 16px; color: #6f7c86; font-size: 8px; line-height: 1.5; }
.workflow-action-form { display: flex; flex-direction: column; gap: 11px; }
.workflow-action-form label { color:#4f5d67;font-size:8px;font-weight:500 }
.workflow-action-form input,.workflow-action-form select,.workflow-action-form textarea{width:100%;margin-top:4px;padding:0 9px;color:#2c3943;background:#fff;border:1px solid #bdc9d1;outline:0;font-size:9px}
.workflow-action-form input,.workflow-action-form select{height:32px}.workflow-action-form textarea{padding-top:8px;resize:vertical}
.credit-check { display:grid;grid-template-columns:1fr auto;gap:8px;padding:11px;background:#fff;border:1px solid #cdd8df;font-size:8px}.credit-check strong{text-align:right}
.workflow-complete { padding-top:50px;text-align:center}.workflow-complete span{width:55px;height:55px;margin:0 auto 15px;display:grid;place-items:center;color:#fff;background:#20a875;border-radius:50%;font-size:25px}.workflow-complete h3{font-size:17px}.workflow-complete p{color:#71808b;font-size:9px}
@media (max-width: 820px) {
    .workflow-body { grid-template-columns: 1fr; overflow-y: auto; }
    .workflow-main, .workflow-action-panel { overflow: visible; }
    .workflow-action-panel { border-left: 0; border-top: 1px solid #cdd8df; }
    .workflow-stepper { overflow-x: auto; }
    .workflow-step { min-width: 90px; }
}
@media (max-width: 580px) {
    .workflow-card { width:100vw;min-height:calc(100vh - 50px) }
    .workflow-header{padding:14px}.workflow-header h2{font-size:18px}.workflow-amount{min-width:120px}.workflow-amount strong{font-size:13px}
    .workflow-main{padding:15px}.order-facts{grid-template-columns:1fr 1fr}.workflow-action-panel{padding:16px}
}
.entry-tabs button {
    min-width: 150px;
    height: 54px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 0 0 auto;
    color: #586570;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    font-size: 9px;
    white-space: nowrap;
}
.entry-tabs button span {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    color: #6f7b85;
    background: #e6ebef;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
}
.entry-tabs button[hidden] { display: none !important; }
.entry-tabs button:hover { color: var(--erp-blue); background: #f0f6fa; }
.entry-tabs button:focus { outline: none; }
.entry-tabs button:focus-visible {
    outline: 2px solid rgba(8, 121, 201, .35);
    outline-offset: -3px;
}
.entry-tabs button.active {
    color: var(--erp-blue);
    background: #fff;
    border-color: var(--erp-blue);
    font-weight: 600;
}
.entry-tabs button.active span {
    color: #fff;
    background: var(--erp-blue);
}
.modal-card .form-grid {
    min-height: 0;
    max-height: calc(100vh - 325px);
    padding: 0;
    display: block;
    flex: 1 1 auto;
    overflow-y: auto;
    background: #fff;
}
.modal-card .form-grid > input[type="hidden"] { display: none; }
.form-tab-panel {
    padding: 20px 22px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 245px;
    align-content: start;
    gap: 18px;
    animation: tabFade .16s ease;
}
.form-tab-panel[hidden] { display: none !important; }
.tab-panel-heading {
    margin: -20px -22px 0;
    padding: 12px 22px;
    background: #eef5f9;
    border-bottom: 1px solid #d4dfe6;
}
.tab-panel-heading strong,
.tab-panel-heading span { display: block; }
.tab-panel-heading strong {
    margin-bottom: 3px;
    color: #25313b;
    font-size: 11px;
    font-weight: 600;
}
.tab-panel-heading span {
    color: #76838d;
    font-size: 8px;
}
.form-tab-panel label {
    min-width: 0;
    color: #47545e;
    font-size: 9px;
    font-weight: 500;
}
.form-tab-panel .form-span { grid-column: 1 / -1; }
.tab-fields {
    min-width: 0;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 14px 17px;
    background: #fff;
    border: 1px solid #d7dfe5;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(30, 52, 68, .04);
}
.tab-fields label {
    position: relative;
}
.tab-fields label:has([required])::before {
    content: "Required";
    position: absolute;
    top: 0;
    right: 0;
    color: #bf4b4b;
    font-size: 6px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.tab-fields label:focus-within {
    color: var(--erp-blue);
}
.tab-fields input,
.tab-fields select,
.tab-fields textarea {
    background: #fbfcfd;
    border-color: #c5d0d8;
}
.tab-fields input:hover,
.tab-fields select:hover,
.tab-fields textarea:hover {
    border-color: #91a7b7;
}
.tab-assistant {
    min-height: 275px;
    padding: 18px;
    align-self: stretch;
    color: #43515c;
    background: linear-gradient(155deg, #f2f8fc, #fff);
    border: 1px solid #cfdee8;
    border-radius: 5px;
}
.assistant-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 13px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--erp-blue);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
}
.assistant-label {
    color: #1680c7;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.tab-assistant h3 {
    margin: 5px 0 7px;
    font-size: 14px;
    font-weight: 600;
}
.tab-assistant > p {
    margin: 0 0 15px;
    color: #6f7c86;
    font-size: 8px;
    line-height: 1.55;
}
.assistant-metrics {
    margin-bottom: 15px;
    border-top: 1px solid #d9e4eb;
}
.assistant-metrics div {
    min-height: 38px;
    padding: 7px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #d9e4eb;
}
.assistant-metrics span {
    color: #77848e;
    font-size: 8px;
}
.assistant-metrics strong {
    color: #2e3c46;
    font-size: 9px;
    font-weight: 600;
    text-align: right;
}
.assistant-tip {
    padding: 9px 10px;
    display: flex;
    gap: 7px;
    color: #5e6e79;
    background: #e7f3fa;
    border-radius: 4px;
    font-size: 7px;
    line-height: 1.45;
}
.assistant-tip b {
    color: var(--erp-blue);
    text-transform: uppercase;
}
.dialog-footer {
    min-height: 54px;
    padding: 8px 13px 8px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    background: #f3f5f7;
    border-top: 1px solid #c5ced5;
}
.tab-progress {
    color: #6b7882;
    font-size: 9px;
}
.dialog-footer-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.dialog-footer-actions .button { min-width: 76px; }
.dialog-footer-actions [hidden] { display: none; }
@keyframes tabFade {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 820px) {
    .modal { padding: 12px; }
    .modal-card {
        width: calc(100vw - 24px);
        height: calc(100vh - 74px);
        max-height: calc(100vh - 74px);
    }
    .entry-tabs { padding: 0 8px; }
    .entry-tabs button { min-width: 112px; }
    .form-tab-panel { grid-template-columns: 1fr; }
    .tab-assistant { min-height: 0; }
}
@media (max-width: 580px) {
    .modal { padding: 0; align-items: flex-end; }
    .modal-card {
        width: 100vw;
        height: calc(100vh - 50px);
        max-height: calc(100vh - 50px);
        border: 0;
        border-radius: 0;
    }
    .modal-header { padding: 13px 15px 11px; }
    .modal-title-icon, .modal-header-meta { display: none; }
    .modal-header h2 { font-size: 17px; }
    .entry-tabs button { min-width: max-content; padding: 0 11px; }
    .form-tab-panel {
        padding: 15px 14px 22px;
        grid-template-columns: 1fr;
    }
    .form-tab-panel .form-span { grid-column: auto; }
    .tab-panel-heading {
        margin: -15px -14px 2px;
        padding: 11px 14px;
    }
    .tab-fields {
        padding: 12px;
        grid-template-columns: 1fr;
    }
    .tab-assistant { display: none; }
    .dialog-footer {
        padding: 7px 9px;
        flex-wrap: wrap;
    }
    .tab-progress { width: 100%; }
    .dialog-footer-actions { width: 100%; }
    .dialog-footer-actions .button { min-width: 0; flex: 1; }
    .dialog-footer-actions [data-modal-close] { display: none; }
}

/* Product record workspace */
.product-row {
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}
.product-row:hover,
.product-row:focus {
    background: #eef8ff;
    box-shadow: inset 3px 0 0 var(--erp-blue);
    outline: none;
}
.product-row:focus-visible {
    box-shadow: inset 3px 0 0 var(--erp-blue), inset 0 0 0 2px #75bdf0;
}
.product-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 13px;
}
.product-row-open {
    color: #1684c7;
    font-size: 22px;
    line-height: 1;
    transition: transform .15s ease;
}
.product-row:hover .product-row-open { transform: translateX(3px); }
.product-detail-card {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100vw - 48px));
    height: min(820px, calc(100vh - 76px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #9eabb5;
    border-radius: 5px;
    box-shadow: 0 22px 55px rgba(18, 38, 53, .34);
}
.product-detail-edit {
    min-height: 27px;
    padding: 5px 12px;
    font-size: 9px;
}
.product-detail-header {
    min-height: 104px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(112deg, #fff 0%, #f4faff 68%, #e4f3fc 100%);
    border-bottom: 1px solid #c9d7e1;
}
.product-detail-symbol {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #1489d1, #075e9a);
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(10, 112, 178, .22);
    font-size: 23px;
    font-weight: 700;
}
.product-detail-title { min-width: 0; }
.product-detail-title h2 {
    margin: 3px 0 4px;
    color: #25343e;
    font-size: 23px;
    font-weight: 500;
}
.product-detail-title p {
    margin: 0;
    color: #71818c;
    font-size: 10px;
}
.product-detail-stock {
    margin-left: auto;
    display: grid;
    justify-items: end;
    gap: 5px;
}
.product-detail-stock small {
    color: #778691;
    font-size: 8px;
    text-transform: uppercase;
}
.product-detail-stock strong {
    color: #25343e;
    font-size: 18px;
}
.product-detail-tabs {
    min-height: 48px;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    gap: 4px;
    overflow-x: auto;
    background: #f5f7f9;
    border-bottom: 1px solid #c6d1d9;
}
.product-detail-tabs button {
    padding: 0 17px;
    color: #5d6c77;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    font: inherit;
    font-size: 10px;
    white-space: nowrap;
    cursor: pointer;
}
.product-detail-tabs button:hover { color: var(--erp-blue); }
.product-detail-tabs button.is-active {
    color: #0879be;
    border-bottom-color: #0786d1;
    font-weight: 600;
}
.product-detail-tabs b {
    min-width: 18px;
    margin-left: 5px;
    padding: 2px 5px;
    display: inline-block;
    color: #60717d;
    background: #e2e9ee;
    border-radius: 9px;
    font-size: 8px;
}
.product-detail-tabs button.is-active b {
    color: #fff;
    background: #1687ca;
}
.product-detail-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #f3f6f8;
}
.product-detail-panel {
    display: none;
    padding: 18px 20px 26px;
    animation: tabFade .18s ease;
}
.product-detail-panel.is-active { display: block; }
.product-detail-kpis {
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.product-detail-kpis article {
    min-height: 83px;
    padding: 13px 15px;
    display: grid;
    align-content: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #ced9e0;
    border-top: 3px solid #1688cc;
}
.product-detail-kpis span,
.product-detail-kpis small {
    color: #788791;
    font-size: 8px;
}
.product-detail-kpis span { text-transform: uppercase; }
.product-detail-kpis strong {
    color: #263640;
    font-size: 16px;
    font-weight: 600;
}
.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.product-detail-section {
    overflow: hidden;
    background: #fff;
    border: 1px solid #ced9e0;
}
.detail-section-heading {
    min-height: 53px;
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eaf3f8;
    border-bottom: 1px solid #ced9e0;
}
.detail-section-heading > span {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #1687ca;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
}
.detail-section-heading strong,
.detail-section-heading small { display: block; }
.detail-section-heading strong {
    color: #2b3b45;
    font-size: 10px;
}
.detail-section-heading small {
    margin-top: 2px;
    color: #778690;
    font-size: 8px;
}
.product-detail-section dl {
    margin: 0;
    padding: 5px 13px 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}
.product-detail-section dl div {
    min-height: 49px;
    padding: 9px 8px 7px 0;
    border-bottom: 1px solid #e7ecef;
}
.product-detail-section dt {
    margin-bottom: 4px;
    color: #7b8993;
    font-size: 8px;
}
.product-detail-section dd {
    margin: 0;
    color: #2e3d47;
    font-size: 10px;
    font-weight: 600;
}
.detail-table-heading {
    min-height: 55px;
    padding: 0 2px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.detail-table-heading strong,
.detail-table-heading span { display: block; }
.detail-table-heading strong {
    color: #273741;
    font-size: 14px;
    font-weight: 600;
}
.detail-table-heading span {
    margin-top: 3px;
    color: #76858f;
    font-size: 9px;
}
.detail-table-wrap {
    overflow: auto;
    background: #fff;
    border: 1px solid #c7d3da;
}
.detail-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
}
.detail-table-wrap th {
    padding: 10px 11px;
    color: #60717d;
    background: #e7f0f5;
    border-bottom: 1px solid #c7d3da;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.detail-table-wrap td {
    padding: 10px 11px;
    color: #35454f;
    border-bottom: 1px solid #e2e8ec;
    vertical-align: top;
}
.detail-table-wrap tbody tr:hover { background: #f3faff; }
.detail-table-wrap td small {
    margin-top: 3px;
    display: block;
    color: #7d8b94;
    font-size: 8px;
}
.detail-table-wrap a { color: #0879be; text-decoration: none; }
@media (max-width: 850px) {
    .product-detail-card {
        width: calc(100vw - 24px);
        height: calc(100vh - 74px);
    }
    .product-detail-kpis,
    .product-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
    .product-detail-card {
        width: 100vw;
        height: calc(100vh - 50px);
        border: 0;
        border-radius: 0;
    }
    .product-detail-header { padding: 14px; }
    .product-detail-symbol { display: none; }
    .product-detail-stock strong { font-size: 13px; }
    .product-detail-tabs { padding: 0 6px; }
    .product-detail-tabs button { padding: 0 10px; }
    .product-detail-panel { padding: 12px; }
    .product-detail-kpis,
    .product-detail-grid { grid-template-columns: 1fr; }
}

/* Readable density and high-contrast accessibility pass */
:root {
    --erp-text: #172631;
    --readable-muted: #50616d;
    --readable-subtle: #62727d;
    --readable-border: #b9c6cf;
}
body:not(.login-page) {
    color: var(--erp-text);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.42;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.nav-label {
    color: #566975;
    font-size: 10px;
    font-weight: 750;
}
.nav a,
.sidebar-footer a {
    color: #263945;
    font-size: 13px;
    font-weight: 520;
}
.breadcrumb,
.workspace-title p,
.module-heading p {
    color: var(--readable-muted);
    font-size: 12px;
}
.screen-commands button,
.record-command-bar button,
.view-selector button,
.view-selector a,
.grid-link,
.table-action,
.quick-action-button {
    font-size: 11px;
    font-weight: 650;
}
.record-command-bar,
.table-toolbar,
.grid-footer {
    border-color: var(--readable-border);
}
.search-box input {
    color: #23343f;
    font-size: 12px;
}
.search-box input::placeholder,
.global-search input::placeholder {
    color: #647580;
    opacity: 1;
}
.grid-footer {
    min-height: 31px;
    height: auto;
    color: #53646f;
    font-size: 10px;
}
.erp-grid-panel table th,
.data-panel table th,
th {
    color: #33434d;
    font-size: 10px;
    font-weight: 700;
}
.erp-grid-panel table td,
.data-panel table td,
td {
    color: #263741;
    font-size: 11px;
    font-weight: 480;
}
.data-panel table td {
    height: 48px;
    padding-top: 9px;
    padding-bottom: 9px;
}
td strong {
    color: #142733;
    font-weight: 700;
}
.cell-sub,
.sales-line-table td small,
.order-lines-panel td small,
.loaded-line-entry label small {
    color: var(--readable-subtle);
    font-size: 10px;
    line-height: 1.35;
}
.badge {
    font-size: 9px;
    font-weight: 800;
}
.tiny-alert {
    font-size: 9px;
}
.product-card-label {
    color: #eefaff;
    font-size: 10px;
}
.product-hero-card p {
    color: #f3fbff;
    font-size: 11px;
    font-weight: 500;
}
.product-stat-card span {
    color: #4e606b;
    font-size: 10px;
    font-weight: 650;
}
.product-stat-card small {
    color: #596b76;
    font-size: 10px;
}
.category-chip {
    color: #384b57;
    font-size: 10px;
    font-weight: 550;
}
.product-insight-metrics {
    color: #4e606b;
    font-size: 10px;
}
.product-insight-metrics strong {
    color: #1c3341;
    font-size: 11px;
}
.product-type-mark {
    font-size: 11px;
}
.department-summary span,
.department-summary small,
.production-kpis span,
.production-kpis small,
.payment-kpi span,
.payment-kpi small {
    color: #536570;
    font-size: 10px;
}
.production-flow-strip div,
.forecast-panel > div:first-child span,
.forecast-items small,
.payments-callout > div span,
.payments-callout-path,
.dispatch-confirmation-head span,
.dispatch-confirm-row small,
.audit-history summary,
.optional-note summary {
    color: #4e616d;
    font-size: 10px;
}
.payment-kpi-primary span,
.payment-kpi-primary small {
    color: #f1faff;
}
.form-grid label,
.form-stack label,
.shift-entry-form label,
.payment-confirm-form label,
.workflow-action-form label,
.tab-fields label {
    color: #354752;
    font-size: 11px;
    font-weight: 650;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.form-stack input,
.shift-entry-form input,
.shift-entry-form select,
.shift-entry-form textarea,
.payment-confirm-form input,
.payment-confirm-form select,
.payment-confirm-form textarea,
.workflow-action-form input,
.workflow-action-form select,
.workflow-action-form textarea {
    color: #182b37;
    font-size: 12px;
    border-color: #aebdc7;
}
.form-section span,
.modal-header p,
.workflow-header p,
.workflow-action-panel > p,
.production-run-header p,
.shift-posting-header p,
.payment-confirm-header p {
    color: #536570;
    font-size: 11px;
}
.entry-command-bar button,
.entry-tabs button,
.dialog-footer,
.tab-progress {
    font-size: 11px;
}
.product-detail-title p,
.product-detail-stock small,
.product-detail-tabs button,
.product-detail-kpis span,
.product-detail-kpis small,
.detail-section-heading strong,
.detail-section-heading small,
.product-detail-section dt,
.product-detail-section dd,
.detail-table-heading span,
.detail-table-wrap table,
.detail-table-wrap td small {
    font-size: 10px;
}
.product-detail-section dd,
.detail-table-wrap table {
    color: #263944;
}
.detail-table-wrap th {
    color: #334650;
    font-size: 10px;
}
.detail-table-wrap td {
    color: #263944;
    font-size: 11px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #f2a900;
    outline-offset: 2px;
}
@media (max-width: 820px) {
    body:not(.login-page) { font-size: 15px; }
    .nav a,
    .sidebar-footer a { font-size: 14px; }
    .erp-grid-panel table td,
    .data-panel table td,
    td { font-size: 12px; }
}

/* Reject and scrap control */
.reject-overview {
    margin-bottom: 11px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.reject-kpi {
    min-height: 94px;
    padding: 15px 16px;
    display: grid;
    align-content: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #c7d2da;
    border-top: 3px solid #db9b25;
}
.reject-kpi span,
.reject-kpi small {
    color: #536570;
    font-size: 10px;
}
.reject-kpi span {
    font-weight: 700;
    text-transform: uppercase;
}
.reject-kpi strong {
    color: #20333f;
    font-size: 22px;
}
.reject-kpi-primary {
    color: #fff;
    background: linear-gradient(135deg, #9b5417, #c8781d);
    border-color: #a85e1a;
}
.reject-kpi-primary span,
.reject-kpi-primary small,
.reject-kpi-primary strong { color: #fff; }
.reject-kpi-rework { border-top-color: #287fc1; }
.reject-kpi-scrap { border-top-color: #ba3b35; }
.reject-reason-strip {
    margin-bottom: 11px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fff8e9;
    border: 1px solid #dfc68f;
    border-left: 4px solid #d38a1e;
}
.reject-reason-strip > div:first-child strong,
.reject-reason-strip > div:first-child span {
    display: block;
}
.reject-reason-strip > div:first-child strong { font-size: 12px; }
.reject-reason-strip > div:first-child span {
    margin-top: 3px;
    color: #596a74;
    font-size: 10px;
}
.reject-reason-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}
.reject-reason-list > span {
    padding: 6px 9px;
    color: #5b4a2e;
    background: #fff;
    border: 1px solid #dfcfae;
    border-radius: 3px;
    font-size: 10px;
}
.reject-reason-list b { margin-right: 6px; color: #273943; }
.reject-reason-list small { margin-left: 5px; color: #6d7a82; }
.reject-register-table tr.row-needs-action td:first-child {
    box-shadow: inset 3px 0 #d78a1f;
}
.reject-disposition {
    padding: 4px 7px;
    display: inline-flex;
    color: #70521f;
    background: #fff1cf;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
}
.reject-disposition-rework { color: #185e91; background: #e3f1fb; }
.reject-disposition-scrap { color: #9b2f2b; background: #fde8e7; }
.reject-entry-fields {
    padding: 10px;
    background: #fff8e9;
    border: 1px solid #dec68e;
}
.reject-entry-fields[hidden] { display: none; }
.reject-identify-popup {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: grid;
    place-items: center;
    padding: 24px;
}
.reject-identify-popup[hidden] { display: none !important; }
.reject-identify-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 36, 63, .48);
}
.reject-identify-card {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 32px));
    max-height: min(82vh, 640px);
    overflow: auto;
    background: #fff;
    border: 1px solid #d5c48e;
    box-shadow: 0 24px 70px rgba(13, 31, 47, .32);
}
.reject-identify-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e8d9a8;
    background: linear-gradient(180deg, #fff 0%, #fff8e9 100%);
}
.reject-identify-header h2 { margin: 4px 0; font-size: 18px; }
.reject-identify-header p { margin: 0; color: #6d7b85; font-size: 11px; line-height: 1.45; }
.reject-identify-header > div:last-child { text-align: right; }
.reject-identify-header small,
.reject-identify-header strong { display: block; }
.reject-identify-header small { color: #7a8791; font-size: 9px; text-transform: uppercase; }
.reject-identify-header strong { margin-top: 4px; font-size: 14px; }
.reject-identify-body { padding: 16px 20px; }
.reject-identify-footer {
    padding: 14px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e8d9a8;
    background: #fffaf0;
}
.reject-identify-link {
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--erp-blue);
    font-size: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.reject-entry-grid {
    margin-top: 9px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}
.reject-review-card {
    position: relative;
    z-index: 2;
    width: min(980px, calc(100vw - 40px));
    max-height: calc(100vh - 48px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #aebbc4;
    box-shadow: 0 24px 70px rgba(16, 34, 47, .32);
}
.reject-review-header {
    padding: 19px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(110deg, #fff 0%, #fff9ec 100%);
    border-bottom: 1px solid #d1dae0;
}
.reject-review-header h2 { margin: 4px 0; font-size: 22px; }
.reject-review-header p { margin: 0; color: #536570; font-size: 11px; }
.reject-review-header > div:last-child { text-align: right; }
.reject-review-header small,
.reject-review-header strong,
.reject-review-header span { display: block; }
.reject-review-header small { color: #657680; font-size: 10px; text-transform: uppercase; }
.reject-review-header strong { margin: 5px 0 2px; font-size: 19px; }
.reject-review-header span { color: #687983; font-size: 11px; }
.reject-review-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 315px;
    max-height: calc(100vh - 155px);
    overflow: auto;
}
.reject-review-body main { padding: 20px; }
.reject-review-body aside {
    padding: 20px;
    background: #f1f6f9;
    border-left: 1px solid #d1dbe2;
}
.reject-review-body aside h3 { margin: 5px 0 6px; font-size: 17px; }
.reject-review-body aside > p { color: #536570; font-size: 11px; }
.reject-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #ccd7de;
}
.reject-facts div {
    min-height: 70px;
    padding: 12px;
    border-right: 1px solid #d8e0e5;
    border-bottom: 1px solid #d8e0e5;
}
.reject-facts div:nth-child(3n) { border-right: 0; }
.reject-facts small,
.reject-facts strong { display: block; }
.reject-facts small { color: #60717c; font-size: 10px; }
.reject-facts strong { margin-top: 6px; color: #233641; font-size: 12px; }
.reject-notes-panel,
.reject-movement-history {
    margin-top: 15px;
    padding: 14px;
    border: 1px solid #d1dbe2;
}
.reject-notes-panel h3,
.reject-movement-history h3 { margin: 0 0 8px; font-size: 14px; }
.reject-notes-panel p { margin: 0; color: #4e606b; font-size: 11px; }
.reject-movement-history > div {
    padding: 9px 0;
    display: grid;
    grid-template-columns: 115px 1fr auto;
    gap: 8px;
    border-top: 1px solid #e1e7eb;
    font-size: 10px;
}
.reject-movement-history > div small { grid-column: 2 / -1; color: #667680; }
.reject-action-form label { color: #354752; font-size: 11px; font-weight: 650; }
.reject-action-form textarea {
    width: 100%;
    margin-top: 6px;
    padding: 9px;
    color: #1c2f3a;
    border: 1px solid #aebdc7;
    font: inherit;
    font-size: 11px;
}
.reject-action-buttons {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}
.reject-scrap-button {
    color: #fff;
    background: #b63b35;
    border-color: #9f302b;
}
.reject-scrap-button:hover { background: #982e29; }
.reject-closed {
    padding: 18px;
    color: #176f51;
    background: #e4f6ef;
    border: 1px solid #a9dbc9;
}
.reject-closed strong,
.reject-closed span,
.reject-closed small { display: block; }
.reject-closed span { margin-top: 7px; }
.reject-closed small { margin-top: 7px; color: #4d7466; }
@media (max-width: 900px) {
    .reject-overview { grid-template-columns: 1fr 1fr; }
    .reject-reason-strip { align-items: flex-start; flex-direction: column; }
    .reject-reason-list { justify-content: flex-start; }
    .reject-review-body { grid-template-columns: 1fr; }
    .reject-review-body aside { border-top: 1px solid #d1dbe2; border-left: 0; }
}
@media (max-width: 580px) {
    .reject-overview,
    .reject-entry-grid,
    .reject-facts { grid-template-columns: 1fr; }
    .reject-review-card { width: 100vw; max-height: calc(100vh - 50px); }
    .reject-facts div { border-right: 0; }
}

/* UX improvements: toasts, preview states, readable floor screens */
.toast-stack {
    position: fixed;
    right: 16px;
    bottom: 38px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    min-width: 260px;
    max-width: 420px;
    padding: 12px 38px 12px 14px;
    display: flex;
    align-items: center;
    color: #173041;
    background: #fff;
    border: 1px solid #c5d5df;
    border-left: 4px solid var(--erp-blue);
    box-shadow: 0 12px 30px rgba(16, 36, 52, .16);
    font-size: 12px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: auto;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast-success { border-left-color: #20a875; }
.toast-error { border-left-color: #c53b32; }
.toast button {
    position: absolute;
    top: 6px;
    right: 8px;
    color: #6d7b88;
    background: transparent;
    border: 0;
    font-size: 18px;
}
.preview-banner,
.preview-controls {
    margin-bottom: 12px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #42596a;
    background: #eef6fb;
    border: 1px solid #c7dce8;
    border-left: 3px solid var(--erp-blue);
    font-size: 12px;
}
.preview-pill {
    padding: 4px 8px;
    color: #fff;
    background: var(--erp-blue);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.preview-note,
.preview-empty-note {
    margin: 0;
    color: #5d6f7c;
    font-size: 12px;
}
.preview-empty-note { padding: 18px 20px; }
.view-selector-static span.active {
    height: 32px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    color: var(--erp-blue);
    border-bottom: 2px solid var(--erp-blue);
    font-size: 11px;
    font-weight: 600;
}
.workflow-path-note {
    margin: 0 0 14px;
    padding: 8px 10px;
    color: #4f6270;
    background: #f3f8fb;
    border: 1px solid #d2e0e8;
    font-size: 12px;
}
.line-pack-input {
    width: 88px;
    height: 30px;
    margin-right: 6px;
    padding: 0 8px;
    border: 1px solid #bccad3;
    font-size: 12px;
}
.global-icon:disabled { opacity: .45; cursor: not-allowed; }

/* Floor-screen readability */
.payment-kpi span,
.payment-kpi small,
.department-summary span,
.department-summary small,
.view-selector a,
.dispatch-confirmation-head span,
.shift-entry-form label,
.payment-confirm-form label,
.payment-allocation-heading span {
    font-size: 11px !important;
}
.payment-action-primary,
.payment-action-secondary,
.quick-action-button,
.view-selector a {
    font-size: 11px !important;
}
.data-panel table th,
.data-panel table td,
.shift-entry-form input,
.shift-entry-form select,
.payment-confirm-form input,
.payment-confirm-form select {
    font-size: 12px !important;
}
.badge { font-size: 10px !important; }

/* Entry form hints & readability */
.field-hint,
.field-hint-inline {
    display: block;
    margin-top: 4px;
    color: #5d6f7c;
    font-size: 11px;
    line-height: 1.4;
}
.field-hint-inline { margin-top: 6px; }
.production-mold-auto {
    display: grid;
    gap: 2px;
    margin-top: 4px;
    padding: 9px 11px;
    background: #f5f8fc;
    border: 1px solid #c5d4e3;
    border-radius: 2px;
}
.production-mold-auto strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}
.production-mold-status {
    color: #5d6f7c;
    font-size: 11px;
}
.field-link {
    justify-self: start;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--erp-blue);
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
}
.field-link:hover { color: #0b4f86; }
.inventory-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #1f6feb;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}
.stores-tally-readout strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    color: var(--ink);
}
.stores-receipt-form .dispatch-final-check {
    margin-top: 4px;
}
.stores-receipt-card-wide {
    width: min(760px, calc(100vw - 32px));
}
.stores-receipt-header p {
    margin: 4px 0 0;
    color: #607582;
    font-size: 10px;
}
.stores-receipt-meta strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}
.stores-receipt-step {
    padding: 12px 14px;
    background: #f8fafb;
    border: 1px solid #dbe4ea;
}
.stores-receipt-step header {
    margin-bottom: 10px;
}
.stores-receipt-step header strong,
.stores-receipt-step header span {
    display: block;
}
.stores-receipt-step header span {
    margin-top: 3px;
    color: #72808a;
    font-size: 9px;
}
.stores-pack-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.stores-shift-summary {
    margin: 0 0 10px;
    padding: 10px 12px;
    list-style: none;
    border: 1px solid #e1e8ee;
    border-radius: 8px;
    background: #f8fafc;
}
.stores-shift-summary li + li {
    margin-top: 6px;
}
.stores-unposted-hint {
    margin: 6px 0 0;
    color: #9a6700;
    font-size: 9px;
}
.stores-shift-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}
.stores-shift-table th,
.stores-shift-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e1e8ee;
    text-align: left;
    vertical-align: middle;
}
.stores-shift-table th {
    color: #607582;
    font-size: 8px;
    text-transform: uppercase;
}
.stores-shift-table input {
    width: 100%;
    min-width: 72px;
    height: 32px;
}
.stores-receipt-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.stores-receipt-summary div {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #dbe4ea;
}
.stores-receipt-summary span {
    display: block;
    color: #72808a;
    font-size: 8px;
    text-transform: uppercase;
}
.stores-receipt-summary strong {
    display: block;
    margin-top: 5px;
    font-size: 18px;
}
.stores-row-disabled {
    opacity: 0.45;
}
.inventory-stores-table input[type="checkbox"] {
    width: 15px;
    height: 15px;
}
.movement-pack-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.movement-pack-entry .form-span {
    grid-column: 1 / -1;
}
.stores-count-step {
    padding: 10px 12px;
    background: #f4f8fb;
    border: 1px solid #d5e0e8;
}
.stores-count-step strong,
.stores-count-step span {
    display: block;
}
.stores-count-step span {
    margin-top: 3px;
    color: #607582;
    font-size: 8px;
}
.stores-queue-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #fffaf2;
    border: 1px solid #e8d4a8;
    border-left: 3px solid #d58a1d;
}
.stores-queue-alert strong {
    display: block;
    font-size: 11px;
    color: #6b4a12;
}
.stores-queue-alert span,
.stores-queue-alert small {
    display: block;
    margin-top: 3px;
    color: #8a7348;
    font-size: 9px;
    line-height: 1.4;
}
.stores-queue-alert small {
    margin-top: 5px;
    font-size: 8px;
}
.stores-queue-alert .button {
    flex-shrink: 0;
    min-width: 0;
    padding: 0 12px;
    height: 30px;
    font-size: 9px;
}
.sku-auto-field input[data-auto-generated="1"] {
    background: #f2f8fb;
    border-color: #b8d4e4;
}
.form-tab-panel label,
.shift-entry-form label,
.payment-confirm-form label,
.workflow-action-form label,
.form-stack label {
    gap: 4px;
}
.form-tab-panel input,
.form-tab-panel select,
.form-tab-panel textarea,
.shift-entry-form input,
.shift-entry-form select,
.shift-entry-form textarea,
.payment-confirm-form input,
.payment-confirm-form select,
.payment-confirm-form textarea {
    font-size: 13px !important;
    min-height: 34px;
}
.entry-shortcut-hint {
    margin-right: auto;
    color: #6a7c89;
    font-size: 11px;
}
.dialog-footer {
    align-items: center;
    gap: 12px;
}
.entry-tabs button {
    font-size: 11px !important;
}
.tab-panel-heading strong {
    font-size: 13px;
}
.tab-panel-heading span {
    font-size: 12px;
}

/* Entry modal readability — overrides legacy 7–9px floor-screen rules */
[data-entry-modal] .tab-fields label,
[data-entry-modal] .form-tab-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #334650 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}
[data-entry-modal] .field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    line-height: 1.3;
}
[data-entry-modal] .tab-fields label:has([required])::before,
[data-entry-modal] .form-tab-panel label:has([required])::before {
    display: none;
}
[data-entry-modal] label:has([required]) .field-label::after {
    content: "Required";
    flex: 0 0 auto;
    padding: 2px 7px;
    color: #a83232;
    background: #fdecea;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .35px;
    text-transform: uppercase;
}
[data-entry-modal] .tab-fields input,
[data-entry-modal] .tab-fields select,
[data-entry-modal] .tab-fields textarea,
[data-entry-modal] .form-tab-panel input,
[data-entry-modal] .form-tab-panel select,
[data-entry-modal] .form-tab-panel textarea {
    width: 100%;
    margin-top: 0 !important;
    min-height: 38px;
    font-size: 13px !important;
}
[data-entry-modal] .tab-fields textarea,
[data-entry-modal] .form-tab-panel textarea {
    min-height: 88px;
    padding: 10px 12px;
}
[data-entry-modal] .workflow-hint {
    margin-top: 2px;
    padding: 7px 10px;
    color: #2f5f7d;
    background: #eaf4fa;
    border: 1px solid #c5dce8;
    border-radius: 4px;
    font-size: 11px !important;
    font-weight: 500;
}
[data-entry-modal] .tab-panel-heading strong {
    font-size: 13px !important;
}
[data-entry-modal] .tab-panel-heading span {
    font-size: 12px !important;
}
[data-entry-modal] .tab-progress {
    font-size: 11px !important;
    color: #5a6c79;
}
[data-entry-modal] .entry-shortcut-hint {
    font-size: 11px !important;
    color: #6a7c89;
    white-space: nowrap;
}
[data-entry-modal] .dialog-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px 16px;
}
[data-entry-modal] .dialog-footer-actions {
    margin-left: 0;
}
[data-entry-modal] .assistant-label,
[data-entry-modal] .assistant-metrics span,
[data-entry-modal] .assistant-tip {
    font-size: 10px !important;
}
[data-entry-modal] .tab-assistant h3 {
    font-size: 14px !important;
}
[data-entry-modal] .tab-assistant p {
    font-size: 12px !important;
}
[data-entry-modal] .entry-tabs button {
    min-height: 36px;
    padding: 0 16px !important;
    font-size: 11px !important;
}

/* Standalone document pages */
.standalone-page {
    margin: 0;
    color: #172b3d;
    background: #eef2f5;
    font: 13px/1.45 var(--font-body, Arial, sans-serif);
}
.standalone-toolbar {
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #0b78bd;
}
.standalone-back,
.standalone-print,
.standalone-actions button {
    padding: 9px 16px;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .55);
    text-decoration: none;
    cursor: pointer;
    font-size: 12px;
}
.standalone-actions { display: flex; gap: 8px; }
.invoice-sheet {
    width: min(210mm, 100%);
    min-height: 297mm;
    margin: 18px auto;
    padding: 16mm;
    background: #fff;
    box-shadow: 0 12px 35px rgba(15, 35, 50, .14);
}
.sales-order-sheet {
    width: min(210mm, 100%);
    min-height: 297mm;
    margin: 18px auto;
    padding: 16mm;
    background: #fff;
    box-shadow: 0 12px 35px rgba(15, 35, 50, .14);
}
.sales-order-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 3px solid #0b78bd;
    padding-bottom: 18px;
}
.sales-order-brand { font-size: 25px; font-weight: 700; color: #0b78bd; }
.sales-order-head h1 { margin: 0; font-size: 28px; }
.sales-order-right { text-align: right; }
.sales-order-muted { color: #687784; }
.sales-order-status { display: inline-block; margin-top: 8px; }
.sales-order-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
.sales-order-box { padding: 14px; border: 1px solid #d2dce4; }
.sales-order-box strong,
.sales-order-box span { display: block; }
.sales-order-sheet table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.sales-order-sheet th,
.sales-order-sheet td { padding: 10px; border-bottom: 1px solid #dbe3e9; text-align: left; }
.sales-order-sheet th { background: #eaf2f7; font-size: 11px; text-transform: uppercase; }
.sales-order-num { text-align: right; white-space: nowrap; }
.sales-order-sheet tfoot td { background: #f5f8fa; }
.sales-order-notes,
.sales-order-history { margin-top: 22px; padding: 14px; border: 1px solid #d2dce4; background: #f8fbfd; }
.sales-order-notes p,
.sales-order-history ul { margin: 8px 0 0; padding-left: 18px; color: #4d5d68; }
.sales-order-history li { margin-bottom: 6px; }
.sales-order-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 12px;
    border-top: 1px solid #d2dce4;
    color: #687784;
    font-size: 11px;
}
.invoice-head {
    display: flex;
    justify-content: space-between;
    border-bottom: 3px solid #0b78bd;
    padding-bottom: 18px;
}
.invoice-brand { font-size: 25px; font-weight: 700; color: #0b78bd; }
.invoice-head h1 { margin: 0; font-size: 28px; }
.invoice-muted { color: #687784; }
.invoice-meta,
.invoice-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
.invoice-box { padding: 14px; border: 1px solid #d2dce4; }
.invoice-box strong,
.invoice-box span { display: block; }
.invoice-box strong { margin-bottom: 6px; }
.invoice-sheet table { width: 100%; border-collapse: collapse; }
.invoice-sheet th,
.invoice-sheet td { padding: 10px; border-bottom: 1px solid #dbe3e9; text-align: left; }
.invoice-sheet th { background: #eaf2f7; font-size: 11px; text-transform: uppercase; }
.invoice-right { text-align: right; }
.invoice-total-block { margin-left: auto; width: 310px; margin-top: 18px; }
.invoice-total-block div { padding: 8px; display: flex; justify-content: space-between; }
.invoice-total-block .grand { font-size: 17px; font-weight: 700; border-top: 2px solid #0b78bd; }
.invoice-verification {
    margin-top: 28px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #d6dfe6;
}
.invoice-verification img { width: 150px; height: 150px; }
.invoice-verification-text { max-width: 430px; }
.invoice-code { font: 10px monospace; word-break: break-all; color: #657681; }
.invoice-paid {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 11px;
    color: #087551;
    background: #e0f5ed;
    border: 1px solid #9bd9c4;
    font-weight: 700;
}
.invoice-awaiting-payment {
    color: #9a5b00;
    background: #fff4df;
    border-color: #f0c878;
}
.gate-verify-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}
.gate-verify-card {
    width: min(680px, 100%);
    background: #fff;
    border: 1px solid #c9d4dc;
    box-shadow: 0 18px 50px rgba(17, 39, 55, .15);
}
.gate-verify-status {
    padding: 25px;
    color: #fff;
}
.gate-verify-status.is-valid { background: #15966b; }
.gate-verify-status.is-invalid { background: #c43c3c; }
.gate-verify-status h1 { margin: 4px 0; font-size: 28px; }
.gate-verify-body { padding: 22px; }
.gate-verify-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid #d6e0e7;
}
.gate-verify-facts div {
    padding: 12px;
    border-right: 1px solid #d6e0e7;
    border-bottom: 1px solid #d6e0e7;
}
.gate-verify-facts small,
.gate-verify-facts strong { display: block; }
.gate-verify-facts small { color: #70808c; font-size: 10px; text-transform: uppercase; }
.gate-verify-facts strong { margin-top: 5px; }
.gate-verify-card table { width: 100%; margin-top: 18px; border-collapse: collapse; }
.gate-verify-card th,
.gate-verify-card td { padding: 10px; border-bottom: 1px solid #dce4ea; text-align: left; }
.gate-verify-card th { background: #eaf2f7; font-size: 10px; text-transform: uppercase; }
.gate-notice {
    margin-top: 18px;
    padding: 12px;
    background: #fff6dd;
    border: 1px solid #e8d399;
}
.production-sheet-page { font-size: 11px; }
.production-sheet {
    width: min(281mm, 100%);
    min-height: 194mm;
    margin: 12px auto;
    padding: 9mm;
    background: #fff;
    box-shadow: 0 12px 35px rgba(15, 35, 50, .14);
}
.production-sheet-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 3px solid #0879be;
}
.production-sheet-brand { color: #0879be; font-size: 22px; font-weight: 800; }
.production-sheet-head h1 { margin: 0; text-align: center; font-size: 20px; letter-spacing: .5px; }
.production-sheet-facts {
    margin: 9px 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border: 1px solid #aebdc7;
}
.production-sheet-facts .fact {
    min-height: 44px;
    padding: 7px;
    border-right: 1px solid #c7d1d8;
}
.production-sheet-facts .fact:last-child { border-right: 0; }
.production-sheet-facts small { color: #687985; font-size: 9px; text-transform: uppercase; display: block; }
.production-sheet-facts strong { margin-top: 4px; font-size: 11px; display: block; }
.production-sheet-facts span { margin-top: 3px; color: #627481; font-size: 10px; display: block; }
.shift-form-hint {
    margin: 0 0 8px;
    color: #5d6f7c;
    font-size: 11px;
}
.payment-shortcut-hint,
.shift-shortcut-hint {
    margin-top: 8px;
    color: #6a7c89;
    font-size: 11px;
    text-align: right;
}
@media print {
    .standalone-toolbar { display: none; }
    .standalone-page { background: #fff; }
    .invoice-sheet,
    .sales-order-sheet,
    .production-sheet { margin: 0; box-shadow: none; width: auto; min-height: auto; padding: 10mm; }
}
@media (max-width: 850px) {
    .invoice-sheet { width: 100%; margin: 0; padding: 20px; }
    .invoice-meta { grid-template-columns: 1fr; }
    .gate-verify-facts { grid-template-columns: 1fr; }
}
.production-sheet-standards {
    margin-bottom: 9px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.production-sheet-standard {
    padding: 7px 9px;
    background: #edf5f9;
    border: 1px solid #bfd2dd;
}
.production-sheet-standard strong { display: block; margin-bottom: 3px; }
.production-sheet-standard span { color: #546b79; }
.production-sheet table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.production-sheet th,
.production-sheet td {
    border: 1px solid #9eacb5;
    padding: 5px;
    text-align: center;
    font-size: 10px;
}
.production-sheet th {
    height: 32px;
    background: #dfeaf0;
    font-size: 9px;
    text-transform: uppercase;
    line-height: 1.35;
}
.production-sheet td { height: 24px; }
.production-sheet-notes {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 9px;
}
.production-sheet-lined,
.production-sheet-approval {
    min-height: 53px;
    padding: 7px;
    border: 1px solid #aebbc4;
}
.production-sheet-lined strong,
.production-sheet-approval strong { display: block; margin-bottom: 6px; }
.production-sheet-line { height: 16px; border-bottom: 1px solid #b6c1c8; }
.production-sheet-signatures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.production-sheet-signature {
    padding-top: 23px;
    border-bottom: 1px solid #758691;
    text-align: center;
    color: #596b77;
}
.production-sheet-footer {
    margin-top: 7px;
    display: flex;
    justify-content: space-between;
    color: #6d7b85;
    font-size: 9px;
}
@media print {
    @page { size: A4 landscape; margin: 8mm; }
}

.batch-certificate-page { font-size: 11px; }
.batch-certificate-head .right { text-align: right; }
.batch-certificate-meta span { display: block; color: #627481; font-size: 10px; }
.batch-release {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.batch-release-success { color: #1f6b43; background: #e8f6ee; }
.batch-release-warning { color: #8a6118; background: #fff4df; }
.batch-release-danger { color: #8f2f2f; background: #fdecec; }
.batch-certificate-facts { grid-template-columns: repeat(3, 1fr); }
.batch-certificate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}
.batch-certificate-panel {
    border: 1px solid #aebdc7;
    padding: 8px;
    background: #f8fbfd;
}
.batch-certificate-panel strong { display: block; margin-bottom: 6px; }
.batch-certificate-spec-table { width: 100%; border-collapse: collapse; }
.batch-certificate-spec-table th,
.batch-certificate-spec-table td {
    padding: 5px 4px;
    border-bottom: 1px solid #d5dee4;
    text-align: left;
    vertical-align: top;
}
.batch-certificate-spec-table th { width: 42%; color: #5d6f7c; font-weight: 600; }
.batch-certificate-section { margin-top: 10px; }
.batch-certificate-section > strong { display: block; margin-bottom: 6px; }
.batch-certificate-empty { text-align: center; color: #6a7c89; font-style: italic; }
.batch-result { font-weight: 700; text-transform: uppercase; font-size: 9px; }
.batch-result-passed { color: #1f6b43; }
.batch-result-hold { color: #8a6118; }
.batch-result-failed { color: #8f2f2f; }
.batch-result-missing { color: #6a7c89; }
.quality-template-panel {
    padding: 10px 12px;
    background: #f2f8fb;
    border: 1px solid #c7dce8;
}
.quality-template-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}
.quality-template-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
}
.dispatch-certificate-panel .cell-sub {
    display: block;
    margin-top: 4px;
    color: #6a7c89;
    font-size: 10px;
    word-break: break-all;
}
.gate-certificate-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d5dee4;
}
.gate-certificate-panel table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
}
.gate-certificate-panel th,
.gate-certificate-panel td {
    padding: 6px 4px;
    border-bottom: 1px solid #e2e8ed;
    text-align: left;
    font-size: 11px;
}
.batch-certificate-notes p { margin: 0 0 8px; color: #4f6270; line-height: 1.5; }
.batch-quality-history div { margin-bottom: 8px; }
@media print {
    .batch-certificate-page .production-sheet { width: auto; min-height: auto; box-shadow: none; }
    @page { size: A4 portrait; margin: 10mm; }
}

/* Inventory control — simplified summary and toolbar */
.inventory-summary article {
    min-height: 72px;
    box-shadow: none;
}
.inventory-summary-warn {
    border-top-color: #d58a1d !important;
}
.inventory-toolbar-layout {
    height: auto;
    min-height: 44px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 10px 10px;
}
.inventory-toolbar-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
}
.inventory-toolbar-primary .inventory-views {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}
.inventory-toolbar-primary .toolbar-right {
    flex-shrink: 0;
    margin-left: 0;
}
.inventory-toolbar-primary .search-box {
    width: 210px;
    min-width: 160px;
}
.inventory-category-tabs {
    flex: none;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e6eb;
    overflow-x: auto;
}
.inventory-category-tabs a {
    white-space: nowrap;
}
.inventory-tab-count {
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: #d58a1d;
    border-radius: 9px;
    font-size: 7px;
    font-weight: 700;
}

/* Inventory control — category tabs and grouped movements */
.table-toolbar:has(.inventory-category-tabs):not(.inventory-toolbar-layout) {
    flex-wrap: wrap;
    gap: 8px;
}
.inventory-category-tabs {
    flex: 1 1 100%;
    border-top: 1px solid #e1e6eb;
    padding-top: 6px;
}
.inventory-category-tabs a span {
    margin-left: 4px;
    color: #748392;
    font-weight: 600;
}
.inventory-group-row {
    cursor: pointer;
}
.inventory-group-row.is-open {
    background: #f0f9ff;
}
.inventory-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.inventory-group-chevron {
    width: 14px;
    color: #607080;
    font-size: 10px;
}
.inventory-group-detail-row > td {
    padding: 0;
    background: #f8fafc;
    border-bottom: 1px solid #dbe4ea;
}
.inventory-group-detail {
    padding: 12px 16px 16px 38px;
}
.inventory-group-detail header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.inventory-group-detail header strong {
    font-size: 11px;
    color: #25343e;
}
.inventory-group-detail header span {
    font-size: 9px;
    color: #748392;
}
.inventory-group-lines {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dbe4ea;
}
.inventory-group-lines th,
.inventory-group-lines td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eef2f6;
    font-size: 10px;
}
.inventory-group-lines th {
    background: #edf3f7;
    text-transform: uppercase;
    color: #607080;
    font-size: 9px;
}
.inventory-group-lines tr[data-row-href] {
    cursor: pointer;
}
.inventory-group-lines tr[data-row-href]:hover {
    background: #f0f9ff;
}
.stock-level-bar {
    margin-top: 5px;
    height: 4px;
    background: #e8eef2;
    border-radius: 2px;
    overflow: hidden;
}
.stock-level-bar span {
    display: block;
    height: 100%;
    background: var(--erp-blue);
}
.row-needs-action .stock-level-bar span {
    background: #d58a1d;
}
.inventory-movement-card {
    max-width: 560px;
    padding: 0;
}
.inventory-movement-head {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e1e6eb;
}
.inventory-movement-head h2 {
    margin: 4px 0;
    font-size: 18px;
}
.inventory-movement-head p {
    margin: 0;
    color: #748392;
    font-size: 10px;
}
.inventory-movement-head small {
    display: block;
    font-size: 8px;
    text-transform: uppercase;
    color: #748392;
}
.inventory-movement-body {
    padding: 18px 20px 22px;
}
.inventory-movement-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin: 0 0 18px;
}
.inventory-movement-meta dt {
    font-size: 8px;
    text-transform: uppercase;
    color: #748392;
}
.inventory-movement-meta dd {
    margin: 4px 0 0;
    font-size: 11px;
    color: #25343e;
}
.inventory-movement-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.inventory-filter-note {
    margin: 0 0 10px;
    padding: 10px 12px;
    background: #f0f9ff;
    border: 1px solid #c5deef;
    font-size: 10px;
    color: #475569;
}

/* Katana-inspired operational design system */
:root {
    --erp-blue: #21865f;
    --erp-blue-dark: #176b4b;
    --erp-blue-soft: #e8f4ee;
    --erp-border: #d9dedb;
    --erp-grid: #e8ece9;
    --erp-sidebar: #1e2422;
    --erp-text: #202624;
    --katana-green: #21865f;
    --katana-green-soft: #e8f4ee;
    --katana-ink: #202624;
    --katana-muted: #6c7772;
    --katana-line: #dde2df;
    --katana-canvas: #f4f6f4;
    --katana-panel: #ffffff;
    --katana-warning: #c88724;
    --katana-danger: #c94f4f;
}

body:not(.login-page) {
    padding-top: 56px;
    color: var(--katana-ink);
    background: var(--katana-canvas);
    font-family: Inter, Arial, sans-serif;
}

.global-bar {
    height: 56px;
    color: var(--katana-ink);
    background: #fff;
    border-bottom: 1px solid var(--katana-line);
    box-shadow: none;
}
.global-brand {
    width: 220px;
    color: #fff;
    background: #1e2422;
    border-right: 0;
}
.brand-glyph {
    color: #fff;
    background: var(--katana-green);
    border-radius: 5px;
}
.global-brand strong { font-size: 18px; font-weight: 700; letter-spacing: 0; }
.global-search {
    width: min(390px, 31vw);
    height: 36px;
    margin: 10px 16px;
    color: var(--katana-muted);
    background: #f5f7f5;
    border: 1px solid var(--katana-line);
    border-radius: 6px;
}
.global-search input { color: var(--katana-ink); font-style: normal; }
.global-search input::placeholder { color: #8a948f; }
.global-icon {
    width: 46px;
    color: #68736e;
    border-left: 1px solid #edf0ee;
}
.global-icon:hover { color: var(--katana-green); background: #f3f7f4; }
.company-context {
    border-left: 1px solid #edf0ee;
}
.company-context small { color: #8a948f; }
.company-context strong { color: #303835; }
.global-user {
    min-width: 190px;
    border-left: 1px solid #edf0ee;
}
.global-user .avatar { color: #fff; background: var(--katana-green); }
.global-user span small { color: #7d8883; }

.sidebar {
    top: 56px;
    width: 220px;
    padding: 14px 10px 50px;
    color: #dce3df;
    background: #1e2422;
    border-right: 0;
}
.nav { padding: 0; }
.nav-label {
    padding: 4px 12px 10px;
    color: #7f8c86;
    font-size: 8px;
    letter-spacing: .12em;
}
.nav a,
.sidebar-footer a {
    min-height: 38px;
    margin-bottom: 2px;
    padding: 0 11px;
    color: #bcc6c1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}
.nav a:hover,
.sidebar-footer a:hover { color: #fff; background: #2a322f; }
.nav a.active {
    color: #fff;
    background: #2d6f54;
    box-shadow: inset 3px 0 #6fd29e;
}
.nav-icon {
    width: 23px;
    color: #8fa099;
    font-size: 14px;
}
.nav a.active .nav-icon { color: #d9f5e6; }
.sidebar-footer {
    padding: 10px;
    background: #1e2422;
    border-top: 1px solid #303835;
}

.main-shell {
    width: calc(100% - 220px);
    min-width: 0;
    margin-left: 220px;
    background: var(--katana-canvas);
}
.topbar {
    min-height: 66px;
    padding: 11px 20px;
    background: #fff;
    border-bottom: 1px solid var(--katana-line);
}
.topbar h1 { margin-top: 3px; color: var(--katana-ink); font-size: 18px; font-weight: 650; letter-spacing: 0; }
.breadcrumb { color: #89938e; font-size: 8px; letter-spacing: .03em; }
.screen-commands button,
.screen-commands a {
    min-height: 32px;
    color: #4e5954;
    background: #fff;
    border: 1px solid var(--katana-line);
    border-radius: 5px;
}
.screen-commands button:hover,
.screen-commands a:hover { color: var(--katana-green); background: #f5f8f6; border-color: #b8cfc3; }
.content { min-width: 0; padding: 18px 20px 32px; background: var(--katana-canvas); }
.footer { display: none; }

.workspace-title,
.module-heading {
    min-height: 58px;
    margin-bottom: 14px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--katana-line);
}
.workspace-title h2,
.module-heading h2 { color: var(--katana-ink); font-size: 20px; font-weight: 650; letter-spacing: 0; }
.workspace-title p,
.module-heading p { color: var(--katana-muted); font-size: 10px; }
.section-caption { margin: 18px 0 9px; }
.section-caption span,
.assistant-label { color: #7d8883; letter-spacing: .09em; }

.button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 650;
    box-shadow: none;
}
.button-primary,
.payment-action-primary,
.quick-action-button,
.entry-command-bar .entry-save {
    color: #fff;
    background: var(--katana-green);
    border-color: var(--katana-green);
}
.button-primary:hover,
.payment-action-primary:hover,
.quick-action-button:hover { background: var(--erp-blue-dark); border-color: var(--erp-blue-dark); }
.button-secondary,
.payment-action-secondary {
    color: #3f4a45;
    background: #fff;
    border-color: #cfd6d2;
}

.erp-widget,
.erp-grid-panel,
.panel,
.report-card,
.reports-panel,
.product-hero-card,
.customer-hero-card,
.inventory-hero-card,
.sales-hero-card,
.production-run-card,
.workflow-card {
    background: #fff;
    border-color: var(--katana-line);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(25,35,30,.04);
}
.widget-title,
.panel-header,
.reports-panel-head {
    color: #4c5752;
    background: #fafbfa;
    border-color: var(--katana-line);
}
.widget-title { min-height: 42px; padding: 11px 13px; font-size: 9px; font-weight: 650; }
.widget-title a,
.panel-header > a,
.grid-link,
.table-action,
.workflow-link { color: var(--katana-green); }

.exception-grid { gap: 10px; }
.exception-tile {
    min-height: 86px;
    background: #fff;
    border: 1px solid var(--katana-line);
    border-radius: 6px;
    box-shadow: none;
}
.exception-tile:hover { border-color: #aebbb5; transform: none; }
.exception-tile::before { width: 3px; }
.tile-green::before { background: var(--katana-green); }
.tile-amber::before { background: var(--katana-warning); }
.tile-red::before { background: var(--katana-danger); }
.tile-blue::before { background: #4a7fa0; }
.tile-purple::before { background: #7468a8; }
.tile-icon { border-radius: 5px; }

table { color: var(--katana-ink); }
.table-wrap,
.reports-table-wrap,
.detail-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-color: var(--katana-line);
    border-radius: 5px;
}
table thead th,
.reports-table thead th,
.reports-canvas .detail-table-wrap thead th {
    color: #68736e;
    background: #f6f8f6;
    border-color: var(--katana-line);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .05em;
}
table tbody td,
.reports-table tbody td,
.reports-canvas .detail-table-wrap tbody td { border-color: #edf0ee; }
table tbody tr:hover,
.reports-table tbody tr:hover { background: #f1f7f3; }
table tbody tr:nth-child(even),
.reports-table tbody tr:nth-child(even) { background: #fbfcfb; }

.badge { border-radius: 999px; font-weight: 700; }
.badge-success { color: #176b4b; background: #e2f3ea; }
.badge-info { color: #325f78; background: #e7f0f5; }
.badge-warning { color: #875a16; background: #fff1d9; }
.badge-danger { color: #993d3d; background: #fde8e8; }
.badge-muted { color: #626d68; background: #edf0ee; }

.sales-progress span,
.grid-progress span,
.hbar span,
.stock-level span,
.stock-level-bar span { background: var(--katana-green); }
.donut { --chart-blue: var(--katana-green); }
.spark-bars span { background: #5aa985; }

.table-toolbar,
.record-command-bar,
.report-command-bar,
.entry-command-bar {
    background: #f8faf8;
    border-color: var(--katana-line);
}
.view-selector,
.module-view-tabs,
.payment-views,
.sales-views { background: #eef1ef; border-color: #d7ddda; border-radius: 6px; }
.view-selector a,
.module-view-tabs a { border-radius: 4px; }
.view-selector a.active,
.module-view-tabs a.active { color: #fff; background: var(--katana-green); border-color: var(--katana-green); }

.modal-backdrop { background: rgba(24,31,28,.48); backdrop-filter: blur(2px); }
.modal-card {
    background: #fff;
    border: 1px solid #aeb8b3;
    border-radius: 6px;
    box-shadow: 0 22px 60px rgba(18,28,23,.24);
}
.modal-header,
.workflow-header,
.production-run-header,
.shift-posting-header { background: #fff; border-color: var(--katana-line); }
.modal-title-icon { background: var(--katana-green); border-radius: 6px; box-shadow: none; }
.entry-tabs { background: #fafbfa; border-color: var(--katana-line); }
.entry-tabs button.active { color: var(--katana-green); border-color: var(--katana-green); }
.form-section,
.shift-section { background: #f3f6f4; border-color: var(--katana-line); }
.form-grid input,
.form-grid select,
.form-grid textarea,
input,
select,
textarea { border-color: #cbd3cf; border-radius: 4px; }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
input:focus,
select:focus,
textarea:focus { border-color: var(--katana-green); box-shadow: 0 0 0 2px rgba(33,134,95,.12); outline: 0; }

.reports-analytics {
    background: #fff;
    border-color: var(--katana-line);
    border-radius: 6px;
    box-shadow: none;
}
.reports-command-deck {
    color: var(--katana-ink);
    background: #fff;
    border-bottom: 1px solid var(--katana-line);
    box-shadow: none;
}
.reports-command-badge { color: #176b4b; background: var(--katana-green-soft); border-color: #cce4d7; }
.reports-command-deck h1 { color: var(--katana-ink); }
.reports-command-subtitle,
.reports-command-meta { color: var(--katana-muted); }
.reports-command-meta i { background: #aeb7b2; }
.reports-command-preset { color: #176b4b; background: var(--katana-green-soft); }
.reports-command-form { background: #f6f8f6; border-color: var(--katana-line); }
.reports-date-stack label { color: #74807a; }
.reports-action-btn { color: #46514c; background: #fff; border-color: #ccd4d0; }
.reports-action-accent { color: #fff; background: var(--katana-green); border-color: var(--katana-green); }
.reports-presets { background: #fafbfa; border-color: var(--katana-line); }
.reports-presets a.active { color: #fff; background: var(--katana-green); border-color: var(--katana-green); box-shadow: none; }
.reports-sidebar { background: #f7f9f7; border-color: var(--katana-line); }
.reports-nav-item.is-active { background: #dfeee6; border-color: #c6dfd1; box-shadow: none; }
.reports-nav-item.is-active .reports-nav-copy strong { color: #174d38; }
.reports-nav-item.is-active .reports-nav-copy small { color: #527060; }
.reports-nav-item.is-active .reports-nav-icon { color: #176b4b; background: #fff; }
.reports-kpi-card,
.reports-panel,
.reports-dept-health-card,
.reports-dept-card { border-radius: 6px; box-shadow: none; }
.reports-kpi-card::after { background: var(--katana-green); }
.reports-kpi-icon,
.reports-dept-icon,
.reports-dept-card .reports-dept-icon { color: #176b4b; background: var(--katana-green-soft); }
.reports-chart-bar,
.reports-chart-bar.is-green { background: var(--katana-green); box-shadow: none; }
.reports-chart-bar.is-violet { background: #6c7598; box-shadow: none; }
.reports-donut-ring { background: conic-gradient(var(--katana-green) calc(var(--pct) * 1%),#e7ece9 0); }

.login-page { background: #f4f6f4; }
.login-story { background: #1e2422; }
.login-card { border-radius: 8px; box-shadow: 0 18px 50px rgba(22,32,27,.16); }
.login-card button { background: var(--katana-green); border-color: var(--katana-green); }

@media (max-width: 820px) {
    body:not(.login-page) { padding-top: 56px; }
    .global-brand { width: auto; }
    .menu-toggle { color: #fff; background: #1e2422; }
    .sidebar { top: 56px; }
    .main-shell { width: 100%; margin-left: 0; }
    .content { padding: 12px 10px 28px; }
    .topbar { padding: 10px 12px; }
}

/* Katana-inspired reports catalog and inquiry surfaces */
.content-gi { background: var(--katana-canvas); }
.reports-catalog { gap: 12px; }
.reports-catalog-hero,
.reports-catalog-kpi,
.reports-catalog-alerts,
.reports-catalog-group,
.reports-catalog-card {
    background: #fff;
    border-color: var(--katana-line);
    border-radius: 6px;
}
.reports-catalog-hero h2,
.reports-catalog-meta strong,
.reports-catalog-kpi strong,
.reports-catalog-group-head strong,
.reports-catalog-card strong { color: var(--katana-ink); }
.reports-catalog-hero p,
.reports-catalog-meta small,
.reports-catalog-kpi span,
.reports-catalog-kpi small,
.reports-catalog-card p { color: var(--katana-muted); }
.reports-catalog-meta div,
.reports-catalog-card { background: #f8faf8; border-color: var(--katana-line); }
.reports-catalog-card:hover { background: #f0f7f3; border-color: #a9c9b8; }
.reports-catalog-card-action,
.reports-catalog-card-id { color: var(--katana-green); }

.gi-inquiry {
    overflow: hidden;
    background: #fff;
    border-color: var(--katana-line);
    border-radius: 6px;
}
.gi-screen-bar {
    min-height: 48px;
    padding: 0 14px;
    background: #fff;
    border-color: var(--katana-line);
}
.gi-screen-id {
    color: #176b4b;
    background: var(--katana-green-soft);
    border-color: #c8e0d3;
    border-radius: 4px;
}
.gi-screen-title strong { color: var(--katana-ink); }
.gi-tool-btn {
    height: 30px;
    color: #46514c;
    background: #fff;
    border-color: #ccd4d0;
    border-radius: 4px;
}
.gi-tool-btn:hover { color: var(--katana-green); background: #f2f7f4; border-color: #a9c9b8; }
.gi-tool-primary,
.gi-tool-primary:hover { color: #fff; background: var(--katana-green); border-color: var(--katana-green); }
.gi-body { grid-template-columns: 220px minmax(0,1fr); }
.gi-body.gi-body-single { grid-template-columns: minmax(0, 1fr); }
.gi-body.gi-body-single .gi-main { width: 100%; min-width: 0; }
.gi-tree { background: #f7f9f7; border-color: var(--katana-line); }
.gi-tree-head { color: #74807a; border-color: var(--katana-line); }
.gi-tree-home {
    color: #176b4b;
    background: #fff;
    border-color: #cad5cf;
    border-radius: 4px;
}
.gi-tree-group { border-color: var(--katana-line); }
.gi-tree-group summary { color: #55615b; background: #eef2ef; }
.gi-tree-item { color: #43504a; border-radius: 4px; }
.gi-tree-item:hover { background: #fff; border-color: #cbd7d0; }
.gi-tree-item.is-active { color: #174d38; background: #dfeee6; border-color: #c3dccf; }
.gi-main { background: #fff; }
.gi-parameters { background: #fafbfa; border-color: var(--katana-line); }
.gi-parameters-head,
.gi-results-head,
.gi-grid-head { background: #f1f4f2; border-color: var(--katana-line); }
.gi-parameters-head span,
.gi-results-head span { color: #65716b; }
.gi-param-field > span { color: #74807a; }
.gi-param-field input { border-color: #cbd3cf; border-radius: 4px; }
.gi-param-field input[readonly] { color: #5e6964; background: #f2f4f2; }
.gi-preset-link {
    color: #53605a;
    background: #fff;
    border-color: #cdd5d1;
    border-radius: 4px;
}
.gi-preset-link.is-active,
.gi-preset-link:hover { color: #fff; background: var(--katana-green); border-color: var(--katana-green); }
.gi-results-body { background: #fff; }
.gi-status-bar { color: #6f7b75; background: #f4f6f4; border-color: var(--katana-line); }
.gi-summary-strip { gap: 8px; background: transparent; border: 0; }
.gi-summary-cell { background: #f7f9f7; border: 1px solid var(--katana-line); border-radius: 5px; }
.gi-summary-cell strong { color: var(--katana-ink); }
.gi-grid-block { border-color: var(--katana-line); border-radius: 5px; overflow: hidden; }
.gi-grid-head strong { color: #45514b; }
.gi-grid-link { color: var(--katana-green); }
.gi-grid thead th { color: #5c6862; background: #edf1ee; border-color: #d4dbd7; }
.gi-grid tbody td { color: #34403a; border-color: #e4e9e6; }
.gi-grid tbody tr:nth-child(even) td { background: #fafbfa; }
.gi-grid tbody tr:hover td { background: #eef6f1; }

@media (max-width: 820px) {
    .gi-body { grid-template-columns: 1fr; }
    .gi-screen-bar { align-items: flex-start; flex-direction: column; padding: 10px; }
    .gi-screen-actions { width: 100%; }
    .gi-main { min-width: 0; }
}

.credit-aging-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}
.credit-aging-card {
    padding: 12px 14px;
    border: 1px solid var(--katana-line);
    border-radius: 5px;
    background: #fff;
    display: grid;
    gap: 4px;
}
.credit-aging-card span { font-size: 10px; text-transform: uppercase; color: #68736e; letter-spacing: .04em; }
.credit-aging-card strong { font-size: 18px; font-weight: 600; }
.credit-aging-card small { color: #68736e; font-size: 11px; }
.credit-aging-card-warn { border-color: #e8c27a; background: #fffaf0; }
.credit-aging-card-danger { border-color: #e0a3a3; background: #fff5f5; }
.collection-follow-up { margin-top: 10px; }
.collection-follow-up summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.collection-follow-up label { display: block; margin-bottom: 8px; }
.statement-section-title { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.statement-footer-summary { margin-top: 18px; }
.customer-statement-sheet .invoice-box span { display: block; }

@media (max-width: 900px) {
    .credit-aging-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.payments-hub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.payments-hub-grid .exception-tile strong {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.payments-hub-alerts { display: grid; gap: 8px; }
.payments-hub-alert {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    background: #f0f8fc;
    border: 1px solid #c8deef;
    border-left: 3px solid var(--erp-primary, #0879be);
}
.payments-hub-alert strong { font-size: 10px; color: #10243f; }
.payments-hub-alert span { font-size: 9px; color: #607080; }
.payments-hub-alert.is-warn { background: #eef6fb; border-color: #b8d4e8; border-left-color: #0a639e; }

@media (max-width: 1100px) {
    .payments-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
    .payments-hub-grid { grid-template-columns: 1fr; }
}

/* Inventory subnav — blue pivot tabs, flush left */
body.erp-theme .inventory-subnav .inventory-views,
body.m365-theme .inventory-subnav .inventory-views,
body.erp-theme .inventory-subnav .inventory-category-tabs,
body.m365-theme .inventory-subnav .inventory-category-tabs {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}
body.erp-theme .inventory-subnav .inventory-views a,
body.m365-theme .inventory-subnav .inventory-views a,
body.erp-theme .inventory-subnav .inventory-category-tabs a,
body.m365-theme .inventory-subnav .inventory-category-tabs a {
    color: #607582;
    background: transparent !important;
    border-radius: 0 !important;
}
body.erp-theme .inventory-subnav .inventory-views a.active,
body.m365-theme .inventory-subnav .inventory-views a.active,
body.erp-theme .inventory-subnav .inventory-category-tabs a.active,
body.m365-theme .inventory-subnav .inventory-category-tabs a.active {
    color: var(--erp-primary, var(--fluent-brand, #1686c4)) !important;
    background: transparent !important;
    border-color: var(--erp-primary, var(--fluent-brand, #1686c4)) !important;
}
/* Sales entry — right-side drawer */
.sales-entry-modal {
    padding: 0;
    align-items: stretch;
    justify-content: flex-end;
}

.sales-entry-modal .modal-card {
    width: min(880px, 88vw);
    height: 100dvh;
    max-height: none;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    border: 0;
    border-left: 1px solid #8d9aa5;
    box-shadow: -12px 0 35px rgba(18, 37, 51, .2);
}

/* All other modals — centered */
.modal:not(.sales-entry-modal) {
    padding: 24px;
    align-items: center;
    justify-content: center;
}

.modal:not(.sales-entry-modal) .modal-card {
    width: min(1040px, calc(100vw - 48px));
    height: auto;
    min-height: 540px;
    max-height: calc(100vh - 88px);
    margin: 0;
    border-radius: 8px;
    border: 1px solid #8796a3;
    box-shadow: 0 24px 70px rgba(12, 29, 43, .32);
}
/* Override unscoped app.css modal rules when erp-theme is active */
body.erp-theme .modal {
    justify-content: center;
    align-items: center;
    padding: 24px;
}

body.erp-theme .modal-card {
    width: min(1040px, calc(100vw - 48px));
    height: auto;
    min-height: 540px;
    max-height: calc(100vh - 88px);
    margin: 0;
    border-radius: 8px;
    border: 1px solid var(--erp-border);
    box-shadow: 0 24px 70px rgba(16, 36, 63, 0.22);
}

/* Sales drawer — restore right-panel behaviour */
body.erp-theme .sales-entry-modal {
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
}

body.erp-theme .sales-entry-modal .modal-card {
    width: min(880px, calc(100vw - 48px));
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--erp-border);
    box-shadow: -16px 0 45px rgba(16, 36, 63, 0.18);
}
/* Sales modal — right drawer */
.sales-entry-modal {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
}
.sales-entry-modal .modal-card {
    width: min(880px, 88vw) !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-left: 1px solid #8d9aa5 !important;
    box-shadow: -12px 0 35px rgba(18,37,51,.2) !important;
    transform: none !important;
}

/* All other entry modals — centered */
[data-entry-modal]:not(.sales-entry-modal) {
    padding: 24px !important;
    align-items: center !important;
    justify-content: center !important;
}
[data-entry-modal]:not(.sales-entry-modal) .modal-card {
    width: min(1040px, calc(100vw - 48px)) !important;
    height: auto !important;
    min-height: 540px !important;
    max-height: calc(100vh - 88px) !important;
    margin: 0 !important;
    border-radius: 8px !important;
    transform: none !important;
    transition: none !important;
}

/* ============================================================
   Style Overlay — Responsive fixes + RMS360 bold/spacious scale
   Appended 2026-07-01. Colors, --erp-blue, --erp-sidebar,
   and sidebar/topbar layout structure are untouched below.
   ============================================================ */

/* ============================================================
   PET360 ERP — Style Overlay (Responsive + RMS360 Scale)
   ------------------------------------------------------------
   Load this ONE file after erp-professional.css. It combines:
     1) Responsive breakpoint fixes (mobile/tablet gaps)
     2) RMS360-style bold/spacious type & spacing scale
   Nothing here touches colors, --erp-blue, --erp-sidebar, or
   sidebar/topbar layout structure — those stay exactly as
   defined in erp-professional.css.
   ============================================================ */

/* ============================================================
   PET360 ERP — Responsive Patch Layer
   Load this AFTER erp-professional.css (same <link> block, next line).
   It only touches selectors that were missing mobile/tablet rules —
   nothing here fights your existing breakpoints.
   ============================================================ */

/* ----------------------------------------------------------------
   0. REQUIRED — cannot be fixed from CSS alone.
   Confirm layout.php <head> has this. Without it, phones render the
   page at desktop width and scale down, so none of these breakpoints
   ever fire:
   <meta name="viewport" content="width=device-width, initial-scale=1">
---------------------------------------------------------------- */

/* ----------------------------------------------------------------
   1. Tablet tier (581–1024px) — softer landing than the existing
   hard drop straight to 1 column at 820px for a few wide grids.
---------------------------------------------------------------- */
@media (max-width: 1024px) and (min-width: 581px) {
    .reports-dept-health,
    .reports-dept-grid,
    .reports-catalog-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ----------------------------------------------------------------
   2. Forms/grids that had no mobile collapse at all.
   These are floor-facing (shift posting, dispatch, invoices,
   certificates) so getting them right on phones matters most.
---------------------------------------------------------------- */
@media (max-width: 580px) {
    /* Shift posting — used by production supervisors on phones */
    .shift-entry-form { grid-template-columns: 1fr; }
    .shift-conversion { grid-template-columns: repeat(2, 1fr); }

    /* Production run assignment facts (machine/mold/input material) */
    .production-assignment-grid { grid-template-columns: 1fr; }
    .production-assignment-grid > div { border-right: 0; }

    /* Dispatch truck fields */
    .dispatch-vehicle-fields { grid-template-columns: 1fr; }
    .dispatch-vehicle-fields label:last-child { grid-column: auto; }

    /* Reports KPI strips — were stuck at 2-col down to 320px */
    .reports-kpi-grid,
    .reports-kpi-grid-compact,
    .reports-catalog-kpis { grid-template-columns: 1fr; }

    /* Credit aging summary cards */
    .credit-aging-summary { grid-template-columns: 1fr; }

    /* Invoice / batch certificate — customer-facing via share links,
       likely opened on a phone */
    .invoice-totals { grid-template-columns: 1fr; }
    .invoice-total-block { width: 100%; }
    .batch-certificate-grid { grid-template-columns: 1fr; }

    /* GI summary strip cards */
    .gi-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Sales entry drawer — go full-width instead of 88vw on small phones */
    .sales-entry-modal .modal-card,
    body.erp-theme .sales-entry-modal .modal-card {
        width: 100vw !important;
    }
}

/* ----------------------------------------------------------------
   3. Toolbar/search overflow guards.
   Fixed-width search boxes can push wider than a 320–375px viewport.
---------------------------------------------------------------- */
@media (max-width: 580px) {
    .search-box,
    .inventory-toolbar-primary .search-box {
        width: 100%;
        max-width: none;
    }
    .toolbar-right {
        flex-wrap: wrap;
        row-gap: 6px;
    }
    .table-toolbar {
        height: auto;
        flex-wrap: wrap;
        row-gap: 8px;
    }
}

/* ----------------------------------------------------------------
   4. Touch targets. WCAG/Apple HIG recommend ≥44px hit areas —
   several buttons/inputs sit at 27–34px, fine for a mouse, tight
   for a thumb on the factory floor.
---------------------------------------------------------------- */
@media (max-width: 820px) {
    .button,
    .payment-action-primary,
    .payment-action-secondary,
    .quick-action-button,
    .record-command-bar button,
    .entry-command-bar button {
        min-height: 44px;
    }
    .form-grid input,
    .form-grid select,
    .shift-entry-form input,
    .shift-entry-form select,
    .payment-confirm-form input,
    .payment-confirm-form select,
    .tab-fields input,
    .tab-fields select {
        min-height: 42px;
    }
    .nav a,
    .sidebar-footer a {
        min-height: 46px;
    }
    .dispatch-check input,
    .dispatch-final-check input {
        width: 20px !important;
        height: 20px !important;
    }
}

/* ----------------------------------------------------------------
   5. Sidebar drawer sanity check.
   Your CSS already has `.sidebar{transform:translateX(-100%)}` and
   `.sidebar.is-open{transform:translateX(0)}` under max-width:820px,
   plus `.menu-toggle` styling. That mechanism only works if layout.php
   renders a toggle button and app.js toggles `.is-open` + locks body
   scroll. If clicking the hamburger does nothing on mobile, that JS
   wiring is the missing piece — send layout.php/app.js and I'll wire it.
---------------------------------------------------------------- */
@media (max-width: 820px) {
    body.sidebar-open { overflow: hidden; }
}


/* ============================================================
   PET360 ERP — RMS360-style Scale Layer
   Load AFTER erp-professional.css and responsive-patches.css.
   This file changes SIZE, WEIGHT, and SPACING only.
   It never sets color, background, or layout structure —
   your sidebar, brand palette, and Katana green stay untouched.
   ============================================================ */

/* ---- 1. Base type scale ---- */
body:not(.login-page) {
    font-size: 16px !important;
    line-height: 1.5 !important;
}
h1, h2, h3 { font-weight: 700 !important; letter-spacing: -.2px !important; }

.topbar h1,
.workspace-title h2,
.module-heading h2 {
    font-size: 26px !important;
    font-weight: 700 !important;
}
.breadcrumb,
.workspace-title p,
.module-heading p {
    font-size: 13px !important;
}

/* ---- 2. Modal / drawer headings ---- */
.modal-header h2,
.workflow-header h2,
.production-run-header h2,
.shift-posting-header h2,
.payment-confirm-header h2,
.dispatch-confirm-header h2,
.reject-review-header h2,
.product-detail-title h2,
.cashier-close-popup-header h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
}
.modal-header p,
.workflow-header p,
.production-run-header p,
.shift-posting-header p,
.payment-confirm-header p,
.dispatch-confirm-header p,
.product-detail-title p {
    font-size: 13px !important;
}
.record-type,
.dialog-status,
.reports-panel-eyebrow,
.eyebrow,
.settings-kicker,
.nav-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
}

/* ---- 3. KPI / metric numbers — the big bold "237,524.00" look ---- */
.metric-card > strong,
.department-summary strong,
.production-kpis strong,
.payment-kpi strong,
.product-stat-card strong,
.customer-stat-card strong,
.sales-stat-card strong,
.inventory-stat-card strong,
.reports-kpi-value,
.report-card strong,
.reports-catalog-kpi strong,
.settings-stat-grid strong,
.cashier-close-summary strong,
.cashier-report-summary strong,
.exception-tile strong,
.gi-summary-cell strong,
.big-number strong,
.reject-kpi strong,
.donut strong {
    font-size: 30px !important;
    font-weight: 700 !important;
    letter-spacing: -.5px !important;
}
.department-summary span, .department-summary small,
.production-kpis span, .production-kpis small,
.payment-kpi span, .payment-kpi small,
.product-stat-card span, .product-stat-card small,
.customer-stat-card span, .customer-stat-card small,
.sales-stat-card span, .sales-stat-card small,
.inventory-stat-card span, .inventory-stat-card small,
.reports-kpi-label, .reports-kpi-detail,
.settings-stat-grid span, .settings-stat-grid small,
.cashier-close-summary span, .cashier-close-summary small,
.gi-summary-cell span, .gi-summary-cell small,
.reject-kpi span, .reject-kpi small {
    font-size: 12px !important;
    font-weight: 600 !important;
}
.metric-card, .department-summary article, .production-kpis article,
.reject-kpi, .exception-tile, .gi-summary-cell,
.reports-kpi-card, .report-card, .settings-stat-grid article {
    padding: 18px 20px !important;
}

/* ---- 4. Tables — bigger rows, bolder headers, dark text ---- */
th, td,
.erp-grid-panel table th, .erp-grid-panel table td,
.data-panel table th, .data-panel table td,
.gi-grid thead th, .gi-grid tbody td,
.reports-table thead th, .reports-table tbody td,
.detail-table-wrap th, .detail-table-wrap td,
.cashier-close-table th, .cashier-close-table td,
.cashier-report-table th, .cashier-report-table td,
.settings-user-table th, .settings-user-table td,
.settings-template-table th, .settings-template-table td,
.sales-line-table th, .sales-line-table td,
.order-lines-panel th, .order-lines-panel td,
.stores-shift-table th, .stores-shift-table td,
.inventory-group-lines th, .inventory-group-lines td {
    font-size: 14px !important;
    padding: 12px 14px !important;
}
th, thead th,
.erp-grid-panel table th, .data-panel table th, .gi-grid thead th,
.reports-table thead th, .detail-table-wrap th,
.cashier-close-table th, .settings-user-table th, .sales-line-table th {
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--erp-text, #202624) !important;
}
td strong, .data-panel table td strong { font-weight: 700 !important; }
.data-panel table td { height: 52px !important; }
.gi-grid tbody td { height: 40px !important; }
.cell-sub { font-size: 11px !important; }

/* ---- 5. Buttons — bigger, bolder, rounder ---- */
.button,
.payment-action-primary, .payment-action-secondary,
.quick-action-button,
.record-command-bar button,
.entry-command-bar button,
.reports-action-btn,
.gi-tool-btn {
    min-height: 44px !important;
    padding: 0 18px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}
.button-small { min-height: 34px !important; padding: 0 12px !important; font-size: 12px !important; }

/* ---- 6. Form inputs — bigger, clearer ---- */
.form-grid input, .form-grid select, .form-grid textarea, .form-stack input,
.shift-entry-form input, .shift-entry-form select, .shift-entry-form textarea,
.payment-confirm-form input, .payment-confirm-form select, .payment-confirm-form textarea,
.workflow-action-form input, .workflow-action-form select, .workflow-action-form textarea,
.tab-fields input, .tab-fields select, .tab-fields textarea,
.gi-param-field input {
    min-height: 44px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
}
.form-grid label, .form-stack label,
.shift-entry-form label, .payment-confirm-form label,
.workflow-action-form label, .tab-fields label {
    font-size: 13px !important;
    font-weight: 600 !important;
}
.field-hint, .field-hint-inline { font-size: 12px !important; }

/* ---- 7. Badges — a touch bigger, bolder ---- */
.badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
}

/* ---- 8. Cards — softer, roomier ---- */
.panel, .erp-widget, .erp-grid-panel, .report-card, .reports-panel,
.product-hero-card, .customer-hero-card, .inventory-hero-card, .sales-hero-card,
.modal-card, .gi-inquiry, .gi-grid-block {
    border-radius: 10px !important;
}
.panel { padding: 22px !important; }
.record-command-bar, .table-toolbar { min-height: 52px !important; }

/* ---- 9. Sidebar/topbar text only (no color/layout changes) ---- */
.nav a, .sidebar-footer a { font-size: 14px !important; font-weight: 600 !important; }
.global-brand strong { font-size: 19px !important; }
.global-user span strong { font-size: 13px !important; }

/* ---- 10. Exclude print-format documents from the scale-up ----
   Invoices, sales orders, production sheets, and batch certificates
   are laid out to fixed physical page sizes (A4/thermal) — inflating
   their type would break pagination. Left as-is intentionally. */