/**
 * Portal authentication presentation.
 *
 * Shared theme, button, and status-message files own the common tokens and
 * controls. This file owns only the two public authentication layouts.
 */

:root {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body.auth-page {
    --auth-accent: #07894d;
    --auth-accent-dark: #046638;
    --auth-accent-soft: #eaf8f0;
    --auth-accent-ring: rgba(7, 137, 77, 0.22);
    --auth-visual-overlay-start: rgba(3, 53, 36, 0.18);
    --auth-visual-overlay-end: rgba(2, 42, 30, 0.91);
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--color-text, #0f172a);
    background: #f5f8f6;
    font-family: var(--system-font-family, Inter, "Noto Sans SC", system-ui, sans-serif);
    -webkit-font-smoothing: antialiased;
}

body.auth-page--primary {
    --auth-accent: #d97819;
    --auth-accent-dark: #a9530b;
    --auth-accent-soft: #fff3e7;
    --auth-accent-ring: rgba(217, 120, 25, 0.23);
    --auth-visual-overlay-start: rgba(96, 41, 5, 0.08);
    --auth-visual-overlay-end: rgba(77, 32, 3, 0.88);
    background: #fff9f2;
}

.auth-skip-link {
    position: fixed;
    z-index: 20;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #ffffff;
    background: #13253a;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 120ms ease;
}

.auth-skip-link:focus {
    transform: translateY(0);
}

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(500px, 0.92fr);
}

.auth-visual {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background-color: #244d3b;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.auth-page--secondary .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-01.jpg");
    background-position: 48% center;
}

.auth-page--primary .auth-visual {
    background-color: #8a4919;
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-01.jpg");
    background-position: 50% center;
}

.auth-page--primary[data-auth-background="primary-01"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-01.jpg");
}

.auth-page--primary[data-auth-background="primary-02"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-02.jpg");
}

.auth-page--primary[data-auth-background="primary-03"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-03.jpg");
}

.auth-page--primary[data-auth-background="primary-04"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-04.jpg");
}

.auth-page--primary[data-auth-background="primary-05"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-05.jpg");
}

.auth-page--primary[data-auth-background="primary-06"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-06.jpg");
}

.auth-page--primary[data-auth-background="primary-07"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-07.jpg");
}

.auth-page--primary[data-auth-background="primary-08"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-08.jpg");
}

.auth-page--primary[data-auth-background="primary-09"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-09.jpg");
}

.auth-page--primary[data-auth-background="primary-10"] .auth-visual {
    background-image: url("../../images/portal-auth/primary/backgrounds/primary-10.jpg");
}

.auth-page--secondary[data-auth-background="secondary-01"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-01.jpg");
}

.auth-page--secondary[data-auth-background="secondary-02"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-02.jpg");
}

.auth-page--secondary[data-auth-background="secondary-03"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-03.jpg");
}

.auth-page--secondary[data-auth-background="secondary-04"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-04.jpg");
}

.auth-page--secondary[data-auth-background="secondary-05"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-05.jpg");
}

.auth-page--secondary[data-auth-background="secondary-06"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-06.jpg");
}

.auth-page--secondary[data-auth-background="secondary-07"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-07.jpg");
}

.auth-page--secondary[data-auth-background="secondary-08"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-08.jpg");
}

.auth-page--secondary[data-auth-background="secondary-09"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-09.jpg");
}

.auth-page--secondary[data-auth-background="secondary-10"] .auth-visual {
    background-image: url("../../images/portal-auth/secondary/backgrounds/secondary-10.jpg");
}

.auth-visual__overlay {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(180deg, var(--auth-visual-overlay-start) 18%, var(--auth-visual-overlay-end) 100%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.07), transparent 42%);
}

.auth-visual::before,
.auth-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
}

.auth-visual::before {
    top: 7%;
    right: -110px;
    width: 300px;
    height: 300px;
}

