/* ============================================================================
   VYTALGUARD PLATFORM READABLE EXPERIENCE v2.21.1

   Final readable cascade and single form/list input authority.
   - Makes one shared layer authoritative for form and list entry controls.
   - Uses 40px desktop controls and 44px mobile/touch controls.
   - Prevents mobile focus zoom by keeping editable controls at 16px.
   - Raises undersized operational text across filters, lists, forms, workspace,
     dashboard, communications, modals, and Vee.
   - Does not target card containers, grids, form buttons, or record actions.
============================================================================ */

:root {
  --vg-readable-micro: .75rem;
  --vg-readable-caption: .8125rem;
  --vg-readable-support: .875rem;
  --vg-readable-control: .875rem;
  --vg-readable-section: .9375rem;
  --vg-readable-title: 1.125rem;
  --vg-readable-mobile-control: 1rem;
  --vg-input-authority-height: 40px;
  --vg-input-authority-mobile-height: 44px;
  --vg-input-authority-textarea: 96px;
  --vg-input-authority-mobile-textarea: 112px;
  --vg-input-authority-multiselect: 112px;
  --vg-input-authority-padding: 8px 11px;
  --vg-input-authority-text: var(--vg-text, #172033);
  --vg-input-authority-placeholder: #64748b;
  --vg-input-authority-border: #8492a6;
  --vg-input-authority-border-hover: #64748b;
  --vg-input-authority-focus: var(--vg-primary, #2563eb);
  --vg-input-authority-focus-ring: rgba(37, 99, 235, .18);
  --vg-form-height: var(--vg-input-authority-height);
  --vg-form-font: var(--vg-readable-control);
}

.module-form-page,
.module-form-card,
.module-form-mount {
  --mf-control-height: var(--vg-input-authority-height);
}

.smart-filter-host {
  --sf-control-height: var(--vg-input-authority-height);
}

[data-theme="dark"],
[data-bs-theme="dark"] {
  --vg-input-authority-text: #e2e8f0;
  --vg-input-authority-placeholder: #cbd5e1;
  --vg-input-authority-border: #64748b;
  --vg-input-authority-border-hover: #94a3b8;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ============================================================================
   SINGLE FORM AND LIST INPUT AUTHORITY

   This is the only final-cascade block that owns entry-control type size,
   control height, readable border, placeholder, and focus treatment.
   Card-view controls, check/radio controls, files, buttons, and record actions
   are deliberately excluded.
============================================================================ */

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .list-display-toolbar,
  .modal-content form,
  .app-body form
) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
  select,
  textarea,
  .form-control,
  .form-select,
  .module-form-control,
  .module-form-input,
  .module-form-select,
  .module-form-textarea,
  .smart-filter-control,
  .smart-filter-input,
  .smart-filter-select,
  .ts-wrapper.single .ts-control
):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *) {
  box-sizing: border-box !important;
  color: var(--vg-input-authority-text) !important;
  font-family: inherit !important;
  font-size: var(--vg-readable-control) !important;
  font-weight: 550 !important;
  line-height: 1.4 !important;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .list-display-toolbar,
  .modal-content form,
  .app-body form
) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
  select:not([multiple]):not([size]),
  .form-control:not(textarea),
  .form-select:not([multiple]):not([size]),
  .module-form-control:not(textarea),
  .module-form-input,
  .module-form-select:not([multiple]):not([size]),
  .smart-filter-control:not(textarea),
  .smart-filter-input,
  .smart-filter-select:not([multiple]):not([size]),
  .ts-wrapper.single .ts-control
):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *) {
  height: var(--vg-input-authority-height) !important;
  min-height: var(--vg-input-authority-height) !important;
  max-height: var(--vg-input-authority-height) !important;
  padding: var(--vg-input-authority-padding) !important;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .list-display-toolbar,
  .modal-content form,
  .app-body form
) :is(
  select:not([multiple]):not([size]),
  .form-select:not([multiple]):not([size]),
  .module-form-select:not([multiple]):not([size]),
  .smart-filter-select:not([multiple]):not([size])
):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *) {
  padding-right: var(--vg-input-authority-select-padding-right, 36px) !important;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .modal-content form,
  .app-body form
) :is(textarea, textarea.form-control, .module-form-textarea):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *) {
  /* GLOBAL TEXTAREA NATIVE RESIZE AUTHORITY v1.0.0
     Keep height non-important so the browser drag handle can set an
     inline height. The shared minimum remains authoritative. */
  height: auto;
  min-height: var(--vg-input-authority-textarea) !important;
  max-height: none !important;
  padding: var(--vg-input-authority-textarea-padding, 10px 11px) !important;
  resize: vertical;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .modal-content form,
  .app-body form
) :is(select[multiple], select[size]:not([size="1"]), .form-select[multiple], .module-form-select[multiple]):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *) {
  height: auto !important;
  min-height: var(--vg-input-authority-multiselect) !important;
  max-height: none !important;
  padding: 8px 11px !important;
}

