/* =============================================================
   BeetRoute ЛКБ — auth.css
   Единый CSS для всех авторизационных страниц.
   Подключение: {% load static %}
                <link rel="stylesheet" href="{% static 'cabinet/css/auth.css' %}">
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Страница ─────────────────────────────────────────────── */
body {
    font-family: 'Google Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(118.02deg, #FFF1F8 3.96%, #ECEEFF 70.8%);
}
html,
body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.auth-page {
    flex: 1;

    display: flex;
    justify-content: center;
    align-items: center;
    /* Постановка 2951/2957: форма «Стать партнёром» стала заметно длиннее
       остальных auth-экранов (добавлены поля минимума + телефон) — на
       большинстве десктопных вьюпортов высота контента теперь превышает
       100vh. Чистое align-items:center у flex-контейнера в этом случае
       обрезает содержимое РАВНО сверху и снизу БЕЗ возможности
       проскроллить к обрезанной части — известная особенность flexbox-
       центрирования, не баг браузера. align-items:safe center — тот же
       центр, пока контент помещается, но откатывается к выравниванию от
       начала (не обрезает верх), когда контент выше контейнера.
       Строка выше (align-items:center) — фолбэк для браузеров без
       поддержки двухзначного синтаксиса align-items, эта её переопределяет
       там, где поддержка есть (Chrome/Firefox/Safari 16.4+). */
    align-items: safe center;

    padding: 32px 16px;
}
/* ── Карточка ─────────────────────────────────────────────── */
.auth-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
    gap: 32px;
    width: 464px;
    background: #FFFFFF;
    box-shadow: 0px 2px 16px 6px rgba(0,0,0,0.06);
    border-radius: 24px;
}

/* М-3: чуть шире */
.auth-card--wide { width: 520px; }

.auth-logo { width: 150.93px; height: 60px; flex-shrink: 0; }

