/* liquid-glass.css — ATCX canonical Liquid Glass design system (material engine). THE sole owner of shared material:
   surface fill/translucency · backdrop blur+saturation · optical edges (four straight hairline segments that stop before the corners; no perimeter rim) · material shadows/elevation ·
   material corner radii · material interaction states · the page canvas the glass sits on · accessibility fallbacks.
   Other stylesheets keep layout, structural geometry, typography, functional positioning and semantic colours; they must not repaint these surfaces.
   Reference: .claude/rules/atcx-liquid-glass.md §2 (numbers), the six owner-supplied macOS references, docs/ATCX_LIQUID_GLASS_TOKEN_CONTRACT.md.
   HOW IT WORKS
   - Every rule below is written with :where(): ZERO added specificity. A component stylesheet that deliberately keeps a variant (tabs, flat icon buttons, status colours) overrides the base by the
     normal cascade; Studio output (loaded last) overrides the tokens. There are no id tricks, no !important and no layers in this file.
   - Studio contract: Glass Studio writes the --ag-* role tokens (tint / opacity / blur per role, shadow, reflection, radius presets). They are the INPUTS; this file defines their defaults (the owner baseline)
     and derives the --lg-* tokens from them, so every stored Studio setting keeps its documented meaning. Branding Studio radii arrive as --lg-r-user-* tokens (see visual.py).
   - Surface roles (tools/css/surface_registry.json): bar · widget · register · overlay · popover · field · control (+icon/flat) · primary. One floating widget = one glass surface; content inside is flat. */

