/* ==============================================
   DARK THEME - тёмная тема для всего приложения
   Применяется через класс .dark-theme на <body>
   ============================================== */

/* ── Общее ── */
body.dark-theme {
    background: #181818;
    color: #e1e1e1;
    --card-bg: #212121;
    --input-bg: #181818;
    --text-primary: #e1e1e1;
    --text-secondary: #94a3b8;
}

/* ── Карточки (main.css) ── */
body.dark-theme .card {
    background: rgba(24, 24, 24, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-color: #3a3a3a;
}

body.dark-theme .card-header {
    border-bottom-color: #3a3a3a;
}

body.dark-theme .card-title {
    color: #e1e1e1;
}

body.dark-theme .card-body {
    color: #cccccc;
}

/* ── Карточки статуса (.status-card / .status-item) ── */

body.dark-theme .status-text {
    color: #86efac !important;
}

/* ── Информационные блоки (.info-box) ── */
body.dark-theme .info-box { background: var(--au-info-soft) !important; border: 1px solid var(--au-info-line) !important; border-radius: var(--au-radius-sm) !important; }

body.dark-theme .info-box-title,
body.dark-theme .info-box-icon { color: var(--au-info) !important; }

body.dark-theme .info-box-content { color: var(--au-text-2) !important; }

/* ── Сайдбар ── */
/* ── Текст ── */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: #e1e1e1;
}

body.dark-theme .subtitle {
    color: #aaaaaa;
}

/* ── Формы ── */
body.dark-theme input[type="text"],
body.dark-theme input[type="password"],
body.dark-theme input[type="email"],
body.dark-theme input[type="number"],
body.dark-theme input[type="search"],
body.dark-theme select,
body.dark-theme textarea {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme input[type="text"]:focus,
body.dark-theme input[type="password"]:focus,
body.dark-theme input[type="email"]:focus,
body.dark-theme input[type="number"]:focus,
body.dark-theme input[type="search"]:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
    border-color: #818cf8 !important;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #777777 !important;
}

body.dark-theme select option {
    background: #212121;
    color: #e1e1e1;
}

/* ── Таблицы ── */
body.dark-theme table {
    background: rgba(24, 24, 24, 0.95);
}

body.dark-theme th {
    background: #212121;
    color: #aaaaaa;
    border-color: #3a3a3a;
}

body.dark-theme td {
    border-color: #3a3a3a;
    color: #cccccc;
}

body.dark-theme tr:hover td {
    background: rgba(33, 33, 33, 0.8);
}

body.dark-theme tbody tr:nth-child(even) {
    background: rgba(24, 24, 24, 0.5);
}

/* ── Разделители ── */
body.dark-theme hr,
body.dark-theme .divider {
    border-color: #3a3a3a;
}

/* ── Кнопки ── */

/* ── Модальные окна ── */
body.dark-theme .modal-content {
    background: #212121 !important;
    border-color: #3a3a3a !important;
    color: #e1e1e1 !important;
}

body.dark-theme .modal-header {
    border-bottom-color: #3a3a3a;
}

body.dark-theme .modal-footer {
    border-top-color: #3a3a3a;
}

/* ── Страница настроек ── */
body.dark-theme .settings-container {
    background: transparent;
}

body.dark-theme .setting-card { background: var(--au-card) !important; border: 1px solid var(--au-line) !important; border-radius: var(--au-radius) !important; color: var(--au-text); box-shadow: var(--au-shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

body.dark-theme .setting-header { border-bottom: 1px solid var(--au-line) !important; }

body.dark-theme .setting-title { color: var(--au-text) !important; }

body.dark-theme .setting-description { color: var(--au-muted) !important; }

/* ── Тогл-контейнер ── */
body.dark-theme .toggle-container { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }

body.dark-theme .toggle-label { color: var(--au-text) !important; }

body.dark-theme .toggle-hint { color: var(--au-muted) !important; }

/* ── VDS/VPS блоки ── */
body.dark-theme .vds-uptime-bar { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }

body.dark-theme .vds-uptime-label { color: var(--au-muted) !important; }

body.dark-theme .vds-uptime-value { color: var(--au-text) !important; }

body.dark-theme .vds-metric-card { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }

body.dark-theme .vds-metric-card:hover { border-color: var(--au-accent-line) !important; }

body.dark-theme .vds-metric-title { color: var(--au-text) !important; }

body.dark-theme .vds-metric-details { color: var(--au-muted) !important; }

body.dark-theme .vds-progress-bar { background: var(--au-surface-2) !important; }

body.dark-theme .vds-progress-label { color: var(--au-text) !important; }

body.dark-theme .vds-network-bar { background: var(--au-info-soft) !important; border: 1px solid var(--au-info-line) !important; }

body.dark-theme .vds-network-label,
body.dark-theme .vds-network-value { color: var(--au-info) !important; }

body.dark-theme .vds-controls { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }

body.dark-theme .vds-collector-label { color: var(--au-muted) !important; }

body.dark-theme .vds-collector-running { background: var(--au-ok-soft) !important; color: var(--au-ok) !important; }

body.dark-theme .vds-collector-stopped { background: var(--au-err-soft) !important; color: var(--au-err) !important; }

body.dark-theme .vds-btn-secondary { background: var(--au-surface-2) !important; color: var(--au-text-2) !important; border-color: var(--au-line-strong) !important; }

body.dark-theme .vds-btn-secondary:hover { border-color: var(--au-accent-line) !important; color: var(--au-text) !important; }

body.dark-theme .vds-error { background: var(--au-err-soft) !important; border-color: var(--au-err-line) !important; color: var(--au-err) !important; }

/* ── Таблица аккаунтов (inline styles override) ── */
/* Обёртка таблицы аккаунтов */
body.dark-theme .accounts-table-wrapper {
    border-color: #3a3a3a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

body.dark-theme #accountsTable {
    background: #1a1a1a !important;
}

body.dark-theme #accountsTable tbody tr {
    border-bottom-color: #2a2a2a !important;
    background: #1a1a1a !important;
    color: #cccccc !important;
}

body.dark-theme #accountsTable tbody tr:hover {
    background: #242424 !important;
}

body.dark-theme #accountsTable td {
    color: #cccccc !important;
}

body.dark-theme .acc-name {
    color: #e1e1e1 !important;
}

body.dark-theme .acc-added-by,
body.dark-theme .acc-date {
    color: #666666 !important;
}

body.dark-theme .acc-no-perm {
    color: #555555 !important;
}

/* Badges ролей */
body.dark-theme .acc-role-admin {
    background: rgba(109, 40, 217, 0.25) !important;
    color: #c4b5fd !important;
}

body.dark-theme .acc-role-sub {
    background: rgba(3, 105, 161, 0.25) !important;
    color: #7dd3fc !important;
}

body.dark-theme .acc-role-default {
    background: rgba(80, 80, 80, 0.35) !important;
    color: #aaaaaa !important;
}

/* Badges разрешений (perm-badge) */

/* perm-dot (секции с правами в таблице аккаунтов) */
body.dark-theme .perm-dot-edit { background: var(--au-ok-soft) !important; color: var(--au-ok) !important; }

body.dark-theme .perm-dot-view { background: var(--au-info-soft) !important; color: var(--au-info) !important; }

/* Кнопки действий */
body.dark-theme .acc-btn-perms {
    background: rgba(55, 48, 163, 0.3) !important;
    color: #a5b4fc !important;
}

body.dark-theme .acc-btn-pass {
    background: rgba(120, 53, 15, 0.3) !important;
    color: #fcd34d !important;
}

body.dark-theme .acc-btn-delete {
    background: rgba(153, 27, 27, 0.3) !important;
    color: #fca5a5 !important;
}

