/* Central font loading for application pages, standalone forms and iframes. */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap');
@import url('./app-mobile.css?v=20260909-7');

/* Screen tokens only: PDF generators and print rules retain their own sizing. */
@media screen {
  :root {
    --app-font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    /* Change this one value to resize all text, e.g. 1px or -0.5px. */
    --app-font-size-adjust: 0px;
    --app-font-title: calc(17px + var(--app-font-size-adjust));
    --app-font-section: calc(14px + var(--app-font-size-adjust));
    --app-font-body: calc(12px + var(--app-font-size-adjust));
    --app-font-label: calc(11px + var(--app-font-size-adjust));
    --app-font-caption: calc(11px + var(--app-font-size-adjust));
    --app-font-control: var(--app-font-body);
    --app-font-table: var(--app-font-body);
    --app-font-table-head: var(--app-font-label);
    --app-font-button: var(--app-font-label);
    --app-font-nav: var(--app-font-body);
    --app-font-icon: 13px;
    --app-line-normal: 1.45;
    --app-line-compact: 1.4;
    --app-weight-regular: 400;
    --app-weight-medium: 500;
    --app-weight-semibold: 600;
    --app-weight-bold: 700;
    --app-text-color: #172b4d;
    --app-muted-color: #64748b;
    /* Compatibility aliases for existing page components. */
    --app-font-2xs: var(--app-font-caption);
    --app-font-xs: var(--app-font-caption);
    --app-font-sm: var(--app-font-label);
    --app-font-sm-plus: var(--app-font-label);
    --app-font-md: var(--app-font-body);
    --app-font-md-plus: var(--app-font-body);
    --app-font-base: var(--app-font-body);
    --app-font-title-sm: var(--app-font-section);
    --app-font-title-lg: var(--app-font-title);
  }
  body {
    font-family: var(--app-font-family);
    font-size: var(--app-font-body);
    font-weight: var(--app-weight-regular);
    line-height: var(--app-line-normal);
    color: var(--app-text-color);
  }
  button, input, select, textarea { font-family: inherit; }
  h1, .app-page-title {
    font-size: var(--app-font-title);
    font-weight: var(--app-weight-bold);
    line-height: var(--app-line-compact);
  }
  h2, h3, h4, h5, h6, .card-title, .modal-title {
    font-size: var(--app-font-section);
    font-weight: var(--app-weight-semibold);
    line-height: var(--app-line-compact);
  }
  label, .app-form-label, th {
    font-size: var(--app-font-label);
    font-weight: var(--app-weight-semibold);
    line-height: var(--app-line-normal);
  }
  input, select, textarea, .form-control, .select2-container,
  .select2-results__option, .select2-search__field {
    font-size: var(--app-font-control);
    line-height: var(--app-line-normal);
  }
  .btn, button, .page-link {
    font-size: var(--app-font-button);
    font-weight: var(--app-weight-semibold);
  }
  td { font-size: var(--app-font-table); line-height: var(--app-line-normal); }
  table, input, output, [class*='amount'], [class*='metric'] { font-variant-numeric: tabular-nums; }
  small, .text-muted, .form-text, [class$='-subtitle'], [class$='-hint'] {
    font-size: var(--app-font-caption);
    line-height: var(--app-line-normal);
  }
  .text-muted, .form-text { color: var(--app-muted-color); }
  .sidebar .menu-title, .navbar .nav-link { font-size: var(--app-font-nav); }
  .select2-dropdown { font-family: var(--app-font-family); }
  .form-control:not(textarea) { min-height: calc(30px + var(--app-font-size-adjust)); }
  textarea.form-control { min-height: 64px; }
  .dataTables_filter label, .dataTables_length label {
    display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  }
  .dataTables_filter input, .dataTables_length select { max-width: 100%; }
  .modal-body { overflow-wrap: break-word; }
  .btn { white-space: normal; }
  @media (max-width: 575.98px) {
    .dataTables_filter, .dataTables_length { text-align: left; }
    .dataTables_filter label { width: 100%; }
    .dataTables_filter input { min-width: 0; flex: 1; }
  }
}
