/* =============================================
   ACS ExtJS Shell — Shared Theme Layer
   =============================================
   Single source of truth for theme-level CSS that applies to every ExtJS
   page in the product (startpage, book viewer, admin pages, compliance
   reports, configuration screens, popups, dialogs).

   Load order on every page (see ui/widgets/ExtJS.py `_dep_acs.css`):

     azzurra-legacy.css        (Kendo/ExtJS v3 baseline — vendor)
       → ext-acs-theme.css      (THIS FILE — shared theme)
         → ext-acs-header.css    (header bar — uses theme tokens)
         → ext-acs-startpage.css (page-specific — will shrink in A2)

   The intent of this file is to override azzurra-legacy with the
   ACS visual language defined in docs/theme/THEME_GUIDE.md, then
   let header / page CSS layer specifics on top.

   ----- TOKEN CONSUMPTION -----

   `acs-theme-properties.css` is the compiled output of
   `shared-theme/scss/css-properties.scss` and is imported below.
   It defines the `--acs-*` custom properties (brand colors, neutrals,
   spacing, typography, borders, shadows) plus `--sp-*` legacy aliases
   that mirror the same values, so any consumer can reference either
   token namespace during the migration.

   To regenerate after a token change, run from `shared-theme/`:
     npm run build:css
   then copy `scss/dist/acs-theme-properties.css` to
   `contentserver/static/css/acs-theme-properties.css` (same model as
   `shared-icons.css`). Commit both the SCSS source and the CSS output.

   Future work (Phase 2 of the theme refactor): replace inline literals
   in this file and in `ext-acs-startpage.css` with `var(--acs-*)`
   references, so a single token change in `_variables.scss` propagates
   to every consumer.

   Token map for the dark surface (see THEME_GUIDE.md §1.2):
     #1c2127               → --acs-dark-bg
     rgba(255,255,255,.06) → --acs-dark-default-bg-icon
     rgba(255,255,255,.12) → --acs-dark-hover-bg-icon
     rgba(255,255,255,.08) → --acs-dark-hover-bg-menu
     rgba(0,174,239,.15)   → --acs-dark-active-bg

   Module/feature colors (see THEME_GUIDE.md §1.2):
     #B261D5  → --acs-ai-purple        (AffiniAI)
     #1A9E7A  → --acs-tasks-accent     (AffiniTask muted)
     #1AED94  → --acs-tasks-green      (AffiniTask vivid)
     #00B3FA  → --acs-docs-blue        (AffiniDocs / Browse Library)
     #FE235D  → --acs-tag-red          (AffiniTag / Search)

   Light theme + neutrals: see shared-theme/scss/_variables.scss for the
   complete catalog (text/secondary/tertiary, surface, borders, semantic
   states, typography). All matching `--acs-*` props will be available
   via the SCSS-to-CSS output once it's wired in.
   ============================================= */

/* Shared theme tokens — compiled output of shared-theme/scss/css-properties.scss.
   Defines `--acs-*` and `--sp-*` custom properties at :root. Loaded first so
   all subsequent rules in this file (and downstream sheets like
   `ext-acs-header.css`, `ext-acs-startpage.css`) can reference the tokens. */
@import url("acs-theme-properties.css");

/* Shared icon library — single source of truth for SVG icons across all
   ACS apps (Angular + ExtJS). Provides `--icon-NAME` CSS custom properties
   built from shared-theme/icons/src/*.svg. Consume via mask-image +
   background-color so icon color is controlled by CSS state. See
   shared-theme/README.md "ExtJS shell / plain CSS". */
@import url("shared-icons.css");

/* =============================================================================
   PHASE 1 VALIDATING RULE
   =============================================================================
   Smoke-test that the var(--acs-*) tokens resolve correctly when consumed
   shell-wide. Picked --acs-font-family because the value is the system-stack
   that's already the visible font on every ExtJS page today (see
   shared-theme/scss/_typography.scss), so this rule does NOT change the
   rendered font on any existing page — it only proves the token plumbing
   works.

   When Phase 2 lands and substantive Bucket-A rules start consuming
   var(--acs-*), this single declaration becomes redundant and can be
   absorbed into a larger body rule, or removed if downstream rules
   already cover body typography.
   ============================================================================= */
body {
  font-family: var(--acs-font-family);
}

/* =============================================================================
   The sections below are placeholders. Workstream A2 will move generic
   theme rules here from contentserver/static/css/ext-acs-startpage.css.
   Until then, leave each section as a documented stub.
   ============================================================================= */

/* ---------- Buttons -----------
   Primary, secondary, flat, link variants matching `THEME_GUIDE.md` §6.10
   ("Button Patterns") and `shared-theme/scss/_buttons.scss`. Will replace
   the legacy `.x-btn` styling that currently lives both in azzurra-legacy
   and in `ext-acs-startpage.css`'s scoped overrides. */

/* ---------- Form fields -----------
   Inputs, textareas, comboboxes, checkboxes, radios. Matches THEME_GUIDE.md
   §6.4 ("Search Input") for the input shell, plus full state coverage
   (focus, disabled, error).

   Promoted from `.acs-startpage`-gated rules in `ext-acs-startpage.css`
   during Phase 2 of the theme refactor (THEME_REVIEW.md §4.3 Phase 2).
   Now applies shell-wide. Hex literals replaced with `var(--acs-*)`
   tokens; px font-sizes kept as literals (per Phase 2 plan D4.b —
   ExtJS line-height arithmetic is fragile under rem; Phase 9 will
   revisit the cross-app font-size scale).

   `!important` is retained on every rule to defend against
   `azzurra-legacy.css` and `ext-acs-widgets.css` which load after this
   file in the `_dep_acs.css` chain. Phase 5 of the theme refactor
   audited the surviving declarations (commit `cdae293ac`, 2026-05-10);
   8 `!important` were removed from form labels + radio-group flex. The
   remainder were probed and confirmed load-bearing — azzurra-legacy
   ships full ExtJS chrome (tabs, menus, button states) that wins via
   shorthand resets even at equal selector specificity. See
   `docs/welcome_page/SHELL_TECH_DEBT.md` "Phase 5 prep" Resolved entry
   for the methodology + reverted-attempt log.

   Dialog-scoped overrides for `.x-window .x-form-*` (full-32px input
   sizing) were migrated to this file by Phase 3 PR 3.3 and the gate
   was fully removed in Phase 4. All form chrome now lives shell-wide. */

/* --- Text inputs — base (page-wide) ---
   Search-field-container, search accordion, dialogs, and any other
   `.x-form-text` consumer share these base colors/appearance.

   Phase 3 PR 3.3 consolidated the canonical 32px geometry onto this
   rule (was previously dialog-scoped in `.x-window .x-form-text`,
   gate removed by Phase 4). Closes the SHELL_TECH_DEBT entry "Phase 2
   surfaced visual gaps on non-startpage form inputs" — admin/viewer
   ExtJS inputs now match dialog inputs at 32px instead of
   ExtJS-native ~21px. */
.x-form-text {
    background-color: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-md) !important;
    color: var(--acs-text-primary) !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    height: 32px !important;
    line-height: 14px !important;
    box-sizing: border-box !important;
}

.x-form-text:focus {
    background-color: #fff !important;
    border-color: var(--acs-brand-cyan) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px var(--acs-active-bg) !important;
}

/* Admin Dashboard "Client / Project" filter bar.
   The canonical form chrome above sizes inputs and trigger-field wraps at 32px
   — correct for full-size forms, but this ExtJS filter toolbar is laid out by a
   border-layout that reserves only ExtJS's native ~24px slot above the grid.
   The taller restyled field overflowed that slot, so the grid panel below
   painted over it and clipped the "Client:/Project:" labels.

   Scope is deliberately tight: `:has(.client_field)` matches ONLY the
   ClientProjectFilter toolbar (the sole toolbar carrying that field), never the
   shared `.acs_top_menu` shell header or any other app toolbar. Keep the modern
   chrome (border, radius, background); only restore compact geometry so the bar
   fits its slot. The other admin screens (Projects/Books/Book Details) are
   MochiKit, not ExtJS, and are untouched by these `.x-*` selectors. */
/* Same collision, on every shell toolbar that still has its legacy geometry.
   Ext writes `height: 25px` on `.acs_toolbar` (the 32px reservation less the
   bar's own 4px top padding, 2px bottom padding and 1px border), and
   `.x-toolbar` carries `overflow: hidden`, so a 32px field loses its bottom
   edge. Size the field to the bar rather than growing the bar on every screen.

   Screens whose bar was ported to 40px or 44px scope their own field rules
   (`body.audit-page`, `body.tasks-page`) and the admin dashboard has the
   `:has(.client_field)` block below; all of them outrank this. */
.acs_toolbar .x-form-field-wrap:not(.x-hide-display) {
    height: 22px !important;
}

/* `Ext.ButtonGroup` wraps a toolbar field in a framed panel, and its 1px
   padding plus 1px border on each side push the cell 4px past the bar even
   once the field fits. */
.acs_toolbar .x-btn-group,
.acs_toolbar .x-btn-group-body {
    padding: 0 !important;
    border: 0 none !important;
}

.x-toolbar:has(.client_field) {
    /* Center the compact filter fields within the toolbar's reserved slot. The
       slot height is set in JS (`acs.dashboardApp.toolbar_height`); this padding
       just distributes the spare space above/below the fields so they don't butt
       against the tab strip or the grid. Keep it within the slot — the grid's
       top is computed from the JS height, not this padding. */
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
.x-toolbar:has(.client_field) .x-form-text {
    height: auto !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    line-height: normal !important;
}
.x-toolbar:has(.client_field) .x-form-field-wrap {
    height: 20px !important;
}

/* Textareas — same chrome as .x-form-text but height auto (textareas
   define their own rows). Legacy paints a dark-gray (#aeb6be) border
   and tiny 0 3px padding; align with the canonical input rule above. */
textarea.x-form-field,
.x-form-textarea {
    background-color: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-md) !important;
    color: var(--acs-text-primary) !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    font-family: var(--acs-font-family) !important;
}
textarea.x-form-field:focus,
.x-form-textarea:focus {
    background-color: #fff !important;
    border-color: var(--acs-brand-cyan) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px var(--acs-active-bg) !important;
}

/* Read-only / disabled input chrome — keep the field shape (border,
   radius, bg) so the layout stays consistent with the rest of the
   form, just dim the field with opacity to signal "not editable here".
   The value is set elsewhere (a picker dialog, another control); the
   user reads it but can't type in it. */
.x-form-text[readonly],
.x-form-text:read-only,
textarea.x-form-field[readonly],
textarea.x-form-field:read-only,
.x-form-textarea[readonly],
.x-form-textarea:read-only {
    opacity: 0.7 !important;
    cursor: default !important;
}
.x-form-text[readonly]:focus,
.x-form-text:read-only:focus,
textarea.x-form-field[readonly]:focus,
textarea.x-form-field:read-only:focus,
.x-form-textarea[readonly]:focus,
.x-form-textarea:read-only:focus {
    box-shadow: none !important;
}

.x-form-text[disabled],
.x-form-text:disabled,
textarea.x-form-field[disabled],
textarea.x-form-field:disabled,
.x-form-textarea[disabled],
.x-form-textarea:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* x-trigger-noedit is the ExtJS class added to combo/date inputs that
   take their value only via the trigger button (i.e. display-only
   text). These look editable by default but functionally aren't — keep
   them visually distinct from a real input by removing the focus glow
   and softening the chrome. They still need a visible border so the
   user understands there's a value container. */
.x-form-text.x-trigger-noedit {
    cursor: default !important;
}
.x-form-text.x-trigger-noedit:focus {
    box-shadow: none !important;
}

/* --- Focus state for wrapped inputs (combo, date, search-in, trigger
       fields) — shell-wide.
   For inputs nested inside `.x-form-field-wrap` the chrome lives on the
   wrap (border, radius, background) and the inner input is borderless
   (see `.x-form-field-wrap .x-form-text` below). The default
   `.x-form-text:focus` chrome above paints onto a borderless transparent
   element, which produces a visible 2px box-shadow glow that leaks past
   the trigger button — visually weird because the trigger has square
   right corners that don't follow the wrap's rounded radius.

   Suppress the inner input's focus chrome inside a wrap, and lift it
   onto `.x-form-field-wrap:focus-within` so the cyan outline + glow
   follow the wrap's rounded shape and include the trigger area. */
.x-form-field-wrap .x-form-text:focus {
    border-color: transparent !important;
    box-shadow: none !important;
    background: transparent !important;
}

.x-form-field-wrap:focus-within {
    border-color: var(--acs-brand-cyan) !important;
    box-shadow: 0 0 0 2px var(--acs-active-bg) !important;
}

/* --- Validation: red border for invalid/required fields ---
   Phase 2 consolidates the rule that previously lived in both
   `ext-acs-startpage.css` (gated) and `ext-acs-widgets.css:27`
   (shell-wide, but with an inline-hex border). Single source of truth
   here. */
.x-form-invalid,
textarea.x-form-invalid {
    border: 1px solid var(--acs-form-invalid-border) !important;
    background: #fff repeat-x bottom !important;
}

/* --- Form labels --- */
.x-form-item-label {
    color: var(--acs-text-secondary);
    font-size: 13px;
}

/* --- Combo box wrapper --- */
.x-form-field-wrap {
    background-color: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-md) !important;
}

.x-form-field-wrap .x-form-text {
    border: none !important;
    background: transparent !important;
}
/* A wrapped input draws no border of its own, so an invalid one marks its
   wrap instead (beats the cyan :focus-within outline, so it stays red). */
.x-form-field-wrap:has(> .x-form-text.x-form-invalid) {
    border-color: var(--acs-form-invalid-border) !important;
    background-color: #fff !important;
}

/* --- Combo trigger — SVG chevron / calendar / clear icons ---
   Form triggers render as <button class="x-form-trigger"> wrapping an
   inline <svg fill="none" stroke="currentColor">, courtesy of the JS
   override at javascript/ext-acs-form-trigger-override.js. The button
   owns border / hover-bg / focus ring; the SVG inherits `color` and
   paints via currentColor — no clip conflicts, two independent
   channels (container wash + icon-flip on hover). Width 20px keeps
   parity with the original <img>-based trigger so ExtJS layout math
   (which precomputed input widths assuming the 16px native trigger
   + our 4px breathing room) doesn't shift. */
.x-form-trigger {
    width: 20px !important;
    padding: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    border: none !important;
    border-left: 1px solid var(--acs-border-input) !important;
    border-radius: 0 5px 5px 0 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.15s, color 0.15s !important;
}

