/* =================================================================
   AUTH CARD — styles for the Identity / account pages that use
   _LayoutCard.cshtml (Login, Lockout, ResetPassword, 2FA, etc.).
   Extracted from inline <style> blocks. All colours reference the
   theme.css tokens (single source of truth) — Botanical palette.
   ================================================================= */

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--vvb-color-surface-alt);
    font-family: "Inter", sans-serif;
    color: var(--vvb-color-text-primary);
}

.auth-shell {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 16px;
}

.auth-card {
    width: min(100%, 1480px);
    max-height: calc(100svh - 32px);
    background: var(--vvb-color-surface);
    border: 1px solid var(--vvb-color-border);
    border-radius: 28px;
    padding: 28px 32px;
    box-shadow: 0 24px 64px rgba(16, 24, 40, 0.07);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 648px);
    gap: 40px;
    overflow: hidden;
}

.form-pane {
    display: flex;
    align-items: center;
    padding: 0;
}

.form-pane > div {
    width: 100%;
    max-width: 680px;
}

.article-logo-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 44px;
    color: var(--gs-emerald-900);
}

.article-title {
    font-size: 35px;
    font-weight: 500;
    line-height: 1;
    color: var(--gs-emerald-900);
}

.vector {
    width: 1px;
    height: 32px;
    background-color: var(--vvb-color-border-muted);
    margin: 0 16px;
}

.logo-img {
    width: 194px;
    height: auto;
    margin-top: 0;
}

.promo-pane {
    background: var(--gs-emerald-50);
    border-radius: 24px;
    padding: 24px 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    min-height: 0;
    height: 100%;
}

.promo-copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 520px;
}

.tip-badge {
    display: inline-flex;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--gs-emerald-100);
    color: var(--gs-emerald-700);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.promo-title {
    margin: 0;
    color: var(--gs-emerald-900);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.08;
}

.promo-text {
    margin: 0;
    color: var(--vvb-color-text-secondary);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

.promo-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 1 1 auto;
}

.promo-illustration {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    /* Asset is a teal/spruce illustration; nudge its hue toward the leaf
       brand so it matches the Botanical palette. (Approximate — replace
       the PNG with a leaf-toned asset for an exact match.) */
    filter: hue-rotate(-25deg) saturate(1.08);
}

.sign-in-container {
    width: 100%;
    min-height: 100%;
    margin-block: auto;
    display: flex;
    flex-direction: column;
}

.signup-title {
    margin: 0 0 28px;
    display: flex;
    justify-content: center;
    color: var(--gs-emerald-700);
    font-size: 42px;
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.form-login,
.login-form {
    width: 100%;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frame-55 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

label {
    color: var(--vvb-color-text-secondary);
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
}

.form-control {
    width: 100%;
    height: 50px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--vvb-color-border-muted);
    background: var(--vvb-color-surface-alt);
    box-shadow: none;
    color: var(--vvb-color-text-primary);
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--gs-emerald-300);
    background: var(--vvb-color-surface);
    box-shadow: 0 0 0 4px rgba(47, 163, 75, 0.12);
}

.forgot-password {
    color: var(--gs-emerald-700);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.remember-forgot-container {
    display: flex;
    justify-content: flex-start;
}

.checkbox-remember {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.checkbox-remember input {
    width: 18px;
    height: 18px;
    accent-color: var(--gs-emerald-500);
}

.checkbox-remember label {
    margin: 0;
    color: var(--vvb-color-text-secondary);
    font-size: 15px;
}

.pw-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.pw-input-wrap .form-control {
    padding-right: 56px;
}

.pw-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    line-height: 0;
    color: var(--vvb-color-text-subtle);
    cursor: pointer;
}

.pw-toggle .eye-closed {
    display: none;
}

.pw-toggle.is-open .eye-open {
    display: none;
}

.pw-toggle.is-open .eye-closed {
    display: inline;
}

.form-global-error .validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.login-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: var(--palette-primary-400);
    box-shadow: 0 10px 22px rgba(95, 234, 196, 0.28);
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-btn:hover,
.login-btn:focus,
.login-btn:focus-visible {
    background: var(--palette-primary-300);
    box-shadow: 0 12px 24px rgba(95, 234, 196, 0.34);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.auth-switch {
    margin: 20px 0 0;
    color: var(--vvb-color-text-primary);
    font-size: 16px;
    text-align: center;
}

.auth-switch__link {
    color: var(--gs-emerald-700);
    font-weight: 600;
    text-decoration: none;
}

.verification-subtext {
    text-align: center;
    height: auto;
}

/* === Shared 2FA challenge styles (LoginWith2fa, LoginWithEmailCode) === */
.twofa-shell {
    max-width: 440px;
    margin-inline: auto;
    align-items: center;
    text-align: center;
    gap: 0;
}

.twofa-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gs-emerald-700) 0%, var(--gs-emerald-500) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(47, 163, 75, 0.18);
}

