/* ZEHNPro runtime font + grid typography from /settings/ui-settings
   Loaded last in admin/public layouts. Non-serif only. */
:root{
  --zp-ui-font-family: "72 Brand Variable", Arial, Helvetica, sans-serif;
  --zp-ui-font-size: 16px;
  --zp-ui-line-height: 24px;
  --zp-ui-body-font-weight: 400;
  --zp-ui-section-font-size: 18px;
  --zp-ui-title-font-size: 28px;
  --zp-ui-title-line-height: 34px;
  --zp-ui-title-font-weight: 500;
  --zp-grid-font-size: 14px;
  --zp-grid-line-height: 20px;
  --zp-grid-body-font-weight: 400;
  --zp-grid-header-font-weight: 600;
  --zp-grid-title-font-size: 14px;
  --zp-grid-title-font-weight: 700;
  --zp-grid-subtitle-font-size: 12px;
  --zp-grid-subtitle-font-weight: 500;
  --zp-text: rgb(34,53,72);
}
html,body,
body :where(input,select,textarea,button,label,a,span,strong,small,p,div,section,article,nav,header,footer,main,table,thead,tbody,tr,th,td,h1,h2,h3,h4,h5,h6){
  font-family: var(--zp-ui-font-family) !important;
}
body{font-size:var(--zp-ui-font-size)!important;line-height:var(--zp-ui-line-height)!important;font-weight:var(--zp-ui-body-font-weight)!important;color:var(--zp-text)!important;-webkit-font-smoothing:antialiased;text-rendering:geometricPrecision;}
h1,.h1,.page-title,.module-title,.erp-module-title,.module-hero h1,.zp-content-hero h1,.ui-settings-hero h1{font-size:var(--zp-ui-title-font-size);line-height:var(--zp-ui-title-line-height);font-weight:var(--zp-ui-title-font-weight)!important;}
h2,.h2,.panel-title-row h2,.section-title,.card-title{font-size:var(--zp-ui-section-font-size);line-height:24px;font-weight:500!important;}

/* Settings page must immediately show the selected non-serif UI */
.ui-settings-page,.ui-settings-page *{font-family:var(--zp-ui-font-family)!important;}
.ui-settings-page :is(input,select,textarea,button){font-family:var(--zp-ui-font-family)!important;}
.ui-settings-page .ui-form-grid label > span,.ui-settings-page .module-picker-card label span{font-weight:600!important;}
.ui-settings-page .ui-form-grid :is(input,select,textarea),.ui-settings-page .module-picker-card select{font-weight:500!important;}

/* Broad grid standard: Purchasing, Inventory, Sales, Finance, Accounting,
   Merchandising, Fixed Asset, POS, Repair Desk, Payroll, Human Capital,
   e-Commerce, shared tables, Tabulator, DataTables, GridJS and AG Grid. */
