/* ==========================================================================
   Шаблон дизайна «Мягкий индиго» (neo)
   Подключается сервером после всех inline-<style> страницы, поэтому при равной специфичности побеждает тема;
   правила страниц с #id перебиваются селекторами с #id или !important. Все правила под html[data-theme="neo"].
   Правила контраста: любая пара текст/фон >= 4.5:1, крупный жирный текст >= 3:1; --neo-accent-light только декор.
   ========================================================================== */

html[data-theme="neo"] {
    --neo-bg: linear-gradient(160deg, #c9cdf6 0%, #b9bff0 100%);
    --neo-page-bg: linear-gradient(160deg, #c9cdf6 0%, #b9bff0 100%);
    --neo-accent: #5f57e8;
    --neo-accent-2: #6a5ff0;
    --neo-accent-dark: #4b43c9;
    --neo-accent-light: #a9a6f2; /* только декор, не для текста */
    --neo-accent-pale: #dcdcfa;
    --neo-surface: #f6f7ff;
    --neo-inset: #eceeff;
    --neo-text: #2d2f5b;
    --neo-muted: #3f4277;
    --neo-success: #176b47; /* текст и фон под белую подпись; кнопки идут #1b7f55 -> #176b47 */
    --neo-success-dark: #176b47;
    --neo-danger: #c62f47;
    --neo-danger-dark: #b02a40;
    --neo-r-sm: 14px;
    --neo-r-md: 20px;
    --neo-r-lg: 24px;
    --neo-r-xl: 28px;
    --neo-shadow: 8px 8px 20px rgba(94, 98, 190, .22), -6px -6px 16px rgba(255, 255, 255, .75);
    --neo-shadow-sm: 5px 5px 14px rgba(94, 98, 190, .2), -4px -4px 10px rgba(255, 255, 255, .7);
    --neo-shadow-xs: 3px 3px 8px rgba(94, 98, 190, .2), -2px -2px 6px rgba(255, 255, 255, .8);
    --neo-shadow-in: inset 3px 3px 8px rgba(94, 98, 190, .22), inset -3px -3px 8px rgba(255, 255, 255, .8);
    --neo-glow: 0 8px 18px rgba(95, 87, 232, .4);
    --neo-focus: 0 0 0 3px #fff, 0 0 0 6px #4b43c9;
    color-scheme: light;
}

html[data-theme="neo"] *,
html[data-theme="neo"] *::before,
html[data-theme="neo"] *::after {
    box-sizing: border-box;
}

html[data-theme="neo"] img,
html[data-theme="neo"] svg {
    max-width: 100%;
}

/* ---------- Страница: градиент на body + фиксированный слой без background-attachment (iOS) ---------- */
html[data-theme="neo"] body {
    background: var(--neo-page-bg);
    color: var(--neo-text);
}

html[data-theme="neo"] body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--neo-bg);
    pointer-events: none;
}

html[data-theme="neo"] a:focus-visible,
html[data-theme="neo"] button:focus-visible,
html[data-theme="neo"] input:focus-visible,
html[data-theme="neo"] select:focus-visible,
html[data-theme="neo"] textarea:focus-visible,
html[data-theme="neo"] [tabindex]:focus-visible {
    outline: 3px solid #4b43c9;
    outline-offset: 3px;
}

/* ---------- Шапка ---------- */
html[data-theme="neo"] .site-header {
    background: #fff;
    box-shadow: 0 6px 20px rgba(94, 98, 190, .2);
}

html[data-theme="neo"] .logo-text {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: var(--neo-accent-dark);
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] .nav-menu a {
    color: var(--neo-text);
    border-radius: 999px;
    font-weight: 600;
}

html[data-theme="neo"] .nav-menu a:hover {
    background: var(--neo-inset);
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] .nav-menu a.active {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    color: #fff;
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .35);
}

html[data-theme="neo"] .nav-menu a.logout-link,
html[data-theme="neo"] .logout-link {
    color: var(--neo-danger) !important;
}

html[data-theme="neo"] .logout-link:hover {
    background: #ffe9ed !important;
    color: var(--neo-danger-dark) !important;
}

html[data-theme="neo"] .menu-toggle {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .menu-toggle span {
    background: var(--neo-accent-dark);
}

/* Иконки: в меню (мобильная панель) и у пункта «Поддержка» */
html[data-theme="neo"] .neo-ico {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--neo-inset);
    color: var(--neo-accent-dark);
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .neo-ico svg {
    width: 20px;
    height: 20px;
}

html[data-theme="neo"] .nav-menu a.active .neo-ico {
    background: #fff;
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] .logout-link .neo-ico {
    color: var(--neo-danger);
}

html[data-theme="neo"] .menu-support-icon {
    display: inline-flex;
}

/* Десктоп: плавающая шапка (backdrop-filter только здесь, иначе .nav-menu с position:fixed потеряет привязку к окну) */
@media (min-width: 769px) {
    html[data-theme="neo"] body {
        padding-top: 92px;
    }

    html[data-theme="neo"] .site-header {
        top: 12px;
        left: 16px;
        right: 16px;
        max-width: 1240px;
        margin: 0 auto;
        border-radius: 26px;
        background: rgba(255, 255, 255, .82);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        box-shadow: var(--neo-shadow-sm);
    }

    html[data-theme="neo"] .header-container {
        height: 64px;
    }

    /* Текстовые пункты меню остаются компактными пилюлями без иконок, чтобы все пункты помещались в строку */
    html[data-theme="neo"] .nav-menu a .neo-ico {
        display: none;
    }

    html[data-theme="neo"] .nav-menu a .menu-support-icon .neo-ico {
        display: inline-flex;
        width: 30px;
        height: 30px;
        background: none;
        box-shadow: none;
    }

    html[data-theme="neo"] .nav-menu a:hover .menu-support-icon .neo-ico,
    html[data-theme="neo"] .nav-menu a.active .menu-support-icon .neo-ico {
        background: none;
        color: inherit;
    }

    html[data-theme="neo"] .menu-profile-dropdown {
        border-radius: var(--neo-r-md);
        background: #fff;
        box-shadow: var(--neo-shadow);
    }

    /* Страница-приветствие: шапка 64px + отступ, баннер лендинга не должен уезжать под неё */
    html[data-theme="neo"] .lp-page {
        margin-top: 0;
    }
}

/* Телефон: простая шапка; панель меню - скруглённый лист с пилюлями-строками */
@media (max-width: 768px) {
    html[data-theme="neo"] .site-header {
        border-radius: 0 0 var(--neo-r-lg) var(--neo-r-lg);
    }

    html[data-theme="neo"] .nav-menu {
        gap: 8px;
        padding: 16px 14px calc(24px + 80px);
        border-radius: var(--neo-r-xl) 0 0 var(--neo-r-xl);
        background: var(--neo-surface);
        box-shadow: -10px 0 30px rgba(60, 56, 150, .3);
    }

    html[data-theme="neo"] .nav-menu a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 52px;
        padding: 8px 16px 8px 8px;
        background: #fff;
        box-shadow: var(--neo-shadow-xs);
        font-size: 16px;
    }

    html[data-theme="neo"] .nav-menu a.menu-support-link {
        padding: 8px 16px 8px 8px;
    }

    html[data-theme="neo"] .nav-menu a .neo-ico {
        display: inline-flex;
    }

    html[data-theme="neo"] .nav-menu a .menu-support-icon .neo-ico {
        width: 36px;
        height: 36px;
        background: var(--neo-inset);
        box-shadow: var(--neo-shadow-xs);
    }

    html[data-theme="neo"] .nav-menu a.active .menu-support-icon .neo-ico {
        background: #fff;
    }

    html[data-theme="neo"] .nav-menu .menu-profile-link {
        min-height: 44px;
        padding: 10px 16px;
    }

    html[data-theme="neo"].neo-has-bottombar .menu-toggle {
        display: none;
    }

    /* Кнопка меню скрыта сразу, по разметке (до выполнения скрипта), чтобы она не мигала при переходе между страницами.
       Условия те же, что у нижней панели в theme-neo.js: на странице есть карточка профиля в меню. Если панель не построилась,
       скрипт ставит класс neo-no-bottombar и кнопка возвращается. */
    html[data-theme="neo"]:not(.neo-no-bottombar) body:has(#menuProfileCard) .menu-toggle {
        display: none;
    }

    html[data-theme="neo"].neo-has-bottombar body {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }
}

