/*
  Portal / admin-console chrome.
  GROUND RULE #1 (WPF is the bible) framing: this is a GREENFIELD platform-edge admin surface with NO WPF
  equivalent (per the task brief), so the BIBLE here is the PlatformWeb WEB CLIENT
  (web/Odcanit.Platinum.Web.Client/src/styles.css). Every token below is remapped to that client's design
  system so the admin portal matches it BY CONSTRUCTION — the SAME palette the WPF schema projects into the
  web client (Core.Locales/Dictionaries/GlobalUIColors.xaml). Per the no-hard-coded-colour rule, every colour
  is a CSS custom property in :root (a real schema/theme push can override them later without touching
  component CSS); the only literal colours outside this block live in the login gate (the single documented
  exception) and are cited there. Each value cites its web-client styles.css source line.
*/
:root {
    /* ---- structural palette (web client styles.css :root) ---- */
    --pf-bg: #F3F3F3;            /* client --bg-body (window background, L7) */
    --pf-surface: #FFFFFF;       /* client --grid-row / --panel (white content surface, L77) */
    --pf-surface-alt: #F6F6F6;   /* client --grid-row-alt (zebra/sub-surface, L78) */
    --pf-border: #DCDCDC;        /* client --line / --list-search-border (FormFramesColor, L83) */
    --pf-text: #22366B;          /* client --text (general navy text, L8) */
    /* DevTask 41315 / QA reject 766 — WCAG 2 AA "color-contrast". The muted token WAS the web client's
       --muted #707A9E verbatim, which measures 4.23:1 on --pf-surface and only 3.81:1 on --pf-bg — both under
       the 4.5:1 floor for normal-size text, so EVERY secondary string in the portal failed at once (the
       "התנתקות" sign-out link QA named, plus .subtitle / .muted / .footer / the metrics labels — one defect,
       not seven). ⚠ The sign-out link no longer takes this token AT ALL — reject 772 moved every inline
       text-link ACTION onto the client's brand link colour (see `.link-inline` below); it is named here
       as the token's history, not as a current user of it.
       Darkened along its OWN ramp (each channel scaled to 88%, i.e. 12% toward black) so the
       blue-grey hue and the visual hierarchy against the navy body text (--pf-text, 11.6:1) are unchanged:
       #636B8B measures 5.24:1 on #FFFFFF (--pf-surface), 4.72:1 on --pf-bg #F3F3F3 and 4.85:1 on
       --pf-surface-alt #F6F6F6 — the portal's three FLAT surfaces. ⛔ Read that as what was MEASURED, not as a
       claim that nothing else exists: two attempts to enumerate every place this token lands were wrong in
       review, so no exhaustiveness is asserted here. ⚠ WHAT IS BINDING INSTEAD: paint --pf-text-muted on
       anything other than those three and MEASURE IT. The one known non-flat case is already handled and needs
       no measuring — on the --pf-accent-soft #DDDEE0 selection tint this token would be 3.89:1, and the AA
       guard directly below this block covers it structurally: the tint-painting elements redefine the token to
       --pf-text = 8.63:1, so every muted descendant inherits it instead of anyone having to list them. Those
       three ratios and the guard's coverage are both CHECKED, not just written down — see the guard.
       This is a DELIBERATE, portal-only deviation from the client's --muted: the admin portal is the
       greenfield platform edge with no WPF twin (see the header), and the client's own #707A9E instances are
       schema-driven and belong to the open colour-palette decision on this task, not here. */
    --pf-text-muted: #636B8B;    /* client --muted (sub-mainmenu blue-gray, L9), darkened for WCAG 2 AA */
    /* ---- brand / primary (navy) ---- */
    --pf-primary: #24356B;       /* client --brand / --bg "window caption / top bar (navy)" (L9/L3) */
    --pf-primary-text: #FFFFFF;
    --pf-primary-hover: #2C4286;  /* login primary-hover (.login__btn--primary:hover, portal.css below) */
    --pf-on-brand: #FBFFFF;       /* client --caption-text (text on the navy bar, L17) */
    --pf-topbar-hover: #FFD84C;   /* client --menu-hover-text (gold caption-button hover, L34) */
    /* ---- accent (schema orange) ---- */
    --pf-accent: #FF802B;        /* client --accent (orange, L12) */
    --pf-accent-strong: #ED952B; /* client --accent-soft (orange hover text, L13) */
    /* ---- status colours. The schema has no dedicated success/destructive token, so (exactly as the web
       client itself keeps status literals in :root — --form-switch-on #008000 green, login error #F14722,
       --cell-amount-neg #FF0000) these stay literal here and nowhere else. ---- */
    /* DevTask 41315 — both status tokens were below the AA floor in the way the portal actually paints them:
       white text ON the #F14722 danger fill (.btn.danger "ביטול" on /admin/grants) measured 3.71:1, and
       #008000 on its OWN 14% tint (.pill.ok "פעיל" on /admin/systems) 4.19:1 — a status colour tinted behind
       itself cannot reach 4.5:1 at these strengths. Each is darkened along its own ramp to the lightest point
       that clears AA on every surface it is painted on, keeping the hue (still an unmistakable red / green):
         danger 80%  -> white-on-fill 5.44:1, as text 5.44:1 on #FFFFFF, 4.90:1 on --pf-bg, 4.55:1 on its
                        .alert.error 12% tint; hover scaled the same 80% so it stays DARKER than the rest state.
         ok     90%  -> 6.07:1 on #FFFFFF, 5.61:1 on --pf-surface-alt, 5.47:1 on --pf-bg, 5.06:1 on the
                        .alert.ok 12% tint and 4.91:1 on the .pill.ok 14% tint. */
    --pf-danger: #C1391B;        /* login error red (.login__error, the schema's clear "alarm" colour) */
    --pf-danger-hover: #AB2E13;
    --pf-ok: #007300;            /* client --form-switch-on (FormField_Switch ON green, L21) */
    /* DevTask 41315 — the amber was NOT in fact "readable on a tint": #B9791A measured 3.34:1 on
       --pf-surface-alt (the MFA-enrolment recovery-code chips, which override the alert's tint background but
       inherit its amber text) and only 3.02:1 on its OWN .pill.warn tint — a warning colour tinted 16% behind
       itself can never reach 4.5:1. Darkened along its own ramp to 76%, the lightest point that clears the AA
       floor on EVERY surface it is painted on: 5.73:1 on #FFFFFF, 5.30:1 on --pf-surface-alt, 5.16:1 on
       --pf-bg, 4.79:1 on the .alert.warn 13% tint and 4.58:1 on the .pill.warn 16% tint. Still the same amber
       hue; the CPU chart stroke/fill that share the token stay well past the 3:1 non-text floor. */
    --pf-warn: #8D5C14;          /* readable amber for "warning" text on a tint (schema attention = --pf-accent) */
    /* ---- selection / soft hover tint ---- */
    --pf-accent-soft: #DDDEE0;   /* client --sel = AlertsListHoverBackground (selection/hover tint, L29) */
    /* ---- data grid (web client DataGrid, styles.css :root L73-81) ---- */
    --pf-grid-head-bg: #DBDBDB;     /* --grid-head-bg */
    --pf-grid-head-text: #15203E;   /* --grid-head-text */
    --pf-grid-line: #DBDBDB;        /* --grid-line */
    --pf-grid-sel-bg: #FEDC9C;      /* --grid-sel-row */
    --pf-grid-sel-text: #321F10;    /* --grid-sel-row-text */
    /* ---- scrollbars (web client MenuScrollbar*, styles.css :root L44-45) ---- */
    --pf-scrollbar: #ADABAB;
    --pf-scrollbar-hover: #697298;
    /* ---- shape / shadow / type ---- */
    --pf-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
    --pf-radius: 10px;           /* cards / popups / menus — web-client panel radius (styles.css L140/L216) */
    --pf-radius-sm: 4px;         /* buttons / inputs / pills — web-client control radius (styles.css L149/L172) */
    --pf-font: 'Segoe UI', Tahoma, Arial, sans-serif;  /* client root font (styles.css L92) */
}

