/* fz-base.css — app-wide restyle of the LEGACY primitives (buttons, inputs, chips, tabs, cards, KPIs, tables, modals, menus, toasts, progress) for the FZ redesign. Owner: base-restyle agent.
   Loaded right after fz-tokens.css (see index.php). Light is the base theme; dark lives under [data-theme="dark"].

   What this file is: the SKIN of the shared legacy classes, so every screen that nobody
   has redesigned yet already looks like the new system. It never changes page layout
   (grids, positions, columns) and never touches the shell (sidebar, mobile bar, bottom bar),
   the bell / assistant FAB, avatars (.fsw-avatar*), the page header (.xcs-pagehead*),
   drawers (.fsw-drawer*) or empty states (.fsw-empty*) — those belong to other files.

   Specificity rules followed here (the legacy stack is styles.css → ops-theme.css →
   nova-ui.css → nova-shell.css, all loaded BEFORE this file):
     · equal specificity is enough to win, because this file loads later;
     · !important only where the legacy rule being replaced has it, on the same selector;
     · dark twins ([data-theme="dark"] …) only where a legacy dark rule would otherwise win;
     · padding / min-height of buttons are NOT set at (0,2,0): ops-theme.css compacts
       buttons inside tables and lists at (0,2,0) and that must keep winning.
   Page agents override any rule here with a page-scoped selector (.fz-p-x …).

   Only --fz-* tokens are used. The two select-arrow data-URIs in nova-ui.css are left
   alone (they are the only place a hex can live), so selects always use background-COLOR.

   Sections
     1. Buttons                     7. KPI blocks & stats
     2. Icon buttons                8. Tables
     3. Inputs, selects, toggles    9. Modals
     4. Chips & status pills       10. Menus, popovers, tooltips
     5. Tabs & segmented controls  11. Toasts
     6. Cards                      12. Progress bars
                                   13. Scrollbars
                                   14. Touch floors & reduced motion */


/* ═══ 1. BUTTONS ════════════════════════════════════════════════════════════
   Pill buttons (reference: lime "Pay out now" / outlined "Create an invoice").
   Primary = lime fill + dark ink, one per view. Ghost = outlined neutral.
   Danger = soft red tint; solid danger/ok only for the final confirm. */

.xcs-btn-primary,
button.xcs-btn-primary,
.xcs-btn-ghost {
  border-radius: var(--fz-r-pill);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-semi);
  letter-spacing: -0.005em;
  line-height: 1.2;
  box-shadow: none;
  transition: background-color var(--fz-t-fast) var(--fz-ease),
              border-color var(--fz-t-fast) var(--fz-ease),
              color var(--fz-t-fast) var(--fz-ease),
              box-shadow var(--fz-t-fast) var(--fz-ease),
              transform var(--fz-t-fast) var(--fz-ease),
              filter var(--fz-t-fast) var(--fz-ease);
}
.xcs-btn-danger,
.fsw-btn-danger,
.xcs-btn-sm,
.fsw-summary-tog {
  transition: background-color var(--fz-t-fast) var(--fz-ease),
              border-color var(--fz-t-fast) var(--fz-ease),
              color var(--fz-t-fast) var(--fz-ease),
              transform var(--fz-t-fast) var(--fz-ease),
              filter var(--fz-t-fast) var(--fz-ease);
}
/* styles.css:17669 / :17697 give dark buttons a 10px radius at (0,2,0), and
   styles.css:17838 `[data-theme="dark"] *:focus-visible { border-radius: 8px }`
   squares any focused pill — both lose to these twins (same weight, later). */
[data-theme="dark"] .xcs-btn-primary,
[data-theme="dark"] .xcs-btn-ghost,
[data-theme="dark"] .xcs-btn-primary:focus-visible,
[data-theme="dark"] .xcs-btn-ghost:focus-visible {
  border-radius: var(--fz-r-pill);
  font-weight: var(--fz-fw-semi);
}

/* Primary — lime fill, dark ink, flat (no gradient, no lift). */
.xcs-btn-primary,
button.xcs-btn-primary,
[data-theme="dark"] .xcs-btn-primary,
[data-theme="dark"] button.xcs-btn-primary {
  background: var(--fz-accent);
  color: var(--fz-text-on-accent);
  border: 0;
  box-shadow: none;
}
.xcs-btn-primary:hover:not(:disabled),
[data-theme="dark"] .xcs-btn-primary:hover:not(:disabled) {
  background: var(--fz-accent-hover);
  color: var(--fz-text-on-accent);
  filter: none;
  transform: none;
  box-shadow: none;
}
/* Press: a 1px drop + a slight dim, so a click is felt (skins with their own
   tactile press — silver, premium-light — override this in hud-skins.css). */
.xcs-btn-primary:active:not(:disabled),
[data-theme="dark"] .xcs-btn-primary:active:not(:disabled) {
  background: var(--fz-accent);
  transform: translateY(1px);
  filter: brightness(.94);
}
.xcs-btn-primary:disabled,
[data-theme="dark"] .xcs-btn-primary:disabled {
  opacity: .45; cursor: not-allowed; transform: none; filter: none;
}

/* Ghost / secondary — transparent, hairline outline, full-strength label. */
.xcs-btn-ghost {
  background: transparent;
  color: var(--fz-text-1);
  border: 1px solid var(--fz-border-strong);
}
.xcs-btn-ghost:hover:not(:disabled) {
  background: var(--fz-surface-hover);
  border-color: var(--fz-border-strong);
  color: var(--fz-text-1);
  transform: none;
}
.xcs-btn-ghost:active:not(:disabled) { background: var(--fz-surface-3); transform: translateY(1px); }
.xcs-btn-ghost:disabled { opacity: .45; cursor: not-allowed; transform: none; }
/* nova-ui.css:100/105 (and styles.css:14048/14055) pin the dark ghost with !important. */
[data-theme="dark"] .xcs-btn-ghost {
  background: transparent !important;
  color: var(--fz-text-1) !important;
  border-color: var(--fz-border-strong) !important;
}
[data-theme="dark"] .xcs-btn-ghost:hover:not(:disabled) {
  background: var(--fz-surface-hover) !important;
  border-color: var(--fz-border-strong) !important;
  color: var(--fz-text-1) !important;
}
[data-theme="dark"] .xcs-btn-ghost:active:not(:disabled) { background: var(--fz-surface-3) !important; transform: translateY(1px); }

/* Page-header CTAs. styles.css:13160/13186 and nova-ui.css:115/126 write every
   property with !important at (0,2,0), ops-theme.css / nova-ui.css force the radius
   at (0,3,1) — matched one for one. Padding/min-height stay nova's (0 16px / 38px). */
.xcs-pagehead-cta .xcs-btn-primary {
  background: var(--fz-accent) !important;
  color: var(--fz-text-on-accent) !important;
  border: 0 !important;
  border-radius: var(--fz-r-pill) !important;
  font-size: var(--fz-fs-body) !important;
  font-weight: var(--fz-fw-semi) !important;
  box-shadow: none !important;
}
.xcs-pagehead-cta .xcs-btn-primary:hover:not(:disabled) {
  background: var(--fz-accent-hover) !important;
  box-shadow: none !important;
  filter: none;
  transform: none;
}
.xcs-pagehead-cta .xcs-btn-ghost,
[data-theme="dark"] .xcs-pagehead-cta .xcs-btn-ghost {
  background: transparent !important;
  color: var(--fz-text-1) !important;
  border: 1px solid var(--fz-border-strong) !important;
  border-radius: var(--fz-r-pill) !important;
  font-size: var(--fz-fs-body) !important;
  font-weight: var(--fz-fw-semi) !important;
}
.xcs-pagehead-cta .xcs-btn-ghost:hover,
[data-theme="dark"] .xcs-pagehead-cta .xcs-btn-ghost:hover {
  background: var(--fz-surface-hover) !important;
  border-color: var(--fz-border-strong) !important;
  color: var(--fz-text-1) !important;
  transform: none;
}
.fsw-page > .xcs-pagehead .xcs-pagehead-cta > button { border-radius: var(--fz-r-pill) !important; }