/* 1. SCOPE + OWNER BASELINE (Light). Defaults only: Studio emits a value only when the owner changed it. */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) {
  --ag-bg: #eef0f3; --ag-tint: #ffffff; --ag-sh-rgb: 0 0 0;
  --ag-op-base: 48%; --ag-off-shell: 0%; --ag-off-overlay: 22%; --ag-off-field: 22%; --ag-off-table: 14%; --ag-off-button: 2%; --ag-off-hero: 4%;
  --ag-blur-shell: 30px; --ag-blur-card: 30px; --ag-blur-dialog: 30px; --ag-blur-dense: 4px;
  --ag-r-card: 24px; --ag-r-dialog: 26px; --ag-r-inner: 18px; --ag-r-control: 8px; --ag-r-small: 6px;
  --ag-sh-k: 1; --ag-refl: .55; --ag-btn-k: 1;
  --ag-app-backdrop: linear-gradient(115deg, transparent 36%, rgb(255 255 255 / .9) 47%, transparent 58%), radial-gradient(620px 420px at 94% 0%, rgb(255 140 60 / .12), transparent 70%), linear-gradient(160deg, #fcfcfd, #e8eaee 55%, #f3f3f6);      /* a soft sheen and one warm glow so the glass has something to refract */
  --lg-hl-a: .90; --lg-hl-b-a: .90; --lg-contour-rgb: 0 0 0; --lg-contour-a: .24; --lg-counter-a: .15; --lg-rim-ink: 255 255 255; --lg-side-ink: 0 0 0; --lg-field-line: rgb(0 0 0 / .14);
  --lg-dlg-form: min(clamp(520px, 40vw, 720px), calc(100vw - 32px)); --lg-dlg-md: min(clamp(720px, 54vw, 960px), calc(100vw - 32px)); --lg-dlg-lg: min(clamp(960px, 72vw, 1440px), calc(100vw - 32px));      /* dialogs grow with the screen (form / medium / large) and become sheets on phones */
  --lg-select-room: 40px;      /* room a select keeps on the right for its chevron: every stylesheet that sets select padding uses it, so the chevron never paints over the text */
  --lg-pad: 24px; --lg-r-item: 10px;      /* ONE content padding for every card/dialog and ONE radius for hover/selected rows inside menus and lists */
  --lg-h-compact: 32px; --lg-h-control: 40px; --lg-h-large: 48px;      /* ONE control-height scale for buttons (touch screens get larger targets below) */
  --lg-sh-bar: .16; --lg-sh-widget: .20;      /* discreet elevation: the surfaces float slightly */
  --lg-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;      /* ONE global font token (Studio typography sets it) */
  --lg-ink: 11 20 34; --lg-muted: rgb(11 20 34 / .76); --lg-hair: rgb(11 20 34 / .10);
}
/* Dark baseline */
:root[data-theme=dark] :where(.operator-app[data-ui=refined], body[data-ui=premium]) {
  --ag-bg: #121316; --ag-tint: #2d2d2d; --ag-op-base: 45%; --ag-off-shell: 0%; --ag-off-field: 18%; --ag-off-table: 13%; --ag-off-button: -33%; --ag-off-hero: 6%; --ag-off-overlay: 21%;
  --ag-app-backdrop: linear-gradient(115deg, transparent 36%, rgb(255 255 255 / .06) 47%, transparent 58%), radial-gradient(560px 380px at 94% 0%, rgb(255 102 0 / .06), transparent 70%), linear-gradient(160deg, #0a0b0d, #141518 55%, #1d1f23);
  --lg-hl-a: .20; --lg-hl-b-a: .20; --lg-contour-rgb: 0 0 0; --lg-contour-a: .38; --lg-counter-a: .30; --lg-rim-ink: 255 255 255; --lg-side-ink: 0 0 0; --lg-field-line: rgb(255 255 255 / .16);
  --lg-sh-bar: .50; --lg-sh-widget: .55;
  --lg-ink: 238 241 244; --lg-muted: rgb(255 255 255 / .74); --lg-hair: rgb(255 255 255 / .12);
  --ag-tint-table: color-mix(in srgb, var(--ag-tint) 70%, #8d949c); --ag-tint-button: color-mix(in srgb, var(--ag-tint) 25%, #e6f1fc);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme=auto] :where(.operator-app[data-ui=refined], body[data-ui=premium]) {
    --ag-bg: #121316; --ag-tint: #2d2d2d; --ag-op-base: 45%; --ag-off-shell: 0%; --ag-off-field: 18%; --ag-off-table: 13%; --ag-off-button: -33%; --ag-off-hero: 6%; --ag-off-overlay: 21%;
    --ag-app-backdrop: linear-gradient(115deg, transparent 36%, rgb(255 255 255 / .06) 47%, transparent 58%), radial-gradient(560px 380px at 94% 0%, rgb(255 102 0 / .06), transparent 70%), linear-gradient(160deg, #0a0b0d, #141518 55%, #1d1f23);
    --lg-hl-a: .20; --lg-hl-b-a: .20; --lg-contour-rgb: 0 0 0; --lg-contour-a: .38; --lg-counter-a: .30; --lg-rim-ink: 255 255 255; --lg-side-ink: 0 0 0; --lg-field-line: rgb(255 255 255 / .16);
    --lg-sh-bar: .50; --lg-sh-widget: .55;
    --lg-ink: 238 241 244; --lg-muted: rgb(255 255 255 / .74); --lg-hair: rgb(255 255 255 / .12);
    --ag-tint-table: color-mix(in srgb, var(--ag-tint) 70%, #8d949c); --ag-tint-button: color-mix(in srgb, var(--ag-tint) 25%, #e6f1fc);
  }
}

/* 2. DERIVED ROLE TOKENS (Studio structure preserved: one base opacity + documented per-role offsets, clamped like glass.py ROLE_OFFSETS/OP_CLAMP; stored role values replace them). */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) {
  --ag-tint-header: var(--ag-tint); --ag-tint-sidebar: var(--ag-tint); --ag-tint-footer: var(--ag-tint); --ag-tint-card: var(--ag-tint); --ag-tint-field: var(--ag-tint); --ag-tint-table: var(--ag-tint); --ag-tint-dialog: var(--ag-tint); --ag-tint-button: var(--ag-tint);
  --ag-op-card: var(--ag-op-base);
  --ag-op-shell: clamp(20%, calc(var(--ag-op-base) + var(--ag-off-shell)), 92%);
  --ag-op-overlay: clamp(60%, calc(var(--ag-op-base) + var(--ag-off-overlay)), 100%);
  --ag-op-field: clamp(40%, calc(var(--ag-op-base) + var(--ag-off-field)), 95%);
  --ag-op-table: clamp(20%, calc(var(--ag-op-base) + var(--ag-off-table)), 96%);
  --ag-op-button: clamp(4%, calc(var(--ag-op-base) + var(--ag-off-button)), 92%);
  --ag-op-hero: clamp(20%, calc(var(--ag-op-base) + var(--ag-off-hero)), 92%);
  --ag-op-header: var(--ag-op-shell); --ag-op-sidebar: var(--ag-op-shell); --ag-op-footer: var(--ag-op-shell);
  --ag-blur-header: var(--ag-blur-shell); --ag-blur-sidebar: var(--ag-blur-shell); --ag-blur-footer: var(--ag-blur-shell);
  /* accessibility switch: 0 = glass, 1 = opaque and unblurred (set at :root by reduced-transparency, forced-colors, data-glass=off; Studio cannot override it) */
  --lg-op-header: calc(var(--ag-op-header) + (100% - var(--ag-op-header)) * var(--lg-opq, 0)); --lg-op-sidebar: calc(var(--ag-op-sidebar) + (100% - var(--ag-op-sidebar)) * var(--lg-opq, 0));
  --lg-op-footer: calc(var(--ag-op-footer) + (100% - var(--ag-op-footer)) * var(--lg-opq, 0)); --lg-op-card: calc(var(--ag-op-card) + (100% - var(--ag-op-card)) * var(--lg-opq, 0));
  --lg-op-table: calc(var(--ag-op-table) + (100% - var(--ag-op-table)) * var(--lg-opq, 0)); --lg-op-field: calc(var(--ag-op-field) + (100% - var(--ag-op-field)) * var(--lg-opq, 0));
  --lg-op-overlay: calc(var(--ag-op-overlay) + (100% - var(--ag-op-overlay)) * var(--lg-opq, 0)); --lg-op-button: calc(var(--ag-op-button) + (100% - var(--ag-op-button)) * var(--lg-opq, 0));
  --lg-op-hero: calc(var(--ag-op-hero) + (100% - var(--ag-op-hero)) * var(--lg-opq, 0));
  --lg-blur-bar: calc(var(--ag-blur-header) * (1 - var(--lg-opq, 0))); --lg-blur-card: calc(var(--ag-blur-card) * (1 - var(--lg-opq, 0))); --lg-blur-dialog: calc(var(--ag-blur-dialog) * (1 - var(--lg-opq, 0)));
  --lg-filter-bar: blur(var(--lg-blur-bar)) saturate(calc(100% + 100% * (1 - var(--lg-opq, 0)))); --lg-filter-card: blur(var(--lg-blur-card)) saturate(calc(100% + 100% * (1 - var(--lg-opq, 0))));
  --lg-filter-dialog: blur(var(--lg-blur-dialog)) saturate(calc(100% + 100% * (1 - var(--lg-opq, 0))));
  /* top-lit translucent fills: the mean of the gradient equals the role opacity (owner baseline) */
  --lg-fill-header: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-header) calc(var(--lg-op-header) + min(4%, 100% - var(--lg-op-header), var(--lg-op-header))), transparent), color-mix(in srgb, var(--ag-tint-header) calc(var(--lg-op-header) - min(4%, 100% - var(--lg-op-header), var(--lg-op-header))), transparent));
  --lg-fill-sidebar: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-sidebar) calc(var(--lg-op-sidebar) + min(4%, 100% - var(--lg-op-sidebar), var(--lg-op-sidebar))), transparent), color-mix(in srgb, var(--ag-tint-sidebar) calc(var(--lg-op-sidebar) - min(4%, 100% - var(--lg-op-sidebar), var(--lg-op-sidebar))), transparent));
  --lg-fill-footer: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-footer) calc(var(--lg-op-footer) + min(4%, 100% - var(--lg-op-footer), var(--lg-op-footer))), transparent), color-mix(in srgb, var(--ag-tint-footer) calc(var(--lg-op-footer) - min(4%, 100% - var(--lg-op-footer), var(--lg-op-footer))), transparent));
  --lg-fill-card: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-card) calc(var(--lg-op-card) + min(4%, 100% - var(--lg-op-card), var(--lg-op-card))), transparent), color-mix(in srgb, var(--ag-tint-card) calc(var(--lg-op-card) - min(4%, 100% - var(--lg-op-card), var(--lg-op-card))), transparent));
  --lg-fill-table: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-table) calc(var(--lg-op-table) + min(4%, 100% - var(--lg-op-table), var(--lg-op-table))), transparent), color-mix(in srgb, var(--ag-tint-table) calc(var(--lg-op-table) - min(4%, 100% - var(--lg-op-table), var(--lg-op-table))), transparent));
  --lg-fill-overlay: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-dialog) calc(var(--lg-op-overlay) + min(3%, 100% - var(--lg-op-overlay), var(--lg-op-overlay))), transparent), color-mix(in srgb, var(--ag-tint-dialog) calc(var(--lg-op-overlay) - min(3%, 100% - var(--lg-op-overlay), var(--lg-op-overlay))), transparent));
  --lg-fill-hero: linear-gradient(180deg, color-mix(in srgb, var(--hero-panel, #102029) calc(var(--lg-op-hero) + min(4%, 100% - var(--lg-op-hero), var(--lg-op-hero))), transparent), color-mix(in srgb, var(--hero-panel, #102029) calc(var(--lg-op-hero) - min(4%, 100% - var(--lg-op-hero), var(--lg-op-hero))), transparent));
  --lg-fill-field: color-mix(in srgb, var(--ag-tint-field) var(--lg-op-field), transparent);
  --lg-fill-control: color-mix(in srgb, var(--ag-tint-button) var(--lg-op-button), transparent);
  --lg-fill-control-hover: color-mix(in srgb, var(--ag-tint-button) calc(var(--lg-op-button) + min(14%, 100% - var(--lg-op-button), var(--lg-op-button))), transparent);
  --lg-fill-control-down: color-mix(in srgb, var(--ag-tint-button) calc(var(--lg-op-button) * .55), transparent);
  /* optical edge signature (owner references: Dock crops + ATCX_LIQUID_GLASS_EDGE_GEOMETRY): (A) a ~0.5px near-black contour following the whole rounded outline (outer ring, --lg-contour-ring);
     (B) a white hairline on the first interior pixel row at the top and, mirrored, at the bottom, fading over 7px starting where the curve begins to fall away (length = width - 2*(radius - 7px)). No white perimeter border, no inset ring. */
  --lg-rim-w: 1px;
  --lg-ring-k: .6; --lg-contour: rgb(var(--lg-contour-rgb) / calc(var(--lg-contour-a) * var(--lg-ring-k))); --lg-hl: rgb(var(--lg-rim-ink) / calc(var(--lg-hl-a) * var(--lg-ring-k) * var(--ag-refl) / .55)); --lg-hl-b: rgb(var(--lg-rim-ink) / calc(var(--lg-hl-b-a) * var(--lg-ring-k) * var(--ag-refl) / .55)); --lg-ring-w: 1px;
  --lg-ring-bar: linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(var(--lg-r-bar) * .1), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(var(--lg-r-bar) * .22), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(var(--lg-r-bar) * .4), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(var(--lg-r-bar) * .65), color-mix(in srgb, var(--lg-hl) 45%, transparent) var(--lg-r-bar), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(var(--lg-r-bar) + 8px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(var(--lg-r-bar) + 15px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(100% - calc(var(--lg-r-bar) + 15px)), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(100% - calc(var(--lg-r-bar) + 8px)), color-mix(in srgb, var(--lg-hl) 45%, transparent) calc(100% - var(--lg-r-bar)), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(100% - calc(var(--lg-r-bar) * .65)), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(100% - calc(var(--lg-r-bar) * .4)), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(100% - calc(var(--lg-r-bar) * .22)), color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(100% - calc(var(--lg-r-bar) * .1)), transparent 100%) 0 0 / 100% 50% no-repeat, linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(var(--lg-r-bar) * .1), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(var(--lg-r-bar) * .22), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(var(--lg-r-bar) * .4), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(var(--lg-r-bar) * .65), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) var(--lg-r-bar), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(var(--lg-r-bar) + 8px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(var(--lg-r-bar) + 15px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(100% - calc(var(--lg-r-bar) + 15px)), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(100% - calc(var(--lg-r-bar) + 8px)), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) calc(100% - var(--lg-r-bar)), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(100% - calc(var(--lg-r-bar) * .65)), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(100% - calc(var(--lg-r-bar) * .4)), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(100% - calc(var(--lg-r-bar) * .22)), color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(100% - calc(var(--lg-r-bar) * .1)), transparent 100%) 0 100% / 100% 50% no-repeat, linear-gradient(180deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-bar) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-bar) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-bar) * .8), var(--lg-contour) var(--lg-r-bar)) 0 0 / 100% 50% no-repeat, linear-gradient(0deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-bar) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-bar) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-bar) * .8), var(--lg-contour) var(--lg-r-bar)) 0 100% / 100% 50% no-repeat;
  --lg-ring-widget: linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(var(--lg-r-widget) * .1), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(var(--lg-r-widget) * .22), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(var(--lg-r-widget) * .4), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(var(--lg-r-widget) * .65), color-mix(in srgb, var(--lg-hl) 45%, transparent) var(--lg-r-widget), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(var(--lg-r-widget) + 8px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(var(--lg-r-widget) + 15px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(100% - calc(var(--lg-r-widget) + 15px)), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(100% - calc(var(--lg-r-widget) + 8px)), color-mix(in srgb, var(--lg-hl) 45%, transparent) calc(100% - var(--lg-r-widget)), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(100% - calc(var(--lg-r-widget) * .65)), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(100% - calc(var(--lg-r-widget) * .4)), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(100% - calc(var(--lg-r-widget) * .22)), color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(100% - calc(var(--lg-r-widget) * .1)), transparent 100%) 0 0 / 100% 50% no-repeat, linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(var(--lg-r-widget) * .1), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(var(--lg-r-widget) * .22), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(var(--lg-r-widget) * .4), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(var(--lg-r-widget) * .65), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) var(--lg-r-widget), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(var(--lg-r-widget) + 8px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(var(--lg-r-widget) + 15px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(100% - calc(var(--lg-r-widget) + 15px)), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(100% - calc(var(--lg-r-widget) + 8px)), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) calc(100% - var(--lg-r-widget)), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(100% - calc(var(--lg-r-widget) * .65)), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(100% - calc(var(--lg-r-widget) * .4)), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(100% - calc(var(--lg-r-widget) * .22)), color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(100% - calc(var(--lg-r-widget) * .1)), transparent 100%) 0 100% / 100% 50% no-repeat, linear-gradient(180deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-widget) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-widget) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-widget) * .8), var(--lg-contour) var(--lg-r-widget)) 0 0 / 100% 50% no-repeat, linear-gradient(0deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-widget) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-widget) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-widget) * .8), var(--lg-contour) var(--lg-r-widget)) 0 100% / 100% 50% no-repeat;
  --lg-ring-overlay: linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(var(--lg-r-overlay) * .1), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(var(--lg-r-overlay) * .22), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(var(--lg-r-overlay) * .4), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(var(--lg-r-overlay) * .65), color-mix(in srgb, var(--lg-hl) 45%, transparent) var(--lg-r-overlay), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(var(--lg-r-overlay) + 8px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(var(--lg-r-overlay) + 15px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(100% - calc(var(--lg-r-overlay) + 15px)), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(100% - calc(var(--lg-r-overlay) + 8px)), color-mix(in srgb, var(--lg-hl) 45%, transparent) calc(100% - var(--lg-r-overlay)), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(100% - calc(var(--lg-r-overlay) * .65)), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(100% - calc(var(--lg-r-overlay) * .4)), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(100% - calc(var(--lg-r-overlay) * .22)), color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(100% - calc(var(--lg-r-overlay) * .1)), transparent 100%) 0 0 / 100% 50% no-repeat, linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(var(--lg-r-overlay) * .1), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(var(--lg-r-overlay) * .22), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(var(--lg-r-overlay) * .4), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(var(--lg-r-overlay) * .65), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) var(--lg-r-overlay), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(var(--lg-r-overlay) + 8px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(var(--lg-r-overlay) + 15px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(100% - calc(var(--lg-r-overlay) + 15px)), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(100% - calc(var(--lg-r-overlay) + 8px)), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) calc(100% - var(--lg-r-overlay)), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(100% - calc(var(--lg-r-overlay) * .65)), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(100% - calc(var(--lg-r-overlay) * .4)), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(100% - calc(var(--lg-r-overlay) * .22)), color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(100% - calc(var(--lg-r-overlay) * .1)), transparent 100%) 0 100% / 100% 50% no-repeat, linear-gradient(180deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-overlay) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-overlay) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-overlay) * .8), var(--lg-contour) var(--lg-r-overlay)) 0 0 / 100% 50% no-repeat, linear-gradient(0deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-overlay) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-overlay) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-overlay) * .8), var(--lg-contour) var(--lg-r-overlay)) 0 100% / 100% 50% no-repeat;
  --lg-ring-popover: linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(var(--lg-r-popover) * .1), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(var(--lg-r-popover) * .22), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(var(--lg-r-popover) * .4), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(var(--lg-r-popover) * .65), color-mix(in srgb, var(--lg-hl) 45%, transparent) var(--lg-r-popover), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(var(--lg-r-popover) + 8px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(var(--lg-r-popover) + 15px), color-mix(in srgb, var(--lg-hl) 100%, transparent) calc(100% - calc(var(--lg-r-popover) + 15px)), color-mix(in srgb, var(--lg-hl) 70%, transparent) calc(100% - calc(var(--lg-r-popover) + 8px)), color-mix(in srgb, var(--lg-hl) 45%, transparent) calc(100% - var(--lg-r-popover)), color-mix(in srgb, var(--lg-hl) 32%, transparent) calc(100% - calc(var(--lg-r-popover) * .65)), color-mix(in srgb, var(--lg-hl) 20%, transparent) calc(100% - calc(var(--lg-r-popover) * .4)), color-mix(in srgb, var(--lg-hl) 10%, transparent) calc(100% - calc(var(--lg-r-popover) * .22)), color-mix(in srgb, var(--lg-hl) 4%, transparent) calc(100% - calc(var(--lg-r-popover) * .1)), transparent 100%) 0 0 / 100% 50% no-repeat, linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(var(--lg-r-popover) * .1), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(var(--lg-r-popover) * .22), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(var(--lg-r-popover) * .4), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(var(--lg-r-popover) * .65), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) var(--lg-r-popover), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(var(--lg-r-popover) + 8px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(var(--lg-r-popover) + 15px), color-mix(in srgb, var(--lg-hl-b) 100%, transparent) calc(100% - calc(var(--lg-r-popover) + 15px)), color-mix(in srgb, var(--lg-hl-b) 70%, transparent) calc(100% - calc(var(--lg-r-popover) + 8px)), color-mix(in srgb, var(--lg-hl-b) 45%, transparent) calc(100% - var(--lg-r-popover)), color-mix(in srgb, var(--lg-hl-b) 32%, transparent) calc(100% - calc(var(--lg-r-popover) * .65)), color-mix(in srgb, var(--lg-hl-b) 20%, transparent) calc(100% - calc(var(--lg-r-popover) * .4)), color-mix(in srgb, var(--lg-hl-b) 10%, transparent) calc(100% - calc(var(--lg-r-popover) * .22)), color-mix(in srgb, var(--lg-hl-b) 4%, transparent) calc(100% - calc(var(--lg-r-popover) * .1)), transparent 100%) 0 100% / 100% 50% no-repeat, linear-gradient(180deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-popover) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-popover) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-popover) * .8), var(--lg-contour) var(--lg-r-popover)) 0 0 / 100% 50% no-repeat, linear-gradient(0deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-popover) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-popover) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-popover) * .8), var(--lg-contour) var(--lg-r-popover)) 0 100% / 100% 50% no-repeat;
  --lg-ring-control: linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl) 2%, transparent) calc(var(--lg-r-control) * .1), color-mix(in srgb, var(--lg-hl) 6%, transparent) calc(var(--lg-r-control) * .22), color-mix(in srgb, var(--lg-hl) 12%, transparent) calc(var(--lg-r-control) * .4), color-mix(in srgb, var(--lg-hl) 19%, transparent) calc(var(--lg-r-control) * .65), color-mix(in srgb, var(--lg-hl) 27%, transparent) var(--lg-r-control), color-mix(in srgb, var(--lg-hl) 42%, transparent) calc(var(--lg-r-control) + 8px), color-mix(in srgb, var(--lg-hl) 60%, transparent) calc(var(--lg-r-control) + 15px), color-mix(in srgb, var(--lg-hl) 60%, transparent) calc(100% - calc(var(--lg-r-control) + 15px)), color-mix(in srgb, var(--lg-hl) 42%, transparent) calc(100% - calc(var(--lg-r-control) + 8px)), color-mix(in srgb, var(--lg-hl) 27%, transparent) calc(100% - var(--lg-r-control)), color-mix(in srgb, var(--lg-hl) 19%, transparent) calc(100% - calc(var(--lg-r-control) * .65)), color-mix(in srgb, var(--lg-hl) 12%, transparent) calc(100% - calc(var(--lg-r-control) * .4)), color-mix(in srgb, var(--lg-hl) 6%, transparent) calc(100% - calc(var(--lg-r-control) * .22)), color-mix(in srgb, var(--lg-hl) 2%, transparent) calc(100% - calc(var(--lg-r-control) * .1)), transparent 100%) 0 0 / 100% 50% no-repeat, linear-gradient(90deg, transparent 0px, color-mix(in srgb, var(--lg-hl-b) 2%, transparent) calc(var(--lg-r-control) * .1), color-mix(in srgb, var(--lg-hl-b) 6%, transparent) calc(var(--lg-r-control) * .22), color-mix(in srgb, var(--lg-hl-b) 12%, transparent) calc(var(--lg-r-control) * .4), color-mix(in srgb, var(--lg-hl-b) 19%, transparent) calc(var(--lg-r-control) * .65), color-mix(in srgb, var(--lg-hl-b) 27%, transparent) var(--lg-r-control), color-mix(in srgb, var(--lg-hl-b) 42%, transparent) calc(var(--lg-r-control) + 8px), color-mix(in srgb, var(--lg-hl-b) 60%, transparent) calc(var(--lg-r-control) + 15px), color-mix(in srgb, var(--lg-hl-b) 60%, transparent) calc(100% - calc(var(--lg-r-control) + 15px)), color-mix(in srgb, var(--lg-hl-b) 42%, transparent) calc(100% - calc(var(--lg-r-control) + 8px)), color-mix(in srgb, var(--lg-hl-b) 27%, transparent) calc(100% - var(--lg-r-control)), color-mix(in srgb, var(--lg-hl-b) 19%, transparent) calc(100% - calc(var(--lg-r-control) * .65)), color-mix(in srgb, var(--lg-hl-b) 12%, transparent) calc(100% - calc(var(--lg-r-control) * .4)), color-mix(in srgb, var(--lg-hl-b) 6%, transparent) calc(100% - calc(var(--lg-r-control) * .22)), color-mix(in srgb, var(--lg-hl-b) 2%, transparent) calc(100% - calc(var(--lg-r-control) * .1)), transparent 100%) 0 100% / 100% 50% no-repeat, linear-gradient(180deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-control) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-control) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-control) * .8), var(--lg-contour) var(--lg-r-control)) 0 0 / 100% 50% no-repeat, linear-gradient(0deg, transparent 0px, color-mix(in srgb, var(--lg-contour) 0%, transparent) calc(var(--lg-r-control) * .18), color-mix(in srgb, var(--lg-contour) 35%, transparent) calc(var(--lg-r-control) * .5), color-mix(in srgb, var(--lg-contour) 80%, transparent) calc(var(--lg-r-control) * .8), var(--lg-contour) var(--lg-r-control)) 0 100% / 100% 50% no-repeat;
  --lg-elev-bar: 0 .5px 0 rgb(var(--ag-sh-rgb) / var(--lg-counter-a)), 0 25px 50px rgb(var(--ag-sh-rgb) / calc(var(--lg-sh-bar) * var(--ag-sh-k)));
  --lg-elev-widget: 0 .5px 0 rgb(var(--ag-sh-rgb) / var(--lg-counter-a)), 0 18px 36px -10px rgb(var(--ag-sh-rgb) / calc(var(--lg-sh-widget) * var(--ag-sh-k))), 0 2px 4px rgb(var(--ag-sh-rgb) / calc(.07 * var(--ag-sh-k)));
  --lg-elev-widget-hover: 0 .5px 0 rgb(var(--ag-sh-rgb) / var(--lg-counter-a)), 0 24px 44px -10px rgb(var(--ag-sh-rgb) / calc(var(--lg-sh-widget) * var(--ag-sh-k) * 1.35)), 0 3px 6px rgb(var(--ag-sh-rgb) / calc(.1 * var(--ag-sh-k)));   /* interactive widget lifted by the pointer: same recipe, deeper */
  --lg-fill-inset: color-mix(in srgb, var(--text, #000) 4.5%, transparent);
  --lg-hair-nested: color-mix(in srgb, var(--text, #000) 10%, transparent);   /* separator of a section that sits INSIDE a glass widget (never a second glass skin) */
  --lg-elev-control: 0 .5px 0 rgb(var(--ag-sh-rgb) / calc(var(--lg-counter-a) * .8)), 0 1px 3px rgb(var(--ag-sh-rgb) / calc(.18 * var(--ag-btn-k)));
  --lg-st-hover: color-mix(in srgb, var(--text) 7%, transparent); --lg-st-select: color-mix(in srgb, var(--text) 11%, transparent);
  --lg-r-bar: var(--ag-r-dialog); --lg-r-widget: var(--lg-r-user-card, var(--ag-r-card)); --lg-r-overlay: var(--lg-r-user-modal, var(--ag-r-dialog)); --lg-r-popover: var(--ag-r-inner);
  --lg-r-control: var(--lg-r-user-button, var(--ag-r-control)); --lg-r-field: var(--lg-r-user-input, var(--ag-r-control)); --lg-r-segment: var(--lg-r-control); --lg-r-chip: var(--lg-r-control);
}
:root[data-theme=dark] :where(.operator-app[data-ui=refined], body[data-ui=premium]) { }

/* 2c. ELEMENT-LEVEL RE-RESOLUTION: the adaptive foreground (Studio) may raise a role's opacity or adjust its tint on the surface root itself (--ag-op-* / --ag-tint-* declared on that element).
   Custom properties resolve where they are declared, so the role's derived opacity and fill are declared again on exactly those roots (same definitions, no new values). */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-topbar, .public-header) { --lg-op-header: calc(var(--ag-op-header) + (100% - var(--ag-op-header)) * var(--lg-opq, 0)); --lg-fill-header: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-header) calc(var(--lg-op-header) + min(4%, 100% - var(--lg-op-header), var(--lg-op-header))), transparent), color-mix(in srgb, var(--ag-tint-header) calc(var(--lg-op-header) - min(4%, 100% - var(--lg-op-header), var(--lg-op-header))), transparent)); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-sidebar, .customer-sidebar) { --lg-op-sidebar: calc(var(--ag-op-sidebar) + (100% - var(--ag-op-sidebar)) * var(--lg-opq, 0)); --lg-fill-sidebar: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-sidebar) calc(var(--lg-op-sidebar) + min(4%, 100% - var(--lg-op-sidebar), var(--lg-op-sidebar))), transparent), color-mix(in srgb, var(--ag-tint-sidebar) calc(var(--lg-op-sidebar) - min(4%, 100% - var(--lg-op-sidebar), var(--lg-op-sidebar))), transparent)); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.public-footer) { --lg-op-footer: calc(var(--ag-op-footer) + (100% - var(--ag-op-footer)) * var(--lg-opq, 0)); --lg-fill-footer: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-footer) calc(var(--lg-op-footer) + min(4%, 100% - var(--lg-op-footer), var(--lg-op-footer))), transparent), color-mix(in srgb, var(--ag-tint-footer) calc(var(--lg-op-footer) - min(4%, 100% - var(--lg-op-footer), var(--lg-op-footer))), transparent)); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.card:not(#order-workspace), .queue-panel, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .kpi-card, .stat-card, .settings-card, .workspace-filters, .queue-filters, .ops-list-toolbar-host, .atcx-pager, .cx-card, .account-summary) { --lg-op-card: calc(var(--ag-op-card) + (100% - var(--ag-op-card)) * var(--lg-opq, 0)); --lg-fill-card: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-card) calc(var(--lg-op-card) + min(4%, 100% - var(--lg-op-card), var(--lg-op-card))), transparent), color-mix(in srgb, var(--ag-tint-card) calc(var(--lg-op-card) - min(4%, 100% - var(--lg-op-card), var(--lg-op-card))), transparent)); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(dialog, .rf-popover, .gs-results, .rf-row-menu) { --lg-op-overlay: calc(var(--ag-op-overlay) + (100% - var(--ag-op-overlay)) * var(--lg-opq, 0)); --lg-fill-overlay: linear-gradient(180deg, color-mix(in srgb, var(--ag-tint-dialog) calc(var(--lg-op-overlay) + min(3%, 100% - var(--lg-op-overlay), var(--lg-op-overlay))), transparent), color-mix(in srgb, var(--ag-tint-dialog) calc(var(--lg-op-overlay) - min(3%, 100% - var(--lg-op-overlay), var(--lg-op-overlay))), transparent)); }
}
/* 2d. PAGE CANVAS: ONE canvas per theme (Glass Studio background). Page sections and layout bands never paint a background of their own; legacy "hero panel" text/border tokens are re-pointed to the page ink where a
   section sits on the canvas (Hero B and the other photographic heroes keep their artwork and light text). */
