/* BELTZHOLF UX-18 v16.4 — Additive unified typography, on UX-17 v16.3.
   Scope: font family and SMALL BOX HEADINGS ONLY. All ERP behavior unchanged.
   Segoe UI is available locally on Windows, and system-ui is the cross-platform fallback.
   No external font download, scripts or database changes. */
:root {
  --bz-ui-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --bz-font-card-title: 18px;
  --bz-font-toolbar-title: 18px;
  --bz-font-card-subtitle: 14px;
  --bz-font-kpi-caption: 12px;
  --bz-font-home-category: 15px;
  --bz-font-home-category-compact: 14px;
  --bz-font-tool-title: 13px;
  --bz-font-group-title: 16px;
}
/* One real font family everywhere, without changing general body or control sizes. */
body, button, input, select, textarea, optgroup {
  font-family: var(--bz-ui-font) !important;
}
/* Keep machine-readable / audit / code text monospaced. */
pre, code, kbd, samp, .mono, .monospace, .font-mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace !important;
}
/* Readable box headings; forms, values, tables and body copy stay at their original sizes. */
:where(.card, .panel, .box) h3 { font-size: var(--bz-font-card-title) !important; line-height: 1.38; }
:where(.card, .panel, .box) h4 { font-size: var(--bz-font-card-subtitle) !important; line-height: 1.4; }
/* UX-19 v16.5 — match alternate (non-h3) box-heading markup to the
   existing 18px card-title scale. Scope to first-level, leading toolbar
   labels only; never target values, amounts, tables, buttons or form labels. */
.card > .toolbar > b,
.card > .toolbar > strong,
.card > .toolbar > div:first-child > b,
.card > .toolbar > div:first-child > strong {
  font-size: var(--bz-font-toolbar-title) !important;
  line-height: 1.38;
}
/* UX-20 v16.6 — direct-leading card headings (no h3/toolbar wrapper).
   Keep this strictly to direct first-child bold heading elements: do not
   enlarge form labels, numeric values, status tags, buttons or table cells. */
.card > b:first-child {
  font-size: var(--bz-font-card-title) !important;
  line-height: 1.38;
}
/* UX-21 v16.7 — clear, predictable level-two section headings.
   Existing direct card titles are 18px; elevated card/panel h2 headings are
   20px. Scope to direct-leading semantic h2 only, excluding page/hero titles,
   forms, table headers, field labels, captions and numeric values. */
:root { --bz-font-card-section: 20px; }
.card > h2:first-child,
.panel > h2:first-child {
  font-size: var(--bz-font-card-section) !important;
  line-height: 1.35;
}
/* Common section-title variants previously inconsistent between modules. */
.sectionTitle h2 { font-size: 19px !important; line-height: 1.35; }
.section h2 { font-size: 20px !important; line-height: 1.35; }
.history h2 { font-size: 22px !important; line-height: 1.35; }
.method h2 { font-size: 23px !important; line-height: 1.35; }
.sectionHead h2 { font-size: 22px !important; line-height: 1.35; }
/* Readable small captions over financial KPI values (values remain untouched). */
/* UX-22 v16.8 — 12px minimum readable KPI captions, including <small>
   labels previously missed by UX-18. Only first-child caption tags; financial
   numbers, interactive controls and form/table text remain untouched. */
.kpi > span:first-child,
.kpi > small:first-child,
.kpi > .kpi-label:first-child,
.kpi > .label:first-child {
  font-size: var(--bz-font-kpi-caption) !important;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: break-word;
}
/* UX-01–17 dashboard and department card headings, same hierarchy as modules. */
#bwApp .bw-tile-title { font-size: var(--bz-font-home-category) !important; line-height: 1.35; }
#bwApp .bw-feature-info b { font-size: var(--bz-font-tool-title) !important; line-height: 1.4; }
#bwApp .bw-group-title h3 { font-size: var(--bz-font-group-title) !important; line-height: 1.4; }
#bwApp.bw07-compact .bw-tile-title,
#bwApp .bw07-compact .bw-tile-title,
body.bw07-compact #bwApp .bw-tile-title { font-size: var(--bz-font-home-category-compact) !important; }
@media (max-width: 700px) {
  #bwApp .bw-tile-title { font-size: var(--bz-font-home-category-compact) !important; }
}

/* UX-23 v16.9 — Financial metric label readability. The four legacy
   accounting/compliance/finance/asset metric grids use 11px containers.
   Improve the first-child descriptive labels only; preserve numeric values,
   calculations, badges, forms, tables, page headings, and transaction logic. */
:root { --bz-font-metric-label: 12px; }
.metric > span:first-child {
  font-size: var(--bz-font-metric-label) !important;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: break-word;
  min-width: 0;
}

/* UX-24 v17.0 — Readable status badges across existing ERP screens.
   Limit this to noninteractive SPAN badges/tags/pills and identified
   live/sync indicators; DO NOT change table, form, button, heading,
   KPI number or status calculation typography. */
:root { --bz-font-status-chip: 12px; }
span.badge,
span.tag,
span.pill,
span.badgeAuto,
span.filter-pill,
span.live-badge {
  font-size: var(--bz-font-status-chip) !important;
  line-height: 1.4;
  overflow-wrap: break-word;
}