/* Page-header control spec — ONE size and shape on every page (QA r1: the action row
   jumped from page to page — Today a 36px rounded-rectangle jump field + 44px reload,
   Clients a 40px pill jump, My Week a 46×40 reload, Posted 44px buttons).
     · every control is var(--fz-ctl-h) tall: 40px desktop, 44px at ≤768;
     · text buttons (primary / ghost) = pills, min-height var(--fz-ctl-h) — a min, not a
       height, so a label that wraps on an old narrow header grows instead of clipping;
     · icon-only buttons (Reload, ⋯ — the ones with an aria-label instead of a visible
       label) = circles of that size. width:auto + min-width, so a labelled button that
       also carries an aria-label still grows to fit its text;
     · Jump to client (OpsClientJump) = pill search field with a leading search icon,
       the OpsSearchInput (.fz-search) look; its outline is the header ghost buttons'
       --fz-border-strong so the row reads as one family;
     · a tab track in the row (OpsTabs, Team) = that height too.
   Size only, never `display` (a page may hide a header control; centring comes from
   ops-theme.css:1463 / the page rules).
   Specificity: page files sized their own header controls at up to (0,5,0) (fz-today /
   fz-posted / fz-mywork reload + CSV, fz-clients jump + ⋯); these rules sit one step
   above, so the spec holds on every page and those page copies are dead code.
   nova-ui.css:115/126 pin CTA padding with !important — only the icon circle overrides
   it, so only that is !important. fz-calendar.css keeps its own 36px header set (view
   toggle + ‹ Today › group + CTAs, at (0,5,0)) until the calendar/kit owners move it
   to --fz-ctl-h. */
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta > button { min-height: var(--fz-ctl-h); }
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta > button[aria-label] {
  height: var(--fz-ctl-h);
  width: auto;
  min-width: var(--fz-ctl-h);
  padding: 0 !important;
  border-radius: var(--fz-r-pill) !important;
}

/* No `display` on the wrapper: page files hide it (fz-clients.css hides the jump on
   phones) and this weight would undo that. The input is a block instead, so the
   wrapper is exactly the field's height and the icon centres on it. */
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-jump {
  position: relative;
  min-width: 0;
}
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-jump::before {
  content: '';
  position: absolute;
  left: var(--fz-s-3);
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  background-color: var(--fz-text-3);
  -webkit-mask: var(--fz-ico-search) center / contain no-repeat;
  mask: var(--fz-ico-search) center / contain no-repeat;
  pointer-events: none;   /* positioned → paints over the in-flow input, no z-index needed */
}
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-jump input {
  display: block;
  box-sizing: border-box;
  height: var(--fz-ctl-h);
  min-height: var(--fz-ctl-h);
  margin: 0;
  padding: 0 var(--fz-s-4) 0 calc(var(--fz-s-3) + 15px + var(--fz-s-2));
  background-color: var(--fz-surface-sunken);
  border: 1px solid var(--fz-border-strong);
  border-radius: var(--fz-r-pill);
  color: var(--fz-text-1);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body);
  line-height: 1.2;
}
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-jump input:hover:not(:focus) { border-color: var(--fz-text-3); }
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-jump input:focus {
  outline: none;
  border-color: var(--fz-focus);
  box-shadow: 0 0 0 1px var(--fz-focus);
}
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-jump input::placeholder { color: var(--fz-text-3); opacity: 1; }
/* Track = the control height: 4 + 32 + 4 on desktop; 2 + 40 + 2 on phones, so the
   tabs keep ops-theme's 40px touch height inside the 44px row. */
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-tabs {
  box-sizing: border-box;
  height: var(--fz-ctl-h);
  padding: var(--fz-s-1);
  align-items: stretch;
}
:root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-tabs > .fsw-tab { min-height: 0; }
@media (max-width: 768px) {
  :root .xcs-app .xcs-pagehead .xcs-pagehead-cta .fsw-tabs { padding: 2px; }
}

/* Small sizes. ops-theme.css:182 and nova-ui.css:150 force padding/size/radius
   with !important; only the radius and type change here (height stays 32px). */
.xcs-btn-sm {
  border-radius: var(--fz-r-pill) !important;
  font-size: var(--fz-fs-meta) !important;
}
.xcs-btn-ghost.is-sm { font-size: var(--fz-fs-meta); }

/* Danger — soft red tint + red ink; the outline only appears on hover.
   ops-theme.css:1429 / nova-ui.css:177-195 pin colour + border with !important.
   `.xcs-btn-ghost.fsw-btn-danger` ("Delete client", ops-clients.jsx; two Settings
   deletes) needs its own dark twin: the dark ghost rule above is (0,2,0) !important
   and beat the bare `.fsw-btn-danger` (0,1,0), so in dark it read as a plain ghost. */
.xcs-btn-danger,
.fsw-btn-danger,
.xcs-btn-ghost.is-danger,
[data-theme="dark"] .xcs-btn-danger,
[data-theme="dark"] .xcs-btn-ghost.is-danger,
[data-theme="dark"] .xcs-btn-ghost.fsw-btn-danger {
  background: var(--fz-crit-soft) !important;
  color: var(--fz-crit-ink) !important;
  border: 1px solid transparent !important;
  border-radius: var(--fz-r-pill);
}
.xcs-btn-danger:hover:not(:disabled),
.fsw-btn-danger:hover:not(:disabled),
.xcs-btn-ghost.is-danger:hover:not(:disabled),
[data-theme="dark"] .xcs-btn-danger:hover:not(:disabled),
[data-theme="dark"] .xcs-btn-ghost.is-danger:hover:not(:disabled),
[data-theme="dark"] .xcs-btn-ghost.fsw-btn-danger:hover:not(:disabled) {
  background: var(--fz-crit-soft) !important;
  border-color: var(--fz-crit) !important;
  color: var(--fz-crit-ink) !important;
}
.xcs-btn-danger-text,
[data-theme="dark"] .xcs-btn-danger-text { color: var(--fz-crit-ink) !important; }

/* Solid confirm buttons ("Yes, empty everything", "Delete account", QC
   "Request revision" / "Approve"). BUG FIXED HERE: nova-ui.css:61 repaints
   `[data-theme="dark"] .xcs-btn-primary` lime at (0,2,0) AFTER ops-theme.css:174-175,
   so in dark the destructive confirms rendered as lime primaries. (0,3,0) wins in
   both themes. Light: dark-ink fill + white label; dark: base fill + dark label
   (white on a light-theme status base would fail contrast — DESIGN-SYSTEM §5). */
.xcs-btn-primary.is-danger,
.xcs-btn-primary.fsw-btn-danger,
[data-theme="dark"] .xcs-btn-primary.is-danger,
[data-theme="dark"] .xcs-btn-primary.fsw-btn-danger,
.xcs-btn-danger.is-solid {
  background: var(--fz-crit-ink) !important;
  color: var(--fz-surface-1) !important;
  border: 1px solid var(--fz-crit-ink) !important;
  font-weight: var(--fz-fw-semi);
}
[data-theme="dark"] .xcs-btn-primary.is-danger,
[data-theme="dark"] .xcs-btn-primary.fsw-btn-danger,
[data-theme="dark"] .xcs-btn-danger.is-solid {
  background: var(--fz-crit) !important;
  color: var(--fz-text-on-accent) !important;
  border-color: var(--fz-crit) !important;
}
.xcs-btn-primary.is-danger:hover:not(:disabled),
.xcs-btn-primary.fsw-btn-danger:hover:not(:disabled),
.xcs-btn-danger.is-solid:hover:not(:disabled) {
  background: var(--fz-crit) !important;
  border-color: var(--fz-crit) !important;
  color: var(--fz-surface-1) !important;
}
[data-theme="dark"] .xcs-btn-primary.is-danger:hover:not(:disabled),
[data-theme="dark"] .xcs-btn-primary.fsw-btn-danger:hover:not(:disabled),
[data-theme="dark"] .xcs-btn-danger.is-solid:hover:not(:disabled) {
  background: var(--fz-crit-ink) !important;
  border-color: var(--fz-crit-ink) !important;
  color: var(--fz-text-on-accent) !important;
}
.xcs-btn-danger.is-solid:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; }

