/* ========================================================================
   Medibox — Professional Typography & Readability System
   Senior UX pass: one readable type scale across the application.
   Loaded last so it normalizes legacy module-specific font sizing without
   changing markup, routes, forms, application logic or component geometry.
   ======================================================================== */

:root {
    --mb-type-body: 14.5px;
    --mb-type-body-mobile: 14px;
    --mb-type-control: 13px;
    --mb-type-table: 12.5px;
    --mb-type-meta: 11px;
    --mb-type-micro: 10.5px;
    --mb-type-label: 12px;
    --mb-type-section: 15px;
    --mb-type-card-title: 16px;
    --mb-type-page: 18px;
    --mb-weight-regular: 400;
    --mb-weight-medium: 500;
    --mb-weight-semibold: 600;
    --mb-weight-strong: 650;
}

/* ------------------------------------------------------------------------
   1. Global reading rhythm
   ------------------------------------------------------------------------ */
body.app-body {
    font-size: var(--mb-type-body) !important;
    line-height: 1.5 !important;
    font-weight: var(--mb-weight-regular);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.app-body p,
body.app-body li,
body.app-body dd,
body.app-body td,
body.app-body input,
body.app-body select,
body.app-body textarea,
body.app-body button {
    line-height: 1.45;
}

body.app-body p,
body.app-body .muted,
body.app-body .table-subtext,
body.app-body .field-help,
body.app-body .form-hint,
body.app-body .required-note,
body.app-body .autosave-note {
    font-weight: var(--mb-weight-regular) !important;
}

/* Eyebrows are context labels, not headlines. */
body.app-body .eyebrow {
    font-size: var(--mb-type-micro) !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.3 !important;
    letter-spacing: .055em !important;
}

body.app-body .muted,
body.app-body small {
    line-height: 1.4;
}

body.app-body .field-help,
body.app-body .form-hint,
body.app-body .required-note,
body.app-body .autosave-note {
    font-size: var(--mb-type-meta) !important;
}

/* ------------------------------------------------------------------------
   2. Heading hierarchy — strong enough to scan, never excessively heavy
   ------------------------------------------------------------------------ */
body.app-body h1,
body.app-body h2,
body.app-body h3,
body.app-body h4,
body.app-body h5,
body.app-body h6 {
    letter-spacing: -.012em;
}

body.app-body h1 { font-weight: var(--mb-weight-strong) !important; }
body.app-body h2 { font-weight: var(--mb-weight-strong) !important; }
body.app-body h3 { font-weight: var(--mb-weight-semibold) !important; }
body.app-body h4,
body.app-body h5,
body.app-body h6 { font-weight: var(--mb-weight-semibold) !important; }

body.app-body .module-topbar-title,
body.app-body .topbar-medibox-title {
    font-size: 17px !important;
    font-weight: var(--mb-weight-strong) !important;
    line-height: 1.2 !important;
    letter-spacing: -.01em !important;
}

body.app-body .card-header h2,
body.app-body .patient-profile-v2-panel-heading h2,
body.app-body .patient-unified-section-head h2,
body.app-body .section-title h2 {
    font-size: var(--mb-type-card-title) !important;
    font-weight: var(--mb-weight-strong) !important;
    line-height: 1.3 !important;
}

body.app-body .card-header h3,
body.app-body .patient-visits-heading h3,
body.app-body .patient-simple-section-head h3,
body.app-body .visit-horizontal-label h3,
body.app-body .visit-review-note-card h3,
body.app-body .clinical-entry-full-head h3,
body.app-body .dental-clinical-card h3,
body.app-body .section-title h3 {
    font-size: var(--mb-type-section) !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.35 !important;
}

/* ------------------------------------------------------------------------
   3. Sidebar and persistent topbar
   ------------------------------------------------------------------------ */
body.app-body .sidebar .nav-item {
    font-size: 13px !important;
    font-weight: var(--mb-weight-medium) !important;
}
body.app-body .sidebar .nav-item.active {
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .sidebar .user-card strong,
body.app-body .sidebar-brand .brand-copy strong {
    font-size: 13px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .sidebar .user-card small,
body.app-body .sidebar-brand .brand-copy small {
    font-size: var(--mb-type-micro) !important;
    font-weight: var(--mb-weight-regular) !important;
}

body.app-body .global-patient-search input {
    font-size: 13.5px !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .global-patient-search kbd {
    font-size: 10.5px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .global-patient-search .header-input-method-switch.topbar-language-switch button {
    font-size: 10px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .global-search-result-copy strong {
    font-size: 12.5px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .global-search-result-copy small {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .topbar-practitioner-switch small,
body.app-body .topbar-clinic-context small {
    font-size: 9.5px !important;
    font-weight: var(--mb-weight-medium) !important;
    letter-spacing: .02em;
}
body.app-body .topbar-practitioner-copy strong,
body.app-body .topbar-clinic-context strong {
    font-size: 12px !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.25 !important;
}

/* ------------------------------------------------------------------------
   4. Forms and controls
   ------------------------------------------------------------------------ */
body.app-body .field > span,
body.app-body .field > label,
body.app-body label,
body.app-body .visit-compact-field > span,
body.app-body .visit-add-service-form .field > span,
body.app-body .clinical-column1-form .field > span,
body.app-body .clinical-service-inline-form .field > span,
body.app-body .payment-installment-entry .field > span,
body.app-body .dental-followup-grid label {
    font-size: var(--mb-type-label) !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.3 !important;
}

body.app-body input:not([type="checkbox"]):not([type="radio"]),
body.app-body select,
body.app-body textarea,
body.app-body .form-control,
body.app-body .appointment-control,
body.app-body .reference-search-control input,
body.app-body .reference-select-control select {
    font-size: var(--mb-type-control) !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body textarea { line-height: 1.55 !important; }
body.app-body input::placeholder,
body.app-body textarea::placeholder {
    font-size: 12.5px;
    font-weight: var(--mb-weight-regular);
}

body.app-body .btn {
    font-size: 12px !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.25 !important;
}
body.app-body .btn-sm,
body.app-body .reviews-row-actions .btn,
body.app-body .reviews-filter-form .btn,
body.app-body .debtor-reminder-form .btn {
    font-size: 11px !important;
    font-weight: var(--mb-weight-semibold) !important;
}

/* ------------------------------------------------------------------------
   5. Tables and registers
   Header = semibold; content = regular; only true primary values get weight.
   ------------------------------------------------------------------------ */
body.app-body .data-table thead th,
body.app-body .reference-data-table thead th,
body.app-body .module-unified-table thead th,
body.app-body .catalog-standard-table thead th,
body.app-body .patient-records-table th,
body.app-body .reviews-reference-table th,
body.app-body .patient-profile-v2-table th,
body.app-body .payment-installment-history-table thead th,
body.app-body .debtors-table thead th,
body.app-body .service-group-entry-table th {
    font-size: 10.5px !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.3 !important;
    letter-spacing: .035em !important;
}

body.app-body .data-table tbody td,
body.app-body .reference-data-table tbody td,
body.app-body .module-unified-table tbody td,
body.app-body .catalog-standard-table tbody td,
body.app-body .patient-records-table td,
body.app-body .reviews-reference-table td,
body.app-body .patient-profile-v2-table td,
body.app-body .payment-installment-history-table tbody td,
body.app-body .debtors-table tbody td,
body.app-body .service-group-entry-table td {
    font-size: var(--mb-type-table) !important;
    font-weight: var(--mb-weight-regular) !important;
    line-height: 1.42 !important;
}

/* Legacy markup uses <strong> for layout in many cells. Keep those values calm. */
body.app-body .data-table tbody td > strong,
body.app-body .reference-data-table tbody td > strong,
body.app-body .module-unified-table tbody td > strong,
body.app-body .catalog-standard-table tbody td > strong,
body.app-body .service-groups-table tbody td > strong,
body.app-body[data-active-menu="services"] .module-unified-table strong,
body.app-body[data-active-menu="services"] .catalog-standard-table strong,
body.app-body[data-active-menu="services"] .service-groups-table strong,
body.app-body[data-active-menu="materials"] .module-unified-table strong,
body.app-body[data-active-menu="inventory"] .module-unified-table strong {
    font-weight: var(--mb-weight-medium) !important;
}

body.app-body .reference-person-copy .patient-name-uppercase,
body.app-body .patient-record-name-link,
body.app-body .patient-record-name strong,
body.app-body .review-patient strong,
body.app-body .finance-patient-name,
body.app-body .finance-patient-name strong {
    font-size: 13px !important;
    font-weight: var(--mb-weight-strong) !important;
}

body.app-body .reference-primary-value,
body.app-body .review-date strong,
body.app-body .appointment-date-cell strong,
body.app-body .appointment-clinician-cell strong {
    font-size: 12.5px !important;
    font-weight: var(--mb-weight-medium) !important;
}

body.app-body .reference-person-copy small,
body.app-body .reference-secondary-value,
body.app-body .table-subtext,
body.app-body .review-patient small,
body.app-body .review-date small,
body.app-body .patient-record-name small,
body.app-body .patient-record-date small,
body.app-body .appointment-date-cell span,
body.app-body .appointment-clinician-cell span {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}

body.app-body .code-chip,
body.app-body .patient-record-code,
body.app-body .patient-record-embg,
body.app-body .patient-record-phone {
    font-size: 11px !important;
    font-weight: var(--mb-weight-medium) !important;
}

/* Status chips should be legible but not compete with names/amounts. */
body.app-body .badge,
body.app-body .status-badge,
body.app-body .reference-status-badge,
body.app-body .review-status-badge,
body.app-body .pill,
body.app-body .patient-status-toggle {
    font-size: 10.5px !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.2 !important;
}

/* ------------------------------------------------------------------------
   6. Patient profile
   ------------------------------------------------------------------------ */
body.app-body .patient-profile-v2-title-line h1,
body.app-body .patient-detail-identity h1,
body.app-body .patient-profile-simple-identity h1 {
    font-size: 19px !important;
    font-weight: var(--mb-weight-medium) !important;
    line-height: 1.25 !important;
}
body.app-body .patient-profile-name-uppercase,
body.app-body .patient-detail-identity .patient-name-uppercase {
    font-weight: var(--mb-weight-strong) !important;
}
body.app-body .patient-profile-v2-title-line h1 > span,
body.app-body .patient-detail-identity > p,
body.app-body .patient-profile-simple-identity > p,
body.app-body .patient-profile-v2-identity > p {
    font-size: 12px !important;
    font-weight: var(--mb-weight-regular) !important;
}

body.app-body .patient-profile-meta-chip,
body.app-body .patient-detail-status,
body.app-body .patient-profile-header-state,
body.app-body .patient-profile-header-detail > summary {
    font-size: 10.5px !important;
    font-weight: var(--mb-weight-medium) !important;
}
body.app-body .patient-profile-v2-tab,
body.app-body .patient-profile-tab {
    font-size: 12px !important;
    font-weight: var(--mb-weight-medium) !important;
}
body.app-body .patient-profile-v2-tab.is-active,
body.app-body .patient-profile-v2-tab.active,
body.app-body .patient-profile-v2-tab[aria-selected="true"],
body.app-body .patient-profile-tab.is-active,
body.app-body .patient-profile-tab.active {
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .patient-profile-v2-tab > b,
body.app-body .patient-profile-tab > b {
    font-size: 10px !important;
    font-weight: var(--mb-weight-semibold) !important;
}

body.app-body .patient-profile-data-list dt,
body.app-body .patient-profile-v2-panel .patient-profile-data-list dt,
body.app-body .patient-profile-detail-card small,
body.app-body .patient-profile-panel-header small,
body.app-body .patient-profile-v2-panel-heading small,
body.app-body .patient-profile-v2-summary-cards small,
body.app-body .patient-detail-stats small,
body.app-body .patient-detail-facts small,
body.app-body .patient-profile-v2-stats small,
body.app-body .patient-profile-v2-facts small,
body.app-body .patient-profile-finance-summary article small,
body.app-body .patient-safety-overview-card small {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .patient-profile-data-list dd,
body.app-body .patient-profile-v2-panel .patient-profile-data-list dd,
body.app-body .patient-profile-v2-facts strong {
    font-size: 12.5px !important;
    font-weight: var(--mb-weight-medium) !important;
}

body.app-body .patient-visit-primary > span,
body.app-body .patient-previous-visit-card header > span,
body.app-body .patient-visit-reason small,
body.app-body .patient-visit-diagnosis small,
body.app-body .patient-visit-note,
body.app-body .patient-visit-doctor,
body.app-body .patient-previous-visit-card p,
body.app-body .patient-previous-visit-card footer > span,
body.app-body .patient-appointment-ledger-row small,
body.app-body .patient-appointment-ledger-row div > span:not(.badge),
body.app-body .patient-appointment-highlight-title small,
body.app-body .patient-appointment-highlight-reason small,
body.app-body .patient-appointment-highlight-meta small,
body.app-body .patient-appointment-highlight-card > footer > span,
body.app-body .patient-xray-professional-card span,
body.app-body .patient-xray-professional-card small {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .patient-visit-reason strong,
body.app-body .patient-visit-diagnosis strong,
body.app-body .patient-previous-visit-card > div > strong,
body.app-body .patient-previous-diagnosis strong,
body.app-body .patient-appointment-ledger-row strong,
body.app-body .patient-appointment-highlight-datetime strong,
body.app-body .patient-appointment-highlight-meta strong,
body.app-body .patient-xray-professional-card strong {
    font-size: 12px !important;
    font-weight: var(--mb-weight-medium) !important;
}

/* ------------------------------------------------------------------------
   7. Clinical / dental visit workspace
   ------------------------------------------------------------------------ */
body.app-body .visit-workspace-title-line h1 {
    font-size: 18px !important;
    font-weight: var(--mb-weight-medium) !important;
}
body.app-body .visit-workspace-title-line strong {
    font-weight: var(--mb-weight-strong) !important;
}
body.app-body .visit-workspace-title-line small,
body.app-body .visit-workspace-facts small,
body.app-body .visit-horizontal-label small,
body.app-body .visit-simple-section-header > em,
body.app-body .visit-service-copy small,
body.app-body .visit-service-compact-meta > span,
body.app-body .visit-appointment-strip-facts > span:not(.badge),
body.app-body .visit-review-facts small,
body.app-body .visit-review-card-list small,
body.app-body .dental-clinical-card header small,
body.app-body .dental-review-savebar > span,
body.app-body .dental-service-shortcuts > span,
body.app-body .clinical-context-note,
body.app-body .clinical-doctor-card small,
body.app-body .receipt-entry-panel-heading small,
body.app-body .clinical-selected-service-heading small {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .visit-reason-pill,
body.app-body .visit-service-number,
body.app-body .visit-service-copy p,
body.app-body .visit-document-compact-list strong,
body.app-body .dental-readonly-followup strong,
body.app-body .clinical-selected-service-heading span {
    font-size: 11.5px !important;
}
body.app-body .visit-service-copy p,
body.app-body .visit-document-compact-list p {
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .visit-document-compact-list small,
body.app-body .visit-finance-compact-grid small,
body.app-body .visit-tooth-card small,
body.app-body .visit-tooth-card em,
body.app-body .visit-tooth-record small,
body.app-body .visit-document-row small,
body.app-body .visit-service-materials > small,
body.app-body .visit-related-card-head small {
    font-size: 10.5px !important;
    font-weight: var(--mb-weight-regular) !important;
}

/* Dental quick actions need to remain compact, but readable. */
body.app-body .dental-quick-chip,
body.app-body .dental-service-shortcut,
body.app-body .dental-surface-button {
    font-size: 11px !important;
    font-weight: var(--mb-weight-medium) !important;
}
body.app-body .dental-quick-chip.is-active,
body.app-body .dental-service-shortcut.is-active,
body.app-body .dental-surface-button.is-active,
body.app-body .dental-surface-button[aria-pressed="true"] {
    font-weight: var(--mb-weight-semibold) !important;
}

/* Teeth chart: labels are secondary; tooth number/status is primary. */
body.app-body .patient-teeth-summary small,
body.app-body .patient-teeth-legend-item,
body.app-body .patient-tooth-status-card small,
body.app-body .patient-tooth-status-card em {
    font-size: 10px !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .patient-teeth-status-footer > span {
    font-size: var(--mb-type-meta) !important;
}

/* ------------------------------------------------------------------------
   8. Calendar and appointments
   Keep dense scheduling information compact, but never microscopic.
   ------------------------------------------------------------------------ */
body.app-body .calendar-day-header strong {
    font-size: 12px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .calendar-day-header small,
body.app-body .calendar-corner,
body.app-body .calendar-time-label,
body.app-body .calendar-legend,
body.app-body #weeklyCalendarApp .calendar-legend span,
body.app-body .reference-calendar-navigation .calendar-current-date small {
    font-size: 10.5px !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .calendar-current-date {
    font-size: 11.5px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .reference-appointment-avatar {
    font-size: 9.5px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .calendar-appointment .reference-appointment-patient-copy h3,
body.app-body #weeklyCalendarApp .calendar-appointment-simple .reference-appointment-patient-copy h3 {
    font-size: 11px !important;
    font-weight: var(--mb-weight-semibold) !important;
    line-height: 1.2 !important;
}
body.app-body .reference-appointment-patient-copy small,
body.app-body .calendar-appointment .reference-appointment-meta,
body.app-body .calendar-appointment .reference-appointment-reason {
    font-size: 9.5px !important;
    font-weight: var(--mb-weight-regular) !important;
    line-height: 1.25 !important;
}

body.app-body .topbar-status-card strong,
body.app-body .patient-appointments-summary strong {
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .topbar-status-card small,
body.app-body .patient-appointments-summary small {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .appointment-chair-button-copy small,
body.app-body .appointment-mobile-section-title small,
body.app-body .appointment-time-summary small,
body.app-body .appointment-modal .modal-header .eyebrow,
body.app-body .appointment-service-chip small,
body.app-body .appointment-no-services {
    font-size: var(--mb-type-meta) !important;
}
body.app-body .appointment-reason-button,
body.app-body .appointment-modal-modern .appointment-reason-button,
body.app-body .appointment-service-chip strong {
    font-size: 11.5px !important;
    font-weight: var(--mb-weight-medium) !important;
}

/* ------------------------------------------------------------------------
   9. Finance, services, materials, inventory and settings
   ------------------------------------------------------------------------ */
body.app-body .payment-kpi-card small,
body.app-body .payment-kpi-grid-clean .payment-kpi-card small,
body.app-body .payment-kpi-grid-clean .payment-kpi-card p,
body.app-body .payment-installment-summary small,
body.app-body .payment-installment-history-summary small,
body.app-body .payment-history-notes,
body.app-body .reminder-note,
body.app-body .debtors-dialog .modal-header .muted,
body.app-body .debtors-dialog .table-subtext,
body.app-body .manager-kpi-card small,
body.app-body .manager-dashboard-modern .manager-kpi-card small,
body.app-body .manager-dashboard-modern .manager-kpi-card p,
body.app-body .manager-finance-summary-strip small,
body.app-body .manager-health-metrics span,
body.app-body .manager-health-metrics small,
body.app-body .medibox-kpi-card small,
body.app-body .medibox-kpi-card p {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .payment-kpi-card strong,
body.app-body .payment-installment-summary strong,
body.app-body .manager-kpi-card strong,
body.app-body .medibox-kpi-card strong,
body.app-body .summary-success strong,
body.app-body .summary-danger strong {
    font-weight: var(--mb-weight-strong) !important;
}
body.app-body .debtors-table tbody td > strong {
    font-size: 12.5px !important;
    font-weight: var(--mb-weight-medium) !important;
}
body.app-body .material-module-tabs strong,
body.app-body .settings-module-copy strong {
    font-size: 12px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .settings-module-copy small,
body.app-body .inventory-overview-card small,
body.app-body .service-detail-stat-grid small,
body.app-body .service-detail-card > header small,
body.app-body .service-detail-price small,
body.app-body .service-detail-availability small,
body.app-body .service-details-modal-heading .eyebrow,
body.app-body .service-detail-hero-copy > span,
body.app-body #serviceDetailsDialog .service-review-header-copy .eyebrow,
body.app-body #serviceDetailsDialog .service-review-header-meta,
body.app-body #serviceDetailsDialog .service-review-context-main small,
body.app-body #serviceDetailsDialog .service-review-context-price small {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}

/* ------------------------------------------------------------------------
   10. Modals and dialogs
   ------------------------------------------------------------------------ */
body.app-body .modal-header h2,
body.app-body .appointment-modal .modal-header h2,
body.app-body .visit-command-modal .modal-header h2,
body.app-body .service-modal-modern .modal-header h2 {
    font-size: 17px !important;
    font-weight: var(--mb-weight-strong) !important;
    line-height: 1.25 !important;
}
body.app-body .modal-body {
    font-size: 13.5px !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .modal-body p,
body.app-body .modal-body li,
body.app-body .modal-body td {
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .modal-footer .btn {
    font-size: 12px !important;
}
body.app-body .debtors-dialog .modal-header .eyebrow,
body.app-body .notification-popover-head small,
body.app-body .notification-item-copy small,
body.app-body .notification-item-copy em,
body.app-body .notification-item-date,
body.app-body .notification-empty span,
body.app-body .notification-popover-footer a {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}

/* ------------------------------------------------------------------------
   11. Empty states and utility text
   ------------------------------------------------------------------------ */
body.app-body .empty-state h3,
body.app-body .unified-empty-message h3 {
    font-size: 15px !important;
    font-weight: var(--mb-weight-semibold) !important;
}
body.app-body .empty-state p,
body.app-body .unified-empty-message p {
    font-size: 12.5px !important;
    font-weight: var(--mb-weight-regular) !important;
}
body.app-body .footer {
    font-size: var(--mb-type-meta) !important;
    font-weight: var(--mb-weight-regular) !important;
}

/* ------------------------------------------------------------------------
   12. Mobile: preserve hierarchy while avoiding desktop-sized controls
   ------------------------------------------------------------------------ */
@media (max-width: 760px) {
    body.app-body { font-size: var(--mb-type-body-mobile) !important; }
    body.app-body .module-topbar-title,
    body.app-body .topbar-medibox-title { font-size: 15.5px !important; }
    body.app-body .global-patient-search input { font-size: 13px !important; }
    body.app-body .topbar-practitioner-copy strong,
    body.app-body .topbar-clinic-context strong { font-size: 11px !important; }
    body.app-body .topbar-practitioner-switch small,
    body.app-body .topbar-clinic-context small { font-size: 9px !important; }

    body.app-body .mobile-nav-item > span:last-child {
        font-size: 10px !important;
        font-weight: var(--mb-weight-medium) !important;
    }
    body.app-body table.mobile-card-table td::before {
        font-size: 10px !important;
        font-weight: var(--mb-weight-semibold) !important;
    }
    body.app-body .patient-profile-v2-title-line h1 { font-size: 17px !important; }
    body.app-body .patient-profile-v2-tab { font-size: 11.5px !important; }
    body.app-body .data-table tbody td,
    body.app-body .reference-data-table tbody td,
    body.app-body .module-unified-table tbody td { font-size: 12px !important; }
    body.app-body .modal-header h2 { font-size: 16px !important; }
}

/* Login screen uses the same weight logic even though it has a separate body. */
body.auth-body {
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.auth-body .login-copy h2 { font-weight: var(--mb-weight-semibold) !important; }
body.auth-body .login-copy p { font-size: 15px !important; font-weight: var(--mb-weight-regular) !important; }
body.auth-body .login-form-header h1 { font-size: 26px !important; font-weight: var(--mb-weight-strong) !important; }
body.auth-body .field > span { font-size: var(--mb-type-label) !important; font-weight: var(--mb-weight-semibold) !important; }
body.auth-body .field input { font-size: var(--mb-type-control) !important; font-weight: var(--mb-weight-regular) !important; }