:where(body[data-ui=premium]) :where(.hp-dark:not(.hp-final), .home-garage, .home-consultation, .consultation-price, .hp-garage-ui, .offer-live-summary, .offer-hero, .checkout-sidebar, .public-information .page-heading, .cms-hero, .cms-cta) {
  --hero: transparent; --hero-panel: transparent; --hero-text: var(--text); --hero-muted: var(--muted); --hero-border: var(--ag-sep); --hero-grid: transparent;
}

/* 2e. Photographic hero finder: the panel sits over a dark photograph in both themes, so its fields/controls use dark glass tints and light ink (contrast is solved here, not by opaque slabs) */
:where(body[data-ui=premium]) :where(.hp-finder, .wizard-guidance, .wizard-layout > .card) { --ag-tint-field: #0c0d10; --ag-tint-button: #ffffff; --text: #ffffff; --muted: rgb(255 255 255 / .72); --lg-field-line: rgb(255 255 255 / .22); color: #ffffff;
  --lg-fill-field: color-mix(in srgb, var(--ag-tint-field) var(--lg-op-field), transparent); --lg-fill-control: color-mix(in srgb, var(--ag-tint-button) 16%, transparent); }
:root:not([data-theme=dark]):not([data-theme=auto]) :where(body[data-ui=premium]) :where(.wizard-layout > .card) .consultation-price { --text: #0b1422; --muted: #596780; color: #0b1422; }   /* Light: the price plate keeps its own light surface, so dark ink inside the dark-photo panel (Dark keeps the panel ink) */
@media not (prefers-color-scheme: dark) { :root[data-theme=auto] :where(body[data-ui=premium]) :where(.wizard-layout > .card) .consultation-price { --text: #0b1422; --muted: #596780; color: #0b1422; } }

/* 2b. PREMIUM (Garage + public) shells use the SAME tint as every other glass role (no separate navy shell tint); in Light the legacy light-on-dark text tokens are re-pointed to the page ink */
:root:not([data-theme=dark]):not([data-theme=auto]) :where(.operator-app[data-ui=refined]) { --rf-root-hero-text: var(--text); --rf-root-hero-muted: var(--muted); --rf-root-hero-border: var(--ag-sep); }
@media not (prefers-color-scheme: dark) { :root[data-theme=auto] :where(.operator-app[data-ui=refined]) { --rf-root-hero-text: var(--text); --rf-root-hero-muted: var(--muted); --rf-root-hero-border: var(--ag-sep); } }
:root:not([data-theme=dark]):not([data-theme=auto]) :where(body[data-ui=premium]) :where(.public-header, .customer-sidebar, .public-footer) { --hero-text: var(--text); --hero-muted: var(--muted); --sidebar-text: var(--text); --sidebar-muted: var(--muted); --sidebar-active: color-mix(in srgb, var(--brand) 16%, transparent); --sidebar-border: var(--ag-sep); }
:root:not([data-theme=dark]):not([data-theme=auto]) :where(body[data-ui=premium]) .customer-sidebar a[data-count]::after { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--text); }
/* Light: the dark-section eyebrow sits on light glass, so it uses the accessible brand ink (WCAG AA; bright #ff6600 gave 2.7:1); Dark and the photographic hero keep the bright brand */
:root:not([data-theme=dark]):not([data-theme=auto]) :where(body[data-ui=premium]) :where(.hp-dark:not(.hp-final), .public-information .page-heading, .cms-hero, .cms-cta) { --hero-eyebrow: var(--brand-text); }
@media not (prefers-color-scheme: dark) { :root[data-theme=auto] :where(body[data-ui=premium]) :where(.hp-dark:not(.hp-final), .public-information .page-heading, .cms-hero, .cms-cta) { --hero-eyebrow: var(--brand-text); } }
@media not (prefers-color-scheme: dark) {
  :root[data-theme=auto] :where(body[data-ui=premium]) :where(.public-header, .customer-sidebar, .public-footer) { --hero-text: var(--text); --hero-muted: var(--muted); --sidebar-text: var(--text); --sidebar-muted: var(--muted); --sidebar-active: color-mix(in srgb, var(--brand) 16%, transparent); --sidebar-border: var(--ag-sep); }
  :root[data-theme=auto] :where(body[data-ui=premium]) .customer-sidebar a[data-count]::after { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--text); }
}

/* 3. ACCESSIBILITY / PERFORMANCE: one switch. Opaque, unblurred fills; the rim stays (it is not transparency). Studio cannot override :root values it never emits. */
@media (prefers-reduced-transparency: reduce) { :root { --lg-opq: 1; } }
@media (forced-colors: active) { :root { --lg-opq: 1; } }
:root[data-glass=off] { --lg-opq: 1; }
@media (forced-colors: active) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-topbar, .ops-sidebar, .public-header .header-inner, .customer-sidebar, .public-footer, .card, .kpi-card, .stat-card, .queue-panel, .rf-reg, dialog, .ops-account-menu, .rf-popover, .rf-row-menu, .theme-menu, input, select, textarea, button, .button) { border-color: CanvasText; }
}

