/* Тёмная тема CRM и личного кабинета. Включается атрибутом <html data-scheme="dark"> (static/crm/theme.js). */
html[data-scheme="dark"]{
  --bg:#0f141a; --panel:#171e27; --line:#273140; --line-soft:#212a36; --text:#e4e9f0; --muted:#94a0b0;
  --accent:#2fbf8f; --accent-dark:#4fd8a9; --accent-soft:#11302a; --link:#6ea8ff; --btn:#2f7be5; --btn-hover:#4a8ef0;
  --warn:#f0b357; --warn-soft:#30261a; --danger:#ff8080; --danger-bar:#e15b5b; --danger-soft:#3a1d21;
  --info-soft:#16253a; --gray-soft:#222b37;
  --surface-2:#131a22; --hover:#1f2833; --row-hover:#1b232d; --input-line:#334052; --input-bg:#111820;
  --faint:#5f6b7b; --danger-line:#5c2b30; --warn-line:#5a4525; --accent-line:#1f5544; --info-line:#26415f;
  --info-text:#8bb8ff; --avatar:#2a3441; --chat-bg:#0d1318; --compose-bg:#141b23; --bubble:#1e2731;
  --bubble-out:#134238; --shadow:rgba(0,0,0,.35);
  color-scheme:dark;
}
/* логотип тёмно-синий — на тёмном фоне кладём его на светлую плашку */
html[data-scheme="dark"] .logo img,html[data-scheme="dark"] .login-logo,html[data-scheme="dark"] .brand img{
  background:#f4f6f9;border-radius:10px;padding:6px 8px}
html[data-scheme="dark"] ::placeholder{color:#6b7787}
html[data-scheme="dark"] select option{background:var(--panel);color:var(--text)}
html[data-scheme="dark"] .qr-box svg,html[data-scheme="dark"] .wa-img{background:#fff;border-radius:8px}
html[data-scheme="dark"] .qr-box svg{padding:8px}
html[data-scheme="dark"] .tag.gray,html[data-scheme="dark"] .tag:not(.green):not(.red):not(.yellow):not(.blue){background:var(--gray-soft);color:var(--muted)}
html[data-scheme="dark"] .wa-msg,html[data-scheme="dark"] .wa-day span{box-shadow:none}
html[data-scheme="dark"] .mir-msg-hint,html[data-scheme="dark"] code{color:var(--text)}
html[data-scheme="dark"] img.pdf-thumb{filter:none}
html[data-scheme="dark"] .card,html[data-scheme="dark"] .stat{box-shadow:none}

/* переключатель темы */
.foot-sw{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.theme-sw,.lang-sw{display:flex;gap:2px;background:var(--gray-soft);border-radius:8px;padding:2px;width:max-content;margin:0}
.theme-sw button,.lang-sw button{border:0;background:none;color:var(--muted);font:inherit;font-size:13px;line-height:1;padding:5px 8px;border-radius:6px;cursor:pointer}
.theme-sw button[aria-pressed="true"],.lang-sw button[aria-pressed="true"]{background:var(--panel);color:var(--text);box-shadow:0 1px 2px var(--shadow)}
.theme-cycle{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:7px;width:30px;height:28px;
  display:inline-grid;place-items:center;cursor:pointer;font-size:14px;padding:0}
.theme-cycle .ic-dark,.theme-cycle .ic-auto{display:none}
html[data-theme-pref="dark"] .theme-cycle .ic-light,html[data-theme-pref="auto"] .theme-cycle .ic-light{display:none}
html[data-theme-pref="dark"] .theme-cycle .ic-dark{display:inline}
html[data-theme-pref="auto"] .theme-cycle .ic-auto{display:inline}

.lang-sw button{font-size:11.5px;font-weight:600;letter-spacing:.3px}
.login-lang{margin:14px auto 0}