.table,.table *,
table.dataTable,table.dataTable *,
.dataTables_wrapper,.dataTables_wrapper *,
.tabulator,.tabulator *,
.gridjs-container,.gridjs-container *,
.ag-root-wrapper,.ag-root-wrapper *,
.ag-theme-alpine,.ag-theme-alpine *,
.erp-grid,.erp-grid *,
.module-grid,.module-grid *,
.zp-grid,.zp-grid *,
.report-grid,.report-grid *,
.product-grid,.product-grid *,
.inventory-grid,.inventory-grid *,
.purchasing-grid,.purchasing-grid *,
.sales-grid,.sales-grid *,
.finance-grid,.finance-grid *,
.accounting-grid,.accounting-grid *,
.merchandising-grid,.merchandising-grid *,
.fixed-asset-grid,.fixed-asset-grid *,
.pos-grid,.pos-grid *,
.repair-desk-grid,.repair-desk-grid *,
.payroll-grid,.payroll-grid *,
.human-capital-grid,.human-capital-grid *,
.ecommerce-grid,.ecommerce-grid *{
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-grid-font-size)!important;
  line-height:var(--zp-grid-line-height)!important;
  font-weight:var(--zp-grid-body-font-weight)!important;
}
.table thead th,
table.dataTable thead th,
.dataTables_wrapper thead th,
.tabulator .tabulator-header .tabulator-col,
.tabulator .tabulator-header .tabulator-col-title,
.gridjs-th,
.ag-header-cell,.ag-header-cell-label,.ag-header-cell-text,
.erp-grid-header,.grid-header,.module-grid-header{
  font-size:var(--zp-grid-font-size)!important;
  line-height:var(--zp-grid-line-height)!important;
  font-weight:var(--zp-grid-header-font-weight)!important;
}
.table :is(.product-name,.item-name,.docno,.doc-no,.grid-title,.cell-title,.title,.name,.fw-bold,.text-bold),
.tabulator-cell :is(.product-name,.item-name,.docno,.doc-no,.grid-title,.cell-title,.title,.name,.fw-bold,.text-bold),
.gridjs-td :is(.product-name,.item-name,.docno,.doc-no,.grid-title,.cell-title,.title,.name,.fw-bold,.text-bold),
.ag-cell :is(.product-name,.item-name,.docno,.doc-no,.grid-title,.cell-title,.title,.name,.fw-bold,.text-bold),
.erp-grid :is(.product-name,.item-name,.docno,.doc-no,.grid-title,.cell-title,.title,.name,.fw-bold,.text-bold){
  font-size:var(--zp-grid-title-font-size)!important;
  line-height:var(--zp-grid-line-height)!important;
  font-weight:var(--zp-grid-title-font-weight)!important;
}
.table :is(.product-code,.sku,.barcode,.meta,.sub-title,.subtitle,.grid-subtitle,.cell-subtitle,.small,.text-muted),
.tabulator-cell :is(.product-code,.sku,.barcode,.meta,.sub-title,.subtitle,.grid-subtitle,.cell-subtitle,.small,.text-muted),
.gridjs-td :is(.product-code,.sku,.barcode,.meta,.sub-title,.subtitle,.grid-subtitle,.cell-subtitle,.small,.text-muted),
.ag-cell :is(.product-code,.sku,.barcode,.meta,.sub-title,.subtitle,.grid-subtitle,.cell-subtitle,.small,.text-muted),
.erp-grid :is(.product-code,.sku,.barcode,.meta,.sub-title,.subtitle,.grid-subtitle,.cell-subtitle,.small,.text-muted){
  font-size:var(--zp-grid-subtitle-font-size)!important;
  line-height:18px!important;
  font-weight:var(--zp-grid-subtitle-font-weight)!important;
}

body.zp-public-page,body.protein-page{font-family:var(--zp-ui-font-family)!important;}
body.zp-public-page *,body.protein-page *{font-family:var(--zp-ui-font-family)!important;}


/* --------------------------------------------------------------------------
   Final ERP module typography guard
   Applies after old module CSS for Forecasting, ABC, Fixed Asset, Supplier,
   PO Report, Turnover Stock, Waste Management, and all listed ERP modules.
   Do not override icon fonts.
-------------------------------------------------------------------------- */
body:not(.zp-public-page) :where(.ti,.ti:before,.ti:after,.fa,.fas,.far,.fab,.mdi,.material-icons,.material-symbols-outlined),
body:not(.zp-public-page) :where(svg,svg *,canvas){
  font-family:initial!important;
}

body:not(.zp-public-page) :where(
  .page-wrapper,.page-body,.container,.container-fluid,.erp-page,.erp-module-layout,.module-page,.module-shell,
  .forecasting-dashboard,.abc-dashboard,.fixed-assets-page,.supplier-page,.supplier-list-page,.po-report-page,
  .tustock-report-page,.waste-management-page,.inventory-page,.purchasing-page,.sales-page,.finance-page,
  .accounting-page,.merchandising-page,.fixed-asset-page,.pos-page,.repair-desk-page,.payroll-page,
  .human-capital-page,.ecommerce-page
){
  font-family:var(--zp-ui-font-family)!important;
  color:var(--zp-text, rgb(34,53,72))!important;
}

body:not(.zp-public-page) :where(
  .module-hero,.erp-module-hero,.zp-content-hero,.page-header,.section-header,.filter-bar,.filter-panel,
  .toolbar,.card,.card-body,.dashboard-card,.kpi-card,.stat-card,.summary-card,.report-card,.panel,.modal-content,
  .tabulator,.dataTables_wrapper,.gridjs-container,.ag-root-wrapper,.erp-grid,.report-grid,.module-grid
) :where(*):not(.ti):not(.fa):not(.fas):not(.far):not(.fab):not(.mdi):not(svg):not(path){
  font-family:var(--zp-ui-font-family)!important;
}

body:not(.zp-public-page) :where(
  label,.form-label,.field-label,.filter-label,.input-label,.control-label,
  .label,.form-text-label,.select-label,.tabulator-col-title,.grid-header-label,
  .kpi-label,.stat-label,.summary-label,.text-label
){
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-label-font-size,13px)!important;
  line-height:18px!important;
  font-weight:var(--zp-label-font-weight,600)!important;
  color:var(--zp-text, rgb(34,53,72))!important;
  letter-spacing:-.01em!important;
}