/* 4. PAGE CANVAS the glass sits on (Studio backgrounds, areas and sections still paint through --ag-app-backdrop / --ag-bg). Hero B, authored imagery and brand artwork are never blurred. */
.operator-app[data-ui=refined]::before { background: var(--ag-app-backdrop); }
body[data-ui=premium]::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--ag-app-backdrop); }

/* 5. TONAL TOKENS inside the glass areas: legacy consumers (badges, chips, nested panels, bubbles) read these; they are translucent derivations of the semantic colours, so a nested element is a flat tonal child of its glass parent. */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) {
  --surface-subtle: color-mix(in srgb, var(--text) 6%, transparent); --brand-soft: color-mix(in srgb, var(--brand) 15%, transparent);
  --status-soft: color-mix(in srgb, var(--status, #2e9e6b) 20%, transparent); --danger-soft: color-mix(in srgb, var(--danger, #d64550) 18%, transparent); --warning-soft: color-mix(in srgb, var(--warning, #c98a1a) 20%, transparent);
  --ag-chip: color-mix(in srgb, var(--text) 8%, transparent); --ag-sep: color-mix(in srgb, var(--text) 9%, transparent); --ag-st-hover: var(--lg-st-hover); --ag-st-select: var(--lg-st-select);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {

/* 6. SURFACES. Fill = `padding-box` background layer; optical edges = four straight hairline layers (section 2) that stop before the corners. No perimeter rim. */
  /* 2d. PHONE DRAWER: the opened Operations/Administration menu floats over a dark scrim like a dialog, so it takes the overlay material (readable text in Light and Dark) instead of the 25 % bar fill. */
@media (max-width: 960px) {
  :where(.operator-app[data-ui=refined]) :where(.ops-sidebar) { --lg-fill-sidebar: var(--lg-fill-overlay); --lg-filter-bar: var(--lg-filter-dialog); }
}
/* 2e. PHONE SHEETS: a dialog that covers the whole phone screen lies over a dense page, so the page text and buttons behind it must not ghost through the content: the overlay role opacity is raised (same mechanism as the adaptive foreground). */
@media (max-width: 720px) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(dialog) { --lg-opq: .75; }
  /* the pinned action bar of the step guide scrolls over content: it has its own solid surface (dialog tint) so nothing shows through */
  :where(.operator-app[data-ui=refined]) :where(.wizard-dialog .wz-foot) { background: var(--ag-tint-dialog, var(--surface)); }
}
/* bar: the plate is a pseudo-element for the header and the sidebar (a menu opened inside the header is then not nested in a backdrop root); the other bars paint on the element */
  :where(.operator-app[data-ui=refined]) :where(.ops-topbar) { background: none; }
  :where(.operator-app[data-ui=refined]) :where(.ops-topbar)::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; box-sizing: border-box; border: 0; border-radius: var(--lg-r-bar);
    background: var(--lg-fill-header) border-box; -webkit-backdrop-filter: var(--lg-filter-bar); backdrop-filter: var(--lg-filter-bar); box-shadow: var(--lg-elev-bar); }
  :where(.operator-app[data-ui=refined]) :where(.ops-sidebar)::before { box-sizing: border-box; border: 0; border-radius: var(--lg-r-bar);
    background: var(--lg-fill-sidebar) border-box; -webkit-backdrop-filter: var(--lg-filter-bar); backdrop-filter: var(--lg-filter-bar); box-shadow: var(--lg-elev-bar); }
  :where(body[data-ui=premium]) :where(.public-header .header-inner, .customer-sidebar) { box-sizing: border-box; border: 0; border-radius: var(--lg-r-bar);
    background: var(--lg-fill-header) border-box; -webkit-backdrop-filter: var(--lg-filter-bar); backdrop-filter: var(--lg-filter-bar); box-shadow: var(--lg-elev-bar); }
  :where(body[data-ui=premium]) :where(.customer-sidebar) { background: var(--lg-fill-sidebar) border-box; }
  :where(body[data-ui=premium]) :where(.public-footer) { box-sizing: border-box; border: 0; border-radius: var(--lg-r-bar);
    background: var(--lg-fill-footer) border-box; -webkit-backdrop-filter: var(--lg-filter-bar); backdrop-filter: var(--lg-filter-bar); box-shadow: var(--lg-elev-widget); }
  :where(.operator-app[data-ui=refined]) :where(.bs-save, .settings-save, .bulk-bar, .bulk-banner) { box-sizing: border-box; border: 0; border-radius: var(--lg-r-bar);
    background: var(--lg-fill-footer) border-box; -webkit-backdrop-filter: var(--lg-filter-bar); backdrop-filter: var(--lg-filter-bar); box-shadow: var(--lg-elev-widget); }

  /* widget: ONE glass surface; content inside is flat */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.card:not(#order-workspace), .kpi-card, .stat-card, .dashboard-stat, .settings-card, .mt-card, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .workspace-panel:not(#operator-workspace), .workspace-filters, .queue-filters, .cx-card, .cx-vehicle, .account-summary,
      .contact-facts, .contact-intro, .purchase-blocked, .empty, .atcx-pager, .ops-list-toolbar-host, .od-card, .od-head, .od-dossier, .cp-card, .cp-doc, .cp-vehicle, .ml-card, .sa-card, .legal-toc, .wizard-upload-zone, .integration-card, .integration-diagnostics,
      .garage-history-panel, .cx-head, .garage-feature, .cx-context, .cx-tabs, .mt-card, .hp-why-grid article, .hp-needs-grid a, .hp-steps li, .hp-garage-ui, .hp-faq-list details, .offer-live-summary, .consultation-price, .cx-status-card, .cx-summary-card, .offer-sheet-vehicle, .offer-facts, .offer-item, .operator-vehicle-context, .atcx-banner-promo, .atcx-banner) {
    box-sizing: border-box; border: 0; border-radius: var(--lg-r-widget); background: var(--lg-fill-card) border-box;
    -webkit-backdrop-filter: var(--lg-filter-card); backdrop-filter: var(--lg-filter-card); box-shadow: var(--lg-elev-widget); }
  :where(body[data-ui=premium]:is(.page-cum-functioneaza, .page-servicii, .page-despre-atcx)) :where(.cms-block:is(.cms-text, .cms-richtext):is(.cms-text + *, :has(+ :is(.cms-text, .cms-richtext))):not(:first-of-type)) {
    box-sizing: border-box; border: 0; border-radius: var(--lg-r-widget); background: var(--lg-fill-card) border-box;
    -webkit-backdrop-filter: var(--lg-filter-card); backdrop-filter: var(--lg-filter-card); box-shadow: var(--lg-elev-widget); }
  /* register parent (the one glass card around a table or list); its table, head and rows paint nothing */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.queue-panel, .rf-reg, .inbox-items) { box-sizing: border-box; border: 0; border-radius: var(--lg-r-widget);
    background: var(--lg-fill-card) border-box; -webkit-backdrop-filter: var(--lg-filter-card); backdrop-filter: var(--lg-filter-card); box-shadow: var(--lg-elev-widget); }
  /* photograph card (an <img> cannot host a ring pseudo-element): the same hairline edge as a border-box gradient, the photograph itself is untouched */
  :where(body[data-ui=premium]) :where(.hp-consultation > img) { box-sizing: border-box; border: var(--lg-ring-w) solid transparent; border-radius: var(--lg-r-widget); background: var(--lg-ring-widget) border-box; box-shadow: var(--lg-elev-widget); }
  /* hero request form and guidance sit on the dark Hero B photograph: dark glass in both themes; the photograph itself is untouched */
  :where(body[data-ui=premium]) :where(.hp-finder, .wizard-guidance, .wizard-layout > .card) { box-sizing: border-box; border: 0; border-radius: var(--lg-r-widget); background: var(--lg-fill-hero) border-box;
    -webkit-backdrop-filter: var(--lg-filter-card); backdrop-filter: var(--lg-filter-card); box-shadow: var(--lg-elev-widget); }
  /* nested glass is flat: a card inside a card, dialog or register is a hairline-separated group, never a second glass surface */
  :where(.operator-app[data-ui=refined]) :where(dialog, .card, .queue-panel, .rf-reg) :where(.card):not(.kpi-card, .stat-card, .dashboard-stat, .action-card, .integration-card, .dashboard-chart) {
    background: none; border: 0; border-top: 1px solid var(--ag-sep); border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  :where(body[data-ui=premium]) :where(.card:not(#order-workspace), .cx-card, .contact-intro, .cx-vehicle, .account-summary, .ml-card, .cp-card) :where(.card:not(#order-workspace), .cx-card, .cms-block):not(.kpi-card, .stat-card, .dashboard-stat, .hp-finder) {
    background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

  /* overlay (dialogs, consent) and popover (menus, results): the same material, denser fill for reading */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(dialog, .record-dialog, .wizard-dialog, .gm-dialog, .cx-dialog, .consent-dialog, .ml-dialog, .cookie-banner, .atcx-modal, .record-modal) {
    box-sizing: border-box; border: 0; border-radius: var(--lg-r-overlay); background: var(--lg-fill-overlay) border-box;
    -webkit-backdrop-filter: var(--lg-filter-dialog); backdrop-filter: var(--lg-filter-dialog); box-shadow: var(--lg-elev-bar); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-account-menu, .rf-popover, .rf-row-menu, .gs-results, .theme-menu, .toast) {
    box-sizing: border-box; border: 0; border-radius: var(--lg-r-popover); background: var(--lg-fill-overlay) border-box;
    -webkit-backdrop-filter: var(--lg-filter-dialog); backdrop-filter: var(--lg-filter-dialog); box-shadow: var(--lg-elev-widget); }
  /* the scrim behind a modal dialog: restrained tint + light blur only. NO filter on the page tree: a filter on an ancestor becomes the containing block of every position:fixed descendant (popups were anchored to the page bottom) and compounds the blur */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) dialog::backdrop, :where(.operator-app[data-ui=refined]) .ops-backdrop { background: color-mix(in srgb, var(--ag-bg) 30%, rgb(4 10 20 / .34)); -webkit-backdrop-filter: blur(3px) saturate(1.05); backdrop-filter: blur(3px) saturate(1.05); }
}

/* 6d. Pills and the account button wear the same frozen edge as every other button (they were excluded from the generic control ring). */
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-lt-status button, .ops-identity) { position: relative; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-lt-status button, .ops-identity)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-control); }
}