.xcs-btn-primary.is-ok,
[data-theme="dark"] .xcs-btn-primary.is-ok {
  background: var(--fz-ok-ink);
  color: var(--fz-surface-1);
}
[data-theme="dark"] .xcs-btn-primary.is-ok { background: var(--fz-ok); color: var(--fz-text-on-accent); }
.xcs-btn-primary.is-ok:hover:not(:disabled) { background: var(--fz-ok); color: var(--fz-surface-1); }
[data-theme="dark"] .xcs-btn-primary.is-ok:hover:not(:disabled) { background: var(--fz-ok-ink); color: var(--fz-text-on-accent); }

/* ONE state language for every button family (v3.10):
     hover          one surface step (ghost) / accent-hover (primary) / outline (danger)
     active         1px press (+ slight dim on filled buttons)
     focus-visible  the app-wide ring: 2px --fz-focus outline, 2px offset. nova-ui.css:234
                    drew buttons a different ring (1px line + 4px halo, box-shadow
                    !important, in the LIME --fsw-accent-line even in the burgundy/silver
                    skins); it is replaced here at the same weight, later.
     disabled       45% opacity, not-allowed, no hover/press feedback
   Pill radius is restated on focus because styles.css:17838 squares every focused
   element in dark (`border-radius: 8px`). */
.xcs-btn-primary:focus-visible,
.xcs-btn-ghost:focus-visible,
.xcs-btn-sm:focus-visible,
.xcs-btn-danger:focus-visible,
.fsw-btn-danger:focus-visible,
.fsw-kmore:focus-visible,
.fsw-summary-tog:focus-visible {
  outline: 2px solid var(--fz-focus) !important;
  outline-offset: 2px;
  box-shadow: none !important;
}
[data-theme="dark"] .xcs-btn-sm:focus-visible,
[data-theme="dark"] .xcs-btn-danger:focus-visible,
[data-theme="dark"] .fsw-btn-danger:focus-visible,
[data-theme="dark"] .fsw-kmore:focus-visible,
[data-theme="dark"] .fsw-summary-tog:focus-visible { border-radius: var(--fz-r-pill); }
.xcs-btn-danger:active:not(:disabled),
.fsw-btn-danger:active:not(:disabled),
.xcs-btn-sm:active:not(:disabled),
.fsw-summary-tog:active:not(:disabled) { transform: translateY(1px); }
.xcs-btn-danger:disabled,
.fsw-btn-danger:disabled,
.xcs-btn-sm:disabled,
.fsw-summary-tog:disabled,
.xcs-btn-primary[aria-disabled="true"],
.xcs-btn-ghost[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* Summary toggle ("Show summary") — a quiet ghost pill. */
.fsw-summary-tog {
  border-radius: var(--fz-r-pill);
  border-color: var(--fz-border-strong);
  color: var(--fz-text-2);
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease);
}
.fsw-summary-tog:hover { background: var(--fz-surface-hover); border-color: var(--fz-border-strong); color: var(--fz-text-1); }


/* ═══ 2. ICON BUTTONS ═══════════════════════════════════════════════════════
   Circles, not squares. Box sizes are untouched (layout + 44px touch areas). */
.fsw-x {
  border-radius: var(--fz-r-pill);
  color: var(--fz-text-3);
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease);
}
.fsw-x:hover { background: var(--fz-surface-hover); color: var(--fz-text-1); }
[data-theme="dark"] .fsw-x:focus-visible { border-radius: var(--fz-r-pill); }
.fsw-kmore {
  border-radius: var(--fz-r-pill);
  background: transparent;
  border-color: transparent;
  color: var(--fz-text-3);
}
.fsw-kmore:hover { background: var(--fz-surface-hover); border-color: transparent; color: var(--fz-text-1); }


/* ═══ 3. INPUTS, SELECTS, TEXTAREAS, TOGGLES, CHECKS ════════════════════════
   Sunken well + hairline outline; stronger outline on hover; lime ring on focus.
   Sizes (padding / min-height) stay with the legacy rules and their touch floors. */
.fsw-input,
.fsw-sel,
.fsw-filters .fsw-input,
.fsw-jump input,
.xcs-text-input {
  background-color: var(--fz-surface-sunken);
  color: var(--fz-text-1);
  border: 1px solid var(--fz-border-strong);
  border-radius: var(--fz-r-sm);
  font-family: var(--fz-font-body);
  transition: border-color var(--fz-t-fast) var(--fz-ease),
              box-shadow var(--fz-t-fast) var(--fz-ease),
              background-color var(--fz-t-fast) var(--fz-ease);
}
/* styles.css:17722 `[data-theme="dark"] input[type=…], textarea, select` is (0,2,1);
   nova-ui.css:297 answered with the same weight — matched again here. */
[data-theme="dark"] input.fsw-input,
[data-theme="dark"] select.fsw-input,
[data-theme="dark"] textarea.fsw-input,
[data-theme="dark"] input.fsw-sel,
[data-theme="dark"] select.fsw-sel,
[data-theme="dark"] .fsw-filters .fsw-input,
[data-theme="dark"] .fsw-jump input,
[data-theme="dark"] input.xcs-text-input,
[data-theme="dark"] select.xcs-text-input,
[data-theme="dark"] textarea.xcs-text-input {
  background-color: var(--fz-surface-sunken);
  border-color: var(--fz-border-strong);
  color: var(--fz-text-1);
}
.fsw-input:hover:not(:focus):not(:disabled),
.fsw-sel:hover:not(:focus):not(:disabled),
.fsw-jump input:hover:not(:focus),
.xcs-text-input:hover:not(:focus):not(:disabled),
[data-theme="dark"] input.fsw-input:hover:not(:focus):not(:disabled),
[data-theme="dark"] select.fsw-input:hover:not(:focus):not(:disabled),
[data-theme="dark"] textarea.fsw-input:hover:not(:focus):not(:disabled),
[data-theme="dark"] .fsw-jump input:hover:not(:focus) {
  border-color: var(--fz-text-3);
}
.fsw-input:focus,
.fsw-sel:focus,
.fsw-jump input:focus,
.xcs-text-input:focus,
[data-theme="dark"] .fsw-input:focus,
[data-theme="dark"] input.fsw-input:focus,
[data-theme="dark"] select.fsw-input:focus,
[data-theme="dark"] textarea.fsw-input:focus,
[data-theme="dark"] .fsw-filters .fsw-input:focus,
[data-theme="dark"] .fsw-jump input:focus,
[data-theme="dark"] input.xcs-text-input:focus,
[data-theme="dark"] select.xcs-text-input:focus,
[data-theme="dark"] textarea.xcs-text-input:focus {
  outline: none;
  background-color: var(--fz-surface-sunken);
  border-color: var(--fz-focus);
  box-shadow: 0 0 0 3px var(--fz-accent-soft);
}
.fsw-input:disabled, .fsw-sel:disabled, .xcs-text-input:disabled { opacity: .55; cursor: not-allowed; }
/* Invalid: the same field, a red outline (and the red halo while focused). */
.fsw-input[aria-invalid="true"],
.xcs-text-input[aria-invalid="true"],
[data-theme="dark"] input.fsw-input[aria-invalid="true"],
[data-theme="dark"] textarea.fsw-input[aria-invalid="true"] { border-color: var(--fz-crit); }
.fsw-input[aria-invalid="true"]:focus,
[data-theme="dark"] input.fsw-input[aria-invalid="true"]:focus,
[data-theme="dark"] textarea.fsw-input[aria-invalid="true"]:focus { border-color: var(--fz-crit); box-shadow: 0 0 0 3px var(--fz-crit-soft); }
.fsw-input::placeholder,
.fsw-jump input::placeholder,
.xcs-text-input::placeholder,
[data-theme="dark"] input.fsw-input::placeholder,
[data-theme="dark"] textarea.fsw-input::placeholder,
[data-theme="dark"] .fsw-jump input::placeholder,
[data-theme="dark"] input.xcs-text-input::placeholder,
[data-theme="dark"] textarea.xcs-text-input::placeholder { color: var(--fz-text-3); opacity: 1; }
/* Small inputs in dense rows keep their size, only the radius follows the ladder. */
.fsw-input.is-sm, .fsw-table .fsw-input { border-radius: var(--fz-r-xs); }

