/* =============================================================
   TYPOGRAPHY
   -------------------------------------------------------------
   Font family + smoothing only at this stage. We deliberately do
   NOT force a new base font-size globally, because table-dense
   ERP pages were laid out against the existing sizing — changing
   it app-wide risks regressions. Sizing is exposed as tokens for
   opt-in use by new components.
   ============================================================= */

body {
  font-family: var(--font-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: var(--lh-base);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-base);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: var(--lh-tight);
}

/* Muted helper text keyed to the token */
.text-muted,
small,
.small {
  color: var(--text-secondary) !important;
}

/* Sidebar / control chrome uses the UI font (matches prior intent) */
.main-sidebar .nav-link,
.main-sidebar .nav-header,
.main-sidebar .brand-link,
select,
select option {
  font-family: var(--font-ui);
}

/* =============================================================
   GLOBAL SCROLLBARS  —  thin, rounded, theme-aware
   -------------------------------------------------------------
   Applies app-wide (page, modals, dropdowns, multi-selects…).
   The sidebar keeps its own darker scrollbar (more specific rule).
   ============================================================= */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;   /* padding effect → slimmer thumb */
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: content-box;
}
*::-webkit-scrollbar-corner { background: transparent; }
