/* Glass surfaces for the signed-in v440 workspace shell and dashboards. */
@media screen {
  body.workspace-shell-active {
    --glassy-ink: #183d31;
    --glassy-muted: #4e6559;
    --glassy-line: #bfd3c7;
    --glassy-card: linear-gradient(145deg, #ffffffed, #f1faf0bd 72%, #e1f2e8c9);
    --glassy-control: linear-gradient(145deg, #fffffffa, #edf7f0);
    --glassy-menu: linear-gradient(145deg, #fff, #edf8f0);
    --glassy-icon: linear-gradient(145deg, #f6fcf2, #d8ebdf);
    --glassy-sidebar: linear-gradient(130deg, #316452, #215447 40%, #13372e 83%, #102d27);
    --glassy-active: linear-gradient(132deg, #eff6dd, #cce6bb);
    --glassy-card-shadow: inset 0 1px 0 #fff, 0 9px 22px #215b4615, 0 2px 6px #215b460c;
    --glassy-menu-shadow: inset 0 1px 0 #fff, 0 14px 34px #173b3038;

    min-height: 100vh;
    background:
      radial-gradient(ellipse 820px 590px at 83% 0, #c0e2d1, transparent),
      radial-gradient(ellipse 700px 780px at 32% 260px, #f7f9e7, transparent),
      linear-gradient(145deg, #e5f0e8, #cce8dc 70%, #e0efe5);
  }

  body.workspace-shell-active > aside {
    color: #e4f0e8;
    background: var(--glassy-sidebar);
  }

  body.workspace-shell-active > aside :is(.aside-bottom > small, .company-brand div > span) {
    color: #c9dfd2;
  }

  body.workspace-shell-active #workspaceNav :is(button, summary, .help-nav-link) {
    color: #e4f0e8;
    border-radius: 9px;
  }

  body.workspace-shell-active #workspaceNav :is(button, summary, .help-nav-link):hover {
    background-color: #ffffff1a;
  }

  body.workspace-shell-active #workspaceNav :is(.active, [aria-current="page"], .task-tree-active:not([open]) > summary):is(button, summary, a) {
    color: #18382c;
    background: var(--glassy-active);
    box-shadow: inset 0 1px 0 #ffffffb3;
  }

  body.workspace-shell-active #workspaceNav :is(button, summary, .help-nav-link):focus-visible {
    outline: 2px solid #e4f5c5;
    outline-offset: -2px;
  }

  body.workspace-shell-active :is(.workspace-picker-options, #profileMenu .profile-options) {
    color: var(--glassy-ink);
    background: var(--glassy-menu);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-menu-shadow);
  }

  body.workspace-shell-active .workspace-picker-options > p,
  body.workspace-shell-active .workspace-picker-options small {
    color: var(--glassy-muted);
  }

  body.workspace-shell-active .workspace-picker-options > button {
    background: transparent;
  }

  body.workspace-shell-active .workspace-picker-options > button:enabled:hover,
  body.workspace-shell-active .workspace-picker-options > button[aria-current="true"] {
    background: #dcefe2;
  }

  body.workspace-shell-active :is(.workspace-picker > summary, .workspace-picker-options > button):focus-visible {
    outline: 2px solid #376b53;
    outline-offset: -2px;
  }

  body.workspace-shell-active .wo-dashboard {
    --wo-muted: var(--glassy-muted);
    --wo-line: #c9dbd0;
  }

  body.workspace-shell-active :is(.wo-dashboard .card, .wo-dashboard .wo-workspace-row, .workspace-main-dashboard .card, .workspace-landing .workspace-blank) {
    background: var(--glassy-card);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-card-shadow);
  }

  body.workspace-shell-active :is(.wo-dashboard, .workspace-main-dashboard) .card-head {
    border-bottom-color: #cbdbd0;
  }

  body.workspace-shell-active :is(.wo-dashboard .wo-metric-link:hover, .workspace-main-dashboard .workspace-shortcut:enabled:hover) {
    background: #e1f1e7;
  }

  body.workspace-shell-active :is(.wo-dashboard .wo-attention-group:not(.wo-warning-group), .wo-dashboard .wo-monitoring .mobile-summary-card) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :is(.wo-dashboard .wo-card-icon, .wo-dashboard .wo-module-icon, .wo-dashboard .wo-workspace-mark, .workspace-main-dashboard .workspace-stat-icon, .workspace-landing .workspace-blank-icon) {
    background: var(--glassy-icon);
    box-shadow: inset 0 1px 0 #fff;
  }

  body.workspace-shell-active :is(.wo-dashboard .overview-controls, .workspace-context-heading, .workspace-landing .workspace-blank) p,
  body.workspace-shell-active :is(.wo-dashboard .wo-summary-title > p, .wo-dashboard .card-head p, .workspace-main-dashboard .card-head p, .workspace-main-dashboard .workspace-planner-stat small, .workspace-main-dashboard .workspace-shortcut small) {
    color: var(--glassy-muted);
  }

  body.workspace-shell-active .wo-dashboard :is(.wo-category-table, .performance-desktop, .summary-desktop) table,
  body.workspace-shell-active .wo-dashboard .overview-controls :is(input, select) {
    background-color: #fbfdfb;
  }

  body.workspace-shell-active .wo-dashboard .overview-controls :is(input, select),
  body.workspace-shell-active .wo-dashboard .overview-controls .toolbar > button:not(.primary):not([aria-pressed="true"]),
  body.workspace-shell-active .workspace-main-dashboard .workspace-dashboard-toolbar > button {
    border-color: #a8c2b2;
  }
}

@media screen and (min-width: 701px) {
  /* Paint an inset sidebar surface without changing its position or menu geometry. */
  body.workspace-shell-active > aside {
    background: transparent;
  }

  body.workspace-shell-active > aside::before {
    content: "";
    position: absolute;
    inset: 12px 8px;
    z-index: -1;
    pointer-events: none;
    background: var(--glassy-sidebar);
    border: 1px solid #91b7a1;
    border-radius: 22px;
    box-shadow: inset 0 1px 0 #e4f4e85c, 0 8px 16px #193e3333;
  }

  body.workspace-shell-active main > header,
  body.workspace-shell-active main > header .workspace-picker > summary,
  body.workspace-shell-active main > header #notificationBell {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  body.workspace-shell-active main > header :is(.workspace-picker > summary:hover, .workspace-picker[open] > summary, #notificationBell:hover, #profileMenu > summary:hover, #profileMenu[open] > summary) {
    background-color: #ffffff75;
    border-color: #b4cdbd;
  }

  body.workspace-shell-active main > header :is(.workspace-picker > summary, #notificationBell, #profileMenu > summary) {
    color: var(--glassy-ink);
  }

  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    body.workspace-shell-active main > header .workspace-picker-options {
      background: linear-gradient(145deg, #fffffff5, #eef8f0ef);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
  }
}

@media screen and (max-width: 700px) {
  body.workspace-shell-active {
    --glassy-card: linear-gradient(150deg, #ffffffef, #edf7efeb);
  }

  /* A painted gradient preserves the fixed profile menu's viewport anchor. */
  body.workspace-shell-active .mobile-app-bar {
    background: linear-gradient(115deg, #2b6353, #1a483c 61%, #153b32);
    border-bottom-color: #517b69;
    box-shadow: 0 3px 10px #183b3029;
  }

  body.workspace-shell-active .mobile-app-bar :is(.workspace-picker > summary:hover, .workspace-picker[open] > summary, #profileMenu > summary:hover, #profileMenu[open] > summary) {
    background: #f3fff21a;
  }

  body.workspace-shell-active .mobile-app-bar .workspace-picker > summary:focus-visible {
    outline-color: #e1f2cc;
  }

  body.workspace-shell-active .mobile-app-bar #notificationBell {
    color: #f0f8ef;
    background: #f3fff215;
    border-color: #93baaa54;
  }

  body.workspace-shell-active > aside {
    border-inline-end: 1px solid #79a38e;
    border-radius: 0 18px 18px 0;
  }
}

@media screen and (prefers-reduced-transparency: reduce) {
  body.workspace-shell-active {
    --glassy-card: #f5fbf6;
    background: #e8f3eb;
  }

  body.workspace-shell-active main > header .workspace-picker-options {
    background: var(--glassy-menu);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Shared surfaces for the signed-in application. Keep state colours and layout local to each module. */
@media screen {
  body.workspace-shell-active {
    --glassy-panel-fill: #ffffff70;
    --glassy-data-fill: #fbfdfb;
    --glassy-data-head: #e9f2eb;
    --glassy-data-line: #d3e2d8;
    --glassy-control-line: #789383;
    --glassy-focus: #315e48;
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :is(.card, .stat, .dashboard-team, .mobile-summary-card):not(:where(.alert, .is-alert, .is-warning, .is-overdue)) {
    background: var(--glassy-card);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-card-shadow);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :is(.card-head, .photo-gallery figure, .table-wrap, .floating-table-scroll) {
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :is(.photo-gallery figure, .floating-table-scroll) {
    background: var(--glassy-control);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :not(:where([role="alert"], .warning, .warn, .error, .is-warning, .is-overdue)):is(
    .eyebrow, .heading > p, .heading > div > p, .card > p, .card-head p, .stat > label, .stat > small
  ) {
    color: var(--glassy-muted);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  .callout:not(:where([role="alert"], .alert, .warning, .warn, .error, .is-warning, .is-overdue)) {
    background-color: #eaf4ec;
  }

  /* Keep the reading surface opaque and leave row colours intact. */
  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  .table-wrap > table:not(.wp-phone-table) {
    background-color: var(--glassy-data-fill);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  .table-wrap > table > thead > tr > th {
    background-color: var(--glassy-data-head);
    color: var(--glassy-muted);
    border-color: var(--glassy-data-line);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  .table-wrap > table > tbody > tr > td {
    border-color: var(--glassy-data-line);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :is(input:not([type]), input[type="text"], input[type="search"], input[type="password"],
    input[type="email"], input[type="tel"], input[type="url"], input[type="number"],
    input[type="date"], input[type="month"], input[type="time"], input[type="datetime-local"],
    select, textarea):not(:where(:disabled, [readonly], [aria-invalid="true"])) {
    background-color: var(--glassy-data-fill);
    border-color: var(--glassy-control-line);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :where(.toolbar, .buttons, .jxm-pagination)
  :is(button, a.btn):not(:where(.primary, .text-btn, .danger-text, .danger, .warn, .red, .active, .is-active,
    .is-warning, .is-alert, [aria-pressed="true"], [aria-selected="true"], [aria-current]:not([aria-current="false"]), :disabled)) {
    background-color: var(--glassy-data-fill);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :is(.admin-task-tabs, .inspection-module-tabs, .tp-tabs)
  button:not(:where(.primary, .active, .is-active, [aria-pressed="true"], [aria-selected="true"],
    [aria-current]:not([aria-current="false"]), :disabled)) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :is(.admin-task-tabs, .inspection-module-tabs, .tp-tabs)
  button:is(.primary, .active, .is-active, [aria-pressed="true"], [aria-selected="true"], [aria-current="page"]):enabled {
    background: var(--glassy-sidebar);
    border-color: #244e3d;
    color: #ffffff;
  }

  body.workspace-shell-active :where(#teamview, dialog:not(.esh-print-preview))
  :is(a[href], button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--glassy-focus);
    outline-offset: 2px;
  }

  body.workspace-shell-active dialog:not(.esh-print-preview) {
    background: var(--glassy-menu);
    color: var(--glassy-ink);
    box-shadow: inset 0 0 0 1px var(--glassy-line), var(--glassy-menu-shadow);
  }

  body.workspace-shell-active dialog:not(.esh-print-preview)::backdrop {
    background: #15382e75;
  }

  body.workspace-shell-active #modal:has(#noticeCentre) {
    background: var(--glassy-menu);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-menu-shadow);
  }

  body.workspace-shell-active #noticeCentre .notice-sticky {
    background: #f1f8f2;
    border-bottom-color: var(--glassy-line);
  }

  body.workspace-shell-active #noticeCentre .notice-item:not(.notice-new) {
    background: var(--glassy-control);
    border-color: var(--glassy-data-line);
  }

  body.workspace-shell-active #toast {
    background: var(--glassy-sidebar);
    box-shadow: var(--glassy-menu-shadow);
  }

  /* The preview controls are themed while the print frame remains a white page. */
  body.workspace-shell-active .esh-print-toolbar {
    background: var(--glassy-sidebar);
  }

  body.workspace-shell-active .esh-print-hint {
    background-color: #eaf4ec;
    color: var(--glassy-muted);
  }
}

/* Module surfaces outside the shared cards, dialogs, and controls. */
@media screen {
  /* Inspection, asset/location records, and report controls. */
  body.workspace-shell-active :is(.asset-controls, .asset-category-card, .inspection-category-context, .report-preview-summary, .apd-report) {
    background: var(--glassy-card);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-card-shadow);
  }

  body.workspace-shell-active .asset-category-symbol {
    background: var(--glassy-icon);
  }

  body.workspace-shell-active .asset-category-open {
    background: transparent;
    box-shadow: none;
  }

  body.workspace-shell-active .asset-category-open:hover {
    background: #e9f5eabf;
  }

  body.workspace-shell-active :is(.inspection-category-options > label, .category-setup-options > button, .category-code-readiness:not(.category-code-unset), .inspection-start-list, .inspection-start-choices > button:not(.primary)) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :is(.inspection-module-tabs button:not(.primary), .inspection-module-select select, .asset-filter-chips button, .location-inspection-tools > summary) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :is(.inspection-module-tabs button:not(.primary):enabled:hover, .location-inspection-tools[open] > summary, .category-setup-options > button:enabled:hover) {
    background: #e3f2e7;
  }

  body.workspace-shell-active .location-inspection-tools-options {
    background: var(--glassy-menu);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-menu-shadow);
  }

  body.workspace-shell-active .location-inspection-tools-options > button {
    background: transparent;
  }

  body.workspace-shell-active .location-inspection-tools-options > button:is(:enabled:hover, :focus-visible) {
    background: #e3f2e7;
  }

  body.workspace-shell-active .location-record-month > :is(summary, h2) {
    background: var(--glassy-control);
  }

  body.workspace-shell-active .workspace-metric-summary :is(.dsp-chart, .dsp-rate) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  /* Keep high-contrast controls around the export page. */
  body.workspace-shell-active .esh-print-toolbar > button {
    background: var(--glassy-control);
    color: var(--glassy-ink);
  }

  body.workspace-shell-active .esh-print-hint {
    background: var(--glassy-control);
  }

  /* Inspection tasks, grouped trees and inspector board. */
  body.workspace-shell-active :is(.task-section, .inspector-tile) {
    background: var(--glassy-card);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-card-shadow);
  }

  body.workspace-shell-active :is(.task-location, .task-sublocation, .tp-person, .tp-task, .tp-empty, .task-asset-report, .tp-board-filters > summary, .tp-filters > summary) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :is(.task-section, .task-location, .task-sublocation, .tp-task)[open] > summary {
    background: #e6f2ea;
    border-radius: 8px 8px 0 0;
  }

  body.workspace-shell-active .task-location > .task-group-body,
  body.workspace-shell-active .tp-task-more {
    border-color: var(--glassy-line);
  }

  /* Planner, Overtime and Annual ESH Programme. The event colors remain defined by each type. */
  body.workspace-shell-active :is(.hub-calendar, .hub-mobile-list, .ot-mini-grid, .ot-phone-summary, .ot-next-card, .programme-metrics > div, .programme-month) {
    background: var(--glassy-card);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-card-shadow);
  }

  body.workspace-shell-active :is(.hub-day-name, .hub-day-empty, .hub-day) {
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :is(.hub-day-name, .hub-participant-list label, .phone-agenda-event:not(.phone-event-ph), .ot-day:not(.ot-cancelled), .ot-phone-day:not(.ot-phone-cancelled), .ot-mini-day:not(.ot-mini-ph, .ot-mini-cancelled), .programme-entry) {
    background: var(--glassy-control);
  }

  body.workspace-shell-active .phone-calendar-date:not(.phone-date-today, .phone-date-ph) {
    background: #eff7f0;
  }

  body.workspace-shell-active :is(.programme-entry, .ot-mini-day:not(.ot-mini-ph, .ot-mini-cancelled), .ot-phone-day:not(.ot-phone-cancelled)):enabled:hover {
    background: #e5f2e8;
  }

  /* Directory, user administration and account settings. */
  body.workspace-shell-active :is(.tdp-member-card, .um-panel, .um-stat, .um-settings-block, .um-tools) {
    background: var(--glassy-card);
    border-color: var(--glassy-line);
    box-shadow: var(--glassy-card-shadow);
  }

  body.workspace-shell-active :is(.um-role-card, .um-workspace-check-row:not(:has(input:checked)), .um-assigned-summary, .um-rank-impact-list > li, .account-setting) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active :is(.um-stat-icon, .tdp-panel-icon, .tdp-avatar, .um-avatar, .account-profile-name) {
    background: var(--glassy-icon);
  }

  body.workspace-shell-active :is(.tdp-table, .um-table) th {
    background: #edf5ee;
    border-color: var(--glassy-line);
  }

  /* Notification menu and preferences. Keep device and read-state colors distinct. */
  body.workspace-shell-active #notificationSettingsPage {
    background: linear-gradient(145deg, #eef8f0, #dcefe5);
  }

  body.workspace-shell-active .notice-settings-content .notice-heading {
    background: var(--glassy-menu);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active #noticeCentre :is(.notice-item, .notice-empty) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }

  body.workspace-shell-active #noticeCentre .notice-item.notice-new {
    background: #eaf5eb;
  }

  body.workspace-shell-active #noticeCentre .notice-type-icon {
    background: var(--glassy-icon);
  }
}

@media screen and (max-width: 700px) {
  body.workspace-shell-active :is(.wp-control-toggle, .wp-phone-table > tbody > tr, .selected-records tbody > tr) {
    background: var(--glassy-control);
    border-color: var(--glassy-line);
  }
}

@media screen and (min-width: 701px) {
  body.workspace-shell-active .team-directory .tdp-panel {
    background: var(--glassy-card);
    box-shadow: var(--glassy-card-shadow);
  }
}

@media screen {
  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) {
    --standalone-ink: #183d31;
    --standalone-muted: #4e6559;
    --standalone-line: #a8c2b2;
    --standalone-control-line: #788f81;
    --standalone-panel: linear-gradient(145deg, #fffffff5, #f1faf0d6 72%, #e1f2e8e6);
    --standalone-sheet: linear-gradient(145deg, #fff, #edf8f0);
    --standalone-haze:
      radial-gradient(ellipse 820px 590px at 83% 0, #c0e2d1, transparent),
      radial-gradient(ellipse 700px 780px at 32% 260px, #f7f9e7, transparent),
      linear-gradient(145deg, #e5f0e8, #cce8dc 70%, #e0efe5);
    --standalone-brand: linear-gradient(130deg, #316452, #215447 40%, #13372e 83%, #102d27);
    --standalone-shadow: inset 0 1px 0 #fff, 0 9px 22px #215b4615, 0 2px 6px #215b460c;

    min-height: 100vh;
    background: var(--standalone-haze);
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) > aside {
    background: var(--standalone-brand);
    box-shadow: inset -1px 0 #c5dcce52, 3px 0 18px #215b461d;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) > main > header {
    color: var(--standalone-ink);
    background: #f6fcf6be;
    border-bottom-color: #bfd3c7;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview :is(h1, h2, h3),
  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview .login-company b {
    color: var(--standalone-ink);
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview :is(.eyebrow, .muted, .qr-options-intro, .qr-choice-copy > span, .login-company span, .public-asset-info dt, .public-record-info dt),
  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview :is(#login, #connection, #forgotForm, #resetForm) > p,
  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview > p {
    color: var(--standalone-muted);
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview .login-company img {
    box-shadow: 0 2px 8px #215b461f;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview :is(.card, .qr-choice-card, .qr-choice-unavailable, .public-full-record),
  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) :is(dialog#modal, #startupLoading, #startupAuthLoading),
  body[data-offline-shell="true"] .offline-list {
    background: var(--standalone-panel);
    border: 1px solid var(--standalone-line);
    border-radius: 13px;
    box-shadow: var(--standalone-shadow);
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) :is(#startupLoading, #startupAuthLoading),
  body[data-offline-shell="true"] .offline-list {
    padding-inline: clamp(12px, 4vw, 20px);
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview .qr-choice-primary {
    border-inline-start: 4px solid #376b53;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview .qr-choice-card:enabled:hover,
  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview a.qr-choice-card:hover {
    background: #e7f3e8;
    border-color: #6b9a82;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) #teamview :is(.public-record-desktop table, .public-record-checks table, .table-wrap > table) {
    background: #fbfdfb;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) :is(#teamview, dialog#modal)
    .field > :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="hidden"]), select, textarea):not(:disabled, [readonly], [aria-invalid="true"]) {
    background-color: #fbfdfb;
    border-color: var(--standalone-control-line);
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) :is(#teamview, dialog#modal)
    .field > :is(input, select, textarea):focus-visible {
    outline: 2px solid #376b53;
    outline-offset: 2px;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) :is(#teamview, dialog#modal) :is(.buttons, .location-qr-actions) > :is(button, a.btn):not(.primary, .danger, .text-btn, .qr-choice-card, [aria-pressed="true"]):not(:disabled) {
    background: var(--standalone-sheet);
    border-color: var(--standalone-line);
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) :is(#teamview, dialog#modal) :is(button, .btn).primary:not(:disabled) {
    color: #fff;
    background: linear-gradient(145deg, #2c644f, #214f3e);
    border-color: #214f3e;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) dialog#modal::backdrop {
    background: #17372e78;
  }

  body[data-offline-shell="true"] #teamview .offline-banner {
    background-color: #e9f3e4;
    border-color: #a4bdab;
  }

  body[data-offline-shell="true"] #teamview .offline-list li {
    border-bottom-color: #c9dacf;
  }

  body[data-jxm-page="help"] > header {
    background: var(--standalone-brand);
    box-shadow: 0 7px 22px #215b4626;
  }

  body[data-jxm-page="help"] :is(#guideTopics details, #guideSearchForm fieldset) {
    background: var(--standalone-panel);
    border-color: var(--standalone-line);
    border-radius: 13px;
    box-shadow: var(--standalone-shadow);
  }

  body[data-jxm-page="help"] :is(#guideTopics .answer, footer) {
    border-color: #bfd3c7;
  }

  body[data-jxm-page="help"] :is(.eyebrow, .intro, #guideCount, footer) {
    color: var(--standalone-muted);
  }

  body[data-jxm-page="help"] #guideConnection {
    background: #e9f3e4;
  }

  body[data-jxm-page="help"] #guideSearch:not(:disabled, [readonly], [aria-invalid="true"]) {
    background: #fbfdfb;
    border-color: var(--standalone-control-line);
  }

  body[data-jxm-page="help"] #guideReset {
    background: var(--standalone-sheet);
    border-color: var(--standalone-line);
  }

  body[data-jxm-page="not-found"] {
    box-sizing: border-box;
    margin: 0;
    padding: clamp(24px, 8vw, 96px);
    color: var(--standalone-ink);
    font: 16px/1.6 'Segoe UI', Arial, sans-serif;
  }

  body[data-jxm-page="not-found"] > main {
    box-sizing: border-box;
    width: min(100%, 480px);
    padding: clamp(18px, 6vw, 38px);
    background: var(--standalone-panel);
    border: 1px solid var(--standalone-line);
    border-radius: 16px;
    box-shadow: var(--standalone-shadow);
  }

  body[data-jxm-page="not-found"] h1 {
    margin: 0;
    font-size: clamp(24px, 7vw, 36px);
    line-height: 1.2;
  }

  body[data-jxm-page="not-found"] a {
    color: #245d44;
  }
}

@media screen and (prefers-reduced-transparency: reduce) {
  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) {
    --standalone-panel: #f5fbf6;
    background: #e8f3eb;
  }

  body:is(:not(.workspace-shell-active), [data-offline-shell="true"]) > main > header {
    background: #f5fbf6;
  }
}

/* Glassy surfaces. Report paper and QR graphics keep their native backgrounds. */
@media screen {
  html[lang] {
    --jxm-glass-ink: #183c31;
    --jxm-glass-muted: #36534a;
    --jxm-glass-edge: rgba(247, 255, 251, .82);
    --jxm-glass-control-edge: #a5c3b7;
    --jxm-glass-card: linear-gradient(145deg, rgba(255, 255, 255, .64), rgba(237, 251, 244, .30));
    --jxm-glass-control: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(240, 251, 246, .57));
    --jxm-glass-inset: linear-gradient(145deg, rgba(248, 255, 251, .43), rgba(219, 243, 233, .16));
    --jxm-glass-inset-edge: rgba(55, 108, 85, .25);
    --jxm-glass-warning: rgba(255, 218, 162, .48);
    --jxm-glass-dialog: linear-gradient(138deg, rgba(251, 255, 253, .83), rgba(230, 248, 240, .68));
    --jxm-glass-reading: rgba(249, 253, 250, .94);
    --jxm-glass-shadow: inset 0 1px rgba(255, 255, 255, .92), 0 13px 28px -18px rgba(24, 78, 63, .55);
    --jxm-glass-radius: 26px;
    --jxm-glass-inner-radius: 19px;
    --jxm-glass-backdrop:
      radial-gradient(ellipse 64vw 390px at 81% 225px, #99cedf, transparent),
      radial-gradient(ellipse 64vw 435px at 32% 590px, #acd9b7, transparent),
      radial-gradient(ellipse 59vw 460px at 86% 930px, #b0d9d2, transparent),
      linear-gradient(145deg, #e9f1e1, #cce7dc 72%, #e4efe5);
  }

  html[lang] body {
    --glassy-ink: var(--jxm-glass-ink);
    --glassy-muted: var(--jxm-glass-muted);
    --glassy-card: var(--jxm-glass-card);
    --glassy-card-shadow: var(--jxm-glass-shadow);
    --glassy-control: var(--jxm-glass-control);
    --glassy-data-fill: var(--jxm-glass-reading);
    --glassy-menu: var(--jxm-glass-dialog);
    --standalone-ink: var(--jxm-glass-ink);
    --standalone-muted: var(--jxm-glass-muted);
    --standalone-panel: var(--jxm-glass-card);
    --standalone-sheet: var(--jxm-glass-reading);
    --standalone-shadow: var(--jxm-glass-shadow);
    background: var(--jxm-glass-backdrop);
  }

  html[lang] :is(button, a.btn, a[role="button"], input[type="button"], input[type="submit"]):not(
    :where(.text-btn, .qr-choice-card, .asset-category-card, .asset-category-open, .inspection-start-choices > button, .category-setup-options > button, .team-switch, .nav-toggle,
    .hub-day, .ot-day, .ot-mini-day, .phone-calendar-date, [role="gridcell"])
  ),
  html[lang] :is(
    .workspace-picker > summary, #profileMenu > summary, #workspaceNav summary,
    .wp-control-toggle, .location-inspection-tools > summary, body[data-jxm-page="help"] > header > a:not(.brand),
    body[data-jxm-page="not-found"] > main a
  ) {
    border-radius: 999px;
  }

  html[lang] body.workspace-shell-active #workspaceNav :is(button, summary, .help-nav-link),
  html[lang] body.workspace-shell-active :is(main > header, .mobile-app-bar) #notificationBell {
    border-radius: 999px;
  }

  html[lang] :is(
    .card, .stat, .dashboard-team, .mobile-summary-card, .wo-workspace-row, .secPending,
    .workspace-tile, .workspace-blank, .asset-controls, .asset-category-card,
    .inspection-category-context, .report-preview-summary, .apd-report, .location-record-month,
    .task-section, .inspector-tile, .tp-task, .tp-empty, .task-asset-report,
    .hub-calendar, .hub-mobile-list, .ot-mini-grid, .ot-phone-summary, .ot-next-card,
    .programme-metrics > div, .programme-month,
    .tdp-panel, .tdp-member-card, .um-panel, .um-stat, .um-settings-block, .um-tools, .account-setting,
    .notice-settings-content .notice-heading, .notice-empty, .public-full-record, .public-record-info,
    .public-record-card, .location-record-row,
    .qr-choice-card, .qr-choice-unavailable, .offline-list, .offline-banner,
    #startupLoading, #startupAuthLoading, #login, #forgotForm, #resetForm, #connection,
    #guideTopics details, #guideSearchForm fieldset,
    body[data-jxm-page="not-found"] > main
  ):not(:where(.alert, .is-alert, .is-warning, .is-overdue, .qr-choice-primary,
    dialog.esh-print-preview *, .esh-report-print-surface *)) {
    border-radius: var(--jxm-glass-radius);
    border-color: var(--jxm-glass-edge);
    background: var(--jxm-glass-card);
    box-shadow: var(--jxm-glass-shadow);
  }

  html[lang] :is(#login, #forgotForm, #resetForm, #connection) {
    padding: clamp(16px, 4vw, 28px);
    border: 1px solid var(--jxm-glass-edge);
  }

  html[lang] body[data-jxm-page="not-found"] > main a {
    display: inline-block;
    padding: 8px 15px;
    background: var(--jxm-glass-control);
    box-shadow: var(--jxm-glass-shadow);
  }

  html[lang] :is(
    .category-setup-options > button, .qr-choice-card.qr-choice-primary, .inspection-category-options > label,
    .um-role-card, .um-workspace-check-row, .um-assigned-summary, #noticeCentre .notice-item,
    .programme-entry
  ) {
    border-radius: var(--jxm-glass-inner-radius);
  }

  html[lang] #inspectionStartDialog .inspection-start-choices > button {
    border-radius: var(--jxm-glass-radius);
  }

  html[lang] .asset-category-open {
    border-radius: inherit;
  }

  /* Inset surfaces share the card behind them, so their tint is lighter. */
  html[lang] body.workspace-shell-active :is(
    .wo-dashboard .wo-attention-group,
    .wo-dashboard .wo-module-metrics > div,
    .wo-dashboard .wo-incident-metrics > div,
    .tp-board > .callout,
    .task-desktop:has(.inspector-stats) > .callout,
    .wp-compact .wp-phone-table > tbody > tr
  ) {
    border-radius: var(--jxm-glass-inner-radius);
    border-color: var(--jxm-glass-inset-edge);
    background: var(--jxm-glass-inset);
  }

  html[lang] .wo-dashboard .wo-attention-status > .card-head {
    border-radius: var(--jxm-glass-radius) var(--jxm-glass-radius) 0 0;
    background: transparent;
  }

  html[lang] body.workspace-shell-active :is(
    .wo-dashboard .wo-attention-group.wo-warning-group, .inspector-tile .inspector-attention
  ) {
    border-radius: var(--jxm-glass-inner-radius);
    background: var(--jxm-glass-warning);
  }

  html[lang] .inspector-tile .inspector-attention {
    color: #714618;
  }

  html[lang] :is(.inspector-tile .badge, .fe-detail-badge) {
    border-radius: 999px;
  }

  html[lang] body.workspace-shell-active :is(
    .tp-board-filters > summary,
    .wo-dashboard .wo-category-disclosure > summary,
    .tp-board > .callout > button,
    .task-desktop:has(.inspector-stats) > .callout > button,
    .wp-compact .wp-row-toggle > button
  ) {
    border: 1px solid var(--jxm-glass-inset-edge);
    border-radius: 999px;
    background: var(--jxm-glass-inset);
  }

  html[lang] .wp-compact .wp-row-toggle > button {
    display: block;
    width: fit-content;
    min-height: 44px;
    padding-inline: 12px;
  }

  html[lang] :is(
    #teamview .heading > button, #teamview .toolbar > button, #teamview .buttons > button,
    #modal:not(.esh-print-preview) .buttons > button,
    #guideReset, .esh-print-toolbar > button
  ):not(:where(.primary, .danger, .danger-text, .warn, .red, .text-btn, .active,
    .is-active, [aria-pressed="true"], [aria-selected="true"], [aria-expanded="true"], :disabled)) {
    color: var(--jxm-glass-ink);
    background: var(--jxm-glass-control);
    border-color: var(--jxm-glass-edge);
  }

  html[lang] :is(
    input:not([type]), input[type="text"], input[type="search"], input[type="password"],
    input[type="email"], input[type="tel"], input[type="url"], input[type="number"],
    input[type="date"], input[type="month"], input[type="week"], input[type="time"],
    input[type="datetime-local"], select, [id="guideSearch"]
  ) {
    border-radius: 999px;
  }

  html[lang] :is(textarea, .field textarea) {
    border-radius: var(--jxm-glass-inner-radius);
  }

  html[lang] .programme-status {
    border-radius: 999px;
  }

  html[lang] :is(
    input[type="search"], [id="guideSearch"], .programme-heading input[type="number"]
  ):not(:where(:disabled, [readonly], [aria-invalid="true"])) {
    border-color: var(--jxm-glass-control-edge);
    background: var(--jxm-glass-control);
  }

  html[lang] :is(dialog#modal:not(.esh-print-preview), #workspaceNav) :focus-visible {
    outline-offset: 2px;
  }

  html[lang] dialog:is(#modal, .secDialog, .secVehicleDialog, .secStaffQrDialog):not(.esh-print-preview) {
    color: var(--jxm-glass-ink);
    border: 1px solid var(--jxm-glass-edge);
    border-radius: 28px;
    background: #f2faf6;
    box-shadow: 0 25px 66px rgba(13, 45, 35, .25), inset 0 1px rgba(255, 255, 255, .92);
  }

  html[lang] dialog:is(#modal, .secDialog, .secVehicleDialog, .secStaffQrDialog):not(.esh-print-preview)::backdrop {
    background: rgba(18, 52, 42, .26);
  }

  @supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
    html[lang] dialog#modal:not(.esh-print-preview) {
      background: var(--jxm-glass-dialog);
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    }

    html[lang] :is(#login, #forgotForm, #resetForm, #connection) {
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
  }

  html[lang] .esh-print-toolbar,
  html[lang] .esh-print-hint {
    color: var(--jxm-glass-ink);
    background: var(--jxm-glass-card);
  }

  html[lang] :is(.esh-print-frame, .esh-report-print-surface) {
    background: #fff;
  }

  @media (prefers-reduced-transparency: reduce) {
    html[lang] {
      --jxm-glass-backdrop: #ebf4ee;
      --jxm-glass-card: #f3faf6;
      --jxm-glass-control: #f9fcfa;
      --jxm-glass-inset: #f2f8f4;
      --jxm-glass-inset-edge: #b7cfc1;
      --jxm-glass-warning: #fae9cb;
      --jxm-glass-dialog: #f3faf6;
      --jxm-glass-reading: #fcfefd;
      --jxm-glass-edge: #c1d6ca;
    }

    html[lang] :is(dialog#modal, #login, #forgotForm, #resetForm, #connection) {
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
  }
}

/* My Tasks and the Start Inspection dialog. */
@media screen {
  #teamview.my-tasks-layout,
  dialog#modal:has(#inspectionStartDialog) {
    --task-ink: #183c31;
    --task-muted: #36534a;
    --task-glass-border: rgba(245, 255, 252, .76);
    --task-glass-shadow: 0 13px 28px -18px rgba(24, 78, 63, .55), inset 0 1px rgba(255, 255, 255, .90);
    --task-glass-heading: linear-gradient(115deg, rgba(255, 255, 255, .68), rgba(234, 250, 248, .22));
    --task-glass-panel: linear-gradient(145deg, rgba(255, 255, 255, .55), rgba(235, 252, 246, .23));
    --task-glass-card: linear-gradient(145deg, rgba(255, 255, 255, .62), rgba(237, 251, 244, .31));
    --task-glass-control: linear-gradient(145deg, rgba(255, 255, 255, .79), rgba(239, 250, 246, .54));
    --task-glass-filter: linear-gradient(145deg, rgba(247, 255, 252, .46), rgba(224, 243, 236, .25));
    --task-card-radius: 26px;
  }

  #teamview.my-tasks-layout button,
  #inspectionStartDialog button {
    border-radius: 999px;
  }

  #teamview.my-tasks-layout .my-task-heading {
    padding: clamp(17px, 2.1vw, 31px);
    border: 1px solid var(--task-glass-border);
    border-radius: 30px;
    background: var(--task-glass-heading);
    box-shadow: var(--task-glass-shadow);
  }

  #teamview.my-tasks-layout .my-task-heading > h1 {
    color: var(--task-ink);
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    line-height: 1.06;
    letter-spacing: -.032em;
  }

  #teamview.my-tasks-layout .my-task-heading > h1 > span {
    display: inline-grid;
    place-items: center;
    min-width: 1.8rem;
    min-height: 1.8rem;
    padding: 2px 6px;
    vertical-align: middle;
    border: 1px solid #abd0bf;
    border-radius: 40px;
    color: #245645;
    background: #ecf7f2;
    font-size: .81rem;
    font-weight: 700;
    line-height: 1;
  }

  #teamview.my-tasks-layout .my-task-actions {
    padding: 9px;
    border: 1px solid var(--task-glass-border);
    border-radius: var(--task-card-radius);
    background: var(--task-glass-panel);
    box-shadow: var(--task-glass-shadow);
  }

  @media (min-width: 701px) {
    #teamview.my-tasks-layout .task-unified .my-task-actions {
      justify-content: flex-start;
    }
  }

  #teamview.my-tasks-layout .my-task-actions > button:not(.primary),
  #teamview.my-tasks-layout .my-task-actions #offlineTaskTools > button:not(.primary),
  #teamview.my-tasks-layout .task-filter-search-row > button:not(.primary),
  #teamview.my-tasks-layout .my-task-heading > button:not(.primary),
  dialog#modal:has(#inspectionStartDialog) :is(.inspection-start-pages, .buttons) > button:not(.primary) {
    color: var(--task-ink);
    background: var(--task-glass-control);
    border-color: var(--task-glass-border);
    box-shadow: inset 0 1px rgba(255, 255, 255, .92);
  }

  #teamview.my-tasks-layout [data-task-start-inspection],
  dialog#modal:has(#inspectionStartDialog) #inspectionStartScan {
    color: #fff;
    border-color: #1f5140;
    background: linear-gradient(145deg, #2b654e, #173e33);
    box-shadow: 0 8px 17px -12px rgba(18, 61, 47, .68), inset 0 1px rgba(255, 255, 255, .16);
  }

  #teamview.my-tasks-layout [data-task-start-inspection]:hover,
  dialog#modal:has(#inspectionStartDialog) #inspectionStartScan:hover {
    background: linear-gradient(145deg, #2e6c54, #1d4b3d);
  }

  #teamview.my-tasks-layout :is(.tp-tabs, .task-view-switch) {
    padding: 5px;
    border: 1px solid var(--task-glass-border);
    border-radius: 24px;
    background: var(--task-glass-filter);
    box-shadow: inset 0 1px rgba(255, 255, 255, .8);
  }

  #teamview.my-tasks-layout :is(.tp-tabs, .task-view-switch) > button:not(.primary) {
    color: var(--task-ink);
    border-color: transparent;
    background: var(--task-glass-control);
  }

  #teamview.my-tasks-layout :is(.tp-tabs, .task-view-switch) > button:is(.primary, [aria-pressed="true"], [aria-selected="true"]) {
    color: #fff;
    background: #245b48;
    border-color: #245b48;
  }

  #teamview.my-tasks-layout .tp-tabs > button:is(.primary, [aria-pressed="true"], [aria-selected="true"]) > span {
    color: #fff;
    background: #194536;
  }

  #teamview.my-tasks-layout :is(.tp-search, .task-filter-search-row) input,
  dialog#modal:has(#inspectionStartDialog) .inspection-start-filters :is(input, select) {
    color: var(--task-ink);
    border-radius: 999px;
    border-color: #a5c2b4;
    background: var(--task-glass-control);
  }

  #teamview.my-tasks-layout :is(.tp-search, .task-filter-search-row) input::placeholder,
  dialog#modal:has(#inspectionStartDialog) .inspection-start-filters input::placeholder {
    color: var(--task-muted);
    opacity: 1;
  }

  #teamview.my-tasks-layout :is(.task-list-cards .tp-task, .task-list-tables .card, .task-list-tables .table-wrap, .task-group-mode .task-section, .tp-empty) {
    border-color: var(--task-glass-border);
    border-radius: var(--task-card-radius);
    background: var(--task-glass-card);
    box-shadow: var(--task-glass-shadow);
  }

  #teamview.my-tasks-layout .task-list-tables .card .table-wrap,
  #teamview.my-tasks-layout .task-list-tables .table-wrap > table:not(.wp-phone-table) {
    background: transparent;
    box-shadow: none;
  }

  #teamview.my-tasks-layout .task-list-tables .table-wrap > table > thead > tr > th {
    color: var(--task-muted);
    background: rgba(239, 251, 245, .67);
  }

  #teamview.my-tasks-layout .task-list-cards .tp-task[open] {
    border-color: #8ab5a1;
  }

  #teamview.my-tasks-layout :is(.tp-task-meta, .tp-count, .tp-search, .tp-task-bottom > span:not(.tp-late)) {
    color: var(--task-muted);
  }

  #teamview.my-tasks-layout .tp-status {
    border-radius: 999px;
  }

  #teamview.my-tasks-layout .tp-status:not(.tp-overdue) {
    color: #264f41;
    background: #e0eee7;
  }

  #teamview.my-tasks-layout .tp-status.tp-overdue {
    color: #853b26;
    background: #fbe9df;
  }

  #teamview.my-tasks-layout :is(button, input, select, summary):focus-visible,
  dialog#modal:has(#inspectionStartDialog) :is(button, input, select):focus-visible {
    outline: 2px solid #2a6653;
    outline-offset: 2px;
  }

  dialog#modal:has(#inspectionStartDialog) {
    color: var(--task-ink);
    border: 1px solid rgba(237, 255, 245, .9);
    border-radius: 30px;
    background:
      radial-gradient(ellipse at 102% -18%, rgba(181, 224, 225, .57), transparent 61%),
      linear-gradient(138deg, #f8fffb, #e7f3ed);
    box-shadow: 0 30px 70px rgba(13, 45, 35, .25), inset 0 1px rgba(255, 255, 255, .94);
  }

  dialog#modal:has(#inspectionStartDialog)::backdrop {
    background: rgba(18, 52, 42, .25);
  }

  @supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    #teamview.my-tasks-layout :is(.my-task-heading, .my-task-actions, .task-list-cards .tp-task) {
      -webkit-backdrop-filter: blur(7px);
      backdrop-filter: blur(7px);
    }

    dialog#modal:has(#inspectionStartDialog) {
      background:
        radial-gradient(ellipse at 102% -18%, rgba(183, 225, 232, .36), transparent 61%),
        linear-gradient(138deg, rgba(249, 255, 252, .68), rgba(227, 245, 238, .55));
      -webkit-backdrop-filter: blur(14px);
      backdrop-filter: blur(14px);
    }
  }

  #inspectionStartDialog > h2 {
    color: var(--task-ink);
    font-size: clamp(1.5rem, 2.8vw, 2.05rem);
    letter-spacing: -.023em;
  }

  #inspectionStartDialog > p,
  #inspectionStartDialog .inspection-start-location small {
    color: var(--task-muted);
  }

  #inspectionStartDialog .inspection-start-choices > button {
    border-radius: var(--task-card-radius);
  }

  #inspectionStartDialog #inspectionStartChoose {
    color: var(--task-ink);
    border-color: #a8c9bb;
    background: var(--task-glass-control);
    box-shadow: var(--task-glass-shadow);
  }

  #inspectionStartDialog #inspectionStartChoose:hover {
    background: #e6f4ee;
  }

  #inspectionStartDialog .inspection-start-filters {
    padding: 12px;
    border: 1px solid var(--task-glass-border);
    border-radius: 24px;
    background: var(--task-glass-panel);
  }

  #inspectionStartDialog .inspection-start-list {
    border-color: var(--task-glass-border);
    border-radius: 24px;
    background: var(--task-glass-card);
  }

  #inspectionStartDialog .inspection-start-location {
    border-color: #dce9e1;
  }

  @media (max-width: 700px) {
    #teamview.my-tasks-layout .my-task-heading {
      border-radius: var(--task-card-radius);
    }

    #teamview.my-tasks-layout .my-task-heading > h1 > span {
      min-width: 1.45rem;
      min-height: 1.45rem;
      font-size: .72rem;
    }

    dialog#modal:has(#inspectionStartDialog) {
      border-radius: 28px;
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
    }
  }

  @media (prefers-reduced-transparency: reduce) {
    #teamview.my-tasks-layout,
    dialog#modal:has(#inspectionStartDialog) {
      --task-glass-heading: #eef7f2;
      --task-glass-panel: #eef7f2;
      --task-glass-card: #f4faf6;
      --task-glass-control: #f8fcf9;
      --task-glass-filter: #e6f3eb;
    }

    #teamview.my-tasks-layout :is(.my-task-heading, .my-task-actions, .task-list-cards .tp-task),
    dialog#modal:has(#inspectionStartDialog) {
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }

    dialog#modal:has(#inspectionStartDialog) {
      background: #eef7f2;
    }
  }
}