html body .smart-filter-host .smart-filter-field__icon + :is(
  .smart-filter-control,
  .smart-filter-input,
  .smart-filter-select
) {
  padding-left: 32px !important;
}

html body .smart-filter-host :is(
  .smart-filter-control,
  .smart-filter-input,
  .smart-filter-select
) {
  padding-right: 32px !important;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .list-display-toolbar,
  .modal-content form,
  .app-body form
) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
  select,
  textarea,
  .form-control,
  .form-select,
  .module-form-control,
  .module-form-input,
  .module-form-select,
  .module-form-textarea,
  .smart-filter-control,
  .smart-filter-input,
  .smart-filter-select,
  .ts-wrapper.single .ts-control
):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *):not(.is-invalid):not(.is-valid):not([aria-invalid="true"]):not(:disabled):not([readonly]) {
  border-color: var(--vg-input-authority-border) !important;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .list-display-toolbar,
  .modal-content form,
  .app-body form
) :is(input, select, textarea, .form-control, .form-select, .module-form-control, .module-form-input, .module-form-select, .module-form-textarea, .smart-filter-control, .smart-filter-input, .smart-filter-select, .ts-wrapper.single .ts-control):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *):not(:disabled):not([readonly]):hover {
  border-color: var(--vg-input-authority-border-hover) !important;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .list-display-toolbar,
  .modal-content form,
  .app-body form
) :is(input, select, textarea, .form-control, .form-select, .module-form-control, .module-form-input, .module-form-select, .module-form-textarea, .smart-filter-control, .smart-filter-input, .smart-filter-select, .ts-wrapper.single .ts-control):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not(.record-card *):not(.entity-card *):not(.data-record-card *):not(.card-list *):not(.summary-card *):not(.workspace-module-card *):focus {
  border-color: var(--vg-input-authority-focus) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px var(--vg-input-authority-focus-ring) !important;
}

html body :is(
  .module-form,
  .form-container,
  .form-grid,
  .filter-body,
  .smart-filter-host,
  .modal-content form,
  .app-body form
) :is(input, textarea, .form-control, .module-form-control, .module-form-input, .module-form-textarea, .smart-filter-control, .smart-filter-input)::placeholder {
  color: var(--vg-input-authority-placeholder) !important;
  -webkit-text-fill-color: var(--vg-input-authority-placeholder) !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

html body :is(
  .module-form-suggestions,
  .smart-filter-suggestions,
  .suggestions-list,
  .ts-dropdown
) :is(.suggestion-item, .autocomplete-item, .option, [role="option"]) {
  min-height: 40px !important;
  font-size: var(--vg-readable-support) !important;
  line-height: 1.4 !important;
}

@media screen and (max-width: 767.98px) {
  :root {
    --vg-readable-control: var(--vg-readable-mobile-control);
    --vg-input-authority-height: var(--vg-input-authority-mobile-height);
    --vg-input-authority-textarea: var(--vg-input-authority-mobile-textarea);
  }

  html body :is(
    .module-form-suggestions,
    .smart-filter-suggestions,
    .suggestions-list,
    .ts-dropdown
  ) :is(.suggestion-item, .autocomplete-item, .option, [role="option"]) {
    min-height: var(--vg-input-authority-mobile-height) !important;
    font-size: var(--vg-readable-mobile-control) !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  :root {
    --vg-input-authority-height: var(--vg-input-authority-mobile-height);
    --vg-input-authority-textarea: var(--vg-input-authority-mobile-textarea);
  }

  html body :is(
    .module-form-suggestions,
    .smart-filter-suggestions,
    .suggestions-list,
    .ts-dropdown
  ) :is(.suggestion-item, .autocomplete-item, .option, [role="option"]) {
    min-height: var(--vg-input-authority-mobile-height) !important;
  }
}

@media (forced-colors: active) {
  html body :is(
    .module-form,
    .form-container,
    .form-grid,
    .filter-body,
    .smart-filter-host,
    .list-display-toolbar,
    .modal-content form,
    .app-body form
  ) :is(input, select, textarea, .form-control, .form-select, .ts-wrapper.single .ts-control):focus {
    border-color: Highlight !important;
    outline: 2px solid Highlight !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
  }
}

/* ============================================================================
   COMMON OPERATIONAL DROPDOWNS AND FEEDBACK
============================================================================ */

.app-body :where(.dropdown-menu .dropdown-item, .list-export-menu .dropdown-item),
.module-form-page :where(.dropdown-menu .dropdown-item),
#fieldSelectorDropdown :where(button, label.dropdown-item, .dropdown-item) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

#fieldSelectorDropdown button {
  font-size: var(--vg-readable-caption) !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
}

.app-body :where(.toast-body, .alert, .module-form-message, .list-empty-state p),
.modal :where(.modal-body, .modal-body p),
.vg-tooltip,
.tooltip-inner {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.45 !important;
}

.modal .modal-title {
  font-size: var(--vg-readable-title) !important;
  line-height: 1.25 !important;
}

.modal :where(.btn, .form-check-label) {
  font-size: var(--vg-readable-caption) !important;
}

/* ============================================================================
   SHARED SMART FILTERS
============================================================================ */

.smart-filter-host :is(.smart-filter-field__label, .smart-filter-label) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.3 !important;
}

