.auth-shell-page main {
    background-color: var(--color-background);
    display: block;
    overflow: hidden;
    position: relative;
}

.auth-shell-page main::before,
.auth-shell-page main::after {
    content: "";
    pointer-events: none;
    position: absolute;
}

.auth-shell-page main::before {
    background: url('/images/brand/propsked-mark.svg') center / contain no-repeat;
    height: 22rem;
    opacity: 0.055;
    right: -4rem;
    top: 3rem;
    transform: rotate(-8deg);
    width: 22rem;
}

.auth-shell-page main::after {
    background-image: radial-gradient(circle, rgba(91, 67, 242, 0.16) 1px, transparent 1.5px);
    background-size: 1rem 1rem;
    bottom: 2rem;
    height: 10rem;
    left: -2rem;
    opacity: 0.55;
    width: 13rem;
}

/* Canonical auth header; the existing navbar controller retains mobile state. */
.auth-shell-page .site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    min-height: 4rem;
}

.auth-shell-page .nav {
    min-height: 4rem;
    margin: 0 auto;
    max-width: 75rem;
    padding: 0 2rem;
}

.auth-shell-page .auth-shell-brand {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
}

.auth-shell-page .auth-shell-brand img {
    display: block;
    height: auto;
    max-height: 3rem;
    width: 9rem;
}

.auth-shell-page .nav-menu {
    background: var(--color-surface);
    gap: 0.5rem;
}

.auth-shell-page .nav-menu form {
    margin: 0;
}

.auth-shell-page .nav-menu .auth-shell-nav-link {
    align-items: center;
    border-radius: 0.75rem;
    color: var(--color-text-secondary);
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.25rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
}

.auth-shell-page .nav-menu .auth-shell-nav-link:hover {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

.auth-shell-page .nav-menu .auth-shell-nav-action {
    border: 1px solid var(--color-primary-600);
    color: var(--color-primary-700);
    min-width: 5.25rem;
}

.auth-shell-page .nav-menu .auth-shell-signout {
    background: transparent;
    border: 0;
    color: var(--color-text-secondary);
    width: auto;
}

.auth-shell-page .nav-toggle {
    align-items: center;
    border-radius: 0.75rem;
    display: flex;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.auth-shell-page .hamburger span {
    background: var(--color-text-primary);
}

.auth-shell-page .nav-backdrop {
    background: rgba(35, 38, 58, 0.45);
}

/* Shared auth footer without changing the legacy footer elsewhere. */
.auth-shell-page .site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    line-height: 1rem;
    padding: 1.5rem 2rem;
}

.auth-shell-page .site-footer__content {
    max-width: 75rem;
}

.auth-shell-page .site-footer nav {
    gap: 0.5rem 1.5rem;
}

.auth-shell-page .site-footer a:link,
.auth-shell-page .site-footer a:visited {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.auth-shell-page .site-footer a:hover,
.auth-shell-page .site-footer a:focus-visible {
    color: var(--color-primary-700);
}

.auth-shell-page #bottom-right-buttons {
    display: none;
}

/* Page and panel composition. */
.auth-shell-page .auth-page-section {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 32rem;
    padding: 4rem 1.5rem 5rem;
    position: relative;
    z-index: 1;
}

.auth-shell-page .auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 1.5rem;
    box-shadow: 0 1.5rem 4rem rgba(50, 45, 102, 0.09);
    margin: 0;
    padding: 2rem;
    width: 100%;
}

.auth-shell-page .auth-card--compact {
    max-width: 34rem;
}

.auth-shell-page .auth-card--wide {
    max-width: 48rem;
    padding: 3rem;
}

.auth-shell-page .auth-card--onboarding {
    max-width: 68rem;
    padding: 3rem;
}

.auth-shell-page .first-time-account-flow {
    margin: 0;
    width: 100%;
}

