/* BizCore V271.5.32 — Master Data register consistency.
   Pricing/Customers global tokens. Scope: suppliers, products, employees, units, categories.
   No changes to sorting, Firebase, form fields, buttons' existing handlers or pagination. */
@media (min-width:761px) {
  html body #page-masters .masters-tab-content.bc-master-register-standard.active > .card {
    min-width:0;min-height:0;display:flex;flex-direction:column;
    gap:0;background:transparent;border:0;box-shadow:none;overflow:visible;
  }
  html body #page-masters .bc-master-register-standard .bc-master-directory-heading {
    flex:0 0 auto;min-height:40px;padding:7px 12px;box-sizing:border-box;
    background:#fff!important;border:1px solid #e1e7ef!important;border-radius:9px!important;
    margin-bottom:var(--bc-ui-panel-gap,5px)!important;
    display:flex;align-items:center;
  }
  html body #page-masters .bc-master-register-standard .bc-master-directory-heading h3 {
    font-size:14px!important;font-weight:500!important;letter-spacing:0!important;
    line-height:1.35!important;color:var(--bc-ui-input-text,#334155)!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-directory-heading .employee-master-subtitle,
  html body #page-masters .bc-master-register-standard .bc-master-directory-heading .uom-master-subtitle {
    font-size:12px!important;font-weight:400!important;color:#64748b!important;
    line-height:1.35!important;margin:2px 0 0!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar {
    display:flex!important;flex:0 0 auto!important;align-items:center;gap:7px;
    width:100%;min-width:0;box-sizing:border-box;
    height:var(--bc-ui-toolbar-height,48px);min-height:var(--bc-ui-toolbar-height,48px);
    padding:0 10px!important;margin:0 0 var(--bc-ui-panel-gap,5px)!important;
    border:1px solid var(--c-c9d9e8,#c9d9e8)!important;border-radius:9px!important;
    background:var(--c-edf5ff,#edf5ff)!important;box-shadow:0 1px 2px rgba(24,44,75,.045)!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar :is(input[type=text],input[type=search], select) {
    height:var(--bc-ui-control-height,34px)!important;min-height:var(--bc-ui-control-height,34px)!important;
    font-size:var(--bc-ui-control-font,13px)!important;font-weight:400!important;
    color:var(--bc-ui-input-text,#334155)!important;background:var(--bc-ui-input-background,#f8fafc)!important;
    border:1px solid var(--bc-ui-input-border,#cbd5e1)!important;border-radius:7px!important;
    box-shadow:none!important;box-sizing:border-box!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar :is(#sup-search,#prod-search-filter,#emp-search,#uom-search,#cat-search) {
    flex:1 1 200px!important;width:auto!important;min-width:130px;max-width:420px;
    padding:0 11px!important;margin:0!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .cm-search {
    flex:1 1 200px;max-width:420px;min-width:130px;margin:0!important;
    border:0!important;box-shadow:none!important;background:transparent!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .cm-search input {
    width:100%!important;max-width:none!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar :is(.bc-master-sort-label,.uom-count) {
    font-size:13px!important;font-weight:400!important;color:#64748b!important;white-space:nowrap;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-sort {
    flex:0 0 155px!important;width:155px!important;min-width:140px;padding:0 9px!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-toolbar-actions {
    margin-left:auto;display:flex;gap:7px;align-items:center;flex:0 0 auto;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-icon-action {
    width:var(--bc-ui-control-height,34px)!important;min-width:var(--bc-ui-control-height,34px)!important;
    height:var(--bc-ui-control-height,34px)!important;padding:0!important;
    display:inline-flex;align-items:center;justify-content:center;
    color:#64748b!important;background:var(--bc-ui-input-background,#f8fafc)!important;
    border:1px solid var(--bc-ui-input-border,#cbd5e1)!important;border-radius:7px!important;box-shadow:none!important;
    position:relative;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-icon-action[title^="Import"] i {color:#15803d!important;}
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-icon-action:disabled {opacity:.48;cursor:default;}
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-icon-action .bc-master-selected-count:not(:empty) {
    position:absolute;top:-7px;right:-6px;padding:1px 4px;border-radius:9px;
    background:#e7eef8;color:#334155;font-size:10px;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-create {
    height:var(--bc-ui-control-height,34px)!important;min-height:var(--bc-ui-control-height,34px)!important;
    padding:0 12px!important;margin:0!important;white-space:nowrap;
    font-size:var(--bc-ui-control-font,13px)!important;font-weight:500!important;border-radius:7px!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .cat-filters {
    display:flex;gap:6px;align-items:center;flex:0 1 auto;min-width:0;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .cat-filters :is(button,label) {
    font-size:13px!important;font-weight:400!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll {
    min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;
    scrollbar-width:thin;scrollbar-color:#9aa8b8 #f1f5f9;
    box-sizing:border-box;position:relative;border:1px solid var(--c-c9d9e8,#c9d9e8)!important;
    border-radius:9px!important;background:#fff!important;flex:1 1 auto;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll table {
    width:100%;border-collapse:separate!important;border-spacing:0!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll thead th {
    position:sticky!important;top:0!important;z-index:5!important;
    height:var(--bc-ui-header-height,39px)!important;
    background:var(--c-eaf2f9,#eaf2f9)!important;
    color:var(--bc-ui-header-text,#475569)!important;
    font-size:var(--bc-ui-header-size,12px)!important;
    font-weight:var(--bc-ui-header-weight,500)!important;letter-spacing:.01em!important;
    border-left:0!important;border-right:0!important;
    border-bottom:1px solid #cbd5e1!important;box-shadow:0 1px 0 #cbd5e1!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll thead th:last-child,
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll tbody td:last-child {padding-right:24px!important;}
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll thead th:last-child {border-top-right-radius:8px;}
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll tbody td {
    color:var(--bc-ui-row-color,#111827)!important;
    font-size:var(--bc-ui-row-font,14px)!important;font-weight:400!important;
    border-left:0!important;border-right:0!important;border-bottom:1px solid #e8edf3!important;
  }
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll tbody td :is(strong,b) {font-weight:400!important;}
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll tbody td small {font-size:11px!important;font-weight:400!important;color:#718096!important;}
  html body #page-masters .bc-master-register-standard .rows-per-page-bar {
    flex:0 0 auto;margin-top:5px;background:#fff;border:1px solid #e1e7ef;border-radius:8px;
  }
  /* Keep forms and category explanatory notes usable as independent module content. */
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll::-webkit-scrollbar {width:10px;height:10px;}
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll::-webkit-scrollbar-track {background:#f1f5f9;border-radius:9px;}
  html body #page-masters .bc-master-register-standard .bc-master-register-table-scroll::-webkit-scrollbar-thumb {background:#9aa8b8;border:2px solid #f1f5f9;border-radius:9px;}
}
@media (min-width:1101px) {
  html body .content:has(> #page-masters.active :is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active) {overflow:hidden!important;min-height:0!important;}
  html body #page-masters.active:has(:is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active) {
    display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;overflow:hidden!important;
  }
  html body #page-masters.active:has(:is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active) > .masters-shell {
    display:grid!important;flex:1 1 auto!important;height:100%!important;min-height:0!important;overflow:hidden!important;
  }
  html body #page-masters.active .masters-workspace:has(:is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active) {height:100%!important;min-height:0!important;overflow:hidden!important;}
  html body #page-masters.active :is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active {
    display:flex!important;flex-direction:column!important;min-height:0!important;height:100%!important;
  }
  html body #page-masters.active :is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active > .card {
    flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;
  }
  html body #page-masters.active :is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active .bc-master-register-table-scroll {
    flex:1 1 auto!important;min-height:0!important;
  }
  /* When inline editor opens, allow its form to scroll in the workspace instead of clipping. */
  html body #page-masters.active :is(#masters-tab-suppliers,#masters-tab-products,#masters-tab-employees).bc-master-register-standard.active:has(.bc-master-inline-form-open) > .card {
    overflow:auto!important;
  }
}
@media (min-width:761px) and (max-width:1350px) {
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar {height:auto;min-height:48px;flex-wrap:wrap;padding:7px 9px!important;}
  html body #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-toolbar-actions {margin-left:auto;}
}
@media (max-width:760px) {
  #page-masters .bc-master-register-standard .bc-master-register-toolbar {display:flex;flex-wrap:wrap;gap:7px;padding:9px;border:1px solid var(--c-c9d9e8,#c9d9e8);border-radius:9px;background:var(--c-edf5ff,#edf5ff);margin-bottom:5px;}
  #page-masters .bc-master-register-standard .bc-master-register-toolbar :is(input,select) {min-height:34px;font-size:13px;font-weight:400;}
  #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-toolbar-actions {display:flex;flex-wrap:wrap;gap:6px;}
  #page-masters .bc-master-register-standard .bc-master-register-toolbar .bc-master-icon-action {min-width:34px;min-height:34px;}
  #page-masters .bc-master-register-standard .bc-master-register-table-scroll {overflow-x:auto;border-radius:9px;}
}
/* Inline editors remain visible: do not clip their forms or bottom actions. */
@media (min-width:1101px) {
  html body #page-masters.active .bc-master-register-standard.active:is(#masters-tab-units,#masters-tab-categories) > .card {overflow:auto!important;}
  html body #page-masters.active .bc-master-register-standard.active:is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll {flex:0 0 auto!important;max-height:calc(100dvh - 320px)!important;min-height:120px!important;}
  html body #page-masters.active #masters-tab-employees.active:has(#employee-form-panel:not([style*="display:none"])) > .card {overflow:auto!important;}
  html body #page-masters.active #masters-tab-employees.active:has(#employee-form-panel:not([style*="display:none"])) .bc-master-register-table-scroll {flex:0 0 auto!important;max-height:340px!important;}
}

/* V271.5.34 — UOM and Category layout alignment.
   The legacy table.cm-table rule in main.css uses width:auto!important and
   side margins; restore the full-width Pricing/Customers register contract.
   Scope is deliberately limited to these two Master Data tables. */
@media (min-width:761px) {
  html body #page-masters #masters-tab-units .bc-master-register-table-scroll,
  html body #page-masters #masters-tab-categories .bc-master-register-table-scroll {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;
    overflow-x:auto!important;
    overflow-y:auto!important;
    border-radius:9px!important;
    background:#fff!important;
  }
  html body #page-masters #masters-tab-units .bc-master-register-table-scroll > table.cm-table,
  html body #page-masters #masters-tab-categories .bc-master-register-table-scroll > table.cm-table {
    display:table!important;
    width:100%!important;
    min-width:790px!important;
    max-width:none!important;
    margin:0!important;
    border-spacing:0!important;
    border-collapse:separate!important;
    table-layout:auto!important;
  }
  html body #page-masters #masters-tab-units .bc-master-register-table-scroll > table.cm-table th,
  html body #page-masters #masters-tab-categories .bc-master-register-table-scroll > table.cm-table th {
    font-size:var(--bc-ui-header-size,12px)!important;
    font-weight:var(--bc-ui-header-weight,500)!important;
    height:var(--bc-ui-header-height,39px)!important;
    padding:8px 12px!important;
    background:var(--c-eaf2f9,#eaf2f9)!important;
    color:var(--bc-ui-header-text,#475569)!important;
  }
  html body #page-masters #masters-tab-units .bc-master-register-table-scroll > table.cm-table td,
  html body #page-masters #masters-tab-categories .bc-master-register-table-scroll > table.cm-table td {
    font-family:var(--bc-font,Inter,'Segoe UI',Roboto,Arial,sans-serif)!important;
    font-size:var(--bc-ui-row-font,14px)!important;
    font-weight:400!important;
    padding:8px 12px!important;
    line-height:1.4!important;
    color:var(--bc-ui-row-color,#111827)!important;
  }
  html body #page-masters #masters-tab-units .bc-master-register-table-scroll > table.cm-table th:last-child,
  html body #page-masters #masters-tab-units .bc-master-register-table-scroll > table.cm-table td:last-child,
  html body #page-masters #masters-tab-categories .bc-master-register-table-scroll > table.cm-table th:last-child,
  html body #page-masters #masters-tab-categories .bc-master-register-table-scroll > table.cm-table td:last-child {
    padding-right:24px!important;
  }
  html body #page-masters #masters-tab-units .bc-master-register-toolbar,
  html body #page-masters #masters-tab-categories .bc-master-register-toolbar {
    width:100%!important;
    box-sizing:border-box!important;
  }
  /* Preserve the editor/merge form visibility when these pages scroll. */
  html body #page-masters #masters-tab-units .uom-form-panel,
  html body #page-masters #masters-tab-categories .uom-form-panel {
    flex:0 0 auto;
  }
}
@media (max-width:760px) {
  #page-masters #masters-tab-units .bc-master-register-table-scroll > table.cm-table,
  #page-masters #masters-tab-categories .bc-master-register-table-scroll > table.cm-table {
    min-width:790px!important;
    width:100%!important;
    margin:0!important;
  }
}

/* V271.5.34.1 — Pricing-standard typography for Units of Measure and Categories.
   Scope ONLY the two master table registers; preserve semantic badge colors,
   action handlers, calculations, layout, and mobile overflow. */
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table {
  font-family:var(--bc-font,Inter,'Segoe UI',Roboto,Arial,sans-serif)!important;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table thead th {
  font-family:var(--bc-font,Inter,'Segoe UI',Roboto,Arial,sans-serif)!important;
  font-size:var(--bc-ui-header-size,12px)!important;
  font-weight:var(--bc-ui-header-weight,500)!important;
  color:var(--bc-ui-header-text,#475569)!important;
  letter-spacing:.01em!important;
  line-height:1.4!important;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody td {
  font-family:var(--bc-font,Inter,'Segoe UI',Roboto,Arial,sans-serif)!important;
  font-size:var(--bc-ui-row-font,14px)!important;
  font-weight:400!important;
  color:var(--bc-ui-row-color,#111827)!important;
  line-height:1.4!important;
}
/* Small status and Used-for pills remain semantic; normalize only type sizing. */
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table :is(.cm-st,.cm-badge,.cm-pill,.uom-used-badge,.cm-dup) {
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.35!important;
}
/* The legacy cm-table .cm-ab !important declaration previously kept Merge/Edit/Delete tiny. */
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table .cm-ab {
  font-family:inherit!important;
  font-size:var(--bc-ui-control-font,13px)!important;
  font-weight:400!important;
  line-height:1.35!important;
  padding:5px 9px!important;
  min-height:30px;
  border-radius:7px!important;
  box-sizing:border-box;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table .cm-acts {
  align-items:center;
  gap:5px;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-toolbar :is(.cat-filters button,.cat-filters label,.uom-count) {
  font-family:var(--bc-font,Inter,'Segoe UI',Roboto,Arial,sans-serif)!important;
  font-size:var(--bc-ui-control-font,13px)!important;
  font-weight:400!important;
}


/* V271.5.34.2 — UOM/Category badge and inline-action readability.
   Preserve badges' semantic tones, existing handlers, dimensions of table and data. */
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody :is(.bcm-type,.bcm-type.svc,.bcm-type.both,.cm-st,.cm-st.off,.cm-dup) {
  font-family:var(--bc-font,Inter,'Segoe UI',Roboto,Arial,sans-serif)!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.45!important;
  letter-spacing:0!important;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .bcm-type {
  display:inline-flex;align-items:center;
  padding:4px 10px!important;
  border-radius:8px!important;
  background:#eef2f6; color:#475569;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .bcm-type.svc {background:#f3e8ff;color:#6b21a8;}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .bcm-type.both {background:#e0f2fe;color:#0369a1;}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-st {
  display:inline-flex;align-items:center;
  background:#eaf7ee; color:#166534;
  border-radius:8px;padding:4px 9px!important;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-st.off {background:#eef2f6;color:#64748b;}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-dup {padding:3px 8px!important;}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-acts {
  display:inline-flex;gap:7px;justify-content:flex-end;align-items:center;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-acts .cm-ab {
  font-family:var(--bc-font,Inter,'Segoe UI',Roboto,Arial,sans-serif)!important;
  font-size:13px!important;font-weight:400!important;
  line-height:1.35!important;letter-spacing:0!important;
  min-height:34px!important;padding:7px 11px!important;
  border-radius:7px!important;
  border:1px solid #cbd5e1!important;background:#f8fafc!important;color:#334155!important;
  white-space:nowrap;box-sizing:border-box;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-acts .cm-ab:hover {
  background:#eff6ff!important;border-color:#93b4d6!important;color:#1e4d75!important;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-acts .cm-ab.del {
  border-color:#fecaca!important;background:#fffafa!important;color:#b91c1c!important;
}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody .cm-acts .cm-ab.del:hover {background:#fef2f2!important;}
html body #page-masters :is(#masters-tab-units,#masters-tab-categories) .bc-master-register-table-scroll > table.cm-table tbody td {
  padding-top:7px!important;padding-bottom:7px!important;
}
