/* ================================================================
   ТЁМНАЯ ТЕМА САЙТА
   Включается атрибутом data-theme="dark" на <html>.
   Тёмная палитра согласована с тёмными страницами видеоуроков.
   ================================================================ */

/* ---------- Кнопка переключения темы ---------- */
.theme-toggle {
    background: #eef0f5; color: #333;
    border: 1px solid #dde1e8; border-radius: 24px;
    padding: 7px 12px; cursor: pointer; font-size: 16px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: #e2e5ec; }
.theme-toggle-auth { position: fixed; top: 16px; right: 16px; z-index: 999; }
html[data-theme="dark"] .theme-toggle { background: #23262e; color: #f1f5f9; border-color: #2f3440; }
html[data-theme="dark"] .theme-toggle:hover { background: #2b2f3a; }

/* ---------- ОБЩЕЕ ДЛЯ ВСЕХ СТРАНИЦ ---------- */
html[data-theme="dark"] body {
    background: #0f1115;
    color: #e6e9f0;
}
html[data-theme="dark"] .flash.success {
    background: rgba(40, 167, 69, .16); color: #5ce08f; border-color: rgba(40, 167, 69, .35);
}
html[data-theme="dark"] .flash.danger {
    background: rgba(220, 53, 69, .16); color: #ff8d94; border-color: rgba(220, 53, 69, .35);
}
html[data-theme="dark"] .cookie-banner {
    background: #16181f; border-top-color: #262932; box-shadow: 0 -4px 24px rgba(0,0,0,.5);
}
html[data-theme="dark"] .cookie-banner p { color: #a0a8b8; }
html[data-theme="dark"] .legal-links { border-top-color: #23262e; color: #5c616d; }
html[data-theme="dark"] .legal-links a { color: #8a8f9c; }
html[data-theme="dark"] .legal-footer { border-top-color: #23262e; color: #5c616d; }
html[data-theme="dark"] .legal-footer a { color: #8a8f9c; }
html[data-theme="dark"] .text-danger { color: #ff8d94; }
html[data-theme="dark"] .text-success { color: #5ce08f; }
html[data-theme="dark"] .text-muted { color: #8a8f9c; }
html[data-theme="dark"] .bg-warning-light { background: rgba(255, 193, 7, .12); }
html[data-theme="dark"] .bg-danger-light { background: rgba(220, 53, 69, .12); }
html[data-theme="dark"] .promo-stats-card { background: #1a1d25; }

/* ---------- СТРАНИЦЫ ВХОДА, РЕГИСТРАЦИИ, ВОССТАНОВЛЕНИЯ ---------- */
html[data-theme="dark"] .auth-card { background: #171a21; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
html[data-theme="dark"] h1 { color: #f1f5f9; }
html[data-theme="dark"] label { color: #a0a8b8; }
html[data-theme="dark"] input {
    background: #1a1d25; color: #e6e9f0; border-color: #2b2f3a;
}
html[data-theme="dark"] input:focus { border-color: #5aa2ff; }
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: #1a1d25; color: #e6e9f0; border-color: #2b2f3a;
}
html[data-theme="dark"] .footer { color: #8a8f9c; }
html[data-theme="dark"] .footer a { color: #5aa2ff; }
html[data-theme="dark"] .consent-group label { color: #a0a8b8; }
html[data-theme="dark"] .consent-group label a { color: #5aa2ff; }
html[data-theme="dark"] .password-toggle { color: #8a8f9c; }
html[data-theme="dark"] .password-toggle:hover { color: #c3c8d4; }

/* ---------- КАБИНЕТ, ПРОФИЛЬ, РЕФЕРАЛЬНАЯ, КУРС ---------- */
html[data-theme="dark"] nav {
    background: #16181f;
    box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
html[data-theme="dark"] .logo { color: #f1f5f9; }
html[data-theme="dark"] .menu-card { background: #171a21; border-color: #262932; }
html[data-theme="dark"] .menu-card:hover { border-color: #3a3f4d; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
html[data-theme="dark"] .menu-card-header { color: #e6e9f0; }
html[data-theme="dark"] .menu-card-arrow { color: #5c616d; }
html[data-theme="dark"] .sub-status { border-color: #262932; }
html[data-theme="dark"] .status-active { color: #4cd07d; }
html[data-theme="dark"] .status-inactive { color: #ff6b6b; }
html[data-theme="dark"] .inner-accordion { border-color: #262932; }
html[data-theme="dark"] .inner-accordion-header { color: #e6e9f0; }
html[data-theme="dark"] .inner-accordion-header:hover { background: #1d2028; }
html[data-theme="dark"] .inner-accordion-arrow { color: #5c616d; }
html[data-theme="dark"] .tariff-card { border-color: #262932; }
html[data-theme="dark"] .tariff-card:hover { border-color: #3a3f4d; }
html[data-theme="dark"] .tariff-card.selected { border-color: #3b82f6; background: rgba(59, 130, 246, .12); }
html[data-theme="dark"] .tariff-name { color: #e6e9f0; }
html[data-theme="dark"] .tariff-price { color: #5aa2ff; }
html[data-theme="dark"] .tariff-discount { color: #4cd07d; }
html[data-theme="dark"] .tariff-old-price { color: #7a839a; }
html[data-theme="dark"] .tariff-separator { border-top-color: rgba(240, 160, 48, .4); color: #f0a030; }
html[data-theme="dark"] .tariff-card.test-tariff { border-color: rgba(240, 160, 48, .5); }
html[data-theme="dark"] .tariff-card.test-tariff.selected { border-color: #e8960a; background: rgba(232, 150, 10, .12); }
html[data-theme="dark"] .modal-content { background: #1d2028; }
html[data-theme="dark"] .modal-content h2 { color: #f1f5f9; }
html[data-theme="dark"] .modal-content p { color: #a0a8b8; }
html[data-theme="dark"] .modal-content input { background: #1a1d25; color: #e6e9f0; border-color: #2b2f3a; }
html[data-theme="dark"] .email-card { background: #171a21; border-color: #262932; }
html[data-theme="dark"] .email-card span { color: #a0a8b8; }
html[data-theme="dark"] .form-group label { color: #a0a8b8; }
html[data-theme="dark"] .cache-info { background: #1a1d25; color: #a0a8b8; }
html[data-theme="dark"] .ref-link { background: #1a1d25; color: #a0a8b8; }
html[data-theme="dark"] .stat-card { background: #1a1d25; border-color: #262932; }
html[data-theme="dark"] .stat-value { color: #5aa2ff; }
html[data-theme="dark"] .stat-label { color: #8a8f9c; }
html[data-theme="dark"] .balance { color: #4cd07d; }
html[data-theme="dark"] .total-earned { color: #4ec3d3; }
html[data-theme="dark"] table th { background: #1a1d25; color: #a0a8b8; }
html[data-theme="dark"] table th, html[data-theme="dark"] table td { border-bottom-color: #262932; }
html[data-theme="dark"] .conditions { background: #1a1d25; }
html[data-theme="dark"] .conditions h3 { color: #e6e9f0; }
html[data-theme="dark"] .level-btn { background: #23262e; color: #a0a8b8; }
html[data-theme="dark"] .level-btn.active { background: #007bff; color: #fff; }
html[data-theme="dark"] .status-pending { background: rgba(255, 193, 7, .18); color: #ffd75e; }
html[data-theme="dark"] .status-paid { background: rgba(40, 167, 69, .2); color: #5ce08f; }
html[data-theme="dark"] .status-rejected { background: rgba(220, 53, 69, .2); color: #ff8d94; }
html[data-theme="dark"] .warning { background: rgba(255, 193, 7, .12); border-left-color: #f0a030; color: #d4b06a; }
html[data-theme="dark"] .btn-outline { background: #1a1d25; color: #a0a8b8; border-color: #2b2f3a; }
html[data-theme="dark"] .btn-outline:hover { background: #23262e; }
html[data-theme="dark"] .applied-promo-info { background: rgba(40, 167, 69, .15); color: #5ce08f; }
html[data-theme="dark"] .promo-expiry { color: #8a8f9c; }
html[data-theme="dark"] .promo-history-info { color: #8a8f9c; }
html[data-theme="dark"] .support-form-group input,
html[data-theme="dark"] .support-form-group textarea,
html[data-theme="dark"] .support-user-reply-form textarea {
    background: #1a1d25; color: #e6e9f0; border-color: #2b2f3a;
}
html[data-theme="dark"] .support-user-reply-form { border-top-color: #262932; }
html[data-theme="dark"] .ticket-user-msg { background: #2a2416; color: #d8cfae; }
html[data-theme="dark"] .ticket-meta-text { color: #8a8f9c; }
html[data-theme="dark"] .ticket-reply-bubble[style] { background-color: #1f232c !important; color: #dbe1ea !important; }
html[data-theme="dark"] .text-gray-600 { color: #8a8f9c; }
html[data-theme="dark"] .text-primary { color: #5aa2ff; }
html[data-theme="dark"] .course-dev { background: #1a1d25 !important; color: #8a8f9c !important; }
html[data-theme="dark"] .course-pay-soon { background: rgba(255, 193, 7, .14) !important; color: #f0c060 !important; }

/* ---------- СТРАНИЦА КУРСА ---------- */
html[data-theme="dark"] .lesson-card { background: #171a21; border-color: #262932; }
html[data-theme="dark"] .lesson-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,.5); }
html[data-theme="dark"] .lesson-title { color: #f1f5f9; }
html[data-theme="dark"] .lesson-desc { color: #a0a8b8; }
html[data-theme="dark"] .lesson-meta { color: #8a8f9c; }
html[data-theme="dark"] .status-done { background: rgba(76, 208, 125, .16); color: #4cd07d; }
html[data-theme="dark"] .status-open { background: rgba(90, 162, 255, .16); color: #7ba0ff; }
html[data-theme="dark"] .status-locked { background: #23262e; color: #8a8f9c; }
html[data-theme="dark"] .lesson-card.locked .lesson-num { background: #2b2f3a; }
html[data-theme="dark"] .lesson-arrow { color: #5c616d; }
html[data-theme="dark"] .back-dash { background: #23262e; color: #e6e9f0; }
html[data-theme="dark"] .back-dash:hover { background: #2b2f3a; }

/* ---------- ГЕНЕРАТОР КАРУСЕЛЕЙ И РИЛС, ИНСТРУМЕНТЫ ---------- */
html[data-theme="dark"] .tools-header { background: #16181f; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
html[data-theme="dark"] .tools-header h1 { color: #f1f5f9; }
html[data-theme="dark"] .vpn-bar { background: rgba(255, 193, 7, .12); color: #f0c060; }
html[data-theme="dark"] .vpn-warning { background: rgba(255, 193, 7, .12); color: #f0c060; }
html[data-theme="dark"] .mode-tabs, html[data-theme="dark"] .donor-mode-tabs { background: #171a21; border-color: #262932; }
html[data-theme="dark"] .tabs { background: #171a21; border-color: #262932; }
html[data-theme="dark"] .tab-btn { background: #1a1d25; color: #a0a8b8; border-right-color: #262932; }
html[data-theme="dark"] .tab-btn:hover { background: #1d2028; }
html[data-theme="dark"] .tab-btn.active { background: #007bff; color: #fff; }
html[data-theme="dark"] .mode-tab, html[data-theme="dark"] .donor-mode-tab { background: #1a1d25; color: #a0a8b8; }
html[data-theme="dark"] .mode-tab:not(:last-child), html[data-theme="dark"] .donor-mode-tab:not(:last-child) { border-right-color: #262932; }
html[data-theme="dark"] .mode-tab.active, html[data-theme="dark"] .donor-mode-tab.active { background: #007bff; color: #fff; }
html[data-theme="dark"] .settings-section, html[data-theme="dark"] .settings-panel { background: #171a21; border-color: #262932; }
html[data-theme="dark"] .section-header { background: #1a1d25; border-bottom-color: #262932; }
html[data-theme="dark"] .section-header:hover { background: #1d2028; }
html[data-theme="dark"] .section-header .step-arrow { color: #8a8f9c; }
html[data-theme="dark"] .section-content { background: #171a21; }
html[data-theme="dark"] .card { background: #171a21; border-color: #262932; }
html[data-theme="dark"] .card h2 { color: #f1f5f9; }
html[data-theme="dark"] .card p { color: #a0a8b8; }
html[data-theme="dark"] .upload-zone { border-color: #2b2f3a; }
html[data-theme="dark"] .upload-zone:hover, html[data-theme="dark"] .upload-zone.dragover { border-color: #5aa2ff; background: rgba(59, 130, 246, .1); }
html[data-theme="dark"] .upload-zone .text { color: #a0a8b8; }
html[data-theme="dark"] .upload-zone .hint { color: #8a8f9c; }
html[data-theme="dark"] .editor-panel, html[data-theme="dark"] .preview-panel,
html[data-theme="dark"] .editor-wrapper, html[data-theme="dark"] .preview-layer-container { background: #171a21; }
html[data-theme="dark"] .editor-textarea-container,
html[data-theme="dark"] .instagram-textarea,
html[data-theme="dark"] .tiptap-editor {
    background: #1a1d25; color: #e6e9f0; border-color: #2b2f3a;
}
html[data-theme="dark"] .range-row { color: #a0a8b8; }
html[data-theme="dark"] .range-value { color: #e6e9f0; }
html[data-theme="dark"] .label-hint, html[data-theme="dark"] .photo-hint, html[data-theme="dark"] .fit-warning { color: #8a8f9c; }
html[data-theme="dark"] .preview-slide-card, html[data-theme="dark"] .slide-item,
html[data-theme="dark"] .slide-skeleton { border-color: #262932; }
html[data-theme="dark"] .slides-grid { border-color: #262932; }
html[data-theme="dark"] .tool-btn, html[data-theme="dark"] .ig-toolbar-btn,
html[data-theme="dark"] .nav-btn { background: #23262e; color: #e6e9f0; border-color: #2f3440; }
html[data-theme="dark"] .tool-btn:hover, html[data-theme="dark"] .ig-toolbar-btn:hover,
html[data-theme="dark"] .nav-btn:hover { background: #2b2f3a; }
html[data-theme="dark"] .tool-btn.active { background: #007bff; color: #fff; }
html[data-theme="dark"] .ig-toolbar { background: #16181f; border-color: #262932; }
html[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.7); }
html[data-theme="dark"] .dropdown-menu, html[data-theme="dark"] .dropdown-wrapper { background: #1d2028; border-color: #2f3440; }
html[data-theme="dark"] .setting-row, html[data-theme="dark"] .block-header,
html[data-theme="dark"] .sub-section, html[data-theme="dark"] .editor-toolbar { border-color: #262932; }
html[data-theme="dark"] .progress-text, html[data-theme="dark"] .progress-header-text { color: #8a8f9c; }

/* ---------- ЮРИДИЧЕСКИЕ СТРАНИЦЫ ---------- */
html[data-theme="dark"] .top-bar { background: #16181f; border-bottom-color: #262932; }
html[data-theme="dark"] .top-bar ~ .container { background: #171a21; box-shadow: 0 4px 24px rgba(0,0,0,.4); }
html[data-theme="dark"] .top-bar a { color: #5aa2ff; }
html[data-theme="dark"] .top-bar .sep { color: #3a3f4d; }
html[data-theme="dark"] .top-bar .current { color: #8a8f9c; }
html[data-theme="dark"] h1 { color: #f1f5f9; }
html[data-theme="dark"] h2 { color: #e6e9f0; border-top-color: #262932; }
html[data-theme="dark"] h3 { color: #dbe1ea; }
html[data-theme="dark"] p, html[data-theme="dark"] ul, html[data-theme="dark"] ol, html[data-theme="dark"] li { color: #a0a8b8; }
html[data-theme="dark"] .last-updated { color: #8a8f9c; }
html[data-theme="dark"] .highlight-box { background: #1a1d25; border-color: #262932; }
html[data-theme="dark"] .warning-box { background: rgba(255, 193, 7, .12); border-color: #f0a030; }
html[data-theme="dark"] .warning-box p { color: #d4b06a; }
html[data-theme="dark"] .cookie-table th { background: #1a1d25; color: #a0a8b8; border-bottom-color: #262932; }
html[data-theme="dark"] .cookie-table td { border-bottom-color: #262932; color: #a0a8b8; }
html[data-theme="dark"] .legal-footer-note { border-top-color: #262932; color: #8a8f9c; }
