/*
 * Тёмная тема Astrolog4You. Подключается после main-total.css (ThemeDarkAsset).
 * Инвариант: каждое правило начинается с html[data-theme="dark"] или .theme-toggle
 * (проверяет tests/unit/assets/ThemeDarkCssInvariantTest). Без prefers-color-scheme и @keyframes.
 * Цвета берутся из токенов --t-*; таблица токенов: docs/superpowers/specs/2026-10-25-dark-theme/designer-report.md (раздел 2).
 */

/* == Кнопка переключателя: обе темы == */
.theme-toggle {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.theme-toggle:focus-visible {
    outline: 2px solid #3a87ad;
    outline-offset: 2px;
}
.theme-toggle img {
    display: block;
    margin: 0 auto;
    width: 24px;
    height: 24px;
    transition: transform 150ms ease;
}
.theme-toggle:active img {
    transform: scale(0.88);
}
@media (prefers-reduced-motion: reduce) {
    .theme-toggle img {
        transition: none;
    }
}
.theme-toggle--mobile-header {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    z-index: 2;
}
.theme-toggle--navbar {
    display: block;
    height: 50px;
    padding: 0 15px;
}
@media (max-width: 767px) {
    .theme-toggle--navbar {
        height: auto;
        padding: 10px 15px;
    }
}

/* == Токены тёмной темы == */
html[data-theme="dark"] {
    --t-bg: #0f0a07;
    --t-surface: #18120f;
    --t-surface-2: #221b17;
    --t-table-head: #3a322e;
    --t-border: #342c27;
    --t-text: #d8d3cf;
    --t-text-2: #b3ada8;
    --t-muted: #928a85;
    --t-link: #d9a573;
    --t-accent: #e0875f;
    --t-btn-danger-bg: #ae3f2c;
    --t-btn-danger-bg-hover: #c34a35;
    --t-btn-danger-text: #fff;
    --t-btn-default-bg: #221b17;
    --t-btn-default-text: #b3ada8;
    --t-ok: #7fc08c;
    --t-ok-bg: #152318;
    --t-ok-border: #25402b;
    --t-info: #88c0dc;
    --t-info-bg: #122229;
    --t-info-border: #213f4c;
    --t-warn: #d8ba79;
    --t-warn-bg: #282110;
    --t-warn-border: #4a3d1c;
    --t-err: #f2a7a6;
    --t-err-bg: #32191a;
    --t-err-border: #5a2b2c;
    /* яркая ошибка формы: заметна на тёмной карточке (PdfModal) */
    --t-err-strong: #ff6b63;
    --t-brand-plate: #361b34;
    --t-brand-gold: #F3B629;
    /* светлая кремовая кнопка: отражение почти чёрной кнопки светлой темы (PdfModal) */
    --t-cta-cream: #e8e1d8;
    --t-cta-cream-hover: #f4efe9;
    --t-cta-cream-text: #18120f;
    --t-footer-bg: #0a0705;
    --t-scrim: rgba(0, 0, 0, .6);
    --t-shadow: rgba(0, 0, 0, .45);
    --t-wheel-card: #e3ddd7;
    --t-promo-bg: #ece5db;
    --t-promo-edge: #d39b2a;
    --t-promo-text: #3a2c18;
    --t-promo-accent: #9a5a00;
    --t-promo-strike: #8a7f72;
    --t-on-accent: #fff;
    --t-input-border: #786f69;
    --t-placeholder: #8d857f;
    --t-input-disabled-bg: #1a1411;
    --t-ok-solid: #2f7d46;
    --t-brand-ya: #FC3F1D;
    --t-brand-vk: #4d94ff;
    --t-brand-tg: #2AABEE;
    --t-btn-primary-bg: #4f7396;
    --t-btn-primary-bg-hover: #44678c;
    --t-btn-cta-bg: #8044ee;
    --t-btn-cta-bg-hover: #8346f0;
    --t-house-olive: #9a9a5c;
    --t-house-grey: #9a9a9a;
    --t-house-blue: #5b84d6;
    --t-label-text: #1a1210;
    --t-label-default: #b8b0a9;
    --t-label-primary: #6ea8e6;
    --t-label-success: #58c27a;
    --t-label-info: #5ec4e8;
    --t-label-warning: #f0b84a;
    --t-label-danger: #f2706b;
    --t-label-grey: #bdbdbd;
    --t-label-black: #9a948f;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

/* == Task 5: база, шапка, меню, подвал == */
html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: var(--t-bg);
    color: var(--t-text);
}
html[data-theme="dark"] .slideout-panel,
html[data-theme="dark"] #main.panel,
html[data-theme="dark"] main.panel {
    background-color: var(--t-bg);
}
html[data-theme="dark"] a {
    color: var(--t-link);
}
html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus {
    color: var(--t-accent);
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .h1,
html[data-theme="dark"] .h2,
html[data-theme="dark"] .h3,
html[data-theme="dark"] .h4,
html[data-theme="dark"] .h5,
html[data-theme="dark"] .h6 {
    color: var(--t-text);
}
html[data-theme="dark"] hr {
    border-top-color: var(--t-border);
}
html[data-theme="dark"] .text-muted {
    color: var(--t-muted);
}
html[data-theme="dark"] .clr_red {
    color: var(--t-accent) !important;
}
html[data-theme="dark"] blockquote,
html[data-theme="dark"] .blockquote {
    border-left-color: var(--t-border);
    color: var(--t-text-2);
}
html[data-theme="dark"] blockquote small,
html[data-theme="dark"] blockquote footer {
    color: var(--t-muted);
}
html[data-theme="dark"] .well {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    color: var(--t-text);
    box-shadow: none;
}
html[data-theme="dark"] .close {
    color: var(--t-text);
    text-shadow: none;
    opacity: .6;
}
html[data-theme="dark"] .close:hover,
html[data-theme="dark"] .close:focus {
    color: var(--t-text);
    opacity: .9;
}

/* панели */
html[data-theme="dark"] .panel {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    box-shadow: none;
}
html[data-theme="dark"] #main.panel,
html[data-theme="dark"] main.panel {
    border-color: transparent;
}
html[data-theme="dark"] .panel-default > .panel-heading,
html[data-theme="dark"] .panel-heading {
    background-color: var(--t-surface-2);
    border-color: var(--t-border);
    color: var(--t-text);
}
html[data-theme="dark"] .panel-footer {
    background-color: var(--t-surface-2);
    border-top-color: var(--t-border);
}
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .panel-title > a {
    color: var(--t-text);
}
html[data-theme="dark"] .panel > .list-group .list-group-item,
html[data-theme="dark"] .panel > .table,
html[data-theme="dark"] .panel > .panel-collapse > .table {
    border-color: var(--t-border);
}

/* таблицы */
html[data-theme="dark"] .table > thead > tr > th,
html[data-theme="dark"] .table > thead > tr > td,
html[data-theme="dark"] .table > tbody > tr > th,
html[data-theme="dark"] .table > tbody > tr > td,
html[data-theme="dark"] .table > tfoot > tr > th,
html[data-theme="dark"] .table > tfoot > tr > td {
    border-top-color: var(--t-border);
}
html[data-theme="dark"] .table > thead > tr > th {
    border-bottom-color: var(--t-border);
    color: var(--t-text);
}
html[data-theme="dark"] .table-bordered,
html[data-theme="dark"] .table-bordered > thead > tr > th,
html[data-theme="dark"] .table-bordered > thead > tr > td,
html[data-theme="dark"] .table-bordered > tbody > tr > th,
html[data-theme="dark"] .table-bordered > tbody > tr > td,
html[data-theme="dark"] .table-bordered > tfoot > tr > th,
html[data-theme="dark"] .table-bordered > tfoot > tr > td {
    border-color: var(--t-border);
}
html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .table-hover > tbody > tr:hover,
html[data-theme="dark"] .table > tbody > tr.active > td,
html[data-theme="dark"] .table > tbody > tr > td.active {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .table-hover > tbody > tr:hover > td {
    background-color: var(--t-surface-2);
}

/* метки: светлые насыщенные плашки с тёмным текстом (контраст не ниже 6:1) */
html[data-theme="dark"] .label {
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-default {
    background-color: var(--t-label-default);
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-primary {
    background-color: var(--t-label-primary);
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-success {
    background-color: var(--t-label-success);
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-info {
    background-color: var(--t-label-info) !important;
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-warning {
    background-color: var(--t-label-warning);
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-danger {
    background-color: var(--t-label-danger);
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-grey {
    background-color: var(--t-label-grey) !important;
    color: var(--t-label-text);
}
html[data-theme="dark"] .label-black {
    background-color: var(--t-label-black);
    color: var(--t-label-text);
}
html[data-theme="dark"] a.label:hover,
html[data-theme="dark"] a.label:focus {
    color: var(--t-label-text);
}

/* вкладки, пилюли */
html[data-theme="dark"] .nav-tabs {
    border-bottom-color: var(--t-border);
}
html[data-theme="dark"] .nav-tabs > li > a {
    color: var(--t-text-2);
    background-color: transparent;
}
html[data-theme="dark"] .nav-tabs > li > a:hover,
html[data-theme="dark"] .nav-tabs > li > a:focus {
    background-color: var(--t-surface-2);
    border-color: var(--t-border);
    color: var(--t-text);
}
html[data-theme="dark"] .nav-tabs > li.active > a,
html[data-theme="dark"] .nav-tabs > li.active > a:hover,
html[data-theme="dark"] .nav-tabs > li.active > a:focus {
    background-color: var(--t-bg);
    border-color: var(--t-border);
    border-bottom: 1px solid var(--t-bg) !important;
    color: var(--t-text);
}
html[data-theme="dark"] .nav-pills > li > a {
    color: var(--t-text-2);
}
html[data-theme="dark"] .nav-pills > li > a:hover,
html[data-theme="dark"] .nav-pills > li > a:focus {
    background-color: var(--t-surface-2);
    color: var(--t-text);
}
html[data-theme="dark"] .nav-pills > li.active > a,
html[data-theme="dark"] .nav-pills > li.active > a:hover,
html[data-theme="dark"] .nav-pills > li.active > a:focus {
    background-color: var(--t-btn-danger-bg) !important;
    color: var(--t-btn-danger-text) !important;
}
html[data-theme="dark"] .nav > li > a:hover,
html[data-theme="dark"] .nav > li > a:focus {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .tab-content {
    color: var(--t-text);
}

/* пагинация, хлебные крошки */
html[data-theme="dark"] .pagination > li > a,
html[data-theme="dark"] .pagination > li > span {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    color: var(--t-link);
}
html[data-theme="dark"] .pagination > li > a:hover,
html[data-theme="dark"] .pagination > li > span:hover,
html[data-theme="dark"] .pagination > li > a:focus {
    background-color: var(--t-surface-2);
    border-color: var(--t-border);
    color: var(--t-accent);
}
html[data-theme="dark"] .pagination > .active > a,
html[data-theme="dark"] .pagination > .active > span,
html[data-theme="dark"] .pagination > .active > a:hover,
html[data-theme="dark"] .pagination > .active > span:hover {
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
    color: var(--t-btn-danger-text);
}
html[data-theme="dark"] .pagination > .disabled > a,
html[data-theme="dark"] .pagination > .disabled > span,
html[data-theme="dark"] .pagination > .disabled > a:hover {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    color: var(--t-muted);
}
html[data-theme="dark"] .breadcrumb {
    background-color: transparent;
}
html[data-theme="dark"] .breadcrumb > li + li:before,
html[data-theme="dark"] .breadcrumb > .active {
    color: var(--t-muted);
}
html[data-theme="dark"] .content-header > .breadcrumb > li > a {
    color: var(--t-text-2);
}

/* list-group, dropdown, popover */
html[data-theme="dark"] .list-group-item {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    color: var(--t-text);
}
html[data-theme="dark"] a.list-group-item,
html[data-theme="dark"] button.list-group-item {
    color: var(--t-text-2);
}
html[data-theme="dark"] a.list-group-item:hover,
html[data-theme="dark"] a.list-group-item:focus,
html[data-theme="dark"] button.list-group-item:hover {
    background-color: var(--t-surface-2);
    color: var(--t-text);
}
html[data-theme="dark"] .list-group-item.active,
html[data-theme="dark"] .list-group-item.active:hover,
html[data-theme="dark"] .list-group-item.active:focus {
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
    color: var(--t-btn-danger-text);
}
html[data-theme="dark"] .dropdown-menu {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    box-shadow: 0 6px 12px var(--t-shadow);
}
html[data-theme="dark"] .dropdown-menu > li > a {
    color: var(--t-text);
}
html[data-theme="dark"] .dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:focus,
html[data-theme="dark"] .dropdown-menu > .active > a,
html[data-theme="dark"] .dropdown-menu > .active > a:hover {
    background-color: var(--t-surface-2);
    color: var(--t-link);
}
html[data-theme="dark"] .dropdown-menu .divider {
    background-color: var(--t-border);
}
html[data-theme="dark"] .dropdown-header {
    color: var(--t-muted);
}
html[data-theme="dark"] .popover {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    color: var(--t-text);
    box-shadow: 0 5px 10px var(--t-shadow);
}
html[data-theme="dark"] .popover-title {
    background-color: var(--t-surface-2);
    border-bottom-color: var(--t-border);
    color: var(--t-text);
}
html[data-theme="dark"] .popover.top > .arrow,
html[data-theme="dark"] .popover.top > .arrow:after {
    border-top-color: var(--t-surface);
}
html[data-theme="dark"] .popover.bottom > .arrow,
html[data-theme="dark"] .popover.bottom > .arrow:after {
    border-bottom-color: var(--t-surface);
}
html[data-theme="dark"] .popover.left > .arrow:after {
    border-left-color: var(--t-surface);
}
html[data-theme="dark"] .popover.right > .arrow:after {
    border-right-color: var(--t-surface);
}

/* алерты */
html[data-theme="dark"] .alert-success {
    background-color: var(--t-ok-bg);
    border-color: var(--t-ok-border);
    color: var(--t-ok);
}
html[data-theme="dark"] .alert-info {
    background-color: var(--t-info-bg);
    border-color: var(--t-info-border);
    color: var(--t-info);
}
html[data-theme="dark"] .alert-warning {
    background-color: var(--t-warn-bg);
    border-color: var(--t-warn-border);
    color: var(--t-warn);
}
html[data-theme="dark"] .alert-danger {
    background-color: var(--t-err-bg);
    border-color: var(--t-err-border);
    color: var(--t-err);
}
html[data-theme="dark"] .alert-success .alert-link { color: var(--t-ok); }
html[data-theme="dark"] .alert-info .alert-link { color: var(--t-info); }
html[data-theme="dark"] .alert-warning .alert-link { color: var(--t-warn); }
html[data-theme="dark"] .alert-danger .alert-link { color: var(--t-err); }
html[data-theme="dark"] .alert a:not(.btn) {
    text-decoration: underline;
}
html[data-theme="dark"] .alert-primary {
    background-color: var(--t-brand-plate);
    border-color: var(--t-brand-plate);
    color: var(--t-brand-gold);
}
html[data-theme="dark"] .alert-default,
html[data-theme="dark"] .alert-lightgrey,
html[data-theme="dark"] .alert-lightinfo {
    background-color: var(--t-surface-2);
    border-color: var(--t-border);
    color: var(--t-text);
    box-shadow: none;
}
html[data-theme="dark"] .alert .close {
    color: inherit;
}
/* Баннер акции в шапке: светлый крем с золотой кромкой, чтобы выделялся на тёмной подложке (макет docs/design/2026-10-29-dark-promo-banner.html, вариант C) */
html[data-theme="dark"] .header-msg.alert-warning {
    background-color: var(--t-promo-bg);
    border-color: var(--t-promo-bg);
    border-left: 5px solid var(--t-promo-edge);
    color: var(--t-promo-text);
    box-shadow: 0 2px 10px var(--t-shadow);
}
html[data-theme="dark"] .header-msg.alert-warning strong {
    color: var(--t-promo-accent);
}
html[data-theme="dark"] .header-msg.alert-warning .alert-link {
    color: var(--t-cta-cream-text);
}
html[data-theme="dark"] .header-msg.alert-warning s {
    color: var(--t-promo-strike);
}
html[data-theme="dark"] .header-msg.alert-warning .close {
    color: var(--t-promo-text);
}
/* Плашка «Подтвердите почту» (AlertEmailConfirm): в светлой теме белая с зелёным, здесь тот же светлый крем, что у баннера акции, с зелёной кромкой */
html[data-theme="dark"] .alert-secondary {
    background-color: var(--t-promo-bg);
    border-color: var(--t-promo-bg);
    border-left: 5px solid var(--t-ok-solid);
    color: var(--t-promo-text);
    box-shadow: 0 2px 10px var(--t-shadow);
}
html[data-theme="dark"] .alert-secondary strong,
html[data-theme="dark"] .alert-secondary a:not(.btn),
html[data-theme="dark"] .alert-secondary .btn-link {
    color: var(--t-ok-solid);
}
html[data-theme="dark"] .alert-secondary .close {
    color: var(--t-promo-text);
}
html[data-theme="dark"] .alert-secondary .btn-default {
    background-color: var(--t-cta-cream-text);
    border-color: var(--t-cta-cream-text);
    color: var(--t-cta-cream);
}
html[data-theme="dark"] .alert-secondary .btn-default:hover,
html[data-theme="dark"] .alert-secondary .btn-default:focus {
    background-color: var(--t-surface-2);
    border-color: var(--t-surface-2);
    color: var(--t-on-accent);
}

/* шапка десктопа */
html[data-theme="dark"] header {
    background-color: var(--t-surface);
}
html[data-theme="dark"] .navbar-default .navbar-nav > li > a,
html[data-theme="dark"] .navbar-nav li a {
    color: var(--t-text-2);
}
html[data-theme="dark"] .navbar-default .navbar-nav > li > a:hover,
html[data-theme="dark"] .navbar-default .navbar-nav > li > a:focus,
html[data-theme="dark"] .navbar-default .navbar-nav > .open > a,
html[data-theme="dark"] .navbar-default .navbar-nav > .active > a {
    color: var(--t-link);
    background-color: transparent;
}
html[data-theme="dark"] .navbar-default .navbar-toggle {
    border-color: var(--t-border);
}
html[data-theme="dark"] .navbar-default .navbar-toggle:hover,
html[data-theme="dark"] .navbar-default .navbar-toggle:focus {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .navbar-default .navbar-toggle .icon-bar {
    background-color: var(--t-text-2) !important;
}
html[data-theme="dark"] .navbar-default .navbar-collapse {
    border-color: var(--t-border);
}

/* мобильная шапка и боковое меню */
html[data-theme="dark"] .fixed-header {
    background-color: var(--t-surface);
    border-bottom: 1px solid var(--t-border);
    box-sizing: border-box;
}
html[data-theme="dark"] .btn-hamburger,
html[data-theme="dark"] .js-slideout-toggle {
    color: var(--t-text-2);
}
html[data-theme="dark"] .fixed-header {
    top: 0;
    left: 0;
}
html[data-theme="dark"] .menu {
    background-color: var(--t-surface);
    background-image: none;
    border-right: 1px solid var(--t-border);
}
html[data-theme="dark"] .menu a {
    color: var(--t-text);
}
html[data-theme="dark"] .menu a.clr_red {
    color: var(--t-accent) !important;
}
html[data-theme="dark"] .menu a.btn-danger {
    color: var(--t-btn-danger-text);
}
html[data-theme="dark"] .menu-section-title {
    color: var(--t-muted);
}
html[data-theme="dark"] .menu-section-username {
    color: var(--t-text);
}
html[data-theme="dark"] .menu-section-list a:hover {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .menu hr {
    border-top-color: var(--t-border);
}

/* нижний таб-бар */
html[data-theme="dark"] .bottom-tab-bar {
    background: var(--t-surface);
    border-top: 1px solid var(--t-border);
    box-shadow: 0 -1px 6px var(--t-shadow);
}
html[data-theme="dark"] .bottom-tab-item,
html[data-theme="dark"] .bottom-tab-item:hover,
html[data-theme="dark"] .bottom-tab-item:focus {
    color: var(--t-muted);
}
html[data-theme="dark"] .bottom-tab-icon svg {
    stroke: var(--t-muted);
}
html[data-theme="dark"] .bottom-tab-item.active {
    color: var(--t-accent);
}
html[data-theme="dark"] .bottom-tab-item.active .bottom-tab-icon svg {
    stroke: var(--t-accent);
}
html[data-theme="dark"] .bottom-sheet-overlay {
    background: var(--t-scrim);
}
html[data-theme="dark"] .bottom-sheet {
    background: var(--t-surface);
    border-top: 1px solid var(--t-border);
}
html[data-theme="dark"] .bottom-sheet-handle {
    background: var(--t-border);
}
html[data-theme="dark"] .bottom-sheet-item,
html[data-theme="dark"] .bottom-sheet-item:hover,
html[data-theme="dark"] .bottom-sheet-item:focus {
    color: var(--t-text);
}
html[data-theme="dark"] .bottom-sheet-item:hover,
html[data-theme="dark"] .bottom-sheet-item:focus {
    background: var(--t-surface-2);
}
html[data-theme="dark"] .bottom-sheet-item.active {
    color: var(--t-accent);
}

/* подвал */
html[data-theme="dark"] #f {
    background: var(--t-footer-bg);
    color: var(--t-text-2);
    border-top: 1px solid var(--t-border);
}
html[data-theme="dark"] #f a {
    color: var(--t-text) !important;
}
html[data-theme="dark"] #f h5 {
    color: var(--t-text);
}

/* cookie-баннер (стили инлайновые, поэтому !important) */
html[data-theme="dark"] #cookie-consent-banner {
    background: var(--t-surface) !important;
    border-color: var(--t-border) !important;
    box-shadow: 0 12px 32px var(--t-shadow) !important;
}
html[data-theme="dark"] #cookie-consent-banner > div {
    color: var(--t-text) !important;
}
html[data-theme="dark"] #cookie-consent-banner a {
    color: var(--t-link) !important;
}
html[data-theme="dark"] #cookie-consent-banner .ccb-close {
    color: var(--t-muted) !important;
}

/* аватар по умолчанию - тёмный глиф: светлая подложка */
html[data-theme="dark"] .box_main_avatar img {
    background-color: var(--t-wheel-card);
    border-radius: 50%;
}

/* fix round 1: залипающая шапка, пункт-переключатель в меню, clr_red, table td.info */
html[data-theme="dark"] header #header-menu,
html[data-theme="dark"] header #header-menu.smaller {
    background: var(--t-surface);
    border-bottom: 1px solid var(--t-border);
}
html[data-theme="dark"] .navbar-nav li a.clr_red {
    color: var(--t-accent) !important;
}
html[data-theme="dark"] .table > thead > tr > td.info {
    background-color: var(--t-info-bg) !important;
}

/* fix round 2: !important из светлых правил и контекстные состояния таблиц */
html[data-theme="dark"] .table.bb__fff td {
    border-bottom: 1px solid var(--t-border) !important;
}
html[data-theme="dark"] .box_avatar_link.open ul li.active.not_clicked > span {
    background-color: var(--t-surface-2) !important;
    color: var(--t-text) !important;
}
html[data-theme="dark"] .table > thead > tr > td.info,
html[data-theme="dark"] .table > tbody > tr > td.info,
html[data-theme="dark"] .table > tfoot > tr > td.info,
html[data-theme="dark"] .table > thead > tr > th.info,
html[data-theme="dark"] .table > tbody > tr > th.info,
html[data-theme="dark"] .table > tfoot > tr > th.info,
html[data-theme="dark"] .table > thead > tr.info > td,
html[data-theme="dark"] .table > tbody > tr.info > td,
html[data-theme="dark"] .table > tfoot > tr.info > td,
html[data-theme="dark"] .table > thead > tr.info > th,
html[data-theme="dark"] .table > tbody > tr.info > th,
html[data-theme="dark"] .table > tfoot > tr.info > th,
html[data-theme="dark"] .table-hover > tbody > tr > td.info:hover,
html[data-theme="dark"] .table-hover > tbody > tr > th.info:hover,
html[data-theme="dark"] .table-hover > tbody > tr.info:hover > td,
html[data-theme="dark"] .table-hover > tbody > tr:hover > .info,
html[data-theme="dark"] .table-hover > tbody > tr.info:hover > th {
    background-color: var(--t-info-bg);
}
html[data-theme="dark"] .table > thead > tr > td.warning,
html[data-theme="dark"] .table > tbody > tr > td.warning,
html[data-theme="dark"] .table > tfoot > tr > td.warning,
html[data-theme="dark"] .table > thead > tr > th.warning,
html[data-theme="dark"] .table > tbody > tr > th.warning,
html[data-theme="dark"] .table > tfoot > tr > th.warning,
html[data-theme="dark"] .table > thead > tr.warning > td,
html[data-theme="dark"] .table > tbody > tr.warning > td,
html[data-theme="dark"] .table > tfoot > tr.warning > td,
html[data-theme="dark"] .table > thead > tr.warning > th,
html[data-theme="dark"] .table > tbody > tr.warning > th,
html[data-theme="dark"] .table > tfoot > tr.warning > th,
html[data-theme="dark"] .table-hover > tbody > tr > td.warning:hover,
html[data-theme="dark"] .table-hover > tbody > tr > th.warning:hover,
html[data-theme="dark"] .table-hover > tbody > tr.warning:hover > td,
html[data-theme="dark"] .table-hover > tbody > tr:hover > .warning,
html[data-theme="dark"] .table-hover > tbody > tr.warning:hover > th {
    background-color: var(--t-warn-bg);
}
html[data-theme="dark"] .table > thead > tr > td.danger,
html[data-theme="dark"] .table > tbody > tr > td.danger,
html[data-theme="dark"] .table > tfoot > tr > td.danger,
html[data-theme="dark"] .table > thead > tr > th.danger,
html[data-theme="dark"] .table > tbody > tr > th.danger,
html[data-theme="dark"] .table > tfoot > tr > th.danger,
html[data-theme="dark"] .table > thead > tr.danger > td,
html[data-theme="dark"] .table > tbody > tr.danger > td,
html[data-theme="dark"] .table > tfoot > tr.danger > td,
html[data-theme="dark"] .table > thead > tr.danger > th,
html[data-theme="dark"] .table > tbody > tr.danger > th,
html[data-theme="dark"] .table > tfoot > tr.danger > th,
html[data-theme="dark"] .table-hover > tbody > tr > td.danger:hover,
html[data-theme="dark"] .table-hover > tbody > tr > th.danger:hover,
html[data-theme="dark"] .table-hover > tbody > tr.danger:hover > td,
html[data-theme="dark"] .table-hover > tbody > tr:hover > .danger,
html[data-theme="dark"] .table-hover > tbody > tr.danger:hover > th {
    background-color: var(--t-err-bg);
}
html[data-theme="dark"] .table > thead > tr > td.success,
html[data-theme="dark"] .table > tbody > tr > td.success,
html[data-theme="dark"] .table > tfoot > tr > td.success,
html[data-theme="dark"] .table > thead > tr > th.success,
html[data-theme="dark"] .table > tbody > tr > th.success,
html[data-theme="dark"] .table > tfoot > tr > th.success,
html[data-theme="dark"] .table > thead > tr.success > td,
html[data-theme="dark"] .table > tbody > tr.success > td,
html[data-theme="dark"] .table > tfoot > tr.success > td,
html[data-theme="dark"] .table > thead > tr.success > th,
html[data-theme="dark"] .table > tbody > tr.success > th,
html[data-theme="dark"] .table > tfoot > tr.success > th,
html[data-theme="dark"] .table-hover > tbody > tr > td.success:hover,
html[data-theme="dark"] .table-hover > tbody > tr > th.success:hover,
html[data-theme="dark"] .table-hover > tbody > tr.success:hover > td,
html[data-theme="dark"] .table-hover > tbody > tr:hover > .success,
html[data-theme="dark"] .table-hover > tbody > tr.success:hover > th {
    background-color: var(--t-ok-bg);
}

/* == Task 6: формы, кнопки, модалки, вход и оплата == */
/* Статический аудит: светлые правила из bootstrap.min.css, main-total.css, datepicker3.css, custom.autocomplete.css, awesome-bootstrap-checkbox, astro-modal.css, pdf-modal.css, slide-modal.css, pricing_table.css, pricing-table.v2.css; у каждого тёмного правила специфичность не ниже светлого, !important там, где он есть в светлом. */
/* -- Поля ввода -- */
html[data-theme="dark"] :where(input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="search"], input[type="url"], input[type="date"], input[type="time"], textarea, select) {
    background-color: var(--t-surface-2);
    color: var(--t-text);
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .form-control {
    color: var(--t-text);
    background-color: var(--t-surface-2);
    border-color: var(--t-input-border);
    box-shadow: none;
}
html[data-theme="dark"] .form-control:focus {
    border-color: var(--t-accent);
    box-shadow: 0 0 0 1px var(--t-accent);
}
html[data-theme="dark"] .form-control::-webkit-input-placeholder {
    color: var(--t-placeholder);
    opacity: 1;
}
html[data-theme="dark"] .form-control::-moz-placeholder {
    color: var(--t-placeholder);
    opacity: 1;
}
html[data-theme="dark"] .form-control::placeholder {
    color: var(--t-placeholder);
    opacity: 1;
}
html[data-theme="dark"] .form-control::-ms-input-placeholder {
    color: var(--t-placeholder);
    opacity: 1;
}
html[data-theme="dark"] .form-control[disabled],
html[data-theme="dark"] .form-control[readonly],
html[data-theme="dark"] fieldset[disabled] .form-control {
    background-color: var(--t-input-disabled-bg);
    color: var(--t-muted);
    opacity: 1;
}
html[data-theme="dark"] .form-control option,
html[data-theme="dark"] .form-control optgroup {
    background-color: var(--t-surface-2);
    color: var(--t-text);
}
html[data-theme="dark"] legend {
    color: var(--t-text);
    border-bottom-color: var(--t-border);
}
html[data-theme="dark"] .input-group-addon,
html[data-theme="dark"] .input-daterange .input-group-addon {
    color: var(--t-text-2);
    background-color: var(--t-border);
    border-color: var(--t-input-border);
    text-shadow: none;
}
html[data-theme="dark"] .help-block {
    color: var(--t-muted) !important;
}
html[data-theme="dark"] #formPageLost .has-error .help-block {
    color: var(--t-err) !important;
}
html[data-theme="dark"] label.error,
html[data-theme="dark"] .text-danger,
html[data-theme="dark"] a.text-danger {
    color: var(--t-err);
}
html[data-theme="dark"] .text-success,
html[data-theme="dark"] a.text-success {
    color: var(--t-ok);
}
html[data-theme="dark"] .text-warning,
html[data-theme="dark"] a.text-warning {
    color: var(--t-warn);
}
html[data-theme="dark"] .text-info,
html[data-theme="dark"] .text-info:hover,
html[data-theme="dark"] a.text-info,
html[data-theme="dark"] a.text-info:hover {
    color: var(--t-info) !important;
}
html[data-theme="dark"] .has-error .help-block,
html[data-theme="dark"] .has-error .control-label,
html[data-theme="dark"] .has-error .radio,
html[data-theme="dark"] .has-error .checkbox,
html[data-theme="dark"] .has-error .radio-inline,
html[data-theme="dark"] .has-error .checkbox-inline,
html[data-theme="dark"] .has-error.radio label,
html[data-theme="dark"] .has-error.checkbox label,
html[data-theme="dark"] .has-error.radio-inline label,
html[data-theme="dark"] .has-error.checkbox-inline label,
html[data-theme="dark"] .has-error .form-control-feedback {
    color: var(--t-err);
}
html[data-theme="dark"] .has-error .form-control,
html[data-theme="dark"] .has-error .form-control:focus {
    border-color: var(--t-err);
    box-shadow: none;
}
html[data-theme="dark"] .has-error .input-group-addon {
    border-color: var(--t-err);
}
html[data-theme="dark"] .has-warning .help-block,
html[data-theme="dark"] .has-warning .control-label,
html[data-theme="dark"] .has-warning .radio,
html[data-theme="dark"] .has-warning .checkbox,
html[data-theme="dark"] .has-warning .radio-inline,
html[data-theme="dark"] .has-warning .checkbox-inline,
html[data-theme="dark"] .has-warning.radio label,
html[data-theme="dark"] .has-warning.checkbox label,
html[data-theme="dark"] .has-warning.radio-inline label,
html[data-theme="dark"] .has-warning.checkbox-inline label,
html[data-theme="dark"] .has-warning .form-control-feedback {
    color: var(--t-warn);
}
html[data-theme="dark"] .has-warning .form-control,
html[data-theme="dark"] .has-warning .form-control:focus {
    border-color: var(--t-warn);
    box-shadow: none;
}
html[data-theme="dark"] .has-warning .input-group-addon {
    border-color: var(--t-warn);
}
html[data-theme="dark"] .has-success .help-block,
html[data-theme="dark"] .has-success .control-label,
html[data-theme="dark"] .has-success .radio,
html[data-theme="dark"] .has-success .checkbox,
html[data-theme="dark"] .has-success .radio-inline,
html[data-theme="dark"] .has-success .checkbox-inline,
html[data-theme="dark"] .has-success.radio label,
html[data-theme="dark"] .has-success.checkbox label,
html[data-theme="dark"] .has-success.radio-inline label,
html[data-theme="dark"] .has-success.checkbox-inline label,
html[data-theme="dark"] .has-success .form-control-feedback {
    color: var(--t-ok);
}
html[data-theme="dark"] .has-success .form-control,
html[data-theme="dark"] .has-success .form-control:focus {
    border-color: var(--t-ok);
    box-shadow: none;
}
html[data-theme="dark"] .has-success .input-group-addon {
    border-color: var(--t-ok);
}
html[data-theme="dark"] .form-group-city-birth::before {
    color: var(--t-accent);
}
html[data-theme="dark"] #comment-form textarea {
    background-color: var(--t-surface-2);
}
/* автозаполнение браузера: заливка поля токеном, текст не белый на жёлтом */
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--t-surface-2) inset !important;
    box-shadow: 0 0 0 1000px var(--t-surface-2) inset !important;
    -webkit-text-fill-color: var(--t-text) !important;
    caret-color: var(--t-text);
}
html[data-theme="dark"] input:autofill,
html[data-theme="dark"] input:autofill:hover,
html[data-theme="dark"] input:autofill:focus {
    box-shadow: 0 0 0 1000px var(--t-surface-2) inset !important;
    -webkit-text-fill-color: var(--t-text) !important;
    caret-color: var(--t-text);
}
/* чекбоксы и радио AwesomeCheckbox (отмеченные цветные варианты .checkbox-primary и т.п. сильнее по специфичности и остаются как есть) */
html[data-theme="dark"] .checkbox label::before {
    border-color: var(--t-input-border);
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .checkbox label::after {
    color: var(--t-text);
}
html[data-theme="dark"] .radio label::before {
    border-color: var(--t-input-border);
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .radio:not([class*="radio-"]) label::after {
    background-color: var(--t-text-2);
}
html[data-theme="dark"] .checkbox input[type="checkbox"]:disabled + label::before,
html[data-theme="dark"] .checkbox input[type="radio"]:disabled + label::before {
    background-color: var(--t-input-disabled-bg);
}
/* переключатель bootstrap-toggle-switch */
html[data-theme="dark"] input:not(:checked) + .slider {
    background-color: var(--t-border);
}
html[data-theme="dark"] input:not(:checked) + .slider::before {
    background-color: var(--t-muted);
}
html[data-theme="dark"] .switch-text {
    color: var(--t-text-2);
}
html[data-theme="dark"] .switch.flat .slider {
    background-color: var(--t-border);
}
/* таблицы: цвет текста ячеек .success/.info/.warning/.danger (main-total.css:2267 даёт #444) */
html[data-theme="dark"] table .success,
html[data-theme="dark"] .table .success,
html[data-theme="dark"] table .warning,
html[data-theme="dark"] .table .warning,
html[data-theme="dark"] table .danger,
html[data-theme="dark"] .table .danger,
html[data-theme="dark"] table .info,
html[data-theme="dark"] .table .info {
    color: var(--t-text);
}
/* -- Кнопки -- */
/* .btn-default: светлое правило main-total.css:351 с !important по фону и цвету */
html[data-theme="dark"] .btn-default {
    background-color: var(--t-btn-default-bg) !important;
    color: var(--t-btn-default-text) !important;
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .btn-default:hover,
html[data-theme="dark"] .btn-default:focus,
html[data-theme="dark"] .btn-default.focus,
html[data-theme="dark"] .btn-default:active,
html[data-theme="dark"] .btn-default.active,
html[data-theme="dark"] .open > .dropdown-toggle.btn-default,
html[data-theme="dark"] .btn-default:active:hover,
html[data-theme="dark"] .btn-default.active:hover,
html[data-theme="dark"] .open > .dropdown-toggle.btn-default:hover,
html[data-theme="dark"] .btn-default:active:focus,
html[data-theme="dark"] .btn-default.active:focus,
html[data-theme="dark"] .open > .dropdown-toggle.btn-default:focus,
html[data-theme="dark"] .btn-default:active.focus,
html[data-theme="dark"] .btn-default.active.focus,
html[data-theme="dark"] .open > .dropdown-toggle.btn-default.focus {
    background-color: var(--t-border) !important;
    color: var(--t-text) !important;
    border-color: var(--t-muted);
}
html[data-theme="dark"] .btn-default.disabled:hover,
html[data-theme="dark"] .btn-default[disabled]:hover,
html[data-theme="dark"] fieldset[disabled] .btn-default:hover,
html[data-theme="dark"] .btn-default.disabled:focus,
html[data-theme="dark"] .btn-default[disabled]:focus,
html[data-theme="dark"] fieldset[disabled] .btn-default:focus,
html[data-theme="dark"] .btn-default.disabled.focus,
html[data-theme="dark"] .btn-default[disabled].focus,
html[data-theme="dark"] fieldset[disabled] .btn-default.focus,
html[data-theme="dark"] .btn-default.disabled,
html[data-theme="dark"] .btn-default[disabled],
html[data-theme="dark"] fieldset[disabled] .btn-default {
    background-color: var(--t-btn-default-bg) !important;
    color: var(--t-btn-default-text) !important;
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .btn-default .badge {
    color: var(--t-btn-default-text);
    background-color: var(--t-surface);
}
/* .btn-pdf-outline: светлое правило main-total.css:363, всё с !important */
html[data-theme="dark"] .btn-pdf-outline {
    background-color: var(--t-surface) !important;
    color: var(--t-accent) !important;
    border: 2px solid var(--t-btn-danger-bg) !important;
}
html[data-theme="dark"] .btn-pdf-outline:hover,
html[data-theme="dark"] .btn-pdf-outline:focus,
html[data-theme="dark"] .btn-pdf-outline:active {
    background-color: var(--t-btn-danger-bg) !important;
    color: var(--t-btn-danger-text) !important;
    border-color: var(--t-btn-danger-bg) !important;
}
/* .btn-danger: токены кнопки; ссылка-кнопка получает белый текст через !important (иначе её перебивает правило цвета ссылок и .navbar-nav li a) */
html[data-theme="dark"] .btn-danger {
    color: var(--t-btn-danger-text);
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
}
html[data-theme="dark"] .btn-danger:focus,
html[data-theme="dark"] .btn-danger.focus,
html[data-theme="dark"] .btn-danger:hover,
html[data-theme="dark"] .btn-danger:active,
html[data-theme="dark"] .btn-danger.active,
html[data-theme="dark"] .open > .dropdown-toggle.btn-danger,
html[data-theme="dark"] .btn-danger:active:hover,
html[data-theme="dark"] .btn-danger.active:hover,
html[data-theme="dark"] .open > .dropdown-toggle.btn-danger:hover,
html[data-theme="dark"] .btn-danger:active:focus,
html[data-theme="dark"] .btn-danger.active:focus,
html[data-theme="dark"] .open > .dropdown-toggle.btn-danger:focus,
html[data-theme="dark"] .btn-danger:active.focus,
html[data-theme="dark"] .btn-danger.active.focus,
html[data-theme="dark"] .open > .dropdown-toggle.btn-danger.focus {
    color: var(--t-btn-danger-text);
    background-color: var(--t-btn-danger-bg-hover);
    border-color: var(--t-btn-danger-bg-hover);
}
html[data-theme="dark"] .btn-danger.disabled:hover,
html[data-theme="dark"] .btn-danger[disabled]:hover,
html[data-theme="dark"] fieldset[disabled] .btn-danger:hover,
html[data-theme="dark"] .btn-danger.disabled:focus,
html[data-theme="dark"] .btn-danger[disabled]:focus,
html[data-theme="dark"] fieldset[disabled] .btn-danger:focus,
html[data-theme="dark"] .btn-danger.disabled.focus,
html[data-theme="dark"] .btn-danger[disabled].focus,
html[data-theme="dark"] fieldset[disabled] .btn-danger.focus {
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
}
html[data-theme="dark"] .btn-danger .badge {
    color: var(--t-btn-danger-bg);
    background-color: var(--t-btn-danger-text);
}
html[data-theme="dark"] a.btn-danger,
html[data-theme="dark"] a.btn-danger:hover,
html[data-theme="dark"] a.btn-danger:focus,
html[data-theme="dark"] a.btn-danger:active,
html[data-theme="dark"] a.btn-danger.active {
    color: var(--t-btn-danger-text) !important;
}
/* .btn-primary, .btn-success, .btn-info, .btn-warning, .btn-primary-dark, .btn-natal-cta: фон светлый (насыщенный), на ссылках возвращаем белый текст */
html[data-theme="dark"] a.btn-primary,
html[data-theme="dark"] a.btn-primary:hover,
html[data-theme="dark"] a.btn-primary:focus,
html[data-theme="dark"] a.btn-primary:active,
html[data-theme="dark"] a.btn-primary.active,
html[data-theme="dark"] a.btn-success,
html[data-theme="dark"] a.btn-success:hover,
html[data-theme="dark"] a.btn-success:focus,
html[data-theme="dark"] a.btn-success:active,
html[data-theme="dark"] a.btn-success.active,
html[data-theme="dark"] a.btn-info,
html[data-theme="dark"] a.btn-info:hover,
html[data-theme="dark"] a.btn-info:focus,
html[data-theme="dark"] a.btn-info:active,
html[data-theme="dark"] a.btn-info.active,
html[data-theme="dark"] a.btn-warning,
html[data-theme="dark"] a.btn-warning:hover,
html[data-theme="dark"] a.btn-warning:focus,
html[data-theme="dark"] a.btn-warning:active,
html[data-theme="dark"] a.btn-warning.active,
html[data-theme="dark"] a.btn-primary-dark,
html[data-theme="dark"] a.btn-primary-dark:hover,
html[data-theme="dark"] a.btn-primary-dark:focus,
html[data-theme="dark"] a.btn-primary-dark:active,
html[data-theme="dark"] a.btn-primary-dark.active,
html[data-theme="dark"] a.btn-natal-cta,
html[data-theme="dark"] a.btn-natal-cta:hover,
html[data-theme="dark"] a.btn-natal-cta:focus,
html[data-theme="dark"] a.btn-natal-cta:active,
html[data-theme="dark"] a.btn-natal-cta.active {
    color: var(--t-on-accent) !important;
}
/* .btn-link */
html[data-theme="dark"] .btn-link {
    color: var(--t-link);
}
html[data-theme="dark"] .btn-link:hover,
html[data-theme="dark"] .btn-link:focus {
    color: var(--t-accent);
}
html[data-theme="dark"] .btn-link[disabled]:hover,
html[data-theme="dark"] fieldset[disabled] .btn-link:hover,
html[data-theme="dark"] .btn-link[disabled]:focus,
html[data-theme="dark"] fieldset[disabled] .btn-link:focus {
    color: var(--t-muted);
}
html[data-theme="dark"] .navbar-default .btn-link {
    color: var(--t-text-2);
}
html[data-theme="dark"] .navbar-default .btn-link:hover,
html[data-theme="dark"] .navbar-default .btn-link:focus {
    color: var(--t-link);
}
/* .btn-grey */
html[data-theme="dark"] .btn-grey,
html[data-theme="dark"] a.btn-grey {
    color: var(--t-text);
    background-color: var(--t-surface-2);
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .btn-grey:hover,
html[data-theme="dark"] .btn-grey:focus,
html[data-theme="dark"] .btn-grey.focus,
html[data-theme="dark"] a.btn-grey:hover,
html[data-theme="dark"] a.btn-grey:focus {
    color: var(--t-text);
    background-color: var(--t-border);
    border-color: var(--t-input-border);
}
/* кнопки входа через соцсети (main-total.css, цвет текста при hover/active/focus с !important) */
html[data-theme="dark"] .btn-brand {
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .btn-brand .brand-badge {
    color: var(--t-text) !important;
}
html[data-theme="dark"] .btn-ya,
html[data-theme="dark"] a.btn-ya {
    color: var(--t-brand-ya);
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .btn-ya:hover,
html[data-theme="dark"] a.btn-ya:hover,
html[data-theme="dark"] .btn-ya:active,
html[data-theme="dark"] .btn-ya:focus,
html[data-theme="dark"] a.btn-ya:active,
html[data-theme="dark"] a.btn-ya:focus {
    color: var(--t-text) !important;
}
html[data-theme="dark"] .btn-ya:active,
html[data-theme="dark"] .btn-ya:focus,
html[data-theme="dark"] a.btn-ya:active,
html[data-theme="dark"] a.btn-ya:focus {
    border-color: var(--t-brand-ya) !important;
}
html[data-theme="dark"] .btn-vk,
html[data-theme="dark"] a.btn-vk {
    color: var(--t-brand-vk);
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .btn-vk:hover,
html[data-theme="dark"] a.btn-vk:hover,
html[data-theme="dark"] .btn-vk:active,
html[data-theme="dark"] .btn-vk:focus,
html[data-theme="dark"] a.btn-vk:active,
html[data-theme="dark"] a.btn-vk:focus {
    color: var(--t-text) !important;
}
html[data-theme="dark"] .btn-vk:active,
html[data-theme="dark"] .btn-vk:focus,
html[data-theme="dark"] a.btn-vk:active,
html[data-theme="dark"] a.btn-vk:focus {
    border-color: var(--t-brand-vk) !important;
}
html[data-theme="dark"] .btn-telegram,
html[data-theme="dark"] a.btn-telegram {
    color: var(--t-brand-tg);
    border-color: var(--t-input-border);
}
html[data-theme="dark"] .btn-telegram:hover,
html[data-theme="dark"] a.btn-telegram:hover,
html[data-theme="dark"] .btn-telegram:active,
html[data-theme="dark"] .btn-telegram:focus,
html[data-theme="dark"] a.btn-telegram:active,
html[data-theme="dark"] a.btn-telegram:focus {
    color: var(--t-text) !important;
}
html[data-theme="dark"] .btn-telegram:active,
html[data-theme="dark"] .btn-telegram:focus,
html[data-theme="dark"] a.btn-telegram:active,
html[data-theme="dark"] a.btn-telegram:focus {
    border-color: var(--t-brand-tg) !important;
}
/* -- Автокомплит городов (custom.autocomplete.css) -- */
html[data-theme="dark"] .autocomplete-suggestions {
    border-color: var(--t-input-border);
    background-color: var(--t-surface);
    box-shadow: 0 6px 12px var(--t-shadow);
}
html[data-theme="dark"] .autocomplete-suggestion {
    color: var(--t-text);
}
html[data-theme="dark"] .autocomplete-suggestion .block--suggestion-value {
    color: var(--t-text);
}
html[data-theme="dark"] .autocomplete-suggestion .value-country {
    color: var(--t-muted);
}
html[data-theme="dark"] .autocomplete-selected {
    background-color: var(--t-border);
}
html[data-theme="dark"] .autocomplete-suggestions strong {
    color: var(--t-accent);
}
html[data-theme="dark"] .autocomplete-group strong {
    border-bottom-color: var(--t-border);
}
/* -- Datepicker (web/js/datepicker/datepicker3.css) -- */
html[data-theme="dark"] .datepicker.dropdown-menu {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    color: var(--t-text);
    box-shadow: 0 5px 10px var(--t-shadow);
}
html[data-theme="dark"] .datepicker-dropdown:before {
    border-bottom-color: var(--t-border);
}
html[data-theme="dark"] .datepicker-dropdown:after {
    border-bottom-color: var(--t-surface);
}
html[data-theme="dark"] .datepicker-dropdown.datepicker-orient-bottom:before {
    border-top-color: var(--t-border);
}
html[data-theme="dark"] .datepicker-dropdown.datepicker-orient-bottom:after {
    border-top-color: var(--t-surface);
}
html[data-theme="dark"] .datepicker table tr td.day:hover,
html[data-theme="dark"] .datepicker table tr td.day.focused,
html[data-theme="dark"] .datepicker table tr td span:hover,
html[data-theme="dark"] .datepicker thead tr:first-child th:hover,
html[data-theme="dark"] .datepicker tfoot tr th:hover {
    background: var(--t-border);
}
html[data-theme="dark"] .datepicker table tr td.old,
html[data-theme="dark"] .datepicker table tr td.new,
html[data-theme="dark"] .datepicker table tr td span.old,
html[data-theme="dark"] .datepicker table tr td span.new {
    color: var(--t-muted);
}
html[data-theme="dark"] .datepicker table tr td.disabled,
html[data-theme="dark"] .datepicker table tr td.disabled:hover,
html[data-theme="dark"] .datepicker table tr td span.disabled,
html[data-theme="dark"] .datepicker table tr td span.disabled:hover {
    background: none;
    color: var(--t-muted);
    opacity: .5;
}
html[data-theme="dark"] .datepicker table tr td.range,
html[data-theme="dark"] .datepicker table tr td.range:hover,
html[data-theme="dark"] .datepicker table tr td.range.disabled,
html[data-theme="dark"] .datepicker table tr td.range.disabled:hover {
    background: var(--t-border);
}
/* today, range.today, selected, active: правила сгенерированы по тем же списками селекторов, что в datepicker3.css (без fieldset[disabled] и .open .dropdown-toggle, которых у календаря нет) */
html[data-theme="dark"] .datepicker table tr td.today,
html[data-theme="dark"] .datepicker table tr td.today:hover,
html[data-theme="dark"] .datepicker table tr td.today.disabled,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover {
    color: var(--t-warn);
    background-color: var(--t-warn-bg);
    border-color: var(--t-warn-border);
}
html[data-theme="dark"] .datepicker table tr td.today:hover,
html[data-theme="dark"] .datepicker table tr td.today:hover:hover,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover:hover,
html[data-theme="dark"] .datepicker table tr td.today:focus,
html[data-theme="dark"] .datepicker table tr td.today:hover:focus,
html[data-theme="dark"] .datepicker table tr td.today.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover:focus,
html[data-theme="dark"] .datepicker table tr td.today:active,
html[data-theme="dark"] .datepicker table tr td.today:hover:active,
html[data-theme="dark"] .datepicker table tr td.today.disabled:active,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover:active,
html[data-theme="dark"] .datepicker table tr td.today.active,
html[data-theme="dark"] .datepicker table tr td.today:hover.active,
html[data-theme="dark"] .datepicker table tr td.today.disabled.active,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover.active {
    color: var(--t-warn);
    background-color: var(--t-warn-border);
    border-color: var(--t-warn);
}
html[data-theme="dark"] .datepicker table tr td.today.disabled,
html[data-theme="dark"] .datepicker table tr td.today:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.today.disabled.disabled,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.today:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.today.disabled.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.today.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.today:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.today.disabled.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.today.disabled:active,
html[data-theme="dark"] .datepicker table tr td.today:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.today.disabled.disabled:active,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.today.disabled.active,
html[data-theme="dark"] .datepicker table tr td.today:hover.disabled.active,
html[data-theme="dark"] .datepicker table tr td.today.disabled.disabled.active,
html[data-theme="dark"] .datepicker table tr td.today.disabled:hover.disabled.active {
    background-color: var(--t-warn-bg);
    border-color: var(--t-warn-border);
}
html[data-theme="dark"] .datepicker table tr td.today:hover:hover {
    color: var(--t-warn);
}
html[data-theme="dark"] .datepicker table tr td.today.active:hover {
    color: var(--t-btn-danger-text);
}
html[data-theme="dark"] .datepicker table tr td.range.today,
html[data-theme="dark"] .datepicker table tr td.range.today:hover,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover {
    color: var(--t-warn);
    background-color: var(--t-warn-border);
    border-color: var(--t-warn);
}
html[data-theme="dark"] .datepicker table tr td.range.today:hover,
html[data-theme="dark"] .datepicker table tr td.range.today:hover:hover,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover:hover,
html[data-theme="dark"] .datepicker table tr td.range.today:focus,
html[data-theme="dark"] .datepicker table tr td.range.today:hover:focus,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover:focus,
html[data-theme="dark"] .datepicker table tr td.range.today:active,
html[data-theme="dark"] .datepicker table tr td.range.today:hover:active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover:active,
html[data-theme="dark"] .datepicker table tr td.range.today.active,
html[data-theme="dark"] .datepicker table tr td.range.today:hover.active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled.active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover.active {
    color: var(--t-warn);
    background-color: var(--t-warn-border);
    border-color: var(--t-warn);
}
html[data-theme="dark"] .datepicker table tr td.range.today.disabled,
html[data-theme="dark"] .datepicker table tr td.range.today:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled.disabled,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.range.today:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.range.today:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:active,
html[data-theme="dark"] .datepicker table tr td.range.today:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled.disabled:active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled.active,
html[data-theme="dark"] .datepicker table tr td.range.today:hover.disabled.active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled.disabled.active,
html[data-theme="dark"] .datepicker table tr td.range.today.disabled:hover.disabled.active {
    background-color: var(--t-warn-border);
    border-color: var(--t-warn);
}
html[data-theme="dark"] .datepicker table tr td.selected,
html[data-theme="dark"] .datepicker table tr td.selected:hover,
html[data-theme="dark"] .datepicker table tr td.selected.disabled,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover {
    color: var(--t-text);
    background-color: var(--t-border);
    border-color: var(--t-muted);
    text-shadow: none;
}
html[data-theme="dark"] .datepicker table tr td.selected:hover,
html[data-theme="dark"] .datepicker table tr td.selected:hover:hover,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover:hover,
html[data-theme="dark"] .datepicker table tr td.selected:focus,
html[data-theme="dark"] .datepicker table tr td.selected:hover:focus,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover:focus,
html[data-theme="dark"] .datepicker table tr td.selected:active,
html[data-theme="dark"] .datepicker table tr td.selected:hover:active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover:active,
html[data-theme="dark"] .datepicker table tr td.selected.active,
html[data-theme="dark"] .datepicker table tr td.selected:hover.active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled.active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover.active {
    color: var(--t-text);
    background-color: var(--t-border);
    border-color: var(--t-text-2);
}
html[data-theme="dark"] .datepicker table tr td.selected.disabled,
html[data-theme="dark"] .datepicker table tr td.selected:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.selected.disabled.disabled,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.selected:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.selected.disabled.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.selected:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.selected.disabled.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:active,
html[data-theme="dark"] .datepicker table tr td.selected:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled.disabled:active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled.active,
html[data-theme="dark"] .datepicker table tr td.selected:hover.disabled.active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled.disabled.active,
html[data-theme="dark"] .datepicker table tr td.selected.disabled:hover.disabled.active {
    background-color: var(--t-border);
    border-color: var(--t-muted);
}
html[data-theme="dark"] .datepicker table tr td.active,
html[data-theme="dark"] .datepicker table tr td.active:hover,
html[data-theme="dark"] .datepicker table tr td.active.disabled,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover {
    color: var(--t-btn-danger-text);
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
    text-shadow: none;
}
html[data-theme="dark"] .datepicker table tr td.active:hover,
html[data-theme="dark"] .datepicker table tr td.active:hover:hover,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover:hover,
html[data-theme="dark"] .datepicker table tr td.active:focus,
html[data-theme="dark"] .datepicker table tr td.active:hover:focus,
html[data-theme="dark"] .datepicker table tr td.active.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover:focus,
html[data-theme="dark"] .datepicker table tr td.active:active,
html[data-theme="dark"] .datepicker table tr td.active:hover:active,
html[data-theme="dark"] .datepicker table tr td.active.disabled:active,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover:active,
html[data-theme="dark"] .datepicker table tr td.active.active,
html[data-theme="dark"] .datepicker table tr td.active:hover.active,
html[data-theme="dark"] .datepicker table tr td.active.disabled.active,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover.active {
    color: var(--t-btn-danger-text);
    background-color: var(--t-btn-danger-bg-hover);
    border-color: var(--t-btn-danger-bg-hover);
}
html[data-theme="dark"] .datepicker table tr td.active.disabled,
html[data-theme="dark"] .datepicker table tr td.active:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.active.disabled.disabled,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover.disabled,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.active:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.active.disabled.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td.active.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.active:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.active.disabled.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td.active.disabled:active,
html[data-theme="dark"] .datepicker table tr td.active:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.active.disabled.disabled:active,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td.active.disabled.active,
html[data-theme="dark"] .datepicker table tr td.active:hover.disabled.active,
html[data-theme="dark"] .datepicker table tr td.active.disabled.disabled.active,
html[data-theme="dark"] .datepicker table tr td.active.disabled:hover.disabled.active {
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
}
html[data-theme="dark"] .datepicker table tr td span.active,
html[data-theme="dark"] .datepicker table tr td span.active:hover,
html[data-theme="dark"] .datepicker table tr td span.active.disabled,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover {
    color: var(--t-btn-danger-text);
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
    text-shadow: none;
}
html[data-theme="dark"] .datepicker table tr td span.active:hover,
html[data-theme="dark"] .datepicker table tr td span.active:hover:hover,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover:hover,
html[data-theme="dark"] .datepicker table tr td span.active:focus,
html[data-theme="dark"] .datepicker table tr td span.active:hover:focus,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:focus,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover:focus,
html[data-theme="dark"] .datepicker table tr td span.active:active,
html[data-theme="dark"] .datepicker table tr td span.active:hover:active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover:active,
html[data-theme="dark"] .datepicker table tr td span.active.active,
html[data-theme="dark"] .datepicker table tr td span.active:hover.active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled.active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover.active {
    color: var(--t-btn-danger-text);
    background-color: var(--t-btn-danger-bg-hover);
    border-color: var(--t-btn-danger-bg-hover);
}
html[data-theme="dark"] .datepicker table tr td span.active.disabled,
html[data-theme="dark"] .datepicker table tr td span.active:hover.disabled,
html[data-theme="dark"] .datepicker table tr td span.active.disabled.disabled,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover.disabled,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover,
html[data-theme="dark"] .datepicker table tr td span.active:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td span.active.disabled.disabled:hover,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover.disabled:hover,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:focus,
html[data-theme="dark"] .datepicker table tr td span.active:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td span.active.disabled.disabled:focus,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover.disabled:focus,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:active,
html[data-theme="dark"] .datepicker table tr td span.active:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled.disabled:active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover.disabled:active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled.active,
html[data-theme="dark"] .datepicker table tr td span.active:hover.disabled.active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled.disabled.active,
html[data-theme="dark"] .datepicker table tr td span.active.disabled:hover.disabled.active {
    background-color: var(--t-btn-danger-bg);
    border-color: var(--t-btn-danger-bg);
}
/* -- Модалки Bootstrap -- */
/* фон светлее страницы и карточек, рамка заметная: иначе края модалки на тёмном фоне не видны */
html[data-theme="dark"] .modal-content {
    background-color: var(--t-surface-2);
    border: 1px solid var(--t-input-border);
    color: var(--t-text);
    box-shadow: 0 8px 30px var(--t-shadow);
}
/* модалка безопасности: свои правила с ID в views/user/safety.php (рамка rgba(0,0,0,.12), линия заголовка #e8e8e8) */
html[data-theme="dark"] #safety-modal .modal-content {
    border: 1px solid var(--t-input-border);
    box-shadow: 0 8px 30px var(--t-shadow);
}
html[data-theme="dark"] #safety-modal .modal-header {
    border-bottom-color: var(--t-border);
}
html[data-theme="dark"] .modal-header {
    border-bottom-color: var(--t-border);
}
html[data-theme="dark"] .modal-footer {
    border-top-color: var(--t-border);
}
html[data-theme="dark"] .modal-title {
    color: var(--t-text);
}
html[data-theme="dark"] .modal-backdrop.in {
    opacity: .7;
}
html[data-theme="dark"] .modal .close {
    color: var(--t-text);
}
html[data-theme="dark"] .tooltip-inner {
    color: var(--t-text);
    background: var(--t-surface-2);
    border-color: var(--t-border);
}
html[data-theme="dark"] .tooltip.top .tooltip-arrow {
    border-top-color: var(--t-surface-2);
}
html[data-theme="dark"] .tooltip.left .tooltip-arrow {
    border-left-color: var(--t-surface-2);
}
html[data-theme="dark"] .tooltip.right .tooltip-arrow {
    border-right-color: var(--t-surface-2);
}
html[data-theme="dark"] .tooltip.bottom .tooltip-arrow {
    border-bottom-color: var(--t-surface-2);
}
/* -- AstroModal (web/css/astro-modal.css) -- */
html[data-theme="dark"] .astro-modal-overlay {
    background: radial-gradient(circle at top, var(--t-surface-2) 0%, var(--t-surface) 100%);
}
html[data-theme="dark"] .astro-modal__close {
    color: var(--t-text-2);
}
html[data-theme="dark"] .astro-modal__close:hover {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] .astro-modal__decor {
    opacity: .1;
}
html[data-theme="dark"] .astro-modal__title {
    color: var(--t-text);
}
html[data-theme="dark"] .astro-modal__subtitle {
    color: var(--t-text-2);
}
html[data-theme="dark"] .astro-modal__card {
    background: var(--t-surface-2);
    border: 1px solid var(--t-input-border);
    box-shadow: 0 8px 30px var(--t-shadow);
}
html[data-theme="dark"] .astro-modal__trust-text {
    color: var(--t-muted);
}
/* -- PdfModal (web/css/pdf-modal.css) -- */
html[data-theme="dark"] .pdf-modal__label {
    color: var(--t-text-2);
}
html[data-theme="dark"] .pdf-modal__input {
    border-color: var(--t-input-border);
    background: var(--t-surface);
    color: var(--t-text);
}
html[data-theme="dark"] .pdf-modal__input:focus {
    border-color: var(--t-brand-gold);
}
html[data-theme="dark"] .pdf-modal__input::placeholder {
    color: var(--t-placeholder);
}
html[data-theme="dark"] .pdf-modal__error {
    color: var(--t-err-strong);
    font-weight: 600;
}
html[data-theme="dark"] .pdf-modal__input--invalid,
html[data-theme="dark"] .pdf-modal__input--invalid:focus {
    border-color: var(--t-err-strong);
    box-shadow: 0 0 0 1px var(--t-err-strong);
}
html[data-theme="dark"] .pdf-modal__limit-banner {
    background: var(--t-surface-2);
}
html[data-theme="dark"] .pdf-modal__limit-text {
    color: var(--t-text-2);
}
html[data-theme="dark"] .pdf-modal__cta {
    background-color: var(--t-cta-cream);
    color: var(--t-cta-cream-text);
}
html[data-theme="dark"] .pdf-modal__cta:hover {
    background-color: var(--t-cta-cream-hover);
}
html[data-theme="dark"] .pdf-modal__cancel {
    color: var(--t-muted);
}
html[data-theme="dark"] .pdf-modal__cancel:hover {
    color: var(--t-text);
}
html[data-theme="dark"] .pdf-modal__premium-hint {
    color: var(--t-text-2);
}
/* -- SlideModal (web/js/slide-modal/slide-modal.css) -- */
html[data-theme="dark"] #slidebox {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    box-shadow: 0 6px 12px var(--t-shadow);
}
html[data-theme="dark"] #slidebox h4 {
    color: var(--t-text);
}
html[data-theme="dark"] #slidebox p {
    color: var(--t-text-2);
}
html[data-theme="dark"] #slidebox .close i {
    color: var(--t-text-2);
}
/* -- Вход и регистрация (инлайновый <style> в views/user/signin-test.php и signup.php) -- */
html[data-theme="dark"] .signin-textlink:disabled {
    color: var(--t-muted);
}
html[data-theme="dark"] .signin-eye {
    color: var(--t-muted);
}
html[data-theme="dark"] .signin-inline-error {
    color: var(--t-err);
}
html[data-theme="dark"] .signin-email-chip {
    background: var(--t-surface-2);
}
html[data-theme="dark"] .signin-email-chip i {
    color: var(--t-muted);
}
/* -- Оплата: тарифы (web/css/pricing_table.css) -- */
html[data-theme="dark"] #generic_price_table .generic_content {
    background-color: var(--t-surface);
    box-shadow: 0 0 0 1px var(--t-border);
}
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_head_content .head_bg {
    border-color: var(--t-border) transparent transparent var(--t-border);
}
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_head_content .head div.hint,
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_head_content .head div.hintPercent,
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_head_content .head span.title {
    color: var(--t-text-2);
}
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_price_tag .price .sign,
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_price_tag .price .currency,
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_price_tag .price .cent,
html[data-theme="dark"] #generic_price_table .generic_content .generic_head_price .generic_price_tag .month {
    color: var(--t-text);
}
html[data-theme="dark"] #generic_price_table .generic_content .generic_feature_list {
    background-color: var(--t-surface-2);
}
html[data-theme="dark"] #generic_price_table .generic_content .generic_feature_list ul li {
    color: var(--t-muted);
}
html[data-theme="dark"] #generic_price_table .generic_content .generic_price_btn a {
    border-color: var(--t-ok);
    color: var(--t-ok);
}
html[data-theme="dark"] #generic_price_table .generic_content.active .generic_head_price .generic_head_content .head_bg,
html[data-theme="dark"] #generic_price_table .generic_content:hover .generic_head_price .generic_head_content .head_bg {
    border-color: var(--t-ok-solid) transparent transparent var(--t-ok-solid);
    color: var(--t-on-accent);
}
html[data-theme="dark"] #generic_price_table .generic_content:hover .generic_head_price .generic_head_content .head span,
html[data-theme="dark"] #generic_price_table .generic_content.active .generic_head_price .generic_head_content .head span {
    color: var(--t-on-accent);
}
html[data-theme="dark"] #generic_price_table .generic_content:hover .generic_price_btn a,
html[data-theme="dark"] #generic_price_table .generic_content.active .generic_price_btn a {
    background-color: var(--t-ok-solid);
    color: var(--t-on-accent);
}
/* -- Оплата: тарифы v2 (web/js/pricing-table/pricing-table.v2.css) -- */
html[data-theme="dark"] #elite-pricing-sales-text {
    color: var(--t-text-2);
}
html[data-theme="dark"] .has-tooltip .tooltip-container {
    background-color: var(--t-surface-2);
    box-shadow: 0 6px 24px var(--t-shadow);
}
html[data-theme="dark"] .has-tooltip .tooltip-container:after {
    border-top-color: var(--t-surface-2);
}
html[data-theme="dark"] .has-tooltip .tooltip-container p {
    color: var(--t-text-2);
}
html[data-theme="dark"] #pricing-container {
    color: var(--t-text);
}
html[data-theme="dark"] #pricing-container .price-card {
    background-color: var(--t-surface);
    box-shadow: 0 0 0 1px var(--t-border);
}
html[data-theme="dark"] #pricing-container .price-card--header {
    background-color: var(--t-ok-bg);
}
html[data-theme="dark"] #pricing-container .price-card--header h4 {
    color: var(--t-ok);
}
html[data-theme="dark"] #pricing-container .price-card--price-conditions,
html[data-theme="dark"] #pricing-container .price-card--onboarding-fee.has-fee {
    color: var(--t-muted);
}
html[data-theme="dark"] #pricing-container .price-card--onboarding-fee,
html[data-theme="dark"] #pricing-container li.price-card--features--item:not(.features-disabled):before,
html[data-theme="dark"] #pricing-container .price-card--mobile-features-toggle {
    color: var(--t-ok);
}
html[data-theme="dark"] #pricing-container .price-card--features,
html[data-theme="dark"] #pricing-container .price-card--mobile-features-toggle {
    border-top-color: var(--t-border);
}

