/* Surface and control finishes share one palette across native pages and React.
   Screen-only decoration leaves report printing and evidence images intact. */
:root {
  --sys-control-fill:linear-gradient(180deg,var(--sys-surface),var(--sys-surface-soft));
  --sys-control-shadow:inset 0 1px 0 #fff,0 1px 2px #173e3412;
  --sys-primary-shadow:0 2px 5px #17373629;
  --sys-surface-fill:none;
  --sys-section-heading-fill:none;
  --sys-table-heading-fill:none;
  --sys-surface-shadow:0 1px 2px #173e3408;
  --sys-input-shadow:inset 0 1px 3px #173e340c,0 1px 0 #ffffffb3;
  --sys-inset-highlight:inset 0 1px 0 #ffffffb3;
}
@media screen {
  /* Teal marks deliberate actions. The sand surface frames secondary controls. */
  :root body[data-system-ui] .button {
    border-radius:8px; background:var(--sys-surface) var(--sys-control-fill); box-shadow:var(--sys-control-shadow);
    transition:background-color 140ms ease,border-color 140ms ease,box-shadow 140ms ease;
  }
  :root body[data-system-ui] :is(.button--primary,.button--accent,.button--handoff,.button--export) {
    color:var(--sys-primary-foreground); background:var(--sys-primary); border-color:var(--sys-primary);
    box-shadow:var(--sys-primary-shadow); text-shadow:none;
  }
  :root body[data-system-ui] .button--danger {
    color:var(--sys-danger); background:#fff linear-gradient(180deg,#fff,#fff7f4); border-color:#e1beb6;
    box-shadow:var(--sys-control-shadow); text-shadow:none;
  }
  :root body[data-system-ui] :is(.button--ghost,.worker-list-tools .button,.business-account-actions .button--danger) {
    background:transparent; box-shadow:none; border-color:transparent; text-shadow:none;
  }
  /* Forms feel inset without weakening their contrast, errors or focus ring. */
  :root body[data-system-ui] :is(.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),.field select,.field textarea,.task-search input,.task-filter-fields select) {
    background:var(--sys-surface); border-radius:8px; box-shadow:var(--sys-input-shadow);
  }
  :root body[data-system-ui] .field :is(input,select,textarea):focus {
    box-shadow:inset 0 1px 2px #173e340a,0 0 0 3px #43857124;
  }
  :root body[data-system-ui] :is(.icon-button,.shared-account header [data-account-close]) {
    background:var(--sys-surface) var(--sys-control-fill); box-shadow:var(--sys-control-shadow); border-radius:var(--sys-radius-control);
  }
  :root body[data-system-ui] :is(.topbar,.worker-topbar,.patrol-topbar) {
    background:var(--sys-surface); box-shadow:none;
  }
  :root body[data-system-ui] :is(.worker-bottom-nav,.admin-module-nav) { box-shadow:none; }
  :root body[data-system-ui] :is(.operations-sections,.business-role-tabs) { box-shadow:inset 0 1px 2px #173e340a; }
  :root body[data-system-ui] :is(:is(.operations-sections,.issue-status-filters) a[aria-current=page],.business-role-tabs button[aria-pressed=true],.status-filters button.is-active) {
    background:var(--sys-selected) var(--sys-selection-fill); box-shadow:var(--sys-control-shadow);
  }

  /* Only outer work surfaces lift; table rows and nested records stay flat. */
  :root body[data-system-ui] :is(.business-dashboard-main > .business-panel,.business-hub > .business-panel:not(:last-child),.business-record-table,.workforce-records,.task-panel,.worker-task-card,.task-hero,.worker-task-notes,.panorama-workflow,.task-report-card,.task-photo-group,.report-source-evidence,.monthly-company-report,.monthly-no-report,.workspace-filter) {
    background:var(--sys-surface) var(--sys-surface-fill); box-shadow:var(--sys-surface-shadow);
  }
  :root body[data-system-ui] .report-form #report-fields > section {
    background:var(--sys-surface) var(--sys-surface-fill); box-shadow:var(--sys-surface-shadow);
  }
  :root body[data-system-ui] .report-form :is(.report-structure,.report-extra) { box-shadow:none; }
  :root body[data-system-ui] :is(.business-panel-heading,.panel-heading) { background:var(--sys-section-heading-background) var(--sys-section-heading-fill); }
  :root body[data-system-ui] :is(.business-table-heading,.list-columns) { color:var(--sys-table-heading-foreground); background:var(--sys-table-heading) var(--sys-table-heading-fill); border-color:var(--sys-section-heading-border); }
  :root body[data-system-ui] :is(.business-record-icon,.business-shortcut-icon,.business-avatar,.parcel-icon) {
    background:var(--sys-accent-soft); box-shadow:var(--sys-inset-highlight);
  }
  :root body[data-system-ui] :is(.metric--priority,.business-worker-summary) {
    background:var(--sys-selected); color:var(--sys-primary-hover); border-radius:var(--sys-radius-panel); box-shadow:none;
  }
  :root body[data-system-ui] :is(.metric--priority,.business-worker-summary) :is(h3,p,strong,small,.metric-top,.business-icon) {
    color:var(--sys-primary-hover);
  }
  :root body[data-system-ui] .report-submit-bar { background:var(--sys-surface-soft); box-shadow:0 -3px 12px #173e3410; }
  :root body[data-system-ui] #workerTaskView > .worker-task-notes { align-self:start; }
  :root body[data-system-ui] .business-worker-todo { box-shadow:var(--sys-inset-highlight); }
  :root body[data-system-ui] :is(.business-dashboard-side .business-panel-heading,.business-hub > .business-panel:last-child .business-panel-heading) { background:transparent; }
  :root body[data-system-ui] .worker-task-card.is-overdue { background:var(--sys-risk-row); border-color:var(--sys-status-warning-border); box-shadow:none; }
  :root body[data-system-ui] :is(.upload-box,.task-photo-empty) { background:var(--sys-surface-soft); box-shadow:var(--sys-input-shadow); }
  :root body[data-system-ui] .upload-picker { color:var(--sys-primary); background:var(--sys-selected); border-color:var(--sys-selected-border); box-shadow:var(--sys-control-shadow); border-radius:8px; }
  :root body[data-system-ui] input[type=file]::file-selector-button { color:var(--sys-primary); background:#fff var(--sys-control-fill); box-shadow:var(--sys-control-shadow); border-radius:8px; }


  :root body[data-system-ui] dialog:not(.patrol-photo-viewer):not(.pano-dialog) {
    background:var(--sys-surface) var(--sys-surface-fill); box-shadow:0 18px 54px #102a2238,0 2px 8px #102a2214;
  }
  :root body[data-system-ui] dialog :is(.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header) { background:var(--sys-section-heading-background) var(--sys-section-heading-fill); }
  :root body[data-system-ui] dialog :is(.task-editor__footer,.review-dialog__footer,.flight-dialog__footer,.organization-dialog__footer) { background:var(--sys-surface-soft); }
  :root body[data-system-ui] :is(.admin-notices-panel,.collection-library-dialog) { box-shadow:0 12px 36px #173e3426,0 2px 6px #173e3410; }
  :root body[data-system-ui] .admin-notices-panel > header { background:var(--sys-section-heading-background) var(--sys-section-heading-fill); }
  :root body[data-system-ui] .admin-notice.is-unread { background:#f1f8ed linear-gradient(90deg,#f1f8ed,#fff 75%); }
  :root body[data-system-ui] :is(.point-chip.is-selected,.attendance-parcel[aria-pressed=true]) { box-shadow:inset 0 1px 0 #ffffffb3,inset 0 0 0 1px #17644f24; }

  /* Keep the login layout and mobile attendance geometry exactly as they are. */
  :root body[data-system-ui] .login-gate { background:var(--sys-background); }
  :root body[data-system-ui] .login-card { background:var(--sys-surface) var(--sys-surface-fill); border-color:var(--sys-border); box-shadow:0 18px 48px #173e3414,0 2px 6px #173e340a,inset 0 1px 0 #fff; }
  :root body.worker-app .attendance-stage #attendance-locate,
  :root body.worker-app .attendance-simple #attendance-submit,
  :root body.worker-app .attendance-success > .button { background:var(--sys-primary); color:var(--sys-primary-foreground); border-color:var(--sys-primary); box-shadow:var(--sys-control-shadow); }

  /* React controls expose the same semantic variants as the native controls. */
  :root body[data-system-ui=workbench] [data-ui-variant] { border-radius:8px; transition:background-color 140ms ease,border-color 140ms ease,box-shadow 140ms ease; }
  :root body[data-system-ui=workbench] [data-ui-variant=default] {
    color:var(--sys-primary-foreground); background:var(--sys-primary); box-shadow:var(--sys-primary-shadow);
  }
  :root body[data-system-ui=workbench] :is([data-ui-variant=outline],[data-ui-variant=secondary]) { background:#fff var(--sys-control-fill); box-shadow:var(--sys-control-shadow); }
  :root body[data-system-ui=workbench] [data-ui-variant=destructive] { background:var(--sys-danger); box-shadow:inset 0 1px 0 #ffffff24,0 2px 5px #9c302b26; }
  :root body[data-system-ui=workbench] :is([data-ui-variant=ghost],[data-ui-variant=link],.panel-actions [data-ui-variant]) { background:transparent; box-shadow:none; }
  :root body[data-system-ui=workbench] #create-task { color:var(--sys-primary-foreground); background:var(--sys-primary); border-color:var(--sys-primary); box-shadow:var(--sys-primary-shadow); }
  :root body[data-system-ui=workbench] :is(.search-field input,[role=combobox],.editor-field input,.editor-field select,.editor-field textarea,.form-field input:not([type=checkbox]):not([type=radio]):not([type=file]),.form-field textarea) { background:var(--sys-surface); border-radius:var(--sys-radius-control); box-shadow:var(--sys-input-shadow); }
  :root body[data-system-ui=workbench] [data-ui-variant]:focus-visible { outline:2px solid var(--sys-focus); outline-offset:3px; }
  :root body[data-system-ui=workbench] :is(.search-field input,[role=combobox],.editor-field input,.editor-field select,.editor-field textarea,.form-field input:not([type=checkbox]):not([type=radio]):not([type=file]),.form-field textarea):focus-visible {
    outline:2px solid var(--sys-focus); outline-offset:2px; box-shadow:var(--sys-input-shadow),0 0 0 3px #43857124;
  }
  :root body[data-system-ui=workbench] .detail-heading { background:var(--sys-section-heading-background) var(--sys-section-heading-fill); }
  :root body[data-system-ui=workbench] .detail-footer { background:var(--sys-surface-soft); box-shadow:0 -2px 10px #173e340c; }
  :root body[data-system-ui=workbench] :is(.task-sheet,.editor-dialog,.confirm-dialog,.review-form-dialog) { box-shadow:0 18px 54px #102a2238,0 2px 8px #102a2214; }
  :root body[data-system-ui=workbench] [role=tab][data-state=active] { box-shadow:var(--sys-control-shadow); }

  /* Map chrome shares the finish; the approved full-width parcel buttons stay. */
  :root body[data-system-kind=map] :is(.search-panel,.map-account-bar,.map-legend,.control-panel,.selected-parcel-card,.label-category-filters) { background:var(--sys-surface) var(--sys-surface-fill); box-shadow:var(--sys-surface-shadow); }
  :root body[data-system-kind=map] .search-panel .search-panel__submit { background:var(--sys-primary); box-shadow:var(--sys-primary-shadow); }
  :root body[data-system-kind=map] :is(.map-startup-state__card,.map-info-panel,.search-suggestions) { background:var(--sys-surface) var(--sys-surface-fill); box-shadow:var(--sys-shadow-dialog); }
}
/* The navigation rail stays light. Deep ink marks only the current item. */
@media screen {
  :root body[data-system-ui] :is(.admin-module-nav,.worker-bottom-nav) {
    background:var(--sys-nav-background);
    color:var(--sys-nav-foreground); border-color:var(--sys-nav-border); border-radius:0;
  }
  :root body[data-system-ui] .workspace-navigation :is(.worker-nav-label,.worker-nav-icon,.worker-nav-description) { color:var(--sys-nav-foreground); }
  :root body[data-system-ui] .workspace-navigation .worker-nav-item .worker-nav-icon { background:transparent; }
  :root body[data-system-ui] .workspace-navigation .worker-nav-heading { display:none; }
  :root body[data-system-ui] .workspace-navigation .navigation-count { color:var(--sys-primary-foreground); background:var(--sys-primary); box-shadow:0 0 0 1px var(--sys-nav-background); }
  :root body[data-system-ui] .workspace-navigation .worker-nav-item[aria-current=page] :is(.worker-nav-label,.worker-nav-icon,.worker-nav-description) { color:var(--sys-nav-active-foreground); }
  :root body[data-system-ui] :is(.workspace-nav-surface,.workspace-navigation .worker-nav-item[aria-current=page]) {
    background:var(--sys-nav-active-background); border-radius:var(--sys-radius-control);
  }
  :root body[data-system-ui] .workspace-nav-indicator { background:var(--sys-nav-active-indicator); }
  :root body[data-system-ui] .workspace-navigation .worker-nav-item:focus-visible { outline:2px solid var(--sys-focus); outline-offset:2px; }
  :root body[data-system-ui] .patrol-form:not(.report-form) { background-color:var(--sys-surface); }
  :root body[data-system-ui] .patrol-stats:not(.business-monthly-stats) { background:transparent; border-radius:0; }
  :root body[data-system-ui] .patrol-stats:not(.business-monthly-stats) .patrol-stat { border-radius:var(--sys-radius-panel); }
  :root body[data-system-ui] .patrol-stats .patrol-stat { background:var(--sys-surface); }
  :root body[data-system-ui] .business-monthly-context .business-monthly-stats { border-radius:var(--sys-radius-panel); background:var(--sys-surface); }
  :root body[data-system-ui] :is(.business-record,.workforce-record):not(.is-urgent) { background:var(--sys-surface); }
  :root body[data-system-ui] :is(.business-record,.workforce-record):nth-of-type(even):not(.is-urgent) { background:var(--sys-surface); }
  :root body[data-system-ui=workbench] .task-row { background:var(--sys-surface); }
  :root body[data-system-ui=workbench] .task-row.task-row--overdue { background:var(--sys-risk-row); box-shadow:none; }
  :root body[data-system-ui=workbench] .task-list > li:nth-child(even) .task-row:not(.task-row--overdue) { background:var(--sys-surface); }
  :root body[data-system-ui] :is(.shared-account form,.account-dialog__panel,.task-editor__panel,.review-dialog__panel) { background:var(--sys-surface); }
  :root body[data-system-ui] .shared-account header { background:transparent; }
  :root body[data-system-ui=workbench] :is(.task-sheet,.editor-dialog,.review-form-dialog,.confirm-dialog,.detail-tabs) { background:var(--sys-surface); }

  :root body[data-system-ui] .operations-sections { box-shadow:none; }
  :root body[data-system-ui] :is(.operations-sections,.issue-status-filters) a { border-radius:var(--sys-radius-control); }
  :root body[data-system-kind=map] :is(.search-panel,.map-account-bar,.map-legend,.control-panel,.selected-parcel-card,.label-category-filters) { border-radius:var(--sys-radius-panel); }
  :root body[data-system-kind=map] :is(.search-panel__submit,.search-panel__recent,.search-panel__clear,.map-account-bar__avatar,.map-account-bar__notifications,.control-panel button) { border-radius:var(--sys-radius-control); }

  /* Outer cards own the corners; interior rows do not each draw another curve. */
  :root body[data-system-ui] :is(.business-dashboard-main > .business-panel,.business-hub > .business-panel:not(:last-child),.business-record-table,.workforce-records,.task-panel,.worker-task-card,.task-hero,.worker-task-notes,.panorama-workflow,.task-report-card,.task-photo-group,.report-source-evidence,.monthly-company-report,.monthly-no-report,.workspace-filter) { border-radius:var(--sys-radius-panel); }
  :root body[data-system-ui] .report-form #report-fields > section { border-radius:var(--sys-radius-panel); }
  :root body[data-system-ui] :is(.business-panel > .business-panel-heading,.task-panel > .panel-heading) {
    border-radius:calc(var(--sys-radius-panel) - 1px) calc(var(--sys-radius-panel) - 1px) 0 0;
  }
  :root body[data-system-ui] :is(.business-record-table .business-record,.workforce-records .workforce-record) { border-radius:0; }
  :root body[data-system-ui] .business-panel > .business-panel-body { border-radius:0 0 calc(var(--sys-radius-panel) - 1px) calc(var(--sys-radius-panel) - 1px); }
  :root body[data-system-ui] .task-panel > .list-footer { border-radius:0 0 calc(var(--sys-radius-panel) - 1px) calc(var(--sys-radius-panel) - 1px); }
  /* Details may inherit through a UA slot, so its visible children need an explicit radius. */
  :root body[data-system-ui] .workspace-filter > summary { border-radius:var(--sys-radius-panel); }
  :root body[data-system-ui] .workspace-filter[open] > summary { border-radius:var(--sys-radius-panel) var(--sys-radius-panel) 0 0; }
  :root body[data-system-ui] .workspace-filter > form { border-radius:var(--sys-radius-panel); }
  :root body[data-system-ui] :is(.login-card,.shared-account,.workforce-dialog,.report-evidence-dialog,.collection-library-dialog,.patrol-capture-dialog) { border-radius:var(--sys-radius-dialog); }
  :root body[data-system-ui] .shared-account form { border-radius:inherit; }
  :root body[data-system-ui] .task-editor .task-editor__panel { border-radius:inherit; }
  :root body[data-system-ui=workbench] .task-sheet { border-radius:0; }
  :root body[data-system-ui=workbench] .task-sheet :is(.detail-heading,.detail-footer) { border-radius:0; }
  :root body[data-system-ui=workbench] .confirm-dialog { border-radius:var(--sys-radius-dialog); }
}
@media screen and (min-width:681px) {
  :root body[data-system-ui] :is(.task-editor,.flight-dialog,.review-dialog,.organization-dialog) { border-radius:var(--sys-radius-dialog); }
  :root body[data-system-ui] :is(.task-editor__header,.flight-dialog__header,.review-dialog__header,.organization-dialog__header) {
    border-start-start-radius:calc(var(--sys-radius-dialog) - 1px); border-start-end-radius:calc(var(--sys-radius-dialog) - 1px);
  }
  :root body[data-system-ui] :is(.task-editor__footer,.flight-dialog__footer,.review-dialog__footer,.organization-dialog__footer) {
    border-end-start-radius:calc(var(--sys-radius-dialog) - 1px); border-end-end-radius:calc(var(--sys-radius-dialog) - 1px);
  }
}
@media screen and (max-width:600px) {
  :root body[data-system-ui] .patrol-stats:not(.business-monthly-stats) { background:var(--sys-surface); border-radius:var(--sys-radius-panel); overflow:hidden; }
  :root body[data-system-ui] .patrol-stats:not(.business-monthly-stats) .patrol-stat { border-radius:0; }
  :root body[data-system-ui] .workspace-filter[open] > form { border-radius:0 0 var(--sys-radius-panel) var(--sys-radius-panel); }
}
@media screen and (max-width:680px) {
  :root body[data-system-ui] :is(.task-editor,.flight-dialog,.task-editor__header,.task-editor__footer,.flight-dialog__header,.flight-dialog__footer) { border-radius:0; }
}
@media screen and (min-width:721px) {
  :root body[data-system-ui=workbench] :is(.editor-dialog,.review-form-dialog) { border-radius:var(--sys-radius-dialog); }
}
@media screen and (max-width:720px) {
  :root body[data-system-ui=workbench] :is(.editor-dialog,.review-form-dialog) { border-radius:0; }
}
@media screen and (max-width:1099px) {
  :root body[data-system-ui] .report-form #report-fields > .report-submit-bar { border-radius:0; }
}
/* Independent hit areas keep highlight paint away from adjacent content. */
@media screen {
  :root body[data-system-ui] .metrics { gap:12px; }
  :root body[data-system-ui] .metric { border:1px solid var(--sys-border); border-radius:var(--sys-radius-panel); background:var(--sys-surface); }
  :root body[data-system-ui] .metric--priority { border-color:var(--sys-selected-border); background:var(--sys-selected); }
  :root body[data-system-ui] :is(.business-role-tabs,.admin-notices-filters) { gap:6px; padding:8px; }
  :root body[data-system-ui] :is(.business-role-tabs button,.admin-notices-filters button,.flight-tabs [data-flight-list]) { border-radius:var(--sys-radius-control); }
  :root body[data-system-ui=workbench] .stage-filters { gap:6px; padding:6px 16px; }
  :root body[data-system-ui=workbench] .stage-filters button { min-height:44px; height:auto; padding:8px 12px; border-radius:var(--sys-radius-control); }
  :root body[data-system-ui=workbench] .stage-filters button > span { color:var(--sys-primary-hover); }
}
@media screen and (min-width:651px) {
  :root body[data-system-ui] .business-metrics { grid-template-columns:minmax(0,1.2fr) repeat(3,minmax(0,1fr)); }
}
@media screen and (max-width:650px) {
  :root body[data-system-ui] .business-metric:not(.business-metric--priority) { padding:12px 10px; }
}
@media screen and (max-width:600px) {
  :root body[data-system-ui=workbench] .metrics { gap:8px; }
  :root body[data-system-ui=workbench] .metric { padding:12px 8px; }
  :root body[data-system-ui=workbench] .stage-filters { gap:2px; padding:6px 8px; }
  :root body[data-system-ui=workbench] .stage-filters button { padding:6px 2px; }
}
/* State paint follows surface paint: hover must not erase selection or warnings.
   Each treatment pairs its foreground and background; press follows hover so
   a held mouse button has the same feedback as a touch press. */
@media screen {
  :root {
    --sys-hover:var(--sys-subtle);
    --sys-hover-border:var(--sys-selected-border);
    --sys-pressed:var(--sys-primary-pressed);
    --sys-selection-fill:none;
  }
  :root body[data-system-ui] .workspace-navigation .worker-nav-item { color:var(--sys-nav-foreground); }
  :root body[data-system-ui] .workspace-navigation .worker-nav-item[aria-current=page] { color:var(--sys-nav-active-foreground); }
  :root body[data-system-ui] :is(.button--selected,:is(.operations-sections,.issue-status-filters) a[aria-current=page],.status-filters button.is-active,.flight-tabs [aria-pressed=true],.business-role-tabs [aria-pressed=true],.admin-notices-filters [aria-pressed=true],.report-jump button[aria-current]) {
    color:var(--sys-primary-hover); background:var(--sys-selected) var(--sys-selection-fill); border-color:var(--sys-selected-border);
  }
  :root body[data-system-ui] .button--revoke { color:var(--sys-danger); background:#fff4f0; border-color:#d5aaa0; }
  :root body[data-system-ui=workbench] .metric-selected:not(.metric--priority) { background:var(--sys-surface); border-color:var(--sys-selected-border); box-shadow:inset 0 -3px 0 var(--sys-primary); }
  :root body[data-system-ui=workbench] :is(.stage-filters .stage-active,[role=tab][data-state=active]) { color:var(--sys-primary-hover); background:var(--sys-selected) var(--sys-selection-fill); }
  :root body[data-system-ui=workbench] .metric--priority.metric-selected { box-shadow:inset 0 0 0 2px #a4c9b7; }
  :root body[data-system-ui] .review-media-tab.is-active { color:white; background:var(--sys-primary); border-color:var(--sys-primary); }
}
@media screen and (hover:hover) {
  :root body[data-system-ui] .button:hover:where(:not(:disabled):not([aria-disabled=true])) {
    color:var(--sys-primary-hover); background:var(--sys-control-hover); border-color:var(--sys-control-hover-border); box-shadow:var(--sys-control-shadow);
  }
  :root body[data-system-ui] :is(.button--primary,.button--accent,.button--handoff,.button--export):hover:where(:not(:disabled):not([aria-disabled=true])),
  :root body[data-system-ui=workbench] :is([data-ui-variant=default],#create-task):hover:where(:not(:disabled):not([aria-disabled=true])) {
    color:var(--sys-primary-foreground); background:var(--sys-primary-hover); border-color:var(--sys-primary-hover); box-shadow:var(--sys-primary-shadow);
  }
  :root body[data-system-ui] :is(.button--danger,.button--revoke):hover:where(:not(:disabled):not([aria-disabled=true])) {
    color:#982f29; background:#fbe7df; border-color:#cc9b90;
  }
  :root body[data-system-ui] :is(.button--ghost,.worker-list-tools .button,.business-account-actions .button--danger,.upload-picker):hover:where(:not(:disabled):not([aria-disabled=true])) { color:var(--sys-primary-hover); background:var(--sys-control-hover); box-shadow:none; border-color:var(--sys-control-hover-border); }
  :root body[data-system-ui] .business-account-actions .button--danger:hover { color:#982f29; background:#fbe7df; }
  :root body[data-system-ui=workbench] :is([data-ui-variant=outline],[data-ui-variant=secondary],[data-ui-variant=ghost],.panel-actions [data-ui-variant]):hover:where(:not(:disabled):not([aria-disabled=true])) {
    color:var(--sys-primary-hover); background:var(--sys-control-hover); border-color:var(--sys-control-hover-border); box-shadow:none;
  }
  :root body[data-system-ui=workbench] .stage-filters button:not(.stage-active):hover > span { color:var(--sys-primary-hover); background:#ffffff80; }
  :root body[data-system-ui=workbench] [data-ui-variant=destructive]:hover:where(:not(:disabled):not([aria-disabled=true])) { color:white; background:#982f29; }
  :root body[data-system-ui] .workspace-navigation .worker-nav-item:not([aria-current=page]):hover { color:var(--sys-primary-hover); background:var(--sys-nav-hover); }
  :root body[data-system-ui] .workspace-navigation .worker-nav-item:not([aria-current=page]):hover :is(.worker-nav-label,.worker-nav-icon,.worker-nav-description) { color:var(--sys-primary-hover); }
  :root body[data-system-ui] :is(.business-shortcut:not(.business-shortcut--priority),.workspace-hub-link):hover { color:var(--sys-primary-hover); background:var(--sys-control-hover); border-color:var(--sys-control-hover-border); }
  :root body[data-system-ui] :is(.business-metric:not(.business-metric--priority),.metric:not(.metric--priority):not(.metric-selected)):hover { color:var(--sys-primary-hover); background:var(--sys-control-hover); border-color:var(--sys-control-hover-border); }
  :root body[data-system-ui] :is(.business-metric:not(.business-metric--priority),.metric:not(.metric--priority):not(.metric-selected)):hover :is(.metric-top,div,small,.business-icon) { color:var(--sys-muted); }
  :root body[data-system-ui] :is(.business-metric:not(.business-metric--priority),.metric:not(.metric--priority):not(.metric-selected)):hover strong { color:var(--sys-primary-hover); }
  :root body[data-system-ui] .business-shortcut:not(.business-shortcut--priority):hover :is(strong,small,.business-icon),
  :root body[data-system-ui] .workspace-hub-link:hover :is(strong,small) { color:var(--sys-primary-hover); }
  :root body[data-system-ui] .business-shortcut:not(.business-shortcut--priority):hover .business-shortcut-icon { color:var(--sys-primary-hover); background:#ffffff80; box-shadow:none; }
  :root body[data-system-ui] .metric--priority:hover { background:var(--sys-selected-hover); }
  :root body[data-system-ui] :is(.business-record,.workforce-record):not(.is-urgent):hover,
  :root body[data-system-ui=workbench] .task-list > li:nth-child(n) .task-row:not(.task-row--overdue):hover { background:var(--sys-hover); }
  :root body[data-system-ui] .business-record.is-urgent:hover,
  :root body[data-system-ui=workbench] .task-row.task-row--overdue:hover { background:var(--sys-status-warning-background); }
  :root body[data-system-ui] .business-record.has-urgent-level:hover { background:var(--sys-status-danger-background); }
  :root body[data-system-ui] .worker-task-card:not(.is-overdue):hover { background:#eef4e9; border-color:var(--sys-hover-border); }
  :root body[data-system-ui] .worker-task-card.is-overdue:hover { background:var(--sys-status-warning-background); }
  :root body[data-system-ui] :is(:is(.operations-sections,.issue-status-filters) a,.business-role-tabs button,.status-filters button,.flight-tabs [data-flight-list],.admin-notices-filters button,.report-jump button):hover:where(:not(:disabled)) {
    color:var(--sys-primary-hover); background:var(--sys-control-hover);
  }
  :root body[data-system-ui] :is(.button--selected,:is(.operations-sections,.issue-status-filters) a[aria-current=page],.status-filters button.is-active,.flight-tabs [aria-pressed=true],.business-role-tabs [aria-pressed=true],.admin-notices-filters [aria-pressed=true],.report-jump button[aria-current],.business-shortcut--priority):hover:where(:not(:disabled):not([aria-disabled=true])),
  :root body[data-system-ui=workbench] :is(.metric-selected:not(.metric--priority),.stage-filters .stage-active,[role=tab][data-state=active]):hover {
    color:var(--sys-primary-hover); background:var(--sys-selected-hover);
  }
  :root body[data-system-ui] .admin-notice:hover { background:var(--sys-hover); }
  :root body[data-system-ui] :is(.icon-button,.shared-account header [data-account-close],.password-input__toggle,.admin-notices-close,.admin-notices-read-all):hover:where(:not(:disabled)) { color:var(--sys-primary-hover); background:var(--sys-control-hover); border-color:var(--sys-control-hover-border); }
  :root body[data-system-ui] .task-hero__back:hover { color:var(--sys-primary-hover); background:var(--sys-control-hover); border-color:var(--sys-control-hover-border); }
  :root body[data-system-kind=map] .search-panel .search-panel__submit:hover { color:var(--sys-primary-foreground); background:var(--sys-primary-hover); }
  :root body[data-system-kind=map] .label-category-filters__button:not([aria-pressed=true]):hover { color:var(--sys-primary-hover); background:var(--sys-hover); }
}
@media screen {
  :root body[data-system-ui] .button:active:where(:not(:disabled):not([aria-disabled=true])),
  :root body[data-system-ui=workbench] :is([data-ui-variant=outline],[data-ui-variant=secondary],[data-ui-variant=ghost],.panel-actions [data-ui-variant]):active:where(:not(:disabled):not([aria-disabled=true])) {
    color:var(--sys-primary-hover); background:var(--sys-control-pressed); box-shadow:inset 0 2px 3px #173e3424;
  }
  :root body[data-system-ui] :is(.button--primary,.button--accent,.button--handoff,.button--export):active:where(:not(:disabled):not([aria-disabled=true])),
  :root body[data-system-ui=workbench] :is([data-ui-variant=default],#create-task):active:where(:not(:disabled):not([aria-disabled=true])) {
    color:var(--sys-primary-foreground); background:var(--sys-primary-pressed); box-shadow:inset 0 2px 3px #174e4a40;
  }
  :root body[data-system-ui] :is(.button--danger,.button--revoke):active:where(:not(:disabled):not([aria-disabled=true])) { color:#982f29; background:#f3d7cc; }
  :root body[data-system-ui=workbench] [data-ui-variant=destructive]:active:where(:not(:disabled)) { color:white; background:#832822; box-shadow:inset 0 2px 3px #521a1740; }
  :root body[data-system-kind=map] .search-panel .search-panel__submit:active { color:var(--sys-primary-foreground); background:var(--sys-primary-pressed); box-shadow:inset 0 2px 3px #174e4a40; }
  :root body[data-system-ui=workbench] .stage-filters .stage-active:active { color:var(--sys-primary-hover); background:var(--sys-selected-pressed); }
  /* These high-specificity native controls intentionally use their own roles. */
  :root body[data-system-ui].admin-app .task-editor #point-map-toggle[aria-pressed=true]:is(:hover,:active) { color:white; background:var(--sys-primary-hover); }
  :root body.worker-app .attendance-stage #attendance-locate:active:where(:not(:disabled)),
  :root body.worker-app .attendance-simple #attendance-submit:active:where(:not(:disabled)),
  :root body.worker-app .attendance-success > .button:active { color:var(--sys-primary-foreground); background:var(--sys-primary-pressed); }
}
/* Ordinary headings stay light; navigation, primary actions and urgency own emphasis. */
@media screen {
  :root body[data-system-ui] :is(.business-panel-heading,.panel-heading,.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header,.admin-notices-panel > header,.detail-heading,.editor-dialog > .form-heading,.review-form-dialog > .form-heading) {
    color:var(--sys-section-heading-foreground); background:var(--sys-section-heading-background) var(--sys-section-heading-fill); border-bottom-color:var(--sys-section-heading-border);
  }
  :root body[data-system-ui] :is(.business-panel-heading,.panel-heading,.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header,.admin-notices-panel > header,.detail-heading,.editor-dialog > .form-heading,.review-form-dialog > .form-heading) :is(h1,h2,h3) { color:var(--sys-section-heading-foreground); }
  :root body[data-system-ui] :is(.business-panel-heading,.panel-heading,.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header,.admin-notices-panel > header,.detail-heading,.editor-dialog > .form-heading,.review-form-dialog > .form-heading) :is(p,.eyebrow,.muted) { color:var(--sys-section-heading-muted); }
  :root body[data-system-ui=workbench] .panel-heading > div > span { color:var(--sys-section-heading-muted); }
  :root body[data-system-ui] :is(:is(.business-panel-heading,.panel-heading,.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header,.admin-notices-panel > header,.detail-heading,.editor-dialog > .form-heading,.review-form-dialog > .form-heading) :is(.button,.icon-button,[data-ui-variant],button[aria-label^="关闭"]),.task-sheet > button,.editor-dialog > button,.review-form-dialog > button) {
    color:var(--sys-primary-hover); background:#fff var(--sys-control-fill); border:1px solid #bdd0c2; border-radius:var(--sys-radius-control); box-shadow:none; text-shadow:none;
  }
  /* Account actions are an unboxed subsection, so their heading stays on the page canvas. */
  :root body[data-system-ui] :is(.business-dashboard-side .business-panel-heading,.business-hub > .business-panel:last-child .business-panel-heading) { color:var(--sys-heading); background:transparent; }
  :root body[data-system-ui] :is(.business-dashboard-side .business-panel-heading,.business-hub > .business-panel:last-child .business-panel-heading) :is(h1,h2,h3) { color:var(--sys-heading); }
  :root body[data-system-ui] :is(.business-dashboard-side .business-panel-heading,.business-hub > .business-panel:last-child .business-panel-heading) p { color:var(--sys-muted); }
  :root body[data-system-ui] :is(:is(.business-panel-heading,.panel-heading,.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header,.admin-notices-panel > header,.detail-heading,.editor-dialog > .form-heading,.review-form-dialog > .form-heading) :is(.button,.icon-button,[data-ui-variant],button[aria-label^="关闭"]),.task-sheet > button,.editor-dialog > button,.review-form-dialog > button):focus-visible { outline:2px solid var(--sys-primary); outline-offset:3px; }
}
@media screen and (hover:hover) {
  :root body[data-system-ui] :is(:is(.business-panel-heading,.panel-heading,.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header,.admin-notices-panel > header,.detail-heading,.editor-dialog > .form-heading,.review-form-dialog > .form-heading) :is(.button,.icon-button,[data-ui-variant],button[aria-label^="关闭"]),.task-sheet > button,.editor-dialog > button,.review-form-dialog > button):hover:where(:not(:disabled):not([aria-disabled=true])) { color:var(--sys-primary-hover); background:var(--sys-control-hover); border-color:var(--sys-control-hover-border); box-shadow:none; }
}
@media screen {
  :root body[data-system-ui] :is(:is(.business-panel-heading,.panel-heading,.task-editor__header,.review-dialog__header,.flight-dialog__header,.organization-dialog__header,.person-notification-dialog > header,.admin-notices-panel > header,.detail-heading,.editor-dialog > .form-heading,.review-form-dialog > .form-heading) :is(.button,.icon-button,[data-ui-variant],button[aria-label^="关闭"]),.task-sheet > button,.editor-dialog > button,.review-form-dialog > button):active:where(:not(:disabled):not([aria-disabled=true])) { color:var(--sys-primary-hover); background:var(--sys-control-pressed); border-color:var(--sys-control-hover-border); box-shadow:inset 0 2px 3px #173e3424; }
}
@media screen and (min-width:721px) {
  :root body[data-system-ui=workbench] :is(.editor-dialog,.review-form-dialog) > .form-heading { border-start-start-radius:calc(var(--sys-radius-dialog) - 1px); border-start-end-radius:calc(var(--sys-radius-dialog) - 1px); }
}
@media screen and (prefers-reduced-motion:reduce) {
  :root body[data-system-ui] :is(.button,[data-ui-variant]) { transition:none; }
}