/* Inspection actions in My Tasks. */
@media screen {
  #teamview.my-tasks-layout .inspection-task-table-actions button + button {
    margin-inline-start: 6px;
  }

  #teamview.my-tasks-layout .inspection-task-card {
    margin-block-end: 11px;
    overflow: hidden;
    border: 1px solid var(--task-glass-border);
    border-radius: var(--task-card-radius);
    background: var(--task-glass-card);
    box-shadow: var(--task-glass-shadow);
  }

  #teamview.my-tasks-layout .inspection-task-card .tp-task {
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  #teamview.my-tasks-layout .inspection-task-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 7px;
    padding: 8px 12px 12px;
    color: var(--task-muted);
    font-size: 12px;
  }

  #teamview.my-tasks-layout [data-inspection-task-start] {
    min-height: 44px;
    border-radius: 999px;
  }
}

@media screen and (max-width: 700px) {
  #teamview.my-tasks-layout .my-task-actions.my-task-inspection-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #teamview.my-tasks-layout .my-task-inspection-actions > [data-task-start-inspection] {
    grid-column: 1 / -1;
    font-size: 14px;
  }
}

/* Online Fire Extinguisher inspection checklist. */
@media screen {
  #inspectionform[data-fe-checklist] .inspection-check-progress {
    display: grid;
    gap: 9px;
    min-width: 0;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--jxm-glass-edge, #a5c3b7);
    border-radius: var(--jxm-glass-inner-radius, 19px);
    background: var(--jxm-glass-control, #f3faf6);
    color: var(--jxm-glass-ink, #183c31);
    font-size: 13px;
    line-height: 1.35;
  }

  #inspectionform[data-fe-checklist] [data-fe-check-progress] {
    width: 100%;
    min-width: 0;
    height: 8px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #d2e5d9;
    accent-color: #377951;
  }

  #inspectionform[data-fe-checklist] [data-fe-check-progress]::-webkit-progress-bar {
    background: #d2e5d9;
  }

  #inspectionform[data-fe-checklist] [data-fe-check-progress]::-webkit-progress-value {
    background: #377951;
  }

  #inspectionform[data-fe-checklist] #inspectionPhotoEvidence {
    scroll-margin-block-start: 12px;
    border-radius: var(--jxm-glass-inner-radius, 19px);
    background: var(--jxm-glass-control, #f3faf6);
  }

  #inspectionform[data-fe-checklist] #inspectionPhotoEvidence:focus {
    outline: 2px solid #315e48;
    outline-offset: 2px;
  }

  #inspectionform[data-fe-checklist] .inspection-check-actions > button {
    min-height: 44px;
  }
}