body:not(.zp-public-page) :where(
  input,select,textarea,.form-control,.form-select,.input-group-text,
  .ts-control,.select2-selection,.select2-selection__rendered,
  .choices,.choices__inner,.flatpickr-input
){
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-input-font-size,14px)!important;
  line-height:20px!important;
  font-weight:var(--zp-input-font-weight,500)!important;
  color:var(--zp-text, rgb(34,53,72))!important;
}

body:not(.zp-public-page) :where(
  button,.btn,.erp-btn,.module-btn,.action-btn,.filter-btn,
  .dropdown-item,.nav-link,.page-link,.badge,.chip,.tag
){
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-button-font-size,14px)!important;
  line-height:20px!important;
  font-weight:var(--zp-button-font-weight,600)!important;
}

body:not(.zp-public-page) :where(
  .kpi-card small,.kpi-label,.stat-label,.summary-label,.metric-label,.dashboard-card small
){
  font-size:var(--zp-kpi-label-font-size,12px)!important;
  line-height:18px!important;
  font-weight:600!important;
}
body:not(.zp-public-page) :where(
  .kpi-card strong,.kpi-value,.stat-value,.summary-value,.metric-value,.dashboard-card .value
){
  font-size:var(--zp-kpi-value-font-size,22px)!important;
  line-height:28px!important;
  font-weight:700!important;
}

/* Grid/table final standard */
body:not(.zp-public-page) :where(
  table,.table,.dataTable,.dataTables_wrapper,.tabulator,.tabulator-table,.tabulator-row,.tabulator-cell,
  .gridjs-container,.gridjs-table,.gridjs-tr,.gridjs-td,.gridjs-th,
  .ag-root-wrapper,.ag-root,.ag-row,.ag-cell,
  .erp-grid,.report-grid,.module-grid,.inventory-grid,.purchasing-grid,.sales-grid,.finance-grid,
  .accounting-grid,.merchandising-grid,.fixed-asset-grid,.pos-grid,.repair-desk-grid,.payroll-grid,
  .human-capital-grid,.ecommerce-grid
){
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-grid-font-size,14px)!important;
  line-height:var(--zp-grid-line-height,20px)!important;
  font-weight:var(--zp-grid-body-font-weight,400)!important;
}

body:not(.zp-public-page) :where(
  table thead th,.table thead th,.dataTable thead th,.dataTables_wrapper thead th,
  .tabulator-header,.tabulator-header *,.tabulator-col,.tabulator-col-title,
  .gridjs-th,.ag-header-cell,.ag-header-cell-label,.ag-header-cell-text,
  .erp-grid-header,.report-grid-header,.module-grid-header
){
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-grid-font-size,14px)!important;
  line-height:var(--zp-grid-line-height,20px)!important;
  font-weight:var(--zp-grid-header-font-weight,600)!important;
  color:var(--zp-text, rgb(34,53,72))!important;
}

body:not(.zp-public-page) :where(
  .product-name,.item-name,.supplier-name,.asset-name,.docno,.doc-no,.doc-link,.po-docno,
  .forecast-title,.waste-item,.grid-title,.cell-title,.row-title,.title-main,
  .table a,.tabulator-cell a,.gridjs-td a,.ag-cell a
){
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-grid-title-font-size,14px)!important;
  line-height:var(--zp-grid-line-height,20px)!important;
  font-weight:var(--zp-grid-title-font-weight,700)!important;
}

body:not(.zp-public-page) :where(
  .product-code,.item-code,.supplier-code,.asset-code,.sku,.barcode,.uom,.meta,.sub-title,.subtitle,
  .grid-subtitle,.cell-subtitle,.row-subtitle,.text-muted,.small,.table small,.tabulator-cell small,
  .gridjs-td small,.ag-cell small
){
  font-family:var(--zp-ui-font-family)!important;
  font-size:var(--zp-grid-subtitle-font-size,12px)!important;
  line-height:18px!important;
  font-weight:var(--zp-grid-subtitle-font-weight,500)!important;
}

/* Specific legacy dashboard/report selectors that often carried hardcoded Inter/Sora */
body:not(.zp-public-page) :where(
  #forecastingDashboard,#abcDashboard,#fixedAssetPage,#supplierListPage,#supplierFormPage,
  #poReportPage,#tustockReportPage,#wasteManagementPage,
  .forecasting-shell,.abc-shell,.fixed-asset-shell,.supplier-shell,.po-report-shell,
  .tustock-shell,.waste-shell
) :where(*):not(.ti):not(.fa):not(.fas):not(.far):not(.fab):not(.mdi):not(svg):not(path){
  font-family:var(--zp-ui-font-family)!important;
}