/* == Fix round 1: btn-primary, btn-primary-dark, btn-natal-cta (светлый фон #2c3e50 / #2e3c4a / #7c3aed сливался с тёмной страницей) == */
html[data-theme="dark"] .btn-primary {
    color: var(--t-on-accent);
    background-color: var(--t-btn-primary-bg);
    border-color: var(--t-btn-primary-bg);
}
html[data-theme="dark"] .btn-primary:focus,
html[data-theme="dark"] .btn-primary.focus,
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:active,
html[data-theme="dark"] .btn-primary.active,
html[data-theme="dark"] .open > .dropdown-toggle.btn-primary,
html[data-theme="dark"] .btn-primary:active:hover,
html[data-theme="dark"] .btn-primary.active:hover,
html[data-theme="dark"] .open > .dropdown-toggle.btn-primary:hover,
html[data-theme="dark"] .btn-primary:active:focus,
html[data-theme="dark"] .btn-primary.active:focus,
html[data-theme="dark"] .open > .dropdown-toggle.btn-primary:focus,
html[data-theme="dark"] .btn-primary:active.focus,
html[data-theme="dark"] .btn-primary.active.focus,
html[data-theme="dark"] .open > .dropdown-toggle.btn-primary.focus {
    color: var(--t-on-accent);
    background-color: var(--t-btn-primary-bg-hover);
    border-color: var(--t-btn-primary-bg-hover);
}
html[data-theme="dark"] .btn-primary.disabled:hover,
html[data-theme="dark"] .btn-primary[disabled]:hover,
html[data-theme="dark"] fieldset[disabled] .btn-primary:hover,
html[data-theme="dark"] .btn-primary.disabled:focus,
html[data-theme="dark"] .btn-primary[disabled]:focus,
html[data-theme="dark"] fieldset[disabled] .btn-primary:focus,
html[data-theme="dark"] .btn-primary.disabled.focus,
html[data-theme="dark"] .btn-primary[disabled].focus,
html[data-theme="dark"] fieldset[disabled] .btn-primary.focus,
html[data-theme="dark"] .btn-primary.disabled,
html[data-theme="dark"] .btn-primary[disabled],
html[data-theme="dark"] fieldset[disabled] .btn-primary {
    background-color: var(--t-btn-primary-bg);
    border-color: var(--t-btn-primary-bg);
}
html[data-theme="dark"] .btn-primary .badge {
    color: var(--t-btn-primary-bg);
    background-color: var(--t-on-accent);
}
html[data-theme="dark"] .btn-primary-dark {
    color: var(--t-on-accent);
    background-color: var(--t-btn-primary-bg);
    border-color: var(--t-btn-primary-bg);
}
html[data-theme="dark"] .btn-primary-dark:hover,
html[data-theme="dark"] .btn-primary-dark:focus {
    color: var(--t-on-accent);
    background-color: var(--t-btn-primary-bg-hover);
    border-color: var(--t-btn-primary-bg-hover);
}
html[data-theme="dark"] .btn-natal-cta {
    color: var(--t-on-accent);
    background-color: var(--t-btn-cta-bg);
}
html[data-theme="dark"] .btn-natal-cta:hover,
html[data-theme="dark"] .btn-natal-cta:focus {
    color: var(--t-on-accent);
    background-color: var(--t-btn-cta-bg-hover);
}

