/**
 * File: /wp-content/plugins/belmail/assets/css/belmail-public.css
 * BelMail Public Styles
 * @version 1.4.10
 *
 * Назначение:
 * Публичные стили кабинета БелМейл на странице /belmail/.
 *
 * История изменений:
 * 1.1.1 — точечно скрыты заголовок страницы и хлебные крошки только на странице БелМейл
 *         belmail-page. Логика формы, API, заявки и кабинета не изменялась.
 * 1.1.2 — добавлена полноценная светлая дневная тема по умолчанию. Темная карточка
 *         больше не включается от системного prefers-color-scheme, а только при явной
 *         ночной теме сайта через классы/атрибуты body/html.
 * 1.1.3 — исправлен цвет текста ссылок-кнопок: глобальный цвет ссылок внутри
 *         .belmail-container больше не перекрашивает primary-кнопку "Открыть почту".
 * 1.1.4 — второй дизайн-проход: усилена дневная карточка, выровнены кнопки,
 *         улучшена читаемость email-блока, мобильная адаптация и hover-состояния
 *         без изменения HTML, API и логики заявок.
 * 1.1.5 — добавлены стили понятного блока "Использовать БелМейл для входа на сайт"
 *         и статуса "БелМейл используется для входа на сайт".
 * 1.1.6 — улучшен блок смены почты, кнопка стала зеленой.
 * 1.1.7 — добавлен партнерский блок ActiveCloud SmartMail для бизнес-почты
 *         на своем домене. Блок оформлен как простая форма-переход без
 *         сохранения данных в БелМейл.
 * 1.1.8 — уточнен визуальный ритм партнерского блока после изменения текста:
 *         добавлен стиль второго абзаца и сохранена простая читаемость для
 *         нетехнических пользователей.
 * 1.1.9 — мобильный UX-проход: уплотнен первый экран, верхняя иконка
 *         переносится в строку с заголовком, уменьшены отступы и рамки,
 *         чтобы была видна шапка блока "Продвинутая бизнес-почта".
 * 1.1.10 — добавлена десктопная компоновка двух карточек рядом, усилена зеленая
 *          кнопка "Использовать БелМейл для входа на сайт" и уточнен компактный
 *          пользовательский текст в карточке.
 * 1.1.11 — поправлен приоритет карточек на десктопе: БелМейл стал основной
 *          визуальной карточкой с цветовым акцентом, партнерская карточка стала
 *          вторичной и опущена ниже. Колонки выровнены по ширине.
 * 1.1.12 — возвращена явная рамка выпадающему списку в партнерской форме и
 *          усилены стили select, чтобы глобальные стили темы не убирали границы.
 * 1.1.13 — исправлены мелкие визуальные проблемы: email в пояснении не
 *          разрывается внутри адреса, верхняя цветная полоска скрыта внутри
 *          скругления карточки, усилены рамки select и скругления поля домена.
 * 1.1.14 — чекбокс согласия снова не отмечен по умолчанию, добавлена
 *          короткая подсказка и усилена кликабельность ссылки на правила.
 * 1.2.0 — добавлена гостевая форма создания БелМейл: ввод пароля БелОфис,
 *          подсказки, компактные кнопки показать/скрыть и блок входа для
 *          пользователя, у которого уже есть аккаунт БелОфис.
 * 1.3.0 — добавлены стили SMS-шагов self-service регистрации.
 * 1.3.2 — CSS больше не зависит от конкретного page-id страницы БелМейл:
 *          используется стабильный body-класс belmail-page.
 * 1.3.6 — добавлены стили для блока полного логина почты и кнопок
 *         копирования логина/пароля.
 * 1.3.7 — добавлены локальные CSS-иконки без внешних изображений.
 * 1.3.9 — кнопка копирования логина перенесена под основной email.
 *         Добавлены локальные CSS-иконки без внешних изображений.
 * 1.4.0 — стили Auth Gateway-состояний и формы создания БелМейл внутри аккаунта.
 */

/* ====== Две карточки на десктопе: БелМейл + бизнес-почта ====== */
.belmail-page-duo {
    width: min(100% - 2rem, 1080px);
    margin: 1.5rem auto 3rem;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
    gap: 1.35rem;
    align-items: start;
}

.belmail-page-duo > .belmail-container,
.belmail-page-duo > .belmail-business-mail-box {
    width: 100%;
    margin: 0;
}

.belmail-page-duo > .belmail-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 48%, #f1fbf6 100%);
    border-color: rgba(47, 158, 100, 0.34);
    box-shadow: 0 22px 58px rgba(47, 111, 203, 0.11), 0 12px 34px rgba(47, 158, 100, 0.1);
}

.belmail-page-duo > .belmail-container::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #e23b4d 0%, #2f9e64 52%, #2f6fcb 100%);
    pointer-events: none;
}

.belmail-page-duo > .belmail-container .belmail-icon {
    color: #2f9e64;
}

.belmail-page-duo > .belmail-container h3 {
    color: #182230;
}

.belmail-page-duo > .belmail-business-mail-box {
    margin-top: 1.35rem;
    background: #f8fbff;
    border-color: #dce8f3;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.belmail-page-duo > .belmail-business-mail-box .belmail-business-badge {
    background: rgba(47, 111, 203, 0.08);
    color: #3f6fa8;
}

