.auth-page {
    width: 100%;
    max-width: 68rem;
    margin: 0 auto;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.auth-shell__aside {
    position: relative;
    display: flex;
    min-height: 35rem;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: var(--space-10);
    background:
        radial-gradient(circle at 100% 0%, rgba(59, 130, 246, .28), transparent 38%),
        linear-gradient(155deg, var(--color-navy-950) 0%, var(--color-navy-900) 58%, #14345c 100%);
    color: #d9e5f5;
}

.auth-shell__aside::after {
    position: absolute;
    right: -5rem;
    bottom: -6rem;
    width: 16rem;
    height: 16rem;
    border: 1px solid rgba(147, 197, 253, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 2rem rgba(147, 197, 253, .04), 0 0 0 4rem rgba(147, 197, 253, .025);
    content: "";
}

.auth-shell__aside > * {
    position: relative;
    z-index: 1;
}

.auth-aside__mark {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    margin-bottom: var(--space-8);
    border: 1px solid rgba(191, 219, 254, .36);
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, .2);
    color: var(--color-surface);
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    letter-spacing: .04em;
}

.auth-aside__eyebrow,
.auth-eyebrow {
    margin-bottom: var(--space-2);
    color: #93c5fd;
    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: .14em;
    line-height: var(--line-tight);
    text-transform: uppercase;
}

.auth-shell__aside h2 {
    max-width: 22rem;
    margin-bottom: var(--space-4);
    color: var(--color-surface);
    font-size: clamp(1.75rem, 3vw, 2.45rem);
}

.auth-shell__aside p {
    max-width: 25rem;
    margin-bottom: 0;
    color: #b9cbe0;
}

.auth-aside__points {
    display: grid;
    gap: var(--space-3);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

.auth-aside__points li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    color: #d9e5f5;
    font-size: var(--text-sm);
}

.auth-aside__points li::before {
    flex: 0 0 auto;
    width: .45rem;
    height: .45rem;
    margin-top: .45rem;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 0 .25rem rgba(96, 165, 250, .12);
    content: "";
}

.auth-aside__note {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: #9fb4cd !important;
    font-size: var(--text-xs);
}

.auth-aside__note::before {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 .25rem rgba(74, 222, 128, .12);
    content: "";
}

.auth-card {
    min-width: 0;
    padding: var(--space-10);
}

.auth-card__header {
    margin-bottom: var(--space-8);
}

.auth-card__header h1 {
    margin-bottom: var(--space-3);
}

.auth-card__header p:not(.auth-eyebrow) {
    max-width: 34rem;
    margin-bottom: 0;
    color: var(--color-text-muted);
}

.auth-form {
    display: grid;
    max-width: none !important;
    gap: var(--space-4);
}

.auth-field {
    min-width: 0;
}

.auth-field label {
    display: block;
    margin-bottom: var(--space-2);
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    width: 100%;
    max-width: none;
    min-height: 3rem;
    padding: .75rem .875rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    line-height: var(--line-normal);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.auth-field input::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

.auth-field input:hover {
    border-color: var(--color-primary-600);
}

.auth-field input:focus {
    border-color: var(--color-primary-600);
    box-shadow: var(--shadow-focus);
    outline: 0;
}

.auth-field input[aria-invalid="true"] {
    border-color: var(--color-danger-600);
}

.auth-field--code input {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: .22em;
    text-align: center;
}

.auth-field__hint,
.auth-field .helptext {
    display: block;
    margin: var(--space-2) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.auth-field .helptext ul,
.auth-field ul.helptext {
    margin: var(--space-2) 0 0;
    padding-left: var(--space-5);
}

.auth-field .errorlist,
.auth-form > .errorlist {
    margin: 0 0 var(--space-2);
    padding: 0;
    color: var(--color-danger-600);
    font-size: var(--text-sm);
    list-style: none;
}

.auth-form-error {
    margin-bottom: var(--space-5);
    padding: var(--space-3) var(--space-4);
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    color: #991b1b;
    font-size: var(--text-sm);
}

.auth-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.auth-form__submit {
    min-width: 8rem;
}

.auth-form__actions--stacked {
    align-items: stretch;
    flex-direction: column;
}

.auth-form__actions--stacked .auth-form__submit {
    width: 100%;
}

.auth-links {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-8);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
}

.auth-links p {
    margin-bottom: 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.auth-links .link-inline {
    font-weight: var(--font-weight-semibold);
}

.auth-card__footer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-8);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.auth-card__footer::before {
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: var(--color-success-600);
    content: "";
}

@media (max-width: 767px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-shell__aside {
        min-height: 0;
        padding: var(--space-6);
    }

    .auth-shell__aside h2 {
        font-size: var(--text-2xl);
    }

    .auth-aside__mark {
        margin-bottom: var(--space-6);
    }

    .auth-aside__points {
        margin-top: var(--space-6);
    }

    .auth-aside__note {
        margin-top: var(--space-8) !important;
    }

    .auth-card {
        padding: var(--space-6);
    }

    .auth-card__header {
        margin-bottom: var(--space-6);
    }

    .auth-form__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-form__submit {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .auth-shell__aside,
    .auth-card {
        padding: var(--space-5);
    }
}
