/* Auth — fixed single viewport, no page scroll (login, register, forgot password) */

html:has(body.xproperty-auth-screen) {
    height: 100%;
    overflow: hidden;
}

body.xproperty-auth-screen {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
    background: #f5f5f5;
    position: fixed;
    inset: 0;
    width: 100%;
    -webkit-overflow-scrolling: auto;
}

body.xproperty-auth-screen .xproperty-auth-screen__main {
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

body.xproperty-auth-screen .xproperty-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 440px);
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

body.xproperty-auth-screen .xproperty-auth-shell__visual {
    height: 100%;
    overflow: hidden;
    background: #ddd;
}

body.xproperty-auth-screen .xproperty-auth-shell__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.xproperty-auth-screen .xproperty-auth-shell__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1.25rem;
    overflow: hidden;
    background: #f5f5f5;
    box-sizing: border-box;
}

body.xproperty-auth-screen .xproperty-auth-shell__card {
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - 2.5rem);
    padding: 1.35rem 1.5rem;
    background: #ececec;
    border-radius: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

body.xproperty-auth-screen .xproperty-auth-shell__logo {
    text-align: center;
    margin-bottom: 0.85rem;
}

body.xproperty-auth-screen .xproperty-auth-shell__logo img {
    max-height: 42px;
    width: auto;
}

body.xproperty-auth-screen .xproperty-auth-shell__title {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 2.8vh, 1.65rem);
    font-weight: 600;
    line-height: 1.25;
    color: #1a1a1a;
}

body.xproperty-auth-screen .xproperty-auth-shell__intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #666;
}

body.xproperty-auth-screen .xproperty-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0 0 0.85rem;
}

body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-form {
    gap: 0.5rem;
}

body.xproperty-auth-screen .xproperty-auth-form .cs_form_field,
body.xproperty-auth-screen .xproperty-auth-form select.cs_form_field {
    min-height: 42px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    font-size: 14px;
}

body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-form .cs_form_field,
body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-form select.cs_form_field {
    min-height: 38px;
    font-size: 13px;
}

body.xproperty-auth-screen .xproperty-auth-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 13px;
}

body.xproperty-auth-screen .xproperty-auth-form__row .cs_custom_checkbox label {
    font-size: 13px;
}

body.xproperty-auth-screen .xproperty-auth-form .cs_btn {
    min-height: 42px;
    margin-top: 0.15rem;
}

body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-form .cs_btn {
    min-height: 38px;
}

body.xproperty-auth-screen .xproperty-auth-footer {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    color: #1a1a1a;
}

body.xproperty-auth-screen .xproperty-auth-footer + .xproperty-auth-footer {
    margin-top: 0.5rem;
}

body.xproperty-auth-screen .xproperty-auth-alert {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 13px;
}

body.xproperty-auth-screen .xproperty-auth-alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

body.xproperty-auth-screen .xproperty-auth-alert--success {
    background: #e8f5e9;
    color: #2e7d32;
}

body.xproperty-auth-screen .xproperty-auth-alert--error {
    background: #fdecea;
    color: #c62828;
}

@media (max-width: 991px) {
    body.xproperty-auth-screen .xproperty-auth-shell {
        grid-template-columns: 1fr;
    }

    body.xproperty-auth-screen .xproperty-auth-shell__visual {
        display: none;
    }

    body.xproperty-auth-screen .xproperty-auth-shell__panel {
        padding: 1rem;
    }

    body.xproperty-auth-screen .xproperty-auth-shell__card {
        max-width: 420px;
        max-height: calc(100dvh - 2rem);
        padding: 1.15rem 1.25rem;
    }

    body.xproperty-auth-screen .xproperty-auth-shell__title {
        margin-bottom: 0.75rem;
    }
}

@media (max-height: 700px) {
    body.xproperty-auth-screen .xproperty-auth-shell__logo {
        margin-bottom: 0.5rem;
    }

    body.xproperty-auth-screen .xproperty-auth-shell__logo img {
        max-height: 34px;
    }

    body.xproperty-auth-screen .xproperty-auth-shell__title {
        margin-bottom: 0.55rem;
        font-size: 1.2rem;
    }

    body.xproperty-auth-screen .xproperty-auth-form {
        gap: 0.4rem;
    }

    body.xproperty-auth-screen .xproperty-auth-form .cs_form_field,
    body.xproperty-auth-screen .xproperty-auth-form select.cs_form_field {
        min-height: 36px;
        font-size: 13px;
    }

    body.xproperty-auth-screen .xproperty-auth-form .cs_btn {
        min-height: 36px;
    }
}

@media (max-height: 640px) {
    body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-shell__card {
        padding: 0.85rem 1rem;
    }

    body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-shell__logo {
        display: none;
    }

    body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-shell__title {
        margin-bottom: 0.45rem;
        font-size: 1.1rem;
    }

    body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-form {
        gap: 0.35rem;
    }

    body.xproperty-auth-screen .xproperty-auth-shell--compact .cs_custom_checkbox label {
        font-size: 12px;
    }

    body.xproperty-auth-screen .xproperty-auth-shell--compact .xproperty-auth-footer {
        font-size: 12px;
    }
}

body.xproperty-auth-screen .xproperty-auth-role-options {
    display: grid;
    gap: 0.35rem;
}

body.xproperty-auth-screen .xproperty-auth-role-options__label {
    font-size: 13px;
    color: #666;
}
