/* ── Блок ошибки в форме авторизации ── */
.auth-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: none;
}

/* Анимация встряски при ошибке */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}
.shake {
    animation: shake 0.35s ease;
}

/* Звёздочка обязательного поля */
.required {
    color: #f87171;
    margin-left: 2px;
}

/* Кнопка выхода в sidebar-footer */
.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-footer .btn-ghost {
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.sidebar-footer .btn-ghost:hover {
    opacity: 1;
}

/* ══════════════════════════════════════
   Страница приглашения в команду (/invite/{token}, pages/accept_invite.php)
   Клон экрана авторизации: тот же каркас, меняется только карточка справа.
   ══════════════════════════════════════ */
.auth-card--invite .auth-card-title {
    white-space: normal;      /* «Добро пожаловать в проект …» длиннее, чем «Добро пожаловать в PatoAI» */
    overflow-wrap: anywhere;
}
.auth-card--invite .auth-card-hd { margin-bottom: 18px; }

/* Кто приглашает */
.auth-invite-who {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #EAF7E3;
    border: 1px solid rgba(61, 140, 15, .18);
    border-radius: 14px;
}
.auth-invite-ava {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #A8E76A;
    color: #111111;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-invite-who-text {
    font-size: 13px;
    line-height: 1.4;
    color: #374151;
    min-width: 0;
}
.auth-invite-who-text b { color: #111111; font-weight: 600; }
.auth-invite-who-text small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6B7280;
}

.auth-invite-note {
    font-size: 13px;
    line-height: 1.5;
    color: #4B5563;
    margin: 0 0 14px;
}
.auth-invite-note b { color: #111111; font-weight: 600; word-break: break-all; }

/* Кнопка-ссылка и вторичная ссылка под основной кнопкой */
a.auth-invite-link { text-decoration: none; }
.auth-invite-sub {
    display: block;
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
    text-decoration: none;
}
.auth-invite-sub:hover { color: #3d8c0f; }

/* Почта из приглашения: подставлена и не редактируется */
.auth-screen .form-input.auth-input-locked,
.auth-screen .form-input.auth-input-locked:not(:placeholder-shown) {
    background: #F3F4F6;
    color: #6B7280;
    cursor: not-allowed;
}

/* Экран входа: на телефоне приветствие «Добро пожаловать в PatoAI» не показываем */
@media (max-width: 700px) {
    .auth-card-hd.auth-card-hd--welcome { display: none; }
}

/* Вход и регистрация на телефоне: «Яндекс ID» уходит вниз, под основную кнопку,
   с разделителем «или» между ними (в разметке он стоит сверху — меняем только порядок) */
@media (max-width: 700px) {
    #panel-login.active,
    #panel-reg.active { display: flex; flex-direction: column; }

    #panel-login > .auth-error,
    #panel-reg   > .auth-error   { order: 1; }
    #panel-login > .auth-form,
    #panel-reg   > .auth-form    { order: 2; }
    #panel-login > .auth-divider,
    #panel-reg   > .auth-divider { order: 3; }
    #panel-login > .auth-yandex,
    #panel-reg   > .auth-yandex  { order: 4; margin-bottom: 0; }
    #panel-login > .auth-foot,
    #panel-reg   > .auth-foot    { order: 5; }
}

/* Телефон: плашки в брендовой зоне мигали при резкой прокрутке вверх (оверскролл iOS).
   Причина — backdrop-filter на слоях с бесконечной анимацией и внутри скруглённого
   контейнера: Safari перерисовывает их покадрово. Только на iOS (весь браузерный движок
   там WebKit; `-webkit-touch-callout` есть лишь у него) размытие убираем, фон делаем
   плотнее, парение плашек остаётся. На Android стекло с размытием не трогаем. */
@media (max-width: 700px) {
    @supports (-webkit-touch-callout: none) {
        .auth-fc,
        .auth-stats {
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
        }
        .auth-fc {
            background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.8));
        }
        .auth-stats {
            background: linear-gradient(135deg, rgba(255,255,255,.93), rgba(255,255,255,.84));
        }
    }
}

/* Телефон: верхний ряд плашек («AI Менеджер» и «AI Маркетолог») поднят на 16px —
   между ним и нижним рядом («AI Аудит», «CRM Автоматизация») был слишком маленький зазор */
@media (max-width: 600px) {
    .auth-fc-1,
    .auth-fc-2 { top: 216px; }
}

/* «Яндекс ID» на вкладке «Регистрация» — не кликабелен */
.auth-yandex.auth-yandex--off,
.auth-yandex.auth-yandex--off:hover {
    cursor: not-allowed;
    opacity: .55;
    border-color: #E5E7EB;
    background: #ffffff;
}

/* ── Приглашение принять нельзя (уже принято, истекло, отозвано, ссылка не та) ──
   Не красная ошибка, а состояние: значок, что случилось, что делать, какой проект. */
.auth-invite-status { text-align: center; margin-bottom: 18px; }
.auth-invite-status-ico {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EEF0EE;
    color: #4B5563;
}
.auth-invite-status--ok   .auth-invite-status-ico { background: linear-gradient(314deg, #7dcf46 0%, #A8E76A 100%); color: #111111; }
.auth-invite-status--warn .auth-invite-status-ico { background: #FFF1D0; color: #9A6200; }
.auth-invite-status .auth-card-title { margin-bottom: 8px; }
.auth-invite-status-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4B5563;
    text-wrap: pretty;
}

/* В какой проект и от кого было приглашение */
.auth-invite-ctx {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #F6F8F5;
    border: 1px solid #EDF0EC;
    border-radius: 16px;
}
.auth-invite-ctx-text { min-width: 0; font-size: 14px; line-height: 1.35; color: #111111; }
.auth-invite-ctx-text b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.auth-invite-ctx-text small { display: block; margin-top: 2px; font-size: 12.5px; color: #6B7280; overflow-wrap: anywhere; }

.auth-invite-hint {
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #8d919d;
    text-align: center;
    text-wrap: pretty;
}

.auth-invite-hint span { display: inline-block; white-space: nowrap; color: #6B7280; font-weight: 600; }

/* ══════════════════════════════════════
   Страница приглашения на телефоне (.auth-screen--invite — только pages/accept_invite.php)
   Человек пришёл по ссылке ради приглашения, поэтому большая брендовая зона (персонаж,
   плашки, статистика) свёрнута в короткую шапку с логотипом, а приглашение — белый лист,
   наезжающий на неё: аватар пригласившего на верхней кромке, заголовок, кто приглашает,
   роль пилюлей, под чертой — форма. Разметка та же, что на большом экране.
   ══════════════════════════════════════ */
@media (max-width: 600px) {
    .auth-screen--invite .auth-split {
        grid-template-rows: auto 1fr;
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Шапка: только логотип и подпись, остальное скрыто */
    .auth-screen--invite .auth-left {
        height: 156px;
        padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 0;
        border-radius: 0 0 28px 28px;
        box-sizing: content-box;
    }
    .auth-screen--invite .auth-hero,
    .auth-screen--invite .auth-person,
    .auth-screen--invite .auth-fc,
    .auth-screen--invite .auth-stats { display: none; }

    .auth-screen--invite .auth-logo::after {
        content: 'Приглашение в команду';
        margin-left: auto;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .7);
        border: 1px solid rgba(255, 255, 255, .85);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        color: #315d20;
        white-space: nowrap;
    }

    /* Белый лист с приглашением */
    .auth-screen--invite .auth-right {
        position: relative;
        z-index: 2;
        align-items: flex-start;
        margin-top: -62px;
        padding: 0 14px calc(28px + env(safe-area-inset-bottom, 0px));
    }
    .auth-screen--invite .auth-card--invite {
        position: relative;
        padding: 48px 20px 24px;
        background: #ffffff;
        border: 1px solid rgba(17, 18, 23, .05);
        border-radius: 24px;
        box-shadow: 0 14px 40px rgba(25, 55, 18, .10), 0 2px 6px rgba(25, 55, 18, .04);
        animation: authInviteSheet .45s cubic-bezier(.16, 1, .3, 1) both;
    }

    .auth-screen--invite .auth-card-hd { margin-bottom: 8px; }
    .auth-screen--invite .auth-card-title {
        font-size: 19px;
        line-height: 1.3;
        margin-bottom: 0;
        text-wrap: balance;
    }

    /* Кто приглашает: аватар — на кромке листа, текст и роль по центру */
    .auth-screen--invite .auth-invite-who {
        display: block;
        padding: 0 0 20px;
        margin-bottom: 20px;
        background: none;
        border: 0;
        border-bottom: 1px solid #EDF0EC;
        border-radius: 0;
        text-align: center;
    }
    .auth-screen--invite .auth-invite-ava {
        position: absolute;
        top: -32px;
        left: 50%;
        transform: translateX(-50%);
        width: 64px;
        height: 64px;
        font-size: 22px;
        background: linear-gradient(314deg, #7dcf46 0%, #A8E76A 100%);
        border: 4px solid #ffffff;
        box-shadow: 0 8px 20px rgba(25, 55, 18, .16);
    }
    .auth-screen--invite .auth-invite-who-text {
        font-size: 14px;
        line-height: 1.45;
        color: #4B5563;
        overflow-wrap: anywhere;
    }
    .auth-screen--invite .auth-invite-who-text small {
        width: fit-content;
        max-width: 100%;
        margin: 12px auto 0;
        padding: 6px 14px;
        border-radius: 999px;
        background: #EAF7E3;
        font-size: 12.5px;
        font-weight: 600;
        color: #315d20;
    }

    .auth-screen--invite .auth-invite-note {
        font-size: 14px;
        margin-bottom: 16px;
        text-align: center;
        text-wrap: pretty;
    }
    /* Почта переносится по знакам (@, точка), а не рвётся посреди слова */
    .auth-screen--invite .auth-invite-note b { word-break: normal; overflow-wrap: anywhere; }

    /* Длинная почта в кнопке «Выйти и войти как …» переносится, а не вылезает */
    .auth-screen--invite .auth-submit {
        flex-wrap: wrap;
        text-align: center;
        overflow-wrap: anywhere;
        padding-inline: 16px;
    }
    .auth-screen--invite .auth-submit:disabled { opacity: .7; }

    .auth-screen--invite .auth-invite-sub {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        margin-top: 6px;
        font-size: 14px;
    }

    .auth-screen--invite .form-label { font-size: 13px; }
    .auth-screen--invite .form-checkbox-label { min-height: 28px; font-size: 13.5px; }
    .auth-screen--invite .form-checkbox { width: 18px; height: 18px; }
    .auth-screen--invite .auth-error {
        margin-bottom: 16px;
        border-radius: 12px;
        font-size: 13.5px;
        color: #B91C1C;   /* на белом листе бледно-красный текст читался плохо */
    }

    /* Экран состояния: шапка выше и с фирменным заголовком (форма здесь короткая — место есть),
       значок состояния — на кромке листа, там же, где аватар пригласившего */
    .auth-screen--invite-status .auth-left { height: 240px; gap: 18px; }
    .auth-screen--invite-status .auth-hero { display: block; }
    .auth-screen--invite-status .auth-hero-title { font-size: 20px; }
    .auth-screen--invite-status .auth-hero-sub br { display: none; }
    .auth-screen--invite-status .auth-hero-sub { max-width: 300px; }

    .auth-screen--invite .auth-invite-status { margin-bottom: 20px; }
    .auth-screen--invite .auth-invite-status-ico {
        position: absolute;
        top: -32px;
        left: 50%;
        transform: translateX(-50%);
        width: 64px;
        height: 64px;
        margin: 0;
        border: 4px solid #ffffff;
        box-shadow: 0 8px 20px rgba(25, 55, 18, .16);
    }
    .auth-screen--invite .auth-invite-status .auth-card-title { margin-bottom: 10px; }
    .auth-screen--invite .auth-invite-status-text { font-size: 14.5px; }

    /* В карточке проекта аватар обычный, не на кромке */
    .auth-screen--invite .auth-invite-ctx { margin-bottom: 20px; }
    .auth-screen--invite .auth-invite-ctx .auth-invite-ava {
        position: static;
        transform: none;
        width: 40px;
        height: 40px;
        font-size: 15px;
        border: 0;
        box-shadow: none;
    }
    .auth-screen--invite .auth-invite-hint {
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid #EDF0EC;
        font-size: 13px;
    }

    /* Ссылка-приглашение: «Яндекс ID» — под основной кнопкой, как на экране входа */
    #iv-panel-login.active,
    #iv-panel-reg.active { display: flex; flex-direction: column; }
    #iv-panel-login > .auth-invite-note { order: 1; }
    #iv-panel-login > .auth-form,
    #iv-panel-reg   > .auth-form    { order: 2; }
    #iv-panel-login > .auth-divider,
    #iv-panel-reg   > .auth-divider { order: 3; }
    #iv-panel-login > .auth-yandex,
    #iv-panel-reg   > .auth-yandex  { order: 4; margin-bottom: 0; }
}

@keyframes authInviteSheet {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-screen--invite .auth-card--invite { animation: none; }
}

/* ══════════════════════════════════════
   Шаги регистрации и восстановление пароля — «режим шага» (.auth-screen--step ставит app.js)
   На шаге остаётся одно дело: заголовок, поле, кнопка. Вкладки «Вход / Регистрация»,
   «Яндекс ID» с «или» и нижняя ссылка убраны — назад ведёт стрелка в шапке шага.
   ══════════════════════════════════════ */
.auth-screen--step .auth-tab-row,
.auth-screen--step .auth-card-hd--welcome,
.auth-screen--step #panel-reg > .auth-yandex,
.auth-screen--step #panel-reg > .auth-divider,
.auth-screen--step #panel-reg > .auth-foot { display: none; }

/* Шапка шага: назад · полоски · «Шаг 2 из 3» */
.auth-step-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.auth-step-back {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #F3F4F6;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
}
.auth-step-back:hover { background: #E5E7EB; }
.auth-step-bars { flex: 1; display: flex; gap: 5px; }
.auth-step-bars i {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #E5E7EB;
    transition: background .25s;
}
.auth-step-bars i:first-child,
.auth-step-top[data-step="code"]    .auth-step-bars i:nth-child(-n+2),
.auth-step-top[data-step="profile"] .auth-step-bars i { background: #A8E76A; }
.auth-step-count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #8d919d;
    white-space: nowrap;
}

.auth-step { display: flex; flex-direction: column; gap: 14px; }
.auth-step-hd { margin-bottom: 4px; }
.auth-step-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
    color: #111111;
    margin-bottom: 6px;
}
.auth-step-sub {
    font-size: 13.5px;
    line-height: 1.5;
    color: #6B7280;
    overflow-wrap: anywhere;
}
.auth-step-sub b { color: #111111; font-weight: 600; }
.auth-step-sub--center { text-align: center; }
.auth-step-link {
    color: #3d8c0f;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.auth-step-link:hover { color: #315d20; }
.auth-step-sub .auth-step-link { margin-left: 6px; }

/* Поле кода: шесть крупных цифр по центру */
.auth-screen .form-input.auth-code-input {
    height: 60px;
    padding: 0 8px 0 calc(8px + .42em);   /* компенсация разрядки после последней цифры */
    text-align: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .42em;
    border-radius: 14px;
}
.auth-screen .form-input.auth-code-input::placeholder { color: #D1D5DB; font-weight: 600; }
.auth-code-resend {
    min-height: 20px;
    text-align: center;
    font-size: 13px;
    color: #8d919d;
}

/* Телефон: в режиме шага брендовая зона сворачивается в короткую шапку с логотипом,
   форма — белый лист, наезжающий на неё (тот же приём, что на странице приглашения) */
@media (max-width: 600px) {
    .auth-screen--step .auth-split {
        grid-template-rows: auto 1fr;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .auth-screen--step .auth-left {
        height: 132px;
        padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 0;
        box-sizing: content-box;
    }
    .auth-screen--step .auth-hero,
    .auth-screen--step .auth-person,
    .auth-screen--step .auth-fc,
    .auth-screen--step .auth-stats { display: none; }

    .auth-screen--step .auth-right {
        position: relative;
        z-index: 2;
        align-items: flex-start;
        margin-top: -70px;
        padding: 0 14px calc(28px + env(safe-area-inset-bottom, 0px));
    }
    .auth-screen--step .auth-card {
        padding: 18px 20px 24px;
        background: #ffffff;
        border: 1px solid rgba(17, 18, 23, .05);
        border-radius: 24px;
        box-shadow: 0 14px 40px rgba(25, 55, 18, .10), 0 2px 6px rgba(25, 55, 18, .04);
        animation: authInviteSheet .4s cubic-bezier(.16, 1, .3, 1) both;
    }

    .auth-step-top { margin-bottom: 20px; }
    .auth-step-back { width: 40px; height: 40px; }
    .auth-step-title { font-size: 19px; }
    .auth-step-sub { font-size: 14px; }
    .auth-screen .form-input.auth-code-input { height: 64px; font-size: 26px; }
    .auth-code-resend { font-size: 14px; min-height: 24px; }
    .auth-step-link { display: inline-block; padding: 2px 0; }

    /* Восстановление пароля: заголовок по левому краю не нужен — лист и так один */
    .auth-screen--step #panel-forgot .auth-card-hd { margin: 8px 0 14px; }
    .auth-screen--step #panel-forgot .auth-foot { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-screen--step .auth-card { animation: none; }
}

/* ══════════════════════════════════════
   Телефон: переключатель «Вход / Регистрация» — в виде нижнего меню приложения (.mob-nav
   в mobile.css): белая капсула с тонким кольцом и мягкой тенью, выбранная вкладка —
   лаймовая пилюля со свечением, подпись тёмно-зелёная; невыбранная — серая, без фона.
   Пилюля переезжает между вкладками (там, где браузер знает :has; иначе просто меняется фон).
   Действует и на странице приглашения по ссылке — там те же вкладки.
   ══════════════════════════════════════ */
@media (max-width: 600px) {
    .auth-tab-row {
        position: relative;
        padding: 5px;
        margin-bottom: 20px;
        background: rgba(255, 255, 255, .92);
        border-radius: 18px;
        box-shadow: 0 10px 28px rgba(15, 17, 23, .08), inset 0 0 0 1px rgba(31, 90, 57, .08);
    }
    .auth-tab {
        position: relative;
        z-index: 1;
        min-height: 40px;
        padding: 0 10px;
        border-radius: 13px;
        font-size: 14px;
        font-weight: 600;
        color: #8d919d;
        background: none;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
        transition: color .22s ease, transform .15s ease;
    }
    .auth-tab:active { transform: scale(.97); }
    .auth-tab.active {
        color: #173b14;
        font-weight: 700;
        background: linear-gradient(180deg, #b9f184 0%, #A8E76A 100%);
        box-shadow: 0 8px 16px rgba(168, 231, 106, .42);
    }

    @supports selector(:has(a)) {
        .auth-tab.active { background: none; box-shadow: none; }
        .auth-tab-row::before {
            content: '';
            position: absolute;
            top: 5px;
            bottom: 5px;
            left: 5px;
            width: calc(50% - 5px);
            border-radius: 13px;
            background: linear-gradient(180deg, #b9f184 0%, #A8E76A 100%);
            box-shadow: 0 8px 16px rgba(168, 231, 106, .42);
            transition: transform .32s cubic-bezier(.16, 1, .3, 1);
        }
        .auth-tab-row:has(.auth-tab:last-child.active)::before { transform: translateX(100%); }
        /* Ни одна вкладка не выбрана (восстановление пароля) — пилюли нет */
        .auth-tab-row:not(:has(.auth-tab.active))::before { display: none; }
    }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
    .auth-tab,
    .auth-tab-row::before { transition: none; }
}

/* ══ Экран «Ваш бизнес»: низ карточки (13.10.2026) ══
   Плашка пробного периода под кнопкой и строка аккаунта «почта · Выйти». */
.ob-trial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #EAF7E3;
    color: #315d20;
    font-size: 13px;
    line-height: 1.4;
    text-wrap: balance;
}
.ob-trial svg { flex-shrink: 0; }
.ob-trial b { font-weight: 600; }

.ob-acc {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 6px 6px 6px 8px;
    border: 1px solid rgba(17, 18, 23, .08);
    border-radius: 999px;
    background: #fff;
    text-align: left;
}
.ob-acc-ava {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(314deg, #7dcf46 0%, #A8E76A 100%);
    color: #1f3d12;
    font-size: 13px;
    font-weight: 700;
}
.ob-acc-mail {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #43464f;
    font-size: 13px;
}
.ob-acc-out {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f1;
    color: #111217;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.ob-acc-out:hover { background: #e7e9e3; }

/* ══════════════════════════════════════
   Галочка «Принимаю соглашение…» на регистрации (экран входа и страница приглашения).
   Разметку даёт legal_accept_checkbox() из includes/account_functions.php, без галочки
   сервер аккаунт не создаёт, принятие пишется в user_agreements.
   ══════════════════════════════════════ */
.auth-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #6B7280;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.auth-agree-box {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #3d8c0f;
    cursor: pointer;
}
.auth-agree a {
    color: #3d8c0f;
    font-weight: 600;
    text-decoration: none;
}
.auth-agree a:hover { text-decoration: underline; }
/* Нажали кнопку без галочки — подпись краснеет и вздрагивает */
.auth-agree.is-miss { color: #B91C1C; animation: shake 0.35s ease; }
.auth-agree.is-miss .auth-agree-box { outline: 2px solid rgba(239, 68, 68, .55); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 600px) {
    .auth-agree { font-size: 13px; gap: 11px; }
    .auth-agree-box { width: 20px; height: 20px; margin-top: 0; }
}
/* Галочку поставили — предупреждение снимается */
.auth-agree.is-miss:has(.auth-agree-box:checked) { color: #6B7280; animation: none; }
.auth-agree.is-miss:has(.auth-agree-box:checked) .auth-agree-box { outline: 0; }

/* Телефон: основная кнопка формы — той же яркости, что выбранная вкладка «Вход / Регистрация»
   над ней: тот же лаймовый градиент и свечение (плоская заливка рядом с пилюлей выглядела тусклее) */
@media (max-width: 600px) {
    .auth-screen .auth-submit {
        background: linear-gradient(180deg, #b9f184 0%, #A8E76A 100%);
        color: #173b14;
        box-shadow: 0 8px 16px rgba(168, 231, 106, .42);
    }
    .auth-screen .auth-submit:hover { background: linear-gradient(180deg, #b9f184 0%, #A8E76A 100%); transform: none; }
    .auth-screen .auth-submit:active { transform: scale(.985); }
    .auth-screen .auth-submit:disabled { box-shadow: none; opacity: .7; }
}