@media screen and (max-width: 700px) and (min-height: 480px) {
  dialog#modal:has(#inspectionform[data-fe-checklist]) {
    scroll-padding-block-end: 75px;
  }

  #inspectionform[data-fe-checklist] .inspection-check-actions {
    position: sticky;
    z-index: 1;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr);
    gap: 8px;
    margin-block: 12px 0;
    padding: 9px;
    border: 1px solid var(--jxm-glass-control-edge, #a5c3b7);
    border-radius: var(--jxm-glass-inner-radius, 19px);
    background: var(--jxm-glass-reading, #f9fdfa);
    box-shadow: 0 4px 14px #193d3026;
  }

  #inspectionform[data-fe-checklist] .inspection-check-actions > button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

/* Workspace menus, compact table labels and reachable dialog controls. */
@media screen {
  html[lang] body.workspace-shell-active :is(#profileMenu .profile-options, #workspacePicker .workspace-picker-options) {
    color: var(--jxm-glass-ink);
    background: #eff8f3;
    border-color: #a5c3b7;
    border-radius: var(--jxm-glass-inner-radius);
  }

  html[lang] :is(#profileMenu .profile-options small, #workspacePicker .workspace-picker-options small) {
    color: var(--jxm-glass-muted);
  }

  html[lang] #teamview.wp-compact .wp-phone-table td[data-wp-label]::before {
    color: #456356;
    font-size: 11px;
    letter-spacing: .02em;
  }

  html[lang] #modal .dialog-quick-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #b8d2c4;
    border-radius: var(--jxm-glass-inner-radius);
    background: #edf8f2;
    color: var(--jxm-glass-ink);
  }

  html[lang] #modal .dialog-quick-heading > h2 {
    min-width: 0;
    margin: 9px 0 0;
    overflow-wrap: anywhere;
  }

  html[lang] #modal .dialog-quick-close {
    flex: 0 0 auto;
    min-height: 44px;
    margin: 0;
    padding-inline: 12px;
    border: 1px solid #9bbbad;
    border-radius: 999px;
    color: var(--jxm-glass-ink);
    background: #f8fdf9;
  }

  html[lang] :is(#teamview button[role="tab"], #modal .dialog-quick-close):focus-visible {
    outline: 2px solid #285a43;
    outline-offset: 2px;
  }
}