.auth-shell-page .auth-card__heading {
    align-items: center;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-shell-page .auth-card__heading--left {
    align-items: flex-start;
    margin: 2rem 0 3rem;
    text-align: left;
}

.auth-shell-page .auth-card__heading h1 {
    margin: 1rem 0 0.5rem;
}

.auth-shell-page .auth-card__heading--left h1 {
    margin-top: 0;
}

.auth-shell-page .auth-card__heading p {
    color: var(--color-text-secondary);
    margin-bottom: 0;
    max-width: 42rem;
}

.auth-shell-page .auth-icon-tile {
    align-items: center;
    background: var(--color-primary-100);
    border-radius: var(--radius-control);
    color: var(--color-primary-700);
    display: inline-flex;
    flex: 0 0 auto;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.auth-shell-page .auth-icon-tile .icon {
    height: 1.5rem;
    width: 1.5rem;
}

.auth-shell-page .auth-icon-tile--large {
    border-radius: 1rem;
    height: 4rem;
    width: 4rem;
}

.auth-shell-page .auth-icon-tile--large .icon {
    height: 2rem;
    width: 2rem;
}

.auth-shell-page .account-setup-indicator {
    align-items: center;
    color: var(--color-text-secondary);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1rem;
    margin-bottom: 2rem;
}

.auth-shell-page .account-setup-indicator > .icon {
    color: var(--color-primary-600);
}

.auth-shell-page .account-setup-indicator__divider {
    background: var(--color-border);
    height: 1rem;
    width: 1px;
}

/* Auth form composition; shared fields and controls are defined in forms.css. */
.auth-shell-page .auth-form {
    display: grid;
    gap: 1rem;
    position: relative;
}

.auth-shell-page #reset-password-form[hidden] {
    display: none;
}

.auth-shell-page .auth-label-row label {
    color: var(--color-text-primary);
    font-size: var(--type-label-size);
    font-weight: var(--type-label-weight);
    line-height: var(--type-label-line-height);
}

.auth-shell-page .auth-label-row {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.auth-shell-page .auth-forgot-password {
    background: transparent;
    border: 0;
    color: var(--color-primary-700);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1rem;
    padding: 0;
}

.auth-shell-page .auth-forgot-password:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.auth-shell-page .auth-submit-action {
    margin: 0.5rem 0 0;
    width: 100%;
}

.auth-shell-page .auth-card__prompt {
    align-items: center;
    border-top: 1px solid var(--color-divider);
    color: var(--color-text-secondary);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    gap: 0.25rem 0.5rem;
    justify-content: center;
    line-height: 1.25rem;
    margin: 2rem 0 0;
    padding-top: 1.5rem;
}

.auth-shell-page .auth-card__prompt a {
    font-weight: 600;
}

/* Verification composition and states. */
.auth-shell-page .verification-page {
    max-width: 48rem;
}

.auth-shell-page .verification-page > .account-setup-indicator,
.auth-shell-page .verification-hero {
    margin-bottom: 2rem;
}

.auth-shell-page .verification-card {
    max-width: none;
}

.auth-shell-page .verification-address {
    align-items: center;
    background: var(--color-primary-100);
    border-radius: 1rem;
    color: var(--color-primary-700);
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow-wrap: anywhere;
    padding: 1rem 1.5rem;
}

.auth-shell-page .verification-address .icon {
    flex: 0 0 auto;
    height: 1.25rem;
    width: 1.25rem;
}

.auth-shell-page .verification-status {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

.auth-shell-page .verification-resend {
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 1.125rem;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    padding: 1.5rem;
}

.auth-shell-page .verification-resend h2 {
    font-size: 1.125rem;
    line-height: 1.5rem;
    margin-bottom: 0.25rem;
}

.auth-shell-page .verification-resend p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-bottom: 0;
}

.auth-shell-page .verification-resend .verification-attempts {
    color: var(--color-primary-700);
    font-weight: 500;
    margin-top: 0.5rem;
}

.auth-shell-page .verification-support {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin: 1.5rem 0 0;
    text-align: center;
}

/* Onboarding composition and choice cards. */
.auth-shell-page .onboarding-status-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.auth-shell-page .onboarding-status-row .account-setup-indicator {
    margin: 0;
}

.auth-shell-page .auth-success-badge {
    align-items: center;
    background: var(--status-success-light);
    border: 1px solid color-mix(in srgb, var(--status-success) 25%, var(--color-surface));
    border-radius: var(--radius-pill);
    color: var(--color-text-primary);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.5rem;
    line-height: 1rem;
    padding: 0.5rem 0.75rem;
}

.auth-shell-page .auth-success-badge .icon {
    color: var(--status-success);
    height: 1rem;
    width: 1rem;
}

.auth-shell-page .onboarding-form {
    gap: 2rem;
}

.auth-shell-page .onboarding-operation > legend {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5rem;
    margin-bottom: 1rem;
}

.auth-shell-page .onboarding-operation__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.auth-shell-page .field-choice.onboarding-option-card {
    align-items: flex-start;
    min-height: 8.5rem;
    padding: 1.5rem;
}

.auth-shell-page .field-choice.onboarding-option-card input {
    margin: 0;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.auth-shell-page .onboarding-option-card .field-choice-text {
    padding-right: 1.25rem;
}

.auth-shell-page .onboarding-context-panel {
    margin-top: -1rem;
}

.auth-shell-page .onboarding-section-heading {
    border-top: 1px solid var(--color-divider);
    padding-top: 2rem;
}

.auth-shell-page .onboarding-section-heading h2 {
    margin-bottom: 0.25rem;
}

.auth-shell-page .onboarding-section-heading p {
    color: var(--color-text-secondary);
    margin-bottom: 0;
}

.auth-shell-page .onboarding-field-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-shell-page .onboarding-grid-span {
    grid-column: 1 / -1;
}

.auth-shell-page .onboarding-contact-options {
    background: transparent;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
}

.auth-shell-page .onboarding-submit {
    justify-self: end;
    max-width: 18rem;
}

/* Auth-only flash placement; component presentation lives in messages.css. */
.auth-shell-page #layout-wrapper > .site-header,
.auth-shell-page #layout-wrapper > .nav-backdrop {
    order: 0;
}

.auth-shell-page #flash-messages {
    align-items: center;
    box-sizing: border-box;
    gap: 0.5rem;
    order: 1;
    padding: 0.75rem 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 900;
}

.auth-shell-page body.nav-open #flash-messages {
    z-index: 300;
}

