* {
        box-sizing: border-box;
    }


    :root {
        color-scheme: light;
    }


    body {
        margin: 0;

        min-height: 100vh;

        display: flex;

        align-items: center;
        justify-content: center;

        padding: 20px 12px;

        background: #f5f7fa;

        color: #202124;

        font-family:
            Roboto,
            Arial,
            sans-serif;

        -webkit-font-smoothing: antialiased;
    }


    /* =========================
       Карточка
       ========================= */

    .card {
        width: 100%;

        max-width: 380px;

        padding: 30px 24px 26px;

        background: #fff;

        border:
            1px solid
            #e9ecef;

        border-radius: 18px;

        box-shadow:
            0 1px 3px
            rgba(0, 0, 0, 0.08),
            0 8px 24px
            rgba(0, 0, 0, 0.07);

        text-align: center;
    }


    /* =========================
       Заголовок
       ========================= */

    h1 {
        margin: 0;

        color: #202124;

        font-size: 22px;

        font-weight: 600;

        line-height: 1.3;
    }


    .subtitle {
        margin:
            8px
            0
            24px;

        color: #6f7479;

        font-size: 14px;

        line-height: 1.45;
    }


    /* =========================
       Поля
       ========================= */

    .field {
        width: 100%;

        margin-bottom: 12px;

        text-align: left;
    }


    .field-label {
        display: block;

        margin:
            0
            0
            6px
            2px;

        color: #5f6368;

        font-size: 13px;

        font-weight: 500;
    }


    .password-wrapper {
        position: relative;
    }


    input[type="text"],
    input[type="password"] {
        display: block;

        width: 100%;

        height: 46px;

        padding:
            0
            44px
            0
            14px;

        border:
            1px solid
            #d5d9dd;

        border-radius: 11px;

        background: #fff;

        color: #202124;

        font-family: inherit;

        font-size: 16px;

        outline: none;

        transition:
            border-color 0.15s ease,
            box-shadow 0.15s ease,
            background-color 0.15s ease;
    }
    
    #invite {
    padding-right: 14px;
    }


    input::placeholder {
        color: #9aa0a6;
    }


    input:hover {
        border-color: #b9bec4;
    }


    input:focus {
        border-color: #43a047;

        box-shadow:
            0 0 0 3px
            rgba(67, 160, 71, 0.13);
    }


    /* =========================
       Плавное появление
       ========================= */

    .invite-extra {
        display: grid;

        grid-template-rows: 0fr;

        opacity: 0;

        margin-bottom: 0;

        transition:
            grid-template-rows 0.18s ease,
            opacity 0.18s ease,
            margin-bottom 0.18s ease;
    }


    .invite-extra.visible {
        grid-template-rows: 1fr;

        opacity: 1;

        margin-bottom: 12px;
    }


    .invite-extra-inner {
        min-height: 0;

        overflow: hidden;
    }


    /* =========================
       Показать пароль
       ========================= */

    .password-toggle {
        position: absolute;

        top: 50%;
        right: 6px;

        width: 36px;
        height: 36px;

        margin: 0;

        padding: 0;

        transform: translateY(-50%);

        border: 0;

        border-radius: 9px;

        background: transparent;

        color: #6f7479;

        font-size: 18px;

        cursor: pointer;

        box-shadow: none;

        transition:
            background-color 0.15s ease,
            color 0.15s ease;
    }


    .password-toggle:hover {
        background: #f1f3f4;

        color: #3c4043;

        box-shadow: none;
    }


    .password-toggle:active {
        transform:
            translateY(-50%)
            scale(0.96);

        box-shadow: none;
    }


    .password-toggle:focus-visible {
        outline: none;

        box-shadow:
            0 0 0 3px
            rgba(67, 160, 71, 0.14);
    }


    /* =========================
       Ошибка
       ========================= */

    .error-message {
        min-height: 22px;

        margin:
            8px
            0
            0;

        color: #d32f2f;

        font-size: 14px;

        line-height: 22px;

        text-align: left;

        visibility: hidden;
    }


    .error-message.visible {
        visibility: visible;
    }


    /* =========================
       Кнопка
       ========================= */

    .submit-button {
        display: flex;

        align-items: center;
        justify-content: center;

        width: 100%;

        min-height: 46px;

        margin-top: 4px;

        padding:
            0
            18px;

        border: 0;

        border-radius: 12px;

        background: #43a047;

        color: #fff;

        font-family: inherit;

        font-size: 15px;

        font-weight: 600;

        line-height: 1.2;

        cursor: pointer;

        box-shadow:
            0 1px 2px
            rgba(0, 0, 0, 0.12);

        transition:
            background-color 0.15s ease,
            box-shadow 0.15s ease,
            transform 0.1s ease;
    }


    .submit-button:hover {
        background: #388e3c;

        box-shadow:
            0 3px 7px
            rgba(0, 0, 0, 0.14);
    }


    .submit-button:active {
        transform: scale(0.98);

        box-shadow:
            0 1px 2px
            rgba(0, 0, 0, 0.10);
    }


    .submit-button:focus-visible {
        outline: none;

        box-shadow:
            0 0 0 3px
            rgba(67, 160, 71, 0.14),
            0 2px 6px
            rgba(0, 0, 0, 0.12);
    }


    .submit-button:disabled {
        background: #9ccc9f;

        cursor: default;

        transform: none;

        box-shadow:
            0 1px 2px
            rgba(0, 0, 0, 0.08);
    }


    /* =========================
       Мобильная версия
       ========================= */

    @media (max-width: 600px) {

        body {
            padding:
                16px
                12px;
        }


        .card {
            max-width: 100%;

            padding:
                28px
                20px
                24px;

            border-radius: 16px;
        }


        h1 {
            font-size: 21px;
        }


        .subtitle {
            margin-bottom: 22px;
        }


        input[type="text"],
        input[type="password"] {
            height: 46px;

            font-size: 16px;
        }


        .submit-button {
            min-height: 46px;

            font-size: 15px;
        }

    }


