/* account.css — the /Account/* card presentation.
 *
 * Moved out of AccountLayout.razor's inline <style> by account-management-layout (klyncexam-zv7x)
 * so a second layout could share it. That second layout (AccountManageLayout) is GONE as of
 * klyncexam-f520 — /my-account became a real page inside MainLayout instead of a wider card — so
 * this sheet now has exactly one consumer again: AccountLayout, serving the eight CREDENTIAL pages
 * (Login, Register, ForgotPassword + confirmation, ResetPassword + confirmation, AcceptInvite,
 * AccessDenied).
 *
 * It stays a linked sheet rather than moving back inline: linked is the direction
 * blazor-inline-style-double-mount points, and an inline <style> only emits when its component
 * renders. The 400px card below is CORRECT for these pages — one action, one column — and must
 * not be widened; a settings-shaped page belongs in the app shell, which is what f520 established.
 *
 * Linked from App.razor alongside the other sheets.
 */

/* klyncexam-f520: the backdrop token was `--dxds-color-background-neutral-subdued-rest`, which is
   NOT DEFINED in the DX Fluent set — so `var(…, #f5f6f8)` always fell through to that hardcoded
   LIGHT hex. Under the dark theme the card (a DEFINED surface token, correctly ~#252525) sat on a
   near-white backdrop: the "dark card on white background" Alan reported on 2026-08-05.

   Exactly the failure U10 names — an undefined alias masked by a hardcoded-hex var() fallback —
   and the SECOND time this token family has caused it: app-shell.css:1618 records klyncexam-49ym
   #1, where the same two names painted white rows under near-white text in the dark app. The fix
   there and here is the same: use a token the DX set actually defines.

   surface-neutral-subdued-rest is used in 10 places WITHOUT a fallback, so it is known-defined and
   flips with the theme. No hex fallback is added back: a fallback on a defined token is dead
   weight, and on an undefined one it is this bug. */
.ke-account-shell {
    --ke-account-wash: linear-gradient(165deg, #e4f6fb 0%, #eeeffc 46%, #fdf0e6 100%);
    --ke-account-display: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 44%);
    min-height: 100dvh;
    background: var(--dxds-color-surface-neutral-default-rest);
    color: var(--dxds-color-content-neutral-default-rest);
}

