/* Final screen palette adapter. Appearance only: never sets display, dimensions,
   order, overflow, position, content or pointer-events. Density stays page-owned. */
@media screen {
    html[data-theme]:not([data-theme="dark"]) {
        --primary: var(--orange-500);
        --jf-primary: var(--primary); --jf-primary-dark: var(--link); --jf-primary-soft: var(--primary-soft); --jf-primary-ink: var(--primary-ink);
        --jf-secondary: var(--gray-700); --jf-secondary-soft: var(--surface-tertiary);
        --jf-tertiary: var(--highlight); --jf-tertiary-soft: var(--highlight-soft);
        --jf-success: var(--status-success); --jf-success-soft: var(--status-success-soft);
        --jf-error: var(--status-error); --jf-error-soft: var(--status-error-soft);
        --jf-info: var(--status-info); --jf-info-soft: var(--status-info-soft);
        --jf-warning: var(--status-warning); --jf-warning-soft: var(--status-warning-soft);
        --jf-bg: var(--app-background); --jf-bg-deep: var(--surface-tertiary);
        --jf-surface: var(--surface-primary); --jf-surface-2: var(--surface-secondary); --jf-surface-muted: var(--surface-tertiary);
        --jf-text: var(--text-primary); --jf-text-soft: var(--text-secondary); --jf-text-muted: var(--text-readable-muted);
        --jf-border: var(--border-default); --jf-border-strong: var(--border-strong); --jf-divider: var(--border-light);
        --jf-hero: linear-gradient(120deg, var(--navigation-bg), var(--navigation-bg-hover));
        --jf-row-even: var(--surface-primary); --jf-row-odd: var(--table-alternate); --jf-row-hover: var(--table-hover);
        --jf-nav-icon: var(--link); --jf-nav-accent: var(--primary-soft);
        --jf-shadow-rest: var(--shadow-card); --jf-shadow-card: var(--shadow-card); --jf-shadow-hover: var(--shadow-dropdown); --jf-shadow-overlay: var(--shadow-modal);
        --jf-radius-sm: var(--radius-control); --jf-radius-md: var(--radius-table); --jf-radius-lg: var(--radius-card); --jf-radius-xl: var(--radius-modal);
        --jt-card: var(--surface-primary); --jt-text: var(--text-primary); --jt-muted: var(--text-secondary);
        --jt-border: var(--border-default); --jt-header: var(--table-header); --jt-zebra: var(--table-alternate);
        --jt-primary: var(--primary); --jt-primary-hover: var(--link); --jt-primary-soft: var(--primary-soft);
        --jt-hover: var(--table-hover); --jt-selected: var(--table-selected); --jt-shadow: var(--shadow-card);
        --jt-org-bg: var(--org-share-bg); --jt-org-alt: var(--org-share-bg); --jt-org-head: var(--org-share-bg);
        --jt-org-hover: var(--table-selected); --jt-org-selected: var(--table-selected); --jt-org-border: var(--highlight-border);
        --mud-palette-primary: var(--primary); --mud-palette-primary-rgb: 255,152,0;
        --mud-palette-primary-darken: var(--primary-hover); --mud-palette-primary-lighten: var(--orange-300);
        --mud-palette-primary-hover: var(--primary-soft); --mud-palette-primary-text: var(--primary-ink);
        --mud-palette-secondary: var(--gray-700); --mud-palette-secondary-text: var(--surface-primary);
        --mud-palette-background: var(--app-background); --mud-palette-surface: var(--surface-primary);
        --mud-palette-text-primary: var(--text-primary); --mud-palette-text-secondary: var(--text-secondary);
        --mud-palette-lines-default: var(--border-default); --mud-palette-table-lines: var(--border-default); --mud-palette-divider: var(--border-default);
        --mud-palette-table-hover: var(--table-hover); --mud-palette-table-striped: var(--table-alternate);
        scrollbar-color: var(--gray-400) var(--surface-tertiary);
    }
    html[data-theme]:not([data-theme="dark"]) body { background: var(--app-background); color: var(--text-primary); }
    html[data-theme]:not([data-theme="dark"]) :is(.dahs-topbar, .app-shell__appbar, .mud-appbar) {
        background: var(--navigation-bg) !important; color: var(--navigation-text) !important; border-color: var(--navigation-bg-hover) !important; box-shadow: var(--shadow-card) !important;
    }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) .dahs-topbar :is(h1, .dahs-brand-text h1, .dahs-user-name, .dahs-icon-btn, .mud-icon-button, .dahs-brand-text, .dahs-user) { color: var(--navigation-text) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) .dahs-topbar :is(.dahs-context-eyebrow, .dahs-user-role) { color: var(--navigation-muted) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) .dahs-topbar :is(.dahs-context-trail, .dahs-user-avatar) { background: var(--navigation-bg-hover) !important; color: var(--highlight) !important; border-color: var(--gray-700) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) .dahs-topbar .dahs-icon-btn:hover { background: var(--navigation-bg-hover) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.dahs-sidebar, .dahs-nav-surface) { background: var(--surface-primary) !important; border-color: var(--border-default) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) .dahs-navigation-brand .dahs-navigation-monogram { background: var(--primary) !important; color: var(--primary-ink) !important; box-shadow: var(--shadow-card) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.dahs-nav-child--active, .dahs-nav-item--open, .mud-nav-link.active) { background: var(--primary-soft) !important; color: var(--link) !important; box-shadow: inset -3px 0 var(--primary) !important; }
    html[data-theme]:not([data-theme="dark"]) :is(.mud-button-root, .ep-button) { border-radius: var(--radius-control) !important; box-shadow: none; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.mud-button-filled-primary, .ep-button.ep-primary, .jafam-login__submit) { background: var(--primary) !important; color: var(--primary-ink) !important; border-color: var(--primary-hover) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.mud-button-filled-primary, .ep-button.ep-primary, .jafam-login__submit):hover:not(:disabled) { background: var(--primary-hover) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.mud-button-filled-primary, .ep-button.ep-primary, .jafam-login__submit):active:not(:disabled) { background: var(--primary-active) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.mud-button-text-primary, .mud-button-outlined-primary, .mud-link-primary, .mud-tab-active) { color: var(--link) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.mud-button-root, .ep-button.ep-primary, .jafam-login__submit):disabled { background: var(--surface-tertiary) !important; color: var(--text-disabled) !important; border-color: var(--border-default) !important; }
    html[data-theme]:not([data-theme="dark"]) :is(.mud-input-outlined, .mud-input-outlined-border, .jafam-login__input-wrap) { border-radius: var(--radius-control) !important; border-color: var(--border-strong); }
    html[data-theme]:not([data-theme="dark"]) .mud-input-control:not(.mud-input-error):not(:has(.mud-input-error, .mud-error, [aria-invalid="true"])) .mud-input-outlined:focus-within { box-shadow: var(--focus-ring); }
    html[data-theme]:not([data-theme="dark"]) .mud-input-control:not(.mud-input-error):not(:has(.mud-input-error, .mud-error, [aria-invalid="true"])) .mud-input-outlined:focus-within .mud-input-outlined-border { border-color: var(--primary) !important; }
    html[data-theme]:not([data-theme="dark"]) :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline-color: var(--link) !important; }
    html[data-theme]:not([data-theme="dark"]) :is(.dahs-topbar, .app-shell__appbar, .mud-appbar, .rx-stepwise-brandbar) :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline-color: var(--highlight) !important; }
    html[data-theme]:not([data-theme="dark"]) :is(input, textarea)::placeholder { color: var(--text-readable-muted); }
    html[data-theme]:not([data-theme="dark"]) :is(.mud-card, .office-rx-panel, .outpatient-full-report__panel, .ep-surface) { border-color: var(--border-default) !important; border-radius: var(--radius-card) !important; box-shadow: var(--shadow-card) !important; }
    html[data-theme]:not([data-theme="dark"]) :is(.mud-dialog, .mud-popover) { background: var(--surface-primary); border-color: var(--border-default); box-shadow: var(--shadow-modal); }
    html[data-theme]:not([data-theme="dark"]) .mud-dialog { border-radius: var(--radius-modal) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-dialog-title { background: var(--surface-secondary) !important; color: var(--text-primary) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-popover { box-shadow: var(--shadow-dropdown); }
    html[data-theme]:not([data-theme="dark"]) .mud-menu-item:hover { background: var(--table-selected); }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) :is(.mud-table, .mud-simple-table) .mud-table-head .mud-table-cell:not([style*="background" i]) { background: var(--table-header) !important; color: var(--text-body) !important; border-bottom-color: var(--border-strong) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-table-row:hover > .mud-table-cell:first-child { box-shadow: inset -3px 0 var(--primary); }
    html[data-theme]:not([data-theme="dark"]) .mud-table-row[aria-selected="true"] { background: var(--table-selected) !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) .mud-table .mud-table-cell.jf-org-share { background: var(--org-share-bg) !important; color: var(--org-share-text) !important; font-weight: 700 !important; }
    html[data-theme][data-ui-design]:not([data-theme="dark"]) .mud-table .mud-table-cell.jf-org-share :is(.column-header, .outpatient-full-report__cell-main) { color: var(--org-share-text) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-tab-slider { background: var(--primary) !important; }
    html[data-theme]:not([data-theme="dark"]) :is(.mud-picker-calendar-day.mud-selected, .mud-pagination-item .mud-button-filled-primary) { background: var(--primary) !important; color: var(--primary-ink) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-picker-calendar-day.mud-current { border-color: var(--primary); }
    html[data-theme]:not([data-theme="dark"]) .mud-picker-calendar-day:hover { background: var(--primary-soft); }
    html[data-theme]:not([data-theme="dark"]) .mud-chip-color-success { background: var(--status-success-soft) !important; color: var(--status-success) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-chip-color-error { background: var(--status-error-soft) !important; color: var(--status-error) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-chip-color-info { background: var(--status-info-soft) !important; color: var(--status-info) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-chip-color-warning { background: var(--status-warning-soft) !important; color: var(--status-warning) !important; }
    html[data-theme]:not([data-theme="dark"]) .mud-skeleton { background: var(--gray-200); }
    html[data-theme]:not([data-theme="dark"]) .jafam-login { --login-accent: var(--link); }
    html[data-theme]:not([data-theme="dark"]) .jafam-login__story { background: linear-gradient(145deg, var(--surface-tertiary), var(--border-default)); color: var(--text-primary); }
    html[data-theme]:not([data-theme="dark"]) .jafam-login__feature { background: var(--surface-primary); border-color: var(--border-default); box-shadow: var(--shadow-card); border-radius: var(--radius-card); }
    html[data-theme]:not([data-theme="dark"]) .jafam-login__feature-icon { background: var(--highlight-soft); color: var(--org-share-text); }
}