/* == Task 8: страницы гороскопов (инлайновые цвета по inline-colors.md, группы A, B, C; подложки колёс и графиков) ==
 * Инлайн-стиль сильнее любого селектора без !important, поэтому везде !important.
 * Подстроки совпадают с написанием в файлах побайтно (пробелы и регистр важны).
 * Коллизий вида border-color: red / background-color: green в views, components и ObitelTrait нет (проверено grep). */
/* текст: серый, зелёный, красный (в т.ч. динамические значения $formula[color], ObitelTrait без пробела) */
html[data-theme="dark"] [style*="color:grey"],
html[data-theme="dark"] [style*="color: grey"],
html[data-theme="dark"] [style*="color: #767676"],
html[data-theme="dark"] [style*="color:#8c6f65"] {
    color: var(--t-muted) !important;
}
html[data-theme="dark"] [style*="color:#666"] {
    color: var(--t-text-2) !important;
}
html[data-theme="dark"] [style*="color: #008000"],
html[data-theme="dark"] [style*="color: green"],
html[data-theme="dark"] [style*="color:green"] {
    color: var(--t-ok) !important;
}
html[data-theme="dark"] [style*="color: #DC143C"],
html[data-theme="dark"] [style*="color:red"],
html[data-theme="dark"] [style*="color: red"],
html[data-theme="dark"] [style*="color: #a50000"] {
    color: var(--t-err) !important;
}
/* плашки и метки домов с белым текстом: заливку не трогаем (белый текст держится), добавляем кольцо >=3:1 */
html[data-theme="dark"] [style*="background-color: #666633"],
html[data-theme="dark"] [style*="background-color: #666666"],
html[data-theme="dark"] [style*="background-color: #003399"] {
    box-shadow: 0 0 0 1px var(--t-input-border) !important;
}
/* полосы цитат (border-left 12px): светлее до >=3:1 */
html[data-theme="dark"] [style*="border-left: 12px solid #666633"] {
    border-left-color: var(--t-house-olive) !important;
}
html[data-theme="dark"] [style*="border-left: 12px solid #666666"] {
    border-left-color: var(--t-house-grey) !important;
}
html[data-theme="dark"] [style*="border-left: 12px solid #003399"] {
    border-left-color: var(--t-house-blue) !important;
}
/* маркеры легенды 40x12 */
html[data-theme="dark"] [style*="background: #58595b"] {
    background: var(--t-muted) !important;
}
html[data-theme="dark"] [style*="background: #043C54"] {
    background: var(--t-info) !important;
}
/* плашка демо-данных (components/faker/views/generator-fake.php, правило в <style>) */
html[data-theme="dark"] .demo-note {
    background-color: var(--t-warn-bg);
    border-color: var(--t-warn-border);
    color: var(--t-warn);
}
/* группа B: подписка, модал PDF */
html[data-theme="dark"] [style*="border-top: 1px solid #e5e5e5"] {
    border-top-color: var(--t-border) !important;
}
html[data-theme="dark"] [style*="background:#fff8ee"] {
    background: var(--t-warn-bg) !important;
}
/* группа C: мобильный лейаут */
html[data-theme="dark"] [style*="border-bottom: 1px solid #f6f6f6"] {
    border-bottom-color: var(--t-border) !important;
}
/* подложки под графики Chart.js / Chartist: тёмные линии и подписи читаются на светлой плашке.
 * Колёса (img /wheel/.../picture) без подложки: картинка с белым фоном одинакова в обеих темах.
 * Canvas: плашка через box-shadow, а не padding, чтобы не расширять контейнер (горизонтальный скролл на мобильной).
 * max-width на canvas не ставить: Chart.js 3.7.1 при загрузке в тёмной теме сжимает график до 50 px. */
