.notify {
    display: flex;
}
.text-block img {
    margin: 20px 0;
}

.error-auth {
    background: red;
    color: #fff !important;
    font-size: 14px;
    padding: 3px 7px;
    border-radius: 7px;
    font-weight: 500;
}

@media (max-width: 575px) {
.header-main-wrapper:after {
    height: 50%;
}
}
.error-auth{
    display: none;
    color:red;
}

/* Legal pages (agreement, privacy) */
.legal-section {
    padding: 40px 0 80px;
}
.legal-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 12px;
}
.legal-content p {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #555;
}
.legal-content ul {
    margin: 8px 0 16px 20px;
}
.legal-content ul li {
    margin-bottom: 6px;
    line-height: 1.6;
    color: #555;
}
.legal-content a {
    color: #2d9b83;
}

/* Sitemap */
.sitemap-section {
    padding: 40px 0 80px;
}
.sitemap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px 60px;
}
.sitemap__group {
    margin-bottom: 10px;
}
.sitemap__title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2d9b83;
}
.sitemap__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sitemap__item {
    margin-bottom: 10px;
}
.sitemap__link {
    color: #555;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}
.sitemap__link:hover {
    color: #2d9b83;
}
@media (max-width: 575px) {
    .sitemap {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* intl-tel-input overrides */
.iti {
    width: 100%;
}
.iti__tel-input {
    width: 100%;
}
.input-item .iti {
    display: block;
}
.iti input.input {
    display: block;
    padding-left: 90px !important;
}
.iti--separate-dial-code input.input {
    padding-left: 90px !important;
}
.iti__selected-flag {
    padding: 0 6px 0 12px;
}
.iti--separate-dial-code .iti__selected-dial-code {
    margin-left: 6px;
    font-size: 14px;
}
/* Мягкая подсветка невалидного телефона/email — не блокирует сохранение */
.input-invalid,
.iti:has(> input.input-invalid) {
    border-color: #e58a3c;
    box-shadow: 0 0 0 1px rgba(229, 138, 60, 0.2);
}

/* =========================================================================
   Тема оформления: светлая / тёмная
   ========================================================================= */
:root {
    --ps-bg-page: #ffffff;
    --ps-bg-surface: #ffffff;
    --ps-bg-surface-2: #f0f4f8;
    --ps-bg-header-fixed: #f0f4f8;
    --ps-bg-header-dark: #172221;
    --ps-bg-footer: #172221;
    --ps-bg-footer-bottom: #394242;
    --ps-text: #172221;
    --ps-text-invert: #ffffff;
    --ps-text-muted: #96a0aa;
    --ps-border: #c0c6cc;
    --ps-accent: #319273;
    --ps-accent-hover: #58a78f;
    --ps-shadow: 0 0 15px 0 rgba(184, 184, 184, .45);
    --ps-popup-backdrop: rgba(0, 0, 0, .7);
}

html.theme-dark {
    --ps-bg-page: #0f1419;
    --ps-bg-surface: #1a1d24;
    --ps-bg-surface-2: #232830;
    --ps-bg-header-fixed: #1a1d24;
    --ps-bg-header-dark: #0b0e12;
    --ps-bg-footer: #0b0e12;
    --ps-bg-footer-bottom: #151a21;
    --ps-text: #e6ebf0;
    --ps-text-invert: #ffffff;
    --ps-text-muted: #8893a1;
    --ps-border: #3a4150;
    --ps-accent: #3eb891;
    --ps-accent-hover: #58d0aa;
    --ps-shadow: 0 0 15px 0 rgba(0, 0, 0, .55);
    --ps-popup-backdrop: rgba(0, 0, 0, .85);
}

/* Базовые поверхности */
html.theme-dark body {
    background: var(--ps-bg-page) !important;
    color: var(--ps-text);
}
html.theme-dark .wrapper {
    background: var(--ps-bg-page);
}

/* Страницы со светлыми секциями */
html.theme-dark .section-white,
html.theme-dark .section-white-bottom:after,
html.theme-dark .section-white-top:after {
    background: var(--ps-bg-surface) !important;
}

/* Header */
html.theme-dark .header-wrapper_fixed .header__bottom-wrapper {
    background: var(--ps-bg-header-fixed);
}
html.theme-dark .header__bottom-wrapper {
    background: var(--ps-bg-page);
}
html.theme-dark .header-main {
    background: rgba(26, 29, 36, .72);
}
html.theme-dark .header-main-wrapper:after {
    background: linear-gradient(180deg, #0f1419, rgba(15, 20, 25, 0) 39.86%, rgba(15, 20, 25, 0));
}

/* Footer уже тёмный, но в футере bottom делаем ещё темнее */
html.theme-dark .footer__bottom-wrapper {
    background: var(--ps-bg-footer-bottom);
}
html.theme-dark .footer__top-wrapper,
html.theme-dark .footer {
    background: var(--ps-bg-footer);
}

/* Карточки и общие поверхности */
html.theme-dark .card,
html.theme-dark .card__body,
html.theme-dark .card__content {
    background: var(--ps-bg-surface);
    color: var(--ps-text);
}

/* Секции со светлым фоном на главной */
html.theme-dark .for-whom,
html.theme-dark .page_light,
html.theme-dark section[class*="section"] {
    background: var(--ps-bg-page) !important;
    color: var(--ps-text);
}
html.theme-dark .for-whom .container,
html.theme-dark section[class*="section"] .container {
    background: transparent !important;
}
html.theme-dark .for-whom__item,
html.theme-dark .algorithm__item:not(.algorithm__item_no-bg) {
    background: var(--ps-bg-surface) !important;
    color: var(--ps-text);
}
/* Фон страниц c классом page_light — делаем тёмным */
html.theme-dark .page,
html.theme-dark .page_light,
html.theme-dark .page-bg {
    background: var(--ps-bg-page);
    color: var(--ps-text);
}

/* Dropdown */
html.theme-dark .dropdown__content {
    background: var(--ps-bg-surface);
    color: var(--ps-text);
    box-shadow: var(--ps-shadow);
}
html.theme-dark .dropdown__item {
    color: var(--ps-text);
}
html.theme-dark .dropdown__item_light {
    color: var(--ps-text-muted);
}

/* Popup / модальные окна */
html.theme-dark .popup {
    background: var(--ps-popup-backdrop);
}
html.theme-dark .popup__content {
    background: linear-gradient(157deg, #1f2a25, #17332a);
    color: var(--ps-text);
}

/* Инпуты / текстареа */
html.theme-dark .input,
html.theme-dark .textarea {
    background: var(--ps-bg-surface-2);
    color: var(--ps-text);
    border-color: var(--ps-border);
}
html.theme-dark .input::placeholder,
html.theme-dark .textarea::placeholder,
html.theme-dark .input-gray::placeholder {
    color: var(--ps-text-muted);
}
html.theme-dark .input-gray {
    background: var(--ps-bg-surface-2);
    color: var(--ps-text);
}

/* Ссылки внутри контента, тексты-заголовки legal/sitemap */
html.theme-dark .legal-content h2,
html.theme-dark .sitemap__title {
    color: var(--ps-text);
}
html.theme-dark .legal-content p,
html.theme-dark .legal-content ul li,
html.theme-dark .sitemap__link {
    color: var(--ps-text-muted);
}
html.theme-dark .legal-content a,
html.theme-dark .sitemap__link:hover {
    color: var(--ps-accent);
}

/* Тексты: заголовки и общий текст, которые могут быть заданы явно */
html.theme-dark h1,
html.theme-dark h2,
html.theme-dark h3,
html.theme-dark h4,
html.theme-dark h5,
html.theme-dark h6,
html.theme-dark p {
    color: var(--ps-text);
}

/* Кнопка-переключатель темы */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    transition: opacity .2s;
    order: -1;
    margin-right: 10px;
}
.theme-toggle:hover {
    opacity: .75;
}
.theme-toggle svg {
    width: 20px;
    height: 20px;
}
.theme-toggle .theme-toggle__sun {
    display: none;
}
.theme-toggle .theme-toggle__moon {
    display: block;
}
html.theme-dark .theme-toggle .theme-toggle__sun {
    display: block;
}
html.theme-dark .theme-toggle .theme-toggle__moon {
    display: none;
}
/* В мобильной версии меню тоже нормально выглядит */
.header__bottom .theme-toggle {
    color: var(--ps-text);
}
html.theme-dark .header__bottom .theme-toggle {
    color: var(--ps-text);
}