/* Select caret. nova-ui.css draws it as an SVG data-URI with fixed hex strokes and
   .fsw-sel still showed the native OS arrow; both become one token-coloured caret
   (two 5px gradient halves = ▾), so it follows the theme. The right padding that
   makes room for it stays ops-theme.css's (28px / 22px small). */
select.fsw-input,
select.fsw-sel,
.fsw-filters select.fsw-input,
[data-theme="dark"] select.fsw-input,
[data-theme="dark"] select.fsw-sel {
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fz-text-3) 50%),
    linear-gradient(135deg, var(--fz-text-3) 50%, transparent 50%);
  background-size: 5px 5px, 5px 5px;
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-repeat: no-repeat;
}
select.fsw-input.is-sm { background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; }

/* Filter-row controls (.fsw-sel, .fsw-filters .fsw-input) sit next to .fsw-tog pills
   and small buttons. In dark, styles.css:17722's generic input/select rule (0,2,1)
   inflated them to 44px / 14px while the pills beside them stayed 34px — a ragged
   row that light never had. One size in both themes: no vertical padding, so the
   legacy min-height decides (34px desktop, 40/44px touch floors). */
.fsw-sel,
.fsw-filters .fsw-input,
[data-theme="dark"] select.fsw-sel,
[data-theme="dark"] input.fsw-sel,
[data-theme="dark"] .fsw-filters input.fsw-input,
[data-theme="dark"] .fsw-filters select.fsw-input {
  padding: 0 var(--fz-s-3);
  font-size: var(--fz-fs-meta);
}
select.fsw-sel,
.fsw-filters select.fsw-input,
[data-theme="dark"] select.fsw-sel,
[data-theme="dark"] .fsw-filters select.fsw-input { padding-right: calc(var(--fz-s-6) + var(--fz-s-1)); }

/* Legacy module input — every property !important in styles.css:13322/13944 + nova-ui.css:381. */
.xcs-input,
[data-theme="dark"] .xcs-input {
  background: var(--fz-surface-sunken) !important;
  border: 1px solid var(--fz-border-strong) !important;
  border-radius: var(--fz-r-sm) !important;
  color: var(--fz-text-1) !important;
}
.xcs-input:focus,
[data-theme="dark"] .xcs-input:focus {
  outline: none;
  border-color: var(--fz-focus) !important;
  box-shadow: 0 0 0 3px var(--fz-accent-soft) !important;
}
.xcs-input::placeholder { color: var(--fz-text-3); opacity: 1; }

/* Field label & hint. */
.fsw-field-l {
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  letter-spacing: 0;
  text-transform: none;
  color: var(--fz-text-2);
}
.fsw-field-hint { font-size: var(--fz-fs-meta); color: var(--fz-text-3); }
/* Inline form panel inside a card: a secondary surface, inputs sit sunken inside it. */
.fsw-form {
  background: var(--fz-surface-2);
  border-color: transparent;
  border-radius: var(--fz-r-md);
}

/* Filter toggle pills (All / Red / At risk …). Selected = lime TINT + accent ink,
   never a lime fill (that is reserved for nav + the primary CTA). */
.fsw-tog {
  background: transparent;
  color: var(--fz-text-2);
  border: 1px solid var(--fz-border-strong);
  border-radius: var(--fz-r-pill);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  padding-left: var(--fz-s-3);
  padding-right: var(--fz-s-3);
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease), border-color var(--fz-t-fast) var(--fz-ease);
}
.fsw-tog:hover:not(.is-on) { background: var(--fz-surface-hover); color: var(--fz-text-1); }
.fsw-tog.is-on {
  background: var(--fz-accent-soft);
  border-color: var(--fz-accent-line);
  color: var(--fz-accent-ink);
  font-weight: var(--fz-fw-semi);
}
.fsw-tog:active:not(:disabled) { transform: translateY(1px); }
.fsw-tog:disabled { opacity: .45; cursor: not-allowed; }
/* Pills / tabs / segments / round icon buttons share the button ring (§1);
   the select keeps the input language (border + halo, below). */
.fsw-tog:focus-visible,
.fsw-tab:focus-visible,
.fsw-seg-b:focus-visible,
.fsw-x:focus-visible,
[data-theme="dark"] .fsw-tog:focus-visible,
[data-theme="dark"] .fsw-seg-b:focus-visible {
  outline: 2px solid var(--fz-focus);
  outline-offset: 2px;
  box-shadow: none;
  border-radius: var(--fz-r-pill);
}
.fsw-sel:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--fz-focus), 0 0 0 4px var(--fz-accent-soft);
}

/* Custom checkbox / radio (nova-ui.css §4.3 draws them): token colours only. */
.fsw-check { color: var(--fz-text-2); }
.fsw-check > input[type="checkbox"],
.fsw-check > input[type="radio"],
.fsw-cbcell > input[type="checkbox"],
.fsw-table input[type="checkbox"],
.fsw-form input[type="checkbox"] {
  background: var(--fz-surface-sunken);
  border-color: var(--fz-text-3);
  transition: background-color var(--fz-t-fast) var(--fz-ease), border-color var(--fz-t-fast) var(--fz-ease);
}
[data-theme="dark"] .fsw-check > input[type="checkbox"],
[data-theme="dark"] .fsw-check > input[type="radio"],
[data-theme="dark"] .fsw-cbcell > input[type="checkbox"],
[data-theme="dark"] .fsw-table input[type="checkbox"],
[data-theme="dark"] .fsw-form input[type="checkbox"] { background: var(--fz-surface-sunken); }
.fsw-check > input[type="checkbox"]:checked,
.fsw-check > input[type="radio"]:checked,
.fsw-cbcell > input[type="checkbox"]:checked,
.fsw-table input[type="checkbox"]:checked,
.fsw-form input[type="checkbox"]:checked,
[data-theme="dark"] .fsw-check > input[type="checkbox"]:checked,
[data-theme="dark"] .fsw-check > input[type="radio"]:checked,
[data-theme="dark"] .fsw-cbcell > input[type="checkbox"]:checked,
[data-theme="dark"] .fsw-table input[type="checkbox"]:checked,
[data-theme="dark"] .fsw-form input[type="checkbox"]:checked {
  background: var(--fz-accent);
  border-color: var(--fz-accent-line);
}


/* ═══ 4. CHIPS & STATUS PILLS ═══════════════════════════════════════════════
   OpsChip paints colour / border / background INLINE (ops-ui.jsx OpsChip) — those
   stay. Only the shape gets calmer: 22px pill, 12px medium text, no pulsing. */
.fsw-chip {
  border-radius: var(--fz-r-pill);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  line-height: 20px;
  padding: 0 var(--fz-s-2);
  letter-spacing: 0;
  gap: var(--fz-s-1);
}
/* nova-ui.css:942 tightened chips inside table cells to 1.35 at (0,2,1). */
.fsw-table td .fsw-chip { line-height: 20px; padding: 0 calc(var(--fz-s-1) * 1.5); }
.fsw-chip .fsw-dot { width: 6px; height: 6px; }
/* ops-theme.css:194 pulsed overdue chips forever. The word "Late"/overdue already
   carries the state; DESIGN-SYSTEM §9 allows no looping animation. */