.x-form-trigger:hover {
    background-color: #e8ecf1 !important;
    color: var(--acs-brand-cyan, #00aeef) !important;
}

.x-form-trigger:focus {
    outline: none !important;
}

.x-form-trigger > svg {
    display: block !important;
    pointer-events: none !important;
}

/* --- File upload Browse button — same chrome as a form trigger ---
   The text input and Browse sit side by side in the wrap, like an input and
   its trigger (ux-all positions both absolutely, which left a fit-content
   wrap with nothing to measure). The transparent file input still lies over
   Browse and takes the clicks, so hover is read from that input. The x-btn
   table is flattened to its middle cell so Browse fills the wrap's height. */
.x-form-file-wrap .x-form-file-text {
    position: relative !important;
    left: auto !important;
}
.x-form-file-wrap .x-form-file-btn {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    flex: 0 0 auto !important;
    height: 100% !important;
}
.x-form-file-wrap .x-form-file-btn,
.x-form-file-wrap .x-form-file-btn > tbody,
.x-form-file-wrap .x-form-file-btn > tbody > tr:nth-child(2),
.x-form-file-wrap .x-form-file-btn td.x-btn-mc,
.x-form-file-wrap .x-form-file-btn td.x-btn-mc > em {
    display: block !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
}
.x-form-file-wrap .x-form-file-btn > tbody > tr:first-child,
.x-form-file-wrap .x-form-file-btn > tbody > tr:last-child,
.x-form-file-wrap .x-form-file-btn td.x-btn-ml,
.x-form-file-wrap .x-form-file-btn td.x-btn-mr {
    display: none !important;
}
.x-form-file-wrap .x-form-file-btn button.x-btn-text {
    position: relative !important;
    width: 20px !important;
    height: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-left: 1px solid var(--acs-border-input) !important;
    border-radius: 0 5px 5px 0 !important;
    transition: background-color 0.15s !important;
}
.x-form-file-wrap .x-form-file-btn button.x-btn-text::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--acs-text-secondary, #5a6370);
    -webkit-mask: var(--icon-folder-open) center / 14px no-repeat;
            mask: var(--icon-folder-open) center / 14px no-repeat;
    transition: background-color 0.15s;
}
.x-form-file-wrap .x-form-file {
    top: 0 !important;
    height: 100% !important;
    cursor: pointer !important;
}
.x-form-file-wrap:has(.x-form-file:hover) .x-form-file-btn button.x-btn-text {
    background-color: #e8ecf1 !important;
}
.x-form-file-wrap:has(.x-form-file:hover) .x-form-file-btn button.x-btn-text::before {
    background-color: var(--acs-brand-cyan, #00aeef);
}

/* --- Spinner trigger (Ext.ux.form.SpinnerField) — two chevrons ---
   ExtJS renders the trigger as one <img> and splits it into up/down halves
   by pointer position, so each half gets its own chevron (mask layers) and
   its own hover colour (the over/click class Ext.ux.Spinner sets per half).
   The legacy drag-to-spin handle sat over the up chevron, stole its hover
   and showed a resize cursor; it is hidden. */
.x-form-field-wrap .x-form-trigger.x-form-spinner-trigger {
    border-left: none !important;
    background: var(--acs-text-secondary, #5a6370) !important;
    -webkit-mask: var(--icon-chevron-up) center top 4px / 12px no-repeat,
                  var(--icon-chevron-down) center bottom 4px / 12px no-repeat !important;
            mask: var(--icon-chevron-up) center top 4px / 12px no-repeat,
                  var(--icon-chevron-down) center bottom 4px / 12px no-repeat !important;
}
.x-form-field-wrap .x-form-trigger.x-form-spinner-overup,
.x-form-field-wrap .x-form-trigger.x-form-spinner-clickup {
    background: linear-gradient(var(--acs-brand-cyan, #00aeef) 50%, var(--acs-text-secondary, #5a6370) 50%) !important;
}
.x-form-field-wrap .x-form-trigger.x-form-spinner-overdown,
.x-form-field-wrap .x-form-trigger.x-form-spinner-clickdown {
    background: linear-gradient(var(--acs-text-secondary, #5a6370) 50%, var(--acs-brand-cyan, #00aeef) 50%) !important;
}
/* The mask clips the trigger's own border, so the divider goes on the input */
.x-form-field-wrap:has(> .x-form-spinner-trigger) > .x-form-text {
    border-right: 1px solid var(--acs-border-input) !important;
}
.x-form-field-wrap .x-form-spinner-splitter {
    display: none !important;
}

/* Window resize handles: azzurra-legacy paints them with a sprite that reads
   as a dark border on pinned (always-visible) handles. Keep them as invisible
   hit-targets. */
.x-window .x-resizable-handle {
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
}

/* Batch upload results grid: the legacy `.x-panel-body` drops the top border
   under a title, which the themed header no longer draws. */
.acs-upload-results > .x-panel-bwrap > .x-panel-body {
    border-top-style: solid !important;
    border-top-width: 1px !important;
}
/* The grid is a panel, not a form row, so give it the rows' 7px gap when
   options follow it (Batch User Loader). */
.x-window .acs-upload-results:not(:last-child) {
    margin-bottom: 7px !important;
}

/* --- Checkboxes --- */
.x-form-checkbox {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    background: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-sm) !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
}

.x-form-checkbox:hover {
    border-color: var(--acs-brand-cyan) !important;
}

.x-form-checkbox:checked {
    background: var(--acs-brand-cyan) !important;
    border-color: var(--acs-brand-cyan) !important;
}

.x-form-checkbox:checked::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 45% !important;
    width: 3px !important;
    height: 7px !important;
    border: solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

/* --- Radio buttons --- */
.x-form-radio {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    background: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
}

.x-form-radio:hover {
    border-color: var(--acs-brand-cyan) !important;
}

.x-form-radio:checked {
    border-color: var(--acs-brand-cyan) !important;
    background: #fff !important;
}

.x-form-radio:checked::after {
    content: '' !important;
    position: absolute !important;
    width: 8px !important;
    height: 8px !important;
    background: var(--acs-brand-cyan) !important;
    border-radius: 50% !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.x-form-radio:disabled {
    opacity: 0.5 !important;
    cursor: default !important;
}

/* --- Checkbox / radio labels --- */
.x-form-cb-label {
    color: var(--acs-text-primary) !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    top: 0 !important;
}

/* --- Radio group check-wrap: flex layout --- */
.x-form-radio-group .x-form-check-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.x-form-radio-group .x-form-cb-label {
    padding: 0;
    width: auto;
    line-height: 16px;
}

/* ---------- Form invalid icon ----------
   The exclamation mark that ExtJS positions next to a field with a
   validation error. Legacy renders this as a 16x18 sprite background
   pointed at azzurra-legacy's exclamation.gif. Migrate to the
   --icon-alert-circle token from shared-icons.css and paint via
   mask-image so the icon inherits a themed color.

   Placement lives in ext-acs-form-invalid-icon-override.js: each field
   aligns the icon inside its own right edge, clear of its trigger. CSS
   cannot do it, because the icon is a child of the whole form row. */
.x-form-invalid-icon {
    width: 16px !important;
    height: 16px !important;
    background-image: none !important;
    -webkit-mask-image: var(--icon-alert-circle) !important;
            mask-image: var(--icon-alert-circle) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-form-invalid-border, #d04437) !important;
}
/* Typed text stops before the icon */
.x-form-text.x-form-invalid {
    padding-right: 24px !important;
}

/* ---------- Inline action buttons (.x-btn primary hover) ----------
   Legacy `.acs-new-theme .x-btn.x-btn-over:not(.reset-btn)` flips the
   base muted-teal (#0e8bb0) to vivid cyan (#00bcff) on hover. Per
   THEME_GUIDE.md:518 ("vivid cyan reserved for links and focus states")
   the hover should darken the muted teal instead — use `--acs-brand-
   cyan-deep` (#0a6f8c). Same selector chain as legacy so we match
   specificity, plus our :hover keeps the visual contract consistent.

   Scope: NOT inside panel-footer / window-footer / panel-btns — those
   buttons use the outline-secondary hover pattern (.x-window .x-panel-
   footer .x-btn.x-btn-over → hover-bg + cyan border + cyan text),
   defined further down in this file. Primary OK buttons in footers
   get their own selectors (.dialog-ok-btn, .msg_dlg_ok_btn). */
.acs-new-theme .x-btn.x-btn-over:not(.reset-btn) {
    background: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    background-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
    border-color: var(--acs-brand-cyan-deep, #0a6f8c) !important;
}
.acs-new-theme :is(.x-window, .task-popup) .x-panel-footer .x-btn.x-btn-noicon.x-btn-over,
.acs-new-theme :is(.x-window, .task-popup) .x-panel-footer .x-btn.x-btn-text-icon.x-btn-over,
.acs-new-theme .x-window .x-window-footer .x-btn.x-btn-noicon.x-btn-over,
.acs-new-theme .x-window .x-window-footer .x-btn.x-btn-text-icon.x-btn-over,
.acs-new-theme :is(.x-window, .task-popup) .x-panel-btns .x-btn.x-btn-noicon.x-btn-over,
.acs-new-theme :is(.x-window, .task-popup) .x-panel-btns .x-btn.x-btn-text-icon.x-btn-over {
    /* Footer buttons defer to the canonical .x-window .x-panel-footer
       .x-btn.x-btn-over rule below — reset the darken-on-hover here so
       the outline-secondary hover (hover-bg + cyan accent) wins. */
    background: var(--acs-hover-bg) !important;
    background-color: var(--acs-hover-bg) !important;
    border-color: var(--acs-brand-cyan) !important;
}

/* ---------- HTML editor toolbar icons ----------
   `Ext.form.HtmlEditor` (`.x-html-editor-tb`) renders its toolbar
   buttons using a single sprite-sheet from azzurra-legacy (each button
   is a <button class="x-edit-bold">, etc., painted via
   background-position offsets). Migrate every button to a mask-image
   token from shared-icons.css so the editor toolbar matches the rest
   of the icon library and re-colours cleanly per hover/active state.

   Pattern: the button itself becomes the icon host. background-color
   paints through the mask, providing the colour. Hover/pressed states
   re-paint via background-color.

   Only the buttons listed below get a mask. Any other `x-edit-` button
   (the ux-HtmlEditor-Plugins add-ons on Edit Book Content) keeps its own
   PNG icon; under these rules it would paint as a solid square. */
.x-html-editor-tb button:is(.x-edit-bold, .x-edit-italic, .x-edit-underline,
    .x-edit-increasefontsize, .x-edit-decreasefontsize, .x-edit-forecolor,
    .x-edit-backcolor, .x-edit-justifyleft, .x-edit-justifycenter,
    .x-edit-justifyright, .x-edit-insertorderedlist,
    .x-edit-insertunorderedlist, .x-edit-createlink, .x-edit-sourceedit) {
    background-image: none !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-color: var(--acs-text-secondary) !important;
}
.x-html-editor-tb :is(.x-btn-over, .x-btn-pressed) button:is(.x-edit-bold,
    .x-edit-italic, .x-edit-underline, .x-edit-increasefontsize,
    .x-edit-decreasefontsize, .x-edit-forecolor, .x-edit-backcolor,
    .x-edit-justifyleft, .x-edit-justifycenter, .x-edit-justifyright,
    .x-edit-insertorderedlist, .x-edit-insertunorderedlist,
    .x-edit-createlink, .x-edit-sourceedit) {
    background-color: var(--acs-brand-cyan) !important;
}

/* Override legacy dark hover backgrounds that bleed onto the HTML
   editor toolbar from two sources in azzurra-legacy:
   - .x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn.x-btn-over (#575757)
   - .x-window.black-window-active.active-window .x-btn.x-btn-over (#424242)
   Both must be beaten with high-specificity selectors. */
.x-html-editor-tb .x-btn,
.x-window .x-html-editor-tb .x-btn,
.x-window.black-window-active.active-window .x-html-editor-tb .x-btn {
    background-color: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    border-radius: var(--acs-radius-sm) !important;
}
.x-html-editor-tb .x-btn.x-btn-over,
.x-html-editor-tb .x-btn.x-btn-pressed,
.x-window .x-html-editor-tb .x-btn.x-btn-over,
.x-window .x-html-editor-tb .x-btn.x-btn-pressed,
.x-window.black-window-active.active-window .x-html-editor-tb .x-btn.x-btn-over,
.x-window.black-window-active.active-window .x-html-editor-tb .x-btn.x-btn-pressed {
    background-color: var(--acs-hover-bg) !important;
    background-image: none !important;
    border-color: transparent !important;
}

/* Split-button arrow chevron (color/highlighter dropdowns) — replace
   the legacy arrow.gif / arrow-w.gif sprite with a mask-image chevron
   so it inherits colour from the parent button (turns cyan on hover
   along with the palette icon). Without this, the legacy white-on-
   transparent hover sprite is invisible against our hover-bg. */
.x-html-editor-tb .x-btn-arrow {
    position: relative !important;
    background-image: none !important;
    padding-right: 14px !important;
    color: var(--acs-text-secondary) !important;
}
.x-html-editor-tb .x-btn-over .x-btn-arrow,
.x-html-editor-tb .x-btn-pressed .x-btn-arrow {
    color: var(--acs-brand-cyan) !important;
}
.x-html-editor-tb .x-btn-arrow::after {
    content: '' !important;
    position: absolute !important;
    right: 2px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 10px !important;
    height: 10px !important;
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
    -webkit-mask-size: 10px 10px !important;
            mask-size: 10px 10px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: currentColor !important;
    pointer-events: none !important;
}

.x-html-editor-tb .x-edit-bold              { -webkit-mask-image: var(--icon-bold) !important;              mask-image: var(--icon-bold) !important; }
.x-html-editor-tb .x-edit-italic            { -webkit-mask-image: var(--icon-italic) !important;            mask-image: var(--icon-italic) !important; }
.x-html-editor-tb .x-edit-underline         { -webkit-mask-image: var(--icon-underline) !important;         mask-image: var(--icon-underline) !important; }
.x-html-editor-tb .x-edit-increasefontsize  { -webkit-mask-image: var(--icon-font-size-plus) !important;    mask-image: var(--icon-font-size-plus) !important; }
.x-html-editor-tb .x-edit-decreasefontsize  { -webkit-mask-image: var(--icon-font-size-minus) !important;   mask-image: var(--icon-font-size-minus) !important; }
.x-html-editor-tb .x-edit-forecolor         { -webkit-mask-image: var(--icon-palette) !important;           mask-image: var(--icon-palette) !important; }
.x-html-editor-tb .x-edit-backcolor         { -webkit-mask-image: var(--icon-highlighter) !important;       mask-image: var(--icon-highlighter) !important; }
.x-html-editor-tb .x-edit-justifyleft       { -webkit-mask-image: var(--icon-align-left) !important;        mask-image: var(--icon-align-left) !important; }
.x-html-editor-tb .x-edit-justifycenter     { -webkit-mask-image: var(--icon-align-center) !important;      mask-image: var(--icon-align-center) !important; }
.x-html-editor-tb .x-edit-justifyright      { -webkit-mask-image: var(--icon-align-right) !important;       mask-image: var(--icon-align-right) !important; }
.x-html-editor-tb .x-edit-insertorderedlist { -webkit-mask-image: var(--icon-list-ordered) !important;      mask-image: var(--icon-list-ordered) !important; }
.x-html-editor-tb .x-edit-insertunorderedlist { -webkit-mask-image: var(--icon-list) !important;            mask-image: var(--icon-list) !important; }
.x-html-editor-tb .x-edit-createlink        { -webkit-mask-image: var(--icon-link) !important;              mask-image: var(--icon-link) !important; }
.x-html-editor-tb .x-edit-sourceedit        { -webkit-mask-image: var(--icon-code) !important;              mask-image: var(--icon-code) !important; }

/* HTML editor wrap — the container that holds the toolbar + the
   editable iframe. Legacy paints a 1px gray (#aeb6be) border; replace
   with --acs-border-input so it matches the rest of the form chrome. */
.x-html-editor-wrap {
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-md) !important;
    overflow: hidden !important;
}

/* ---------- Date picker -----------
   ExtJS `Ext.DatePicker` popup. Renders into `<body>`, so admin/viewer
   surfaces (publish-schedule, audit-date-range, compliance/jobs date
   filters) gain the same calendar styling as the startpage. Lucide
   chevron icons replace ExtJS GIF sprites; selected date is the brand
   cyan, today gets a cyan border, hover lights up via `--acs-hover-bg`.

   Promoted from `.acs-startpage`-gated rules during Phase 3 PR 3.2
   (THEME_REVIEW.md §4.3). The source rules already had paired ungated
   selectors authored alongside the gated ones; PR 3.2 consolidates
   them into a single shell-wide rule set here. */

/* Floating wrapper that hosts the date picker (.x-date-menu is the
   ExtJS menu/layer used when the picker pops over a date field). The
   picker itself sits flat inside; the wrapper provides the elevated
   chrome — same chrome as combo-list popovers (border + radius + shadow). */
.x-date-menu,
.x-layer.x-date-menu {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-md) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Container — flat inside its menu wrapper */
.x-date-picker {
    background: var(--acs-card-bg) !important;
    border: none !important;
    border-radius: var(--acs-radius-md) !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* Header bar — clean white instead of old ExtJS dark gray (#929da8) gradient */
.x-date-picker .x-date-middle,
.x-date-picker .x-date-left,
.x-date-picker .x-date-right {
    background: var(--acs-card-bg) !important;
    background-color: var(--acs-card-bg) !important;
    background-image: none !important;
}

.x-date-picker .x-date-middle {
    padding: 8px 0 !important;
}

.x-date-picker .x-date-middle a {
    color: var(--acs-text-primary) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    background: none !important;
}

.x-date-picker .x-date-middle a:hover {
    color: var(--acs-brand-cyan) !important;
}

/* Navigation arrows — Lucide chevrons via shared-icons.css. Phase 6
   migrated to mask-image so the icon colour can flip via background-color. */
.x-date-picker .x-date-left a {
    -webkit-mask-image: var(--icon-chevron-left) !important;
            mask-image: var(--icon-chevron-left) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 0.7 !important;
}

.x-date-picker .x-date-right a {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 0.7 !important;
}

.x-date-picker .x-date-left a:hover,
.x-date-picker .x-date-right a:hover {
    opacity: 1 !important;
}

/* Month/year button in header — clean text instead of ExtJS blue pill.
   Cover the .x-btn-over state so the global "darken on hover" rule
   (.acs-new-theme .x-btn.x-btn-over:not(.reset-btn) → muted-teal-deep)
   doesn't paint a teal fill here. The hover signal is the cyan text
   colour applied below (.x-date-middle .x-btn:hover .x-btn-text). */
.x-date-picker .x-date-middle .x-btn,
.x-date-picker .x-date-middle .x-btn.x-btn-over {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.x-date-picker .x-date-middle .x-btn .x-btn-tl,
.x-date-picker .x-date-middle .x-btn .x-btn-tc,
.x-date-picker .x-date-middle .x-btn .x-btn-tr,
.x-date-picker .x-date-middle .x-btn .x-btn-bl,
.x-date-picker .x-date-middle .x-btn .x-btn-bc,
.x-date-picker .x-date-middle .x-btn .x-btn-br,
.x-date-picker .x-date-middle .x-btn .x-btn-ml,
.x-date-picker .x-date-middle .x-btn .x-btn-mr {
    display: none !important;
}

.x-date-picker .x-date-middle .x-btn .x-btn-mc {
    background: none !important;
    background-image: none !important;
    padding: 0 !important;
}

.x-date-picker .x-date-middle .x-btn button {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    height: auto !important;
}

.x-date-picker .x-date-middle .x-btn .x-btn-text {
    color: var(--acs-text-primary) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.x-date-picker .x-date-middle .x-btn:hover .x-btn-text {
    color: var(--acs-brand-cyan) !important;
}

/* Hide old ExtJS dropdown arrow, replace with chevron. Step-7 prep: the
   icon sits to the right of the inner button text, so mask-image lives
   on a ::before pseudo (mask on the <em> would mask the text). */
.x-date-picker .x-date-middle .x-btn-arrow {
    position: relative !important;
    background-image: none !important;
    padding-right: 16px !important;
}

.x-date-picker .x-date-middle .x-btn-arrow::before {
    content: '' !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 12px !important;
    height: 12px !important;
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: currentColor !important;
    pointer-events: none !important;
}

/* Day-of-week headers — subtle, clean */
.x-date-picker .x-date-inner th {
    color: var(--acs-text-secondary) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    background: var(--acs-hover-bg) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--acs-border-light) !important;
    padding: 6px 0 !important;
}

/* Date cells — centered, clean text */
.x-date-picker .x-date-inner td {
    padding: 1px !important;
}

.x-date-picker .x-date-inner td a {
    color: var(--acs-text-primary) !important;
    text-align: center !important;
    padding: 4px 0 !important;
    border-radius: var(--acs-radius-sm) !important;
    display: block !important;
    background: none !important;
    text-decoration: none !important;
}
/* The legacy <a><em><span>NN</span></em></a> structure renders <em> as
   inline — without `display: block` the em overflows its parent's
   content-box when the padding makes the inner width too tight for
   2-digit numbers like "28", offsetting them to the left. Letting em
   span the full anchor width lets text-align: center actually centre. */
.x-date-picker .x-date-inner td a em {
    display: block !important;
}

/* Disabled / other-month dates */
.x-date-picker td.x-date-disabled a {
    color: var(--acs-text-tertiary) !important;
}

/* Previous / next month dates */
.x-date-picker td.x-date-prevday a,
.x-date-picker td.x-date-nextday a {
    color: var(--acs-text-tertiary) !important;
}

/* Active date hover */
.x-date-picker td.x-date-active {
    cursor: pointer !important;
}

.x-date-picker td.x-date-active:hover a {
    background-color: var(--acs-hover-bg) !important;
    color: var(--acs-brand-cyan) !important;
}

/* Selected date */
.x-date-picker td.x-date-selected a {
    background-color: var(--acs-brand-cyan) !important;
    color: var(--acs-card-bg) !important;
}

/* Today highlight */
.x-date-picker td.x-date-today a {
    border: 1px solid var(--acs-brand-cyan) !important;
}

/* Bottom bar — clean white instead of gray gradient */
.x-date-picker .x-date-bottom {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    border-top: 1px solid var(--acs-border-light) !important;
    padding: 6px !important;
}

/* Today button — clean up 9-slice table, match primary button style */
.x-date-picker .x-date-bottom .x-btn {
    background: var(--acs-brand-cyan) !important;
    border: 1px solid var(--acs-brand-cyan) !important;
    border-radius: var(--acs-radius-sm) !important;
    background-image: none !important;
}

.x-date-picker .x-date-bottom .x-btn .x-btn-tl,
.x-date-picker .x-date-bottom .x-btn .x-btn-tc,
.x-date-picker .x-date-bottom .x-btn .x-btn-tr,
.x-date-picker .x-date-bottom .x-btn .x-btn-bl,
.x-date-picker .x-date-bottom .x-btn .x-btn-bc,
.x-date-picker .x-date-bottom .x-btn .x-btn-br,
.x-date-picker .x-date-bottom .x-btn .x-btn-ml,
.x-date-picker .x-date-bottom .x-btn .x-btn-mr {
    display: none !important;
}

.x-date-picker .x-date-bottom .x-btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}

.x-date-picker .x-date-bottom .x-btn button {
    background: transparent !important;
    border: none !important;
    padding: 5px 16px !important;
    cursor: pointer !important;
    height: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    text-align: center !important;
}

.x-date-picker .x-date-bottom .x-btn-text {
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

.x-date-picker .x-date-bottom .x-btn:hover {
    background: var(--acs-brand-cyan-hover) !important;
    border-color: var(--acs-brand-cyan-hover) !important;
}

/* Month-picker bottom buttons row — clear the legacy gray bar bleed.
   The row needs to read as part of the card surface, not a separate
   toolbar. */
.x-date-picker .x-date-mp-btns {
    background: transparent !important;
}
.x-date-picker .x-date-mp-btns td {
    background: transparent !important;
    border-top: 1px solid var(--acs-border-light) !important;
    padding: 8px !important;
    text-align: center !important;
}

/* Month/year picker overlay OK / Cancel buttons — rendered as plain
   <button> elements (not 9-slice tables). This overlay belongs to a
   field (not a dialog submission), so primary uses vivid cyan to match
   the field's accent. Fixed line-height + height pins both buttons at
   the same visual size regardless of inner whitespace (ExtJS renders OK
   as " OK " with non-breaking spaces). */
button.x-date-mp-ok,
button.x-date-mp-cancel {
    border-radius: var(--acs-radius-sm) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    height: 26px !important;
    line-height: 1 !important;
    padding: 0 12px !important;
    cursor: pointer !important;
    outline: none !important;
    box-sizing: border-box !important;
}
button.x-date-mp-ok {
    background: var(--acs-brand-cyan) !important;
    border: 1px solid var(--acs-brand-cyan) !important;
    color: var(--acs-card-bg) !important;
}
button.x-date-mp-ok:hover,
button.x-date-mp-ok:focus,
button.x-date-mp-ok:focus-visible {
    background: var(--acs-brand-cyan-hover, #0098d4) !important;
    border-color: var(--acs-brand-cyan-hover, #0098d4) !important;
    outline: none !important;
}
button.x-date-mp-cancel {
    background: var(--acs-card-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    color: var(--acs-text-secondary) !important;
    margin-left: 6px !important;
}
button.x-date-mp-cancel:hover,
button.x-date-mp-cancel:focus,
button.x-date-mp-cancel:focus-visible {
    background: var(--acs-hover-bg) !important;
    border-color: var(--acs-border-input) !important;
    color: var(--acs-text-primary) !important;
    outline: none !important;
}

/* Month-picker overlay container — ExtJS sets inline width from the
   day-picker dimensions (~175px), which crops the 4-column grid of
   month + year cells. Widen the menu wrapper, the picker, and the
   inner .x-date-mp together so the parent .x-layer.x-date-menu grows
   to fit and the year cells no longer overflow.

   ext-acs-date-picker-override.js sets .acs-date-mp-open on the menu only
   while the month picker is open, so the day-picker view keeps its narrower
   175px default. Not a :has() on the picker's inline style: that restyled
   the whole page on every inline style change and froze large trees. */
.x-layer.x-date-menu.acs-date-mp-open {
    min-width: 244px !important;
}
.x-layer.x-date-menu.acs-date-mp-open .x-date-picker {
    width: 244px !important;
}
.x-date-picker .x-date-mp {
    width: 244px !important;
    border: none !important;
}
.x-date-picker .x-date-mp > table {
    width: 100% !important;
}

/* The bottom-buttons cell had a legacy gray right border bleeding from
   azzurra-legacy — strip it. */
.x-date-picker .x-date-mp-btns td {
    border-right: none !important;
}

/* `.x-date-mp-sep` is the second month cell in each row — its right
   border serves as the vertical separator between the month and year
   columns. Replace the legacy gray (#aeb6be) with --acs-border-light
   so it reads quiet in the theme. */
.x-date-picker .x-date-mp-month.x-date-mp-sep {
    border-right: 1px solid var(--acs-border-light) !important;
    padding-right: 6px !important;
}
.x-date-picker .x-date-mp-ybtn:first-of-type,
.x-date-picker .x-date-mp-year:nth-of-type(3) {
    padding-left: 6px !important;
}

/* Month/year cells — theme the grid that lets the user pick a month
   and year. Default state: clean text. Hover: cyan-wash + cyan text
   matching the day-cell hover pattern above. Selected (current
   month/year): cyan fill, white text — same as a selected day. */
.x-date-picker .x-date-mp-month a,
.x-date-picker .x-date-mp-year a {
    color: var(--acs-text-primary) !important;
    padding: 6px 8px !important;
    border-radius: var(--acs-radius-sm) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 2px !important;
}
.x-date-picker .x-date-mp-month a:hover,
.x-date-picker .x-date-mp-year a:hover {
    background-color: var(--acs-hover-bg) !important;
    color: var(--acs-brand-cyan) !important;
}
.x-date-picker .x-date-mp-sel a {
    background-color: var(--acs-brand-cyan) !important;
    background-image: none !important;
    border: 1px solid var(--acs-brand-cyan) !important;
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
}
.x-date-picker .x-date-mp-sel a:hover {
    background-color: var(--acs-brand-cyan-hover, #0098d4) !important;
    border-color: var(--acs-brand-cyan-hover, #0098d4) !important;
    color: var(--acs-card-bg) !important;
}

/* Year prev/next nav buttons inside the month picker — rendered as
   <a> elements with inline <svg currentColor> chevron child courtesy of
   javascript/ext-acs-date-picker-override.js (same pattern as the form
   trigger override). The anchor owns colour + hover; the SVG inherits.

   Fallback: when the JS override hasn't loaded (or in environments
   where it can't run), a ::before pseudo with mask-image renders the
   chevron from the shared icon library so the buttons are still
   visible. The :has() guard hides the pseudo when an inline <svg>
   child is present so we don't double-paint. */
.x-date-picker .x-date-mp-prev,
.x-date-picker .x-date-mp-next {
    background-image: none !important;
    background-color: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    color: var(--acs-text-secondary) !important;
    opacity: 0.7 !important;
    position: relative !important;
}
.x-date-picker .x-date-mp-prev:hover,
.x-date-picker .x-date-mp-next:hover {
    opacity: 1 !important;
    color: var(--acs-brand-cyan) !important;
    background-color: transparent !important;
}
.x-date-picker .x-date-mp-prev > svg,
.x-date-picker .x-date-mp-next > svg {
    display: block !important;
    pointer-events: none !important;
}
/* Fallback chevron when JS override hasn't injected an inline <svg> */
.x-date-picker .x-date-mp-prev:not(:has(.acs-mp-chevron))::before,
.x-date-picker .x-date-mp-next:not(:has(.acs-mp-chevron))::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    background-color: currentColor !important;
}
.x-date-picker .x-date-mp-prev:not(:has(.acs-mp-chevron))::before {
    -webkit-mask-image: var(--icon-chevron-left) !important;
            mask-image: var(--icon-chevron-left) !important;
}
.x-date-picker .x-date-mp-next:not(:has(.acs-mp-chevron))::before {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
}

/* Day picker nav arrow hover — currently only opacity changes; add
   cyan tint matching the other icon-button hover pattern in the shell. */
.x-date-picker .x-date-left a:hover,
.x-date-picker .x-date-right a:hover {
    background-color: var(--acs-brand-cyan) !important;
}

/* Selected day cell — clear the legacy 1px gray border that bleeds
   in from azzurra-legacy and centre the cyan fill inside the cell. */
.x-date-picker td.x-date-selected a {
    border: 1px solid var(--acs-brand-cyan) !important;
}

/* Today cell — the cyan border should sit cleanly inside the cell
   without the legacy 1px gray border bleeding in. */
.x-date-picker td.x-date-today a {
    border: 1px solid var(--acs-brand-cyan) !important;
    background-color: transparent !important;
    color: var(--acs-brand-cyan) !important;
}
.x-date-picker td.x-date-today a:hover {
    background-color: var(--acs-hover-bg) !important;
}
/* Today AND selected at once — selected wins, but keep the cyan border */
.x-date-picker td.x-date-today.x-date-selected a {
    background-color: var(--acs-brand-cyan) !important;
    color: var(--acs-card-bg) !important;
}

/* ---------- Tabs -----------
   ExtJS `Ext.TabPanel` and `Ext.tab.Strip` chrome — text-only tabs with a
   bottom border on the strip, cyan-text-only active state (no pill or
   fill). Replaces the GIF-sprite 9-slice tab borders that azzurra-legacy
   ships.

   Promoted from `.acs-startpage`-gated rules during Phase 3 PR 3.1
   (THEME_REVIEW.md §4.3). Now applies shell-wide — admin/viewer/AffiniAI
   tab panels (e.g. /admin/audit, /admin/jobs) gain the same minimalist
   look. */

/* Header container — space above tabs for breathing room vs panel header.
   Thin bottom border anchors the tabs container against the panel body
   (the UL's border-bottom at L1142 is clipped by the .x-tab-strip-wrap
   overflow:hidden in some layouts, so the separator lives on the header). */
.x-tab-panel-header {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 1px solid var(--acs-border-light) !important;
    padding: 4px 0 0 0 !important;
}

/* Tab strip wrapper — no background */
.x-tab-strip-wrap {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tab strip UL — subtle bottom border only */
ul.x-tab-strip-top {
    background: transparent !important;
    background-image: none !important;
    border-bottom: 1px solid var(--acs-border-light) !important;
    padding-top: 0 !important;
}

/* Tab strip spacer — 3px div between strip and body used by the legacy theme
   to visually connect the active tab fill to the panel. Vestigial in the
   underline-indicator pattern; hide it entirely. Needs .acs-new-theme prefix
   to beat the legacy ".acs-new-theme ... .x-tab-strip-spacer { teal }" rule. */
.acs-new-theme .x-tab-panel .x-tab-strip-spacer,
.x-tab-panel .x-tab-strip-spacer {
    height: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* All tab li items — no border, no background */
.x-tab-strip-top li {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
}

/* All tab 9-slice elements — nuke sprite backgrounds */
.x-tab-strip-top .x-tab-right,
.x-tab-strip-top .x-tab-left,
.x-tab-strip-top .x-tab-strip-inner,
.x-tab-strip-top .x-tab-strip-over .x-tab-right,
.x-tab-strip-top .x-tab-strip-over .x-tab-left,
.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner,
.x-tab-strip-top .x-tab-strip-active .x-tab-right,
.x-tab-strip-top .x-tab-strip-active .x-tab-left,
.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Active tab li — no fill.
   .acs-new-theme specificity needed to beat the legacy
   ".acs-new-theme .x-tab-panel .x-tab-strip .x-tab-strip-active { background-color: teal !important }"
   rule in azzurra-legacy.css. Padding/margin reset neutralises the legacy
   "lift trick" that makes the active li 3px shorter than inactive ones. */
.acs-new-theme .x-tab-panel .x-tab-strip .x-tab-strip-active,
.x-tab-panel .x-tab-strip .x-tab-strip-active {
    background-color: transparent !important;
    background: transparent !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Tab text — default (inactive): secondary color, regular weight.
   margin-bottom: -1px slides the underline flush with the strip bottom border
   so the active tab's 2px cyan underline covers the strip's 1px border-light. */
.x-tab-strip span.x-tab-strip-text {
    color: var(--acs-text-secondary) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 8px 16px !important;
    border-bottom: 2px solid transparent !important;
}

/* Tab hover — primary text, no background fill.
   Needs .acs-new-theme .x-tab-panel .x-tab-strip depth to beat the legacy
   ".acs-new-theme .x-tab-panel .x-tab-strip .x-tab-strip-over { teal; opacity:0.8 }" rule. */
.acs-new-theme .x-tab-panel .x-tab-strip .x-tab-strip-over,
.x-tab-panel .x-tab-strip .x-tab-strip-over {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 1 !important;
}

.acs-new-theme .x-tab-panel .x-tab-strip .x-tab-strip-over .x-tab-strip-text,
.x-tab-panel .x-tab-strip .x-tab-strip-over .x-tab-strip-text {
    color: var(--acs-text-primary) !important;
    background: transparent !important;
}

/* Active tab text — primary color, medium weight, cyan underline as sole active signal */
.x-tab-strip-active span.x-tab-strip-text {
    color: var(--acs-text-primary) !important;
    font-weight: 500 !important;
    border-bottom: 2px solid var(--acs-brand-cyan) !important;
}

/* Tab body — no border */
.x-tab-panel-body {
    border: none !important;
    background: var(--acs-card-bg) !important;
}

.x-tab-panel-body-top {
    border: none !important;
}

/* Tab panel footer — no border */
.x-tab-panel-footer {
    border: none !important;
    background: var(--acs-card-bg) !important;
}

/* ---------- Grids -----------
   ExtJS GridPanel and GridView styling: row stripe, header chrome, sort
   indicators, hover/selection backgrounds, cell padding. Targets the
   existing `.x-grid3-*` selectors. */

/* ---------- Dialogs / Windows -----------
   `Ext.Window` and modal Msg dialogs: header bar, body padding, footer
   button bar, scrim. Aligns with THEME_GUIDE.md §6.5 light popover spec
   for everything except the dark header menu (which lives in
   `ext-acs-header.css`).

   Promoted from `.acs-startpage`-gated rules during Phase 3 PR 3.3
   (THEME_REVIEW.md §4.3). The full Ext.Window frame chrome (corners,
   header, body, footer), tools (.x-tool-*), button bar (.x-panel-btns,
   panel-footer), Ext.Msg variant (.x-window-dlg), acs.Msg variants
   (.x-window-plain.newAlert / .newConfirm / .newWarn / .newInfo),
   dialog-scoped tabs (.x-window .x-tab-strip), progress bars
   (.x-window .x-progress-*), dialog forms (.x-window .x-form-*),
   .x-item-disabled state, and dialog-scoped tree scrollbars all live
   here.

   Page-specific dialog variants (`.x-window.export-to-excel-modal`,
   `.x-window.search-in`) live in `ext-acs-startpage.css` per Bucket B;
   their `.x-window.X` class anchor is unique enough to act as page-scope
   on its own.
   Exceptions kept here because the book viewer, which loads no startpage
   sheet, opens them too: the `.x-window.export-to-excel-modal` progress-bar
   body release (`acs.JobProgressDialog`) and the whole
   `.x-window.analysis-tracking` block (Edit Track dialog).

   Hex literals rewritten to `var(--acs-*)` tokens. Four hex literals
   are deliberately preserved as inline values: #0098d4 (darker brand-
   cyan stop in the OK-button gradient), #0088c0 (button-pressed
   shade), #a0d8f0 (disabled-button cyan tint), #d6453a (semantic
   error red for the not-allowed drag badge). Phase 9 (cross-app
   coherence) will tokenize these. */

.x-window-proxy {
    border: 2px dashed var(--acs-brand-cyan) !important;
    border-radius: 8px !important;
    background: rgba(0, 174, 239, 0.04) !important;
}

/* === ExtJS Window drag ghost (.x-panel-ghost) — modern card chrome ===
   When the user grabs a window header and drags it, ExtJS clones the
   window into a `.x-panel-ghost` wrapper, hides the original off-screen,
   and animates the ghost across the viewport. The ghost reuses the same
   inner DOM as the window (header, body, 9-slice tl/tc/tr etc.) but the
   azzurra-legacy rule `.acs-new-theme :not(.definition-popup-window)
   .x-window-tl { background: rgb(0, 174, 239) }` only loses to our
   suppressor inside `.x-window` — inside `.x-panel-ghost` it wins and
   paints a vivid cyan stripe across the top, the wrapper falls back to
   azzurra's grey card + 2px radius + sharp corners, the title goes to
   16px/400, and the close button reverts to its legacy PNG sprite.
   Mirror the modern `.x-window` chrome onto `.x-panel-ghost` so the
   drag preview keeps the same look as the resting dialog. */
.acs-new-theme .x-panel-ghost {
    background-color: var(--acs-card-bg, #ffffff) !important;
    border: 1px solid var(--acs-border-light, #ecf0f6) !important;
    border-radius: var(--acs-radius-lg, 10px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    opacity: 0.92 !important;
}
.acs-new-theme .x-panel-ghost .x-window-tl,
.acs-new-theme .x-panel-ghost .x-window-tc,
.acs-new-theme .x-panel-ghost .x-window-tr,
.acs-new-theme .x-panel-ghost .x-window-ml,
.acs-new-theme .x-panel-ghost .x-window-mr,
.acs-new-theme .x-panel-ghost .x-window-bl,
.acs-new-theme .x-panel-ghost .x-window-bc,
.acs-new-theme .x-panel-ghost .x-window-br {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
}
.acs-new-theme .x-panel-ghost .x-window-mc {
    background-color: var(--acs-card-bg, #ffffff) !important;
    border: none !important;
}
.acs-new-theme .x-panel-ghost .x-window-header {
    background: var(--acs-card-bg, #ffffff) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--acs-border-light, #ecf0f6) !important;
    padding: 12px 16px !important;
}
.acs-new-theme .x-panel-ghost .x-window-header-text {
    color: var(--acs-text-primary, #1c2127) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: none !important;
    line-height: 1.4 !important;
}
.acs-new-theme .x-panel-ghost .x-tool-close {
    width: 14px !important;
    height: 14px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    -webkit-mask-image: var(--icon-x) !important;
            mask-image: var(--icon-x) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    opacity: 0.6 !important;
}
/* The :not(.x-hide-display) guard keeps this off elements ExtJS has hidden:
   Ext hides via .x-hide-display{display:none!important}, so a bare !important
   display here outranks it and hide() silently stops working.
   fit-content + the input's `1 1 auto` give each field the width its config
   asks for (ExtJS's inline input width); the input still grows wherever a
   per-screen rule widens the wrap. */
:is(.x-window, .task-popup) .x-form-field-wrap:not(.operator-wrap):not(.superbox-wrap):not(.x-hide-display) {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    overflow: visible !important;
    height: 32px !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
}
:is(.x-window, .task-popup) .x-form-field-wrap:not(.operator-wrap):not(.superbox-wrap) .x-form-text {
    flex: 1 1 auto !important;
    height: 100% !important;
    box-sizing: border-box !important;
}
/* Metadata-filter value wraps fill the space their row leaves them
   (azzurra-legacy gives them width: 100%; fit-content above would win). */
.x-window .x-form-field-wrap:is(.date-wrap, .search-wrap, .boolean-wrap):not(.operator-wrap):not(.superbox-wrap):not(.x-hide-display) {
    width: 100% !important;
}
/* Grid cell editors stay inside their row (26-27px): a 20px wrap (22px with
   its border) instead of the 32px form height. */
.x-window .x-grid-editor .x-form-field-wrap:not(.operator-wrap):not(.superbox-wrap):not(.x-hide-display) {
    height: 20px !important;
}
.x-window .x-grid-editor .x-form-field-wrap:not(.operator-wrap):not(.superbox-wrap) .x-form-text {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}
:is(.x-window, .task-popup) .x-form-field-wrap:not(.operator-wrap):not(.superbox-wrap) .x-form-trigger {
    position: relative !important;
    flex: 0 0 auto !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* Date/time composite (`.ext-dt-range`, the Add/Edit Note "Completed On" and
   "Verified On" fields).

   The rules above keep each input at its configured width. This composite
   is the one place that width is wrong: its `layout: 'table'` splits the
   field's configured width across two cells, so each cell is ~51px;
   `TriggerField.onResize` then sets the wrap to cell minus trigger (~42px)
   and the input is left what remains, narrower than any value either field
   can hold.

   Raising the widths in the component config does not reach this: the table
   layout overrides the children's own widths, and the wrap's width is written
   inline once at render and never re-measured (STYLING_PATTERNS 25.0), so it
   stays 42px however wide the composite is. The sizing has to be restated
   here.

   Widths are measured from the widest value each field can hold plus the
   theme's 24px of input padding: "30 May, 2099" is 71px, so the date input
   needs 95px, and "23:59" is 31px, so the time input needs 55px. The two
   inputs carry identical classes, so they are told apart by their table cell,
   which the widget always renders date first, time second.

   `fit-content` on the wrap, never `auto`: the wrap is a block-level flex box
   inside a table cell, and `auto` makes it fill the cell and carries the
   trigger past it (STYLING_PATTERNS 25.2b). */
.x-window .ext-dt-range .x-form-field-wrap:not(.x-hide-display) {
    width: -moz-fit-content !important;
    width: fit-content !important;
    flex: 0 0 auto !important;
}
.x-window .ext-dt-range .x-form-field-wrap > input.x-form-text {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
.x-window .ext-dt-range .x-table-layout-cell:nth-child(1) .x-form-field-wrap > input.x-form-text {
    width: 100px !important;
}
.x-window .ext-dt-range .x-table-layout-cell:nth-child(2) .x-form-field-wrap > input.x-form-text {
    width: 60px !important;
}

/* Combo/trigger wraps in any non-window context (standalone panels:
   compliance admin, user admin, audit, anywhere outside Ext.Window).

   ExtJS's classic FormLayout sets the wrap div to trigger-width (~17px)
   inline and positions the trigger absolutely. Without intervention the
   global wrap chrome (border/bg/radius) renders a misaligned 17px box.

   Force the wrap into inline-flex so it sizes to content (input + trigger
   keep their inline widths) and the wrap chrome correctly surrounds the
   whole control as one unit. The .x-window rules above win by specificity
   inside windows and apply the standard flex sizing model there.

   Search form's superbox-wrap and operator-wrap need different layout
   (multi-line chips, stretched operator labels) and override these rules
   locally in ext-acs-startpage.css scoped to .search_panel. */
/* :not(.x-hide-display) so this never outranks ExtJS's own hide class. */
.x-form-field-wrap:not(.x-hide-display) {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    overflow: visible !important;
    height: 32px !important;
    width: auto !important;
}
.x-form-field-wrap .x-form-text {
    flex: 0 0 auto !important;
    height: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}
.x-form-field-wrap .x-form-trigger {
    position: relative !important;
    flex: 0 0 auto !important;
    top: auto !important;
    left: auto !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    border: none !important;
    border-left: 1px solid var(--acs-border-input) !important;
    background: transparent !important;
}

/* Combo dropdown list — canonical chrome (border, radius, shadow,
   item padding/hover). Combo lists render in document body outside any
   container scope, so the rules need to apply globally — moved here from
   ext-acs-startpage.css where they were body.acs-theme-gated and didn't
   reach non-startpage views (compliance admin, user admin, audit, etc.).

   THEME_GUIDE.md §6.5 (Popovers, light): muted cyan hover/selected text
   per the "vivid cyan reserved for links and focus states" rule. */
.x-combo-list {
    background: #fff !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-md) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 4px 0 !important;
    font-family: var(--acs-font-family) !important;
}
.x-combo-list-inner {
    background: transparent !important;
}
.x-combo-list-item {
    padding: 8px 12px !important;
    color: var(--acs-text-primary) !important;
    font-size: 13px !important;
    border-radius: 4px !important;
    margin: 0 4px !important;
}
.x-combo-list-item:hover,
.x-combo-selected {
    background-color: var(--acs-hover-bg) !important;
    color: var(--acs-brand-cyan-muted) !important;
}

.x-window .x-form-field-wrap.superbox-wrap {
    /* Min-height keeps the wrap at 32px (input row height) when empty
       or when a single chip fits; `height: auto` lets it grow when chips
       wrap to multiple lines. Polish-pass alignment — without `height:
       auto` the wrap was locked to 32px and chips beyond the first line
       got clipped by `.x-superboxselect`'s `overflow: hidden`. */
    min-height: 32px !important;
    height: auto !important;
    box-sizing: border-box !important;
}
.x-window .superbox-wrap .x-superboxselect {
    /* Min-height matches the wrap (32px) for the empty/single-chip
       case; `height: auto` lets the chip-list grow with content. */
    min-height: 32px !important;
    height: auto !important;
    padding: 2px !important;
    box-sizing: border-box !important;
}
.x-window .x-form-field-wrap.operator-wrap {
    box-sizing: border-box !important;
}
/* :not(.x-hide-display) so this never outranks ExtJS's own hide class. */
.x-window .x-form-field-wrap.operator-wrap:not(.x-hide-display) {
    height: 32px !important;
    display: flex !important;
    align-items: stretch !important;
}
.x-window .operator-field {
    padding: 4px 3px !important;
    height: 100% !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
    flex: 1 !important;
    text-align: center !important;
}
/* Dialog `.superbox-container` (Region / Document Type metadata-filter
   rows) — grid template harmonised with the hbox-laid-out rows above
   (Book Title / Parties / Date Of Execution / Page Count) so all six
   metadata-filter rows show the same operator-wrap (its configured 50px)
   and value field width. */
.x-window .x-box-inner.superbox-container {
    grid-template-columns: 55px 1fr 26px !important;
}
.x-window .x-box-inner.superbox-container .operator-wrap {
    width: 50px !important;
}
.x-window .operator-wrap .x-form-trigger {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    flex: 0 0 auto !important;
}
.x-window .x-form-element .x-form-radio {
    position: relative !important;
    top: auto !important;
}
.x-window .x-form-element .x-form-cb-label {
    padding: 0 !important;
    width: auto !important;
    line-height: 16px !important;
}
.x-form-field-wrap.operator-wrap {
    box-sizing: border-box !important;
}
.x-box-inner.superbox-container {
    grid-template-columns: 57px 1fr 26px !important;
    column-gap: 0px !important;
    align-items: start !important;
}
.x-box-inner.superbox-container .operator-wrap {
    width: 52px !important;
    box-sizing: border-box !important;
    margin-right: 5px !important;
}
.x-form-field-wrap.superbox-wrap {
    box-sizing: border-box !important;
}
.x-form-field-wrap.superbox-wrap > .x-form-trigger {
    display: none !important;
}
.x-window {
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    /* The frame parts below are transparent; without this the legacy window
       colour (#535353 on active windows) shows through as a dark edge. */
    background-color: var(--acs-card-bg) !important;
}
.x-window .x-window-tl,
.x-window .x-window-tc,
.x-window .x-window-tr,
.x-window .x-window-bl,
.x-window .x-window-bc,
.x-window .x-window-br,
.x-window .x-window-ml,
.x-window .x-window-mr {
    background-image: none !important;
    background-color: transparent !important;
}
.x-window .x-window-mc {
    background-color: var(--acs-card-bg) !important;
    border: none !important;
}
.x-window .x-window-header {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--acs-border-light) !important;
    padding: 12px 16px !important;
}
.x-window .x-window-header-text {
    color: var(--acs-text-primary) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.x-window .x-tool:hover {
    background-color: transparent !important;
}
/* x-window header tools migrated to mask-image. Specificity bumped to
   match azzurra-legacy.css's `.acs-new-theme .active-window.x-window:not(.definition-popup-window)
   .x-window-header .x-tool-close { background-color: transparent !important }`
   at 0,6,0 — that rule was killing the close button's red hover bg from
   old ExtJS themes, but in the mask-image world we want the bg-color to
   show as the icon's grey/cyan. Mirror its specificity so our cascade-later
   rule wins. */
.acs-new-theme .active-window.x-window .x-window-header.x-window-header .x-tool-close,
body .x-window .x-tool-close {
    -webkit-mask-image: var(--icon-x) !important;
            mask-image: var(--icon-x) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 0.6 !important;
}
/* Hover/over state — matches the rest rule's specificity (0,6,0) so it
   actually wins when both apply. */
.acs-new-theme .active-window.x-window .x-window-header.x-window-header .x-tool-close:hover,
.acs-new-theme .active-window.x-window .x-window-header.x-window-header .x-tool-close-over,
body .x-window .x-tool-close:hover,
body .x-window .x-tool-close-over {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    opacity: 1 !important;
}
/* x-tool-maximize hover: the rest rule at startpage.css:2613 already
   uses mask-image (Step 5b-8 commit 5bf4f8239), so the bg-image hover
   swap that used to live here is masked-out and inert. Drop it and
   flip bg-color: brand-cyan instead, mirroring the minimize/close
   tool hover pattern. The `body .x-window` qualifier is required:
   startpage.css loads after theme.css, and its `.x-window .x-tool-maximize`
   rest rule has the same specificity (0,2,0); without the body
   qualifier source order would let the rest rule's bg-color win at
   hover too. Mirrors the minimize hover at L975. */
body .x-window .x-tool-maximize:hover,
body .x-window .x-tool-maximize-over {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    opacity: 1 !important;
}
body .x-window .x-tool-minimize {
    -webkit-mask-image: var(--icon-minimize) !important;
            mask-image: var(--icon-minimize) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 0.6 !important;
}
body .x-window .x-tool-minimize:hover,
body .x-window .x-tool-minimize-over {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    opacity: 1 !important;
}
body .x-window .x-tool-restore {
    -webkit-mask-image: var(--icon-minimize) !important;
            mask-image: var(--icon-minimize) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 0.6 !important;
}
body .x-window .x-tool-restore:hover,
body .x-window .x-tool-restore-over {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    opacity: 1 !important;
}
.x-window .x-window-body {
    background: var(--acs-card-bg) !important;
}
.x-window-plain.newAlert .x-window-body {
    min-height: 60px !important;
    overflow: visible !important;
}
:is(.x-window, .task-popup) .x-panel-footer,
.x-window .x-window-footer,
.x-window .x-plain-footer {
    background: var(--acs-card-bg) !important;
    border-top: 1px solid var(--acs-border-light) !important;
    padding: 10px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.x-window .x-panel-fbar {
    text-align: right !important;
    width: 100% !important;
}
.x-window .x-panel-fbar .x-btn {
    margin-left: 8px !important;
}
:is(.x-window, .task-popup) .x-panel-btns td.x-toolbar-cell {
    padding-right: 4px !important;
    padding-left: 4px !important;
}
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-tl,
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-tc,
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-tr,
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-bl,
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-bc,
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-br,
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-ml,
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-mr,
.x-window .x-window-footer .x-btn .x-btn-tl,
.x-window .x-window-footer .x-btn .x-btn-tc,
.x-window .x-window-footer .x-btn .x-btn-tr,
.x-window .x-window-footer .x-btn .x-btn-bl,
.x-window .x-window-footer .x-btn .x-btn-bc,
.x-window .x-window-footer .x-btn .x-btn-br,
.x-window .x-window-footer .x-btn .x-btn-ml,
.x-window .x-window-footer .x-btn .x-btn-mr,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-tl,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-tc,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-tr,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-bl,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-bc,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-br,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-ml,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-mr {
    display: none !important;
}
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-mc,
.x-window .x-window-footer .x-btn .x-btn-mc,
:is(.x-window, .task-popup) .x-panel-btns .x-btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
:is(.x-window, .task-popup) .x-panel-footer .x-btn,
.x-window .x-window-footer .x-btn,
:is(.x-window, .task-popup) .x-panel-btns .x-btn {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    padding: 0 !important;
}
:is(.x-window, .task-popup) .x-panel-footer .x-btn button,
.x-window .x-window-footer .x-btn button,
:is(.x-window, .task-popup) .x-panel-btns .x-btn button {
    color: var(--acs-text-secondary) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    padding: 8px 24px !important;
    height: auto !important;
    line-height: 1.2 !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    text-align: center !important;
}
:is(.x-window, .task-popup) .x-panel-footer .x-btn .x-btn-text,
.x-window .x-window-footer .x-btn .x-btn-text {
    color: var(--acs-text-secondary) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}
:is(.x-window, .task-popup) .x-panel-footer .x-btn.x-btn-over,
.x-window .x-window-footer .x-btn.x-btn-over,
:is(.x-window, .task-popup) .x-panel-btns .x-btn.x-btn-over {
    background: var(--acs-hover-bg) !important;
    background-image: none !important;
    border-color: var(--acs-brand-cyan) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}
:is(.x-window, .task-popup) .x-panel-footer .x-btn.x-btn-over button,
.x-window .x-window-footer .x-btn.x-btn-over button,
:is(.x-window, .task-popup) .x-panel-btns .x-btn.x-btn-over button {
    color: var(--acs-brand-cyan) !important;
}
/* Dialog primary OK button — aligned to canonical `acs-btn-primary`
   (docs/theme/THEME_GUIDE.md §6.10): flat muted-teal, no gradient,
   no glow. Mirrors the OF / home-app / chat-bot primary buttons and
   the search-panel "Search" button so ExtJS dialogs feel like the
   same product as the Angular surfaces. THEME_GUIDE.md:518 explicitly
   reserves vivid `#00aeef` for links and focus states; primary actions
   live in the muted-teal family.
   Polish-pass alignment (THEME_REVIEW.md SHELL_TECH_DEBT
   "Post-Phase-3 polish pass").
   `:is(.acs-new-theme, body)` keeps the old specificity but also reaches
   pages that never add acs-new-theme (the libsetup pages). */
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .dialog-ok-btn,
:is(.acs-new-theme, body) .x-window .x-window-footer .dialog-ok-btn,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .dialog-ok-btn,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .msg_dlg_ok_btn,
:is(.acs-new-theme, body) .x-window .x-window-footer .msg_dlg_ok_btn,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .msg_dlg_ok_btn,
/* `.x-panel-fbar` is the per-modal footer toolbar variant (used by the
   Export-to-Excel dialog and other Ext.Window components with `buttons:`).
   Azzurra-legacy's `.acs-new-theme .export-to-excel-modal .x-panel-fbar
   .x-btn` rule (0,4,0) was painting the primary button grey — adding the
   `.x-panel-fbar` selector here lifts the primary rule to 0,5,0 so it
   wins on every modal that uses a fbar layout. */
:is(.acs-new-theme, body) .x-window .x-panel-fbar .dialog-ok-btn,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .msg_dlg_ok_btn {
    background: var(--acs-brand-cyan-muted) !important;
    background-image: none !important;
    background-color: var(--acs-brand-cyan-muted) !important;
    border: 1px solid var(--acs-brand-cyan-muted) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .dialog-ok-btn button,
:is(.acs-new-theme, body) .x-window .x-window-footer .dialog-ok-btn button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .dialog-ok-btn button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .dialog-ok-btn .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-window-footer .dialog-ok-btn .x-btn-text,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .msg_dlg_ok_btn button,
:is(.acs-new-theme, body) .x-window .x-window-footer .msg_dlg_ok_btn button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .msg_dlg_ok_btn button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .msg_dlg_ok_btn .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-window-footer .msg_dlg_ok_btn .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .dialog-ok-btn button,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .dialog-ok-btn .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .msg_dlg_ok_btn button,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .msg_dlg_ok_btn .x-btn-text {
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
}
/* Hover specificity needs `.acs-new-theme` prefix + `.x-btn-noicon` to
   beat the generic `.acs-new-theme .x-window .x-panel-footer .x-btn.
   x-btn-noicon.x-btn-over` outline-hover rule (6 classes) that otherwise
   applies to ALL footer buttons (muted-bg + cyan border). The
   dialog-ok-btn is a primary action, so it darkens to --acs-brand-cyan-
   deep on hover instead of getting the outline treatment. */
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .dialog-ok-btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-window-footer .dialog-ok-btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .dialog-ok-btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .dialog-ok-btn.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-window-footer .dialog-ok-btn.x-btn-over,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .dialog-ok-btn.x-btn-over,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .msg_dlg_ok_btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-window-footer .msg_dlg_ok_btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .msg_dlg_ok_btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .msg_dlg_ok_btn.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-window-footer .msg_dlg_ok_btn.x-btn-over,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .msg_dlg_ok_btn.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .dialog-ok-btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .dialog-ok-btn.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .msg_dlg_ok_btn.x-btn-noicon.x-btn-over,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .msg_dlg_ok_btn.x-btn-over {
    background: var(--acs-brand-cyan-deep) !important;
    background-image: none !important;
    background-color: var(--acs-brand-cyan-deep) !important;
    border-color: var(--acs-brand-cyan-deep) !important;
    box-shadow: none !important;
}
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .dialog-ok-btn.x-btn-over button,
:is(.acs-new-theme, body) .x-window .x-window-footer .dialog-ok-btn.x-btn-over button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .dialog-ok-btn.x-btn-over button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .dialog-ok-btn.x-btn-over .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-window-footer .dialog-ok-btn.x-btn-over .x-btn-text,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .msg_dlg_ok_btn.x-btn-over button,
:is(.acs-new-theme, body) .x-window .x-window-footer .msg_dlg_ok_btn.x-btn-over button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-btns .msg_dlg_ok_btn.x-btn-over button,
:is(.acs-new-theme, body) :is(.x-window, .task-popup) .x-panel-footer .msg_dlg_ok_btn.x-btn-over .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-window-footer .msg_dlg_ok_btn.x-btn-over .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .dialog-ok-btn.x-btn-over button,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .dialog-ok-btn.x-btn-over .x-btn-text,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .msg_dlg_ok_btn.x-btn-over button,
:is(.acs-new-theme, body) .x-window .x-panel-fbar .msg_dlg_ok_btn.x-btn-over .x-btn-text {
    color: var(--acs-card-bg) !important;
}
:is(.x-window, .task-popup) .x-panel-footer .dialog-cancel-btn.x-btn-over button,
.x-window .x-window-footer .dialog-cancel-btn.x-btn-over button,
:is(.x-window, .task-popup) .x-panel-footer .dialog-cancel-btn.x-btn-over .x-btn-text,
.x-window .x-window-footer .dialog-cancel-btn.x-btn-over .x-btn-text,
:is(.x-window, .task-popup) .x-panel-footer .msg_dlg_no_btn.x-btn-over button,
.x-window .x-window-footer .msg_dlg_no_btn.x-btn-over button,
:is(.x-window, .task-popup) .x-panel-footer .msg_dlg_no_btn.x-btn-over .x-btn-text,
.x-window .x-window-footer .msg_dlg_no_btn.x-btn-over .x-btn-text {
    color: var(--acs-brand-cyan) !important;
}
.x-window .dialog-ok-btn.x-item-disabled,
.x-window .msg_dlg_ok_btn.x-item-disabled {
    background: #a0d8f0 !important;
    background-image: none !important;
    border-color: #a0d8f0 !important;
    box-shadow: none !important;
    opacity: 0.7 !important;
    cursor: default !important;
}
.x-window .dialog-ok-btn.x-item-disabled button,
.x-window .msg_dlg_ok_btn.x-item-disabled button {
    cursor: default !important;
}
.x-window .dialog-ok-btn.x-item-disabled.x-btn-over,
.x-window .msg_dlg_ok_btn.x-item-disabled.x-btn-over {
    background: #a0d8f0 !important;
    background-image: none !important;
    border-color: #a0d8f0 !important;
    box-shadow: none !important;
}
.x-window .dialog-cancel-btn.x-item-disabled,
.x-window .msg_dlg_no_btn.x-item-disabled {
    opacity: 0.5 !important;
    cursor: default !important;
}
.x-window .dialog-cancel-btn.x-item-disabled.x-btn-over,
.x-window .msg_dlg_no_btn.x-item-disabled.x-btn-over {
    background: var(--acs-card-bg) !important;
    border-color: var(--acs-border-input) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
.x-window .dialog-cancel-btn.x-item-disabled.x-btn-over button,
.x-window .msg_dlg_no_btn.x-item-disabled.x-btn-over button {
    color: var(--acs-text-secondary) !important;
}
.x-window .msg_dlg_detail_btn {
    background: transparent !important;
}
.x-window .msg_dlg_detail_btn button {
    padding: 8px 16px !important;
}
/* No `.x-dlg-icon` sizing rule here on purpose. In ExtJS 3.4 `.x-dlg-icon`
   is added to the MessageBox *body wrapper* that holds the glyph AND the
   message, not to the glyph itself (the glyph is `.ext-mb-icon`, sized
   47x32 by the library). Pinning the wrapper to 32px collapsed
   `.ext-mb-content` to 0 and clipped every message to its first words,
   because MessageBox sizes the dialog from the measured text width. */
/* MsgBox severity glyph wrappers are icon-only <div> with no text;
   mask-image directly on the element renders the masked bg-color.
   Step-7 prep: keep the neutral grey single-icon design today. */
.x-window.x-window-dlg .ext-mb-icon {
    -webkit-mask-image: var(--icon-alert-triangle) !important;
            mask-image: var(--icon-alert-triangle) !important;
    -webkit-mask-size: 24px 24px !important;
            mask-size: 24px 24px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
/* Severity-specific wrappers all use the same alert-triangle today;
   the rules below remain as semantic hooks but the mask is set on the
   shared .ext-mb-icon parent above. */
.x-window.x-window-dlg .ext-mb-warning,
.x-window.x-window-dlg .ext-mb-question,
.x-window.x-window-dlg .ext-mb-error,
.x-window.x-window-dlg .ext-mb-info {
    background-image: none !important;
}
.x-window.x-window-dlg .ext-mb-content,
.x-window.x-window-dlg .x-window-body {
    font-size: 13px !important;
    color: var(--acs-text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.x-window.x-window-dlg .ext-mb-input,
.x-window.x-window-dlg .ext-mb-textarea {
    background: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    color: var(--acs-text-primary) !important;
    height: 32px !important;
    line-height: 14px !important;
    box-sizing: border-box !important;
    outline: none !important;
}
.x-window.x-window-dlg .ext-mb-textarea {
    height: auto !important;
    min-height: 60px !important;
}
.x-window.x-window-dlg .ext-mb-input:focus,
.x-window.x-window-dlg .ext-mb-textarea:focus {
    background: var(--acs-card-bg) !important;
    border-color: var(--acs-brand-cyan) !important;
}
.x-window.x-window-dlg .x-progress-wrap {
    border: 1px solid var(--acs-border-input) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: var(--acs-hover-bg) !important;
    height: 20px !important;
}
.x-window.x-window-dlg .x-progress-inner {
    background: var(--acs-hover-bg) !important;
    height: 20px !important;
}
.x-window.x-window-dlg .x-progress-bar {
    background: linear-gradient(135deg, var(--acs-brand-cyan) 0%, #0098d4 100%) !important;
    border-radius: 0 !important;
    height: 20px !important;
}
.x-window.x-window-dlg .x-progress-bar .x-progress-text {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--acs-card-bg) !important;
    line-height: 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.x-window.x-window-dlg .x-progress-text-back {
    color: var(--acs-text-primary) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
}

/* JobProgressDialog builds its body with body.createChild(), so ExtJS sizes
   .x-window-body from the Window's fixed height while the bar is still hidden,
   writes it inline, and never re-lays-out on reveal; the bar then lands past
   the overflow:hidden cut. !important beats that inline height.
   :has(.job-status) keeps this off the layout:'fit' export dialogs, whose fit
   child collapses to 0px if the body height is released. See
   docs/theme/STYLING_PATTERNS.md section 22.4. */
.x-window.export-to-excel-modal .x-window-body:has(.job-status) {
    height: auto !important;
    overflow: visible !important;
}

/* JobProgressDialog's body is bare, so it supplies its own breathing room.
   border-box is load-bearing: ExtJS writes an inline width on this element
   sized to the window's inner width, so content-box padding widens it past the
   frame, and the release above means that overflow is no longer hidden.
   Scoped like the release: the layout:'fit' dialogs already carry their own
   padding, and Ext.Msg keeps azzurra's tighter dialog padding. */
.x-window.export-to-excel-modal .x-window-body:has(.job-status) {
    box-sizing: border-box !important;
    padding: 16px 20px 14px !important;
}

/* The wrapper above the body carries its own 16px top padding, so the space
   under the title was split across two boxes. Zero it and let the body own the
   spacing on its own. */
.x-window.export-to-excel-modal .x-window-mc:has(.job-status) {
    padding-top: 0 !important;
}

/* JobProgressDialog writes a <br/> after the status span. Once the span is a
   block that break generates a line box of its own, which shows up as a gap
   above the bar. */
.x-window.export-to-excel-modal .x-window-body:has(.job-status) br {
    display: none !important;
}

/* The export dialogs reuse the Ext.Msg progress-bar design above. The book
   viewer loads no startpage sheet, so without this the bar falls back to the
   azzurra grey default and ExtJS's two text layers are left unstyled, which
   splits the percentage across the fill boundary. Ext.Msg already gets this
   from the .x-window-dlg block above; these values are deliberately identical
   to it. */
.x-window.export-to-excel-modal .x-progress-wrap {
    border: 1px solid var(--acs-border-input) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: var(--acs-hover-bg) !important;
    height: 20px !important;
}

.x-window.export-to-excel-modal .x-progress-inner {
    background: var(--acs-hover-bg) !important;
    height: 20px !important;
}

.x-window.export-to-excel-modal .x-progress-bar {
    background: linear-gradient(135deg, var(--acs-brand-cyan) 0%, #0098d4 100%) !important;
    border-radius: 0 !important;
    height: 20px !important;
}

.x-window.export-to-excel-modal .x-progress-bar .x-progress-text {
    color: var(--acs-card-bg) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
}

.x-window.export-to-excel-modal .x-progress-text-back {
    color: var(--acs-text-primary) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
}

/* The status line is transient secondary information, so it stays lighter than
   the dialog title. The startpage copy raises it to 600/text-primary, which
   makes it identical to the title; that is not carried over. Its 14px comes
   from azzurra-legacy and is left alone.
   It reports archive filenames, which are long and carry no spaces, so it needs
   overflow-wrap to break mid-token; word wrapping alone cannot. update_progress
   truncates it at 85 characters, so this costs at most a second line. */
.x-window.export-to-excel-modal .job-status {
    color: var(--acs-text-secondary) !important;
    display: block !important;
    margin-bottom: 8px !important;
    overflow-wrap: anywhere !important;
}

/* Edit Track dialog (acs_track.view.EditTrackForm). Kept here because the book
   viewer opens it too (floating toolbar, Add selection to a new track) and
   loads no startpage sheet. */
.x-window.analysis-tracking {
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16) !important;
}

/* Form — remove fixed width so it fills the panel naturally */
.x-window.analysis-tracking .edit-track-form-panel form {
    width: auto !important;
}

/* Form panel body — add padding including right margin for spacing before permissions panel */
.x-window.analysis-tracking .edit-track-form-panel .x-panel-body {
    padding: 12px 20px 12px 16px !important;
}

/* Permissions panel — padding on the container, not children (matches Saved Search) */
.x-window.analysis-tracking .permissions-panel {
    border-left: none !important;
    padding: 8px !important;
}

/* Sharing fieldset — compact since radios are now horizontal */
.x-window.analysis-tracking fieldset {
    border: none !important;
    border-top: 1px solid #ECF0F6 !important;
    padding: 8px 0 4px 0 !important;
    margin: 8px 0 12px 0 !important;
}

.x-window.analysis-tracking fieldset legend {
    color: #5a6370 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    padding: 0 6px !important;
}

/* Radio group & fieldset — override ExtJS inline heights */
.x-window.analysis-tracking .x-fieldset-body {
    height: auto !important;
}

.x-window.analysis-tracking .x-form-radio-group {
    height: auto !important;
    min-height: 0 !important;
}

.x-window.analysis-tracking .x-form-radio-group .x-column-inner {
    height: auto !important;
}

.x-window.analysis-tracking .x-form-radio-group .x-column {
    height: auto !important;
}

/* Assign button — override inline margin-top, use same styling as Saved Search. */
.x-window.analysis-tracking fieldset .x-btn {
    margin-top: 18px !important;
}

/* HtmlEditor — prevent overflow/crop */
.x-window.analysis-tracking .x-html-editor-wrap {
    border: 1px solid #DCE2EF !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.x-window.analysis-tracking .x-html-editor-tb {
    background: #f5f7f9 !important;
    background-image: none !important;
    border-bottom: 1px solid #DCE2EF !important;
}

/* Prevent editor iframe from overflowing */
.x-window.analysis-tracking .x-form-item {
    overflow: hidden !important;
}

/* Title emptyText reads as a placeholder, not as typed text */
.x-window.analysis-tracking .x-form-text.x-form-empty-field {
    color: var(--acs-text-tertiary, #9aa5b4) !important;
}

/* Footer — match Saved Search dialog: white bg, top border, centered buttons */
.x-window.analysis-tracking .x-panel-footer {
    background: #fff !important;
    border-top: 1px solid #ECF0F6 !important;
    padding: 12px 16px !important;
    text-align: center !important;
}

/* Footer buttons — make "Save" the primary button.
   Buttons are in td.x-toolbar-cell: [0] Save and Start, [1] Save, [2] Close.
   Target the 2nd cell as primary. */
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-mc {
    background: linear-gradient(135deg, #00aeef 0%, #0098d4 100%) !important;
    border-radius: 4px !important;
    padding: 0 !important;
}

.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) button {
    color: #fff !important;
    font-weight: 600 !important;
}

.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-tl,
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-tc,
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-tr,
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-bl,
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-bc,
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-br,
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-ml,
.x-window.analysis-tracking .x-panel-btns td.x-toolbar-cell:nth-child(2) .x-btn-mr {
    display: none !important;
}

/* :not(.x-hide-display) so this never outranks ExtJS's own hide class.
   Ext.form.Checkbox sets actionMode:'wrap', so hide() puts x-hide-display
   on this very check-wrap div. */
.x-window .x-form-check-wrap:not(.x-hide-display) {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.x-window .x-form-checkbox {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    background: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    position: relative !important;
    flex-shrink: 0 !important;
}
.x-window .x-form-checkbox:hover {
    border-color: var(--acs-brand-cyan) !important;
}
.x-window .x-form-checkbox:checked {
    background: var(--acs-brand-cyan) !important;
    border-color: var(--acs-brand-cyan) !important;
}
.x-window .x-form-checkbox:checked::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 45% !important;
    width: 3px !important;
    height: 7px !important;
    border: solid var(--acs-card-bg) !important;
    border-width: 0 2px 2px 0 !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}
.x-window .x-form-cb-label {
    color: var(--acs-text-primary) !important;
    font-size: 13px !important;
    padding: 0 !important;
    line-height: 16px !important;
    cursor: pointer !important;
}
:is(.x-window, .task-popup) .x-tree-root-ct {
    background: var(--acs-card-bg) !important;
    width: 100% !important;
}
:is(.x-window, .task-popup) .x-tree-node a span {
    color: var(--acs-text-primary) !important;
    font-size: 13px !important;
}
:is(.x-window, .task-popup) .x-tree-node-over {
    background-color: var(--acs-hover-bg) !important;
    background-image: none !important;
    background: var(--acs-hover-bg) !important;
}
:is(.x-window, .task-popup) .x-tree-selected {
    background-color: var(--acs-selection-bg) !important;
    background-image: none !important;
    background: var(--acs-selection-bg) !important;
    border-left: none !important;
    margin-left: 0 !important;
}
:is(.x-window, .task-popup) .x-tree-selected a,
:is(.x-window, .task-popup) .x-tree-selected a span {
    color: var(--acs-text-primary) !important;
    font-weight: 500 !important;
}
:is(.x-window, .task-popup) .x-tree-selected.x-tree-node-over {
    background-color: var(--acs-selection-bg) !important;
    background: var(--acs-selection-bg) !important;
}
:is(.x-window, .task-popup) .x-tree-node-collapsed .x-tree-node-icon,
:is(.x-window, .task-popup) .x-tree-node-leaf .x-tree-node-icon {
    -webkit-mask-image: var(--icon-folder) !important;
            mask-image: var(--icon-folder) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree-node-expanded .x-tree-node-icon {
    -webkit-mask-image: var(--icon-folder-open) !important;
            mask-image: var(--icon-folder-open) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
/* Legacy newAlert/newConfirm/newWarn/newInfo dialog severity glyphs.
   Step-7 prep: mask-image directly on the icon-only <div>. */
.x-window-plain.newAlert .msg_dlg_icon,
.x-window-plain.newConfirm .msg_dlg_icon,
.x-window-plain.newWarn .msg_dlg_icon,
.x-window-plain.newInfo .msg_dlg_icon {
    background: none !important;
    -webkit-mask-image: var(--icon-alert-triangle) !important;
            mask-image: var(--icon-alert-triangle) !important;
    -webkit-mask-size: 20px 20px !important;
            mask-size: 20px 20px !important;
    -webkit-mask-position: center 2px !important;
            mask-position: center 2px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    width: 32px !important;
    margin-left: 0 !important;
}
.x-window-plain.newAlert .msg_dlg_title_text {
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: var(--acs-text-primary) !important;
    padding: 0 0 4px 0 !important;
    line-height: 24px !important;
}
.x-window-plain.newAlert div.msg_dlg_main_text {
    font-size: 13px !important;
    color: var(--acs-text-primary) !important;
    line-height: 1.5 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    padding: 0 !important;
}
.x-window-plain.newAlert .msg_dlg_main_additional {
    font-size: 13px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    padding: 8px 0 0 0 !important;
}
.x-window-plain.newAlert .mysel-confirm-include-cb {
    padding: 16px 0 18px 0 !important;
}
.x-window-plain.newAlert .mysel-confirm-include-cb .x-form-element {
    padding-left: 0 !important;
}
.x-window-plain.newAlert .mysel-confirm-include-cb .x-form-check-wrap {
    padding: 0 !important;
}
.x-window-plain.newAlert .mysel-confirm-include-cb .x-form-cb-label {
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: var(--sp-text, var(--acs-text-primary)) !important;
    padding-left: 6px !important;
    /* Allow the label to wrap naturally and stay aligned with the
       checkbox: align-items at the top edge of the line box. */
    vertical-align: middle !important;
    display: inline-block !important;
    max-width: calc(100% - 22px) !important;
    white-space: normal !important;
}
.x-window-plain.newAlert .x-window-bl {
    margin-top: 8px !important;
}
.x-window-plain.newAlert .x-window-br {
    padding: 8px 12px !important;
}
.x-window .search-in-folder {
    height: auto !important;
    overflow: visible !important;
    margin-bottom: 8px !important;
}
.x-window .search-for {
    margin-bottom: 8px !important;
}
/* No `padding-left` on .x-window .x-form-check-wrap: ExtJS FormLayout already
   indents the parent .x-form-element by `labelWidth + labelPad` inline, so a
   checkbox lands on its dialog's own input column unaided. Setting it here
   stacked a second indent on top and pushed checkboxes far enough right to
   read as centred. */

/* Checkbox matrices built from a table layout (user permissions, compliance
   options) have no .x-form-element and centre the box with `text-align`
   on the .cb_cell td. That does not reach the flex check-wrap, so restate
   it as justify-content. */
.x-window td.cb_cell .x-form-check-wrap {
    justify-content: center;
}
.x-window .x-form-radio-group .x-form-check-wrap {
    padding-left: 0 !important;
}
.x-window .x-form-radio-group {
    width: 100% !important;
}
.x-window .x-form-radio-group .x-column-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 4px 16px !important;
    width: 100% !important;
}
.x-window .x-form-radio-group .x-column-inner > .x-column {
    width: auto !important;
    float: none !important;
}
.x-window .x-form-radio-group .x-form-clear-left {
    display: none !important;
}
.x-window .x-form-radio-group .x-form-item {
    margin-bottom: 0 !important;
}
.x-window .x-form-radio-group .x-form-element {
    padding-left: 0 !important;
}
.x-window .x-form-radio-group .x-form-item-label {
    display: none !important;
}
.x-window .x-form-item {
    margin-bottom: 7px !important;
}
/* Fieldsets — search-form banner pattern (originated in
   ext-acs-startpage.css:1835–1863; promoted here so every `.x-fieldset`
   across the app shares one canonical look). The fieldset itself has no
   border; the legend is rendered as a full-width banner with a bottom-
   border separator, uppercase secondary-text label, and an SVG chevron
   toggle when the fieldset is collapsible. */
.x-fieldset {
    border: none !important;
    border-radius: 0 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
}
/* Nested fieldsets: no extra padding (only top-level gets padding). */
.x-fieldset .x-fieldset-noborder,
.x-fieldset .x-fieldset {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: content-box !important;
}
.x-fieldset > legend {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 8px 6px 8px !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid var(--acs-border-light, #ECF0F6) !important;
    color: var(--acs-text-secondary, #5a6370) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
.x-fieldset .x-fieldset-noborder > legend {
    display: none !important;
}
/* Neutralise legacy ExtJS rules on the inner header span so the legend's
   typography wins. */
.x-fieldset > legend .x-fieldset-header-text {
    color: inherit !important;
    font: inherit !important;
    text-transform: inherit !important;
    letter-spacing: inherit !important;
    padding: 0 !important;
    background: none !important;
}

/* Collapse/expand toggle in the fieldset legend — swap the ExtJS sprite
   (0/-60px expanded, 0/-75px collapsed) for theme SVG chevrons painted via
   mask-image in secondary-text grey. Chevron-down when expanded, chevron-
   right when collapsed; brand-cyan on hover. */
.x-fieldset > legend .x-tool.x-tool-toggle {
    float: none !important;
    background-image: none !important;
    background-color: transparent !important;
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    position: relative !important;
    flex: 0 0 auto !important;
}
.x-fieldset > legend .x-tool.x-tool-toggle::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
    pointer-events: none !important;
}
.x-fieldset.x-panel-collapsed > legend .x-tool.x-tool-toggle::before {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
}
.x-fieldset > legend .x-tool.x-tool-toggle:hover::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
.x-window .permission-panel {
    padding: 0 10px !important;
}
.x-window .permission-panel .x-panel-body {
    border: none !important;
}
/* Panel header — window context (Ext.Window / modal dialogs) */
.x-window .x-panel-header {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    background-color: var(--acs-card-bg) !important;
    border: none !important;
    border-bottom: 1px solid var(--acs-border-light) !important;
    padding: 10px 12px !important;
    height: auto !important;
    border-radius: 0 !important;
    color: var(--acs-text-primary) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Panel header — standalone panels (inline views, user-admin, compliance task panels).
   Needs .acs-new-theme prefix to beat the legacy
   ".acs-new-theme .x-panel > .x-panel-header { background: teal }" rule. */
.acs-new-theme .x-panel > .x-panel-header {
    background: var(--acs-card-bg) !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 1px solid var(--acs-border-light) !important;
    border-radius: 0 !important;
    padding: 10px 14px !important;
    height: auto !important;
    color: var(--acs-text-primary) !important;
}
.acs-new-theme .x-panel > .x-panel-header .x-panel-header-text {
    color: var(--acs-text-primary) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}
/* Right-aligned metadata text (e.g. "[Group ID 5]") */
.acs-new-theme .x-panel > .x-panel-header .x-panel-header-text ~ * {
    color: var(--acs-text-secondary) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}
/* Tool buttons (collapse, expand) in standalone panel headers */
.acs-new-theme .x-panel > .x-panel-header .x-tool {
    background-color: transparent !important;
    opacity: 0.5;
}
.acs-new-theme .x-panel > .x-panel-header .x-tool:hover {
    background-color: var(--acs-hover-bg, #f6f8fb) !important;
    opacity: 1;
}
.x-window .assign-btn {
    background: linear-gradient(135deg, var(--acs-brand-cyan) 0%, #0098d4 100%) !important;
    background-image: linear-gradient(135deg, var(--acs-brand-cyan) 0%, #0098d4 100%) !important;
    border: 1px solid #0098d4 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0, 174, 239, 0.25) !important;
    padding: 0 !important;
    margin-top: 18px !important;
}
.x-window .assign-btn button {
    color: var(--acs-card-bg) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    height: auto !important;
    line-height: 1.2 !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
}
.x-window .assign-btn .x-btn-tl,
.x-window .assign-btn .x-btn-tc,
.x-window .assign-btn .x-btn-tr,
.x-window .assign-btn .x-btn-bl,
.x-window .assign-btn .x-btn-bc,
.x-window .assign-btn .x-btn-br,
.x-window .assign-btn .x-btn-ml,
.x-window .assign-btn .x-btn-mr {
    display: none !important;
}
.x-window .assign-btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}
.x-window .assign-btn button.assign-btn-icon {
    background-image: none !important;
}
.x-window .assign-btn button::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-image: var(--icon-folder-sync) !important;
            mask-image: var(--icon-folder-sync) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    background-image: none !important;
    background-color: #ffffff !important;
}
.x-window .assign-btn.x-btn-over {
    background: linear-gradient(135deg, var(--acs-brand-cyan-hover) 0%, var(--acs-brand-cyan) 100%) !important;
    background-image: linear-gradient(135deg, var(--acs-brand-cyan-hover) 0%, var(--acs-brand-cyan) 100%) !important;
    border-color: var(--acs-brand-cyan) !important;
    box-shadow: 0 4px 8px rgba(0, 174, 239, 0.3) !important;
}
.x-window .assign-btn.x-btn-pressed {
    background: #0098d4 !important;
    background-image: none !important;
    border-color: #0088c0 !important;
    box-shadow: 0 1px 2px rgba(0, 174, 239, 0.2) !important;
}
:is(.x-window, .task-popup) .x-tree-node-cb {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    background: var(--acs-hover-bg) !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
}
:is(.x-window, .task-popup) .x-tree-node-cb:hover {
    border-color: var(--acs-brand-cyan) !important;
}
:is(.x-window, .task-popup) .x-tree-node-cb:checked {
    background: var(--acs-brand-cyan) !important;
    border-color: var(--acs-brand-cyan) !important;
}
:is(.x-window, .task-popup) .x-tree-node-cb:checked::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 45% !important;
    width: 3px !important;
    height: 7px !important;
    border: solid var(--acs-card-bg) !important;
    border-width: 0 2px 2px 0 !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}
.x-window img.x-tree-checkbox {
    width: 16px !important;
    height: 16px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Crect x='0.5' y='0.5' width='15' height='15' rx='3' fill='%23F6F8FB' stroke='%23DCE2EF'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-size: 16px 16px !important;
    background-repeat: no-repeat !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
}
.x-window img.x-tree-checkbox:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Crect x='0.5' y='0.5' width='15' height='15' rx='3' fill='%23F6F8FB' stroke='%2300aeef'/%3E%3C/svg%3E") !important;
}
.x-window img.x-tree-checkbox.x-tree-node-checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Crect x='0.5' y='0.5' width='15' height='15' rx='3' fill='%2300aeef' stroke='%2300aeef'/%3E%3Cpath d='M4.5 8L7 10.5L11.5 5.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.x-window img.x-tree-checkbox.x-tree-node-grayed {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Crect x='0.5' y='0.5' width='15' height='15' rx='3' fill='%2300aeef' stroke='%2300aeef'/%3E%3Cpath d='M5 8H11' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
:is(.x-window, .task-popup) .x-tree .x-toolbar,
:is(.x-window, .task-popup) .x-tree .x-panel-tbar .x-toolbar {
    background-image: none !important;
    background-color: var(--acs-card-bg) !important;
    border: none !important;
    border-bottom: 1px solid var(--acs-border) !important;
    padding: 4px 6px !important;
}
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-tl,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-tr,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-tc,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-ml,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-mr,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-mc,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-bl,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-br,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-bc {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
}
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn:hover,
:is(.x-window, .task-popup) .x-tree .x-toolbar .x-btn-over {
    background: var(--acs-hover-bg) !important;
    border-radius: 4px !important;
}
:is(.x-window, .task-popup) .x-tree .toc_expand,
:is(.x-window, .task-popup) .x-tree .toc_collapse,
:is(.x-window, .task-popup) .x-tree .toc_next,
:is(.x-window, .task-popup) .x-tree .toc_prev,
:is(.x-window, .task-popup) .x-tree .refresh_icon,
:is(.x-window, .task-popup) .x-tree .attach_sort_toc,
:is(.x-window, .task-popup) .x-tree .attach_sort_alpha,
:is(.x-window, .task-popup) .x-tree .attach_clear_filters {
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-position: center center !important;
            mask-position: center center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 0.7 !important;
    transition: opacity 0.15s, background-color 0.15s !important;
}
:is(.x-window, .task-popup) .x-tree .toc_expand:hover,
:is(.x-window, .task-popup) .x-tree .toc_collapse:hover,
:is(.x-window, .task-popup) .x-tree .toc_next:hover,
:is(.x-window, .task-popup) .x-tree .toc_prev:hover,
:is(.x-window, .task-popup) .x-tree .refresh_icon:hover,
:is(.x-window, .task-popup) .x-tree .attach_sort_toc:hover,
:is(.x-window, .task-popup) .x-tree .attach_sort_alpha:hover,
:is(.x-window, .task-popup) .x-tree .attach_clear_filters:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_expand,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_collapse,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_next,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_prev,
:is(.x-window, .task-popup) .x-tree .x-btn-over .refresh_icon,
:is(.x-window, .task-popup) .x-tree .x-btn-over .attach_sort_toc,
:is(.x-window, .task-popup) .x-tree .x-btn-over .attach_sort_alpha,
:is(.x-window, .task-popup) .x-tree .x-btn-over .attach_clear_filters {
    opacity: 1 !important;
}
:is(.x-window, .task-popup) .x-tree .toc_expand {
    -webkit-mask-image: var(--icon-folder-plus) !important;
            mask-image: var(--icon-folder-plus) !important;
}
:is(.x-window, .task-popup) .x-tree .toc_expand:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_expand {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-tree .toc_collapse {
    -webkit-mask-image: var(--icon-folder-minus) !important;
            mask-image: var(--icon-folder-minus) !important;
}
:is(.x-window, .task-popup) .x-tree .toc_collapse:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_collapse {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-tree .toc_next {
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
}
:is(.x-window, .task-popup) .x-tree .toc_next:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_next {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-tree .toc_prev {
    -webkit-mask-image: var(--icon-chevron-up) !important;
            mask-image: var(--icon-chevron-up) !important;
}
:is(.x-window, .task-popup) .x-tree .toc_prev:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .toc_prev {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-tree .refresh_icon {
    -webkit-mask-image: var(--icon-refresh) !important;
            mask-image: var(--icon-refresh) !important;
}
:is(.x-window, .task-popup) .x-tree .refresh_icon:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .refresh_icon {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-tree .attach_sort_toc {
    -webkit-mask-image: var(--icon-list-restart) !important;
            mask-image: var(--icon-list-restart) !important;
}
:is(.x-window, .task-popup) .x-tree .attach_sort_toc:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .attach_sort_toc {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-tree .attach_sort_alpha {
    -webkit-mask-image: var(--icon-sort-asc) !important;
            mask-image: var(--icon-sort-asc) !important;
}
:is(.x-window, .task-popup) .x-tree .attach_sort_alpha:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .attach_sort_alpha {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-tree .attach_clear_filters {
    -webkit-mask-image: var(--icon-filter-x) !important;
            mask-image: var(--icon-filter-x) !important;
}
:is(.x-window, .task-popup) .x-tree .attach_clear_filters:hover,
:is(.x-window, .task-popup) .x-tree .x-btn-over .attach_clear_filters {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}
:is(.x-window, .task-popup) .x-small-editor .x-form-text {
    height: auto !important;
}
:is(.x-window, .task-popup) .x-tree .x-toolbar .xtb-text,
:is(.x-window, .task-popup) .x-tree .x-panel-tbar .xtb-text {
    color: var(--acs-text-secondary) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}
:is(.x-window, .task-popup) .x-tree {
    background-color: var(--acs-card-bg) !important;
}
:is(.x-window, .task-popup) .x-tree .x-panel-body {
    border: none !important;
    background-color: var(--acs-card-bg) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-el {
    line-height: 24px !important;
    font-size: 13px !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-anchor span {
    color: var(--acs-text-primary) !important;
    font-size: 13px !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-anchor:hover span {
    color: var(--acs-brand-cyan-muted) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-over {
    background-color: var(--acs-hover-bg-blue) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-selected,
:is(.x-window, .task-popup) .x-tree .x-tree-node .x-tree-selected,
:is(.x-window, .task-popup) .x-tree .x-tree-node div.x-tree-selected {
    background-color: var(--acs-selection-bg) !important;
    background-image: none !important;
    background: var(--acs-selection-bg) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-selected a,
:is(.x-window, .task-popup) .x-tree .x-tree-selected a span {
    color: var(--acs-text-primary) !important;
    font-weight: 500 !important;
    background-color: transparent !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-selected.x-tree-node-over {
    background-color: var(--acs-selection-bg) !important;
    background: var(--acs-selection-bg) !important;
}
:is(.x-window, .task-popup) .x-tree img.toc_root {
    -webkit-mask-image: var(--icon-library) !important;
            mask-image: var(--icon-library) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-collapsed .x-tree-node-icon,
:is(.x-window, .task-popup) .x-tree .x-tree-node-expanded .x-tree-node-icon {
    -webkit-mask-image: var(--icon-folder) !important;
            mask-image: var(--icon-folder) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-expanded .x-tree-node-icon {
    -webkit-mask-image: var(--icon-folder-open) !important;
            mask-image: var(--icon-folder-open) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-leaf .x-tree-node-icon:not(.fldr_user):not(.fldr_real):not(.fldr_link):not(.fldr_marker):not(.fldr_download):not(.fldr_workspace):not(.fldr_cat):not(.book_img):not(.consolidated_book_img):not(.group_fldr):not(.group_node):not(.user_node):not(.user_img) {
    -webkit-mask-image: var(--icon-file-text) !important;
            mask-image: var(--icon-file-text) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.fldr_user,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.fldr_cat {
    -webkit-mask-image: var(--icon-folder-cog) !important;
            mask-image: var(--icon-folder-cog) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.fldr_real,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.fldr_link,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.fldr_marker,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.fldr_download,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.fldr_workspace {
    -webkit-mask-image: var(--icon-folder) !important;
            mask-image: var(--icon-folder) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
/* Group and user nodes of the group/user pickers keep one icon in every
   state; the server sets these classes (core/user_sec_obj.py load_groups). */
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.group_fldr,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.group_node {
    -webkit-mask-image: var(--icon-users) !important;
            mask-image: var(--icon-users) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.user_node,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.user_img {
    -webkit-mask-image: var(--icon-user) !important;
            mask-image: var(--icon-user) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
/* Books get the shelf-book glyph the start page uses, not the folder. */
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.book_img,
:is(.x-window, .task-popup) .x-tree img.x-tree-node-icon.consolidated_book_img {
    -webkit-mask-image: var(--icon-shelf-book) !important;
            mask-image: var(--icon-shelf-book) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
/* ExtJS tops the 20px chevron box; the 16px node icon sits middle. */
:is(.x-window, .task-popup) .x-tree .x-tree-ec-icon {
    background-image: none !important;
    vertical-align: middle !important;
}
/* Undo the start page's sprite-era -4px icon lift (ext-acs-startpage.css),
   as its own .tree-col trees already do, so dialogs align on every page. */
:is(.x-window, .task-popup) .x-tree .x-tree-node-el img.x-tree-node-icon {
    margin-top: 0 !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-collapsed .x-tree-ec-icon {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-node-expanded .x-tree-ec-icon {
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-elbow,
:is(.x-window, .task-popup) .x-tree .x-tree-elbow-end,
:is(.x-window, .task-popup) .x-tree .x-tree-elbow-line {
    background-image: none !important;
}
:is(.x-window, .task-popup) .x-tree .x-tree-root-ct {
    width: 100% !important;
}
:is(.x-window, .task-popup) .x-tree .x-panel-body-noheader {
    border: none !important;
}
:is(.x-window, .task-popup) .x-tree .x-panel-body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
:is(.x-window, .task-popup) .x-tree .x-panel-body::-webkit-scrollbar {
    width: 6px !important;
}
:is(.x-window, .task-popup) .x-tree .x-panel-body::-webkit-scrollbar-track {
    background: transparent !important;
}
:is(.x-window, .task-popup) .x-tree .x-panel-body::-webkit-scrollbar-thumb {
    background-color: var(--acs-scrollbar-thumb) !important;
    border-radius: 3px !important;
}
:is(.x-window, .task-popup) .x-tree .x-panel-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--acs-scrollbar-thumb-hover) !important;
}

/* ---------- Toolbars -----------
   ExtJS `Ext.Toolbar` chrome and inner buttons (excluding the dark header
   toolbar — that's in `ext-acs-header.css`). Used by Browse Library list
   toolbars, Search results toolbar, Saved Searches grid toolbar, etc. */

/* ---------- Trees -----------
   ExtJS `Ext.tree.TreePanel` styling: node padding, expand/collapse
   chevrons, selection background, drag-drop highlights. Currently
   accordion-scoped in startpage CSS; A2 unbinds and moves here. */

/* --- Drag-drop proxy / ghost ---
   Promoted from `.acs-startpage`-gated rules during Phase 3 PR 3.1
   (THEME_REVIEW.md §4.3). ExtJS 3 ships `Ext.dd.StatusProxy` with a
   status icon (`.x-dd-drop-icon`) using GIF sprites under
   `extJS_3_4_1_1/resources/images/azzurra-legacy/dd/`; replaced here
   with circular status badges (a coloured pill behind a white SVG
   glyph) so the not-allowed icon reads as "no entry" and the allowed
   icon reads as a confirmed-action token rather than as an unrelated
   icon. Only renders mid-drag, so applying shell-wide is safe — the
   styling never appears unless a drag is in progress. */
.x-dd-drag-proxy {
    border-radius: var(--acs-radius-md) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18) !important;
    background: var(--acs-card-bg) !important;
    padding: 6px 10px 6px 30px !important;
    border: 1px solid var(--acs-border) !important;
}

/* Status icon shared chrome — the coloured circle behind the SVG glyph.
   The colour comes from the per-status rule below. */
.x-dd-drag-proxy .x-dd-drop-icon {
    width: 18px !important;
    height: 18px !important;
    top: 50% !important;
    left: 6px !important;
    margin-top: -9px !important;
    border-radius: 50% !important;
    background-size: 12px 12px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2) !important;
}

/* Drop NOT allowed — red circle with white slash. Reads as a "no entry"
   road-sign rather than a delete-X. */
.x-dd-drop-nodrop .x-dd-drop-icon {
    background-color: #d6453a !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") !important;
}

/* Drop allowed — cyan circle with white check. */
.x-dd-drop-ok .x-dd-drop-icon,
.x-tree-drop-ok-append .x-dd-drop-icon {
    background-color: var(--acs-brand-cyan) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
}

/* Drop "add" — cyan circle with white plus. */
.x-dd-drop-ok-add .x-dd-drop-icon {
    background-color: var(--acs-brand-cyan) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") !important;
}

/* Tree drop position indicators (above / below) — cyan circle with white
   chevron so user can tell drop-into vs above vs below. */
.x-tree-drop-ok-above .x-dd-drop-icon {
    background-color: var(--acs-brand-cyan) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 15 12 9 18 15'/%3E%3C/svg%3E") !important;
}
.x-tree-drop-ok-below .x-dd-drop-icon {
    background-color: var(--acs-brand-cyan) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

/* Ghost — the cloned source row(s) shown next to the status badge.
   Drop the inner table-cell borders / right-alignment that ExtJS's
   default proxy chrome inherits, force left-alignment, sane spacing,
   and a 13px line-height that matches the rest of the shell. */
.x-dd-drag-proxy .x-dd-drag-ghost {
    text-align: left !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: var(--acs-text-primary) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    max-width: 320px !important;
    overflow: hidden !important;
}

.x-dd-drag-proxy .x-dd-drag-ghost > * {
    border: 0 !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Cloned tree-leaf book / folder icons — keep glyphs consistent with
   the new theme (the row clone may carry only the legacy iconCls
   without an inline image). */
.x-dd-drag-ghost img.x-tree-node-icon.book_img,
.x-dd-drag-ghost img.x-tree-node-icon.consolidated_book_img {
    -webkit-mask-image: var(--icon-shelf-book) !important;
            mask-image: var(--icon-shelf-book) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center center !important;
            mask-position: center center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    opacity: 0.7 !important;
    vertical-align: middle !important;
}
/* Step-7 prep: drag-ghost folder icon. <img> (replaced element) so
   ::before can't render — mask-image goes directly on the <img>; the
   transparent `blank_image_url.gif` src means only the masked
   bg-color paints. Cyan tint preserved (matched today's --icon-folder-hover
   baked stroke). */
.x-dd-drag-ghost img.x-tree-node-icon.fldr_real,
.x-dd-drag-ghost img.x-tree-node-icon.fldr_user {
    -webkit-mask-image: var(--icon-folder) !important;
            mask-image: var(--icon-folder) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center center !important;
            mask-position: center center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    vertical-align: middle !important;
}

/* ---------- Loaders & overlay masks -----------
   Shared loading-spinner infrastructure: the `Ext.LoadMask` overlay (the
   light/dark scrim), its message box (".x-mask-loading div"), the inline
   `.loading-indicator`, the `.x-tree-node-loading` ring, the
   `.x-grid-row-loading` reset, and the canonical `@keyframes acs-spin`.

   Promoted from `.acs-startpage`-gated rules during Phase 3 PR 3.1
   (THEME_REVIEW.md §4.3). Now applies shell-wide. The keyframe was
   defined gated and consumed by ext-acs-affiniai.css too — moving the
   keyframe into shell-wide ext-acs-theme.css fixes that quiet
   cross-file dependency.

   Phase 8 (loader unification, see THEME_REVIEW.md §5) will refactor
   these into shared-theme/scss/_loaders.scss mixins. Until then, keep
   them as concrete rules here so admin/viewer/AffiniAI surfaces gain
   the themed loaders rather than continuing to render the legacy GIF
   sprites. */

/* Default: light white overlay for grids and panels — visible loading state */
.ext-el-mask {
    background-color: rgba(255, 255, 255, 0.6) !important;
}

/* Dialog mask: darker for modal backdrop */
body > .ext-el-mask {
    background-color: rgba(28, 33, 39, 0.3) !important;
}

/* --- Loading mask message box ---
   Visible for grids and dialogs. */
.ext-el-mask-msg {
    border: none !important;
    background: none !important;
    padding: 0 !important;
}

.ext-el-mask-msg div,
.x-mask-loading div {
    background-color: var(--acs-card-bg) !important;
    background-image: none !important;
    border: 1px solid var(--acs-border-input) !important;
    border-radius: var(--acs-radius-lg) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    color: var(--acs-text-secondary) !important;
    font-size: 12px !important;
    padding: 10px 16px 10px 36px !important;
    position: relative !important;
}

/* CSS spinner — replaces GIF with a clean animated ring */
.ext-el-mask-msg div::before,
.x-mask-loading div::before {
    content: '' !important;
    position: absolute !important;
    left: 12px !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: auto !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid var(--acs-border-input) !important;
    border-top-color: var(--acs-brand-cyan) !important;
    border-radius: 50% !important;
    animation: acs-spin 0.6s linear infinite !important;
}

/* Inline loading indicator — used in tree nodes, grid rows */
.loading-indicator {
    background-image: none !important;
    padding: 12px 12px 12px 32px !important;
    position: relative !important;
    font-size: 12px !important;
    color: var(--acs-text-secondary) !important;
    min-height: 20px !important;
    line-height: 20px !important;
}

.loading-indicator::before {
    content: '' !important;
    position: absolute !important;
    left: 10px !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: auto !important;
    width: 14px !important;
    height: 14px !important;
    border: 2px solid var(--acs-border-input) !important;
    border-top-color: var(--acs-brand-cyan) !important;
    border-radius: 50% !important;
    animation: acs-spin 0.6s linear infinite !important;
}

/* Tree node loading spinner */
.x-tree-node-loading .x-tree-node-icon {
    background-image: none !important;
    position: relative !important;
}

.x-tree-node-loading .x-tree-node-icon::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 12px !important;
    height: 12px !important;
    border: 2px solid var(--acs-border-input) !important;
    border-top-color: var(--acs-brand-cyan) !important;
    border-radius: 50% !important;
    animation: acs-spin 0.6s linear infinite !important;
}

/* Grid row loading — reset ExtJS GIF spinner so the parent's animated
   ring shows through. */
.x-grid-row-loading {
    background-image: none !important;
}

/* Canonical keyframe shared by all shell loaders. Phase 8 will pull
   this into shared-theme/scss/_loaders.scss as part of cross-stack
   loader unification. */
@keyframes acs-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- Light menus -----------
   ExtJS `Ext.menu.Menu` (excluding `.header-menu` which is dark). Context
   menus, grid right-click menus, Kendo dropdowns. Matches THEME_GUIDE.md
   §6.5 ("Dropdown/Popover (Light Theme)") canonical spec. */

/* ---------- Scrollbars -----------
   Thin neutral scrollbar (6px, light grey thumb) shell-wide. Replaces
   the wide grey ExtJS default. Webkit for Chrome/Safari and
   `scrollbar-width` / `scrollbar-color` for Firefox.

   Promoted from `.acs-startpage`-gated rules in `ext-acs-startpage.css`
   during Phase 2 of the theme refactor (THEME_REVIEW.md §4.3 Phase 2).
   Tokens declared in shared-theme/scss/_variables.scss and exposed via
   acs-theme-properties.css. */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--acs-scrollbar-thumb);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--acs-scrollbar-thumb-hover);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--acs-scrollbar-thumb) transparent;
}

/* ---------- Cards -----------
   Generic card surface for non-home-app contexts (e.g. dashboard panels,
   admin section cards). Home-app cards have their own SCSS in the Angular
   project and are not affected. */

/* ---------- Popovers -----------
   Tooltips, info popovers, action popovers. THEME_GUIDE.md §6.6 (Tooltips,
   dark) and §6.5 (Popovers, light). */

/* ============================================================================
   Grid column header — shell-wide chrome, typography, hover, and filter state.

   Promoted from ext-acs-startpage.css:3030–3097 (the bookshelf/search-results
   pattern); previously redeclared verbatim under `body.tasks-page` and
   `body.notes-page` (commit a27d3615f) to get the same wash + border on the
   tasks/notes grids without lifting the full typography. This block makes
   the typography (uppercase 12px 600 muted-grey) shell-wide too, so every
   grid in the app reads the column labels the same way.

   Layout reserves on `.x-grid3-hd-inner`:
     - padding-left: 6px — base text gutter
     - padding-right: 22px — reserved for the column-menu trigger
       (`.x-grid3-hd-btn`, painted at `right: 2px`, width 18px — visible
       on header hover). Sort caret ALSO lives in this 22px slot at
       `right: 22px` (just left of the trigger) when the column is sorted.
     - When sorted, padding-right bumps to 34px so the text content-box
       ends to the LEFT of the caret. Without this, the caret's absolute
       position overlaps the text/ellipsis on cramped columns.
     - `.ux-acs-filtered-column .x-grid3-hd-inner` adds padding-left: 22px
       for the filter funnel `::before`.

   Suppresses the legacy `ext-acs-ux.css` filter-state rule that paints
   italic + indigo (`color: #6666CC`) on the td when the GridFilters plugin
   adds `.ux-acs-filtered-column` — we paint a clean teal + bold treatment
   on the inner div instead.
   ============================================================================ */

/* Header row chrome — neutral surface wash + 1px bottom border between
   header and rows. Replaces the legacy `#aeb6be` divider with the theme
   `--acs-border` token; replaces the white default bg with the
   `--acs-surface` neutral wash. */
td.x-grid3-hd {
    background-image: none !important;
    background-color: var(--acs-surface, #f5f7f9) !important;
    border-top: none !important;
    border-bottom: 1px solid var(--acs-border, #e2e6ec) !important;
    border-left: none !important;
    border-right: none !important;
}

/* Header text typography — uppercase 12px 600 muted-grey label.
   `position: relative` anchors the absolute `::before` (filter funnel),
   `::after` (sort caret), and `.x-grid3-hd-btn` (menu trigger) children. */
.x-grid3-hd-inner {
    color: var(--acs-text-secondary, #5a6370) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    padding: 8px 22px 8px 6px !important;
    position: relative !important;
}

/* Reserve extra right-padding when the column is sorted so the caret never
   overlaps text/ellipsis. The caret is painted at `right: 22px` width 12px
   (see `.sort-asc .x-grid3-hd-inner::after` below); 34px right-padding
   ensures the text content-box ends 12px left of the caret's left edge.

   `min()` so a narrow column degrades instead of breaking: a 38px column
   (the Executions grid's ID) cannot spare a 34px gutter, and the fixed
   value pushed the label out past its own padding box and straight under
   the caret. The percentage keeps the gutter proportional there; every
   column wide enough for 34px still gets exactly 34px.

   Only the padding is capped. The caret keeps its fixed `right: 22px`
   below, which is what holds it clear of the column-menu trigger that
   appears on hover; sliding the caret rightwards on a narrow column puts
   it straight under that trigger instead. */
td.x-grid3-hd.sort-asc .x-grid3-hd-inner,
td.x-grid3-hd.sort-desc .x-grid3-hd-inner {
    padding-right: min(34px, 40%) !important;
}

/* Header hover wash + brand-cyan underline accent + slightly stronger
   text colour, signalling "click me to open the column menu". */
td.x-grid3-hd-over {
    background-image: none !important;
    background-color: #eef1f5 !important;
    border-bottom-color: var(--acs-brand-cyan, #00aeef) !important;
}
td.x-grid3-hd-over .x-grid3-hd-inner {
    color: var(--acs-text-primary, #1c2127) !important;
}

/* Filtered-column header text — teal + 600 weight, plus a funnel SVG via
   `::before` anchored at the left edge of the inner. The legacy ux.css
   td-level rule (font-style: italic; color: #6666CC) is overridden by the
   inner div rule for text styling, but explicitly suppressed at the td
   level too (cleaner cascade — the td-level color affects the funnel's
   `currentColor` fill if not overridden). */
.x-grid3-hd-row td.ux-acs-filtered-column {
    font-style: normal !important;
    color: inherit !important;
}
div.x-grid3-header td.ux-acs-filtered-column div {
    position: relative !important;
    background: none !important;
    padding-left: 22px !important;
    color: var(--acs-brand-cyan-muted, #0e8bb0) !important;
    font-weight: 600 !important;
}
div.x-grid3-header td.ux-acs-filtered-column div::before {
    content: '' !important;
    position: absolute !important;
    left: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 14px !important;
    height: 14px !important;
    -webkit-mask-image: var(--icon-filter) !important;
            mask-image: var(--icon-filter) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: currentColor !important;
    pointer-events: none !important;
}

/* ---------- Grid column header menu trigger + sort indicators -----------
   Promoted from ext-acs-startpage.css:3088–3135 (search-results-grid
   pattern). The ExtJS `.x-grid3-hd-btn` is the chevron-down trigger that
   opens the column menu (sort / columns / filters). Legacy paints a blue
   sprite-bg pill that's always visible; we swap it for a quiet SVG chevron
   in the gutter, revealed only on header hover. Theme-wide so every
   `.x-grid3` across the app shares one canonical look. */
.x-grid3-hd-btn {
    position: absolute !important;
    right: 2px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    width: 18px !important;
    height: 18px !important;
    opacity: 0 !important;
    transition: opacity 0.15s !important;
}
.x-grid3-hd-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
    pointer-events: none !important;
}
td.x-grid3-hd-over .x-grid3-hd-btn {
    opacity: 1 !important;
    background-color: rgba(0, 174, 239, 0.06) !important;
    border-radius: 4px !important;
}
td.x-grid3-hd-over .x-grid3-hd-btn:hover {
    background-color: rgba(0, 174, 239, 0.12) !important;
}
td.x-grid3-hd-over .x-grid3-hd-btn:hover::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Hide the placeholder `<img class="x-grid3-sort-icon" src="blank_image_url.gif">`
   that every header carries. ExtJS uses it as the sort-caret target via
   bg-image on the parent .sort-asc / .sort-desc; we paint the caret via
   a ::after pseudo on the header-inner instead so it tracks the column's
   sort state without depending on a gif. */
.x-grid3-header img.x-grid3-sort-icon {
    display: none !important;
}

/* Visible sort caret — chevron-up / chevron-down SVG pinned to the right
   of the header-inner padding gutter on sorted columns. The 22px right-
   padding on .x-grid3-hd-inner (set by the header rule above this file's
   parent ruleset, e.g. ext-acs-compliance.css's notes-grid block) leaves
   room for both the menu trigger AND the sort caret. */
.sort-asc .x-grid3-hd-inner::after,
.sort-desc .x-grid3-hd-inner::after {
    content: '' !important;
    position: absolute !important;
    right: 22px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 12px !important;
    height: 12px !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    pointer-events: none !important;
}
/* Arrow glyphs (with a shaft) read more clearly as a direction indicator
   than chevrons — the chevron is already used as the menu-trigger glyph,
   so the arrow visually distinguishes "sorted asc/desc" from "open menu".
   Uses `--icon-sort-arrow-up/down` which have a longer shaft + smaller
   arrowhead than the generic --icon-arrow-up/down for clearer reading at
   the 12px sort-caret size. */
.sort-asc .x-grid3-hd-inner::after {
    -webkit-mask-image: var(--icon-sort-arrow-up) !important;
            mask-image: var(--icon-sort-arrow-up) !important;
}
.sort-desc .x-grid3-hd-inner::after {
    -webkit-mask-image: var(--icon-sort-arrow-down) !important;
            mask-image: var(--icon-sort-arrow-down) !important;
}

/* ============================================================================
   Grid CheckboxSelectionModel — shell-wide row + header checker theming.

   Promoted from two parent-dialog-scoped redeclarations:
     - ext-acs-compliance.css :1088-1202  (#add_related_window)
     - ext-acs-book.css       :1274-1364  (.documents-window)

   Other ExtJS grids that use `new Ext.grid.CheckboxSelectionModel()` and
   previously got the raw azzurra-legacy sprite (now themed for free):
     - ext-acs-libsetup-widgets.js:2281  (Library Setup books grid)
     - audit/ext-acs-audit-mgr.js:1932    (Audit Manager executions grid)
     - compliance_index.js:561            (Compliance index meta grids)

   Legacy ExtJS paints `.x-grid3-row-checker` / `.x-grid3-hd-checker` as a
   18px <div> with a sprite bg-image (row-check-sprite1.gif at -21px 4px
   when checked). We override the sprite + size, paint a clean 16×16 themed
   checkbox via `::before` (the box) + `::after` (the white ✓ tick),
   matching `.x-form-checkbox` from theme.css:322.

   Geometry:
     - .x-grid3-td-checker (the <td>) — widened to 32px so the 16×16 box
       has breathing room (legacy width: 18px inline crops it).
     - .x-grid3-cell-inner.x-grid3-col-checker — flex-centred horizontally
       AND vertically so the checkbox sits centred regardless of row height.
     - Header checker — text-align: center on the <td> + display:inline-block
       on the inner so the 16×16 box horizontally centres (the header
       doesn't get the `.x-grid3-cell-inner.x-grid3-col-checker` wrapper
       that rows do; its inner is `.x-grid3-hd-inner.x-grid3-hd-checker`).
     - Selected-row checker cell — kill the legacy grey gutter
       (`#dcdfe3` bg + `#bfc6cc` border-right from azzurra-legacy:1484) so
       the cell inherits the row's selected wash.

   States:
     - rest: `--acs-hover-bg` (#f4f7fb) fill, `--acs-border-input` border
     - hover row: cyan border
     - checked (.x-grid3-row-selected / .x-grid3-row-checked / .x-grid3-hd-
       checker-on): cyan fill + white ✓ via ::after
   ============================================================================ */

/* Widen the checker column so the themed 16×16 checkbox has room to
   breathe (legacy ExtJS sets width: 18px inline which crops it). */
td.x-grid3-hd.x-grid3-td-checker,
.x-grid3-row td.x-grid3-td-checker {
    width: 32px !important;
    min-width: 32px !important;
}

/* Row checker cell: middle-align the cell-inner so flex-centred contents
   actually centre vertically. */
.x-grid3-row td.x-grid3-td-checker {
    vertical-align: middle !important;
}

/* Selected-row checker cell — kill the legacy grey gutter + border so the
   cell inherits the row's themed selected wash instead of an ugly grey
   block (azzurra-legacy.css:1484 paints `#dcdfe3` bg + `#bfc6cc` right-
   border on .x-grid3-body .x-grid3-row-selected .x-grid3-td-checker). */
.x-grid3-body .x-grid3-row-selected td.x-grid3-td-checker {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-right: none !important;
}

/* Flex-centre the row checker container on BOTH axes. Overrides the legacy
   left+top sprite anchoring at width:100% / height:18px. Also overrides
   the .x-grid3-cell-first padding-left:10px rule that would push the
   checker off-centre. */
.x-grid3-cell-inner.x-grid3-col-checker,
.x-grid3-cell-first .x-grid3-cell-inner.x-grid3-col-checker {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* Header checker centring — the header has no `.x-grid3-cell-inner.x-grid3-
   col-checker` wrapper, just `.x-grid3-hd-inner.x-grid3-hd-checker` directly
   under the <td>. Use text-align: center on the cell + inline-block on the
   inner so the 16×16 themed box centres horizontally. */
td.x-grid3-hd.x-grid3-td-checker {
    text-align: center !important;
    vertical-align: middle !important;
}
.x-grid3-hd-inner.x-grid3-hd-checker {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Strip the legacy sprite on header + row checkers; pin to 16×16. */
.x-grid3-row-checker,
.x-grid3-hd-checker {
    background-image: none !important;
    background-color: transparent !important;
    width: 16px !important;
    height: 16px !important;
    position: relative !important;
}

/* Themed 16×16 box via ::before (matches `.x-form-checkbox`). Pinned to
   inset:0 of its 16×16 parent so the box exactly fills the checker div. */
.x-grid3-row-checker::before,
.x-grid3-hd-checker::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    width: 16px !important;
    height: 16px !important;
    background-color: var(--acs-hover-bg, #f4f7fb) !important;
    background-image: none !important;
    border: 1px solid var(--acs-border-input, #dce2ef) !important;
    border-radius: var(--acs-radius-sm, 4px) !important;
    box-sizing: border-box !important;
    transition: background-color 0.15s, border-color 0.15s !important;
}

/* Row hover — cyan border. Header hover gets the same treatment. */
.x-grid3-row:hover .x-grid3-row-checker::before,
.x-grid3-hd-checker:hover::before {
    border-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Checked state — cyan fill. Triggered by:
     - .x-grid3-row-selected   — row in current selection
     - .x-grid3-row-checked    — explicit checked row class (newer Ext)
     - .x-grid3-hd-checker-on  — "all rows selected" header indicator */
.x-grid3-row-selected .x-grid3-row-checker::before,
.x-grid3-hd-checker-on .x-grid3-hd-checker::before,
.x-grid3-row-checked .x-grid3-row-checker::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    background-image: none !important;
    border-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* White ✓ tick via ::after — only painted when checked. */
.x-grid3-row-selected .x-grid3-row-checker::after,
.x-grid3-hd-checker-on .x-grid3-hd-checker::after,
.x-grid3-row-checked .x-grid3-row-checker::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 45% !important;
    width: 3px !important;
    height: 7px !important;
    border: solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
    pointer-events: none !important;
}

/* GridCheckbox select-all header (GridCheckbox.js): the column has no menu
   and no sort, so drop the 22px menu-trigger reserve. Otherwise the header
   checkbox overflows the 36px column and ExtJS draws "…" after it. */
.x-grid3-hd-inner.x-grid3-hd-selection-checkbox {
    padding-right: 0 !important;
}

/* ---------- Grid column-menu dropdown (.x-menu floating) -----------
   Promoted from ext-acs-startpage.css:1074–1226 (canonical light popover
   pattern, aligned with Kendo .k-popup). The ExtJS azzurra-legacy theme
   paints these menus with a dark-grey bg; we override to a clean white
   popover with rounded corners + drop shadow, themed item hover (cyan
   wash + muted-teal text), and SVG sort/columns icons.

   Scope: every `.x-menu` except `.header-menu` (which has its own dark
   theme in ext-acs-header.css). Theme-wide so column menus look the
   same across the app. */
.x-menu:not(.header-menu),
.x-menu.x-menu-floating:not(.header-menu) {
    background: #fff !important;
    background-image: none !important;
    border: 1px solid var(--acs-border-input, #dce2ef) !important;
    border-radius: var(--acs-radius-md, 6px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 4px !important;
    overflow: hidden !important;
    font-family: var(--acs-font-family) !important;
    box-sizing: border-box !important;
}
.x-menu:not(.header-menu) ul,
.x-menu.x-menu-floating:not(.header-menu) ul,
.x-menu:not(.header-menu) .x-menu-list,
.x-menu.x-menu-floating:not(.header-menu) .x-menu-list {
    background: transparent !important;
    background-image: none !important;
    padding: 0 !important;
}

/* Column-visibility submenu (`*-hcols-menu`) and any tall ExtJS menu —
   cap height so a 27-column list doesn't overflow the viewport, and
   enable scrolling. The id-suffix selector catches all grid column menus
   regardless of grid id. The fallback rule kicks in when ExtJS sets a
   pixel `height: NNNpx` inline on the menu (which it does after layout). */
.x-menu[id$="-hcols-menu"],
.x-menu[id$="-hcols-menu"].x-menu-floating {
    max-height: min(70vh, 480px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
.x-menu[id$="-hcols-menu"] .x-menu-list,
.x-menu[id$="-hcols-menu"].x-menu-floating .x-menu-list {
    max-height: none !important;
    overflow: visible !important;
}
/* The list scrolls natively, so ExtJS's arrow scrollers only float over items. */
.x-menu[id$="-hcols-menu"] .x-menu-scroller {
    display: none !important;
}
/* Guarded with `:not(.x-hide-display)`: `x-hide-display` is a single class, this
   selector is two, so unguarded it outranks `display: none` and an item the app has
   hidden stays painted. Same collision as the check-wrap rule (work item #92). */
.x-menu:not(.header-menu) li.x-menu-list-item:not(.x-hide-display),
.x-menu.x-menu-floating:not(.header-menu) li.x-menu-list-item:not(.x-hide-display),
.x-menu:not(.header-menu) li.x-menu-list-item.x-menu-item-active:not(.x-hide-display),
.x-menu.x-menu-floating:not(.header-menu) li.x-menu-list-item.x-menu-item-active:not(.x-hide-display) {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    vertical-align: top !important;
}
.x-menu:not(.header-menu) a.x-menu-item,
.x-menu.x-menu-floating:not(.header-menu) a.x-menu-item,
.x-menu:not(.header-menu) li.x-menu-item-active a.x-menu-item,
.x-menu.x-menu-floating:not(.header-menu) li.x-menu-item-active a.x-menu-item {
    display: flex !important;
    align-items: center !important;
    padding: 4px 8px !important;
    color: var(--acs-text-primary, #1c2127) !important;
    font-size: 13px !important;
    font-family: var(--acs-font-family) !important;
    border-radius: 6px !important;
    background: transparent !important;
    text-decoration: none !important;
    border: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 18px !important;
}
.x-menu:not(.header-menu) a.x-menu-item img.x-menu-item-icon,
.x-menu.x-menu-floating:not(.header-menu) a.x-menu-item img.x-menu-item-icon {
    position: static !important;
    flex-shrink: 0 !important;
}
.x-menu:not(.header-menu) a.x-menu-item .x-menu-item-text,
.x-menu.x-menu-floating:not(.header-menu) a.x-menu-item .x-menu-item-text {
    flex: 1 !important;
    line-height: 1.4 !important;
}
.x-menu:not(.header-menu) li.x-menu-list-item.x-menu-item-active,
.x-menu.x-menu-floating:not(.header-menu) li.x-menu-list-item.x-menu-item-active {
    background: var(--sp-brand-cyan-wash, #f0f8fc) !important;
    background-image: none !important;
    border-color: transparent !important;
    border-radius: 6px !important;
}
.x-menu:not(.header-menu) li.x-menu-item-active a.x-menu-item,
.x-menu.x-menu-floating:not(.header-menu) li.x-menu-item-active a.x-menu-item {
    color: var(--sp-brand-cyan-muted, var(--acs-brand-cyan-muted, #0e8bb0)) !important;
    background: transparent !important;
}
.x-menu:not(.header-menu) .x-menu-sep-li,
.x-menu.x-menu-floating:not(.header-menu) .x-menu-sep-li {
    margin: 4px 8px !important;
    padding: 0 !important;
    background: transparent !important;
}
.x-menu:not(.header-menu) .x-menu-sep,
.x-menu.x-menu-floating:not(.header-menu) .x-menu-sep {
    border-top: 1px solid var(--acs-border-light, #e2e6ec) !important;
    /* azzurra adds a dark bottom border under the separator line. */
    border-bottom: 0 !important;
    background: none !important;
    height: 0 !important;
}

/* Menu item icons — base geometry. Per-icon mask-image rules below paint
   sort-asc / sort-desc / columns; other items keep their ExtJS default
   look (visually empty if no migration). */
.x-menu .x-menu-item-icon,
.x-menu.x-menu-floating .x-menu-item-icon,
.x-menu.x-menu-floating img.x-menu-item-icon {
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-position: center center !important;
            mask-position: center center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}
.x-menu .xg-hmenu-sort-asc img.x-menu-item-icon,
.x-menu.x-menu-floating .xg-hmenu-sort-asc img.x-menu-item-icon,
.x-menu .xg-hmenu-sort-desc img.x-menu-item-icon,
.x-menu.x-menu-floating .xg-hmenu-sort-desc img.x-menu-item-icon,
.x-menu .x-cols-icon img.x-menu-item-icon,
.x-menu.x-menu-floating .x-cols-icon img.x-menu-item-icon,
.x-menu li.x-menu-list-item a.x-menu-item .x-menu-item-icon[class*="x-cols"] {
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}
.x-menu .xg-hmenu-sort-asc img.x-menu-item-icon,
.x-menu.x-menu-floating .xg-hmenu-sort-asc img.x-menu-item-icon {
    -webkit-mask-image: var(--icon-sort-asc) !important;
            mask-image: var(--icon-sort-asc) !important;
}
.x-menu .xg-hmenu-sort-desc img.x-menu-item-icon,
.x-menu.x-menu-floating .xg-hmenu-sort-desc img.x-menu-item-icon {
    -webkit-mask-image: var(--icon-sort-desc) !important;
            mask-image: var(--icon-sort-desc) !important;
}
.x-menu .x-cols-icon img.x-menu-item-icon,
.x-menu li.x-menu-list-item a.x-menu-item .x-menu-item-icon[class*="x-cols"] {
    -webkit-mask-image: var(--icon-columns) !important;
            mask-image: var(--icon-columns) !important;
}

/* Layout menu (#mainMenu) iconCls glyphs — `icon-save`, `icon-rotate-ccw`.
   ExtJS renders these as <img class="x-menu-item-icon icon-save">, and the
   img's PNG src is `blank_image_url.gif`. The `content: url("transparent
   1x1 svg")` swap replaces the img's rendered content so the bg-color +
   mask-image paint reliably; without it the GIF placeholder shows through. */
.x-menu img.x-menu-item-icon.icon-save,
.x-menu.x-menu-floating img.x-menu-item-icon.icon-save,
.x-menu img.x-menu-item-icon.icon-rotate-ccw,
.x-menu.x-menu-floating img.x-menu-item-icon.icon-rotate-ccw {
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3C/svg%3E") !important;
    font-size: 0 !important;
    color: transparent !important;
    object-fit: cover !important;
    transition: background-color 0.15s !important;
}
.x-menu img.x-menu-item-icon.icon-save,
.x-menu.x-menu-floating img.x-menu-item-icon.icon-save {
    -webkit-mask-image: var(--icon-save) !important;
            mask-image: var(--icon-save) !important;
}
.x-menu img.x-menu-item-icon.icon-rotate-ccw,
.x-menu.x-menu-floating img.x-menu-item-icon.icon-rotate-ccw {
    -webkit-mask-image: var(--icon-rotate-ccw) !important;
            mask-image: var(--icon-rotate-ccw) !important;
}
.x-menu .x-menu-item-active > a > .x-menu-item-icon.icon-save,
.x-menu .x-menu-item-active > a > .x-menu-item-icon.icon-rotate-ccw {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Definition popup right-click menu: theme icons, scoped to this menu. */
.x-menu.definition-popup-menu img.x-menu-item-icon {
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3C/svg%3E") !important;
    font-size: 0 !important;
    color: transparent !important;
    object-fit: cover !important;
    transition: background-color 0.15s !important;
}
.x-menu.definition-popup-menu img.x-menu-item-icon.copy_white {
    -webkit-mask-image: var(--icon-copy) !important;
            mask-image: var(--icon-copy) !important;
}
.x-menu.definition-popup-menu img.x-menu-item-icon.back {
    -webkit-mask-image: var(--icon-chevron-left) !important;
            mask-image: var(--icon-chevron-left) !important;
}
.x-menu.definition-popup-menu img.x-menu-item-icon.forward {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
}
.x-menu.definition-popup-menu img.x-menu-item-icon.close {
    -webkit-mask-image: var(--icon-x) !important;
            mask-image: var(--icon-x) !important;
}
.x-menu.definition-popup-menu img.x-menu-item-icon.close_all {
    -webkit-mask-image: var(--icon-x-circle) !important;
            mask-image: var(--icon-x-circle) !important;
}
.x-menu.definition-popup-menu .x-menu-item-active > a > .x-menu-item-icon {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Submenu indicator (`x-menu-item-arrow`) — paint a chevron-right SVG at
   the right edge of any menu item that opens a submenu. Replaces the
   legacy `menu-parent.gif`. Theme-wide so every menu in the app benefits;
   `.header-menu` keeps its own dark styling via ext-acs-header.css. */
.x-menu:not(.header-menu) a.x-menu-item-arrow,
.x-menu.x-menu-floating:not(.header-menu) a.x-menu-item-arrow {
    position: relative !important;
    padding-right: 24px !important;
    background-image: none !important;
}
/* The arrow's room. It must outweigh the general menu item padding (its hover variant
   above, and the copy in ext-acs-startpage.css), or the arrow lands on the end of the
   text when the item is the widest in its menu. */
.x-menu:not(.header-menu) li.x-menu-list-item a.x-menu-item.x-menu-item-arrow,
.x-menu.x-menu-floating:not(.header-menu) li.x-menu-list-item a.x-menu-item.x-menu-item-arrow {
    padding-right: 24px !important;
}
.x-menu:not(.header-menu) a.x-menu-item-arrow::after,
.x-menu.x-menu-floating:not(.header-menu) a.x-menu-item-arrow::after {
    content: '' !important;
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 12px !important;
    height: 12px !important;
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
    pointer-events: none !important;
}
.x-menu:not(.header-menu) li.x-menu-item-active > a.x-menu-item-arrow::after {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ============================================================================
   Toolbar-button chrome — shell-wide (hover + pressed + menu-active)
   ============================================================================
   Every `Ext.Button` configured with a `menu:` renders as
   `<table class="x-btn ..."><em class="x-btn-arrow"><button class="x-btn-text">`.
   On hover the wrap gets `.x-btn-over`; on menu-open it gets `.x-btn-menu-active`
   (split-button latched state also adds `.x-btn-pressed`).

   This block replaces per-page redeclarations that previously lived in
   ext-acs-startpage.css (bookshelf), ext-acs-taskreport.css (tasks page),
   ext-acs-book.css (book viewer) and ext-acs-notes-widgets.css (notes).
   The legacy per-page hover rules painted `background-color` on the `.x-btn`
   `<table>` wrap — which does not paint visibly. The shell-wide rule paints
   on `td.x-btn-mc` (the same target the pressed/menu-active block uses) so
   the wash actually shows. See STYLING_PATTERNS §1.8 (anti-pattern note).

   Scope: any `.x-toolbar`, `.acs_toolbar`, `.x-panel-tbar`, or `.x-panel-bbar`
   that is NOT the top nav (`.acs_top_menu` / `#acs_top_menu_div`). Top-nav
   menu buttons have their own dark-chrome treatment. The wider scope (vs.
   the previous toolbar-only block) covers pagination bars and per-tab tbars
   in the book viewer too.

   Pattern decisions (canonical = book-viewer):
     - Wash painted on `td.x-btn-mc` with `border-radius: 4px` so the active
       state appears as a rounded pill inside the wrap (not a full-wrap flat
       slab). Wrap stays transparent.
     - Caret painted via `em.x-btn-arrow::after` (12×12 chevron-down, absolute
       right:0, padding-right:14px on the em). Both `::after` and the
       legacy GIF bg-image on the em are suppressed.
     - Sliders glyph for `.x-btn-noicon` Layout buttons via `::before` on the
       inner button.x-btn-text (16×16, mask-image: var(--icon-sliders)). Real
       iconCls buttons (e.g. Export-to-Excel) are excluded.
     - Text + caret + sliders all flip to `--acs-brand-cyan` at weight 500
       across hover / pressed / menu-active — no visual jump between states.
     - Azzurra-legacy's `box-shadow: inset 0 -2px 0 #00aeef` (the "rounded
       blue shadow" bug on the bookshelf) is suppressed.

   Specificity beats `.acs-new-theme .x-btn:not(.reset-btn)` (3 classes) and
   `.x-toolbar.x-toolbar.x-toolbar.x-toolbar .x-btn` (4 toolbar repeats) via
   the `.acs-new-theme` prefix combined with the chained `.x-btn` state class
   and `!important`. See STYLING_PATTERNS §3 (azzurra specificity) and §11
   (icon consumption patterns).
   ============================================================================ */

/* --- Hover wash on the middle cell ------------------------------------------
   Flat `#F6F8FB` wash painted on `td.x-btn-mc` (NOT on the `.x-btn` table —
   per STYLING_PATTERNS §12.1 + the `<table class="x-btn">` gotcha noted in
   ext-acs-book.css:837 and MEMORY:feedback_extjs_inline_styles.md,
   `background-color` set on the table wrap does not paint visibly in this
   widget's rendered box).

   Surface scope is widened beyond the pressed block to cover `.x-panel-tbar`
   and `.x-panel-bbar` too — pagination bars (`.x-tbar-page-*`) and per-tab
   tbars (book viewer Contents/Notes/Tasks/Tracks `cmd_*` buttons) all live
   in those, and previously fell through to the legacy azzurra/anti-pattern
   hover. `:not(.x-btn-icon)` is dropped on the hover wash so pagination
   chevrons and icon-only tab commands get the wash too. Pressed retains
   `:not(.x-btn-icon)` since icon-only buttons rarely latch.

   Wrap stays transparent so the radius is not clipped. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons).x-btn-over td.x-btn-mc {
    background: #F6F8FB !important;
    background-color: #F6F8FB !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons).x-btn-over {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* --- Button text colour on hover --------------------------------------------
   Hover labels flip to brand-cyan at weight 500. Same colour as pressed/
   menu-active — no visual jump between hover and click. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons):not(.x-btn-icon).x-btn-over button.x-btn-text {
    color: var(--acs-brand-cyan, #00aeef) !important;
    font-weight: 500 !important;
}

/* --- Pressed / menu-active wash on the middle cell --------------------------
   Rounded pill (4px radius) painted on `td.x-btn-mc` with the deeper #EEF6FB
   wash. Wrap stays transparent so the radius isn't clipped. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons):not(.x-btn-icon).x-btn-pressed td.x-btn-mc,
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons):not(.x-btn-icon).x-btn-menu-active td.x-btn-mc {
    background: #EEF6FB !important;
    background-color: #EEF6FB !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}
/* Suppress wrap-level wash + the azzurra-legacy inset cyan stripe (the
   "rounded blue shadow" bug from ext-acs-startpage.css:3565-3569). Keep
   the wrap transparent so only the mc cell paints the rounded wash. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons):not(.x-btn-icon).x-btn-pressed,
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons):not(.x-btn-icon).x-btn-menu-active {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* --- Button text colour + weight (pressed/menu-active only) -----------------
   Pressed/menu-active labels stay at brand cyan + weight 500 — same as
   hover. No visual "jump" to bold/darker teal on click. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons):not(.x-btn-icon).x-btn-pressed button.x-btn-text,
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn:not(.toggleButtons):not(.x-btn-icon).x-btn-menu-active button.x-btn-text {
    color: var(--acs-brand-cyan, #00aeef) !important;
    font-weight: 500 !important;
}

/* --- Dropdown caret on em.x-btn-arrow ---------------------------------------
   Suppress the legacy GIF, anchor an SVG chevron-down 12×12 absolute at the
   em's right edge. Pull the inner button's right padding to 0 so the caret
   sits tight against the label. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn em.x-btn-arrow {
    background-image: none !important;
    padding-right: 14px !important;
    position: relative !important;
}
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn em.x-btn-arrow::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    width: 12px !important;
    height: 12px !important;
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
    -webkit-mask-size: 12px 12px !important;
            mask-size: 12px 12px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
    pointer-events: none !important;
}
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn em.x-btn-arrow button.x-btn-text {
    padding-right: 0 !important;
}
/* Suppress the bookshelf `::before` chevron from ext-acs-startpage.css so we
   don't double-paint two carets. The shell rule above paints `::after`. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn em.x-btn-arrow::before {
    content: none !important;
}
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn.x-btn-over em.x-btn-arrow::after,
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn.x-btn-pressed em.x-btn-arrow::after,
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn.x-btn-menu-active em.x-btn-arrow::after {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* --- Layout-button sliders icon (.x-btn-noicon only) ------------------------
   The `acs_preference.PreferencesToolbarButton` widget renders as
   text='Layout' with no iconCls inside `.x-btn.x-btn-noicon`. Paint a sliders
   glyph via `::before` on the inner text button. Scoped to `.x-btn-noicon`
   so menu buttons with a real iconCls (Export-to-Excel, etc.) are untouched. */
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn-noicon .x-btn-arrow button.x-btn-text::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-image: var(--icon-sliders) !important;
            mask-image: var(--icon-sliders) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn-noicon.x-btn-over .x-btn-arrow button.x-btn-text::before,
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn-noicon.x-btn-pressed .x-btn-arrow button.x-btn-text::before,
.acs-new-theme :not(#acs_top_menu_div):is(.x-toolbar, .acs_toolbar, .x-panel-tbar, .x-panel-bbar):not(.acs_top_menu) .x-btn-noicon.x-btn-menu-active .x-btn-arrow button.x-btn-text::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ============================================================================
   Pagination bbar — shell-wide canonical rules.

   Promoted from ext-acs-startpage.css (the bookshelf/search-results pages
   loaded these natively); previously redeclared verbatim under
   `body.tasks-page` in ext-acs-taskreport.css and `body.notes-page` in
   ext-acs-notes-widgets.css because startpage.css doesn't load on those
   pages. Lifted shell-wide so every paging bar in the app — including
   dialogs (Recurrence, Save-Search, etc.) — gets the same chrome without
   per-page mirror blocks.

   Already covered shell-wide above (L3366–3414) and intentionally NOT
   duplicated here:
     - `.x-panel-bbar .x-btn.x-btn-over` hover wash on td.x-btn-mc
     - `.x-panel-bbar .x-btn.x-btn-pressed/menu-active` pressed wash
     - `.x-panel-bbar .x-btn.x-btn-over button` text-color flip to brand-cyan

   What lives here:
     - `.x-tbar-page-number` page-number input chrome
     - `.x-tbar-page-first/prev/next/last` + `.x-tbar-loading` mask-image
       icons (chevrons + refresh) — these are .x-btn-icon buttons, so the
       text-color flip rule above doesn't reach them; explicit hover-fill
       rule below
     - `.x-panel-bbar .x-btn` base reset (border:none, transparent bg,
       radius:4px) — at-rest state needs this; the shell-wide hover wash
       only paints on hover/pressed
     - `.x-panel-bbar .x-btn .x-btn-tl..mr` chrome-cell suppression
     - `.x-panel-bbar` + `.x-panel-bbar .x-toolbar` container chrome
   ============================================================================ */

/* Page-number editable input — themed border, radius, padding.
   The input also carries .x-form-text, so its width is border-box: ExtJS's
   30px left room for only 3 digits. 48px fits 5. */
.x-tbar-page-number {
    width: 48px !important;
    text-align: center !important;
    border: 1px solid var(--acs-border-input, #dce2ef) !important;
    border-radius: 4px !important;
    padding: 2px 4px !important;
    font-size: 12px !important;
    color: var(--acs-text-primary, #1c2127) !important;
    background-color: #fff !important;
}

/* Pagination nav buttons — Phase 6 mask-image migration. Per-button
   rules below set mask-image; this base rule provides geometry + the
   text-secondary fill at rest. Hover swaps to brand-cyan further down.
   Selector list explicitly includes .x-item-disabled descendants so
   the disabled-state rules in azzurra-legacy.css
   (`.x-item-disabled .x-tbar-page-first { background-image: sprite.png !important }`,
   specificity 0,2,0) cannot reassert the legacy PNG sprite. */
.x-tbar-page-first,
.x-tbar-page-prev,
.x-tbar-page-next,
.x-tbar-page-last,
.x-item-disabled .x-tbar-page-first,
.x-item-disabled .x-tbar-page-prev,
.x-item-disabled .x-tbar-page-next,
.x-item-disabled .x-tbar-page-last {
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: opacity 0.15s, background-color 0.15s !important;
}

.x-tbar-page-first {
    -webkit-mask-image: var(--icon-chevrons-left) !important;
            mask-image: var(--icon-chevrons-left) !important;
}
.x-tbar-page-prev {
    -webkit-mask-image: var(--icon-chevron-left) !important;
            mask-image: var(--icon-chevron-left) !important;
}
.x-tbar-page-next {
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
}
.x-tbar-page-last {
    -webkit-mask-image: var(--icon-chevrons-right) !important;
            mask-image: var(--icon-chevrons-right) !important;
}

.x-tbar-page-first:hover,
.x-tbar-page-prev:hover,
.x-tbar-page-next:hover,
.x-tbar-page-last:hover {
    opacity: 1 !important;
}

/* Refresh/loading button — Phase 6 mask-image */
.x-tbar-loading {
    -webkit-mask-image: var(--icon-refresh) !important;
            mask-image: var(--icon-refresh) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}

/* Paging-nav hover — flip mask-fill from text-secondary to brand-cyan.
   The .x-btn-text color-flip rule at L3382 has :not(.x-btn-icon), so it
   doesn't reach these icon-only buttons; explicit rule needed. */
.x-panel-bbar .x-btn.x-btn-over .x-tbar-page-first,
.x-panel-bbar .x-btn.x-btn-over .x-tbar-page-prev,
.x-panel-bbar .x-btn.x-btn-over .x-tbar-page-next,
.x-panel-bbar .x-btn.x-btn-over .x-tbar-page-last,
.x-panel-bbar .x-btn.x-btn-over .x-tbar-loading {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Bbar .x-btn at-rest chrome reset — strip legacy 3D borders/gradients.
   The shell-wide hover wash (L3366) only paints on hover; at rest the
   button needs to be transparent + radius-4 so the wash appears rounded. */
.x-panel-bbar .x-btn {
    border: none !important;
    background: transparent !important;
    background-image: none !important;
    border-radius: 4px !important;
    transition: background-color 0.15s !important;
}

/* Icon-only bbar buttons (pagination + refresh) — 28×28 hit target with
   the 16×16 SVG mask centred. Overrides the legacy azzurra rule
   `.x-btn.x-btn-icon .x-btn-small .x-btn-text { width:16; height:16 }`
   that pins these to a cramped 16×16. Chained selector `.x-btn-text` +
   `!important` beats the legacy specificity (0,3,0).

   `display: block` (not flex) keeps the mask-image at its declared 16×16;
   flex would shrink it. Position relative anchors the mask centre. */
.x-panel-bbar button.x-btn-text.x-tbar-page-first,
.x-panel-bbar button.x-btn-text.x-tbar-page-prev,
.x-panel-bbar button.x-btn-text.x-tbar-page-next,
.x-panel-bbar button.x-btn-text.x-tbar-page-last,
.x-panel-bbar button.x-btn-text.x-tbar-loading {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    position: relative !important;
}

/* The 28×28 hit target needs vertical breathing room in the bbar wrap —
   give the inner em flex-centre alignment so the button sits centred. */
.x-panel-bbar .x-btn td.x-btn-mc em {
    height: auto !important;
    display: flex !important;
    align-items: center !important;
}
.x-panel-bbar .x-btn td.x-btn-mc em button.x-btn-text {
    line-height: 1.4 !important;
}

.x-panel-bbar .x-btn .x-btn-tl,
.x-panel-bbar .x-btn .x-btn-tc,
.x-panel-bbar .x-btn .x-btn-tr,
.x-panel-bbar .x-btn .x-btn-bl,
.x-panel-bbar .x-btn .x-btn-bc,
.x-panel-bbar .x-btn .x-btn-br,
.x-panel-bbar .x-btn .x-btn-ml,
.x-panel-bbar .x-btn .x-btn-mr {
    display: none !important;
}

.x-panel-bbar .x-btn .x-btn-mc {
    background-image: none !important;
    padding: 0 !important;
}

/* Bbar container — flat white, no border, 40px min-height so the 28×28
   nav buttons have ~6px breathing room above and below.

   Horizontal padding stays 0: ExtJS computes the inner `.x-toolbar` width
   by summing left + center + right cell widths without accounting for the
   bbar's padding, so any non-zero horizontal padding pushes the right cell
   past the bbar's right edge (with `overflow: hidden` set elsewhere by the
   ExtJS panel chrome, the "Results: N" / "Displaying X of Y" status text
   in `.x-toolbar-right` gets clipped). Vertical padding is fine. */
.x-panel-bbar {
    background-image: none !important;
    background-color: #fff !important;
    border: none !important;
    border-width: 0 !important;
    padding: 4px 0 !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
}

.x-panel-bbar .x-toolbar {
    border: none !important;
    border-width: 0 !important;
    background-image: none !important;
    background-color: #fff !important;
}

/* ============================================================================
   Grid column-header dropdown menu — filter / search / filters-parent /
   columns-submenu checkbox theming.

   Promoted shell-wide from the per-page redeclarations that previously
   lived in:
     - ext-acs-taskreport.css  (body.tasks-page  .x-menu …)
     - ext-acs-startpage.css   (.x-menu … — loaded only on bookshelf)
     - ext-acs-book.css        (body.book-viewer .x-menu …)
   ExtJS portal-renders the column-header menu to <body>, so dialog- or
   page-scoped selectors don't reach it on the book-viewer Documents dialog.
   Anchoring on `.acs-new-theme .x-menu` (body always carries `acs-new-theme`)
   covers every grid in the app without a body-class gate per page.

   The sort-asc / sort-desc / x-cols-icon / chevron-right submenu indicator
   are already covered by the .x-menu cluster above (L3066-3284). The rules
   below add the remaining glyphs and the columns-submenu checkbox styling.
   ============================================================================ */

/* Filter glyph — column-header "Filters" parent menu item submenu icon
   (StringFilter, NumericFilter, DateFilter list items). The iconCls is set
   directly on the <img>, so target img.x-menu-item-icon.ux-gridfilter-icon
   plus the legacy `.ux-gridfilter-icon img` nesting some grids emit. */
.acs-new-theme .x-menu img.x-menu-item-icon.ux-gridfilter-icon,
.acs-new-theme .x-menu .ux-gridfilter-icon img.x-menu-item-icon,
.acs-new-theme .x-menu .x-menu-list-item .ux-gridfilter-icon img.x-menu-item-icon {
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    -webkit-mask-image: var(--icon-filter) !important;
            mask-image: var(--icon-filter) !important;
}

/* Search glyph — magnifying glass on the filter submenu's text input. */
.acs-new-theme .x-menu img.x-menu-item-icon.ux-gridfilter-text-icon {
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    -webkit-mask-image: var(--icon-search) !important;
            mask-image: var(--icon-search) !important;
}

/* "Filters" parent menu item — ExtJS doesn't put an iconCls on this item,
   so its icon slot inherits the legacy menu-checkbox sprite. Override that
   slot with a filter glyph. The base-icon-geometry rule at L3179 already
   sets width/height/mask-size; the border resets cancel the columns-checkbox
   styling that follows so the glyph paints flush against the menu bg. */
.acs-new-theme .x-menu .x-menu-check-item.x-menu-item-arrow img.x-menu-item-icon {
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    -webkit-mask-image: var(--icon-filter) !important;
            mask-image: var(--icon-filter) !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Columns submenu — column-visibility checkboxes (.x-menu-check-item).
   These <img.x-menu-item-icon> elements have no iconCls and the legacy
   PNG sprite paints the checkbox bg. Override to the themed checkbox
   styling (matches the search accordion checkbox).

   :not(…) chain excludes:
     - .x-menu-item-arrow (the "Filters" parent — gets the filter glyph above)
     - items whose iconCls already supplies a glyph (sort buttons, Layout
       menu save/reset icons, etc.)
   so this rule is purely the catch-all for blank-iconCls check items. */
.acs-new-theme .x-menu .x-menu-check-item:not(.x-menu-item-arrow) img.x-menu-item-icon:not(.xg-hmenu-sort-asc):not(.xg-hmenu-sort-desc):not(.x-cols-icon):not(.ux-gridfilter-icon):not(.ux-gridfilter-text-icon):not(.icon-save):not(.icon-rotate-ccw):not(.sort_acs_btn):not(.sort_desc_btn):not(.sort_orig_btn) {
    background-image: none !important;
    width: 16px !important;
    height: 16px !important;
    background-color: #F6F8FB !important;
    border: 1px solid #DCE2EF !important;
    border-radius: 4px !important;
    margin-right: 6px !important;
    -webkit-mask-image: none !important;
            mask-image: none !important;
}

/* Hover — cyan border on the columns-submenu checkbox */
.acs-new-theme .x-menu .x-menu-item-active .x-menu-check-item:not(.x-menu-item-arrow) img.x-menu-item-icon:not(.xg-hmenu-sort-asc):not(.xg-hmenu-sort-desc):not(.x-cols-icon):not(.ux-gridfilter-icon):not(.ux-gridfilter-text-icon):not(.icon-save):not(.icon-rotate-ccw):not(.sort_acs_btn):not(.sort_desc_btn):not(.sort_orig_btn),
.acs-new-theme .x-menu li.x-menu-list-item:hover .x-menu-check-item:not(.x-menu-item-arrow) img.x-menu-item-icon:not(.xg-hmenu-sort-asc):not(.xg-hmenu-sort-desc):not(.x-cols-icon):not(.ux-gridfilter-icon):not(.ux-gridfilter-text-icon):not(.icon-save):not(.icon-rotate-ccw):not(.sort_acs_btn):not(.sort_desc_btn):not(.sort_orig_btn) {
    border-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Checked — cyan fill + white ✓ SVG. The :not(.x-menu-item-arrow) in the
   selector matches the base rule's specificity so the active state actually
   wins (without it, the base rule's #F6F8FB bg would tie on class count). */
.acs-new-theme .x-menu .x-menu-item-checked:not(.x-menu-item-arrow) img.x-menu-item-icon:not(.xg-hmenu-sort-asc):not(.xg-hmenu-sort-desc):not(.x-cols-icon):not(.ux-gridfilter-icon):not(.ux-gridfilter-text-icon):not(.icon-save):not(.icon-rotate-ccw):not(.sort_acs_btn):not(.sort_desc_btn):not(.sort_orig_btn) {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
    border-color: var(--acs-brand-cyan, #00aeef) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
    background-size: 12px 12px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Hover — flip every iconCls-driven glyph to brand-cyan. Covers sort/columns/
   filter/search images plus the Filters-parent's filter glyph. */
.acs-new-theme .x-menu .x-menu-item-active img.x-menu-item-icon.xg-hmenu-sort-asc,
.acs-new-theme .x-menu .x-menu-item-active img.x-menu-item-icon.xg-hmenu-sort-desc,
.acs-new-theme .x-menu .x-menu-item-active img.x-menu-item-icon.x-cols-icon,
.acs-new-theme .x-menu .x-menu-item-active img.x-menu-item-icon.ux-gridfilter-icon,
.acs-new-theme .x-menu .x-menu-item-active img.x-menu-item-icon.ux-gridfilter-text-icon,
.acs-new-theme .x-menu .x-menu-item-active .xg-hmenu-sort-asc img.x-menu-item-icon,
.acs-new-theme .x-menu .x-menu-item-active .xg-hmenu-sort-desc img.x-menu-item-icon,
.acs-new-theme .x-menu .x-menu-item-active .x-cols-icon img.x-menu-item-icon,
.acs-new-theme .x-menu .x-menu-item-active .ux-gridfilter-icon img.x-menu-item-icon,
.acs-new-theme .x-menu li.x-menu-item-active > a.x-menu-check-item.x-menu-item-arrow img.x-menu-item-icon {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* My Profile dialog styles → ext-acs-header.css
   Change Password dialog styles → ext-acs-user-sec.css */

/* =============================================================================
   Global grid controls — apply everywhere (not just startpage)
   ============================================================================= */

/* Row expander chevron — replaces legacy GIF sprite with SVG mask icon.
   Collapsed = chevron-right, expanded = chevron-down, hover = brand cyan. */
.x-grid3-row-expander,
.x-grid3-row-collapsed .x-grid3-row-expander {
    cursor: pointer !important;
    -webkit-mask-image: var(--icon-chevron-right) !important;
            mask-image: var(--icon-chevron-right) !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 14px 14px !important;
            mask-size: 14px 14px !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    opacity: 0.6 !important;
    transition: opacity 0.15s, background-color 0.15s !important;
}

.x-grid3-row-expanded .x-grid3-row-expander {
    -webkit-mask-image: var(--icon-chevron-down) !important;
            mask-image: var(--icon-chevron-down) !important;
}

.x-grid3-row:hover .x-grid3-row-expander,
.x-grid3-row-collapsed:hover .x-grid3-row-expander,
.x-grid3-row-expanded:hover .x-grid3-row-expander {
    opacity: 1 !important;
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Clear Filters icon — non-toolbar icon element (the .x-btn-text span carries
   the background-image in toolbar contexts; the standalone icon is the div). */
.clear_grid_filters:not(.x-btn-text) {
    -webkit-mask-image: var(--icon-filter-x) !important;
            mask-image: var(--icon-filter-x) !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    transition: background-color 0.15s !important;
}

.x-btn-over .clear_grid_filters:not(.x-btn-text),
.clear_grid_filters:not(.x-btn-text):hover {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* Clear Filters toolbar button — ::before pseudo carries the icon so it
   sits inline with the button text label. */
.x-toolbar button.clear_grid_filters {
    background-image: none !important;
}

.x-toolbar button.clear_grid_filters::before {
    content: '' !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
    vertical-align: -3px !important;
    -webkit-mask-image: var(--icon-filter-x) !important;
            mask-image: var(--icon-filter-x) !important;
    -webkit-mask-size: 16px 16px !important;
            mask-size: 16px 16px !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
}

.x-toolbar .x-btn.x-btn-over button.clear_grid_filters::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

/* ============================================================================
   Toolbar overflow `»` button — installed by acs.toolbar.installOverflow
   ============================================================================
   The helper appends a single `.acs-toolbar-more-btn` after the last toolbar
   cell when the row overflows. The button carries no text — just the
   `more-horizontal` glyph painted via `::before` mask-image (currentColor
   pattern, so the icon inherits hover/pressed text colour like every other
   toolbar button).

   Because the button has a `menu:` config, ExtJS wraps the inner `<button>`
   in `<em class="x-btn-arrow">`. The generic shell-wide rule for
   `.x-btn-noicon .x-btn-arrow ... ::before` (around line 3729) paints a
   sliders glyph (used for Layout / Sort menu buttons) and uses
   `:not(#acs_top_menu_div)` to gate out the top-nav, which contributes an
   ID to its specificity. We mirror that `:not(#…)` trick here to match the
   ID weight, then stack `.acs-toolbar-more-btn` twice in the hover/menu-
   active selectors to win on class count too. Duplicate class names ARE
   counted by the spec (verified in Chrome) — the repetition is intentional.

   Geometry: the inner button is sized 32×28 to match the regular toolbar
   button height. Without the explicit `height: 28px`, the button collapses
   to its content (the absolute-positioned ::before glyph) and renders only
   ~16px tall — vertically centered but visually undersized vs neighbours.
   ============================================================================ */
.acs-new-theme :not(#acs_top_menu_div) .x-toolbar .x-btn.acs-toolbar-more-btn .x-btn-arrow button.x-btn-text {
    position: relative;
    /* Match reference toolbar buttons' 12px horizontal padding so the hover
       wash gives the same breathing room around the icon. */
    padding: 0 12px !important;
    min-width: 32px !important;
    width: 32px !important;
    height: 28px !important;
    line-height: 28px !important;
    color: transparent !important;     /* button has no text — hide any inherited label */
    background-image: none !important; /* suppress the generic sliders ::before bg */
}
/* Also raise the `<em class="x-btn-arrow">` wrapper to 28px so its child
   button can reach full height (em is inline by default and collapses to
   line-box, which clips the button). Zero `padding-right` — ExtJS sets it
   to 14px to reserve room for the chevron caret, but we hide that caret
   above, so the padding-right just leaves dead space to the right of the
   icon (offsetting it left of the cell midline). */
.acs-new-theme :not(#acs_top_menu_div) .x-toolbar .x-btn.acs-toolbar-more-btn em.x-btn-arrow {
    display: inline-block !important;
    height: 28px !important;
    line-height: 28px !important;
    vertical-align: middle !important;
    padding-right: 0 !important;
}
.acs-new-theme :not(#acs_top_menu_div) .x-toolbar .x-btn.acs-toolbar-more-btn .x-btn-arrow button.x-btn-text::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    vertical-align: baseline !important;
    display: block !important;
    -webkit-mask-image: var(--icon-more-horizontal) !important;
            mask-image: var(--icon-more-horizontal) !important;
    -webkit-mask-size: 18px 18px !important;
            mask-size: 18px 18px !important;
    -webkit-mask-position: center !important;
            mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
            mask-repeat: no-repeat !important;
    background-image: none !important;
    background-color: var(--acs-text-secondary, #5a6370) !important;
    pointer-events: none;
    transition: background-color 0.15s !important;
}
/* The same rule family also paints a chevron caret via `em.x-btn-arrow::after`
   — kill that on the more-button since the glyph already conveys "menu". */
.acs-new-theme :not(#acs_top_menu_div) .x-toolbar .x-btn.acs-toolbar-more-btn .x-btn-arrow::after {
    display: none !important;
}
/* Hover / menu-active icon flip. Needs to reach the same (1,6,2) specificity
   as the generic toolbar-menu-button hover rule above (~line 3748), then
   one extra class to win. We stack `.acs-toolbar-more-btn` twice to
   bump class count past the generic. */
.acs-new-theme :not(#acs_top_menu_div) .x-toolbar .x-btn.acs-toolbar-more-btn.acs-toolbar-more-btn.x-btn-over .x-btn-arrow button.x-btn-text::before,
.acs-new-theme :not(#acs_top_menu_div) .x-toolbar .x-btn.acs-toolbar-more-btn.acs-toolbar-more-btn.x-btn-menu-active .x-btn-arrow button.x-btn-text::before {
    background-color: var(--acs-brand-cyan, #00aeef) !important;
}

