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

.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(--color-surface);
    border: 1px solid var(--color-accent-200);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgb(var(--color-neutral-900-rgb) / 0.07);
    display: grid;
    gap: 40px;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 648px);
    overflow: hidden;
    padding: 28px 32px;
}

.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(--color-primary-950);
}

.article-title {
    color: var(--color-primary-950);
    display: block;
    font-size: 35px;
    font-style: normal;
    font-weight: 500;
    line-height: 1;
}

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

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

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

.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(--color-secondary-200);
    color: var(--color-secondary-700);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

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

.promo-text {
    margin: 0;
    color: var(--color-neutral-750);
    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;
}

.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(--color-primary);
    font-size: 42px;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.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(--color-neutral-750);
    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(--color-accent-200);
    background: var(--color-accent-100);
    box-shadow: none;
    color: var(--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(--color-secondary-500);
    background: var(--color-accent-050);
    box-shadow: 0 0 0 4px rgb(var(--color-secondary-rgb) / 0.12);
}

.forgot-password {
    color: var(--color-primary);
    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(--color-primary);
}

.checkbox-remember label {
    margin: 0;
    color: var(--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;
    color: var(--color-text-subtle);
    cursor: pointer;
    line-height: 0;
}

.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(--color-primary);
    color: var(--color-white);
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-btn:hover {
    background: var(--color-primary-600);
}

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

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

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

.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(--color-primary) 0%, var(--color-secondary) 100%);
    box-shadow: 0 8px 24px rgb(var(--color-secondary-rgb) / 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.twofa-icon svg {
    width: 30px;
    height: 30px;
    color: var(--color-white);
}

.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(--color-text-tertiary);
    font-size: 15px;
    line-height: 1.55;
    max-width: 360px;
}

.twofa-lead strong {
    color: var(--color-primary);
}

.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;
    font-weight: 600;
    letter-spacing: 0.45em;
    padding-inline-end: 6px;
    background: var(--color-accent-050);
}

.twofa-code::placeholder {
    letter-spacing: normal;
    font-weight: 400;
    color: var(--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(--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;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.text-danger {
    color: var(--color-danger-700) !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;
        overflow: visible;
        padding: 24px;
    }

    .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;
    }

    .twofa-shell {
        max-width: none;
    }

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