/* Operations/Administration height scale on fine pointers: standard controls 42, compact (rows, hints) 38; touch sizes stay in the coarse block below. */
@media (pointer: fine) and (min-width: 721px) { :where(.operator-app[data-ui=refined]) { --lg-h-control: 42px; --lg-h-compact: 38px; } }

/* 7. FIELDS, CONTROLS, PRIMARY (compact controls: small radius, no blur layer; states are centrally defined) */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=hidden], [type=submit], [type=button], [type=image], [type=reset]):not(.gs-field input, .ops-search input, .ops-search-box input), select, textarea, .gs-field) {
    box-sizing: border-box; border: var(--lg-ring-w) solid transparent; border-radius: var(--lg-r-field); background: linear-gradient(var(--lg-field-fill-adapted, var(--lg-fill-field)), var(--lg-field-fill-adapted, var(--lg-fill-field))) padding-box, var(--lg-ring-control) border-box; box-shadow: inset 0 1px 2px rgb(var(--ag-sh-rgb) / .16); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.gs-field input, .ops-search input) { background: none; border: 0; box-shadow: none; }
  /* search fields (references: macOS Search): compact pill, same glass field material, legible lower-emphasis placeholder */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input, textarea)::placeholder { color: color-mix(in srgb, var(--text) 56%, transparent); opacity: 1; }

  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=hidden], [type=submit], [type=button]), select, textarea):focus-visible,
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.gs-field):focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); outline: none; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input, select, textarea)[aria-invalid=true] { border-color: var(--danger); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input, select, textarea):disabled { opacity: .6; }
  /* control: destructive variant — geometry from the engine; semantic colour (danger text/border/tint) stays with the component tokens */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, .button, .btn, [type=submit]):where(.danger, .destructive) { box-sizing: border-box; border-radius: var(--lg-r-control); box-shadow: var(--lg-elev-control); }

  /* control: secondary glass button */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, .button, .btn, [type=submit]):not(.primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child, .danger, .destructive, .text-button, .cx-link, .attn-chip, .icon-button, .ops-header-icon, .rf-more, .rf-trigger, .theme-trigger, .cx-more, .cx-dialog-close, .toast-close,
      .atcx-modal-close, .gs-clear, .th-open, .account-link, .sa-eye, .sa-theme, [role=tab], [data-garage-tab], summary, .rf-item, .hp-cta, .sa-primary, .ops-lt-status button, .finder-tabs button, .cx-tabs button, .garage-tabs button, .queue-tabs button, .cx-vehicle, #garage-cards > *, .ops-identity, .ops-drawer-close, .ops-backdrop, .sa-link, .ops-sidebar *, .customer-sidebar nav *, .customer-sidebar .customer-logout, .rf-row-menu *, .rf-popover *, [role=menu] *, .gs-results *) {
    box-sizing: border-box; border: .5px solid transparent; border-radius: var(--lg-r-control); background: linear-gradient(var(--lg-ctl-fill-adapted, var(--lg-fill-control)), var(--lg-ctl-fill-adapted, var(--lg-fill-control))) border-box; box-shadow: var(--lg-elev-control); transition: background-color 160ms, box-shadow 160ms; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, .button, .btn, [type=submit]):not(.primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child, .danger, .destructive, .text-button, .cx-link, .attn-chip, .icon-button, .ops-header-icon, .rf-more, .rf-trigger, .theme-trigger, .cx-more, .cx-dialog-close, .toast-close,
      .atcx-modal-close, .gs-clear, .th-open, .account-link, .sa-eye, .sa-theme, [role=tab], [data-garage-tab], summary, .rf-item, .hp-cta, .sa-primary, .ops-lt-status button, .finder-tabs button, .cx-tabs button, .garage-tabs button, .queue-tabs button, .cx-vehicle, #garage-cards > *, .ops-identity, .ops-drawer-close, .ops-backdrop, .sa-link, .ops-sidebar *, .customer-sidebar nav *, .customer-sidebar .customer-logout, .rf-row-menu *, .rf-popover *, [role=menu] *, .gs-results *):hover:not(:disabled) { background: linear-gradient(var(--lg-fill-control-hover), var(--lg-fill-control-hover)) border-box; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, .button, .btn, [type=submit]):not(.primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child, .danger, .destructive, .text-button, .cx-link, .attn-chip, .icon-button, .ops-header-icon, .rf-more, .rf-trigger, .theme-trigger, .cx-more, .cx-dialog-close, .toast-close,
      .atcx-modal-close, .gs-clear, .th-open, .account-link, .sa-eye, .sa-theme, [role=tab], [data-garage-tab], summary, .rf-item, .hp-cta, .sa-primary, .ops-lt-status button, .finder-tabs button, .cx-tabs button, .garage-tabs button, .queue-tabs button, .cx-vehicle, #garage-cards > *, .ops-identity, .ops-drawer-close, .ops-backdrop, .sa-link, .ops-sidebar *, .customer-sidebar nav *, .customer-sidebar .customer-logout, .rf-row-menu *, .rf-popover *, [role=menu] *, .gs-results *):active:not(:disabled) { background: linear-gradient(var(--lg-fill-control-down), var(--lg-fill-control-down)) border-box; box-shadow: inset 0 1px 3px rgb(0 0 0 / .28); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, .button, .btn, [type=submit]):disabled:not(.primary) { opacity: .6; cursor: not-allowed; box-shadow: none; }
  /* segmented / navigation family: tabs, nav links, filter chips, sidebar actions. ONE geometry (--lg-r-segment) and flat material in every state; hover/selected never change the shape */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.workspace-tabs a, .website-tabs a, .cx-tabs button, .finder-tabs button, [role=tab], .ops-lt-status button, .ops-navigation a, .ops-sidebar-footer > a, .sidebar-collapse, .ops-identity, .customer-logout, .sidebar-logout, .customer-sidebar nav a, .queue-tabs a, .workspace-tab-action) { border-radius: var(--lg-r-segment); box-shadow: none; background: none; border: 0; }
  /* Garage navigation on phones and tablets: the items sit inside the sidebar card with a fixed inset, so their corner radius is the card radius minus that inset (concentric corners: the outer item corners follow the card corners) */
  @media (max-width: 960px) { :where(body[data-ui=premium].customer-workspace .customer-sidebar) { --lg-nav-inset: 10px; } :where(body[data-ui=premium].customer-workspace .customer-sidebar :is(nav a, .customer-logout)) { border-radius: calc(var(--lg-r-bar) - var(--lg-nav-inset)); } }
  @media (max-width: 720px) { :where(body[data-ui=premium].customer-workspace .customer-sidebar) { --lg-nav-inset: 8px; } }
  /* filter chips (pills): the compact control material with the frozen optical edge (ring below); selected = state tint, never a second kind of border */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-lt-status button) { position: relative; background: var(--lg-fill-control); border: .5px solid transparent; box-shadow: var(--lg-elev-control); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-lt-status button)[aria-pressed=true] { background: var(--lg-st-select); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.workspace-tabs a, .website-tabs a, .cx-tabs button, .finder-tabs button, [role=tab], .ops-lt-status button):hover { background: var(--lg-st-hover); }
  /* menu items (references: macOS menus): flat rows inside the popover surface, hairline separators, neutral hover; never individual bordered buttons */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-row-menu, .rf-popover, .gs-results, [role=menu]) :where(button, a, [role=menuitem]) { background: none; border: 0; box-shadow: none; border-radius: 8px; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-row-menu, .rf-popover, .gs-results, [role=menu]) :where(button, a, [role=menuitem]):hover { background: var(--lg-st-hover); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-row-menu, .rf-popover, [role=menu]) :where(button, a, [role=menuitem]) + :where(button, a, [role=menuitem]) { border-top: 1px solid var(--ag-sep); border-top-left-radius: 0; border-top-right-radius: 0; }
  /* identity avatar: a tinted chip that follows the adapted control fill when Studio adapts the header */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.session-avatar) { background: linear-gradient(var(--lg-ctl-fill-adapted, var(--brand-soft)), var(--lg-ctl-fill-adapted, var(--brand-soft))); }
  /* icon controls: small filled glass; flat controls: transparent with a neutral hover */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.icon-button, .ops-header-icon, .rf-more, .theme-trigger, .sa-eye, .sa-theme, .ops-identity) { box-sizing: border-box; border: .5px solid transparent; border-radius: var(--lg-r-control);
    background: linear-gradient(var(--lg-ctl-fill-adapted, var(--lg-fill-control)), var(--lg-ctl-fill-adapted, var(--lg-fill-control))) border-box; box-shadow: var(--lg-elev-control); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.icon-button, .ops-header-icon, .rf-more, .theme-trigger, .sa-eye, .sa-theme, .ops-identity):hover { background: linear-gradient(var(--lg-fill-control-hover), var(--lg-fill-control-hover)) border-box; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-trigger:not(.icon-button), .cx-more, .cx-dialog-close, .toast-close, .atcx-modal-close, .gs-clear, .th-open, .account-link) { background: none; border: 0; box-shadow: none; border-radius: var(--lg-r-control); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-trigger:not(.icon-button), .cx-more, .cx-dialog-close, .toast-close, .atcx-modal-close, .gs-clear, .th-open, .account-link):is(:hover, [aria-expanded=true]) { background: var(--lg-st-hover); }
  /* primary: ATCX orange #FF6600 with the same glints; no glow */
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.primary, .hp-cta, .sa-primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child) {
    box-sizing: border-box; border: .5px solid transparent; border-radius: var(--lg-r-control); color: var(--on-brand, #181b1e);
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #fff), var(--brand)) border-box;
    box-shadow: 0 2px 6px rgb(60 20 0 / .28); transition: filter 160ms; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.primary, .hp-cta, .sa-primary):hover:not(:disabled) { filter: brightness(1.06); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.primary, .hp-cta, .sa-primary):active:not(:disabled) { filter: brightness(.93); box-shadow: inset 0 2px 4px rgb(60 20 0 / .35); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.primary, .hp-cta, .sa-primary):disabled { opacity: .6; cursor: not-allowed; filter: grayscale(.4); }
  /* selected tabs / chips: a neutral glass selection (never an orange slab); unselected tabs are plain text */
  :where(.operator-app[data-ui=refined]) :where(.workspace-tabs, .website-tabs) a[aria-current=page], :where(.operator-app[data-ui=refined]) :where(main, dialog) button[aria-pressed=true]:not(.primary, .danger, [data-queue-pick]), :where(.operator-app[data-ui=refined]) :where(main [role=tab], .bs-tabs button)[aria-selected=true] { background: var(--lg-st-select); color: var(--text); font-weight: 700; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-trigger, .cx-more, .theme-trigger):is(:hover, [aria-expanded=true]) { background: var(--lg-st-hover); }
}

