/* Shared typography, loaded after page-specific styles. */
:root {
  --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --type-body: 1rem;
  --type-small: .875rem;
  --type-title: clamp(1.625rem, 2.5vw, 1.75rem);
  --type-section: clamp(1.125rem, 2vw, 1.25rem);
  --type-number: clamp(1.75rem, 2.5vw, 2rem);
}
body {
  font-family: var(--font-family);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  overflow-wrap: break-word;
}
h1 { font-size: var(--type-title); font-weight: 600; }
h2, h3, h4, .card-title { font-size: var(--type-section); font-weight: 600; }
h5, h6 { font-size: 1rem; font-weight: 600; }
/* Specific selectors supersede the headings inside authentication cards. */
body h1, body h2, body h3 { font-size: var(--type-section); }
body h1 { font-size: var(--type-title); }
button, input, select, textarea { font-family: inherit; }
body input, body select, body textarea, body .form-input {
  font-size: var(--type-body) !important;
  line-height: 1.5;
}
body .btn, body .btn-sm, body .btn-lg, body .nav-link,
body .navbar-links a {
  font-size: .9375rem !important;
  font-weight: 600;
  line-height: 1.5;
}
body .form-label { font-size: 1rem !important; font-weight: 600; }
small, .stat-title, .stat-label, .badge, .badge-admin, .badge-premium,
.chip, .sidebar-subtitle {
  font-size: var(--type-small);
  line-height: 1.5;
}
body .card-title { font-size: var(--type-section) !important; }
body .stat-value {
  font-size: var(--type-number);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
body .table-modern th, body .table-modern td {
  font-size: var(--type-small);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
body .table-modern th { font-weight: 600; }
body .table-modern td .btn { font-size: .9375rem !important; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.stat-card, .card, .main-content, .content-area { min-width: 0; }
.card-header { flex-wrap: wrap; gap: 12px; }
body .grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
body .stat-row {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
#router-report-today, #router-report-month {
  font-size: var(--type-section) !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
@media (max-width: 640px) {
  body .navbar .btn-primary, body .nav-actions .btn { font-size: .9375rem !important; }
}