.fsw-chip.is-overdue { animation: none; }
.fsw-chips { gap: var(--fz-s-1) var(--fz-s-2); }

/* Client health pill (OpsHealth) — the status-pill recipe: soft tint + ink + base dot. */
.fsw-health,
[data-theme="dark"] .fsw-health {
  background: var(--fz-neutral-soft);
  border-color: transparent;
  color: var(--fz-neutral-ink);
  border-radius: var(--fz-r-pill);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
}
.fsw-health.is-green, [data-theme="dark"] .fsw-health.is-green { background: var(--fz-ok-soft); color: var(--fz-ok-ink); }
.fsw-health.is-yellow, [data-theme="dark"] .fsw-health.is-yellow { background: var(--fz-warn-soft); color: var(--fz-warn-ink); }
.fsw-health.is-red, [data-theme="dark"] .fsw-health.is-red { background: var(--fz-crit-soft); color: var(--fz-crit-ink); }
.fsw-health-dot { background: var(--fz-neutral); }
.fsw-health.is-green .fsw-health-dot { background: var(--fz-ok); }
.fsw-health.is-yellow .fsw-health-dot { background: var(--fz-warn); }
.fsw-health.is-red .fsw-health-dot { background: var(--fz-crit); box-shadow: none; }

.fsw-role-pill,
.xcs-badge { border-radius: var(--fz-r-pill); font-weight: var(--fz-fw-semi); }

/* Link pills on task cards. */
.fsw-links a {
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-2);
  border-color: transparent;
  color: var(--fz-text-1);
  font-weight: var(--fz-fw-medium);
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease);
}
.fsw-links a:hover { background: var(--fz-surface-hover); border-color: var(--fz-border-strong); color: var(--fz-accent-ink); }


/* ═══ 5. TABS & SEGMENTED CONTROLS ══════════════════════════════════════════
   .fsw-tabs becomes a rounded segmented control: a recessed track that hugs its
   tabs, the active tab raised on a neutral surface with full-strength text. Lime is
   kept off the tab fill (it marks primary nav + the main CTA); the active tab's count
   badge carries the one lime accent. Height/padding floors per breakpoint stay with
   ops-theme.css / nova-shell.css (touch targets). */
.fsw-tabs {
  width: fit-content;
  max-width: 100%;
  gap: var(--fz-s-1);
  padding: var(--fz-s-1);
  background: var(--fz-surface-3);
  border-radius: var(--fz-r-pill);
}
[data-theme="dark"] .fsw-tabs { background: var(--fz-surface-sunken); box-shadow: inset 0 0 0 1px var(--fz-border); }
.fsw-tab {
  border-radius: var(--fz-r-pill);
  color: var(--fz-text-2);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-medium);
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease), box-shadow var(--fz-t-fast) var(--fz-ease);
}
.fsw-tab:hover:not(.on) { background: var(--fz-surface-hover); color: var(--fz-text-1); }
[data-theme="dark"] .fsw-tab:hover:not(.on) { background: var(--fz-surface-2); }
.fsw-tab.on {
  background: var(--fz-surface-1);
  color: var(--fz-text-1);
  font-weight: var(--fz-fw-semi);
  box-shadow: var(--fz-shadow-soft);
}
[data-theme="dark"] .fsw-tab.on { background: var(--fz-surface-3); box-shadow: none; }
[data-theme="dark"] .fsw-tab:focus-visible { border-radius: var(--fz-r-pill); }
.fsw-tab-n,
.fsw-tab:not(.on) .fsw-tab-n {
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  background: var(--fz-surface-1);
  color: var(--fz-text-2);
  border: 0;
  border-radius: var(--fz-r-pill);
  padding: 0 var(--fz-s-2);
  line-height: 18px;
}
[data-theme="dark"] .fsw-tab:not(.on) .fsw-tab-n { background: var(--fz-surface-3); }
.fsw-tab.on .fsw-tab-n { background: var(--fz-accent); color: var(--fz-text-on-accent); }

/* Chart range / period switch (OpsTrendChart) — same language, smaller. */
.fsw-seg {
  gap: 2px;
  padding: 2px;
  background: var(--fz-surface-3);
  border: 0;
  border-radius: var(--fz-r-pill);
}
[data-theme="dark"] .fsw-seg { background: var(--fz-surface-sunken); box-shadow: inset 0 0 0 1px var(--fz-border); }
.fsw-seg-b {
  border-radius: var(--fz-r-pill);
  color: var(--fz-text-2);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  letter-spacing: 0;
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease);
}
.fsw-seg-b + .fsw-seg-b { border-left: 0; }
.fsw-seg-b:hover { color: var(--fz-text-1); }
.fsw-seg-b.is-on { background: var(--fz-surface-1); color: var(--fz-text-1); font-weight: var(--fz-fw-semi); box-shadow: var(--fz-shadow-soft); }
[data-theme="dark"] .fsw-seg-b.is-on { background: var(--fz-surface-3); box-shadow: none; }


/* ═══ 6. CARDS ══════════════════════════════════════════════════════════════
   Modules: surface-1 on the page, 20px radius (DESIGN-SYSTEM §6 "major modules"),
   separated by surface contrast — no outline (the 1px stays, transparent, so no
   box shifts). Light gets the soft resting shadow; dark stays flat. A card nested
   in a card drops to surface-2 so it reads as a sub-panel, not a second card. */
.fsw-card {
  background: var(--fz-surface-1);
  border-color: transparent;
  border-radius: var(--fz-r-lg);
  padding: var(--fz-card-pad);
  gap: var(--fz-gap);
  box-shadow: var(--fz-shadow-soft);
}
[data-theme="dark"] .fsw-card { box-shadow: none; }
.fsw-card .fsw-card,
.fsw-card.is-soft {
  background: var(--fz-surface-2);
  border-color: var(--fz-border);
  box-shadow: none;
}
/* Light: surface-2 sits 1.0:1 against the warm page, so the soft card keeps its
   hairline there; dark separates by surface alone. */
[data-theme="dark"] .fsw-card .fsw-card,
[data-theme="dark"] .fsw-card.is-soft { border-color: transparent; }
.fsw-card.is-danger { background: var(--fz-crit-soft); border-color: transparent; }

.fsw-card-h { gap: var(--fz-s-3); }
.fsw-card-h h3 {
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-section);
  font-weight: var(--fz-fw-semi);
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--fz-text-1);
}
.fsw-card-h.is-overdue h3 { color: var(--fz-crit-ink); }
.fsw-card-h p {
  margin-top: var(--fz-s-1);
  font-size: var(--fz-fs-meta);
  line-height: 1.45;
  color: var(--fz-text-3);
}
/* Count badge next to a card title: a calm neutral pill, not a mono outline box. */
.fsw-card-h .fsw-n {
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  background: var(--fz-surface-3);
  color: var(--fz-text-2);
  border: 0;
  border-radius: var(--fz-r-pill);
  padding: 0 var(--fz-s-2);
  line-height: 22px;
}

/* Legacy module card — styles.css:12013/18055 pin shadow / background / border with !important. */
.xcs-card {
  background: var(--fz-surface-1);
  border-color: transparent;
  border-radius: var(--fz-r-lg);
  box-shadow: var(--fz-shadow-soft) !important;
}
[data-theme="dark"] .xcs-card {
  background: var(--fz-surface-1) !important;
  border-color: transparent !important;
  color: var(--fz-text-1) !important;
  box-shadow: none !important;
}
[data-theme="dark"] .xcs-card:hover { border-color: transparent; }
.xcs-card-h h3 { font-family: var(--fz-font-display); font-size: var(--fz-fs-section); font-weight: var(--fz-fw-semi); }