/* ── Поле ввода пароля (.my-pass-input) ── */
body.dark-theme .my-pass-input { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

body.dark-theme .my-pass-input:focus { border-color: var(--au-accent) !important; background: var(--au-card-solid) !important; box-shadow: 0 0 0 4px var(--au-focus) !important; }

body.dark-theme .my-pass-field label { color: var(--au-muted) !important; }

body.dark-theme .my-pass-eye { color: var(--au-faint) !important; }

body.dark-theme .my-pass-eye:hover { color: var(--au-accent-ink) !important; }

/* ── Карточки курсов валют (.rate-card) - inline-style override ── */
body.dark-theme .rate-card { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; color: var(--au-text) !important; }

body.dark-theme .rate-card * { color: var(--au-text) !important; }

/* ── Блок последнего обновления (.last-update-container) - inline-style override ── */
body.dark-theme .last-update-container { background: var(--au-ok-soft) !important; border: 1px solid var(--au-ok-line) !important; }

body.dark-theme .last-update-container * { color: var(--au-ok) !important; }

/* ── auto-refresh badge ── */
body.dark-theme .auto-refresh {
    background: #212121 !important;
    color: #aaaaaa !important;
}

/* ── Страница редактора (ag-grid) ── */

/* ── Бейджи / теги ── */
body.dark-theme .badge,
body.dark-theme .tag {
    background: #212121;
    color: #aaaaaa;
    border-color: #3a3a3a;
}

/* ── Прогресс-бары ── */
body.dark-theme .progress-track {
    background: #3a3a3a;
}

/* ── Уведомления ── */
body.dark-theme .alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

body.dark-theme .alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.dark-theme .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

body.dark-theme .alert-danger,
body.dark-theme .error {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

/* ── Страница логина ── */

/* ── Скроллбар ── */
body.dark-theme ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: #181818;
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 4px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #777777;
}

/* ── Переключатель темы ── */

/* ── acc-modal-header (уже colorful, ok) ── */

/* ── Прочие inline-style блоки в settings.html ── */

/* Блок "Последнее обновление" у автообновления min_price */
body.dark-theme [style*="#f0fdf4"],
body.dark-theme .u-effabcdab5,
body.dark-theme .u-b7230594fb,
body.dark-theme .u-5f240bb932,
body.dark-theme .u-ba2d079f90,
body.dark-theme .u-79f719ccdb,
body.dark-theme .u-cc54cc6333 {
    background: linear-gradient(135deg, #052e16 0%, #14532d 100%) !important;
    border-color: #166534 !important;
}

body.dark-theme [style*="#dcfce7"],
body.dark-theme .u-5f240bb932,
body.dark-theme .u-ba2d079f90,
body.dark-theme .u-79f719ccdb {
    background: linear-gradient(135deg, #052e16 0%, #14532d 100%) !important;
}

/* Блок с синим фоном */
body.dark-theme [style*="#dbeafe"],
body.dark-theme [style*="#bfdbfe"],
body.dark-theme .u-489df67015,
body.dark-theme .u-68a9b7cbbf,
body.dark-theme .u-123b6c99b6,
body.dark-theme .u-a3e0d16f48,
body.dark-theme .u-c6b101ee26,
body.dark-theme .u-6359669067,
body.dark-theme .u-8b0e40d74e,
body.dark-theme .u-a8b896768f,
body.dark-theme .u-e9e30d7ed0 {
    background: linear-gradient(135deg, #0c1a2e 0%, #0f2041 100%) !important;
    border-color: #1e3a5f !important;
}

/* Жёлтый блок */
body.dark-theme [style*="#fef3c7"],
body.dark-theme [style*="#fde68a"],
body.dark-theme .u-b92a9b5833,
body.dark-theme .u-cf0ae71659,
body.dark-theme .u-2d085592a9,
body.dark-theme .u-dfc40c28c8,
body.dark-theme .u-3820a3420d {
    background: linear-gradient(135deg, #1a1200 0%, #291e00 100%) !important;
    border-color: #3d2e00 !important;
}

/* Фиолетовый блок */
body.dark-theme [style*="#f5f3ff"],
body.dark-theme .u-bbabd15f4d,
body.dark-theme .u-4da8e8cdd4,
body.dark-theme .u-b7166d465a,
body.dark-theme .u-56002ab510,
body.dark-theme .u-17fc9d44ca {
    background: linear-gradient(135deg, #1a0a2e 0%, #240f3d 100%) !important;
    border-color: #3b1f5e !important;
}

/* Оранжевый/кремовый блок (напр. иконка "Настройки" на дашборде) */
body.dark-theme .u-fdcdc7dbc1,
body.dark-theme .u-411a835cc9 {
    background: linear-gradient(135deg, #2e1a0a 0%, #3d240f 100%) !important;
    border-color: #5e3b1f !important;
}

/* Розовый блок (иконка «Kaspi маркетинг» на дашборде) */
body.dark-theme .u-869bf13a93 {
    background: linear-gradient(135deg, #2e0a1f 0%, #3d0f2a 100%) !important;
    border-color: #5e1f43 !important;
    color: #e5e7eb !important;
}

/* Зелёный блок */
body.dark-theme [style*="#d1fae5"],
body.dark-theme .u-3068b45c9f,
body.dark-theme .u-4cf3b6ad01,
body.dark-theme .u-a0d3a39d74,
body.dark-theme .u-dee6b45b1d,
body.dark-theme .u-6558328d0d {
    background: linear-gradient(135deg, #052e16 0%, #0f3320 100%) !important;
    border-color: #166534 !important;
}

/* ── Все inline-style тексты с тёмными цветами ── */
body.dark-theme [style*="color: #1e293b"],
body.dark-theme .u-6cf6e41b54,
body.dark-theme .u-9611e2740e,
body.dark-theme .u-19a3f41f14,
body.dark-theme .u-9577115221,
body.dark-theme .u-2deacc9d15,
body.dark-theme .u-3f40466233,
body.dark-theme .u-0db1054d11,
body.dark-theme .u-731951209f,
body.dark-theme .u-7800c02c49,
body.dark-theme .u-beffc789d6,
body.dark-theme .u-7ebd33e36e {
    color: #e1e1e1 !important;
}

body.dark-theme [style*="color: #64748b"],
body.dark-theme [style*="color:#64748b"],
body.dark-theme .u-bea91b80b9,
body.dark-theme .u-bf544a29f6,
body.dark-theme .u-090da8d2e2,
body.dark-theme .u-fafd904ae7,
body.dark-theme .u-21db016347,
body.dark-theme .u-f38135296b,
body.dark-theme .u-31d703835b,
body.dark-theme .u-9ca44c1a57,
body.dark-theme .u-2a678e2a58,
body.dark-theme .u-d9576150bd,
body.dark-theme .u-e5ac781b98,
body.dark-theme .u-d12183e20c,
body.dark-theme .u-ee15200773,
body.dark-theme .u-bf47fc8966,
body.dark-theme .u-60ea7e0e85,
body.dark-theme .u-55d733143c,
body.dark-theme .u-2ddd3b9d27,
body.dark-theme .u-ee2acfc5ee,
body.dark-theme .u-a9fe4bc0ce,
body.dark-theme .u-821454dda9,
body.dark-theme .u-7bac2dae3f,
body.dark-theme .u-c71fbfa234,
body.dark-theme .u-5d8cd6118d,
body.dark-theme .u-f2e9807dd4,
body.dark-theme .u-e4f059e24c,
body.dark-theme .u-486868a95e,
body.dark-theme .u-93e6231cbb,
body.dark-theme .u-b85200d41d {
    color: #aaaaaa !important;
}

body.dark-theme [style*="color: #065f46"],
body.dark-theme .u-c4ebfb2d86,
body.dark-theme .u-bab0f11073,
body.dark-theme .u-4752c62ea9,
body.dark-theme .u-dee6b45b1d,
body.dark-theme .u-6558328d0d,
body.dark-theme .u-54aecba295 {
    color: #6ee7b7 !important;
}

body.dark-theme [style*="color: #047857"],
body.dark-theme .u-0ab24fa293,
body.dark-theme .u-1c89a05789 {
    color: #4ade80 !important;
}

body.dark-theme [style*="color:#6b7280"],
body.dark-theme .u-28cd427249,
body.dark-theme .u-7e00c08fc3,
body.dark-theme .u-0c017d2923 {
    color: #aaaaaa !important;
}

/* Разделители в inline-style */
body.dark-theme [style*="background: #e2e8f0"],
body.dark-theme .u-e82095249d,
body.dark-theme .u-f8c0006b1d,
body.dark-theme .u-212cdd2913 {
    background: #3a3a3a !important;
}

body.dark-theme [style*="background: #f1f5f9"],
body.dark-theme [style*="background:#f1f5f9"],
body.dark-theme .u-5952cde0c6,
body.dark-theme .u-f541d975fe,
body.dark-theme .u-0acf6f4aae,
body.dark-theme .u-2ddd3b9d27,
body.dark-theme .u-6c1b20a303 {
    background: #212121 !important;
}

body.dark-theme [style*="background: #f8fafc"],
body.dark-theme .u-0c017d2923,
body.dark-theme .u-2d89373e9e {
    background: #181818 !important;
}

/* ── Inline border colors ── */
body.dark-theme [style*="border: 2px solid #86efac"],
body.dark-theme [style*="border: 2px solid #e2e8f0"],
body.dark-theme .u-b7230594fb,
body.dark-theme .u-5f240bb932,
body.dark-theme .u-6cf6e41b54,
body.dark-theme .u-9611e2740e,
body.dark-theme .u-35b5531537,
body.dark-theme .u-ef455ddcf2,
body.dark-theme .u-999544673f {
    border-color: #3a3a3a !important;
}

/* ── Глобальный контейнер миниатюрных окон ── */
body.dark-theme .global-minimized-container {
    background: transparent;
}

body.dark-theme .global-minimized-window {
    background: linear-gradient(135deg, #3730a3 0%, #5b21b6 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(129, 140, 248, 0.25) !important;
}

body.dark-theme .global-minimized-window:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
    border-color: rgba(129, 140, 248, 0.4) !important;
}

body.dark-theme .global-minimized-title {
    color: #e1e1e1 !important;
}

body.dark-theme .global-minimized-subtitle {
    color: rgba(225, 225, 225, 0.75) !important;
}

body.dark-theme .global-minimized-close {
    color: rgba(225, 225, 225, 0.7) !important;
}

body.dark-theme .global-minimized-close:hover {
    color: #e1e1e1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px;
}

/* ── Локальное (старое) миниатюрное окно внутри модалок ── */
body.dark-theme .modal-minimized-window {
    background: linear-gradient(135deg, #3730a3 0%, #5b21b6 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(129, 140, 248, 0.25) !important;
}

body.dark-theme .modal-minimized-window:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .modal-minimized-title {
    color: #e1e1e1 !important;
}

body.dark-theme .modal-minimized-subtitle {
    color: rgba(225, 225, 225, 0.75) !important;
}

body.dark-theme .modal-minimized-close {
    color: rgba(225, 225, 225, 0.8) !important;
}

/* ── Модальные окна аккаунтов (.acc-modal-*) ── */

/* Тело модала "Удалить" и "CNY" - внутренние элементы с белым фоном */

/* Inline div разделителей внутри модалов */

/* ── Дружественные магазины / Telegram элементы ── */
body.dark-theme .merchant-item { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }

body.dark-theme .merchant-item:hover { border-color: var(--au-accent-line) !important; }

body.dark-theme .merchant-name { color: var(--au-text) !important; }

body.dark-theme .merchant-id { color: var(--au-muted) !important; }

body.dark-theme .merchant-strategy-select { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

/* ── Форма добавления (магазины/telegram) ── */
body.dark-theme .friendly-merchants-form { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }

body.dark-theme .friendly-merchants-form-title { color: var(--au-text) !important; }

body.dark-theme .form-field-label { color: var(--au-muted) !important; }

body.dark-theme .form-field-input { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

body.dark-theme .form-field-select { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

body.dark-theme .friendly-merchants-form label { background: var(--au-surface-2) !important; border-color: var(--au-line) !important; }

body.dark-theme .friendly-merchants-form label span { color: var(--au-text) !important; }

/* ── Модал загрузки обновления ── */

/* ── Китайский новый год - блок дней ── */
body.dark-theme .cny-days-container { background: var(--au-warn-soft) !important; border: 1px solid var(--au-warn-line) !important; }

body.dark-theme .cny-days-label span:first-child { color: var(--au-warn) !important; }

body.dark-theme .cny-days-hint { color: var(--au-muted) !important; }

body.dark-theme .cny-days-btn { background: var(--au-card-solid) !important; border-color: var(--au-warn-line) !important; color: var(--au-warn) !important; }

body.dark-theme .cny-days-input { background: var(--au-card-solid) !important; border-color: var(--au-warn-line) !important; color: var(--au-warn) !important; }

/* ══════════════════════════════════════════════════════════════
   КУРСЫ ВАЛЮТ И ДОСТАВКА - Kaspi Delivery тарифы
   ══════════════════════════════════════════════════════════════ */

/* НДС строка */
body.dark-theme .kd-vat-row { background: var(--au-info-soft) !important; border-color: var(--au-info-line) !important; }
body.dark-theme .kd-vat-label { color: var(--au-info) !important; }
body.dark-theme .kd-vat-pct { color: var(--au-info) !important; }
body.dark-theme .kd-vat-badge { background: var(--au-info-soft) !important; color: var(--au-info) !important; }
body.dark-theme .kd-vat-input { background: var(--au-card-solid) !important; border-color: var(--au-info-line) !important; color: var(--au-info) !important; }

/* Блок "до 10 000 ₸" */
body.dark-theme .kd-tier-block--small { border-color: var(--au-warn-line) !important; }

/* Блок "10 000 ₸ и более" */
body.dark-theme .kd-tier-block--large { border-color: var(--au-ok-line) !important; }

/* Общий заголовок тира */
body.dark-theme .kd-tier-title { color: var(--au-text-2) !important; }

/* Заголовки колонок */
body.dark-theme .kd-col-headers { color: var(--au-faint) !important; }
body.dark-theme .kd-col-headers > div { color: var(--au-faint) !important; }

/* Строки тарифной сетки */
body.dark-theme .kd-tier-body { background: var(--au-surface) !important; }
body.dark-theme .kd-tier-row { background: var(--au-surface-2) !important; }

/* Все инпуты таблицы */
body.dark-theme .kd-input--minmax { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text-2) !important; }

/* Налог, комиссия, стоимость доставки - инпуты */
body.dark-theme .kd-default-input { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text-2) !important; }
body.dark-theme .kd-pct-text { color: var(--au-muted) !important; }
body.dark-theme .kd-delivery-label { color: var(--au-muted) !important; }

/* Кнопка «Сбросить к умолчаниям» */
body.dark-theme .kd-reset-btn { background: var(--au-err-soft) !important; border-color: var(--au-err-line) !important; color: var(--au-err) !important; }
body.dark-theme .kd-reset-btn:hover { background: var(--au-err-soft) !important; border-color: var(--au-err) !important; }

/* Блок описания тарифов (#f8fafc фон) */
body.dark-theme .kd-info-note { background: var(--au-surface) !important; border-left-color: var(--au-line-strong) !important; color: var(--au-muted) !important; }

/* ══════════════════════════════════════════════════════════════
   АВТООЧИСТКА ЛОГОВ (/settings/ - секция Автоочистка логов)
   ══════════════════════════════════════════════════════════════ */

/* Строка интервала (серо-белый фон) */
body.dark-theme .lc-interval-row { background: var(--au-surface) !important; border-color: var(--au-line) !important; }

body.dark-theme .lc-interval-text { color: var(--au-muted) !important; }

body.dark-theme .lc-section-title { color: var(--au-faint) !important; }

body.dark-theme .lc-badge { background: var(--au-surface-2) !important; color: var(--au-muted) !important; }

/* Кнопки +/- для интервала (без onmouseover, только CSS) */
body.dark-theme .lc-days-btn { background: var(--au-card-solid) !important; border-color: var(--au-accent-line) !important; color: var(--au-accent-ink) !important; }

body.dark-theme .lc-days-btn:hover { background: var(--au-accent) !important; color: #ffffff !important; }

/* Разделы: Репрайсинг (purple) */
body.dark-theme .lc-section-label--reprice { background: var(--au-accent-soft) !important; border-color: var(--au-accent-line) !important; }

body.dark-theme .lc-section-label--reprice:hover { border-color: var(--au-accent) !important; }

/* Разделы: Kaspi Upload (yellow/amber) */
body.dark-theme .lc-section-label--upload { background: var(--au-warn-soft) !important; border-color: var(--au-warn-line) !important; }

body.dark-theme .lc-section-label--upload:hover { border-color: var(--au-warn) !important; }

/* Разделы: Заказы (green) */
body.dark-theme .lc-section-label--orders { background: var(--au-ok-soft) !important; border-color: var(--au-ok-line) !important; }

body.dark-theme .lc-section-label--orders:hover { border-color: var(--au-ok) !important; }

/* Название раздела */
body.dark-theme .lc-item-name { color: var(--au-text-2) !important; }

/* Последняя очистка */
body.dark-theme .lc-last-run-box { background: var(--au-ok-soft) !important; border-color: var(--au-ok-line) !important; }

body.dark-theme .lc-last-run-label { color: var(--au-ok) !important; }

body.dark-theme .lc-last-run-date { color: var(--au-ok) !important; }

/* ── Разделы очистки логов (light purple inline styles) ── */
body.dark-theme .u-1c16939e48,
body.dark-theme .u-e04fb2c704,
body.dark-theme .u-d93e99e3f8 {
    background: linear-gradient(135deg, #1e0a2e 0%, #281239 100%) !important;
    border-color: #4c1d95 !important;
}

/* ── НДС строка (inline #f0f9ff) ── */
body.dark-theme [style*="#f0f9ff"],
body.dark-theme .u-1fca04a0ff,
body.dark-theme .u-778e8452c9 {
    background: linear-gradient(135deg, #0c1a2e 0%, #0f2041 100%) !important;
    border-color: #1e3a5f !important;
}

/* ── Inline text colors overrides ── */
body.dark-theme .u-12908c88ff,
body.dark-theme .u-9aba61c47c,
body.dark-theme .u-0da75a5c03,
body.dark-theme .u-0c93efb85b,
body.dark-theme .u-63e4f6d376 {
    color: #7dd3fc !important;
}

body.dark-theme [style*="color: #475569"],
body.dark-theme [style*="color:#475569"],
body.dark-theme .u-22c61776a6,
body.dark-theme .u-a0b3d08132,
body.dark-theme .u-088c95d9c1 {
    color: #aaaaaa !important;
}

/* ── Inline badge #e0f2fe (применяется к тарифу) ── */
body.dark-theme .u-0c93efb85b {
    background: rgba(3, 105, 161, 0.25) !important;
    color: #7dd3fc !important;
}

/* ── Inputs с inline белым фоном ── */
body.dark-theme input[style*="background: #fff"],
body.dark-theme input[style*="background:#fff"],
body.dark-theme input[style*="background: white"],
body.dark-theme input.u-9aba61c47c,
body.dark-theme input.u-0ae6b0e160,
body.dark-theme input.u-60ef6411d7,
body.dark-theme input.u-fdcdc7dbc1,
body.dark-theme input.u-a176d449e4,
body.dark-theme input.u-25cc548c5b,
body.dark-theme input.u-68a9b7cbbf,
body.dark-theme input.u-123b6c99b6,
body.dark-theme input.u-411a835cc9,
body.dark-theme input.u-1d0fe6a5f6,
body.dark-theme input.u-9611e2740e {
    background: #212121 !important;
    color: #e1e1e1 !important;
    border-color: #555555 !important;
}

/* ── Inline text dark gray labels ── */
body.dark-theme [style*="color: #94a3b8"],
body.dark-theme [style*="color:#94a3b8"],
body.dark-theme .u-c4fabe4611,
body.dark-theme .u-10697da55f,
body.dark-theme .u-c16a70bc03,
body.dark-theme .u-e82095249d,
body.dark-theme .u-32cb3aa02b,
body.dark-theme .u-5bf0927bad,
body.dark-theme .u-4b1883c8a4,
body.dark-theme .u-02b33ee579,
body.dark-theme .u-986129a7b9,
body.dark-theme .u-aa3ee35a72,
body.dark-theme .u-57d9f7966c,
body.dark-theme .u-16a4fd992b,
body.dark-theme .u-1b308a65e6 {
    color: #777777 !important;
}

/* ── Секция "ПОЛУЧАТЕЛИ УВЕДОМЛЕНИЙ" и прочие uppercase labels ── */
body.dark-theme .u-ee2acfc5ee {
    color: #aaaaaa !important;
}

/* ══════════════════════════════════════════════════════════════
   СТРАНИЦА РЕДАКТОРА (/edit/price, /edit/config)
   ══════════════════════════════════════════════════════════════ */

body.dark-theme .editor-container {
    background: #212121 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* ── Кнопки тулбара ── */
/* Базовая .tool-btn без цветового класса (напр. "Сбросить ширину") */
body.dark-theme .tool-btn {
    background: #2e2e2e !important;
    color: #cccccc !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}
body.dark-theme .tool-btn:hover:not(:disabled) {
    background: #3a3a3a !important;
    color: #e1e1e1 !important;
}
/* Цветные варианты - восстанавливаем их собственные градиенты */
body.dark-theme .tool-btn.add-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
}
body.dark-theme .tool-btn.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
}
body.dark-theme .tool-btn.master-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
}
body.dark-theme .tool-btn.upload-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
}

body.dark-theme .file-dropdown-btn {
    background: linear-gradient(135deg, #546e7a 0%, #37474f 100%) !important;
    color: #fff !important;
}
body.dark-theme .file-dropdown-menu {
    background: #212121 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}
body.dark-theme .file-dropdown-item {
    color: #cccccc !important;
}
body.dark-theme .file-dropdown-item:hover {
    background: #2a2a2a !important;
}

body.dark-theme .master-dropdown-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
}
body.dark-theme .master-dropdown-menu {
    background: #212121 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}
body.dark-theme .master-dropdown-item {
    color: #cccccc !important;
}
body.dark-theme .master-dropdown-item:hover {
    background: #2a2a2a !important;
}
body.dark-theme .tool-btn:disabled {
    opacity: 0.4 !important;
}

/* back-btn (← Назад) */
body.dark-theme .back-btn {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: #818cf8 !important;
}
body.dark-theme .back-btn:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
}

body.dark-theme .toolbar {
    background: #2a2a2a !important;
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .search-input {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .search-input::placeholder {
    color: #777777 !important;
}

body.dark-theme .search-input:focus {
    border-color: #667eea !important;
    background: #212121 !important;
}

body.dark-theme .search-filter-select {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .search-filter-select:focus {
    border-color: #667eea !important;
}

body.dark-theme .pagination-wrapper {
    background: #2a2a2a !important;
    border-top-color: #3a3a3a !important;
}

body.dark-theme .pagination-info {
    color: #aaaaaa !important;
}

body.dark-theme .pagination-btn {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #cccccc !important;
}

body.dark-theme .pagination-btn:hover:not(.disabled) {
    background: #3a3a3a !important;
    border-color: #667eea !important;
    color: #e1e1e1 !important;
}

body.dark-theme .pagination-btn.disabled {
    background: #212121 !important;
    color: #555555 !important;
}

body.dark-theme .pagination-page {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #cccccc !important;
}

body.dark-theme .pagination-page:hover {
    background: #3a3a3a !important;
    border-color: #667eea !important;
}

body.dark-theme .pagination-page.active {
    background: #667eea !important;
    border-color: #667eea !important;
    color: #fff !important;
}

body.dark-theme .pagination-rpp,
body.dark-theme .pagination-rpp span {
    color: #e1e1e1 !important;
}

body.dark-theme .pagination-rpp-select {
    background-color: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaaaaa' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
}

body.dark-theme .pagination-rpp-select:hover {
    border-color: #6366f1 !important;
}

body.dark-theme .pagination-rpp-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2) !important;
}

body.dark-theme .pagination-input {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .pagination-input:focus {
    border-color: #667eea !important;
}

body.dark-theme .search-filter-label,
body.dark-theme .pagination-goto,
body.dark-theme .pagination-goto span {
    color: #e1e1e1 !important;
}

body.dark-theme .search-flag {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .search-flag[data-state="1"] {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: #22c55e !important;
    color: #86efac !important;
}

body.dark-theme .search-flag[data-state="2"] {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

body.dark-theme .pagination-goto-btn {
    background: #667eea !important;
    color: #fff !important;
}

body.dark-theme .form-actions {
    background: #2a2a2a !important;
    border-top-color: #3a3a3a !important;
}

body.dark-theme .cancel-btn {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #aaaaaa !important;
}

body.dark-theme .cancel-btn:hover {
    background: #3a3a3a !important;
    color: #e1e1e1 !important;
}

/* ── Заголовки столбцов таблицы в редакторе ── */

/* ── Таблица данных редактора ── */
body.dark-theme .data-table tbody tr {
    border-bottom-color: #2a2a2a !important;
    background: #1a1a1a !important;
}

body.dark-theme .data-table tbody tr:hover {
    background: #222222 !important;
}

body.dark-theme .data-table tbody tr.selected {
    background: rgba(102, 126, 234, 0.15) !important;
}

body.dark-theme .data-table tbody tr.new-row-highlight {
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: inset 0 0 0 2px #10b981 !important;
}

body.dark-theme .data-table td {
    border-right-color: #2a2a2a !important;
    background-color: #1a1a1a !important;
}

body.dark-theme .row-num,
body.dark-theme .row-num-col {
    color: #555555 !important;
}

/* Ячейки-инпуты */
body.dark-theme .cell-input,
body.dark-theme input.cell-input,
body.dark-theme input[type="text"].cell-input {
    background: #1f1f1f !important;
    background-color: #1f1f1f !important;
    border-color: #3a3a3a !important;
    color: #cccccc !important;
}

body.dark-theme .cell-input:focus,
body.dark-theme input.cell-input:focus {
    background: #262626 !important;
    background-color: #262626 !important;
    border-color: #667eea !important;
    color: #e1e1e1 !important;
}

body.dark-theme .cell-input::placeholder {
    color: #555555 !important;
}

/* Ячейки read-only (min_price, kaspi_delivery) */
body.dark-theme .cell-input.min-price-cell,
body.dark-theme input.min-price-cell {
    background: #162420 !important;
    background-color: #162420 !important;
    color: #6ee7b7 !important;
}

body.dark-theme .cell-input.kaspi-delivery-readonly,
body.dark-theme input.kaspi-delivery-readonly {
    background: #162420 !important;
    background-color: #162420 !important;
    color: #6ee7b7 !important;
    font-weight: 600 !important;
}

body.dark-theme .cell-input.product-code-readonly,
body.dark-theme input.product-code-readonly {
    background: #1e2535 !important;
    background-color: #1e2535 !important;
    color: #94a3b8 !important;
}

/* select внутри ячеек (markup_type, cost_currency) */
body.dark-theme .cell-input option,
body.dark-theme select.cell-input,
body.dark-theme .cell-select,
body.dark-theme select.cell-select {
    background: #1f1f1f !important;
    background-color: #1f1f1f !important;
    color: #cccccc !important;
    border-color: #3a3a3a !important;
}

body.dark-theme select.cost-currency-select,
body.dark-theme select.markup-type-select {
    background: #1f1f1f !important;
    background-color: #1f1f1f !important;
    color: #cccccc !important;
    border-color: #3a3a3a !important;
}

/* Excel fill highlight */
body.dark-theme td.fill-highlight {
    background: rgba(59, 130, 246, 0.2) !important;
    outline-color: #3b82f6 !important;
}

/* ── Объединённый столбец "Склады" (PP1-PP5) на /edit/price ── */
body.dark-theme .wh-summary-total {
    color: #cccccc !important;
}

body.dark-theme .wh-summary:hover {
    background: #262626 !important;
}

body.dark-theme .wh-summary-chevron {
    color: #777777 !important;
}

body.dark-theme .wh-panel {
    border-top-color: #3a3a3a !important;
}

body.dark-theme .wh-tile {
    background: #1f1f1f !important;
}

body.dark-theme .wh-tile-label {
    color: #999999 !important;
}

/* Маленькие тумблеры "Понижение"/"Повышение"/"Экспресс" - неактивный трек.
   Только :not(:checked) - иначе (как было раньше) этот !important бил
   поверх цветных состояний "включено" из editor.css (.mini-toggle-down/
   -up/-express), и все три тумблера в тёмной теме выглядели одинаково
   серыми независимо от того, включены они или нет. */
body.dark-theme .mini-toggle input:not(:checked) + .mini-toggle-track {
    background: #3a3a3a !important;
}

/* ── "Настроить товар" (/edit/price) - кнопка и панель истории цены ── */
body.dark-theme .product-settings-btn {
    background: #1f1f1f !important;
    border-color: #3a3a3a !important;
    color: #cccccc !important;
}

body.dark-theme .product-settings-btn:hover {
    background: #262626 !important;
    border-color: #667eea !important;
    color: #a5b4fc !important;
}

body.dark-theme #product-settings-drawer {
    background: #1a1a1a !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .5) !important;
}

body.dark-theme .psd-header {
    border-bottom-color: #2a2a2a !important;
}

body.dark-theme .psd-title {
    color: #e1e1e1 !important;
}

body.dark-theme .psd-section-toggle {
    background: #1f1f1f !important;
    border-color: #3a3a3a !important;
}

body.dark-theme .psd-section-toggle:hover {
    background: #262626 !important;
    border-color: #4a4a4a !important;
}

body.dark-theme .psd-section-toggle.expanded {
    background: #1e2a3d !important;
    border-color: #2f4a70 !important;
}

body.dark-theme .psd-section-toggle-label {
    color: #e1e1e1 !important;
}

body.dark-theme .psd-section-toggle-icon-wrap {
    background: #2a2a2a !important;
    color: #999999 !important;
}

body.dark-theme .psd-section-toggle.expanded .psd-section-toggle-icon-wrap {
    background: #2f4a70 !important;
    color: #93c5fd !important;
}

body.dark-theme .psd-history-count-badge {
    background: #2a2a2a !important;
    color: #999999 !important;
}

body.dark-theme .psd-section-toggle.expanded .psd-history-count-badge {
    background: #2f4a70 !important;
    color: #93c5fd !important;
}

body.dark-theme .psd-section-toggle .psd-section-toggle-icon {
    color: #777777 !important;
}

body.dark-theme .psd-section-toggle.expanded .psd-section-toggle-icon {
    color: #93c5fd !important;
}

body.dark-theme #psd-history-list.expanded,
body.dark-theme #psd-stock-list.expanded {
    border-color: #2f4a70 !important;
}

body.dark-theme .psd-history-row:hover {
    background: #262626 !important;
    border-color: #4a4a4a !important;
}

body.dark-theme .psd-subtitle {
    color: #777777 !important;
}

body.dark-theme .psd-close-btn {
    background: rgba(38, 38, 38, .85) !important;
    color: #999999 !important;
}

body.dark-theme .psd-close-btn:hover {
    background: #333333 !important;
    color: #cccccc !important;
}

body.dark-theme .psd-photo-wrap {
    background: #1f1f1f !important;
}

body.dark-theme .psd-info-box {
    background: #1f1f1f !important;
}

body.dark-theme .psd-info-label {
    color: #999999 !important;
}

body.dark-theme .psd-info-value {
    color: #e1e1e1 !important;
}

body.dark-theme .psd-history-loading,
body.dark-theme .psd-history-empty {
    background: #1f1f1f !important;
    color: #999999 !important;
}

body.dark-theme .psd-history-row {
    background: #1f1f1f !important;
    border-color: #3a3a3a !important;
}

body.dark-theme .psd-price-new {
    color: #e1e1e1 !important;
}

body.dark-theme .psd-price-old {
    color: #666666 !important;
}

body.dark-theme .psd-history-date {
    color: #666666 !important;
}

/* Контейнер поиска на складе */
body.dark-theme [style*="background: white;"] {
    background: #212121 !important;
}

/* ══════════════════════════════════════════════════════════════
   /reprice/, /kaspi-upload/, /preorder-update/ оформлены общим слоем
   static/css/automation.css (переменные --au-* для тёмной темы заданы там);
   здесь остались только окна «Учётные данные» и «Вход в Kaspi».
   ══════════════════════════════════════════════════════════════ */

/* info-box.info (Как это работает, orders) */
body.dark-theme .info-box.info { background: var(--au-info-soft) !important; border-color: var(--au-info-line) !important; color: var(--au-info) !important; }

/* .form-input в модальном окне kaspi-upload */

/* ══════════════════════════════════════════════════════════════
   МОДАЛЬНЫЕ ОКНА - ДРУГИЕ СТРАНИЦЫ
   ══════════════════════════════════════════════════════════════ */

/* ── orders.html: таблица истории заказов ── */

/* tr-level: убираем светлый фон при hover чтобы rgba в td не пробивался */

/* Строки по статусу - tr и td оба задаём, чтобы rgba не просвечивал */

/* Бейджи статусов */

/* ── orders.html: .clr-modal (подтверждение очистки) ── */
body.dark-theme .clr-modal {
    background: #212121 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .clr-body {
    background: #212121 !important;
}

body.dark-theme .clr-body label {
    color: #aaaaaa !important;
}

body.dark-theme .clr-body input[type="text"],
body.dark-theme .clr-body input[type="number"],
body.dark-theme .clr-body input {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .clr-body input:focus {
    border-color: #ef4444 !important;
    background: #212121 !important;
}

body.dark-theme .clr-footer {
    background: #212121 !important;
}

body.dark-theme .clr-btn-cancel {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #aaaaaa !important;
}

body.dark-theme .clr-btn-cancel:hover {
    background: #3a3a3a !important;
    color: #e1e1e1 !important;
}

/* ── statistics.html: .rev-modal, .sku-modal, .compare-modal ── */
body.dark-theme .rev-modal {
    background: rgba(24, 24, 24, 0.97) !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .rev-modal-head {
    background: transparent !important;
    border-bottom-color: #3a3a3a !important;
    color: #e1e1e1 !important;
}

body.dark-theme .rev-modal-close {
    color: #aaaaaa !important;
}

body.dark-theme .rev-modal-close:hover {
    color: #e1e1e1 !important;
}

body.dark-theme .rev-total-label {
    color: #aaaaaa !important;
}

body.dark-theme .rev-modal-body {
    background: transparent !important;
}

body.dark-theme .rev-status-row {
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .sku-modal {
    background: rgba(24, 24, 24, 0.97) !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

/* ── Фильтр дат продаж (тёмная тема) ── */
body.dark-theme .sales-date-filter {
    border-bottom-color: #2e2e2e !important;
}
body.dark-theme .sales-date-preset {
    background: #1a1a1a !important;
    border-color: #3a3a3a !important;
    color: #aaaaaa !important;
}
body.dark-theme .sales-date-preset:hover,
body.dark-theme .sales-date-preset.active {
    background: #1e1a40 !important;
    border-color: #6366f1 !important;
    color: #818cf8 !important;
}
body.dark-theme .sales-date-inputs,
body.dark-theme .date-range-row {
    background: #1a1a1a !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .sales-date-inputs:focus-within,
body.dark-theme .date-range-row:focus-within {
    border-color: #6366f1 !important;
    background: #1e1a40 !important;
}
/* input[type="text"].sales-date-input (не просто .sales-date-input) - иначе
   проигрывает по специфичности общему body.dark-theme input[type="text"]
   (см. "Формы" в начале файла): у него !important и на элемент, и на
   атрибут разом, значит и переопределять его нужно селектором не менее
   специфичным - иначе не только цвета, но и background-image (иконка
   календаря, у shorthand background своего в общем правиле нет, поэтому
   без явного переопределения она пропадает) откатываются к тому правилу. */
body.dark-theme input[type="text"].sales-date-input {
    background-color: #212121 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 6px center !important;
    background-size: 12px 12px !important;
    border-color: transparent !important;
    color: #e1e1e1 !important;
    color-scheme: dark;
}
body.dark-theme input[type="text"].sales-date-input:hover { background-color: #262626 !important; }
body.dark-theme input[type="text"].sales-date-input:focus {
    border-color: #6366f1 !important;
    background-color: #212121 !important;
}
body.dark-theme .sales-date-sep {
    color: #555555 !important;
}

body.dark-theme .sku-modal-head {
    background: transparent !important;
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .sku-modal-title {
    color: #e1e1e1 !important;
}

body.dark-theme .sku-modal-sub {
    color: #aaaaaa !important;
}

body.dark-theme .sku-modal-close {
    color: #aaaaaa !important;
}

body.dark-theme .sku-modal-close:hover {
    color: #e1e1e1 !important;
}

body.dark-theme .sku-modal-body {
    background: transparent !important;
}

body.dark-theme .sku-modal-loading {
    color: #aaaaaa !important;
}

body.dark-theme .compare-modal {
    background: rgba(24, 24, 24, 0.97) !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .compare-head {
    background: transparent !important;
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .compare-title {
    color: #e1e1e1 !important;
}

body.dark-theme .compare-search-input {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .compare-body {
    background: transparent !important;
}

body.dark-theme .compare-right {
    background: #181818 !important;
}

body.dark-theme .compare-item {
    color: #cccccc !important;
}

/* ── kaspi_upload.html: .modal, .modal-content, .form-input ── */
body.dark-theme .modal-content {
    background: #212121 !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .modal-header {
    background: transparent !important;
    border-bottom-color: #3a3a3a !important;
    color: #e1e1e1 !important;
}

body.dark-theme .modal-header h2,
body.dark-theme .modal-header h3 {
    color: #e1e1e1 !important;
}

body.dark-theme .modal-body {
    background: transparent !important;
    color: #cccccc !important;
}

body.dark-theme .modal-footer {
    background: #181818 !important;
    border-top-color: #3a3a3a !important;
}

body.dark-theme .close-modal {
    color: #aaaaaa !important;
}

body.dark-theme .close-modal:hover {
    color: #e1e1e1 !important;
}

/* ── editor.html: .modal, .wizard-modal ── */
body.dark-theme .modal-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fcd34d !important;
}

body.dark-theme .wizard-modal .modal-content,
body.dark-theme .wizard-modal-content {
    background: #212121 !important;
    border: 1px solid #3a3a3a !important;
}

body.dark-theme .wizard-steps {
    background: #212121 !important;
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .wizard-step .step-circle {
    background: #3a3a3a !important;
    color: #aaaaaa !important;
    border-color: #555555 !important;
}

body.dark-theme .wizard-step.active .step-circle {
    background: #667eea !important;
    color: #fff !important;
    border-color: #667eea !important;
}

body.dark-theme .wizard-step .step-label {
    color: #aaaaaa !important;
}

body.dark-theme .wizard-step.active .step-label {
    color: #818cf8 !important;
}

body.dark-theme .step-content {
    background: transparent !important;
    color: #cccccc !important;
}

body.dark-theme .form-group-wizard label {
    color: #aaaaaa !important;
}

body.dark-theme .form-group-wizard input,
body.dark-theme .form-group-wizard select,
body.dark-theme .form-group-wizard textarea {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .help-text {
    color: #777777 !important;
}

/* ── editor.html: мастер добавления (config) ── */
body.dark-theme .master-stat-item {
    background: #1a1a1a !important;
    border-color: #3a3a3a !important;
}

body.dark-theme .master-stat-label {
    color: #aaaaaa !important;
}

body.dark-theme .master-stat-value {
    color: #e1e1e1 !important;
}

body.dark-theme .master-stat-value.highlight {
    color: #a78bfa !important;
}

body.dark-theme .master-option-group {
    background: #1a1a1a !important;
    border-color: #3a3a3a !important;
}

body.dark-theme .master-option-label {
    color: #cccccc !important;
}

body.dark-theme .master-option-label .option-title {
    color: #e1e1e1 !important;
}

body.dark-theme .master-info-box {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
    color: #93c5fd !important;
}

body.dark-theme .custom-price-input {
    background: #1a1a1a !important;
    border-color: #7c3aed !important;
}

body.dark-theme .currency-label {
    color: #aaaaaa !important;
}

body.dark-theme .category-card {
    background: #181818 !important;
    border-color: #3a3a3a !important;
    color: #cccccc !important;
}

body.dark-theme .category-card:hover {
    border-color: #667eea !important;
    background: #212121 !important;
}

body.dark-theme .category-card.selected {
    background: linear-gradient(135deg, #1e1b4b 0%, #2a1f63 100%) !important;
    border-color: #818cf8 !important;
}
body.dark-theme .category-card-image { background: #2a2a2a !important; }
body.dark-theme .category-card.selected .category-card-image { background: #312e81 !important; }
body.dark-theme .category-card-title { color: #e2e8f0 !important; }
body.dark-theme .category-card-desc { color: #94a3b8 !important; }
body.dark-theme .category-card.selected .category-card-title { color: #c4b5fd !important; }
body.dark-theme .category-card.selected .category-card-desc { color: #a5b4fc !important; }

body.dark-theme .size-type-card {
    background: #181818 !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .size-type-card:hover {
    background: #202020 !important;
    border-color: #667eea !important;
}
body.dark-theme .size-type-card.selected {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
    border-color: #818cf8 !important;
}
body.dark-theme .size-type-card-icon { background: #2a2a2a !important; }
body.dark-theme .size-type-card.selected .size-type-card-icon { background: #3730a3 !important; }
body.dark-theme .size-type-card-title { color: #e2e8f0 !important; }
body.dark-theme .size-type-card-desc { color: #94a3b8 !important; }

body.dark-theme .size-checkbox {
    background: #181818 !important;
    border-color: #4b5563 !important;
}
body.dark-theme .size-checkbox:hover {
    background: #202020 !important;
    border-color: #818cf8 !important;
}
body.dark-theme .size-checkbox:has(input:checked) {
    background: #312e81 !important;
    border-color: #818cf8 !important;
}
body.dark-theme .size-checkbox span { color: #d1d5db !important; }
body.dark-theme .size-checkbox input[type="checkbox"]:checked + span { color: #c4b5fd !important; }

body.dark-theme .color-item {
    background: #1b1b1b !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .color-item:hover {
    background: #232323 !important;
    border-color: #64748b !important;
}
body.dark-theme .color-item.selected {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: #34d399 !important;
}

/* Контейнер грида цветов */
body.dark-theme .colors-grid-container {
    background: #151515 !important;
    border-color: #3a3a3a !important;
}

/* Текст названия цвета и галочка */
body.dark-theme .color-item .color-name {
    color: #e2e8f0 !important;
}
body.dark-theme .color-item.selected .color-name {
    color: #6ee7b7 !important;
}
body.dark-theme .color-item .color-checkmark {
    color: #34d399 !important;
}

/* Граница свотча цвета */
body.dark-theme .color-swatch {
    border-color: rgba(255,255,255,0.15) !important;
}

/* Счётчик выбранных цветов */
body.dark-theme .wizard-colors-counter {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}
body.dark-theme .wizard-colors-counter strong {
    color: #e2e8f0 !important;
}

/* Разделитель "Добавить свой цвет" */
body.dark-theme .wizard-colors-footer {
    border-top-color: #334155 !important;
}

/* Метка "Выбранные цвета:" */
body.dark-theme .selected-colors-label {
    color: #94a3b8 !important;
}

/* ══════════════════════════════════════════════════════════════
   СТРАНИЦА СТАТИСТИКИ (/statistics/)
   ══════════════════════════════════════════════════════════════ */

/* ── Карточки метрик (Оборот, Продажи, Ср. в день, ...) ── */
body.dark-theme .metric-card {
    background: #212121 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2) !important;
}
body.dark-theme .metric-card.top-city-card .metric-detail-hint {
    color: #9ca3af !important;
    opacity: 0.7 !important;
}
body.dark-theme .metric-card.top-city-card:hover .metric-detail-hint {
    color: #60a5fa !important;
    opacity: 1 !important;
}

body.dark-theme .metric-label {
    color: #aaaaaa !important;
}

body.dark-theme .metric-value {
    color: #e1e1e1 !important;
}

body.dark-theme .metric-sub {
    color: #777777 !important;
}

/* Иконки в карточках */
body.dark-theme .ic-green  { background: rgba(16,185,129,0.15) !important; }
body.dark-theme .ic-blue   { background: rgba(59,130,246,0.15) !important; }
body.dark-theme .ic-purple { background: rgba(139,92,246,0.15) !important; }
body.dark-theme .ic-amber  { background: rgba(245,158,11,0.15) !important; }
body.dark-theme .ic-red    { background: rgba(239,68,68,0.15) !important; }

/* ── Блоки с графиками ── */
body.dark-theme .chart-section {
    background: #212121 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

body.dark-theme .chart-title {
    color: #e1e1e1 !important;
}

body.dark-theme .chart-legend-item {
    color: #aaaaaa !important;
}
body.dark-theme .chart-subtitle {
    color: #8b97ab !important;
}
body.dark-theme .chart-insight-card {
    background: linear-gradient(180deg, #252525 0%, #1f1f1f 100%) !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .chart-insight-title {
    color: #9ca3af !important;
}
body.dark-theme .chart-insight-value {
    color: #e5e7eb !important;
}
body.dark-theme .chart-insight-value.is-good {
    color: #34d399 !important;
}
body.dark-theme .chart-insight-value.is-bad {
    color: #f87171 !important;
}
body.dark-theme .chart-insight-sub,
body.dark-theme .chart-insight-empty {
    color: #6b7280 !important;
}
body.dark-theme .chart-insight-sub.is-bad {
    color: #f87171 !important;
}
body.dark-theme .chart-insight-sub-bad {
    color: #f87171 !important;
}

/* ── Топ-карточки (Топ по продажам, Топ маржальных, ...) ── */
body.dark-theme .top-card {
    background: #212121 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

body.dark-theme .top-card-head {
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .top-card-title {
    color: #e1e1e1 !important;
}

body.dark-theme .top-item:hover {
    background: #2a2a2a !important;
}

body.dark-theme .top-item-clickable:hover {
    background: rgba(59,130,246,0.1) !important;
}

body.dark-theme .top-name {
    color: #cccccc !important;
}

body.dark-theme .top-value {
    color: #cccccc !important;
}

body.dark-theme .top-detail {
    color: #777777 !important;
}

/* Ранги */
body.dark-theme .rank-1  { background: rgba(245,158,11,0.2)  !important; color: #fcd34d !important; }
body.dark-theme .rank-2  { background: #2a2a2a !important; color: #aaaaaa !important; }
body.dark-theme .rank-3  { background: rgba(251,146,60,0.2)  !important; color: #fb923c !important; }
body.dark-theme .rank-other { background: #2a2a2a !important; color: #777777 !important; }

/* Кнопка-тоггл в топ-карточке */
body.dark-theme .top-card-toggle {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}
body.dark-theme .top-card-toggle:hover { background: #3a3a3a !important; }

/* Кнопка "Показать топ-50" */
body.dark-theme .top-list-more-btn {
    background: #262626 !important;
    border-top-color: #3a3a3a !important;
    color: #60a5fa !important;
}
body.dark-theme .top-list-more-btn:hover { background: #2a2a2a !important; }

/* ── Модал оборота (.rev-modal) ── */
body.dark-theme .rev-modal-head {
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .rev-modal-title {
    color: #e1e1e1 !important;
}

body.dark-theme .rev-modal-sub {
    color: #aaaaaa !important;
}

body.dark-theme .rev-modal-close {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}
body.dark-theme .rev-modal-close:hover {
    background: #3a3a3a !important;
    color: #e1e1e1 !important;
}

body.dark-theme .rev-modal-total {
    background: rgba(16,185,129,0.1) !important;
    border-bottom-color: rgba(16,185,129,0.2) !important;
}

body.dark-theme #retModalTotal {
    background: rgba(225,29,72,0.1) !important;
    border-bottom-color: rgba(225,29,72,0.2) !important;
}

body.dark-theme .rev-status-row {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme .rev-status-row:hover {
    background: #2a2a2a !important;
}

body.dark-theme .rev-status-label {
    color: #cccccc !important;
}
body.dark-theme .rev-status-sum {
    color: #e1e1e1 !important;
}
body.dark-theme .rev-status-count {
    color: #777777 !important;
}
body.dark-theme .rev-status-desc {
    color: #777777 !important;
}

/* Бейджи статусов в rev-modal */

body.dark-theme .rev-modal-list-body {
    border-top-color: #3a3a3a !important;
}

/* Ряды в модальном окне "Топ 10 городов" */
body.dark-theme .rev-row {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme .rev-row:hover {
    background: #2a2a2a !important;
}
body.dark-theme .rev-row-label {
    color: #e1e1e1 !important;
}
body.dark-theme .rev-row-desc {
    color: #9ca3af !important;
}
body.dark-theme .rev-row-right {
    color: #e1e1e1 !important;
}

body.dark-theme #topCitiesModalTotal {
    background: rgba(59,130,246,0.12) !important;
    border-bottom-color: rgba(59,130,246,0.25) !important;
}
body.dark-theme #topCitiesModalTotal .rev-total-label {
    color: #93c5fd !important;
}
body.dark-theme #topCitiesModalTotal .rev-total-value {
    color: #dbeafe !important;
}

/* ── Таблица продаж в SKU-модале (.sales-table) ── */
body.dark-theme .sales-th {
    background: #2a2a2a !important;
    color: #777777 !important;
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .sales-td {
    color: #cccccc !important;
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .sales-table tbody tr:hover .sales-td {
    background: #2a2a2a !important;
}

body.dark-theme .sales-td-id {
    color: #777777 !important;
}

body.dark-theme .sales-td-names {
    color: #aaaaaa !important;
}

/* Бейджи статусов в таблице продаж */
body.dark-theme .sales-badge-green {
    background: rgba(21,128,61,0.2) !important;
    border-color: rgba(21,128,61,0.3) !important;
    color: #6ee7b7 !important;
}

body.dark-theme .sales-badge-amber {
    background: rgba(180,83,9,0.2) !important;
    border-color: rgba(180,83,9,0.3) !important;
    color: #fcd34d !important;
}
body.dark-theme .sales-badge-gray {
    background: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #aaaaaa !important;
}
body.dark-theme .sales-badge-red {
    background: rgba(190,18,60,0.2) !important;
    border-color: rgba(190,18,60,0.3) !important;
    color: #fca5a5 !important;
}
body.dark-theme .sales-badge-purple {
    background: rgba(109,40,217,0.2) !important;
    border-color: rgba(109,40,217,0.3) !important;
    color: #c4b5fd !important;
}
body.dark-theme .sales-badge-teal {
    background: rgba(15,118,110,0.2) !important;
    border-color: rgba(15,118,110,0.3) !important;
    color: #5eead4 !important;
}

/* ── SKU-модал (список покупок) ── */
body.dark-theme .sku-modal-close {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}
body.dark-theme .sku-modal-close:hover {
    background: #3a3a3a !important;
    color: #e1e1e1 !important;
}

body.dark-theme .sku-modal-summary {
    border-bottom-color: #3a3a3a !important;
}

body.dark-theme .sku-summary-chip {
    background: #2a2a2a !important;
}

body.dark-theme .sku-summary-chip-val {
    color: #e1e1e1 !important;
}
body.dark-theme .sku-summary-chip-lbl {
    color: #777777 !important;
}

body.dark-theme .sku-purchase-item {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme .sku-purchase-price {
    color: #e1e1e1 !important;
}
body.dark-theme .sku-purchase-qty {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}

/* ── Модал сравнения (.compare-modal) ── */
body.dark-theme .compare-head {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme .compare-title {
    color: #e1e1e1 !important;
}
body.dark-theme .compare-sub {
    color: #aaaaaa !important;
}
body.dark-theme .compare-close:hover {
    background: #2a2a2a !important;
    color: #e1e1e1 !important;
}

body.dark-theme .compare-search-row {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme .compare-search-input {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}
body.dark-theme .compare-search-input:focus {
    border-color: #8b5cf6 !important;
    background: #212121 !important;
}

body.dark-theme .compare-ctrl-btn {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #aaaaaa !important;
}
body.dark-theme .compare-ctrl-btn:hover {
    background: #2a2a2a !important;
    border-color: #777777 !important;
    color: #e1e1e1 !important;
}

body.dark-theme .compare-status-row {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme .compare-status-btn {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #aaaaaa !important;
}
body.dark-theme .compare-status-btn:hover {
    background: rgba(139,92,246,0.1) !important;
    border-color: #c4b5fd !important;
    color: #a78bfa !important;
}

body.dark-theme .compare-left {
    border-right-color: #3a3a3a !important;
}

body.dark-theme .compare-item {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme .compare-item:hover {
    background: #2a2a2a !important;
}
body.dark-theme .compare-item.selected {
    background: rgba(139,92,246,0.1) !important;
}
body.dark-theme .compare-item-name {
    color: #cccccc !important;
}
body.dark-theme .compare-item-meta {
    color: #777777 !important;
}

body.dark-theme .compare-placeholder {
    color: #555555 !important;
}
body.dark-theme .compare-empty-state {
    color: #555555 !important;
}

/* Summary chips в правой панели */
body.dark-theme .cmp-summary-chip {
    background: #212121 !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .cmp-chip-val {
    color: #e1e1e1 !important;
}
body.dark-theme .cmp-chip-lbl {
    color: #777777 !important;
}

/* Sort button */
body.dark-theme .cmp-sort-btn {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #aaaaaa !important;
}
body.dark-theme .cmp-sort-btn:hover {
    background: rgba(139,92,246,0.1) !important;
    border-color: #c4b5fd !important;
    color: #a78bfa !important;
}

/* Строки товаров в правой панели */
body.dark-theme .cmp-row {
    background: #212121 !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .cmp-row-name {
    color: #cccccc !important;
}
body.dark-theme .cmp-rows-label {
    color: #777777 !important;
}

/* Breakdown section */
body.dark-theme .cmp-breakdown-section {
    background: #212121 !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .cmp-breakdown-title {
    color: #777777 !important;
}
body.dark-theme .cmp-breakdown-lbl {
    color: #9ca3af !important;
}
body.dark-theme .cmp-breakdown-val {
    color: #e1e1e1 !important;
}
body.dark-theme .cmp-row-cost {
    color: #94a3b8 !important;
}
body.dark-theme .cmp-cost-lbl {
    color: #9ca3af !important;
}
body.dark-theme .cmp-cost-val {
    color: #cbd5e1 !important;
}

/* ══════════════════════════════════════════════════════════════
   STATISTICS - кнопки периода и экспорта
   ══════════════════════════════════════════════════════════════ */

/* ── Пикер дат (глобальный) ── */
body.dark-theme .date-range-dropdown {
    background: #212121 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
}
body.dark-theme .date-range-label {
    color: #aaaaaa !important;
}
body.dark-theme .date-range-hint {
    color: #666666 !important;
}
body.dark-theme .date-range-preset-btn {
    background: #1a1a1a !important;
    border-color: #3a3a3a !important;
    color: #aaaaaa !important;
}
body.dark-theme .date-range-preset-btn:hover,
body.dark-theme .date-range-preset-btn.active {
    background: #1e1a40 !important;
    border-color: #6366f1 !important;
    color: #818cf8 !important;
}
body.dark-theme .date-range-dropdown::before {
    background: #444444 !important;
}

/* ── editor.html: мастер добавления - недостающие элементы ── */
body.dark-theme .master-preview {
    background: #1a1a1a !important;
    border-color: #3a3a3a !important;
}

/* Заголовок «Примеры SKU для добавления:» - той же яркости, что и подписи
   счётчиков выше (.master-stat-label): в светлой теме у него тёмно-серый
   #374151, и на тёмной подложке он выпадал из общего ряда. */
body.dark-theme .master-preview-title {
    color: #aaaaaa !important;
}

/* Сами SKU: в светлой теме это белые плашки, поэтому в тёмной они оставались
   белыми прямоугольниками. */
body.dark-theme .sku-badge {
    background: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #e1e1e1 !important;
}

body.dark-theme .sku-badge.more {
    background: rgba(139, 92, 246, 0.25) !important;
    border-color: rgba(167, 139, 250, 0.4) !important;
    color: #c4b5fd !important;
}

body.dark-theme #masterCalcPreview {
    background: rgba(16,185,129,0.1) !important;
    border-color: rgba(16,185,129,0.3) !important;
    color: #6ee7b7 !important;
}

/* Скроллбар master-modal-content */
body.dark-theme .master-modal-content::-webkit-scrollbar-track {
    background: #1a1a1a !important;
}
body.dark-theme .master-modal-content::-webkit-scrollbar-thumb {
    background: #3a3a3a !important;
}
body.dark-theme .master-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555555 !important;
}

/* ── Калькулятор min_price: hardcoded inline-style блоки ── */
body.dark-theme .calc-formula-box {
    background: rgba(16,185,129,0.08) !important;
    border-color: rgba(16,185,129,0.25) !important;
}
body.dark-theme .calc-formula-title {
    color: #6ee7b7 !important;
}
body.dark-theme .calc-formula-text {
    color: #a7f3d0 !important;
}

body.dark-theme .calc-kaspi-box {
    background: rgba(245,158,11,0.1) !important;
    border-color: rgba(245,158,11,0.3) !important;
}
body.dark-theme .calc-kaspi-label,
body.dark-theme .calc-kaspi-hint {
    color: #fcd34d !important;
}
body.dark-theme .calc-kaspi-value {
    color: #fbbf24 !important;
}

body.dark-theme .calc-rates-box {
    background: #1a1a1a !important;
}
body.dark-theme .calc-rates-label {
    color: #777777 !important;
}

body.dark-theme .timezone-label { color: var(--au-text-2) !important; }

/* ── Расписание тёмной темы ── */
body.dark-theme .theme-schedule-toggle { background: var(--au-accent-soft) !important; border-color: var(--au-accent-line) !important; }

body.dark-theme .theme-schedule-panel { background: var(--au-surface) !important; border-color: var(--au-line) !important; }

body.dark-theme .theme-time-label { color: var(--au-muted) !important; }

body.dark-theme .theme-time-input { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

body.dark-theme .theme-time-input:hover { border-color: var(--au-accent-line) !important; }

body.dark-theme .theme-time-input:focus { border-color: var(--au-accent) !important; box-shadow: 0 0 0 4px var(--au-focus) !important; }

body.dark-theme .theme-schedule-arrow { color: var(--au-faint) !important; }

body.dark-theme .theme-schedule-tz { color: var(--au-faint) !important; }

body.dark-theme .theme-schedule-tz strong { color: var(--au-muted) !important; }

/* ── Card collapse button (dark theme) ── */
body.dark-theme .card-collapse-btn {
    background: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-theme .card-collapse-btn:hover {
    background: #475569 !important;
}

body.dark-theme .card-collapse-chevron {
    stroke: #94a3b8;
}

/* ── Карточки складов в "Названия складов" ── */
body.dark-theme #tgWarehouseNamesContainer > div {
    background: #212121 !important;
    border-color: #3a3a3a !important;
}

body.dark-theme #tgWarehouseNamesContainer > div span.u-4da8e8cdd4,
body.dark-theme #tgWarehouseNamesContainer > div span.u-b7166d465a {
    background: #2e1a5e !important;
}

body.dark-theme #tgWarehouseNamesContainer input {
    background: #2a2a2a !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

/* ── Карточка "Обновление проекта" - нижняя полоска ── */
body.dark-theme #restartCard > div:last-child {
    background: #181818 !important;
    border-top-color: #3a3a3a !important;
}

body.dark-theme #restartCard > div:last-child span:first-child {
    color: #64748b !important;
}

/* ── Кнопка "Входы" в таблице аккаунтов ── */
body.dark-theme .acc-btn-logins {
    background: #0c3a5e !important;
    color: #38bdf8 !important;
}

/* ── Модал истории входов по аккаунту ── */

/* ── История входов по IP ── */

/* ══════════════════════════════════════════════════════════════
   СТРАНИЦА АВТООБНОВЛЕНИЯ ПРЕДЗАКАЗА (/preorder-update/)
   ══════════════════════════════════════════════════════════════ */

/* Модал редактирования времени запуска - внутренний контейнер */
body.dark-theme #time-editor-overlay > div {
    background: #212121 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

/* Поле ввода времени */
body.dark-theme #input-run-time {
    background: #181818 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

body.dark-theme #input-run-time:focus {
    border-color: #667eea !important;
}

/* Подсказка "В часовом поясе из настроек" */
body.dark-theme #time-editor-overlay div[style*="color:#64748b"],
body.dark-theme #time-editor-overlay div.u-bf47fc8966,
body.dark-theme #time-editor-overlay div.u-60ea7e0e85,
body.dark-theme #time-editor-overlay div.u-55d733143c,
body.dark-theme #time-editor-overlay div.u-2ddd3b9d27,
body.dark-theme #time-editor-overlay div.u-ee2acfc5ee,
body.dark-theme #time-editor-overlay div.u-a9fe4bc0ce,
body.dark-theme #time-editor-overlay div.u-821454dda9,
body.dark-theme #time-editor-overlay div.u-7bac2dae3f,
body.dark-theme #time-editor-overlay div.u-c71fbfa234,
body.dark-theme #time-editor-overlay div.u-5d8cd6118d,
body.dark-theme #time-editor-overlay div.u-f2e9807dd4,
body.dark-theme #time-editor-overlay div.u-e4f059e24c,
body.dark-theme #time-editor-overlay div.u-486868a95e,
body.dark-theme #time-editor-overlay div.u-93e6231cbb,
body.dark-theme #time-editor-overlay div.u-b85200d41d {
    color: #64748b !important;
}

/* Кнопка "Отмена" в модале */
body.dark-theme #time-editor-overlay div[style*="display:flex"] button:first-child,
body.dark-theme #time-editor-overlay div.u-b92a9b5833 button:first-child,
body.dark-theme #time-editor-overlay div.u-07e522af8d button:first-child,
body.dark-theme #time-editor-overlay div.u-a76d597a07 button:first-child,
body.dark-theme #time-editor-overlay div.u-25b5288699 button:first-child,
body.dark-theme #time-editor-overlay div.u-6002dd784e button:first-child,
body.dark-theme #time-editor-overlay div.u-3e8801b665 button:first-child,
body.dark-theme #time-editor-overlay div.u-080f5482d4 button:first-child,
body.dark-theme #time-editor-overlay div.u-f7924f51af button:first-child,
body.dark-theme #time-editor-overlay div.u-b32a606a68 button:first-child,
body.dark-theme #time-editor-overlay div.u-cd4a094ed7 button:first-child,
body.dark-theme #time-editor-overlay div.u-e3d9f129a5 button:first-child,
body.dark-theme #time-editor-overlay div.u-2752ba1d54 button:first-child,
body.dark-theme #time-editor-overlay div.u-51455a1f8d button:first-child,
body.dark-theme #time-editor-overlay div.u-68a9b7cbbf button:first-child,
body.dark-theme #time-editor-overlay div.u-123b6c99b6 button:first-child,
body.dark-theme #time-editor-overlay div.u-dbffd6fb54 button:first-child,
body.dark-theme #time-editor-overlay div.u-93544efa6a button:first-child,
body.dark-theme #time-editor-overlay div.u-62a2dc33d4 button:first-child,
body.dark-theme #time-editor-overlay div.u-f67b86e0fb button:first-child,
body.dark-theme #time-editor-overlay div.u-d93e99e3f8 button:first-child,
body.dark-theme #time-editor-overlay div.u-fa0c874eb8 button:first-child,
body.dark-theme #time-editor-overlay div.u-cf0ae71659 button:first-child,
body.dark-theme #time-editor-overlay div.u-b66c7278ba button:first-child,
body.dark-theme #time-editor-overlay div.u-ba2d079f90 button:first-child,
body.dark-theme #time-editor-overlay div.u-5c45010505 button:first-child,
body.dark-theme #time-editor-overlay div.u-3820a3420d button:first-child,
body.dark-theme #time-editor-overlay div.u-3adbff5865 button:first-child,
body.dark-theme #time-editor-overlay div.u-16f2d51288 button:first-child,
body.dark-theme #time-editor-overlay div.u-479d9a6659 button:first-child,
body.dark-theme #time-editor-overlay div.u-7a1e55bbb9 button:first-child,
body.dark-theme #time-editor-overlay div.u-27b304e43b button:first-child,
body.dark-theme #time-editor-overlay div.u-57ec9d4d6e button:first-child,
body.dark-theme #time-editor-overlay div.u-f0c0ece6e6 button:first-child,
body.dark-theme #time-editor-overlay div.u-c19f40a117 button:first-child,
body.dark-theme #time-editor-overlay div.u-411a835cc9 button:first-child,
body.dark-theme #time-editor-overlay div.u-cc54cc6333 button:first-child,
body.dark-theme #time-editor-overlay div.u-6c78707023 button:first-child,
body.dark-theme #time-editor-overlay div.u-c6b101ee26 button:first-child,
body.dark-theme #time-editor-overlay div.u-10e478e06f button:first-child,
body.dark-theme #time-editor-overlay div.u-f5618a4deb button:first-child,
body.dark-theme #time-editor-overlay div.u-6c1b20a303 button:first-child,
body.dark-theme #time-editor-overlay div.u-82335e4055 button:first-child,
body.dark-theme #time-editor-overlay div.u-dd6b16c24c button:first-child,
body.dark-theme #time-editor-overlay div.u-e0b865e8f4 button:first-child,
body.dark-theme #time-editor-overlay div.u-015a5e7fbe button:first-child,
body.dark-theme #time-editor-overlay div.u-212cdd2913 button:first-child,
body.dark-theme #time-editor-overlay div.u-a0b3d08132 button:first-child,
body.dark-theme #time-editor-overlay div.u-74cac98b22 button:first-child,
body.dark-theme #time-editor-overlay div.u-3e53c98239 button:first-child {
    border-color: #3a3a3a !important;
    color: #94a3b8 !important;
    background: transparent !important;
}

body.dark-theme #time-editor-overlay div[style*="display:flex"] button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-b92a9b5833 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-07e522af8d button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-a76d597a07 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-25b5288699 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-6002dd784e button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-3e8801b665 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-080f5482d4 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-f7924f51af button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-b32a606a68 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-cd4a094ed7 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-e3d9f129a5 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-2752ba1d54 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-51455a1f8d button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-68a9b7cbbf button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-123b6c99b6 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-dbffd6fb54 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-93544efa6a button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-62a2dc33d4 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-f67b86e0fb button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-d93e99e3f8 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-fa0c874eb8 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-cf0ae71659 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-b66c7278ba button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-ba2d079f90 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-5c45010505 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-3820a3420d button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-3adbff5865 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-16f2d51288 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-479d9a6659 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-7a1e55bbb9 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-27b304e43b button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-57ec9d4d6e button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-f0c0ece6e6 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-c19f40a117 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-411a835cc9 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-cc54cc6333 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-6c78707023 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-c6b101ee26 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-10e478e06f button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-f5618a4deb button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-6c1b20a303 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-82335e4055 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-dd6b16c24c button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-e0b865e8f4 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-015a5e7fbe button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-212cdd2913 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-a0b3d08132 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-74cac98b22 button:first-child:hover,
body.dark-theme #time-editor-overlay div.u-3e53c98239 button:first-child:hover {
    background: #2a2a2a !important;
}

/* Модал выбора режима откладки */
body.dark-theme #postpone-editor-overlay > div {
    background: #212121 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

/* ══════════════════════════════════════════════════════════
   Современные карточки заказов (orders.css)
   ══════════════════════════════════════════════════════════ */

/* Общий фон всех карточек/панелей */

/* Таблетки-метрики */

/* Табы */

/* Разделитель дат */

/* Внутри карточки заказа */

/* Позиция, удалённая из заказа */

/* Значки статуса */

/* Строка поиска и дата-инпуты */

/* input[type="text"].orders-date-input (не просто .orders-date-input) - иначе
   проигрывает по специфичности общему body.dark-theme input[type="text"]
   (см. "Формы" в начале файла): у него !important и на элемент, и на
   атрибут разом, значит и переопределять его нужно селектором не менее
   специфичным - иначе не только цвета (в т.ч. чужая серая рамка вместо
   прозрачной), но и background-image (иконка календаря, у shorthand
   background своего в общем правиле нет, поэтому без явного
   переопределения она пропадает) откатываются к тому правилу. */

/* Кнопка "Расширенный поиск" */

/* Чипы фильтра статуса */

/* Блок настроек */

/* Кнопки логов */

/* Кнопка «Очистить» (danger outline) */

/* Пустое состояние */

/* ── Детальная страница заказа ── */

/* ── Dashboard price calculator - dark styles via shared classes ──
   .modal-content, .modal-header, .modal-footer → lines 242-256
   .form-group-wizard input/select              → lines 2346-2352
   .calc-formula-box/title/text                 → lines 3380-3389
   .calc-kaspi-box/label/value/hint             → lines 3391-3401
   .calc-rates-box/label                        → lines 3403-3408
   .cancel-btn                                  → lines 1642-1651
   ── no extra overrides needed ── */
body.dark-theme .dc-close-btn { color: #aaaaaa !important; }
body.dark-theme .dc-weight-hint { color: #777777 !important; }
body.dark-theme .dc-weight-cost { color: #34d399 !important; }

/* ── KD Zone groups - dark theme ── */
body.dark-theme .kd-zone-group { border-color: var(--au-line) !important; }
body.dark-theme .kd-zone-toggle--city { background: var(--au-info-soft) !important; color: var(--au-info) !important; }
body.dark-theme .kd-zone-toggle--kz { background: var(--au-ok-soft) !important; color: var(--au-ok) !important; }
body.dark-theme .kd-zone-toggle--express { background: var(--au-err-soft) !important; color: var(--au-err) !important; }
body.dark-theme .kd-zone-body { background: var(--au-surface) !important; }

/* ──────────────────────────────────────────────────────────────
   Окна подтверждения и уведомлений редактора
   ──────────────────────────────────────────────────────────────
   Разметка этих окон собирается в JS и раньше в тёмной теме не
   участвовала вовсе: белое полотно и светлая шапка били по глазам
   поверх тёмной страницы. Цветные шапки (предупреждение, ошибка,
   успех, справка) оставляем цветными, но приглушаем до заливки
   тем же цветом с низкой прозрачностью - смысл читается, яркость
   не слепит. */

body.dark-theme .confirm-modal,
body.dark-theme .alert-modal {
    background: #212121 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

/* Шапка «внимание» - у обоих окон одна и та же */
body.dark-theme .confirm-modal-header,
body.dark-theme .alert-header-warning {
    background: rgba(245, 158, 11, 0.16) !important;
    border-bottom-color: rgba(245, 158, 11, 0.4) !important;
}
body.dark-theme .confirm-modal-title,
body.dark-theme .alert-header-warning .alert-modal-title {
    color: #fcd34d !important;
}

body.dark-theme .alert-header-error {
    background: rgba(239, 68, 68, 0.16) !important;
    border-bottom-color: rgba(239, 68, 68, 0.4) !important;
}
body.dark-theme .alert-header-error .alert-modal-title { color: #fca5a5 !important; }

body.dark-theme .alert-header-info {
    background: rgba(59, 130, 246, 0.16) !important;
    border-bottom-color: rgba(59, 130, 246, 0.4) !important;
}
body.dark-theme .alert-header-info .alert-modal-title { color: #93c5fd !important; }

body.dark-theme .alert-header-success {
    background: rgba(16, 185, 129, 0.16) !important;
    border-bottom-color: rgba(16, 185, 129, 0.4) !important;
}
body.dark-theme .alert-header-success .alert-modal-title { color: #6ee7b7 !important; }

body.dark-theme .confirm-modal-message,
body.dark-theme .alert-modal-message {
    color: #cccccc !important;
}

/* Нейтральная кнопка «Отмена» - на тёмном фоне светлая заливка неуместна */
body.dark-theme .confirm-btn-cancel {
    background: #2a2a2a !important;
    color: #cccccc !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .confirm-btn-cancel:hover {
    background: #333333 !important;
    border-color: #4a4a4a !important;
}

/* Крестик закрытия в окне несохранённых изменений */
body.dark-theme .unsaved-modal-close-btn { color: #777777 !important; }
body.dark-theme .unsaved-modal-close-btn:hover {
    background: #2a2a2a !important;
    color: #cccccc !important;
}

body.dark-theme .psd-chart { background: #181818 !important; border-color: #3a3a3a !important; }
body.dark-theme .psd-chart-grid { stroke: #3a3a3a; }
body.dark-theme .psd-chart-label { fill: #aaaaaa; }
body.dark-theme .psd-chart-line { stroke: #818cf8; }
body.dark-theme .psd-chart-dot { fill: #818cf8; }
body.dark-theme .psd-chart-area { fill: rgba(129, 140, 248, 0.15); }
body.dark-theme .psd-stock-badge { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
body.dark-theme .psd-stock-badge.psd-stock-plus { background: rgba(34, 197, 94, 0.2); color: #86efac; }

/* ══════ Из base.css ══════ */
body/* ── Тёмная тема ── */
/* ── Тёмная тема ── */
/* ══════ Из base-mobile.css ══════ */
@media (max-width: 768px) {
    }

/* ══════ Из i18n.css ══════ */
body.dark-theme .lang-switch-btn {
    background: rgba(33, 33, 33, 0.9);
    border-color: #555555;
    color: #e1e1e1;
}
body.dark-theme .lang-switch-menu {
    background: #2a2a2a;
    border-color: #3a3a3a;
}
body.dark-theme .lang-switch-item {
    color: #e1e1e1;
}
body.dark-theme .lang-switch-item:hover {
    background: #333333;
}
body.dark-theme .lang-switch-item.active {
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
}

/* ══════ Из dashboard.css ══════ */
/* ============================================================
   DARK THEME - главная (/): те же поверхности и цвета, что у остальных страниц (--au-*)
   ============================================================ */
body.dark-theme .db-section,
body.dark-theme .db-quick-wrap,
body.dark-theme .db-download-card,
body.dark-theme .db-stat {
    background: var(--au-card);
    border: 1px solid var(--au-line);
    box-shadow: var(--au-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
body.dark-theme .db-hero {
    background: linear-gradient(130deg, #14131f 0%, #2a2552 55%, #1e1d2c 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    border: 1px solid var(--au-line);
}
body.dark-theme .db-stat-orange .db-stat-icon-wrap { background: var(--au-warn-soft); color: var(--au-warn); }
body.dark-theme .db-stat-green  .db-stat-icon-wrap { background: var(--au-ok-soft); color: var(--au-ok); }
body.dark-theme .db-stat-blue   .db-stat-icon-wrap { background: var(--au-info-soft); color: var(--au-info); }
body.dark-theme .db-stat-red    .db-stat-icon-wrap { background: var(--au-err-soft); color: var(--au-err); }
body.dark-theme .db-stat-yellow .db-stat-icon-wrap { background: var(--au-warn-soft); color: var(--au-warn); }
body.dark-theme .db-section-title,
body.dark-theme .db-stat-val,
body.dark-theme .db-mgmt-name,
body.dark-theme .db-dl-title,
body.dark-theme .db-quick-title { color: var(--au-text); }
body.dark-theme .db-section-sub,
body.dark-theme .db-stat-lbl,
body.dark-theme .db-stat-unit,
body.dark-theme .db-mgmt-hint,
body.dark-theme .db-qn span { color: var(--au-muted); }
body.dark-theme .db-mgmt-item { border: 1px solid transparent; }
body.dark-theme .db-mgmt-item:hover { background: var(--au-accent-soft); border-color: var(--au-accent-line); transform: none; }
body.dark-theme .db-mgmt-arrow { color: var(--au-faint); }
body.dark-theme .db-mgmt-item:hover .db-mgmt-arrow { color: var(--au-accent-ink); }
body.dark-theme .db-qn { background: var(--au-surface); border: 1px solid var(--au-line); }
body.dark-theme .db-qn:hover { background: var(--au-accent-soft); border-color: var(--au-accent-line); }
body.dark-theme .db-dl-xlsx { background: var(--au-ok-soft); color: var(--au-ok); }
body.dark-theme .db-dl-xml { background: var(--au-info-soft); color: var(--au-info); }
body.dark-theme .db-mgmt-dot, body.dark-theme .db-dot-ok { box-shadow: 0 0 0 3px var(--au-ok-soft); }
/* Калькулятор - dark */
body.dark-theme .dc-overlay .modal-content { background: var(--au-card-solid); border: 1px solid var(--au-line); }
body.dark-theme .dc-overlay .modal-header { border-bottom-color: var(--au-line); }
body.dark-theme .dc-overlay .modal-header h2 { color: var(--au-text); }
body.dark-theme .dc-overlay .modal-footer { border-top-color: var(--au-line); }
body.dark-theme .dc-close-btn { color: var(--au-muted); }
body.dark-theme .form-group-wizard label { color: var(--au-text-2); }
body.dark-theme .form-group-wizard input,
body.dark-theme .form-group-wizard select { background: var(--au-surface); border-color: var(--au-line-strong); color: var(--au-text); }
body.dark-theme .calc-formula-box { background: var(--au-ok-soft); border-color: var(--au-ok-line); }
body.dark-theme .calc-formula-title { color: var(--au-ok); }
body.dark-theme .calc-formula-text { color: var(--au-text-2); }
body.dark-theme .calc-kaspi-box { background: var(--au-warn-soft); border-color: var(--au-warn-line); }
body.dark-theme .calc-kaspi-label { color: var(--au-warn); }
body.dark-theme .calc-kaspi-value { color: var(--au-text); }
body.dark-theme .calc-kaspi-hint { color: var(--au-muted); }
body.dark-theme .calc-rates-box { background: var(--au-surface); }
body.dark-theme .calc-rates-label { color: var(--au-muted); }
body.dark-theme .cancel-btn { background: var(--au-surface-2); color: var(--au-text-2); }

/* ══════ Из editor-mobile-cards.css ══════ */
/* ==================== Тёмная тема ==================== */
body.dark-theme .echip {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}
body.dark-theme .echip.active {
    background: var(--em-accent) !important;
    color: #fff !important;
}
body.dark-theme .ecard {
    background: rgba(30, 30, 34, 0.97) !important;
    border-color: #2e2e38 !important;
}
body.dark-theme .ecard-title {
    color: #e1e1e1 !important;
}
body.dark-theme .ecard-sub {
    color: #aaaaaa !important;
}
body.dark-theme .ecard-pp {
    background: #202024 !important;
    color: #777777 !important;
}
body.dark-theme .ecard-pp.has {
    background: rgba(21, 128, 61, 0.2) !important;
    color: #6ee7b7 !important;
}
body.dark-theme .ecard-pp.has b {
    color: #6ee7b7 !important;
}
body.dark-theme .ecard-chip {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}
body.dark-theme .ecard-chip.on {
    background: rgba(21, 128, 61, 0.2) !important;
    color: #6ee7b7 !important;
}
body.dark-theme .ecard-chip.on-amber {
    background: rgba(180, 83, 9, 0.2) !important;
    color: #fcd34d !important;
}
body.dark-theme #editorMobilePagination {
    background: rgba(24, 24, 24, 0.97) !important;
    border-color: #3a3a3a !important;
}
body.dark-theme .emp-btn {
    background: #2a2a2a !important;
    color: #e1e1e1 !important;
}
body.dark-theme .emp-label {
    color: #aaaaaa !important;
}
body.dark-theme .emp-goto {
    border-top-color: #3a3a3a !important;
}
body.dark-theme .emp-goto span {
    color: #aaaaaa !important;
}
body.dark-theme .emp-goto-sep {
    background: #3a3a3a !important;
}
body.dark-theme .emp-rpp-select {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}
body.dark-theme .emp-goto-input {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}
body.dark-theme .form-actions .cancel-btn {
    color: #aaaaaa !important;
}
body.dark-theme #editorCardSheet {
    background: #181818 !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5) !important;
}
body.dark-theme .ecs-handle {
    background: #3a3a3a !important;
}
body.dark-theme .ecs-header {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme #ecsTitle {
    color: #e1e1e1 !important;
}
body.dark-theme #ecsSub {
    color: #aaaaaa !important;
}
body.dark-theme .ecs-close-btn {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}
body.dark-theme .ecs-field label,
body.dark-theme .ecs-section-label {
    color: #aaaaaa !important;
}
body.dark-theme input.ecs-input,
body.dark-theme select.ecs-input {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}
body.dark-theme input.ecs-input[readonly] {
    color: #777777 !important;
    background: #1c1c1c !important;
}
body.dark-theme .ecs-stock-row {
    background: #212121 !important;
}
body.dark-theme .ecs-stock-row > span {
    color: #cccccc !important;
}
body.dark-theme .ecs-step-btn {
    background: #2a2a2a !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}
body.dark-theme input.ecs-step-input {
    color: #e1e1e1 !important;
}
body.dark-theme .ecs-toggle-row > span {
    color: #e1e1e1 !important;
}
body.dark-theme .ecs-toggle-track {
    background: #3a3a3a !important;
}
body.dark-theme .ecs-footer {
    border-top-color: #3a3a3a !important;
}
body.dark-theme .ecard.eselected {
    background: rgba(37, 99, 235, 0.15) !important;
    border-color: var(--em-accent) !important;
}
body.dark-theme .ecard-select-box {
    background: #212121 !important;
    border-color: #555555 !important;
}
body.dark-theme .ecard.eselected .ecard-select-box {
    background: var(--em-accent) !important;
    border-color: var(--em-accent) !important;
}
body.dark-theme .esel-close-btn {
    background: #2a2a2a !important;
    color: #e1e1e1 !important;
}
body.dark-theme .esel-count {
    color: #e1e1e1 !important;
}
body.dark-theme .esel-actions {
    background: #181818 !important;
    border-top-color: #3a3a3a !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5) !important;
}
body.dark-theme .esel-cancel-btn {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}
body.dark-theme .esel-calc-btn {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}
body.dark-theme .wmp-progress {
    border-bottom-color: #3a3a3a !important;
}
body.dark-theme #wmpStepLabel {
    color: #aaaaaa !important;
}
body.dark-theme #wmpStepName {
    color: #e1e1e1 !important;
}
body.dark-theme .wmp-track {
    background: #3a3a3a !important;
}
body.dark-theme #masterModal:not(.wizard-modal) .modal-footer {
    border-top-color: #3a3a3a !important;
}
body.dark-theme .ecs-settings-btn {
    background: #212121 !important;
    border-color: #555555 !important;
    color: #e1e1e1 !important;
}

/* ══════ Из error-page.css ══════ */
body.dark-theme.error-page {
    background:
        radial-gradient(60% 50% at 85% 0%, rgba(129, 140, 248, 0.16) 0%, transparent 70%),
        radial-gradient(50% 45% at 0% 100%, rgba(167, 139, 250, 0.1) 0%, transparent 70%),
        #1a1a1a;
}
body.dark-theme .error-card { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
body.dark-theme .error-code > span:not(.error-zero) { filter: drop-shadow(0 6px 24px rgba(129, 140, 248, 0.35)); }

/* ══════ Из kaspi-onboarding.css ══════ */
body.dark-theme .onboarding-hint,
body.dark-theme .onboarding-detail { color: #9ca3af; }
body.dark-theme .onboarding-stage { background: #2a2a2a; border-color: #3a3a3a; }
body.dark-theme .onboarding-title { color: #e1e1e1; }
body.dark-theme .onboarding-ico { background: #3a3a3a; color: #9ca3af; }
body.dark-theme .onboarding-bar { background: #3a3a3a; }
body.dark-theme .onboarding-badge { background: rgba(99, 102, 241, .22); color: #c7d2fe; }
body.dark-theme .onboarding-badge.done { background: rgba(34, 197, 94, .2); color: #86efac; }
body.dark-theme .onboarding-badge.err { background: rgba(239, 68, 68, .2); color: #fca5a5; }
body.dark-theme .onboarding-error { background: rgba(239, 68, 68, .14); color: #fca5a5; }
body.dark-theme .onboarding-retry { background: #ef4444; }
body.dark-theme .onboarding-ready { background: rgba(34, 197, 94, .14); color: #86efac; }
body.dark-theme .onboarding-opt { background: #3a3a3a; color: #9ca3af; }

/* ══════ Из login.css ══════ */
/* ── Тёмная тема ── */
.dark-theme body.no-sidebar,
.dark-theme.no-sidebar body {
    background: linear-gradient(135deg, #0f0c29 0%, #1a1743 40%, #0c2461 100%);
}
.dark-theme .login-body {
    background: #0f172a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
}
.dark-theme .login-body .login-heading { color: #f1f5f9; }
.dark-theme .login-body .login-subheading { color: #64748b; }
body.dark-theme .login-input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
.dark-theme .login-input:focus {
    background: #1e293b;
    border-color: #6366f1;
}
.dark-theme .login-input::placeholder { color: #475569; }
.dark-theme .login-field label { color: #64748b; }
body.dark-theme .login-eye-btn { color: #64748b; }
.dark-theme .login-eye-btn:hover { color: #818cf8; }
.dark-theme .login-footer-note { color: #475569; }
.dark-theme .login-handle { background: #334155; }

/* ══════ Из orders.css ══════ */
/* ── Тёмная тема ── */

body.dark-theme #notes-list:empty::before { color: #6b7280; }
/* ── Тёмная тема: модал отслеживания ── */

/* Страница трекинга внутри iframe - чужой домен (logistics.kaspi.kz), её
   разметку нам не перекрасить. Инверсия цветов самого фрейма - обычный
   приём "принудительной тёмной темы": фон тёмный, текст светлый, цветные
   элементы (логотип, бейджи статусов) при этом меняют оттенок, но
   остаются читаемыми. */

/* ══════ Из ozon.css ══════ */
body.dark-theme .oz {
    --oz-bg: #181818; --oz-card: #212121; --oz-text: #e1e1e1; --oz-muted: #9aa3b5; --oz-line: #333;
    --oz-accent: #6d9bff; --oz-ok: #3fbf79; --oz-warn: #e0a030; --oz-bad: #ef6b67;
}

/* ══════ Из price-sync.css ══════ */
body.dark-theme .price-sync-dot { background: #4b5563; }
body.dark-theme .price-sync-dot.on { background: #22c55e; }
body.dark-theme .price-sync-dot.err { background: #ef4444; }
body.dark-theme .price-sync-btn { background: #2a2a2a !important; color: #e1e1e1 !important; border-color: #4a4a4a; }
body.dark-theme .price-sync-btn:hover:not(:disabled) { background: #333 !important; border-color: #667eea; }
body.dark-theme .price-sync-dot { background: #6b7280; }
body.dark-theme .price-sync-dot.on { background: #22c55e; }
body.dark-theme .price-sync-dot.err { background: #ef4444; }

/* ══════ Из statistics-mobile.css ══════ */
@media (max-width: 768px) {
    body.dark-theme :is(.sku-modal-body, .rev-modal-list-body) .sales-table tr {
            background: #1e1e24 !important;
            border-color: #2f2f38 !important;
        }
    body.dark-theme :is(.sku-modal-body, .rev-modal-list-body) .sales-td-names {
            border-top-color: #2f2f38 !important;
        }
    body.dark-theme :is(.sku-modal-body, .rev-modal-list-body) .sales-td-num::before,
    body.dark-theme :is(.sku-modal-body, .rev-modal-list-body) .sales-td-sum::before {
            color: #777777 !important;
        }
}

/* ══════ Из dark-theme-mobile.css ══════ */

/* ══════ Окно API-ключа НКТ РК ══════ */

/* ══════ Окно «История VDS/VPS» (static/css/vds-history.css): нейтральная палитра сайта ══════ */

/* ── /settings/: те же цвета с повышенной специфичностью - перебивают общие правила для inline-классов (.u-*) ── */
body.dark-theme .settings-container .info-box { background: var(--au-info-soft) !important; border: 1px solid var(--au-info-line) !important; border-radius: var(--au-radius-sm) !important; }
body.dark-theme .settings-container .info-box-title { color: var(--au-info) !important; }
body.dark-theme .settings-container .info-box-content { color: var(--au-text-2) !important; }
body.dark-theme .settings-container .setting-header { border-bottom: 1px solid var(--au-line) !important; }
body.dark-theme .settings-container .setting-title { color: var(--au-text) !important; }
body.dark-theme .settings-container .setting-description { color: var(--au-muted) !important; }
body.dark-theme .settings-container .toggle-container { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }
body.dark-theme .settings-container .toggle-label { color: var(--au-text) !important; }
body.dark-theme .settings-container .toggle-hint { color: var(--au-muted) !important; }
body.dark-theme .settings-container .vds-uptime-bar { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }
body.dark-theme .settings-container .vds-uptime-label { color: var(--au-muted) !important; }
body.dark-theme .settings-container .vds-uptime-value { color: var(--au-text) !important; }
body.dark-theme .settings-container .vds-metric-card { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }
body.dark-theme .settings-container .vds-metric-card:hover { border-color: var(--au-accent-line) !important; }
body.dark-theme .settings-container .vds-metric-title { color: var(--au-text) !important; }
body.dark-theme .settings-container .vds-metric-details { color: var(--au-muted) !important; }
body.dark-theme .settings-container .vds-progress-bar { background: var(--au-surface-2) !important; }
body.dark-theme .settings-container .vds-progress-label { color: var(--au-text) !important; }
body.dark-theme .settings-container .vds-network-bar { background: var(--au-info-soft) !important; border: 1px solid var(--au-info-line) !important; }
body.dark-theme .settings-container .vds-network-label { color: var(--au-info) !important; }
body.dark-theme .settings-container .vds-controls { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }
body.dark-theme .settings-container .vds-collector-label { color: var(--au-muted) !important; }
body.dark-theme .settings-container .vds-collector-running { background: var(--au-ok-soft) !important; color: var(--au-ok) !important; }
body.dark-theme .settings-container .vds-collector-stopped { background: var(--au-err-soft) !important; color: var(--au-err) !important; }
body.dark-theme .settings-container .vds-btn-secondary { background: var(--au-surface-2) !important; color: var(--au-text-2) !important; border-color: var(--au-line-strong) !important; }
body.dark-theme .settings-container .vds-btn-secondary:hover { border-color: var(--au-accent-line) !important; color: var(--au-text) !important; }
body.dark-theme .settings-container .vds-error { background: var(--au-err-soft) !important; border-color: var(--au-err-line) !important; color: var(--au-err) !important; }
body.dark-theme .settings-container .perm-dot-edit { background: var(--au-ok-soft) !important; color: var(--au-ok) !important; }
body.dark-theme .settings-container .perm-dot-view { background: var(--au-info-soft) !important; color: var(--au-info) !important; }
body.dark-theme .settings-container .my-pass-input { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }
body.dark-theme .settings-container .my-pass-input:focus { border-color: var(--au-accent) !important; background: var(--au-card-solid) !important; box-shadow: 0 0 0 4px var(--au-focus) !important; }
body.dark-theme .settings-container .my-pass-field label { color: var(--au-muted) !important; }
body.dark-theme .settings-container .my-pass-eye { color: var(--au-faint) !important; }
body.dark-theme .settings-container .my-pass-eye:hover { color: var(--au-accent-ink) !important; }
body.dark-theme .settings-container .rate-card { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; color: var(--au-text) !important; }
body.dark-theme .settings-container .rate-card * { color: var(--au-text) !important; }
body.dark-theme .settings-container .last-update-container { background: var(--au-ok-soft) !important; border: 1px solid var(--au-ok-line) !important; }
body.dark-theme .settings-container .last-update-container * { color: var(--au-ok) !important; }
body.dark-theme .settings-container .merchant-item { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }
body.dark-theme .settings-container .merchant-item:hover { border-color: var(--au-accent-line) !important; }
body.dark-theme .settings-container .merchant-name { color: var(--au-text) !important; }
body.dark-theme .settings-container .merchant-id { color: var(--au-muted) !important; }
body.dark-theme .settings-container .merchant-strategy-select { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }
body.dark-theme .settings-container .friendly-merchants-form { background: var(--au-surface) !important; border: 1px solid var(--au-line) !important; }
body.dark-theme .settings-container .friendly-merchants-form-title { color: var(--au-text) !important; }
body.dark-theme .settings-container .form-field-label { color: var(--au-muted) !important; }
body.dark-theme .settings-container .form-field-input { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }
body.dark-theme .settings-container .form-field-select { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }
body.dark-theme .settings-container .friendly-merchants-form label { background: var(--au-surface-2) !important; border-color: var(--au-line) !important; }
body.dark-theme .settings-container .friendly-merchants-form label span { color: var(--au-text) !important; }
body.dark-theme .settings-container .cny-days-container { background: var(--au-warn-soft) !important; border: 1px solid var(--au-warn-line) !important; }
body.dark-theme .settings-container .cny-days-label span:first-child { color: var(--au-warn) !important; }
body.dark-theme .settings-container .cny-days-hint { color: var(--au-muted) !important; }
body.dark-theme .settings-container .cny-days-btn { background: var(--au-card-solid) !important; border-color: var(--au-warn-line) !important; color: var(--au-warn) !important; }
body.dark-theme .settings-container .cny-days-input { background: var(--au-card-solid) !important; border-color: var(--au-warn-line) !important; color: var(--au-warn) !important; }
body.dark-theme .settings-container .kd-vat-row { background: var(--au-info-soft) !important; border-color: var(--au-info-line) !important; }
body.dark-theme .settings-container .kd-vat-label { color: var(--au-info) !important; }
body.dark-theme .settings-container .kd-vat-pct { color: var(--au-info) !important; }
body.dark-theme .settings-container .kd-vat-badge { background: var(--au-info-soft) !important; color: var(--au-info) !important; }
body.dark-theme .settings-container .kd-vat-input { background: var(--au-card-solid) !important; border-color: var(--au-info-line) !important; color: var(--au-info) !important; }
body.dark-theme .settings-container .kd-tier-block--small { border-color: var(--au-warn-line) !important; }
body.dark-theme .settings-container .kd-tier-block--large { border-color: var(--au-ok-line) !important; }
body.dark-theme .settings-container .kd-tier-title { color: var(--au-text-2) !important; }
body.dark-theme .settings-container .kd-col-headers { color: var(--au-faint) !important; }
body.dark-theme .settings-container .kd-col-headers > div { color: var(--au-faint) !important; }
body.dark-theme .settings-container .kd-tier-body { background: var(--au-surface) !important; }
body.dark-theme .settings-container .kd-tier-row { background: var(--au-surface-2) !important; }
body.dark-theme .settings-container .kd-input--minmax { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text-2) !important; }
body.dark-theme .settings-container .kd-default-input { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text-2) !important; }
body.dark-theme .settings-container .kd-pct-text { color: var(--au-muted) !important; }
body.dark-theme .settings-container .kd-delivery-label { color: var(--au-muted) !important; }
body.dark-theme .settings-container .kd-reset-btn { background: var(--au-err-soft) !important; border-color: var(--au-err-line) !important; color: var(--au-err) !important; }
body.dark-theme .settings-container .kd-reset-btn:hover { background: var(--au-err-soft) !important; border-color: var(--au-err) !important; }
body.dark-theme .settings-container .kd-info-note { background: var(--au-surface) !important; border-left-color: var(--au-line-strong) !important; color: var(--au-muted) !important; }
body.dark-theme .settings-container .lc-interval-row { background: var(--au-surface) !important; border-color: var(--au-line) !important; }
body.dark-theme .settings-container .lc-interval-text { color: var(--au-muted) !important; }
body.dark-theme .settings-container .lc-section-title { color: var(--au-faint) !important; }
body.dark-theme .settings-container .lc-badge { background: var(--au-surface-2) !important; color: var(--au-muted) !important; }
body.dark-theme .settings-container .lc-days-btn { background: var(--au-card-solid) !important; border-color: var(--au-accent-line) !important; color: var(--au-accent-ink) !important; }
body.dark-theme .settings-container .lc-days-btn:hover { background: var(--au-accent) !important; color: #ffffff !important; }
body.dark-theme .settings-container .lc-section-label--reprice { background: var(--au-accent-soft) !important; border-color: var(--au-accent-line) !important; }
body.dark-theme .settings-container .lc-section-label--reprice:hover { border-color: var(--au-accent) !important; }
body.dark-theme .settings-container .lc-section-label--upload { background: var(--au-warn-soft) !important; border-color: var(--au-warn-line) !important; }
body.dark-theme .settings-container .lc-section-label--upload:hover { border-color: var(--au-warn) !important; }
body.dark-theme .settings-container .lc-section-label--orders { background: var(--au-ok-soft) !important; border-color: var(--au-ok-line) !important; }
body.dark-theme .settings-container .lc-section-label--orders:hover { border-color: var(--au-ok) !important; }
body.dark-theme .settings-container .lc-item-name { color: var(--au-text-2) !important; }
body.dark-theme .settings-container .lc-last-run-box { background: var(--au-ok-soft) !important; border-color: var(--au-ok-line) !important; }
body.dark-theme .settings-container .lc-last-run-label { color: var(--au-ok) !important; }
body.dark-theme .settings-container .lc-last-run-date { color: var(--au-ok) !important; }
body.dark-theme .settings-container .info-box.info { background: var(--au-info-soft) !important; border-color: var(--au-info-line) !important; color: var(--au-info) !important; }
body.dark-theme .settings-container .timezone-label { color: var(--au-text-2) !important; }
body.dark-theme .settings-container .theme-schedule-toggle { background: var(--au-accent-soft) !important; border-color: var(--au-accent-line) !important; }
body.dark-theme .settings-container .theme-schedule-panel { background: var(--au-surface) !important; border-color: var(--au-line) !important; }
body.dark-theme .settings-container .theme-time-label { color: var(--au-muted) !important; }
body.dark-theme .settings-container .theme-time-input { background: var(--au-card-solid) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }
body.dark-theme .settings-container .theme-time-input:hover { border-color: var(--au-accent-line) !important; }
body.dark-theme .settings-container .theme-time-input:focus { border-color: var(--au-accent) !important; box-shadow: 0 0 0 4px var(--au-focus) !important; }
body.dark-theme .settings-container .theme-schedule-arrow { color: var(--au-faint) !important; }
body.dark-theme .settings-container .theme-schedule-tz { color: var(--au-faint) !important; }
body.dark-theme .settings-container .theme-schedule-tz strong { color: var(--au-muted) !important; }
body.dark-theme .settings-container .kd-zone-group { border-color: var(--au-line) !important; }
body.dark-theme .settings-container .kd-zone-toggle--city { background: var(--au-info-soft) !important; color: var(--au-info) !important; }
body.dark-theme .settings-container .kd-zone-toggle--kz { background: var(--au-ok-soft) !important; color: var(--au-ok) !important; }
body.dark-theme .settings-container .kd-zone-toggle--express { background: var(--au-err-soft) !important; color: var(--au-err) !important; }
body.dark-theme .settings-container .kd-zone-body { background: var(--au-surface) !important; }
body.dark-theme .settings-container .friendly-merchants-form label.form-field-label { background: transparent !important; border: 0 !important; }
body.dark-theme .settings-container .info-box-icon { display: flex; color: var(--au-info) !important; }
body.dark-theme .settings-container .info-box-content :is(strong, b, span, div, em) { color: var(--au-text-2) !important; }
body.dark-theme .settings-container .info-box-content :is(strong, b) { color: var(--au-text) !important; }

/* ══ Перенесено из ai-analysis.css ══ */
body.dark-theme .mk-seg button.on { background: var(--au-accent-soft); box-shadow: inset 0 0 0 1px var(--au-accent-line); }

/* ══ Перенесено из automation.css ══ */
body.dark-theme {
    --au-card: rgba(32, 32, 32, 0.96);
    --au-card-solid: #202020;
    --au-surface: #181818;
    --au-surface-2: #2a2a2a;
    --au-line: #3a3a3a;
    --au-line-strong: #555555;
    --au-text: #e8e8e8;
    --au-text-2: #cccccc;
    --au-muted: #9ca3af;
    --au-faint: #777777;
    --au-accent: #818cf8;
    --au-accent-2: #a78bfa;
    --au-accent-ink: #a5b4fc;
    --au-accent-soft: rgba(129, 140, 248, 0.14);
    --au-accent-line: rgba(129, 140, 248, 0.4);
    --au-ok: #34d399;
    --au-ok-soft: rgba(16, 185, 129, 0.12);
    --au-ok-line: rgba(16, 185, 129, 0.4);
    --au-err: #f87171;
    --au-err-soft: rgba(239, 68, 68, 0.12);
    --au-err-line: rgba(239, 68, 68, 0.42);
    --au-warn: #fbbf24;
    --au-warn-soft: rgba(245, 158, 11, 0.12);
    --au-warn-line: rgba(245, 158, 11, 0.42);
    --au-info: #60a5fa;
    --au-info-soft: rgba(59, 130, 246, 0.12);
    --au-info-line: rgba(59, 130, 246, 0.42);
    --au-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --au-shadow-sm: none;
    --au-log-bg: #121212;
    --au-log-line: #2c2c2c;
    --au-log-text: #cbd5e1;
    --au-log-ts: #6b7280;
    --au-focus: rgba(129, 140, 248, 0.55);
    --au-scrim: rgba(0, 0, 0, 0.65);
}

body.dark-theme .au-seg-opt.is-on,
body.dark-theme .au-seg-opt:has(input:checked) {
    background: var(--au-accent-soft);
    box-shadow: inset 0 0 0 1px var(--au-accent-line);
}
body.dark-theme .au-switch-row input:checked ~ .au-switch { background: #10b981; }

/* ══ Перенесено из kaspi-chat.css ══ */
body.dark-theme input[type="text"].au-date-input {
    background-color: #181818 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 11px center !important;
    background-size: 15px 15px !important;
    border-color: #555555 !important;
    color-scheme: dark;
}

/* ══ Перенесено из kaspi-marketing.css ══ */
body.dark-theme .km-nav a.on { background: var(--au-accent-soft); box-shadow: inset 0 0 0 1px var(--au-accent-line); }
body.dark-theme .km-tab.on { background: var(--au-accent-soft); box-shadow: inset 0 0 0 1px var(--au-accent-line); }
body.dark-theme .km-sel,
body.dark-theme .km-search,
body.dark-theme .km-sel-items input { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--ink) !important; color-scheme: dark; }
body.dark-theme .km-sel option,
body.dark-theme .km-fld select option { background: #2a2a2a; color: #e1e1e1; }
body.dark-theme .km-fld input,
body.dark-theme .km-fld select { color-scheme: dark; }

/* ══ Перенесено из kaspi-messenger.css ══ */
body.dark-theme .kms-search input[type="text"] {
    background: transparent !important; color: var(--au-text) !important; border: 0 !important; box-shadow: none !important;
}
body.dark-theme .kms-comp textarea { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

/* ══ Kaspi чат: сценарии ответов (kaspi-messenger.css) ══ */
body.dark-theme .kms-scen-search input[type="text"] { background: transparent !important; color: var(--au-text) !important; border: 0 !important; box-shadow: none !important; }
body.dark-theme .kms-scen-ta,
body.dark-theme #kmsScenEdit .au-input input[type="text"],
body.dark-theme #kmsScenEdit .au-input select { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; color-scheme: dark; }
body.dark-theme .kms-scen-ta::placeholder { color: var(--au-faint); }
body.dark-theme .kms-scen-help code { background: #2a2a2a; }
body.dark-theme .kms-pill.ok { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
body.dark-theme .kms-pill.warn { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
body.dark-theme .kms-scen-used.is-found { color: #a5b4fc; }
body.dark-theme .kms-sc { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }

/* ══ Перенесено из nct.css ══ */
body.dark-theme .nct-in,
body.dark-theme .nct-search input[type="text"] { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }
body.dark-theme .nct-ntin-input,
body.dark-theme .nct-namekk-input { background: var(--au-surface) !important; color: var(--au-text) !important; border-color: var(--au-accent) !important; }

/* ══ Перенесено из orders.css ══ */
body.dark-theme .od-status.is-teal { color: #5eead4; }

body.dark-theme input[type="text"].orders-date-input {
    background: #181818 !important;
    border-color: #555555 !important;
    color-scheme: dark;
}
body.dark-theme input[type="text"].orders-input { background: #181818 !important; border-color: #555555 !important; }
body.dark-theme .od-card:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }

/* ══ Перенесено из shell.css ══ */
body.dark-theme,
body.dark-theme * { scrollbar-color: #4b5563 #1f1f1f; }
:is(body, body.dark-theme).dark-theme .global-notify-tab.active { background: var(--au-accent-soft); box-shadow: inset 0 0 0 1px var(--au-accent-line); }
body.dark-theme #ai-chat-input { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

/* ══ Перенесено из sidebar.css ══ */
body.dark-theme .sidebar-drawer { box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5); }

/* ══ Перенесено из sms.css ══ */
body.dark-theme .sms-login-card .au-control input,
body.dark-theme .sms-login-card .au-control select { background: var(--au-surface) !important; border-color: var(--au-line-strong) !important; color: var(--au-text) !important; }

/* ══ Перенесено из user-menu-component.css ══ */
body.dark-theme .user-menu-switch { background: var(--au-accent); }
body.dark-theme .user-menu-switch::after { transform: translateX(18px); }
body.dark-theme .user-menu-lang-thumb { background: var(--au-accent-soft); box-shadow: inset 0 0 0 1px var(--au-accent-line); }

/* ══ Перенесено из vds-history.css ══ */
body.dark-theme .vh-head {
    background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 45%), linear-gradient(135deg, #4c3a8f 0%, #3b3f9e 60%, #2b4a9a 100%);
}
body.dark-theme .vh-seg button.is-active { background: var(--au-accent-soft); box-shadow: inset 0 0 0 1px var(--au-accent-line); }

/* ══ Перенесено из warehouse.css ══ */
body.dark-theme .wh-card:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

/* ══ Перенесено из restarting.css ══ */
body.dark-theme.restarting-page {
    background:
        radial-gradient(60% 50% at 85% 0%, rgba(129, 140, 248, 0.16) 0%, transparent 70%),
        radial-gradient(50% 45% at 0% 100%, rgba(167, 139, 250, 0.1) 0%, transparent 70%),
        #1a1a1a;
}
body.dark-theme .rs-card { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
body.dark-theme .rs-count { text-shadow: 0 0 24px rgba(129, 140, 248, 0.45); }

/* ══ Логотип RebithReprice: тёмный значок на тёмных поверхностях - акцентная обводка и свечение ══ */
body.dark-theme .sidebar-logo-icon { box-shadow: 0 0 0 1px rgba(165, 180, 252, 0.32), 0 4px 14px rgba(108, 92, 231, 0.38); }
body.dark-theme .error-brand img,
body.dark-theme .rs-brand img { box-shadow: 0 0 0 1px rgba(165, 180, 252, 0.32), 0 3px 10px rgba(108, 92, 231, 0.35); }

/* ══ /edit/config: «Максимальная цена», окна «Стратегия снижения цены» и «Стратегия повышения цены» (editor-strategy.css) ══ */
body.dark-theme .max-price-pop { background: var(--au-card-solid); color: var(--au-text); border-color: var(--au-line); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6); }
body.dark-theme .mpp-title { color: var(--au-text); }
body.dark-theme .mpp-close { color: var(--au-muted); }
body.dark-theme .mpp-close:hover { color: var(--au-text); }
body.dark-theme .mpp-input { background: var(--au-surface); color: var(--au-text); border-color: var(--au-line-strong); }
body.dark-theme .mpp-input::placeholder { color: var(--au-faint); }
body.dark-theme .mpp-input:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25); }
body.dark-theme .mpp-input.invalid { background: #3b1d1d; border-color: #ef4444; }
body.dark-theme .mpp-cur, body.dark-theme .mpp-hint { color: var(--au-muted); }
body.dark-theme .mpp-error { color: #f87171; }
body.dark-theme .mpp-reset { color: #a5b4fc; }
body.dark-theme .data-table td.mini-toggle-td .max-price-btn { color: var(--au-muted); border-color: var(--au-line-strong); }
body.dark-theme .data-table td.mini-toggle-td .max-price-btn:hover { color: #a5b4fc; border-color: #818cf8; }
body.dark-theme .data-table td.mini-toggle-td .max-price-btn.has-value { color: #fff; background: #6366f1; border-color: #6366f1; }
body.dark-theme .strategy-option { background: var(--au-card-solid); border-color: var(--au-line); }
body.dark-theme .strategy-option:hover { border-color: #818cf8; }
body.dark-theme .strategy-option.selected { background: #26264a; border-color: #6366f1; box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2); }
body.dark-theme .strategy-option-title { color: var(--au-text); }
body.dark-theme .strategy-option-hint { color: var(--au-muted); }
body.dark-theme .strategy-sub { background: var(--au-surface); border-left-color: #6366f1; }
body.dark-theme .strategy-sub-title { color: var(--au-text-2); }
body.dark-theme #belowMinStrategyModal .master-option-label,
body.dark-theme #upStrategyModal .master-option-label { color: var(--au-text) !important; }
body.dark-theme #belowMinStrategyModal .help-text,
body.dark-theme #upStrategyModal .help-text { color: var(--au-muted) !important; }

/* Чат Kaspi: ссылки во входящих сообщениях */
body.dark-theme .kms-b.in .kms-link { color: #a5b4fc; }

/* ── Плашка льготного периода подписки (templates/grace_banner.html) ── */
body.dark-theme .grace-banner {
    background: #33270f;
    border-color: rgba(255, 177, 27, 0.4);
    border-left-color: #ffb11b;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
    color: #ffd98a;
}

body.dark-theme .grace-banner.is-last {
    background: #402a0b;
    border-color: rgba(255, 177, 27, 0.6);
    border-left-color: #ff9f1a;
}

body.dark-theme .grace-banner-ico { background: #ffb11b; color: #2b1d00; }
body.dark-theme .grace-banner-pay { background: #ffb11b; color: #2b1d00; }
body.dark-theme .grace-banner-pay:hover { background: #ffc24d; color: #2b1d00; }
body.dark-theme .grace-banner-close:hover { background: rgba(255, 177, 27, 0.16); }

/* Доставка по городу (настройки): подпись вариантов */
body.dark-theme .cd-option { color: var(--au-text-2); }

/* Страница «Подписка не оплачена» */
.dark-theme .sub-expired-ico { background: rgba(248, 113, 113, 0.14); color: #f87171; }
.dark-theme .sub-expired-text, .dark-theme .sub-expired-owner { color: #cbd5e1; }
.dark-theme .sub-expired-note { color: #94a3b8; }
.dark-theme .sub-expired-btn--ghost { color: #e2e8f0; border-color: rgba(148, 163, 184, 0.35); }
.dark-theme .sub-expired-btn--ghost:hover { background: rgba(148, 163, 184, 0.12); }
.dark-theme .sub-expired-status { color: #fbbf24; }