.auth-shell-page #layout-wrapper > main {
    order: 2;
}

.auth-shell-page #layout-wrapper > .site-footer {
    order: 3;
}

.auth-shell-page .auth-feedback {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.auth-shell-page .spinner {
    border-color: var(--color-border);
    border-top-color: var(--color-primary-600);
}

.auth-shell-page .form-loading .form-overlay {
    background: color-mix(in srgb, var(--color-surface) 82%, transparent);
    border-radius: inherit;
}

@media (min-width: 768px) {
    .auth-shell-page .nav-toggle {
        display: none;
    }

    .auth-shell-page .nav-menu {
        background: transparent;
    }

    .auth-shell-page .auth-shell-signout-form {
        border-left: 1px solid var(--color-divider);
        margin-left: 0.25rem;
        padding-left: 0.75rem;
    }
}

@media (max-width: 767px) {
    .auth-shell-page .nav {
        padding: 0 1rem;
    }

    .auth-shell-page .nav-menu {
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 1rem 2rem rgba(35, 38, 58, 0.1);
        padding: 1rem;
    }

    .auth-shell-page .nav-menu .auth-shell-nav-link {
        justify-content: flex-start;
        padding-inline: 1rem;
        width: 100%;
    }

    .auth-shell-page .auth-shell-signout-form {
        width: 100%;
    }

    .auth-shell-page .auth-page-section {
        min-height: 0;
        padding: 2rem 1rem 3rem;
    }

    .auth-shell-page .auth-card,
    .auth-shell-page .auth-card--wide,
    .auth-shell-page .auth-card--onboarding {
        border-radius: 1.125rem;
        padding: 1.5rem;
    }

    .auth-shell-page #flash-messages {
        padding-inline: 1rem;
    }

    .auth-shell-page .auth-card__heading--left {
        margin: 1.5rem 0 2rem;
    }

    .auth-shell-page .verification-resend {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-shell-page .verification-resend .btn {
        width: 100%;
    }

    .auth-shell-page .onboarding-operation__options,
    .auth-shell-page .onboarding-field-grid,
    .auth-shell-page .onboarding-contact-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-shell-page .onboarding-grid-span {
        grid-column: auto;
    }

    .auth-shell-page .onboarding-submit {
        justify-self: stretch;
        max-width: none;
    }

    .auth-shell-page main::before {
        height: 16rem;
        right: -5rem;
        top: 5rem;
        width: 16rem;
    }
}

@media (max-width: 576px) {
    .auth-shell-page .site-footer {
        padding: 1.5rem 1rem;
    }

    .auth-shell-page .site-footer__content,
    .auth-shell-page .site-footer nav {
        gap: 0.75rem;
    }

    .auth-shell-page .auth-shell-brand img {
        width: 8rem;
    }

    .auth-shell-page .auth-card__heading h1 {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .auth-shell-page .auth-label-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-shell-page .onboarding-status-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-shell-page .onboarding-status-row .account-setup-indicator {
        justify-content: flex-start;
    }

    .auth-shell-page .field-choice.onboarding-option-card {
        min-height: 0;
        padding: 1rem;
    }

    .auth-shell-page .verification-address {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell-page *,
    .auth-shell-page *::before,
    .auth-shell-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