.auth-visual::after {
    top: calc(7% + 66px);
    right: -44px;
    width: 168px;
    height: 168px;
}

.auth-page--primary .auth-visual::before {
    right: auto;
    left: -96px;
}

.auth-page--primary .auth-visual::after {
    right: auto;
    left: -30px;
}

.auth-visual__content {
    width: min(700px, 100%);
    padding: clamp(40px, 5vw, 72px);
    color: #ffffff;
}

.auth-visual__label {
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-visual h2 {
    max-width: 600px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.6rem, 4.5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
    text-wrap: balance;
}

.auth-visual__content > p:not(.auth-visual__label) {
    max-width: 560px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    line-height: 1.65;
}

.auth-main {
    min-width: 0;
    display: flex;
    align-items: stretch;
    background:
        radial-gradient(circle at 92% 8%, var(--auth-accent-soft), transparent 18rem),
        linear-gradient(rgba(19, 37, 58, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(19, 37, 58, 0.025) 1px, transparent 1px);
    background-size: auto, 44px 44px, 44px 44px;
}

.auth-main__inner {
    width: min(650px, 100%);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 20px clamp(30px, 4vw, 56px) 14px;
    display: flex;
    flex-direction: column;
}

.auth-page--status .auth-main {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.auth-page--status .auth-main__inner {
    width: min(760px, 100%);
}

.auth-page--status .auth-card {
    width: min(620px, 100%);
}

.auth-status-help {
    margin-top: 20px;
    color: var(--color-text-muted, #526174);
    font-size: 0.9rem;
    line-height: 1.55;
}

.auth-status-help h2 {
    margin: 0 0 8px;
    color: var(--color-text, #0f172a);
    font-size: 1rem;
}

.auth-status-help ol {
    margin: 0;
    padding-left: 22px;
}

.auth-status-help li + li {
    margin-top: 7px;
}

.auth-status-page__action {
    margin-top: 22px;
}

/*
 * Standalone Portal Auth states share the same geometry as the bootstrap-safe
 * page-error renderer and the React Shell access-state surface. Keep this
 * presentation isolated from the standard split-pane login layout.
 */
body.auth-page--concurrent,
body.auth-page--trial,
body.auth-page--logout-confirmation,
body.auth-page--cookies-required {
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.auth-page--trial .auth-state-header {
    min-height: 80px;
    padding: 16px clamp(20px, 5vw, 64px);
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    background: #ffffff;
}

.auth-page--trial .auth-state-header__brand {
    min-height: 0;
}

.auth-page--trial .auth-state-header__logo {
    width: auto;
    height: 46px;
    max-width: 100%;
}

.auth-page--concurrent .auth-state-panel__brand,
.auth-page--trial .auth-state-panel__brand,
.auth-page--logout-confirmation .auth-state-panel__brand,
.auth-page--cookies-required .auth-state-panel__brand {
    min-height: 46px;
    margin: 0 0 28px;
    display: flex;
    align-items: center;
}

.auth-page--concurrent .auth-state-panel__brand-link,
.auth-page--trial .auth-state-panel__brand-link,
.auth-page--logout-confirmation .auth-state-panel__brand-link,
.auth-page--cookies-required .auth-state-panel__brand-link {
    min-height: 0;
}

.auth-page--concurrent .auth-state-panel__brand-logo,
.auth-page--trial .auth-state-panel__brand-logo,
.auth-page--logout-confirmation .auth-state-panel__brand-logo,
.auth-page--cookies-required .auth-state-panel__brand-logo {
    width: auto;
    height: 46px;
    max-width: 100%;
}

.auth-page--concurrent .auth-state-main,
.auth-page--trial .auth-state-main,
.auth-page--logout-confirmation .auth-state-main,
.auth-page--cookies-required .auth-state-main {
    min-height: 0;
    width: 100%;
    padding: clamp(24px, 5vh, 56px) 20px;
    display: grid;
    flex: 1 0 auto;
    place-items: center;
    background: #ffffff;
}

@media (max-height: 699px) {
    .auth-page--concurrent .auth-state-main,
    .auth-page--trial .auth-state-main,
    .auth-page--logout-confirmation .auth-state-main,
    .auth-page--cookies-required .auth-state-main {
        place-items: start center;
    }
}

.auth-page--concurrent .auth-state-main__inner,
.auth-page--trial .auth-state-main__inner,
.auth-page--logout-confirmation .auth-state-main__inner,
.auth-page--cookies-required .auth-state-main__inner {
    width: min(760px, 100%);
}

.auth-page--concurrent .auth-state-panel,
.auth-page--trial .auth-state-panel,
.auth-page--logout-confirmation .auth-state-panel,
.auth-page--cookies-required .auth-state-panel {
    width: 100%;
    margin: 0;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid #dfe3e8;
    border-top: 4px solid var(--auth-accent);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.auth-page--concurrent .auth-state-panel__icon,
.auth-page--trial .auth-state-panel__icon,
.auth-page--logout-confirmation .auth-state-panel__icon,
.auth-page--cookies-required .auth-state-panel__icon {
    width: 36px;
    height: 36px;
    margin: 0 0 24px;
    display: block;
    color: #4c535a;
}

.auth-page--concurrent .auth-heading,
.auth-page--trial .auth-heading,
.auth-page--logout-confirmation .auth-heading,
.auth-page--cookies-required .auth-heading {
    margin-top: 0;
}

.auth-page--concurrent .auth-state-panel__meta,
.auth-page--cookies-required .auth-state-panel__meta {
    gap: 12px;
}

.auth-page--concurrent .auth-state-panel__eyebrow,
.auth-page--trial .auth-state-panel__eyebrow,
.auth-page--logout-confirmation .auth-state-panel__eyebrow,
.auth-page--concurrent .auth-stage,
.auth-page--cookies-required .auth-state-panel__eyebrow,
.auth-page--cookies-required .auth-stage {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-page--concurrent .auth-state-panel__eyebrow,
.auth-page--trial .auth-state-panel__eyebrow,
.auth-page--logout-confirmation .auth-state-panel__eyebrow,
.auth-page--cookies-required .auth-state-panel__eyebrow {
    color: #69717d;
}

.auth-page--concurrent .auth-stage::before,
.auth-page--cookies-required .auth-stage::before {
    margin-right: 12px;
    color: #a1a7b0;
    content: "·";
}

.auth-page--concurrent .auth-heading h1,
.auth-page--trial .auth-heading h1,
.auth-page--logout-confirmation .auth-heading h1,
.auth-page--cookies-required .auth-heading h1 {
    margin: 12px 0 16px;
    color: #273142;
    font-family: var(--system-font-family, Inter, "Noto Sans SC", system-ui, sans-serif);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.auth-page--concurrent .auth-heading > p,
.auth-page--trial .auth-heading > p,
.auth-page--logout-confirmation .auth-heading > p,
.auth-page--cookies-required .auth-heading > p {
    margin: 0;
    color: #596273;
    font-size: 1.125rem;
    line-height: 1.55;
}

.auth-page--concurrent .auth-status,
.auth-page--trial .auth-status,
.auth-page--logout-confirmation .auth-status,
.auth-page--cookies-required .auth-status {
    margin-top: 24px;
}

.auth-page--concurrent .auth-status-page__action,
.auth-page--cookies-required .auth-status-page__action,
.auth-page--trial .auth-trial-submit,
.auth-page--logout-confirmation .auth-logout-confirmation-submit {
    width: auto;
    min-height: 44px;
    margin-top: 28px;
    padding: 10px 20px;
}

.auth-page--cookies-required .auth-status-help {
    margin-top: 24px;
    font-size: 1rem;
}

.auth-field a,
.auth-account-help a,
.auth-login-support a {
    color: var(--auth-accent-dark);
    font-weight: 750;
    text-decoration: none;
}

.auth-card {
    width: min(500px, 100%);
    margin: auto;
    padding: clamp(26px, 3vw, 36px);
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-top: 4px solid var(--auth-accent);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.11);
}

.auth-logo-link,
.auth-logo {
    display: block;
}

.auth-brand-navigation {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: transparent;
}

.auth-brand-navigation__button {
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    font: inherit;
    background: transparent;
    cursor: pointer;
}

.auth-logo-link {
    width: fit-content;
    min-height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
}

.auth-logo-link:focus-visible {
    outline: 3px solid var(--auth-accent-ring);
    outline-offset: 5px;
}

.auth-home-link {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-accent-dark);
    background: transparent;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.auth-home-link:hover {
    color: var(--auth-accent-dark);
    background: var(--auth-accent-soft);
}

.auth-home-link:focus-visible {
    outline: 3px solid var(--auth-accent-ring);
    outline-offset: 3px;
}

.auth-home-link__icon {
    width: 22px;
    height: 22px;
    display: block;
    background: currentColor;
    -webkit-mask: url("../../icons/lucide/house.svg") center / contain no-repeat;
    mask: url("../../icons/lucide/house.svg") center / contain no-repeat;
}

.auth-logo {
    width: 164px;
    height: auto;
}

.auth-page--login .auth-logo,
.auth-page--password-reset-request .auth-logo,
.auth-page--password-reset .auth-logo,
.auth-page--password-recovery .auth-logo,
.auth-page--pin-setup .auth-logo,
.auth-page--recovery-reset .auth-logo {
    width: 176px;
}

.auth-heading {
    margin-top: 20px;
}

.auth-heading__meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

.auth-stage {
    color: var(--auth-accent-dark);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.095em;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin: 9px 0 6px;
    color: #13253a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.05rem, 3vw, 2.55rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.auth-heading > p {
    margin: 0;
    color: #617089;
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-password-change-reason {
    margin: 14px 0 0;
}

.auth-password-change-reason .system-status-message__text {
    flex: 1 1 auto;
}

.auth-password-change-reason p {
    margin: 0;
}

.auth-heading--contextual {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    row-gap: 9px;
}

.auth-heading__title-group {
    min-width: 0;
}

.auth-heading--contextual h1 {
    margin: 4px 0 0;
}

.auth-heading--contextual > p {
    grid-column: 1 / -1;
}

.auth-heading__context-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 17px;
    color: var(--auth-accent-dark);
    background: linear-gradient(145deg, #ffffff 0%, var(--auth-accent-soft) 100%);
    box-shadow: 0 10px 24px var(--auth-accent-ring);
}

.auth-heading__context-icon::before {
    width: 27px;
    height: 27px;
    content: "";
    background-color: currentColor;
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
}

.auth-heading__context-icon--login::before {
    -webkit-mask-image: url("../../icons/lucide/log-in.svg");
    mask-image: url("../../icons/lucide/log-in.svg");
}

.auth-heading__context-icon--recovery::before {
    -webkit-mask-image: url("../../icons/lucide/key-round.svg");
    mask-image: url("../../icons/lucide/key-round.svg");
}

.auth-status {
    margin-top: 18px;
}

body.auth-page .system-status-message__action,
body.auth-page .system-status-message__action:hover {
    color: var(--auth-accent-dark);
}

body.auth-page .system-status-message__action:focus-visible {
    outline-color: var(--auth-accent);
}

.auth-status[hidden],
.auth-caps-lock[hidden] {
    display: none;
}

.auth-form {
    margin-top: 20px;
}

.auth-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.auth-form fieldset[disabled] {
    opacity: 0.62;
}

.auth-field + .auth-field {
    margin-top: 14px;
}

.auth-field label {
    display: inline-block;
    margin-bottom: 6px;
    color: #20314f;
    font-size: 0.8rem;
    font-weight: 800;
}

.auth-field__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.auth-field__label-row a {
    font-size: 0.76rem;
}

.auth-input-control {
    position: relative;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: 0;
    color: #13253a;
    background: #ffffff;
    font: inherit;
    transition: border-color 130ms ease, box-shadow 130ms ease, background-color 130ms ease;
}

.auth-field input:hover {
    border-color: #9aa9bb;
}

.auth-field input:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px var(--auth-accent-ring);
}

/*
 * Opt-in outlined field used by the login and password-recovery pages.
 * The semantic label stays inside the control until the field is focused,
 * filled, or restored by browser autofill.
 */
.auth-field.auth-field--floating label {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 11px;
    margin: 0;
    padding: 0 4px;
    color: #617089;
    background: #ffffff;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
    transform-origin: left center;
    transition: color 130ms ease, font-size 130ms ease, top 130ms ease;
}

.auth-field--floating input:focus ~ label,
.auth-field--floating input:not(:placeholder-shown) ~ label,
.auth-field--floating input:-webkit-autofill ~ label {
    top: 0;
    color: var(--auth-accent-dark);
    font-size: 0.7rem;
}

.auth-field--floating input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    -webkit-text-fill-color: #13253a;
}

.auth-field--floating .auth-password-control {
    position: relative;
    overflow: visible;
}

.auth-password-control {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    transition: border-color 130ms ease, box-shadow 130ms ease, background-color 130ms ease;
}

.auth-password-control input {
    flex: 1 1 0%;
    width: auto;
    min-width: 0;
    min-height: 0;
    padding-right: 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-field--floating .auth-password-control input {
    border-radius: 9px 0 0 9px;
}

.auth-password-control:hover {
    border-color: #9aa9bb;
}

.auth-password-control:focus-within {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px var(--auth-accent-ring);
}

.auth-password-control input:hover,
.auth-password-control input:focus {
    border-color: transparent;
    box-shadow: none;
}

.auth-field--invalid > input,
.auth-field--invalid .auth-input-control input,
.auth-field--invalid .auth-password-control,
.auth-field--invalid .auth-password-control:hover {
    border-color: var(--color-danger-dark, #e10f0f);
}

.auth-field--invalid > input:focus,
.auth-field--invalid .auth-input-control input:focus,
.auth-field--invalid .auth-password-control:focus-within {
    border-color: var(--color-danger-dark, #e10f0f);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.16);
}

.auth-field--invalid.auth-field--floating label {
    color: var(--color-danger-dark, #e10f0f);
}

.auth-password-toggle {
    position: static;
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 58px;
    min-height: 0;
    margin: 3px;
    padding: 5px 9px;
    border: 0;
    border-radius: 7px;
    color: var(--auth-accent-dark);
    background: transparent;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: var(--auth-accent-soft);
}

.auth-password-toggle:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: -3px;
}

.auth-password-toggle--icon {
    align-self: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 1px 3px 1px 0;
    padding: 12px;
    border-radius: 8px;
}

.auth-password-toggle__icon {
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask: url("../../icons/lucide/eye.svg") center / contain no-repeat;
    mask: url("../../icons/lucide/eye.svg") center / contain no-repeat;
}

.auth-password-toggle--icon[data-password-visible="true"] .auth-password-toggle__icon {
    -webkit-mask-image: url("../../icons/lucide/eye-off.svg");
    mask-image: url("../../icons/lucide/eye-off.svg");
}

.auth-forgot-password {
    display: inline-flex;
    min-height: 32px;
    margin-top: 4px;
    align-items: center;
    font-size: 0.76rem;
}

.auth-remember-device {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    color: #20314f;
    cursor: pointer;
}

.auth-remember-device input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--auth-accent);
    flex: 0 0 auto;
}

.auth-remember-device span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.auth-remember-device strong {
    font-size: 0.82rem;
    line-height: 1.35;
}

.auth-remember-device small {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.4;
}

.auth-remember-device input:focus-visible {
    outline: 3px solid var(--auth-accent-ring);
    outline-offset: 2px;
}

.auth-caps-lock {
    margin: 7px 0 0;
    color: #9a5800;
    font-size: 0.72rem;
    font-weight: 700;
}

.auth-submit {
    min-height: 48px;
    margin-top: 18px;
    border-radius: 10px;
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    font-size: 0.87rem;
}

.auth-page--trial .auth-trial-form {
    margin-top: 0;
}

.auth-page--logout-confirmation .auth-logout-confirmation-form {
    margin-top: 0;
}

.auth-page--logout-confirmation .auth-logout-confirmation-cancel {
    margin-top: 22px;
    padding-top: 0;
    justify-content: flex-start;
    font-size: 0.78rem;
    text-align: left;
}

.auth-page--logout-confirmation .auth-logout-confirmation-cancel a {
    font-weight: 400;
}

.auth-trial-submit {
    gap: 10px;
}

.auth-trial-spinner {
    width: 16px;
    height: 16px;
    display: none;
    flex: 0 0 auto;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: auth-trial-spin 700ms linear infinite;
}

.auth-trial-form[data-trial-submitted="1"] .auth-trial-spinner {
    display: inline-block;
}

.auth-page--trial .auth-account-help {
    margin-top: 22px;
    padding-top: 0;
    justify-content: flex-start;
    font-size: 0.78rem;
    text-align: left;
}

.auth-page--trial .auth-account-help a {
    font-weight: 400;
}

@keyframes auth-trial-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-submit:hover {
    background: var(--auth-accent-dark);
    border-color: var(--auth-accent-dark);
}

.auth-submit span {
    margin-left: auto;
    font-size: 1.05rem;
}

.auth-account-help {
    margin-top: 16px;
    padding-top: 14px;
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    color: #617089;
    font-size: 0.78rem;
    text-align: center;
    white-space: nowrap;
}

.auth-login-support {
    margin: 18px 0 0;
    color: #536275;
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

.auth-page--login .auth-field a,
.auth-page--login .auth-account-help a,
.auth-login-support a {
    font-weight: 400;
}

.auth-footer {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #768397;
    font-size: 0.66rem;
}

.auth-field a:hover,
.auth-account-help a:hover,
.auth-login-support a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-field a:focus-visible,
.auth-account-help a:focus-visible,
.auth-login-support a:focus-visible {
    border-radius: 4px;
    outline: 3px solid var(--auth-accent-ring);
    outline-offset: 3px;
}

.auth-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (min-width: 960px) and (max-width: 1279px) {
    .auth-shell {
        grid-template-columns: minmax(360px, 0.88fr) minmax(500px, 1.12fr);
    }

    .auth-visual__content {
        padding: 38px;
    }

    .auth-visual h2 {
        font-size: clamp(2.4rem, 4.5vw, 3.5rem);
    }
}

/* Keep the standard login task above the fold on shorter desktop windows. */
@media (min-width: 960px) and (max-height: 800px) {
    .auth-main__inner {
        padding-block: 12px 8px;
    }

    .auth-card {
        padding: 22px 30px;
    }

    .auth-logo {
        width: 146px;
    }

    .auth-page--login .auth-logo,
    .auth-page--password-reset-request .auth-logo,
    .auth-page--password-reset .auth-logo,
    .auth-page--password-recovery .auth-logo,
    .auth-page--pin-setup .auth-logo,
    .auth-page--recovery-reset .auth-logo {
        width: 154px;
    }

    .auth-heading {
        margin-top: 12px;
    }

    .auth-heading h1 {
        margin-block: 6px 4px;
        font-size: 2rem;
    }

    .auth-heading > p {
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .auth-heading--contextual {
        grid-template-columns: 50px minmax(0, 1fr);
        column-gap: 13px;
        row-gap: 6px;
    }

    .auth-heading__context-icon {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .auth-form {
        margin-top: 14px;
    }

    .auth-field + .auth-field {
        margin-top: 10px;
    }

    .auth-field input,
    .auth-submit {
        min-height: 44px;
    }

    .auth-submit {
        margin-top: 14px;
    }

    .auth-account-help {
        margin-top: 12px;
        padding-top: 10px;
    }

    .auth-login-support {
        margin-top: 10px;
    }

    .auth-footer {
        margin-top: 8px;
    }

    .auth-visual__content {
        padding: 36px;
    }

    .auth-visual h2 {
        font-size: clamp(2.35rem, 4vw, 3.35rem);
    }
}

@media (min-width: 960px) and (max-height: 640px) {
    .auth-heading > p,
    .auth-visual__content > p:not(.auth-visual__label) {
        display: none;
    }

    .auth-card {
        padding-block: 18px;
    }

    .auth-heading,
    .auth-form {
        margin-top: 10px;
    }

    .auth-heading--contextual {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .auth-heading__context-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .auth-account-help {
        margin-top: 9px;
        padding-top: 7px;
    }
}

/* xs/sm: remove the promotional pane so authentication starts immediately. */
@media (max-width: 959px) {
    .auth-shell {
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-main__inner {
        width: min(620px, 100%);
        min-height: 100vh;
        min-height: 100dvh;
        padding:
            max(16px, env(safe-area-inset-top))
            max(18px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom))
            max(18px, env(safe-area-inset-left));
    }

    .auth-card {
        margin: 0 auto;
        padding: 26px clamp(24px, 6vw, 38px);
    }

    .auth-logo {
        width: 156px;
    }

    .auth-page--login .auth-logo,
    .auth-page--password-reset-request .auth-logo,
    .auth-page--password-reset .auth-logo,
    .auth-page--password-recovery .auth-logo,
    .auth-page--pin-setup .auth-logo,
    .auth-page--recovery-reset .auth-logo {
        width: 164px;
    }

    .auth-heading {
        margin-top: 18px;
    }

    .auth-heading h1 {
        font-size: clamp(2rem, 7vw, 2.45rem);
    }

    .auth-heading--contextual {
        grid-template-columns: 52px minmax(0, 1fr);
        column-gap: 14px;
    }

    .auth-heading__context-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .auth-form {
        margin-top: 18px;
    }

    .auth-field__label-row a,
    .auth-forgot-password {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .auth-account-help a,
    .auth-login-support a {
        min-height: 24px;
        display: inline-flex;
        align-items: center;
    }

    .auth-login-support {
        margin-top: 12px;
    }

    .auth-footer {
        margin-top: auto;
        padding-top: 12px;
    }
}

@media (max-width: 639px) {
    .auth-page--trial .auth-state-header {
        min-height: 72px;
        padding-block: 16px;
    }

    .auth-page--trial .auth-state-header__logo {
        width: auto;
        height: 38px;
    }

    .auth-main {
        background: #ffffff;
    }

    .auth-main__inner {
        padding-inline:
            max(14px, env(safe-area-inset-left))
            max(14px, env(safe-area-inset-right));
    }

    .auth-card {
        padding: 20px 14px;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-account-help {
        font-size: clamp(0.68rem, 3.2vw, 0.78rem);
    }

    .auth-logo {
        width: 148px;
    }

    .auth-page--login .auth-logo,
    .auth-page--password-reset-request .auth-logo,
    .auth-page--password-reset .auth-logo,
    .auth-page--password-recovery .auth-logo,
    .auth-page--pin-setup .auth-logo,
    .auth-page--recovery-reset .auth-logo {
        width: 156px;
    }

    .auth-heading {
        margin-top: 14px;
    }

    .auth-heading__meta {
        align-items: flex-start;
    }

    .auth-heading h1 {
        font-size: clamp(1.9rem, 9vw, 2.25rem);
    }

    .auth-heading--contextual {
        grid-template-columns: 48px minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 7px;
    }

    .auth-heading__context-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .auth-footer {
        text-align: center;
    }
}

/* Phone landscape and other low-height xs/sm windows use a form-first density. */
@media (max-width: 959px) and (max-height: 600px) {
    .auth-main__inner {
        padding-block:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-bottom));
    }

    .auth-card {
        padding-block: 12px;
    }

    .auth-logo-link {
        min-height: 44px;
    }

    .auth-logo {
        width: 126px;
    }

    .auth-page--login .auth-logo,
    .auth-page--password-reset-request .auth-logo,
    .auth-page--password-reset .auth-logo,
    .auth-page--password-recovery .auth-logo,
    .auth-page--pin-setup .auth-logo,
    .auth-page--recovery-reset .auth-logo {
        width: 132px;
    }

    .auth-heading {
        margin-top: 7px;
    }

    .auth-heading h1 {
        margin-block: 4px 0;
        font-size: 1.55rem;
    }

    .auth-heading--contextual {
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 10px;
    }

    .auth-heading__context-icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .auth-heading > p,
    .auth-footer {
        display: none;
    }

    .auth-form {
        margin-top: 8px;
    }

    .auth-field + .auth-field {
        margin-top: 6px;
    }

    .auth-field label {
        margin-bottom: 3px;
    }

    .auth-field input,
    .auth-submit {
        min-height: 44px;
    }

    .auth-submit {
        margin-top: 8px;
    }

    .auth-account-help {
        margin-top: 8px;
        padding-top: 6px;
    }

    .auth-login-support {
        margin-top: 8px;
    }
}

@media (max-width: 959px) and (max-height: 600px) {
    .auth-page--concurrent .auth-heading > p,
    .auth-page--trial .auth-heading > p,
    .auth-page--logout-confirmation .auth-heading > p,
    .auth-page--cookies-required .auth-heading > p {
        display: block;
    }
}

@media (max-width: 359px) {
    .auth-account-help {
        flex-wrap: wrap;
        white-space: normal;
    }
}

@media (max-width: 639px) {
    .auth-page--concurrent .auth-state-panel__brand,
    .auth-page--trial .auth-state-panel__brand,
    .auth-page--logout-confirmation .auth-state-panel__brand,
    .auth-page--cookies-required .auth-state-panel__brand {
        min-height: 38px;
        margin-bottom: 24px;
    }

    .auth-page--concurrent .auth-state-panel__brand-logo,
    .auth-page--trial .auth-state-panel__brand-logo,
    .auth-page--logout-confirmation .auth-state-panel__brand-logo,
    .auth-page--cookies-required .auth-state-panel__brand-logo {
        width: auto;
        height: 38px;
    }

    .auth-page--concurrent .auth-state-main,
    .auth-page--trial .auth-state-main,
    .auth-page--logout-confirmation .auth-state-main,
    .auth-page--cookies-required .auth-state-main {
        padding: 20px 14px;
    }

    .auth-page--concurrent .auth-state-panel,
    .auth-page--trial .auth-state-panel,
    .auth-page--logout-confirmation .auth-state-panel,
    .auth-page--cookies-required .auth-state-panel {
        padding: 24px 20px;
        border-right: 1px solid #dfe3e8;
        border-bottom: 1px solid #dfe3e8;
        border-left: 1px solid #dfe3e8;
        border-radius: 8px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    }

    .auth-page--concurrent .auth-state-panel__meta,
    .auth-page--cookies-required .auth-state-panel__meta {
        gap: 8px;
        flex-wrap: wrap;
    }

    .auth-page--concurrent .auth-stage::before,
    .auth-page--cookies-required .auth-stage::before {
        margin-right: 8px;
    }

    .auth-page--concurrent .auth-status-page__action,
    .auth-page--cookies-required .auth-status-page__action,
    .auth-page--trial .auth-trial-submit,
    .auth-page--logout-confirmation .auth-logout-confirmation-submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