/* ═══ 7. KPI BLOCKS & STATS ═════════════════════════════════════════════════
   Tile = surface-1, no outline. Small muted label → big display-font number →
   one-line note. The note is plain text with a status dot (colour + text), not a
   bordered chip inside the box ("no box-in-box"). Grid columns stay ops-theme's. */
.fsw-kpis { gap: var(--fz-s-3); }
.fsw-kpi {
  background: var(--fz-surface-1);
  border-color: transparent;
  border-radius: var(--fz-r-lg);
  padding: var(--fz-s-4) var(--fz-s-5);
  color: var(--fz-text-1);
  box-shadow: var(--fz-shadow-soft);
  transition: background-color var(--fz-t-fast) var(--fz-ease), box-shadow var(--fz-t-fast) var(--fz-ease);
}
[data-theme="dark"] .fsw-kpi { box-shadow: none; }
.fsw-kpi:hover { background: var(--fz-surface-hover); border-color: transparent; }
.fsw-kpi.is-static:hover { background: var(--fz-surface-1); border-color: transparent; }
.fsw-kpi:active { transform: none; }
.fsw-kpi:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; box-shadow: none; }
.fsw-kpi-l {
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
  color: var(--fz-text-3);
}
.fsw-kpi-v {
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-num);
  font-weight: var(--fz-fw-semi);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: var(--fz-s-2) 0 var(--fz-s-1);
  color: var(--fz-text-1);
  font-variant-numeric: tabular-nums;
}
.fsw-kpi-v small {
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  letter-spacing: 0;
  color: var(--fz-text-3);
}
.fsw-kpi-d {
  font-size: var(--fz-fs-meta);
  line-height: 1.4;
  color: var(--fz-text-3);
}
.fsw-kpi.is-good > .fsw-kpi-d,
.fsw-kpi.is-warn > .fsw-kpi-d,
.fsw-kpi.is-crit > .fsw-kpi-d {
  display: flex;
  align-items: baseline;
  gap: var(--fz-s-2);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: var(--fz-fw-medium);
}
.fsw-kpi.is-good > .fsw-kpi-d::before,
.fsw-kpi.is-warn > .fsw-kpi-d::before,
.fsw-kpi.is-crit > .fsw-kpi-d::before {
  content: ''; flex: none;
  width: 8px; height: 8px;
  border-radius: var(--fz-r-pill);
  transform: translateY(-1px);
}
.fsw-kpi.is-good > .fsw-kpi-d { color: var(--fz-ok-ink); }
.fsw-kpi.is-warn > .fsw-kpi-d { color: var(--fz-warn-ink); }
.fsw-kpi.is-crit > .fsw-kpi-d { color: var(--fz-crit-ink); }
.fsw-kpi.is-good > .fsw-kpi-d::before { background: var(--fz-ok); }
.fsw-kpi.is-warn > .fsw-kpi-d::before { background: var(--fz-warn); }
.fsw-kpi.is-crit > .fsw-kpi-d::before { background: var(--fz-crit); }
.fsw-kpi.is-good .fsw-kpi-v { color: var(--fz-ok-ink); }
.fsw-kpi.is-warn .fsw-kpi-v { color: var(--fz-warn-ink); }
.fsw-kpi.is-crit .fsw-kpi-v { color: var(--fz-crit-ink); }
/* The critical tile is the one "coloured card": a soft red wash, still no outline. */
.fsw-kpi.is-crit,
.fsw-kpi.is-crit.is-static:hover {
  background: linear-gradient(var(--fz-crit-soft), var(--fz-crit-soft)), var(--fz-surface-1);
  border-color: transparent;
}
.fsw-kpi.is-crit:hover { background: linear-gradient(var(--fz-crit-soft), var(--fz-crit-soft)), var(--fz-surface-hover); }

/* Small stat block (client month card). */
.fsw-stat {
  background: var(--fz-surface-1);
  border-color: transparent;
  border-radius: var(--fz-r-lg);
  box-shadow: var(--fz-shadow-soft);
}
[data-theme="dark"] .fsw-stat { box-shadow: none; }
.fsw-card .fsw-stat { background: var(--fz-surface-2); box-shadow: none; }
.fsw-stat.is-red { background: linear-gradient(var(--fz-crit-soft), var(--fz-crit-soft)), var(--fz-surface-1); border-color: transparent; }
.fsw-stat.is-click:hover { background: var(--fz-surface-hover); border-color: transparent; }
.fsw-stat-l { font-size: var(--fz-fs-meta); font-weight: var(--fz-fw-medium); color: var(--fz-text-3); }
.fsw-stat-v { font-family: var(--fz-font-display); font-weight: var(--fz-fw-semi); letter-spacing: -0.03em; color: var(--fz-text-1); }
.fsw-stat-s { font-size: var(--fz-fs-meta); color: var(--fz-text-3); }

/* Legacy module stat — styles.css:12506 + nova-ui.css:602 pin everything with !important. */
.xcs-stat,
[data-theme="dark"] .xcs-stat {
  background: var(--fz-surface-1) !important;
  border: 1px solid transparent !important;
  border-radius: var(--fz-r-lg) !important;
  box-shadow: var(--fz-shadow-soft) !important;
}
[data-theme="dark"] .xcs-stat,
[data-theme="dark"] .xcs-stat:hover { box-shadow: none !important; }
.xcs-stat:hover { border-color: transparent !important; }
.xcs-stat-label,
[data-theme="dark"] .xcs-stat-label {
  font-size: var(--fz-fs-meta) !important;
  font-weight: var(--fz-fw-medium) !important;
  color: var(--fz-text-3) !important;
}
.xcs-stat-value {
  font-family: var(--fz-font-display);
  font-weight: var(--fz-fw-semi) !important;
  letter-spacing: -0.03em !important;
}
.xcs-stat-sub, [data-theme="dark"] .xcs-stat-sub { color: var(--fz-text-3) !important; }


/* ═══ 8. TABLES ═════════════════════════════════════════════════════════════
   No zebra, no header fill: small muted uppercase headers over a hairline, rows
   divided by hairlines, a calm hover on clickable rows. Row height comes from
   nova-ui.css's cell floor (≈50px) — unchanged, as are paddings (no column shifts).
   Light uses the legacy weight (0,1,1); the dark twins match ops-theme.css:2355/2365
   (0,2,2) exactly, so page rules keep the same specificity budget they had before. */
.fsw-table th,
[data-theme="dark"] .fsw-table thead th {
  background: transparent;
  color: var(--fz-text-3);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-medium);
  letter-spacing: .01em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--fz-border);
}
.fsw-table td,
[data-theme="dark"] .fsw-table tbody td { border-bottom: 1px solid var(--fz-border); }
.fsw-table tr:last-child td,
[data-theme="dark"] .fsw-table tbody tr:last-child td { border-bottom: 0; }
.fsw-table td { transition: background-color var(--fz-t-fast) var(--fz-ease); }
.fsw-table tr.is-click:hover td { background: var(--fz-surface-hover); }
.fsw-table tr.is-red td { background: var(--fz-crit-soft); }
.fsw-table-wrap { border-radius: var(--fz-r-sm); }

/* Scroll cue on wide tables (ops-theme.css:2445). The legacy covers faded linearly
   from the card colour over 30px while the shade was 20px wide, so ~⅓ of the shade
   always bled through — a grey band at BOTH edges of every table, scrollable or not.
   Covers are now solid for the first 16px (wider than the 14px shade) and only then
   fade, so the cue shows exactly when, and on the side where, there is more to see.
   The covers must match what sits behind the wrap, so --fzb-cover is an INHERITED
   property set by each surface (the nearest one wins — a modal rendered inline
   inside a nested panel still gets surface-1): surface-1 = card, kit panel / tile,
   modal, drawer; surface-2 = nested card, .is-soft card, inline .fsw-form, nested
   OpsPanel, OpsMetricCard / skeleton card inside a panel. Nothing set = surface-1.
   A table on any other surface sets --fzb-cover on its wrap or a parent. */