/* DevTask 41315 — AA GUARD FOR THE --pf-accent-soft TINT, and it is deliberately structural rather than a list
   of the muted elements that happen to sit on it. --pf-text-muted #636B8B clears 4.5:1 on every FLAT portal
   surface (see the token) but measures 3.89:1 on the #DDDEE0 selection tint. Enumerating the DESCENDANTS that
   land there was tried and was wrong twice in a row: it missed .sysswitch-menu a:hover's <span class="muted">
   (Pages/Shared/Components/SystemSwitcher/Default.cshtml) — a false "only place" claim caught in review — and
   nothing stops the next page from adding another. So the token is REDEFINED on the elements that paint the
   tint instead: every muted descendant inside them, present or future, whatever it is called, inherits
   --pf-text #22366B = 8.63:1 with no further edit. Which is also right visually — a highlighted/hovered row is
   emphasised, so its text stops being secondary.
   ⭐ THE INVARIANT, AND IT IS ENFORCED RATHER THAN PROMISED: this selector list must stay equal to the set of
   rules that set `background: var(--pf-accent-soft)`. That is not left to a comment — a comment claiming a set
   is closed is a promise nothing keeps, and nothing tells you when it breaks. It is CHECKED, against this very
   file, by  dotnet run --project web/Odcanit.Platinum.Web.Broker.Probes -- portal-contrast  (source:
   PortalContrastGuardProbe.cs), which also re-measures the token's ratios on the flat surfaces above. Add a
   rule that paints this tint without adding it here and that probe FAILS, naming your selector.
   The tint itself is NOT touched: --pf-accent-soft is the client's --sel / AlertsListHoverBackground and
   lifting it would diverge from the web client (GR#1). */
.pf-combo__option:hover, .pf-combo__option.is-active,   /* the user-picker rows, /admin/grants + /admin/invites
                                                           + /manage/access; .is-active is the ARROW-KEY
                                                           highlight, not only hover */
.sysswitch-menu a:hover,                                /* switch-system menu rows (the ↗ span is .muted) */
.btn.secondary:hover,
.icon-btn:hover,
.pill.info,
.metrics-window-opt.is-current { --pf-text-muted: var(--pf-text); }

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--pf-font);
    background: var(--pf-bg);
    color: var(--pf-text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Thin app-style scrollbars (web client styles.css L476-488): transparent track, only the drag thumb shows. */
* { scrollbar-width: thin; scrollbar-color: var(--pf-scrollbar) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pf-scrollbar); border-radius: 4px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--pf-scrollbar-hover); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---- SIDE BAR (vertical navy nav rail) ----
   The portal's primary nav is a vertical navy RAIL — the SAME thing the web client uses for its main menu:
   a navy groups rail (client --menu-bg #24356B, styles.css L31) pinned to the inline-START edge, which in the
   RTL Hebrew default is the RIGHT (exactly like the desktop/web-client menu rail) and the LEFT in English.
   Authenticated pages lay out as [rail | content]; login/gate pages (which render NO .topbar) are untouched
   and keep their full-screen flex column. The narrow-viewport media query below collapses the rail back to a
   wrapping top strip (so it never overflows — folds the old B112 concern). The element keeps the .topbar class
   for markup compatibility; it now renders as a side rail. */
body:has(> .topbar) {
    display: grid;
    grid-template-columns: 232px 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas: "side main" "side foot";
}
body:has(> .topbar) > .topbar  { grid-area: side; }
body:has(> .topbar) > .content { grid-area: main; }
body:has(> .topbar) > .footer  { grid-area: foot; }

.topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    background: var(--pf-primary);
    color: var(--pf-on-brand);
    padding: 18px 14px;
    box-shadow: var(--pf-shadow);
    position: sticky;        /* the rail stays put while the content column scrolls */
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.brand { font-weight: 700; font-size: 18px; color: var(--pf-on-brand); text-decoration: none; letter-spacing: .2px; padding: 2px 10px 16px; }
/* Nav: links stack vertically; hover = the schema gold caption-hover + an inline-start accent edge (mirrors
   the web-client menu's selected/hover treatment). */
.topnav { display: flex; flex-direction: column; gap: 2px; }
.topnav a { color: color-mix(in srgb, var(--pf-on-brand) 80%, transparent); text-decoration: none; padding: 9px 12px;
  border-radius: var(--pf-radius-sm); border-inline-start: 3px solid transparent; white-space: nowrap; }
.topnav a:hover { color: var(--pf-topbar-hover); background: color-mix(in srgb, var(--pf-on-brand) 8%, transparent); border-inline-start-color: var(--pf-topbar-hover); }
/* A delegated admin's management section (ManageNav): a small caption, then its entries; an organization's own pages
   sit indented under it. */
.topnav-head { margin-top: 14px; padding: 4px 12px; font-size: .78em; letter-spacing: .04em;
  color: color-mix(in srgb, var(--pf-on-brand) 55%, transparent); }
.topnav a.nav-org { white-space: normal; }
.topnav a.nav-sub { padding-inline-start: 26px; font-size: .92em; }
/* Identity block: pinned to the bottom of the rail (margin-top:auto), stacked, divided from the nav. */
.userbox { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: auto; padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--pf-on-brand) 18%, transparent); }
.user-name { color: var(--pf-on-brand); opacity: .9; font-size: 13px; padding: 0 4px; }
/* Role chip: a translucent caption-coloured chip on the navy rail; SuperAdmin is distinguished with the gold
   caption-hover colour rather than a hard-coded red (which would clash with the navy rail). */
.role-badge { align-self: flex-start; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--pf-on-brand) 16%, transparent); color: var(--pf-on-brand);
  text-transform: uppercase; letter-spacing: .03em; }
