/* BELTZHOLF UX-25 v17.1 — one modern shell for all ERP modules and local tabs. */
:root{--bz25-navy:#102858;--bz25-blue:#2563eb;--bz25-ink:#1d3049;--bz25-soft:#607695;--bz25-edge:#e1e9f5;--bz25-bg:#f5f8fd;--bz25-rail:226px;--bz25-top:66px}
body.bz25-on{background:var(--bz25-bg)!important;color:var(--bz25-ink)}
body.bz25-on .bz25-native-header{display:none!important}
#bz25Shell{position:relative;z-index:1000;font-family:"Segoe UI",system-ui,Arial,sans-serif;color:var(--bz25-ink)}
#bz25Shell *,#bz25Shell *::before,#bz25Shell *::after{box-sizing:border-box}
#bz25Shell a{color:inherit;text-decoration:none}
#bz25Shell button{font-family:inherit;cursor:pointer}
#bz25Shell [hidden]{display:none!important}
.bz25-top{position:sticky;top:0;z-index:1003;height:var(--bz25-top);width:100%;background:#fff;display:flex;align-items:center;gap:16px;padding:0 20px;border-bottom:1px solid var(--bz25-edge);box-shadow:0 3px 12px #1934590b}
.bz25-brand{display:flex;align-items:center;gap:9px;min-width:170px;color:#152a47!important;font-size:15px;letter-spacing:.2px;white-space:nowrap}
.bz25-mark{height:34px;width:34px;display:grid;place-items:center;border-radius:10px;object-fit:cover;background:#0c2557;box-shadow:0 3px 11px #1f60b628}
.bz25-menu{height:37px;min-width:38px;padding:3px 11px;border:1px solid #d9e4f3;border-radius:9px;background:#f8faff;color:#315c90;font-size:18px}
.bz25-menu:hover,.bz25-top-actions button:hover,.bz25-home:hover{background:#edf5ff}
.bz25-breadcrumb{min-width:0;display:flex;gap:8px;align-items:center;flex:1;white-space:nowrap;overflow:hidden;font-size:12px;color:#6b7f9c}
.bz25-breadcrumb a:hover{color:#215fc7!important}
.bz25-breadcrumb b{color:#253b5a;text-overflow:ellipsis;overflow:hidden;font-size:13px}
.bz25-top-actions{display:flex;align-items:center;gap:9px}
.bz25-search,.bz25-home{font-size:12px;font-weight:750;color:#355879!important;white-space:nowrap;border:1px solid #dce6f4;background:#f8faff;border-radius:10px;padding:9px 12px;display:flex;align-items:center;gap:8px;min-height:38px}
.bz25-search kbd{border:1px solid #dfe5f1;border-radius:5px;background:#fff;padding:2px 5px;font-size:10px;color:#71829e}
.bz25-rail{position:fixed;z-index:1002;top:var(--bz25-top);left:0;bottom:0;width:var(--bz25-rail);background:#fff;border-right:1px solid var(--bz25-edge);overflow:auto;padding:14px 10px 28px;box-shadow:4px 0 16px #172e4907;scrollbar-width:thin}
.bz25-rail-home{display:block;padding:11px 12px;border-radius:10px;background:#edf4ff;color:#235baf!important;font-weight:800;font-size:12px;margin-bottom:16px}
.bz25-rail-intro{padding:2px 10px 12px;display:grid;gap:5px}
.bz25-rail-overline{font-size:10px;font-weight:800;letter-spacing:.12em;color:#7c8eaa}
.bz25-rail-intro strong{font-size:15px;line-height:1.3}
.bz25-nav-section{display:grid;gap:2px;padding:10px 0;border-top:1px solid #e7eef8}
.bz25-nav-section>span{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8796ac;margin:6px 10px}
#bz25Shell .bz25-nav-link{display:block;padding:10px 11px;line-height:1.4;font-size:12px;font-weight:650;border-radius:9px;color:#516780;overflow-wrap:anywhere}
#bz25Shell .bz25-nav-link:hover{background:#f3f7ff;color:#245fc2}
#bz25Shell .bz25-nav-link.bz25-current{border-left:3px solid #2764e8;background:#ebf2ff;color:#1c52af;font-weight:850}
#bz25Shell .bz25-nav-overview{font-weight:800;margin:4px 0 6px}
body.bz25-module>main,body.bz25-module>.wrap,body.bz25-module>.shell,body.bz25-local>.shell{box-sizing:border-box;margin-left:var(--bz25-rail)!important;width:calc(100% - var(--bz25-rail))!important;max-width:none!important}
body.bz25-module>.wrap,body.bz25-module>main{padding:20px 24px!important;margin-right:0!important}
body.bz25-module>.shell{padding:0!important;margin-right:0!important}
body.bz25-module>.shell>main{max-width:none!important;width:100%!important}
body.bz25-local>header{display:none!important}
body.bz25-local>.shell{grid-template-columns:minmax(0,1fr)!important;min-height:calc(100vh - var(--bz25-top));margin-right:0!important}
body.bz25-local>.shell>aside{display:none!important}
body.bz25-local>.shell>main{padding:22px!important;max-width:none!important;width:100%!important}
body.bz25-local #bwLegacyBar{display:none!important}
body.bz25-on .card,body.bz25-on .panel{border-color:var(--bz25-edge);box-shadow:0 3px 18px #1d35540c}
body.bz25-on :is(input,select,textarea):focus-visible{outline:2px solid #3178ec;outline-offset:1px}
body.bz25-on :is(button,a):focus-visible{outline:3px solid #77a5ff;outline-offset:3px}
body.bz25-collapsed{--bz25-rail:0px}
body.bz25-collapsed .bz25-rail{display:none}
.bz25-shade{display:none}
.bz25-find{position:fixed;inset:0;z-index:1006;background:#071b36a1;display:grid;place-items:start center;padding:9vh 16px 20px}
.bz25-finder{width:min(640px,100%);max-height:78vh;background:#fff;box-shadow:0 22px 76px #07182f59;border:1px solid #d6e3f2;border-radius:18px;overflow:hidden;display:flex;flex-direction:column}
.bz25-find-head{display:flex;align-items:center;justify-content:space-between;padding:17px 20px 8px;font-size:14px;font-weight:850;color:#233d5f}
.bz25-find-head button{border:0;background:#f1f5fd;border-radius:8px;padding:7px 11px;color:#385b8a}
#bz25FindInput{width:calc(100% - 40px);margin:0 20px 13px;border:1px solid #cddcf1;border-radius:10px;background:#f8fbff;font-size:14px;min-height:43px;padding:10px 13px;color:#223c5b}
.bz25-filter{display:flex;gap:5px;padding:0 20px 12px;border-bottom:1px solid #e7edf6}
.bz25-filter button{border:1px solid #e0e8f4;background:#f7f9fd;border-radius:8px;padding:8px 12px;font-size:12px;font-weight:750;color:#536e91}
.bz25-filter button[aria-pressed="true"]{background:#e9f1ff;border-color:#aac9fa;color:#164fae}
.bz25-find-results{overflow:auto;padding:10px 14px;min-height:80px;scrollbar-width:thin}
.bz25-find-row{display:flex;gap:6px;align-items:center;min-height:51px;border-bottom:1px solid #eff3f9}
.bz25-find-row a{padding:9px 10px;border-radius:9px;flex:1;min-width:0;display:grid;gap:3px}
.bz25-find-row a[aria-selected="true"],.bz25-find-row a:hover{background:#edf4ff}
.bz25-find-row b{color:#243b59;font-size:13px;white-space:normal}
.bz25-find-row small{color:#788ca8;font-size:11px}
.bz25-find-row button{font-size:20px;color:#d08a00;border:0;background:transparent;padding:10px}
.bz25-empty{padding:18px;color:#6c7c95;font-size:13px}
.bz25-find-footer{padding:12px 20px;border-top:1px solid #e8edf6;font-size:11px;color:#77869e;background:#fafcff}
@media(max-width:1100px){.bz25-brand{min-width:150px}.bz25-top{gap:10px;padding:0 12px}.bz25-breadcrumb{font-size:11px}.bz25-search kbd{display:none}}
@media(max-width:900px){
 :root{--bz25-rail:0px}
 .bz25-rail{width:min(310px,86vw);transform:translateX(-105%);transition:transform .18s ease;z-index:1005;box-shadow:8px 0 36px #0c234c24}
 body.bz25-mobile-open .bz25-rail{transform:translateX(0)}
 body.bz25-mobile-open .bz25-shade{display:block;position:fixed;inset:var(--bz25-top) 0 0;z-index:1004;background:#071b3766}
 body.bz25-module>main,body.bz25-module>.wrap,body.bz25-module>.shell,body.bz25-local>.shell{margin-left:0!important;width:100%!important;max-width:none!important}
 .bz25-search span,.bz25-home span{display:none}
 .bz25-brand{min-width:auto}.bz25-breadcrumb{flex:1}
}
@media(max-width:600px){:root{--bz25-top:60px}.bz25-top{gap:6px;padding:0 8px}.bz25-brand{min-width:auto}.bz25-brand b{font-size:12px}.bz25-mark{width:30px;height:30px;border-radius:8px;font-size:16px}.bz25-menu{height:34px;min-width:33px;padding:2px 8px}.bz25-top-actions{gap:4px}.bz25-search,.bz25-home{padding:7px 8px;min-height:33px}.bz25-breadcrumb{gap:5px}.bz25-breadcrumb a:first-child,.bz25-breadcrumb span{display:none}.bz25-breadcrumb a.bz25-dept{display:none}.bz25-breadcrumb b{font-size:11px}.bz25-rail{top:60px}.bz25-find{padding-top:5vh}body.bz25-module>.wrap,body.bz25-module>main,body.bz25-local>.shell>main{padding:13px!important}}
@media(prefers-reduced-motion:reduce){.bz25-rail{transition:none}}

/* Eleven governance/reporting modules have a text-only legacy .top breadcrumb.
   It contains no operational buttons; the unified breadcrumb replaces it. */
body.bz25-module>div.top{display:none!important}
/* Master Catalogue has real Verified/Compare/Inventory controls in its old topbar.
   Preserve these as an in-tool action strip, rather than removing working buttons. */
body.bz25-module>div.topbar{margin:0 0 0 var(--bz25-rail)!important;max-width:none!important;width:calc(100% - var(--bz25-rail))!important;position:relative!important;top:auto!important;border:0!important;border-bottom:1px solid var(--bz25-edge)!important;border-radius:0!important;box-shadow:none!important;padding:9px 19px!important;min-height:54px!important;background:#fff!important;color:var(--bz25-ink)!important}
body.bz25-module>div.topbar>.brand{display:none!important}
body.bz25-module>div.topbar>.top-actions{margin-left:auto!important;display:flex;flex-wrap:wrap;gap:7px}
body.bz25-module>div.topbar .top-actions :is(button,a){color:#24558d!important;border:1px solid #d9e4f1!important;border-radius:9px!important;background:#f5f8ff!important;padding:9px 12px!important;font-size:12px!important;min-height:35px}
body.bz25-module>div.searchbar,body.bz25-module>div.layout{box-sizing:border-box;margin-left:var(--bz25-rail)!important;width:calc(100% - var(--bz25-rail))!important;max-width:none!important}
@media(max-width:900px){body.bz25-module>div.topbar,body.bz25-module>div.searchbar,body.bz25-module>div.layout{margin-left:0!important;width:100%!important}}
/* Avoid overflowing legacy four-column forms when unified contextual navigation
   reduces available content width. Layout-only: input names, event handlers and
   form submit/validation behavior are not modified. */
body.bz25-module .card{container-type:inline-size;min-width:0}
body.bz25-module .card :is(input,select,textarea){max-width:100%;min-width:0}
@container (max-width:700px){
 body.bz25-module .card>.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.bz25-module .card>.grid>.span2{grid-column:span 2!important}
}
@container (max-width:420px){
 body.bz25-module .card>.grid{grid-template-columns:minmax(0,1fr)!important}
 body.bz25-module .card>.grid>.span2,body.bz25-module .card>.grid>.span4{grid-column:1/-1!important}
}
@media(max-width:600px){.bz25-brand b{display:none}.bz25-brand{gap:0}}

/* UX-26 v17.2 — final single-mode shell hardening.
   Keep the shared header visible while scrolling long ERP forms. The shell's
   short wrapper cannot constrain sticky positioning. No ERP fields are moved. */
body.bz25-on{padding-top:var(--bz25-top)!important}
#bz25Shell .bz25-top{position:fixed;top:0;left:0;right:0;max-width:100%;}
/* Persisted desktop collapse must not hide the mobile menu drawer. */
@media(max-width:900px){body.bz25-collapsed .bz25-rail{display:block}}
/* Responsive tool headers: keep actions wrapping and never clip input panels. */
body.bz25-module :is(.hero,.toolbar,.top-actions){min-width:0}
body.bz25-module :is(.hero,.toolbar) :is(a,button){flex-shrink:0}
@media(max-width:600px){body.bz25-module .hero{flex-wrap:wrap}}

/* BELTZHOLF UX-27 v17.3 — SINGLE-MODE OPERATIONAL INTERIORS.
   Additive, CSS-only layer on UX-26. No forms, IDs, scripts, API calls,
   financial values, authorization, business states, or database mutations.
   Legibility and spacing are standardized inside inherited tool pages while
   retaining each module's semantic status colors and distinct transactions. */
body.bz25-module {
  --bz27-field-font: 13px;
  --bz27-label-font: 12px;
  --bz27-action-font: 12px;
  --bz27-tab-font: 12px;
  --bz27-table-font: 12px;
  --bz27-table-head-font: 11px;
  --bz27-muted-font: 12px;
  --bz27-control-border: #cbd9eb;
}
/* Legacy field captions often render at 9–10px. Match their readable scale
   without changing programmatic labels/associations or calculated values. */
body.bz25-module :is(.field,.form-field,.form-group,.formGroup) label,
body.bz25-module :is(.field-label,.form-label) {
  font-size:var(--bz27-label-font) !important;
  line-height:1.45;
  font-weight:650;
  overflow-wrap:anywhere;
}
/* Text-entry surfaces: protect native checkboxes, radio buttons, range,
   file pickers, hidden controls and native button inputs. */
body.bz25-module :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="submit"]):not([type="button"]),select,textarea) {
  font-size:var(--bz27-field-font) !important;
  line-height:1.45;
  max-width:100%;
}
body.bz25-module :is(.field,.form-field,.form-group,.formGroup) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),select) {
  min-height:39px;
}
/* Existing action semantics are preserved: no background/color overrides. */
body.bz25-module :is(.card,.toolbar,.hero,.tabs,.top-actions) :is(button,.btn),
body.bz25-module button.tab {
  font-size:var(--bz27-action-font) !important;
  line-height:1.4;
}
body.bz25-module :is(.tabs,[role="tablist"]) :is(button,.tab,[role="tab"]) {
  font-size:var(--bz27-tab-font) !important;
  min-height:37px;
  line-height:1.4;
}
/* Dense financial/data tables remain horizontally scrollable and their
   existing sticky heads, alignment, hidden columns, and amounts remain intact. */
body.bz25-module table :is(th,td) {
  font-size:var(--bz27-table-font) !important;
  line-height:1.48;
}
body.bz25-module table th {
  font-size:var(--bz27-table-head-font) !important;
  font-weight:700;
}
body.bz25-module :is(.tablewrap,.table-wrap,.table-scroll,.tableContainer) {
  max-width:100%;
  overscroll-behavior-x:contain;
}
body.bz25-module :is(.notice,.muted,.help-text,.helper-text,.hint) {
  font-size:var(--bz27-muted-font) !important;
  line-height:1.5;
}
/* Avoid a secondary 'legacy look' around data-entry surfaces, while retaining
   original hierarchy and the final UX-18–24 heading/metric tokens. */
body.bz25-module .card {
  border-radius:14px;
  min-width:0;
}
body.bz25-module :is(.toolbar,.hero,.tabs,.grid,.grid2,.itemrow) {
  min-width:0;
}
/* Scaled legibility must never force a horizontally clipped mobile form. */
@media (max-width:700px) {
  body.bz25-module :is(.tablewrap,.table-wrap,.table-scroll,.tableContainer) {
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  body.bz25-module :is(.field,.form-field,.form-group,.formGroup) {min-width:0;}
}

/* BELTZHOLF UX-28 v17.4 — Single-Mode Mobile Visual Acceptance.
   Scope only to responsive presentation. Do not rewrite ERP tables or remove
   financial/audit columns. Keep horizontal scrolling INSIDE its relevant card
   instead of widening the entire mobile page on narrow phones.
   Operational form and table DOM, handlers, data and permissions are untouched. */
@media (max-width: 900px) {
  body.bz25-module > main > .card:has(> table),
  body.bz25-module > .wrap > .card:has(> table) {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  body.bz25-module > main > .card:has(> table) > table,
  body.bz25-module > .wrap > .card:has(> table) > table {
    min-width: 100%;
    width: max-content;
  }
  /* Legacy tab rows must scroll by touch, rather than push an entire view
     sideways. The native tab buttons, labels and click handlers stay intact. */
  body.bz25-module .tabs {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
  }
}
@media (max-width: 400px) {
  /* Master Catalogue: the legacy filter panel has a 350px min-content
     requirement, which breaks 320px phones. Constrain its grid track only. */
  body.bz25-module .layout:has(> .filters) {
    grid-template-columns: minmax(0,1fr) !important;
    min-width: 0;
  }
  body.bz25-module .layout > .filters,
  body.bz25-module .layout > .filters :is(.filter-select,select,input) {
    max-width: 100%;
    min-width: 0;
  }
}
@media (max-width: 400px) {
  /* Master Catalogue's title and view buttons cannot share a 320px row. */
  body.bz25-module .catalogue-head:has(> .view-tabs) {
    flex-wrap: wrap;
    min-width: 0;
  }
  body.bz25-module .catalogue-head > .view-tabs { max-width: 100%; }
}
