/* Public security journeys (sign-in, MFA, recovery, consent, invitations, setup): static SSR; one first-party enhancement script (35.10 amendment, 36.39 item 15).
   Colours come from the NexerIQ design tokens (nexeriq-tokens.css, linked before this file; owner 2026-11-08, work-0177): the --nx-* names below are
   aliases of --nexeriq-* for the parts the tokens cover. Only the brand column / account bar palette and the WCAG 1.4.11 field border stay local. */

:root {
    --nx-navy: #081B43;
    --nx-blue: #1E6BFF;
    --nx-cyan: #23C7F6;
    --nx-slate: #8A97B2;
    --nx-cloud: #F4F7FB;
    --nx-white: #FFFFFF;

    --nx-page: var(--nexeriq-bg);
    --nx-surface: var(--nexeriq-surface);
    --nx-text: var(--nexeriq-text);
    --nx-muted: var(--nexeriq-muted);
    --nx-line: var(--nexeriq-border);
    /* Input borders (WCAG 1.4.11, >= 3:1): the token --nexeriq-border-strong is 1.5:1, so the field border stays local: #6F7D9A is 4.14:1 on white inputs. */
    --nx-field-border: #6F7D9A;
    --nx-panel-edge: transparent;
    --nx-link: var(--nexeriq-link);
    --nx-focus: var(--nexeriq-focus);
    --nx-danger: var(--nexeriq-danger-text);
    --nx-danger-bg: var(--nexeriq-danger-subtle);
    --nx-chip-bg: var(--nexeriq-surface-subtle);
    --nx-chip-avatar-bg: var(--nexeriq-primary);
    --nx-chip-avatar-text: var(--nexeriq-on-primary);

    color-scheme: light dark;
}

/* work-0596 (owner 2026-11-01): the default follows prefers-color-scheme; html[data-theme] is "system" (or absent), "light" or "dark",
   stamped by the server. The tokens file selects Dark only through [data-bs-theme="dark"], which App.razor stamps for an explicit "dark".
   For "system" there is no data-bs-theme (no script runs here), so the block below carries the Dark values of exactly the tokens this file reads;
   keep it in step with nexeriq-tokens.css. An explicit "light" never goes dark. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
    /* The --nexeriq-* Dark tokens come from DevOp.Blazor 0.23.0 (NEXER-1279/1295); only Identity's own tokens stay here. */
    :root:not([data-theme="light"]):not([data-bs-theme]) {
        --nx-field-border: var(--nx-slate);
        --nx-panel-edge: rgba(35, 199, 246, 0.45);
    }
}