/* ====== Базовые контейнеры ====== */
.belmail-container {
    --belmail-bg: #ffffff;
    --belmail-bg-soft: #f7fafc;
    --belmail-surface: #ffffff;
    --belmail-surface-strong: #f1f5f9;
    --belmail-border: #dbe5f0;
    --belmail-border-strong: #c8d5e4;
    --belmail-text: #1f2937;
    --belmail-muted: #64748b;
    --belmail-muted-strong: #475569;
    --belmail-primary: #2f6fcb;
    --belmail-primary-hover: #255eb3;
    --belmail-focus: rgba(47, 111, 203, 0.16);

    width: min(100% - 2rem, 520px);
    max-width: 520px;
    margin: 1.5rem auto 3rem;
    padding: 2.25rem;
    background: var(--belmail-bg);
    border: 1px solid var(--belmail-border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.09);
    color: var(--belmail-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.belmail-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.belmail-icon {
    font-size: 2.35rem;
    line-height: 1;
    margin-bottom: 0.65rem;
    text-align: center;
    filter: drop-shadow(0 8px 18px rgba(47, 111, 203, 0.12));
}

.belmail-icon-success {
    color: #28a745;
}

/* ====== Заголовки ====== */
.belmail-container h3 {
    font-size: clamp(1.35rem, 2.2vw, 1.55rem);
    font-weight: 650;
    line-height: 1.25;
    margin: 0 0 0.25rem 0;
    color: var(--belmail-text);
    text-align: center;
    letter-spacing: -0.01em;
}

.belmail-container p,
.belmail-container span,
.belmail-container small {
    color: inherit;
}

.belmail-container a {
    color: var(--belmail-primary);
}

.belmail-container a.belmail-btn,
.belmail-container a.belmail-btn:hover,
.belmail-container a.belmail-btn:focus,
.belmail-container a.belmail-btn:visited {
    text-decoration: none;
}

.belmail-container a.belmail-btn-primary,
.belmail-container a.belmail-btn-primary:hover,
.belmail-container a.belmail-btn-primary:focus,
.belmail-container a.belmail-btn-primary:visited {
    color: #fff !important;
}

.belmail-btn:active {
    transform: translateY(1px);
}

.belmail-btn img.emoji,
.belmail-btn .emoji {
    width: 1em;
    height: 1em;
    margin-right: 0.05rem;
    vertical-align: -0.1em;
}

.belmail-actions .belmail-btn {
    width: 100%;
}


/* ====== Страница БелМейл: скрыть заголовок и хлебные крошки ======
 * Важно:
 * - belmail-page — текущая страница /belmail/.
 * - Скрытие ограничено только этой страницей, чтобы не затронуть другие сервисы БелОфиса.
 * - Карточка БелМейл, форма, кнопки и логика не меняются.
 */
body.belmail-page .entry-header,
body.belmail-page .page-header,
body.belmail-page .entry-title,
body.belmail-page h1.page-title,
body.belmail-page .breadcrumbs,
body.belmail-page .breadcrumb,
body.belmail-page .rank-math-breadcrumb,
body.belmail-page .yoast-breadcrumb,
body.belmail-page .woocommerce-breadcrumb,
body.belmail-page nav[aria-label="breadcrumb"],
body.belmail-page nav[aria-label="Breadcrumb"] {
    display: none !important;
}

body.belmail-page .belmail-container {
    margin-top: 1.25rem;
}

body.belmail-page .entry-content {
    margin-top: 0;
}

body.belmail-page .post-edit-link {
    display: inline-flex;
    margin: 0.25rem 0 1rem;
}

/* ====== Вводный блок БелМейл ====== */
.belmail-intro {
    margin: 0.95rem 0 1.2rem;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(200, 213, 228, 0.72);
    border-radius: 14px;
    text-align: center;
}

.belmail-intro p {
    margin: 0.45rem 0 0;
    font-size: 0.91rem;
    line-height: 1.55;
    color: var(--belmail-muted-strong);
}

.belmail-intro p:first-child {
    margin-top: 0;
}

.belmail-intro-main strong {
    display: inline-block;
    white-space: nowrap;
    color: var(--belmail-text);
    font-weight: 700;
}

.belmail-intro-muted {
    color: var(--belmail-muted);
}

/* ====== Пароль БелОфис в гостевой форме ====== */
.belmail-password-control {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.belmail-password-control .belmail-input {
    flex: 1;
    min-width: 0;
}

.belmail-password-toggle {
    flex: 0 0 auto;
    min-width: 86px;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--belmail-border-strong);
    border-radius: 10px;
    background: var(--belmail-surface-strong);
    color: var(--belmail-muted-strong);
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
}

.belmail-password-toggle:hover {
    background: #e2e8f0;
    border-color: #bdcbdc;
}

.belmail-password-match {
    display: block;
    min-height: 1.1rem;
    margin-top: 0.3rem;
    font-size: 0.78rem;
}

.belmail-password-match.available {
    color: #28a745;
}

.belmail-password-match.unavailable {
    color: #dc3545;
}

.belmail-password-note {
    margin: -0.35rem 0 0.95rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--belmail-muted);
    text-align: center;
}

/* ====== Контекстный вход для гостя ====== */
.belmail-existing-account {
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--belmail-border);
    border-radius: 14px;
    background: var(--belmail-bg-soft);
    text-align: center;
}

.belmail-existing-account strong,
.belmail-existing-account span {
    display: block;
}

.belmail-existing-account strong {
    color: var(--belmail-text);
    font-size: 0.9rem;
}

.belmail-existing-account span {
    margin-top: 0.25rem;
    color: var(--belmail-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.belmail-existing-account .belmail-btn {
    margin-top: 0.7rem;
}

/* ====== Формы ====== */
.belmail-form {
    margin-top: 1.65rem;
}

.belmail-field {
    margin-bottom: 1.25rem;
}

.belmail-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--belmail-text);
}

.belmail-input {
    width: 100%;
    min-height: 44px;
    padding: 0.675rem 0.9rem;
    font-size: 1rem;
    line-height: 1.45;
    border: 1px solid var(--belmail-border-strong);
    border-radius: 11px;
    background: #fff;
    color: var(--belmail-text);
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    box-sizing: border-box;
}

.belmail-input:focus {
    outline: none;
    border-color: var(--belmail-primary);
    box-shadow: 0 0 0 3px var(--belmail-focus);
}

.belmail-business-form select.belmail-input,
.belmail-business-field select.belmail-input,
body.belmail-page .belmail-business-form select.belmail-input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0.675rem 0.9rem;
    border: 1px solid #b9c8d8 !important;
    border-radius: 11px !important;
    background-color: #fff !important;
    color: var(--belmail-text);
    box-shadow: inset 0 0 0 1px rgba(185, 200, 216, 0.62);
    outline: none;
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
}

.belmail-business-form select.belmail-input:focus,
.belmail-business-field select.belmail-input:focus,
body.belmail-page .belmail-business-form select.belmail-input:focus {
    border-color: var(--belmail-primary) !important;
    box-shadow: 0 0 0 3px var(--belmail-focus), inset 0 0 0 1px var(--belmail-primary);
    outline: none;
}

.belmail-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.belmail-input-group .belmail-input {
    flex: 1;
}

.belmail-domain {
    font-size: 0.9375rem;
    color: var(--belmail-muted-strong);
    white-space: nowrap;
    font-weight: 500;
}

/* ====== Подсказки ====== */
.belmail-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--belmail-muted);
    margin-top: 0.25rem;
}

.belmail-availability {
    display: block;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    min-height: 1.25rem;
}

.belmail-availability.available {
    color: #28a745;
}

.belmail-availability.unavailable {
    color: #dc3545;
}

.belmail-availability.checking {
    color: var(--belmail-muted);
}

/* ====== Чекбокс ====== */
.belmail-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.belmail-checkbox-label input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.belmail-checkbox-label a {
    position: relative;
    z-index: 2;
    color: var(--belmail-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    pointer-events: auto;
}

.belmail-consent-hint {
    display: block;
    margin-top: 0.35rem;
    padding-left: 1.55rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--belmail-muted);
}

/* ====== Кнопки ====== */
.belmail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
    box-sizing: border-box;
}

.belmail-btn-primary {
    background: var(--belmail-primary);
    color: #fff;
    border-color: var(--belmail-primary);
    box-shadow: 0 10px 22px rgba(47, 111, 203, 0.18);
}