/* 8. REGISTERS: the table, its head and rows paint nothing; rows are separated by the hairline; hover/selection is a neutral state fill inside the same surface */
:where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table, .rm-table) :where(thead th, tbody td, td.col-action, th.col-action, .tl-sticky-cell) { background: none; box-shadow: none; }
/* Selection is always shown; hover only where a real pointer exists (on a phone :hover sticks after a tap and painted the desktop state on a card layout). */
:where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(tbody tr:is([aria-selected=true], .selected, .is-selected) td) { background: var(--lg-st-hover); }
:where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(tbody tr:is([aria-selected=true], .selected, .is-selected)) > :where(td:first-child, th:first-child) { border-top-left-radius: var(--lg-r-item); border-bottom-left-radius: var(--lg-r-item); }   /* hover/selection: the same item radius on all four corners (owner 2026-11-10) */
:where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(tbody tr:is([aria-selected=true], .selected, .is-selected)) > :where(td:last-child, th:last-child) { border-top-right-radius: var(--lg-r-item); border-bottom-right-radius: var(--lg-r-item); }
@media (hover: hover) and (pointer: fine) {
  :where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(tbody tr:hover td) { background: var(--lg-st-hover); }
  :where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(tbody tr:hover) > :where(td:first-child, th:first-child) { border-top-left-radius: var(--lg-r-item); border-bottom-left-radius: var(--lg-r-item); }
  :where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(tbody tr:hover) > :where(td:last-child, th:last-child) { border-top-right-radius: var(--lg-r-item); border-bottom-right-radius: var(--lg-r-item); }
}
/* Phone: a register row is ONE card-like item (the cells are stacked blocks). Pressed and selected rows are filled as a whole with the item radius on all four corners; the cells paint nothing and carry no hairline of their own. */
@media (max-width: 640px) {
  :where(.operator-app[data-ui=refined]) .queue-table tbody tr:is(:active, [aria-selected=true], .selected, .is-selected) { background: var(--lg-st-hover); border-radius: var(--lg-r-item); }      /* real selector: it must outrank the nested-card flattening above, which also matches a row that carries .card */
  :where(.operator-app[data-ui=refined]) :where(.queue-table) :where(tbody tr) > :where(td, th) { background: none; border-radius: 0; }
}
:where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(thead th, tbody td) { border-bottom: 1px solid var(--ag-sep); }
:where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table) :where(tbody tr:last-child td) { border-bottom-color: transparent; }

/* 9. TEXT ON THE CANVAS and tonal pills: headings that sit directly on the backdrop and table headings read at AA; counters/figures are flat tonal chips */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .operator-app[data-ui=refined] .operator-heading p, body[data-ui=premium].customer-workspace .cx-lead { color: color-mix(in srgb, var(--text) 84%, var(--ag-bg)); }
  .operator-app[data-ui=refined] .queue-table thead th { color: color-mix(in srgb, var(--text) 94%, var(--ag-bg)); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-figure, .cx-figure, .gm-figure, .rr-count, .nav-count, .flow-index) { background: var(--ag-chip); box-shadow: none; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) .dev { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--text); border-bottom: 1px solid var(--ag-sep); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) .th-bubble { background: var(--surface-subtle); border-color: transparent; }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) .th-msg.is-staff .th-bubble { background: var(--lg-st-select); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) .th-msg.is-internal .th-bubble { background: var(--warning-soft); border: 1px dashed var(--ag-sep); }
}

/* 10. CONTINUOUS CORNERS: progressive enhancement (Chromium); other engines render the identical rounded layout */
@supports (corner-shape: squircle) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-topbar::before, .ops-sidebar::before, .public-header .header-inner, .customer-sidebar, .public-footer, .card, .kpi-card, .stat-card, .queue-panel, .rf-reg, dialog, .record-dialog, .cx-dialog, .ops-account-menu, .rf-popover, .rf-row-menu, .theme-menu) { corner-shape: squircle; }
}

/* 11. LOGO and photo readability: the official artwork sits directly on the shell glass (a hairline dark edge in Light keeps the transparent letters legible); Garage headings on a photograph get Studio's scrim */
:root:not([data-theme=dark]):not([data-theme=auto]) :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(img.brand-logo:not(.brand-logo-default), img.sa-logo) { filter: drop-shadow(.8px 0 0 rgb(8 18 32 / .92)) drop-shadow(-.8px 0 0 rgb(8 18 32 / .92)) drop-shadow(0 .8px 0 rgb(8 18 32 / .92)) drop-shadow(0 -.8px 0 rgb(8 18 32 / .92)); }
@media not (prefers-color-scheme: dark) {
  :root[data-theme=auto] :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(img.brand-logo:not(.brand-logo-default), img.sa-logo) { filter: drop-shadow(.8px 0 0 rgb(8 18 32 / .92)) drop-shadow(-.8px 0 0 rgb(8 18 32 / .92)) drop-shadow(0 .8px 0 rgb(8 18 32 / .92)) drop-shadow(0 -.8px 0 rgb(8 18 32 / .92)); }
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  body[data-ui=premium].customer-workspace .cx-head { position: relative; isolation: isolate; }
  /* the greeting is a regular widget card (shared family): it carries its own glass, so the old off-card scrim band behind it is gone */
  body[data-ui=premium].customer-workspace .cx-head::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--ag-scrim, transparent); -webkit-backdrop-filter: blur(var(--ag-scrim-blur, 0px)); backdrop-filter: blur(var(--ag-scrim-blur, 0px)); pointer-events: none; }      /* Studio scrim stays INSIDE the card, never as a band around it */
}

/* 6b. OPTICAL EDGE RING (one continuous perimeter transition; reference ATCX_LIQUID_GLASS_EDGE_GEOMETRY): a 1px masked ring on the surface's ::after whose colour is a horizontal transition: a white hairline on the
   straight top and bottom that starts fading 7px before the curve and dissolves through the curve into the faint dark contour, which is all that remains on the sides. Mirrored top/bottom and left/right; not separate strokes. */
