/*
 * Next-stage shared UI foundation (UX1 / UX2).
 *
 * This is intentionally an additive final layer: it standardizes interaction
 * feedback and readable text roles without changing approved page layouts,
 * the executive sidebar, or the employee PWA theme system.
 */

:root {
  --sc-next-emerald: #078b69;
  --sc-next-emerald-pressed: #056a51;
  --sc-next-emerald-soft: #e7f8f2;
  --sc-next-focus: #078b69;
  --sc-next-focus-halo: rgb(7 139 105 / 24%);
  --sc-next-error: #c9364a;
  --sc-next-error-halo: rgb(201 54 74 / 18%);
  --sc-next-body-size: 16px;
  --sc-next-control-size: 14px;
  --sc-next-caption-size: 14px;
  --sc-next-control-line: 1.45;
}

/* Text selection is part of the product surface. Browser and OS chrome stay native. */
:is(.sc-app-shell, .sc-auth-shell, .sc-demo-entry-page, .sc-public-task-page) ::selection {
  background: var(--sc-next-emerald);
  color: #fff;
}

/* Keep one visible keyboard affordance after legacy rules remove outlines. */
:is(.sc-app-shell, .sc-auth-shell, .sc-demo-entry-page, .sc-public-task-page, .sc-tour, .sc-search-dialog, .sc-modal)
  :is(a, button, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
  outline: 3px solid var(--sc-next-focus);
  outline-offset: 3px;
}

/* 16px content, 14px compact controls/tables, and never-sub-14px meaningful support copy. */
.sc-app-shell .sc-content,
.sc-auth-shell,
.sc-demo-entry-page,
.sc-public-task-page {
  font-size: var(--sc-next-body-size);
  line-height: 1.5;
}

.sc-app-shell :is(.sc-table, .sc-toolbar, .sc-filter-field, .sc-form, .sc-form-card, .sc-btn, .sc-input, .sc-select),
.sc-auth-shell :is(.sc-form-control, .sc-btn, .sc-password-toggle),
.sc-demo-entry-page :is(button),
.sc-public-task-page :is(textarea, button) {
  font-size: var(--sc-next-control-size);
  line-height: var(--sc-next-control-line);
}

/* Dense calendars retain their purpose-built compact treatment; ordinary data tables stay readable. */
.sc-app-shell .sc-table:not(.sc-table--compact) :is(th, td) {
  font-size: var(--sc-next-control-size);
  line-height: var(--sc-next-control-line);
}

.sc-app-shell :is(.sc-form-card__sub, .sc-help, .sc-error, .sc-message, .sc-callout__body, .sc-info-callout__body, .sc-secure-callout__body),
.sc-auth-shell :is(.sc-login-entry__header p, .sc-login-entry__access-note, .sc-entry-error, .sc-entry-field-error, .sc-entry-status, .sc-login-entry__help),
.sc-demo-entry-page :is(.sc-demo-entry__lead, .sc-demo-entry__explore, .sc-demo-entry__status),
.sc-public-task-page :is(.desc, .meta, .note, .done-tag, .tg-btn, .tg-ok) {
  font-size: var(--sc-next-caption-size);
  line-height: 1.5;
}

.sc-app-shell :is(.sc-page-title, .sc-page-heading) { font-size: clamp(28px, 2.2vw, 32px); line-height: 1.15; }
.sc-app-shell :is(.sc-card__title, .sc-form-card__title, .sc-section-title) { font-size: clamp(18px, 1.45vw, 20px); line-height: 1.25; }

/* `_ui_assets.html` is only used by the employee and owner PWA screens. */
body :is(.lv-item__dates, .ntf__time, .status-card__date, .stat__l, .hrow__wd, .hrow__tm,
  .ern-money__l, .ern-ded, .tsk__desc, .tsk__due, .tsk__note, .day-sub, .cal-legend,
  .snote, .sc-field__hint, .sc-row__meta, .operson__meta, .mrow__meta) {
  font-size: var(--sc-next-caption-size);
  line-height: 1.5;
}

/* Native controls keep their platform behavior while the closed control uses StaffControl green. */
:is(.sc-app-shell, .sc-auth-shell, .sc-demo-entry-page, .sc-public-task-page) :is(input, select, textarea) {
  accent-color: var(--sc-next-emerald);
}

