/* RH mobile: layout/contrast only; no business rules or record operations. */
@media screen and (max-width:900px){
 html[data-rh-embedded=true] body{padding-bottom:max(148px,env(safe-area-inset-bottom))!important}
 :where(form,.form-grid,.modal-grid,.worker-section-grid,.form-actions,.dialog-actions,.user-form,.lr-heading-actions)>*{min-width:0;box-sizing:border-box}
 :where(form,.modal,dialog,.mini-toolbar,.activity-filters,.om-filters) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){min-width:0;max-width:100%;font-size:16px!important;box-sizing:border-box;scroll-margin-block:78px}
 :where(form,.modal,dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:44px}
 :where(.form-actions,.dialog-actions,.modal footer,dialog footer,.actions,.row-actions){flex-wrap:wrap;gap:8px}
 :where(.form-actions,.dialog-actions,.modal footer,dialog footer,.actions,.row-actions) :is(button,a),:where(.modal,dialog) :is(.close,.close-button){min-height:44px;white-space:normal;line-height:1.35}
 :where(.modal,dialog) :is(.close,.close-button){min-width:44px;flex-shrink:0}
 :is(.collapse-toggle,.table-action,.icon-button,.icon-action,.om-chart-period button){min-width:44px;min-height:44px}
 :is(.om-chart-modes button,.om-chart-peaks button,.om-view-tabs button,.om-vac-view-switch button,#omVacationToday,[data-vac-month]){min-height:44px}
 :is(.collapse-toggle,.table-action,.icon-button,.icon-action,.sort-header,.tabs button,.segmented button,.collapse-button,.om-text-button,.tab,.om-chart-period button,.om-chart-modes button,.om-chart-peaks button,.om-view-tabs button,.om-vac-view-switch button,#omVacationToday,[data-vac-month]){min-height:44px!important}
 :where(form,.modal,dialog) label:has(>input[type=checkbox]),:where(form,.modal,dialog) label:has(>input[type=radio]){min-height:44px;align-content:center}
 :where(.modal>.dialog,.modal>.modal-card,dialog){max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overscroll-behavior:contain}
 :where(.modal>.dialog,.modal>.modal-card)>header,:where(dialog) .dialog-head{position:sticky;top:0;z-index:4;background:var(--rh-mobile-surface,#f8fcfc)}
 :where(.modal>.dialog,.modal>.modal-card) footer,:where(dialog) .dialog-actions{position:sticky;bottom:0;z-index:3;background:var(--rh-mobile-surface,#f8fcfc);padding-bottom:max(12px,env(safe-area-inset-bottom))}
 :where(#omMonthPanel,.movement-calendar,.movement-calendar-popup){max-height:min(440px,75dvh);overflow-y:auto;overscroll-behavior:contain}
 :is(.catalog-suggestions,[role=listbox]){max-height:min(280px,40dvh);overflow-y:auto;overscroll-behavior:contain}
 .catalog-suggestions [role=option]{min-height:44px}
 .lr-heading-actions{min-width:0;max-width:100%;flex-wrap:wrap}.lr-heading-actions :is(input,select){min-width:0;max-width:100%}
 body.rh-mobile-dialog-open :is(#attentionResume,#rhOfflineStatus,#mobileSidebarToggle){visibility:hidden!important;pointer-events:none!important}
}
@media screen and (max-width:600px){
 :where(#userForm,#contractorModalForm,#workerModalForm,#questionForm,.request-edit-form,.generate-card,.stacked-form) .form-grid{grid-template-columns:minmax(0,1fr)!important}
 :where(#userForm,#contractorModalForm,#workerModalForm,#questionForm,.request-edit-form,.generate-card,.stacked-form) .form-grid>[class*=span-]{grid-column:1/-1!important}
 :where(.form-actions,.dialog-actions,.modal footer,dialog footer) :is(button,a){flex:1 1 130px;justify-content:center;text-align:center}
}
@media screen and (max-width:760px){
 html[data-rh-mobile-menu=true] body{padding-top:max(56px,env(safe-area-inset-top))!important}
 .org-node{max-width:calc(100vw - 96px)}
}
@media screen and (max-width:900px) and (max-height:500px){
 .modal{padding:8px!important;place-items:start center!important;overflow-y:auto!important}
 .modal>.dialog,.modal>.modal-card{margin:0!important;width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;overflow-y:auto!important}
 :where(.dialog,.modal-card) :is(header,footer){padding-top:10px;padding-bottom:10px}
 :is(#omMonthPanel,.movement-calendar,.movement-calendar-popup){position:fixed!important;top:8px!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translateX(-50%)!important;width:min(360px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;z-index:10000}
}
@media screen and (max-width:760px) and (max-height:500px){:is(#omMonthPanel,.movement-calendar,.movement-calendar-popup){top:60px!important;max-height:calc(100dvh - 68px)!important}}
/* Honor explicit themes and the system preference. Paper previews remain paper. */
@media screen{
html[data-theme=light]{color-scheme:light}
html[data-theme=dark]{color-scheme:dark;--bg:#162226;--ink:#eef1f4;--muted:#b1c5c8;--line:#34494d;--panel:#1d2d32;--surface:#1d2d32;--primary:#216c78;--primary-strong:#96d5d0;--rh-mobile-surface:#1d2d32;--rh-select-ink:#eef1f4;--rh-select-muted:#b1c5c8;--rh-select-line:#526c71;--rh-select-focus:#96d5d0;--rh-select-surface:#23363b;--rh-select-hover:#2b4147}
html[data-theme=dark]{--surface-strong:#23363b}
 html[data-theme=dark],html[data-theme=dark] body{background:#162226!important;color:#eef1f4}
 html[data-theme=dark] .ambient-canvas{opacity:.14}
 html[data-theme=dark] .app-shell{background:transparent!important}
 html[data-theme=dark] :is(.org-stage,.org-canvas){background:#162226!important;border-color:#34494d}
 html[data-theme=dark] :is(.org-node,.node-person,.org-tabs,.org-zoom,.session-pill){background:#23363b!important;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] .org-tabs button{color:#dfe5ec}
 html[data-theme=dark] .org-tabs button.is-active{background:#216c78;color:#fff}
 html[data-theme=dark] .org-zoom button:hover{background:#344f54;color:#eef1f4}
 html[data-theme=dark] .org-node.is-toggleable::after{background:#2b4147;color:#dfe5ec;border-color:#526c71}
 html[data-theme=dark] :is(.org-tree ul,.org-tree li)::before,html[data-theme=dark] .org-tree li::after{border-color:#76939b}
 html[data-theme=dark] .screen-tags span{background:#2b4147;color:#dfe5ec;border-color:#34494d}
 html[data-theme=dark] :is(.catalog-item.inactive,#tableWrap tr.is-archived){opacity:1}
 html[data-theme=dark] :is(.pill.archived,.pill.neutral,.status.inactive){background:#34494d;color:#dfe5ec;border-color:#526c71}
 html[data-theme=dark] :is(.org-canvas,.table-wrap,.sheet-wrap,.catalog-items){scrollbar-color:#67858a #162226}
 html[data-theme=dark] .org-canvas::-webkit-scrollbar-track{background:#162226}
 html[data-theme=dark] .org-canvas::-webkit-scrollbar-thumb{background:#67858a;border-color:#162226}
 html[data-theme=dark] .catalog-title code{background:#2b4147;color:#dfe5ec}
 html[data-theme=dark] .catalog-actions :is(.icon-action,.toggle-action){background:#23363b!important;border-color:#526c71!important}
 html[data-theme=dark] .catalog-actions :is(.danger,.toggle-action){color:#ffacba!important}
 html[data-theme=dark] .catalog-actions .toggle-action.is-off{color:#88d4ae!important}
 html[data-theme=dark] .metrics-strip>div,html[data-theme=dark] :is(.segmented,.link-box){background:#23363b!important;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] .segmented button{background:transparent;color:#b1c5c8}
 html[data-theme=dark] .segmented button.is-active{background:#216c78;color:#fff}
 html[data-theme=dark] .test-picker{background:#23363b;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] .test-picker:has(input:checked){background:#344f54;border-color:#96d5d0}
 html[data-theme=dark] .test-picker button{background:#23363b;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] .test-picker button.selected{background:#344f54;border-color:#96d5d0;box-shadow:inset 3px 0 #96d5d0}
 html[data-theme=dark] .test-picker button:not(:disabled):hover{background:#2b4147;color:#eef1f4}
 html[data-theme=dark] .metric-hover::after{background:#23363b;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] :is(.link-button,.detail-user){color:#96d5d0}
 html[data-theme=dark] .om-control-button{background:#23363b!important;color:#eef1f4!important;border-color:#526c71}
 html[data-rh-readonly=true] .catalog-toolbar>p{display:none}
 html[data-theme=dark] #sidebar{background:#1d2228f2!important;border-color:#34494d;color:#eef1f4}
 html[data-theme=dark] #sidebar button{color:#eef1f4;background:transparent}
 html[data-theme=dark] #sidebar button.is-active{background:#216c78;color:#fff}
 html[data-theme=dark] :is(#sidebarUserName,.sidebar-subtitle,.sidebar-role,.sidebar-foot){color:#b1c5c8}
 html[data-theme=dark] #mobileSidebarToggle{background:#23363b;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] :is(.panel,.dialog,.modal-card,.dialog-card,.user-card,.history-item,.record,.access-panel,.auth-card,.catalog-card,.listas-catalog-card,.worker-record-card){background:#1d2228f2!important;color:#eef1f4;border-color:#34494d}
 html[data-theme=dark] fieldset{background:#1d2d32!important;color:#eef1f4;border-color:#34494d!important}
 html[data-theme=dark] :is(legend,.eyebrow,.step,.listas-catalog-eyebrow){color:#96d5d0!important}
 html[data-theme=dark] :is(.dialog,.modal-card,.dialog-card)>header,html[data-theme=dark] .dialog-head{background:#1d2d32!important;color:#eef1f4}
 html[data-theme=dark] .modal{background:#051319b3!important}
 html[data-theme=dark] :is(.close,.close-button){background:#23363b!important;color:#eef1f4!important;border-color:#526c71}
 html[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){background-color:#23363b!important;color:#eef1f4!important;border-color:#526c71!important}
 html[data-theme=dark] :is(input,textarea)::placeholder{color:#b1c5c8!important;opacity:1}
 html[data-theme=dark] select:not([multiple]):not([size]){appearance:none;-webkit-appearance:none;background-repeat:no-repeat;background-position:right 14px center;background-size:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b4c8cb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")}
 html[data-theme=dark] :is(input,select,textarea,button,a):focus-visible{outline:2px solid #96d5d0;outline-offset:2px}
 html[data-theme=dark] :is(.tabs,.user-toolbar,.history-summary,.activity-filters,.mini-toolbar){background:#1d2d32!important;color:#eef1f4;border-color:#34494d}
 html[data-theme=dark] :is(th,thead,.sticky-col){background:#213e46!important;color:#eef1f4!important;border-color:#34494d}
 html[data-theme=dark] .sort-header{color:#d1d7df!important}
 html[data-theme=dark] .sort-header.is-active{color:#96d5d0!important}
 html[data-theme=dark] .sort-header>span{color:#b1c5c8}
 html[data-theme=dark] :is(td,.catalog-item,.detail-item){border-color:#34494d}
 html[data-theme=dark] :is(.sheet,#tableWrap table,#workersTable) tbody tr{background:#1d2d32}
 html[data-theme=dark] :is(.sheet,#tableWrap table,#workersTable) tbody td{background:inherit!important;color:#eef1f4}
 html[data-theme=dark] :is(.muted,.mini,.section-head p,.record>div>span:not(.pill):not(.status),.field>span,.field>label,.detail-item label,.history-item p){color:#b1c5c8!important}
 html[data-theme=dark] :is(input,select,textarea):is([aria-invalid=true],.is-invalid,.field-invalid,.invalid,:user-invalid){border-color:#f08b9d!important}
 html[data-theme=dark] .lr-preview-toolbar{background:#213e46;color:#b1c5c8;border-color:#34494d}
 html[data-theme=dark] :is(.catalog-suggestions,[role=listbox],#omMonthPanel,.movement-calendar,.movement-calendar-popup){background:#23363b!important;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] #operationalDashboard{--om-ink:#eef1f4;--om-muted:#b1c5c8;--om-line:#34494d}
 html[data-theme=dark] #operationalDashboard #omYear{color:#eef1f4!important}
 html[data-theme=dark] :is(.catalog-suggestions,[role=listbox]) [role=option]{background:transparent!important;color:#eef1f4!important}
 html[data-theme=dark] :is(.catalog-suggestions,[role=listbox]) :is([aria-selected=true],.is-keyboard-active,[role=option]:hover){background:#344f54!important}
 html[data-theme=dark] :is(#omMonthPanel,.movement-calendar,.movement-calendar-popup) button{background:#23363b!important;color:#eef1f4!important}
 html[data-theme=dark] :is(#omMonthPanel,.movement-calendar,.movement-calendar-popup) button:is([aria-pressed=true],[aria-selected=true],.is-selected,.selected,.active){background:#216c78!important;color:#fff!important}
 html[data-theme=dark] :is(button.ghost,a.ghost,.secondary,.icon-button,.icon-action,.table-action){background:#23363b;color:#eef1f4;border-color:#526c71}
 html[data-theme=dark] :is(button.primary,a.primary,.primary-action,.tabs .is-active){background:#216c78!important;color:#fff!important;border-color:#65a6ae}
 html[data-theme=dark] :is(.form-error,.error,.lr-error){background:#482c38;color:#ffd0d6;border-color:#a85f71}
 html[data-theme=dark] .lr-paper{--ink:#203c44;--muted:#5c737b;--line:#cbdadd;--primary:#145c63;color:#203c44;background:#fff;color-scheme:light}
 html[data-theme=dark] .lr-paper :is(th,thead,td){background:#fff!important;color:#203c44!important;border-color:#cbdadd}
 html[data-theme=dark] .lr-paper th{background:#edf4f4!important}
}