.belmail-btn-primary:hover {
    background: var(--belmail-primary-hover);
    border-color: var(--belmail-primary-hover);
    box-shadow: 0 12px 26px rgba(47, 111, 203, 0.22);
}

.belmail-btn-secondary {
    background: var(--belmail-surface-strong);
    color: var(--belmail-muted-strong);
    border-color: var(--belmail-border-strong);
}

.belmail-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #bdcbdc;
}

.belmail-btn-ghost {
    background: transparent;
    color: var(--belmail-muted-strong);
    border-color: var(--belmail-border-strong);
}

.belmail-btn-ghost:hover {
    background: var(--belmail-bg-soft);
}

.belmail-btn-warning {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.belmail-btn-warning:hover {
    background: #e0a800;
}

.belmail-btn-success,
.belmail-container .belmail-btn-success,
body.belmail-page .belmail-container .belmail-btn-success {
    background: #2f9e64 !important;
    color: #fff !important;
    border-color: #2f9e64 !important;
    box-shadow: 0 10px 22px rgba(47, 158, 100, 0.18);
}

.belmail-btn-success:hover,
.belmail-btn-success:focus,
.belmail-container .belmail-btn-success:hover,
.belmail-container .belmail-btn-success:focus,
body.belmail-page .belmail-container .belmail-btn-success:hover,
body.belmail-page .belmail-container .belmail-btn-success:focus {
    background: #278653 !important;
    color: #fff !important;
    border-color: #278653 !important;
    box-shadow: 0 12px 26px rgba(47, 158, 100, 0.22);
}

.belmail-container a.belmail-btn-success,
.belmail-container a.belmail-btn-success:hover,
.belmail-container a.belmail-btn-success:focus,
.belmail-container a.belmail-btn-success:visited {
    color: #fff !important;
}

.belmail-account-use-btn {
    font-size: 0.925rem;
}

.belmail-btn-full {
    width: 100%;
    margin-top: 0.5rem;
}

.belmail-btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ====== Уведомления ====== */
.belmail-notice {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.belmail-notice-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #004085;
}

.belmail-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.belmail-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.belmail-errors {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* ====== Email-отображение ====== */
.belmail-email-display {
    text-align: center;
    padding: 1.05rem 1rem;
    background: var(--belmail-bg-soft);
    border: 1px solid var(--belmail-border);
    border-radius: 14px;
    margin: 1.1rem 0 1rem;
}

.belmail-email {
    display: block;
    font-size: clamp(1.05rem, 3vw, 1.25rem);
    font-weight: 650;
    line-height: 1.55;
    color: var(--belmail-text);
    font-family: 'SF Mono', Monaco, monospace;
    overflow-wrap: anywhere;
    word-break: normal;
}

.belmail-email-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    color: var(--belmail-muted);
}

/* ====== Почта для входа на сайт ====== */
.belmail-account-email-box {
    margin: 1rem 0 1.1rem;
    padding: 1rem;
    background: var(--belmail-bg-soft);
    border: 1px solid var(--belmail-border);
    border-radius: 14px;
}

.belmail-account-current,
.belmail-account-note {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.62;
    color: var(--belmail-muted-strong);
    text-align: center;
}

.belmail-account-current {
    margin-bottom: 0.7rem;
}

.belmail-account-current strong,
.belmail-account-note strong {
    display: inline-block;
    color: var(--belmail-text);
    font-weight: 650;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.belmail-account-note {
    max-width: 31rem;
    margin: 0.42rem auto 0;
    color: var(--belmail-muted-strong);
}

.belmail-account-note-secondary {
    margin-top: 0.35rem;
    color: var(--belmail-muted);
}

.belmail-account-email-form {
    margin-top: 0.85rem;
}

.belmail-account-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.45;
}

.belmail-account-status strong {
    color: #155724;
    font-weight: 650;
}

.belmail-account-status span {
    color: var(--belmail-muted);
    overflow-wrap: anywhere;
}

.belmail-account-status-success {
    color: #155724;
}

/* ====== Партнерский блок: бизнес-почта ====== */
.belmail-business-mail-box {
    width: min(100% - 2rem, 760px);
    margin: 1.5rem auto 3rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
    background: linear-gradient(135deg, #eef7ff 0%, #ffffff 56%, #f4fbf7 100%);
    border: 1px solid #d7e7f6;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    color: var(--belmail-text);
}

.belmail-business-mail-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.belmail-business-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(47, 111, 203, 0.1);
    color: #2f6fcb;
    font-size: 0.75rem;
    font-weight: 700;
}

.belmail-business-mail-box h3 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--belmail-text);
}

.belmail-business-mail-box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--belmail-muted-strong);
}

.belmail-business-mail-box p strong {
    color: var(--belmail-text);
    font-weight: 700;
}

.belmail-business-mail-extra {
    margin-top: 0.65rem !important;
}

.belmail-business-partner {
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(200, 213, 228, 0.9);
    border-radius: 14px;
    font-size: 0.9rem;
    color: var(--belmail-muted-strong);
}

.belmail-business-partner strong {
    color: var(--belmail-text);
}

.belmail-business-form {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(200, 213, 228, 0.9);
    border-radius: 18px;
}

.belmail-business-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.belmail-business-field {
    display: block;
}

.belmail-business-field .belmail-input,
body.belmail-page .belmail-business-field .belmail-input {
    border-radius: 11px !important;
}
.belmail-business-field input.belmail-input,
body.belmail-page .belmail-business-field input.belmail-input {
    border: 1px solid #b9c8d8 !important;
    background-color: #fff;
    box-shadow: inset 0 0 0 1px rgba(185, 200, 216, 0.45);
}


.belmail-business-field span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--belmail-muted-strong);
}

.belmail-btn-partner {
    background: #ff8a2a;
    color: #fff;
    border-color: #ff8a2a;
    box-shadow: 0 10px 24px rgba(255, 138, 42, 0.22);
}

.belmail-btn-partner:hover,
.belmail-btn-partner:focus {
    background: #ec7717;
    color: #fff;
    border-color: #ec7717;
    box-shadow: 0 12px 28px rgba(255, 138, 42, 0.26);
}

.belmail-container a.belmail-btn-partner,
.belmail-container a.belmail-btn-partner:hover,
.belmail-container a.belmail-btn-partner:focus,
.belmail-container a.belmail-btn-partner:visited {
    color: #fff !important;
}

.belmail-business-note {
    margin-top: 0.75rem !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    color: var(--belmail-muted) !important;
    text-align: center;
}

.belmail-page-duo .belmail-business-mail-box {
    padding: 1.25rem;
    gap: 0.9rem;
}

.belmail-page-duo .belmail-business-mail-box h3 {
    font-size: clamp(1.18rem, 1.45vw, 1.42rem);
}

.belmail-page-duo .belmail-business-mail-box p {
    font-size: 0.88rem;
}

.belmail-page-duo .belmail-business-form {
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.7);
}

/* ====== Действия в кабинете ====== */
.belmail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1rem 0;
}