.role-SuperAdmin { background: color-mix(in srgb, var(--pf-topbar-hover) 22%, transparent); color: var(--pf-topbar-hover); }
/* B80: persistent HE/EN toggle in the rail (mirrors the login card toggle). */
.topbar-lang { font-size: 12px; white-space: nowrap; padding: 0 4px; }
.topbar-lang-opt { color: color-mix(in srgb, var(--pf-on-brand) 70%, transparent); text-decoration: none; padding: 2px 5px; }
.topbar-lang-opt:hover { color: var(--pf-on-brand); text-decoration: underline; }
.topbar-lang-opt.is-current { color: var(--pf-topbar-hover); font-weight: 700; }
.topbar-lang-sep { color: color-mix(in srgb, var(--pf-on-brand) 45%, transparent); }
.inline { display: block; margin: 0; }
/* Sign-out: a caption-coloured link button in the rail; gold on hover (matches the nav). */
.link-btn { background: none; border: none; color: color-mix(in srgb, var(--pf-on-brand) 80%, transparent); cursor: pointer; font: inherit; font-size: 14px; padding: 0 4px; text-align: start; }
.link-btn:hover { color: var(--pf-topbar-hover); text-decoration: underline; }
/* INLINE TEXT-LINK ACTION — the portal's ONE recipe, and now its ONE spelling, for "an action that reads as a
   link": sign-out on /login/select-system and /open, cancel on /mfa, /mfa-enroll, /logout, /forgot-password and
   /close-system. ⚠ Until reject 772's review round this control had TWO spellings — `.link-inline` and a bare
   `<a class="muted">` — and they had already drifted apart. Keying the CSS off both would have kept the hazard:
   `.muted` means "de-emphasised secondary TEXT" in ~40 other places in this sheet, so an `a.muted` selector
   turns any FUTURE anchor written with that meaning into a bold brand-coloured action, and the guard's binding
   check (which keys on `.link-inline`) would not have noticed those three anchors regressing if they were ever
   split back into their own rule. Both go away by having the markup use one class: the three cancel anchors
   were moved to `class="link-inline"` (Logout/ForgotPassword/CloseSystem .cshtml) instead.
   Destructive actions (sign out, leave the system) are POST-only — a plain <a> is prefetchable, and a prefetch
   would tear a live session down with nobody having clicked — so those must be a <button>, and `font: inherit`
   makes it inherit from its context the way an <a> does. The underline is deliberate and load-bearing: the
   anchors this replaces carry the browser's default one (nothing in this sheet resets `a` on the gate cards), so
   leaving it off is a visible change to a screen the fix was not meant to touch.

   DevTask 41315 / QA reject 772 — the COLOUR was `--pf-text-muted`, the token reserved for de-emphasised
   SECONDARY TEXT, so on the gate card the only ACTION was the palest text on it: 5.24:1, below the heading's
   11.62:1 and below even the subtitle it sits under (7.27:1). ⚠ That measurement CLEARS AA (4.5:1) and the
   reject's re-reported "≈3.5:1" does NOT reproduce — measured in a real browser on a real Broker, and against
   the DEPLOYED sheet on 192.168.0.98. But the divergence QA is pointing at is real, and it is a fidelity one:
   this surface's bible is the PlatformWeb WEB CLIENT (see the file header), and the client paints exactly this
   control — a <button> that reads as a text link — with the BRAND colour, never the muted one:
     .crosstab-notice__link   client src/styles.css L466-468
     .starting__startfresh    client src/styles.css L544-546  (its own escape-hatch link on a stuck-resume
                                                               screen — the direct analogue of "התנתקות" here)
   both `border:none; background:none; color: var(--brand); font: inherit; font-weight: 600;
   text-decoration: underline`. So this takes the client's COLOUR AND WEIGHT — `--pf-primary` IS the client's
   --brand (:root above) — which lifts the link from 5.24:1 to 11.69:1 on the white card as a side effect.
   ⚠ It is NOT a byte-for-byte copy of the client rule, and two omissions are deliberate:
     • the client's `font-size: 13px` / `padding: 2px 0|6px` are dropped — `font: inherit` is the point here, so
       the control keeps the type of whichever gate card it sits on rather than a fixed size;
     • ⛔ the client's `:hover { color: var(--accent) }` is dropped because the schema orange is ~2.1:1 on white,
       i.e. copying it would introduce the very AA failure this task exists to remove. The rest state carries
       the underline, so no hover colour is needed to identify the control. */
.link-inline { background: none; border: none; padding: 0; margin: 0; font: inherit; font-weight: 600;
  color: var(--pf-primary); cursor: pointer; text-decoration: underline; }

/* Narrow viewport: collapse the rail back to a wrapping top strip so it never crowds the content (folds the
   old B112 top-bar-overflow concern — the strip wraps instead of clipping/scrolling). */
@media (max-width: 860px) {
  body:has(> .topbar) { display: flex; flex-direction: column; }
  .topbar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 18px; height: auto;
    position: static; overflow: visible; padding: 9px 16px; }
  .brand { padding: 0; flex: 0 0 auto; }
  .topnav { flex-direction: row; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; gap: 4px 14px; }
  .topnav a { border-inline-start: none; border-bottom: 2px solid transparent; padding: 6px 2px; border-radius: 0; }
  .topnav a:hover { background: none; border-bottom-color: var(--pf-topbar-hover); }
  .topnav-head { margin-top: 0; padding: 6px 0 6px 0; }
  .topnav a.nav-sub { padding-inline-start: 2px; }
  .userbox { flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: 0; padding-top: 0; border-top: none; gap: 12px; }
  .role-badge { align-self: center; }
  .inline { display: inline; }
}

/* ---- system switcher (web-only): native <details> dropdown, no JS. The summary sits on the navy bar
   (caption-coloured, translucent), its dropdown is a standard light surface popup. ---- */
.sysswitch { position: relative; }
.sysswitch > summary { list-style: none; cursor: pointer; user-select: none; color: var(--pf-on-brand);
  padding: 5px 12px; border: 1px solid color-mix(in srgb, var(--pf-on-brand) 40%, transparent);
  border-radius: var(--pf-radius-sm); background: color-mix(in srgb, var(--pf-on-brand) 10%, transparent); white-space: nowrap; }
.sysswitch > summary::-webkit-details-marker { display: none; }
.sysswitch > summary::after { content: " \25BE"; }
.sysswitch > summary:hover { color: var(--pf-topbar-hover); border-color: var(--pf-topbar-hover); }
.sysswitch[open] > summary { color: var(--pf-on-brand); border-color: var(--pf-topbar-hover); }
.sysswitch-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; max-height: 60vh; overflow: auto; background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: var(--pf-radius); box-shadow: var(--pf-shadow); padding: 6px; z-index: 50; }
.sysswitch-head { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--pf-text-muted); padding: 4px 10px 6px; }
.sysswitch-menu a, .sysswitch-menu .item { display: block; padding: 8px 10px; border-radius: var(--pf-radius-sm); text-decoration: none; color: var(--pf-text); }
.sysswitch-menu a:hover { background: var(--pf-accent-soft); }
.sysswitch-menu .item.muted { cursor: default; }

/* ---- content ---- */
.content { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 24px; }
.footer { text-align: center; color: var(--pf-text-muted); font-size: 12px; padding: 16px; }

h1 { font-size: 22px; margin: 0 0 4px; color: var(--pf-text); }
h2 { font-size: 17px; margin: 24px 0 8px; color: var(--pf-text); }
.subtitle { color: var(--pf-text-muted); margin: 0 0 20px; }

.card {
    background: var(--pf-surface);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-shadow);
    padding: 24px;
    margin-bottom: 20px;
}

/* ---- forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--pf-text-muted); font-size: 12px; margin-top: 4px; }
/* a form refused on the page (nir 2026-11-03: no Platinum user and the "link by the system's login" checkmark off) */
.hint.error-text { color: var(--pf-danger); }
/* The platform-role legend under the identities list (Identities.cshtml, nir 2026-11-03). */
.role-legend { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0 0; font-size: 13px; }
.role-legend dt { font-weight: 600; }
.role-legend dd { margin: 0; color: var(--pf-text-muted); }
@media (max-width: 640px) { .role-legend { grid-template-columns: 1fr; } .role-legend dd { margin-bottom: 6px; } }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=date], select, textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-sm);
    font: inherit;
    background: var(--pf-surface);
    color: var(--pf-text);
}
/* Focus = the web-client field focus: navy border + a soft selection-tint ring (login inputs, styles.css
   L224 / portal.css .login__input:focus). */
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pf-primary); box-shadow: 0 0 0 2px var(--pf-accent-soft); }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.radio-row { display: flex; align-items: center; gap: 8px; }

/* Buttons. Primary = the web-client dialog/wizard primary (navy brand fill + caption text, styles.css L776/
   L847); secondary = the dialog default (light body surface + line border + navy text, hover = selection
   tint, styles.css L845-846). Control radius is the client's 3px. */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: var(--pf-radius-sm);
    border: 1px solid var(--pf-primary);
    background: var(--pf-primary);
    color: var(--pf-primary-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: var(--pf-primary-hover); border-color: var(--pf-primary-hover); }