.twofa-icon svg {
    width: 30px;
    height: 30px;
    color: #ffffff;
}

.twofa-shell .signup-title {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.15;
    white-space: nowrap;
}

.twofa-lead {
    margin: 0 0 28px;
    color: var(--vvb-color-text-tertiary);
    font-size: 15px;
    line-height: 1.55;
    max-width: 360px;
}

.twofa-lead strong {
    color: var(--gs-emerald-700);
}

.twofa-shell .form-login {
    width: 100%;
}

.twofa-shell .login-form {
    gap: 20px;
}

.twofa-shell .input-field {
    align-items: center;
}

.twofa-shell .input-field > label {
    align-self: stretch;
    text-align: left;
}

.twofa-code {
    width: 100%;
    text-align: center;
    font-family: "SFMono-Regular", "Fira Code", Consolas, monospace;
    font-size: 26px;
    letter-spacing: 0.45em;
    font-weight: 600;
    padding-inline-end: 6px;
    background: var(--vvb-color-surface-alt);
}

.twofa-code::placeholder {
    letter-spacing: normal;
    font-weight: 400;
    color: var(--vvb-color-text-subtle);
}

.twofa-shell .remember-forgot-container {
    align-self: stretch;
    justify-content: flex-start;
}

.twofa-shell .login-btn {
    margin-top: 4px;
}

.twofa-shell .auth-switch {
    margin: 20px 0 0;
    font-size: 14px;
    color: var(--vvb-color-text-tertiary);
}

.twofa-actions-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
    font-size: 14px;
}

.twofa-actions-row .auth-switch__link {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

@media (max-width: 992px) {
    .twofa-shell {
        max-width: none;
    }

    .twofa-shell .signup-title {
        font-size: 26px;
        white-space: normal;
    }
}

.text-danger {
    color: var(--vvb-color-danger-accent) !important;
    font-size: 14px;
}

.betabadge {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 50px;
    width: unset;
    opacity: 0.7;
}

@media (max-width: 992px) {
    .auth-card {
        max-height: none;
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
        overflow: visible;
    }

    .promo-pane {
        min-height: 360px;
        order: 2;
    }

    .form-pane {
        order: 1;
        padding: 0;
    }

    .signup-title {
        font-size: 34px;
        margin-bottom: 28px;
    }

    .promo-title {
        font-size: 28px;
        line-height: 36px;
    }

    .promo-text {
        font-size: 18px;
    }

    .article-logo-title {
        margin-bottom: 40px;
    }
}

/* =================================================================
   Page-specific overrides — scoped via the per-page body class set
   in each page's ViewData["AuthBodyClass"] (see _LayoutCard.cshtml),
   so a rule for one auth page never bleeds onto another.
   ================================================================= */

/* --- Login --- */
.auth-login .sign-in-container {
    max-width: 680px;
}

.auth-login .forgot-password {
    display: inline-flex;
    margin-top: 4px;
}

.auth-login .remember-forgot-container {
    margin-top: 0;
}

.auth-login .login-btn {
    margin-top: 18px;
}

.auth-login .auth-switch {
    margin-top: 18px;
}

@media (max-width: 992px) {
    .auth-login .sign-in-container {
        max-width: none;
    }

    .auth-login .login-btn {
        margin-top: 16px;
    }
}

/* --- ResetPassword --- */
.auth-reset .signup-title {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gs-emerald-700);
}

.auth-reset .sign-in-container {
    margin-block: auto;
}

.auth-reset .pw-input-wrap .form-control {
    padding-right: 44px;
}

.auth-reset .pw-toggle {
    right: 12px;
}

.auth-reset .form-global-error .validation-summary-errors {
    margin-top: 8px;
}

.auth-reset .form-pane {
    height: calc(100vh - 64px);
}

.auth-reset .form-control,
.auth-reset .form-login,
.auth-reset .login-form {
    width: 100%;
}

/* --- Lockout --- */
.auth-lockout .locked-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--vvb-color-danger-bg);
    border: 1px solid var(--gs-danger-500);
    color: var(--vvb-color-danger);
    max-width: 420px;
    margin: auto;
}

.auth-lockout .locked-alert-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gs-danger-50), var(--gs-danger-500));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(158, 42, 34, 0.15);
}

.auth-lockout .locked-alert-icon svg {
    width: 20px;
    height: 20px;
}

.auth-lockout .locked-alert-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.auth-lockout .locked-alert-text strong {
    font-weight: 600;
}

.auth-lockout .locked-alert-text span {
    font-size: 12px;
    margin-top: 2px;
    opacity: 0.8;
}


/* --- EnableAuthenticator --- */
.auth-enable-authenticator .link-btn {
    cursor: pointer;
    color: var(--gs-emerald-700) !important;
    text-decoration: underline !important;
}

.auth-enable-authenticator .article-logo-title {
    margin-bottom: unset !important;
}

.auth-enable-authenticator .wrapper {
    padding-block: 16px;
}