@media (min-resolution: 2dppx) { :where(.operator-app[data-ui=refined], body[data-ui=premium]) { --lg-ring-w: .5px; --lg-ring-k: 1; } }
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  :where(.operator-app[data-ui=refined]) :where(.ops-topbar)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: var(--lg-r-bar); corner-shape: squircle; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-bar); }
  :where(.operator-app[data-ui=refined]) :where(.ops-sidebar)::after { content: ""; position: absolute; inset: var(--rf-float) calc(var(--rf-float) - 4px) var(--rf-float) var(--rf-float); box-sizing: border-box; border-radius: var(--lg-r-bar); corner-shape: squircle; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-bar); }
  :where(body[data-ui=premium]) :where(.public-header .header-inner, .customer-sidebar)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-bar); }
  :where(body[data-ui=premium]) :where(.customer-sidebar)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-bar); }
  :where(body[data-ui=premium]) :where(.public-footer)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-bar); }
  :where(.operator-app[data-ui=refined]) :where(.bs-save, .settings-save, .bulk-bar, .bulk-banner)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-bar); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.card:not(#order-workspace), .kpi-card, .stat-card, .dashboard-stat, .settings-card, .mt-card, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .workspace-panel:not(#operator-workspace), .workspace-filters, .queue-filters, .cx-card, .cx-vehicle, .account-summary,
      .contact-facts, .contact-intro, .purchase-blocked, .empty, .atcx-pager, .ops-list-toolbar-host, .od-card, .od-head, .od-dossier, .cp-card, .cp-doc, .cp-vehicle, .ml-card, .sa-card, .legal-toc, .wizard-upload-zone, .integration-card, .integration-diagnostics,
      .garage-history-panel, .cx-head, .garage-feature, .cx-context, .cx-tabs, .mt-card, .hp-why-grid article, .hp-needs-grid a, .hp-steps li, .hp-garage-ui, .hp-faq-list details, .offer-live-summary, .consultation-price, .cx-status-card, .cx-summary-card, .offer-sheet-vehicle, .offer-facts, .offer-item, .operator-vehicle-context, .atcx-banner-promo, .atcx-banner)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-widget); }
  :where(body[data-ui=premium]:is(.page-cum-functioneaza, .page-servicii, .page-despre-atcx)) :where(.cms-block:is(.cms-text, .cms-richtext):is(.cms-text + *, :has(+ :is(.cms-text, .cms-richtext))):not(:first-of-type))::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-widget); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.queue-panel, .rf-reg, .inbox-items)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-widget); }
  :where(body[data-ui=premium]) :where(.hp-finder, .wizard-guidance, .wizard-layout > .card)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-widget); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(dialog, .record-dialog, .wizard-dialog, .gm-dialog, .cx-dialog, .consent-dialog, .ml-dialog, .cookie-banner, .atcx-modal, .record-modal)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-overlay); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-account-menu, .rf-popover, .rf-row-menu, .gs-results, .theme-menu, .toast)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-popover); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, .button, .btn, [type=submit]):not(.primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child, .danger, .destructive, .text-button, .cx-link, .attn-chip, .icon-button, .ops-header-icon, .rf-more, .rf-trigger, .theme-trigger, .cx-more, .cx-dialog-close, .toast-close,
      .atcx-modal-close, .gs-clear, .th-open, .account-link, .sa-eye, .sa-theme, [role=tab], [data-garage-tab], summary, .rf-item, .hp-cta, .sa-primary, .ops-lt-status button, .finder-tabs button, .cx-tabs button, .garage-tabs button, .queue-tabs button, .cx-vehicle, #garage-cards > *, .ops-identity, .ops-drawer-close, .ops-backdrop, .sa-link, .ops-sidebar *, .customer-sidebar nav *, .customer-sidebar .customer-logout, .rf-row-menu *, .rf-popover *, [role=menu] *, .gs-results *)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-control); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.icon-button, .ops-header-icon, .rf-more, .theme-trigger, .sa-eye, .sa-theme)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-control); }
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.primary, .hp-cta, .sa-primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child)::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit; corner-shape: inherit; border: 0; padding: var(--lg-ring-w); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; background: var(--lg-ring-control); }
  /* ring host: needs a containing block (zero specificity: any positioning a component already has wins; dialogs keep their UA positioning) */
  :where(:where(.operator-app[data-ui=refined]) :where(.ops-topbar), :where(.operator-app[data-ui=refined]) :where(.ops-sidebar), :where(body[data-ui=premium]) :where(.public-header .header-inner, .customer-sidebar), :where(body[data-ui=premium]) :where(.customer-sidebar), :where(body[data-ui=premium]) :where(.public-footer), :where(.operator-app[data-ui=refined]) :where(.bs-save, .settings-save, .bulk-bar, .bulk-banner), :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.card:not(#order-workspace), .kpi-card, .stat-card, .dashboard-stat, .settings-card, .mt-card, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .workspace-panel:not(#operator-workspace), .workspace-filters, .queue-filters, .cx-card, .cx-vehicle, .account-summary,
      .contact-facts, .contact-intro, .purchase-blocked, .empty, .atcx-pager, .ops-list-toolbar-host, .od-card, .od-head, .od-dossier, .cp-card, .cp-doc, .cp-vehicle, .ml-card, .sa-card, .legal-toc, .wizard-upload-zone, .integration-card, .integration-diagnostics,
      .garage-history-panel, .cx-head, .garage-feature, .cx-context, .cx-tabs, .mt-card, .hp-why-grid article, .hp-needs-grid a, .hp-steps li, .hp-garage-ui, .hp-faq-list details, .offer-live-summary, .consultation-price, .cx-status-card, .cx-summary-card, .offer-sheet-vehicle, .offer-facts, .offer-item, .operator-vehicle-context, .atcx-banner-promo, .atcx-banner), :where(body[data-ui=premium]:is(.page-cum-functioneaza, .page-servicii, .page-despre-atcx)) :where(.cms-block:is(.cms-text, .cms-richtext):is(.cms-text + *, :has(+ :is(.cms-text, .cms-richtext))):not(:first-of-type)), :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.queue-panel, .rf-reg, .inbox-items), :where(body[data-ui=premium]) :where(.hp-finder, .wizard-guidance, .wizard-layout > .card), :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-account-menu, .rf-popover, .rf-row-menu, .gs-results, .theme-menu, .toast), :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, .button, .btn, [type=submit]):not(.primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child, .danger, .destructive, .text-button, .cx-link, .attn-chip, .icon-button, .ops-header-icon, .rf-more, .rf-trigger, .theme-trigger, .cx-more, .cx-dialog-close, .toast-close,
      .atcx-modal-close, .gs-clear, .th-open, .account-link, .sa-eye, .sa-theme, [role=tab], [data-garage-tab], summary, .rf-item, .hp-cta, .sa-primary, .ops-lt-status button, .finder-tabs button, .cx-tabs button, .garage-tabs button, .queue-tabs button, .cx-vehicle, #garage-cards > *, .ops-identity, .ops-drawer-close, .ops-backdrop, .sa-link, .ops-sidebar *, .customer-sidebar nav *, .customer-sidebar .customer-logout, .rf-row-menu *, .rf-popover *, [role=menu] *, .gs-results *), :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.icon-button, .ops-header-icon, .rf-more, .theme-trigger, .sa-eye, .sa-theme), :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.primary, .hp-cta, .sa-primary, .queue-table td:is([data-label="Acțiune"], .col-action) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) :where(.record-actions, .actions) > :where(button, .button):first-child, .queue-table td:is([data-label="Acțiune"], .col-action) .rf-actions-row > :where(button, .button):first-child, .queue-table td:last-child > :where(button, .button):first-child)) { position: relative; }
  /* nested flat content carries no ring */
  :where(.operator-app[data-ui=refined]) :where(dialog, .card, .queue-panel, .rf-reg) :where(.card):not(.kpi-card, .stat-card, .dashboard-stat, .action-card, .integration-card, .dashboard-chart)::after { display: none; }
  :where(body[data-ui=premium]) :where(.card:not(#order-workspace), .cx-card, .contact-intro, .cx-vehicle, .account-summary, .ml-card, .cp-card) :where(.card:not(#order-workspace), .cx-card, .cms-block):not(.kpi-card, .stat-card, .dashboard-stat, .hp-finder)::after { display: none; }
}

/* ═══ ONE glass surface per floating widget (owner rule) ═══
   A widget/card/section nested inside another glass widget or dialog is a flat, transparent section with a hairline: no second backdrop-filter, no second shadow, no second optical ring.
   Kept LAST so it wins over the per-role material blocks above; independently floating children (menus, popovers, dialogs) are not in this list and stay glass. */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.queue-panel, .rf-reg, .inbox-items, .card:not(#order-workspace), .kpi-card, .stat-card, .dashboard-stat, .settings-card, .mt-card, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .workspace-panel:not(#operator-workspace), .workspace-filters, .queue-filters, .cx-card, .cx-vehicle, .account-summary, .contact-facts, .contact-intro, .purchase-blocked, .empty, .atcx-pager, .ops-list-toolbar-host, .od-card, .od-head, .od-dossier, .cp-card, .cp-doc, .cp-vehicle, .ml-card, .sa-card, .legal-toc, .wizard-upload-zone, .integration-card, .integration-diagnostics, .garage-history-panel, .cx-head, .garage-feature, .cx-context, .cx-tabs, .mt-card, .hp-why-grid article, .hp-needs-grid a, .hp-steps li, .hp-garage-ui, .hp-faq-list details, .offer-live-summary, .consultation-price, .cx-status-card, .cx-summary-card, .offer-sheet-vehicle, .offer-facts, .offer-item, .operator-vehicle-context, .atcx-banner-promo, .atcx-banner, dialog, .record-dialog, .thread-dialog, .ml-dialog, .wizard-dialog, .cx-dialog, .consent-dialog, .atcx-modal) :where(.queue-panel, .rf-reg, .inbox-items, .card, .kpi-card, .stat-card, .dashboard-stat, .settings-card, .mt-card, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .workspace-panel:not(#operator-workspace), .workspace-filters, .queue-filters, .cx-card, .cx-vehicle, .account-summary, .contact-facts, .contact-intro, .purchase-blocked, .empty, .atcx-pager, .ops-list-toolbar-host, .od-card, .od-head, .od-dossier, .cp-card, .cp-doc, .cp-vehicle, .ml-card, .sa-card, .legal-toc, .wizard-upload-zone, .integration-card, .integration-diagnostics, .garage-history-panel, .cx-head, .garage-feature, .cx-context, .cx-tabs, .mt-card, .hp-why-grid article, .hp-needs-grid a, .hp-steps li, .hp-garage-ui, .hp-faq-list details, .offer-live-summary, .consultation-price, .cx-status-card, .cx-summary-card, .offer-sheet-vehicle, .offer-facts, .offer-item, .operator-vehicle-context, .atcx-banner-promo, .atcx-banner) {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: none; box-shadow: none; border-radius: 0; border: 0; border-top: .5px solid var(--lg-hair-nested); }      /* reference (macOS System Settings): grouped sections inside a window are a gentle lift with hairlines, never a second glass */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.queue-panel, .rf-reg, .inbox-items, .card:not(#order-workspace), .kpi-card, .stat-card, .dashboard-stat, .settings-card, .mt-card, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .workspace-panel:not(#operator-workspace), .workspace-filters, .queue-filters, .cx-card, .cx-vehicle, .account-summary, .contact-facts, .contact-intro, .purchase-blocked, .empty, .atcx-pager, .ops-list-toolbar-host, .od-card, .od-head, .od-dossier, .cp-card, .cp-doc, .cp-vehicle, .ml-card, .sa-card, .legal-toc, .wizard-upload-zone, .integration-card, .integration-diagnostics, .garage-history-panel, .cx-head, .garage-feature, .cx-context, .cx-tabs, .mt-card, .hp-why-grid article, .hp-needs-grid a, .hp-steps li, .hp-garage-ui, .hp-faq-list details, .offer-live-summary, .consultation-price, .cx-status-card, .cx-summary-card, .offer-sheet-vehicle, .offer-facts, .offer-item, .operator-vehicle-context, .atcx-banner-promo, .atcx-banner, dialog, .record-dialog, .thread-dialog, .ml-dialog, .wizard-dialog, .cx-dialog, .consent-dialog, .atcx-modal) :where(.queue-panel, .rf-reg, .inbox-items, .card, .kpi-card, .stat-card, .dashboard-stat, .settings-card, .mt-card, .operation-section:not(#inbox-section, #cases-section, #purchase-section, #logistics-section, #finance-section, #report-section, #customers-section), .workspace-panel:not(#operator-workspace), .workspace-filters, .queue-filters, .cx-card, .cx-vehicle, .account-summary, .contact-facts, .contact-intro, .purchase-blocked, .empty, .atcx-pager, .ops-list-toolbar-host, .od-card, .od-head, .od-dossier, .cp-card, .cp-doc, .cp-vehicle, .ml-card, .sa-card, .legal-toc, .wizard-upload-zone, .integration-card, .integration-diagnostics, .garage-history-panel, .cx-head, .garage-feature, .cx-context, .cx-tabs, .mt-card, .hp-why-grid article, .hp-needs-grid a, .hp-steps li, .hp-garage-ui, .hp-faq-list details, .offer-live-summary, .consultation-price, .cx-status-card, .cx-summary-card, .offer-sheet-vehicle, .offer-facts, .offer-item, .operator-vehicle-context, .atcx-banner-promo, .atcx-banner)::after { content: none; }
/* commercial dossier (.jc): a flat section inside its own card or dialog (an outlined box here read as a card inside a card) */
:where(.operator-app[data-ui=refined]) :where(.jc) { border-radius: 0; box-shadow: none; }

/* ═══ list rows and joined register stacks ═══
   (1) Rows of a list that lives inside ONE register/list widget are flat rows with a hairline, never boxed cards (conversation lists, request/offer rows).
   (2) A toolbar, its register and its pager are ONE widget: they are joined edge to edge (shared hairline, square inner corners, no gap) instead of three floating cards. */
:where(.operator-app[data-ui=refined]) :where(.inbox-items) > :where(article, li, .card) { border-radius: 0; box-shadow: none; background: transparent; border: 0; border-bottom: 1px solid var(--lg-hair-nested); margin: 0; }
:where(.operator-app[data-ui=refined]) :where(.inbox-items) > :where(article, li, .card):last-child { border-bottom: 0; }

/* ═══ fields: edge without leak (owner finding "line across form fields") ═══
   ROOT CAUSE: the optical ring token is built for a MASKED pseudo-element (4 half-height mirrored layers). Inputs/selects/textareas cannot have pseudo-elements, so the ring was painted as a plain
   background UNDER their translucent fill: its top/bottom halves showed through as a hard seam at mid-height. Fields now carry ONE fill layer and a continuous perimeter edge made of inset shadows that
   follow the corner radius: white glint on the top and bottom, faint dark contour on the sides (the same optical logic as the frozen ring), no layer beneath the fill. */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=hidden], [type=submit], [type=button], [type=image], [type=reset]):not(.gs-field input, .ops-search input, .ops-search-box input), select, textarea, .gs-field) {
  background: var(--lg-field-fill-adapted, var(--lg-fill-field)); border: 0;
  box-shadow: inset 0 1px 2px rgb(var(--ag-sh-rgb) / .12); }      /* owner 2026-11-06: no contour on text fields (not visible enough): fill and a faint inner depth only */