.btn.secondary { background: var(--pf-surface); color: var(--pf-text); border-color: var(--pf-border); }
.btn.secondary:hover { background: var(--pf-accent-soft); }
.btn.danger { background: var(--pf-danger); border-color: var(--pf-danger); color: #fff; }
.btn.danger:hover { background: var(--pf-danger-hover); border-color: var(--pf-danger-hover); }
.btn.small { padding: 5px 11px; font-size: 12px; font-weight: 500; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* ---- alerts ---- (soft tints derived from the status token via color-mix, so no extra literal colours) */
.alert { padding: 11px 14px; border-radius: var(--pf-radius-sm); margin-bottom: 16px; border: 1px solid transparent; }
.alert.error { background: color-mix(in srgb, var(--pf-danger) 12%, var(--pf-surface)); color: var(--pf-danger); border-color: color-mix(in srgb, var(--pf-danger) 38%, var(--pf-surface)); }
.alert.ok { background: color-mix(in srgb, var(--pf-ok) 12%, var(--pf-surface)); color: var(--pf-ok); border-color: color-mix(in srgb, var(--pf-ok) 35%, var(--pf-surface)); }
.alert.info { background: color-mix(in srgb, var(--pf-primary) 9%, var(--pf-surface)); color: var(--pf-primary); border-color: color-mix(in srgb, var(--pf-primary) 30%, var(--pf-surface)); }
.alert.warn { background: color-mix(in srgb, var(--pf-warn) 13%, var(--pf-surface)); color: var(--pf-warn); border-color: color-mix(in srgb, var(--pf-warn) 38%, var(--pf-surface)); }

/* ---- tables ----
   Web-client DataGrid (styles.css L1506-1518): a gray header bar (--grid-head-bg) with dark navy SemiBold
   header text (NOT uppercase), a single white row surface, horizontal-only row lines (--grid-line), and a
   gold selected/hover row (--grid-sel-row). */
/* Scroll wrapper: a wide grid (many columns + per-row action buttons) must NOT overflow its card frame on a
   narrow viewport — it scrolls horizontally INSIDE the card instead, so the frame always matches its content. */
.table-wrap { width: 100%; overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; background: var(--pf-surface); }
table.grid th, table.grid td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--pf-grid-line); }
table.grid th { font-size: 13px; font-weight: 600; color: var(--pf-grid-head-text); background: var(--pf-grid-head-bg); }
table.grid tr:hover td { background: var(--pf-surface-alt); }
/* C: a label/value table on the detail pages — the label column is a quiet caption, not a grid header. */
/* Sortable column headers (nir 2026-09-28): the header text is the link; the arrow shows the current direction. */
a.sort-th { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
a.sort-th:hover { text-decoration: underline; }
.sort-th__arrow { color: var(--pf-text-muted); font-size: 11px; }
a.sort-th.is-current .sort-th__arrow { color: var(--pf-text); }
table.grid.kv th { background: transparent; color: var(--pf-text-muted); width: 240px; font-weight: 600; }
.muted { color: var(--pf-text-muted); }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.pill.ok { background: color-mix(in srgb, var(--pf-ok) 14%, var(--pf-surface)); color: var(--pf-ok); }
.pill.off { background: var(--pf-surface-alt); color: var(--pf-text-muted); }
.pill.warn { background: color-mix(in srgb, var(--pf-warn) 16%, var(--pf-surface)); color: var(--pf-warn); }
/* Warm-pool (infrastructure spare) — muted, bordered: reads as "intentional, not a problem". */
.pill.warm { background: var(--pf-surface-alt); color: var(--pf-text-muted); border: 1px solid var(--pf-border); }
/* Establishing/binding (transient in-progress) — a soft brand-tint info pill. */
.pill.info { background: var(--pf-accent-soft); color: var(--pf-primary); }
/* The muted "no system / not bound" sub-line under a system-less host's System cell. */
.system-none { font-size: 12px; margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
/* Per-row action buttons: the AJAX test-connection result sits on its own full-width line below the buttons. */
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* B: the search + filter row above a server-paged grid. Controls size to content; the search box takes the rest. */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filterbar select, .filterbar input { width: auto; }
.filterbar .filterbar__q { flex: 1 1 240px; }
.filterbar .pf-combo__input { width: 100%; }   /* a picker in a filter bar fills its own box (beats .filterbar input) */
/* F: the admin dashboard — a responsive grid of number tiles + the "needs attention" list. Theme tokens only. */
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.dash-tiles .card { margin-bottom: 0; }
a.dash-tile { color: inherit; text-decoration: none; }
a.dash-tile:hover { border-color: var(--pf-primary); }
.dash-tile__label { font-size: 13px; font-weight: 600; color: var(--pf-text-muted); }
.dash-tile__value { font-size: 30px; font-weight: 700; color: var(--pf-text); margin: 6px 0; }
.dash-alerts { list-style: none; margin: 0; padding: 0; }
.dash-alerts li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--pf-grid-line); }
.dash-alerts li:last-child { border-bottom: 0; }
.row-actions .conntest-result { flex-basis: 100%; }
/* The action buttons themselves are a TIGHT, single-line ICON group (no wrap) so each row stays short and the
   grid's min-content width no longer balloons from wide text buttons. The outer .row-actions still wraps, which
   lets the AJAX result drop below the icon strip. */
.icon-actions { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; }
/* Compact icon button: a square control sized to a single glyph (replaces the old `.btn.small` text buttons in
   the Systems list). Reuses the web-client secondary-control treatment from .btn.secondary — light body surface,
   line border, navy text, selection-tint hover, control radius — so it matches the rest of the admin chrome with
   no new colours. */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-sm);
    background: var(--pf-surface);
    color: var(--pf-text);
    cursor: pointer;
    text-decoration: none;
    flex: 0 0 auto;
}
.icon-btn:hover { background: var(--pf-accent-soft); }
.icon-btn:disabled { opacity: .5; cursor: not-allowed; }
/* A disabled text button (e.g. the last-admin Remove / Revoke) must LOOK unavailable too, like .icon-btn above. */
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn .icon { width: 16px; height: 16px; display: block; fill: currentColor; }
/* Delete stays danger-tinted (matches the old `.btn.small.danger`), via the --pf-danger theme token. */
.icon-btn.danger { color: var(--pf-danger); border-color: color-mix(in srgb, var(--pf-danger) 40%, var(--pf-border)); }
.icon-btn.danger:hover { background: color-mix(in srgb, var(--pf-danger) 12%, var(--pf-surface)); border-color: var(--pf-danger); }

/* ---- filterable combobox (admin Grants user-mapping picker) ----
   A type-to-filter dropdown for the system's odpl_LoginUsers (270-310+ rows make a plain <select> unusable).
   Greenfield admin surface (GR#1 framing — see file header): styled to the portal's web-client chrome, every
   colour a --pf-* custom property. The text input reuses the standard portal input metrics; the popup mirrors
   the .sysswitch-menu look. */
.pf-combo { position: relative; }
.pf-combo__input { width: 100%; padding: 8px 11px; border: 1px solid var(--pf-border); border-radius: var(--pf-radius-sm);
  font: inherit; background: var(--pf-surface); color: var(--pf-text); }
.pf-combo__input:focus { outline: none; border-color: var(--pf-primary); box-shadow: 0 0 0 2px var(--pf-accent-soft); }
.pf-combo__input:disabled { background: var(--pf-surface-alt); color: var(--pf-text-muted); cursor: not-allowed; }
.pf-combo__list { position: absolute; z-index: 50; inset-inline: 0; top: calc(100% + 4px);
  max-height: 290px; overflow: auto; margin: 0; padding: 4px; list-style: none;
  background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: var(--pf-radius); box-shadow: var(--pf-shadow); }
.pf-combo__list[hidden] { display: none; }
.pf-combo__option { display: flex; align-items: baseline; gap: 8px; padding: 7px 9px; border-radius: var(--pf-radius-sm); cursor: pointer; }
.pf-combo__option:hover, .pf-combo__option.is-active { background: var(--pf-accent-soft); }
/* DevTask 41315 — the highlighted row's secondary spans (.pf-combo__id 12px, .pf-combo__name 13px, the italic
   .pf-combo__option--none) would be 3.89:1 on this tint. They are NOT handled here: the AA guard next to :root
   redefines --pf-text-muted on every tint-painting element, so they resolve to --pf-text = 8.63:1 by
   inheritance. Nothing per-element to maintain — that is the point of doing it there. */