/* ── Тело карточки ────────────────────────────────────────── */
.auth-body {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

/* ── Заголовок ────────────────────────────────────────────── */
.auth-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.auth-title {
    font-weight: 500;
    font-size: 28px;
    line-height: 32px;
    text-align: center;
    color: #111214;
    width: 100%;
}

.auth-subtitle {
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    color: #111214;
    width: 100%;
}

/* ── Форма ────────────────────────────────────────────────── */
.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* ── Обёртка инпута ───────────────────────────────────────── */
.input-wrap {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 0 16px;
    gap: 10px;
    width: 100%;
    height: 50px;
    background: #F0F5F9;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border-color 0.15s;
}

.input-wrap:focus-within { border-color: #2064D5; }

/* Поле показывает значение, но не редактируется (например, уже
   подтверждённый телефон на экране подписания) — визуально приглушено,
   курсор не намекает на возможность клика. */
.input-wrap--readonly {
    opacity: 0.65;
    pointer-events: none;
}
.input-wrap.has-error    { border-color: #CC0000; }

.input-wrap input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #111214;
    outline: none;
}

.input-wrap input::placeholder { color: #838C9A; }

/* Textarea-вариант */
.input-wrap.is-textarea {
    padding: 14px 16px;
    height: auto;
    min-height: 100px;
    align-items: flex-start;
}

.input-wrap.is-textarea textarea {
    flex: 1;
    width: 100%;
    min-height: 72px;
    border: none;
    background: transparent;
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #111214;
    outline: none;
    resize: none;
}

.input-wrap.is-textarea textarea::placeholder { color: #838C9A; }

/* ── Видимая подпись поля (постановка 2951/2957: макет 2955 показывает
   подпись над каждым полем, не только placeholder — раньше в auth-экранах
   такого не было, только placeholder внутри инпута) ─────────────────── */
.field-label {
    font-size: 16px;
    line-height: 24px;
    color: #111214;
    font-family: 'Google Sans', sans-serif;
}

/* Подсказка под полем (например «На этот email придёт логин и временный пароль») */
.field-hint {
    font-size: 14px;
    line-height: 20px;
    color: #838C9A;
}

/* ── Honeypot — скрытая ловушка для ботов (без видимой капчи) ─────────
   Off-screen позиционирование, а не display:none — часть простых ботов
   игнорирует поля, скрытые через display:none/visibility:hidden, но
   всё равно заполняет остальные, менее аккуратно спрятанные поля. ──── */
.hp-field-wrap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Кастомный дропдаун (Форма организации / Тип бизнеса) — тот же
   визуальный паттерн, что .edit-dropdown в cabinet.css, но с литеральными
   цветами (auth.css не подключает :root cabinet.css) ─────────────────── */
.select-dropdown { position: relative; width: 100%; }

.select-dropdown__trigger {
    width: 100%;
    height: 50px;
    min-height: 50px;
    padding: 0 12px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F0F5F9;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Google Sans', sans-serif;
}

.select-dropdown.has-error .select-dropdown__trigger { border-color: #CC0000; }

.select-dropdown__value { font-size: 16px; color: #838C9A; }

.select-dropdown__arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform .15s;
}

.select-dropdown__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0px 4px 8px rgba(0, 32, 51, 0.16);
    z-index: 20;
    padding: 4px 0;
}

.select-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 8px 16px;
    font-size: 16px;
    color: #111214;
    cursor: pointer;
}

.select-dropdown__item:hover { background: #F8FAFD; }
.select-dropdown__item.is-selected { background: #EDF3FC; }

/* ── Оверлей bottom-sheet выбора значения (см. .select-sheet ниже) ────
   ВАЖНО: имя НЕ .modal-overlay — в этом файле уже есть другое правило
   .modal-overlay (см. "Модалка принять инвайт" дальше по файлу) с
   другими display/z-index/align-items; те же имя класса в одном файле —
   позднее правило побеждает в каскаде и переопределяет display:none
   на display:flex, из-за чего sheet был виден на странице ВСЕГДА, а не
   только при открытии дропдауна. Проверил: ни один шаблон, реально
   расширяющий auth_base.html (значит, использующий именно этот файл),
   не ссылается на голый .modal-overlay — похоже, то правило уже мёртвое,
   но трогать/удалять его не стал, не моя часть задачи; просто дал своему
   классу уникальное имя, чтобы никогда больше не столкнуться. ────────── */
.select-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 18, 20, 0.25);
    z-index: 1100;
    align-items: flex-end;
    justify-content: center;
}

.select-sheet-overlay.is-open { display: flex; }

/* ── Bottom sheet выбора значения (мобайл, <=768px) — общий для обоих
   дропдаунов формы, содержимое переключается через JS (см. шаблон) ──── */
.select-sheet {
    width: 100%;
    max-width: 480px;
    background: #FFFFFF;
    border-radius: 12px 12px 0 0;
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.select-sheet__handle {
    width: 85px;
    height: 5px;
    background: #A6C3F2;
    opacity: 0.9;
    border-radius: 100px;
    margin: 8px auto;
    flex-shrink: 0;
}

.select-sheet__list { overflow-y: auto; padding: 0 16px; }

.select-sheet__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    font-size: 16px;
    color: #111214;
    cursor: pointer;
}

.select-sheet__check { transition: opacity .15s; }

/* ── Иллюстрация success-экрана «Заявка отправлена» ────────────────────── */
.apply-success-illustration {
    width: 100%;
    max-width: 375px;
    height: auto;
    display: block;
    margin: 0 auto;
}



/* ── Иконки внутри инпута ─────────────────────────────────── */
.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 50px;
    flex-shrink: 0;
}

.input-icon svg { width: 24px; height: 24px; }

/* ── Кнопка eye ───────────────────────────────────────────── */
.btn-eye {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-eye svg { width: 24px; height: 24px; }

/* ── Ошибки ───────────────────────────────────────────────── */
.field-error {
    font-size: 13px;
    line-height: 18px;
    color: #CC0000;
}

.form-errors {
    font-size: 14px;
    line-height: 20px;
    color: #CC0000;
    text-align: center;
    width: 100%;
}

/* Нейтральное подтверждение действия (например "Код отправлен повторно") —
   не ошибка, поэтому отдельный класс, не .form-errors с другим цветом. */
.form-notice {
    font-size: 14px;
    line-height: 20px;
    color: #2064D5;
    text-align: center;
    width: 100%;
}

/* Маленькая кнопка-ссылка рядом с полем (например "Изменить" у телефона) */
.btn-inline-link {
    background: none;
    border: none;
    padding: 0;
    margin-top: 6px;
    color: #2064D5;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.btn-inline-link:hover { color: #1a53b8; }

/* Цвет ошибки из макета (E74036 — для forgot password) */
.form-errors--red { color: #E74036; }

/* ── Django messages ──────────────────────────────────────── */
.messages { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; }

.messages li {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
}

.messages li.error   { background: #FFF0F0; color: #CC0000; }
.messages li.success { background: #F0FFF4; color: #1a7f37; }
.messages li.info    { background: #EBF2FB; color: #2064D5; }
.messages li.warning { background: #FFFBEA; color: #9A6700; }

/* ── Баннер инвайта (М-1) ─────────────────────────────────── */
.invite-banner {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: #EBF2FB;
    font-size: 14px;
    line-height: 20px;
    color: #2064D5;
    text-align: center;
}

/* ── Основная кнопка ──────────────────────────────────────── */
.btn-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    gap: 6px;
    width: 100%;
    height: 50px;
    background: #2064D5;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: 'Google Sans', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #FFFFFF;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-submit:hover  { background: #1a53b8; }
.btn-submit:active { background: #1445a0; }

/* ── Текстовая кнопка-ссылка ──────────────────────────────── */
.btn-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    height: 50px;
    border-radius: 12px;
    font-family: 'Google Sans', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #2064D5;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.btn-link:hover { text-decoration: underline; }

/* ── «Забыли пароль?» ─────────────────────────────────────── */
.link-forgot {
    font-size: 14px;
    line-height: 20px;
    color: #2064D5;
    text-decoration: none;
    align-self: flex-start;
}

.link-forgot:hover { text-decoration: underline; }

/* ── Футер формы («Есть аккаунт? Войти») ─────────────────── */
.auth-footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.auth-footer span {
    font-size: 16px;
    line-height: 24px;
    color: #838C9A;
}

.auth-footer a {
    font-size: 16px;
    line-height: 24px;
    color: #2064D5;
    text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Дисклеймер ───────────────────────────────────────────── */
.disclaimer {
    font-size: 14px;
    line-height: 20px;
    color: #838C9A;
    text-align: center;
    width: 100%;
}

.disclaimer a { color: #2064D5; text-decoration: underline; }

/* ── Подсказки пароля ─────────────────────────────────────── */
.password-hints {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.hint-line {
    font-size: 14px;
    line-height: 20px;
    color: #838C9A;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hint-line::before { content: '\2713'; font-size: 13px; }
.hint-line.valid   { color: #43B500; }

/* ── PIN (2FA) ────────────────────────────────────────────── */
.pin-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

.pin-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 10px 20px;
    width: 46px;
    height: 62px;
    border: none;
    border-bottom: 1px solid #A6C3F2;
    background: transparent;
    font-family: 'Google Sans', sans-serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 32px;
    color: #111214;
    text-align: center;
    outline: none;
    transition: border-color 0.15s;
    caret-color: #2064D5;
    -moz-appearance: textfield;
}

.pin-cell::-webkit-outer-spin-button,
.pin-cell::-webkit-inner-spin-button { -webkit-appearance: none; }

.pin-cell:focus,
.pin-cell.filled  { border-bottom-color: #2064D5; }
.pin-cell.has-error { border-bottom-color: #CC0000; }

/* ── Поиск (М-3) ──────────────────────────────────────────── */
.search-wrap {
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    width: 100%;
    height: 50px;
    background: #FFFFFF;
    border: 1px solid #CADBF7;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}

.search-wrap:focus-within { border-color: #2064D5; }
.search-wrap svg { flex-shrink: 0; width: 16px; height: 16px; }

.search-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #111214;
    background: transparent;
}

.search-wrap input::placeholder { color: #CADBF7; }

/* ── Карточка партнёра (М-3) ──────────────────────────────── */
.partners-list { display: flex; flex-direction: column; gap: 8px; }

.partner-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    width: 100%;
    background: #E1EAF4;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, background 0.15s;
    text-decoration: none;
}

.partner-card:hover    { background: #D3E1F0; }
.partner-card.selected { border-color: #2064D5; background: #EBF2FB; }

.partner-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.partner-name {
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
    color: #111214;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.partner-role {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #838C9A;
}

.badge {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-green { background: #EAFFDE; color: #4EAB19; }
.badge-red   { background: #FBDCDA; color: #E74036; }
.badge-blue  { background: #EBF2FB; color: #2064D5; }

.empty-state {
    display: none;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    color: #838C9A;
    padding: 12px 0;
}

/* ── Модалка принять инвайт ───────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 32px;
    width: 464px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0px 8px 32px rgba(0,0,0,0.12);
}

.modal-title {
    font-weight: 500;
    font-size: 22px;
    line-height: 28px;
    color: #111214;
    text-align: center;
}

.modal-text {
    font-size: 16px;
    line-height: 24px;
    color: #838C9A;
    text-align: center;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* ── Успех (success state) ────────────────────────────────── */
.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F0FFF4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ── Мобильный breakpoint ─────────────────────────────────── */
@media (max-width: 560px) {
    body {
        background: #FFFFFF;
        align-items: flex-start;
        padding: 0;
    }

    .auth-card,
    .auth-card--wide {
        width: 100%;
        max-width: 375px;
        padding: 40px 16px 40px;
        border-radius: 0;
        box-shadow: none;
    }

    .modal-card {
        width: calc(100vw - 32px);
        border-radius: 16px;
    }

    .partner-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .badge { align-self: flex-start; }
}

/* ── Disabled-состояние основной кнопки ───────────────────── */
/* Пока не выполнены все условия (М-2: чекбокс + чек-лист пароля +
   совпадение паролей) кнопка неактивна и визуально это показывает. */
.btn-submit:disabled {
    background: #CADBF7;
    cursor: not-allowed;
}

.btn-submit:disabled:hover { background: #CADBF7; }

/* ── Чекбокс акцепта B2B-условий (М-2) ────────────────────── */
.b2b-accept-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    cursor: pointer;
}

.b2b-accept-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.b2b-accept-row__box {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 2px solid #A6C3F2;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    background: #FFFFFF;
    transition: background 0.15s, border-color 0.15s;
}

.b2b-accept-row input[type="checkbox"]:checked + .b2b-accept-row__box {
    background: #2064D5;
    border-color: #2064D5;
}

.b2b-accept-row input[type="checkbox"]:checked + .b2b-accept-row__box::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 9px;
    height: 5px;
    border-left: 2px solid #FFFFFF;
    border-bottom: 2px solid #FFFFFF;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.b2b-accept-row.has-error .b2b-accept-row__box { border-color: #CC0000; }

.b2b-accept-row__text {
    font-size: 14px;
    line-height: 20px;
    color: #838C9A;
}

.b2b-accept-row__text a {
    color: #2064D5;
    text-decoration: underline;
}

.b2b-accept-row__text strong {
    color: #111214;
    font-weight: 500;
}

/* ── Постановка 2977/2981: строка документа + ссылка «Читать» ── */
/* Чекбокс (b2b-accept-row) и ссылка «Читать» —
   раздельные соседние элементы, не один вложенный в другой. <a> не
   лейблируемый элемент, поэтому клик по ссылке внутри <label>
   всё равно форвардится на чекбокс — вложи мы её в текст лейбла,
   просмотр текста тихо переключал бы галку. Ссылка открывает текст
   в модалке (см. docs-modal-box ниже) — сама строка при этом высоты
   не меняет, соседние чекбоксы никуда не двигаются. */
.legal-doc-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.legal-doc-row .b2b-accept-row {
    flex: 1;
    min-width: 0;
}

.legal-doc-row__view-link {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 20px;
    color: #2064D5;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.legal-doc-row__view-link:hover { text-decoration: underline; }

/* Текст версии внутри модалки просмотра (docs-modal-box) — своя
   прокрутка, чтобы длинный документ не растягивал модалку за экран;
   шапка модалки (заголовок/крестик) при этом остаётся на месте. */
.signing-doc-modal__text {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 4px;
}

/* ── Подвал экрана: ссылки на юр. документы (все auth-экраны) ─ */
.screen-legal-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    width: 100%;
}

.screen-legal-footer a {
    font-size: 13px;
    line-height: 18px;
    color: #838C9A;
    text-decoration: none;
}

.screen-legal-footer a:hover { text-decoration: underline; color: #2064D5; }

.screen-legal-footer__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #838C9A;
    flex-shrink: 0;
}

@media (max-width: 560px) {
    /* На мобиле auth-card растягивается от верха без вертикального
       центрирования — подвал уходит за пределы первого экрана и его
       обычно не видно без скролла. Решение по дизайну подвала на мобиле
       — за дизайнером (обсуждалось отдельно), здесь только не ломаем
       вёрстку карточки. */
    .screen-legal-footer {
        padding: 16px;
    }
}

.screen-legal-footer__name {
    font-size: 13px;
    line-height: 18px;
    color: #838C9A;
}

/* ── Модалка «Условия использования» (Документы из футера) ───── */
.docs-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1200;
    align-items: center;
    justify-content: center;
}

.docs-modal-overlay.is-open { display: flex; }

.docs-modal-box {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px;
    width: 464px;
    max-width: calc(100vw - 32px);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0px 8px 32px rgba(0,0,0,0.12);
}

.docs-modal-box__header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.docs-modal-box__title {
    font-weight: 500;
    font-size: 22px;
    line-height: 28px;
    color: #111214;
}

.docs-modal-box__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.docs-modal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 20px;
    margin: 0;
}

.docs-modal-list li { list-style: disc; }

.docs-modal-list a {
    color: #2064D5;
    font-size: 16px;
    line-height: 24px;
    text-decoration: none;
}

.docs-modal-list a:hover { text-decoration: underline; }
/* ── Постановка 2977/2981: экран «Подписание документов» ─────── */
.signing-docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 4px;
}

.legal-doc {
    background: #F0F5F9;
    border: 1px solid #CADBF7;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.legal-doc__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}

.legal-doc__header:hover { background: #EBF2FB; }

.legal-doc__title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.legal-doc__title {
    font-weight: 500;
    font-size: 15px;
    line-height: 20px;
    color: #111214;
}

.legal-doc__meta {
    font-size: 12px;
    line-height: 16px;
    color: #838C9A;
}

.legal-doc__placeholder-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 4px;
    background: #FFFBEA;
    color: #9A6700;
    font-size: 11px;
    margin-left: 6px;
}

.legal-doc__chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.15s;
    color: #838C9A;
}

.legal-doc.is-open .legal-doc__chevron { transform: rotate(180deg); }

.legal-doc__body {
    display: none;
    padding: 0 16px 14px;
    border-top: 1px solid #CADBF7;
}

.legal-doc.is-open .legal-doc__body { display: block; }

.legal-doc__text {
    padding-top: 12px;
    font-size: 14px;
    line-height: 20px;
    color: #111214;
}

.legal-doc__text p { margin-bottom: 8px; }