html[data-theme="dark"] canvas[id^="myChart"],
html[data-theme="dark"] canvas[id^="ct-chart"] {
    background-color: var(--t-wheel-card);
    box-shadow: 0 0 0 8px var(--t-wheel-card);
    border-radius: 4px;
}
html[data-theme="dark"] [id^="ct-chart"]:not(canvas),
html[data-theme="dark"] .ct-chart,
html[data-theme="dark"] #box--chart--priority-sphere-life {
    background-color: var(--t-wheel-card);
    padding: 8px;
    border-radius: 12px;
    box-sizing: border-box;
    max-width: 100%;
}

/* == Раунд 2: блок даты и места рождения, заголовочные ячейки таблиц, HD-эфемериды == */
html[data-theme="dark"] .horo-user-info__card {
    background: var(--t-surface);
}
html[data-theme="dark"] .horo-user-info__datetime,
html[data-theme="dark"] .horo-user-info__value,
html[data-theme="dark"] .horo-user-info-detailed__value {
    color: var(--t-text);
}
html[data-theme="dark"] .horo-user-info__place {
    color: var(--t-ok);
}
/* шапка синастрии (мобильная): horo-actions.css красит .horo-user-info .f__thin в #333 */
html[data-theme="dark"] .horo-user-info .f__thin {
    color: var(--t-text);
}
/* HD-композит: легенды и подписи (hd-composite.css: #444 / #555 / #999) */
html[data-theme="dark"] .hdc-legend__list {
    color: var(--t-text);
}
html[data-theme="dark"] .hdc-summary__code-note {
    color: var(--t-text-2);
}
html[data-theme="dark"] .hdc-summary__code-value {
    color: var(--t-muted);
}
html[data-theme="dark"] .horo-user-info-detailed__section + .horo-user-info-detailed__section {
    border-top-color: var(--t-border);
}
/* заголовочные ячейки bootstrap .active (#f5f5f5): потенциал, связи домов, таблица аспектов */
html[data-theme="dark"] .table > thead > tr > td.active,
html[data-theme="dark"] .table > tfoot > tr > td.active,
html[data-theme="dark"] .table > thead > tr > th.active,
html[data-theme="dark"] .table > tbody > tr > th.active,
html[data-theme="dark"] .table > tfoot > tr > th.active,
html[data-theme="dark"] .table > thead > tr.active > td,
html[data-theme="dark"] .table > tbody > tr.active > th,
html[data-theme="dark"] .table > thead > tr.active > th,
html[data-theme="dark"] .table > tfoot > tr.active > td,
html[data-theme="dark"] .table > tfoot > tr.active > th {
    background-color: var(--t-table-head);
    color: var(--t-text-2);
}
/* чёрные глифы планет (planet-bw) на тёмной ячейке: инверсия в светлый */
html[data-theme="dark"] .table img[src*="/planet-bw/"] {
    filter: invert(1) brightness(.85);
}
/* Дизайн человека: колонка «Личность» (светлый #222) */
html[data-theme="dark"] .hd-planets--personality {
    color: var(--t-text);
}
html[data-theme="dark"] .hd-dot--personality {
    background: var(--t-text);
}