.pf-combo__option--none { color: var(--pf-text-muted); font-style: italic; }
.pf-combo__login { font-weight: 600; color: var(--pf-text); }
.pf-combo__id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--pf-text-muted); }
.pf-combo__name { color: var(--pf-text-muted); font-size: 13px; margin-inline-start: auto; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pf-combo__empty { padding: 7px 9px; color: var(--pf-text-muted); font-style: italic; }
/* pf-picker (wwwroot/js/pf-picker.js) — the shared type-to-choose box. A row is two lines: the main text (+ a mono
   badge such as the system id, + a state pill) and a muted secondary line (the email, the organization). The typed
   text is marked by weight + underline, NOT a tint, so it reads the same on the hover row and stays out of the AA
   guard's tint list above. */
.pf-combo__input { padding-inline-end: 30px; }
.pf-combo__option { flex-direction: column; align-items: stretch; gap: 1px; }
.pf-combo__main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pf-combo__main .pf-combo__login { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-combo__main .pf-combo__id { flex: 0 0 auto; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.pf-combo__list { min-width: 320px; }
.pf-combo__main .pill { font-size: 11px; padding: 0 6px; }
.pf-combo__sec { color: var(--pf-text-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-combo__hit { background: transparent; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.pf-combo__more { padding: 6px 9px 3px; color: var(--pf-text-muted); font-size: 12px; border-top: 1px solid var(--pf-border); margin-top: 4px; }
.pf-combo__clear { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); display: none;
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--pf-radius-sm); background: transparent;
  color: var(--pf-text-muted); font-size: 17px; line-height: 1; cursor: pointer; }
.pf-combo__clear:hover { color: var(--pf-text); }
.pf-combo.has-value .pf-combo__clear { display: block; }
.pf-combo.is-invalid .pf-combo__input { border-color: var(--pf-danger); }
.pf-combo.is-invalid .pf-combo__input:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pf-danger) 22%, transparent); }

/* /manage/person — the per-person access grid. A changed / new row is marked by a bar at its start edge (no tint, so
   no text sits on a new background colour); a row set to "remove" strikes its system name. */
.person-grid tr.is-changed td:first-child, .person-grid tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--pf-accent); }
html[dir="rtl"] .person-grid tr.is-changed td:first-child, html[dir="rtl"] .person-grid tr.is-new td:first-child { box-shadow: inset -3px 0 0 var(--pf-accent); }
.person-grid tr.is-removed td:first-child strong { text-decoration: line-through; }
.person-grid tr.is-flash td { outline: 2px solid var(--pf-accent); outline-offset: -2px; }
.person-grid select { min-width: 150px; }

/* the delete-a-user card (shared partial _DeletePerson): a danger-coloured edge, no tint behind text. */
.card.danger-zone { border-color: var(--pf-danger); }

/* /manage/grid — the organization's users x systems grid. The person column stays put while the systems scroll
   sideways; a changed cell carries the same start-edge bar as the person page (no tint). */
.grid-wrap { overflow-x: auto; }
.access-grid th.ag-sys { min-width: 118px; max-width: 160px; vertical-align: bottom; white-space: normal; font-weight: 600; }
.access-grid th.ag-sys a { display: block; overflow: hidden; text-overflow: ellipsis; }
.access-grid th.ag-sys .mono { display: block; font-size: 11px; font-weight: normal; overflow: hidden; text-overflow: ellipsis; }
.access-grid .ag-person { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--pf-surface); min-width: 210px; }
.access-grid thead .ag-person { background: inherit; }
.access-grid .ag-sel { width: 34px; text-align: center; }
.access-grid td.ag-cell { text-align: center; white-space: nowrap; }
.access-grid select.ag-kind { width: 100%; min-width: 96px; padding: 4px 6px; font-size: 13px; }
.access-grid td.is-changed { box-shadow: inset 3px 0 0 var(--pf-accent); }
html[dir="rtl"] .access-grid td.is-changed { box-shadow: inset -3px 0 0 var(--pf-accent); }
.access-grid .ag-blocked { display: block; margin: 3px auto 0; width: fit-content; font-size: 11px; }
.grid-bulk { margin-bottom: 12px; }
.grid-colnav { margin-bottom: 10px; }