@media screen and (max-width: 700px) and (min-height: 440px) {
  html[lang] #modal:has(.dialog-quick-heading) {
    scroll-padding-top: 96px;
  }

  html[lang] #modal .dialog-quick-heading {
    position: sticky;
    top: 0;
    z-index: 2;
  }
}

/* ESH Hub and User Management. */
@media screen {
  html[lang] #teamview :is(
    .programme-heading p,
    .programme-heading .field,
    .programme-metrics span,
    .programme-toolbar .field,
    .programme-note,
    .programme-month-heading > span,
    .programme-empty,
    .programme-entry small
  ) {
    color: var(--jxm-glass-muted, #36534a);
    font-size: 12px;
    line-height: 1.5;
  }

  html[lang] .um-settings-block .um-setting-row > div {
    min-inline-size: 0;
  }

  html[lang] .um-settings-block .um-setting-row > .um-scope-badge {
    flex: 0 0 auto;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  html[lang] dialog#modal:has(.um-dialog > :is(#umManageForm, #umPublicWorkspaceForm)) {
    scroll-padding-block-start: 80px;
  }

  html[lang] .um-dialog:has(> :is(#umManageForm, #umPublicWorkspaceForm)) > .um-dialog-heading {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    align-items: center;
    margin-block-end: 14px;
    padding: 8px 10px;
    border: 1px solid #c9dcd1;
    border-radius: 15px;
    background: #f2faf6;
    box-shadow: 0 6px 15px #183c3118;
  }

  html[lang] .um-dialog:has(> :is(#umManageForm, #umPublicWorkspaceForm)) > .um-dialog-heading h2 {
    min-inline-size: 0;
    margin: 0;
  }

  html[lang] .um-dialog:has(> :is(#umManageForm, #umPublicWorkspaceForm)) > .um-dialog-heading > button {
    min-height: 44px;
  }

  html[lang] #umManageForm #umAutomaticWorkspaceAccess {
    margin: 0;
  }

  html[lang] #umAutomaticWorkspaceAccess > p {
    margin-block-end: 8px;
    color: var(--jxm-glass-muted, #36534a);
  }

  html[lang] #umAutomaticWorkspaceAccess [data-um-basic-workspace] input[disabled][aria-hidden="true"] {
    display: none;
  }

  html[lang] #umAutomaticWorkspaceAccess [data-um-basic-workspace] {
    margin-block-start: 5px;
    padding: 6px 9px;
    border-color: #cbded1;
    background: rgba(247, 252, 248, .75);
  }

  html[lang] #umAutomaticWorkspaceAccess [data-um-basic-workspace] .um-workspace-check-label {
    min-height: 26px;
    cursor: default;
  }

  html[lang] #umAutomaticWorkspaceAccess [data-um-basic-workspace] .um-workspace-check-label > span {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 3px 8px;
  }

  html[lang] #umAutomaticWorkspaceAccess [data-um-basic-workspace] small {
    margin: 0;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e9f1ec;
    color: #36534a;
  }

  html[lang] #umAutomaticWorkspaceAccess [data-um-basic-workspace]:has(input:checked) small {
    background: #e0eee4;
    color: #285940;
  }

  html[lang] #umManageForm .um-workspace-admin {
    margin-block: 0;
  }

  html[lang] #umWorkspaceAdminRows .um-workspace-admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    border-radius: 13px;
    border-color: #b8d3c5;
    background: var(--jxm-glass-control, #f3faf6);
  }

  html[lang] #umWorkspaceAdminRows .um-workspace-admin-row > button {
    min-height: 44px;
    max-inline-size: 12rem;
    padding-inline: 10px;
    white-space: normal;
  }

  html[lang] #umManageForm :is(#umSavedMemberships, #umWorkspaceRoles) {
    margin: 0;
    padding: 0;
    border: 1px solid #c7dccf;
    border-radius: 13px;
  }

  html[lang] #umManageForm :is(#umSavedMemberships, #umWorkspaceRoles) > summary {
    min-height: 44px;
    padding: 11px 12px;
    border-radius: inherit;
    color: var(--jxm-glass-ink, #183c31);
  }

  html[lang] #umManageForm :is(#umSavedMemberships, #umWorkspaceRoles)[open] > :not(summary) {
    margin-inline: 12px;
  }

  html[lang] #umManageForm :is(#umSavedMemberships, #umWorkspaceRoles)[open] {
    padding-block-end: 12px;
  }
}