.sc-app-shell :is(.sc-form-control, .sc-input, .sc-select, .sc-toolbar input, .sc-toolbar select, .sc-filter-field input, .sc-filter-field select, .sc-filter-field textarea),
.sc-auth-shell .sc-form-control,
.sc-public-task-page textarea {
  border-color: var(--sc-color-border, var(--border, #d5e4df));
  font-size: var(--sc-next-control-size);
}

.sc-app-shell :is(.sc-form-control, .sc-input, .sc-select, .sc-toolbar input, .sc-toolbar select, .sc-filter-field input, .sc-filter-field select, .sc-filter-field textarea):focus,
.sc-auth-shell .sc-form-control:focus,
.sc-public-task-page textarea:focus {
  border-color: var(--sc-next-emerald);
  box-shadow: 0 0 0 3px var(--sc-next-focus-halo);
}

:is(.sc-app-shell, .sc-auth-shell) :is(input, textarea, select)[aria-invalid="true"],
.sc-auth-shell .sc-entry-field--error {
  border-color: var(--sc-next-error) !important;
  box-shadow: 0 0 0 3px var(--sc-next-error-halo);
}

:is(.sc-app-shell, .sc-auth-shell) :is(input, textarea, select)[aria-invalid="true"]:focus,
.sc-auth-shell .sc-entry-field--error:focus {
  outline-color: var(--sc-next-error);
}

:is(.sc-app-shell, .sc-auth-shell) input:-webkit-autofill,
:is(.sc-app-shell, .sc-auth-shell) input:-webkit-autofill:hover,
:is(.sc-app-shell, .sc-auth-shell) input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--sc-color-text, var(--foreground, #1c2c3a));
  box-shadow: 0 0 0 1000px var(--sc-color-surface, var(--card, #fff)) inset, 0 0 0 3px var(--sc-next-focus-halo);
  caret-color: var(--sc-color-text, var(--foreground, #1c2c3a));
}

/* Pressed feedback complements, rather than replaces, native disabled/loading behavior. */
.sc-app-shell :is(.sc-btn, .sc-btn-primary, .sc-btn--primary, .sc-search-btn, .sc-sidebar-toggle, .sc-theme-toggle),
.sc-auth-shell :is(.sc-btn, .sc-password-toggle),
.sc-demo-entry-page .sc-demo-entry__submit,
.sc-public-task-page button {
  -webkit-tap-highlight-color: rgb(7 139 105 / 18%);
}

.sc-app-shell :is(.sc-btn, .sc-search-btn, .sc-sidebar-toggle, .sc-theme-toggle):active:not(:disabled),
.sc-auth-shell :is(.sc-btn, .sc-password-toggle):active:not(:disabled),
.sc-demo-entry-page .sc-demo-entry__submit:active:not(:disabled),
.sc-public-task-page button:active:not(:disabled) {
  transform: translateY(1px);
}

.sc-app-shell :is(.sc-btn-primary, .sc-btn--primary):active:not(:disabled),
.sc-auth-shell .sc-btn:is(.sc-btn-primary, .sc-btn--primary):active:not(:disabled),
.sc-demo-entry-page .sc-demo-entry__submit:active:not(:disabled),
.sc-public-task-page button:active:not(:disabled) {
  background-color: var(--sc-next-emerald-pressed);
  border-color: var(--sc-next-emerald-pressed);
}

.sc-app-shell :is(.sc-table tbody tr, .sc-list-row, .sc-select2__option)[aria-selected="true"],
.sc-app-shell :is(.sc-table tbody tr, .sc-list-row).is-selected {
  background: var(--sc-next-emerald-soft);
  box-shadow: inset 3px 0 0 var(--sc-next-emerald);
}

@media (max-width: 768px) {
  /* Avoid iOS zoom while retaining the compact desktop control role. */
  :is(.sc-app-shell, .sc-auth-shell, .sc-demo-entry-page, .sc-public-task-page)
    :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px;
  }
}

@media (forced-colors: active) {
  /* Let the operating system render its required contrast palette. */
  :is(.sc-app-shell, .sc-auth-shell, .sc-demo-entry-page, .sc-public-task-page) ::selection {
    forced-color-adjust: auto;
  }

  :is(.sc-app-shell, .sc-auth-shell, .sc-demo-entry-page, .sc-public-task-page)
    :is(a, button, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
    outline-color: Highlight;
  }
}

/* The existing theme switch also updates the reference shell's color tokens. */
html[data-design="executive"][data-theme="dark"] {
  --scr-ink:#eef6f5;
  --scr-muted:#a0b7bd;
  --scr-page:#101c24;
  --scr-surface:#172730;
  --scr-border:#304650;
  --scr-mint:#143c32;
  --sc-color-page:var(--scr-page);
  --sc-color-surface:var(--scr-surface);
  --sc-color-text:var(--scr-ink);
  --sc-color-text-muted:var(--scr-muted);
  --sc-color-border:var(--scr-border);
}
html[data-design="executive"][data-theme="dark"] .sc-app-shell .sc-topbar {
  background:var(--scr-surface);
}
html[data-design="executive"][data-theme="dark"] .sc-app-shell :is(.sc-search-btn,.sc-search-btn__key) {
  background:var(--scr-page);border-color:var(--scr-border);color:var(--scr-muted);
}
html[data-design="executive"][data-theme="dark"] .sc-company-pill {
  color:#c9f5e6;background:#153b32;border-color:#2a6c58;
}
html[data-design="executive"][data-theme="dark"] .sc-topbar-motto { color:var(--scr-muted); }

/* The journey pages predate the shell tokens, so their light surfaces need an
   explicit dark counterpart instead of inheriting a foreground-only theme. */
html[data-design="executive"][data-theme="dark"] .scr-dashboard :is(.scr-dashboard-greeting, .sc-kpi-card, .sc-owner-dashboard__filters-summary, .sc-owner-dashboard__filters-body, .sc-card, .sc-premium-table-card),
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(.sc-staff-kpi, .sc-staff-directory-controls, .sc-staff-table-card, .sc-staff-dept-chart, .sc-staff-employee-drawer, .sc-staff-detail-tile, .sc-staff-preview-loading, .sc-staff-preview-error),
html[data-design="executive"][data-theme="dark"] .sc-attendance :is(.sc-card, .sc-attendance-kpi, .sc-attendance-filter__period, .sc-attendance-filter__select, .sc-attendance-search, .sc-attendance-row-menu > div),
html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-card, .jp-filter-card, .jp-tabs, .jp-summary__item, .jp-mobile-card, .jp-search, .jp-filter-chips button, .jp-bulk-fields input, .jp-bulk-fields select, .jp-bulk-modes select) {
  background: var(--scr-surface);
  border-color: var(--scr-border);
  color: var(--scr-ink);
}

html[data-design="executive"][data-theme="dark"] .scr-dashboard :is(.scr-dashboard-greeting blockquote, .scr-dashboard-quick__grid a),
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(.sc-staff-filters__search, .sc-staff-control-btn--filter, .sc-staff-table thead th, .sc-staff-table tbody tr:nth-child(even) td, .sc-staff-table tbody tr:nth-child(odd) td, .sc-staff-table-scroll::after),
html[data-design="executive"][data-theme="dark"] .sc-attendance :is(.sc-attendance-tabs a, .sc-attendance-table .sc-table thead th, .sc-attendance-table .sc-table tbody td, .sc-attendance-table .sc-table tbody tr:hover td, .sc-attendance-face dl),
html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-attention li, .jp-departments li, .jp-rate-list header, .jp-bulk-fields .jp-toggle, .jp-impact, .jp-tabs__period) {
  background: var(--scr-page);
  border-color: var(--scr-border);
  color: var(--scr-ink);
}

html[data-design="executive"][data-theme="dark"] .scr-dashboard :is(h1, h2, h3, strong, .scr-dashboard-greeting p, .scr-dashboard-greeting blockquote, .scr-dashboard-quick__grid a, .sc-table :is(th, td)),
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(h2, h3, strong, .sc-staff-table :is(th, td), .sc-staff-person, .sc-staff-table__primary, .sc-staff-facts dd, .sc-staff-detail-tile--work dd),
html[data-design="executive"][data-theme="dark"] .sc-attendance :is(h1, h2, strong, .sc-attendance-kpi__label, .sc-attendance-table .sc-table :is(th, td), .sc-attendance-table__person a, .sc-attendance-face__person strong, .sc-attendance-events__name, .sc-attendance-anomalies li, .sc-attendance-donut__legend strong),
html[data-design="executive"][data-theme="dark"] .jp-page :is(h1, h2, h3, strong, .jp-summary__item strong, .jp-related strong, .jp-calculation__table :is(th, td), .jp-bulk-fields label, .jp-rate-list li) {
  color: var(--scr-ink);
}

html[data-design="executive"][data-theme="dark"] .scr-dashboard :is(time, cite, small, .scr-dashboard-greeting p),
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(small, .sc-staff-filter-label, .sc-staff-card-content__identity p, .sc-staff-detail-tile p, .sc-staff-facts dt, .sc-staff-detail-tile--work dt, .sc-staff-preview-head > span, .sc-staff-task-preview__meta, .sc-staff-preview-empty, .sc-staff-salary-summary small),
html[data-design="executive"][data-theme="dark"] .sc-attendance :is(.sc-attendance-kpi small, .sc-attendance-table__head p, .sc-attendance-table__person small, .sc-attendance-face__person :is(small, span), .sc-attendance-face dt, .sc-attendance-face__empty p, .sc-attendance-events li time, .sc-attendance-anomalies li small, .sc-attendance-trend header p, .sc-attendance-trend__legend, .sc-attendance-donut__legend),
html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-muted, .jp-summary__item :is(span, small), .jp-explainer p, .jp-ready > p:not(.jp-section-kicker), .jp-calculation__header p, .jp-individual-rates p, .jp-individual-rates li span, .jp-bulk header > div > p:not(.jp-section-kicker), .jp-bulk-modes small, .jp-related small) {
  color: var(--scr-muted);
}

html[data-design="executive"][data-theme="dark"] .scr-dashboard-hero,
html[data-design="executive"][data-theme="dark"] .sc-attendance-hero,
html[data-design="executive"][data-theme="dark"] .jp-hero {
  border-color: var(--scr-border);
  background: linear-gradient(110deg, #172d36 0%, #153c35 62%, #075847 100%);
}
html[data-design="executive"][data-theme="dark"] :is(.scr-dashboard-hero, .sc-attendance-hero, .jp-hero) :is(h1, p, .jp-asof, .jp-hero__copy .jp-scope) { color: var(--scr-ink); }
html[data-design="executive"][data-theme="dark"] .scr-dashboard-hero__picture::before,
html[data-design="executive"][data-theme="dark"] .sc-attendance-hero__portrait::after,
html[data-design="executive"][data-theme="dark"] .jp-hero__portrait::after {
  background: linear-gradient(90deg, #172d36 0%, transparent 55%, rgb(2 28 32 / 38%) 100%);
}
html[data-design="executive"][data-theme="dark"] .sc-attendance-hero__quote { color: var(--scr-ink); border-color: #4ec89d; }
html[data-design="executive"][data-theme="dark"] .sc-attendance-hero__quote span { color: var(--scr-muted); }

html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(input, select),
html[data-design="executive"][data-theme="dark"] .sc-attendance :is(input, select) {
  background-color: var(--scr-page);
  color: var(--scr-ink);
  border-color: var(--scr-border);
}
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign .sc-staff-card-content__tabs,
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(.sc-staff-detail-tile, .sc-staff-task-preview li) {
  border-color: var(--scr-border);
}
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign .sc-staff-attendance-ring::before { background: var(--scr-surface); }
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign .sc-staff-task-priority { background: #153c32; color: #a9ecd3; }

html[data-design="executive"][data-theme="dark"] .sc-attendance :is(.sc-attendance-face__scan, .sc-attendance-kpi__icon) { background: #143c32; }
html[data-design="executive"][data-theme="dark"] .sc-attendance :is(.sc-attendance-table .sc-table tbody td, .sc-attendance-table .sc-table thead th) { border-color: var(--scr-border); }
html[data-design="executive"][data-theme="dark"] .sc-attendance-tabs a:not([aria-current="page"]),
html[data-design="executive"][data-theme="dark"] .sc-attendance-face__link { color: var(--scr-ink); border-color: var(--scr-border); }

html[data-design="executive"][data-theme="dark"] .jp-page {
  --jp-ink: var(--scr-ink);
  --jp-muted: var(--scr-muted);
  --jp-line: var(--scr-border);
  --jp-mint: #143c32;
}
html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-summary__item--accent, .jp-ready, .jp-next-action) { background: linear-gradient(145deg, #17392f, #143029); }
html[data-design="executive"][data-theme="dark"] .jp-page .jp-summary__item--warning { background: #3c3020; border-color: #775a2d; }
html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-calculation__table th, .jp-calculation__table th:first-child, .jp-calculation__table td:first-child) { background: var(--scr-page); color: var(--scr-ink); }

/* Summary text is ordinary support copy even where the original journey used 9–11px. */
.sc-staff-redesign :is(.sc-staff-kpi__body small, .sc-staff-table :is(th, td, small), .sc-staff-filter-label, .sc-staff-detail-tile p, .sc-staff-facts :is(dt, dd), .sc-staff-detail-tile--work :is(dt, dd), .sc-staff-preview-head > span, .sc-staff-attendance-summary :is(strong, p), .sc-staff-salary-summary small, .sc-staff-task-preview :is(li, .sc-staff-task-preview__meta), .sc-staff-preview-empty),
.sc-attendance :is(.sc-attendance-kpi__label, .sc-attendance-kpi small, .sc-attendance-filter, .sc-attendance-table__head p, .sc-attendance-table .sc-table :is(th, td), .sc-attendance-table__person small, .sc-attendance-face :is(small, span, dt, dd, b, p), .sc-attendance-events :is(li, .sc-attendance-events__name, .sc-attendance-events__type, time), .sc-attendance-anomalies :is(li, small), .sc-attendance-trend :is(header p, .sc-attendance-trend__legend), .sc-attendance-donut__legend) {
  font-size: var(--sc-next-caption-size);
  line-height: 1.45;
}

html[data-design="executive"][data-theme="dark"] .scr-dashboard .sc-table tbody td { background: var(--scr-surface); color: var(--scr-ink); border-color: var(--scr-border); }
html[data-design="executive"][data-theme="dark"] .jp-page .jp-insights li { background: var(--scr-page); color: var(--scr-ink); }

/* The premium-card rule clips a wide attendance table on phones; keep the
   table's existing horizontal scroll inside its card. */
.sc-attendance-table__scroll { overflow: auto; }

/* Dense event lists keep their supporting labels inside the mobile card. */
.sc-attendance-anomalies li { grid-template-columns: 43px minmax(0, 1fr) minmax(0, 60px); }
.sc-attendance-anomalies li small { white-space: normal; overflow-wrap: anywhere; }
.sc-attendance-events li time { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Final visual checks: labels remain readable beside the larger KPI numbers. */
.sc-app-shell .scr-dashboard :is(.scr-kpi-label, .sc-kpi-card small),
.sc-staff-redesign :is(.sc-staff-kpi__body > span, .sc-staff-person__text strong,
  .sc-staff-card-content__tabs :is(a, span), .sc-staff-detail-tile h3,
  .sc-staff-detail-tile > a, .sc-staff-detail-tile__links a, .sc-staff-control-btn,
  .sc-staff-action-link, .sc-staff-footer, .sc-staff-dept-chart__header p) {
  font-size: var(--sc-next-caption-size);
  line-height: 1.4;
}
.sc-staff-redesign .sc-staff-person__text strong { max-width: 210px; }
.sc-app-shell .scr-dashboard .sc-kpi-card { min-height: 132px; }
html[data-design="executive"][data-theme="dark"] .scr-dashboard .sc-journey-next {
  background: #173a32; border-color: #346b58;
}
html[data-design="executive"][data-theme="dark"] .scr-dashboard .sc-journey-next :is(p, .sc-journey-eyebrow, .sc-journey-next__action > span, .sc-journey-resources > span),
html[data-design="executive"][data-theme="dark"] .scr-dashboard :is(.scr-kpi-label, .sc-kpi-card small),
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(.sc-staff-kpi__body > span, .sc-staff-card-content__tabs a, .sc-staff-footer) {
  color: var(--scr-muted);
}
html[data-design="executive"][data-theme="dark"] .scr-dashboard .sc-journey-resources a,
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign .sc-staff-card-content__tabs [aria-current="page"] {
  color: #63dab2;
}
html[data-design="executive"][data-theme="dark"] .scr-dashboard .scr-department-ring > span {
  background: var(--scr-surface);
}
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign .sc-staff-attendance-ring span {
  color: var(--scr-ink);
}
.sc-app-shell :is(.sc-section-navigation__heading, .sc-section-navigation__link) {
  font-size: var(--sc-next-caption-size);
}
html[data-design="executive"][data-theme="dark"] .sc-section-navigation {
  background: var(--scr-surface); border-color: var(--scr-border);
}
html[data-design="executive"][data-theme="dark"] :is(.sc-section-navigation__heading, .sc-section-navigation__link) {
  color: var(--scr-muted);
}
html[data-design="executive"][data-theme="dark"] .sc-section-navigation__secondary { border-color: var(--scr-border); }
html[data-design="executive"][data-theme="dark"] .sc-section-navigation__link:is(.is-active, :hover) {
  background: #173c32; color: #a7efcf; border-color: #34735a;
}
/* Employee PWA documents use a plain body; selection still shares the brand. */
:root ::selection { background: var(--sc-next-emerald-pressed); color: #fff; }

/* The drawer must leave company names enough room to remain readable. */
.sc-staff-redesign .sc-staff-detail-tile--work dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 10px;
}
.sc-staff-redesign .sc-staff-detail-tile--work dl > div:nth-child(2) { border-right: 0; }
.sc-staff-redesign .sc-staff-detail-tile--work dl > div:last-child {
  grid-column: 1 / -1;
  padding: 8px 0 0;
  border-right: 0;
  border-top: 1px solid var(--scr-border, #e3ebef);
}
.sc-staff-redesign :is(.sc-staff-attendance-summary, .sc-staff-salary-summary) {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
html[data-design="executive"][data-theme="dark"] .sc-staff-redesign :is(.sc-staff-detail-tile a, .sc-staff-preview-head > a) {
  color: #8ce4c5;
  border-color: #34735a;
}
@media (max-width: 600px) {
  .jp-page .jp-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }
  .jp-page .jp-tabs a {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    font-size: var(--sc-next-caption-size);
    white-space: normal;
  }
  .jp-page .jp-tabs .jp-tabs__period {
    display: flex !important;
    grid-column: 1 / -1;
    margin-left: 0;
  }
}

/* Full surface audit: shared readable controls and complete dark form surfaces. */
.sc-app-shell .sc-tenant-workspace .sc-btn:is(.sc-btn--primary, .sc-btn-primary) {
  background: linear-gradient(180deg, #087f61, #06664e);
  border-color: #087f61;
  color: #fff;
}
html[data-theme="light"] .sc-app-shell :is(.sc-field-help, .sc-premium-section-head p, .sc-person-editor__rates dd, .sc-person-editor__demo, .sc-person-editor__privacy) { color: #526b60; }
html[data-theme="light"] .scr-dashboard :is(.sc-kpi-card small, .scr-dashboard-greeting cite, .sc-decision-panel__footnote, .sc-today-person small) { color: #586f78; }
html[data-theme="light"] .sc-attendance :is(.sc-attendance-kpi small, .sc-attendance-table__person small, .sc-attendance-trend header p, .sc-attendance-donut__legend, .sc-attendance-events li time) { color: #526b76; }
html[data-theme="light"] .sc-staff-redesign :is(.sc-staff-card-content__identity > span, .sc-staff-facts dt, .sc-staff-salary-summary small, .sc-staff-task-preview__meta, .sc-staff-dept-chart p) { color: #566e77; }
html[data-theme="light"] .sc-task-compose__field em { color: #576f78; }

@media screen {
  html[data-design="executive"][data-theme="dark"] .sc-premium-page { --sc-premium-soft: #1d3738; }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(.sc-form-card, .sc-card, .glass-card, .sc-toggle-row, .sc-radio-card) {
    background: var(--scr-surface); border-color: var(--scr-border); color: var(--scr-ink);
  }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(.sc-executive-hero, .sc-structure-add, .sc-my-company-hint, .sc-secure-callout, .sc-settings-nav) {
    background: #1d3538; border-color: var(--scr-border); color: var(--scr-ink);
  }
  html[data-design="executive"][data-theme="dark"] .sc-person-editor__actions {
    background: #1b3037; border-color: #3b565c !important;
  }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(.sc-page-subtitle, .sc-form-card__sub, .sc-premium-section-head p, .sc-field-help, .sc-person-editor__rates dd, .sc-person-editor__privacy, .sc-person-editor__privacy summary, .sc-person-editor__demo, .team-row__meta, .cap-toggle__desc) { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(h2, h3, .sc-premium-field > label, .sc-check__label, .sc-person-editor__rates dt, .sc-person-editor__sections a, .sc-radio-card__title) { color: var(--scr-ink); }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(.sc-premium-section-head, .sc-person-editor__sections a, .team-row) { border-color: var(--scr-border); }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(.sc-premium-section-icon, .team-row__avatar, .team-count) { background: #204b40; color: #9ee6ca; }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(.sc-premium-eyebrow, .sc-field-required, .sc-my-company-stat) { color: #87dfbd; }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page .sc-settings-nav .sc-btn { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page .sc-settings-nav .sc-btn[aria-current="page"],
  html[data-design="executive"][data-theme="dark"] .sc-premium-page :is(.sc-toggle-row, .sc-radio-card):has(input:checked) { background: #1d443a; color: #b3ecd6; border-color: #4f947d; }

  html[data-design="executive"][data-theme="dark"] .sc-journey-review :is(.sc-review-table tbody td, .sc-review-table tbody tr:hover td, .sc-review-correction) {
    background: var(--scr-surface); border-color: var(--scr-border); color: var(--scr-ink);
  }
  html[data-design="executive"][data-theme="dark"] .sc-journey-review .sc-review-table tr { border-bottom-color: var(--scr-page); }
  html[data-design="executive"][data-theme="dark"] .sc-journey-review .sc-review-table .sc-attendance-review-row--pending td { background: #343323; }
  html[data-design="executive"][data-theme="dark"] .sc-journey-review :is(.sc-review-employee a, .sc-review-times strong, .sc-review-reason) { color: var(--scr-ink); }
  html[data-design="executive"][data-theme="dark"] .sc-journey-review :is(.sc-review-date, .sc-review-times, .sc-review-scope, .sc-review-correction time),
  html[data-design="executive"][data-theme="dark"] .sc-journey-review .sc-review-table td::before { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-journey-review :is(.sc-review-add, .sc-section-kicker) { color: #87dfbd; }
  html[data-design="executive"][data-theme="dark"] .sc-journey-review .sc-review-issue { color: #f2cc8c; }
  html[data-design="executive"][data-theme="dark"] .sc-correction-guide { background: linear-gradient(145deg, #20383b, #19342c); }
  html[data-design="executive"][data-theme="dark"] :is(.sc-correction-step header p, .sc-correction-guide li p, .sc-time-empty p) { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-correction-type-description { background: #203e35; color: #b3e3cf; }

  html[data-design="executive"][data-theme="dark"] .scr-dashboard-hero h1 em { color: #65dbb5; }
  html[data-design="executive"][data-theme="dark"] .scr-dashboard-hero .scr-eyebrow { color: #b2d4cc; }
  html[data-design="executive"][data-theme="dark"] .sc-staff-task-preview__title { color: var(--scr-ink); }
  html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-tabs__period, .jp-rate-list a, .jp-calculation__table a, .jp-hero__copy .jp-scope a) { color: #94e5c5; }
  html[data-design="executive"][data-theme="dark"] .sc-task-compose :is(.sc-task-compose__eyebrow, .sc-task-compose__section-label) { color: #75dfb9; }
  html[data-design="executive"][data-theme="dark"] .sc-app-shell .sc-tenant-workspace .sc-btn:is(.sc-btn-secondary, .sc-btn--secondary, .sc-btn-soft) {
    background: #21373e; border-color: #405960; color: #e1eeea;
  }
  html[data-design="executive"][data-theme="dark"] .sc-app-shell .sc-tenant-workspace .sc-btn:is(.sc-btn-secondary, .sc-btn--secondary, .sc-btn-soft):hover {
    background: #2a4848; border-color: #68aa96;
  }
}

@media screen {
  html[data-design="executive"][data-theme="dark"] .jp-page .jp-tabs__period { color: #94e5c5 !important; }
}

@media screen {
  html[data-design="executive"][data-theme="dark"] .sc-journey-correction .sc-page-header {
    background: linear-gradient(120deg, #1b343b, #193c32); border-color: var(--scr-border);
  }
  html[data-design="executive"][data-theme="dark"] .sc-journey-correction .sc-page-subtitle { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-journey-correction .sc-section-kicker { color: #87dfbd; }
}

/* Secondary labels remain legible on the light workspace's tinted surfaces. */
html[data-theme="light"] .sc-tenant-workspace :is(.sc-kpi-sub, .sc-kpi-label, .sc-filter-title, .sc-status-chip__label, .sc-select2__value, .sc-workspace-table-hint, .sc-page-subtitle, .sc-form-card__sub, .cap-toggle__desc) { color: #586e79; }
html[data-theme="light"] .scr-dashboard :is(.scr-kpi-label, .scr-dashboard-greeting time, .sc-today-status-summary span, .sc-owner-action-group header p) { color: #586e79; }
html[data-theme="light"] .sc-staff-redesign :is(.sc-staff-kpi small, .sc-staff-filter-label, .sc-staff-person small, .sc-staff-table-card footer, .sc-staff-dept-chart small, .sc-staff-preview-head > span, .sc-staff-card-content__identity p, .sc-staff-detail-tile p, .sc-staff-detail-tile dt, .sc-staff-preview-note) { color: #566e77; }
html[data-theme="light"] .sc-attendance :is(.sc-attendance-face__empty p, .sc-attendance-face__state, .sc-attendance-anomalies li small, .sc-attendance-donut header p, .sc-attendance-trend__legend) { color: #586e79; }
html[data-theme="light"] :is(.sc-review-scope, .sc-review-date, .sc-review-times, .sc-schedule-card dt, .sc-schedule-card__time span, .sc-events-meta) { color: #586e71; }
html[data-theme="light"] .sc-tenant-workspace .sc-table thead th { color: #586e79; }
html[data-theme="light"] .sc-reports-hub-v2 :is(.sc-report-section__sub, .sc-report-insight__text, .sc-report-format-chip) { color: #586e79; }

@media screen {
  html[data-design="executive"][data-theme="dark"] :is(.sc-schedules, .sc-schedule-form-page) .sc-page-header {
    background: linear-gradient(120deg, #1b343b, #193c32); border-color: var(--scr-border);
  }
  html[data-design="executive"][data-theme="dark"] :is(.sc-schedule-card, .sc-schedule-form-card) {
    background: var(--scr-surface); border-color: var(--scr-border);
  }
  html[data-design="executive"][data-theme="dark"] :is(.sc-schedule-card__time, .sc-schedule-form__hint) {
    background: #1b3b35; border-color: var(--scr-border);
  }
  html[data-design="executive"][data-theme="dark"] :is(.sc-schedule-card h2, .sc-schedule-card dd, .sc-schedule-card__time strong, .sc-schedule-form__hint strong, .sc-schedules__empty h2) { color: var(--scr-ink); }
  html[data-design="executive"][data-theme="dark"] :is(.sc-schedule-card dt, .sc-schedule-card header p, .sc-schedule-card__time span, .sc-schedule-form__hint p, .sc-schedules__calendar, .sc-schedules__empty p, .sc-person-editor__privacy p) { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] :is(.sc-schedule-card footer, .sc-schedule-card dl div) { border-color: var(--scr-border); }
  html[data-design="executive"][data-theme="dark"] .sc-schedules__calendar a { color: #94e5c5; }

  html[data-design="executive"][data-theme="dark"] .sc-tenant-workspace .sc-journey-events .sc-events-journal-table tbody :is(tr, td) {
    background: var(--scr-surface); border-color: var(--scr-border); color: var(--scr-ink);
  }
  html[data-design="executive"][data-theme="dark"] .sc-tenant-workspace .sc-journey-events .sc-events-journal-table tbody tr:nth-child(even) :is(th, td) { background: #1d333a; }
  html[data-design="executive"][data-theme="dark"] .sc-journey-events :is(.sc-events-person, .sc-face-id-sync-card__value, .sc-face-id-sync-card strong) { color: #a7ebce; }
  html[data-design="executive"][data-theme="dark"] .sc-journey-events :is(.sc-events-meta, .sc-kpi-sub, .sc-face-id-sync-card__hint, .sc-face-id-sync-card__stats dt) { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-journey-events .sc-pill--sync-awaiting { background: #244039; color: #b7e7d8; }
  html[data-design="executive"][data-theme="dark"] :is(.sc-journey-events, .sc-journey-review, .sc-premium-page) .sc-table thead th { background: #20383e; color: #b8ced0; border-color: var(--scr-border); }

  html[data-design="executive"][data-theme="dark"] .jp-page .jp-tabs a { color: #b8d2ce; }
  html[data-design="executive"][data-theme="dark"] .jp-page .jp-tabs a[aria-current="page"] { background: #21654f; color: #fff; }
  html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-attention header a, .jp-section-kicker) { color: #94e5c5; }
  html[data-design="executive"][data-theme="dark"] .sc-owner-summary-bullets li { color: var(--scr-ink); }
  html[data-design="executive"][data-theme="dark"] .scr-dashboard :is(#sc-dashboard-attendance-table th, #sc-dashboard-attendance-table td) { color: var(--scr-ink); }
  html[data-design="executive"][data-theme="dark"] .scr-dashboard .sc-owner-action-count-pill { background: #28453b; color: #b3eed4; }
  html[data-design="executive"][data-theme="dark"] .scr-dashboard .sc-owner-action-count-pill.sc-pill--action-warn { background: #4b3e25; color: #f4d499; }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page .team-pill--owner { background: #493a24; color: #f4d499; }
  html[data-design="executive"][data-theme="dark"] .sc-premium-page .team-caps__legend { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-attendance :is(.sc-attendance-filter__reset, .sc-attendance-donut__legend, .sc-attendance-face__state) { color: var(--scr-muted); }
  html[data-design="executive"][data-theme="dark"] .sc-attendance :is(.sc-attendance-events header a, .sc-attendance-anomalies header a) { color: #94e5c5; }
}
@media screen {
  html[data-design="executive"][data-theme="dark"] .jp-page .jp-scope span { color: #94e5c5; }
}
@media screen {
  html[data-design="executive"][data-theme="dark"] .sc-premium-workflows .sc-check__label { color: var(--scr-ink); }
}
@media screen {
  html[data-design="executive"][data-theme="dark"] .jp-page :is(.jp-explainer a, .jp-related a, .jp-attention a, .jp-departments header a, .jp-insights a) { color: #94e5c5; }
}
