/* THRS Premium Custom Menus P2 — reviewed source selectors, no logic changes.
   Reconciles popover, multiselect, HR calendar, Settings and Approvals with global P1.
   Custom native <select> popup pixels vary by browser/OS and are not overridden.
   DO NOT modify event badges, calendar data, employee action permissions or modals logic. */

/* Themed tokens on each separately mounted component, incl. portal menus. */
html[data-theme="dark"] :is(.thrs-advanced-filter,.thrs-overtime-v1,.thrs-hr-calendar,.thrs-page-settings,.thrs-employee-action-menu,.thrs-calendar-modal,.thrs-main-shell div[dir].min-h-full) {
 --tm-surface:#0d2b49;--tm-raised:#16395b;--tm-option:#173e65;
 --tm-text:#f2f8ff;--tm-subtext:#cbdff0;--tm-border:rgba(155,202,244,.37);
 --tm-strong:rgba(239,196,112,.75);--tm-accent:#f2cf86;--tm-primary:#e9c177;
 --tm-focus:0 0 0 3px rgba(239,193,110,.23);
 --tm-shadow:0 18px 45px rgba(0,8,25,.36),inset 0 1px 0 rgba(248,253,255,.07);
 color-scheme:dark;
}
html[data-theme="light"] :is(.thrs-advanced-filter,.thrs-overtime-v1,.thrs-hr-calendar,.thrs-page-settings,.thrs-employee-action-menu,.thrs-calendar-modal,.thrs-main-shell div[dir].min-h-full) {
 --tm-surface:#fff;--tm-raised:#f6f9fd;--tm-option:#edf4fc;
 --tm-text:#183653;--tm-subtext:#526b86;--tm-border:rgba(35,78,124,.24);
 --tm-strong:rgba(169,123,46,.70);--tm-accent:#9b6b27;--tm-primary:#f1d19b;
 --tm-focus:0 0 0 3px rgba(186,143,65,.18);
 --tm-shadow:0 15px 34px rgba(22,53,86,.13),inset 0 1px 0 rgba(255,255,255,.95);
 color-scheme:light;
}

/* Advanced Filter: the checkbox-chip multiselect is not a native select.
   Retain all current toggling and saved-preset behavior. */