@media screen and (max-width: 540px) {
  html[lang] .um-dialog:has(> #umManageForm) .um-profile-fields {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }

  html[lang] .um-dialog:has(> #umManageForm) .um-profile-fields > :first-child {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 420px) {
  html[lang] #teamview:has(.hub-heading) .toolbar:has(> .hub-search) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
  }

  html[lang] #teamview:has(.hub-heading) .toolbar:has(> .hub-search) > .field {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
  }

  html[lang] #teamview:has(.hub-heading) .toolbar:has(> .hub-search) > .field > :is(input, select) {
    width: 100%;
    min-width: 0;
  }

  html[lang] #teamview .programme-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Safety & Health filters and Report Preview controls. */
@media screen {
  html[lang] :is(
    #modal .ml-counts,
    #modal .ml-unit-cards > article,
    #modal:has(button[onclick="editIncidentCategory()"]) .wp-phone-table > tbody > tr,
    #teamview .callout:has(~ #deletedRecords)
  ) {
    border-radius: var(--jxm-glass-inner-radius);
    border: 1px solid var(--jxm-glass-inset-edge);
    background: var(--jxm-glass-inset);
  }

  html[lang] #modal [data-location-delete-entry] {
    min-height: 44px;
    color: #842b25;
    border-color: #a7665d;
    background: rgba(255, 225, 217, .55);
  }

  html[lang] #modal [data-location-delete-entry]:hover {
    background: rgba(255, 218, 209, .85);
  }

  html[lang] .wo-category-table thead th:nth-child(n+2) {
    overflow-wrap: normal;
  }

  @media (max-width: 700px) {
    html[lang] .wo-category-table :is(th, td):nth-child(n+2) {
      width: 76px;
      padding-inline: 6px;
    }
  }

  @media (max-width: 370px) {
    html[lang] #teamview.wp-compact[data-wp-page="Inspection Assignment"] .equipment-location-filters {
      grid-template-columns: minmax(0, 1fr);
    }

    html[lang] #teamview.wp-compact[data-wp-page="Assets"] .asset-simple-main:has(#assetSearch) {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
    }

    html[lang] #teamview.wp-compact[data-wp-page="Assets"] .asset-simple-main:has(#assetSearch) > .field {
      width: 100%;
    }

    html[lang] #teamview.wp-compact[data-wp-page="Assets"] .asset-simple-main:has(#assetSearch) > button {
      justify-self: start;
      min-height: 44px;
    }
  }

  html[lang] .esh-print-toolbar:has([data-report-fit]) {
    flex-wrap: wrap;
    gap: 8px;
  }

  html[lang] .esh-print-toolbar > [data-report-fit][aria-pressed="true"] {
    color: white;
    border-color: #245445;
    background: #245445;
  }

  html[lang] .esh-print-toolbar > [data-report-fit]:disabled {
    opacity: .6;
  }

  @media (max-width: 370px) {
    html[lang] .esh-print-toolbar:has([data-report-fit]) {
      gap: 6px;
      padding-inline: 10px;
    }

    html[lang] .esh-print-toolbar:has([data-report-fit]) > button {
      padding-inline: 8px;
    }
  }
}