.fsw-table-wrap,
.fsw-cycle {
  background-image:
    linear-gradient(to right, var(--fzb-cover, var(--fz-surface-1)) 16px, transparent 40px),
    linear-gradient(to left,  var(--fzb-cover, var(--fz-surface-1)) 16px, transparent 40px),
    radial-gradient(farthest-side at 0 50%,    var(--fz-text-3), transparent),
    radial-gradient(farthest-side at 100% 50%, var(--fz-text-3), transparent);
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
.fsw-card, .xcs-card, .fz-panel, .fz-metric, .fz-skel.is-card,
.fsw-modal, .fsw-drawer { --fzb-cover: var(--fz-surface-1); }
.fsw-card .fsw-card,
.fsw-card.is-soft,
.fsw-form,
.fz-panel .fz-panel,
.fz-panel .fz-metric,
.fz-panel .fz-skel.is-card { --fzb-cover: var(--fz-surface-2); }


/* ═══ 9. MODALS ═════════════════════════════════════════════════════════════
   OpsModal: surface-1, 24px radius, pop shadow, airy header, sunken footer.
   z-index / is-top / is-wide widths are untouched. nova-shell.css:470 pins the dark
   modal background, border and colour with !important at (0,3,0). */
.fsw-modal-scrim { background: var(--fz-scrim); }
.fsw-modal {
  background: var(--fz-surface-1);
  color: var(--fz-text-1);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-xl);
  box-shadow: var(--fz-shadow-pop);
  animation: fzBaseModalIn var(--fz-t-med) var(--fz-ease);
}
:root[data-theme="dark"] .fsw-modal {
  background: var(--fz-surface-1) !important;
  background-image: none !important;
  border: 1px solid var(--fz-border) !important;
  color: var(--fz-text-1) !important;
}
@keyframes fzBaseModalIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.fsw-modal-h {
  background: transparent;
  border-bottom: 1px solid transparent;
  padding: var(--fz-s-5) var(--fz-s-4) var(--fz-s-3) var(--fz-s-6);
  align-items: flex-start;
}
.fsw-modal-h h3 {
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-section);
  font-weight: var(--fz-fw-semi);
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--fz-text-1);
  padding-top: var(--fz-s-2);
}
.fsw-modal-h p {
  margin-top: var(--fz-s-1);
  font-size: var(--fz-fs-body);
  line-height: 1.45;
  color: var(--fz-text-2);
}
.fsw-modal-b {
  padding: var(--fz-s-1) var(--fz-s-6) var(--fz-s-6);
  gap: var(--fz-s-4);
}
.fsw-modal-f {
  background: var(--fz-surface-sunken);
  border-top: 1px solid var(--fz-border);
  padding: var(--fz-s-4) var(--fz-s-6);
  gap: var(--fz-s-2);
}
@media (max-width: 768px) {
  .fsw-modal-h { padding: var(--fz-s-4) var(--fz-s-2) var(--fz-s-2) var(--fz-s-4); }
  .fsw-modal-b { padding: var(--fz-s-1) var(--fz-s-4) var(--fz-s-5); gap: var(--fz-s-3); }
  .fsw-modal-f { padding: var(--fz-s-3) var(--fz-s-4); }
}


/* ═══ 10. MENUS, POPOVERS, TOOLTIPS ═════════════════════════════════════════ */
.fsw-menu {
  background: var(--fz-surface-1);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-md);
  box-shadow: var(--fz-shadow-pop);
  padding: var(--fz-s-2);
}
.fsw-menu-item {
  border-radius: var(--fz-r-xs);
  color: var(--fz-text-1);
  transition: background-color var(--fz-t-fast) var(--fz-ease);
}
.fsw-menu-item:hover:not(.is-off) { background: var(--fz-surface-hover); }
.fsw-menu-item.is-off { color: var(--fz-text-3); }
.fsw-menu-item:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: -2px; }
.fsw-menu-sep { background: var(--fz-border); }
.fsw-menu-h {
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-semi);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fz-text-3);
}
.fsw-menu-reason { color: var(--fz-text-3); }

/* Chart hover tooltip. */
.fsw-chart-tip {
  background: var(--fz-surface-1);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-sm);
  box-shadow: var(--fz-shadow-pop);
  padding: var(--fz-s-2) var(--fz-s-3);
  color: var(--fz-text-1);
}
.fsw-chart-tip > b:first-child { color: var(--fz-text-2); }
.fsw-chart-legend { color: var(--fz-text-2); }


/* ═══ 11. TOASTS ════════════════════════════════════════════════════════════
   Position / z-index stay with the legacy rules (untouched). index.php ships an
   inline <style> AFTER every stylesheet that paints `.xcs-toast` navy at (0,1,0), so
   the skin is written at `.xcs-app .xcs-toast` (0,2,0) — the toast is a child of
   .xcs-app (app.jsx). A floating surface in the current theme with the pop shadow;
   the round badge says what kind it is (✓ / ! / i) next to the message. */
.xcs-app .xcs-toast,
[data-theme="dark"] .xcs-app .xcs-toast {
  background: var(--fz-surface-1);
  background-image: none;
  color: var(--fz-text-1);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-pill);
  box-shadow: var(--fz-shadow-pop);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-medium);
  padding: var(--fz-s-2) var(--fz-s-5) var(--fz-s-2) var(--fz-s-2);
  gap: var(--fz-s-3);
}
[data-theme="dark"] .xcs-app .xcs-toast { background: var(--fz-surface-2); border-color: var(--fz-border-strong); }
/* Legacy failure variant (detail.jsx builds `xcs-toast-${kind}`): solid red, same recipe as solid danger buttons. */
.xcs-app .xcs-toast.xcs-toast-error { background: var(--fz-crit-ink); border-color: var(--fz-crit-ink); color: var(--fz-surface-1); }
[data-theme="dark"] .xcs-app .xcs-toast.xcs-toast-error { background: var(--fz-crit); border-color: var(--fz-crit); color: var(--fz-text-on-accent); }
.xcs-toast .xcs-toast-ico {
  width: 28px; height: 28px;
  background: var(--fz-accent);
  color: var(--fz-text-on-accent);
  font-weight: var(--fz-fw-bold);
}
.xcs-toast.is-err .xcs-toast-ico,
[data-theme="dark"] .xcs-toast.is-err .xcs-toast-ico { background: var(--fz-crit-soft); color: var(--fz-crit-ink); }
.xcs-toast.is-info .xcs-toast-ico,
[data-theme="dark"] .xcs-toast.is-info .xcs-toast-ico { background: var(--fz-info-soft); color: var(--fz-info-ink); }


/* ═══ 12. PROGRESS BARS ═════════════════════════════════════════════════════
   Thin rounded tracks on surface-3. Normal progress = lime. Light theme: lime on a
   light track measures 1.0:1, so the fill gets a 1px dark-green edge there (the
   brand colour stays, the bar stays visible). The edge is --fz-focus (#3A8F18,
   3.38:1 on surface-3) — --fz-accent-line is only 2.89:1 on that track.
   Warn/crit/neutral = status bases. */