.smart-filter-host :is(
  .smart-filter-action,
  .module-filter-choose,
  .module-filter-manage,
  .module-filter-clear-all,
  .smart-filter-chip,
  .smart-filter-chip__label,
  .smart-filter-chip__value
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.3 !important;
}

.smart-filter-host .smart-filter-suggestions > *,
.smart-filter-host :is(.suggestion-item, .autocomplete-item) {
  font-size: var(--vg-readable-support) !important;
  line-height: 1.4 !important;
}

.module-filter-customizer__header h3 {
  font-size: 1rem !important;
}

.module-filter-customizer__header p,
.module-filter-customizer__check,
.module-filter-customizer__empty,
.module-filter-customizer :where(button, .btn) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

/* ============================================================================
   SHARED LIST PAGES — TABLES AND TOOLBARS ONLY
   Card-view content selectors are intentionally absent.
============================================================================ */

.list-display-toolbar :is(
  .btn,
  .records-per-page-control__label,
  .records-per-page-control__suffix,
  .result-count
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.3 !important;
}

:where(.module-list-card, .patient-list-card) .module-summary-section__eyebrow {
  font-size: var(--vg-readable-micro) !important;
}

:where(.module-list-card, .patient-list-card) .module-summary-section__title {
  font-size: 1.0625rem !important;
}

.app-body :is(.table, .data-table, .results-table) {
  font-size: var(--vg-readable-support) !important;
  line-height: 1.4 !important;
}

.app-body :is(.table, .data-table, .results-table) thead th {
  font-size: var(--vg-readable-support) !important;
  line-height: 1.3 !important;
}