@media screen {
  #inspectionform .fe-checklist-fields {
    gap: .85rem;
  }

  #inspectionform .fe-checklist-fields > p:first-child {
    margin-block: 0 .15rem;
  }

  #inspectionform .fe-checklist-fields .inspection-check {
    min-width: 0;
    margin: 0;
    padding: .45rem clamp(.65rem, 2vw, .95rem) .7rem;
    border: 1px solid #aac7b9;
    border-radius: .95rem;
    background: rgba(250, 255, 252, .40);
  }

  #inspectionform .fe-checklist-fields .inspection-check > legend {
    color: #193e32;
    font-weight: 680;
  }

  #inspectionform .fe-checklist-fields .inspection-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    max-inline-size: 17rem;
  }

  #inspectionform .fe-checklist-fields .inspection-results label {
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: .4rem clamp(.3rem, 2vw, .7rem);
    justify-content: center;
    gap: .35rem;
    border-radius: .75rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  #inspectionform .fe-checklist-fields .inspection-results input {
    margin: 0;
  }

  #inspectionform .fe-checklist-fields .inspection-results label:has(input:focus-visible) {
    outline: 2px solid #315e48;
    outline-offset: 2px;
  }

  #inspectionform .fe-checklist-fields .inspection-check[data-inspection-not-applicable] {
    background: rgba(223, 238, 229, .54);
  }

  #inspectionform .fe-gauge-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .55rem;
    color: #35554a;
    font-size: .84rem;
    line-height: 1.35;
  }

  #inspectionform .fe-gauge-badge {
    display: inline-flex;
    padding: .28rem .55rem;
    border: 1px solid #a9c6b7;
    border-radius: 999px;
    background: #f3faf5;
    color: #23493b;
    font-weight: 700;
    white-space: nowrap;
  }
}

