.auth-page {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;

    min-height: calc(100svh - 6rem);

    padding-block: 4rem;
}

.auth-page__container {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: min(100%, 32rem);

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background:
        color-mix(
            in oklch,
            var(--background) 94%,
            transparent
        );
}

.auth-card--register {
    width: min(100%, 38rem);
}

.auth-card__header {
    display: flex;
    flex-direction: column;
    gap: .75rem;

    padding: 1.5rem;

    border-bottom: 1px solid var(--border);
}

.auth-card__eyebrow {
    margin: 0;

    color: var(--muted-foreground);

    font-size: .75rem;
    line-height: 1rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-card__title {
    margin: 0;

    color: var(--foreground);

    font-family: Cinzel, serif;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 500;
}

.auth-card__description {
    margin: 0;

    color: var(--muted-foreground);

    font-size: 1rem;
    line-height: 1.75rem;
}

.auth-card__body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;

    padding: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.auth-field__label {
    color: var(--foreground);

    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 500;
}

.auth-field__control {
    width: 100%;
    height: 3rem;

    padding-inline: .875rem;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: transparent;
    color: var(--foreground);

    font: inherit;
    font-size: .875rem;
    line-height: 1.25rem;

    outline: none;

    transition:
        border-color 150ms ease,
        outline-color 150ms ease;
}

.auth-field__control:hover {
    border-color:
        color-mix(
            in oklch,
            var(--foreground) 22%,
            transparent
        );
}

.auth-field__control:focus-visible {
    border-color: var(--primary);

    outline: 2px solid
        color-mix(
            in oklch,
            var(--primary) 22%,
            transparent
        );

    outline-offset: 1px;
}

.auth-password {
    position: relative;
}

.auth-password .auth-field__control {
    padding-right: 5rem;
}

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: .875rem;

    transform: translateY(-50%);

    padding: .25rem;

    border: 0;

    background: transparent;
    color: var(--muted-foreground);

    font: inherit;
    font-size: .75rem;
    line-height: 1rem;

    cursor: pointer;
}

.auth-password__toggle:hover {
    color: var(--foreground);
}

.auth-password__toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.auth-field__help {
    margin: 0;

    color: var(--muted-foreground);

    font-size: .75rem;
    line-height: 1.25rem;
}

.auth-form__submit {
    width: 100%;
    min-height: 3rem;

    margin-top: .25rem;

    font-size: .875rem;
    line-height: 1.25rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.auth-card__alternate {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .375rem;

    margin: 0;

    color: var(--muted-foreground);

    text-align: center;
    font-size: .875rem;
    line-height: 1.25rem;
}

.auth-card__alternate a {
    color: var(--foreground);

    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.auth-card__alternate a:hover {
    color: var(--primary);
}

@media (min-width: 36rem) {
    .auth-form__row {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 47.999rem) {
    .auth-page {
        min-height: auto;

        padding-block: 2rem;
    }

    .auth-card,
    .auth-card--register {
        width: 100%;
    }

    .auth-card__header,
    .auth-card__body {
        padding: 1rem;
    }
}