/* == Task 9: статьи (main-total.css #articles, article.css, comment.css, toc-button.css), серые блоки главной, лендинговые карточки домов ==
 * Светлые источники: #articles .box-article-list (1,1,0), #articles .article-header h1/h2 (1,1,1), .article-header h2 a (0,1,2),
 * .clr_333/.clr_000/.clr_444/.clr_D40000 (0,1,0 !important), .jumbotron (bootstrap), .jumbotron_custom, .house-*, .natal-*, .toc-* .
 * comment.css гасит фон/рамку/тень комментариев через !important (нечего перекрывать); поле ввода #comment-form textarea закрыто в Task 5/6. */
html[data-theme="dark"] #articles .box-article-list {
    background: var(--t-surface);
}
html[data-theme="dark"] #articles .article-header h1,
html[data-theme="dark"] #articles .article-header h2,
html[data-theme="dark"] #articles .article-header h1 a,
html[data-theme="dark"] #articles .article-header h2 a,
html[data-theme="dark"] .article-header h1 a,
html[data-theme="dark"] .article-header h2 a,
html[data-theme="dark"] .article-content h1 a:visited,
html[data-theme="dark"] .article-content h2 a:visited {
    color: var(--t-text);
}
html[data-theme="dark"] #articles .article-header h1 a:hover,
html[data-theme="dark"] #articles .article-header h2 a:hover,
html[data-theme="dark"] #articles .article-header h1 a:focus,
html[data-theme="dark"] #articles .article-header h2 a:focus {
    color: var(--t-accent);
}
/* теги в подвале карточки и в статье (.clr_D40000 !important в светлой) */
html[data-theme="dark"] #articles .clr_D40000,
html[data-theme="dark"] .article-footer .clr_D40000 {
    color: var(--t-accent) !important;
}
/* заголовок и ссылки бокового списка статей (виджет Articles, .clr_333 !important) */
html[data-theme="dark"] .post-title a {
    color: var(--t-text) !important;
}
html[data-theme="dark"] .post-title a:hover,
html[data-theme="dark"] .post-title a:focus {
    color: var(--t-accent) !important;
}
/* картинки в тексте статьи и карточках: приглушить; прозрачные PNG (схемы) на светлой подложке; только контейнер статьи */
html[data-theme="dark"] #articles .article-content img {
    filter: brightness(.9);
}
html[data-theme="dark"] #articles .article-content img[src*=".png" i] {
    background-color: var(--t-wheel-card);
    border-radius: 4px;
}
/* серые блоки: bootstrap .jumbotron (#ecf0f1), .jumbotron_custom (#f5f5f5, рамка #e9e9e9) - главная и формы */
html[data-theme="dark"] .jumbotron {
    background-color: transparent;
    color: var(--t-text);
}
html[data-theme="dark"] .jumbotron > hr {
    border-top-color: var(--t-border);
}
html[data-theme="dark"] .jumbotron_custom {
    background-color: var(--t-surface);
    border-color: var(--t-border);
    color: var(--t-text);
}
/* утилиты тёмного текста (main-total.css, !important): везде, кроме светлых плашек ниже */
html[data-theme="dark"] .clr_000,
html[data-theme="dark"] .clr_333 {
    color: var(--t-text) !important;
}
html[data-theme="dark"] .clr_444 {
    color: var(--t-text-2) !important;
}
/* исключения: на цветных метках и бейджах текст наследует цвет метки; на светлых подложках графиков остаётся тёмным */
html[data-theme="dark"] .label .clr_000,
html[data-theme="dark"] .label .clr_333,
html[data-theme="dark"] .label .clr_444,
html[data-theme="dark"] .badge .clr_000,
html[data-theme="dark"] .badge .clr_333,
html[data-theme="dark"] .badge .clr_444,
html[data-theme="dark"] .label.clr_000,
html[data-theme="dark"] .label.clr_333,
html[data-theme="dark"] .label.clr_444,
html[data-theme="dark"] .badge.clr_000,
html[data-theme="dark"] .badge.clr_333,
html[data-theme="dark"] .badge.clr_444 {
    color: inherit !important;
}
html[data-theme="dark"] .ct-chart .clr_000,
html[data-theme="dark"] .ct-chart .clr_333,
html[data-theme="dark"] .ct-chart .clr_444,
html[data-theme="dark"] #box--chart--priority-sphere-life .clr_000,
html[data-theme="dark"] #box--chart--priority-sphere-life .clr_333,
html[data-theme="dark"] #box--chart--priority-sphere-life .clr_444 {
    color: var(--t-bg) !important;
}
/* серия статей о домах: CTA и навигация (main-total.css) */
html[data-theme="dark"] .house-series-cta {
    background: var(--t-surface-2);
    border-left-color: var(--t-accent);
}
html[data-theme="dark"] .house-series-cta p {
    color: var(--t-text);
}
html[data-theme="dark"] .house-series-nav {
    border-top-color: var(--t-border);
}
html[data-theme="dark"] .house-nav-title {
    color: var(--t-muted);
}
/* лендинг /natal: карточки домов, заголовки, таблица, FAQ */
html[data-theme="dark"] .house-card {
    background: var(--t-surface-2);
    border-color: var(--t-border);
}
html[data-theme="dark"] .house-card:hover,
html[data-theme="dark"] .house-card:focus {
    background: var(--t-surface);
    box-shadow: 0 2px 8px var(--t-shadow);
}
html[data-theme="dark"] .house-num {
    color: var(--t-text);
}
html[data-theme="dark"] .house-label {
    color: var(--t-text-2);
}
html[data-theme="dark"] .natal-section-h2 {
    border-bottom-color: var(--t-border);
}
html[data-theme="dark"] .natal-table-head {
    background: var(--t-surface-2);
    color: var(--t-text);
}
html[data-theme="dark"] .natal-faq .panel-heading {
    background: var(--t-surface-2);
    border-color: var(--t-border);
}
html[data-theme="dark"] .natal-faq .panel-heading a {
    color: var(--t-text);
}
html[data-theme="dark"] .natal-faq .panel-heading a:hover {
    color: var(--t-accent);
}
html[data-theme="dark"] .natal-faq .panel {
    border-color: var(--t-border);
}
/* левое меню гороскопов: пункт-подсветка */
html[data-theme="dark"] #left_menu .menu-item-highlight {
    color: var(--t-accent);
}
/* кнопка «Содержание» (web/js/toc-button/toc-button.css): FAB #555 с белой иконкой читается на тёмном, меню и затемнение переопределяем */
html[data-theme="dark"] .toc-menu {
    background: var(--t-surface-2);
    box-shadow: 0 4px 20px var(--t-shadow);
}
html[data-theme="dark"] .toc-menu__item a,
html[data-theme="dark"] .toc-menu__item a.active {
    color: var(--t-text);
}
html[data-theme="dark"] .toc-menu__item a:hover,
html[data-theme="dark"] .toc-menu__item a:focus {
    background: var(--t-border);
    color: var(--t-text);
}
html[data-theme="dark"] .toc-menu .menu-item-highlight {
    color: var(--t-accent);
}
html[data-theme="dark"] .toc-menu__item--locked a,
html[data-theme="dark"] .toc-menu__item--locked a:hover,
html[data-theme="dark"] .toc-menu__item--locked a:focus {
    color: var(--t-muted);
}
html[data-theme="dark"] .toc-menu__lock {
    color: var(--t-muted);
}
html[data-theme="dark"] .toc-backdrop {
    background: var(--t-scrim);
}