.page-title {
    margin: 0 0 18px;
    text-align: center;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #202423;
}

@media (max-width: 600px) {
    .page-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
}


/* =========================================================
ПРИГЛАШЕНИЕ В ГРУППУ
========================================================= */

.group-invite-modal {
position: fixed;
inset: 0;
z-index: 10000;


display: flex;
align-items: center;
justify-content: center;

padding: 20px;

background: rgba(0, 0, 0, 0.55);

backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);


}

.group-invite-modal.hidden {
display: none;
}

.group-invite-dialog {
width: min(460px, 100%);


padding: 24px;

border-radius: 18px;

background: #ffffff;

box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35);

text-align: center;


}

.group-invite-text {
margin: 0 0 22px;


font-size: 18px;
line-height: 1.45;


}

.group-invite-actions {
display: grid;


grid-template-columns: 1fr 1fr;

gap: 10px;


}

.group-invite-actions button {
min-height: 52px;


padding: 10px 14px;

border: 2px solid transparent;
border-radius: 12px;

font: inherit;
font-weight: 600;

cursor: pointer;

transition:
    opacity 0.15s ease,
    transform 0.1s ease;


}

.group-invite-actions button:active {
transform: scale(0.98);
}

.group-invite-actions button:disabled {
opacity: 0.5;
cursor: default;
}

#groupInviteReplace {
background: #e53935;
color: #ffffff;
}

#groupInviteMerge {
background: #43a047;
color: #ffffff;
}

#groupInviteCancel {
grid-column: 1 / -1;


background: #fbc02d;
color: #222222;


}

body.group-invite-open {
overflow: hidden;
}

@media (max-width: 600px) {


.group-invite-modal {
    padding: 14px;
}

.group-invite-dialog {
    padding: 20px;

    border-radius: 16px;
}

.group-invite-text {
    font-size: 17px;
}

.group-invite-actions button {
    min-height: 56px;

    font-size: 15px;
}


}
