html,
body {
    min-height: 100%;
    margin: 0;
}

.auth-page {
    min-height: 100vh;
    background: #f5f6fa;
    color: #24263a;
    font-family: var(--bs-body-font-family);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    min-height: 100vh;
    padding: 1.5rem;
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 3rem);
    padding: clamp(2rem, 5vw, 5rem);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #24263a, #37385a);
    color: #fff;
}

.auth-logo-picture {
    display: inline-block;
}

.auth-logo {
    width: min(100%, 220px);
    height: auto;
}

.auth-eyebrow {
    margin-bottom: 1rem;
    color: #c4c6e8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.auth-brand-panel h1 {
    max-width: 24rem;
    margin-bottom: 1rem;
    font-size: clamp(2.25rem, 4vw, 3.75rem);
    font-weight: 600;
    line-height: 1.08;
}

.auth-brand-copy {
    max-width: 27rem;
    margin: 0;
    color: #d7d8e6;
    font-size: 1.1rem;
    line-height: 1.7;
}

.auth-brand-footer,
.auth-copyright {
    margin: 0;
    color: #b6b8ca;
    font-size: 0.8rem;
}

.auth-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 5rem);
}

.auth-content > * {
    width: min(100%, 440px);
}

.auth-heading {
    margin-bottom: 0.5rem;
    color: #24263a;
    font-size: 1.9rem;
    font-weight: 650;
}

.auth-subheading {
    margin-bottom: 2rem;
    color: #737587;
}

.auth-copyright {
    margin-top: 2rem;
    text-align: center;
    color: #858798;
}

#clerk-sign-in {
    display: flex;
    justify-content: center;
}

.auth-pending {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    color: #5b5e73;
    font-size: 0.9rem;
}

.auth-pending[hidden] {
    display: none;
}

.auth-pending-spinner {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    border: 2px solid #dedff0;
    border-top-color: #786fff;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-pending-spinner {
        animation: none;
        border-top-color: #786fff;
    }
}

@media (max-width: 767.98px) {
    .auth-shell {
        display: block;
        padding: 0;
    }

    .auth-brand-panel {
        min-height: auto;
        gap: 2rem;
        padding: 1.5rem;
        border-radius: 0;
    }

    .auth-logo-picture {
        display: inline-flex;
        width: 3.25rem;
        height: 3.25rem;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        border-radius: 0.75rem;
        background: #fff;
    }

    .auth-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .auth-brand-panel h1 {
        font-size: 2rem;
    }

    .auth-brand-footer {
        display: none;
    }

    .auth-content {
        padding: 2.5rem 1.25rem;
    }
}