:root[data-theme="dark"] {
    /* Slate on the Navy input surface is 5.73:1 (6.48:1 on the page). */
    --nx-field-border: var(--nx-slate);
    --nx-panel-edge: rgba(35, 199, 246, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html { background: var(--nx-page); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--nx-page);
    color: var(--nx-text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    font-feature-settings: "cv11", "ss01";
}

/* ---- Frame: navy brand column beside the task ------------------------------------------------------------ */

.nx-public {
    display: grid;
    grid-template-columns: clamp(280px, 35%, 520px) 1fr;
    min-height: 100vh;
}

.nx-brand {
    background: var(--nx-navy);
    color: var(--nx-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    border-right: 1px solid rgba(138, 151, 178, 0.18);
    box-shadow: inset -3px 0 0 var(--nx-panel-edge);
}

.brand-mark { display: block; font-family: Inter, "Segoe UI", system-ui, sans-serif; }
.brand-mark--stacked { width: min(100%, 240px); height: auto; }
.brand-mark--horizontal { display: none; }

.nx-brand-line {
    margin: 1.5rem 0 0;
    max-width: 22ch;
    text-align: center;
    color: var(--nx-slate);
    font-size: 1.0625rem;
    line-height: 1.45;
}

.nx-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem clamp(1.5rem, 5vw, 5rem);
}

.nx-content {
    width: 100%;
    max-width: 25rem; /* about 400px */
    margin-inline: auto; /* centred in its panel at every width */
}

/* ---- Type ---------------------------------------------------------------------------------------------- */

h1 {
    margin: 0 0 2rem;
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 { margin: 2rem 0 0.75rem; font-size: 1.125rem; font-weight: 600; }

p { margin: 0 0 1rem; color: var(--nx-muted); }
h1 + p { margin-top: -1rem; margin-bottom: 1.75rem; }

a { color: var(--nx-link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

code, kbd {
    color: var(--nx-text);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.875em;
    overflow-wrap: anywhere;
}

ul, ol { padding-left: 1.25rem; color: var(--nx-muted); }

/* A fieldset used only to disable a whole form (sign-in cooldown, work-0179): no border, same grid rhythm. */
.nx-fieldset { display: grid; gap: 1.5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.nx-fieldset:disabled { opacity: 0.55; }
.nx-fieldset:disabled .dxbl-btn { cursor: not-allowed; }

/* Inline SVG QR code on the MFA enrolment page (work-0178). Always dark-on-white, whatever the colour scheme,
   so phone cameras can read it. */
.nx-qr { margin: 0 0 1.25rem; text-align: center; }
.nx-qr svg { width: 13rem; max-width: 100%; height: auto; padding: 0.5rem; background: #FFFFFF; border: 1px solid var(--nx-line); border-radius: 0.5rem; }
.nx-qr figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: var(--nx-muted); }

/* Signed-in landing links (work-0178). */
.nx-links { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.5rem; }

/* Secondary navigation under a form (for example "Recover your account" under sign-in). */
.nx-aside { margin: -0.25rem 0 0; font-size: 0.9375rem; text-align: center; }

/* Password label row: the label on the left, "Forgot password?" on the right (work-0184). */
.nx-field { display: grid; gap: 0.375rem; }
.nx-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.nx-label-row label { font-size: 0.875rem; font-weight: 500; color: var(--nx-text); }
.nx-pw-field { position: relative; }
.nx-public .nx-pw-field > .nx-forgot { position: absolute; top: 0; right: 0; padding: 0; border: 0; min-height: 0; font-size: 0.875rem; line-height: 1.5; }

/* Show/hide password: an AppButton inside the field's input group (hidden until public-enhance.js reveals it) and
   the Caps Lock hint that script appends to the field. */
[hidden] { display: none !important; }
.input-group { display: flex; align-items: stretch; }
.input-group > dxbl-input-editor { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* AppTextBox renders <dxbl-input-editor class="dxbl-text-edit"><input class="dxbl-text-edit-input"> (StaticRender: a <div> with the
   same class, work-0665): the editor draws the field box (brand tokens), the inner input is borderless inside it. */
.nx-public dxbl-input-editor.dxbl-text-edit, .nx-public div.dxbl-text-edit {
    display: flex;
    width: 100%;
    border: 1px solid var(--nx-field-border);
    border-radius: 0.5rem;
    background: var(--nx-surface);
    color: var(--nx-text);
}
.nx-public dxbl-input-editor.dxbl-text-edit:hover, .nx-public div.dxbl-text-edit:hover { border-color: var(--nx-text); }
/* Shared focus ring for every DevExpress edit wrapper (work-0613 item 8, WCAG 2.4.7 / 1.4.11): the ring is var(--nx-focus), 4.6:1
   on white in Light and 11:1 on navy in Dark. !important because the DevExpress theme restyles the focused editor itself. */
.nx-public dxbl-input-editor:focus-within, .nx-public .dxbl-text-edit:focus-within, .nx-public dxbl-input-editor.dxbl-text-edit:focus-within {
    border-color: var(--nx-focus) !important; outline: 3px solid var(--nx-focus) !important; outline-offset: 2px; box-shadow: none !important;
}
.nx-public input.dxbl-text-edit-input { flex: 1 1 auto; min-height: 0; border: 0; border-radius: 0; background: transparent; outline: 0; }
.nx-public input.dxbl-text-edit-input:hover, .nx-public input.dxbl-text-edit-input:focus-visible { border: 0; outline: 0; }
.nx-cant-scan { margin: 0 0 1.25rem; }
.nx-cant-scan summary { cursor: pointer; font-size: 0.9375rem; color: var(--nx-link); }
.nx-cant-scan[open] summary { margin-bottom: 0.5rem; }
#mfa-secret { letter-spacing: 0.08em; word-spacing: 0.4em; font-size: 1.0625rem; }
.input-group > .dxbl-btn { align-self: stretch; height: auto; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.nx-caps-hint { margin: 0.375rem 0 0; font-size: 0.875rem; color: var(--nx-muted); }
.nx-caps-hint:empty { display: none; }
/* ---- Forms ---------------------------------------------------------------------------------------------- */

form { display: grid; gap: 1.5rem; margin: 0 0 1.5rem; }

/* Pages wrap each input in its label; stack them. */
label {
    display: grid;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nx-text);
}

input[type="email"], input[type="password"], input[type="text"], input[type="tel"], input:not([type]),
input[type="number"], select, textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--nx-field-border);
    border-radius: 0.5rem;
    background: var(--nx-surface);
    color: var(--nx-text);
    font: inherit;
    font-weight: 400;
}

input:hover, select:hover, textarea:hover { border-color: var(--nx-text); }

input[autocomplete="one-time-code"], input[name="code"] {
    letter-spacing: 0.3em;
    font-variant-numeric: tabular-nums;
}

input[type="checkbox"], input[type="radio"] { width: 1.125rem; height: 1.125rem; accent-color: var(--nexeriq-primary); }

/* Buttons are the shared AppButton (DxButton, rendered statically). Brand tokens win over the theme's primary. */
.nx-public .dxbl-btn { border-radius: 0.5rem; font-weight: 600; }
.nx-public .dxbl-btn.dxbl-btn-primary { background-color: var(--nexeriq-primary); border-color: var(--nexeriq-primary); color: var(--nexeriq-on-primary); }
.nx-public .dxbl-btn.dxbl-btn-primary:hover { background-color: var(--nexeriq-primary-hover); border-color: var(--nexeriq-primary-hover); }
.nx-public .dxbl-btn.dxbl-btn-primary:disabled, .nx-public .dxbl-btn[disabled] { opacity: 0.7; cursor: progress; }
.nx-public .dxbl-btn.dxbl-btn-outline-secondary { color: var(--nx-text); border-color: var(--nx-field-border); background: transparent; }
.nx-public .dxbl-btn.dxbl-btn-outline-secondary:hover { background: var(--nx-page); border-color: var(--nx-slate); }
.nx-public .btn-link { color: var(--nx-link); font-weight: 500; text-decoration: none; padding: 0.25rem 0; }
.nx-public .btn-link:hover { text-decoration: underline; }
/* WCAG 2.4.7: Bootstrap removes the outline on .btn-link:focus-visible (0,2,0); this later, equal-specificity rule restores it (sign-in Forgot password / Use a passkey, language switch, Back). */
.nx-public .btn-link:focus-visible, .nx-public .btn.btn-link:focus-visible { outline: 3px solid var(--nx-focus); outline-offset: 3px; box-shadow: none; }
:focus-visible {
    outline: 3px solid var(--nx-focus);
    outline-offset: 3px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--nx-focus); }

[role="alert"] {
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--nx-danger);
    border-radius: 0 0.375rem 0.375rem 0;
    background: var(--nx-danger-bg);
    color: var(--nx-danger);
    font-size: 0.9375rem;
}

/* ---- Narrow screens: the column becomes a band -------------------------------------------------------- */

@media (max-width: 760px) {
    .nx-public { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .nx-brand {
        max-width: none;
        box-shadow: inset 0 -3px 0 var(--nx-panel-edge);
        flex-direction: row;
        justify-content: flex-start;
        padding: 1rem 1.25rem;
        border-right: 0;
        border-bottom: 1px solid rgba(138, 151, 178, 0.18);
    }
    .brand-mark--stacked, .nx-brand-line { display: none; }
    .brand-mark--horizontal { display: block; width: 168px; height: auto; }
    .nx-main { align-items: flex-start; justify-content: center; padding: 2rem 1.25rem 3rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---- Brand text colours: Velex's dark-theme tokens must not dim the public journeys (>= 4.5:1, light and dark) ---------- */
.nx-public { background: var(--nx-page); color: var(--nx-text); }
.nx-public .nx-main { color: var(--nx-text); }
.nx-public h1, .nx-public h2, .nx-public .h1, .nx-public .h2 { color: var(--nx-text); }
.nx-public p, .nx-public li, .nx-public .form-text { color: var(--nx-muted); }
.nx-public label, .nx-public .form-label { color: var(--nx-text); font-size: 0.875rem; font-weight: 500; margin: 0; }
.nx-public a { color: var(--nx-link); }
.nx-public .btn-link.nx-forgot, .nx-public .btn-link { color: var(--nx-link); }
/* The required marker is redundant: every field on these forms is required, and the field says so to assistive tech. */
.nx-public .app-field-required { display: none; }
.nx-public .app-field { display: grid; gap: 0.375rem; }
.nx-public .nx-brand p, .nx-public .nx-brand-line { color: var(--nx-slate); }
.nx-public [role="alert"] { color: var(--nx-danger); }
.nx-public .alert p { margin: 0; color: inherit; }
.nx-public .nx-content[role="alert"] { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; }

/* ---- Account area (work-0195; Identity_UI_Design.md section 3): top bar, persistent nav, content panel -------------- */

.nx-public.nx-acct { display: block; min-height: 100vh; }

.nx-acct-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.75rem clamp(1rem, 3vw, 2rem);
    background: var(--nx-navy); color: var(--nx-white);
}
.nx-acct-home { display: inline-flex; border-radius: 0.375rem; }
.nx-acct-home .brand-mark--horizontal { display: block; width: 12rem; height: auto; }
.nx-acct-user { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.nx-acct-user form { margin: 0; display: block; }
.nx-acct-user-text { display: grid; line-height: 1.25; min-width: 0; text-align: right; }
.nx-acct-user-text strong { font-size: 0.9375rem; font-weight: 600; color: var(--nx-white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-acct-user-text span { font-size: 0.8125rem; color: #B7C2DA; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The bar is navy in both themes, so its buttons are white in both; the Light theme's outline-secondary colour is the bar colour (work-0613 item 1). */
.nx-acct-bar .dxbl-btn, .nx-acct-bar .dxbl-btn.dxbl-btn-outline-secondary, .nx-acct-bar .dxbl-btn .dxbl-btn-caption, .nx-acct-bar .dxbl-btn .dxbl-image { color: var(--nx-white) !important; }
.nx-acct-bar .dxbl-btn, .nx-acct-bar .dxbl-btn.dxbl-btn-outline-secondary { border-color: #8A97B2; background: transparent; }
.nx-acct-bar .dxbl-btn:hover, .nx-acct-bar .dxbl-btn.dxbl-btn-outline-secondary:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--nx-white); }
.nx-acct-bar :focus-visible { outline-color: var(--nx-cyan); }

.nx-acct-body {
    display: grid; grid-template-columns: 13.75rem minmax(0, 56rem); justify-content: center;
    gap: 1.5rem; align-items: start;
    padding: 2rem clamp(1rem, 3vw, 2rem) 3rem;
}
.nx-acct-nav { display: grid; gap: 0.25rem; position: sticky; top: 1.5rem; }
.nx-acct-body > .nx-acct-menu { display: none; }
.nx-acct-nav-item {
    display: flex; align-items: center; gap: 0.75rem; white-space: nowrap;
    padding: 0.375rem 0.75rem; border-radius: 0.5rem; line-height: 1.25rem;
    color: var(--nx-text); text-decoration: none; font-weight: 400; font-size: 0.9375rem;
}
.nx-acct-nav-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nx-acct-nav-item i { flex: none; width: 1.25rem; text-align: center; color: var(--nx-muted); }
.nx-acct-nav-item:hover { background: var(--nx-surface); }
/* Active item: a blue-tint pill (Figma), no bar and no card. */
.nx-acct-nav-item.is-current { background: color-mix(in srgb, var(--nexeriq-primary) 12%, transparent); color: var(--nx-link); font-weight: 500; }
.nx-acct-nav-item.is-current i { color: var(--nx-link); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nx-acct-nav-item.is-current { background: color-mix(in srgb, var(--nexeriq-primary) 24%, transparent); }
}
:root[data-theme="dark"] .nx-acct-nav-item.is-current { background: color-mix(in srgb, var(--nexeriq-primary) 24%, transparent); }
.nx-public .nx-acct-nav-item { color: var(--nx-text); }
.nx-public .nx-acct-nav-item.is-current { color: var(--nx-link); }

.nx-acct-main { min-width: 0; }
/* Figma has no panel around the page content: the cards sit on the page itself. */
.nx-acct-content { padding: 0; }

.nx-acct .page-heading { margin: 0 0 1.5rem; }
.nx-acct h2 { margin: 1.5rem 0 0.75rem; }
.nx-acct .page-heading h1 { margin: 0 0 0.5rem; font-size: 1.75rem; }
.nx-acct .page-heading p, .nx-acct .page-heading h1 + p { margin: 0; font-size: 1rem; }
.nx-acct [role="status"].alert, .nx-acct .alert[role="status"] { margin: 0 0 1.5rem; }

.nx-public.nx-acct .nx-back { margin: 0 0 1rem; }
.nx-back { margin: 0 0 1rem; font-size: 0.9375rem; }
.nx-back a { text-decoration: none; font-weight: 500; }
.nx-back a:hover { text-decoration: underline; }

.nx-form-card { max-width: 38rem; }
/* Signed-in forms: inputs fill the card. Public forms keep their own ~400px column (.nx-public form rule above). */
.nx-form-card .nx-field, .nx-form-card .input-group, .nx-form-card dxbl-input-editor { width: 100%; box-sizing: border-box; }

.nx-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; }
.nx-acct .nx-card-grid { gap: 1rem; }
.nx-acct .card {
    background: var(--nx-surface); color: var(--nx-text);
    border: 1px solid var(--nx-line); border-radius: 0.5rem; margin: 0; box-shadow: none;
}
.nx-acct .card-header { background: transparent; border-bottom: 1px solid var(--nx-line); padding: 0.75rem 1rem; text-align: left; }
.nx-acct .card-header .card-title, .nx-acct .card-title { display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; margin: 0; text-align: left; font-size: 0.9375rem; font-weight: 600; color: var(--nx-text); }
.nx-acct .card-title i { color: var(--nx-muted); margin-inline-end: 0 !important; }
.nx-acct .card-body { padding: 1rem; display: grid; gap: 0.75rem; align-content: start; }
.nx-acct .card-body p { margin: 0; font-size: 0.875rem; line-height: 1.5; }
.nx-account-card { display: flex; flex-direction: column; height: 100%; }
.nx-account-card .card-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; }
.nx-account-card .nx-card-actions { margin-top: auto; }
.nx-account-card .nx-item { width: 100%; }
.nx-card-grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.nx-card-actions { margin-top: 0; }
.nx-card-link { font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.nx-card-link:hover { text-decoration: underline; }
.nx-checklist { list-style: none; padding: 0; margin: 0; display: grid; width: 100%; }
.nx-checklist-item { display: grid; gap: 0.25rem; padding: 0.625rem 0; border-top: 1px solid var(--nx-line); }
.nx-checklist-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.nx-checklist-head strong { min-width: 0; font-weight: 600; color: var(--nx-text); }
.nx-checklist-item .nx-card-link { white-space: nowrap; }

.nx-list { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.nx-list > .card, .nx-acct .nx-card-grid > .card { margin: 0 !important; }
.nx-bulk { display: grid; gap: 0.75rem; justify-items: start; }
.nx-bulk p { margin: 0; }
.nx-list-item .card-body { padding: 1rem; }
.nx-item { display: flex; align-items: center; gap: 1rem; }
.nx-item-main { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.nx-item-main strong { font-size: 1rem; font-weight: 600; color: var(--nx-text); }
.nx-item-main strong.nx-app-password-revoked { color: var(--nx-muted); }
.nx-item-meta { font-size: 0.875rem; color: var(--nx-muted); }
.nx-item-action { margin: 0; display: block; margin-left: auto; flex: none; }
.nx-item-action .btn, .nx-item-action .dxbl-btn, .nx-item-action .dxbl-btn-caption { white-space: nowrap; }
.nx-acct form.nx-item-action { margin: 0; }
.nx-permissions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.nx-permissions-label { font-size: 0.8125rem; color: var(--nx-muted); }
.nx-chip { padding: 0.125rem 0.625rem; border: 1px solid var(--nx-line); border-radius: 999px; font-size: 0.8125rem; color: var(--nx-text); }
.nx-acct .dxbl-btn.dxbl-btn-outline-danger { color: var(--nx-danger); border-color: var(--nx-danger); background: transparent; }
.nx-acct .dxbl-btn.dxbl-btn-outline-danger:hover { background: var(--nx-danger-bg); }

/* Collapsed secondary path on the MFA challenge (recovery code). */
.nx-disclosure { margin: 1.5rem 0 0; }
.nx-disclosure summary { cursor: pointer; color: var(--nx-link); font-size: 0.9375rem; font-weight: 500; width: fit-content; }
.nx-disclosure[open] summary { margin-bottom: 1rem; }

/* work-0212 (LLD-0009 4.3): the /platform shell reuses the account frame; this block adds only what differs. */
.nx-plat-qualifier { color: #B7C2DA; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; margin-right: auto; margin-left: 1rem; white-space: nowrap; }
.nx-plat-content { max-width: 56rem; }
.nx-plat-count { font-size: 1.5rem; font-weight: 600; color: var(--nx-text); }
.nx-plat-subheading { margin: 0 0 0.75rem; font-size: 1.0625rem; font-weight: 600; }
.nx-plat-table-wrap { overflow-x: auto; position: relative; margin: 0 0 1.5rem; }
.nx-plat-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.nx-plat-table th, .nx-plat-table td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--nx-line); vertical-align: middle; }
.nx-plat-table td.nx-plat-host { overflow-wrap: anywhere; }
.nx-plat-alert-list { margin: 0; padding-left: 1.25rem; }
.nx-plat-table th { font-size: 0.8125rem; font-weight: 600; color: var(--nx-muted); }
.nx-plat-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.nx-plat-actions form { margin: 0; }
.nx-plat-revoke { color: var(--nx-danger); font-size: 0.9375rem; }
.nx-plat-cancel { margin-left: 1rem; }
.nx-plat-field { display: grid; gap: 0.25rem; margin: 0 0 1rem; }
.nx-plat-field select { padding: 0.5rem 0.625rem; border: 1px solid var(--nx-field-border); border-radius: 0.375rem; font: inherit; width: 100%; }
.nx-plat-field input { padding: 0.5rem 0.625rem; border: 1px solid var(--nx-field-border); border-radius: 0.375rem; font: inherit; }
.nx-plat-checklist { list-style: none; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 0.5rem; }
.nx-plat-checklist li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.25rem 0.75rem; }
@media (max-width: 600px) { .nx-plat-checklist li > a { grid-column: 2; justify-self: start; } }
.nx-plat-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0 0 1rem; }
.nx-plat-facts dt { color: var(--nx-muted); font-size: 0.875rem; }
.nx-plat-facts dd { margin: 0; overflow-wrap: anywhere; }
.nx-plat-hint { color: var(--nx-muted); font-size: 0.875rem; margin: 0.25rem 0 0.75rem; overflow-wrap: anywhere; }
/* work-0613 item 6: a hint belongs to the field above it, so the field's own bottom margin is dropped when a hint follows. */
.nx-public .app-field:has(+ .nx-plat-hint) { margin-bottom: 0; }
.nx-public .app-field + .nx-plat-hint { margin-top: 0.375rem; }
.nx-plat-check { display: flex; gap: 0.5rem; align-items: center; margin: 0 0 1rem; }
.nx-plat-candidate { border-top: 1px solid var(--nx-line); padding: 0.75rem 0; }
.nx-plat-candidate form { display: inline-block; margin: 0 0.5rem 0.5rem 0; }
.nx-plat :focus-visible { outline: 3px solid var(--nexeriq-focus); outline-offset: 2px; }

/* ---- work-0790 /platform visual conformance (Figma): table containment, compact forms, actions, alerts -----------------------------
   Root cause of the phone overflow: the th's .visually-hidden span is position:absolute, so overflow-x:auto on the wrap (not a containing block) did not
   clip it and it sat at the far end of the table, widening the page; the wrap is now position:relative. Wide tables keep a minimum width and scroll inside the wrap. */
.nx-plat-table--wide { min-width: 38rem; }
.nx-plat-table th { white-space: nowrap; }
td.nx-plat-actions { display: table-cell; white-space: nowrap; }
td.nx-plat-actions > * { vertical-align: middle; margin-right: 0.75rem; }
td.nx-plat-actions form { display: inline-block; }
.nx-plat-row-remove { white-space: nowrap; }
.nx-plat-actions--stack { display: grid; justify-items: start; gap: 0.375rem; }
.nx-plat-actions--stack a { white-space: nowrap; font-size: 0.9375rem; }
.nx-plat-table--domains .nx-plat-actions--stack a { font-size: 0.875rem; font-weight: 400; }
.nx-plat-actions--stack .nx-plat-revoke { text-decoration: none; }
.nx-plat-action-link { border: 0; background: transparent; padding: 0; min-height: 1.5rem; color: var(--nx-link); font: inherit; font-size: 0.875rem; cursor: pointer; }
.nx-plat-action-link:hover { text-decoration: underline; }
.nx-plat a.nx-plat-new { display: flex; justify-content: center; width: 100%; margin: 0 0 1.5rem; min-height: 1.875rem; padding: 0.25rem 0.75rem; font-size: 0.875rem; }
.nx-plat .dxbl-btn.nx-btn--link { border: 0; background: transparent; min-height: 0; height: auto; padding: 0; font-size: 0.9375rem; font-weight: 400; color: var(--nx-link); }
.nx-plat .dxbl-btn.nx-btn--link .dxbl-btn-caption { font-weight: 400; font-size: inherit; color: inherit; }
.nx-plat .dxbl-btn.nx-btn--link:hover { background: transparent; text-decoration: underline; }
/* Forms on /platform: compact like the account forms (the global form grid gap is 1.5rem); a hint sits 4px under its field; buttons size to their label. */
.nx-plat form { gap: 0.75rem; }
.nx-plat form .nx-plat-field, .nx-plat form .nx-plat-check { margin: 0; }
.nx-plat form .nx-plat-hint { margin: 0; font-size: 0.75rem; line-height: 1rem; }
.nx-plat form :is(.nx-plat-field, .app-field) + .nx-plat-hint { margin-top: -0.5rem; }
.nx-plat form .dxbl-btn { width: auto; justify-self: start; min-height: 1.875rem; padding: 0 0.75rem; font-size: 0.875rem; }
.nx-plat form .dxbl-btn.nx-btn--sm { min-height: 1.625rem; height: 1.625rem; font-size: 0.8125rem; padding: 0 0.625rem; }
.nx-plat form .dxbl-btn.nx-btn--link { min-height: 0; height: auto; padding: 0; font-size: 0.9375rem; }
.nx-plat form.nx-plat-inline-form { display: block; margin: 0; }
.nx-plat .nx-plat-field textarea { width: 100%; padding: 0.375rem 0.625rem; border: 1px solid var(--nx-field-border); border-radius: 0.375rem; font: inherit; resize: vertical; }
.nx-plat .nx-plat-field label { font-size: 0.8125rem; }
/* Standard bordered alerts with their icon (success and warning join the danger rule of work-0769); tokens follow the theme. */
.nx-plat .alert.alert-success, .nx-plat .alert.alert-warning { border: 1px solid #B7E0C7 !important; border-radius: 0.375rem; background: #E6F5EC; color: var(--nx-text); font-size: 0.875rem; line-height: 1.4; padding: 0.625rem 0.75rem; margin: 0 0 1rem; }
.nx-plat .alert.alert-success { border-color: #2E9E5B !important; }
.nx-plat .alert.alert-success > i { color: #14663A; margin-top: 0.1875rem; }
.nx-plat .alert.alert-warning { background: #FFF2D9; border-color: #D9A441 !important; }
.nx-plat .alert.alert-warning > i { color: #7A4B00; margin-top: 0.1875rem; }
.nx-plat .alert p { margin: 0; color: inherit; }
.nx-plat .badge.badge-soft-danger { color: var(--nx-danger); background: var(--nx-danger-bg); border-color: var(--nx-danger); }
.nx-plat .badge { white-space: normal; }
/* A scripted focus on the h1 after navigation (FocusOnNavigate) shows no ring; keyboard focus stays visible through :focus-visible above. */
.nx-plat h1[tabindex="-1"]:focus { outline: none; box-shadow: none; }
.nx-plat-content { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: 0.5rem; padding: 1.5rem; }
.nx-plat-content:has(> .nx-form-panel) { background: transparent; border: 0; padding: 0; }
@media (max-width: 760px) {
    .nx-plat-content { padding: 1rem; }
    .nx-plat-table td.nx-plat-host { min-width: 9rem; }
}
.nx-plat .nx-acct-nav-item span { white-space: normal; overflow: visible; }
.nx-plat-facts dt { font-weight: 400; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nx-plat .alert.alert-success { background: #0F3322; border-color: #2E9E5B !important; }
    :root:not([data-theme="light"]) .nx-plat .alert.alert-success > i { color: #7EE0A6; }
    :root:not([data-theme="light"]) .nx-plat .alert.alert-warning { background: #3A2A08; border-color: #8A6A1F !important; }
    :root:not([data-theme="light"]) .nx-plat .alert.alert-warning > i { color: #F5C56B; }
}
:root[data-theme="dark"] .nx-plat .alert.alert-success { background: #0F3322; border-color: #2E9E5B !important; }
:root[data-theme="dark"] .nx-plat .alert.alert-success > i { color: #7EE0A6; }
:root[data-theme="dark"] .nx-plat .alert.alert-warning { background: #3A2A08; border-color: #8A6A1F !important; }
:root[data-theme="dark"] .nx-plat .alert.alert-warning > i { color: #F5C56B; }
/* R1 phone: the redirect-domain rows stack (host, then the verified time, then Remove) instead of three squeezed columns. */
@media (max-width: 600px) {
    .nx-plat-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .nx-plat-table--stack, .nx-plat-table--stack tbody, .nx-plat-table--stack tr, .nx-plat-table--stack td { display: block; }
    .nx-plat-table--stack tr { padding: 0.5rem 0; border-bottom: 1px solid var(--nx-line); }
    .nx-plat-table--stack td { border: 0; padding: 0.125rem 0.75rem; overflow-wrap: anywhere; }
    .nx-plat-table--stack td[data-label] { font-size: 0.8125rem; color: var(--nx-muted); }
    .nx-plat-table--stack td[data-label]::before { content: attr(data-label) ": "; }
}

/* ---- Shared account building blocks (work-0769): reuse these on every account page ---------------------------------------
   Card header with divider: AppCard Title + HeaderIconCss (.card-header above).  Flat badge: AppStatusBadge (.badge above, no dot).
   .nx-form-panel   a full-width card for a form page (no 38rem cap), with a smaller padding on phones.
   .nx-form-compact a form with 15px field gaps (14px on phones); a .form-text after a field is a caption directly under it;
                    fields fill the card.
   .nx-btn--sm      the 26px card button (Figma), on an .nx-btn link or an AppButton CssClass. */
.nx-form-panel { max-width: none; }
.nx-form-compact { gap: 0.9375rem; margin: 0; }
.nx-form-compact .app-field + .app-field { margin-top: 0; }
.nx-form-compact .app-field, .nx-form-compact .input-group, .nx-form-compact dxbl-input-editor, .nx-form-compact .dxbl-text-edit { width: 100%; max-width: none; box-sizing: border-box; }
.nx-acct .nx-form-compact .form-text { margin: -0.5625rem 0 0; font-size: 0.75rem; line-height: 1rem; }
.nx-pwd-field { display: contents; }
.nx-pwd-field--aside { display: block; position: relative; }
.nx-pwd-aside { position: absolute; top: 0; right: 0; font-size: 0.8125rem; line-height: 1.3; }
.nx-pwd-aside a { font-weight: 500; text-decoration: none; }
.nx-pwd-aside a:hover { text-decoration: underline; }
/* The card holds the back link, heading and intro too (Figma K2/K6): the heading block's own bottom margin stays modest inside it. */
.nx-form-panel .page-heading { margin-bottom: 1rem; }
.nx-acct .dxbl-btn.nx-btn--sm, .nx-acct a.btn.nx-btn--sm { min-height: 1.625rem; height: 1.625rem; padding: 0 0.625rem; font-size: 0.8125rem; font-weight: 500; line-height: 1; }
.nx-acct .dxbl-btn.nx-btn--sm .dxbl-btn-caption, .nx-acct .dxbl-btn.nx-btn--sm span { font-size: inherit; font-weight: inherit; }
/* Form pages: a brighter, larger intro under the heading. */
.nx-acct:has(.nx-form-panel) .page-heading p { font-size: 1.0625rem; color: var(--nx-text); }

@media (max-width: 760px) {
    .nx-form-compact { gap: 0.875rem; }
    .nx-acct .nx-form-compact .form-text { margin-top: -0.5rem; }
    .nx-form-panel .card-body { padding: 0.875rem 1rem 1rem; }
    .nx-acct-menu .nx-dd-toggle { justify-content: center; position: relative; }
    .nx-acct-menu .nx-dd-toggle::after { display: none; }
    .nx-acct-menu .nx-acct-menu-chevron { position: absolute; left: 0.75rem; transition: transform 0.15s; }
    .nx-acct-menu[open] .nx-acct-menu-chevron { transform: rotate(180deg); }
}

@media (max-width: 760px) {
    .nx-acct-body { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 1rem; }
    /* Narrow screens (work-0613 item 9): the side nav becomes the full-width "Menu: current page" disclosure (AcctNav.razor). */
    .nx-acct-nav { display: none; }
    .nx-acct-body > .nx-acct-menu { display: block; width: 100%; }
    .nx-acct-menu .nx-dd-toggle { width: 100%; }
    .nx-acct-menu .nx-dd-menu { left: 0; right: 0; top: calc(100% + 0.25rem); bottom: auto; }
    .nx-card-grid--pair { grid-template-columns: minmax(0, 1fr); }
    .nx-item { flex-wrap: wrap; }
}


/* work-0769 slice B: account list rows (sessions, connected applications, app passwords), the applications empty state, the app-password tile
   and the created-secret page. */
.nx-item--side { flex-wrap: nowrap; }
.nx-list--tight { gap: 0.75rem; }
.nx-key-tile { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #EAF0FA; color: #1E293B; font-size: 1.25rem; }
.nx-empty { display: grid; justify-items: center; gap: 0.5rem; max-width: 22rem; margin: 2rem auto; padding: 1.5rem 1rem; text-align: center; color: var(--nx-muted); }
.nx-empty i { font-size: 1.5rem; color: var(--nx-muted); }
.nx-empty p { margin: 0; font-size: 0.9375rem; }
.nx-acct .nx-secret-callout { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0 0 1rem; padding: 0.625rem 0.75rem; border: 1px solid #C2410C; border-radius: 0.375rem; background: #FFF9E5; color: var(--nx-text); font-size: 0.875rem; font-weight: 400; line-height: 1.4; }
.nx-acct .nx-secret-callout i { margin-top: 0.1875rem; color: #C2410C; }
.nx-acct .nx-secret-block { display: grid; gap: 0.25rem; margin: 0 0 1rem; }
.nx-acct .nx-secret-label { display: block; margin: 0; font-size: 0.75rem; font-weight: 400; color: var(--nx-muted); }
.nx-acct .nx-secret-row { position: relative; display: flex; align-items: stretch; margin: 0; }
.nx-acct .nx-secret-field { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 0.5rem 2.75rem 0.5rem 0.75rem; border: 0; border-radius: 0.25rem; background: var(--nx-chip-bg); color: var(--nx-text); font: 0.8125rem/1.5rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; white-space: nowrap; user-select: text; }
.nx-acct .nx-secret-field > span + span { margin-inline-start: 0.5ch; }
.nx-acct .nx-secret-row .nx-copy-all { position: absolute; top: 50%; right: 0.375rem; transform: translateY(-50%); min-height: 0; height: 1.75rem; width: 1.75rem; padding: 0; border: 0; background: transparent; color: var(--nx-muted); }
.nx-acct .nx-secret-row .nx-copy-all .dxbl-btn-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nx-acct .nx-secret-meta { margin: 0 0 1rem; font-size: 0.875rem; color: var(--nx-text); }
.nx-acct .nx-secret-done .btn { width: 100%; justify-content: center; min-height: 1.875rem; height: 1.875rem; padding: 0 0.75rem; font-weight: 500; }
.nx-secret-done { display: flex; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nx-key-tile { background: #1E2A3F; color: #DCE6F7; }
    :root:not([data-theme="light"]) .nx-acct .nx-secret-callout { color: #F5C56B; background: #3A2A08; border-color: #D97706; }
    :root:not([data-theme="light"]) .nx-acct .nx-secret-callout i { color: #F5C56B; }
}
:root[data-theme="dark"] .nx-key-tile { background: #1E2A3F; color: #DCE6F7; }
:root[data-theme="dark"] .nx-acct .nx-secret-callout { color: #F5C56B; background: #3A2A08; border-color: #D97706; }
:root[data-theme="dark"] .nx-acct .nx-secret-callout i { color: #F5C56B; }

/* ---- Work-0195 round 2: pills, button-styled links, codes, hints (controls keep the App* sizes; owner 2026-10-04) ---- */

/* AppStatusBadge: an inline pill, never a full-width bar inside a grid card body. */
.nx-acct .badge {
    display: inline-flex; align-items: center; gap: 0.4rem; width: fit-content; justify-self: start;
    padding: 0.125rem 0.5rem; border-radius: 0.25rem; font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
    background: var(--nx-page); color: var(--nx-text); border: 0;
}
.nx-acct .badge.badge-soft-success { color: #14663A; background: #E6F5EC; border-color: #B7E0C7; }
.nx-acct .badge.badge-soft-warning { color: #7A4B00; background: #FFF2D9; border-color: #F0D192; }
.nx-acct .badge.badge-soft-info { color: #0B4E7A; background: #E3F2FB; border-color: #B5D9EE; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nx-acct .badge.badge-soft-success { color: #7EE0A6; background: #0F3322; border-color: #1F5A3B; }
    :root:not([data-theme="light"]) .nx-acct .badge.badge-soft-warning { color: #F5C56B; background: #3A2A08; border-color: #6B4F14; }
    :root:not([data-theme="light"]) .nx-acct .badge.badge-soft-info { color: #8FD3FA; background: #0E2D45; border-color: #1F4F73; }
}
:root[data-theme="dark"] .nx-acct .badge.badge-soft-success { color: #7EE0A6; background: #0F3322; border-color: #1F5A3B; }
:root[data-theme="dark"] .nx-acct .badge.badge-soft-warning { color: #F5C56B; background: #3A2A08; border-color: #6B4F14; }
:root[data-theme="dark"] .nx-acct .badge.badge-soft-info { color: #8FD3FA; background: #0E2D45; border-color: #1F4F73; }

/* LLD-0022 section 11 UI note: the soft info alert (AppAlert Info/Soft renders .alert.alert-info.border-0) takes the soft-info badge
   palette in both themes, so every soft info alert in the account area keeps its text contrast in the dark theme, whatever its role. */
.nx-acct .alert.alert-info, .nx-public .alert.alert-info { color: #0B4E7A; background: #E3F2FB; border-left-color: #0B4E7A; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nx-acct .alert.alert-info, :root:not([data-theme="light"]) .nx-public .alert.alert-info { color: #8FD3FA; background: #0E2D45; border-left-color: #8FD3FA; }
}
:root[data-theme="dark"] .nx-acct .alert.alert-info, :root[data-theme="dark"] .nx-public .alert.alert-info { color: #8FD3FA; background: #0E2D45; border-left-color: #8FD3FA; }

/* A real anchor in the AppButton outline look (AppButton Href renders no href statically). */
.nx-btn { display: inline-flex; align-items: center; gap: 0.5rem; width: fit-content; text-decoration: none; }
.nx-btn i { color: inherit; }

.nx-acct-home-text { color: var(--nx-white); font-weight: 600; text-decoration: none; }

/* Recovery codes result page. */
.nx-codes { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.75rem; }
.nx-codes li { margin: 0; padding: 0.625rem 0.875rem; border: 1px solid var(--nx-line); border-radius: 0.5rem; background: var(--nx-page); text-align: center; color: var(--nx-text); }
.nx-codes code { font-size: 1rem; letter-spacing: 0.04em; }
.nx-copy-all { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.75rem; border: 0; border-radius: 0.5rem; background: transparent; color: var(--nx-text); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.nx-copy-all[hidden] { display: none; }
.nx-copy-all:hover { background: var(--nx-chip-bg); }
.nx-codes-notice { color: var(--nx-text); font-weight: 500; }
.nx-codes-hint { font-size: 0.9375rem; }

/* Live mismatch hint under a confirm-password field (public-enhance.js). */
.nx-mismatch-hint { margin: 0.375rem 0 0; font-size: 0.875rem; color: var(--nx-danger); }
.nx-mismatch-hint:empty { display: none; }
/* ---- Footer (work-0187) ---- */
.nx-main { flex-direction: column; }
.nx-footer { margin: 2rem auto 0; width: 100%; max-width: 25rem; font-size: 0.875rem; }
.nx-footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.nx-footer a { padding: 0.25rem 0; display: inline-block; }
.nx-footer nav ~ .nx-lang, .nx-footer nav ~ .nx-theme { margin-top: 0.75rem; } /* both pickers, or the theme sits higher */
.nx-footer nav + .nx-footer-org { margin-top: 0.75rem; }
.nx-footer-org-caption { margin: 0 0 0.25rem; font-weight: 600; }
.nx-footer-host { opacity: 0.75; }

/* ---- Language and theme as one compact disclosure each (work-0613 item 3; Identity_UI_Design.md section 2) ----
   <details>/<summary> so it works with no script and no circuit; the items are the existing submit buttons. public-enhance.js adds
   Escape and outside-click closing. The look follows AppDropdown (outline button with a caret, a raised menu). */
.nx-lang, .nx-theme { margin: 0; }
.nx-footer .nx-lang, .nx-footer .nx-theme { display: inline-block; vertical-align: top; margin-right: 1.5rem; }
.nx-dd { position: relative; display: inline-block; font-size: 0.875rem; }
.nx-dd-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem; list-style: none; cursor: pointer; user-select: none;
    min-height: 1.75rem; padding: 0.25rem 0.625rem; box-sizing: border-box;
    border: 1px solid var(--nx-field-border); border-radius: 0.375rem; background: transparent; color: var(--nx-text);
}
.nx-dd-toggle::-webkit-details-marker { display: none; }
.nx-dd-toggle::after { content: ""; width: 0.4rem; height: 0.4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nx-dd[open] > .nx-dd-toggle::after { transform: rotate(-135deg); }
.nx-dd-toggle:hover { border-color: var(--nx-text); }
.nx-dd-toggle:focus-visible, .nx-dd-item:focus-visible { outline: 3px solid var(--nx-focus); outline-offset: 2px; }
.nx-dd-menu {
    position: absolute; z-index: 20; left: 0; bottom: calc(100% + 0.25rem); min-width: 100%; margin: 0; padding: 0.25rem; list-style: none;
    background: var(--nx-surface); color: var(--nx-text); border: 1px solid var(--nx-field-border); border-radius: 0.5rem;
    display: flex; flex-direction: column; gap: 0.125rem;
}
.nx-dd-item {
    display: flex; align-items: center; gap: 0.5rem; width: 100%; box-sizing: border-box; text-align: left; white-space: nowrap; cursor: pointer; text-decoration: none;
    background: none; border: 0; border-radius: 0.25rem; padding: 0.375rem 0.625rem; min-height: 1.75rem; font: inherit; color: var(--nx-text);
}
button.nx-dd-item:hover { background: var(--nx-chip-bg); }
.nx-dd-item[aria-current], .nx-dd-item[aria-pressed="true"] { font-weight: 600; }
.nx-dd-item[aria-pressed="true"] { cursor: default; }
/* A fixed check column on every item, so the ticked item lines up with the others (owner 2026-11-02). */
.nx-dd-item::before { content: ""; flex: 0 0 0.875rem; text-align: center; }
.nx-dd-item[aria-current="true"]::before, .nx-dd-item[aria-pressed="true"]::before { content: "\2713"; }
.nx-dd-item i { width: 1.25rem; text-align: center; color: var(--nx-muted); }
/* The account and platform top bars are navy in both themes, and sit at the top of the page, so the menu opens downward from the right edge. */
.nx-theme--bar .nx-dd-toggle { color: var(--nx-white); border-color: #8A97B2; }
.nx-theme--bar .nx-dd-toggle:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--nx-white); }
.nx-theme--bar .nx-dd-toggle:focus-visible { outline-color: var(--nx-cyan); }
.nx-theme--bar .nx-dd-menu { bottom: auto; top: calc(100% + 0.25rem); left: auto; right: 0; }

/* ---- Organization brand slots (LLD-0006 section 7): the logo and the name only; palette, type and layout stay NexerIQ's ---- */

.nx-brand-logo { display: block; max-width: 240px; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.nx-brand-name { margin-top: 1rem; max-width: 24ch; overflow-wrap: anywhere; }
.nx-brand-credit { margin: 1rem 0 0; color: var(--nx-muted); font-size: 0.8125rem; line-height: 1.4; }
.nx-brand-shield { vertical-align: -1px; }

@media (max-width: 760px) {
    .nx-brand-logo { max-height: 40px; }
    .nx-public .nx-brand-line.nx-brand-name { display: block; margin: 0 0 0 0.75rem; font-size: 1rem; text-align: left; max-width: none; }
}

/* LLD-0015 section 6.4: hidden until passkey.js finds PublicKeyCredential and removes the class. */
.nx-needs-script { display: none; }
/* Keep me signed in (LLD-0016): a plain labelled checkbox with its helper text under the password row. */
.nx-public .nx-keep-signed-in { margin: 0 0 1rem; }
.nx-public .nx-keep-signed-in label { display: flex; gap: 0.5rem; align-items: center; }
.nx-public .nx-keep-signed-in .form-text { margin: 0.25rem 0 0 1.5rem; font-size: 0.875rem; }

/* Sign-in password step (owner 2026-11-01, work-0592): the address as a quiet chip, not an input; Back at the bottom.
   Light: address 14.99:1 on the chip, border 3.68:1 on the chip. Dark: 13.9:1 and 5.08:1. */
.nx-public .nx-identifier-chip { display: flex; align-items: center; gap: 0.5rem; max-width: 100%; margin: 0 0 1.25rem; padding: 0.25rem 0.75rem 0.25rem 0.25rem; box-sizing: border-box; width: fit-content; background: var(--nx-chip-bg); border: 1px solid var(--nx-field-border); border-radius: 999px; color: var(--nx-text); font-size: 0.9375rem; }
.nx-identifier-chip-avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--nx-chip-avatar-bg); color: var(--nx-chip-avatar-text); font-size: 0.8125rem; font-weight: 600; }
.nx-identifier-chip-address { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Present for password managers, invisible and out of the tab order. */
.nx-public input.nx-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.nx-public .nx-back { margin: 1rem 0 0; }
.nx-public .nx-back .btn-link { min-height: 1.5rem; padding: 0.375rem 0; }
/* A long address must not widen the single mobile column (its 1fr track otherwise grows to the unwrapped text). */
.nx-public .nx-main { min-width: 0; }
.nx-public .nx-back .btn-link:focus-visible { outline: 3px solid var(--nx-focus); outline-offset: 3px; box-shadow: none; }

/* ---- Account menu in the top bar and narrow-screen bar (work-0613 item 9; Identity_UI_Design.md section 3) ---- */
.nx-acct-bar { flex-wrap: nowrap; }
.nx-acct-bar .nx-dd-toggle { color: var(--nx-white); border-color: #8A97B2; }
.nx-acct-bar .nx-dd-toggle:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--nx-white); }
.nx-acct-bar .nx-dd-toggle:focus-visible { outline-color: var(--nx-cyan); }
/* The bar is navy in both themes, so the shared avatar's page-theme text (about 1.5:1 in Light) takes the light-text recipe Shell 0.18.3 uses on its dark topbar; scoped to the avatar button so the menu popover keeps the page colour. */
.nx-acct-bar .app-avatar-button .app-icon-avatar__title.app-icon-avatar__title--contrast { color: color-mix(in srgb, var(--app-tone, #3e60d5) 30%, white) !important; }
/* Figma: a solid blue avatar with white initials (the shared soft-primary tone rendered maroon in the bar). */
.nx-acct-bar .app-avatar-button .app-icon-avatar__title.app-icon-avatar__title--contrast { background: var(--nx-blue) !important; color: var(--nx-white) !important; }
.nx-acct-account .nx-dd-menu { left: auto; right: 0; top: calc(100% + 0.25rem); bottom: auto; min-width: 15rem; max-width: calc(100vw - 2rem); }
.nx-acct-menu-id { font-size: 0.8125rem; color: var(--nx-muted); display: grid; margin: 0; padding: 0.375rem 0.625rem; gap: 0.125rem; line-height: 1.3; overflow-wrap: anywhere; border-bottom: 1px solid var(--nx-line); }
.nx-acct-menu-id span { color: var(--nx-muted); font-size: 0.8125rem; }
.nx-acct-account form, .nx-acct-account .nx-theme { margin: 0; display: block; }
.nx-dd-group { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.25rem 0; border-bottom: 1px solid var(--nx-line); }
.nx-dd-group-label { padding: 0.125rem 0.625rem; color: var(--nx-muted); font-size: 0.75rem; font-weight: 600; }
.nx-acct-user-text strong { max-width: 12rem; }

@media (max-width: 576px) {
    .nx-acct-bar { gap: 0.5rem; padding-inline: 0.75rem; }
    .nx-plat-qualifier { display: none; }
    .nx-acct-user-text { display: none; }
    .nx-plat-cancel { display: block; margin: 0.75rem 0 0; }
}

/* work-0684: the avatar menu language form is a shell .app-theme-options segmented container; only the form margin is reset here. */
.nx-lang--menu { margin: 0; }

/* ---- work-0769 round 2 (Figma parity): form pages in a narrow centred shell, 30px inputs, one phone card-header alignment -------------
   .nx-form-panel--narrow on a form page's card narrows and centres the whole shell (nav and content) on wide screens; list and overview
   pages keep the wide shell. Scoped to .nx-acct so public sign-in pages keep their own field sizes. */
@media (min-width: 761px) {
    .nx-acct-body:has(.nx-form-panel--narrow) { grid-template-columns: 13.75rem minmax(0, 38rem); }
}
.nx-form-panel--narrow .card-body { padding: 1.5rem; }
.nx-acct dxbl-input-editor.dxbl-text-edit, .nx-acct div.dxbl-text-edit { border-radius: 0.375rem; }
.nx-acct input.dxbl-text-edit-input { padding: 0.25rem 0.75rem; font-size: 0.875rem; line-height: 1.25rem; }
.nx-acct .input-group > .dxbl-btn { min-height: 0; padding: 0 0.625rem; }
/* AppAlert Danger/Soft: the standard bordered alert with its icon (Figma K2 error). The tokens follow the theme, so no dark pair. */
.nx-acct .alert.alert-danger { border: 1px solid var(--nx-danger) !important; border-radius: 0.375rem; background: var(--nx-danger-bg); color: var(--nx-text); font-size: 0.875rem; line-height: 1.4; padding: 0.625rem 0.75rem; margin: 0 0 1rem; }
.nx-acct .alert.alert-danger > i { margin-top: 0.1875rem; color: var(--nx-danger); }
.nx-acct .alert.alert-danger p { color: inherit; }
@media (max-width: 575.98px) {
    .nx-acct .app-card-header-row { align-items: stretch !important; }
}
@media (max-width: 760px) {
    .nx-form-panel--narrow .card-body { padding: 1rem; }
    .nx-item--keys { flex-wrap: wrap; }
    .nx-item--keys .nx-item-main { flex: 1 1 calc(100% - 4.5rem); }
    .nx-item--keys > .nx-item-action, .nx-item--keys > .badge { margin-left: 0; }
}