[data-theme="dark"] .ke-account-shell {
    --ke-account-wash: linear-gradient(165deg, #14284a 0%, #1c1e45 50%, #2c1c3c 100%);
}

.ke-account-card {
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 496px;
    box-sizing: border-box;
    padding: 32px 48px;
    color: var(--dxds-color-content-neutral-default-rest, #1a1a2e);
}

.ke-account-panel {
    position: relative;
    overflow: hidden;
    margin: 16px;
    border-radius: 28px;
    background: var(--ke-account-wash);
}

.ke-account-art {
    position: absolute;
    right: -14%;
    bottom: -8%;
    width: min(92%, 78vh);
    max-width: none;
    height: auto;
    pointer-events: none;
}

.ke-account-brand {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    font-family: var(--ke-account-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 0.9;
    color: var(--dxds-color-content-neutral-default-rest);
}

.ke-account-brand .ke-brand-wordmark {
    height: 41px;
    width: auto;
    display: block;
}

.ke-account-brand span {
    font-weight: 400;
    font-size: 20px;
    line-height: 1.1;
    margin-left: 6px;
    color: var(--dxds-color-content-neutral-subdued-rest);
}

.ke-account-brand--card {
    margin-bottom: 36px;
}

.ke-account-brand--panel {
    display: none;
}

@media (max-width: 860px) {
    .ke-account-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .ke-account-panel {
        order: -1;
        margin: 12px 16px 0;
        padding: 22px 20px;
        border-radius: 22px;
    }

    .ke-account-art {
        width: 170px;
        right: -56px;
        bottom: -58px;
        opacity: 0.3;
    }

    .ke-account-brand--panel {
        display: flex;
        position: relative;
        font-size: 34px;
    }

    .ke-account-brand--panel .ke-brand-wordmark {
        height: 48px;
    }

    .ke-account-brand--panel span {
        font-size: 22px;
    }

    .ke-account-brand--card {
        display: none;
    }

    .ke-account-card {
        align-self: start;
        max-width: 440px;
        padding: 24px 20px 32px;
    }
}

/* ── Heading ──────────────────────────────────────────────────────── */
.ke-account-card h1 {
    margin: 0 0 22px;
    font-family: var(--ke-account-display);
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.1;
    text-wrap: balance;
    color: var(--dxds-color-content-neutral-default-rest, #1a1a2e);
    /* The page focuses this heading on load (tabindex=-1, a11y post-nav focus). It is not
       keyboard-focusable, so suppress the default focus outline that otherwise boxes it. */
    outline: none;
}

/* ── Fields — the Identity scaffold uses Bootstrap .form-floating markup
     (input THEN label) but no Bootstrap CSS is loaded. Reflow to a clean
     label-above-input stack: flex column + order:-1 on the label. ───── */
.ke-account-card .form-floating {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.ke-account-card .form-floating > label {
    order: -1;
    font-size: 13px;
    font-weight: 500;
    color: var(--dxds-color-content-neutral-subdued-rest, #5a5a6e);
}
/* .form-select rides along with .form-control (klyncexam-iiqo, folded into zv7x 2026-08-05).
   Register.razor:74 renders the State picker as <InputSelect class="form-select"> — correct
   markup, inside a .form-floating like its neighbours — but no .form-select rule existed
   anywhere, so it fell back to the raw browser control: no border treatment, no padding, label
   beside it rather than above. On the signup page, which is the first thing a new practice sees.
   Broke at v2-385-practice-locale, which swapped the AustralianState enum combo for a DB-sourced
   InputSelect; the data source changed and the styling did not follow. */
.ke-account-card .form-control,
.ke-account-card .form-select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 16px;
    color: var(--dxds-color-content-neutral-default-rest, #1a1a2e);
    background: var(--dxds-color-surface-neutral-default-rest, #ffffff);
    border: 1px solid var(--dxds-color-border-neutral-default-rest, #cbd0dc);
    border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ke-password-wrap {
    position: relative;
}
.ke-account-card .ke-password-wrap .form-control {
    padding-right: 40px;
}
.ke-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dxds-color-content-neutral-subdued-rest, #5a5a6e);
}
.ke-password-toggle:hover {
    color: var(--dxds-color-content-neutral-default-rest, #1a1a2e);
}
.ke-account-card .form-control:focus,
.ke-account-card .form-select:focus {
    outline: none;
    border-color: var(--dxds-color-surface-primary-default-rest, #2b6cb0);
    box-shadow: 0 0 0 3px var(--dxds-color-surface-primary-default-active, rgba(43, 108, 176, 0.20));
}

/* A native select ignores several inherited properties, so the shared block above is not
   sufficient on its own: without an explicit appearance reset the OS paints its own control
   chrome (and, on a dark theme, its own light background) straight over the border and padding
   set above. The caret is an inline SVG data-URI — the strict-CSP artifact rules do not apply
   here (this is the app's own stylesheet, not a published page), but a data-URI keeps it to
   zero extra requests. currentColor makes it follow light/dark without a second rule. */
.ke-account-card .form-select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
    cursor: pointer;
}

/* ── Remember me ──────────────────────────────────────────────────── */
.ke-account-card .checkbox {
    margin: 4px 0 20px;
    font-size: 14px;
}
.ke-account-card .checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dxds-color-content-neutral-default-rest, #3a3a4e);
}

/* ── Primary button ───────────────────────────────────────────────── */
.ke-account-card .btn-primary {
    display: block;
    width: 100%;
    padding: 13px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--dxds-color-content-neutral-default-inverted-rest, #ffffff);
    background: var(--dxds-color-surface-primary-default-rest, #2b6cb0);
    border: none;
    border-radius: 12px;
    transition: background .15s ease;
}
.ke-account-card .btn-primary:hover {
    background: var(--dxds-color-surface-primary-default-active, #245a94);
}

/* ── Alerts + validation ──────────────────────────────────────────── */
.ke-account-card .alert-danger {
    margin-bottom: 16px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--dxds-color-content-danger-default-rest, #b3261e);
    border: 1px solid var(--dxds-color-content-danger-default-rest, #f5c2c7);
    border-radius: 12px;
}
.ke-account-card .text-danger {
    font-size: 12px;
    color: var(--dxds-color-content-danger-default-rest, #b3261e);
}

/* ── Footer link ──────────────────────────────────────────────────── */
.ke-account-card p {
    margin-top: 20px;
    font-size: 14px;
    color: var(--dxds-color-content-neutral-subdued-rest, #5a5a6e);
}
.ke-account-card a {
    font-weight: 500;
    color: var(--dxds-color-content-primary-default-rest, #2b6cb0);
}