@media screen and (max-width: 700px) and (min-height: 480px) {
  dialog#modal:has(#inspectionform[data-fe-checklist] .fe-checklist-fields) {
    scroll-padding-block-end: 5.25rem;
  }

  #inspectionform[data-fe-checklist]:has(.fe-checklist-fields) .inspection-check-actions {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
    padding: .4rem;
  }

  #inspectionform[data-fe-checklist]:has(.fe-checklist-fields) .inspection-check-actions > button {
    min-height: 44px;
    padding: .35rem .45rem;
    font-size: .875rem;
    line-height: 1.2;
  }
}

@media screen and (max-width: 700px) {
  #inspectionform:has(.fe-checklist-fields) select[name="asset"] {
    box-sizing: border-box;
    inline-size: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
  }
}


/* Shared dialog glass. Keep the printable report and label artwork on white. */
@media screen {
  html[lang] .esh-print-preview .esh-print-toolbar {
    border-bottom: 1px solid var(--jxm-glass-control-edge);
  }

  html[lang] dialog#modal:has(> .ml-detail) {
    height: fit-content;
  }
}

@media screen {
  @supports (backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px)) {
    html[lang] {
      --jxm-dialog-glass-fill: linear-gradient(135deg, rgb(248 255 252 / .52), rgb(220 248 237 / .32));
      --jxm-dialog-glass-blur: 16px;
      --jxm-dialog-glass-inset: rgb(247 255 251 / .23);
    }

    @media (max-width: 700px) {
      html[lang] {
        --jxm-dialog-glass-fill: linear-gradient(135deg, rgb(248 255 252 / .42), rgb(220 248 237 / .19));
        --jxm-dialog-glass-blur: 9px;
        --jxm-dialog-glass-inset: rgb(247 255 251 / .14);
      }
    }

    html[lang] dialog[open]:is(#modal, #notificationSettingsPage, #startupDiagnostics, .secDialog, .secVehicleDialog, .secStaffQrDialog):not(.esh-print-preview),
    html[lang] dialog#modal[open]:has(:is(#inspectionStartDialog, #noticeCentre)) {
      --jxm-glass-inset: var(--jxm-dialog-glass-inset);
      --jxm-glass-inset-edge: rgb(47 101 81 / .24);
      color: #0b201a;
      background: var(--jxm-dialog-glass-fill);
      border: 1px solid rgb(255 255 255 / .76);
      border-radius: 28px;
      box-shadow: 0 24px 64px rgb(13 45 35 / .23), inset 0 1px rgb(255 255 255 / .78);
      -webkit-backdrop-filter: blur(var(--jxm-dialog-glass-blur)) saturate(128%);
      backdrop-filter: blur(var(--jxm-dialog-glass-blur)) saturate(128%);
    }

    html[lang] dialog[open]:is(#modal, #notificationSettingsPage, #startupDiagnostics, .secDialog, .secVehicleDialog, .secStaffQrDialog):not(.esh-print-preview)::backdrop,
    html[lang] dialog#modal[open]:has(:is(#inspectionStartDialog, #noticeCentre))::backdrop {
      background: rgb(18 52 42 / .20);
    }

    html[lang] dialog[open]:is(#modal, #notificationSettingsPage, #startupDiagnostics, .secDialog, .secVehicleDialog, .secStaffQrDialog) :is(label.field, legend, dt),
    html[lang] #modal .manufacture-optional > small,
    html[lang] #modal .ml-detail :is(.ml-heading .eyebrow, .ml-linked h3 span, .ml-schedule p:not(.ml-warning)) {
      color: #0b201a;
    }

    html[lang] dialog#modal[open]:not(.esh-print-preview) .table-wrap,
    html[lang] dialog.secVehicleDialog[open] .secVehicleScroll {
      --glassy-data-fill: rgb(248 255 252 / .18);
      --glassy-data-head: rgb(245 255 250 / .33);
      --glassy-data-line: rgb(47 101 81 / .22);
      --glassy-muted: #24473a;
    }

    html[lang] #modal .ml-detail .ml-linked .table-wrap {
      border: 1px solid rgb(47 101 81 / .21);
      border-radius: 14px;
      background: transparent;
    }

    html[lang] #modal .ml-detail :is(.ml-heading, .ml-schedule, .ml-linked, .ml-footer) button:not([data-location-delete-entry], .primary) {
      background: rgb(248 255 252 / .44);
      border-color: rgb(47 101 81 / .26);
    }

    html[lang] .esh-print-preview .esh-print-toolbar {
      background: var(--jxm-dialog-glass-fill);
    }
  }
}

