.login-page {
    padding: 32px 20px;
    background: $portal-soft;
}

.login-card {
    width: min(100%, 460px);
    padding: 38px;
    background: $portal-card;
    border: 1px solid rgba($portal-line, 0.8);
    border-radius: 14px;
}

.login-card .brand-lockup {
    margin-bottom: 34px;
}

// Size the auth logo by height (the mark is 44x32) rather than the default
// width, matching the header brandbar.
.login-card .brand-logo {
    width: auto;
    height: 32px;
    flex: 0 0 auto;
}

.login-card__copy {
    margin-bottom: 28px;
}

.login-card h1 {
    margin: 0 0 12px;
    color: $portal-ink;
    font-family: $portal-serif;
    font-size: 42px;
    line-height: 1.05;
}

.login-card p {
    color: $portal-text;
}

.login-card__footer {
    margin: 26px 0 0;
    padding-top: 22px;
    border-top: 1px solid $portal-line;
    text-align: center;
}

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

.login-form .btn {
    height: 50px;
    margin-top: 8px;
    border-radius: 8px;
    font-weight: 700;
}

// Secondary actions: "Forgot your password?" sits under the password field,
// "Sign in without a password" under the submit button.
.login-form__aside {
    margin: 10px 0 0;
    text-align: right;
}

.login-form__alt {
    margin: 4px 0 0;
    text-align: center;
}

.login-link {
    padding: 0;
    color: $portal-ink;
    background: none;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-link:hover:not(:disabled) {
    color: $portal-blue-dark;
}

.login-link:disabled {
    color: $portal-muted;
    text-decoration: none;
}

.login-link:focus-visible {
    border-radius: 4px;
    outline: 2px solid $portal-field-focus-border;
    outline-offset: 3px;
}

// One box per digit of the six digit email / authenticator code.
.code-input {
    display: flex;
    gap: 10px;
}

.code-input__box {
    flex: 1 1 0;
    min-width: 0;
    height: 58px;
    padding: 0;
    color: $portal-ink;
    background: $portal-white;
    border: 1px solid $portal-field-line;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.code-input__box--filled {
    border-color: $portal-ink;
}

.code-input__box:focus {
    border-color: $portal-field-focus-border;
    box-shadow: 0 0 0 3px $portal-focus;
    outline: none;
}

.code-input__box:disabled {
    background: $portal-soft;
}

@include media-breakpoint-down(sm) {
    .login-page {
        align-items: flex-start !important;
        padding: 28px 24px;
        background: $portal-white;
    }

    .login-card {
        padding: 0;
        border: 0;
        border-radius: 0;
    }

    .login-card h1 {
        font-size: 38px;
    }

    .code-input {
        gap: 7px;
    }

    .code-input__box {
        height: 52px;
        font-size: 19px;
    }
}
