/* Final app UI layer.
   Loaded after legacy CSS so the redesign is deterministic without deleting
   older selectors that may still protect route-specific behavior. */
:root,
html[data-theme="dark"] {
  --app-bg: #060913;
  --app-bg-2: #0b1020;
  --app-surface: rgba(18, 25, 43, 0.94);
  --app-surface-2: rgba(25, 34, 56, 0.96);
  --app-surface-3: rgba(34, 45, 72, 0.96);
  --app-inset: #080d1a;
  --app-text: #f8fbff;
  --app-text-2: #d9e3f4;
  --app-muted: #9aa9c2;
  --app-border: rgba(129, 156, 205, 0.24);
  --app-border-2: rgba(139, 169, 223, 0.38);
  --app-primary: #7c9cff;
  --app-primary-strong: #9bb5ff;
  --app-secondary: #22d3ee;
  --app-violet: #a78bfa;
  --app-success: #34d399;
  --app-warning: #fbbf24;
  --app-danger: #fb7185;
  --app-focus: rgba(124, 156, 255, 0.42);
  --app-action-primary: #526a64;
  --app-action-hover: #5b776f;
  --app-action-pressed: #465d58;
  --app-action-soft: rgba(99, 132, 123, 0.18);
  --app-action-soft-hover: rgba(115, 148, 139, 0.24);
  --app-action-border: #78968e;
  --app-action-strong: #a9c1ba;
  --app-action-text: #ffffff;
  --app-action-focus: rgba(99, 132, 123, 0.28);
  --app-action-disabled-bg: #27313b;
  --app-action-disabled-border: #3d4854;
  --app-action-disabled-text: #7f8b99;
  --app-shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.22);
  --app-shadow-md: 0 18px 48px rgba(0, 0, 0, 0.32);
  --app-radius-md: 14px;
  --app-radius-lg: 18px;
  --app-radius-xl: 24px;
  --app-radius-pill: 999px;
  --app-fast: 140ms;
  --app-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --surface-page: var(--app-bg);
  --surface-1: var(--app-surface);
  --surface-2: var(--app-surface-2);
  --surface-3: var(--app-surface-3);
  --surface-inset: var(--app-inset);
  --text-primary: var(--app-text);
  --text-secondary: var(--app-text-2);
  --text-muted: var(--app-muted);
  --border-default: var(--app-border);
  --border-strong: var(--app-border-2);
  --accent-solid: var(--app-primary);
  --accent-solid-hover: var(--app-primary-strong);
  --bg: var(--surface-page);
  --panel: var(--surface-1);
  --panel-2: var(--surface-2);
  --border: var(--border-default);
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --accent: var(--accent-solid);
}

/* Application status dialog — compact shared final owner. */
#applicationActionModal .application-status-dialog {
  width: min(520px, calc(100vw - 28px)) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 20px !important;
  background: var(--app-surface) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24) !important;
}

#applicationActionModal .application-status-dialog__header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
}

#applicationActionModal .application-status-dialog__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--app-action-border);
  border-radius: 12px;
  color: var(--app-action-strong);
  background: var(--app-action-soft);
}

#applicationActionModal .application-status-dialog svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#applicationActionModal .application-status-dialog__heading {
  min-width: 0;
}

#applicationActionModal .application-status-dialog__heading h3 {
  margin: 0 !important;
  color: var(--app-text) !important;
  font-size: 19px !important;
  line-height: 1.25 !important;
  letter-spacing: -0.015em;
}

#applicationActionModal .application-status-dialog__heading .subtext {
  margin-top: 3px;
  color: var(--app-muted) !important;
  font-size: 12px !important;
  line-height: 1.4;
}

#applicationActionModal button.application-status-dialog__close {
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 10px !important;
  color: var(--app-muted) !important;
  background: var(--app-surface-2) !important;
  box-shadow: none !important;
}

#applicationActionModal button.application-status-dialog__close:hover {
  border-color: var(--app-action-border) !important;
  color: var(--app-action-strong) !important;
  background: var(--app-action-soft-hover) !important;
}

#applicationActionModal .application-status-dialog__job {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 22px;
  padding: 14px 16px !important;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface-2);
}

#applicationActionModal .application-status-dialog__job-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#applicationActionModal .application-status-dialog__job-field .label {
  color: var(--app-muted) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#applicationActionModal .application-status-dialog__job-field > span:last-child {
  overflow: hidden;
  color: var(--app-text) !important;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#applicationActionModal .application-status-dialog__prompt {
  padding: 18px 22px 9px;
  color: var(--app-text-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#applicationActionModal .application-status-dialog__actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
  padding: 0 22px 22px !important;
}

#applicationActionModal .application-status-dialog__actions > button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 780 !important;
}

#applicationActionModal .application-status-dialog__actions .applied-action-btn {
  border: 1px solid var(--app-action-primary) !important;
  color: #fff !important;
  background: var(--app-action-primary) !important;
}

#applicationActionModal .application-status-dialog__actions .applied-action-btn:hover {
  border-color: var(--app-action-hover) !important;
  background: var(--app-action-hover) !important;
}

#applicationActionModal .application-status-dialog__actions .saved-action-btn {
  border: 1px solid #d8c08b !important;
  color: #725918 !important;
  background: #f8f1df !important;
}

#applicationActionModal .application-status-dialog__actions .saved-action-btn:hover {
  border-color: #c9ac68 !important;
  background: #f1e6c8 !important;
}

#applicationActionModal .application-status-dialog__actions .not-applied-action-btn {
  border: 1px solid #e4b4aa !important;
  color: #87483e !important;
  background: #fbede9 !important;
}

#applicationActionModal .application-status-dialog__actions .not-applied-action-btn:hover {
  border-color: #d79789 !important;
  background: #f7dfd9 !important;
}

#applicationActionModal .application-status-dialog__actions .application-status-dialog__dismiss {
  border: 1px solid var(--app-border) !important;
  color: var(--app-text-2) !important;
  background: var(--app-surface) !important;
}

#applicationActionModal .application-status-dialog__actions .application-status-dialog__dismiss:hover {
  border-color: var(--app-action-border) !important;
  color: var(--app-action-strong) !important;
  background: var(--app-action-soft-hover) !important;
}

/* The collapsed rail keeps the text-only mark intact by scaling, never cropping. */
body.app-shell-collapsed .app-shell-brand-logo {
  width: 44px !important;
  max-width: 44px !important;
  height: auto !important;
  object-fit: contain !important;
}

@media (max-width: 560px) {
  #applicationActionModal .application-status-dialog__job,
  #applicationActionModal .application-status-dialog__actions {
    grid-template-columns: 1fr;
  }
}

html[data-theme="light"] {
  --app-bg: #eef4fb;
  --app-bg-2: #f8fbff;
  --app-surface: rgba(255, 255, 255, 0.96);
  --app-surface-2: #ffffff;
  --app-surface-3: #edf4ff;
  --app-inset: #f4f8fd;
  --app-text: #101828;
  --app-text-2: #26344c;
  --app-muted: #56657c;
  --app-border: rgba(71, 94, 132, 0.2);
  --app-border-2: rgba(71, 94, 132, 0.34);
  --app-primary: #2563eb;
  --app-primary-strong: #1d4ed8;
  --app-secondary: #0891b2;
  --app-violet: #7c3aed;
  --app-success: #059669;
  --app-warning: #b45309;
  --app-danger: #dc2626;
  --app-focus: rgba(37, 99, 235, 0.26);
  --app-action-primary: #56746d;
  --app-action-hover: #49655f;
  --app-action-pressed: #3f5953;
  --app-action-soft: #edf2f0;
  --app-action-soft-hover: #e4ece9;
  --app-action-border: #c9d6d2;
  --app-action-strong: #36534c;
  --app-action-text: #ffffff;
  --app-action-focus: rgba(86, 116, 109, 0.2);
  --app-action-disabled-bg: #e5e7eb;
  --app-action-disabled-border: #d1d5db;
  --app-action-disabled-text: #8a929d;
  --app-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
  --app-shadow-md: 0 18px 46px rgba(15, 23, 42, 0.12);
  --surface-page: var(--app-bg);
  --surface-1: var(--app-surface);
  --surface-2: var(--app-surface-2);
  --surface-3: var(--app-surface-3);
  --surface-inset: var(--app-inset);
  --text-primary: var(--app-text);
  --text-secondary: var(--app-text-2);
  --text-muted: var(--app-muted);
  --border-default: var(--app-border);
  --border-strong: var(--app-border-2);
  --accent-solid: var(--app-primary);
  --accent-solid-hover: var(--app-primary-strong);
  --bg: var(--surface-page);
  --panel: var(--surface-1);
  --panel-2: var(--surface-2);
  --border: var(--border-default);
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --accent: var(--accent-solid);
}

body {
  color: var(--app-text) !important;
  background:
    radial-gradient(circle at 12% -12%, rgba(124, 156, 255, 0.18), transparent 34%),
    radial-gradient(circle at 84% 4%, rgba(34, 211, 238, 0.1), transparent 28%),
    linear-gradient(135deg, var(--app-bg) 0%, var(--app-bg-2) 52%, var(--app-bg) 100%) !important;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 4% 0%, rgba(37, 99, 235, 0.14), transparent 30%),
    radial-gradient(circle at 96% 2%, rgba(8, 145, 178, 0.12), transparent 30%),
    linear-gradient(135deg, #eef4fb 0%, #f8fbff 50%, #edf4fb 100%) !important;
}

:where(a, button, input, select, textarea, [tabindex]):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.shared-filter-select__search-input):focus-visible:where(:not(.planning-bulk-results__search-input)) {
  outline: 3px solid var(--app-focus) !important;
  outline-offset: 2px;
}

.page:not(.preferences-workflow):not(.preferences-page) {
  width: min(100%, 1720px) !important;
  max-width: none !important;
  padding: clamp(20px, 2vw, 34px) !important;
}

h1 {
  color: var(--app-text) !important;
  font-size: clamp(38px, 5vw, 74px) !important;
  font-weight: 940 !important;
  letter-spacing: -0.045em !important;
  line-height: 0.95 !important;
}

h2 {
  color: var(--app-text) !important;
  font-weight: 900 !important;
  letter-spacing: -0.025em !important;
}

.subtext,
.subtitle,
.page-description,
.result-meta,
.datetime-cell-time,
.control-help,
.field-help-wide {
  color: var(--app-muted) !important;
}

.card,
.table-card,
.controls-card,
.scheduler-ops-card,
.scheduler-table-card,
.profile-section-card:not(.profile-preferences-section),
.saved-scans-card,
.saved-scans-table-card,
.application-view-card,
.intelligence-card,
.decision-card,
.modal-card,
.profile-dropdown {
  border: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius-xl) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--app-surface) !important;
  box-shadow: var(--app-shadow-md) !important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .table-card,
html[data-theme="light"] .controls-card,
html[data-theme="light"] .scheduler-ops-card,
html[data-theme="light"] .scheduler-table-card,
html[data-theme="light"] .profile-section-card:not(.profile-preferences-section),
html[data-theme="light"] .saved-scans-card,
html[data-theme="light"] .saved-scans-table-card,
html[data-theme="light"] .application-view-card,
html[data-theme="light"] .intelligence-card,
html[data-theme="light"] .decision-card,
html[data-theme="light"] .modal-card,
html[data-theme="light"] .profile-dropdown {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.96)),
    var(--app-surface) !important;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.app-shell-collapse-btn):not(.app-shell-close-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.source-yield-source-button):not(.planning-react-bulk-generate):where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.btn,
.ghost-btn,
.app-shell-primary-link,
.application-pagination-btn,
.planning-pagination-btn,
.job-apply-btn,
.apply-btn,
.planning-tailoring-btn,
.theme-toggle-btn,
.profile-avatar-btn,
.notification-btn {
  border-radius: var(--app-radius-md) !important;
  border: 1px solid var(--app-border-2) !important;
  font-weight: 850 !important;
  transition:
    transform var(--app-fast) var(--app-ease),
    box-shadow var(--app-fast) var(--app-ease),
    background var(--app-fast) var(--app-ease),
    border-color var(--app-fast) var(--app-ease),
    color var(--app-fast) var(--app-ease) !important;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.app-shell-collapse-btn):not(.app-shell-close-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.source-yield-source-button):not(.planning-react-bulk-generate):where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.primary-btn,
.btn-primary,
.app-shell-primary-link {
  border-color: var(--app-action-primary) !important;
  background: var(--app-action-primary) !important;
  background-image: none !important;
  color: var(--app-action-text) !important;
  box-shadow: 0 7px 18px rgba(54, 83, 76, 0.16) !important;
}

.ghost-btn,
.application-pagination-btn,
.planning-pagination-btn,
.theme-toggle-btn,
.profile-avatar-btn,
.notification-btn,
.job-apply-btn,
.apply-btn,
.planning-tailoring-btn {
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.app-shell-collapse-btn):not(.app-shell-close-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.source-yield-source-button):not(.planning-react-bulk-generate):not(:disabled):hover:where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.primary-btn:not(:disabled):hover,
.btn-primary:not(:disabled):hover,
.app-shell-primary-link:not([aria-disabled="true"]):hover {
  transform: translateY(-1px);
  border-color: var(--app-action-hover) !important;
  background: var(--app-action-hover) !important;
  background-image: none !important;
  box-shadow: 0 9px 20px rgba(54, 83, 76, 0.2) !important;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.app-shell-collapse-btn):not(.app-shell-close-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.planning-react-bulk-generate):not(:disabled):active:where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.primary-btn:not(:disabled):active,
.btn-primary:not(:disabled):active,
.app-shell-primary-link:not([aria-disabled="true"]):active {
  transform: translateY(0) !important;
  border-color: var(--app-action-pressed) !important;
  background: var(--app-action-pressed) !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(54, 83, 76, 0.16) !important;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.app-shell-collapse-btn):not(.app-shell-close-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.planning-react-bulk-generate):disabled:where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.primary-btn:disabled,
.btn-primary:disabled,
.app-shell-primary-link[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: 1 !important;
  transform: none !important;
  border-color: var(--app-action-disabled-border) !important;
  background: var(--app-action-disabled-bg) !important;
  background-image: none !important;
  color: var(--app-action-disabled-text) !important;
  box-shadow: none !important;
}

body .source-yield-source-button {
  min-height: 34px !important;
  padding: 4px 8px !important;
  border: 1px solid color-mix(in srgb, var(--app-border-2) 82%, transparent) !important;
  border-radius: 9px !important;
  background: color-mix(in srgb, var(--app-primary) 7%, var(--app-surface-3)) !important;
  color: color-mix(in srgb, var(--app-text) 88%, #334e72) !important;
  box-shadow: none !important;
  transform: none !important;
}

body .source-yield-source-button:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--app-primary) 28%, var(--app-border-2)) !important;
  background: color-mix(in srgb, var(--app-primary) 11%, var(--app-surface-3)) !important;
  box-shadow: 0 2px 7px rgba(51, 78, 114, 0.09) !important;
  transform: none !important;
}

body .source-yield-source-button:focus-visible {
  outline: 3px solid var(--app-focus) !important;
  outline-offset: 2px;
}

html[data-theme="dark"] body .source-yield-source-button {
  border-color: var(--app-border-2) !important;
  background: color-mix(in srgb, var(--app-primary) 14%, var(--app-surface-2)) !important;
  color: var(--app-text) !important;
}

html[data-theme="dark"] body .source-yield-source-button:not(:disabled):hover {
  background: color-mix(in srgb, var(--app-primary) 20%, var(--app-surface-2)) !important;
}

input:not(.shared-filter-select__search-input):where(:not(.planning-bulk-results__search-input, .planning-bulk-results__checkbox)),
select,
textarea,
.multi-select-trigger {
  border: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius-md) !important;
  background: var(--app-inset) !important;
  color: var(--app-text) !important;
}

input:not(.shared-filter-select__search-input):where(:not(.planning-bulk-results__search-input, .planning-bulk-results__checkbox))::placeholder,
textarea::placeholder {
  color: var(--app-muted) !important;
  opacity: 0.9;
}

input:not(.shared-filter-select__search-input):focus:where(:not(.planning-bulk-results__search-input, .planning-bulk-results__checkbox)),
select:focus,
textarea:focus,
.multi-select.is-open .multi-select-trigger {
  border-color: var(--app-primary) !important;
  box-shadow: 0 0 0 4px var(--app-focus) !important;
}

.app-shell {
  width: var(--app-shell-width, 268px) !important;
  padding: 22px 18px !important;
  border-right: 1px solid rgba(125, 170, 255, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(125, 170, 255, 0.14), transparent 22%),
    radial-gradient(circle at 8% 0%, rgba(56, 189, 248, 0.22), transparent 32%),
    radial-gradient(circle at 100% 18%, rgba(52, 211, 153, 0.09), transparent 28%),
    linear-gradient(180deg, #111c34 0%, #091226 50%, #060b18 100%) !important;
  box-shadow:
    18px 0 54px rgba(0, 0, 0, 0.34),
    inset -1px 0 0 rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="light"] .app-shell {
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(244, 249, 255, 0.98)) !important;
  border-right-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow:
    18px 0 46px rgba(15, 23, 42, 0.08),
    inset -1px 0 0 rgba(255, 255, 255, 0.84) !important;
}

html[data-theme="light"] .app-shell-brand {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96)) !important;
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(37, 99, 235, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
}

html[data-theme="light"] .app-shell-nav-link {
  color: #64748b !important;
}

html[data-theme="light"] .app-shell-nav-short {
  border-color: rgba(37, 99, 235, 0.12) !important;
  background: rgba(37, 99, 235, 0.06) !important;
  color: #475569 !important;
}

.app-shell-brand-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 152px !important;
  margin: 0 0 22px !important;
  padding: 48px 0 18px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.app-shell-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 208px !important;
  height: 92px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(203, 213, 225, 0.38) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.92)) !important;
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(125, 170, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  text-decoration: none !important;
}

.app-shell-brand::before,
.app-shell-brand::after {
  content: none !important;
  display: none !important;
}

.app-shell-brand-logo {
  display: block !important;
  width: 204px !important;
  max-width: 204px !important;
  height: 92px !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.1)) !important;
}

.app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
  margin-left: var(--app-shell-width, 268px) !important;
  padding-top: 104px !important;
}

body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
  margin-left: var(--app-shell-collapsed-width, 68px) !important;
}

.app-shell-nav {
  display: grid !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.app-shell-nav-link {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  color: #a9b8ce !important;
  font-size: 15px !important;
  font-weight: 820 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.app-shell-nav-short {
  display: inline-grid !important;
  place-items: center !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  color: #c6d2e5 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.app-shell-nav-link.active .app-shell-nav-short,
.app-shell-nav-link[aria-current="page"] .app-shell-nav-short {
  border-color: rgba(34, 211, 238, 0.24) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.5), rgba(20, 184, 166, 0.24)) !important;
  color: #ffffff !important;
}

.app-shell-nav-label {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) {
  position: fixed !important;
  top: 18px !important;
  right: 22px !important;
  z-index: 80 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: max-content !important;
  max-width: min(760px, calc(100vw - var(--app-shell-width, 268px) - 56px)) !important;
  padding: 8px !important;
  border: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius-pill) !important;
  background: rgba(9, 14, 28, 0.78) !important;
  backdrop-filter: blur(18px);
  box-shadow: var(--app-shadow-md) !important;
}

html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) {
  background: rgba(255, 255, 255, 0.86) !important;
}

.notification-btn,
.theme-toggle-btn,
.app-shell-primary-link,
.app-shell-top-right .profile-avatar-btn {
  min-height: 48px !important;
}

.notification-btn,
.app-shell-top-right .profile-avatar-btn {
  width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  border-radius: var(--app-radius-pill) !important;
}

.notification-btn,
.theme-toggle-btn,
.app-shell-top-right .profile-avatar-btn {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(15, 23, 42, 0.64) !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.22) !important;
  backdrop-filter: blur(14px);
}

.notification-btn:hover,
.notification-btn:focus-visible,
.notification-btn[aria-expanded="true"],
.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible,
.app-shell-top-right .profile-avatar-btn:hover,
.app-shell-top-right .profile-avatar-btn:focus-visible,
.app-shell-top-right .profile-avatar-btn[aria-expanded="true"] {
  border-color: rgba(96, 165, 250, 0.52) !important;
  background:
    linear-gradient(180deg, rgba(96, 165, 250, 0.16), rgba(15, 23, 42, 0.68)),
    rgba(15, 23, 42, 0.72) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16) !important;
  transform: none !important;
}

html[data-theme="light"] .notification-btn,
html[data-theme="light"] .theme-toggle-btn,
html[data-theme="light"] .app-shell-top-right .profile-avatar-btn {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92)),
    #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .notification-btn:hover,
html[data-theme="light"] .notification-btn:focus-visible,
html[data-theme="light"] .notification-btn[aria-expanded="true"],
html[data-theme="light"] .theme-toggle-btn:hover,
html[data-theme="light"] .theme-toggle-btn:focus-visible,
html[data-theme="light"] .app-shell-top-right .profile-avatar-btn:hover,
html[data-theme="light"] .app-shell-top-right .profile-avatar-btn:focus-visible,
html[data-theme="light"] .app-shell-top-right .profile-avatar-btn[aria-expanded="true"] {
  border-color: rgba(37, 99, 235, 0.32) !important;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(248, 250, 252, 0.98)),
    #ffffff !important;
  color: #1d4ed8 !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12) !important;
}

.theme-toggle-track {
  width: 40px !important;
  height: 22px !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: var(--app-radius-pill) !important;
  background: rgba(148, 163, 184, 0.18) !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.18) !important;
}

.theme-toggle-knob {
  width: 16px !important;
  height: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.22) !important;
}

.theme-toggle-btn[aria-pressed="true"] .theme-toggle-track {
  border-color: rgba(96, 165, 250, 0.42) !important;
  background: rgba(96, 165, 250, 0.24) !important;
}

html[data-theme="light"] .theme-toggle-track {
  border-color: rgba(148, 163, 184, 0.34) !important;
  background: rgba(226, 232, 240, 0.86) !important;
}

html[data-theme="light"] .theme-toggle-btn[aria-pressed="true"] .theme-toggle-track {
  border-color: rgba(37, 99, 235, 0.34) !important;
  background: rgba(219, 234, 254, 0.96) !important;
}

.theme-toggle-btn,
.app-shell-primary-link {
  border-radius: var(--app-radius-pill) !important;
}

.app-shell-primary-link {
  min-width: 178px !important;
  padding: 0 24px !important;
  text-decoration: none !important;
}

/* Profile popover owner: account identity, menu actions, and logout. */
.profile-menu-shell {
  position: relative !important;
  flex: 0 0 auto !important;
}

.profile-dropdown {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  z-index: 1000 !important;
  display: grid !important;
  width: min(420px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  padding: 14px !important;
  gap: 12px !important;
  border: 1px solid rgba(129, 156, 205, 0.28) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 156, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(18, 25, 43, 0.98), rgba(11, 16, 32, 0.98)) !important;
  color: var(--app-text) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34) !important;
  transform-origin: top right !important;
}

.profile-dropdown.hidden {
  display: none !important;
}

html[data-theme="light"] .profile-dropdown {
  border-color: rgba(71, 94, 132, 0.2) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  color: #101828 !important;
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.14) !important;
}

.profile-dropdown::before {
  content: "" !important;
  position: absolute !important;
  top: -7px !important;
  right: 22px !important;
  width: 14px !important;
  height: 14px !important;
  border-top: 1px solid rgba(129, 156, 205, 0.28) !important;
  border-left: 1px solid rgba(129, 156, 205, 0.28) !important;
  background: #12192b !important;
  transform: rotate(45deg) !important;
}

html[data-theme="light"] .profile-dropdown::before {
  border-color: rgba(71, 94, 132, 0.2) !important;
  background: #ffffff !important;
}

.profile-dropdown-identity {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px !important;
  border: 1px solid rgba(129, 156, 205, 0.24) !important;
  border-radius: 18px !important;
  background: rgba(25, 34, 56, 0.72) !important;
}

html[data-theme="light"] .profile-dropdown-identity {
  border-color: rgba(37, 99, 235, 0.14) !important;
  background: linear-gradient(135deg, #eff6ff, #ecfeff) !important;
}

.profile-dropdown-avatar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, var(--app-primary), var(--app-secondary)) !important;
  color: #ffffff !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24) !important;
}

.profile-dropdown-identity-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

.profile-dropdown-name {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--app-text) !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.profile-dropdown-email {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--app-muted) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html[data-theme="light"] .profile-dropdown-name {
  color: #101828 !important;
}

html[data-theme="light"] .profile-dropdown-email {
  color: #56657c !important;
}

.profile-dropdown-actions {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  gap: 10px !important;
}

.profile-dropdown-nav-btn {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 20px !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 76px !important;
  padding: 12px !important;
  border: 1px solid rgba(129, 156, 205, 0.22) !important;
  border-radius: 18px !important;
  background: rgba(15, 23, 42, 0.36) !important;
  color: var(--app-text) !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.profile-dropdown-nav-btn.hidden {
  display: none !important;
}

html[data-theme="light"] .profile-dropdown-nav-btn {
  border-color: rgba(71, 94, 132, 0.18) !important;
  background: #ffffff !important;
  color: #101828 !important;
}

.profile-dropdown-nav-btn:hover,
.profile-dropdown-nav-btn:focus-visible {
  border-color: rgba(34, 211, 238, 0.44) !important;
  background: rgba(30, 41, 59, 0.72) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18) !important;
}

html[data-theme="light"] .profile-dropdown-nav-btn:hover,
html[data-theme="light"] .profile-dropdown-nav-btn:focus-visible {
  border-color: rgba(37, 99, 235, 0.28) !important;
  background: #f8fbff !important;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08) !important;
}

.profile-dropdown-nav-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  color: var(--app-text) !important;
}

.profile-dropdown-nav-icon--scans {
  background: linear-gradient(135deg, #dbeafe, #cffafe) !important;
}

.profile-dropdown-nav-icon--profile {
  background: linear-gradient(135deg, #dcfce7, #e0f2fe) !important;
}

.profile-dropdown-nav-icon--preferences {
  background: linear-gradient(135deg, #ede9fe, #cffafe) !important;
}

.profile-dropdown-nav-icon--ai-settings {
  background: rgba(129, 140, 248, 0.2) !important;
  color: #c7d2fe !important;
}

.profile-dropdown-nav-icon--diagnostics {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fde68a !important;
}

.profile-dropdown-nav-icon--scheduler {
  background: rgba(34, 211, 238, 0.17) !important;
  color: #a5f3fc !important;
}

html[data-theme="light"] .profile-dropdown-nav-icon--ai-settings {
  background: #ede9fe !important;
  color: #5b21b6 !important;
}

html[data-theme="light"] .profile-dropdown-nav-icon--diagnostics {
  background: #fef3c7 !important;
  color: #92400e !important;
}

html[data-theme="light"] .profile-dropdown-nav-icon--scheduler {
  background: #cffafe !important;
  color: #0e7490 !important;
}

.profile-dropdown-nav-icon img {
  width: 22px !important;
  height: 22px !important;
  opacity: 0.86 !important;
}

.profile-dropdown-nav-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 3px !important;
}

.profile-dropdown-nav-title {
  display: block !important;
  overflow: hidden !important;
  color: var(--app-text) !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.profile-dropdown-nav-subtitle {
  display: block !important;
  overflow: hidden !important;
  color: var(--app-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html[data-theme="light"] .profile-dropdown-nav-title {
  color: #101828 !important;
}

html[data-theme="light"] .profile-dropdown-nav-subtitle {
  color: #56657c !important;
}

.profile-dropdown-nav-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  color: var(--app-secondary) !important;
  font-size: 30px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

.profile-dropdown-danger-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 52px !important;
  width: 100% !important;
  padding: 0 18px !important;
  border: 1px solid rgba(251, 113, 133, 0.24) !important;
  border-radius: 16px !important;
  background: rgba(251, 113, 133, 0.12) !important;
  color: #fecdd3 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .profile-dropdown-danger-btn {
  border-color: rgba(220, 38, 38, 0.18) !important;
  background: #fff7f7 !important;
  color: #b91c1c !important;
}

.profile-dropdown-danger-btn:hover:not(:disabled),
.profile-dropdown-danger-btn:focus-visible {
  border-color: rgba(251, 113, 133, 0.42) !important;
  background: rgba(251, 113, 133, 0.18) !important;
  transform: translateY(-1px) !important;
}

html[data-theme="light"] .profile-dropdown-danger-btn:hover:not(:disabled),
html[data-theme="light"] .profile-dropdown-danger-btn:focus-visible {
  background: #fee2e2 !important;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 16px !important;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  padding: 22px !important;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--app-primary), var(--app-secondary));
}

.stat-value {
  color: var(--app-text) !important;
  font-size: clamp(34px, 3vw, 48px) !important;
  font-weight: 940 !important;
  letter-spacing: -0.045em;
}

.stat-label,
.control-group label {
  color: var(--app-muted) !important;
  font-size: 12px !important;
  font-weight: 860 !important;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.dashboard-toolbar,
.controls-row,
.application-filter-grid,
.filters-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px !important;
  align-items: end !important;
}

.dashboard-toolbar-left,
.dashboard-toolbar-left--executive,
.dashboard-toolbar-left--planning {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px !important;
}

.dashboard-toolbar-right,
.dashboard-toolbar-actions,
.button-group {
  display: flex !important;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px !important;
}

.application-table-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.application-table-title-row h2 {
  margin: 0;
}

.executive-view-mode-row--table {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
}

.executive-view-mode-label {
  color: var(--app-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.binary-toggle {
  padding: 5px !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 16px !important;
  background: var(--app-inset) !important;
}

.binary-toggle--small {
  padding: 1px !important;
  border-radius: 9px !important;
}

.binary-toggle--small .binary-toggle-option span {
  min-width: 0 !important;
  padding: 3px 6px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.executive-view-mode-row--table .binary-toggle--small {
  min-height: 0 !important;
  padding: 1px !important;
}

.executive-view-mode-row--table .binary-toggle--small .binary-toggle-option span {
  min-width: 0 !important;
  padding: 3px 6px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.binary-toggle-option input:checked + span {
  border-color: var(--app-action-primary) !important;
  background: var(--app-action-primary) !important;
  background-image: none !important;
  color: var(--app-action-text) !important;
}

.binary-toggle-option input:checked + span:hover {
  border-color: var(--app-action-hover) !important;
  background: var(--app-action-hover) !important;
  background-image: none !important;
}

.pipeline-run-meta:not(#schedulerOpsMeta) {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 18px !important;
  padding: 9px 12px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-pill);
  background: rgba(124, 156, 255, 0.1);
  color: var(--app-muted) !important;
}

.application-table-header,
.planning-table-header,
.scheduler-table-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-bottom: 18px !important;
}

.application-table-header-right,
.planning-table-header-right,
.application-pagination-inline,
.planning-pagination-inline,
.application-pagination-actions,
.planning-pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.table-wrap,
.saved-scans-table-wrap,
.scheduler-attached-table-wrap {
  overflow: auto;
  border: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius-xl) !important;
  background: var(--app-surface-2) !important;
  box-shadow: var(--app-shadow-sm) !important;
}

.table-wrap table,
.saved-scans-table-wrap table,
#queueTable,
#planningTable,
#decisionsTable,
#applicationTable,
#schedulerTable {
  width: 100%;
  min-width: max-content;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.table-wrap thead th,
.saved-scans-table-wrap thead th,
#queueTable thead th,
#planningTable thead th,
#decisionsTable thead th,
#applicationTable thead th,
#schedulerTable thead th {
  height: 54px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--app-border) !important;
  background:
    linear-gradient(180deg, rgba(124, 156, 255, 0.16), rgba(124, 156, 255, 0.08)),
    var(--app-surface-3) !important;
  color: var(--app-text-2) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .table-wrap thead th,
html[data-theme="light"] .saved-scans-table-wrap thead th,
html[data-theme="light"] #queueTable thead th,
html[data-theme="light"] #planningTable thead th,
html[data-theme="light"] #decisionsTable thead th,
html[data-theme="light"] #applicationTable thead th,
html[data-theme="light"] #schedulerTable thead th {
  background: linear-gradient(180deg, #f7fbff 0%, #eaf2ff 100%) !important;
  color: #243247 !important;
}

.resizable-col-content,
.resizable-col-label,
.sort-header-btn,
.sort-header-label,
.sort-header-indicator,
th .resizable-col-content,
th .resizable-col-label,
th .sort-header-btn,
th .sort-header-label {
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.resizable-col-label,
.sort-header-label {
  color: inherit !important;
  font-size: 12px !important;
  font-weight: 930 !important;
  letter-spacing: 0.045em !important;
  text-transform: uppercase;
}

.table-wrap tbody td,
.saved-scans-table-wrap tbody td,
#queueTable tbody td,
#planningTable tbody td,
#decisionsTable tbody td,
#applicationTable tbody td,
#schedulerTable tbody td {
  padding: 18px !important;
  border-bottom: 1px solid rgba(129, 156, 205, 0.16) !important;
  background: rgba(255, 255, 255, 0.015) !important;
  color: var(--app-text) !important;
  font-weight: 620;
}

.table-wrap tbody tr:nth-child(even) td,
.saved-scans-table-wrap tbody tr:nth-child(even) td {
  background: rgba(124, 156, 255, 0.035) !important;
}

.table-wrap tbody tr:hover td,
.saved-scans-table-wrap tbody tr:hover td {
  background: rgba(124, 156, 255, 0.11) !important;
}

html[data-theme="light"] .table-wrap tbody td,
html[data-theme="light"] .saved-scans-table-wrap tbody td,
html[data-theme="light"] #queueTable tbody td,
html[data-theme="light"] #planningTable tbody td,
html[data-theme="light"] #decisionsTable tbody td,
html[data-theme="light"] #applicationTable tbody td,
html[data-theme="light"] #schedulerTable tbody td {
  background: #ffffff !important;
  color: #172033 !important;
}

html[data-theme="light"] .table-wrap tbody tr:nth-child(even) td,
html[data-theme="light"] .saved-scans-table-wrap tbody tr:nth-child(even) td {
  background: #f6f9fd !important;
}

html[data-theme="light"] .table-wrap tbody tr:hover td,
html[data-theme="light"] .saved-scans-table-wrap tbody tr:hover td {
  background: #eef6ff !important;
}

.sticky-apply-col,
.apply-cell {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 130px;
  text-align: center;
  background: var(--app-surface-2) !important;
  box-shadow: -1px 0 0 var(--app-border) !important;
}

html[data-theme="light"] .sticky-apply-col,
html[data-theme="light"] .apply-cell {
  background: #ffffff !important;
}

.application-tabs,
.scheduler-tab-row {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: var(--app-inset);
}

.application-tab,
.scheduler-tab-btn {
  min-height: 40px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--app-muted) !important;
  font-weight: 860;
}

.application-tab.active,
.scheduler-tab-btn.active,
.scheduler-tab-btn.is-active {
  border-color: var(--app-action-primary) !important;
  background: var(--app-action-primary) !important;
  background-image: none !important;
  color: var(--app-action-text) !important;
}

.resume-delete-btn::before,
.saved-scan-delete-btn::before {
  content: "";
  width: 19px;
  height: 19px;
  background-color: currentColor;
  -webkit-mask: url("/static/media/discard_img.svg") center / contain no-repeat;
  mask: url("/static/media/discard_img.svg") center / contain no-repeat;
}

@media (max-width: 980px) {
  .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page),
  body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
    margin-left: 0 !important;
    padding-top: 112px !important;
  }

  .app-shell-top-right:not(.app-shell-top-right--flow) {
    right: 14px !important;
    max-width: calc(100vw - 72px) !important;
  }

  .dashboard-toolbar,
  .controls-row,
  .application-filter-grid,
  .filters-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-toolbar-right,
  .dashboard-toolbar-actions,
  .button-group,
  .application-table-header-right,
  .planning-table-header-right {
    justify-content: flex-start;
  }

  .application-table-header,
  .planning-table-header,
  .scheduler-table-header {
    flex-direction: column;
    align-items: flex-start !important;
  }
}

@media (max-width: 680px) {
  .theme-toggle-label,
  .app-shell-primary-link-label {
    display: none !important;
  }

  .app-shell-primary-link {
    min-width: 50px !important;
    width: 50px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
}

/* Responsive and accessibility guardrails. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.page:not(.preferences-workflow):not(.preferences-page),
.card,
.table-card,
.controls-card,
.profile-section-card:not(.profile-preferences-section),
.scan-workspace-page,
.tailoring-workspace-page {
  min-width: 0;
}

.page-header:not(.preferences-command-header),
.section-header,
.application-table-header,
.planning-table-header,
.scheduler-table-header {
  min-width: 0;
}

.page-header-main,
.page-header:not(.preferences-command-header) > div:first-child,
.application-table-header h2,
.planning-table-header h2,
.scheduler-table-title-wrap,
.resume-name,
.job-link,
.title-cell a,
.cell-stack,
.resume-option-block {
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto !important;
  overscroll-behavior-x: contain;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.planning-react-bulk-generate):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.ghost-btn,
.app-shell-primary-link,
.job-apply-btn,
.apply-btn,
.planning-tailoring-btn,
.application-pagination-btn,
.planning-pagination-btn {
  white-space: nowrap;
}

.profile-dropdown,
.modal-card {
  max-width: calc(100vw - 28px) !important;
}

.modal-backdrop:not(.hidden) {
  display: grid !important;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.planning-react-bulk-generate):focus-visible:not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.ghost-btn:focus-visible,
.app-shell-primary-link:focus-visible,
.app-shell-nav-link:focus-visible,
.multi-select-trigger:focus-visible,
.binary-toggle-option input:focus-visible + span,
.application-tab:focus-visible,
.scheduler-tab-btn:focus-visible,
.saved-scan-open-link:focus-visible,
.saved-scan-delete-btn:focus-visible,
.resume-delete-btn:focus-visible {
  outline: 3px solid var(--app-focus) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--app-focus) !important;
}

button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.app-shell-collapse-btn):not(.app-shell-close-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.source-yield-source-button):not(.planning-react-bulk-generate):focus-visible:where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
.primary-btn:focus-visible,
.btn-primary:focus-visible,
.app-shell-primary-link:focus-visible,
.binary-toggle-option input:focus-visible + span {
  outline: 3px solid var(--app-action-focus) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--app-action-focus) !important;
}

.table-wrap-loading-overlay {
  background: rgba(6, 9, 19, 0.72) !important;
  backdrop-filter: blur(8px);
}

html[data-theme="light"] .table-wrap-loading-overlay {
  background: rgba(248, 251, 255, 0.74) !important;
}

.loading-state,
.resume-empty-state,
.saved-scans-empty-cell,
.tailoring-empty-state {
  color: var(--app-muted) !important;
}

@media (max-width: 1180px) {
  .app-shell-top-right:not(.app-shell-top-right--flow) {
    max-width: min(680px, calc(100vw - 92px)) !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ui_redesign_v21: compact page controls/cards and scheduler polish. */
body .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page),
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
  padding-top: 16px !important;
}

body .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .page-header,
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .page-header,
body .page > .page-header {
  justify-content: flex-start !important;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 40px !important;
  margin: 0 0 12px !important;
  padding: 0 min(620px, calc(max(0px, 100vw - var(--app-shell-collapsed-width, 68px) - 640px))) 0 0 !important;
  text-align: left !important;
}

body .page > .page-header > div:first-child,
body .page > .page-header .page-header-main {
  width: 100% !important;
  max-width: min(760px, 100%) !important;
  margin: 0 !important;
  text-align: left !important;
}

body .page > .page-header h1,
body .scan-workspace-page.page > .page-header h1,
body .scan-workspace-page.page > .page-header .scan-workspace-header-copy h1,
body .tailoring-workspace-page.page > .page-header h1 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: clamp(26px, 2vw, 34px) !important;
  font-weight: 900 !important;
  line-height: 1.04 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body .page > .page-header p,
body .page > .page-header .subtext {
  margin-top: 5px !important;
  font-size: clamp(12px, 0.85vw, 14px) !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

body .controls-card,
body .filters-card,
body .table-card,
body .scheduler-table-card,
body .saved-scans-card,
body .profile-card,
body .card {
  border-radius: 14px !important;
}

body .controls-card,
body .filters-card {
  padding: 18px 20px !important;
}

body .stats-grid {
  gap: 14px !important;
}

body .stat-card {
  min-height: 104px !important;
  padding: 18px 20px !important;
  border-radius: 14px !important;
}

body .stat-label {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body .stat-value,
body .stat-card-value {
  font-size: clamp(30px, 3vw, 52px) !important;
  line-height: 0.95 !important;
}

body .control-group {
  gap: 6px !important;
}

body .control-group label {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body .control-group input,
body .control-group select,
body .control-group textarea {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}

body button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.planning-react-bulk-generate):not(.planning-filter-apply):not(.operational-primary-action):not(.executive-queue-apply-btn):where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
body .ghost-btn,
body .btn-sm {
  min-height: 34px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}

html[data-theme="light"] body .scheduler-page {
  background:
    linear-gradient(135deg, rgba(191, 219, 254, 0.86) 0%, rgba(236, 254, 255, 0.82) 46%, rgba(248, 250, 252, 0.96) 100%),
    #edf7ff !important;
}

body .scheduler-page .page-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  padding-right: min(520px, calc(max(0px, 100vw - var(--app-shell-collapsed-width, 68px) - 760px))) !important;
}

body .scheduler-page .header-actions {
  justify-self: end !important;
  align-self: center !important;
}

html[data-theme="light"] body .scheduler-page .scheduler-table-card {
  background: #ffffff !important;
}

html[data-theme="light"] body .scheduler-page .scheduler-table-tabs {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Scheduler ops terminal overrides: underline tabs, table refresh, solid status. */
body .scheduler-page .page-header {
  display: block !important;
  padding-right: 0 !important;
}

body .scheduler-page .scheduler-table-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

body .scheduler-page .scheduler-table-header-right {
  justify-self: end !important;
  min-width: 0 !important;
}

body .scheduler-page #refreshSchedulerSummaryBtn {
  min-width: 118px !important;
}

body .scheduler-page .scheduler-run-badge {
  min-width: 94px !important;
  border: 0 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body .scheduler-page .scheduler-run-badge--success {
  background: #16a34a !important;
  color: #ffffff !important;
}

body .scheduler-page .scheduler-run-badge--danger {
  background: #dc2626 !important;
  color: #ffffff !important;
}

body .scheduler-page .scheduler-run-badge--muted {
  background: #64748b !important;
  color: #ffffff !important;
}

body .scheduler-page .page-header {
  display: block !important;
  padding-right: 0 !important;
}

body .scheduler-page .scheduler-table-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

body .scheduler-page .scheduler-table-header-right {
  justify-self: end !important;
  min-width: 0 !important;
}

body .scheduler-page #refreshSchedulerSummaryBtn {
  min-width: 118px !important;
}

body .scheduler-page .scheduler-run-badge {
  min-width: 94px !important;
  border: 0 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body .scheduler-page .scheduler-run-badge--success {
  background: #16a34a !important;
  color: #ffffff !important;
}

body .scheduler-page .scheduler-run-badge--danger {
  background: #dc2626 !important;
  color: #ffffff !important;
}

body .scheduler-page .scheduler-run-badge--muted {
  background: #64748b !important;
  color: #ffffff !important;
}

/* Dropdown and application tab polish. */
body .controls-card,
body .control-group,
body .dashboard-toolbar,
body .dashboard-toolbar-left,
body .dashboard-toolbar-right {
  overflow: visible !important;
}

body .controls-card {
  position: relative !important;
  z-index: 20 !important;
}

body .controls-card:has(.multi-select.is-open),
body .control-group:has(.multi-select.is-open) {
  z-index: 220 !important;
}

body .multi-select {
  position: relative !important;
  min-width: min(260px, 100%) !important;
  isolation: isolate !important;
}

body .multi-select.is-open {
  z-index: 5000 !important;
}

body .multi-select-trigger {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 10px !important;
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

body .multi-select-trigger:hover {
  border-color: var(--app-border-2) !important;
  background: var(--app-surface-3) !important;
}

body .multi-select.is-open .multi-select-trigger {
  border-color: var(--app-primary) !important;
  box-shadow: 0 0 0 3px var(--app-focus) !important;
}

body .multi-select-trigger-label {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-align: left !important;
}

body .multi-select-trigger-icon {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  color: var(--app-muted) !important;
  justify-self: end !important;
  margin-left: auto !important;
  transition: transform var(--app-fast) var(--app-ease), color var(--app-fast) var(--app-ease);
}

body .multi-select.is-open .multi-select-trigger-icon {
  color: var(--app-primary) !important;
  transform: rotate(180deg);
}

body .multi-select-menu {
  left: 0 !important;
  right: auto !important;
  min-width: min(280px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  max-height: min(360px, calc(100dvh - 32px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  gap: 2px !important;
  padding: 6px !important;
  border: 1px solid var(--app-border-2) !important;
  border-radius: 12px !important;
  background: var(--app-surface-2) !important;
  box-shadow:
    var(--app-shadow-md),
    0 1px 0 color-mix(in srgb, var(--app-text) 5%, transparent) inset !important;
  z-index: 10000 !important;
}

body .multi-select-menu[data-placement="bottom"] {
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
}

body .multi-select-menu[data-placement="top"] {
  border-bottom-left-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

body .multi-select-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  padding: 2px 2px 6px;
  background: var(--app-surface-2);
}

body .multi-select-search-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-inset);
  color: var(--app-text);
  font: inherit;
  font-size: 13px;
}

body .multi-select-search-input:focus {
  border-color: var(--app-primary);
  outline: 3px solid var(--app-focus);
  outline-offset: 0;
}

body .multi-select-options {
  display: grid;
  gap: 2px;
}

body .multi-select-empty {
  padding: 14px 10px;
  color: var(--app-muted);
  font-size: 13px;
  text-align: center;
}

body .multi-select-option {
  display: grid !important;
  width: 100% !important;
  min-height: 42px !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 7px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--app-text-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  box-shadow: none !important;
}

body .multi-select-option[hidden],
body .multi-select-empty[hidden] {
  display: none !important;
}

body .multi-select-option:hover,
body .multi-select-option:focus-visible {
  border-color: transparent !important;
  background: color-mix(in srgb, var(--app-primary) 10%, var(--app-surface-2)) !important;
  color: var(--app-text) !important;
  transform: none !important;
  box-shadow: none !important;
}

body .multi-select-option.is-selected {
  border-color: color-mix(in srgb, var(--app-primary) 24%, transparent) !important;
  background: color-mix(in srgb, var(--app-primary) 13%, var(--app-surface-2)) !important;
  color: var(--app-text) !important;
}

body .multi-select-option-check {
  display: inline-grid !important;
  place-items: center !important;
  width: 16px !important;
  height: 16px !important;
  border: 1px solid var(--app-border-2) !important;
  border-radius: 5px !important;
  background: var(--app-inset) !important;
  color: transparent !important;
  font-size: 10px !important;
}

body .multi-select-option.is-selected .multi-select-option-check {
  border-color: var(--app-primary) !important;
  background: var(--app-primary) !important;
  color: #fff !important;
  opacity: 1 !important;
}

body .multi-select-option-label {
  min-width: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.18 !important;
}

body .application-tabs {
  display: inline-flex !important;
  gap: 22px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body .application-tab {
  position: relative !important;
  min-height: 44px !important;
  padding: 0 2px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body .application-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

body .application-tab:hover {
  color: #1d4ed8 !important;
  transform: none !important;
  box-shadow: none !important;
}

body .application-tab.active {
  background: transparent !important;
  color: #0f172a !important;
  box-shadow: none !important;
}

body .application-tab.active::after {
  background: var(--app-action-primary) !important;
  background-image: none !important;
}

/* Scheduler ops final tab/header/status overrides. */
body .scheduler-page .page-header {
  display: block !important;
  padding-right: 0 !important;
}

body .scheduler-page .scheduler-table-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

body .scheduler-page .scheduler-table-header-right {
  justify-self: end !important;
  min-width: 0 !important;
}

body .scheduler-page #refreshSchedulerSummaryBtn {
  min-width: 118px !important;
}

body .scheduler-page .scheduler-run-badge {
  min-width: 94px !important;
  border: 0 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body .scheduler-page .scheduler-run-badge--success {
  background: #16a34a !important;
  color: #ffffff !important;
}

body .scheduler-page .scheduler-run-badge--danger {
  background: #dc2626 !important;
  color: #ffffff !important;
}

body .scheduler-page .scheduler-run-badge--muted {
  background: #64748b !important;
  color: #ffffff !important;
}

/* ui_redesign_v20: final compact title owner for every page header. */
body .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .page-header,
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .page-header,
body .page > .page-header {
  justify-content: flex-start !important;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 46px !important;
  margin: 0 0 14px !important;
  padding: 0 min(620px, calc(max(0px, 100vw - var(--app-shell-collapsed-width, 68px) - 640px))) 0 0 !important;
  text-align: left !important;
}

body .page > .page-header > div:first-child,
body .page > .page-header .page-header-main {
  width: 100% !important;
  max-width: min(760px, 100%) !important;
  margin: 0 !important;
  text-align: left !important;
}

body .page > .page-header h1,
body .scan-workspace-page.page > .page-header h1,
body .scan-workspace-page.page > .page-header .scan-workspace-header-copy h1,
body .tailoring-workspace-page.page > .page-header h1 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: clamp(28px, 2.35vw, 38px) !important;
  font-weight: 900 !important;
  line-height: 1.04 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body .page > .page-header p,
body .page > .page-header .subtext {
  margin-top: 6px !important;
  font-size: clamp(13px, 0.95vw, 16px) !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

@media (max-width: 760px) {
  h1 {
    font-size: clamp(34px, 12vw, 52px) !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .header-actions,
  .dashboard-toolbar-actions,
  .application-pagination-inline,
  .planning-pagination-inline,
  .application-pagination-actions,
  .planning-pagination-actions {
    width: 100%;
  }

  .header-actions > *,
  .dashboard-toolbar-actions > *,
  .button-group > * {
    flex: 1 1 auto;
  }

  .app-shell-top-right:not(.app-shell-top-right--flow) {
    top: 10px !important;
    right: 10px !important;
    max-width: calc(100vw - 64px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* UI stabilization pass: keep operational data visible while async refreshes run. */
body {
  overflow-x: hidden;
}

.page:not(.preferences-workflow):not(.preferences-page),
.app-shell ~ .page:not(.preferences-workflow):not(.preferences-page),
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) {
  position: absolute !important;
}

.table-wrap.table-wrap--loading {
  min-height: 240px;
  overflow-x: auto !important;
  overflow-y: auto !important;
}

.table-wrap.table-wrap--loading table {
  visibility: visible !important;
  opacity: 1 !important;
}

.table-wrap-loading-overlay,
.table-wrap-loading-overlay.hidden,
.table-wrap:not(.table-wrap--loading) .table-wrap-loading-overlay,
.table-wrap.table-wrap--loading .table-wrap-loading-overlay {
  display: none !important;
}

.table-wrap.table-wrap--loading .table-wrap-loading-overlay {
  display: none !important;
  place-items: start center;
  padding-top: clamp(34px, 8vh, 90px);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 9, 19, 0.18), rgba(6, 9, 19, 0.05)) !important;
  backdrop-filter: blur(2px);
}

html[data-theme="light"] .table-wrap.table-wrap--loading .table-wrap-loading-overlay {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.42), rgba(248, 251, 255, 0.08)) !important;
}

.table-wrap-loading-overlay .loading-state {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-pill);
  background: var(--app-surface-2);
  color: var(--app-text) !important;
  box-shadow: var(--app-shadow-md);
}

html[data-theme="light"] .table-wrap-loading-overlay .loading-state {
  background: #ffffff;
  color: #111827 !important;
}

.table-wrap thead,
.table-wrap tbody,
.table-wrap tr,
.table-wrap th,
.table-wrap td {
  visibility: visible !important;
  opacity: 1 !important;
}

.table-wrap thead th,
#queueTable thead th,
#planningTable thead th,
#decisionsTable thead th,
#applicationTable thead th,
#schedulerTable thead th {
  min-width: 112px;
  vertical-align: middle;
}

.resizable-col-content,
.sort-header-btn,
th .resizable-col-content,
th .sort-header-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 32px !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: inherit !important;
}

.resizable-col-label,
.sort-header-label,
.sort-header-indicator {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0 !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  visibility: visible !important;
  opacity: 1 !important;
  color: inherit !important;
}

.sort-header-indicator {
  flex: 0 0 auto;
  color: var(--app-muted) !important;
}

.table-wrap tbody td,
#planningTable tbody td,
#queueTable tbody td,
#decisionsTable tbody td,
#applicationTable tbody td,
#schedulerTable tbody td {
  min-width: 104px;
  line-height: 1.35;
  vertical-align: middle;
}

#planningTable td.title-cell,
#queueTable td.title-cell,
#applicationTable td.title-cell,
#decisionsTable td.reason-cell,
#planningTable td.reason-cell {
  min-width: 240px;
}

.queue-job-location,
.queue-simple-location {
  margin-top: 5px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.timestamp-unavailable-label {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--app-border-2);
  border-radius: 999px;
  background: var(--app-inset);
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.queue-advisory-priority {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  max-width: 220px;
}

.queue-advisory-kicker {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.queue-advisory-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--app-border-2);
  border-radius: 999px;
  background: var(--app-inset);
  color: var(--app-text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.queue-advisory-pill--apply_now {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}

.queue-advisory-pill--tailor_first {
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.queue-advisory-pill--manual_review {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.queue-advisory-pill--skip_for_now {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}

.queue-advisory-pill--watch_source {
  border-color: rgba(20, 184, 166, 0.4);
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.queue-advisory-details {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .queue-advisory-pill--apply_now {
  color: #a7f3d0;
}

html[data-theme="dark"] .queue-advisory-pill--tailor_first {
  color: #bfdbfe;
}

html[data-theme="dark"] .queue-advisory-pill--manual_review {
  color: #fde68a;
}

html[data-theme="dark"] .queue-advisory-pill--skip_for_now {
  color: #fecdd3;
}

html[data-theme="dark"] .queue-advisory-pill--watch_source {
  color: #99f6e4;
}

.queue-tailoring-decision {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  max-width: 240px;
}

.queue-tailoring-kicker {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.queue-tailoring-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--app-border-2);
  border-radius: 999px;
  background: var(--app-inset);
  color: var(--app-text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.queue-tailoring-pill--no_tailoring_needed {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.queue-tailoring-pill--light_tailoring {
  border-color: rgba(14, 165, 233, 0.42);
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.queue-tailoring-pill--tailor_before_apply {
  border-color: rgba(124, 58, 237, 0.38);
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.queue-tailoring-pill--manual_review_before_tailoring {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.queue-tailoring-pill--do_not_tailor {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}

.queue-tailoring-details {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .queue-tailoring-pill--no_tailoring_needed {
  color: #bbf7d0;
}

html[data-theme="dark"] .queue-tailoring-pill--light_tailoring {
  color: #bae6fd;
}

html[data-theme="dark"] .queue-tailoring-pill--tailor_before_apply {
  color: #ddd6fe;
}

html[data-theme="dark"] .queue-tailoring-pill--manual_review_before_tailoring {
  color: #fde68a;
}

html[data-theme="dark"] .queue-tailoring-pill--do_not_tailor {
  color: #fecdd3;
}

.queue-operator-review {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  max-width: 250px;
}

.queue-operator-kicker {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.queue-operator-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--app-border-2);
  border-radius: 999px;
  background: var(--app-inset);
  color: var(--app-text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.queue-operator-pill--ready_to_apply {
  border-color: rgba(5, 150, 105, 0.42);
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}

.queue-operator-pill--tailor_then_apply {
  border-color: rgba(79, 70, 229, 0.38);
  background: rgba(79, 70, 229, 0.12);
  color: #4338ca;
}

.queue-operator-pill--review_before_action {
  border-color: rgba(217, 119, 6, 0.42);
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}

.queue-operator-pill--hold_or_skip {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.queue-operator-pill--source_watch {
  border-color: rgba(8, 145, 178, 0.4);
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
}

.queue-operator-details {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.queue-packet-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-left: 4px;
  padding: 4px 8px;
  border: 1px solid var(--app-border-2);
  border-radius: 999px;
  background: var(--app-inset);
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.queue-packet-pill--ready {
  border-color: rgba(14, 165, 233, 0.35);
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
}

.queue-packet-pill--blocked {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.12);
  color: var(--app-muted);
}

.queue-recommendation-details {
  flex-basis: 100%;
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.queue-recommendation-details summary {
  cursor: pointer;
  list-style-position: inside;
  white-space: nowrap;
}

.packet-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1;
  cursor: help;
  flex: 0 0 auto;
}

.queue-recommendation-details dl {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
}

.queue-recommendation-detail-row {
  display: grid;
  grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
  gap: 6px;
}

.queue-recommendation-detail-row dt,
.queue-recommendation-detail-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.queue-recommendation-detail-row dt {
  color: var(--app-muted);
  font-weight: 900;
}

.queue-recommendation-detail-row dd {
  color: var(--app-text);
}

.queue-job-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.queue-recommendation-summary,
.queue-status-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.recommendation-chip,
html[data-theme="light"] .pill.recommendation-chip {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 4px 8px !important;
  border: 1px solid var(--app-border-2) !important;
  border-radius: 999px !important;
  font-weight: 950 !important;
  letter-spacing: 0.01em;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.recommendation-chip--ready,
html[data-theme="light"] .pill.recommendation-chip.recommendation-chip--ready {
  border-color: #10b981 !important;
  background: #a7f3d0 !important;
  color: #064e3b !important;
}

.recommendation-chip--tailor,
html[data-theme="light"] .pill.recommendation-chip.recommendation-chip--tailor {
  border-color: #8b5cf6 !important;
  background: #ddd6fe !important;
  color: #4c1d95 !important;
}

.recommendation-chip--later,
.recommendation-chip--choice,
html[data-theme="light"] .pill.recommendation-chip.recommendation-chip--later,
html[data-theme="light"] .pill.recommendation-chip.recommendation-chip--choice {
  border-color: #d97706 !important;
  background: #fcd34d !important;
  color: #78350f !important;
}

.recommendation-chip--unavailable,
html[data-theme="light"] .pill.recommendation-chip.recommendation-chip--unavailable {
  border-color: #94a3b8 !important;
  background: #cbd5e1 !important;
  color: #334155 !important;
}

.queue-workspace-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(124, 58, 237, 0.34);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

html[data-theme="dark"] .queue-workspace-pill {
  color: #ddd6fe;
}

.review-action-button {
  border-width: 1px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

.review-action-button--available,
html[data-theme="light"] .job-apply-btn.review-action-button.review-action-button--available,
html[data-theme="light"] .planning-tailoring-btn.review-action-button.review-action-button--available {
  border-color: rgba(37, 99, 235, 0.42) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(79, 70, 229, 0.9)) !important;
  color: #ffffff !important;
}

.review-action-button--disabled,
.review-action-button:disabled,
.review-action-button[aria-disabled="true"],
html[data-theme="light"] .job-apply-btn.review-action-button.review-action-button--disabled,
html[data-theme="light"] .job-apply-btn.review-action-button:disabled,
html[data-theme="light"] .planning-tailoring-btn.review-action-button.review-action-button--disabled,
html[data-theme="light"] .planning-tailoring-btn.review-action-button:disabled,
html[data-theme="light"] .planning-tailoring-btn.review-action-button[aria-disabled="true"] {
  border-color: rgba(148, 163, 184, 0.38) !important;
  background: rgba(148, 163, 184, 0.16) !important;
  color: var(--app-muted) !important;
}

html[data-theme="dark"] .recommendation-chip--ready {
  border-color: rgba(52, 211, 153, 0.42) !important;
  background: rgba(6, 95, 70, 0.56) !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] .recommendation-chip--tailor {
  border-color: rgba(167, 139, 250, 0.46) !important;
  background: rgba(76, 29, 149, 0.56) !important;
  color: #ddd6fe !important;
}

html[data-theme="dark"] .recommendation-chip--later,
html[data-theme="dark"] .recommendation-chip--choice {
  border-color: rgba(251, 191, 36, 0.46) !important;
  background: rgba(120, 53, 15, 0.6) !important;
  color: #fde68a !important;
}

html[data-theme="dark"] .recommendation-chip--unavailable,
html[data-theme="dark"] .review-action-button--disabled,
html[data-theme="dark"] .review-action-button:disabled,
html[data-theme="dark"] .review-action-button[aria-disabled="true"] {
  border-color: rgba(100, 116, 139, 0.52) !important;
  background: rgba(30, 41, 59, 0.82) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .review-action-button--available {
  border-color: rgba(129, 140, 248, 0.52) !important;
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.98), rgba(30, 64, 175, 0.94)) !important;
  color: #eef2ff !important;
}

html[data-theme="dark"] .queue-operator-pill--ready_to_apply {
  color: #a7f3d0;
}

html[data-theme="dark"] .queue-operator-pill--tailor_then_apply {
  color: #c7d2fe;
}

html[data-theme="dark"] .queue-operator-pill--review_before_action {
  color: #fde68a;
}

html[data-theme="dark"] .queue-operator-pill--hold_or_skip {
  color: #fecaca;
}

html[data-theme="dark"] .queue-operator-pill--source_watch {
  color: #a5f3fc;
}

#planningTable tbody td *,
#queueTable tbody td *,
#decisionsTable tbody td *,
#applicationTable tbody td *,
#schedulerTable tbody td * {
  visibility: visible !important;
}

html[data-theme="light"] .table-wrap tbody td,
html[data-theme="light"] #planningTable tbody td,
html[data-theme="light"] #queueTable tbody td,
html[data-theme="light"] #decisionsTable tbody td,
html[data-theme="light"] #applicationTable tbody td,
html[data-theme="light"] #schedulerTable tbody td {
  background: #ffffff !important;
  color: #111827 !important;
}

html[data-theme="light"] .table-wrap tbody tr:nth-child(even) td,
html[data-theme="light"] #planningTable tbody tr:nth-child(even) td,
html[data-theme="light"] #queueTable tbody tr:nth-child(even) td,
html[data-theme="light"] #decisionsTable tbody tr:nth-child(even) td,
html[data-theme="light"] #applicationTable tbody tr:nth-child(even) td,
html[data-theme="light"] #schedulerTable tbody tr:nth-child(even) td {
  background: #f7faff !important;
}

html[data-theme="light"] .table-wrap tbody tr:hover td,
html[data-theme="light"] #planningTable tbody tr:hover td,
html[data-theme="light"] #queueTable tbody tr:hover td,
html[data-theme="light"] #decisionsTable tbody tr:hover td,
html[data-theme="light"] #applicationTable tbody tr:hover td,
html[data-theme="light"] #schedulerTable tbody tr:hover td {
  background: #eef6ff !important;
}

html[data-theme="light"] .sticky-apply-col,
html[data-theme="light"] .apply-cell,
html[data-theme="light"] #planningTable th.sticky-apply-col,
html[data-theme="light"] #planningTable td.sticky-apply-col,
html[data-theme="light"] #planningTable td.apply-cell {
  background: #ffffff !important;
  color: #111827 !important;
}

html[data-theme="light"] .table-wrap tbody tr:nth-child(even) .sticky-apply-col,
html[data-theme="light"] .table-wrap tbody tr:nth-child(even) .apply-cell,
html[data-theme="light"] #planningTable tbody tr:nth-child(even) td.sticky-apply-col,
html[data-theme="light"] #planningTable tbody tr:nth-child(even) td.apply-cell {
  background: #f7faff !important;
}

.planning-table-header,
.application-table-header,
.scheduler-table-header {
  gap: 18px !important;
}

.planning-table-header-right,
.application-table-header-right,
.scheduler-table-header-right {
  min-width: min(100%, 420px);
}

.dashboard-toolbar,
.controls-card,
.filters-card,
.table-card,
.stats-grid,
.planning-table-header,
.application-table-header,
.scheduler-table-header {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.dashboard-toolbar-actions,
.header-actions,
.planning-pagination-inline,
.application-pagination-inline,
.scheduler-pagination-inline {
  min-width: 0 !important;
}

.table-card {
  contain: none !important;
  overflow: visible !important;
}

.table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  contain: none !important;
}

.table-wrap table,
.saved-scans-table-wrap table,
#queueTable,
#planningTable,
#decisionsTable,
#applicationTable,
#schedulerTable {
  display: table !important;
}

.table-wrap thead,
.saved-scans-table-wrap thead {
  display: table-header-group !important;
}

.table-wrap tbody,
.saved-scans-table-wrap tbody {
  display: table-row-group !important;
}

.table-wrap tr,
.saved-scans-table-wrap tr {
  display: table-row !important;
}

.table-wrap th,
.table-wrap td,
.saved-scans-table-wrap th,
.saved-scans-table-wrap td {
  display: table-cell !important;
}

#queueTable {
  table-layout: fixed !important;
  min-width: 2640px !important;
}

#planningTable {
  table-layout: fixed !important;
  min-width: 3660px !important;
}

#applicationTable {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

#decisionsTable {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 2440px !important;
}

#schedulerTable {
  table-layout: auto !important;
  width: 100% !important;
  min-width: 820px !important;
}

.scheduler-attached-table-wrap {
  overflow-x: auto !important;
}

#applicationTable th,
#applicationTable td,
#decisionsTable th,
#decisionsTable td,
#schedulerTable th,
#schedulerTable td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#applicationTable th:nth-child(1),
#applicationTable td:nth-child(1) {
  width: 180px !important;
}

#applicationTable th:nth-child(2),
#applicationTable td:nth-child(2) {
  width: 220px !important;
}

#applicationTable th:nth-child(3),
#applicationTable td:nth-child(3) {
  width: 360px !important;
}

#applicationTable th:nth-child(4),
#applicationTable td:nth-child(4) {
  width: 150px !important;
}

#applicationTable th:nth-child(5),
#applicationTable td:nth-child(5) {
  width: 170px !important;
}

#applicationTable th:nth-child(6),
#applicationTable td:nth-child(6) {
  width: auto !important;
  min-width: 220px !important;
}

#applicationTable th:nth-child(7),
#applicationTable td:nth-child(7) {
  width: 120px !important;
}

#decisionsTable th:nth-child(1),
#decisionsTable td:nth-child(1) {
  width: 190px !important;
}

#decisionsTable th:nth-child(2),
#decisionsTable td:nth-child(2) {
  width: 120px !important;
}

#decisionsTable th:nth-child(3),
#decisionsTable td:nth-child(3) {
  width: 130px !important;
}

#decisionsTable th:nth-child(4),
#decisionsTable td:nth-child(4) {
  width: 190px !important;
}

#decisionsTable th:nth-child(5),
#decisionsTable td:nth-child(5) {
  width: 300px !important;
}

#decisionsTable th:nth-child(6),
#decisionsTable td:nth-child(6) {
  width: 180px !important;
}

#decisionsTable th:nth-child(7),
#decisionsTable td:nth-child(7) {
  width: 170px !important;
}

#decisionsTable th:nth-child(8),
#decisionsTable td:nth-child(8),
#decisionsTable th:nth-child(9),
#decisionsTable td:nth-child(9),
#decisionsTable th:nth-child(10),
#decisionsTable td:nth-child(10) {
  width: 230px !important;
}

#decisionsTable th:nth-child(11),
#decisionsTable td:nth-child(11) {
  width: 260px !important;
}

#decisionsTable th:nth-child(12),
#decisionsTable td:nth-child(12) {
  width: 150px !important;
}

#schedulerTable th:nth-child(1),
#schedulerTable td:nth-child(1) {
  min-width: 260px !important;
}

#schedulerTable th:nth-child(2),
#schedulerTable td:nth-child(2) {
  min-width: 180px !important;
}

#schedulerTable th:nth-child(3),
#schedulerTable td:nth-child(3) {
  min-width: 150px !important;
}

#applicationTable .sort-header-btn,
#decisionsTable .sort-header-btn,
#schedulerTable .sort-header-btn {
  white-space: normal !important;
}

#applicationTable .sort-header-label,
#decisionsTable .sort-header-label,
#schedulerTable .sort-header-label,
#applicationTable .resizable-col-label,
#decisionsTable .resizable-col-label,
#schedulerTable .resizable-col-label {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

@media (max-width: 1500px) {
  #applicationTable {
    min-width: 1240px !important;
  }
}

.table-wrap thead th,
.table-wrap thead th *,
.saved-scans-table-wrap thead th,
.saved-scans-table-wrap thead th *,
.table-wrap tbody td,
.table-wrap tbody td *,
.saved-scans-table-wrap tbody td,
.saved-scans-table-wrap tbody td * {
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="light"] .table-wrap thead th,
html[data-theme="light"] .table-wrap thead th *,
html[data-theme="light"] .saved-scans-table-wrap thead th,
html[data-theme="light"] .saved-scans-table-wrap thead th * {
  color: #172033 !important;
}

html[data-theme="light"] .table-wrap tbody td,
html[data-theme="light"] .table-wrap tbody td *,
html[data-theme="light"] .saved-scans-table-wrap tbody td,
html[data-theme="light"] .saved-scans-table-wrap tbody td * {
  color: #111827 !important;
}

html[data-theme="light"] .table-wrap tbody td .job-link,
html[data-theme="light"] .table-wrap tbody td .title-cell a,
html[data-theme="light"] .table-wrap tbody td a.job-link {
  color: #2563eb !important;
}

@media (max-width: 1180px) {
  .app-shell-top-right:not(.app-shell-top-right--flow) {
    position: static !important;
    margin: 0 0 18px auto;
  }
}

/* ui_redesign_v12: sidebar/table QA fixes. Keep behavior intact; only tighten presentation. */
body.app-shell-collapsed .app-shell {
  width: var(--app-shell-collapsed-width, 68px) !important;
  padding: 18px 8px !important;
  overflow: visible !important;
}

body.app-shell-collapsed .app-shell-brand-row,
body.app-shell-collapsed .app-shell-brand {
  display: none !important;
}

body.app-shell-collapsed .app-shell-nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 104px 0 0 !important;
  overflow: visible !important;
}

body.app-shell-collapsed .app-shell-nav-link {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
  border-radius: 15px !important;
}

body.app-shell-collapsed .app-shell-nav-link:hover {
  transform: none !important;
}

body.app-shell-collapsed .app-shell-nav-label {
  display: none !important;
}

body.app-shell-collapsed .app-shell-nav-short {
  position: static !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: var(--app-text) !important;
  background: rgba(124, 156, 255, 0.14) !important;
  border-radius: 10px !important;
  transform: none !important;
}

body.app-shell-collapsed .app-shell-nav-link.active .app-shell-nav-short,
body.app-shell-collapsed .app-shell-nav-link[aria-current="page"] .app-shell-nav-short {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24) !important;
}

html[data-theme="light"] body.app-shell-collapsed .app-shell-nav-short {
  color: #334155 !important;
  background: rgba(37, 99, 235, 0.1) !important;
}

html[data-theme="light"] body.app-shell-collapsed .app-shell-nav-link.active .app-shell-nav-short,
html[data-theme="light"] body.app-shell-collapsed .app-shell-nav-link[aria-current="page"] .app-shell-nav-short {
  color: #ffffff !important;
}

.table-wrap thead th,
.saved-scans-table-wrap thead th,
.scheduler-attached-table-wrap thead th {
  overflow: hidden !important;
}

.table-wrap thead .sort-header-btn,
.table-wrap thead th .sort-header-btn,
.saved-scans-table-wrap thead .sort-header-btn,
.scheduler-attached-table-wrap thead .sort-header-btn,
#queueTable thead th button.sort-header-btn[data-sort-key],
#planningTable thead th button.sort-header-btn[data-sort-key],
#decisionsTable thead th button.sort-header-btn[data-sort-key],
#applicationTable thead th button.sort-header-btn[data-sort-key],
#schedulerTable thead th button.sort-header-btn[data-sort-key],
.table-wrap thead .resizable-col-content,
.table-wrap thead th .resizable-col-content,
.saved-scans-table-wrap thead .resizable-col-content,
.scheduler-attached-table-wrap thead .resizable-col-content {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: inherit !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.table-wrap thead .sort-header-btn::before,
.table-wrap thead .sort-header-btn::after,
.table-wrap thead .resizable-col-content::before,
.table-wrap thead .resizable-col-content::after,
.saved-scans-table-wrap thead .sort-header-btn::before,
.saved-scans-table-wrap thead .sort-header-btn::after,
.saved-scans-table-wrap thead .resizable-col-content::before,
.saved-scans-table-wrap thead .resizable-col-content::after,
.scheduler-attached-table-wrap thead .sort-header-btn::before,
.scheduler-attached-table-wrap thead .sort-header-btn::after,
.scheduler-attached-table-wrap thead .resizable-col-content::before,
.scheduler-attached-table-wrap thead .resizable-col-content::after {
  content: none !important;
  display: none !important;
}

.table-wrap thead .sort-header-label,
.table-wrap thead .sort-header-indicator,
.table-wrap thead .resizable-col-label,
.table-wrap thead .resizable-col-content > span,
.saved-scans-table-wrap thead .sort-header-label,
.saved-scans-table-wrap thead .sort-header-indicator,
.saved-scans-table-wrap thead .resizable-col-label,
.saved-scans-table-wrap thead .resizable-col-content > span,
.scheduler-attached-table-wrap thead .sort-header-label,
.scheduler-attached-table-wrap thead .sort-header-indicator,
.scheduler-attached-table-wrap thead .resizable-col-label,
.scheduler-attached-table-wrap thead .resizable-col-content > span {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

.table-wrap thead .sort-header-label,
.table-wrap thead .resizable-col-label,
.saved-scans-table-wrap thead .sort-header-label,
.saved-scans-table-wrap thead .resizable-col-label,
.scheduler-attached-table-wrap thead .sort-header-label,
.scheduler-attached-table-wrap thead .resizable-col-label {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.table-wrap thead .col-resize-handle,
.saved-scans-table-wrap thead .col-resize-handle,
.scheduler-attached-table-wrap thead .col-resize-handle {
  opacity: 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  pointer-events: none !important;
}

#applicationTable {
  min-width: 1380px !important;
}

#applicationTable th,
#applicationTable td {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#applicationTable td:nth-child(3) {
  white-space: normal !important;
  line-height: 1.25 !important;
}

#applicationTable th:nth-child(5),
#applicationTable td:nth-child(5) {
  width: 220px !important;
}

#applicationTable th:nth-child(6),
#applicationTable td:nth-child(6) {
  width: 260px !important;
  min-width: 260px !important;
}

#decisionsTable {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 3200px !important;
}

#decisionsTable th,
#decisionsTable td {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  vertical-align: middle !important;
}

#decisionsTable tbody td {
  max-width: none !important;
  line-height: 1.25 !important;
}

#decisionsTable td.reason-cell,
#decisionsTable td:nth-child(11) {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
}

#decisionsTable th:nth-child(7),
#decisionsTable td:nth-child(7) {
  width: 210px !important;
}

#decisionsTable th:nth-child(8),
#decisionsTable td:nth-child(8),
#decisionsTable th:nth-child(9),
#decisionsTable td:nth-child(9),
#decisionsTable th:nth-child(10),
#decisionsTable td:nth-child(10) {
  width: 330px !important;
}

#decisionsTable th:nth-child(11),
#decisionsTable td:nth-child(11) {
  width: 390px !important;
}

#decisionsTable th:nth-child(12),
#decisionsTable td:nth-child(12) {
  width: 170px !important;
}

#decisionsTable td.apply-cell,
#decisionsTable td.sticky-apply-col {
  overflow: visible !important;
  max-width: none !important;
}

/* ui_redesign_v13: compact shell chrome, quieter headings, richer simple queue cells. */
.app-shell-menu-btn {
  left: calc(var(--app-shell-width, 268px) - 66px) !important;
  right: auto !important;
  top: 22px !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 9px !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(15, 23, 42, 0.64) !important;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.2) !important;
  backdrop-filter: blur(14px) !important;
}

.app-shell-menu-btn:hover,
.app-shell-menu-btn:focus-visible {
  border-color: rgba(96, 165, 250, 0.52) !important;
  background:
    linear-gradient(180deg, rgba(96, 165, 250, 0.16), rgba(15, 23, 42, 0.68)),
    rgba(15, 23, 42, 0.72) !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16) !important;
}

.app-shell-menu-btn-line {
  width: 19px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: #f8fbff !important;
}

html[data-theme="light"] .app-shell-menu-btn {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .app-shell-menu-btn:hover,
html[data-theme="light"] .app-shell-menu-btn:focus-visible {
  background: #ffffff !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14) !important;
}

html[data-theme="light"] .app-shell-menu-btn-line {
  background: #0f172a !important;
}

body.app-shell-collapsed .app-shell-menu-btn {
  left: 13px !important;
  right: auto !important;
  top: 24px !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  gap: 12px !important;
}

html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) {
  background: transparent !important;
}

.notification-btn,
.theme-toggle-btn,
.app-shell-primary-link,
.app-shell-top-right .profile-avatar-btn {
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14) !important;
}

.page-header:not(.preferences-command-header) h1,
.scan-workspace-page .page-header h1,
.tailoring-workspace-page .page-header h1 {
  font-size: clamp(42px, 5.2vw, 78px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.055em !important;
}

.table-card h2,
.section-card h2,
.dashboard-section h2,
.scan-workspace-card h2,
.profile-card h2,
.saved-scans-card h2 {
  font-size: clamp(26px, 2.3vw, 42px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.04em !important;
}

.page-header .subtext,
.page-header p,
.dashboard-subtitle,
.section-subtitle,
.subtext {
  font-size: clamp(16px, 1.1vw, 21px) !important;
  line-height: 1.45 !important;
}

.stat-card-value,
.metric-value {
  font-size: clamp(38px, 4.1vw, 68px) !important;
  line-height: 0.98 !important;
}

body.executive-simple-mode #queueTable {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}

body.executive-simple-mode #queueTable col[data-col-key="queue_rank"] {
  width: 112px !important;
}

body.executive-simple-mode #queueTable col[data-col-key="job"] {
  width: auto !important;
}

body.executive-simple-mode #queueTable col[data-col-key="resume_options"] {
  width: 360px !important;
}

body.executive-simple-mode #queueTable col[data-static-col-key="apply"] {
  width: 116px !important;
}

body.executive-simple-mode #queueTable th.sticky-apply-col,
body.executive-simple-mode #queueTable td.sticky-apply-col,
body.executive-simple-mode #queueTable td.apply-cell {
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
  padding-inline: 14px !important;
}

body.executive-simple-mode #queueTable td.apply-cell .job-apply-btn {
  width: 84px !important;
  min-width: 84px !important;
  padding-inline: 10px !important;
}

.queue-simple-job-cell {
  text-align: left !important;
}

.queue-simple-company {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.13);
  color: #0f766e;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.queue-simple-title {
  margin-bottom: 8px;
  color: var(--app-primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.queue-simple-title .job-link {
  color: inherit !important;
}

.queue-simple-location {
  margin-top: -2px;
  margin-bottom: 8px;
  color: var(--app-muted);
}

.queue-simple-posted {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.queue-simple-action {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.11);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html[data-theme="dark"] .queue-simple-company {
  background: rgba(45, 212, 191, 0.16);
  color: #99f6e4;
}

html[data-theme="dark"] .queue-simple-posted {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
}

html[data-theme="dark"] .queue-simple-action {
  background: rgba(167, 139, 250, 0.18);
  color: #ddd6fe;
}

/* ui_redesign_v14: final shell pinning and calmer type scale. */
body:not(.app-shell-collapsed) .app-shell-menu-btn {
  position: fixed !important;
  top: 14px !important;
  left: calc(var(--app-shell-width, 268px) - 66px) !important;
  right: auto !important;
  z-index: 180 !important;
}

body.app-shell-collapsed .app-shell-menu-btn {
  position: fixed !important;
  top: 30px !important;
  left: 13px !important;
  right: auto !important;
  z-index: 180 !important;
}

.page-header:not(.preferences-command-header) h1,
.scan-workspace-page .page-header h1,
.tailoring-workspace-page .page-header h1 {
  font-size: clamp(34px, 4.2vw, 58px) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.045em !important;
}

.table-card h2,
.section-card h2,
.dashboard-section h2,
.scan-workspace-card h2,
.profile-card h2,
.saved-scans-card h2,
.modal-card h2 {
  font-size: clamp(22px, 1.9vw, 34px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.032em !important;
}

.page-header .subtext,
.page-header p,
.dashboard-subtitle,
.section-subtitle,
.subtext,
.control-help,
.field-help-wide {
  font-size: clamp(14px, 0.95vw, 18px) !important;
  line-height: 1.45 !important;
}

.stat-card-value,
.metric-value {
  font-size: clamp(32px, 3.2vw, 52px) !important;
  line-height: 1 !important;
}

.stat-card-label,
.metric-label,
label,
.form-label,
.table-wrap th,
.saved-scans-table-wrap th {
  font-size: clamp(12px, 0.82vw, 15px) !important;
}

/* ui_redesign_v15: readable/expandable data tables across the app. */
.table-wrap,
.saved-scans-table-wrap,
.scheduler-attached-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.table-wrap table,
.saved-scans-table-wrap table,
.scheduler-attached-table-wrap table,
#queueTable,
#planningTable,
#decisionsTable,
#applicationTable,
#schedulerTable {
  table-layout: auto !important;
  width: max-content !important;
  min-width: 100% !important;
}

.table-wrap th,
.table-wrap td,
.saved-scans-table-wrap th,
.saved-scans-table-wrap td,
.scheduler-attached-table-wrap th,
.scheduler-attached-table-wrap td,
#queueTable th,
#queueTable td,
#planningTable th,
#planningTable td,
#decisionsTable th,
#decisionsTable td,
#applicationTable th,
#applicationTable td,
#schedulerTable th,
#schedulerTable td {
  min-width: 132px !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  vertical-align: top !important;
}

.table-wrap th,
.saved-scans-table-wrap th,
.scheduler-attached-table-wrap th {
  position: relative;
  resize: horizontal;
  overflow: auto !important;
}

.table-wrap thead .sort-header-btn,
.table-wrap thead th .sort-header-btn,
.saved-scans-table-wrap thead .sort-header-btn,
.scheduler-attached-table-wrap thead .sort-header-btn,
#queueTable thead th button.sort-header-btn[data-sort-key],
#planningTable thead th button.sort-header-btn[data-sort-key],
#decisionsTable thead th button.sort-header-btn[data-sort-key],
#applicationTable thead th button.sort-header-btn[data-sort-key],
#schedulerTable thead th button.sort-header-btn[data-sort-key],
.table-wrap thead .resizable-col-content,
.table-wrap thead th .resizable-col-content,
.saved-scans-table-wrap thead .resizable-col-content,
.scheduler-attached-table-wrap thead .resizable-col-content {
  align-items: flex-start !important;
  gap: 8px !important;
  white-space: normal !important;
  overflow: visible !important;
}

.table-wrap thead .sort-header-label,
.table-wrap thead .resizable-col-label,
.saved-scans-table-wrap thead .sort-header-label,
.saved-scans-table-wrap thead .resizable-col-label,
.scheduler-attached-table-wrap thead .sort-header-label,
.scheduler-attached-table-wrap thead .resizable-col-label {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.table-wrap thead .sort-header-indicator,
.saved-scans-table-wrap thead .sort-header-indicator,
.scheduler-attached-table-wrap thead .sort-header-indicator {
  flex: 0 0 auto !important;
}

.table-wrap thead .col-resize-handle,
.saved-scans-table-wrap thead .col-resize-handle,
.scheduler-attached-table-wrap thead .col-resize-handle {
  position: absolute !important;
  top: 12px !important;
  right: 0 !important;
  bottom: 12px !important;
  display: block !important;
  width: 8px !important;
  min-width: 8px !important;
  opacity: 0.65 !important;
  pointer-events: auto !important;
  cursor: col-resize !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0), rgba(37, 99, 235, 0.55), rgba(37, 99, 235, 0)) !important;
}

.table-wrap thead th:hover .col-resize-handle,
.saved-scans-table-wrap thead th:hover .col-resize-handle,
.scheduler-attached-table-wrap thead th:hover .col-resize-handle {
  opacity: 1 !important;
}

#queueTable th:nth-child(2),
#queueTable td:nth-child(2),
#planningTable th:nth-child(4),
#planningTable td:nth-child(4),
#planningTable th:nth-child(19),
#planningTable td:nth-child(19),
#decisionsTable th:nth-child(11),
#decisionsTable td:nth-child(11),
#applicationTable th:nth-child(3),
#applicationTable td:nth-child(3) {
  min-width: 260px !important;
}

#queueTable td.apply-cell,
#queueTable td.sticky-apply-col,
#planningTable td.apply-cell,
#planningTable td.sticky-apply-col,
#decisionsTable td.apply-cell,
#decisionsTable td.sticky-apply-col {
  vertical-align: middle !important;
}

body.executive-simple-mode #queueTable {
  width: 100% !important;
  min-width: 100% !important;
}

body.executive-simple-mode #queueTable th.sticky-apply-col,
body.executive-simple-mode #queueTable td.sticky-apply-col,
body.executive-simple-mode #queueTable td.apply-cell {
  width: 116px !important;
  min-width: 116px !important;
}

/* ui_redesign_v16: stronger solid metric-card backgrounds. */
.stats-grid .stat-card {
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14) !important;
}

.stats-grid .stat-card::before {
  display: none !important;
}

.stats-grid .stat-card:nth-child(4n + 1) {
  background: #dbeafe !important;
}

.stats-grid .stat-card:nth-child(4n + 2) {
  background: #ccfbf1 !important;
}

.stats-grid .stat-card:nth-child(4n + 3) {
  background: #ffedd5 !important;
}

.stats-grid .stat-card:nth-child(4n + 4) {
  background: #fee2e2 !important;
}

.stats-grid .stat-card:nth-child(4n + 1) .stat-label,
.stats-grid .stat-card:nth-child(4n + 1) .stat-value {
  color: #0f2f64 !important;
}

.stats-grid .stat-card:nth-child(4n + 2) .stat-label,
.stats-grid .stat-card:nth-child(4n + 2) .stat-value {
  color: #0f4f47 !important;
}

.stats-grid .stat-card:nth-child(4n + 3) .stat-label,
.stats-grid .stat-card:nth-child(4n + 3) .stat-value {
  color: #7c2d12 !important;
}

.stats-grid .stat-card:nth-child(4n + 4) .stat-label,
.stats-grid .stat-card:nth-child(4n + 4) .stat-value {
  color: #7f1d1d !important;
}

.stats-grid .stat-card .stat-label {
  opacity: 0.86 !important;
}

html[data-theme="dark"] .stats-grid .stat-card:nth-child(4n + 1) {
  background: #1d3b73 !important;
}

html[data-theme="dark"] .stats-grid .stat-card:nth-child(4n + 2) {
  background: #14514a !important;
}

html[data-theme="dark"] .stats-grid .stat-card:nth-child(4n + 3) {
  background: #7a3a12 !important;
}

html[data-theme="dark"] .stats-grid .stat-card:nth-child(4n + 4) {
  background: #742323 !important;
}

html[data-theme="dark"] .stats-grid .stat-card .stat-label,
html[data-theme="dark"] .stats-grid .stat-card .stat-value {
  color: #f8fafc !important;
}

/* ui_redesign_v17: table header spacing and subtle resize grips. */
.table-wrap thead th,
.saved-scans-table-wrap thead th,
.scheduler-attached-table-wrap thead th,
#queueTable thead th,
#planningTable thead th,
#decisionsTable thead th,
#applicationTable thead th,
#schedulerTable thead th {
  padding: 16px 26px 16px 18px !important;
  vertical-align: middle !important;
  line-height: 1.25 !important;
}

.table-wrap thead .sort-header-btn,
.table-wrap thead th .sort-header-btn,
.saved-scans-table-wrap thead .sort-header-btn,
.scheduler-attached-table-wrap thead .sort-header-btn,
#queueTable thead th button.sort-header-btn[data-sort-key],
#planningTable thead th button.sort-header-btn[data-sort-key],
#decisionsTable thead th button.sort-header-btn[data-sort-key],
#applicationTable thead th button.sort-header-btn[data-sort-key],
#schedulerTable thead th button.sort-header-btn[data-sort-key],
.table-wrap thead .resizable-col-content,
.table-wrap thead th .resizable-col-content,
.saved-scans-table-wrap thead .resizable-col-content,
.scheduler-attached-table-wrap thead .resizable-col-content {
  align-items: center !important;
  min-height: 28px !important;
  line-height: 1.25 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.table-wrap thead .sort-header-label,
.table-wrap thead .resizable-col-label,
.saved-scans-table-wrap thead .sort-header-label,
.saved-scans-table-wrap thead .resizable-col-label,
.scheduler-attached-table-wrap thead .sort-header-label,
.scheduler-attached-table-wrap thead .resizable-col-label {
  line-height: 1.25 !important;
}

.table-wrap thead .col-resize-handle,
.saved-scans-table-wrap thead .col-resize-handle,
.scheduler-attached-table-wrap thead .col-resize-handle {
  top: 50% !important;
  right: 8px !important;
  bottom: auto !important;
  width: 4px !important;
  min-width: 4px !important;
  height: 26px !important;
  transform: translateY(-50%) !important;
  opacity: 0.42 !important;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.85), rgba(37, 99, 235, 0.25)) !important;
  box-shadow: none !important;
}

.table-wrap thead .col-resize-handle::before,
.saved-scans-table-wrap thead .col-resize-handle::before,
.scheduler-attached-table-wrap thead .col-resize-handle::before {
  content: "" !important;
  position: absolute;
  inset: -6px -4px;
}

.table-wrap thead th.sticky-apply-col,
.table-wrap thead th.apply-col-fixed,
.table-wrap thead th:last-child,
.saved-scans-table-wrap thead th:last-child,
.scheduler-attached-table-wrap thead th:last-child,
#queueTable thead th.sticky-apply-col,
#planningTable thead th.sticky-apply-col,
#decisionsTable thead th.sticky-apply-col,
#queueTable thead th.apply-col-fixed,
#planningTable thead th.apply-col-fixed,
#decisionsTable thead th.apply-col-fixed {
  padding-right: 18px !important;
  resize: none !important;
}

.table-wrap thead th.sticky-apply-col .col-resize-handle,
.table-wrap thead th.apply-col-fixed .col-resize-handle,
.table-wrap thead th:last-child .col-resize-handle,
.saved-scans-table-wrap thead th:last-child .col-resize-handle,
.scheduler-attached-table-wrap thead th:last-child .col-resize-handle,
#queueTable thead th.sticky-apply-col .col-resize-handle,
#planningTable thead th.sticky-apply-col .col-resize-handle,
#decisionsTable thead th.sticky-apply-col .col-resize-handle,
#queueTable thead th.apply-col-fixed .col-resize-handle,
#planningTable thead th.apply-col-fixed .col-resize-handle,
#decisionsTable thead th.apply-col-fixed .col-resize-handle {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ui_redesign_v18: align page titles with the fixed top-right app controls. */
.app-shell ~ .page:not(.preferences-workflow):not(.preferences-page),
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
  padding-top: 18px !important;
}

.page-header:not(.preferences-command-header) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  min-height: 64px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 14px !important;
  padding-right: min(760px, calc(100vw - var(--app-shell-collapsed-width, 68px) - 560px)) !important;
  text-align: left !important;
}

.page-header:not(.preferences-command-header) h1,
.scan-workspace-page .page-header h1,
.tailoring-workspace-page .page-header h1 {
  font-size: clamp(28px, 2.8vw, 44px) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 1180px) {
  .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page),
  body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
    padding-top: 86px !important;
  }

  .page-header:not(.preferences-command-header) {
    min-height: auto !important;
    padding-right: 0 !important;
    flex-wrap: wrap !important;
  }
}

/* ui_redesign_v22: final end-of-file compact owner after legacy blocks. */
body .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page),
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
  padding-top: 16px !important;
}

body .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .page-header,
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .page-header,
body .page > .page-header {
  justify-content: flex-start !important;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 40px !important;
  margin: 0 0 12px !important;
  padding: 0 min(620px, calc(max(0px, 100vw - var(--app-shell-collapsed-width, 68px) - 640px))) 0 0 !important;
  text-align: left !important;
}

body .page > .page-header h1,
body .scan-workspace-page.page > .page-header h1,
body .scan-workspace-page.page > .page-header .scan-workspace-header-copy h1,
body .tailoring-workspace-page.page > .page-header h1 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: clamp(26px, 2vw, 34px) !important;
  font-weight: 900 !important;
  line-height: 1.04 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

body .page > .page-header p,
body .page > .page-header .subtext {
  margin-top: 5px !important;
  font-size: clamp(12px, 0.85vw, 14px) !important;
  line-height: 1.35 !important;
}

body .controls-card,
body .filters-card {
  padding: 18px 20px !important;
}

body .stats-grid {
  gap: 14px !important;
}

body .stat-card {
  min-height: 104px !important;
  padding: 18px 20px !important;
  border-radius: 14px !important;
}

body .stat-label {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body .stat-value,
body .stat-card-value {
  font-size: clamp(30px, 3vw, 52px) !important;
  line-height: 0.95 !important;
}

body .control-group input,
body .control-group select,
body .control-group textarea {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}

body .control-group label {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body button:not(.agentic-review-tab):not(.agentic-review-segment):not(.profile-tab-btn):not(.pipeline-run-icon-btn):not(.saved-scan-action-btn):not(.scan-workspace-tab-btn):not(.scan-workspace-surface-tab):not(.sort-header-btn):not(.scheduler-tab-btn):not(.ghost-btn):not(.notification-btn):not(.notification-chip):not(.notification-center__icon-btn):not(.notification-center__text-btn):not(.notification-row__action):not(.theme-toggle-btn):not(.profile-avatar-btn):not(.app-shell-menu-btn):not(.multi-select-trigger):not(.multi-select-option):not(.shared-filter-select__trigger):not(.shared-filter-select__option):not(.preferences-step-button):not(.preference-location-option):not(.preferences-edit-button):not(.preference-location-chip-remove):not(.preferences-utility-button):not(.preferences-back-button):not(.preferences-secondary-action):not(.planning-react-bulk-generate):not(.planning-filter-apply):not(.operational-primary-action):not(.executive-queue-apply-btn):where(:not(.planning-bulk-results__close, .planning-bulk-results__pill, .planning-bulk-results__clear, .planning-bulk-results__secondary, .planning-bulk-results__primary)),
body .ghost-btn,
body .btn-sm {
  min-height: 34px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}

/* ------------------------------------------------------------------------
   eucalyptus_action_cascade_r2 - operational row action owner.

   Manual row actions on Decisions and Applications are <button> elements, so
   the global control rule above claims them with !important. This enforces
   the neutral eucalyptus treatment at ID scope, and lives here rather than in
   the React stylesheet because the owner it corrects is here.
   ------------------------------------------------------------------------ */
body :is(#decisionsDashboardRoot, #applicationsDashboardRoot) .operational-row-action {
  min-height: 32px !important;
  border: 1px solid var(--app-action-border, #c9d6d2) !important;
  border-radius: 6px !important;
  background: var(--app-action-soft, #edf2f0) !important;
  background-image: none !important;
  color: var(--app-action-strong, #36534c) !important;
  box-shadow: none !important;
  transform: none !important;
}

body :is(#decisionsDashboardRoot, #applicationsDashboardRoot) .operational-row-action:not(:disabled):hover {
  border-color: var(--app-action-primary, #56746d) !important;
  background: var(--app-action-soft-hover, #e4ece9) !important;
  color: var(--app-action-strong, #36534c) !important;
}

body :is(#decisionsDashboardRoot, #applicationsDashboardRoot) .operational-row-action:not(:disabled):active {
  border-color: var(--app-action-pressed, #3f5953) !important;
  background: var(--app-action-pressed, #3f5953) !important;
  color: #ffffff !important;
}

body :is(#decisionsDashboardRoot, #applicationsDashboardRoot) .operational-row-action:focus-visible {
  outline: 3px solid var(--app-action-focus, rgba(86, 116, 109, 0.2)) !important;
  outline-offset: 2px;
  box-shadow: none !important;
}

body :is(#decisionsDashboardRoot, #applicationsDashboardRoot) .operational-row-action:disabled,
body :is(#decisionsDashboardRoot, #applicationsDashboardRoot) .operational-row-action.is-complete {
  border-color: var(--queue-border) !important;
  background: var(--queue-surface-muted) !important;
  color: var(--queue-muted) !important;
  opacity: 0.72 !important;
}

/* ------------------------------------------------------------------------
   filter_control_height_r1 - filter row sizing owner.

   Two legacy owners fought this row. The global control rule directly above
   hard-set 34px / 9px / 13px on every button, and the global input rule in
   styles.css hard-sets an 8px radius on every input - which is why Apply
   Filters rendered shorter than the filter fields beside it and why the text
   inputs kept a different corner than the shared filter selects.

   This is the single correction. Every control in a filter row - shared
   filter select, text and number inputs, segmented toggle, Apply Filters and
   Clear - resolves to the same --filter-control-* contract, so a filter row
   is one height end to end. The three Apply Filters classes are excluded from
   the global sizing rule above (colour ownership is untouched) and the ID
   lines below outrank the legacy ID map in styles.css.

   Deliberately keyed to filter rows. Shared table sort, expand, info-popover
   and pagination controls also carry .preferences-secondary-action and must
   keep their compact sizing.
   ------------------------------------------------------------------------ */
body .planning-react-limit-field input:not(.shared-filter-select__search-input),
body .executive-queue-limit-field input:not(.shared-filter-select__search-input),
body .operational-filter-grid input:not(.shared-filter-select__search-input) {
  height: var(--filter-control-height, 46px) !important;
  min-height: var(--filter-control-height, 46px) !important;
  box-sizing: border-box !important;
  border-top-left-radius: var(--filter-control-radius, 12px) !important;
  border-top-right-radius: var(--filter-control-radius, 12px) !important;
  border-bottom-right-radius: var(--filter-control-radius, 12px) !important;
  border-bottom-left-radius: var(--filter-control-radius, 12px) !important;
  font-size: var(--filter-control-font-size, 14px) !important;
}

body #planningApplyFiltersBtn,
body #decisionApplyFiltersBtn,
body #applicationApplyFiltersBtn,
body .planning-react-filter-actions > button,
body .operational-filter-actions > button,
body .executive-queue-filter-actions > button {
  min-height: var(--filter-control-height, 46px) !important;
  box-sizing: border-box !important;
  border-top-left-radius: var(--filter-control-radius, 12px) !important;
  border-top-right-radius: var(--filter-control-radius, 12px) !important;
  border-bottom-right-radius: var(--filter-control-radius, 12px) !important;
  border-bottom-left-radius: var(--filter-control-radius, 12px) !important;
  font-size: var(--filter-control-font-size, 14px) !important;
  font-weight: var(--filter-control-font-weight, 650) !important;
}

html[data-theme="light"] body .scheduler-page {
  background:
    linear-gradient(135deg, rgba(191, 219, 254, 0.86) 0%, rgba(236, 254, 255, 0.82) 46%, rgba(248, 250, 252, 0.96) 100%),
    #edf7ff !important;
}

body .scheduler-page .page-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  padding-right: min(520px, calc(max(0px, 100vw - var(--app-shell-collapsed-width, 68px) - 760px))) !important;
}

body .scheduler-page .header-actions {
  justify-self: end !important;
  align-self: center !important;
}

body .scheduler-page #refreshSchedulerSummaryBtn {
  border: 1px solid var(--app-action-border) !important;
  background: var(--app-surface-2) !important;
  background-image: none !important;
  color: var(--app-action-strong) !important;
  box-shadow: none !important;
}

body .scheduler-page #refreshSchedulerSummaryBtn:not(:disabled):hover {
  border-color: var(--app-action-primary) !important;
  background: var(--app-action-soft) !important;
  background-image: none !important;
  color: var(--app-action-strong) !important;
}

html[data-theme="light"] body .scheduler-page .scheduler-table-tabs {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
body .application-tabs,
body .scheduler-page .scheduler-table-tabs,
body .scheduler-page .scheduler-tab-row,
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row {
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: 22px !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab],
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"],
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"]:hover,
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"]:focus-visible,
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].active,
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].is-active,
body .application-tab,
body .scheduler-page .scheduler-table-tab,
body .scheduler-page .scheduler-tab-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 2px 10px !important;
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  background-clip: border-box !important;
  color: #475569 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transform: none !important;
}

body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab]::after,
body .application-tab::after,
body .scheduler-page .scheduler-table-tab::after,
body .scheduler-page .scheduler-tab-btn::after {
  content: "" !important;
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: transparent !important;
}

body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab].active,
body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab].is-active,
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].active,
body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].is-active,
body .application-tab.active,
body .scheduler-page .scheduler-table-tab.is-active,
body .scheduler-page .scheduler-tab-btn.active,
body .scheduler-page .scheduler-tab-btn.is-active {
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #0f172a !important;
  box-shadow: none !important;
}

body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab].active::after,
body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab].is-active::after,
body .application-tab.active::after,
body .scheduler-page .scheduler-table-tab.is-active::after,
body .scheduler-page .scheduler-tab-btn.active::after,
body .scheduler-page .scheduler-tab-btn.is-active::after {
  background: var(--app-action-primary) !important;
  background-image: none !important;
}

/* ui_redesign_v25: remove remaining tab button chrome on concrete pages. */
body #applicationViewRoot .application-tabs {
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: 28px !important;
  margin-bottom: 14px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body #applicationViewRoot .application-tab,
body #applicationViewRoot .application-tab.active,
body #applicationViewRoot .application-tab:focus,
body #applicationViewRoot .application-tab:focus-visible,
body #applicationViewRoot .application-tab:hover {
  appearance: none !important;
  position: relative !important;
  min-height: 34px !important;
  padding: 0 0 4px !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  box-shadow: none !important;
}

body #applicationViewRoot .application-tab:not(.active) {
  color: #475569 !important;
}

body #applicationViewRoot .application-tab::after {
  content: "" !important;
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: transparent !important;
}

body #applicationViewRoot .application-tab.active::after {
  background: var(--app-action-primary) !important;
  background-image: none !important;
}

/* ui_redesign_v27: icon-only theme toggle. */
body .theme-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 92px !important;
  width: auto !important;
  padding: 6px 12px !important;
}

body .theme-toggle-icon {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  color: #f8fafc !important;
  filter: invert(1) brightness(1.35) !important;
  flex: 0 0 22px !important;
}

html[data-theme="light"] body .theme-toggle-icon {
  color: #0f172a !important;
  filter: none !important;
}

body .theme-toggle-label {
  display: none !important;
}

/* ui_redesign_v29: dark page titles and Scheduler Ops dark surfaces. */
html[data-theme="dark"] body .page > .page-header h1,
html[data-theme="dark"] body .page-header:not(.preferences-command-header) h1 {
  color: #f8fafc !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: 0 10px 34px rgba(96, 165, 250, 0.12) !important;
}

html[data-theme="dark"] body .page > .page-header .subtext,
html[data-theme="dark"] body .page-header .subtext,
html[data-theme="dark"] body .page > .page-header p {
  color: #a8b6cc !important;
  opacity: 1 !important;
}

html[data-theme="dark"] body .scheduler-page {
  background:
    radial-gradient(circle at 12% -12%, rgba(96, 165, 250, 0.16), transparent 32%),
    radial-gradient(circle at 88% 4%, rgba(45, 212, 191, 0.1), transparent 28%),
    linear-gradient(135deg, #050914 0%, #08101f 48%, #060914 100%) !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-table-card {
  border-color: rgba(96, 165, 250, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(20, 30, 49, 0.96), rgba(12, 19, 33, 0.97)),
    #111827 !important;
  color: #f8fafc !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs,
html[data-theme="dark"] body .scheduler-page .scheduler-tab-row,
html[data-theme="dark"] body #applicationViewRoot .application-tabs {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-tab-btn,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab],
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row button.scheduler-tab-btn,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"],
html[data-theme="dark"] body #applicationViewRoot .application-tab,
html[data-theme="dark"] body #applicationViewRoot .application-tab:not(.active) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-tab-btn:hover,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row button.scheduler-tab-btn:hover,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"]:hover,
html[data-theme="dark"] body #applicationViewRoot .application-tab:hover {
  color: #f8fafc !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-tab-btn.active,
html[data-theme="dark"] body .scheduler-page .scheduler-tab-btn.is-active,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab].active,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs button.scheduler-tab-btn[data-tab].is-active,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row button.scheduler-tab-btn.active,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row button.scheduler-tab-btn.is-active,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].active,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].is-active,
html[data-theme="dark"] body #applicationViewRoot .application-tab.active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-tab-btn.active::after,
html[data-theme="dark"] body .scheduler-page .scheduler-tab-btn.is-active::after,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row button.scheduler-tab-btn.active::after,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row button.scheduler-tab-btn.is-active::after,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].active::after,
html[data-theme="dark"] body .scheduler-page .scheduler-table-tabs .scheduler-tab-row > button.scheduler-tab-btn[data-tab][role="tab"].is-active::after,
html[data-theme="dark"] body #applicationViewRoot .application-tab.active::after {
  background: linear-gradient(90deg, #60a5fa, #22d3ee) !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-table-header h2,
html[data-theme="dark"] body .scheduler-page #schedulerTableTitle {
  color: #f8fafc !important;
  opacity: 1 !important;
}

html[data-theme="dark"] body .scheduler-page #schedulerTableSubtitle {
  color: #a8b6cc !important;
  opacity: 1 !important;
}

html[data-theme="dark"] body .scheduler-page #refreshSchedulerSummaryBtn {
  border-color: var(--app-action-border) !important;
  background: var(--app-surface-3) !important;
  background-image: none !important;
  color: var(--app-action-strong) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-attached-table-wrap {
  border-color: rgba(96, 165, 250, 0.24) !important;
  background: #0f172a !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] body .scheduler-page #schedulerTable thead th {
  border-bottom-color: rgba(148, 163, 184, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(96, 165, 250, 0.18), rgba(96, 165, 250, 0.08)),
    #18243a !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] body .scheduler-page #schedulerTable tbody td {
  border-bottom-color: rgba(148, 163, 184, 0.16) !important;
  background: #111c2f !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] body .scheduler-page #schedulerTable tbody tr:nth-child(even) td {
  background: #142238 !important;
}

html[data-theme="dark"] body .scheduler-page #schedulerTable tbody tr:hover td {
  background: #1b2d49 !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-run-badge--success {
  background: #16a34a !important;
  color: #ffffff !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-run-badge--danger {
  background: #dc2626 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] body .scheduler-page .scheduler-run-badge--muted {
  background: #64748b !important;
  color: #ffffff !important;
}

/* ui_redesign_v30: notification popover is anchored by JS below the bell. */
body .notification-shell {
  position: relative !important;
  flex: 0 0 auto !important;
}

body .notification-btn {
  flex: 0 0 48px !important;
  transform: none !important;
}

body .notification-btn:hover,
body .notification-btn:focus,
body .notification-btn:focus-visible,
body .notification-btn[aria-expanded="true"] {
  transform: none !important;
}

/* Floating Job Assistant launcher. */
body.executive-dashboard-page {
  --floating-chat-launcher-bottom: max(8px, env(safe-area-inset-bottom));
  --floating-chat-launcher-bottom-mobile: max(8px, env(safe-area-inset-bottom));
}

#floatingIntelligenceChat {
  position: static !important;
}

#floatingIntelligenceChatButton {
  position: fixed !important;
  right: 28px !important;
  bottom: var(--floating-chat-launcher-bottom, max(28px, env(safe-area-inset-bottom))) !important;
  z-index: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  height: 64px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.34), transparent 58%),
    linear-gradient(145deg, #4f7cff 0%, #7c5cff 52%, #a855f7 100%) !important;
  color: #ffffff !important;
  box-shadow:
    0 16px 38px rgba(79, 124, 255, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.28) inset !important;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s ease, border-radius 0.24s ease !important;
  overflow: visible !important;
}

.floating-intelligence-chat-button-glow {
  position: absolute !important;
  inset: -1px !important;
  border-radius: inherit !important;
  background: inherit !important;
  opacity: 0.55 !important;
  filter: blur(14px) !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

#floatingIntelligenceChatButton:hover,
#floatingIntelligenceChatButton:focus-visible {
  transform: translateY(-3px) scale(1.04) !important;
  border-radius: 26px !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow:
    0 24px 54px rgba(79, 124, 255, 0.52),
    0 2px 0 rgba(255, 255, 255, 0.38) inset !important;
}

#floatingIntelligenceChat.is-open #floatingIntelligenceChatButton {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px) scale(0.94) !important;
}

.floating-intelligence-chat-icon {
  width: 30px !important;
  height: 30px !important;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

#floatingIntelligenceChatButton:hover .floating-intelligence-chat-icon {
  transform: rotate(-8deg) scale(1.06) !important;
}

#floatingIntelligenceChatPanel {
  position: fixed !important;
  top: auto !important;
  right: 28px !important;
  bottom: var(--floating-chat-launcher-bottom, max(28px, env(safe-area-inset-bottom))) !important;
  z-index: 900 !important;
  display: grid !important;
  width: min(560px, calc(100vw - 56px)) !important;
  height: auto !important;
  max-height: min(660px, calc(100vh - 96px)) !important;
  max-height: min(660px, calc(100dvh - 96px)) !important;
  max-width: calc(100vw - 24px) !important;
  overflow-wrap: anywhere !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(129, 156, 205, 0.24) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 88% -6%, rgba(168, 85, 247, 0.14), transparent 46%),
    radial-gradient(circle at 6% 0%, rgba(79, 124, 255, 0.16), transparent 42%),
    linear-gradient(180deg, #161d33 0%, #0c1120 100%) !important;
  color: var(--app-text) !important;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.09) inset !important;
  overflow: hidden !important;
  transform-origin: bottom right !important;
  animation: floating-intelligence-chat-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

@keyframes floating-intelligence-chat-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.965);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#floatingIntelligenceChatPanel.hidden {
  display: none !important;
}

html[data-theme="light"] #floatingIntelligenceChatPanel {
  border-color: rgba(71, 94, 132, 0.18) !important;
  background:
    radial-gradient(circle at 88% -6%, rgba(168, 85, 247, 0.07), transparent 46%),
    radial-gradient(circle at 6% 0%, rgba(37, 99, 235, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f9fbff 100%) !important;
  box-shadow:
    0 32px 72px rgba(15, 23, 42, 0.2),
    0 0 0 1px rgba(15, 23, 42, 0.03) inset !important;
}

.floating-intelligence-chat-header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center !important;
  gap: 11px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(129, 156, 205, 0.16) !important;
  background: rgba(255, 255, 255, 0.028) !important;
}

html[data-theme="light"] .floating-intelligence-chat-header {
  border-bottom-color: rgba(71, 94, 132, 0.12) !important;
  background: rgba(15, 23, 42, 0.016) !important;
}

.floating-intelligence-chat-avatar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
  background: linear-gradient(145deg, #4f7cff, #a855f7) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.36) !important;
}

.floating-intelligence-chat-avatar svg {
  width: 20px !important;
  height: 20px !important;
}

.floating-intelligence-chat-heading {
  min-width: 0 !important;
}

.floating-intelligence-chat-heading h2 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

.floating-intelligence-chat-heading p {
  margin: 1px 0 0 !important;
  color: var(--app-muted) !important;
  font-size: 11.5px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
}

/* Neutral capability label. Deliberately not a health/status indicator: the UI
   does not know provider, model, or retrieval health at render time. */
.floating-intelligence-chat-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  border: 1px solid rgba(129, 156, 205, 0.28) !important;
  border-radius: var(--app-radius-pill) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: rgba(226, 232, 240, 0.9) !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

html[data-theme="light"] .floating-intelligence-chat-status-badge {
  border-color: rgba(71, 94, 132, 0.24) !important;
  background: rgba(15, 23, 42, 0.05) !important;
  color: #334155 !important;
}

#floatingIntelligenceChatCloseBtn,
.floating-intelligence-chat-header-btn {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--app-muted) !important;
  transition: background 0.16s ease, color 0.16s ease !important;
}

#floatingIntelligenceChatCloseBtn svg,
.floating-intelligence-chat-header-btn svg {
  width: 16px !important;
  height: 16px !important;
}

#floatingIntelligenceChatCloseBtn:hover,
#floatingIntelligenceChatCloseBtn:focus-visible,
.floating-intelligence-chat-header-btn:hover,
.floating-intelligence-chat-header-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--app-text) !important;
}

html[data-theme="light"] #floatingIntelligenceChatCloseBtn:hover,
html[data-theme="light"] #floatingIntelligenceChatCloseBtn:focus-visible,
html[data-theme="light"] .floating-intelligence-chat-header-btn:hover,
html[data-theme="light"] .floating-intelligence-chat-header-btn:focus-visible {
  background: rgba(15, 23, 42, 0.06) !important;
}

.floating-intelligence-chat-controls {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.floating-intelligence-chat-mode {
  display: grid !important;
  gap: 6px !important;
  color: var(--app-muted) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  text-transform: uppercase;
}

.floating-intelligence-chat-helper {
  margin: 0 !important;
  color: var(--app-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

#floatingIntelligenceModeSelect {
  width: 100% !important;
  min-height: 42px !important;
  border-radius: 14px !important;
}

#floatingIntelligenceModeSelect[hidden] {
  display: none !important;
}

.floating-intelligence-chat-viewport {
  position: relative !important;
  display: grid !important;
  min-height: 0 !important;
}

.floating-intelligence-chat-jump-btn {
  position: absolute !important;
  right: 16px !important;
  bottom: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 1px solid rgba(129, 156, 205, 0.24) !important;
  border-radius: 50% !important;
  background: rgba(20, 27, 47, 0.92) !important;
  color: var(--app-text) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="light"] .floating-intelligence-chat-jump-btn {
  background: #ffffff !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12) !important;
}

.floating-intelligence-chat-jump-btn[hidden] {
  display: none !important;
}

.floating-intelligence-chat-jump-btn svg {
  width: 15px !important;
  height: 15px !important;
}

#floatingIntelligenceMessages {
  display: flex !important;
  min-height: 0 !important;
  flex-direction: column !important;
  gap: 18px !important;
  overflow: auto !important;
  padding: 18px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.floating-intelligence-chat-thinking {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 6px 0 !important;
}

.floating-intelligence-chat-thinking-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: var(--app-muted) !important;
  animation: floating-intelligence-chat-blink 1.25s ease-in-out infinite !important;
}

.floating-intelligence-chat-thinking-dot:nth-child(2) {
  animation-delay: 0.18s !important;
}

.floating-intelligence-chat-thinking-dot:nth-child(3) {
  animation-delay: 0.36s !important;
}

@keyframes floating-intelligence-chat-blink {
  0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.floating-intelligence-chat-actions {
  display: flex !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

.floating-intelligence-chat-retry-btn {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 26px !important;
  padding: 0 11px !important;
  border: 1px solid rgba(129, 156, 205, 0.26) !important;
  border-radius: var(--app-radius-pill) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--app-text) !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  transition: border-color 0.16s ease, background 0.16s ease !important;
}

.floating-intelligence-chat-retry-btn:hover,
.floating-intelligence-chat-retry-btn:focus-visible {
  border-color: rgba(124, 156, 255, 0.45) !important;
  background: rgba(124, 156, 255, 0.12) !important;
}

.floating-intelligence-chat-provider-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  overflow-wrap: anywhere !important;
  align-items: center !important;
  gap: 7px !important;
  margin-top: 10px !important;
  color: var(--app-muted) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
}

.floating-intelligence-chat-provider-fallback {
  padding: 2px 7px !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: var(--app-radius-pill) !important;
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fcd34d !important;
  font-size: 9.5px !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
}

/* Provider/runtime failure — visually distinct from insufficient evidence. */
.floating-intelligence-chat-failure {
  padding: 12px 13px !important;
  border: 1px solid rgba(248, 113, 113, 0.32) !important;
  border-left: 3px solid rgba(248, 113, 113, 0.72) !important;
  border-radius: 11px !important;
  background: rgba(248, 113, 113, 0.09) !important;
}

.floating-intelligence-chat-failure-title {
  margin-bottom: 5px !important;
  color: #fca5a5 !important;
  font-size: 12.5px !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-failure-copy {
  margin: 0 !important;
  color: rgba(226, 232, 240, 0.82) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

html[data-theme="light"] .floating-intelligence-chat-failure {
  border-color: rgba(190, 18, 60, 0.24) !important;
  background: #fff5f5 !important;
}

html[data-theme="light"] .floating-intelligence-chat-failure-title {
  color: #b91c1c !important;
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-failure-copy {
  color: #475569 !important;
}

.floating-intelligence-chat-insufficient {
  padding: 11px 13px !important;
  border: 1px solid rgba(251, 191, 36, 0.26) !important;
  border-left: 3px solid rgba(251, 191, 36, 0.6) !important;
  border-radius: 11px !important;
  background: rgba(251, 191, 36, 0.07) !important;
}

.floating-intelligence-chat-insufficient-label {
  margin-bottom: 5px !important;
  color: #fcd34d !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

html[data-theme="light"] .floating-intelligence-chat-insufficient-label,
html[data-theme="light"] .floating-intelligence-chat-provider-fallback {
  color: #b45309 !important;
}

#floatingIntelligenceMessages::-webkit-scrollbar {
  width: 8px;
}

#floatingIntelligenceMessages::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
  background-color: rgba(129, 156, 205, 0.32);
}

.floating-intelligence-chat-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 10px 2px 4px !important;
  text-align: center !important;
}

.floating-intelligence-chat-empty-mark {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 46px !important;
  height: 46px !important;
  margin-bottom: 14px !important;
  border: 1px solid rgba(129, 156, 205, 0.22) !important;
  border-radius: 15px !important;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(145deg, rgba(79, 124, 255, 0.24), rgba(168, 85, 247, 0.24)) !important;
  color: #a5bcff !important;
}

.floating-intelligence-chat-empty-mark svg {
  width: 24px !important;
  height: 24px !important;
}

.floating-intelligence-chat-empty-title {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  line-height: 1.3 !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-empty-copy {
  max-width: 380px !important;
  margin: 7px 0 0 !important;
  color: var(--app-muted) !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}

/* --- Suggested prompt tiles -------------------------------------------------
   Single source of truth for the four empty-state action tiles.

   IMPORTANT CASCADE NOTE: the global CTA rule near the top of this file,
   `button:not(...), .app-shell-primary-link`, carries high class
   specificity with !important and paints every unexcluded <button> with the
   shared matte primary treatment. These tiles are <button> elements,
   so class-only rules (0,1,0) lose to it no matter how late they appear.
   Every rule below is therefore scoped under the #floatingIntelligenceMessages
   ID, giving (1,x,y): an ID outranks any number of classes, so these
   declarations win deterministically without touching the shared global
   selector used by the rest of the app.

   Card surfaces stay neutral in both themes; colour identity lives only in the
   icon container and the hover accent, driven by [data-accent].
   -------------------------------------------------------------------------- */

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompts {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
  width: 100% !important;
  margin-top: 20px !important;
  text-align: left !important;
  align-items: stretch !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt {
  /* Per-accent tokens; overridden per [data-accent] below. */
  --prompt-accent: #60a5fa;
  --prompt-accent-bg: rgba(96, 141, 255, 0.18);
  --prompt-accent-border: rgba(96, 141, 255, 0.44);

  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 14px !important;
  text-align: left !important;
  cursor: pointer !important;
  border: 1px solid #2b3852 !important;
  border-radius: 14px !important;
  /* Solid elevated neutral slate - never a gradient, never a tinted CTA fill. */
  background: #182033 !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
  transition: border-color 0.18s ease, background-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt:hover,
#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt:focus-visible {
  transform: translateY(-2px) !important;
  border-color: var(--prompt-accent-border) !important;
  background: #1d2740 !important;
  background-image: none !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32) !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt:focus-visible {
  outline: 2px solid var(--prompt-accent) !important;
  outline-offset: 2px !important;
}

/* Fixed icon column: identical box on every card, so the text column always
   starts at the same x position regardless of glyph width. */
#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-icon {
  display: inline-flex !important;
  flex: 0 0 42px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  border: 1px solid var(--prompt-accent-border) !important;
  border-radius: 12px !important;
  background: var(--prompt-accent-bg) !important;
  color: var(--prompt-accent) !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-icon svg {
  width: 20px !important;
  height: 20px !important;
}

/* Presentation attributes on the child paths only lose to CSS applied to the
   children themselves, not to the parent <svg>. */
#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-icon svg path,
#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-icon svg circle {
  stroke-width: 2.1 !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-copy {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
  align-content: center !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-title {
  color: #f8fafc !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-hint {
  color: #cbd5e1 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere !important;
}

/* Accent identities (dark theme values). */
#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="blue"] {
  --prompt-accent: #93b4ff;
  --prompt-accent-bg: rgba(96, 141, 255, 0.2);
  --prompt-accent-border: rgba(96, 141, 255, 0.5);
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="violet"] {
  --prompt-accent: #c9a6ff;
  --prompt-accent-bg: rgba(168, 85, 247, 0.2);
  --prompt-accent-border: rgba(168, 85, 247, 0.5);
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="amber"] {
  --prompt-accent: #fcc46b;
  --prompt-accent-bg: rgba(245, 158, 11, 0.2);
  --prompt-accent-border: rgba(245, 158, 11, 0.5);
}

#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="teal"] {
  --prompt-accent: #5fd9c0;
  --prompt-accent-bg: rgba(20, 184, 166, 0.2);
  --prompt-accent-border: rgba(20, 184, 166, 0.5);
}

/* Light theme: premium white tiles, darker accents for contrast on white. */
html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt {
  border-color: #dbe3ee !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt:hover,
html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt:focus-visible {
  background: #f8fafc !important;
  background-image: none !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1) !important;
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-title {
  color: #0f172a !important;
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt-hint {
  color: #475569 !important;
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="blue"] {
  --prompt-accent: #1d4ed8;
  --prompt-accent-bg: rgba(37, 99, 235, 0.1);
  --prompt-accent-border: rgba(37, 99, 235, 0.36);
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="violet"] {
  --prompt-accent: #7e22ce;
  --prompt-accent-bg: rgba(147, 51, 234, 0.1);
  --prompt-accent-border: rgba(147, 51, 234, 0.36);
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="amber"] {
  --prompt-accent: #b45309;
  --prompt-accent-bg: rgba(217, 119, 6, 0.12);
  --prompt-accent-border: rgba(217, 119, 6, 0.38);
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt[data-accent="teal"] {
  --prompt-accent: #0f766e;
  --prompt-accent-bg: rgba(13, 148, 136, 0.11);
  --prompt-accent-border: rgba(13, 148, 136, 0.36);
}

#floatingIntelligenceMessages p {
  margin: 0 !important;
  color: var(--app-muted) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.floating-intelligence-chat-message {
  display: flex !important;
  width: 100% !important;
}

.floating-intelligence-chat-message--user {
  justify-content: flex-end !important;
}

.floating-intelligence-chat-message--assistant,
.floating-intelligence-chat-message--error {
  position: relative !important;
  justify-content: flex-start !important;
  padding-left: 36px !important;
}

.floating-intelligence-chat-message--assistant::before,
.floating-intelligence-chat-message--error::before {
  content: "" !important;
  position: absolute !important;
  top: 1px !important;
  left: 0 !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.3), transparent 60%),
    linear-gradient(145deg, #4f7cff, #a855f7) !important;
  box-shadow: 0 4px 12px rgba(79, 124, 255, 0.34) !important;
}

.floating-intelligence-chat-bubble {
  width: fit-content !important;
  max-width: min(440px, 100%) !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  overflow-wrap: anywhere !important;
}

.floating-intelligence-chat-message--user .floating-intelligence-chat-bubble {
  max-width: min(380px, 86%) !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(124, 156, 255, 0.3) !important;
  border-radius: 16px 16px 5px 16px !important;
  background: rgba(124, 156, 255, 0.14) !important;
  color: var(--app-text) !important;
  font-weight: 650 !important;
}

.floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble {
  padding: 2px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--app-text) !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble,
#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble p,
#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble span,
#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble div,
#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble a {
  color: var(--app-text) !important;
}

.floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble p,
.floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble span,
.floating-intelligence-chat-message--assistant .floating-intelligence-chat-bubble div {
  color: inherit !important;
}

.floating-intelligence-chat-message--error .floating-intelligence-chat-bubble {
  padding: 10px 13px !important;
  border: 1px solid rgba(251, 113, 133, 0.32) !important;
  border-radius: 13px !important;
  background: rgba(251, 113, 133, 0.1) !important;
  color: #fecdd3 !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-message--error .floating-intelligence-chat-bubble,
#floatingIntelligenceMessages .floating-intelligence-chat-message--error .floating-intelligence-chat-bubble p {
  color: #fecdd3 !important;
}

.floating-intelligence-chat-answer {
  color: inherit !important;
  white-space: pre-wrap !important;
}

.floating-intelligence-chat-intent-chip {
  display: inline-flex !important;
  width: fit-content !important;
  margin: 0 0 9px !important;
  padding: 3px 9px !important;
  border: 1px solid rgba(124, 156, 255, 0.3) !important;
  border-radius: var(--app-radius-pill) !important;
  background: rgba(124, 156, 255, 0.13) !important;
  color: #a5bcff !important;
  font-size: 10.5px !important;
  font-weight: 850 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

html[data-theme="light"] .floating-intelligence-chat-intent-chip {
  color: var(--app-primary) !important;
}

.floating-intelligence-chat-results,
.floating-intelligence-chat-sources {
  display: grid !important;
  gap: 9px !important;
  margin-top: 10px !important;
}

.floating-intelligence-chat-section-label,
.floating-intelligence-chat-card-kicker {
  color: var(--app-muted) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
}

.floating-intelligence-chat-card {
  display: grid !important;
  gap: 7px !important;
  padding: 12px !important;
  border: 1px solid rgba(129, 156, 205, 0.18) !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  transition: border-color 0.18s ease, background 0.18s ease !important;
}

.floating-intelligence-chat-card:hover {
  border-color: rgba(124, 156, 255, 0.36) !important;
  background: rgba(124, 156, 255, 0.07) !important;
}

.floating-intelligence-chat-card-title {
  min-width: 0 !important;
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
}

.floating-intelligence-chat-card-title a {
  color: inherit !important;
  text-decoration: none !important;
  overflow-wrap: anywhere !important;
}

.floating-intelligence-chat-card-title a:hover,
.floating-intelligence-chat-card-title a:focus-visible {
  color: var(--app-primary) !important;
  text-decoration: underline !important;
}

.floating-intelligence-chat-card-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.floating-intelligence-chat-card-meta-item {
  display: inline-flex !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  align-items: center !important;
  gap: 4px !important;
  max-width: 100% !important;
  padding: 3px 8px !important;
  border: 1px solid rgba(129, 156, 205, 0.16) !important;
  border-radius: var(--app-radius-pill) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--app-text) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
}

#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-card-meta-label,
#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-card-kicker,
#floatingIntelligenceMessages .floating-intelligence-chat-message--assistant .floating-intelligence-chat-section-label {
  color: var(--app-muted) !important;
}

.floating-intelligence-chat-card-meta-label {
  color: var(--app-muted) !important;
  font-weight: 900 !important;
}

html[data-theme="light"] .floating-intelligence-chat-card {
  border-color: rgba(71, 94, 132, 0.14) !important;
  background: rgba(15, 23, 42, 0.022) !important;
}

html[data-theme="light"] .floating-intelligence-chat-card-meta-item {
  border-color: rgba(71, 94, 132, 0.14) !important;
  background: rgba(15, 23, 42, 0.03) !important;
}

html[data-theme="light"] .floating-intelligence-chat-message--error .floating-intelligence-chat-bubble {
  background: #fff1f2 !important;
  color: #9f1239 !important;
}

html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-message--error .floating-intelligence-chat-bubble,
html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-message--error .floating-intelligence-chat-bubble p {
  color: #9f1239 !important;
}

.floating-intelligence-chat-compose {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 14px 14px !important;
  padding: 7px 7px 7px 8px !important;
  border: 1px solid rgba(129, 156, 205, 0.2) !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14) !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

html[data-theme="light"] .floating-intelligence-chat-compose {
  border-color: rgba(71, 94, 132, 0.16) !important;
  background: #ffffff !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07) !important;
}

.floating-intelligence-chat-compose:focus-within {
  border-color: rgba(124, 156, 255, 0.5) !important;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.16),
    0 0 0 3px rgba(124, 156, 255, 0.16) !important;
}

#floatingIntelligenceInput {
  min-width: 0 !important;
  min-height: 38px !important;
  max-height: 132px !important;
  padding: 9px 6px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--app-text) !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  resize: none !important;
  overflow-y: auto !important;
  box-shadow: none !important;
}

#floatingIntelligenceInput:focus,
#floatingIntelligenceInput:focus-visible {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

#floatingIntelligenceSendBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, #4f7cff, #a855f7) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.36) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease !important;
}

#floatingIntelligenceSendBtn svg {
  width: 17px !important;
  height: 17px !important;
}

#floatingIntelligenceSendBtn .floating-intelligence-chat-stop-icon,
#floatingIntelligenceSendBtn[data-state="busy"] .floating-intelligence-chat-send-icon {
  display: none !important;
}

#floatingIntelligenceSendBtn[data-state="busy"] .floating-intelligence-chat-stop-icon {
  display: block !important;
}

/* Slightly larger, easier-to-hit target while a request is in flight. */
#floatingIntelligenceSendBtn[data-state="busy"] {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--app-text) !important;
  box-shadow: none !important;
}

#floatingIntelligenceSendBtn[data-state="busy"] .floating-intelligence-chat-stop-icon {
  width: 20px !important;
  height: 20px !important;
}

html[data-theme="light"] #floatingIntelligenceSendBtn[data-state="busy"] {
  background: rgba(15, 23, 42, 0.08) !important;
}

#floatingIntelligenceSendBtn:hover:not(:disabled),
#floatingIntelligenceSendBtn:focus-visible:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(79, 124, 255, 0.46) !important;
}

#floatingIntelligenceSendBtn:disabled {
  opacity: 0.5 !important;
  box-shadow: none !important;
}

#floatingIntelligenceStatus {
  display: none !important;
}

/* --- Chat readability pass: explicit text tiers in both themes. --- */

/* Dark theme: lift secondary text off the deep panel surface. */
#floatingIntelligenceMessages .floating-intelligence-chat-empty-copy,
.floating-intelligence-chat-provider-meta,
.floating-intelligence-chat-card-meta-label,
.floating-intelligence-chat-section-label,
.floating-intelligence-chat-card-kicker,
.floating-intelligence-chat-heading p {
  color: rgba(208, 219, 238, 0.86) !important;
}

.floating-intelligence-chat-empty-mark {
  color: #c3d2ff !important;
}

.floating-intelligence-chat-card-meta-item {
  border-color: rgba(129, 156, 205, 0.26) !important;
  background: rgba(255, 255, 255, 0.075) !important;
  color: rgba(240, 245, 255, 0.95) !important;
}

.floating-intelligence-chat-card {
  border-color: rgba(129, 156, 205, 0.24) !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

.floating-intelligence-chat-message--user .floating-intelligence-chat-bubble {
  border-color: rgba(140, 170, 255, 0.42) !important;
  background: rgba(124, 156, 255, 0.2) !important;
}

#floatingIntelligenceInput::placeholder {
  color: rgba(186, 199, 222, 0.72) !important;
  opacity: 1 !important;
}

.floating-intelligence-chat-thinking-dot {
  background: rgba(203, 213, 225, 0.85) !important;
}

/* Light theme: keep the premium surface but make every tier legible. */
html[data-theme="light"] #floatingIntelligenceMessages .floating-intelligence-chat-empty-copy,
html[data-theme="light"] .floating-intelligence-chat-provider-meta,
html[data-theme="light"] .floating-intelligence-chat-card-meta-label,
html[data-theme="light"] .floating-intelligence-chat-section-label,
html[data-theme="light"] .floating-intelligence-chat-card-kicker,
html[data-theme="light"] .floating-intelligence-chat-heading p {
  color: #475569 !important;
}

html[data-theme="light"] .floating-intelligence-chat-empty-mark {
  background: rgba(37, 99, 235, 0.11) !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .floating-intelligence-chat-card {
  border-color: rgba(71, 94, 132, 0.24) !important;
  background: #ffffff !important;
}

html[data-theme="light"] .floating-intelligence-chat-card-title {
  color: #0f172a !important;
}

html[data-theme="light"] .floating-intelligence-chat-card-meta-item {
  border-color: rgba(71, 94, 132, 0.22) !important;
  background: #f1f5fb !important;
  color: #1e293b !important;
}

html[data-theme="light"] .floating-intelligence-chat-message--user .floating-intelligence-chat-bubble {
  border-color: rgba(37, 99, 235, 0.3) !important;
  background: rgba(37, 99, 235, 0.1) !important;
  color: #0f172a !important;
}

html[data-theme="light"] #floatingIntelligenceInput::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

html[data-theme="light"] .floating-intelligence-chat-thinking-dot {
  background: #64748b !important;
}

html[data-theme="light"] .floating-intelligence-chat-retry-btn {
  border-color: rgba(71, 94, 132, 0.26) !important;
  background: #ffffff !important;
  color: #1e293b !important;
}

html[data-theme="light"] .floating-intelligence-chat-insufficient {
  border-color: rgba(180, 83, 9, 0.24) !important;
  background: #fffbeb !important;
}

html[data-theme="light"] #floatingIntelligenceMessages
  .floating-intelligence-chat-insufficient .floating-intelligence-chat-answer {
  color: #422006 !important;
}

/* Disabled states must stay visibly distinct without disappearing. */
#floatingIntelligenceSendBtn:disabled {
  opacity: 0.55 !important;
}

.floating-intelligence-chat-retry-btn:disabled,
#floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt:disabled {
  opacity: 0.55 !important;
  cursor: default !important;
}

/* --- Accessibility: visible keyboard focus across the whole chatbot. --- */
#floatingIntelligenceChatButton:focus-visible,
#floatingIntelligenceChatCloseBtn:focus-visible,
.floating-intelligence-chat-header-btn:focus-visible,
#floatingIntelligenceSendBtn:focus-visible,
.floating-intelligence-chat-retry-btn:focus-visible,
.floating-intelligence-chat-jump-btn:focus-visible,
.floating-intelligence-chat-card-title a:focus-visible {
  outline: 2px solid #7c9cff !important;
  outline-offset: 2px !important;
}

html[data-theme="light"] #floatingIntelligenceChatButton:focus-visible,
html[data-theme="light"] #floatingIntelligenceChatCloseBtn:focus-visible,
html[data-theme="light"] .floating-intelligence-chat-header-btn:focus-visible,
html[data-theme="light"] #floatingIntelligenceSendBtn:focus-visible,
html[data-theme="light"] .floating-intelligence-chat-retry-btn:focus-visible,
html[data-theme="light"] .floating-intelligence-chat-jump-btn:focus-visible,
html[data-theme="light"] .floating-intelligence-chat-card-title a:focus-visible {
  outline-color: #1d4ed8 !important;
}

#floatingIntelligenceInput:focus-visible {
  outline: none !important;
}

.floating-intelligence-chat-compose:focus-within {
  outline: 2px solid transparent !important;
}

/* --- Touch targets: keep the approved visuals, widen the hit area. --- */
@media (pointer: coarse) {
  #floatingIntelligenceChatCloseBtn,
  .floating-intelligence-chat-header-btn {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  #floatingIntelligenceSendBtn {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .floating-intelligence-chat-retry-btn {
    min-height: 44px !important;
    padding: 0 16px !important;
  }

  .floating-intelligence-chat-jump-btn {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}

@media (max-width: 560px) {
  #floatingIntelligenceChatButton {
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: var(--floating-chat-launcher-bottom-mobile, max(16px, env(safe-area-inset-bottom))) !important;
    width: 58px !important;
    height: 58px !important;
  }

  #floatingIntelligenceChatPanel {
    top: max(12px, env(safe-area-inset-top)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    /* dvh avoids mobile browser-toolbar and keyboard height jumps; the vh
       line above it remains the fallback for older engines. */
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompts {
    grid-template-columns: minmax(0, 1fr);
  }

  .floating-intelligence-chat-status-badge {
    display: none !important;
  }

  .floating-intelligence-chat-bubble {
    max-width: 100% !important;
  }

  .floating-intelligence-chat-message--user .floating-intelligence-chat-bubble {
    max-width: 92% !important;
  }

  .floating-intelligence-chat-header {
    padding: 12px 12px !important;
  }

  #floatingIntelligenceMessages {
    padding: 14px 12px !important;
  }

  .floating-intelligence-chat-compose {
    margin: 0 12px 12px !important;
  }
}

@media (max-width: 400px) {
  #floatingIntelligenceChatPanel {
    right: max(6px, env(safe-area-inset-right)) !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    border-radius: 20px !important;
  }

  .floating-intelligence-chat-status-badge {
    display: none !important;
  }

  .floating-intelligence-chat-heading p {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #floatingIntelligenceChatPanel {
    animation: none !important;
  }

  #floatingIntelligenceChatButton,
  #floatingIntelligenceChatButton:hover,
  #floatingIntelligenceChatButton:focus-visible,
  .floating-intelligence-chat-icon,
  #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt,
  #floatingIntelligenceMessages .floating-intelligence-chat-suggested-prompt:hover,
  #floatingIntelligenceSendBtn {
    transform: none !important;
    transition: none !important;
  }

  .floating-intelligence-chat-thinking-dot {
    animation: none !important;
    opacity: 0.6 !important;
  }

  #floatingIntelligenceChatPanel,
  #floatingIntelligenceChatButton .floating-intelligence-chat-button-glow,
  #floatingIntelligenceChatCloseBtn,
  .floating-intelligence-chat-header-btn,
  .floating-intelligence-chat-card,
  .floating-intelligence-chat-compose,
  .floating-intelligence-chat-retry-btn,
  .floating-intelligence-chat-jump-btn {
    animation: none !important;
    transition: none !important;
  }

  #floatingIntelligenceMessages {
    scroll-behavior: auto !important;
  }
}

/* New user onboarding: one shared empty state and first-run prompt for authenticated pages. */
body.app-new-user-empty .page {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

body.app-new-user-empty .page > :not(.new-user-empty-state) {
  display: none !important;
}

.new-user-empty-state {
  width: min(720px, calc(100vw - 48px));
  margin: 0 auto;
}

.new-user-empty-card,
.first-run-prompt-card {
  border: 1px solid rgba(96, 165, 250, 0.24);
  background:
    radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
  color: #0f172a;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18);
}

.new-user-empty-card {
  border-radius: 30px;
  padding: clamp(32px, 5vw, 58px);
  text-align: center;
}

.new-user-empty-kicker,
.first-run-prompt-kicker {
  margin-bottom: 12px;
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.new-user-empty-card h2,
.first-run-prompt-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.98;
  font-weight: 950;
}

.new-user-empty-card p,
.first-run-prompt-card p {
  margin: 18px auto 0;
  max-width: 560px;
  color: #52627a;
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 650;
}

.new-user-empty-actions,
.first-run-prompt-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.new-user-empty-primary,
.first-run-prompt-primary,
.first-run-prompt-secondary {
  min-height: 52px;
  border-radius: 16px;
  padding: 0 24px;
  font-weight: 900;
  border: 1px solid var(--app-action-border);
}

.new-user-empty-primary,
.first-run-prompt-primary {
  background: var(--app-action-primary);
  background-image: none;
  color: var(--app-action-text);
  box-shadow: 0 8px 20px rgba(54, 83, 76, 0.18);
}

.first-run-prompt-secondary {
  background: #ffffff;
  color: #334155;
}

.first-run-prompt-modal.hidden {
  display: none;
}

.first-run-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* Keep read-only Guide access available without exposing other shell actions
   through the first-run modal. */
body.app-first-run-prompt-open .app-shell-top-right:not(.app-shell-top-right--flow) {
  z-index: 1501 !important;
  pointer-events: none !important;
}

body.app-first-run-prompt-open .app-shell-guide-link {
  pointer-events: auto !important;
}

.first-run-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(12px);
}

.first-run-prompt-card {
  position: relative;
  width: min(560px, calc(100vw - 48px));
  border-radius: 28px;
  padding: 34px;
  text-align: center;
}

html[data-theme="dark"] .new-user-empty-card,
html[data-theme="dark"] .first-run-prompt-card {
  border-color: rgba(96, 165, 250, 0.32);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 36%),
    linear-gradient(135deg, #111c2f, #0f172a);
  color: #f8fafc;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .new-user-empty-card h2,
html[data-theme="dark"] .first-run-prompt-card h2 {
  color: #f8fafc;
}

html[data-theme="dark"] .new-user-empty-card p,
html[data-theme="dark"] .first-run-prompt-card p {
  color: #a8b6cc;
}

html[data-theme="dark"] .first-run-prompt-secondary {
  border-color: rgba(148, 163, 184, 0.28);
  background: #17243a;
  color: #dbeafe;
}

/* profile_admin_users_v1: admin-only user access management. */
.profile-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-tab-btn {
  --profile-tab-color: #2563eb;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 0 0 auto;
  min-height: 48px !important;
  border-radius: 0 !important;
  border: 0 !important;
  padding: 0 18px;
  background: transparent !important;
  color: var(--app-muted) !important;
  box-shadow: none !important;
  font-weight: 880 !important;
  line-height: 1;
  outline-offset: 6px;
  transform: none !important;
}

.profile-tab-btn::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 5px;
  border-radius: 999px;
  background: var(--profile-tab-color);
  content: "";
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity var(--app-fast, 120ms) var(--app-ease, ease), transform var(--app-fast, 120ms) var(--app-ease, ease);
}

.profile-tab-btn:hover {
  border: 0 !important;
  background: transparent !important;
  color: var(--app-text) !important;
  box-shadow: none !important;
  transform: none !important;
}

.profile-tab-icon {
  width: 18px;
  height: 18px;
  opacity: 0.78;
  filter: none;
}

.profile-tab-icon-stack {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.profile-tab-icon-stack .profile-tab-icon {
  grid-area: 1 / 1;
}

.profile-tab-icon--light {
  display: none;
}

.profile-tab-icon--pipeline {
  display: inline-block;
  flex: 0 0 auto;
  background: #a78bfa;
  opacity: 1;
  mask: url("/static/media/pipeline_icon.svg") center / contain no-repeat;
  -webkit-mask: url("/static/media/pipeline_icon.svg") center / contain no-repeat;
}

.profile-tab-btn.is-active {
  border: 0 !important;
  background: transparent !important;
  color: var(--profile-tab-color) !important;
  box-shadow: none !important;
  transform: none !important;
}

.profile-tab-btn.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.profile-tab-btn.is-active .profile-tab-icon {
  opacity: 1;
  filter: none;
}

.profile-admin-users-section {
  margin-top: 24px;
}

/* profile_admin_users_v3: flatten resume manager panels; keep only useful controls framed. */
.resume-upload-panel,
.resume-list-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.resume-manager-grid {
  align-items: start !important;
}

.resume-list-panel {
  overflow: visible !important;
}

html[data-theme="light"] .resume-upload-panel,
html[data-theme="light"] .resume-list-panel {
  background: transparent !important;
}

/* phase1_step8c: server-marked resume prerequisite mode reuses the Profile uploader. */
body.profile-resume-onboarding-mode .profile-resume-onboarding-page {
  width: min(920px, calc(100% - 40px));
  max-width: 920px;
  margin-inline: auto;
  padding-bottom: 56px;
}

body.profile-resume-onboarding-mode .profile-resume-onboarding-page > .app-page-header {
  margin-bottom: 18px;
}

body.profile-resume-onboarding-mode #resumeSection {
  padding: clamp(20px, 3vw, 30px);
  border-color: color-mix(in srgb, var(--app-primary) 24%, var(--app-border));
  border-radius: 16px;
  background: color-mix(in srgb, var(--app-surface) 94%, var(--app-primary) 6%);
  box-shadow: 0 20px 55px rgba(2, 8, 23, 0.12);
}

body.profile-resume-onboarding-mode #resumeSection .section-header {
  margin-bottom: 16px;
}

body.profile-resume-onboarding-mode .resume-manager-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
}

body.profile-resume-onboarding-mode .profile-planning-upload-callout,
body.profile-resume-onboarding-mode .resume-role-mapping-panel,
body.profile-resume-onboarding-mode .resume-row-actions {
  display: none !important;
}

body.profile-resume-onboarding-mode #resumeOnboardingBanner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

body.profile-resume-onboarding-mode .profile-onboarding-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--app-primary) 44%, var(--app-border));
  border-radius: 9px;
  background: color-mix(in srgb, var(--app-primary) 13%, var(--app-surface-2));
  color: var(--app-text);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  transition: background-color var(--app-fast, 120ms) var(--app-ease, ease), border-color var(--app-fast, 120ms) var(--app-ease, ease);
}

body.profile-resume-onboarding-mode .profile-onboarding-continue-btn:hover {
  border-color: color-mix(in srgb, var(--app-primary) 64%, var(--app-border));
  background: color-mix(in srgb, var(--app-primary) 20%, var(--app-surface-2));
}

body.profile-resume-onboarding-mode .profile-onboarding-continue-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--app-primary) 46%, transparent);
  outline-offset: 2px;
}

body.profile-resume-onboarding-mode .profile-onboarding-resume-ready {
  border-color: color-mix(in srgb, var(--app-success, #16a34a) 30%, var(--app-border));
  background: color-mix(in srgb, var(--app-success, #16a34a) 7%, var(--app-surface-2));
}

@media (max-width: 640px) {
  body.profile-resume-onboarding-mode .profile-resume-onboarding-page {
    width: min(100% - 24px, 920px);
  }

  body.profile-resume-onboarding-mode #resumeOnboardingBanner {
    align-items: flex-start;
    flex-direction: column;
  }

  body.profile-resume-onboarding-mode .profile-onboarding-continue-btn {
    width: 100%;
    margin-left: 0;
  }
}

.profile-planning-upload-callout {
  border: 1px solid color-mix(in srgb, var(--app-secondary) 34%, var(--app-border)) !important;
  background: color-mix(in srgb, var(--app-secondary) 10%, var(--app-surface-2)) !important;
  box-shadow: var(--app-shadow-sm) !important;
}

.profile-planning-options-btn {
  border-color: color-mix(in srgb, var(--app-secondary) 58%, var(--app-border)) !important;
  background: #0e7490 !important;
  color: #f0fdff !important;
  box-shadow: var(--app-shadow-sm) !important;
}

html[data-theme="light"] .profile-planning-upload-callout {
  background: #ecfeff !important;
}

html[data-theme="light"] .profile-planning-options-btn {
  border-color: #67e8f9 !important;
  background: #cffafe !important;
  color: #155e75 !important;
}

.profile-planning-options-card {
  width: min(920px, calc(100vw - 40px)) !important;
  position: relative;
}

.profile-planning-options-card .modal-header {
  padding-right: 140px;
}

.profile-planning-options-card .modal-header h3 {
  color: var(--app-text) !important;
  font-weight: 900;
}

.profile-planning-options-card .modal-header .subtext {
  color: var(--app-muted) !important;
  font-weight: 650;
}

.profile-planning-modal-close-btn {
  position: absolute;
  top: 28px;
  right: 28px;
  border-color: #38bdf8 !important;
  background: #0e7490 !important;
  color: #f0fdff !important;
  box-shadow: var(--app-shadow-sm) !important;
}

.profile-planning-option-header {
  margin-bottom: 14px;
}

.profile-planning-run-btn {
  border-color: #22c55e !important;
  background: #15803d !important;
  color: #f0fdf4 !important;
  box-shadow: 0 14px 30px rgba(21, 128, 61, 0.22) !important;
}

.profile-planning-cancel-btn {
  border-color: #64748b !important;
  background: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: var(--app-shadow-sm) !important;
}

html[data-theme="light"] .profile-planning-modal-close-btn {
  border-color: #67e8f9 !important;
  background: #cffafe !important;
  color: #155e75 !important;
}

html[data-theme="light"] .profile-planning-run-btn {
  border-color: #86efac !important;
  background: #dcfce7 !important;
  color: #166534 !important;
}

html[data-theme="light"] .profile-planning-cancel-btn {
  border-color: #cbd5e1 !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
}

/* profile_admin_users_v4: remove decorative box from resume delete actions. */
.resume-row .resume-delete-btn {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fb7185 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.resume-row .resume-delete-btn:hover {
  border: 0 !important;
  background: rgba(251, 113, 133, 0.12) !important;
  box-shadow: none !important;
  color: #f43f5e !important;
  transform: none !important;
}

.resume-row .resume-delete-btn::before {
  content: none !important;
  display: none !important;
}

html[data-theme="light"] .resume-row .resume-delete-btn {
  color: #b91c1c !important;
}

html[data-theme="light"] .resume-row .resume-delete-btn:hover {
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.resume-role-mapping-panel {
  grid-column: 1 / -1;
  margin-top: 10px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-inset);
  overflow: hidden;
}

.resume-role-mapping-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--app-text);
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.resume-role-mapping-panel summary::-webkit-details-marker {
  display: none;
}

.resume-role-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.resume-role-summary-caret {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--app-secondary);
  transition: transform 0.16s ease;
}

.resume-role-mapping-panel[open] .resume-role-summary-caret {
  transform: rotate(90deg);
}

.resume-role-mapping-panel summary span:last-child {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 800;
}

.resume-role-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.resume-role-family-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--app-border-2);
  border-radius: 12px;
  background: var(--app-surface);
  color: var(--app-text-2);
  font-size: 13px;
  font-weight: 850;
}

.resume-role-family-option.is-selected {
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.12);
  color: var(--app-text);
}

.resume-role-family-main,
.resume-role-default-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.resume-role-family-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-role-default-wrap {
  flex: 0 0 auto;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 900;
}

.resume-role-default-wrap input:disabled + span {
  opacity: 0.45;
}

html[data-theme="light"] .resume-role-family-option.is-selected {
  background: #eff6ff;
  color: #0f172a;
}

.admin-users-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: var(--app-surface-2);
}

.admin-users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

.admin-users-table th,
.admin-users-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--app-border);
  text-align: left;
  vertical-align: middle;
}

.admin-users-table th {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--app-inset);
}

.admin-users-table tr:last-child td {
  border-bottom: 0;
}

.admin-user-name {
  color: var(--app-text);
  font-weight: 850;
}

.admin-user-id {
  margin-top: 3px;
  color: var(--app-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.admin-user-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.admin-user-status.is-active {
  border: 1px solid rgba(52, 211, 153, 0.38);
  background: rgba(52, 211, 153, 0.14);
  color: #bbf7d0;
}

.admin-user-status.is-revoked {
  border: 1px solid rgba(251, 113, 133, 0.38);
  background: rgba(251, 113, 133, 0.14);
  color: #fecdd3;
}

#profileAdminUsersSection .admin-user-access-switch {
  min-width: 132px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px !important;
  border: 1px solid var(--app-border-2) !important;
  background: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.26) !important;
}

#profileAdminUsersSection .admin-user-access-knob {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.92;
}

#profileAdminUsersSection .admin-user-access-switch.is-authorized {
  border-color: #34d399 !important;
  background-color: #047857 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(4, 120, 87, 0.28) !important;
}

#profileAdminUsersSection .admin-user-access-switch.is-revoked {
  border-color: #fb7185 !important;
  background-color: #be123c !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(190, 18, 60, 0.28) !important;
}

#profileAdminUsersSection .admin-user-access-label {
  color: var(--app-text);
  font-size: 12px;
  font-weight: 900;
}

#profileAdminUsersSection .admin-user-delete-btn,
#adminUserDeleteModal .admin-user-delete-confirm-btn,
#adminUserAccessModal .admin-user-revoke-confirm-btn {
  border: 1px solid #f43f5e !important;
  background-color: #e11d48 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.34) !important;
}

#adminUserAccessModal .admin-user-authorize-confirm-btn {
  border: 1px solid #10b981 !important;
  background-color: #059669 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.3) !important;
}

#profileAdminUsersSection .admin-user-delete-btn {
  min-height: 38px;
}

#resumeDeleteModal .resume-delete-modal-card,
#savedScanDeleteModal .resume-delete-modal-card {
  width: min(720px, calc(100vw - 32px)) !important;
  padding: 30px 36px !important;
  position: relative;
}

#resumeDeleteModal .resume-delete-modal-card .modal-header,
#savedScanDeleteModal .resume-delete-modal-card .modal-header {
  margin: 0 !important;
  padding: 0 134px 18px 0 !important;
  border-bottom: 1px solid var(--app-border) !important;
}

#resumeDeleteModal .resume-delete-modal-card .modal-header > div,
#savedScanDeleteModal .resume-delete-modal-card .modal-header > div {
  margin: 0 !important;
  padding: 0 !important;
}

#resumeDeleteModal .resume-delete-modal-card .modal-body,
#savedScanDeleteModal .resume-delete-modal-card .modal-body {
  margin: 28px 0 34px !important;
  padding: 0 !important;
}

#resumeDeleteModal .resume-delete-modal-close-btn,
#savedScanDeleteModal .resume-delete-modal-close-btn {
  position: absolute;
  top: 24px;
  right: 36px;
  border-color: #38bdf8 !important;
  background-color: #0e7490 !important;
  background-image: none !important;
  color: #f0fdff !important;
  box-shadow: var(--app-shadow-sm) !important;
}

#resumeDeleteModal .resume-delete-modal-actions,
#savedScanDeleteModal .resume-delete-modal-actions {
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
}

#savedScanDeleteModal .resume-delete-cancel-btn {
  border-color: #64748b !important;
  background-color: #334155 !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22) !important;
}

#resumeDeleteModal .resume-delete-confirm-btn,
#savedScanDeleteModal .resume-delete-confirm-btn {
  min-width: 132px;
  border: 1px solid #f43f5e !important;
  border-radius: 12px !important;
  background-color: #e11d48 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.34) !important;
}

#adminUserAccessModal .admin-user-confirm-card,
#adminUserDeleteModal .admin-user-confirm-card {
  width: min(560px, calc(100vw - 32px)) !important;
  padding: 30px 36px !important;
  position: relative;
}

#adminUserAccessModal .admin-user-confirm-card .modal-header,
#adminUserDeleteModal .admin-user-confirm-card .modal-header {
  margin: 0 !important;
  padding: 0 126px 18px 0 !important;
  border-bottom: 1px solid var(--app-border) !important;
}

#adminUserAccessModal .admin-user-confirm-card .modal-header > div,
#adminUserDeleteModal .admin-user-confirm-card .modal-header > div {
  margin: 0 !important;
  padding: 0 !important;
}

#adminUserAccessModal .admin-user-confirm-card .modal-header h3,
#adminUserDeleteModal .admin-user-confirm-card .modal-header h3 {
  color: var(--app-text) !important;
  font-weight: 900;
}

#adminUserAccessModal .admin-user-confirm-card .modal-header .subtext,
#adminUserDeleteModal .admin-user-confirm-card .modal-header .subtext {
  color: var(--app-muted) !important;
  font-weight: 650;
}

#adminUserAccessModal .admin-user-modal-close-btn,
#adminUserDeleteModal .admin-user-modal-close-btn {
  position: absolute;
  top: 24px;
  right: 36px;
  border-color: #38bdf8 !important;
  background-color: #0e7490 !important;
  background-image: none !important;
  color: #f0fdff !important;
  box-shadow: var(--app-shadow-sm) !important;
}

#adminUserAccessModal .admin-user-confirm-card .modal-body,
#adminUserDeleteModal .admin-user-confirm-card .modal-body {
  margin: 28px 0 34px !important;
  padding: 0 !important;
}

#adminUserAccessModal .admin-user-confirm-card .modal-actions,
#adminUserDeleteModal .admin-user-confirm-card .modal-actions {
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
}

#adminUserAccessModal .admin-user-confirm-copy,
#adminUserDeleteModal .admin-user-confirm-copy {
  display: grid;
  gap: 10px;
  padding: 0;
  color: var(--app-text-2);
  line-height: 1.5;
}

#adminUserAccessModal .admin-user-confirm-copy strong,
#adminUserDeleteModal .admin-user-confirm-copy strong {
  color: #e0f2fe;
  font-size: 19px;
  font-weight: 900;
}

#adminUserAccessModal .admin-user-confirm-copy span,
#adminUserDeleteModal .admin-user-confirm-copy span {
  color: var(--app-muted);
  font-weight: 650;
}

.admin-user-confirm-card:not(.admin-user-danger-card) .admin-user-confirm-copy strong {
  color: #86efac;
}

.admin-user-danger-card .admin-user-confirm-copy strong {
  color: #fecaca;
}

.admin-user-high-warning {
  margin: 22px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(251, 113, 133, 0.5);
  border-radius: 14px;
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
  font-weight: 850;
  line-height: 1.45;
}

.admin-users-empty-cell {
  color: var(--app-muted);
  text-align: center !important;
}

#profileAdminUsersSection #refreshAdminUsersBtn {
  border-color: #38bdf8 !important;
  background-color: #0e7490 !important;
  background-image: none !important;
  color: #f0fdff !important;
  box-shadow: var(--app-shadow-sm) !important;
}

html[data-theme="light"] .admin-users-table-wrap,
html[data-theme="light"] .admin-users-table td {
  background: #ffffff;
}

html[data-theme="light"] .profile-tabs {
  border-color: #cbd5e1;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] .profile-tab-btn {
  color: #475569 !important;
}

html[data-theme="light"] .profile-tab-icon {
  opacity: 0.72;
}

html[data-theme="light"] .profile-tab-icon--dark {
  display: none;
}

html[data-theme="light"] .profile-tab-icon--light {
  display: block;
}

html[data-theme="light"] .profile-tab-icon--pipeline {
  background: #7c3aed;
  opacity: 1;
}

html[data-theme="light"] .profile-tab-btn.is-active {
  border: 0 !important;
  background: transparent !important;
  color: var(--profile-tab-color) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .profile-tab-btn.is-active .profile-tab-icon {
  opacity: 0.96;
  filter: none;
}

html[data-theme="light"] .admin-users-table th {
  background: #f1f5f9;
  color: #475569;
}

html[data-theme="light"] .admin-user-name,
html[data-theme="light"] .admin-user-access-label,
html[data-theme="light"] .admin-user-confirm-copy strong {
  color: #0f172a;
}

html[data-theme="light"] #adminUserAccessModal .admin-user-confirm-copy strong {
  color: #047857 !important;
}

html[data-theme="light"] #adminUserDeleteModal .admin-user-confirm-copy strong {
  color: #991b1b !important;
}

html[data-theme="light"] .admin-user-id,
html[data-theme="light"] .admin-user-confirm-copy,
html[data-theme="light"] .admin-user-confirm-copy span {
  color: #475569;
}

html[data-theme="light"] #adminUserAccessModal .admin-user-modal-close-btn,
html[data-theme="light"] #adminUserDeleteModal .admin-user-modal-close-btn {
  border-color: #bae6fd !important;
  background-color: #e0f2fe !important;
  background-image: none !important;
  color: #075985 !important;
}

html[data-theme="light"] #profileAdminUsersSection #refreshAdminUsersBtn {
  border-color: #bae6fd !important;
  background-color: #e0f2fe !important;
  background-image: none !important;
  color: #075985 !important;
  box-shadow: 0 10px 20px rgba(14, 116, 144, 0.12) !important;
}

html[data-theme="light"] #resumeDeleteModal .resume-delete-modal-close-btn,
html[data-theme="light"] #savedScanDeleteModal .resume-delete-modal-close-btn {
  border-color: #bae6fd !important;
  background-color: #e0f2fe !important;
  background-image: none !important;
  color: #075985 !important;
}

html[data-theme="light"] #savedScanDeleteModal .resume-delete-cancel-btn {
  border-color: #cbd5e1 !important;
  background-color: #f8fafc !important;
  background-image: none !important;
  color: #0f172a !important;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] #resumeDeleteModal .resume-delete-confirm-btn,
html[data-theme="light"] #savedScanDeleteModal .resume-delete-confirm-btn {
  border-color: #b91c1c !important;
  background-color: #dc2626 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18) !important;
}

html[data-theme="light"] .admin-user-confirm-card:not(.admin-user-danger-card) .admin-user-confirm-copy strong {
  color: #047857;
}

html[data-theme="light"] .admin-user-danger-card .admin-user-confirm-copy strong {
  color: #991b1b;
}

html[data-theme="light"] .admin-user-status.is-active {
  border-color: #86efac;
  background: #ecfdf5;
  color: #065f46;
}

html[data-theme="light"] .admin-user-status.is-revoked {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #7f1d1d;
}

html[data-theme="light"] #profileAdminUsersSection .admin-user-access-switch.is-authorized {
  border-color: #86efac !important;
  background-color: #ecfdf5 !important;
  background-image: none !important;
  color: #059669 !important;
}

html[data-theme="light"] #profileAdminUsersSection .admin-user-access-switch.is-revoked {
  border-color: #b91c1c !important;
  background-color: #dc2626 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.2) !important;
}

html[data-theme="light"] #profileAdminUsersSection .admin-user-delete-btn,
html[data-theme="light"] #adminUserDeleteModal .admin-user-delete-confirm-btn,
html[data-theme="light"] #adminUserAccessModal .admin-user-revoke-confirm-btn {
  border-color: #b91c1c !important;
  background-color: #dc2626 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18) !important;
}

html[data-theme="light"] #adminUserAccessModal .admin-user-authorize-confirm-btn {
  border-color: #047857 !important;
  background-color: #059669 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.18) !important;
}

html[data-theme="light"] .admin-user-high-warning {
  border-color: #f87171;
  background: #fef2f2;
  color: #7f1d1d;
}

/* profile_pipeline_runs_v1: persisted Live Pipeline run history in My Profile. */
.profile-pipeline-runs-section {
  margin-top: 24px;
}

.profile-section-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

/* profile_pipeline_runs_history_r1
   Premium compact run-history grid. Neutral surfaces with a selective
   eucalyptus accent; no pastel zebra rows, no saturated blue/purple actions. */
.profile-pipeline-runs-section {
  --runs-surface: #ffffff;
  --runs-surface-alt: #fcfdfd;
  --runs-head-bg: #f6faf8;
  --runs-border: #d9e4e0;
  --runs-hairline: #e8eeeb;
  --runs-text: #101828;
  --runs-secondary: #5f6b7a;
  --runs-muted: #8a949f;
  --runs-accent: #3c746a;
  --runs-accent-hover: #315f57;
  --runs-accent-pressed: #294f49;
  --runs-accent-soft: #eef8f4;
  --runs-accent-border: #cfe1db;
  --runs-pagination-disabled-bg: #f2f5f4;
  --runs-pagination-disabled-border: #dde5e2;
  --runs-pagination-disabled-icon: #9aa5a1;
  --runs-pagination-indicator: #344054;
  --runs-status-dot: #2ea889;
  --runs-status-text: #27665a;
}

html:not([data-theme="light"]) .profile-pipeline-runs-section,
html[data-theme="dark"] .profile-pipeline-runs-section {
  --runs-surface: #141b26;
  --runs-surface-alt: #161d29;
  --runs-head-bg: #18202d;
  --runs-border: rgba(167, 176, 193, 0.18);
  --runs-hairline: rgba(167, 176, 193, 0.13);
  --runs-text: #f2f4f7;
  --runs-secondary: #a8b2c0;
  --runs-muted: #8a949f;
  --runs-accent: #6fbca9;
  --runs-accent-hover: #8ccdbc;
  --runs-accent-pressed: #579d8c;
  --runs-accent-soft: rgba(60, 116, 106, 0.18);
  --runs-accent-border: rgba(111, 188, 169, 0.3);
  --runs-pagination-disabled-bg: #1b242f;
  --runs-pagination-disabled-border: rgba(167, 176, 193, 0.2);
  --runs-pagination-disabled-icon: #788390;
  --runs-pagination-indicator: #c7ced8;
  --runs-status-dot: #58c3a5;
  --runs-status-text: #a9d8cb;
}

.pipeline-runs-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pipeline-runs-pagination-inline {
  display: flex;
  align-items: center;
}

.profile-pipeline-runs-section .application-pagination-meta {
  color: var(--runs-secondary);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

.profile-pipeline-runs-section .pipeline-runs-refresh-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px !important;
  border: 1px solid var(--runs-border) !important;
  border-radius: 10px !important;
  background: var(--runs-surface) !important;
  background-image: none !important;
  color: var(--runs-secondary) !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 620;
}

.profile-pipeline-runs-section .pipeline-runs-refresh-btn svg {
  width: 16px;
  height: 16px;
}

.profile-pipeline-runs-section .pipeline-runs-refresh-btn:not(:disabled):hover {
  border-color: var(--runs-accent-border) !important;
  background: var(--runs-accent-soft) !important;
  background-image: none !important;
  color: var(--runs-accent) !important;
}

.pipeline-runs-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ID ownership intentionally outranks the legacy button:not(...) catchalls,
   whose many exclusions otherwise beat ordinary component-class selectors. */
#profilePipelineRunsSection .pipeline-runs-page-btn {
  display: inline-grid !important;
  place-items: center;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 1px solid var(--runs-accent) !important;
  border-radius: 10px !important;
  background: var(--runs-accent) !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(40, 86, 79, 0.14) !important;
  transform: none !important;
}

#profilePipelineRunsSection .pipeline-runs-page-glyph {
  width: 17px;
  height: 17px;
}

#profilePipelineRunsSection .pipeline-runs-page-btn:not(:disabled):hover {
  border-color: var(--runs-accent-hover) !important;
  background: var(--runs-accent-hover) !important;
  color: #ffffff !important;
}

#profilePipelineRunsSection .pipeline-runs-page-btn:not(:disabled):active {
  border-color: var(--runs-accent-pressed) !important;
  background: var(--runs-accent-pressed) !important;
  color: #ffffff !important;
}

#profilePipelineRunsSection .pipeline-runs-page-btn:disabled {
  border-color: var(--runs-pagination-disabled-border) !important;
  background: var(--runs-pagination-disabled-bg) !important;
  color: var(--runs-pagination-disabled-icon) !important;
  box-shadow: none !important;
  opacity: 1;
  cursor: not-allowed;
}

.pipeline-runs-page-indicator {
  min-width: 52px;
  padding: 0 8px;
  color: var(--runs-pagination-indicator);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  text-align: center;
  white-space: nowrap;
}

.pipeline-runs-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--runs-border);
  border-radius: 17px;
  background: var(--runs-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.pipeline-runs-table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
}

.pipeline-runs-table th,
.pipeline-runs-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--runs-hairline);
  text-align: left;
  vertical-align: middle;
}

.pipeline-runs-table th {
  color: var(--runs-secondary);
  font-size: 12.5px;
  font-weight: 680;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--runs-head-bg);
  border-bottom: 1px solid var(--runs-border);
}

.pipeline-runs-table .pipeline-runs-actions-head {
  text-align: right;
}

.pipeline-runs-table tbody tr {
  background: var(--runs-surface);
}

.pipeline-runs-table tbody tr:hover {
  background: var(--runs-accent-soft);
}

.pipeline-runs-table tr:last-child td {
  border-bottom: 0;
}

.pipeline-run-cell-run {
  min-width: 210px;
}

.pipeline-run-date {
  color: var(--runs-text);
  font-size: 14px;
  font-weight: 660;
  white-space: nowrap;
}

.pipeline-run-id {
  margin-top: 3px;
  max-width: 230px;
  overflow: hidden;
  color: var(--runs-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-run-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--runs-border);
  border-radius: 999px;
  background: var(--runs-surface-alt);
  color: var(--runs-secondary);
  font-size: 12.5px;
  font-weight: 620;
  white-space: nowrap;
}

.pipeline-run-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.pipeline-run-status.is-success {
  border-color: var(--runs-accent-border);
  background: var(--runs-accent-soft);
  color: var(--runs-status-text);
}

.pipeline-run-status.is-success .pipeline-run-status-dot {
  background: var(--runs-status-dot);
}

.pipeline-run-status.is-danger {
  border-color: #e8c4bf;
  background: #fdf1ef;
  color: #8f4034;
}

.pipeline-run-status.is-danger .pipeline-run-status-dot {
  background: #cf6a62;
}

.pipeline-run-status.is-running {
  border-color: #e9d5a6;
  background: #fdf7e9;
  color: #7d5c17;
}

.pipeline-run-status.is-running .pipeline-run-status-dot {
  background: #e5b84e;
}

.pipeline-run-status.is-muted {
  border-color: var(--runs-border);
  background: var(--runs-surface-alt);
  color: var(--runs-muted);
}

html:not([data-theme="light"]) .pipeline-run-status.is-danger,
html[data-theme="dark"] .pipeline-run-status.is-danger {
  border-color: rgba(207, 106, 98, 0.34);
  background: rgba(207, 106, 98, 0.14);
  color: #e0a79f;
}

html:not([data-theme="light"]) .pipeline-run-status.is-running,
html[data-theme="dark"] .pipeline-run-status.is-running {
  border-color: rgba(229, 184, 78, 0.34);
  background: rgba(229, 184, 78, 0.13);
  color: #dcc082;
}

.pipeline-run-cell-output {
  min-width: 132px;
}

.pipeline-run-output-primary {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--runs-text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.pipeline-run-output-primary span {
  color: var(--runs-secondary);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0;
}

.pipeline-run-output-secondary {
  margin-top: 2px;
  color: var(--runs-muted);
  font-size: 12.5px;
  font-weight: 540;
  white-space: nowrap;
}

.pipeline-run-cell-flow {
  min-width: 300px;
}

.pipeline-run-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: var(--runs-secondary);
  font-size: 13px;
}

.pipeline-run-flow-step {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.pipeline-run-flow-label {
  color: var(--runs-muted);
  font-size: 12.5px;
  font-weight: 540;
}

.pipeline-run-flow-value {
  color: var(--runs-text);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
}

.pipeline-run-flow-arrow {
  color: var(--runs-accent);
  font-size: 12.5px;
  opacity: 0.72;
}

.pipeline-run-cell-actions {
  width: 1%;
  white-space: nowrap;
}

.pipeline-run-actions-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

/* Quiet neutral icon actions. Hover reveals a restrained eucalyptus (or warm
   gold for agentic review) tint - never a saturated blue/purple fill. */
.pipeline-run-icon-btn {
  --pipeline-run-action-color: var(--runs-secondary);
  --pipeline-run-action-bg: var(--runs-surface);
  --pipeline-run-action-bg-hover: var(--runs-accent-soft);
  --pipeline-run-action-border: var(--runs-border);
  --pipeline-run-action-border-hover: var(--runs-accent-border);
  --pipeline-run-action-color-hover: var(--runs-accent);
  appearance: none;
  width: 37px;
  height: 37px;
  min-width: 37px;
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--pipeline-run-action-border);
  border-radius: 10px;
  background: var(--pipeline-run-action-bg);
  color: var(--pipeline-run-action-color);
  box-shadow: none;
  line-height: 0;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition:
    background var(--app-fast) var(--app-ease),
    border-color var(--app-fast) var(--app-ease),
    color var(--app-fast) var(--app-ease);
}

.pipeline-run-icon-btn-glyph {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.pipeline-run-icon-btn:hover,
.pipeline-run-icon-btn:focus-visible {
  border-color: var(--pipeline-run-action-border-hover);
  background: var(--pipeline-run-action-bg-hover);
  color: var(--pipeline-run-action-color-hover);
  box-shadow: none;
  transform: none;
  z-index: 21;
}

.pipeline-run-icon-btn:focus-visible {
  outline: 3px solid var(--app-focus);
  outline-offset: 2px;
}

.pipeline-run-icon-btn::before,
.pipeline-run-icon-btn::after {
  position: absolute;
  left: 50%;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition:
    opacity var(--app-fast) var(--app-ease),
    transform var(--app-fast) var(--app-ease);
}

.pipeline-run-icon-btn::before {
  content: "";
  top: -10px;
  border: 5px solid transparent;
  border-top-color: rgba(15, 23, 42, 0.94);
}

.pipeline-run-icon-btn::after {
  content: attr(data-tooltip);
  top: -40px;
  min-width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.pipeline-run-icon-btn:hover::before,
.pipeline-run-icon-btn:hover::after,
.pipeline-run-icon-btn:focus-visible::before,
.pipeline-run-icon-btn:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* The responsive wrapper must retain horizontal scrolling. Its scrollport
   clips content above the first body row, so only that row flips the existing
   pseudo-element tooltip below the action. The local z-index keeps it above
   later rows without attempting to escape the clipping ancestor. */
.pipeline-runs-table tbody tr:first-child .pipeline-run-icon-btn::before {
  top: auto;
  bottom: -10px;
  border-top-color: transparent;
  border-bottom-color: rgba(15, 23, 42, 0.94);
  transform: translate(-50%, -6px);
}

.pipeline-runs-table tbody tr:first-child .pipeline-run-icon-btn::after {
  top: calc(100% + 9px);
  transform: translate(-50%, -6px);
}

.pipeline-runs-table tbody tr:first-child .pipeline-run-icon-btn:hover::before,
.pipeline-runs-table tbody tr:first-child .pipeline-run-icon-btn:hover::after,
.pipeline-runs-table tbody tr:first-child .pipeline-run-icon-btn:focus-visible::before,
.pipeline-runs-table tbody tr:first-child .pipeline-run-icon-btn:focus-visible::after {
  transform: translate(-50%, 0);
}

.pipeline-run-agentic-review-btn {
  --pipeline-run-action-bg-hover: #fdf7e9;
  --pipeline-run-action-border-hover: #e9d5a6;
  --pipeline-run-action-color-hover: #a97f22;
}

html:not([data-theme="light"]) .pipeline-run-agentic-review-btn,
html[data-theme="dark"] .pipeline-run-agentic-review-btn {
  --pipeline-run-action-bg-hover: rgba(229, 184, 78, 0.14);
  --pipeline-run-action-border-hover: rgba(229, 184, 78, 0.34);
  --pipeline-run-action-color-hover: #dcc082;
}

/* The re-run action is now an icon button in the Actions group; the old
   full-width filled button styling is intentionally gone. */
.pipeline-run-rerun-btn {
  font-size: 0;
}

.pipeline-runs-empty-cell {
  color: var(--runs-muted);

  text-align: center !important;
}

.pipeline-run-stats-modal-card {
  width: min(900px, calc(100vw - 32px)) !important;
}

/* Re-run confirmation: premium inset modal. Deep eucalyptus primary action;
   re-running is not destructive (the existing run is untouched), so no red
   danger styling and no blue/indigo gradients. */
#pipelineRunRerunModal {
  --rerun-surface: #ffffff;
  --rerun-inset: #f6faf8;
  --rerun-border: #d9e4e0;
  --rerun-hairline: #e8eeeb;
  --rerun-text: #101828;
  --rerun-secondary: #5f6b7a;
  --rerun-muted: #8a949f;
  --rerun-accent: #2f7668;
  --rerun-accent-hover: #265f55;
}

html:not([data-theme="light"]) #pipelineRunRerunModal,
html[data-theme="dark"] #pipelineRunRerunModal {
  --rerun-surface: #141b26;
  --rerun-inset: #18202d;
  --rerun-border: rgba(167, 176, 193, 0.18);
  --rerun-hairline: rgba(167, 176, 193, 0.13);
  --rerun-text: #f2f4f7;
  --rerun-secondary: #a8b2c0;
  --rerun-muted: #8a949f;
  --rerun-accent: #3c8b78;
  --rerun-accent-hover: #4a9e8a;
}

.pipeline-run-rerun-modal-card {
  width: min(560px, calc(100vw - 32px)) !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--rerun-border) !important;
  border-radius: 20px !important;
  background: var(--rerun-surface) !important;
  background-image: none !important;
  color: var(--rerun-text) !important;
  box-shadow: 0 24px 64px rgba(4, 7, 13, 0.26) !important;
}

#pipelineRunRerunModal .modal-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: stretch;
  width: 100%;
  padding: 22px 24px 14px !important;
  text-align: left;
}

#pipelineRunRerunModal .pipeline-run-rerun-heading {
  min-width: 0;
  text-align: left;
}

#pipelineRunRerunModal .modal-header h3 {
  margin: 0;
  color: var(--rerun-text) !important;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-align: left;
}

#pipelineRunRerunModal .pipeline-run-rerun-date {
  margin-top: 3px;
  color: var(--rerun-secondary);
  font-size: 13.5px;
  font-weight: 570;
}

#pipelineRunRerunModal .pipeline-run-rerun-run-id {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--rerun-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

#pipelineRunRerunModal .pipeline-run-rerun-close {
  display: inline-grid !important;
  place-items: center;
  justify-self: end;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--rerun-secondary) !important;
  box-shadow: none !important;
  transform: none !important;
}

#pipelineRunRerunModal .pipeline-run-rerun-close svg {
  width: 19px;
  height: 19px;
}

#pipelineRunRerunModal .pipeline-run-rerun-close:hover {
  border-color: var(--rerun-border) !important;
  background: var(--rerun-inset) !important;
  color: var(--rerun-text) !important;
}

#pipelineRunRerunModal .modal-body {
  padding: 0 24px !important;
}

.pipeline-run-rerun-body {
  display: grid;
  gap: 14px;
}

/* Inset saved-configuration panel. */
.pipeline-run-rerun-panel {
  padding: 16px 18px;
  border: 1px solid var(--rerun-border);
  border-radius: 14px;
  background: var(--rerun-inset);
}

.pipeline-run-rerun-panel h4 {
  margin: 0 0 12px !important;
  color: var(--rerun-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.pipeline-run-rerun-grid {
  display: grid;
  gap: 9px;
}

#pipelineRunRerunModal .pipeline-run-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

#pipelineRunRerunModal .pipeline-run-detail-label {
  margin: 0;
  color: var(--rerun-secondary);
  font-size: 13px;
  font-weight: 560;
  text-transform: none;
  letter-spacing: 0;
}

#pipelineRunRerunModal .pipeline-run-detail-value {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--rerun-text);
  font-size: 13.5px;
  font-weight: 660;
  text-align: right;
}

#pipelineRunRerunModal .pipeline-run-detail-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rerun-muted);
}

#pipelineRunRerunModal .pipeline-run-detail-value.is-yes .pipeline-run-detail-dot {
  background: var(--rerun-accent);
}

.pipeline-run-rerun-note {
  margin: 0;
  color: var(--rerun-secondary);
  font-size: 13px;
  font-weight: 540;
  line-height: 1.5;
}

.pipeline-run-rerun-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  padding: 18px 24px 22px !important;
}

#pipelineRunRerunModal #pipelineRunRerunCancelBtn,
#pipelineRunRerunModal .pipeline-run-rerun-confirm-btn {
  min-height: 40px;
  padding: 0 18px !important;
  border-radius: 11px !important;
  font-size: 14px;
  font-weight: 660;
  letter-spacing: 0;
  transition:
    background var(--app-fast) var(--app-ease),
    border-color var(--app-fast) var(--app-ease),
    color var(--app-fast) var(--app-ease);
  transform: none !important;
}

#pipelineRunRerunModal #pipelineRunRerunCancelBtn {
  border: 1px solid var(--rerun-border) !important;
  background: var(--rerun-surface) !important;
  background-image: none !important;
  color: var(--rerun-secondary) !important;
  box-shadow: none !important;
}

#pipelineRunRerunModal #pipelineRunRerunCancelBtn:not(:disabled):hover {
  border-color: var(--rerun-accent) !important;
  background: var(--rerun-inset) !important;
  color: var(--rerun-text) !important;
}

#pipelineRunRerunModal .pipeline-run-rerun-confirm-btn {
  border: 1px solid var(--rerun-accent) !important;
  background: var(--rerun-accent) !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

#pipelineRunRerunModal .pipeline-run-rerun-confirm-btn:not(:disabled):hover {
  border-color: var(--rerun-accent-hover) !important;
  background: var(--rerun-accent-hover) !important;
  background-image: none !important;
}

.pipeline-run-stats-body {
  display: grid;
  gap: 16px;
}

[data-agentic-review-run-id] {
  padding-right: clamp(18px, 8vw, 132px);
  padding-bottom: clamp(168px, 18vh, 240px);
}

.agentic-review-status-content,
.agentic-workflow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.agentic-review-status-content h2,
.agentic-workflow-header h2,
.agentic-workflow-header h3,
.agentic-workflow-header h4,
.agentic-review-status-content p,
.agentic-workflow-header p {
  margin: 0;
}

.agentic-review-kicker {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agentic-review-run-pills,
.agentic-review-chip-list,
.agentic-review-manifest-agent-pills,
.agentic-review-plan-step-pills,
.agentic-review-dry-run-step-pills,
.read-only-adapter-preflight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.agentic-review-pill,
.agentic-workflow-badge,
.agentic-workflow-verification-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--app-border-2);
  border-radius: var(--app-radius-pill);
  background: var(--app-inset);
  color: var(--app-text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.agentic-review-health-strip,
.agent-trace-counts,
.operator-approval-mock-metrics,
.proposal-only-mutation-plan-metrics,
.dry-run-execution-simulation-metrics,
.explicit-read-only-chain-generator-metrics,
.manual-read-only-adapter-chain-metrics,
.read-only-adapter-preflight-metrics,
.agentic-review-dry-run-metrics,
.agentic-review-plan-metrics,
.agentic-review-manifest-metrics,
.rag-evaluation-metrics,
.agentic-feedback-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.agentic-review-health-strip--primary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.agentic-review-health-strip--secondary .pipeline-run-count-tile,
.agent-trace-debug-details .pipeline-run-count-tile {
  min-height: 78px;
  opacity: 0.82;
}

.agentic-review-secondary-diagnostics,
.agentic-review-optional-diagnostics,
.agent-trace-debug-details,
.agentic-workflow-verification-details,
.agentic-workflow-markdown,
.agent-trace-json-detail {
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-inset);
}

.agentic-review-secondary-diagnostics,
.agentic-review-optional-diagnostics,
.agent-trace-debug-details {
  padding: 8px 12px;
}

.agentic-review-secondary-diagnostics summary,
.agentic-review-optional-diagnostics summary,
.agent-trace-debug-details summary,
.agentic-workflow-verification-details summary,
.agentic-workflow-markdown summary,
.agent-trace-json-detail summary {
  cursor: pointer;
  color: var(--app-text);
  font-weight: 900;
}

.agentic-review-optional-diagnostics-summary {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 750;
}

.agentic-review-secondary-diagnostics:not([open]),
.agentic-review-optional-diagnostics:not([open]),
.agent-trace-debug-details:not([open]),
.agentic-workflow-markdown:not([open]),
.agent-trace-json-detail:not([open]) {
  max-height: 48px;
  overflow: hidden;
}

.agentic-review-optional-diagnostics[open] {
  display: grid;
  gap: 12px;
}

.agentic-workflow-markdown-summary {
  margin-top: 10px;
}

.agentic-workflow-markdown pre,
.agent-trace-json-detail pre {
  max-height: min(46vh, 520px);
  overflow: auto;
}

.agentic-workflow-verification-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.agentic-workflow-verification-sections > div,
.agentic-review-section-counts,
.agent-trace-step,
.agent-trace-run,
.agentic-feedback-counts > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-inset);
  overflow-wrap: anywhere;
}

.agentic-feedback-actions,
.agentic-approval-button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agentic-feedback-actions {
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-inset);
}

.agentic-approval-button-group {
  width: 100%;
}

.agentic-approval-button-group--actions {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--app-border);
}

.agentic-approval-button-group--observability {
  padding-top: 2px;
}

.agentic-feedback-action {
  max-width: 100%;
  min-height: 40px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.agentic-feedback-status {
  flex: 1 1 240px;
  min-width: min(240px, 100%);
  color: var(--app-muted);
  overflow-wrap: anywhere;
}

.three-core-approval-preview-readback {
  border-color: color-mix(in srgb, var(--app-primary) 34%, var(--app-border));
}

.three-core-approval-preview-readback__metrics {
  margin-top: 12px;
}

.manual-review-readiness-readback {
  border-color: color-mix(in srgb, var(--app-primary) 38%, var(--app-border));
}

.manual-review-readiness-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-review-readiness-readback__safety-labels span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--app-primary) 30%, var(--app-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-primary) 10%, transparent);
  color: var(--app-text-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.manual-review-readiness-readback__metrics {
  margin-top: 12px;
}

.core-agent-evidence-materialization-readback {
  border-color: color-mix(in srgb, var(--app-primary) 42%, var(--app-border));
}

.core-agent-evidence-materialization-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.core-agent-evidence-materialization-readback__safety-labels span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--app-primary) 32%, var(--app-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-primary) 12%, transparent);
  color: var(--app-text-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.core-agent-evidence-materialization-readback__metrics {
  margin-top: 12px;
}

.core-agent-evidence-materialization-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-primary) 8%);
  color: var(--app-text-2);
}

.tailoring-agent-opportunity-readback {
  border-color: color-mix(in srgb, var(--app-primary) 46%, var(--app-border));
}

.tailoring-agent-opportunity-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tailoring-agent-opportunity-readback__safety-labels span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--app-primary) 34%, var(--app-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-primary) 14%, transparent);
  color: var(--app-text-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.tailoring-agent-opportunity-readback__metrics,
.tailoring-agent-opportunity-readback__items {
  margin-top: 12px;
}

.tailoring-agent-opportunity-readback__items {
  display: grid;
  gap: 10px;
}

.tailoring-agent-opportunity-readback__item,
.tailoring-agent-opportunity-readback__boundary {
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-primary) 8%);
}

.tailoring-agent-opportunity-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--app-text-2);
}

.generate-ai-tailoring-action-boundary-readback {
  border-color: color-mix(in srgb, var(--app-primary) 50%, var(--app-border));
}

.generate-ai-tailoring-action-boundary-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.generate-ai-tailoring-action-boundary-readback__safety-labels span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--app-primary) 36%, var(--app-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-primary) 16%, transparent);
  color: var(--app-text-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.generate-ai-tailoring-action-boundary-readback__metrics {
  margin-top: 12px;
}

.generate-ai-tailoring-action-boundary-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-primary) 8%);
  color: var(--app-text-2);
}

.manual-generate-ai-tailoring-preview-readback {
  border-color: color-mix(in srgb, var(--app-primary) 54%, var(--app-border));
}

.manual-generate-ai-tailoring-preview-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-readback__safety-labels span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--app-primary) 38%, var(--app-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-primary) 18%, transparent);
  color: var(--app-text-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.manual-generate-ai-tailoring-preview-readback__metrics {
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-primary) 8%);
  color: var(--app-text-2);
}

.manual-generate-ai-tailoring-preview-request-packet-readback {
  border-color: color-mix(in srgb, var(--app-violet) 54%, var(--app-border));
}

.manual-generate-ai-tailoring-preview-request-packet-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-request-packet-readback__safety-labels span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--app-violet) 38%, var(--app-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-violet) 18%, transparent);
  color: var(--app-text-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.manual-generate-ai-tailoring-preview-request-packet-readback__metrics {
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-request-packet-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-violet) 8%);
  color: var(--app-text-2);
}

.manual-generate-ai-tailoring-preview-dispatch-boundary-readback {
  border-color: color-mix(in srgb, var(--app-warning) 54%, var(--app-border));
}

.manual-generate-ai-tailoring-preview-dispatch-boundary-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-dispatch-boundary-readback__safety-labels span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--app-warning) 38%, var(--app-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-warning) 18%, transparent);
  color: var(--app-text-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.manual-generate-ai-tailoring-preview-dispatch-boundary-readback__metrics {
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-dispatch-boundary-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-warning) 8%);
  color: var(--app-text-2);
}

.manual-generate-ai-tailoring-preview-provider-call-boundary-readback {
  border-left: 4px solid var(--app-warning);
}

.manual-generate-ai-tailoring-preview-provider-call-boundary-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-call-boundary-readback__safety-labels span {
  border: 1px solid var(--app-border);
  border-radius: 999px;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--app-surface) 88%, var(--app-warning) 12%);
  color: var(--app-text-2);
  font-size: 0.82rem;
}

.manual-generate-ai-tailoring-preview-provider-call-boundary-readback__metrics {
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-call-boundary-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-warning) 8%);
  color: var(--app-text-2);
}

.manual-generate-ai-tailoring-preview-provider-call-dry-run-packet-readback {
  border-left: 4px solid var(--app-warning);
}

.manual-generate-ai-tailoring-preview-provider-call-dry-run-packet-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-call-dry-run-packet-readback__safety-labels span {
  border: 1px solid var(--app-border);
  border-radius: 999px;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--app-surface) 88%, var(--app-warning) 12%);
  color: var(--app-text-2);
  font-size: 0.82rem;
}

.manual-generate-ai-tailoring-preview-provider-call-dry-run-packet-readback__metrics {
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-call-dry-run-packet-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-warning) 8%);
  color: var(--app-text-2);
}

.manual-generate-ai-tailoring-preview-provider-response-validation-readback {
  border-left: 4px solid var(--app-warning);
}

.manual-generate-ai-tailoring-preview-provider-response-validation-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-response-validation-readback__safety-labels span {
  border: 1px solid var(--app-border);
  border-radius: 999px;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--app-surface) 88%, var(--app-warning) 12%);
  color: var(--app-text-2);
  font-size: 0.82rem;
}

.manual-generate-ai-tailoring-preview-provider-response-validation-readback__metrics {
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-response-validation-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-warning) 8%);
  color: var(--app-text-2);
}

.manual-generate-ai-tailoring-preview-provider-response-normalization-readback {
  border-left: 4px solid var(--app-warning);
}

.manual-generate-ai-tailoring-preview-provider-response-normalization-readback__safety-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-response-normalization-readback__safety-labels span {
  border: 1px solid var(--app-border);
  border-radius: 999px;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--app-surface) 88%, var(--app-warning) 12%);
  color: var(--app-text-2);
  font-size: 0.82rem;
}

.manual-generate-ai-tailoring-preview-provider-response-normalization-readback__metrics {
  margin-top: 12px;
}

.manual-generate-ai-tailoring-preview-provider-response-normalization-readback__boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-surface) 92%, var(--app-warning) 8%);
  color: var(--app-text-2);
}

@media (max-width: 720px) {
  [data-agentic-review-run-id] {
    padding-right: 18px;
    padding-bottom: 232px;
  }

  .agentic-review-status-content,
  .agentic-workflow-header {
    display: grid;
  }

  .agentic-feedback-action {
    flex: 1 1 100%;
  }
}

.pipeline-run-rerun-confirm-btn:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  box-shadow: none;
}

.pipeline-run-detail-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: var(--app-surface-2);
}

.pipeline-run-detail-panel h4 {
  margin: 0;
  color: var(--app-text);
  font-size: 16px;
  font-weight: 900;
}

.pipeline-run-detail-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.34fr) minmax(0, 0.66fr);
  gap: 12px;
}

.pipeline-run-detail-label {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pipeline-run-detail-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--app-text);
  font-weight: 750;
}

.pipeline-run-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.pipeline-run-count-tile {
  display: grid;
  gap: 6px;
  padding: 12px;
  min-height: 96px;
  border: 1px solid var(--app-border-2);
  border-radius: 14px;
  background: var(--app-inset);
  overflow: hidden;
}

.pipeline-run-count-tile span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pipeline-run-count-tile strong {
  color: var(--app-text);
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.pipeline-run-count-tile.is-blue {
  border-color: rgba(96, 165, 250, 0.46);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-cyan {
  border-color: rgba(34, 211, 238, 0.42);
  background: linear-gradient(145deg, rgba(8, 145, 178, 0.2), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-violet,
.pipeline-run-count-tile.is-purple {
  border-color: rgba(167, 139, 250, 0.44);
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.22), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-indigo {
  border-color: rgba(129, 140, 248, 0.44);
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.22), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-emerald,
.pipeline-run-count-tile.is-green,
.pipeline-run-count-tile.is-teal {
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(145deg, rgba(5, 150, 105, 0.2), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-sky {
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(145deg, rgba(2, 132, 199, 0.2), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-amber,
.pipeline-run-count-tile.is-orange {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(145deg, rgba(217, 119, 6, 0.2), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-lime {
  border-color: rgba(163, 230, 53, 0.38);
  background: linear-gradient(145deg, rgba(101, 163, 13, 0.18), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-pink,
.pipeline-run-count-tile.is-rose {
  border-color: rgba(251, 113, 133, 0.42);
  background: linear-gradient(145deg, rgba(190, 18, 60, 0.2), rgba(15, 23, 42, 0.76));
}

.pipeline-run-count-tile.is-slate {
  border-color: rgba(148, 163, 184, 0.38);
  background: linear-gradient(145deg, rgba(71, 85, 105, 0.28), rgba(15, 23, 42, 0.76));
}

.pipeline-run-stage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline-run-stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--app-border-2);
  border-radius: 999px;
  background: var(--app-inset);
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 850;
}

.pipeline-run-stage-chip.is-complete {
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(52, 211, 153, 0.14);
  color: #bbf7d0;
}

html[data-theme="light"] .pipeline-runs-table-wrap,
html[data-theme="light"] .pipeline-runs-table td,
html[data-theme="light"] .pipeline-run-detail-panel {
  background: #ffffff;
}

html[data-theme="light"] .pipeline-runs-table th {
  background: #f1f5f9;
  color: #475569;
}

html[data-theme="light"] .pipeline-run-date,
html[data-theme="light"] .pipeline-run-detail-panel h4,
html[data-theme="light"] .pipeline-run-detail-value,
html[data-theme="light"] .pipeline-run-count-tile strong {
  color: #0f172a;
}

html[data-theme="light"] .pipeline-run-id,
html[data-theme="light"] .pipeline-run-summary-cell,
html[data-theme="light"] .pipeline-run-compact-cell,
html[data-theme="light"] .pipeline-run-detail-label,
html[data-theme="light"] .pipeline-run-count-tile span,
html[data-theme="light"] .pipeline-run-stage-chip {
  color: #475569;
}

/* Light-theme run status: eucalyptus success, soft coral failure, warm gold
   running. The previous blue running pill is intentionally retired. */
html[data-theme="light"] .pipeline-run-status.is-success {
  border-color: #c7e7dc;
  background: #eef8f4;
  color: #27665a;
}

html[data-theme="light"] .pipeline-run-status.is-danger {
  border-color: #e8c4bf;
  background: #fdf1ef;
  color: #8f4034;
}

html[data-theme="light"] .pipeline-run-status.is-running {
  border-color: #e9d5a6;
  background: #fdf7e9;
  color: #7d5c17;
}

html[data-theme="light"] .pipeline-run-count-tile,
html[data-theme="light"] .pipeline-run-stage-chip {
  border-color: #d8e2f0;
  background: #f8fafc;
}

html[data-theme="light"] .pipeline-run-count-tile.is-blue {
  border-color: #93c5fd;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
}

html[data-theme="light"] .pipeline-run-count-tile.is-cyan {
  border-color: #67e8f9;
  background: linear-gradient(145deg, #ecfeff, #cffafe);
}

html[data-theme="light"] .pipeline-run-count-tile.is-violet,
html[data-theme="light"] .pipeline-run-count-tile.is-purple {
  border-color: #c4b5fd;
  background: linear-gradient(145deg, #f5f3ff, #ede9fe);
}

html[data-theme="light"] .pipeline-run-count-tile.is-indigo {
  border-color: #a5b4fc;
  background: linear-gradient(145deg, #eef2ff, #e0e7ff);
}

html[data-theme="light"] .pipeline-run-count-tile.is-emerald,
html[data-theme="light"] .pipeline-run-count-tile.is-green,
html[data-theme="light"] .pipeline-run-count-tile.is-teal {
  border-color: #86efac;
  background: linear-gradient(145deg, #f0fdf4, #dcfce7);
}

html[data-theme="light"] .pipeline-run-count-tile.is-sky {
  border-color: #7dd3fc;
  background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
}

html[data-theme="light"] .pipeline-run-count-tile.is-amber,
html[data-theme="light"] .pipeline-run-count-tile.is-orange {
  border-color: #fcd34d;
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
}

html[data-theme="light"] .pipeline-run-count-tile.is-lime {
  border-color: #bef264;
  background: linear-gradient(145deg, #f7fee7, #ecfccb);
}

html[data-theme="light"] .pipeline-run-count-tile.is-pink,
html[data-theme="light"] .pipeline-run-count-tile.is-rose {
  border-color: #fda4af;
  background: linear-gradient(145deg, #fff1f2, #ffe4e6);
}

html[data-theme="light"] .pipeline-run-count-tile.is-slate {
  border-color: #cbd5e1;
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
}

html[data-theme="light"] .pipeline-run-stage-chip.is-complete {
  border-color: #86efac;
  background: #ecfdf5;
  color: #065f46;
}

@media (max-width: 760px) {
  .pipeline-run-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ui_redesign_v37: Live pipeline modal readability and theme parity. */
.pipeline-modal-card {
  width: min(980px, calc(100vw - 40px)) !important;
}

.pipeline-modal-card .modal-header {
  border-bottom-color: var(--app-border) !important;
}

.pipeline-modal-card .modal-header h3,
.pipeline-option-title,
.pipeline-toggle-name {
  color: var(--app-text) !important;
}

.pipeline-modal-card .control-group label,
.pipeline-inline-helper-label,
.pipeline-toggle-help,
.pipeline-modal-card .control-help {
  color: var(--app-muted) !important;
}

body .ghost-btn.pipeline-bulk-action-btn {
  min-width: 108px !important;
  border-color: var(--pipeline-bulk-border, var(--app-border-2)) !important;
  background: var(--pipeline-bulk-bg, var(--app-surface-2)) !important;
  background-color: var(--pipeline-bulk-bg, var(--app-surface-2)) !important;
  background-image: none !important;
  color: var(--pipeline-bulk-text, var(--app-text)) !important;
  box-shadow: var(--app-shadow-sm) !important;
}

body .ghost-btn.pipeline-bulk-action-btn--select {
  --pipeline-bulk-border: #60a5fa;
  --pipeline-bulk-bg: #1d4ed8;
  --pipeline-bulk-text: #eff6ff;
}

body .ghost-btn.pipeline-bulk-action-btn--clear {
  --pipeline-bulk-border: #fb7185;
  --pipeline-bulk-bg: #7f1d1d;
  --pipeline-bulk-text: #fff1f2;
}

html[data-theme="light"] body .ghost-btn.pipeline-bulk-action-btn--select {
  --pipeline-bulk-border: #93c5fd;
  --pipeline-bulk-bg: #dbeafe;
  --pipeline-bulk-text: #1e40af;
}

html[data-theme="light"] body .ghost-btn.pipeline-bulk-action-btn--clear {
  --pipeline-bulk-border: #fecaca;
  --pipeline-bulk-bg: #fee2e2;
  --pipeline-bulk-text: #991b1b;
}

.pipeline-form-grid,
.pipeline-toggle-group,
.pipeline-toggle-item {
  border-color: var(--app-border-2) !important;
  background: var(--app-surface-2) !important;
}

.pipeline-launch-modal .pipeline-form-grid {
  border: 0 !important;
  background: transparent !important;
}

.pipeline-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.pipeline-support-row {
  margin-top: 14px !important;
}

.pipeline-toggle-grid {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)) !important;
}

.pipeline-toggle-item {
  min-height: 104px;
  gap: 18px !important;
}

.pipeline-toggle-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.pipeline-toggle-name {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.pipeline-toggle-item .binary-toggle {
  flex: 0 0 auto;
}

.pipeline-overlay-success,
.pipeline-overlay-failure {
  color: var(--app-text) !important;
}

.pipeline-success-title,
.pipeline-overlay-failure .pipeline-success-title {
  color: var(--app-text) !important;
}

.pipeline-success-text,
.pipeline-success-summary-text {
  color: var(--app-text-2) !important;
}

.pipeline-success-summary {
  border-color: var(--app-border-2) !important;
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
}

.pipeline-overlay-failure .pipeline-success-summary,
#pipelineFailureSummary,
#pipelineFailureReason {
  color: var(--app-text) !important;
}

.pipeline-overlay-failure .pipeline-success-visual {
  background: color-mix(in srgb, var(--app-danger) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--app-danger) 34%, var(--app-border)) !important;
}

.pipeline-overlay-failure .pipeline-success-static-check {
  color: var(--app-danger) !important;
}

#pipelineSuccessOkBtn,
#pipelineFailureOkBtn {
  min-width: 120px;
}

html[data-theme="light"] .pipeline-overlay-failure .pipeline-success-static-check {
  text-shadow: none !important;
}

.pipeline-confirm-card {
  width: min(1120px, calc(100vw - 40px)) !important;
}

.pipeline-confirm-hero,
.pipeline-confirm-panel,
.pipeline-confirm-stat,
.pipeline-confirm-flag {
  border-color: var(--app-border-2) !important;
  background: var(--app-surface-2) !important;
}

.pipeline-confirm-hero-title,
.pipeline-confirm-panel-title,
.pipeline-confirm-stat-value,
.pipeline-confirm-meta-value,
.pipeline-confirm-flag-label {
  color: var(--app-text) !important;
  opacity: 1 !important;
}

.pipeline-confirm-hero-copy,
.pipeline-confirm-stat-label,
.pipeline-confirm-meta-label {
  color: var(--app-muted) !important;
  opacity: 1 !important;
}

.pipeline-confirm-hero-badge,
.pipeline-confirm-chip {
  border-color: color-mix(in srgb, var(--app-primary) 42%, var(--app-border)) !important;
  background: color-mix(in srgb, var(--app-primary) 12%, var(--app-surface-2)) !important;
  color: var(--app-primary-strong) !important;
  opacity: 1 !important;
}

.pipeline-confirm-grid {
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr) !important;
}

.pipeline-confirm-actions {
  border-top-color: var(--app-border) !important;
  background: var(--app-surface) !important;
}

#backToPipelineConfigBtn {
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
}

#confirmPipelineRunBtn {
  border-color: var(--app-action-primary) !important;
  background: var(--app-action-primary) !important;
  background-image: none !important;
  color: var(--app-action-text) !important;
}

html[data-theme="light"] .pipeline-confirm-hero,
html[data-theme="light"] .pipeline-confirm-panel,
html[data-theme="light"] .pipeline-confirm-stat,
html[data-theme="light"] .pipeline-confirm-flag {
  background: #ffffff !important;
}

html[data-theme="light"] .pipeline-confirm-flag.is-enabled .pipeline-confirm-flag-pill {
  background: #ecfdf5 !important;
  border-color: #86efac !important;
  color: #065f46 !important;
}

html[data-theme="light"] .pipeline-confirm-flag.is-disabled .pipeline-confirm-flag-pill {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #7f1d1d !important;
}

/* ui_redesign_v38: crisp light-mode pipeline review surface. */
html[data-theme="light"] #pipelineConfirmModal.modal-backdrop {
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(8px) !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-card {
  border: 1px solid #d6deea !important;
  background: #ffffff !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22) !important;
}

html[data-theme="light"] #pipelineConfirmModal .modal-header {
  border-bottom: 1px solid #dbe3ef !important;
  background: #ffffff !important;
}

html[data-theme="light"] #pipelineConfirmModal .modal-header h3 {
  color: #0f172a !important;
}

html[data-theme="light"] #pipelineConfirmModal .modal-header .subtext {
  color: #475569 !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-scroll {
  background: #ffffff !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-hero {
  border: 1px solid #bfdbfe !important;
  background:
    linear-gradient(135deg, #eff6ff 0%, #ffffff 58%, #f8fafc 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-hero-badge {
  border: 1px solid #93c5fd !important;
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-hero-title {
  color: #111827 !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-hero-copy {
  color: #334155 !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-stat {
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-stat-label,
html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-meta-label {
  color: #475569 !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-stat-value,
html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-meta-value {
  color: #0f172a !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-panel {
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-panel-title {
  color: #1e293b !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-chip {
  border: 1px solid #bfdbfe !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-panel--flags {
  background: #f8fafc !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-flag {
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-flag-label {
  color: #111827 !important;
}

html[data-theme="light"] #pipelineConfirmModal .pipeline-confirm-actions {
  border-top: 1px solid #dbe3ef !important;
  background: #ffffff !important;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] #pipelineConfirmModal #backToPipelineConfigBtn {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

html[data-theme="light"] #pipelineConfirmModal #confirmPipelineRunBtn {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22) !important;
}

/* ui_redesign_v39: make live pipeline loading chips readable in dark mode. */
html[data-theme="dark"] .page-loading-card {
  background: #111936 !important;
  border-color: rgba(124, 156, 255, 0.34) !important;
}

html[data-theme="dark"] .page-loading-title {
  color: #f8fbff !important;
}

html[data-theme="dark"] .page-loading-text {
  color: #c7d2ea !important;
}

html[data-theme="dark"] .pipeline-loading-meta {
  color: #e6edff !important;
}

html[data-theme="dark"] .pipeline-count-chip {
  border-color: rgba(148, 163, 184, 0.42) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #eef4ff !important;
}

html[data-theme="dark"] .pipeline-step {
  border-color: rgba(148, 163, 184, 0.36) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #bac7df !important;
}

html[data-theme="dark"] .pipeline-step--current {
  border-color: rgba(124, 156, 255, 0.72) !important;
  background: rgba(124, 156, 255, 0.2) !important;
  color: #f3f7ff !important;
}

html[data-theme="dark"] .pipeline-step--complete {
  border-color: rgba(52, 211, 153, 0.58) !important;
  background: rgba(20, 184, 166, 0.18) !important;
  color: #dcfce7 !important;
}

html[data-theme="dark"] .pipeline-step--failed {
  border-color: rgba(251, 113, 133, 0.58) !important;
  background: rgba(190, 18, 60, 0.22) !important;
  color: #ffe4e6 !important;
}

html[data-theme="dark"] .pipeline-step-marker {
  color: currentColor !important;
}

/* ui_redesign_v40: light-mode pipeline overlays should not inherit the dark modal shell. */
html[data-theme="light"] .page-loading-overlay {
  background: rgba(15, 23, 42, 0.36) !important;
  backdrop-filter: blur(8px) !important;
}

html[data-theme="light"] .page-loading-card {
  background: #ffffff !important;
  border: 1px solid #d8e2f0 !important;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22) !important;
}

html[data-theme="light"] .page-loading-title,
html[data-theme="light"] .pipeline-success-title {
  color: #0f172a !important;
}

html[data-theme="light"] .page-loading-text,
html[data-theme="light"] .pipeline-success-text,
html[data-theme="light"] .pipeline-loading-meta {
  color: #475569 !important;
}

html[data-theme="light"] .pipeline-count-chip {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] .pipeline-count-empty {
  color: #64748b !important;
}

html[data-theme="light"] .pipeline-step {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #475569 !important;
}

html[data-theme="light"] .pipeline-step--current {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .pipeline-step--complete {
  border-color: #86efac !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
}

html[data-theme="light"] .pipeline-step--failed {
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

html[data-theme="light"] .pipeline-success-visual {
  border-color: #bbf7d0 !important;
  background: radial-gradient(circle at center, #dcfce7 0%, #f0fdf4 54%, transparent 74%) !important;
  box-shadow: inset 0 0 38px rgba(34, 197, 94, 0.12) !important;
}

html[data-theme="light"] .pipeline-success-static-check {
  color: #059669 !important;
  text-shadow: none !important;
}

html[data-theme="light"] .pipeline-overlay-failure .pipeline-success-visual {
  border-color: #fecaca !important;
  background: radial-gradient(circle at center, #fee2e2 0%, #fef2f2 54%, transparent 74%) !important;
  box-shadow: inset 0 0 38px rgba(220, 38, 38, 0.1) !important;
}

html[data-theme="light"] .pipeline-overlay-failure .pipeline-success-static-check,
html[data-theme="light"] .pipeline-overlay-failure .pipeline-success-title {
  color: #b91c1c !important;
  text-shadow: none !important;
}

html[data-theme="light"] .pipeline-success-summary,
html[data-theme="light"] #pipelineFailureReason {
  border: 1px solid #d8e2f0 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] .pipeline-success-summary-text,
html[data-theme="light"] .pipeline-success-summary * {
  color: #0f172a !important;
}

html[data-theme="light"] .pipeline-success-actions {
  background: transparent !important;
}

@media (max-width: 760px) {
  .pipeline-modal-card {
    width: min(100vw - 16px, 980px) !important;
  }

  .pipeline-confirm-card {
    width: min(100vw - 16px, 1120px) !important;
  }

  .pipeline-form-grid,
  .pipeline-toggle-grid,
  .pipeline-confirm-grid,
  .pipeline-confirm-hero-stats,
  .pipeline-confirm-flag-grid {
    grid-template-columns: 1fr !important;
  }

  .pipeline-toggle-item {
    align-items: stretch !important;
  }
}

/* ============================================================================
   Phase 133H — premium responsive application sidebar + shared shell
   Authoritative final layer (loaded last). Reuses the established
   --app-shell-width (268px) / --app-shell-collapsed-width (68px) and existing
   --app-* theme tokens; does not change the width variables or content-offset
   math. Neutralizes the oversized brand card + glowing active bar, introduces
   grouped icon navigation, a compact desktop collapse control, and a decoupled
   mobile Sheet/drawer driven by body.app-shell-mobile-open.
   ============================================================================ */

/* --- Compact brand row (removes the oversized floating logo card) --------- */
.app-shell-brand-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 0 !important;
  height: 60px !important;
  margin: 0 0 12px !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.app-shell-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 2px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.app-shell-brand::before,
.app-shell-brand::after {
  content: none !important;
  display: none !important;
}
.app-shell-brand:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--app-focus) !important;
}
.app-shell-brand-logo {
  display: block !important;
  width: auto !important;
  max-width: 160px !important;
  height: 40px !important;
  object-fit: contain !important;
  object-position: left center !important;
  filter: none !important;
}
html[data-theme="light"] .app-shell-brand {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* --- Shell control buttons: collapse (desktop) + close (mobile) ----------- */
#appShellCollapseBtn.app-shell-collapse-btn,
#appShellCloseBtn.app-shell-close-btn {
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid var(--app-border) !important;
  border-radius: 10px;
  background: var(--app-surface-2) !important;
  background-image: none !important;
  color: var(--app-text-2) !important;
  cursor: pointer;
  transition: background var(--app-fast) var(--app-ease),
    border-color var(--app-fast) var(--app-ease),
    color var(--app-fast) var(--app-ease);
}
#appShellCollapseBtn.app-shell-collapse-btn:hover,
#appShellCloseBtn.app-shell-close-btn:hover {
  border-color: var(--app-border-2) !important;
  background: var(--app-surface-3) !important;
  color: var(--app-text) !important;
}
#appShellCollapseBtn.app-shell-collapse-btn:focus-visible,
#appShellCloseBtn.app-shell-close-btn:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--app-action-focus) !important;
}
.app-shell-collapse-icon,
.app-shell-close-icon,
.app-shell-menu-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-shell-collapse-icon svg,
.app-shell-close-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Desktop: collapse control lives in the sidebar; hamburger + close hidden. */
.app-shell-menu-btn {
  display: none !important;
}
.app-shell-close-btn {
  display: none !important;
}
.app-shell-collapse-btn {
  display: inline-flex !important;
}

/* --- Navigation groups + labels ------------------------------------------ */
.app-shell-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 4px 0 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
.app-shell-nav-group {
  display: grid !important;
  gap: 4px !important;
}
.app-shell-nav-group + .app-shell-nav-group {
  margin-top: 14px !important;
}
.app-shell-nav-group-label {
  padding: 0 12px 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--app-muted) !important;
}

/* --- Navigation items: restrained, icon-aligned -------------------------- */
.app-shell-nav-link {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  color: var(--app-muted) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background var(--app-fast) var(--app-ease),
    border-color var(--app-fast) var(--app-ease),
    color var(--app-fast) var(--app-ease);
}
.app-shell-nav-link:hover {
  transform: none !important;
  border-color: var(--app-action-border) !important;
  background: var(--app-action-soft-hover) !important;
  color: var(--app-text) !important;
}
.app-shell-nav-link:focus-visible {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 3px var(--app-action-focus) !important;
}
.app-shell-nav-link.active,
.app-shell-nav-link[aria-current="page"] {
  border-color: var(--app-action-border) !important;
  background: var(--app-action-soft) !important;
  background-image: none !important;
  color: var(--app-action-strong) !important;
  transform: none !important;
  box-shadow: inset 3px 0 0 var(--app-action-primary) !important;
}
.app-shell-nav-link.active::before,
.app-shell-nav-link[aria-current="page"]::before,
.app-shell-nav-link.active::after,
.app-shell-nav-link[aria-current="page"]::after {
  content: none !important;
  display: none !important;
}
.app-shell-nav-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  min-width: 22px !important;
  flex: 0 0 22px !important;
  color: inherit !important;
}
.app-shell-nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}
.app-shell-nav-link.active .app-shell-nav-icon,
.app-shell-nav-link[aria-current="page"] .app-shell-nav-icon {
  color: var(--app-action-strong) !important;
}
.app-shell-nav-label {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: inherit !important;
}

/* Light-theme restrained active state (overrides earlier light gradient). */
html[data-theme="light"] .app-shell-nav-link.active,
html[data-theme="light"] .app-shell-nav-link[aria-current="page"] {
  border-color: var(--app-action-border) !important;
  background: var(--app-action-soft) !important;
  background-image: none !important;
  color: var(--app-action-strong) !important;
  box-shadow: inset 3px 0 0 var(--app-action-primary) !important;
}
html[data-theme="light"] .app-shell-nav-link.active .app-shell-nav-icon,
html[data-theme="light"] .app-shell-nav-link[aria-current="page"] .app-shell-nav-icon {
  color: var(--app-action-strong) !important;
}

/* --- Collapsed desktop rail: icons only, labels/group titles hidden ------ */
body.app-shell-collapsed .app-shell-brand-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 8px !important;
  padding: 4px 0 10px !important;
  border-bottom: 0 !important;
}
body.app-shell-collapsed #appShellCollapseBtn.app-shell-collapse-btn {
  order: -1;
  width: 40px;
  height: 40px;
  min-width: 40px;
  flex: 0 0 40px;
  border-color: var(--app-action-border) !important;
  background: var(--app-action-soft) !important;
  background-image: none !important;
  color: var(--app-action-strong) !important;
}
body.app-shell-collapsed #appShellCollapseBtn.app-shell-collapse-btn:hover {
  border-color: var(--app-action-primary) !important;
  background: var(--app-action-soft-hover) !important;
  color: var(--app-action-strong) !important;
}
body.app-shell-collapsed .app-shell-collapse-icon svg {
  width: 20px;
  height: 20px;
}
body.app-shell-collapsed .app-shell-brand {
  display: inline-flex !important;
  justify-content: center !important;
  padding: 0 !important;
}
body.app-shell-collapsed .app-shell-brand-logo {
  height: 32px !important;
  max-width: 32px !important;
  object-position: center !important;
}
body.app-shell-collapsed .app-shell-nav {
  align-items: stretch !important;
  padding-top: 4px !important;
}
body.app-shell-collapsed .app-shell-nav-group + .app-shell-nav-group {
  margin-top: 10px !important;
}
body.app-shell-collapsed .app-shell-nav-group-label {
  display: none !important;
}
body.app-shell-collapsed .app-shell-nav-link {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  margin: 0 auto !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0 !important;
}
body.app-shell-collapsed .app-shell-nav-label {
  display: none !important;
}
body.app-shell-collapsed .app-shell-nav-icon {
  width: auto !important;
  min-width: 0 !important;
  flex: none !important;
}

/* --- Mobile menu trigger (compact, no glow) ------------------------------ */
.app-shell-menu-btn-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* --- Mobile overlay ------------------------------------------------------- */
.app-shell-overlay {
  position: fixed;
  inset: 0;
  z-index: 990;
  border: 0;
  background: rgba(4, 8, 18, 0.55);
  backdrop-filter: blur(2px);
}
.app-shell-overlay[hidden] {
  display: none;
}
body.app-shell-mobile-open {
  overflow: hidden !important;
}

@media (min-width: 981px) {
  .app-shell-overlay {
    display: none !important;
  }
  body.app-shell-mobile-open {
    overflow: visible !important;
  }
}

/* --- Mobile Sheet / drawer (< 980px) ------------------------------------- */
@media (max-width: 980px) {
  .app-shell-menu-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    left: 14px !important;
    right: auto !important;
    top: 16px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 1px solid var(--app-border) !important;
    border-radius: 12px !important;
    background: var(--app-surface-2) !important;
    color: var(--app-text) !important;
    box-shadow: var(--app-shadow-sm) !important;
    backdrop-filter: none !important;
  }
  body:not(.app-shell-collapsed) .app-shell-menu-btn,
  body.app-shell-collapsed .app-shell-menu-btn {
    left: 14px !important;
    top: 16px !important;
  }
  .app-shell-menu-btn:hover,
  .app-shell-menu-btn:focus-visible {
    border-color: var(--app-border-2) !important;
    background: var(--app-surface-2) !important;
    box-shadow: 0 0 0 3px var(--app-focus) !important;
    outline: none !important;
  }
  .app-shell-collapse-btn {
    display: none !important;
  }
  .app-shell-close-btn {
    display: inline-flex !important;
  }

  .app-shell,
  body:not(.app-shell-collapsed) .app-shell,
  body.app-shell-collapsed .app-shell {
    width: min(84vw, 320px) !important;
    padding: 16px 14px !important;
    transform: translateX(-100%);
    transition: transform var(--app-normal, 200ms) var(--app-ease);
    z-index: 1000 !important;
  }
  body.app-shell-mobile-open .app-shell,
  body.app-shell-mobile-open:not(.app-shell-collapsed) .app-shell,
  body.app-shell-mobile-open.app-shell-collapsed .app-shell {
    transform: translateX(0) !important;
  }

  /* In the mobile drawer, always present the full expanded navigation even
     when the desktop collapsed preference is active. */
  body.app-shell-collapsed .app-shell-brand-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    height: 60px !important;
    padding: 0 6px !important;
    margin: 0 0 12px !important;
    border-bottom: 1px solid var(--app-border) !important;
  }
  body.app-shell-collapsed .app-shell-brand {
    justify-content: flex-start !important;
  }
  body.app-shell-collapsed .app-shell-brand-logo {
    height: 38px !important;
    max-width: 150px !important;
    object-position: left center !important;
  }
  body.app-shell-collapsed .app-shell-nav {
    align-items: stretch !important;
    padding-top: 4px !important;
  }
  body.app-shell-collapsed .app-shell-nav-group-label {
    display: block !important;
  }
  body.app-shell-collapsed .app-shell-nav-link {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    padding: 0 12px !important;
  }
  body.app-shell-collapsed .app-shell-nav-label {
    display: block !important;
  }
  body.app-shell-collapsed .app-shell-nav-icon {
    width: 22px !important;
    min-width: 22px !important;
    flex: 0 0 22px !important;
  }

  .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page),
  body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) {
    margin-left: 0 !important;
  }
}

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .app-shell-overlay,
  .app-shell-nav-link,
  .app-shell-collapse-btn,
  .app-shell-close-btn,
  .app-shell-menu-btn {
    transition: none !important;
  }
}

/* === Item 2 Phase 3: Shared page header foundation =======================
   One class contract for the primary authenticated surfaces (Overview,
   Planning, Decisions, Applications, Pipeline, Scheduler Health, Advanced
   Diagnostics). Placed after the legacy .page-header/global h1 rules above
   so the canonical migrated-page classes own the final cascade. Selectors
   are deliberately over-qualified (3-4 classes) to beat the highest-
   specificity legacy title/description rules found in this file
   (body .page > .page-header h1 / p, specificity 0,0,2,2) purely on class
   count, without editing those legacy rules — non-migrated pages (Scan
   Workspace, Tailoring Workspace, Preferences, onboarding) are unaffected.
   This replaces the former per-page Scheduler Health / Advanced Diagnostics
   h1 overrides above, which are now redundant once both pages carry the
   shared title class. */

.app-page-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
}

/* Overview and Planning still carry the legacy .page-header class. Mirror
   the highest-specificity legacy container selectors (adding .app-page-header
   alongside .page-header) so the two-row stack wins instead of the old
   row layout + calculated right padding reserved for the global toolbar. */
body .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .app-page-header.page-header,
body.app-shell-collapsed .app-shell ~ .page:not(.preferences-workflow):not(.preferences-page) > .app-page-header.page-header,
body .page > .app-page-header.page-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  text-align: left !important;
}

.app-page-header__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app-page-header__main--with-icon { flex-direction: row; align-items: flex-start; gap: 14px; }
.app-page-header__copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.app-page-header .app-page-header__eyebrow {
  margin: 0 0 4px;
  color: var(--app-primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-page-header__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.page .app-page-header .app-page-header__title-row .app-page-header__title {
  margin: 0;
  color: var(--app-text);
  font-size: clamp(30px, 2.5vw, 36px) !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.02em !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 1024px) {
  .page .app-page-header .app-page-header__title-row .app-page-header__title {
    font-size: 34px !important;
  }
}

@media (max-width: 680px) {
  .page .app-page-header .app-page-header__title-row .app-page-header__title {
    font-size: 30px !important;
  }
}

.page .app-page-header .app-page-header__main .app-page-header__description,
.page .app-page-header .app-page-header__copy .app-page-header__description {
  margin: 6px 0 0 !important;
  max-width: 760px;
  color: var(--app-muted);
  font-size: 14px !important;
  line-height: 1.5 !important;
  white-space: normal !important;
}

.app-page-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}

@media (max-width: 680px) {
  .app-page-header__actions { justify-content: flex-start; }
}

.app-page-header__badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Item 2 Phase 4: Scan Workspace carries an older, higher-specificity title
   rule in scan_workspace_review.css
   (body .scan-workspace-page.page > .scan-workspace-header-shell.scan-
   workspace-header-shell--minimal .scan-workspace-header-copy h1, specificity
   0,0,5,2) that the base shared-title selector above (0,0,3,0) cannot beat.
   This selector reuses the identical shared class names and identical shared
   values (no page-specific size) with enough additional specificity
   (0,0,6,1) to win without touching scan_workspace_review.css. Tailoring
   Workspace has no comparable competing rule, so the base selector already
   applies there unassisted. */
body .scan-workspace-page.page > .app-page-header.scan-workspace-header-shell .app-page-header__title-row .app-page-header__title {
  font-size: clamp(30px, 2.5vw, 36px) !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.02em !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 1024px) {
  body .scan-workspace-page.page > .app-page-header.scan-workspace-header-shell .app-page-header__title-row .app-page-header__title {
    font-size: 34px !important;
  }
}

@media (max-width: 680px) {
  body .scan-workspace-page.page > .app-page-header.scan-workspace-header-shell .app-page-header__title-row .app-page-header__title {
    font-size: 30px !important;
  }
}

/* Scheduler diagnostics close fill authority r1 */

body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"] {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 20 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 48px !important;
  min-width: 48px !important;
  height: 44px !important;
  min-height: 44px !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 14px !important;
  background-image: none !important;
  color: #ffffff !important;
  transform: none !important;
}

body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  > .modal-header {
  padding-right: 108px !important;
}

/* Light theme: unmistakable solid blue fill. */
html[data-theme="light"]
  body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"] {
  border: 1px solid #1d4ed8 !important;
  background: #2563eb !important;
  background-color: #2563eb !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32) !important;
}

html[data-theme="light"]
  body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"]:hover {
  border-color: #1e3a8a !important;
  background: #1d4ed8 !important;
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Dark theme: unmistakable solid violet fill. */
html[data-theme="dark"]
  body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"],
html:not([data-theme="light"])
  body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"] {
  border: 1px solid #8b5cf6 !important;
  background: #6d28d9 !important;
  background-color: #6d28d9 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(76, 29, 149, 0.48) !important;
}

html[data-theme="dark"]
  body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"]:hover,
html:not([data-theme="light"])
  body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"]:hover {
  border-color: #c4b5fd !important;
  background: #7c3aed !important;
  background-color: #7c3aed !important;
  color: #ffffff !important;
}

body
  #schedulerHealthDashboardRoot
  .scheduler-diagnostics-modal-card
  button[aria-label="Close diagnostics"]:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.58) !important;
  outline-offset: 3px !important;
}

/* Item 2E: owner-scoped, preview-only provider action in Agentic Review. */
.manual-provider-preview-action-cell {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

.manual-provider-preview-action,
.manual-provider-preview-confirm-btn {
  width: fit-content;
  border: 1px solid var(--app-action-primary);
  border-radius: 11px;
  padding: 9px 13px;
  color: #fff;
  background: var(--app-action-primary);
  background-image: none;
  font-weight: 850;
}

.manual-provider-preview-action:disabled {
  border-color: var(--app-border);
  color: var(--app-muted);
  background: var(--app-surface-2);
  cursor: not-allowed;
  opacity: 1;
}

.manual-provider-preview-readiness {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.35;
}

.manual-provider-preview-readiness.is-eligible { color: var(--app-success); }
.manual-provider-preview-readiness.is-blocked { color: var(--app-warning); }

.manual-provider-preview-row > td {
  padding: 0 18px 18px !important;
  border-top: 0 !important;
}

.manual-provider-preview-result {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(99, 102, 241, 0.34);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(109, 40, 217, 0.08));
}

.manual-provider-preview-result.is-error {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.07);
}

.manual-provider-preview-result p,
.manual-provider-preview-result h3,
.manual-provider-preview-result h4 { margin: 0; }

.manual-provider-preview-result__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.manual-provider-preview-result__header > div { display: grid; gap: 8px; }

.manual-provider-preview-provider {
  color: var(--app-muted);
  font-size: 12px;
}

.manual-provider-preview-suggestions { display: grid; gap: 12px; }

.manual-provider-preview-suggestion {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface);
}

.manual-provider-preview-text { font-weight: 750; line-height: 1.55; }

.manual-provider-preview-suggestion dl { display: grid; gap: 9px; margin: 0; }
.manual-provider-preview-suggestion dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.manual-provider-preview-suggestion dt { color: var(--app-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.manual-provider-preview-suggestion dd { margin: 0; }

.manual-provider-preview-modal-card { width: min(560px, 100%); }
.manual-provider-preview-modal-card .modal-body p { margin: 0; }
.manual-provider-preview-modal-card .modal-actions { justify-content: flex-end; }

.manual-provider-preview-confirmation-note {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
}

@media (max-width: 680px) {
  .manual-provider-preview-suggestion dl > div { grid-template-columns: 1fr; gap: 4px; }
  .manual-provider-preview-modal-card .modal-actions > button { flex: 1 1 100%; }
}

/* Item 7B: final owner for the shared account popover and attached desktop toolbar.
   The narrow !important overrides are required because this stylesheet retains
   historical shell layers whose geometry remains guarded for older milestones. */
.app-shell-top-right:not(.app-shell-top-right--flow) {
  position: fixed !important;
  z-index: 260 !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  pointer-events: auto !important;
}

html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn,
.app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-btn,
.app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 11px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  color: #dbe5f4 !important;
  box-shadow: none !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn:hover,
.app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn:focus-visible,
.app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn[aria-expanded="true"],
.app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-btn:hover,
.app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-btn:focus-visible,
.app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn:hover,
.app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn:focus-visible,
.app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn[aria-expanded="true"] {
  border-color: rgba(96, 165, 250, 0.42) !important;
  background: rgba(30, 41, 59, 0.96) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-btn,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn {
  border-color: rgba(100, 116, 139, 0.2) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #334155 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn:hover,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn:focus-visible,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn[aria-expanded="true"],
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-btn:hover,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-btn:focus-visible,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn:hover,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn:focus-visible,
html[data-theme="light"] .app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn[aria-expanded="true"] {
  border-color: rgba(37, 99, 235, 0.28) !important;
  background: #f8fafc !important;
  color: #1d4ed8 !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-icon {
  width: 20px !important;
  height: 20px !important;
  flex-basis: 20px !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .app-shell-primary-link {
  min-width: 108px !important;
  min-height: 42px !important;
  height: 42px !important;
  margin-left: 4px !important;
  padding: 0 13px !important;
  border: 1px solid var(--app-action-primary) !important;
  border-radius: 12px !important;
  background: var(--app-action-primary) !important;
  background-image: none !important;
  color: var(--app-action-text) !important;
  box-shadow: 0 7px 18px rgba(54, 83, 76, 0.18) !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .profile-menu-shell {
  margin-left: 4px !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .app-shell-primary-link:hover {
  border-color: var(--app-action-hover) !important;
  background: var(--app-action-hover) !important;
  background-image: none !important;
  box-shadow: 0 9px 22px rgba(54, 83, 76, 0.22) !important;
  transform: none !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .app-shell-primary-link:active {
  border-color: var(--app-action-pressed) !important;
  background: var(--app-action-pressed) !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(54, 83, 76, 0.16) !important;
  transform: none !important;
}

.app-shell-top-right:not(.app-shell-top-right--flow) .app-shell-primary-link:focus-visible {
  outline: 3px solid var(--app-action-focus) !important;
  outline-offset: 2px;
  border-color: var(--app-action-primary) !important;
  background: var(--app-action-primary) !important;
  background-image: none !important;
  box-shadow: 0 0 0 3px var(--app-action-focus) !important;
  transform: none !important;
}

.profile-dropdown {
  top: calc(100% + 9px) !important;
  right: 0 !important;
  display: grid !important;
  width: min(348px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: min(560px, calc(100vh - 88px)) !important;
  max-height: min(560px, calc(100dvh - 88px)) !important;
  padding: 8px !important;
  gap: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  border-color: rgba(148, 163, 184, 0.24) !important;
  border-radius: 16px !important;
  background: #111827 !important;
  box-shadow: 0 20px 48px rgba(2, 8, 23, 0.36) !important;
  scrollbar-width: thin;
}

.profile-dropdown.hidden,
.profile-dropdown-section.hidden,
.profile-dropdown-nav-btn.hidden {
  display: none !important;
}

html[data-theme="light"] .profile-dropdown {
  border-color: rgba(100, 116, 139, 0.2) !important;
  background: #ffffff !important;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14) !important;
}

.profile-dropdown::before {
  display: none !important;
}

.profile-dropdown-identity {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-height: 58px !important;
  padding: 7px 8px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

html[data-theme="light"] .profile-dropdown-identity {
  border-color: rgba(100, 116, 139, 0.16) !important;
  background: transparent !important;
}

.profile-dropdown-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 11px !important;
  font-size: 16px !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2) !important;
}

.profile-dropdown-name {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.profile-dropdown-email {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

.profile-dropdown-actions {
  display: grid !important;
  gap: 0 !important;
}

.profile-dropdown-section {
  display: grid;
  gap: 2px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

html[data-theme="light"] .profile-dropdown-section {
  border-color: rgba(100, 116, 139, 0.13);
}

.profile-dropdown-section-label {
  padding: 2px 10px 3px;
  color: #7f8da3;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="light"] .profile-dropdown-section-label {
  color: #64748b;
}

.profile-dropdown-nav {
  display: grid;
  gap: 1px;
}

.profile-dropdown-nav-btn {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 42px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.profile-dropdown-nav-btn:hover,
.profile-dropdown-nav-btn:focus-visible {
  background: rgba(148, 163, 184, 0.12) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="light"] .profile-dropdown-nav-btn,
html[data-theme="light"] .profile-dropdown-nav-btn:hover,
html[data-theme="light"] .profile-dropdown-nav-btn:focus-visible {
  border: 0 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .profile-dropdown-nav-btn:hover,
html[data-theme="light"] .profile-dropdown-nav-btn:focus-visible {
  background: #f1f5f9 !important;
}

.profile-dropdown-nav-icon,
.profile-dropdown-nav-icon--scans,
.profile-dropdown-nav-icon--profile,
.profile-dropdown-nav-icon--preferences,
.profile-dropdown-nav-icon--ai-settings,
.profile-dropdown-nav-icon--diagnostics,
.profile-dropdown-nav-icon--agentic-operations,
.profile-dropdown-nav-icon--scheduler,
html[data-theme="light"] .profile-dropdown-nav-icon--ai-settings,
html[data-theme="light"] .profile-dropdown-nav-icon--diagnostics,
html[data-theme="light"] .profile-dropdown-nav-icon--scheduler {
  width: 20px !important;
  height: 20px !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #9aa8bc !important;
}

html[data-theme="light"] .profile-dropdown-nav-icon {
  color: #64748b !important;
}

.profile-dropdown-nav-icon img,
.profile-dropdown-nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  opacity: 0.9 !important;
}

.profile-dropdown-nav-title {
  min-width: 0 !important;
  color: #e5edf8 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

html[data-theme="light"] .profile-dropdown-nav-title {
  color: #1e293b !important;
}

.profile-dropdown-footer {
  padding-top: 7px;
}

.profile-dropdown-danger-btn {
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #fda4af !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

.profile-dropdown-danger-btn:hover:not(:disabled),
.profile-dropdown-danger-btn:focus-visible {
  background: rgba(244, 63, 94, 0.11) !important;
  color: #fecdd3 !important;
  transform: none !important;
}

html[data-theme="light"] .profile-dropdown-danger-btn {
  border: 0 !important;
  background: transparent !important;
  color: #be123c !important;
}

html[data-theme="light"] .profile-dropdown-danger-btn:hover:not(:disabled),
html[data-theme="light"] .profile-dropdown-danger-btn:focus-visible {
  background: #fff1f2 !important;
  color: #9f1239 !important;
}

.profile-dropdown-danger-icon,
.profile-dropdown-danger-icon svg {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

/* Global App Guide control: final shared-toolbar owner. */
.app-shell-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 42px;
  padding: 0 12px;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.88);
  color: #dbe5f4;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.app-shell-guide-link-icon,
.app-shell-guide-link-icon .app-shell-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.app-shell-guide-link:hover,
.app-shell-guide-link:focus-visible,
.app-shell-guide-link.active,
.app-shell-guide-link[aria-current="page"] {
  border-color: rgba(143, 200, 185, 0.48);
  background: rgba(30, 55, 53, 0.96);
  color: #d9f3eb;
  text-decoration: none;
  box-shadow: none;
  transform: none;
}

.app-shell-guide-link:focus-visible {
  outline: 3px solid rgba(143, 200, 185, 0.22);
  outline-offset: 2px;
}

html[data-theme="light"] .app-shell-guide-link {
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .app-shell-guide-link:hover,
html[data-theme="light"] .app-shell-guide-link:focus-visible,
html[data-theme="light"] .app-shell-guide-link.active,
html[data-theme="light"] .app-shell-guide-link[aria-current="page"] {
  border-color: rgba(53, 107, 94, 0.34);
  background: #eef6f3;
  color: #285d50;
}

@media (max-width: 680px) {
  .app-shell-top-right:not(.app-shell-top-right--flow) {
    gap: 6px !important;
    padding: 0 !important;
  }

  .app-shell-top-right:not(.app-shell-top-right--flow) .notification-btn,
  .app-shell-top-right:not(.app-shell-top-right--flow) .theme-toggle-btn,
  .app-shell-top-right:not(.app-shell-top-right--flow) .profile-avatar-btn,
  .app-shell-top-right:not(.app-shell-top-right--flow) .app-shell-guide-link,
  .app-shell-top-right:not(.app-shell-top-right--flow) .app-shell-primary-link {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
  }

  .app-shell-top-right:not(.app-shell-top-right--flow) .app-shell-primary-link,
  .app-shell-top-right:not(.app-shell-top-right--flow) .profile-menu-shell {
    margin-left: 2px !important;
  }

  .app-shell-guide-link-label {
    display: none;
  }

  .profile-dropdown {
    width: min(340px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 78px) !important;
  }
}

/* profile_resume_document_library_r1
   ID-scoped ownership is intentional: the global button:not(...) CTA uses a
   high-specificity !important shared fill. Resume controls must use their
   owned eucalyptus system without changing buttons on another route or tab. */
#resumeSection.profile-resume-library,
#resumeSection.profile-resume-onboarding-card,
.profile-resume-modal {
  --profile-resume-accent: #3c746a;
  --profile-resume-accent-hover: #315f57;
  --profile-resume-accent-pressed: #294f49;
  --profile-resume-accent-soft: rgba(83, 137, 126, 0.16);
  --profile-resume-accent-whisper: rgba(83, 137, 126, 0.08);
  --profile-resume-accent-border: rgba(117, 169, 158, 0.42);
  --profile-resume-accent-text: #9bc4bb;
  --profile-resume-surface: #111722;
  --profile-resume-surface-raised: #171e2a;
  --profile-resume-hover: rgba(155, 196, 187, 0.06);
  --profile-resume-border: rgba(167, 176, 193, 0.18);
  --profile-resume-text: #f2f2f5;
  --profile-resume-muted: #9ba4b3;
  --profile-resume-focus: rgba(117, 169, 158, 0.42);
}

html[data-theme="light"] #resumeSection.profile-resume-library,
html[data-theme="light"] #resumeSection.profile-resume-onboarding-card,
html[data-theme="light"] .profile-resume-modal {
  --profile-resume-accent-soft: #e7f0ed;
  --profile-resume-accent-whisper: rgba(60, 116, 106, 0.055);
  --profile-resume-accent-border: #b9d1cb;
  --profile-resume-accent-text: #28564f;
  --profile-resume-surface: #fdfdfd;
  --profile-resume-surface-raised: #f6f6f8;
  --profile-resume-hover: #f7f7f9;
  --profile-resume-border: #e1e2e6;
  --profile-resume-text: #252631;
  --profile-resume-muted: #707383;
  --profile-resume-focus: rgba(60, 116, 106, 0.32);
}

#resumeSection.profile-resume-library {
  padding: 4px 0 30px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.profile-resume-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.profile-resume-library-header h2 {
  margin: 0 0 3px;
  color: var(--app-text);
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.profile-resume-library-header .subtext {
  color: var(--profile-resume-muted) !important;
  font-size: 13px;
  font-weight: 620;
}

#resumeSection .profile-resume-primary-action {
  min-height: 40px !important;
  padding: 0 15px !important;
  border: 1px solid var(--profile-resume-accent) !important;
  border-radius: 11px !important;
  background: var(--profile-resume-accent) !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(41, 79, 73, 0.16) !important;
  font-size: 13.5px !important;
  font-weight: 740 !important;
  transform: none !important;
}

#resumeSection .profile-resume-primary-action:hover {
  border-color: var(--profile-resume-accent-hover) !important;
  background: var(--profile-resume-accent-hover) !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(41, 79, 73, 0.2) !important;
  transform: none !important;
}

#resumeSection .profile-resume-primary-action:active {
  border-color: var(--profile-resume-accent-pressed) !important;
  background: var(--profile-resume-accent-pressed) !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
}

#resumeSection .profile-resume-primary-action span {
  margin-right: 4px;
  font-size: 17px;
  font-weight: 500;
}

#resumeSection.profile-resume-library > .profile-inline-status,
#resumeSection.profile-resume-library > #resumeOnboardingBanner {
  margin-bottom: 12px;
}

#resumeSection .profile-planning-upload-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  padding: 9px 11px 9px 13px;
  border: 1px solid var(--profile-resume-border) !important;
  border-radius: 10px;
  background: var(--profile-resume-surface-raised) !important;
  background-image: none !important;
  box-shadow: none !important;
}

#resumeSection .profile-planning-upload-callout > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

#resumeSection .profile-planning-upload-callout strong {
  color: var(--profile-resume-text);
  font-size: 12.5px;
  white-space: nowrap;
}

#resumeSection .profile-planning-upload-callout span {
  overflow: hidden;
  color: var(--profile-resume-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#resumeSection .profile-resume-callout-action {
  flex: 0 0 auto;
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid var(--profile-resume-border) !important;
  border-radius: 8px !important;
  background: var(--profile-resume-surface) !important;
  background-image: none !important;
  color: var(--profile-resume-text) !important;
  box-shadow: none !important;
  font-size: 11.5px !important;
  font-weight: 680 !important;
  transform: none !important;
}

#resumeSection .profile-resume-callout-action:hover {
  border-color: var(--profile-resume-accent-border) !important;
  background: var(--profile-resume-accent-soft) !important;
  background-image: none !important;
  transform: none !important;
}

.profile-resume-document-list {
  display: block !important;
  border-top: 1px solid var(--profile-resume-border);
  border-bottom: 1px solid var(--profile-resume-border);
}

.profile-resume-document-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(220px, 1.25fr) minmax(220px, 0.9fr) 78px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--profile-resume-border);
  color: var(--profile-resume-text);
  transition: background-color 120ms ease;
}

.profile-resume-document-row:last-child {
  border-bottom: 0;
}

.profile-resume-document-row:hover,
.profile-resume-document-row:focus-within {
  background: var(--profile-resume-hover);
}

.profile-resume-file-icon {
  display: grid;
  grid-template-rows: 19px auto;
  place-items: center;
  width: 36px;
  height: 40px;
  padding: 4px 0 3px;
  border: 1px solid var(--profile-resume-accent-border);
  border-radius: 8px;
  background: var(--profile-resume-accent-soft);
  color: var(--profile-resume-accent-text);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.profile-resume-file-icon svg {
  width: 18px;
  height: 18px;
}

.profile-resume-file-copy {
  min-width: 0;
}

.profile-resume-file-name {
  overflow: hidden;
  color: var(--profile-resume-text);
  font-size: 13.5px;
  font-weight: 730;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-resume-file-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--profile-resume-muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.profile-resume-role-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.profile-resume-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 2px 7px;
  border: 1px solid var(--profile-resume-accent-border);
  border-radius: 6px;
  background: var(--profile-resume-accent-soft);
  color: var(--profile-resume-accent-text);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
}

.profile-resume-role-chip.is-default {
  border-color: var(--profile-resume-accent);
  color: var(--profile-resume-accent-text);
}

.profile-resume-default-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--profile-resume-accent);
}

.profile-resume-no-roles {
  color: var(--profile-resume-muted);
  font-size: 11.5px;
}

.profile-resume-row-actions {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 78px;
}

#resumeList .profile-resume-row-action,
#profileResumeUploadModal .profile-resume-dialog-close,
#profileResumeRoleModal .profile-resume-dialog-close,
#resumeDeleteModal .profile-resume-dialog-close {
  display: inline-grid !important;
  place-items: center;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--profile-resume-muted) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1 !important;
  transform: none !important;
}

#profileResumeUploadModal .profile-resume-dialog-close:hover,
#profileResumeRoleModal .profile-resume-dialog-close:hover,
#resumeDeleteModal .profile-resume-dialog-close:hover {
  border-color: var(--profile-resume-border) !important;
  background: var(--profile-resume-surface-raised) !important;
  background-image: none !important;
  color: var(--profile-resume-text) !important;
  transform: none !important;
}

#resumeList .profile-resume-row-action-icon {
  display: block;
  width: 17px;
  height: 17px;
}

#resumeList .profile-resume-delete-icon {
  background-color: currentColor;
  -webkit-mask: url("/static/media/discard_img.svg") center / contain no-repeat;
  mask: url("/static/media/discard_img.svg") center / contain no-repeat;
}

#resumeList .profile-resume-manage-role-action:hover,
#resumeList .profile-resume-manage-role-action:focus-visible {
  border-color: var(--profile-resume-accent-border) !important;
  background: var(--profile-resume-accent-soft) !important;
  background-image: none !important;
  color: var(--profile-resume-accent-text) !important;
  transform: none !important;
}

#resumeList .profile-resume-delete-row-action:hover,
#resumeList .profile-resume-delete-row-action:focus-visible {
  border-color: rgba(185, 105, 105, 0.34) !important;
  background: rgba(169, 87, 87, 0.12) !important;
  background-image: none !important;
  color: #c98787 !important;
  transform: none !important;
}

html[data-theme="light"] #resumeList .profile-resume-delete-row-action:hover,
html[data-theme="light"] #resumeList .profile-resume-delete-row-action:focus-visible {
  border-color: #e6caca !important;
  background: #f8eeee !important;
  color: #8d4b4b !important;
}

.profile-resume-document-list .resume-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 34px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--profile-resume-muted) !important;
  font-size: 12px;
}

.profile-resume-document-list .resume-empty-state strong {
  color: var(--profile-resume-text);
  font-size: 13.5px;
}

body.profile-resume-modal-open {
  overflow: hidden;
}

.profile-resume-modal {
  z-index: 180 !important;
  display: grid;
  place-items: center;
  padding: 18px !important;
  background: rgba(8, 10, 16, 0.5) !important;
  backdrop-filter: blur(5px);
  animation: profile-resume-backdrop-in 140ms ease-out;
}

.profile-resume-modal.hidden {
  display: none !important;
}

.profile-resume-modal.is-closing {
  animation: profile-resume-backdrop-out 110ms ease-in forwards;
}

.profile-resume-modal.is-closing .profile-resume-dialog {
  animation: profile-resume-dialog-out 110ms ease-in forwards !important;
  pointer-events: none;
}

#profileResumeUploadModal .profile-resume-dialog,
#profileResumeRoleModal .profile-resume-dialog,
#resumeDeleteModal .profile-resume-dialog {
  position: relative;
  width: min(520px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 36px);
  padding: 25px !important;
  overflow: hidden;
  border: 1px solid var(--profile-resume-border) !important;
  border-radius: 22px !important;
  background: var(--profile-resume-surface) !important;
  background-image: none !important;
  color: var(--profile-resume-text) !important;
  box-shadow: 0 28px 80px rgba(4, 7, 13, 0.3), 0 2px 8px rgba(4, 7, 13, 0.12) !important;
  animation: profile-resume-dialog-in 150ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

#profileResumeRoleModal .profile-resume-dialog {
  width: min(560px, calc(100vw - 32px)) !important;
}

#resumeDeleteModal .profile-resume-dialog {
  width: min(440px, calc(100vw - 32px)) !important;
}

#profileResumeUploadModal .profile-resume-dialog-close,
#profileResumeRoleModal .profile-resume-dialog-close,
#resumeDeleteModal .profile-resume-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
}

.profile-resume-dialog-intro {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-right: 42px;
}

.profile-resume-dialog-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--profile-resume-accent-border);
  border-radius: 11px;
  background: var(--profile-resume-accent-soft);
  color: var(--profile-resume-accent-text);
}

.profile-resume-dialog-symbol svg {
  width: 20px;
  height: 20px;
}

.profile-resume-dialog-intro h3 {
  margin: 0 0 3px;
  color: var(--profile-resume-text) !important;
  font-size: 18px;
  font-weight: 790;
  letter-spacing: -0.025em;
}

.profile-resume-dialog-intro p {
  margin: 0;
  overflow: hidden;
  color: var(--profile-resume-muted) !important;
  font-size: 12.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-resume-dialog-body {
  margin-top: 20px;
}

.profile-resume-dropzone {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 112px;
  padding: 15px;
  border: 1px dashed var(--profile-resume-border);
  border-radius: 14px;
  background: var(--profile-resume-surface-raised);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.profile-resume-dropzone:hover,
.profile-resume-dropzone.drag-active {
  border-color: var(--profile-resume-accent-border);
  background: var(--profile-resume-accent-soft);
}

.profile-resume-upload-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--profile-resume-border);
  border-radius: 10px;
  background: var(--profile-resume-surface);
  color: var(--profile-resume-accent-text);
}

.profile-resume-upload-icon svg {
  width: 21px;
  height: 21px;
}

.profile-resume-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-resume-upload-copy strong {
  color: var(--profile-resume-text);
  font-size: 13px;
  font-weight: 720;
}

.profile-resume-upload-copy span,
.profile-resume-upload-help {
  color: var(--profile-resume-muted);
  font-size: 11px;
}

.profile-resume-upload-help {
  grid-column: 2 / -1;
}

#profileResumeUploadModal #resumeBrowseBtn,
body.profile-resume-onboarding-mode #resumeSection #resumeBrowseBtn {
  min-height: 34px !important;
  padding: 0 11px !important;
  border: 1px solid var(--profile-resume-accent-border) !important;
  border-radius: 9px !important;
  background: var(--profile-resume-surface) !important;
  background-image: none !important;
  color: var(--profile-resume-text) !important;
  box-shadow: none !important;
  font-size: 11.5px !important;
  font-weight: 680 !important;
  transform: none !important;
}

#profileResumeUploadModal #resumeBrowseBtn:hover,
body.profile-resume-onboarding-mode #resumeSection #resumeBrowseBtn:hover {
  border-color: var(--profile-resume-accent-border) !important;
  background: var(--profile-resume-accent-soft) !important;
  background-image: none !important;
  transform: none !important;
}

.profile-resume-modal-feedback {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--profile-resume-border);
  border-radius: 9px;
  background: var(--profile-resume-surface-raised);
  color: var(--profile-resume-text);
  font-size: 11.5px;
}

.profile-resume-modal-feedback.hidden {
  display: none;
}

.profile-resume-modal-feedback.success {
  border-color: rgba(100, 148, 120, 0.34);
  color: #9bcbaf;
}

.profile-resume-modal-feedback.error {
  border-color: rgba(176, 84, 84, 0.34);
  color: #d99494;
}

html[data-theme="light"] .profile-resume-modal-feedback.success {
  color: #417257;
}

html[data-theme="light"] .profile-resume-modal-feedback.error {
  color: #974949;
}

.profile-resume-role-scroll {
  max-height: min(430px, calc(100dvh - 190px));
  margin: 18px -8px 0;
  padding: 0 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-resume-role-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 9px 7px;
  border-bottom: 1px solid var(--profile-resume-border);
  border-radius: 8px;
  transition: background-color 120ms ease;
}

.profile-resume-role-option:last-child {
  border-bottom: 0;
}

.profile-resume-role-option:hover,
.profile-resume-role-option:focus-within,
.profile-resume-role-option.is-selected {
  background: var(--profile-resume-accent-whisper);
}

.profile-resume-role-toggle,
.profile-resume-role-default {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--profile-resume-text);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 680;
}

.profile-resume-role-default {
  flex: 0 0 auto;
  color: var(--profile-resume-muted);
  font-size: 11px;
  font-weight: 620;
}

.profile-resume-role-default:has(input:disabled) {
  cursor: default;
  opacity: 0.42;
}

.profile-resume-role-default:not(:has(input:disabled)),
.profile-resume-role-option.is-selected .profile-resume-role-toggle {
  color: var(--profile-resume-accent-text);
}

.profile-resume-role-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--profile-resume-accent);
}

.profile-resume-role-empty {
  padding: 28px 0;
  color: var(--profile-resume-muted);
  text-align: center;
  font-size: 12px;
}

.profile-resume-auto-save-note {
  margin-top: 12px;
  color: var(--profile-resume-muted);
  font-size: 10.5px;
  text-align: right;
}

.profile-resume-delete-intro {
  display: block;
}

.profile-resume-delete-name {
  margin: 19px 0 5px;
  overflow-wrap: anywhere;
  color: var(--profile-resume-text);
  font-size: 13.5px;
  font-weight: 720;
}

.profile-resume-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

#resumeDeleteModal .profile-resume-secondary-action,
#resumeDeleteModal .profile-resume-delete-action {
  min-height: 38px !important;
  padding: 0 13px !important;
  border-radius: 9px !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  transform: none !important;
}

#resumeDeleteModal .profile-resume-secondary-action {
  border: 1px solid var(--profile-resume-border) !important;
  background: var(--profile-resume-surface-raised) !important;
  color: var(--profile-resume-text) !important;
}

#resumeDeleteModal .profile-resume-delete-action {
  border: 1px solid #a95757 !important;
  background: #a95757 !important;
  color: #ffffff !important;
}

#resumeDeleteModal .profile-resume-secondary-action:hover {
  border-color: var(--profile-resume-accent-border) !important;
  background: var(--profile-resume-accent-soft) !important;
  background-image: none !important;
}

#resumeDeleteModal .profile-resume-delete-action:hover {
  border-color: #984949 !important;
  background: #984949 !important;
  background-image: none !important;
}

body.profile-resume-onboarding-mode #resumeSection.profile-resume-onboarding-card {
  padding: clamp(20px, 3vw, 28px) !important;
  border: 1px solid var(--profile-resume-border) !important;
  border-radius: 18px !important;
  background: var(--profile-resume-surface) !important;
  background-image: none !important;
  box-shadow: 0 20px 55px rgba(5, 8, 15, 0.12) !important;
}

.profile-resume-onboarding-uploader {
  max-width: 650px;
  margin: 0 auto;
}

body.profile-resume-onboarding-mode .profile-resume-dropzone {
  min-height: 180px;
  padding: 24px;
}

.profile-resume-onboarding-list {
  margin-top: 14px;
}

#resumeSection .profile-resume-primary-action:focus-visible,
#resumeSection .profile-resume-callout-action:focus-visible,
#resumeList .profile-resume-row-action:focus-visible,
#profileResumeUploadModal .profile-resume-dialog-close:focus-visible,
#profileResumeRoleModal .profile-resume-dialog-close:focus-visible,
#resumeDeleteModal .profile-resume-dialog-close:focus-visible,
#profileResumeUploadModal #resumeBrowseBtn:focus-visible,
body.profile-resume-onboarding-mode #resumeSection #resumeBrowseBtn:focus-visible,
#resumeDeleteModal .profile-resume-secondary-action:focus-visible,
#resumeDeleteModal .profile-resume-delete-action:focus-visible,
.profile-resume-dropzone:focus-visible,
.profile-resume-role-option input:focus-visible {
  outline: 3px solid var(--profile-resume-focus) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .profile-resume-document-row,
html[data-theme="dark"] #profileResumeUploadModal .profile-resume-dialog,
html[data-theme="dark"] #profileResumeRoleModal .profile-resume-dialog,
html[data-theme="dark"] #resumeDeleteModal .profile-resume-dialog {
  border-color: rgba(167, 176, 193, 0.18) !important;
}

@keyframes profile-resume-dialog-in {
  from { opacity: 0; transform: translateY(5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes profile-resume-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes profile-resume-dialog-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(3px) scale(0.99); }
}

@keyframes profile-resume-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (max-width: 760px) {
  .profile-resume-document-row {
    grid-template-columns: 38px minmax(0, 1fr) 78px;
    gap: 10px;
    min-height: 82px;
    padding: 10px 6px;
  }

  .profile-resume-role-chips {
    grid-column: 2 / 3;
    margin-top: -2px;
  }

  .profile-resume-row-actions {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 560px) {
  .profile-resume-library-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  #resumeSection .profile-resume-primary-action {
    align-self: flex-start;
  }

  #resumeSection .profile-planning-upload-callout,
  #resumeSection .profile-planning-upload-callout > div {
    align-items: flex-start;
    flex-direction: column;
  }

  #resumeSection .profile-planning-upload-callout span {
    white-space: normal;
  }

  .profile-resume-modal {
    align-items: end;
    padding: 8px !important;
  }

  #profileResumeUploadModal .profile-resume-dialog,
  #profileResumeRoleModal .profile-resume-dialog,
  #resumeDeleteModal .profile-resume-dialog {
    width: 100% !important;
    max-height: calc(100dvh - 16px);
    padding: 21px !important;
    border-radius: 20px !important;
  }

  .profile-resume-dropzone {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  #profileResumeUploadModal #resumeBrowseBtn,
  body.profile-resume-onboarding-mode #resumeSection #resumeBrowseBtn,
  .profile-resume-upload-help {
    grid-column: 2;
    justify-self: start;
  }

  .profile-resume-delete-actions {
    flex-direction: column-reverse;
  }

  #resumeDeleteModal .profile-resume-delete-actions button {
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-resume-modal,
  .profile-resume-dialog,
  .profile-resume-document-row {
    animation: none !important;
    transition: none !important;
  }
}

/* profile_pipeline_run_stats_summary_r1
   The persisted metric tones remain available to other surfaces. This modal
   owns a neutral operational summary and never maps those tones to tile fills. */
#pipelineRunStatsModal {
  --pipeline-stats-accent: #3c746a;
  --pipeline-stats-accent-hover: #315f57;
  --pipeline-stats-accent-pressed: #294f49;
  --pipeline-stats-accent-soft: rgba(83, 137, 126, 0.16);
  --pipeline-stats-accent-border: rgba(117, 169, 158, 0.42);
  --pipeline-stats-accent-text: #9bc4bb;
  --pipeline-stats-surface: #111722;
  --pipeline-stats-surface-raised: #171e2a;
  --pipeline-stats-border: rgba(167, 176, 193, 0.18);
  --pipeline-stats-text: #f2f2f5;
  --pipeline-stats-muted: #9ba4b3;
  --pipeline-stats-focus: rgba(117, 169, 158, 0.42);
  --pipeline-stats-danger: #c98787;
  --pipeline-stats-danger-soft: rgba(169, 87, 87, 0.12);
  --pipeline-stats-warning: #d0aa6c;
  /* Hero feature-panel palette: deep petrol/eucalyptus, constant in both
     light and dark mode - the panel is intentionally always dark/rich,
     never brightened to match the ambient theme. */
  --pipeline-hero-deep: #0f4e45;
  --pipeline-hero-deeper: #0a443c;
  --pipeline-hero-mid: #176357;
  --pipeline-hero-surface: #0f4e45;
  --pipeline-hero-surface-alt: #0b6253;
  --pipeline-jade: #24b99b;
  --pipeline-jade-light: #67d2b0;
  --pipeline-mint: #94d89f;
  --pipeline-lime-muted: #bcd977;
  --pipeline-gold: #e5b84e;
  --pipeline-gold-light: #f2ce72;
  --pipeline-hero-jade: #3c8b78;
  --pipeline-hero-jade-light: #62b39c;
  --pipeline-hero-gold: #d2a84f;
  --pipeline-hero-text: #f5faf8;
  --pipeline-hero-muted: rgba(245, 250, 248, 0.72);
  --pipeline-hero-border: rgba(103, 210, 176, 0.24);
  --pipeline-hero-danger: #cf6a62;
  /* Completed stage-ribbon progression: deep teal -> eucalyptus -> jade ->
     mint -> muted lime -> warm gold. One controlled family, never rainbow. */
  --pipeline-ribbon-0: #258e7c;
  --pipeline-ribbon-1: #32a98e;
  --pipeline-ribbon-2: #48bc93;
  --pipeline-ribbon-3: #69cb91;
  --pipeline-ribbon-4: #91d58b;
  --pipeline-ribbon-5: #bbd675;
  --pipeline-ribbon-6: #e0c75c;
  --pipeline-ribbon-7: #e8b84d;
  /* Primary outcome card tones: related eucalyptus -> mint -> jade -> gold.
     Dark-mode defaults here are desaturated, never neon. */
  --pipeline-tone-0-bg: rgba(36, 185, 155, 0.10);
  --pipeline-tone-0-border: rgba(103, 210, 176, 0.28);
  --pipeline-tone-0-icon: #6ecdb2;
  --pipeline-tone-1-bg: rgba(63, 145, 188, 0.12);
  --pipeline-tone-1-border: rgba(120, 178, 209, 0.26);
  --pipeline-tone-1-icon: #7fb6d6;
  --pipeline-tone-2-bg: rgba(102, 87, 190, 0.12);
  --pipeline-tone-2-border: rgba(160, 146, 219, 0.26);
  --pipeline-tone-2-icon: #a394dd;
  --pipeline-tone-3-bg: rgba(229, 184, 78, 0.10);
  --pipeline-tone-3-border: rgba(233, 202, 130, 0.28);
  --pipeline-tone-3-icon: #dcb55f;
  --pipeline-callout-bg: rgba(36, 185, 155, 0.10);
  --pipeline-callout-border: rgba(103, 210, 176, 0.24);
  --pipeline-callout-text: #a9d8cb;
  --pipeline-panel-surface: #151c28;
  --pipeline-panel-border: rgba(167, 176, 193, 0.16);
  --pipeline-row-surface: rgba(255, 255, 255, 0.035);
  --pipeline-stats-secondary: #a8b2c0;
  /* Above the shell's top-right controls (bell/theme/New Scan/avatar sit at
     z-index 260 in app_redesign.css) so the dimmed backdrop covers the whole
     shell, matching every other .modal-backdrop in this app (z-index 1000). */
  z-index: 1000 !important;
  display: grid;
  place-items: center;
  padding: 20px !important;
  background: rgba(8, 10, 16, 0.5) !important;
  backdrop-filter: blur(5px);
  animation: pipeline-run-stats-backdrop-in 140ms ease-out;
}

html[data-theme="light"] #pipelineRunStatsModal {
  /* Light-mode surfaces. The hero panel tokens are deliberately NOT
     overridden here: the feature panel stays deep petrol in both themes. */
  /* Informational outcome-card tones ONLY. The soft powder blue and
     lavender below are deliberately scoped to these four read-only cards
     per the approved target; no button, action, hero, navigation or shell
     surface uses them. */
  --pipeline-tone-0-bg: #eef9f5;
  --pipeline-tone-0-border: #9cddcb;
  --pipeline-tone-0-icon: #42ac91;
  --pipeline-tone-1-bg: #eef7fc;
  --pipeline-tone-1-border: #a8d7ea;
  --pipeline-tone-1-icon: #3f91bc;
  --pipeline-tone-2-bg: #f4f1fc;
  --pipeline-tone-2-border: #c8b9ec;
  --pipeline-tone-2-icon: #6657be;
  --pipeline-tone-3-bg: #fff7e7;
  --pipeline-tone-3-border: #e9ca82;
  --pipeline-tone-3-icon: #d59a20;
  --pipeline-callout-bg: #eaf5f1;
  --pipeline-callout-border: #d3e8e1;
  --pipeline-callout-text: #244f46;
  --pipeline-panel-surface: #ffffff;
  --pipeline-panel-border: #e4ebe8;
  --pipeline-row-surface: rgba(245, 247, 249, 0.75);
  --pipeline-stats-secondary: #526173;
  --pipeline-stats-text: #101828;
  --pipeline-stats-muted: #8a949f;
  --pipeline-stats-accent-soft: #e7f0ed;
  --pipeline-stats-accent-border: #b9d1cb;
  --pipeline-stats-accent-text: #28564f;
  --pipeline-stats-surface: #fdfdfd;
  --pipeline-stats-surface-raised: #f6f7f7;
  --pipeline-stats-border: #e1e4e3;
  --pipeline-stats-text: #252b2a;
  --pipeline-stats-muted: #6d7775;
  --pipeline-stats-focus: rgba(60, 116, 106, 0.3);
  --pipeline-stats-danger: #8d4b4b;
  --pipeline-stats-danger-soft: #f8eeee;
  --pipeline-stats-warning: #8a672e;
}

#pipelineRunStatsModal.hidden {
  display: none !important;
}

body.pipeline-run-stats-modal-open {
  overflow: hidden;
}

#pipelineRunStatsModal .pipeline-run-stats-modal-card {
  display: flex;
  flex-direction: column;
  width: min(1100px, calc(100vw - 48px)) !important;
  max-width: 1100px !important;
  max-height: 87dvh;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--pipeline-stats-border) !important;
  border-radius: 22px !important;
  background: var(--pipeline-stats-surface) !important;
  background-image: none !important;
  color: var(--pipeline-stats-text) !important;
  box-shadow: 0 28px 80px rgba(4, 7, 13, 0.3), 0 2px 8px rgba(4, 7, 13, 0.12) !important;
  animation: pipeline-run-stats-dialog-in 150ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

#pipelineRunStatsModal.is-closing {
  animation: pipeline-run-stats-backdrop-out 110ms ease-in forwards;
}

#pipelineRunStatsModal.is-closing .pipeline-run-stats-modal-card {
  animation: pipeline-run-stats-dialog-out 110ms ease-in forwards !important;
  pointer-events: none;
}

#pipelineRunStatsModal .pipeline-run-stats-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px 14px;
  background: var(--pipeline-stats-surface);
}

#pipelineRunStatsModal .pipeline-run-stats-heading {
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-stats-heading h3 {
  margin: 0;
  color: var(--pipeline-stats-text) !important;
  font-size: 28px;
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

#pipelineRunStatsModal .pipeline-run-stats-date {
  margin-top: 3px;
  color: var(--pipeline-stats-secondary);
  font-size: 14.5px;
  font-weight: 620;
}

#pipelineRunStatsModal .pipeline-run-stats-run-id-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-stats-run-id {
  display: block;
  overflow-wrap: anywhere;
  color: var(--pipeline-stats-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  line-height: 1.35;
  opacity: 0.72;
}

#pipelineRunStatsModal .pipeline-run-stats-copy-id {
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 auto;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--pipeline-stats-muted) !important;
  box-shadow: none !important;
  transform: none !important;
}

#pipelineRunStatsModal .pipeline-run-stats-copy-id svg {
  width: 16px;
  height: 16px;
}

#pipelineRunStatsModal .pipeline-run-stats-copy-id:hover {
  border-color: var(--pipeline-stats-border) !important;
  background: var(--pipeline-stats-surface-raised) !important;
  color: var(--pipeline-stats-text) !important;
}

#pipelineRunStatsModal .pipeline-run-stats-copy-id.is-copied {
  border-color: var(--pipeline-stats-accent-border) !important;
  background: var(--pipeline-stats-accent-soft) !important;
  color: var(--pipeline-stats-accent-text) !important;
}

#pipelineRunStatsModal #pipelineRunStatsCloseBtn {
  display: inline-grid !important;
  place-items: center;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--pipeline-stats-secondary) !important;
  box-shadow: none !important;
  line-height: 1 !important;
  transform: none !important;
}

#pipelineRunStatsModal #pipelineRunStatsCloseBtn svg {
  width: 19px;
  height: 19px;
}

#pipelineRunStatsModal #pipelineRunStatsCloseBtn:hover {
  border-color: var(--pipeline-stats-border) !important;
  background: var(--pipeline-stats-surface-raised) !important;
  background-image: none !important;
  color: var(--pipeline-stats-text) !important;
  transform: none !important;
}

#pipelineRunStatsModal #pipelineRunStatsCloseBtn:active {
  border-color: var(--pipeline-stats-accent-border) !important;
  background: var(--pipeline-stats-accent-soft) !important;
  background-image: none !important;
  color: var(--pipeline-stats-accent-text) !important;
  transform: none !important;
}

#pipelineRunStatsModal #pipelineRunStatsCloseBtn:focus-visible,
#pipelineRunStatsModal .pipeline-run-technical-disclosure > summary:focus-visible,
#pipelineRunStatsModal .agent-trace-json-detail > summary:focus-visible {
  outline: 3px solid var(--pipeline-stats-focus) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

#pipelineRunStatsModal .pipeline-run-stats-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--pipeline-stats-border) transparent;
  scrollbar-width: thin;
}

#pipelineRunStatsModal .pipeline-run-stats-scroll::-webkit-scrollbar {
  width: 8px;
}

#pipelineRunStatsModal .pipeline-run-stats-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--pipeline-stats-border);
  background-clip: padding-box;
}

#pipelineRunStatsModal .pipeline-run-stats-body {
  display: block;
  padding: 0 26px 22px;
}

/* Hero Run Overview panel: the modal's main visual anchor. Deep petrol/
   eucalyptus gradient, intentionally dark in both light and dark mode. */
#pipelineRunStatsModal .pipeline-run-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 14px;
  padding: 20px 24px;
  border: 1px solid var(--pipeline-hero-border);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pipeline-hero-deep) 0%, #0c574b 58%, var(--pipeline-hero-surface-alt) 100%);
  color: var(--pipeline-hero-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Two subtle flowing translucent curves, right-weighted, behind content.
   Pure CSS - no external image, no large opaque shape. */
#pipelineRunStatsModal .pipeline-run-hero::before,
#pipelineRunStatsModal .pipeline-run-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 44% 56% 52% 48%;
  pointer-events: none;
}

#pipelineRunStatsModal .pipeline-run-hero::before {
  right: -16%;
  bottom: -72%;
  width: 58%;
  height: 168%;
  background: rgba(148, 216, 159, 0.05);
}

#pipelineRunStatsModal .pipeline-run-hero::after {
  right: -26%;
  bottom: -54%;
  width: 52%;
  height: 150%;
  background: rgba(103, 210, 176, 0.045);
}

#pipelineRunStatsModal .pipeline-run-hero-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.85fr));
  align-items: center;
  gap: 14px;
}

#pipelineRunStatsModal .pipeline-run-hero-status {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-hero-status-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  /* Gradient is scoped to this badge only. White check, per target. */
  background: linear-gradient(150deg, var(--pipeline-jade-light) 0%, var(--pipeline-jade) 72%);
  color: #ffffff;
  box-shadow:
    0 0 0 5px rgba(36, 185, 155, 0.14),
    0 4px 10px rgba(6, 49, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#pipelineRunStatsModal .pipeline-run-hero.is-danger .pipeline-run-hero-status-badge {
  background: linear-gradient(150deg, #dc8b81 0%, var(--pipeline-hero-danger) 72%);
  color: #ffffff;
  box-shadow:
    0 0 0 5px rgba(207, 106, 98, 0.14),
    0 4px 10px rgba(60, 20, 16, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#pipelineRunStatsModal .pipeline-run-hero.is-running .pipeline-run-hero-status-badge {
  background: linear-gradient(150deg, var(--pipeline-gold-light) 0%, var(--pipeline-gold) 72%);
  color: #ffffff;
  box-shadow:
    0 0 0 5px rgba(229, 184, 78, 0.14),
    0 4px 10px rgba(58, 42, 5, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

#pipelineRunStatsModal .pipeline-run-hero.is-muted .pipeline-run-hero-status-badge {
  background: rgba(245, 250, 248, 0.22);
  color: var(--pipeline-hero-text);
  box-shadow: none;
}

#pipelineRunStatsModal .pipeline-run-hero-status-icon {
  width: 24px;
  height: 24px;
}

#pipelineRunStatsModal .pipeline-run-hero.is-running .pipeline-run-hero-status-icon {
  animation: pipeline-run-hero-spin 1.6s linear infinite;
}

#pipelineRunStatsModal .pipeline-run-hero-status-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-hero-status-copy strong {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.1;
}

#pipelineRunStatsModal .pipeline-run-hero-status-copy span {
  color: var(--pipeline-hero-muted);
  font-size: 13.5px;
  font-weight: 550;
}

#pipelineRunStatsModal .pipeline-run-hero-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(245, 250, 248, 0.13);
}

#pipelineRunStatsModal .pipeline-run-hero-stat > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-hero-stat-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  /* Pale off-white so the icon reads against the petrol hero rather than
     disappearing as teal-on-teal. */
  color: rgba(245, 250, 248, 0.86);
}

#pipelineRunStatsModal .pipeline-run-hero-stat strong {
  overflow-wrap: anywhere;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.08;
}

#pipelineRunStatsModal .pipeline-run-hero-stat span {
  color: var(--pipeline-hero-muted);
  font-size: 12.5px;
  font-weight: 600;
}

#pipelineRunStatsModal .pipeline-run-hero-ribbon {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
}

/* Sized to the capsule row so the family labels below span exactly the same
   width as the bars, and shrink together on narrow viewports. */
#pipelineRunStatsModal .pipeline-run-hero-ribbon-main {
  width: max-content;
  max-width: 100%;
  min-width: 0;
}

/* Slim vertical capsules - telemetry/activity bars, not a segmented
   progress bar. Bars stay a fixed narrow width and simply wrap-free flex
   with a bounded max so a long stage_order never stretches them wide. */
#pipelineRunStatsModal .pipeline-run-hero-ribbon-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#pipelineRunStatsModal .pipeline-run-hero-bar {
  flex: 0 1 13px;
  width: 13px;
  min-width: 9px;
  max-width: 15px;
  height: 33px;
  border-radius: 7px;
  background: rgba(245, 250, 248, 0.14);
  animation: pipeline-run-hero-bar-in 320ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

/* Completed stages walk the controlled teal -> jade -> mint -> gold ramp. */
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-0 { background: var(--pipeline-ribbon-0); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-1 { background: var(--pipeline-ribbon-1); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-2 { background: var(--pipeline-ribbon-2); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-3 { background: var(--pipeline-ribbon-3); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-4 { background: var(--pipeline-ribbon-4); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-5 { background: var(--pipeline-ribbon-5); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-6 { background: var(--pipeline-ribbon-6); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete.is-step-7 { background: var(--pipeline-ribbon-7); }
#pipelineRunStatsModal .pipeline-run-hero-bar.is-complete { background: var(--pipeline-ribbon-2); }

#pipelineRunStatsModal .pipeline-run-hero-bar.is-running {
  background: var(--pipeline-gold-light);
  animation:
    pipeline-run-hero-bar-in 320ms cubic-bezier(0.2, 0.75, 0.25, 1) both,
    pipeline-run-hero-shine 1.9s ease-in-out infinite;
}

#pipelineRunStatsModal .pipeline-run-hero-bar.is-failed {
  background: var(--pipeline-hero-danger);
}

#pipelineRunStatsModal .pipeline-run-hero-bar.is-pending {
  background: rgba(245, 250, 248, 0.12);
}

#pipelineRunStatsModal .pipeline-run-hero-ribbon-labels {
  display: flex;
  justify-content: space-between;
  max-width: 100%;
  margin-top: 7px;
  padding-right: 4px;
  color: var(--pipeline-hero-muted);
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.01em;
}

#pipelineRunStatsModal .pipeline-run-hero-ribbon-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

#pipelineRunStatsModal .pipeline-run-hero-ribbon-progress > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#pipelineRunStatsModal .pipeline-run-hero-progress-icon {
  width: 19px;
  height: 19px;
  color: rgba(245, 250, 248, 0.9);
}

#pipelineRunStatsModal .pipeline-run-hero-ribbon-progress strong {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
}

#pipelineRunStatsModal .pipeline-run-hero-ribbon-progress span {
  color: var(--pipeline-hero-muted);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

@keyframes pipeline-run-hero-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes pipeline-run-hero-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pipeline-run-hero-bar-in {
  from { opacity: 0; transform: translateY(4px) scaleY(0.72); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes pipeline-run-hero-shine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.22); }
}

#pipelineRunStatsModal .pipeline-run-stats-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--pipeline-stats-border);
}

/* Contained premium panels for Run summary / Pipeline outcomes. */
#pipelineRunStatsModal .pipeline-run-panel {
  margin-bottom: 12px;
  padding: 18px 20px !important;
  border: 1px solid var(--pipeline-panel-border);
  border-bottom: 1px solid var(--pipeline-panel-border);
  border-radius: 16px;
  background: var(--pipeline-panel-surface);
}

#pipelineRunStatsModal .pipeline-run-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#pipelineRunStatsModal .pipeline-run-panel-head h4 {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  color: var(--pipeline-stats-text) !important;
  font-size: 16.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.012em !important;
  text-transform: none !important;
}

#pipelineRunStatsModal .pipeline-run-panel-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--pipeline-tone-0-icon);
}

#pipelineRunStatsModal .pipeline-run-panel-meta {
  color: var(--pipeline-stats-secondary);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

#pipelineRunStatsModal .pipeline-run-stats-section h4,
#pipelineRunStatsModal .pipeline-run-technical-section h4,
#pipelineRunStatsModal .agent-trace-panel > h4 {
  margin: 0 0 14px;
  color: var(--pipeline-stats-muted) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.085em;
  line-height: 1.3;
  text-transform: uppercase;
}

#pipelineRunStatsModal .pipeline-run-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 0;
  margin: 0;
}

/* Spacing carries the 3x2 rhythm; only a light vertical rule separates the
   columns, so this never reads as a spreadsheet of six cells. */
#pipelineRunStatsModal .pipeline-run-summary-item {
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid var(--pipeline-panel-border);
}

#pipelineRunStatsModal .pipeline-run-summary-item:nth-child(3n + 1) {
  padding-left: 0;
  border-left: 0;
}

#pipelineRunStatsModal .pipeline-run-summary-grid dt {
  margin: 0 0 5px;
  color: var(--pipeline-stats-secondary);
  font-size: 12.5px;
  font-weight: 600;
}

#pipelineRunStatsModal .pipeline-run-summary-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--pipeline-stats-text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

#pipelineRunStatsModal .pipeline-run-summary-copy {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 16px;
  padding: 9px 14px;
  border: 1px solid var(--pipeline-callout-border);
  border-radius: 10px;
  background: var(--pipeline-callout-bg);
}

#pipelineRunStatsModal .pipeline-run-summary-copy-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--pipeline-tone-0-icon);
}

#pipelineRunStatsModal .pipeline-run-summary-copy-label {
  flex: 0 0 auto;
  color: var(--pipeline-callout-text);
  font-size: 12.5px;
  font-weight: 750;
}

#pipelineRunStatsModal .pipeline-run-summary-copy p {
  margin: 0;
  min-width: 0;
  color: var(--pipeline-callout-text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}

#pipelineRunStatsModal .pipeline-run-failure-summary,
#pipelineRunStatsModal .pipeline-run-stats-fetch-error {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(185, 105, 105, 0.34);
  border-radius: 9px;
  background: var(--pipeline-stats-danger-soft);
  color: var(--pipeline-stats-danger);
  font-size: 12px;
  line-height: 1.45;
}

#pipelineRunStatsModal .pipeline-run-failure-summary strong,
#pipelineRunStatsModal .pipeline-run-stats-fetch-error strong {
  font-size: 12.5px;
  font-weight: 780;
}

/* Primary metrics: the first four persisted/configured outcome metrics in a
   single unified lightly-tinted surface with subtle vertical separators -
   not four separately bordered/colored tiles. */
/* Four primary outcome cards: compact HORIZONTAL stat cards - icon tile on
   the left, number + label stacked on the right. Informational only.
   The soft powder-blue / lavender tones below are scoped strictly to these
   cards; no action, button, hero or shell surface uses them. */
#pipelineRunStatsModal .pipeline-run-outcome-primary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--pipeline-tone-0-border);
  border-radius: 14px;
  background: var(--pipeline-tone-0-bg);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--pipeline-tone-0-icon);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-icon svg {
  width: 21px;
  height: 21px;
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric.is-tone-1 {
  border-color: var(--pipeline-tone-1-border);
  background: var(--pipeline-tone-1-bg);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric.is-tone-1 .pipeline-run-outcome-primary-icon {
  color: var(--pipeline-tone-1-icon);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric.is-tone-2 {
  border-color: var(--pipeline-tone-2-border);
  background: var(--pipeline-tone-2-bg);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric.is-tone-2 .pipeline-run-outcome-primary-icon {
  color: var(--pipeline-tone-2-icon);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric.is-tone-3 {
  border-color: var(--pipeline-tone-3-border);
  background: var(--pipeline-tone-3-bg);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric.is-tone-3 .pipeline-run-outcome-primary-icon {
  color: var(--pipeline-tone-3-icon);
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-metric strong {
  overflow-wrap: anywhere;
  color: var(--pipeline-stats-text);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  letter-spacing: -0.032em;
  line-height: 1.05;
}

#pipelineRunStatsModal .pipeline-run-outcome-primary-label {
  color: var(--pipeline-stats-secondary);
  font-size: 12.5px;
  font-weight: 570;
  line-height: 1.3;
}

html:not([data-theme="light"]) #pipelineRunStatsModal .pipeline-run-outcome-primary-icon {
  background: rgba(255, 255, 255, 0.08);
}

/* Secondary metrics: every remaining persisted metric, as a tight compact
   label/value matrix - not another spreadsheet of bordered boxes. */
#pipelineRunStatsModal .pipeline-run-outcome-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 12px;
  margin: 12px 0 0;
}

/* Soft contained rows rather than plain text on horizontal rules. */
#pipelineRunStatsModal .pipeline-run-outcome-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--pipeline-row-surface);
}

#pipelineRunStatsModal .pipeline-run-outcome-secondary-row:hover {
  background: var(--pipeline-stats-accent-soft);
}

#pipelineRunStatsModal .pipeline-run-outcome-secondary-row dt {
  overflow-wrap: anywhere;
  color: var(--pipeline-stats-secondary);
  font-size: 12.5px;
  font-weight: 560;
}

#pipelineRunStatsModal .pipeline-run-outcome-secondary-row dd {
  flex: 0 0 auto;
  margin: 0;
  color: var(--pipeline-stats-text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* Premium full-width disclosure rows (Agent trace, Error details). */
#pipelineRunStatsModal .pipeline-run-disclosure {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--pipeline-panel-border);
  border-radius: 14px;
  background: var(--pipeline-panel-surface);
}

#pipelineRunStatsModal .pipeline-run-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 56px;
  padding: 9px 18px;
  color: var(--pipeline-stats-text);
  cursor: pointer;
  list-style: none;
}

#pipelineRunStatsModal .pipeline-run-disclosure > summary::-webkit-details-marker {
  display: none;
}

#pipelineRunStatsModal .pipeline-run-disclosure > summary:hover {
  background: var(--pipeline-stats-surface-raised);
}

#pipelineRunStatsModal .pipeline-run-disclosure-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--pipeline-callout-bg);
  color: var(--pipeline-tone-0-icon);
}

#pipelineRunStatsModal .pipeline-run-disclosure-icon.is-danger {
  background: var(--pipeline-stats-danger-soft);
  color: var(--pipeline-stats-danger);
}

#pipelineRunStatsModal .pipeline-run-disclosure-icon svg {
  width: 18px;
  height: 18px;
}

#pipelineRunStatsModal .pipeline-run-disclosure-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-disclosure > summary strong {
  font-size: 15px;
  font-weight: 700;
}

#pipelineRunStatsModal .pipeline-run-disclosure > summary small {
  color: var(--pipeline-stats-secondary);
  font-size: 12.5px;
  font-weight: 550;
}

#pipelineRunStatsModal .pipeline-run-disclosure-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--pipeline-stats-muted);
  transition: transform 140ms ease;
}

#pipelineRunStatsModal .pipeline-run-disclosure-chevron svg {
  width: 18px;
  height: 18px;
}

#pipelineRunStatsModal .pipeline-run-disclosure[open] .pipeline-run-disclosure-chevron {
  transform: rotate(90deg);
}

/* Compact inline empty rows - never a large dashed panel. */
#pipelineRunStatsModal .pipeline-run-inline-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 9px;
  background: var(--pipeline-row-surface);
  color: var(--pipeline-stats-secondary);
  font-size: 12.5px;
  font-weight: 550;
}

#pipelineRunStatsModal .pipeline-run-inline-empty svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

#pipelineRunStatsModal .pipeline-run-technical-content {
  padding: 4px 20px 18px;
  border-top: 1px solid var(--pipeline-panel-border);
}

#pipelineRunStatsModal .pipeline-run-technical-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--pipeline-stats-border);
}

#pipelineRunStatsModal .pipeline-run-technical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}

#pipelineRunStatsModal .pipeline-run-technical-grid .pipeline-run-detail-row {
  display: block;
  min-width: 0;
}

#pipelineRunStatsModal .pipeline-run-detail-label {
  margin-bottom: 2px;
  color: var(--pipeline-stats-secondary);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0;
  text-transform: none;
}

#pipelineRunStatsModal .pipeline-run-detail-value {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--pipeline-stats-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

/* Restrained semantic treatment for boolean settings - a small dot, not a
   large pill and not raw debug text. */
#pipelineRunStatsModal .pipeline-run-detail-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pipeline-stats-muted);
}

#pipelineRunStatsModal .pipeline-run-detail-value.is-yes .pipeline-run-detail-dot {
  background: var(--pipeline-tone-0-icon);
}

#pipelineRunStatsModal .pipeline-run-detail-value.is-no .pipeline-run-detail-dot {
  background: var(--pipeline-stats-muted);
  opacity: 0.55;
}

#pipelineRunStatsModal .pipeline-run-stage-chip {
  padding: 5px 9px;
  border: 1px solid var(--pipeline-stats-border);
  border-radius: 7px;
  background: var(--pipeline-stats-surface-raised);
  color: var(--pipeline-stats-muted);
  font-size: 10.5px;
  font-weight: 680;
}

/* Same completed/running/failed/pending language as the hero ribbon, so the
   detailed Stages view and the overview stay visually consistent. */
#pipelineRunStatsModal .pipeline-run-stage-chip.is-complete {
  border-color: var(--pipeline-callout-border);
  background: var(--pipeline-callout-bg);
  color: var(--pipeline-callout-text);
}

#pipelineRunStatsModal .pipeline-run-stage-chip.is-running {
  border-color: rgba(229, 184, 78, 0.42);
  background: rgba(229, 184, 78, 0.13);
  color: var(--pipeline-stats-warning);
}

#pipelineRunStatsModal .pipeline-run-stage-chip.is-failed {
  border-color: rgba(185, 105, 105, 0.34);
  background: var(--pipeline-stats-danger-soft);
  color: var(--pipeline-stats-danger);
}

#pipelineRunStatsModal .pipeline-run-stage-chip.is-pending {
  border-color: var(--pipeline-stats-border);
  background: var(--pipeline-stats-surface-raised);
  color: var(--pipeline-stats-muted);
}

#pipelineRunStatsModal .pipeline-run-detail-panel.agent-trace-panel {
  display: block;
  padding: 18px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Compact, contained empty state - not a giant centered sentence filling
   the disclosure. Scoped to this panel only; unrelated table/list empty
   states elsewhere keep their own existing style. */
#pipelineRunStatsModal .agent-trace-panel .pipeline-runs-empty-cell {
  padding: 16px;
  border: 1px dashed var(--pipeline-stats-border);
  border-radius: 10px;
  background: var(--pipeline-stats-surface-raised);
  font-size: 12px;
}

#pipelineRunStatsModal .agent-trace-json-detail pre {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

#pipelineRunStatsModal .pipeline-run-status.is-success {
  border-color: var(--pipeline-stats-accent-border);
  background: var(--pipeline-stats-accent-soft);
  color: var(--pipeline-stats-accent-text);
}

#pipelineRunStatsModal .pipeline-run-status.is-danger {
  border-color: rgba(185, 105, 105, 0.34);
  background: var(--pipeline-stats-danger-soft);
  color: var(--pipeline-stats-danger);
}

#pipelineRunStatsModal .pipeline-run-status.is-running {
  border-color: rgba(208, 170, 108, 0.34);
  background: rgba(208, 170, 108, 0.11);
  color: var(--pipeline-stats-warning);
}

#pipelineRunStatsModal .pipeline-run-stats-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 210px;
  color: var(--pipeline-stats-muted);
  font-size: 12px;
}

#pipelineRunStatsModal .pipeline-run-stats-loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pipeline-stats-accent);
  animation: pipeline-run-stats-loading-pulse 900ms ease-in-out infinite alternate;
}

#pipelineRunStatsModal .pipeline-run-stats-fetch-error {
  margin: 20px 0;
}

@keyframes pipeline-run-stats-dialog-in {
  from { opacity: 0; transform: translateY(5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pipeline-run-stats-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pipeline-run-stats-dialog-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(3px) scale(0.99); }
}

@keyframes pipeline-run-stats-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes pipeline-run-stats-loading-pulse {
  from { opacity: 0.4; transform: scale(0.86); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1000px) {
  #pipelineRunStatsModal .pipeline-run-hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  #pipelineRunStatsModal .pipeline-run-hero-status {
    grid-column: 1 / -1;
  }

  #pipelineRunStatsModal .pipeline-run-hero-stat:nth-child(2) {
    padding-left: 0;
    border-left: 0;
  }

  #pipelineRunStatsModal .pipeline-run-hero-ribbon {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 800px) {
  #pipelineRunStatsModal .pipeline-run-summary-grid,
  #pipelineRunStatsModal .pipeline-run-technical-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #pipelineRunStatsModal .pipeline-run-summary-item:nth-child(3n + 1) {
    padding-left: 20px;
    border-left: 1px solid var(--pipeline-panel-border);
  }

  #pipelineRunStatsModal .pipeline-run-summary-item:nth-child(2n + 1) {
    padding-left: 0;
    border-left: 0;
  }

  #pipelineRunStatsModal .pipeline-run-summary-item:nth-child(n + 3) {
    border-top: 1px solid var(--pipeline-panel-border);
  }

  #pipelineRunStatsModal .pipeline-run-outcome-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  #pipelineRunStatsModal {
    align-items: end;
    padding: 8px !important;
  }

  #pipelineRunStatsModal .pipeline-run-stats-modal-card {
    width: 100% !important;
    max-height: calc(100dvh - 16px);
    border-radius: 20px !important;
  }

  #pipelineRunStatsModal .pipeline-run-stats-header {
    padding: 20px 20px 16px;
  }

  #pipelineRunStatsModal .pipeline-run-stats-heading h3 {
    font-size: 23px;
  }

  #pipelineRunStatsModal .pipeline-run-stats-body {
    padding: 0 20px 22px;
  }

  #pipelineRunStatsModal .pipeline-run-panel {
    padding: 18px 16px !important;
  }

  #pipelineRunStatsModal .pipeline-run-hero {
    padding: 16px 16px;
  }

  #pipelineRunStatsModal .pipeline-run-hero-bar {
    flex: 0 1 10px;
    width: 10px;
    min-width: 7px;
    height: 28px;
    border-radius: 5px;
  }

  #pipelineRunStatsModal .pipeline-run-hero-ribbon-bars {
    gap: 5px;
  }

  #pipelineRunStatsModal .pipeline-run-outcome-secondary {
    gap: 3px 0;
  }

  #pipelineRunStatsModal .pipeline-run-hero-facts {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #pipelineRunStatsModal .pipeline-run-hero-stat {
    padding-left: 0;
    border-left: 0;
  }

  #pipelineRunStatsModal .pipeline-run-outcome-secondary {
    grid-template-columns: 1fr;
  }

  #pipelineRunStatsModal .pipeline-run-summary-copy {
    flex-wrap: wrap;
  }
}

@media (max-width: 390px) {
  #pipelineRunStatsModal .pipeline-run-summary-grid,
  #pipelineRunStatsModal .pipeline-run-technical-grid,
  #pipelineRunStatsModal .pipeline-run-outcome-primary {
    grid-template-columns: 1fr;
  }

  #pipelineRunStatsModal .pipeline-run-summary-item:nth-child(n) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--pipeline-panel-border);
  }

  #pipelineRunStatsModal .pipeline-run-summary-item:first-child {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #pipelineRunStatsModal,
  #pipelineRunStatsModal .pipeline-run-stats-modal-card,
  #pipelineRunStatsModal .pipeline-run-disclosure-chevron,
  #pipelineRunStatsModal .pipeline-run-stats-loading-dot,
  #pipelineRunStatsModal .pipeline-run-hero-status-icon,
  #pipelineRunStatsModal .pipeline-run-hero-bar {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   saved_scans_library_r1 - Saved Scans library surface (/profile/saved-scans)

   The page previously reused .saved-scans-table-wrap / .saved-scans-table,
   which are welded into the legacy shared table lists above (blue gradient
   header, pastel zebra rows, 18px cells). The markup now uses its own
   namespace so the page leaves that system cleanly instead of fighting it
   with higher-specificity overrides. Scoped to this section only.
   ========================================================================== */

.profile-saved-scans-section {
  --scans-surface: #ffffff;
  --scans-surface-muted: #f8faf9;
  --scans-head-bg: #f4f8f6;
  --scans-border: #d9e4e0;
  --scans-hairline: #e8eeeb;
  --scans-text: #101828;
  --scans-secondary: #667085;
  --scans-muted: #8a949f;
  --scans-accent: #56746d;
  --scans-accent-hover: #49655f;
  --scans-accent-soft: #edf2f0;
  --scans-accent-soft-hover: #e4ece9;
  --scans-accent-border: #c9d6d2;
  --scans-accent-strong: #36534c;
  --scans-focus: rgba(86, 116, 109, 0.14);
  --scans-focus-border: #6f9f93;
  --scans-row-hover: #f6f9f8;
  --scans-track: #e7ecea;
  --scans-fill: #56746d;
  --scans-danger-surface: #fbf1ef;
  --scans-danger-ink: #b45f57;
  --scans-danger-strong: #93443f;
  --scans-danger-border: #e6c8c4;
  --scans-danger-solid: #b85f58;
  --scans-danger-solid-hover: #a7504a;
  --scans-danger-solid-pressed: #93443f;
  --scans-danger-focus: rgba(184, 95, 88, 0.2);
}

html:not([data-theme="light"]) .profile-saved-scans-section,
html[data-theme="dark"] .profile-saved-scans-section {
  --scans-surface: #111a24;
  --scans-surface-muted: #141e29;
  --scans-head-bg: #172230;
  --scans-border: #2a3644;
  --scans-hairline: #222d3a;
  --scans-text: #e8edf3;
  --scans-secondary: #9aa7b5;
  --scans-muted: #7d8894;
  --scans-accent: #7d9c93;
  --scans-accent-hover: #8fada4;
  --scans-accent-soft: rgba(125, 156, 147, 0.16);
  --scans-accent-soft-hover: rgba(125, 156, 147, 0.24);
  --scans-accent-border: #3d5049;
  --scans-accent-strong: #a9c1ba;
  --scans-focus: rgba(125, 156, 147, 0.24);
  --scans-focus-border: #6f9f93;
  --scans-row-hover: #17222e;
  --scans-track: #26313d;
  --scans-fill: #7d9c93;
  --scans-danger-surface: rgba(180, 95, 87, 0.16);
  --scans-danger-ink: #d59189;
  --scans-danger-strong: #e8b0a8;
  --scans-danger-border: #5a3a35;
  --scans-danger-solid: #a5544d;
  --scans-danger-solid-hover: #b56159;
  --scans-danger-solid-pressed: #8f453f;
  --scans-danger-focus: rgba(184, 95, 88, 0.28);
}

/* --- section header ------------------------------------------------------ */

.profile-saved-scans-section .saved-scans-header {
  align-items: flex-start !important;
  gap: 18px;
}

.saved-scans-header-titles {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.saved-scans-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-saved-scans-section .saved-scans-title-row h2 {
  margin: 0 !important;
}

.saved-scans-count-badge {
  display: inline-flex;
  min-width: 24px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--scans-accent-border);
  border-radius: 999px;
  background: var(--scans-accent-soft);
  color: var(--scans-accent-strong);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.profile-saved-scans-section .saved-scans-subtitle {
  margin: 0 !important;
  color: var(--scans-secondary) !important;
  font-size: 13px;
}

.saved-scans-header-captions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 1px;
}

.saved-scans-meta {
  color: var(--scans-secondary);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* The Postgres storage disclosure is preserved verbatim but demoted from a
   full-width tinted banner to a muted caption beside the row meta. */
.saved-scans-storage-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--scans-muted);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.35;
}

.saved-scans-storage-note-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.85;
}

/* --- header controls: search + refresh share one 42px height ------------- */

.profile-saved-scans-section .saved-scans-header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.saved-scans-search {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.saved-scans-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.saved-scans-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--scans-muted);
  pointer-events: none;
}

.profile-saved-scans-section .saved-scans-search .saved-scans-search-input {
  width: 264px;
  max-width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 12px 0 36px !important;
  border: 1px solid var(--scans-border) !important;
  border-radius: 12px !important;
  background: var(--scans-surface) !important;
  background-image: none !important;
  color: var(--scans-text) !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
}

.profile-saved-scans-section .saved-scans-search .saved-scans-search-input::placeholder {
  color: var(--scans-muted) !important;
  opacity: 1;
}

.profile-saved-scans-section .saved-scans-search .saved-scans-search-input:hover {
  border-color: var(--scans-accent-border) !important;
}

.profile-saved-scans-section .saved-scans-search .saved-scans-search-input:focus,
.profile-saved-scans-section .saved-scans-search .saved-scans-search-input:focus-visible {
  outline: 0 !important;
  border-color: var(--scans-focus-border) !important;
  box-shadow: 0 0 0 3px var(--scans-focus) !important;
}

.profile-saved-scans-section .saved-scans-search .saved-scans-search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

body .profile-saved-scans-section .saved-scans-header-controls .saved-scans-refresh-btn {
  display: inline-flex;
  height: 42px !important;
  min-height: 42px !important;
  box-sizing: border-box !important;
  align-items: center;
  gap: 7px;
  padding: 0 14px !important;
  border: 1px solid var(--scans-border) !important;
  border-radius: 12px !important;
  background: var(--scans-surface) !important;
  background-image: none !important;
  color: var(--scans-text) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

body .profile-saved-scans-section .saved-scans-header-controls .saved-scans-refresh-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--scans-accent);
}

body .profile-saved-scans-section .saved-scans-header-controls .saved-scans-refresh-btn:hover {
  border-color: var(--scans-accent-border) !important;
  background: var(--scans-accent-soft-hover) !important;
  color: var(--scans-accent-strong) !important;
  transform: none !important;
}

body .profile-saved-scans-section .saved-scans-header-controls .saved-scans-refresh-btn:focus-visible {
  outline: 3px solid var(--scans-focus) !important;
  outline-offset: 2px;
}

/* --- table surface ------------------------------------------------------- */

.profile-saved-scans-section .saved-scans-library-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--scans-border) !important;
  border-radius: 14px !important;
  background: var(--scans-surface) !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
}

.saved-scans-library-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

/* Global `th` / `td` owners in styles.css paint every table head with a blue
   gradient under !important, so these carry both the section class and their
   own !important to take ownership back for this surface only. */
.profile-saved-scans-section .saved-scans-library-table thead th,
html[data-theme="light"] .profile-saved-scans-section .saved-scans-library-table thead th {
  height: 42px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--scans-border) !important;
  background: var(--scans-head-bg) !important;
  background-image: none !important;
  color: var(--scans-secondary) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 680 !important;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-saved-scans-section .saved-scans-library-table thead th.saved-scans-actions-head {
  text-align: right;
}

.profile-saved-scans-section .saved-scans-library-table tbody td,
html[data-theme="light"] .profile-saved-scans-section .saved-scans-library-table tbody td {
  height: 58px !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--scans-hairline) !important;
  background: var(--scans-surface) !important;
  background-image: none !important;
  color: var(--scans-text) !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  vertical-align: middle !important;
}

.profile-saved-scans-section .saved-scans-library-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* Neutral rows only - no zebra banding. */
.profile-saved-scans-section .saved-scans-library-table tbody tr:nth-child(even) td,
html[data-theme="light"] .profile-saved-scans-section .saved-scans-library-table tbody tr:nth-child(even) td {
  background: var(--scans-surface) !important;
}

.profile-saved-scans-section .saved-scans-library-table tbody tr:hover td,
html[data-theme="light"] .profile-saved-scans-section .saved-scans-library-table tbody tr:hover td {
  background: var(--scans-row-hover) !important;
}

.profile-saved-scans-section .saved-scans-library-table .saved-scans-empty-cell {
  height: 108px !important;
  color: var(--scans-secondary) !important;
  text-align: center;
}

/* --- cells --------------------------------------------------------------- */

.saved-scan-cell-scanned {
  color: var(--scans-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.saved-scan-cell-company {
  color: var(--scans-text);
  font-weight: 680;
}

.saved-scan-cell-role,
.saved-scan-cell-resume {
  max-width: 240px;
}

.saved-scan-cell-resume {
  color: var(--scans-secondary);
}

.saved-scan-truncate {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-scan-source-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--scans-hairline);
  border-radius: 7px;
  background: var(--scans-surface-muted);
  color: var(--scans-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- status: compact dot + label ---------------------------------------- */

.saved-scan-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--scans-hairline);
  border-radius: 999px;
  background: var(--scans-surface-muted);
  color: var(--scans-secondary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.saved-scan-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.saved-scan-status.is-ready {
  border-color: #cbe4db;
  background: #edf7f3;
  color: #27665a;
}

.saved-scan-status.is-ready .saved-scan-status-dot {
  background: #1f9d78;
}

.saved-scan-status.is-failed {
  border-color: #e8c4bf;
  background: #fdf1ef;
  color: #8f4034;
}

.saved-scan-status.is-failed .saved-scan-status-dot {
  background: #c2695c;
}

.saved-scan-status.is-processing,
.saved-scan-status.is-pending {
  border-color: #e9d5a6;
  background: #fdf7e9;
  color: #7d5c17;
}

.saved-scan-status.is-processing .saved-scan-status-dot,
.saved-scan-status.is-pending .saved-scan-status-dot {
  background: #c08b1f;
}

html:not([data-theme="light"]) .saved-scan-status.is-ready,
html[data-theme="dark"] .saved-scan-status.is-ready {
  border-color: #2f5348;
  background: rgba(31, 157, 120, 0.14);
  color: #93c9b6;
}

html:not([data-theme="light"]) .saved-scan-status.is-failed,
html[data-theme="dark"] .saved-scan-status.is-failed {
  border-color: #57352f;
  background: rgba(194, 105, 92, 0.16);
  color: #d9a49b;
}

html:not([data-theme="light"]) .saved-scan-status.is-processing,
html:not([data-theme="light"]) .saved-scan-status.is-pending,
html[data-theme="dark"] .saved-scan-status.is-processing,
html[data-theme="dark"] .saved-scan-status.is-pending {
  border-color: #57492a;
  background: rgba(192, 139, 31, 0.16);
  color: #d8bd85;
}

/* --- match: value + subtle track ---------------------------------------- */

.saved-scan-match {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.saved-scan-match-value {
  min-width: 34px;
  color: var(--scans-text);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.saved-scan-match-track {
  display: block;
  overflow: hidden;
  width: 68px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--scans-track);
}

.saved-scan-match-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--scans-fill);
}

/* --- row actions: two permanently visible icon controls ------------------ */

.saved-scan-cell-actions {
  width: 108px;
  text-align: right;
  white-space: nowrap;
}

.saved-scan-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body .saved-scan-action-btn {
  display: inline-flex;
  width: 36px;
  height: 36px;
  min-height: 36px !important;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 1px solid var(--scans-border) !important;
  border-radius: 10px !important;
  background: var(--scans-surface) !important;
  background-image: none !important;
  color: var(--scans-secondary) !important;
  box-shadow: none !important;
  text-decoration: none;
  transform: none !important;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.saved-scan-action-icon {
  width: 17px;
  height: 17px;
}

body a.saved-scan-action-btn--open:hover,
body button.saved-scan-action-btn--open:not(:disabled):hover {
  border-color: var(--scans-accent-border) !important;
  background: var(--scans-accent-soft) !important;
  color: var(--scans-accent-strong) !important;
}

body .saved-scan-action-btn--delete {
  border-color: var(--scans-danger-border) !important;
  color: var(--scans-danger-ink) !important;
}

body .saved-scan-action-btn--delete:not(:disabled):hover {
  border-color: var(--scans-danger-ink) !important;
  background: var(--scans-danger-surface) !important;
  color: var(--scans-danger-strong) !important;
}

body .saved-scan-action-btn:focus-visible {
  outline: 3px solid var(--scans-focus) !important;
  outline-offset: 2px;
}

body .saved-scan-action-btn:disabled,
body .saved-scan-action-btn[aria-disabled="true"] {
  border-color: var(--scans-hairline) !important;
  background: var(--scans-surface-muted) !important;
  color: var(--scans-muted) !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1180px) {
  .saved-scan-cell-role,
  .saved-scan-cell-resume {
    max-width: 168px;
  }

  .saved-scan-match-track {
    width: 52px;
  }
}

@media (max-width: 900px) {
  .profile-saved-scans-section .saved-scans-header {
    flex-direction: column;
  }

  .profile-saved-scans-section .saved-scans-header-controls {
    width: 100%;
  }

  .profile-saved-scans-section .saved-scans-search {
    flex: 1 1 auto;
  }

  .profile-saved-scans-section .saved-scans-search .saved-scans-search-input {
    width: 100%;
  }
}

/* --- delete confirmation dialog -----------------------------------------
   Presentation only. The lifecycle (openSavedScanDeleteModal ->
   savedScanDeleteConfirmBtn -> DELETE /profile/saved-scans/{id}) is unchanged.
   Scoped to #savedScanDeleteModal with its own classes so the Profile Resume
   delete dialog, which used to share .resume-delete-* rules, is untouched.
   ------------------------------------------------------------------------ */

#savedScanDeleteModal {
  --scan-dlg-surface: #ffffff;
  --scan-dlg-inset: #f7f9f8;
  --scan-dlg-border: #e0e7e4;
  --scan-dlg-text: #101828;
  --scan-dlg-secondary: #667085;
  --scan-dlg-neutral-border: #c9d6d2;
  --scan-dlg-neutral-hover: #edf2f0;
  --scan-dlg-danger-tile: #fbf1ef;
  --scan-dlg-danger-icon: #b45f57;
  --scan-dlg-danger: #b85f58;
  --scan-dlg-danger-hover: #a7504a;
  --scan-dlg-danger-pressed: #93443f;
  --scan-dlg-danger-focus: rgba(184, 95, 88, 0.2);
}

html:not([data-theme="light"]) #savedScanDeleteModal,
html[data-theme="dark"] #savedScanDeleteModal {
  --scan-dlg-surface: #141e29;
  --scan-dlg-inset: #1a2531;
  --scan-dlg-border: #2c3846;
  --scan-dlg-text: #e8edf3;
  --scan-dlg-secondary: #9aa7b5;
  --scan-dlg-neutral-border: #3a4654;
  --scan-dlg-neutral-hover: #202c3a;
  --scan-dlg-danger-tile: rgba(180, 95, 87, 0.18);
  --scan-dlg-danger-icon: #d59189;
  --scan-dlg-danger: #a5544d;
  --scan-dlg-danger-hover: #b56159;
  --scan-dlg-danger-pressed: #8f453f;
  --scan-dlg-danger-focus: rgba(184, 95, 88, 0.28);
}

#savedScanDeleteModal .saved-scan-delete-card {
  position: relative;
  display: grid;
  width: min(496px, calc(100vw - 40px)) !important;
  max-width: min(496px, calc(100vw - 40px)) !important;
  min-width: 0 !important;
  gap: 18px;
  padding: 26px !important;
  border: 1px solid var(--scan-dlg-border) !important;
  border-radius: 20px !important;
  background: var(--scan-dlg-surface) !important;
  background-image: none !important;
  color: var(--scan-dlg-text) !important;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.16) !important;
}

/* compact icon close, replacing the old full-size "Close" text pill */
#savedScanDeleteModal .saved-scan-delete-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  width: 34px;
  height: 34px;
  min-height: 34px !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--scan-dlg-secondary) !important;
  box-shadow: none !important;
  transform: none !important;
}

#savedScanDeleteModal .saved-scan-delete-close svg {
  width: 17px;
  height: 17px;
}

#savedScanDeleteModal .saved-scan-delete-close:hover {
  background: var(--scan-dlg-neutral-hover) !important;
  color: var(--scan-dlg-text) !important;
}

#savedScanDeleteModal .saved-scan-delete-close:focus-visible {
  outline: 3px solid var(--scan-dlg-danger-focus) !important;
  outline-offset: 2px;
}

#savedScanDeleteModal .saved-scan-delete-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-right: 38px;
}

#savedScanDeleteModal .saved-scan-delete-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--scan-dlg-danger-tile);
  color: var(--scan-dlg-danger-icon);
}

#savedScanDeleteModal .saved-scan-delete-icon svg {
  width: 20px;
  height: 20px;
}

#savedScanDeleteModal .saved-scan-delete-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

#savedScanDeleteModal .saved-scan-delete-copy h3 {
  margin: 0 !important;
  color: var(--scan-dlg-text) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.25;
}

#savedScanDeleteModal .saved-scan-delete-copy p {
  margin: 0 !important;
  color: var(--scan-dlg-secondary) !important;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.45;
}

/* the selected scan identity, structured instead of a run-on sentence */
#savedScanDeleteModal .saved-scan-delete-summary {
  display: grid;
  margin: 0 !important;
  gap: 9px;
  padding: 15px !important;
  border: 1px solid var(--scan-dlg-border) !important;
  border-radius: 12px !important;
  background: var(--scan-dlg-inset) !important;
}

#savedScanDeleteModal .saved-scan-delete-summary-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
}

#savedScanDeleteModal .saved-scan-delete-summary dt {
  margin: 0;
  color: var(--scan-dlg-secondary);
  font-size: 12px;
  font-weight: 600;
}

#savedScanDeleteModal .saved-scan-delete-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--scan-dlg-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

/* the joined label is preserved for assistive tech, not shown twice */
#savedScanDeleteModal .saved-scan-delete-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

#savedScanDeleteModal .saved-scan-delete-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#savedScanDeleteModal .saved-scan-delete-cancel-btn,
#savedScanDeleteModal .saved-scan-delete-confirm-btn {
  display: inline-flex;
  height: 40px;
  min-height: 40px !important;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0 16px !important;
  border-radius: 10px !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  transform: none !important;
}

#savedScanDeleteModal .saved-scan-delete-cancel-btn {
  border: 1px solid var(--scan-dlg-neutral-border) !important;
  background: var(--scan-dlg-surface) !important;
  color: var(--scan-dlg-text) !important;
}

#savedScanDeleteModal .saved-scan-delete-cancel-btn:hover {
  background: var(--scan-dlg-neutral-hover) !important;
  color: var(--scan-dlg-text) !important;
}

#savedScanDeleteModal .saved-scan-delete-confirm-btn {
  border: 1px solid var(--scan-dlg-danger) !important;
  background: var(--scan-dlg-danger) !important;
  color: #ffffff !important;
}

#savedScanDeleteModal .saved-scan-delete-confirm-btn:hover {
  border-color: var(--scan-dlg-danger-hover) !important;
  background: var(--scan-dlg-danger-hover) !important;
  color: #ffffff !important;
}

#savedScanDeleteModal .saved-scan-delete-confirm-btn:active {
  border-color: var(--scan-dlg-danger-pressed) !important;
  background: var(--scan-dlg-danger-pressed) !important;
}

#savedScanDeleteModal .saved-scan-delete-cancel-btn:focus-visible,
#savedScanDeleteModal .saved-scan-delete-confirm-btn:focus-visible {
  outline: 3px solid var(--scan-dlg-danger-focus) !important;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  #savedScanDeleteModal .saved-scan-delete-summary-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  #savedScanDeleteModal .saved-scan-delete-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

/* Final wordmark rail constraint: later legacy logo dimensions must not crop it. */
body.app-shell-collapsed .app-shell-brand-logo {
  width: 44px !important;
  max-width: 44px !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Profile User Access: role cards and scoped role confirmation. */
#profileAdminUsersSection, #adminUserRoleModal {
  --ua-blue: #8db0ff; --ua-blue-soft: #202e50;
  --ua-purple: #ceb1ff; --ua-purple-soft: #302443;
  --ua-green: #67e2ac; --ua-green-soft: #15372f;
  --ua-red: #ff94a1; --ua-red-soft: #3b252e;
  --ua-neutral: #233049; --ua-line: var(--app-border);
  --ua-surface: var(--app-surface); --ua-text: var(--app-text);
  --ua-muted: var(--app-muted);
}
html[data-theme="light"] #profileAdminUsersSection,
html[data-theme="light"] #adminUserRoleModal {
  --ua-blue: #0057ee; --ua-blue-soft: #e8f0ff;
  --ua-purple: #6415c6; --ua-purple-soft: #f2ebff;
  --ua-green: #087448; --ua-green-soft: #edf8f3;
  --ua-red: #d70824; --ua-red-soft: #fff3f4;
  --ua-neutral: #f0f2f6; --ua-line: #e2e8f1;
  --ua-surface: #fff; --ua-text: #0e1429; --ua-muted: #60708e;
}
#profileAdminUsersSection { padding: 24px !important; border-radius: 12px !important; min-width: 0; background: var(--ua-surface) !important; box-shadow: none !important; }
#profileAdminUsersSection .user-access-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
#profileAdminUsersSection .user-access-header,
#profileAdminUsersSection .user-access-list,
#profileAdminUsersSection .user-access-note { width: calc(100% - 20px); margin-left: auto; margin-right: auto; }
#profileAdminUsersSection h2 { font-size: 26px !important; line-height: 1.25; letter-spacing: -.6px; margin: 0 0 6px; color: var(--ua-text) !important; }
#profileAdminUsersSection #adminUsersMeta { font-size: 15px; color: var(--ua-muted); }
.user-access-header-actions, .user-role-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-access-header-actions { gap: 24px; }
.user-role-count { display: inline-flex; align-items: center; gap: 9px; border-radius: 24px; padding: 12px 18px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.user-role-count.role-user { color: var(--ua-green); background: var(--ua-green-soft); }
.user-role-count svg, .user-role-badge svg { width: 20px; height: 20px; flex-shrink: 0; }
.role-super_user { color: var(--ua-purple); background: var(--ua-purple-soft); }
.role-admin, .user-role-badge.role-user { color: var(--ua-blue); background: var(--ua-blue-soft); }
.role-executive { color: var(--ua-muted); background: var(--ua-neutral); }
html #profileAdminUsersSection #refreshAdminUsersBtn,
#profileAdminUsersSection .user-role-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 10px 20px; border: 1px solid var(--ua-blue) !important; border-radius: 7px !important; color: var(--ua-blue) !important; background: transparent !important; box-shadow: none !important; font-size: 14px !important; font-weight: 600 !important; white-space: nowrap; }
html[data-theme="light"] #profileAdminUsersSection #refreshAdminUsersBtn { border-color: var(--ua-blue) !important; background: transparent !important; color: var(--ua-blue) !important; }
.user-access-refresh svg { width: 20px; height: 20px; }
#profileAdminUsersSection .user-role-action.is-remove { border-color: var(--ua-red) !important; color: var(--ua-red) !important; }
#profileAdminUsersSection .user-role-action:hover, #profileAdminUsersSection .user-access-refresh:hover { background: var(--ua-blue-soft) !important; }
.user-access-list { display: grid; gap: 13px; min-width: 0; }
.user-access-row { display: grid; grid-template-columns: minmax(180px,1.6fr) minmax(125px,.85fr) minmax(105px,.9fr) minmax(165px,1.2fr) 164px 24px; align-items: center; gap: 10px; padding: 19px; min-height: 102px; border: 1px solid var(--ua-line); border-radius: 10px; background: var(--ua-surface); }
.user-access-primary { justify-self: stretch; }
.user-access-primary > * { width: 100%; text-align: center; }
.user-access-identity, .user-role-identity { display: flex; align-items: center; gap: 22px; min-width: 0; }
.user-access-avatar { width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; background: #dbe8ff; color: #0057df; }
.user-access-avatar.tone-1 { background: #daf7e5; color: #08764e; }
.user-access-avatar.tone-2 { background: #e9d9ff; color: #6d17be; }
.user-access-avatar.tone-3 { background: #ffebce; color: #985200; }
.user-access-person { display: grid; gap: 4px; min-width: 0; }
.user-access-person strong { color: var(--ua-text); font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.user-access-person span { color: var(--ua-muted); font-size: 14px; overflow-wrap: anywhere; }
.user-role-badge { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; padding: 9px 13px; border-radius: 10px; white-space: nowrap; }
.user-access-status { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; font-size: 13px; font-weight: 600; border-radius: 10px; white-space: nowrap; }
.user-access-status.is-authorized { color: var(--ua-green); background: var(--ua-green-soft); }
.user-access-status.is-revoked { color: var(--ua-red); background: var(--ua-red-soft); }
.user-access-status.is-protected { color: var(--ua-muted); background: var(--ua-neutral); }
.user-access-status svg { height: 18px; width: 18px; }
.user-access-status-dot { height: 9px; width: 9px; border-radius: 50%; background: currentColor; }
.user-access-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; font-size: 13px; line-height: 1.5; }
.user-access-dates > div { display: grid; gap: 2px; }
.user-access-dates span { color: var(--ua-muted); }
.user-access-dates time { color: var(--ua-text); }
.user-access-protected-label { display: inline-block; padding: 12px 20px; border-radius: 9px; background: var(--ua-neutral); color: var(--ua-muted); font-size: 13px; font-weight: 600; }
.user-access-more { position: relative; }
.user-access-more summary { list-style: none; text-align: center; cursor: pointer; font-size: 25px; color: var(--ua-muted); border-radius: 6px; }
.user-access-more summary::-webkit-details-marker { display: none; }
.user-access-menu { position: absolute; z-index: 8; right: 0; top: 36px; display: grid; gap: 12px; min-width: 190px; padding: 14px; background: var(--ua-surface); border: 1px solid var(--ua-line); border-radius: 10px; box-shadow: var(--app-shadow-md); }
.user-access-menu .admin-user-delete-btn { border-top: 1px solid var(--ua-line) !important; }
.user-access-note { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 17px 20px; background: var(--ua-blue-soft); color: var(--ua-blue); border: 1px solid color-mix(in srgb,var(--ua-blue) 20%,transparent); border-radius: 9px; font-size: 13px; line-height: 1.6; }
.user-access-info-icon { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border: 2px solid currentColor; border-radius: 50%; font-weight: 700; font-style: normal; flex-shrink: 0; line-height: 1; }
.user-role-modal-open { overflow: hidden; }
#adminUserRoleModal { position: fixed; inset: 0; z-index: 2000; display: flex !important; align-items: center; justify-content: center; padding: 20px; background: rgba(24,32,42,.46); backdrop-filter: none; }
#adminUserRoleModal.hidden { display: none !important; }
#adminUserRoleModal .user-role-dialog { position: relative; width: 560px !important; max-width: 100% !important; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 30px 24px 0 !important; border: 1px solid var(--ua-line); border-radius: 11px !important; background: var(--ua-surface) !important; color: var(--ua-text); box-shadow: 0 24px 70px #0003; }
#adminUserRoleModal .user-role-close { position: absolute; top: 12px; right: 14px; background: transparent !important; color: var(--ua-muted) !important; border: none !important; box-shadow: none !important; padding: 4px 9px; min-height: 30px; font-size: 25px !important; font-weight: 400 !important; }
.user-role-heading { display: flex; gap: 18px; padding-right: 14px; }
.user-role-security-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: #fff4df; color: #cc8200; }
.user-role-security-icon svg { width: 28px; height: 28px; }
#adminUserRoleModal h3 { font-size: 21px !important; line-height: 1.3; margin: 6px 0 7px; color: var(--ua-text) !important; font-weight: 700; letter-spacing: -.35px; }
#adminUserRoleModal p { color: var(--ua-muted); font-size: 13px; line-height: 1.7; margin: 0; }
.user-role-identity { margin-top: 18px; padding: 17px 16px; background: color-mix(in srgb,var(--ua-neutral) 60%,var(--ua-surface)); border: 1px solid var(--ua-line); border-radius: 9px; }
.user-role-identity .user-access-avatar { width: 50px; height: 50px; font-size: 18px; }
.user-role-permissions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.user-role-permissions > section { border: 1px solid color-mix(in srgb,currentColor 10%,transparent); border-radius: 9px; padding: 17px; }
.user-role-positive { color: var(--ua-green); background: var(--ua-green-soft); }
.user-role-restricted { color: var(--ua-red); background: var(--ua-red-soft); }
#adminUserRoleModal h4 { color: inherit; font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.user-role-positive h4 span { display: block; font-size: 11px; font-weight: 400; }
.user-role-permissions ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.user-role-permissions li { position: relative; padding-left: 26px; color: var(--ua-text); font-size: 12px; line-height: 1.5; }
.user-role-permissions li::before { position: absolute; left: 0; content: "✓"; color: var(--ua-green); font-weight: 700; font-size: 17px; line-height: 1; }
.user-role-restricted li::before { content: ""; width: 13px; height: 16px; background: var(--ua-red); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'%3E%3Cpath d='M4 8V5a4 4 0 0 1 8 0v3M2 8h12v10H2zM8 11v4' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat; }
.user-role-note { display: flex; align-items: flex-start; gap: 13px; margin-top: 20px; padding: 18px 0; border-top: 1px solid var(--ua-line); }
.user-role-note .user-access-info-icon { color: var(--ua-blue); width: 20px; height: 20px; font-size: 12px; margin-top: 2px; }
#adminUserRoleModal .user-role-footer { display: flex; justify-content: flex-end; gap: 12px; margin: 0 -24px; padding: 18px 24px; border-top: 1px solid var(--ua-line); }
#adminUserRoleModal .user-role-footer button { min-height: 42px; border-radius: 7px !important; padding: 10px 22px; font-size: 14px !important; font-weight: 600 !important; box-shadow: none !important; }
#adminUserRoleModal .user-role-cancel { background: transparent !important; border: 1px solid var(--ua-line) !important; color: var(--ua-text) !important; }
#adminUserRoleModal .user-role-confirm { background: #075be8 !important; border: 1px solid #075be8 !important; color: #fff !important; }
#adminUserRoleModal .user-role-confirm.is-remove { background: #d70824 !important; border-color: #d70824 !important; }
#adminUserRoleModal button:disabled { opacity: .5; cursor: wait; }
#adminUserRoleModal .user-role-error { color: var(--ua-red); padding-bottom: 12px; }
#profileAdminUsersSection :focus-visible, #adminUserRoleModal :focus-visible { outline: 3px solid var(--ua-blue); outline-offset: 3px; }
@media (max-width: 1279px) {
  #profileAdminUsersSection .user-access-header { align-items: flex-start; flex-wrap: wrap; }
  .user-access-row { grid-template-columns: minmax(200px,1fr) 135px 125px 164px 24px; }
  .user-access-dates { grid-column: 1 / 4; grid-row: 2; display: flex; gap: 36px; }
  .user-access-primary { grid-column: 4; grid-row: 1 / 3; }
  .user-access-more, .user-access-overflow-placeholder { grid-column: 5; grid-row: 1 / 3; }
}
@media (max-width: 1100px) {
  .user-access-row { grid-template-columns: minmax(0,1fr) auto 24px; gap: 16px 10px; }
  .user-access-identity { grid-column: 1 / 3; }
  .user-access-row > div:nth-child(2) { grid-column: 1; }
  .user-access-row > div:nth-child(3) { grid-column: 2; }
  .user-access-dates { grid-column: 1 / 4; grid-row: 3; }
  .user-access-primary { grid-column: 1 / 4; grid-row: 4; }
  .user-access-more, .user-access-overflow-placeholder { grid-column: 3; grid-row: 1; }
  .user-access-header-actions { gap: 14px; }
}
@media (max-width: 540px) {
  #profileAdminUsersSection { padding: 16px !important; }
  #profileAdminUsersSection .user-access-header,
  #profileAdminUsersSection .user-access-list,
  #profileAdminUsersSection .user-access-note { width: 100%; }
  .user-role-summary { gap: 6px; }
  .user-role-count { padding: 8px 10px; font-size: 11px; gap: 5px; }
  .user-access-row { padding: 14px; }
  .user-access-identity { gap: 12px; }
  .user-access-avatar { width: 46px; height: 46px; font-size: 16px; }
  .user-access-primary button { width: 100%; }
  .user-access-note { padding: 13px; align-items: flex-start; }
  #adminUserRoleModal { padding: 12px; }
  #adminUserRoleModal .user-role-dialog { max-height: calc(100dvh - 24px); padding: 25px 18px 0 !important; }
  .user-role-heading { gap: 12px; }
  .user-role-security-icon { width: 40px; height: 40px; }
  .user-role-permissions { grid-template-columns: 1fr; }
  #adminUserRoleModal .user-role-footer { margin: 0 -18px; padding: 16px 18px; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .user-access-row > div:nth-child(2) { grid-column: 1 / 4; grid-row: 2; }
  .user-access-row > div:nth-child(3) { grid-column: 1 / 4; grid-row: 3; }
  .user-access-dates { grid-row: 4; }
  .user-access-primary { grid-row: 5; }
}