/* ====== Показ пароля ====== */
.belmail-password-show .belmail-password-field {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.belmail-password-input {
    flex: 1;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 1.125rem;
    text-align: center;
    letter-spacing: 0.05em;
    padding: 0.75rem;
    border: 2px dashed var(--belmail-primary);
    border-radius: 10px;
    background: var(--belmail-bg-soft);
    color: var(--belmail-text);
}

/* ====== Настройка на телефоне ====== */
.belmail-phone-setup {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--belmail-bg-soft);
    border: 1px solid var(--belmail-border);
    border-radius: 12px;
}

.belmail-setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0.75rem 0;
}

.belmail-setup-card {
    padding: 0.75rem;
    background: var(--belmail-surface);
    border: 1px solid var(--belmail-border);
    border-radius: 10px;
}

.belmail-setup-card h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--belmail-primary);
}

.belmail-setup-card p {
    margin: 0.25rem 0;
    font-size: 0.8125rem;
}

.belmail-setup-note {
    font-size: 0.8125rem;
    color: var(--belmail-muted);
    margin-top: 0.75rem;
}

/* ====== Примечания ====== */
.belmail-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--belmail-muted);
    margin-top: 1.1rem;
}

/* ====== Состояния ====== */
.belmail-pending {
    text-align: center;
}

.belmail-pending p {
    color: var(--belmail-muted);
    margin: 0.5rem 0;
}

.belmail-error {
    text-align: center;
}

.belmail-debug-error {
    font-size: 0.75rem;
    color: #dc3545;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    word-break: break-all;
}

/* ====== Адаптивность ====== */
@media (max-width: 600px) {
    .belmail-page-duo {
        width: 100%;
        margin: 0;
        display: block;
    }

    .belmail-page-duo > .belmail-business-mail-box {
        margin-top: 0.85rem;
    }

    body.belmail-page .belmail-container {
        width: min(100% - 1.25rem, 420px);
        margin: 0.75rem auto 1rem;
        padding: 1.05rem 1.05rem 1.15rem;
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    }

    .belmail-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        margin-bottom: 0.75rem;
    }

    .belmail-icon {
        flex: 0 0 auto;
        margin: 0;
        font-size: 1.65rem;
        line-height: 1;
    }

    .belmail-container h3 {
        margin: 0;
        font-size: 1.22rem;
        line-height: 1.2;
        text-align: left;
    }

    .belmail-setup-grid {
        grid-template-columns: 1fr;
    }

    .belmail-password-field {
        flex-direction: column;
    }

    .belmail-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .belmail-email-display {
        margin: 0.7rem 0 0.75rem;
        padding: 0.72rem 0.7rem;
        border-radius: 12px;
    }

    .belmail-email {
        font-size: 0.98rem;
        line-height: 1.42;
    }

    .belmail-account-email-box {
        margin: 0.75rem 0 0.8rem;
        padding: 0.75rem;
        border-radius: 12px;
    }

    .belmail-account-current {
        margin-bottom: 0.45rem;
    }

    .belmail-account-current,
    .belmail-account-note {
        font-size: 0.82rem;
        line-height: 1.42;
    }

    .belmail-account-note {
        margin-top: 0.25rem;
    }

    .belmail-account-note strong {
        display: inline-block;
        max-width: 100%;
        white-space: nowrap;
    }

    .belmail-account-email-form {
        margin-top: 0.65rem;
    }

    .belmail-account-use-btn {
        font-size: 0.86rem;
    }

    .belmail-intro {
        margin: 0.7rem 0 0.85rem;
        padding: 0.72rem;
        border-radius: 12px;
    }

    .belmail-intro p {
        font-size: 0.82rem;
        line-height: 1.42;
    }

    .belmail-password-control {
        gap: 0.4rem;
    }

    .belmail-password-toggle {
        min-width: 74px;
        padding: 0.5rem 0.55rem;
        font-size: 0.76rem;
    }

    .belmail-password-note {
        margin-bottom: 0.75rem;
        font-size: 0.75rem;
    }

    .belmail-existing-account {
        margin-top: 0.8rem;
        padding: 0.72rem;
        border-radius: 12px;
    }

    .belmail-actions {
        gap: 0.52rem;
        margin: 0.75rem 0;
    }

    .belmail-btn {
        min-height: 41px;
        padding: 0.55rem 1rem;
        font-size: 0.88rem;
        border-radius: 10px;
    }

    .belmail-note {
        margin-top: 0.65rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 760px) {
    .belmail-page-duo {
        width: 100%;
        margin: 0;
        display: block;
    }

    .belmail-page-duo > .belmail-business-mail-box {
        margin-top: 0.85rem;
    }

    .belmail-business-mail-box {
        width: min(100% - 1.25rem, 420px);
        grid-template-columns: 1fr;
        margin: 0.85rem auto 1.75rem;
        padding: 1rem;
        gap: 0.85rem;
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    }

    .belmail-business-badge {
        margin-bottom: 0.45rem;
        padding: 0.24rem 0.55rem;
        font-size: 0.7rem;
    }

    .belmail-business-mail-box h3 {
        margin-bottom: 0.45rem;
        font-size: 1.25rem;
        line-height: 1.18;
    }

    .belmail-business-mail-box p {
        font-size: 0.86rem;
        line-height: 1.48;
    }

    .belmail-business-mail-extra {
        margin-top: 0.45rem !important;
    }

    .belmail-business-partner {
        margin-top: 0.65rem;
        padding: 0.58rem 0.65rem;
        border-radius: 11px;
        font-size: 0.82rem;
    }

    .belmail-business-form {
        padding: 0.72rem;
        border-radius: 13px;
    }

    .belmail-business-fields {
        gap: 0.65rem;
        margin-bottom: 0.75rem;
    }

    .belmail-business-field span {
        margin-bottom: 0.28rem;
        font-size: 0.78rem;
    }

    .belmail-business-note {
        margin-top: 0.55rem !important;
        font-size: 0.72rem !important;
    }
}

@media (max-width: 390px) {
    body.belmail-page .belmail-container {
        width: min(100% - 1rem, 380px);
        margin-top: 0.55rem;
        padding: 0.9rem;
    }

    .belmail-container h3 {
        font-size: 1.12rem;
    }

    .belmail-icon {
        font-size: 1.45rem;
    }

    .belmail-email {
        font-size: 0.92rem;
    }

    .belmail-business-mail-box {
        width: min(100% - 1rem, 380px);
        padding: 0.9rem;
    }
}

/* ====== Тёмная тема сайта ======
 * Важно:
 * - Темная карточка больше не включается автоматически от prefers-color-scheme.
 * - Она включается только когда тема сайта явно ставит на html/body класс или атрибут ночной темы.
 * - Это защищает дневной интерфейс БелОфиса от случайного затемнения формы из-за системной темы браузера.
 */