/* selects: Safari ignores height/padding on a native menulist, so the control is drawn by the engine (same height scale as buttons, chevron from two gradients: no image request) */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(select:not([multiple], [size])) {
  -webkit-appearance: none; appearance: none; min-height: var(--lg-h-control); padding-right: var(--lg-select-room); text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
/* file inputs: the field shell (fill, field radius, field height) with the native chooser button drawn as the primary ATCX orange control (a pseudo-element cannot carry the masked ring: it keeps the primary shadow) */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input[type=file]) {
  box-sizing: border-box; width: 100%; max-width: 100%; min-height: max(44px, var(--lg-h-control)); padding: 4px; border: 0; border-radius: var(--lg-r-field); color: var(--text); font: inherit; font-size: 14px;
  background: var(--lg-field-fill-adapted, var(--lg-fill-field)); box-shadow: inset 0 1px 2px rgb(var(--ag-sh-rgb) / .12); }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input[type=file])::file-selector-button {
  box-sizing: border-box; margin: 0 12px 0 0; min-height: calc(max(44px, var(--lg-h-control)) - 8px); padding: 0 16px; border: .5px solid transparent; border-radius: calc(var(--lg-r-field) - 2px);
  color: var(--on-brand, #181b1e); font: inherit; font-weight: 650; cursor: pointer; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #fff), var(--brand)) border-box; box-shadow: 0 2px 6px rgb(60 20 0 / .28); }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(input[type=file]):hover::file-selector-button { filter: brightness(1.06); }
/* an empty pager/toolbar host paints nothing (it left a blank strip between the filter card and the conversation list) */
:where(.operator-app[data-ui=refined]) :where(.atcx-pager, .ops-lt-pager, .ops-list-toolbar-host):not(:has(*)) { display: none; }

/* ═══ global font: every text element inherits the ONE token --lg-font (change it in one place or through Studio) ═══ */
:where(.operator-app[data-ui=refined], body[data-ui=premium]), :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(button, input, select, textarea) { font-family: var(--lg-font); }

/* dialogs on phones: edge-to-edge sheets (the tokens collapse to the full viewport width; heights already use 100dvh in each dialog family) */
@media (max-width: 720px) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) { --lg-dlg-form: 100vw; --lg-dlg-md: 100vw; --lg-dlg-lg: 100vw; }
}
@media (pointer: coarse), (max-width: 720px) {
  :where(.operator-app[data-ui=refined], body[data-ui=premium]) { --lg-h-compact: 36px; --lg-h-control: 44px; --lg-h-large: 52px; }
}

/* ═══ inset hairlines (reference: macOS launcher/settings): separators do not run edge to edge, they stop short of the card edge ═══
   Drawn as a pseudo-element of each cell so no local row/cell background can hide them (zero added specificity like every engine rule). */
/* The row hairline needs the table layout: on a phone the cells are stacked blocks whose ::before is their data label, and the rows are separated by the row border instead. */
@media (min-width: 641px) {
  :where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table, .rm-table) :where(tbody tr + tr td) { position: relative; }      /* anchors the row hairline; a sticky cell's own position rule (higher specificity) still wins, so no hairline can escape to the card top */
  :where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table, .rm-table) :where(tbody tr + tr td)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--lg-hair-nested); pointer-events: none; }
  :where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table, .rm-table) :where(tbody tr + tr td:first-child)::before { left: 18px; }
  :where(.operator-app[data-ui=refined]) :where(.queue-table, table.tl-sticky, .rf-reg table, .rm-table) :where(tbody tr + tr td:last-child)::before { right: 18px; }
}
:where(.operator-app[data-ui=refined]) :where(.inbox-items) > :where(article, li, .card) { border-bottom: 0; background: linear-gradient(var(--lg-hair-nested), var(--lg-hair-nested)) bottom center / calc(100% - 36px) 1px no-repeat; }
:where(.operator-app[data-ui=refined]) :where(.inbox-items) > :where(article, li, .card):last-child { background: none; }

/* ═══ tab rows on phones: tabs wrap onto the next row (a row you must swipe sideways hides tabs and confuses people) ═══ */
@media (max-width: 720px) {
  :where(.operator-app[data-ui=refined]) :where(.workspace-tabs, .website-tabs, .inbox-tabs, .ship-tabs) { display: flex; flex-wrap: wrap; overflow: visible; gap: 6px; padding-bottom: 4px; }
  :where(.operator-app[data-ui=refined]) :where(.workspace-tabs, .website-tabs, .inbox-tabs, .ship-tabs) > :where(a, button) { flex: 0 1 auto; white-space: normal; text-align: center; min-height: var(--lg-h-control); }
}

/* ═══ uniform hover/selected highlight: identical radius on all four corners everywhere (menus, popovers, row menus, lists) ═══ */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-row-menu, .rf-popover, .ops-account-menu, .theme-menu, .gs-results, [role=menu]) { padding: 6px; }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-row-menu, .rf-popover, .ops-account-menu, .theme-menu, .gs-results, [role=menu]) :where(button, a, [role=menuitem], [role=menuitemradio], .rf-item) { border-radius: var(--lg-r-item); }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.rf-more, .icon-button, .ops-header-icon, .theme-trigger, .cx-more) { border-radius: var(--lg-r-control, 10px); }
/* Header controls (owner 2026-11-08): the buttons of a header bar are flat cards with the frozen edge: the card fill and ring (not the raised control recipe), no elevation, ONE corner radius concentric with the bar
   (bar radius minus the 18 px inset of a 40 px control in a 76 px bar, never below the control radius). The avatar of the identity button is neutral, never brand-tinted. */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-topbar, .public-header .header-inner) { --lg-r-hbtn: max(var(--lg-r-control, 10px), calc(var(--lg-r-bar) - 18px)); }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-topbar, .public-header .header-inner) :where(.icon-button, .ops-header-icon, .theme-trigger, .ops-identity, .area-switcher, #menu-button) { border-radius: var(--lg-r-hbtn); background: var(--lg-fill-card) border-box; box-shadow: none; }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-topbar, .public-header .header-inner) :where(.icon-button, .ops-header-icon, .theme-trigger, .ops-identity, .area-switcher, #menu-button):hover { background: linear-gradient(var(--lg-fill-control-hover), var(--lg-fill-control-hover)) border-box; }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-topbar, .public-header .header-inner) :where(.icon-button, .ops-header-icon, .theme-trigger, .ops-identity, .area-switcher, #menu-button)::after { background: var(--lg-ring-widget); }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-identity) :where(.session-avatar) { background: var(--lg-st-select); }

/* search/field shells: ONE focus indicator (the shell's); the inner input never draws its own ring (it produced two stacked search bars) */
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.gs-field, .ops-search, .ops-search-box) :where(input):focus, :where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.gs-field, .ops-search, .ops-search-box) :where(input):focus-visible { outline: none; box-shadow: none; border: 0; background: none; }
:where(.operator-app[data-ui=refined], body[data-ui=premium]) :where(.ops-search-box .gs-field):focus-within { outline: none; }

/* Cards that float over the dark request photo: secondary text stays readable on the mid-grey glass (contrast >= 4.5:1). */
:where(.wizard-layout > .card) { --muted: color-mix(in srgb, var(--text) 82%, transparent); }

/* A save bar that sits inside a card is part of that card (one glass per widget): no own fill, shadow or edge ring. */
:where(.operator-app[data-ui=refined]) :where(.card:not(#order-workspace), .queue-panel, .settings-card, .workspace-panel) :where(.settings-save, .bs-save) { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border-radius: 0; }
:where(.operator-app[data-ui=refined]) :where(.card:not(#order-workspace), .queue-panel, .settings-card, .workspace-panel) :where(.settings-save, .bs-save)::after { display: none; }