/* ---- auth (login/mfa/reset) centered card ---- */
.auth-shell { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .card { padding: 28px; }
.auth-logo { text-align: center; font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.code-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.code-grid span { background: var(--pf-surface-alt); border: 1px solid var(--pf-border); border-radius: 4px; padding: 6px 10px; text-align: center; letter-spacing: .08em; }
.qr { display: block; margin: 10px auto; border: 1px solid var(--pf-border); border-radius: 6px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.center { text-align: center; }

/* =====================================================================================
   LOGIN GATE — pixel-port of the web-client login (web/Odcanit.Platinum.Web.Client:
   src/components/LoginView.tsx + src/styles.css ".login__*" L1659-1713 + OdcanitLogoFull.tsx).
   The login (and the gates that share its card) is the SINGLE documented exception to the
   no-hard-coded-text/colour ground rules, so the web-client's literal theme values are inlined
   verbatim here (resolved from src/styles.css :root: --brand/--bg #24356B, --text #22366B,
   --line #DCDCDC, --sel #DDDEE0) to MATCH the client exactly. Cited inline per rule.
   ===================================================================================== */
.login { min-height: 100vh; display: grid; place-items: center;        /* styles.css L1660 */
  background: linear-gradient(135deg, #24356B 0%, #1a2750 100%); }
/* two-panel card (WPF LoginDialog): form panel + navy-gradient logo panel. Force LTR + row-reverse so the
   form (first child) is on the RIGHT and the logo panel on the LEFT, matching the web client.  L1664
   ⚠ `direction: ltr` here is PURELY a layout device for that row-reverse pairing — it must never reach TEXT.
   It INHERITS into every child, so any child that renders localized copy has to re-establish the page
   direction itself with dir="@dir" in the markup (that is why .login__form carries it). A child that forgets
   lays Hebrew out in an LTR bidi paragraph, and trailing NEUTRALS (…, ., :, ?) then resolve to the paragraph
   direction and jump to the wrong side of the phrase — the reported "טוען מערכת…" ellipsis bug on
   .sys-loading-overlay, which is a direct child of this card and had no dir. */
.login__card { display: flex; direction: ltr; flex-direction: row-reverse; width: 800px; max-width: 96vw; min-height: 520px;
  background: #fff; border-radius: 16px; box-shadow: 0 18px 60px rgba(0,0,0,.4); overflow: hidden; }
.login__form { flex: 1 1 480px; display: flex; flex-direction: column; padding: 70px 44px 60px; }  /* L1666 */
.login__welcome { margin: 0; font-size: 36px; font-weight: 700; color: #22366B; }                  /* L1667 */
.login__solution { font-size: 20px; color: #22366B; margin: 2px 0 18px; }                          /* L1668 */
.login__hint { margin: 0 0 18px; font-size: 13px; color: #22366B; }                                /* L1669 */
.login__row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; margin-bottom: 14px; } /* L1670 */
.login__label { font-size: 13px; color: #22366B; }                                                 /* L1671 */
.login__pwd { position: relative; display: flex; }                                                 /* L1672 */
.login__pwd .login__input { flex: 1; padding-inline-end: 28px; }                                   /* L1673 */
.login__reveal { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); /* L1674 */
  border: none; background: none; cursor: pointer; font-size: 14px; opacity: .6; padding: 0 2px; line-height: 1; }
.login__reveal:hover { opacity: 1; }                                                               /* L1676 */
.login__input { width: 100%; height: 28px; padding: 0 8px; border: 1px solid #DCDCDC; border-radius: 3px; background: #fff; font-size: 14px; } /* L1677 */
.login__input:focus { outline: none; border-color: #24356B; box-shadow: 0 0 0 2px #DDDEE0; }       /* L1678 */
.login__license { margin-top: auto; font-size: 13px; color: #22366B; }                             /* L1679 */
/* DevTask 41315 — the client's login-error red #F14722 measures 3.70:1 on the white card, and 14px/700 is
   NOT WCAG "large text" (that starts at 18.66px bold), so the sign-in failure message itself failed AA on the
   very screen QA screenshotted. Same 80% darkening as --pf-danger above (5.44:1), so the two reds stay one
   colour across the portal. Login is the documented literal-colour exception; this is that literal, corrected. */
.login__error { margin-top: auto; font-size: 14px; color: #C1391B; font-weight: 700; padding: 5px 0; } /* L1680 */
.login__buttons { display: flex; gap: 10px; margin-top: 16px; }                                    /* L1681 */
.login__btn { padding: 7px 22px; border: 1px solid #DCDCDC; border-radius: 3px; background: #f3f4f6; color: #22366B; /* L1682 */
  font-size: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.login__btn:hover:not(:disabled) { background: #e6e9f2; }                                           /* L1684 */
.login__btn:disabled { opacity: .5; cursor: not-allowed; }                                          /* L1685 */
.login__btn--primary { background: #24356B; color: #fff; border-color: #24356B; font-weight: 600; } /* L1686 */
.login__btn--primary:hover:not(:disabled) { background: #2c4286; }                                  /* L1687 */

/* CP-50d — external-IdP "Sign in with…" buttons. Login is the SINGLE documented text/colour exception, so the
   official brand SVG marks (and Apple's HIG outlined button) are permitted here. Styled on-brand with the login
   card: same 3px radius / #DCDCDC border / 14px as .login__btn, navy #22366B text shared by all three, full-width stacked under an
   "or sign in with" divider. Reference = this portal login (Login.cshtml); login is a host-shell feature with no
   WPF twin (like login/splash). Rendered only when a provider is enabled+configured (LoginModel.ExternalProviders). */
.login__divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: #22366B; font-size: 12px; }
.login__divider::before, .login__divider::after { content: ""; flex: 1; height: 1px; background: #DCDCDC; }
.login__providers { display: flex; flex-direction: column; gap: 8px; }
.login__idp { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 8px 14px; border: 1px solid #DCDCDC; border-radius: 3px; background: #fff; color: #22366B;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.login__idp:hover { background: #f3f4f6; }
.login__idp-mark { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
/* nir 2026-10-24 — the marks did not line up (each sat beside a centred label of a different length). Pinned to the
   button's inline start instead, all in one column, with the label still centred (as Dropbox Dash / ElevenLabs do). */
.login__idp { padding-inline: 44px; }
.login__idp .login__idp-mark { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); }
.login__idp-label { line-height: 1; }
/* Apple Sign-in HIG, "white with outline" style (nir 2026-10-24: the solid black button read as already selected): white
   button with a black mark (fill: currentColor). The label is the same navy as Microsoft and Google (nir 2026-10-24,
   after Mobbin: every reference uses one text colour for every provider). */
.login__idp--apple .login__idp-mark { color: #000; }
/* Design 4b — the providers come FIRST when enabled, so the divider sits between them and the email form. */
.login__providers + .login__divider { margin: 16px 0 14px; }
/* Design 4b — "last used" marker, a small navy tab sitting on the TOP EDGE of the method this browser used last: the
   provider button, or the email field for the password (nir 2026-10-24, after Mobbin: Matter's corner badge + Clerk /
   ElevenLabs marking the email field). Outside the button's text so it neither squeezes the label nor reads as a
   second control; the button itself stays white so it does not look already selected. */
.login__idp, .login__marked { position: relative; }
.login__marked { display: block; }
.login__marked > .login__input { width: 100%; box-sizing: border-box; }
.login__lastused { position: absolute; top: 0; inset-inline-end: 10px; transform: translateY(-50%);
  padding: 0 7px; border-radius: 8px; background: #22366B; color: #fff;
  font-size: 10.5px; font-weight: 600; line-height: 16px; white-space: nowrap; pointer-events: none; }
/* nir 2026-10-23 — the sign-in relay is down: the provider buttons stay visible but greyed and inert (no href, so not a
   link and not in the tab order), with a one-line note; email + password below is unaffected. */
.login__idp.is-disabled { cursor: not-allowed; }
.login__idp.is-disabled:hover { background: #fff; }
/* nir 2026-10-24 — only the mark and label are dimmed; the "Unavailable" tab stays fully legible (grey, not navy, so
   it does not read like "last used"). */
.login__idp.is-disabled .login__idp-mark, .login__idp.is-disabled .login__idp-label { opacity: .45; filter: grayscale(1); }
.login__lastused--off { background: #6B7280; }
.login__idp-unavailable { margin: 8px 0 0; font-size: 12px; color: #22366B; }

/* navy-gradient logo panel (styles.css L1688-1693) */
.login__brandpanel { flex: 0 0 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(180deg, #7991CF 0%, #576EA7 70%, #20356A 100%); }
.login__brandlogo { display: flex; }
.login__brandlogo .logo-full__mark { height: 150px; width: auto; filter: drop-shadow(2px 2px 2px rgba(0,0,0,.35)); }
.login__tagline { color: #fff; font-size: 14px; font-weight: 600; text-align: center; }
/* Orange paint-stroke under the brand (WPF LoginDialog.xaml L322-323: last StackPanel child, Fill #DA5324,
   Opacity 0.7, Stretch=Uniform, Margin 55,5,50,0). Width keeps the WPF stroke:logo ratio (~1.04 of the
   150px-tall logo's ~174px width); the flex `gap:16px` is tightened toward WPF's 5px stroke gap via margin-top. */
.login__brandstroke { display: block; width: 181px; height: auto; opacity: .7; margin-top: -8px; }

/* The gates that share the login card (mfa / enrol / reset / forgot / select-system) reuse the same
   card shell but carry standard portal form blocks (.field/.alert/.btn/.code-grid/.qr) in the form panel,
   so give them a roomier scrollable panel and let those blocks sit at the panel's natural width. */
.login__form--gate { justify-content: flex-start; padding: 48px 44px; gap: 0; max-height: 92vh; overflow: auto; }
.login__form--gate h1 { font-size: 26px; margin: 0 0 6px; color: #22366B; }
.login__form--gate .subtitle { color: #4b5675; margin: 0 0 18px; }
.login__form--gate .field label { color: #22366B; }
.login__form--gate .actions { margin-top: 16px; }
.login__form--gate .qr { margin: 12px 0; }

/* MFA enrolment (MfaEnroll.cshtml) — nir 2026-11-15: on a laptop (Edge in an RDP window) the stacked page was
   ~1,150px tall in a ~700px panel and the user had to scroll to the code box. On a wide window the card widens
   (960px) and its brand panel narrows (240px), so the form panel holds two columns: the scan (QR + manual key)
   beside the recovery codes + the code box. Measured with headless Chromium on the real page: it then fits
   1366x768, 1280x720 and both at 125% zoom (1093x614 / 1024x576 CSS px) with no scroll. Below 1000px the
   columns stack again (a 2-column split there leaves each column too narrow for one 19-char code), and the
   phone layout (≤720px, above) is unchanged. Literal values follow the login exception (this block's #22366B
   ramp and the shared .alert.warn / .code-grid tokens); nothing new is introduced. */
.enrol__step { margin: 0; }
.enrol .qr { margin: 10px auto; }
.enrol .hint { margin: 0; }
.enrol__key { word-break: break-all; }
.enrol__codes { padding: 10px 12px; margin-bottom: 12px; }
.enrol__codes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.enrol__codes .hint { font-size: 12px; margin: 2px 0 8px; }
.enrol__copy { font-size: 12px; white-space: nowrap; }
.enrol .code-grid { gap: 4px; font-size: 12px; }
.enrol .code-grid span { padding: 2px 4px; letter-spacing: 0; white-space: nowrap; }
.enrol .field { margin-bottom: 0; }
.enrol .actions { margin-top: 12px; }
/* The wide card + two columns apply only on a wide window that is not the touch-landscape phone arm of the
   responsive block below, whose rules these more specific selectors would otherwise override. */
@media (min-width: 1000px) and (pointer: fine), (min-width: 1000px) and (min-height: 561px) {
  .login__card--enrol { width: 960px; }
  .login__card--enrol .login__brandpanel { flex-basis: 240px; }
  .login__card--enrol .login__brandlogo .logo-full__mark { height: 120px; }
  .login__card--enrol .login__brandstroke { width: 145px; }
  .login__card--enrol .login__form--gate { padding: 28px 36px 22px; }
  .login__card--enrol .subtitle { margin-bottom: 14px; }
  .login__card--enrol .login__lang { margin-top: 14px; padding-top: 10px; }
  .enrol--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
}

/* System-select combobox (login/select-system) — reproduces the web client's styled native <select>
   (styles.css .calc-dialog__select L1410 + .filter__op L1289: 1px #DCDCDC border, radius 6px, 13px,
   white bg, navy text). Keeps the native picker affordance; focus ring matches the login inputs. */
.login__select-label { color: #22366B; }
.login__select { width: 100%; padding: 6px 8px; border: 1px solid #DCDCDC; border-radius: 6px; font-size: 13px;
  background: #fff; color: #22366B; font-family: inherit; }
.login__select:focus { outline: none; border-color: #24356B; box-shadow: 0 0 0 2px #DDDEE0; }

/* HE/EN language toggle at the bottom of the login card (default Hebrew). */
.login__lang { margin-top: 18px; padding-top: 12px; border-top: 1px solid #eceef3; text-align: center; font-size: 12px; }
/* DevTask 41315 / QA reject 766 — WCAG 2 AA "color-contrast" on the toggle QA named ("טקסט 'עברית'").
   The un-selected option used to be dimmed with `opacity: .6`, which composites #22366B over the white card
   to #7A86A6 = 3.61:1, under the 4.5:1 floor. Deriving a TEXT colour by dimming is the root cause (it is the
   same mistake as the muted token above), so the dimming is replaced by an explicit colour: #606E94 is
   exactly what opacity .72 would have composited to — visually the same "secondary" weight — and measures
   5.05:1 on the #fff card. `opacity` now carries no colour meaning here. Login is the single documented
   hard-coded-colour exception, so these stay literals, on the #22366B ramp the block already uses.
   The "·" separator is likewise raised off #9aa3bf (2.51:1) to the same family. */
.login__lang-opt { color: #606E94; text-decoration: none; padding: 2px 5px; }
.login__lang-opt:hover { color: #24356B; text-decoration: underline; }
.login__lang-opt.is-current { font-weight: 700; color: #24356B; }
.login__lang-sep { color: #6C7286; }

/* Responsive: single full-screen column — compact navy logo header on top, form below.  L1695-1713
   The short-height arm is for a touch device only (a landscape phone), as the web client's own PHONE_QUERY
   (hooks/useViewport.ts) scopes it: `(pointer: coarse) and (max-height: 560px)`. A bare `(max-height: 560px)`
   also caught a wide DESKTOP window that is merely short in CSS px — e.g. Edge at 150% zoom with an info bar
   open — and stretched the form edge to edge across the whole window (reporter Julia, Edge). On a desktop
   pointer a short window keeps the 800px card and the page scrolls. */
@media (max-width: 720px), (pointer: coarse) and (max-height: 560px) {
  .login { padding: 0; place-items: stretch; }
  .login__card { flex-direction: column-reverse; width: 100%; max-width: 100%; min-height: 100vh; min-height: 100dvh; border-radius: 0; }
  .login__brandpanel { flex: 0 0 auto; padding: 20px 16px; gap: 8px; }
  .login__brandlogo .logo-full__mark { height: 64px; }
  .login__tagline { font-size: 13px; }
  .login__brandstroke { width: 77px; margin-top: -4px; }
  .login__form { flex: 1 1 auto; overflow: auto; padding: 24px 20px 28px; }
  .login__form--gate { padding: 24px 20px 28px; max-height: none; }
  .login__welcome { font-size: 26px; }
  .login__solution { font-size: 17px; margin-bottom: 12px; }
  .login__row { grid-template-columns: 84px 1fr; }
  /* On the full-height phone card the form is `flex: 1 1 auto`, so the desktop rule
     `.login__license/.login__error { margin-top: auto }` (L347-348, which bottom-anchors the license + button
     cluster inside the fixed 520px desktop card) instead pushed the button row to the very bottom of the tall
     viewport — a large empty gap that dropped the אישור/היכנס login buttons below the fold, reachable only by
     scrolling (reporter Julia, Android; measured margin-top:468.78px → button at ~846px in a 960px viewport).
     Neutralize the auto push here so license + buttons flow directly under the fields, visible without scroll.
     Desktop keeps its bottom-anchored 520px layout, matching WPF LoginDialog.xaml (fixed Height=520 card,
     buttons right after the license row). Mirrors the web-client SPA fix (styles.css, bug-3c7d5a78 ff711c6) —
     the portal reuses the same .login__* structure and had the same at-rest below-the-fold. */
  .login__license, .login__error { margin-top: 12px; }
}
/* nir 2026-11-07 (iPhone, Edge): the sign-in page OPENED zoomed in and scrolled. Login.cshtml autofocuses the
   email field, and iOS zooms the page in on focus of any field whose text is under 16px (it was 14px), then never
   zooms back. Measured: activeElement on load = input#Email at 14px; no element wider than the viewport; viewport
   meta = width=device-width, initial-scale=1.0. 16px on a touch pointer stops the zoom on load AND on every tap,
   keeps autofocus (desktop keyboard users rely on it) and leaves user zoom enabled. A mouse pointer is unchanged.
   Bare `input, select, textarea` + !important, NOT a list of classes or input types: every field in the portal
   (.login__input, the system picker .login__select on SelectSystem.cshtml, .access-grid select.ag-kind, and any
   field added later) has to be 16px on touch, and a class rule elsewhere must not be able to win it back. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
@media (max-width: 380px) {
  .login__row { grid-template-columns: 1fr; gap: 4px; }
  .login__buttons { flex-direction: column; }
  .login__btn { width: 100%; }
}

/* ====================================================================================================
   B102 — host-metrics graphs on the running-hosts console. Greenfield platform-edge surface (no WPF
   equivalent); per the no-hardcoded-colors rule EVERY colour below is a --pf-* theme variable, so a
   real schema/theme override recolours the graphs without touching this block.
   ==================================================================================================== */
.metrics-windowbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.metrics-windowbar .label { color: var(--pf-text-muted); font-size: 12px; }
.metrics-window-opt { display: inline-block; padding: 4px 10px; border: 1px solid var(--pf-border); border-radius: 999px; text-decoration: none; color: var(--pf-text-muted); font-size: 12px; background: var(--pf-surface); }
.metrics-window-opt:hover { color: var(--pf-text); background: var(--pf-surface-alt); }
.metrics-window-opt.is-current { color: var(--pf-primary); border-color: var(--pf-primary); background: var(--pf-accent-soft); font-weight: 600; }

.metrics-gauges { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.metrics-gauge { flex: 1 1 180px; border: 1px solid var(--pf-border); border-radius: var(--pf-radius); padding: 12px 14px; background: var(--pf-surface-alt); }
.metrics-gauge .g-label { color: var(--pf-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.metrics-gauge .g-value { font-size: 22px; font-weight: 700; margin-top: 2px; }
.metrics-gauge .g-sub { color: var(--pf-text-muted); font-size: 12px; margin-top: 2px; }

.metrics-charts { display: flex; flex-wrap: wrap; gap: 16px; }
.metrics-chart { flex: 1 1 380px; min-width: 300px; }
.metrics-chart h3 { font-size: 13px; margin: 0 0 6px; color: var(--pf-text); font-weight: 600; }
.metrics-chart .chart-svg { width: 100%; height: 130px; display: block; background: var(--pf-surface-alt); border: 1px solid var(--pf-border); border-radius: 6px; }
.metrics-chart .chart-axis { color: var(--pf-text-muted); font-size: 11px; display: flex; justify-content: space-between; margin-top: 2px; }

/* SVG series strokes/fills — all theme vars (style attr so CSS custom props resolve in SVG). */
.metrics-svg-grid { stroke: var(--pf-border); stroke-width: 1; }
.metrics-svg-mem { fill: none; stroke: var(--pf-primary); stroke-width: 2; }
.metrics-svg-mem-fill { fill: var(--pf-accent-soft); stroke: none; }
.metrics-svg-priv { fill: none; stroke: var(--pf-ok); stroke-width: 1.5; stroke-dasharray: 4 3; }
.metrics-svg-cpu { fill: none; stroke: var(--pf-warn); stroke-width: 2; }

.metrics-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--pf-text-muted); margin-top: 4px; }
.metrics-legend .swatch { display: inline-block; width: 12px; height: 3px; vertical-align: middle; margin-right: 4px; }

/* per-host bars */
.metrics-hosts { margin-top: 18px; }
.metrics-hosts h3 { font-size: 13px; margin: 0 0 8px; font-weight: 600; }
.metrics-hostrow { display: grid; grid-template-columns: 200px 1fr 1fr; gap: 12px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--pf-border); }
.metrics-hostrow .h-id { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metrics-hostrow .h-id .muted { color: var(--pf-text-muted); }
/* Bar + value cell: the numeric label lives in its OWN column outside the track, so the
   fill never overlaps it (was an absolute overlay -> dark-on-navy when near full / clipped). */
.metrics-metric { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.metrics-bar { position: relative; height: 16px; background: var(--pf-surface-alt); border: 1px solid var(--pf-border); border-radius: 4px; overflow: hidden; }
.metrics-bar .fill { position: absolute; inset-block: 0; inset-inline-start: 0; }
.metrics-bar .fill.mem { background: var(--pf-primary); }
.metrics-bar .fill.cpu { background: var(--pf-warn); }
.metrics-metric .bar-text { font-size: 11px; line-height: 16px; color: var(--pf-text); white-space: nowrap; min-width: 64px; text-align: start; font-variant-numeric: tabular-nums; }
.metrics-barhead { display: grid; grid-template-columns: 200px 1fr 1fr; gap: 12px; font-size: 11px; color: var(--pf-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.metrics-empty { color: var(--pf-text-muted); font-size: 13px; }

/* =====================================================================================
   System-select "opening a system" LOADING SIGNAL (login/select-system → המשך / Continue).
   The POST to /open cold-spawns a RuntimeHost (can take several seconds); previously the only
   feedback was the tiny browser-tab spinner. On submit we IMMEDIATELY (a) turn the Continue
   button into a disabled spinner button and (b) drop a full-card overlay 'טוען מערכת…' so the
   press is obviously registered. All colours come from the schema tokens (brand navy / on-brand),
   never a literal — matching the login card. Web-only surface (no WPF twin — see SelectSystem.cshtml).
   ===================================================================================== */
/* Spinner glyph — a 1px conic ring in the brand colour; `currentColor` so it inherits the host's
   text colour (on-brand white inside the button, brand navy on the light overlay). */
@keyframes pf-spin { to { transform: rotate(360deg); } }
.pf-spinner {
  display: inline-block; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor; box-sizing: border-box;
  animation: pf-spin .7s linear infinite;
}

/* Busy Continue button: keep the brand fill but show a leading spinner + block re-clicks.
   :disabled already dims cursor; we hold full opacity so it still reads as "actively working". */
.btn.is-busy { position: relative; cursor: progress; opacity: 1; }
.btn.is-busy .pf-spinner { vertical-align: -2px; margin-inline-end: 8px; }
/* The same busy state on the login card's own buttons (busy-submit.js): .login__btn:disabled would dim it to .5,
   and the external-IdP links are flex rows that already space their children with `gap`. */
.login__btn.is-busy { cursor: progress; opacity: 1; gap: 8px; }
.login__idp.is-busy { cursor: progress; }

/* Full login-card overlay. Absolutely covers the card (the card is position:relative below), a soft
   surface veil with the spinner + 'טוען מערכת…' caption centred, so the whole step reads as loading. */
.login__card { position: relative; }
.sys-loading-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: color-mix(in srgb, var(--pf-surface) 82%, transparent);
  backdrop-filter: blur(1.5px);
  color: var(--pf-primary);
}
/* Keep the `hidden` attribute authoritative — a bare `display:flex` above would otherwise beat `[hidden]`'s
   display:none and leave the overlay covering (and blocking clicks on) the card at rest. */
.sys-loading-overlay[hidden] { display: none; }
.sys-loading-overlay .pf-spinner { width: 40px; height: 40px; border-width: 3px; }
.sys-loading-overlay .sys-loading-text { font-size: 16px; font-weight: 600; color: var(--pf-primary); }

/* Respect reduced-motion: drop the spin animation (the disabled button + overlay text still signal busy). */
@media (prefers-reduced-motion: reduce) {
  .pf-spinner { animation: none; }
}

/* nir 2026-09-29: breadcrumbs (layout) - theme tokens only. */
.breadcrumbs { margin: 0 0 10px; font-size: 13px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; color: var(--pf-text-muted); }
.breadcrumbs li + li::before { content: "/"; color: var(--pf-text-muted); }
.breadcrumbs a { color: var(--pf-primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--pf-text); font-weight: 600; }

/* ---- The super-admin onboarding wizard, /admin/setup (nir 2026-11-15, ruled design option A). Greenfield portal
   surface (no WPF equivalent); every colour is a :root token above. Layout idea: a readiness checklist with a progress
   bar and one action per row (outside references in the design brief, supervisor/inbox/assets/e-admin-onboarding). */
.topnav a.topnav-setup { color: var(--pf-topbar-hover); font-weight: 700; }
.setup-banner { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.setup-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; }
.setup-bar { flex: 1 1 160px; min-width: 120px; height: 8px; border-radius: 999px; background: var(--pf-surface-alt); border: 1px solid var(--pf-border); overflow: hidden; }
.setup-bar > span { display: block; height: 100%; background: var(--pf-ok); }
.setup-group { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--pf-text-muted); margin: 18px 0 2px; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--pf-grid-line); }
.setup-row:last-child { border-bottom: 0; }
.setup-row.is-current { background: color-mix(in srgb, var(--pf-accent) 6%, var(--pf-surface)); margin: 0 -16px; padding: 12px 16px; }
.setup-ico { flex: 0 0 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
    border: 2px solid var(--pf-border); color: var(--pf-text-muted); background: var(--pf-surface); }
.setup-ico.done { background: var(--pf-ok); border-color: var(--pf-ok); color: var(--pf-primary-text); }
.setup-ico.cur { border-color: var(--pf-accent); color: var(--pf-accent); }
.setup-ico.skip { border-style: dashed; }
.setup-main { flex: 1; min-width: 0; }
.setup-title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.setup-title a { color: inherit; text-decoration: none; }
.setup-title a:hover { text-decoration: underline; }
.setup-desc { color: var(--pf-text-muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.setup-detail { margin-top: 10px; }
.setup-why { font-size: 13px; margin: 0 0 10px; }
.setup-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.setup-two select { width: 100%; }
.setup-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.setup-act { flex: 0 0 auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.setup-act form.inline, .setup-progress form.inline { display: inline; margin: 0; }
@media (max-width: 640px) {
    .setup-row { flex-wrap: wrap; }
    .setup-act { width: 100%; padding-inline-start: 38px; }
    .setup-two { grid-template-columns: 1fr; }
}