.fsw-bar,
.fsw-periode-bar,
.fsw-mbar-track {
  height: 6px;
  background: var(--fz-surface-3);
  border: 0;
  border-radius: var(--fz-r-pill);
}
.fsw-pace-track {
  height: 8px;
  background: var(--fz-surface-3);
  border-radius: var(--fz-r-pill);
}
.fsw-bar > i,
.fsw-bar > i.is-green,
.fsw-pace-fill,
.fsw-periode-fill,
.fsw-mbar-seg.is-posted {
  background: var(--fz-accent);
  border-radius: var(--fz-r-pill);
  box-shadow: inset 0 0 0 1px var(--fz-focus);
}
[data-theme="dark"] .fsw-bar > i,
[data-theme="dark"] .fsw-pace-fill,
[data-theme="dark"] .fsw-periode-fill,
[data-theme="dark"] .fsw-mbar-seg.is-posted { box-shadow: none; }
.fsw-bar > i.is-yellow { background: var(--fz-warn); box-shadow: none; }
.fsw-bar > i.is-red { background: var(--fz-crit); box-shadow: none; }
.fsw-bar > i.is-grey { background: var(--fz-neutral); box-shadow: none; }
.fsw-capacity.is-over .fsw-bar > i { background: var(--fz-crit); box-shadow: none; }
.fsw-mbar-seg.is-posted { border-radius: 0; }
/* "Ready" segment = hatched accent (texture, not a third lightness). */
.fsw-mbar-seg.is-ready {
  background: repeating-linear-gradient(135deg, var(--fz-focus) 0 3px, transparent 3px 6px);
}
[data-theme="dark"] .fsw-mbar-seg.is-ready {
  background: repeating-linear-gradient(135deg, var(--fz-accent) 0 3px, transparent 3px 6px);
}
.fsw-bar > i,
.fsw-pace-fill,
.fsw-periode-fill,
.fsw-mbar-seg { transition: width var(--fz-t-med) var(--fz-ease), background-color var(--fz-t-fast) var(--fz-ease); }
.fsw-pace-plan { background: var(--fz-text-1); }
.fsw-pace-plan::after, .fsw-pace-n, .fsw-bar-legend { color: var(--fz-text-3); }
.fsw-mbar-n { color: var(--fz-text-2); }
progress { background: var(--fz-surface-3); height: 6px; border-radius: var(--fz-r-pill); }
progress::-webkit-progress-bar { background: var(--fz-surface-3); border-radius: var(--fz-r-pill); }
progress::-webkit-progress-value { background: var(--fz-accent); border-radius: var(--fz-r-pill); }
progress::-moz-progress-bar { background: var(--fz-accent); border-radius: var(--fz-r-pill); }


/* ═══ 13. SCROLLBARS ════════════════════════════════════════════════════════
   Thin, subtle thumbs. Written as ::-webkit-scrollbar (NOT the standard
   scrollbar-color / scrollbar-width, which would switch Chrome off the webkit
   pseudo-elements and un-hide every "display:none" scrollbar in the app).
   No class weight (0,0,2), so every component-specific scrollbar still wins. Scoped
   to body descendants: the viewport scrollbar stays the OS one, so the fixed bell /
   FAB never move. In dark the legacy global (styles.css:18031, same 10px / 2px inset
   shape) still applies; this brings light up to the same thin pill. */
body ::-webkit-scrollbar { width: 10px; height: 10px; }
body ::-webkit-scrollbar-track { background: transparent; }
body ::-webkit-scrollbar-thumb {
  background-color: var(--fz-border-strong);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: var(--fz-r-pill);
}
body ::-webkit-scrollbar-thumb:hover { background-color: var(--fz-text-3); }
body ::-webkit-scrollbar-corner { background: transparent; }


/* ═══ 14. TOUCH FLOORS & REDUCED MOTION ═════════════════════════════════════
   Outside the page header nothing above sets a min-height, so the 40/44px touch floors
   of ops-theme.css and nova-ui.css still hold, and the tab track's 4px padding only adds
   to the tab's own 38–44px floor. The page-header action row (§1) is the one place that
   sets a height: var(--fz-ctl-h), which is 44px on phones (40px tabs in a 44px track). */
@media (max-width: 768px) {
  .fsw-tabs { padding: 3px; }
  /* The filter-row inputs lost their vertical padding above (one size in both themes);
     ops-theme.css's `.fsw-page input:not(…)` floor (0,3,1) is only 40px, so the 44px
     phone target is restated at the same weight for them. */
  .fsw-page .fsw-filters input.fsw-input,
  .xcs-main .fsw-page input.fsw-sel { min-height: 44px; }
  /* nova-ui.css:1306-1334 compacted KPI tiles for phones at (0,1,0); the base rules
     above are later and would undo that, so the phone values are restated. */
  .fsw-kpis { gap: var(--fz-s-2); }
  .fsw-kpi { padding: var(--fz-s-3) var(--fz-s-4); }
  .fsw-kpi-v { font-size: var(--fz-fs-num-sm); margin: var(--fz-s-1) 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fsw-modal { animation: none; }
  .xcs-btn-primary, .xcs-btn-ghost, .xcs-btn-danger, .fsw-btn-danger, .xcs-btn-sm,
  .fsw-summary-tog, .fsw-tab, .fsw-tog, .fsw-kpi,
  .fsw-bar > i, .fsw-pace-fill, .fsw-periode-fill, .fsw-mbar-seg { transition: none; }
  /* no press movement either — the dim / surface change still says "pressed" */
  .xcs-btn-primary:active:not(:disabled),
  [data-theme="dark"] .xcs-btn-primary:active:not(:disabled),
  .xcs-btn-ghost:active:not(:disabled),
  [data-theme="dark"] .xcs-btn-ghost:active:not(:disabled),
  .xcs-btn-danger:active:not(:disabled),
  .fsw-btn-danger:active:not(:disabled),
  .xcs-btn-sm:active:not(:disabled),
  .fsw-summary-tog:active:not(:disabled),
  .fsw-tog:active:not(:disabled) { transform: none; }
}


/* ═══ 15. FOCUS COLOUR, INLINE LINKS, PAGE TYPE RHYTHM ═══════════════════════
   Focus: three legacy rules paint the keyboard ring in --fsw-accent-line /
   --fsw-accent (ops-theme.css:596 inside pages, modals and drawers;
   styles.css:17838 everywhere in dark; nova.css:375 :where()). Those stay LIME in
   the burgundy / silver skins, so the ring did not follow the skin. Only the
   colour is restated, at the same weights, later — shape and offset stay theirs. */
[data-theme="dark"] *:focus-visible,
.fsw-page :focus-visible,
.fsw-modal :focus-visible,
.fsw-drawer :focus-visible { outline-color: var(--fz-focus); }

/* Inline text links (a bare <a> inside running text: contact rows, "Open ↗",
   detail values). Colour stays the component's; the underline sits clear of the
   descenders and appears on hover. Link PILLS (.fsw-links a) are direct children
   of a div, so they are not matched. */
:where(p, li, td, dd, b, strong, span, small) > a:not([class]) {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  border-radius: var(--fz-r-xs);
}
:where(p, li, td, dd, b, strong, span, small) > a:not([class]):hover { text-decoration-line: underline; }

/* Page-level type rhythm. Headings balance their lines; the legacy section
   header (.fsw-section-h — Clients list groups, My Week) leaves the 14px
   UPPERCASE micro style for a calm sentence-case heading, with its count as the
   same neutral pill as card headers. Page files override at higher weight. */
.xcs-main-inner :where(h1, h2, h3, h4) { text-wrap: balance; }
.fsw-section-h { gap: var(--fz-s-3); }
.fsw-section-h h3 {
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-card);
  font-weight: var(--fz-fw-semi);
  letter-spacing: -0.01em;
  line-height: var(--fz-lh-head);
  text-transform: none;
  color: var(--fz-text-1);
}
.fsw-section-h .fsw-n {
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  background: var(--fz-surface-3);
  color: var(--fz-text-2);
  border: 0;
  border-radius: var(--fz-r-pill);
  padding: 0 var(--fz-s-2);
  line-height: 22px;
}
.fsw-section-h .fsw-sub { font-size: var(--fz-fs-meta); color: var(--fz-text-3); }
.fsw-section.is-overdue .fsw-section-h h3 { color: var(--fz-crit-ink); }
.fsw-section.is-overdue .fsw-section-h .fsw-n { background: var(--fz-crit-soft); color: var(--fz-crit-ink); }
/* Legacy sub-section label (.fsw-sec h4): stays a quiet label, at the 12px floor. */
.fsw-sec h4 { font-size: var(--fz-fs-micro); letter-spacing: .04em; color: var(--fz-text-3); }