html[data-theme="dark"] .thrs-advanced-filter,
html[data-theme="light"] .thrs-advanced-filter {
 background:var(--tm-surface)!important;
 color:var(--tm-text)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:17px!important;
 box-shadow:var(--tm-shadow)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-active-filter-chip {
 background:var(--tm-raised)!important;color:var(--tm-accent)!important;
 border:1px solid var(--tm-border)!important;
 font-size:12px!important;font-weight:760!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-filter-field > label {
 color:var(--tm-subtext)!important;font-weight:750!important;
 font-size:12px!important;line-height:1.5;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-filter-field > div:has(> div > label > input[type="checkbox"]) {
 background:var(--tm-surface)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:13px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-filter-field > div:has(> div > label > input[type="checkbox"]) label {
 color:var(--tm-text)!important;
 background:var(--tm-raised)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:999px!important;
 font-size:12px!important;font-weight:680!important;
 transition:border-color .16s ease,background-color .16s ease;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-filter-field > div:has(> div > label > input[type="checkbox"]) label:has(input:checked) {
 background:var(--tm-option)!important;
 border-color:var(--tm-strong)!important;
 color:var(--tm-text)!important;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-filter-field input[type="checkbox"] {
 accent-color:#d2a457;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-filter-field label:has(input[type="checkbox"]):focus-within {
 outline:2px solid var(--tm-accent)!important;outline-offset:2px;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-btn-primary {
 background:linear-gradient(145deg,#f9dfa1,#e9ba68)!important;
 color:#22190e!important;border:1px solid #f5d68c!important;
 font-weight:800!important;box-shadow:0 7px 17px rgba(204,142,56,.15)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter select,
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter input:not([type="checkbox"]) {
 background:var(--tm-raised)!important;color:var(--tm-text)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:11px!important;color-scheme:inherit;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter select option {
 background:var(--tm-surface)!important;color:var(--tm-text)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter :is(input,select,button):focus-visible {
 outline:2px solid var(--tm-accent)!important;outline-offset:2px;
}

/* Overtime: real accessible custom month dialog and filter controls. */
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-trigger,
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-filters :is(input,select),
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-section-head select {
 background:var(--tm-raised)!important;color:var(--tm-text)!important;
 border:1px solid var(--tm-border)!important;border-radius:11px!important;
 font-size:12.5px!important;color-scheme:inherit;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-filters {
 background:linear-gradient(125deg,var(--tm-raised),var(--tm-surface))!important;
 border-color:var(--tm-border)!important;
 box-shadow:var(--tm-shadow)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-filters label > span,
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-filter-label {
 color:var(--tm-subtext)!important;font-size:10.75px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-trigger-icon {
 color:var(--tm-accent)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-popover {
 background:linear-gradient(146deg,var(--tm-raised),var(--tm-surface))!important;
 color:var(--tm-text)!important;
 border:1px solid var(--tm-strong)!important;border-radius:16px!important;
 box-shadow:var(--tm-shadow)!important;
 max-width:calc(100vw - 32px);
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-header strong {
 color:var(--tm-text)!important;font-size:15px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-header button,
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-footer button:not(.is-primary) {
 color:var(--tm-text)!important;background:var(--tm-surface)!important;
 border:1px solid var(--tm-border)!important;border-radius:10px!important;
 font-size:12px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-grid button {
 color:var(--tm-subtext)!important;background:transparent!important;
 border-radius:10px!important;font-size:12px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-grid button:hover {
 color:var(--tm-text)!important;background:var(--tm-option)!important;
 border-color:var(--tm-border)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-grid button.is-selected,
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-footer button.is-primary {
 color:#201a10!important;
 background:linear-gradient(150deg,#ffdfa0,#e8b45d)!important;
 border:1px solid #f6d28d!important;
 box-shadow:0 6px 15px rgba(202,140,53,.23)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-footer {
 border-top-color:var(--tm-border)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 :is(.thrs-ot-month-trigger,.thrs-ot-month-grid button,.thrs-ot-month-header button,.thrs-ot-month-footer button):focus-visible {
 outline:2px solid var(--tm-accent)!important;outline-offset:2px;
}

/* Employee row actions are rendered in a body portal. Never alter permissions,
   menu roles, positioning or destructive confirmation. */
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-employee-action-menu {
 background:var(--tm-surface)!important;
 border:1px solid var(--tm-strong)!important;
 border-radius:15px!important;
 box-shadow:var(--tm-shadow)!important;
 color:var(--tm-text)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-employee-action-menu button {
 color:var(--tm-text)!important;
 background:transparent!important;
 border:1px solid transparent!important;
 border-radius:10px!important;
 font-size:12.5px!important;font-weight:710!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-employee-action-menu button:is(:hover,:focus-visible) {
 background:var(--tm-option)!important;
 border-color:var(--tm-border)!important;
 outline:2px solid transparent!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-employee-action-menu button.is-danger {
 color:#ef7f90!important;
}
html[data-theme="light"] .thrs-employee-action-menu button.is-danger {
 color:#af233c!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-employee-action-menu button.is-danger:is(:hover,:focus-visible) {
 color:#ffe4e7!important;background:#74293e!important;
 border-color:rgba(255,162,176,.46)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-employee-action-menu button:focus-visible {
 outline:2px solid var(--tm-accent)!important;outline-offset:2px;
}

/* HRCalendar has inline hard-coded white background and navy-on-white text.
   Override only its own calendar controls, day cells and detail dialog.
   Preserve actual event badge colors and accessible scrolling on mobiles. */
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar {
 background:linear-gradient(133deg,var(--tm-raised),var(--tm-surface))!important;
 border:1px solid var(--tm-border)!important;
 border-radius:20px!important;box-shadow:var(--tm-shadow)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-toolbar h3 {
 color:var(--tm-text)!important;font-size:22px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-toolbar > div:first-child > div {
 color:var(--tm-subtext)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar :is(.thrs-calendar-nav-btn,.thrs-calendar-today-btn) {
 color:var(--tm-text)!important;
 background:var(--tm-surface)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:10px!important;
 font-size:12px!important;font-weight:730!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-today-btn {
 background:linear-gradient(140deg,#f5d69a,#e7b764)!important;
 color:#251e13!important;border-color:#efd094!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-weekday {
 color:var(--tm-subtext)!important;background:var(--tm-surface)!important;
 border-color:var(--tm-border)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-legend-chip {
 color:var(--tm-text)!important;background:var(--tm-surface)!important;
 border:1px solid var(--tm-border)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-day {
 color:var(--tm-text)!important;background:var(--tm-surface)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:12px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-day.is-muted {
 opacity:.60!important;background:var(--tm-raised)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-day.is-today {
 background:var(--tm-option)!important;
 border:2px solid var(--tm-strong)!important;
 box-shadow:0 0 0 3px rgba(233,188,91,.14)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-day > div:first-child > span:first-child {
 color:var(--tm-text)!important;
 font-size:12.5px!important;font-weight:810!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-day.is-today > div:first-child > span:first-child {
 color:var(--tm-accent)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-day > div:first-child > span:nth-child(2) {
 color:var(--tm-subtext)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar .thrs-calendar-empty {
 background:var(--tm-raised)!important;color:var(--tm-subtext)!important;
 border-color:var(--tm-border)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-calendar-modal {
 background:var(--tm-surface)!important;color:var(--tm-text)!important;
 border:1px solid var(--tm-border)!important;
 box-shadow:var(--tm-shadow)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-calendar-modal > div:first-child {
 border-bottom:1px solid var(--tm-border)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-calendar-modal > div:first-child h4 {
 color:var(--tm-text)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-calendar-modal > div:first-child > div > div:first-child {
 color:var(--tm-subtext)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-calendar-modal > div:nth-child(2) > div {
 background:var(--tm-raised)!important;
 border-color:var(--tm-border)!important;
 color:var(--tm-text)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-calendar-modal > div:nth-child(2) > div :is(strong,div:not([style*="color"])) {
 color:var(--tm-text)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-hr-calendar button:focus-visible {
 outline:2px solid var(--tm-accent)!important;outline-offset:3px;
}

/* Settings page: inline-style select controls and date filters. */
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-page-settings :is(
 select,.settings-dashboard-select,input[type="date"],input[type="datetime-local"],input[type="time"]
) {
 color:var(--tm-text)!important;
 background:var(--tm-raised)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:11px!important;
 font-size:12.5px!important;
 color-scheme:inherit;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-page-settings select option {
 color:var(--tm-text)!important;background:var(--tm-surface)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-page-settings :is(select,input[type="date"],input[type="time"]):focus-visible {
 outline:2px solid var(--tm-accent)!important;outline-offset:2px;
}
/* Approval Workflows is Tailwind-heavy; root is div[dir].min-h-full. */
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-main-shell div[dir].min-h-full :is(
 select,input[type="date"],input[type="datetime-local"],input[type="month"],input[type="time"]
) {
 color:var(--tm-text)!important;
 background:var(--tm-raised)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:11px!important;
 color-scheme:inherit;
 font-size:13px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-main-shell div[dir].min-h-full :is(select,input[type="date"],input[type="time"]):focus-visible {
 outline:2px solid var(--tm-accent)!important;outline-offset:2px;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-main-shell div[dir].min-h-full select option {
 background:var(--tm-surface)!important;color:var(--tm-text)!important;
}

/* Modal-mounted custom selects still get visible values. */
:is(html[data-theme="dark"],html[data-theme="light"]) :is(.thrs-modal-card,.thrs-advanced-filter) :is(select,input[type="date"],input[type="time"]) {
 color:var(--tm-text,var(--tp-fg))!important;
 border-color:var(--tm-border,var(--tp-border))!important;
}

/* Do not invent a mobile viewport width or change menu/portal positioning. */
@media(max-width:760px) {
 :is(html[data-theme="dark"],html[data-theme="light"]) .thrs-overtime-v1 .thrs-ot-month-popover {
   width:min(304px,calc(100vw - 32px))!important;
 }
 :is(html[data-theme="dark"],html[data-theme="light"]) .thrs-advanced-filter .thrs-filter-field > div:has(> div > label > input[type="checkbox"]) {
   max-width:100%;
 }
}
@media(prefers-reduced-motion:reduce) {
 :is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-overtime-v1 .thrs-ot-month-popover,
 .thrs-employee-action-menu,
 .thrs-hr-calendar .thrs-calendar-day,
 .thrs-advanced-filter .thrs-filter-field label
 ) {
  animation:none!important;transition:none!important;transform:none!important;
 }
}
@media(forced-colors:active) {
 :is(html[data-theme="dark"],html[data-theme="light"]) :is(.thrs-overtime-v1,.thrs-advanced-filter,.thrs-hr-calendar,.thrs-employee-action-menu) :is(button,input,select):focus-visible {
  outline:2px solid Highlight!important;
 }
}


/* Premium 2 extended coverage — page-level filter families discovered in the
   current THRS source. Existing status, search, date and pagination logic intact. */
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-page-recruitment,.thrs-audit-center,.thrs-deletion-center,
 .thrs-recovery-center,.work-schedules-pro,.thrs-attendance-filters-panel,
 .tos-toolbar,.thrs-benefits-filters-card,.orgchart-ui-toolbar,
 .thrs-employee-tos-filters
) {
 --tm-surface:var(--tm-surface,#0d2b49);
 --tm-raised:var(--tm-raised,#16395b);
 --tm-option:var(--tm-option,#173e65);
 --tm-text:var(--tm-text,#f2f8ff);
 --tm-subtext:var(--tm-subtext,#cbdff0);
 --tm-border:var(--tm-border,rgba(155,202,244,.37));
 --tm-strong:var(--tm-strong,rgba(239,196,112,.75));
 --tm-accent:var(--tm-accent,#f2cf86);
 color-scheme:inherit;
}
html[data-theme="dark"] :is(
 .thrs-page-recruitment,.thrs-audit-center,.thrs-deletion-center,
 .thrs-recovery-center,.work-schedules-pro,.thrs-attendance-filters-panel,
 .tos-toolbar,.thrs-benefits-filters-card,.orgchart-ui-toolbar,
 .thrs-employee-tos-filters
) {
 --tm-surface:#0d2b49;--tm-raised:#16395b;--tm-option:#173e65;
 --tm-text:#f2f8ff;--tm-subtext:#cbdff0;
 --tm-border:rgba(155,202,244,.37);--tm-strong:rgba(239,196,112,.75);
 --tm-accent:#f2cf86;color-scheme:dark;
}
html[data-theme="light"] :is(
 .thrs-page-recruitment,.thrs-audit-center,.thrs-deletion-center,
 .thrs-recovery-center,.work-schedules-pro,.thrs-attendance-filters-panel,
 .tos-toolbar,.thrs-benefits-filters-card,.orgchart-ui-toolbar,
 .thrs-employee-tos-filters
) {
 --tm-surface:#fff;--tm-raised:#f6f9fd;--tm-option:#edf4fc;
 --tm-text:#183653;--tm-subtext:#526b86;
 --tm-border:rgba(35,78,124,.24);--tm-strong:rgba(169,123,46,.70);
 --tm-accent:#9b6b27;color-scheme:light;
}

/* Scoped controls, including embedded Tailwind-heavy and inline-styled pages. */
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-page-recruitment .thrs-rec-v6-filter-grid,
 .thrs-audit-filters,.thrs-delete-filters,.thrs-recovery-filter,
 .work-schedules-pro .ws-filter-card > div,.thrs-benefits-filters-card,
 .thrs-attendance-filters-panel,.tos-toolbar
) {
 border:1px solid var(--tm-border)!important;
 background:linear-gradient(130deg,var(--tm-raised),var(--tm-surface))!important;
 border-radius:15px!important;
 box-shadow:0 13px 28px rgba(2,15,35,.11)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-page-recruitment .thrs-rec-v6-filter-grid,
 .thrs-audit-filters,.thrs-delete-filters,.thrs-recovery-filter,
 .work-schedules-pro .ws-filter-card,
 .thrs-benefits-filters-card,.thrs-attendance-filters-panel,
 .tos-toolbar,.thrs-employee-tos-filters,.orgchart-ui-toolbar
) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea) {
 background:var(--tm-raised)!important;
 color:var(--tm-text)!important;
 border:1px solid var(--tm-border)!important;
 border-radius:11px!important;
 color-scheme:inherit!important;
 font-size:13px!important;
 min-height:40px;
}
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-page-recruitment .thrs-rec-v6-filter-grid,
 .thrs-audit-filters,.thrs-delete-filters,.thrs-recovery-filter,
 .work-schedules-pro .ws-filter-card,
 .thrs-benefits-filters-card,.thrs-attendance-filters-panel,
 .tos-toolbar,.thrs-employee-tos-filters,.orgchart-ui-toolbar
) :is(input,textarea)::placeholder {
 color:var(--tm-subtext)!important;opacity:1!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-page-recruitment .thrs-rec-v6-filter-grid,
 .thrs-audit-filters,.thrs-delete-filters,.thrs-recovery-filter,
 .work-schedules-pro .ws-filter-card,
 .thrs-benefits-filters-card,.thrs-attendance-filters-panel,
 .tos-toolbar,.thrs-employee-tos-filters,.orgchart-ui-toolbar
) select option {
 color:var(--tm-text)!important;background:var(--tm-surface)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-page-recruitment .thrs-rec-v6-filter-grid,
 .thrs-audit-filters,.thrs-delete-filters,.thrs-recovery-filter,
 .work-schedules-pro .ws-filter-card,
 .thrs-benefits-filters-card,.thrs-attendance-filters-panel,
 .tos-toolbar,.thrs-employee-tos-filters,.orgchart-ui-toolbar
) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,button):focus-visible {
 outline:2px solid var(--tm-accent)!important;
 outline-offset:2px!important;
 border-color:var(--tm-strong)!important;
}

/* Preserve all disabled controls and their genuine state. */
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-page-recruitment,.thrs-audit-center,.thrs-deletion-center,
 .thrs-recovery-center,.work-schedules-pro,.tos-toolbar
) :is(select,input,button):disabled {
 opacity:.48!important;cursor:not-allowed!important;
}

/* Audit Center, Recycle Bin, Recovery Center: readable action buttons. */
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-audit-filter-actions button,.thrs-delete-filter-actions button,
 .thrs-recovery-filter button
) {
 min-height:39px!important;
 border:1px solid var(--tm-border)!important;
 background:var(--tm-raised)!important;color:var(--tm-text)!important;
 border-radius:10px!important;font-size:12px!important;font-weight:730!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-audit-filter-actions .is-primary,.thrs-delete-filter-actions .is-primary
) {
 background:linear-gradient(145deg,#ffe2a3,#e8b45f)!important;
 color:#201b10!important;border-color:#f4d495!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-audit-filters,.thrs-delete-filters,.thrs-recovery-filter,
 .thrs-page-recruitment .thrs-rec-v6-filter-grid
) :is(label > span,label:not(:has(> input)) ) {
 color:var(--tm-subtext)!important;
 font-size:11.5px!important;font-weight:760!important;
}

/* Custom chart organization controls; the more-vertical icon on a node is
   decorative inside a button, so don't create fake menus for it. */
:is(html[data-theme="dark"],html[data-theme="light"]) .orgchart-ui-toolbar :is(
 .orgchart-ui-select-field,.orgchart-ui-search-field
) {
 border:1px solid var(--tm-border)!important;
 background:var(--tm-surface)!important;
 color:var(--tm-text)!important;border-radius:12px!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .orgchart-ui-toolbar :is(
 .orgchart-ui-select-field,.orgchart-ui-search-field
) :is(svg,select,input) {
 color:var(--tm-text)!important;
}

/* System menus and listboxes with semantic roles inside operational pages;
   avoid unscoped global styling that breaks native OS menus. */
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-main-shell .thrs-page :is(
 [role="menu"],[role="listbox"]
):not(.thrs-sidebar) {
 color:var(--tp-fg,var(--tm-text))!important;
 background:var(--tp-surface,var(--tm-surface))!important;
 border:1px solid var(--tp-border,var(--tm-border))!important;
 border-radius:13px!important;
 box-shadow:0 17px 34px rgba(0,7,24,.25)!important;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-main-shell .thrs-page :is(
 [role="menuitem"],[role="option"]
) {
 min-height:33px;color:var(--tp-fg,var(--tm-text))!important;
 border-radius:9px;
}
:is(html[data-theme="dark"],html[data-theme="light"]) .thrs-main-shell .thrs-page :is(
 [role="menuitem"],[role="option"]
):is(:hover,:focus-visible) {
 background:var(--tp-surface-raised,var(--tm-option))!important;
 outline:2px solid var(--tp-gold,var(--tm-accent))!important;
 outline-offset:1px;
}
@media(max-width:760px) {
 :is(html[data-theme="dark"],html[data-theme="light"]) :is(
 .thrs-audit-filters,.thrs-delete-filters,.thrs-recovery-filter,
 .work-schedules-pro .ws-filter-card,.thrs-page-recruitment .thrs-rec-v6-filter-grid
 ) :is(input,select) {max-width:100%;}
}