/* ---------- Карточка профиля в меню + аватары ---------- */
html[data-theme="neo"] .menu-profile-trigger {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(145deg, #fff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
    color: var(--neo-text);
}

html[data-theme="neo"] .menu-profile-trigger:hover,
html[data-theme="neo"] .menu-profile.is-open .menu-profile-trigger {
    background: linear-gradient(145deg, #fff 0%, var(--neo-accent-pale) 100%);
    color: var(--neo-accent-dark);
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .menu-profile-trigger.is-current {
    background: linear-gradient(145deg, #fff 0%, var(--neo-accent-pale) 100%);
}

html[data-theme="neo"] .menu-profile-balance {
    color: var(--neo-success);
}

html[data-theme="neo"] .menu-profile-caret {
    background: var(--neo-accent);
}

html[data-theme="neo"] .menu-profile-avatar,
html[data-theme="neo"] .neo-avatar {
    background: linear-gradient(135deg, #6a5ff0 0%, #4b43c9 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(75, 67, 201, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}

html[data-theme="neo"] .neo-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

html[data-theme="neo"] .neo-avatar-sm {
    width: 38px;
    height: 38px;
    font-size: 17px;
}

html[data-theme="neo"] .neo-avatar-lg {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    font-size: 28px;
    box-shadow: 0 8px 18px rgba(75, 67, 201, .35), inset 0 2px 0 rgba(255, 255, 255, .35), 0 0 0 4px #fff;
}

/* Восемь пар градиентов (белая буква на каждой >= 3:1) */
html[data-theme="neo"] [data-neo-tone="0"] { background: linear-gradient(135deg, #6a5ff0 0%, #4b43c9 100%); }
html[data-theme="neo"] [data-neo-tone="1"] { background: linear-gradient(135deg, #7c4dff 0%, #5a2fc9 100%); }
html[data-theme="neo"] [data-neo-tone="2"] { background: linear-gradient(135deg, #0f8a9d 0%, #0b6577 100%); }
html[data-theme="neo"] [data-neo-tone="3"] { background: linear-gradient(135deg, #d6336c 0%, #a61e4d 100%); }
html[data-theme="neo"] [data-neo-tone="4"] { background: linear-gradient(135deg, #4263eb 0%, #2b44b8 100%); }
html[data-theme="neo"] [data-neo-tone="5"] { background: linear-gradient(135deg, #9c36b5 0%, #702282 100%); }
html[data-theme="neo"] [data-neo-tone="6"] { background: linear-gradient(135deg, #e8590c 0%, #b8430a 100%); }
html[data-theme="neo"] [data-neo-tone="7"] { background: linear-gradient(135deg, #2f9e44 0%, #1f7a33 100%); }

/* ---------- Карточка профиля в шапке (телефоны) ----------
   theme-neo.js переносит li#menuProfileCard из бокового меню в .header-container. Шапка на телефоне остаётся без
   backdrop-filter/filter/transform (внутри неё position:fixed у .nav-menu), список позиционируется абсолютно от карточки. */
@media (max-width: 768px) {
    /* Место под карточку занято разметкой ещё до выполнения скрипта и загрузки профиля: логотип не сдвигается.
       Заглушка исчезает, когда скрипт перенёс карточку (класс neo-card-in-header), её место занимает сама карточка. */
    html[data-theme="neo"]:not(.neo-no-bottombar):not(.neo-card-in-header) body:has(#menuProfileCard) .header-container::after {
        content: "";
        flex: 0 0 auto;
        width: 150px;
        height: 44px;
        margin-left: auto;
    }

    html[data-theme="neo"] .header-container {
        min-width: 0;
    }

    html[data-theme="neo"] .header-container .logo {
        min-width: 0;
        flex: 0 1 auto;
    }

    html[data-theme="neo"] .neo-head-card {
        list-style: none; /* вне ul маркер списка иначе виден точкой слева от карточки */
        flex: 0 0 auto;
        margin-left: auto;
        width: auto;
    }

    html[data-theme="neo"] .neo-head-card:empty {
        min-width: 150px;
        min-height: 44px;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-trigger {
        width: auto;
        min-height: 44px;
        gap: 8px;
        padding: 4px 10px 4px 5px;
        border-radius: 999px;
        background: linear-gradient(145deg, #fff 0%, var(--neo-inset) 100%);
        box-shadow: var(--neo-shadow-xs), inset 0 1px 0 #fff;
        color: var(--neo-text);
        -webkit-tap-highlight-color: transparent;
    }

    html[data-theme="neo"] .neo-head-card.is-open .menu-profile-trigger,
    html[data-theme="neo"] .neo-head-card .menu-profile-trigger.is-current {
        background: linear-gradient(145deg, #fff 0%, var(--neo-accent-pale) 100%);
        color: var(--neo-accent-dark);
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-trigger:focus-visible {
        outline: 3px solid #4b43c9;
        outline-offset: 2px;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-avatar {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-text {
        flex: 0 1 auto;
        gap: 1px;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-name {
        max-width: 96px;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.15;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-balance {
        max-width: 96px;
        color: var(--neo-accent-dark);
        font-size: 13px;
        font-weight: 800;
        line-height: 1.15;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-caret {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    /* Список под карточкой, прижат к правому краю шапки; выше страницы и нижней панели (900), ниже .modal (2000) */
    html[data-theme="neo"] .neo-head-card .menu-profile-dropdown {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: auto;
        z-index: 1001;
        width: 230px;
        max-width: calc(100vw - 24px);
        min-width: 0;
        margin: 0;
        padding: 8px;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 14px 34px rgba(60, 56, 150, .32), 0 0 0 1px rgba(94, 98, 190, .1);
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-link {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 14px;
        background: transparent;
        box-shadow: none;
        color: var(--neo-text);
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-link:hover {
        background: var(--neo-inset);
        color: var(--neo-accent-dark);
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-link.active {
        background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
        color: #fff;
        box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .35);
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-link:focus-visible {
        outline: 3px solid #4b43c9;
        outline-offset: -3px;
    }
}

/* Очень узкие экраны: название сайта прячется, остаётся значок (только когда карточка стоит в шапке) */
@media (max-width: 380px) {
    html[data-theme="neo"]:not(.neo-no-bottombar) body:has(#menuProfileCard) .header-container .logo-text {
        display: none;
    }

    html[data-theme="neo"] .neo-head-card .menu-profile-name,
    html[data-theme="neo"] .neo-head-card .menu-profile-balance {
        max-width: 112px;
    }
}

/* ---------- Нижнее меню (телефоны) ---------- */
html[data-theme="neo"] .neo-tabbar {
    display: none;
}

@media (max-width: 768px) {
    html[data-theme="neo"] .neo-tabbar {
        display: flex;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 900; /* ниже шапки (1000) и модальных окон (2000) */
        gap: 2px;
        height: 68px;
        padding: 6px;
        border-radius: 32px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 10px 28px rgba(60, 56, 150, .28), inset 0 1px 0 #fff;
    }

    html[data-theme="neo"] .neo-tab {
        flex: 1 1 0;
        min-width: 0;
        min-height: 56px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 4px 2px;
        border: 0;
        border-radius: 26px;
        background: transparent;
        color: var(--neo-muted);
        font-family: inherit;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.1;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background .2s, color .2s;
    }

    html[data-theme="neo"] .neo-tab svg {
        width: 24px;
        height: 24px;
    }

    html[data-theme="neo"] .neo-tab span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html[data-theme="neo"] .neo-tab[aria-current="page"],
    html[data-theme="neo"] .neo-tab.is-active {
        background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
        color: #fff;
        box-shadow: 0 6px 14px rgba(95, 87, 232, .45), inset 0 2px 0 rgba(255, 255, 255, .35);
    }

    html[data-theme="neo"] .neo-tab[aria-expanded="true"] {
        background: var(--neo-accent-pale);
        color: var(--neo-accent-dark);
    }

    html[data-theme="neo"] .neo-tab:focus-visible {
        outline: 3px solid #4b43c9;
        outline-offset: -3px;
    }
}

/* ---------- Кнопки: выпуклые пилюли ---------- */
html[data-theme="neo"] .btn,
html[data-theme="neo"] .submit-report-btn,
html[data-theme="neo"] .copy-referral-btn,
html[data-theme="neo"] .task-row-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #eceeff 100%);
    color: var(--neo-text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-shadow: 6px 6px 14px rgba(94, 98, 190, .24), -4px -4px 10px rgba(255, 255, 255, .85), inset 0 1px 0 #fff;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}

html[data-theme="neo"] .btn:hover,
html[data-theme="neo"] .submit-report-btn:hover,
html[data-theme="neo"] .copy-referral-btn:hover,
html[data-theme="neo"] .task-row-btn:hover {
    transform: translateY(-1px);
    box-shadow: 8px 8px 18px rgba(94, 98, 190, .28), -5px -5px 12px rgba(255, 255, 255, .9), inset 0 1px 0 #fff;
}

html[data-theme="neo"] .btn:active,
html[data-theme="neo"] .submit-report-btn:active,
html[data-theme="neo"] .copy-referral-btn:active,
html[data-theme="neo"] .task-row-btn:active {
    transform: translateY(1px);
    box-shadow: var(--neo-shadow-in);
    opacity: 1;
}

html[data-theme="neo"] .btn:focus-visible,
html[data-theme="neo"] .submit-report-btn:focus-visible,
html[data-theme="neo"] .copy-referral-btn:focus-visible,
html[data-theme="neo"] .task-row-btn:focus-visible {
    outline: none;
    box-shadow: var(--neo-focus);
}

/* Главная: индиго с бликом сверху и свечением */
html[data-theme="neo"] .btn-primary,
html[data-theme="neo"] .submit-report-btn,
html[data-theme="neo"] .copy-referral-btn,
html[data-theme="neo"] .task-row-btn {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    color: #fff;
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .38), inset 0 -3px 6px rgba(52, 44, 170, .25);
}

html[data-theme="neo"] .btn-primary:hover,
html[data-theme="neo"] .submit-report-btn:hover,
html[data-theme="neo"] .copy-referral-btn:hover,
html[data-theme="neo"] .task-row-btn:hover {
    box-shadow: 0 10px 22px rgba(95, 87, 232, .5), inset 0 2px 0 rgba(255, 255, 255, .38), inset 0 -3px 6px rgba(52, 44, 170, .25);
}

html[data-theme="neo"] .btn-primary:active,
html[data-theme="neo"] .submit-report-btn:active,
html[data-theme="neo"] .copy-referral-btn:active,
html[data-theme="neo"] .task-row-btn:active {
    box-shadow: inset 4px 4px 10px rgba(30, 22, 130, .45), inset -2px -2px 6px rgba(140, 132, 255, .35);
}

html[data-theme="neo"] .btn-primary:focus-visible,
html[data-theme="neo"] .submit-report-btn:focus-visible,
html[data-theme="neo"] .copy-referral-btn:focus-visible,
html[data-theme="neo"] .task-row-btn:focus-visible {
    box-shadow: var(--neo-focus);
}

html[data-theme="neo"] .btn-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #eceeff 100%);
    color: var(--neo-text);
}

html[data-theme="neo"] .btn-success,
html[data-theme="neo"] .btn-withdrawal {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 107, 71, .38), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(8, 60, 36, .25);
}

html[data-theme="neo"] .btn-success:hover,
html[data-theme="neo"] .btn-withdrawal:hover {
    box-shadow: 0 10px 22px rgba(23, 107, 71, .5), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(8, 60, 36, .25);
}

html[data-theme="neo"] .btn-success:active,
html[data-theme="neo"] .btn-withdrawal:active {
    box-shadow: inset 4px 4px 10px rgba(5, 50, 28, .5), inset -2px -2px 6px rgba(80, 190, 140, .3);
}

html[data-theme="neo"] .btn-success:focus-visible,
html[data-theme="neo"] .btn-withdrawal:focus-visible {
    box-shadow: var(--neo-focus);
}

html[data-theme="neo"] .btn-danger {
    background: linear-gradient(180deg, #c62f47 0%, #b02a40 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(176, 42, 64, .38), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(110, 15, 32, .25);
}

html[data-theme="neo"] .btn-large {
    min-height: 54px;
    padding: 14px 40px;
    font-size: 18px;
}

html[data-theme="neo"] .btn-withdrawal {
    width: 100%;
    white-space: normal;
}

html[data-theme="neo"] .btn:disabled,
html[data-theme="neo"] .submit-report-btn:disabled,
html[data-theme="neo"] .task-row-btn:disabled {
    background: #dcdff6;
    color: var(--neo-muted);
    box-shadow: var(--neo-shadow-in);
    cursor: not-allowed;
    transform: none;
    opacity: 1;
}

/* Состояния кнопки вывода (классы ставит balance.js): ожидание и «Подтвердить активацию» */
html[data-theme="neo"] .btn-withdrawal.btn-withdrawal-wait {
    background: linear-gradient(180deg, #5b6296 0%, #4d5485 100%);
    color: #fff;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), inset 0 -3px 6px rgba(30, 34, 80, .3);
}

html[data-theme="neo"] .btn-withdrawal.btn-withdrawal-wait:hover {
    transform: none;
}

html[data-theme="neo"] .btn-withdrawal.btn-withdrawal-attention {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
    color: #fff;
}

/* Кнопки в CTA-блоках на индиго */
html[data-theme="neo"] .cta-section .btn-primary {
    background: linear-gradient(180deg, #ffffff 0%, #eceeff 100%);
    color: var(--neo-accent-dark);
    box-shadow: 0 8px 18px rgba(30, 22, 130, .35), inset 0 1px 0 #fff;
}

html[data-theme="neo"] .cta-section .btn-secondary {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border: 2px solid #fff;
    box-shadow: none;
}

/* Приветствие: кнопки «Войти» (зелёная) и «Регистрация» (индиго) */
html[data-theme="neo"] a.btn.lp-btn-login {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
    color: #fff;
    border: 0;
    box-shadow: 0 8px 18px rgba(23, 107, 71, .38), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(8, 60, 36, .25);
}

html[data-theme="neo"] a.btn.lp-btn-register {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    color: #fff;
    border: 0;
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .38), inset 0 -3px 6px rgba(52, 44, 170, .25);
}

html[data-theme="neo"] a.btn.lp-btn-login:hover,
html[data-theme="neo"] a.btn.lp-btn-login:focus-visible {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
    color: #fff;
}

html[data-theme="neo"] a.btn.lp-btn-register:hover,
html[data-theme="neo"] a.btn.lp-btn-register:focus-visible {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    color: #fff;
}

html[data-theme="neo"] a.btn.lp-btn-login:focus-visible,
html[data-theme="neo"] a.btn.lp-btn-register:focus-visible {
    box-shadow: var(--neo-focus);
}

@media (max-width: 768px) {
    html[data-theme="neo"] .btn {
        padding: 11px 24px;
    }

    html[data-theme="neo"] .welcome-header-actions .btn {
        width: auto;
        min-height: 44px;
        padding: 6px 16px;
        font-size: 14px;
    }
}

/* ---------- Карточки и заголовки ---------- */
html[data-theme="neo"] .form-box,
html[data-theme="neo"] .profile-header,
html[data-theme="neo"] .info-card,
html[data-theme="neo"] .tasks-header,
html[data-theme="neo"] .tasks-content,
html[data-theme="neo"] .about-content,
html[data-theme="neo"] .ad-card,
html[data-theme="neo"] .prize-card,
html[data-theme="neo"] .tasks-pager.pagination-card,
html[data-theme="neo"] .lp-card,
html[data-theme="neo"] .lp-daily,
html[data-theme="neo"] .lp-final-box {
    background: linear-gradient(145deg, #ffffff 0%, var(--neo-surface) 100%);
    border-radius: var(--neo-r-xl);
    box-shadow: var(--neo-shadow);
    color: var(--neo-text);
}

html[data-theme="neo"] .tasks-tabs {
    border-radius: 999px;
    background: var(--neo-inset);
    box-shadow: var(--neo-shadow-in);
}

html[data-theme="neo"] .ad-card,
html[data-theme="neo"] .prize-card,
html[data-theme="neo"] .lp-card {
    border-radius: var(--neo-r-lg);
}

html[data-theme="neo"] .ad-card:hover,
html[data-theme="neo"] .prize-card:hover {
    transform: none;
    box-shadow: 10px 10px 24px rgba(94, 98, 190, .28), -6px -6px 16px rgba(255, 255, 255, .8);
}

html[data-theme="neo"] .form-box h2,
html[data-theme="neo"] .profile-header h1,
html[data-theme="neo"] .tasks-header h1,
html[data-theme="neo"] .about-content h1,
html[data-theme="neo"] .about-section h2,
html[data-theme="neo"] .info-card h3,
html[data-theme="neo"] .faq-item h3,
html[data-theme="neo"] .task-detail-title,
html[data-theme="neo"] .support-detail-title,
html[data-theme="neo"] .report-form h3 {
    color: var(--neo-text);
}

html[data-theme="neo"] .info-card h3 {
    border-bottom: 2px solid var(--neo-accent-pale);
}

html[data-theme="neo"] .profile-header p,
html[data-theme="neo"] .tasks-header p,
html[data-theme="neo"] .about-section p,
html[data-theme="neo"] .step-content p,
html[data-theme="neo"] .feature p,
html[data-theme="neo"] .faq-item p,
html[data-theme="neo"] .info-label,
html[data-theme="neo"] .switch-form,
html[data-theme="neo"] .status-note,
html[data-theme="neo"] .stat-label,
html[data-theme="neo"] .stats-rank-count,
html[data-theme="neo"] .stats-rank-next,
html[data-theme="neo"] .task-date,
html[data-theme="neo"] .placeholder,
html[data-theme="neo"] .leaders-reset,
html[data-theme="neo"] .leaders-empty,
html[data-theme="neo"] .history-empty,
html[data-theme="neo"] .history-loading,
html[data-theme="neo"] .history-date,
html[data-theme="neo"] .history-after,
html[data-theme="neo"] .pagination-caption,
html[data-theme="neo"] .ads-intro,
html[data-theme="neo"] .ad-card-meta,
html[data-theme="neo"] .ad-card-host,
html[data-theme="neo"] .ad-frame-notice,
html[data-theme="neo"] .ad-timer,
html[data-theme="neo"] .ad-timer-status,
html[data-theme="neo"] .ad-error p,
html[data-theme="neo"] .daily-reward-subtitle,
html[data-theme="neo"] .daily-reward-note,
html[data-theme="neo"] .daily-reward-loading,
html[data-theme="neo"] .withdrawal-info small,
html[data-theme="neo"] .file-name {
    color: var(--neo-muted);
}

html[data-theme="neo"] .info-value,
html[data-theme="neo"] .stat-value,
html[data-theme="neo"] .task-row-title,
html[data-theme="neo"] .step-content h3,
html[data-theme="neo"] .feature h3,
html[data-theme="neo"] .history-title,
html[data-theme="neo"] .ad-card-title,
html[data-theme="neo"] .prize-card-title,
html[data-theme="neo"] .prize-modal-title {
    color: var(--neo-text);
}

html[data-theme="neo"] .info-row {
    border-bottom: 1px solid var(--neo-accent-pale);
}

html[data-theme="neo"] .switch-form a,
html[data-theme="neo"] .support-link,
html[data-theme="neo"] .task-text-link {
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] .task-row-reward,
html[data-theme="neo"] .task-detail-reward,
html[data-theme="neo"] .leaders-value,
html[data-theme="neo"] .stats-rank-max,
html[data-theme="neo"] .history-plus,
html[data-theme="neo"] .prize-req-value.is-ok,
html[data-theme="neo"] .prize-modal-congrats {
    color: var(--neo-success);
}

html[data-theme="neo"] .history-minus,
html[data-theme="neo"] .prize-req-value.is-low {
    color: var(--neo-danger);
}

/* Вложенные плитки */
html[data-theme="neo"] .stat-item,
html[data-theme="neo"] .step,
html[data-theme="neo"] .feature,
html[data-theme="neo"] .task-types li,
html[data-theme="neo"] .faq-item,
html[data-theme="neo"] .task-row,
html[data-theme="neo"] .task-steps li,
html[data-theme="neo"] .report-form,
html[data-theme="neo"] .prize-req-block {
    background: var(--neo-inset);
    border-radius: var(--neo-r-md);
    box-shadow: none;
}

html[data-theme="neo"] .task-row {
    padding: 12px 16px;
    border-radius: var(--neo-r-lg);
}

html[data-theme="neo"] .task-row:hover,
html[data-theme="neo"] .stat-item:hover,
html[data-theme="neo"] .feature:hover {
    transform: none;
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .task-row-icon {
    border-radius: 16px;
    background: #fff;
}

html[data-theme="neo"] .step-number {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .35);
}

html[data-theme="neo"] .task-status.moderation {
    border-radius: 999px;
}

html[data-theme="neo"] .task-status.completed {
    border-radius: 999px;
}

html[data-theme="neo"] .email-banner {
    border-radius: var(--neo-r-md);
    box-shadow: var(--neo-shadow-sm);
}

html[data-theme="neo"] .cta-section {
    border-radius: var(--neo-r-xl);
    background: linear-gradient(145deg, #5f57e8 0%, #4b43c9 100%);
    box-shadow: var(--neo-shadow);
}

html[data-theme="neo"] .cta-section h2,
html[data-theme="neo"] .cta-section p {
    color: #fff;
}

/* ---------- Формы ---------- */
html[data-theme="neo"] .form-group label {
    color: var(--neo-text);
    font-weight: 600;
}

html[data-theme="neo"] .form-group input,
html[data-theme="neo"] .form-group select,
html[data-theme="neo"] .referral-link-input-field {
    min-height: 48px;
    padding: 12px 18px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--neo-inset);
    box-shadow: var(--neo-shadow-in);
    color: var(--neo-text);
    font-family: inherit;
}

html[data-theme="neo"] textarea,
html[data-theme="neo"] .support-textarea {
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: var(--neo-r-md);
    background: var(--neo-inset);
    box-shadow: var(--neo-shadow-in);
    color: var(--neo-text);
}

html[data-theme="neo"] .form-group input:focus,
html[data-theme="neo"] .form-group select:focus,
html[data-theme="neo"] textarea:focus,
html[data-theme="neo"] .support-textarea:focus,
html[data-theme="neo"] .referral-link-input-field:focus {
    outline: none;
    border-color: var(--neo-accent-dark);
    box-shadow: var(--neo-shadow-in), 0 0 0 3px rgba(95, 87, 232, .35);
}

html[data-theme="neo"] input::placeholder,
html[data-theme="neo"] textarea::placeholder {
    color: #5b5e8f;
    opacity: 1;
}

html[data-theme="neo"] .support-form {
    border: 0;
    border-radius: var(--neo-r-lg);
    background: var(--neo-inset);
    box-shadow: var(--neo-shadow-in);
}

html[data-theme="neo"] .support-form .form-group select {
    background: #fff;
}

html[data-theme="neo"] .support-counter,
html[data-theme="neo"] .support-hint,
html[data-theme="neo"] .support-muted,
html[data-theme="neo"] .support-msg-head,
html[data-theme="neo"] .support-ticket-time,
html[data-theme="neo"] .support-ticket-topic,
html[data-theme="neo"] .support-attachment-name {
    color: var(--neo-muted);
}

/* Чекбоксы в карточках - переключатели (остаются настоящими input: клик, клавиатура, чтение с экрана) */
html[data-theme="neo"] .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin: 0;
    color: var(--neo-text);
    cursor: pointer;
}

html[data-theme="neo"] .checkbox-group input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 28px;
    min-width: 48px;
    min-height: 28px;
    margin: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--neo-shadow-in);
    cursor: pointer;
    transition: background .2s;
}

html[data-theme="neo"] .checkbox-group input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(145deg, #6a5ff0 0%, #4b43c9 100%);
    box-shadow: 0 2px 6px rgba(75, 67, 201, .45);
    transition: transform .2s, background .2s;
}

html[data-theme="neo"] .checkbox-group input[type="checkbox"]:checked {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
}

html[data-theme="neo"] .checkbox-group input[type="checkbox"]:checked::before {
    background: #fff;
    transform: translateX(20px);
}

html[data-theme="neo"] .checkbox-group input[type="checkbox"]:disabled {
    opacity: .6;
    cursor: not-allowed;
}

html[data-theme="neo"] #appPushCard .app-push-prefs input[type="checkbox"] {
    width: 48px;
    height: 28px;
    margin-right: 0;
}

/* ---------- Вкладки, пагинация, прогресс ---------- */
html[data-theme="neo"] .tab-btn,
html[data-theme="neo"] .leaders-tab,
html[data-theme="neo"] .history-tab,
html[data-theme="neo"] .pagination-btn {
    font-family: inherit;
}

html[data-theme="neo"] .tab-btn {
    min-height: 44px;
    border-radius: 999px;
    background: transparent;
    color: var(--neo-muted);
    font-weight: 700;
}

html[data-theme="neo"] .tab-btn:hover {
    background: rgba(255, 255, 255, .7);
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] .tab-btn.active,
html[data-theme="neo"] .leaders-tab.active,
html[data-theme="neo"] .history-tab.active,
html[data-theme="neo"] .pagination-btn.active {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .35);
}

html[data-theme="neo"] .leaders-tab,
html[data-theme="neo"] .history-tab,
html[data-theme="neo"] .pagination-btn,
html[data-theme="neo"] .support-attach-btn,
html[data-theme="neo"] .support-file-remove,
html[data-theme="neo"] .support-back {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #eceeff 100%);
    color: var(--neo-accent-dark);
    font-weight: 700;
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .leaders-tab:hover,
html[data-theme="neo"] .history-tab:hover,
html[data-theme="neo"] .pagination-btn:hover:not(:disabled),
html[data-theme="neo"] .support-attach-btn:hover,
html[data-theme="neo"] .support-file-remove:hover,
html[data-theme="neo"] .support-back:hover {
    background: linear-gradient(180deg, #ffffff 0%, var(--neo-accent-pale) 100%);
}

html[data-theme="neo"] .leaders-tab.active:hover,
html[data-theme="neo"] .history-tab.active:hover {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
}

html[data-theme="neo"] .support-file-remove {
    color: var(--neo-muted);
}

html[data-theme="neo"] .stats-progress,
html[data-theme="neo"] .prize-progress,
html[data-theme="neo"] .ad-progress,
html[data-theme="neo"] .progress-bar {
    border-radius: 999px;
    background: #dcdff6;
    box-shadow: var(--neo-shadow-in);
}

html[data-theme="neo"] .stats-progress-fill,
html[data-theme="neo"] .prize-progress-bar,
html[data-theme="neo"] .ad-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #6a5ff0 0%, #4b43c9 100%);
}

html[data-theme="neo"] .prize-progress-bar.is-claimed {
    background: linear-gradient(90deg, #1b7f55 0%, #176b47 100%);
}

html[data-theme="neo"] .prize-progress-bar.is-locked {
    background: #6b6e9c;
}

html[data-theme="neo"] .ad-timer-value {
    color: var(--neo-accent-dark);
}

/* ---------- Модальные окна и шторка ---------- */
html[data-theme="neo"] .modal {
    background: rgba(45, 47, 91, .6);
}

html[data-theme="neo"] .modal-content {
    border-radius: var(--neo-r-xl);
    background: linear-gradient(145deg, #ffffff 0%, var(--neo-surface) 100%);
    box-shadow: 0 20px 50px rgba(45, 47, 91, .4);
    color: var(--neo-text);
}

html[data-theme="neo"] .modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
    color: var(--neo-accent-dark);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

html[data-theme="neo"] .modal-close:hover {
    color: var(--neo-text);
}

html[data-theme="neo"] #taskModal.modal {
    background: rgba(45, 47, 91, .6);
}

html[data-theme="neo"] #taskModal .modal-content.modal-large {
    border-radius: 32px 32px 0 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--neo-surface) 100%);
    box-shadow: 0 -14px 44px rgba(45, 47, 91, .35);
}

html[data-theme="neo"] #taskModal .task-sheet-handle::before {
    background: var(--neo-accent-light);
}

html[data-theme="neo"] #taskModal .modal-close,
html[data-theme="neo"] #claimModal .modal-close {
    width: 40px;
    height: 40px;
    padding: 0 0 2px;
    background: linear-gradient(145deg, #fff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] #taskModal .modal-close:hover {
    background: #fff;
    color: var(--neo-text);
}

html[data-theme="neo"] #taskModal .task-detail-title,
html[data-theme="neo"] #taskModal .task-detail-section h3 {
    color: var(--neo-text);
}

html[data-theme="neo"] #taskModal .task-detail-image {
    border-radius: var(--neo-r-lg);
    box-shadow: var(--neo-shadow-sm);
}

html[data-theme="neo"] #taskModal .task-steps li {
    border-radius: var(--neo-r-md);
    background: var(--neo-inset);
}

html[data-theme="neo"] #taskModal .task-sheet-actions {
    border-top: 0;
    background: rgba(246, 247, 255, .97);
    box-shadow: 0 -8px 20px rgba(94, 98, 190, .12);
}

html[data-theme="neo"] #taskModal .report-form {
    border-radius: var(--neo-r-lg);
    background: var(--neo-inset);
}

html[data-theme="neo"] #taskModal .report-form h3 {
    color: var(--neo-text);
}

/* Кнопки шторки: «Начать выполнение» (зелёная) и «Перейти по ссылке» (синяя) сохраняют смысл, но в стиле neo */
html[data-theme="neo"] #taskModal .task-sheet-actions .btn {
    min-height: 52px;
    border-radius: 999px;
    color: #fff;
}

html[data-theme="neo"] #taskModal .task-sheet-actions .task-start-btn,
html[data-theme="neo"] #taskModal .submit-report-btn {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(23, 107, 71, .38), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(8, 60, 36, .25);
}

html[data-theme="neo"] #taskModal .task-sheet-actions .task-start-btn:hover,
html[data-theme="neo"] #taskModal .submit-report-btn:hover {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
    box-shadow: 0 10px 22px rgba(23, 107, 71, .5), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(8, 60, 36, .25);
}

html[data-theme="neo"] #taskModal .task-sheet-actions .task-link-btn,
html[data-theme="neo"] #taskModal .file-upload-label {
    background: linear-gradient(180deg, #2f5fd0 0%, #2349a8 100%);
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(35, 73, 168, .38), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(15, 35, 100, .25);
}

html[data-theme="neo"] #taskModal .task-sheet-actions .task-link-btn:hover,
html[data-theme="neo"] #taskModal .file-upload-label:hover {
    background: linear-gradient(180deg, #2f5fd0 0%, #2349a8 100%);
    box-shadow: 0 10px 22px rgba(35, 73, 168, .5), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 6px rgba(15, 35, 100, .25);
}

html[data-theme="neo"] #taskModal .task-sheet-actions .btn:active,
html[data-theme="neo"] #taskModal .submit-report-btn:active {
    box-shadow: inset 4px 4px 10px rgba(10, 30, 80, .45), inset -2px -2px 6px rgba(150, 190, 255, .3);
}

html[data-theme="neo"] #taskModal .task-sheet-actions .btn:disabled,
html[data-theme="neo"] #taskModal .submit-report-btn:disabled {
    background: #dcdff6;
    color: var(--neo-muted);
    box-shadow: var(--neo-shadow-in);
    opacity: 1;
}

html[data-theme="neo"] #taskModal .task-sheet-actions .btn:focus-visible,
html[data-theme="neo"] #taskModal .submit-report-btn:focus-visible {
    outline: none;
    box-shadow: var(--neo-focus);
}

/* Подсказка «Как сделать скриншот» (tasks.html) */
html[data-theme="neo"] #taskModal .screenshot-help-link {
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] #taskModal .screenshot-help-link:hover {
    color: var(--neo-text);
}

html[data-theme="neo"] #taskModal .screenshot-help-link:focus-visible,
html[data-theme="neo"] #screenshotHelpModal .screenshot-help-close:focus-visible {
    outline: none;
    box-shadow: var(--neo-focus);
}

html[data-theme="neo"] #screenshotHelpModal.modal {
    background: rgba(45, 47, 91, .6);
}

html[data-theme="neo"] #screenshotHelpModal .screenshot-help {
    border-radius: var(--neo-r-xl);
    background: linear-gradient(180deg, #ffffff 0%, var(--neo-surface) 100%);
    box-shadow: var(--neo-shadow);
    color: var(--neo-text);
}

html[data-theme="neo"] #screenshotHelpModal .screenshot-help-title,
html[data-theme="neo"] #screenshotHelpModal .screenshot-help-final {
    color: var(--neo-text);
}

html[data-theme="neo"] #screenshotHelpModal .screenshot-help-close {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #fff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] #screenshotHelpModal .screenshot-help-close:hover {
    background: #fff;
    color: var(--neo-text);
}

html[data-theme="neo"] #screenshotHelpModal .screenshot-help-section {
    border-radius: var(--neo-r-md);
    background: var(--neo-inset);
}

html[data-theme="neo"] #screenshotHelpModal .screenshot-help-section h3 {
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] #screenshotHelpModal .screenshot-help-section p {
    color: var(--neo-muted);
}

/* ---------- Сообщения ---------- */
html[data-theme="neo"] .message {
    border-radius: var(--neo-r-md);
    box-shadow: var(--neo-shadow-sm);
}

/* ---------- Приветствие (welcome) ---------- */
html[data-theme="neo"] .lp-page {
    color: var(--neo-text);
}

html[data-theme="neo"] .lp-title {
    color: var(--neo-text);
}

html[data-theme="neo"] .lp-hero {
    width: calc(100% - 24px);
    max-width: 1240px;
    margin: 8px auto 0;
    border-radius: 32px;
    background: linear-gradient(145deg, #5f57e8 0%, #4b43c9 100%);
    box-shadow: 0 16px 34px rgba(75, 67, 201, .38), inset 0 2px 0 rgba(255, 255, 255, .25);
}

html[data-theme="neo"] .lp-hero::before {
    background: radial-gradient(circle at 92% 94%, rgba(255, 255, 255, .2), transparent 42%);
}

html[data-theme="neo"] .lp-chip {
    background: #fff;
    border: 0;
    color: var(--neo-accent-dark);
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .lp-float {
    color: var(--neo-text);
    box-shadow: 0 8px 18px rgba(30, 22, 130, .3);
}

html[data-theme="neo"] .lp-card-icon {
    border-radius: 50%;
    background: var(--neo-inset);
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .lp-card h3,
html[data-theme="neo"] .lp-final h2 {
    color: var(--neo-text);
}

html[data-theme="neo"] .lp-card p,
html[data-theme="neo"] .lp-daily-text,
html[data-theme="neo"] .lp-final p,
html[data-theme="neo"] .lp-daily .lp-foot-note {
    color: var(--neo-muted);
}

html[data-theme="neo"] .lp-more,
html[data-theme="neo"] .lp-foot-note {
    background: #fff;
    color: var(--neo-text);
    border-radius: 999px;
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .lp-daily .lp-foot-note {
    background: none;
    box-shadow: none;
}

html[data-theme="neo"] .lp-steps li {
    background: linear-gradient(145deg, #ffffff 0%, var(--neo-surface) 100%);
    border: 0;
    border-radius: var(--neo-r-lg);
    box-shadow: var(--neo-shadow);
    color: var(--neo-text);
}

html[data-theme="neo"] .lp-steps li::before {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    color: #fff;
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .35);
}

html[data-theme="neo"] .lp-ladder li {
    border-radius: var(--neo-r-md);
    background: linear-gradient(180deg, #6a5ff0 0%, #4b43c9 100%);
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .3);
}

html[data-theme="neo"] .lp-footer {
    background: rgba(255, 255, 255, .6);
    color: var(--neo-text);
}

html[data-theme="neo"] .lp-footer a {
    color: var(--neo-accent-dark);
}

/* ---------- Баланс: сплошная индиго-карточка ---------- */
html[data-theme="neo"] .balance-card {
    background: linear-gradient(145deg, #6a5ff0 0%, #4b43c9 100%);
    color: #fff;
    box-shadow: 0 16px 34px rgba(75, 67, 201, .42), inset 0 2px 0 rgba(255, 255, 255, .28);
}

html[data-theme="neo"] .balance-label {
    color: #fff;
    font-weight: 600;
}

html[data-theme="neo"] .balance-amount {
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: var(--neo-r-lg);
    background: rgba(35, 26, 140, .32);
    box-shadow: inset 2px 2px 8px rgba(20, 14, 100, .35);
    color: #fff;
}

html[data-theme="neo"] .balance-totals {
    justify-self: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(35, 26, 140, .32);
    color: #fff;
}

html[data-theme="neo"] .balance-total-plus,
html[data-theme="neo"] .balance-min-sum {
    color: #d7fbe8;
}

html[data-theme="neo"] .balance-rank-hint .balance-hint-good {
    color: var(--neo-success);
}

html[data-theme="neo"] .balance-total-minus {
    color: #ffe3e8;
}

html[data-theme="neo"] .balance-min {
    border-radius: var(--neo-r-lg);
    background: rgba(35, 26, 140, .32);
    color: #fff;
}

html[data-theme="neo"] .balance-min-label,
html[data-theme="neo"] .balance-min-rank,
html[data-theme="neo"] .balance-card .withdrawal-info small {
    color: #fff;
}

html[data-theme="neo"] .balance-rank-hint {
    border-radius: var(--neo-r-md);
    background: #fff;
    color: #0c5460;
}

html[data-theme="neo"] .balance-card .withdrawal-section {
    border-top: 1px solid rgba(255, 255, 255, .35);
}

html[data-theme="neo"] .balance-card .btn-withdrawal {
    background: linear-gradient(180deg, #ffffff 0%, #eceeff 100%);
    color: var(--neo-success-dark);
    box-shadow: 0 8px 18px rgba(20, 14, 100, .35), inset 0 1px 0 #fff;
}

html[data-theme="neo"] .balance-card .btn-withdrawal.btn-withdrawal-wait {
    background: rgba(35, 26, 140, .4);
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}

html[data-theme="neo"] .balance-card .btn-withdrawal.btn-withdrawal-attention {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
    color: #fff;
    box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(8, 60, 36, .45);
}

html[data-theme="neo"] .balance-card .withdrawal-status > div {
    background: #fff !important;
    color: var(--neo-text);
    border-radius: var(--neo-r-md) !important;
}

/* ---------- Профиль, статистика ---------- */
html[data-theme="neo"] .profile-header {
    border-radius: var(--neo-r-xl);
}

html[data-theme="neo"] .daily-reward-day {
    border-color: var(--neo-accent-pale);
    border-radius: var(--neo-r-md);
    background: var(--neo-inset);
    color: var(--neo-muted);
}

html[data-theme="neo"] .daily-reward-day.is-claimed {
    background: #d4edda;
    border-color: var(--neo-success);
    color: #155724;
}

html[data-theme="neo"] .daily-reward-day.is-available {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe08a 100%);
    border-color: #e0a800;
    color: #6b4f00;
}

html[data-theme="neo"] .daily-reward-day.is-locked {
    opacity: 1;
}

html[data-theme="neo"] .daily-reward-btn:disabled,
html[data-theme="neo"] .daily-reward-btn:disabled:hover {
    background: #dcdff6;
    color: var(--neo-muted);
}

/* ---------- Рейтинг ---------- */
html[data-theme="neo"] .leaders-row {
    grid-template-columns: 44px 38px minmax(0, 1fr) auto;
    gap: 10px;
    border-radius: var(--neo-r-lg);
    background: linear-gradient(145deg, #ffffff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
    color: var(--neo-text);
}

html[data-theme="neo"] .leaders-row:hover {
    transform: none;
    box-shadow: var(--neo-shadow-sm);
}

html[data-theme="neo"] .leaders-row.rank-1 {
    background: linear-gradient(145deg, #fff8d6 0%, #ffe9a0 100%);
}

html[data-theme="neo"] .leaders-row.rank-2 {
    background: linear-gradient(145deg, #f7f8fd 0%, #dcdff2 100%);
}

html[data-theme="neo"] .leaders-row.rank-3 {
    background: linear-gradient(145deg, #ffefe0 0%, #f5cfaa 100%);
}

html[data-theme="neo"] .leaders-row.is-me {
    outline: 3px solid var(--neo-accent-dark);
    outline-offset: -3px;
}

html[data-theme="neo"] .leaders-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--neo-shadow-xs);
    color: var(--neo-accent-dark);
    font-size: 17px;
}

html[data-theme="neo"] .leaders-row.rank-1 .leaders-rank,
html[data-theme="neo"] .leaders-row.rank-2 .leaders-rank,
html[data-theme="neo"] .leaders-row.rank-3 .leaders-rank {
    font-size: 24px;
}

html[data-theme="neo"] .leaders-name {
    color: var(--neo-text);
}

html[data-theme="neo"] .leaders-me-badge {
    background: linear-gradient(180deg, #6a5ff0 0%, #5a52e4 100%);
    color: #fff;
}

html[data-theme="neo"] .leaders-my-place {
    border-radius: var(--neo-r-lg);
    background: linear-gradient(145deg, #6a5ff0 0%, #4b43c9 100%);
    box-shadow: var(--neo-glow);
}

html[data-theme="neo"] .lr-row {
    border-radius: var(--neo-r-md);
    background: linear-gradient(145deg, #ffffff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
}

html[data-theme="neo"] .lr-row:first-child {
    background: linear-gradient(145deg, #fff8d6 0%, #ffe9a0 100%);
}

html[data-theme="neo"] .lr-place {
    color: var(--neo-text);
}

html[data-theme="neo"] .lr-amount {
    color: var(--neo-success);
}

/* ---------- Призы ---------- */
html[data-theme="neo"] .prize-card-short,
html[data-theme="neo"] .prize-req-label,
html[data-theme="neo"] .prize-modal-hint,
html[data-theme="neo"] .prize-modal-desc {
    color: var(--neo-muted);
}

html[data-theme="neo"] .prize-card-media {
    border-radius: var(--neo-r-md);
    background: var(--neo-inset);
}

html[data-theme="neo"] .prize-badge {
    background: var(--neo-success);
    color: #fff;
}

html[data-theme="neo"] .prize-card-action.is-disabled,
html[data-theme="neo"] .prize-modal-actions .btn[disabled] {
    background: #dcdff6;
    color: var(--neo-muted);
    box-shadow: var(--neo-shadow-in);
}

html[data-theme="neo"] .prize-card-action.is-open {
    background: linear-gradient(180deg, #ffffff 0%, #eceeff 100%);
    color: var(--neo-accent-dark);
    border: 0;
}

html[data-theme="neo"] .prize-card.is-claimed {
    background: #e9ebfa;
}

html[data-theme="neo"] #emptyState h2,
html[data-theme="neo"] #emptyState p {
    color: var(--neo-text) !important;
}

html[data-theme="neo"] .ads-empty h2,
html[data-theme="neo"] .ads-empty p {
    color: var(--neo-text);
}

/* ---------- Реклама ---------- */
html[data-theme="neo"] .ads-stat {
    border-radius: var(--neo-r-md);
    background: linear-gradient(145deg, #6a5ff0 0%, #4b43c9 100%);
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .25);
}

html[data-theme="neo"] .ads-stat:nth-child(2) {
    background: linear-gradient(145deg, #7c4dff 0%, #5a2fc9 100%);
}

html[data-theme="neo"] .ads-stat:nth-child(3) {
    background: linear-gradient(145deg, #2f5fd0 0%, #2349a8 100%);
}

html[data-theme="neo"] .ads-stat:nth-child(4) {
    background: linear-gradient(145deg, #1b7f55 0%, #176b47 100%);
}

html[data-theme="neo"] .ads-stat-label {
    opacity: 1;
}

html[data-theme="neo"] .ad-card-reward {
    background: linear-gradient(180deg, #1b7f55 0%, #176b47 100%);
}

html[data-theme="neo"] .ad-frame-wrap {
    border: 0;
    border-radius: var(--neo-r-lg);
    background: var(--neo-inset);
    box-shadow: var(--neo-shadow-in);
}

html[data-theme="neo"] .ad-card .btn:disabled,
html[data-theme="neo"] .ad-actions .btn:disabled {
    background: #dcdff6;
    color: var(--neo-muted);
}

/* ---------- Рефералы ---------- */
html[data-theme="neo"] .referral-stat-box {
    border-radius: var(--neo-r-lg);
}

html[data-theme="neo"] .referral-stat-box.is-purple {
    background: linear-gradient(145deg, #6a5ff0 0%, #4b43c9 100%);
    box-shadow: var(--neo-glow), inset 0 2px 0 rgba(255, 255, 255, .25);
}

html[data-theme="neo"] .referral-stat-box.is-green {
    background: linear-gradient(145deg, #1b7f55 0%, #176b47 100%);
    box-shadow: 0 8px 18px rgba(23, 107, 71, .38), inset 0 2px 0 rgba(255, 255, 255, .25);
}

html[data-theme="neo"] .referral-stat-caption {
    opacity: 1;
}

html[data-theme="neo"] .referral-actions .btn {
    min-height: 48px;
}

@media (max-width: 600px) {
    html[data-theme="neo"] .referral-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 11px 10px;
        font-size: 14px;
    }
}

/* ---------- Поддержка ---------- */
html[data-theme="neo"] .support-ticket {
    border: 0;
    border-radius: var(--neo-r-lg);
    background: linear-gradient(145deg, #ffffff 0%, var(--neo-inset) 100%);
    box-shadow: var(--neo-shadow-xs);
    color: var(--neo-text);
}

html[data-theme="neo"] .support-ticket:hover {
    background: linear-gradient(145deg, #ffffff 0%, var(--neo-accent-pale) 100%);
}

html[data-theme="neo"] .support-ticket-number {
    color: var(--neo-accent-dark);
}

html[data-theme="neo"] .support-msg {
    border-radius: var(--neo-r-md);
}

html[data-theme="neo"] .support-msg.is-user {
    background: var(--neo-accent-pale);
    border-bottom-right-radius: 6px;
}

html[data-theme="neo"] .support-msg.is-admin {
    background: var(--neo-inset);
    border-bottom-left-radius: 6px;
}

html[data-theme="neo"] .support-msg-author {
    color: var(--neo-text);
}

html[data-theme="neo"] .support-closed-note {
    border-radius: var(--neo-r-md);
    background: var(--neo-inset);
    color: var(--neo-text);
}

/* Кнопка «Выполнить» в строке задания: компактная, чтобы название задания не сжималось */
html[data-theme="neo"] .task-row-btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 18px;
    font-size: 14px;
}

/* ---------- Мобильные подгонки ---------- */
@media (max-width: 768px) {
    html[data-theme="neo"] .header-container {
        gap: 8px;
    }

    html[data-theme="neo"] .logo-icon {
        width: 34px;
        height: 34px;
    }

    html[data-theme="neo"] .logo-text {
        font-size: 16px;
    }

    html[data-theme="neo"] .welcome-header-actions .btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    html[data-theme="neo"] .leaders-row {
        grid-template-columns: 40px 36px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 12px 12px;
    }

    html[data-theme="neo"] .leaders-rank {
        width: 36px;
        height: 36px;
    }

    html[data-theme="neo"] .neo-avatar-sm {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    html[data-theme="neo"] .leaders-tab {
        min-height: 44px;
    }

    html[data-theme="neo"] .form-box {
        border-radius: var(--neo-r-xl);
    }

    html[data-theme="neo"] .tasks-tabs {
        padding: 6px;
    }

    html[data-theme="neo"] .info-card,
    html[data-theme="neo"] .profile-header {
        padding: 22px 18px;
    }
}

@media (max-width: 480px) {
    html[data-theme="neo"] .logo-icon {
        width: 30px;
        height: 30px;
    }

    html[data-theme="neo"] .leaders-row {
        grid-template-columns: 34px 34px minmax(0, 1fr) auto;
        gap: 6px;
        padding: 10px 10px;
    }

    html[data-theme="neo"] .leaders-rank {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    html[data-theme="neo"] .leaders-row.rank-1 .leaders-rank,
    html[data-theme="neo"] .leaders-row.rank-2 .leaders-rank,
    html[data-theme="neo"] .leaders-row.rank-3 .leaders-rank {
        font-size: 20px;
    }

    html[data-theme="neo"] .neo-avatar-sm {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    html[data-theme="neo"] .info-card,
    html[data-theme="neo"] .profile-header {
        padding: 20px 16px;
    }

    html[data-theme="neo"] .lp-hero {
        width: calc(100% - 20px);
        border-radius: 28px;
    }

    html[data-theme="neo"] .tab-btn {
        font-size: 12px;
    }
}

/* ---------- Новости ---------- */
html[data-theme="neo"] .news-page h1,
html[data-theme="neo"] .news-card h2,
html[data-theme="neo"] .news-body h2,
html[data-theme="neo"] .news-body h3,
html[data-theme="neo"] .news-more h2 {
    color: var(--neo-text);
}
html[data-theme="neo"] .news-card {
    background: var(--neo-surface);
    border: 0;
    border-radius: var(--neo-r-md);
    box-shadow: var(--neo-shadow-sm);
    color: var(--neo-text);
}
html[data-theme="neo"] .news-card a,
html[data-theme="neo"] .news-body a,
html[data-theme="neo"] .news-back,
html[data-theme="neo"] .news-more a {
    color: var(--neo-accent-dark);
}
html[data-theme="neo"] .news-meta,
html[data-theme="neo"] .news-more time,
html[data-theme="neo"] .news-empty {
    color: var(--neo-muted);
}
html[data-theme="neo"] .news-body {
    color: var(--neo-text);
}
html[data-theme="neo"] .news-body blockquote {
    background: var(--neo-inset);
    border-left-color: var(--neo-accent);
}
html[data-theme="neo"] .news-more {
    border-top-color: var(--neo-inset);
}
html[data-theme="neo"] .news-pager a {
    background: var(--neo-surface);
    border: 0;
    border-radius: 999px;
    box-shadow: var(--neo-shadow-sm);
    color: var(--neo-accent-dark);
}
html[data-theme="neo"] .news-pager .is-current {
    background: var(--neo-inset);
    border: 0;
    border-radius: 999px;
    box-shadow: var(--neo-shadow-in);
    color: var(--neo-text);
    font-weight: 700;
}
html[data-theme="neo"] .news-page a:focus-visible,
html[data-theme="neo"] .news-pager a:focus-visible {
    outline: none;
    box-shadow: var(--neo-focus);
}
/* ---------- Движение ---------- */
@media (prefers-reduced-motion: reduce) {
    html[data-theme="neo"] *,
    html[data-theme="neo"] *::before,
    html[data-theme="neo"] *::after {
        animation: none !important;
        transition: none !important;
    }

    html[data-theme="neo"] .btn:active,
    html[data-theme="neo"] .submit-report-btn:active,
    html[data-theme="neo"] .copy-referral-btn:active,
    html[data-theme="neo"] .task-row-btn:active,
    html[data-theme="neo"] .btn:hover {
        transform: none;
    }
}