html.dark .belmail-container,
html.dark-mode .belmail-container,
html.theme-dark .belmail-container,
html[data-theme="dark"] .belmail-container,
html[data-bs-theme="dark"] .belmail-container,
body.dark .belmail-container,
body.dark-mode .belmail-container,
body.theme-dark .belmail-container,
body.night-mode .belmail-container,
body[data-theme="dark"] .belmail-container,
body[data-bs-theme="dark"] .belmail-container,
body.belofis-dark .belmail-container {
    --belmail-bg: #1e1e2e;
    --belmail-bg-soft: #2a2a3e;
    --belmail-surface: #1e1e2e;
    --belmail-surface-strong: #2a2a3e;
    --belmail-border: #3a3a4e;
    --belmail-border-strong: #4a4a5e;
    --belmail-text: #e0e0e0;
    --belmail-muted: #a6adbb;
    --belmail-muted-strong: #c2c8d3;
    --belmail-primary: #6a9fd4;
    --belmail-primary-hover: #7fb0e4;
    --belmail-focus: rgba(106, 159, 212, 0.2);

    background: #1e1e2e;
    border-color: #3a3a4e;
    color: #e0e0e0;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

html.dark .belmail-container h3,
html.dark-mode .belmail-container h3,
html.theme-dark .belmail-container h3,
html[data-theme="dark"] .belmail-container h3,
html[data-bs-theme="dark"] .belmail-container h3,
body.dark .belmail-container h3,
body.dark-mode .belmail-container h3,
body.theme-dark .belmail-container h3,
body.night-mode .belmail-container h3,
body[data-theme="dark"] .belmail-container h3,
body[data-bs-theme="dark"] .belmail-container h3,
body.belofis-dark .belmail-container h3 {
    color: #e0e0e0;
}

html.dark .belmail-input,
html.dark-mode .belmail-input,
html.theme-dark .belmail-input,
html[data-theme="dark"] .belmail-input,
html[data-bs-theme="dark"] .belmail-input,
body.dark .belmail-input,
body.dark-mode .belmail-input,
body.theme-dark .belmail-input,
body.night-mode .belmail-input,
body[data-theme="dark"] .belmail-input,
body[data-bs-theme="dark"] .belmail-input,
body.belofis-dark .belmail-input {
    background: #2a2a3e;
    border-color: #4a4a5e;
    color: #e0e0e0;
}

html.dark .belmail-business-form select.belmail-input,
html.dark-mode .belmail-business-form select.belmail-input,
html.theme-dark .belmail-business-form select.belmail-input,
html[data-theme="dark"] .belmail-business-form select.belmail-input,
html[data-bs-theme="dark"] .belmail-business-form select.belmail-input,
body.dark .belmail-business-form select.belmail-input,
body.dark-mode .belmail-business-form select.belmail-input,
body.theme-dark .belmail-business-form select.belmail-input,
body.night-mode .belmail-business-form select.belmail-input,
body[data-theme="dark"] .belmail-business-form select.belmail-input,
body[data-bs-theme="dark"] .belmail-business-form select.belmail-input,
body.belofis-dark .belmail-business-form select.belmail-input {
    background-color: #2a2a3e;
    border-color: #4a4a5e !important;
    color: #e0e0e0;
}

html.dark .belmail-input:focus,
html.dark-mode .belmail-input:focus,
html.theme-dark .belmail-input:focus,
html[data-theme="dark"] .belmail-input:focus,
html[data-bs-theme="dark"] .belmail-input:focus,
body.dark .belmail-input:focus,
body.dark-mode .belmail-input:focus,
body.theme-dark .belmail-input:focus,
body.night-mode .belmail-input:focus,
body[data-theme="dark"] .belmail-input:focus,
body[data-bs-theme="dark"] .belmail-input:focus,
body.belofis-dark .belmail-input:focus {
    border-color: #6a9fd4;
    box-shadow: 0 0 0 3px rgba(106, 159, 212, 0.2);
}

html.dark .belmail-email-display,
html.dark-mode .belmail-email-display,
html.theme-dark .belmail-email-display,
html[data-theme="dark"] .belmail-email-display,
html[data-bs-theme="dark"] .belmail-email-display,
body.dark .belmail-email-display,
body.dark-mode .belmail-email-display,
body.theme-dark .belmail-email-display,
body.night-mode .belmail-email-display,
body[data-theme="dark"] .belmail-email-display,
body[data-bs-theme="dark"] .belmail-email-display,
body.belofis-dark .belmail-email-display,
html.dark .belmail-phone-setup,
html.dark-mode .belmail-phone-setup,
html.theme-dark .belmail-phone-setup,
html[data-theme="dark"] .belmail-phone-setup,
html[data-bs-theme="dark"] .belmail-phone-setup,
body.dark .belmail-phone-setup,
body.dark-mode .belmail-phone-setup,
body.theme-dark .belmail-phone-setup,
body.night-mode .belmail-phone-setup,
body[data-theme="dark"] .belmail-phone-setup,
body[data-bs-theme="dark"] .belmail-phone-setup,
body.belofis-dark .belmail-phone-setup,
html.dark .belmail-password-input,
html.dark-mode .belmail-password-input,
html.theme-dark .belmail-password-input,
html[data-theme="dark"] .belmail-password-input,
html[data-bs-theme="dark"] .belmail-password-input,
body.dark .belmail-password-input,
body.dark-mode .belmail-password-input,
body.theme-dark .belmail-password-input,
body.night-mode .belmail-password-input,
body[data-theme="dark"] .belmail-password-input,
body[data-bs-theme="dark"] .belmail-password-input,
body.belofis-dark .belmail-password-input {
    background: #2a2a3e;
    border-color: #3a3a4e;
    color: #e0e0e0;
}

html.dark .belmail-email,
html.dark-mode .belmail-email,
html.theme-dark .belmail-email,
html[data-theme="dark"] .belmail-email,
html[data-bs-theme="dark"] .belmail-email,
body.dark .belmail-email,
body.dark-mode .belmail-email,
body.theme-dark .belmail-email,
body.night-mode .belmail-email,
body[data-theme="dark"] .belmail-email,
body[data-bs-theme="dark"] .belmail-email,
body.belofis-dark .belmail-email {
    color: #e0e0e0;
}

html.dark .belmail-setup-card,
html.dark-mode .belmail-setup-card,
html.theme-dark .belmail-setup-card,
html[data-theme="dark"] .belmail-setup-card,
html[data-bs-theme="dark"] .belmail-setup-card,
body.dark .belmail-setup-card,
body.dark-mode .belmail-setup-card,
body.theme-dark .belmail-setup-card,
body.night-mode .belmail-setup-card,
body[data-theme="dark"] .belmail-setup-card,
body[data-bs-theme="dark"] .belmail-setup-card,
body.belofis-dark .belmail-setup-card {
    background: #1e1e2e;
    border-color: #3a3a4e;
}

html.dark .belmail-account-email-box,
html.dark-mode .belmail-account-email-box,
html.theme-dark .belmail-account-email-box,
html[data-theme="dark"] .belmail-account-email-box,
html[data-bs-theme="dark"] .belmail-account-email-box,
body.dark .belmail-account-email-box,
body.dark-mode .belmail-account-email-box,
body.theme-dark .belmail-account-email-box,
body.night-mode .belmail-account-email-box,
body[data-theme="dark"] .belmail-account-email-box,
body[data-bs-theme="dark"] .belmail-account-email-box,
body.belofis-dark .belmail-account-email-box {
    background: #2a2a3e;
    border-color: #3a3a4e;
}

html.dark .belmail-intro,
html.dark-mode .belmail-intro,
html.theme-dark .belmail-intro,
html[data-theme="dark"] .belmail-intro,
html[data-bs-theme="dark"] .belmail-intro,
body.dark .belmail-intro,
body.dark-mode .belmail-intro,
body.theme-dark .belmail-intro,
body.night-mode .belmail-intro,
body[data-theme="dark"] .belmail-intro,
body[data-bs-theme="dark"] .belmail-intro,
body.belofis-dark .belmail-intro,
html.dark .belmail-existing-account,
html.dark-mode .belmail-existing-account,
html.theme-dark .belmail-existing-account,
html[data-theme="dark"] .belmail-existing-account,
html[data-bs-theme="dark"] .belmail-existing-account,
body.dark .belmail-existing-account,
body.dark-mode .belmail-existing-account,
body.theme-dark .belmail-existing-account,
body.night-mode .belmail-existing-account,
body[data-theme="dark"] .belmail-existing-account,
body[data-bs-theme="dark"] .belmail-existing-account,
body.belofis-dark .belmail-existing-account {
    background: #2a2a3e;
    border-color: #3a3a4e;
}

html.dark .belmail-password-toggle,
html.dark-mode .belmail-password-toggle,
html.theme-dark .belmail-password-toggle,
html[data-theme="dark"] .belmail-password-toggle,
html[data-bs-theme="dark"] .belmail-password-toggle,
body.dark .belmail-password-toggle,
body.dark-mode .belmail-password-toggle,
body.theme-dark .belmail-password-toggle,
body.night-mode .belmail-password-toggle,
body[data-theme="dark"] .belmail-password-toggle,
body[data-bs-theme="dark"] .belmail-password-toggle,
body.belofis-dark .belmail-password-toggle {
    background: #303044;
    border-color: #55556b;
    color: #c2c8d3;
}

html.dark .belmail-account-status strong,
html.dark-mode .belmail-account-status strong,
html.theme-dark .belmail-account-status strong,
html[data-theme="dark"] .belmail-account-status strong,
html[data-bs-theme="dark"] .belmail-account-status strong,
body.dark .belmail-account-status strong,
body.dark-mode .belmail-account-status strong,
body.theme-dark .belmail-account-status strong,
body.night-mode .belmail-account-status strong,
body[data-theme="dark"] .belmail-account-status strong,
body[data-bs-theme="dark"] .belmail-account-status strong,
body.belofis-dark .belmail-account-status strong {
    color: #8bd49c;
}

html.dark .belmail-btn-secondary:hover,
html.dark-mode .belmail-btn-secondary:hover,
html.theme-dark .belmail-btn-secondary:hover,
html[data-theme="dark"] .belmail-btn-secondary:hover,
html[data-bs-theme="dark"] .belmail-btn-secondary:hover,
body.dark .belmail-btn-secondary:hover,
body.dark-mode .belmail-btn-secondary:hover,
body.theme-dark .belmail-btn-secondary:hover,
body.night-mode .belmail-btn-secondary:hover,
body[data-theme="dark"] .belmail-btn-secondary:hover,
body[data-bs-theme="dark"] .belmail-btn-secondary:hover,
body.belofis-dark .belmail-btn-secondary:hover {
    background: #303044;
    border-color: #55556b;
}

html.dark .belmail-btn-ghost:hover,
html.dark-mode .belmail-btn-ghost:hover,
html.theme-dark .belmail-btn-ghost:hover,
html[data-theme="dark"] .belmail-btn-ghost:hover,
html[data-bs-theme="dark"] .belmail-btn-ghost:hover,
body.dark .belmail-btn-ghost:hover,
body.dark-mode .belmail-btn-ghost:hover,
body.theme-dark .belmail-btn-ghost:hover,
body.night-mode .belmail-btn-ghost:hover,
body[data-theme="dark"] .belmail-btn-ghost:hover,
body[data-bs-theme="dark"] .belmail-btn-ghost:hover,
body.belofis-dark .belmail-btn-ghost:hover {
    background: #26263a;
    border-color: #4a4a5e;
}

html.dark .belmail-btn-success,
html.dark-mode .belmail-btn-success,
html.theme-dark .belmail-btn-success,
html[data-theme="dark"] .belmail-btn-success,
html[data-bs-theme="dark"] .belmail-btn-success,
body.dark .belmail-btn-success,
body.dark-mode .belmail-btn-success,
body.theme-dark .belmail-btn-success,
body.night-mode .belmail-btn-success,
body[data-theme="dark"] .belmail-btn-success,
body[data-bs-theme="dark"] .belmail-btn-success,
body.belofis-dark .belmail-btn-success {
    background: #42b883;
    border-color: #42b883;
    color: #102016;
}

html.dark .belmail-btn-success:hover,
html.dark-mode .belmail-btn-success:hover,
html.theme-dark .belmail-btn-success:hover,
html[data-theme="dark"] .belmail-btn-success:hover,
html[data-bs-theme="dark"] .belmail-btn-success:hover,
body.dark .belmail-btn-success:hover,
body.dark-mode .belmail-btn-success:hover,
body.theme-dark .belmail-btn-success:hover,
body.night-mode .belmail-btn-success:hover,
body[data-theme="dark"] .belmail-btn-success:hover,
body[data-bs-theme="dark"] .belmail-btn-success:hover,
body.belofis-dark .belmail-btn-success:hover {
    background: #55c995;
    border-color: #55c995;
    color: #102016;
}

html.dark .belmail-business-mail-box,
html.dark-mode .belmail-business-mail-box,
html.theme-dark .belmail-business-mail-box,
html[data-theme="dark"] .belmail-business-mail-box,
html[data-bs-theme="dark"] .belmail-business-mail-box,
body.dark .belmail-business-mail-box,
body.dark-mode .belmail-business-mail-box,
body.theme-dark .belmail-business-mail-box,
body.night-mode .belmail-business-mail-box,
body[data-theme="dark"] .belmail-business-mail-box,
body[data-bs-theme="dark"] .belmail-business-mail-box,
body.belofis-dark .belmail-business-mail-box {
    background: linear-gradient(135deg, #1e1e2e 0%, #25253a 55%, #1f332b 100%);
    border-color: #3a3a4e;
    color: #e0e0e0;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

html.dark .belmail-page-duo > .belmail-container,
html.dark-mode .belmail-page-duo > .belmail-container,
html.theme-dark .belmail-page-duo > .belmail-container,
html[data-theme="dark"] .belmail-page-duo > .belmail-container,
html[data-bs-theme="dark"] .belmail-page-duo > .belmail-container,
body.dark .belmail-page-duo > .belmail-container,
body.dark-mode .belmail-page-duo > .belmail-container,
body.theme-dark .belmail-page-duo > .belmail-container,
body.night-mode .belmail-page-duo > .belmail-container,
body[data-theme="dark"] .belmail-page-duo > .belmail-container,
body[data-bs-theme="dark"] .belmail-page-duo > .belmail-container,
body.belofis-dark .belmail-page-duo > .belmail-container {
    background: linear-gradient(135deg, #1e1e2e 0%, #25253a 52%, #1f332b 100%);
    border-color: rgba(66, 184, 131, 0.45);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.26);
}

html.dark .belmail-page-duo > .belmail-business-mail-box,
html.dark-mode .belmail-page-duo > .belmail-business-mail-box,
html.theme-dark .belmail-page-duo > .belmail-business-mail-box,
html[data-theme="dark"] .belmail-page-duo > .belmail-business-mail-box,
html[data-bs-theme="dark"] .belmail-page-duo > .belmail-business-mail-box,
body.dark .belmail-page-duo > .belmail-business-mail-box,
body.dark-mode .belmail-page-duo > .belmail-business-mail-box,
body.theme-dark .belmail-page-duo > .belmail-business-mail-box,
body.night-mode .belmail-page-duo > .belmail-business-mail-box,
body[data-theme="dark"] .belmail-page-duo > .belmail-business-mail-box,
body[data-bs-theme="dark"] .belmail-page-duo > .belmail-business-mail-box,
body.belofis-dark .belmail-page-duo > .belmail-business-mail-box {
    background: #222238;
    border-color: #35354a;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

html.dark .belmail-business-badge,
html.dark-mode .belmail-business-badge,
html.theme-dark .belmail-business-badge,
html[data-theme="dark"] .belmail-business-badge,
html[data-bs-theme="dark"] .belmail-business-badge,
body.dark .belmail-business-badge,
body.dark-mode .belmail-business-badge,
body.theme-dark .belmail-business-badge,
body.night-mode .belmail-business-badge,
body[data-theme="dark"] .belmail-business-badge,
body[data-bs-theme="dark"] .belmail-business-badge,
body.belofis-dark .belmail-business-badge {
    background: rgba(106, 159, 212, 0.14);
    color: #9fc7f0;
}

html.dark .belmail-business-form,
html.dark-mode .belmail-business-form,
html.theme-dark .belmail-business-form,
html[data-theme="dark"] .belmail-business-form,
html[data-bs-theme="dark"] .belmail-business-form,
body.dark .belmail-business-form,
body.dark-mode .belmail-business-form,
body.theme-dark .belmail-business-form,
body.night-mode .belmail-business-form,
body[data-theme="dark"] .belmail-business-form,
body[data-bs-theme="dark"] .belmail-business-form,
body.belofis-dark .belmail-business-form,
html.dark .belmail-business-partner,
html.dark-mode .belmail-business-partner,
html.theme-dark .belmail-business-partner,
html[data-theme="dark"] .belmail-business-partner,
html[data-bs-theme="dark"] .belmail-business-partner,
body.dark .belmail-business-partner,
body.dark-mode .belmail-business-partner,
body.theme-dark .belmail-business-partner,
body.night-mode .belmail-business-partner,
body[data-theme="dark"] .belmail-business-partner,
body[data-bs-theme="dark"] .belmail-business-partner,
body.belofis-dark .belmail-business-partner {
    background: rgba(42, 42, 62, 0.78);
    border-color: #3a3a4e;
}

html.dark .belmail-business-mail-box h3,
html.dark-mode .belmail-business-mail-box h3,
html.theme-dark .belmail-business-mail-box h3,
html[data-theme="dark"] .belmail-business-mail-box h3,
html[data-bs-theme="dark"] .belmail-business-mail-box h3,
body.dark .belmail-business-mail-box h3,
body.dark-mode .belmail-business-mail-box h3,
body.theme-dark .belmail-business-mail-box h3,
body.night-mode .belmail-business-mail-box h3,
body[data-theme="dark"] .belmail-business-mail-box h3,
body[data-bs-theme="dark"] .belmail-business-mail-box h3,
body.belofis-dark .belmail-business-mail-box h3,
html.dark .belmail-business-mail-box p strong,
html.dark-mode .belmail-business-mail-box p strong,
html.theme-dark .belmail-business-mail-box p strong,
html[data-theme="dark"] .belmail-business-mail-box p strong,
html[data-bs-theme="dark"] .belmail-business-mail-box p strong,
body.dark .belmail-business-mail-box p strong,
body.dark-mode .belmail-business-mail-box p strong,
body.theme-dark .belmail-business-mail-box p strong,
body.night-mode .belmail-business-mail-box p strong,
body[data-theme="dark"] .belmail-business-mail-box p strong,
body[data-bs-theme="dark"] .belmail-business-mail-box p strong,
body.belofis-dark .belmail-business-mail-box p strong {
    color: #e0e0e0;
}

html.dark .belmail-business-mail-box p,
html.dark-mode .belmail-business-mail-box p,
html.theme-dark .belmail-business-mail-box p,
html[data-theme="dark"] .belmail-business-mail-box p,
html[data-bs-theme="dark"] .belmail-business-mail-box p,
body.dark .belmail-business-mail-box p,
body.dark-mode .belmail-business-mail-box p,
body.theme-dark .belmail-business-mail-box p,
body.night-mode .belmail-business-mail-box p,
body[data-theme="dark"] .belmail-business-mail-box p,
body[data-bs-theme="dark"] .belmail-business-mail-box p,
body.belofis-dark .belmail-business-mail-box p,
html.dark .belmail-business-partner,
html.dark-mode .belmail-business-partner,
html.theme-dark .belmail-business-partner,
html[data-theme="dark"] .belmail-business-partner,
html[data-bs-theme="dark"] .belmail-business-partner,
body.dark .belmail-business-partner,
body.dark-mode .belmail-business-partner,
body.theme-dark .belmail-business-partner,
body.night-mode .belmail-business-partner,
body[data-theme="dark"] .belmail-business-partner,
body[data-bs-theme="dark"] .belmail-business-partner,
body.belofis-dark .belmail-business-partner {
    color: #c2c8d3;
}



/* ====== БелМейл 1.3: SMS self-service ====== */
.belmail-self-service-form .belmail-step {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--belmail-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.belmail-step-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    color: var(--belmail-text);
}

.belmail-step-number {
    display: inline-flex;
    width: 1.65rem;
    height: 1.65rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--belmail-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.belmail-self-service-form .belmail-btn-success {
    background: #2f9e64 !important;
    border-color: #2f9e64 !important;
    color: #fff !important;
}

.belmail-self-service-form .belmail-btn-success:hover,
.belmail-self-service-form .belmail-btn-success:focus {
    background: #278653 !important;
    border-color: #278653 !important;
    color: #fff !important;
}

@media (max-width: 600px) {
    .belmail-self-service-form .belmail-step {
        margin: 0.75rem 0;
        padding: 0.75rem;
        border-radius: 13px;
    }

    .belmail-step-head {
        margin-bottom: 0.65rem;
        font-size: 0.9rem;
    }

    .belmail-step-number {
        width: 1.45rem;
        height: 1.45rem;
        font-size: 0.75rem;
    }
}

html.dark .belmail-self-service-form .belmail-step,
html.dark-mode .belmail-self-service-form .belmail-step,
html.theme-dark .belmail-self-service-form .belmail-step,
html[data-theme="dark"] .belmail-self-service-form .belmail-step,
html[data-bs-theme="dark"] .belmail-self-service-form .belmail-step,
body.dark .belmail-self-service-form .belmail-step,
body.dark-mode .belmail-self-service-form .belmail-step,
body.theme-dark .belmail-self-service-form .belmail-step,
body.night-mode .belmail-self-service-form .belmail-step,
body[data-theme="dark"] .belmail-self-service-form .belmail-step,
body[data-bs-theme="dark"] .belmail-self-service-form .belmail-step,
body.belofis-dark .belmail-self-service-form .belmail-step {
    background: rgba(42, 42, 62, 0.72);
    border-color: #3a3a4e;
}


/* ====== Подсказка входа в webmail и копирование логина ====== */
.belmail-login-autocomplete {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.belmail-login-helper {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: center;
    margin: 0.9rem 0 0;
    padding: 0.75rem;
    border: 1px solid var(--belmail-border);
    border-radius: 14px;
    background: rgba(47, 111, 203, 0.055);
}

.belmail-login-helper-label {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: var(--belmail-muted-strong);
    text-align: left;
}

.belmail-login-value {
    display: block;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: var(--belmail-surface);
    color: var(--belmail-text);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.belmail-copy-btn {
    min-height: 40px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--belmail-border-strong);
    border-radius: 10px;
    background: var(--belmail-surface);
    color: var(--belmail-primary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}

.belmail-copy-btn:hover,
.belmail-copy-btn:focus {
    border-color: var(--belmail-primary);
    box-shadow: 0 0 0 3px var(--belmail-focus);
    outline: none;
}

.belmail-login-note {
    margin: 0.8rem 0 0;
    padding: 0.75rem;
    border-radius: 13px;
    background: rgba(255, 193, 7, 0.12);
    color: var(--belmail-muted-strong);
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: left;
}

.belmail-login-note strong {
    color: var(--belmail-text);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .belmail-login-helper {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .belmail-copy-btn {
        width: 100%;
    }
}

/* ====== Локальные иконки без внешних ресурсов ====== */
.belmail-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin: 0 auto 0.65rem;
    border-radius: 999px;
    background: rgba(47, 111, 203, 0.08);
    color: var(--belmail-primary);
    font-size: 0;
    line-height: 1;
}

.belmail-icon::before {
    display: block;
    color: var(--belmail-primary);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
}

.belmail-icon-mail::before {
    content: "M";
}

.belmail-icon-key::before {
    content: "K";
}

.belmail-btn-primary::before,
.belmail-btn-secondary::before,
.belmail-btn-ghost::before,
.belmail-account-use-btn::before {
    content: none !important;
}

/* ====== Email + копирование логина в одном блоке ====== */
.belmail-email-display-copy {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    align-items: stretch;
}

.belmail-email-display-copy .belmail-email {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.belmail-email-copy-btn {
    width: 100%;
    min-height: 38px;
    padding: 0.55rem 0.8rem;
    white-space: nowrap;
}

.belmail-login-helper {
    display: none !important;
}

/* ====== Локальные CSS-иконки без внешних ресурсов ====== */
.belmail-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin: 0 auto 0.65rem;
    border-radius: 999px;
    background: rgba(47, 111, 203, 0.08);
    color: var(--belmail-primary);
    font-size: 0;
    line-height: 1;
}

.belmail-icon::before,
.belmail-icon::after {
    box-sizing: border-box;
}

.belmail-icon-mail::before {
    content: "";
    width: 1.18rem;
    height: 0.82rem;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.belmail-icon-mail::after {
    content: "";
    position: absolute;
    width: 0.78rem;
    height: 0.78rem;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    top: 0.69rem;
}

.belmail-icon-key::before {
    content: "";
    width: 0.62rem;
    height: 0.62rem;
    border: 2px solid currentColor;
    border-radius: 999px;
    margin-right: 0.32rem;
}

.belmail-icon-key::after {
    content: "";
    width: 0.82rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0.28rem 0.18rem 0 -0.03rem currentColor;
}

.belmail-icon-wait::before {
    content: "";
    width: 1.05rem;
    height: 1.05rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 999px;
}

.belmail-icon-lock::before {
    content: "";
    width: 1rem;
    height: 0.72rem;
    margin-top: 0.35rem;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.belmail-icon-lock::after {
    content: "";
    position: absolute;
    width: 0.72rem;
    height: 0.62rem;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    top: 0.46rem;
}

.belmail-icon-warning::before {
    content: "!";
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}

.belmail-icon-reject::before {
    content: "X";
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

/* ====== Auth Gateway states ====== */
.belmail-auth-required .belmail-btn-full {
    margin-top: 0.85rem;
}

.belmail-auth-gateway-form .belmail-step {
    opacity: 1;
}

.belmail-auth-gateway-form .belmail-step-mailbox {
    margin-top: 0;
}


/* v1.4.3 — подсказки единого пароля и настройки почтовой программы */
.belmail-password-sync-note {
    margin-top: 0.85rem;
}

.belmail-setup-intro {
    margin: 0 0 0.85rem;
    color: var(--belmail-muted-strong);
    font-size: 0.92rem;
    line-height: 1.45;
}

.belmail-copy-settings-btn {
    margin-top: 0.75rem;
}


/* v1.4.4 — отдельное состояние orphan_remote_created */
.belmail-orphan .belmail-email-display {
    margin: 1rem 0;
}

.belmail-orphan p {
    color: var(--belmail-muted-strong);
}

/* v1.4.7: латинская подсказка имени ящика */
.belmail-mailbox-suggestion {
    display: block;
    margin-top: 0.35rem;
}

.belmail-suggestion-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--belmail-border, #c8d5e4);
    border-radius: 999px;
    background: var(--belmail-surface, #ffffff);
    color: var(--belmail-primary, #2f6fcb);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.belmail-suggestion-btn:hover,
.belmail-suggestion-btn:focus {
    border-color: var(--belmail-primary, #2f6fcb);
    outline: none;
}

