/* Escala tipográfica compartida por pantallas, formularios y documentos impresos. */
:root {
  --va-font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --va-font-base: 12px;
  --va-font-text: 12px;
  --va-font-title: 20px;
  --va-font-subtitle: 16px;
  --bs-body-font-family: var(--va-font-family);
  --bs-body-font-size: var(--va-font-text);
}
html { font-size: var(--va-font-base); }
body {
  font-family: var(--va-font-family);
  font-size: var(--va-font-text);
  font-weight: 400;
  line-height: 1.5;
}
body :is(table, input, textarea, select, button, code, pre) { font-family: inherit; }
body :is(p, li, dt, dd, label, small, .small, .form-text, .form-label, .form-control, .form-select, .input-group-text, .badge, .status-badge, .legend-item, .finance-breadcrumb, .finance-source-note span, .finance-audit-meta span, .finance-audit-meta strong, .sidebar-profile strong, .sidebar-profile span, .sidebar-profile em, .sidebar-nav a, .sidebar-nav-group > summary, .sidebar-plan a, .metric-card span, .metric-card small, .info-list span, .html-editor-surface, .chat-message, .app-footer, code, pre) {
  font-size: var(--va-font-text);
}
body :is(h1, h2, .brand, .total, .login-mark, .metric-card strong, .finance-metric-grid .metric-card strong) {
  font-size: var(--va-font-title) !important;
  line-height: 1.3;
  font-weight: 600;
}
body :is(h3, h4, h5, h6, .panel-title, .settings-card strong, .sidebar-plan strong, .notification-head strong), body #taskCalendar .fc-toolbar-title {
  font-size: var(--va-font-subtitle) !important;
  line-height: 1.4;
  font-weight: 600;
}
body h2.panel-title { font-size: var(--va-font-title) !important; }
body .topbar-title p { font-size: var(--va-font-subtitle); line-height: 1.4; }
body :is(.fs-1, .fs-2, .fs-3, .fs-4) { font-size: var(--va-font-title) !important; }
body :is(.fs-5, .fs-6) { font-size: var(--va-font-subtitle) !important; }
body :is(a, button, .btn, .dropdown-item, .nav-link, .page-link), body #taskCalendar .fc-button { font-size: var(--va-font-text); }
body :is(th, td, th small, td small, th a, td a, th strong, td strong, th .badge, td .badge) { font-size: var(--va-font-text) !important; }
body th { font-weight: 600; }
body .btn {
  --bs-btn-font-size: var(--va-font-text);
  min-height: 32px;
  padding: 6px 12px;
  line-height: 1.5;
  font-weight: 500;
  vertical-align: middle;
}
body .btn-sm { min-height: 28px; padding: 4px 9px; }
body :is(.btn-strong, .btn-new-report) { height: auto; min-height: 32px; gap: 6px; padding: 6px 12px; }
body .btn-action { width: 32px; height: 32px; min-height: 32px; padding: 0; }
body :is(.icon-btn, .notification-btn) { width: 36px; height: 36px; font-size: 16px; }
body .notification-btn span { top: -3px; right: -3px; min-width: 18px; font-size: var(--va-font-text); }
body .date-pill { height: 36px; font-size: var(--va-font-text); }
body :is(.btn i, .icon-btn i, .sidebar-nav a i, .sidebar-nav-group > summary > i:first-child, .html-editor-toolbar button, .html-editor-toolbar .html-editor-alpha-icon) { font-size: 16px; }
body :is(.form-control, .form-select) { min-height: 32px; line-height: 1.5; }
body :is(.record-link, .finance-breadcrumb a) { font-weight: 500; }
body a:focus-visible, body button:focus-visible { outline: 2px solid var(--va-blue, #4169f4); outline-offset: 3px; }
body .table-number {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  body .topbar { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  body .topbar-actions { gap: 8px; }
}
@media print {
  body { font-size: var(--va-font-text); }
  .table-number { width: 36px; min-width: 36px; max-width: 36px; }
}

body .html-editor .html-editor-source { font-family: var(--va-font-family); font-size: var(--va-font-text); }