/* итоговая ревью: светлые правила с ID или !important (main-total.css) */
html[data-theme="dark"] #tabsHoro a {
    color: var(--t-text-2) !important;
}
html[data-theme="dark"] #tabsHoro a:hover,
html[data-theme="dark"] #tabsHoro a:focus,
html[data-theme="dark"] #tabsHoro li.active > a,
html[data-theme="dark"] #tabsHoro li.active > a:hover,
html[data-theme="dark"] #tabsHoro li.active > a:focus {
    color: var(--t-text) !important;
}
html[data-theme="dark"] #tabsHoro li.disabled a {
    color: var(--t-muted) !important;
}
html[data-theme="dark"] #main-table--planets a {
    color: var(--t-text) !important;
}
html[data-theme="dark"] .clr_043C54,
html[data-theme="dark"] .clr_043C54:hover {
    color: var(--t-info) !important;
}
html[data-theme="dark"] .clr_blue {
    color: var(--t-info) !important;
}
html[data-theme="dark"] .clr_gray {
    color: var(--t-muted) !important;
}
html[data-theme="dark"] .clr_darkgray {
    color: var(--t-text-2) !important;
}
/* страница 429: светлая плашка таймера */
html[data-theme="dark"] .rate-hero {
    background: var(--t-err-bg);
    border-color: var(--t-err-border);
}
/* ошибки в модалках входа: светлое правило по id с !important (#c0392b) */
html[data-theme="dark"] #modal-auth-email-error,
html[data-theme="dark"] #modal-auth-code-error,
html[data-theme="dark"] #authorization-password-error {
    color: var(--t-err) !important;
}
/* аспекты и тёмно-зелёная утилита (main-total.css, !important) */
html[data-theme="dark"] .clr-aspect--plus,
html[data-theme="dark"] .clr_darkgreen {
    color: var(--t-ok) !important;
}
html[data-theme="dark"] .clr-aspect--minus {
    color: var(--t-accent) !important;
}
html[data-theme="dark"] .clr-aspect--neutral {
    color: var(--t-muted) !important;
}
/* ссылки подвала (.clr_333.f_link a, !important) */
html[data-theme="dark"] .clr_333.f_link a,
html[data-theme="dark"] .clr_333.f_link_menu a {
    color: var(--t-text-2) !important;
}

/* == Иконки: чёрные PNG 28px (знаки зодиака, парс фортуны, демо-страницы) в тёмной - светлые; цветные planet-c не трогаем == */
html[data-theme="dark"] img[src*="/28px_"] {
    filter: invert(1) brightness(.85);
}

/* == Чёрные знаки зодиака images/sign/*.svg (прозрачный фон: детали астрокруга, прогрессии, управители и др.) - в тёмной светлые == */
html[data-theme="dark"] img[src*="/images/sign/"] {
    filter: invert(1) brightness(.85);
}

/* == Иконка переключателя темы: одна чёрная лампочка на прозрачном фоне, в тёмной - белая == */
html[data-theme="dark"] .theme-toggle__icon {
    filter: invert(1);
}