.app-body :is(.table, .data-table, .results-table) :where(
  .secondary-cell,
  td small,
  .status-badge,
  .badge
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

.app-body :is(.table, .data-table, .results-table) :where(.primary-cell, .entity-name) {
  font-size: var(--vg-readable-support) !important;
}

:where(.pagination, .pagination-controls) :where(.page-link, button, a),
.list-empty-state :where(h2, p),
.module-list-card :where(.table-toolbar, .results-toolbar) :where(.btn, .form-control, .form-select) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

/* ============================================================================
   SHARED MODULE FORMS
============================================================================ */

.module-form-header__eyebrow {
  font-size: var(--vg-readable-micro) !important;
}

.module-form-header__title {
  font-size: var(--vg-readable-title) !important;
  line-height: 1.25 !important;
}

.module-form-header__subtitle,
.module-form-context {
  font-size: var(--vg-readable-support) !important;
  line-height: 1.45 !important;
}

.module-form-section__title {
  font-size: var(--vg-readable-section) !important;
  line-height: 1.3 !important;
}

.module-form-section__subtitle {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

.module-form :where(
  .module-form-field__label,
  .form-label,
  .form-check-label,
  .module-form-switch__content strong
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

.module-form :where(
  .module-form-field__help,
  .module-form-field__error,
  .invalid-feedback,
  .form-text,
  .module-form-switch__content > span,
  .module-form-actions__status,
  .module-form-loading__text span,
  .module-form-bootstrap-error__content span
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

.module-form :where(
  .module-form-action,
  .module-form-info-card__title,
  .module-form-info-card__summary strong,
  .module-form-info-card__status,
  .module-form-loading__text strong,
  .module-form-bootstrap-error__content strong
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

.module-form .module-form-info-card__summary > span,
.module-form .module-form-info-card__badge {
  font-size: var(--vg-readable-micro) !important;
}

/* Legacy forms that have not migrated to the shared module-form renderer. */
.app-body form:not(.module-form) :where(
  .form-label,
  .form-check-label,
  label:not(.btn):not(.dropdown-item)
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

.app-body form:not(.module-form) :where(.form-text, .invalid-feedback, small) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

/* ============================================================================
   MY WORK / COMMAND CENTER
============================================================================ */

.vg-entity-workspace-page :where(.wec-search input, .wp-search input),
.workspace-premium-ready :where(
  .workspace-action-category-wrap select,
  .workspace-navigation-category select
) {
  font-size: var(--vg-readable-control) !important;
  line-height: 1.35 !important;
}

.workspace-premium-ready :where(
  .wec-heading p,
  .wec-panel-head,
  .wec-text-button,
  .wec-record-copy small,
  .wec-record-status,
  .workspace-info-popover,
  .workspace-info-popover p,
  .workspace-mode-switch button,
  .wp-search-status,
  .wp-freshness
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

.workspace-premium-ready :where(
  .wec-record-copy strong,
  .wec-record-copy span,
  .wec-type-pill,
  .wp-section-nav button,
  .workspace-general-area strong,
  .workspace-general-area span,
  .workspace-general-area small
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

.workspace-premium-ready :where(
  .workspace-action-security strong,
  .workspace-action-role,
  .workspace-action-count,
  .workspace-action-category-tabs button,
  .workspace-action-category-wrap label,
  .workspace-action-recommended__label,
  .workspace-action-section-label,
  .workspace-action-button,
  .workspace-action-entity,
  .workspace-action-hub-foot,
  .workspace-action-help,
  .workspace-navigation-category > span,
  .workspace-navigation-total,
  .workspace-navigation-panel .entity-nav-item
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.35 !important;
}

.workspace-premium-ready .workspace-action-button > small {
  font-size: var(--vg-readable-micro) !important;
  line-height: 1.3 !important;
}

.workspace-premium-ready :where(
  .wp-live-title small,
  .wp-metric small,
  .wp-summary-meta,
  .wp-summary-meta small,
  .wp-summary-meta strong,
  .wp-region-count,
  .wp-finance-progress small
) {
  font-size: var(--vg-readable-micro) !important;
  line-height: 1.3 !important;
}

.workspace-premium-ready :where(
  .workspace-record-eyebrow,
  .workspace-record-id,
  .workspace-record-status,
  .workspace-record-fact dt,
  .workspace-record-fact dd,
  .workspace-record-meta,
  .workspace-header-finance-metric span,
  .workspace-header-finance-metric strong,
  .workspace-payroll-currency-code,
  .workspace-payroll-currency-head small,
  .workspace-payroll-status,
  .workspace-payroll-status strong
) {
  font-size: var(--vg-readable-micro) !important;
  line-height: 1.35 !important;
}

.workspace-premium-ready :where(
  .workspace-record-title,
  .workspace-payroll-currency-head strong,
  .workspace-header-identity h1,
  .workspace-header-identity h2
) {
  font-size: var(--vg-readable-title) !important;
  line-height: 1.25 !important;
}

/* ============================================================================
   DASHBOARD
============================================================================ */

body.vg-dashboard-page .app-body :where(
  .dashboard-subtitle,
  .dashboard-meta,
  .kpi-label,
  .kpi-dates,
  .kpi-summary,
  .schedule-time,
  .schedule-meta,
  .schedule-status,
  .activity-meta,
  .activity-time,
  .notification-time,
  .module-helper,
  .workspace-info-label,
  .account-info-label,
  .profile-info-label,
  .workspace-activity-meta,
  .workspace-activity-time,
  .workspace-schedule-meta,
  .workspace-schedule-time,
  .workspace-schedule-status,
  .workspace-stat-label,
  .productivity-summary-label,
  .bookmark-meta,
  .recent-page-meta,
  .recent-page-time,
  .security-status-description,
  .security-score-description,
  .announcement-date,
  .text-muted,
  small
) {
  font-size: var(--vg-readable-micro) !important;
  line-height: 1.35 !important;
}

body.vg-dashboard-page .app-body :where(
  .kpi-title,
  .schedule-title,
  .activity-title,
  .notification-title,
  .dashboard-alert-title,
  .workspace-activity-title,
  .workspace-schedule-title,
  .favorite-module-name,
  .workspace-application-name,
  .bookmark-title,
  .recent-page-title,
  .security-status-title,
  .security-score-title,
  .announcement-title,
  .announcement-message
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

body.vg-dashboard-page .app-body :where(.badge, .status-badge, .schedule-status) {
  font-size: var(--vg-readable-micro) !important;
}

body.vg-dashboard-page .app-body :where(.dashboard-table, .dashboard-section table) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

body.vg-dashboard-page .app-body :where(.dashboard-table, .dashboard-section table) thead th {
  font-size: var(--vg-readable-micro) !important;
}

body.vg-dashboard-page #dashboard-calendar .calendar-day,
body.vg-dashboard-page #dashboard-calendar .calendar-day.header {
  font-size: var(--vg-readable-micro) !important;
}

body.vg-dashboard-page #dashboard-charts :where(
  .apexcharts-title-text,
  .apexcharts-subtitle-text,
  .apexcharts-xaxis-label,
  .apexcharts-yaxis-label,
  .apexcharts-legend-text,
  .apexcharts-tooltip-title,
  .apexcharts-tooltip-series-group
) {
  font-size: var(--vg-readable-micro) !important;
}

/* ============================================================================
   COMMUNICATIONS AND MESSAGES
============================================================================ */

body.communications-page :is(
  .overview-stat small,
  .sidebar-count,
  .conversation-time,
  .conversation-tag,
  .mode-count,
  .ticket-source-badge,
  .ticket-status-badge,
  .ticket-priority-badge,
  .chat-heading-copy > p,
  .chat-presence,
  .message-sender,
  .message-meta,
  .message-time,
  .ticket-facts dt,
  .ticket-facts dd
),
.messages-layout :is(
  .conversation-time,
  .conversation-badge,
  .message-meta,
  .message-time,
  .message-status,
  .composer-hints,
  .attachment-meta,
  .queue-meta
) {
  font-size: var(--vg-readable-micro) !important;
  line-height: 1.35 !important;
}

body.communications-page :is(
  .conversation-name,
  .conversation-message,
  .message-text,
  .ticket-identity-card h3
),
.messages-layout :is(
  .conversation-name,
  .conversation-message,
  .message-text,
  .attachment-name,
  .empty-description
) {
  font-size: var(--vg-readable-support) !important;
  line-height: 1.45 !important;
}

/* ============================================================================
   VEE AND HELP INTELLIGENCE
============================================================================ */

.vg-intel-panel :where(
  .vg-intel-sub,
  .vg-intel-brand-line,
  .vg-intel-section-title,
  .vg-intel-card-summary,
  .vg-intel-readiness-heading,
  .vg-intel-readiness-summary,
  .vg-intel-readiness-next,
  .vg-intel-feedback-label,
  .vg-intel-feedback-reason-label,
  .vg-intel-tab-label,
  .vg-intel-disclosure-label
) {
  font-size: var(--vg-readable-micro) !important;
  line-height: 1.35 !important;
}

.vg-intel-panel :where(
  .vg-intel-title,
  .vg-intel-card-title,
  .vg-intel-detail-title,
  .vg-intel-detail-text,
  .vg-intel-answer,
  .vg-intel-answer-section-title,
  .vg-intel-answer-section-body,
  button:not(.vg-intel-close)
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

.help-intelligence-page :where(
  .help-pane-eyebrow,
  .help-article-card-meta,
  .help-language-badge,
  .help-scope-badge,
  .help-type-pill,
  .hi-status-badge,
  .hi-review-badge,
  .help-page-label
) {
  font-size: var(--vg-readable-micro) !important;
  line-height: 1.3 !important;
}

.help-intelligence-page :where(
  .help-pane-header,
  .help-article-card-heading,
  .help-article-subtitle,
  .help-table-meta,
  .help-setting,
  .help-field-option,
  .hi-article-item-title,
  .hi-article-item-meta
) {
  font-size: var(--vg-readable-caption) !important;
  line-height: 1.4 !important;
}

/* ============================================================================
   DEVICE-SPECIFIC ACCESSIBILITY
============================================================================ */

@media screen and (max-width: 767.98px) {
  .vg-entity-workspace-page :where(.wec-search input, .wp-search input),
  .workspace-premium-ready :where(
    .workspace-action-category-wrap select,
    .workspace-navigation-category select
  ) {
    font-size: var(--vg-readable-mobile-control) !important;
  }
}

@media screen and (min-width: 1400px) {
  .smart-filter-host :is(.smart-filter-field__label, .smart-filter-label),
  .module-form :where(.module-form-field__label, .form-label, .form-check-label),
  .list-display-toolbar :is(.btn, .records-per-page-control__label, .records-per-page-control__suffix),
  .workspace-premium-ready :where(.workspace-action-button, .workspace-navigation-panel .entity-nav-item) {
    font-size: var(--vg-readable-support) !important;
  }
}

/* ============================================================================
   COMPACT LIST-PAGE CONTROLS v1.0.0

   Keeps the established readable type scale while removing excess height,
   padding, and whitespace from list-page headers, filters, and toolbars.
   Record cards, tables, summaries, and module forms are intentionally absent.
============================================================================ */

:where(.module-list-card, .patient-list-card):has(
  .smart-filter-host,
  .list-display-toolbar
) {
  --vg-list-control-height: 36px;
  --vg-list-mobile-control-height: 40px;
}

@media screen and (min-width: 768px) {
  body[data-page="admissions-list"] [data-admission-filters]
  :is(input:not([type="checkbox"]):not([type="radio"]), select) {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  body[data-page="admissions-list"]
  :is([data-admission-filters], .app-hero-header) .btn {
    min-height: 36px !important;
    height: 36px !important;
    padding: 5px 10px !important;
  }

  body[data-page="admissions-list"] .app-body > section.card:first-of-type > .card-body {
    padding: 12px !important;
  }

  :where(.module-list-card, .patient-list-card):has(
    .smart-filter-host,
    .list-display-toolbar
  ) > .card-header {
    min-height: 72px !important;
    gap: 10px !important;
    padding: 12px 16px !important;
  }

  :where(.module-list-card, .patient-list-card):has(
    .smart-filter-host,
    .list-display-toolbar
  ) > .card-header :is(.btn, a.btn, button) {
    min-height: var(--vg-list-control-height) !important;
    height: var(--vg-list-control-height) !important;
    padding: 5px 11px !important;
  }

  :where(.module-list-card, .patient-list-card):has(
    .smart-filter-host,
    .list-display-toolbar
  ) > .card-body {
    padding: 12px !important;
  }

  :where(.module-list-card, .patient-list-card) .smart-filter-host {
    --sf-control-height: var(--vg-list-control-height);
    margin-bottom: 9px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .smart-filter-host :is(.smart-filter__toolbar, [data-smart-filter-root] > .smart-filter__toolbar) {
    gap: 8px !important;
    padding: 9px 10px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .smart-filter-host :is(.smart-filter__quick, .smart-filter__advanced-grid) {
    gap: 7px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .smart-filter-host .smart-filter-field__label {
    min-height: 14px !important;
    margin-bottom: 2px !important;
  }

  html body :where(.module-list-card, .patient-list-card)
  .smart-filter-host :is(
    .smart-filter-control,
    .smart-filter-input,
    .smart-filter-select
  ) {
    height: var(--vg-list-control-height) !important;
    min-height: var(--vg-list-control-height) !important;
    max-height: var(--vg-list-control-height) !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .smart-filter-host .smart-filter-action {
    height: var(--vg-list-control-height) !important;
    min-height: var(--vg-list-control-height) !important;
    max-height: var(--vg-list-control-height) !important;
    padding: 5px 9px !important;
  }

  :where(.module-list-card, .patient-list-card) .list-display-toolbar {
    min-height: 48px !important;
    gap: 7px !important;
    margin-bottom: 10px !important;
    padding: 6px 9px !important;
  }

  :where(.module-list-card, .patient-list-card) .list-display-toolbar__primary {
    gap: 6px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .list-display-toolbar :is(.btn, button, a.btn) {
    min-height: var(--vg-list-control-height) !important;
    height: var(--vg-list-control-height) !important;
    padding: 5px 9px !important;
  }

  :where(.module-list-card, .patient-list-card) .view-mode-control {
    gap: 2px !important;
    padding: 2px !important;
  }

  html body :where(.module-list-card, .patient-list-card)
  .list-display-toolbar :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select:not([multiple]):not([size]),
    .form-control:not(textarea),
    .form-select:not([multiple]):not([size])
  ) {
    height: var(--vg-list-control-height) !important;
    min-height: var(--vg-list-control-height) !important;
    max-height: var(--vg-list-control-height) !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  :where(.module-list-card, .patient-list-card) .result-count {
    min-height: 30px !important;
    padding: 4px 9px !important;
  }
}

@media screen and (max-width: 767.98px) {
  body[data-page="admissions-list"] [data-admission-filters]
  :is(input:not([type="checkbox"]):not([type="radio"]), select) {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: var(--vg-readable-mobile-control) !important;
  }

  body[data-page="admissions-list"]
  :is([data-admission-filters], .app-hero-header) .btn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 5px 8px !important;
  }

  body[data-page="admissions-list"] .app-body > section.card:first-of-type > .card-body {
    padding: 8px !important;
  }

  :where(.module-list-card, .patient-list-card):has(
    .smart-filter-host,
    .list-display-toolbar
  ) > .card-header {
    gap: 8px !important;
    padding: 10px !important;
  }

  :where(.module-list-card, .patient-list-card):has(
    .smart-filter-host,
    .list-display-toolbar
  ) > .card-header :is(.btn, a.btn, button) {
    min-height: 38px !important;
    height: 38px !important;
    padding: 5px 9px !important;
  }

  :where(.module-list-card, .patient-list-card):has(
    .smart-filter-host,
    .list-display-toolbar
  ) > .card-body {
    padding: 8px !important;
  }

  :where(.module-list-card, .patient-list-card) .smart-filter-host {
    --sf-control-height: var(--vg-list-mobile-control-height);
    margin-bottom: 7px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .smart-filter-host :is(.smart-filter__toolbar, [data-smart-filter-root] > .smart-filter__toolbar) {
    gap: 7px !important;
    padding: 8px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .smart-filter-host :is(.smart-filter__quick, .smart-filter__advanced-grid) {
    gap: 6px !important;
  }

  html body :where(.module-list-card, .patient-list-card)
  .smart-filter-host :is(
    .smart-filter-control,
    .smart-filter-input,
    .smart-filter-select
  ) {
    height: var(--vg-list-mobile-control-height) !important;
    min-height: var(--vg-list-mobile-control-height) !important;
    max-height: var(--vg-list-mobile-control-height) !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: var(--vg-readable-mobile-control) !important;
  }

  :where(.module-list-card, .patient-list-card)
  .smart-filter-host .smart-filter-action {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 5px 7px !important;
  }

  :where(.module-list-card, .patient-list-card) .list-display-toolbar {
    min-height: 0 !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    padding: 6px !important;
  }

  :where(.module-list-card, .patient-list-card) .list-display-toolbar__primary {
    gap: 5px !important;
  }

  :where(.module-list-card, .patient-list-card)
  .list-display-toolbar :is(.btn, button, a.btn) {
    min-height: 38px !important;
    height: 38px !important;
    padding: 5px 8px !important;
  }

  html body :where(.module-list-card, .patient-list-card)
  .list-display-toolbar :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select:not([multiple]):not([size]),
    .form-control:not(textarea),
    .form-select:not([multiple]):not([size])
  ) {
    height: var(--vg-list-mobile-control-height) !important;
    min-height: var(--vg-list-mobile-control-height) !important;
    max-height: var(--vg-list-mobile-control-height) !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: var(--vg-readable-mobile-control) !important;
  }
}

/* ============================================================================
   GLOBAL COMPACT SHOW/ROWS CONTROL v1.0.2

   The readable input authority intentionally keeps ordinary form controls
   large. This exception restores the compact list-toolbar selector everywhere
   that uses the shared records-per-page component.
============================================================================ */

html body .list-display-toolbar .records-per-page-control select.records-per-page-select {
  --vg-input-authority-height: 30px;
  --vg-input-authority-padding: 3px 20px 3px 7px;
  --vg-input-authority-select-padding-right: 20px;
  --vg-list-control-height: 30px;
  --vg-readable-control: var(--vg-readable-caption);
  flex: 0 0 72px !important;
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  margin: 0 !important;
  padding-right: 20px !important;
  padding-left: 7px !important;
}

@media screen and (min-width: 768px) {
  html body .list-display-toolbar .records-per-page-control {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: 0 !important;
    min-height: 36px !important;
    height: 36px !important;
    max-height: 36px !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 2px 5px !important;
  }

  html body .list-display-toolbar :is(
    .records-per-page-control__label,
    .records-per-page-control__suffix
  ) {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: var(--vg-readable-caption) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  html body .list-display-toolbar .records-per-page-control select.records-per-page-select {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    font-size: var(--vg-readable-caption) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }
}
/* ============================================================================
   GLOBAL COMPACT SMART FILTER CONTROLS v1.0.0

   Desktop inputs and selects match the shared filter-action height. Readable
   text sizes remain unchanged. Component variables reduce only excess control
   height and internal padding; ordinary application forms remain untouched.
============================================================================ */

.smart-filter-host {
  --vg-input-authority-height: 36px;
  --vg-input-authority-padding: 5px 30px 5px 10px;
  --vg-input-authority-select-padding-right: 30px;
  --sf-control-height: 36px;
}

.smart-filter-host .smart-filter-field__icon + :is(
  .smart-filter-control,
  .smart-filter-input,
  .smart-filter-select
) {
  --vg-input-authority-padding: 5px 30px 5px 31px;
}

@media screen and (max-width: 767.98px) {
  .smart-filter-host {
    --vg-input-authority-height: 40px;
    --vg-input-authority-mobile-height: 40px;
    --vg-input-authority-padding: 5px 30px 5px 10px;
    --vg-list-mobile-control-height: 40px;
    --sf-control-height: 40px;
  }

  .smart-filter-host .smart-filter-field__icon + :is(
    .smart-filter-control,
    .smart-filter-input,
    .smart-filter-select
  ) {
    --vg-input-authority-padding: 5px 30px 5px 31px;
  }

  html body .smart-filter-host .smart-filter-action {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }
}
/* ============================================================================
   GLOBAL COMPACT MODULE FORM CONTROLS v1.0.0

   Shared module forms use compact, coordinated control heights while retaining
   the readable desktop and mobile text sizes. Textareas remain multi-line and
   vertically resizable, but begin with less unused height and padding.
============================================================================ */

.module-form-page,
.module-form-card,
.module-form-mount,
.module-form {
  --vg-input-authority-height: 36px;
  --vg-input-authority-padding: 5px 10px;
  --vg-input-authority-select-padding-right: 30px;
  --vg-input-authority-textarea: 64px;
  --vg-input-authority-textarea-padding: 7px 10px;
  --vg-form-height: 36px;
  --mf-control-height: 36px;
}

html body .module-form .module-form-action {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 5px 10px !important;
}

@media screen and (max-width: 767.98px) {
  .module-form-page,
  .module-form-card,
  .module-form-mount,
  .module-form {
    --vg-input-authority-height: 40px;
    --vg-input-authority-mobile-height: 40px;
    --vg-input-authority-padding: 5px 10px;
    --vg-input-authority-select-padding-right: 30px;
    --vg-input-authority-textarea: 72px;
    --vg-input-authority-mobile-textarea: 72px;
    --vg-input-authority-textarea-padding: 7px 10px;
    --vg-form-height: 40px;
    --mf-control-height: 40px;
  }

  html body .module-form .module-form-action {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 5px 10px !important;
  }
}
/* Billable Items landscape-phone anti-zoom authority. Keep this after the
   compact list rules so coarse pointers retain a 16px editable text size. */
@media (hover: none) and (pointer: coarse) {
  html body[data-page="billable-items-list"]
  :is(.smart-filter-host, .list-display-toolbar)
  :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
    select,
    textarea,
    .form-control,
    .form-select,
    .smart-filter-control,
    .smart-filter-input,
    .smart-filter-select
  ) {
    min-block-size: 40px !important;
    font-size: 16px !important;
  }
}
