/**
 * Shared auth form layout — borderless cards, fit viewport without page scroll.
 */

html.auth-html,
body.auth-page {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.auth-page .auth-split,
.auth-split.auth-split--login,
.auth-split.auth-split--signup {
    height: 100dvh;
    height: -webkit-fill-available;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.auth-split-brand,
.auth-split-form {
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.auth-page .auth-card,
.auth-page .login-card {
    border: none;
    box-shadow: none;
    max-width: 100%;
}

.auth-split--login .auth-form-shell,
.auth-split--signup .auth-form-shell {
    width: 96%;
    max-width: 920px;
    margin: 0 auto;
    max-height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

@media (min-width: 901px) {
    .auth-split--login .auth-form-shell,
    .auth-split--signup .auth-form-shell {
        width: 92%;
        min-width: 0;
        max-width: 960px;
    }
}

.auth-split--login .auth-split-form,
.auth-split--signup .auth-split-form {
    padding: 0.65rem 0.85rem;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    overflow: hidden;
}

.auth-split--signup .auth-split-form {
    overflow: hidden;
}

.auth-page .auth-split-brand {
    padding: 1.5rem 2rem;
}

.auth-page .auth-split-brand h2 {
    margin: 1rem 0 0.5rem;
    font-size: 1.55rem;
}

.auth-page .auth-split-brand > p {
    margin-bottom: 0.85rem;
}

.auth-page .auth-split-features {
    margin-bottom: 0.85rem;
}

.auth-page--login .auth-card.auth-card--login,
.auth-page--signup .auth-card.auth-card--signup {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}

/* Legacy card fallback when auth-pro-card not used */
.auth-page--login .auth-card.auth-card--login:not(.auth-pro-card),
.auth-page--signup .auth-card.auth-card--signup:not(.auth-pro-card) {
    border: none;
    box-shadow: none;
    background: #fff;
    border-radius: 16px;
    padding: 1.35rem 2rem 1.15rem;
}

.auth-page--signup .auth-card--signup.auth-card--compact {
    padding: 1.25rem 2rem 1rem;
}

.auth-page--signup .auth-form-topbar {
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.auth-page--signup .auth-form-topbar-brand {
    font-size: 1.05rem;
}

.auth-page--signup .auth-signup-header--compact {
    margin-bottom: 0.55rem;
}

.auth-page--signup .auth-signup-header--compact h1,
.auth-page--signup .auth-signup-header h1 {
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.auth-page--signup .auth-plan-pill {
    margin-top: 0;
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
}

.auth-page--signup .auth-signup-form--compact .form-group {
    margin-bottom: 0.42rem;
}

.auth-page--signup .auth-signup-form--compact label {
    font-size: 0.74rem;
    margin-bottom: 0.18rem;
}

.auth-page--signup .auth-input-wrap input,
.auth-page--signup .auth-plan-select {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    font-size: 0.84rem;
}

.auth-page--signup .auth-signup-form--compact .auth-input-wrap input {
    padding-left: 2rem;
}

.auth-page--signup .auth-input-wrap > i:first-child {
    font-size: 0.72rem;
    left: 0.6rem;
}

.auth-page--signup .auth-start-mode {
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.auth-page--signup .auth-start-mode-option {
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    border-width: 1px;
}

.auth-page--signup .auth-start-mode-title {
    font-size: 0.8rem;
}

.auth-page--signup .auth-start-mode-desc {
    font-size: 0.68rem;
    margin-top: 0.1rem;
}

.auth-page--signup .auth-duo-row {
    gap: 0.5rem;
}

.auth-page--signup .auth-duo-row .form-group {
    margin-bottom: 0.42rem;
}

.auth-page--signup .auth-password-strength {
    margin-top: 0.15rem;
}

.auth-page--signup .auth-submit-btn {
    margin-top: 0.35rem;
    padding: 0.52rem 0.85rem;
    font-size: 0.86rem;
}

.auth-page--signup .auth-legal,
.auth-page--signup .auth-password-policy {
    margin: 0.3rem 0 0;
    font-size: 0.64rem;
    line-height: 1.3;
}

.auth-page--signup .auth-password-policy {
    display: none;
}

.auth-split-brand {
    overflow: hidden;
}

.auth-brand-content {
    max-height: 100%;
    overflow: hidden;
}

.auth-split-brand .sidebar-brand-logo.platform-brand-logo {
    width: 72px;
    height: 72px;
}

.auth-split-brand h2 {
    margin: 1rem 0 0.5rem;
    font-size: 1.55rem;
    line-height: 1.2;
}

.auth-split-brand > p {
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-split-features {
    margin-bottom: 0.85rem;
}

.auth-split-features li {
    padding: 0.28rem 0;
    font-size: 0.84rem;
}

.auth-brand-stats {
    margin-bottom: 0.85rem;
    padding: 0.65rem 0;
    gap: 1rem;
}

.auth-brand-stats strong {
    font-size: 1.1rem;
}

.auth-brand-stats span {
    font-size: 0.68rem;
}

.auth-eyebrow {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    html.auth-html,
    body.auth-page {
        height: auto !important;
        max-height: none !important;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .auth-split,
    .auth-split.auth-split--login,
    .auth-split.auth-split--signup {
        height: auto !important;
        max-height: none !important;
        min-height: 100dvh;
        overflow: visible !important;
    }

    .auth-split-brand,
    .auth-split-form,
    .auth-split--login .auth-split-form,
    .auth-split--signup .auth-split-form {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .auth-split--login .auth-form-shell,
    .auth-split--signup .auth-form-shell {
        width: 100%;
        min-width: 0;
        max-width: none;
        max-height: none;
        -webkit-transform: none;
        transform: none;
        -webkit-box-pack: start;
        -ms-flex-pack: start;
        justify-content: flex-start;
    }

    .auth-page--login .auth-card.auth-card--login,
    .auth-page--signup .auth-card.auth-card--signup {
        max-height: none;
        overflow: visible;
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .auth-page--signup .auth-password-policy {
        display: block;
    }
}

@media (min-width: 901px) and (max-height: 960px) {
    .auth-split--signup .auth-form-shell {
        -webkit-transform: scale(0.94);
        transform: scale(0.94);
        -webkit-transform-origin: center center;
        transform-origin: center center;
    }
}

@media (min-width: 901px) and (max-height: 900px) {
    .auth-split--login .auth-form-shell,
    .auth-split--signup .auth-form-shell {
        -webkit-transform: scale(0.96);
        transform: scale(0.96);
        -webkit-transform-origin: center center;
        transform-origin: center center;
    }

    .auth-brand-stats {
        display: none;
    }
}

@media (min-width: 901px) and (max-height: 820px) {
    .auth-split--login .auth-form-shell,
    .auth-split--signup .auth-form-shell {
        -webkit-transform: scale(0.92);
        transform: scale(0.92);
    }

    .auth-brand-content {
        -webkit-transform: scale(0.95);
        transform: scale(0.95);
        -webkit-transform-origin: center center;
        transform-origin: center center;
    }

    .auth-split-brand h2 {
        font-size: 1.35rem;
    }

    .auth-split--login .auth-eyebrow {
        display: none;
    }
}

@media (min-width: 901px) and (max-height: 700px) {
    .auth-split--login .auth-form-shell,
    .auth-split--signup .auth-form-shell {
        -webkit-transform: scale(0.86);
        transform: scale(0.86);
    }

    .auth-split-features li:nth-child(n+3) {
        display: none;
    }
}