@media screen and (prefers-reduced-transparency: reduce), screen and (prefers-contrast: more), screen and (forced-colors: active) {
  html[lang] dialog[open]:is(#modal, #notificationSettingsPage, #startupDiagnostics, .secDialog, .secVehicleDialog, .secStaffQrDialog):not(.esh-print-preview),
  html[lang] dialog#modal[open]:has(:is(#inspectionStartDialog, #noticeCentre)) {
    --jxm-glass-inset: #edf5ef;
    --jxm-glass-inset-edge: #a6bfaf;
    background: #f3faf6;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  html[lang] dialog#modal[open]:not(.esh-print-preview) .table-wrap,
  html[lang] dialog.secVehicleDialog[open] .secVehicleScroll {
    --glassy-data-fill: #f8fcf9;
    --glassy-data-head: #e3efe8;
    --glassy-data-line: #a6bfaf;
  }
}

@media screen {
  html[lang] #modal[open]:has(> .dialog-title-body, > :is(.um-dialog, #noticeCentre) > .dialog-title-body),
  html[lang] #notificationSettingsPage[open]:has(.dialog-title-body) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #modal > :is(.um-dialog, #noticeCentre):has(> .dialog-title-body),
  #notificationSettingsPage .notice-settings-content:has(> .dialog-title-body) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
  }

  html[lang] #modal[open] .dialog-quick-heading,
  html[lang] #modal[open] .um-dialog:has(> .dialog-title-body) > .um-dialog-heading,
  html[lang] #modal[open] #noticeCentre > .notice-sticky,
  html[lang] #notificationSettingsPage[open] .notice-settings-content > .notice-heading {
    position: static;
    flex: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[lang] #modal[open] .dialog-quick-heading {
    padding-inline: 0;
  }

  html[lang] #modal[open] .um-dialog:has(> .dialog-title-body) > .um-dialog-heading {
    align-items: center;
    margin-block-end: 14px;
    padding: 8px 0;
  }

  #modal .um-dialog:has(> .dialog-title-body) > .um-dialog-heading h2 {
    min-inline-size: 0;
    margin: 0;
  }

  #modal .um-dialog:has(> .dialog-title-body) > .um-dialog-heading > button {
    min-height: 44px;
  }

  .dialog-title-body {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #noticeCentre > .dialog-title-body #noticePager > .jxm-pagination {
    width: 100%;
    margin-inline: 0;
  }

  #notificationSettingsPage .notice-settings-content > .dialog-title-body {
    display: grid;
    align-content: start;
    grid-auto-rows: max-content;
    gap: 12px;
  }

  #notificationSettingsPage .notice-settings-content > .dialog-title-body > .card {
    margin: 0;
    padding: 16px;
  }

  @media (max-width: 700px) {
    #notificationSettingsPage .notice-settings-content > .dialog-title-body > .card {
      padding: 12px;
    }
  }

  html[lang] #modal[open] .um-dialog:has(#umManageForm) :is(
    #umManagedPerson .um-email,
    .um-legacy-note,
    .um-profile-fields dt,
    .um-profile-fields > .um-field,
    .um-section-choice > p,
    #umAutomaticWorkspaceAccess > p,
    #umInspectorAppointmentStatus,
    #umSecurityAssignmentStatus
  ) {
    color: #0b201a;
  }

  #modal[open] .um-profile-panel[aria-labelledby="umProfileHeading"] {
    border: 0;
  }

  html[lang] #modal[open] .um-dialog :is(#umSavedMemberships, #umWorkspaceRoles, #umInspectorAppointment, #umSecurityAssignment) {
    border: 0;
  }
}

@media screen {
  html[lang] #modal[open] .um-dialog:has(#umManageForm) :is(
    .um-workspace-title,
    .um-current-note,
    #umWorkspaceRoles .um-field,
    #umSavedMemberships .um-field,
    #umSecurityAssignment .um-field,
    #umPlannedRoleFieldset small,
    #umPICSectionFieldset small
  ),
  html[lang] :is(#teamview, #modal[open]:not(.esh-print-preview)) :is(
    .um-subtitle,
    .um-stat-label,
    .um-panel-head > p,
    .um-email,
    .um-position,
    .um-role-card > p,
    .um-settings-head > p,
    .um-setting-row p,
    .um-settings-note,
    .um-dialog-heading p,
    .um-legacy-note,
    .um-field > small,
    .account-help,
    .account-setting small,
    .account-profile-name p,
    .account-profile-fields dt,
    .hub-calendar-toolbar > span,
    .hub-calendar-note,
    .hub-esh-context small,
    #hubVisibilityHelp,
    .phone-date-stamp > span,
    .phone-agenda-event small,
    .ot-calendar-caption span,
    .ot-phone-summary summary span,
    .ot-phone-note,
    .ot-phone-count small,
    .ot-phone-date > span,
    .ot-mini-help,
    .ot-mini-legend small,
    .programme-entry small,
    .tdp-heading p,
    .tdp-panel-head p,
    .tdp-email,
    .tdp-position,
    .tdp-empty,
    .workspace-activity-list small,
    .workspace-empty:not([role]),
    .wo-dashboard .wo-workspace-name > p,
    .wo-dashboard .wo-status-item small,
    .inspection-category-context > div > span,
    .asset-coverage-note,
    .asset-detail-panel .ad-heading > p,
    .asset-detail-panel .ad-status .callout > p,
    .location-record-overview small,
    .wp-asset-placement-table .wp-placement-summary dt,
    .tp-task-more > p:not([class], [role]),
    .tp-info > p,
    .apd-note,
    .apd-reports > p:not([class], [role]),
    .offline-list small,
    .public-asset-info dt,
    .public-record-info dt,
    .public-record-heading small,
    .public-record-category,
    .public-action-timeline small,
    .public-record-empty
  ),
  html[lang] :is(#teamview, #modal[open]:not(.esh-print-preview)) .table-wrap td > small:not([class], [role]),
  html[lang] #modal[open]:not(.esh-print-preview) > .dialog-title-body > p:not([class], [id], [role]),
  html[lang] #profileMenu .profile-options .workspace-account-copy p,
  html[lang] #noticeCentre :is(.notice-meta > span, .notice-retention, .notice-empty, .notice-workspace, .notice-time, .notice-item > p),
  html[lang] #notificationSettingsPage[open] :is(.notice-hint, .notice-preferences small, #noticeFEAutoSave),
  html[lang] body[data-jxm-page="help"] :is(main .intro, #guideCount) {
    color: #0b201a;
  }

  /* Keep legends and input borders. Remove the outline around the whole group. */
  html[lang] #modal[open] :is(
    #umPlannedRoleFieldset,
    #umPICSectionFieldset,
    #umCreateWorkspaces,
    #otSettingsForm > fieldset,
    .hub-participant-fields,
    .wo-due-summary:not(.has-expired) > .dsp-summary,
    #noticeCentre .notice-retention,
    #noticeCentre .notice-empty
  ),
  html[lang] #teamview .wo-dashboard .wo-monitoring-scope {
    border: 0;
  }

  #umPlannedRoleFieldset > label,
  #umCreateWorkspaces > label,
  #inspectionStartDialog .inspection-start-location {
    border-bottom: 0;
  }

  #automaticAssetRegistration #automaticLocationList > button + button {
    border-top: 0;
  }

  @media (max-width: 700px) {
    #notificationSettingsPage[open] #noticePreferencesForm .notice-preferences > label {
      border-bottom: 0;
    }
  }
}
