/* АВТОМАТИЧЕСКИ СОБРАНО tools/make-dark-css.js из style.css — руками не править.
   Тёмная тема (24.09.2026): включается атрибутом data-theme="dark" на <html> (public/prefs.js). */

html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #3aa0ea;
  --primary-dark: #7cc0f3;
  --danger: #f07a6c;
  --success: #4cc38a;
  --warning: #e8b949;
  --border: #2f3644;
  --bg: #11141a;
  --surface: #1a1f28;
  --text: #e6e8ec;
  --muted: #9aa3b0;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #151a22; color: var(--text); border-color: #343c4a; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6b7483; }
html[data-theme="dark"] button { color: var(--text); background: #232a35; border-color: #343c4a; }
html[data-theme="dark"] button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
html[data-theme="dark"] button.ghost { background: none; border-color: transparent; color: var(--muted); }
html[data-theme="dark"] button.ghost:hover { background: #262d39; color: var(--text); }
html[data-theme="dark"] button.danger { background: #3a1f1f; border-color: #5a2d2a; color: var(--danger); }
html[data-theme="dark"] table.products th { background: #1f2530; color: #aab3c0; }
html[data-theme="dark"] table.products td { border-color: #262d39; }
html[data-theme="dark"] table.products tbody tr:hover td { background: #212835; }
html[data-theme="dark"] a { color: #7cc0f3; }
html[data-theme="dark"] img.brand-logo { filter: brightness(0.95); }
html[data-theme="dark"] ::-webkit-scrollbar-track, html[data-theme="dark"] html::-webkit-scrollbar-track { background: #151a22; }
html[data-theme="dark"] html::-webkit-scrollbar-thumb { background: #3a4353; border-color: #151a22; }

html[data-theme="dark"] .help-close:hover {
  background: #222429;
}
html[data-theme="dark"] .help-toc a:hover {
  background: #1a232c;
}
html[data-theme="dark"] .help-toc a.current {
  background: #1a232c;
}
html[data-theme="dark"] .help-content p.warn {
  background: #342f1f;
}
html[data-theme="dark"] .help-content .key {
  background: #1f242a;
}
html[data-theme="dark"] .bitrix-warning {
  background: #342f1f;
  border-bottom: 1px solid #61583c;
}
html[data-theme="dark"] button.danger {
  border-color: #543434;
  background: #291a19;
}
html[data-theme="dark"] button.ghost:hover {
  background: #222429;
}
html[data-theme="dark"] .report-preview {
  background: #1a2026;
}
html[data-theme="dark"] table.products tr:hover td {
  background: #191f29;
}
html[data-theme="dark"] .badge.draft {
  background: #342f1f;
}
html[data-theme="dark"] .badge.approved {
  background: #223627;
  color: #aceebe;
}
html[data-theme="dark"] .badge.published {
  background: #1f2933;
  color: #8cbbef;
}
html[data-theme="dark"] .photo-card {
  background: #1c2025;
}
html[data-theme="dark"] .photo-card img {
  background: #262626;
}
html[data-theme="dark"] .trash-zone {
  background: #1c2025;
}
html[data-theme="dark"] .trash-zone.drag-over {
  background: #291a19;
}
html[data-theme="dark"] .modal-box {
  background: #1f1f1f;
}
html[data-theme="dark"] #confirm-modal-input {
  border: 1px solid #4d4d4d;
}
html[data-theme="dark"] .card-headline {
  background: #1a232c;
  border: 1px solid #314351;
}
html[data-theme="dark"] .orders-block {
  border: 1px solid var(--border, #3d4148);
  background: #1f1f1f;
}
html[data-theme="dark"] .orders-tabs {
  border-bottom: 1px solid var(--border, #3d4148);
}
html[data-theme="dark"] .o-tab,
html[data-theme="dark"] .ap-tab,
html[data-theme="dark"] .sg-tab {
  color: #a2abb7;
}
html[data-theme="dark"] .o-tab:hover,
html[data-theme="dark"] .ap-tab:hover,
html[data-theme="dark"] .sg-tab:hover {
  color: #dfe3e9;
}
html[data-theme="dark"] .o-tab.active,
html[data-theme="dark"] .ap-tab.active,
html[data-theme="dark"] .sg-tab.active {
  color: #74c6eb;
}
html[data-theme="dark"] .o-tab-count {
  background: #24282c;
  color: #b8c2ce;
}
html[data-theme="dark"] .order-card {
  border: 1px solid var(--border, #3d4148);
  background: #1a2026;
}
html[data-theme="dark"] .order-card:hover {
  border-color: #47515a;
  background: #1c2328;
}
html[data-theme="dark"] .order-card.order-unclaimed {
  background: #291919;
  border-color: #563434;
}
html[data-theme="dark"] .oc-owner {
  color: #a2abb7;
}
html[data-theme="dark"] .oc-owner-free {
  color: #da7777;
}
html[data-theme="dark"] .oc-contacts {
  color: #a2abb7;
}
html[data-theme="dark"] .oc-item {
  color: #b8c2ce;
}
html[data-theme="dark"] .oc-flags {
  color: #a2abb7;
}
html[data-theme="dark"] .order-yes {
  color: #8ae5b0;
}
html[data-theme="dark"] .order-no {
  color: #da7777;
}
html[data-theme="dark"] .order-modal-box {
  background: #1f1f1f;
}
html[data-theme="dark"] .om-header {
  border-bottom: 1px solid var(--border, #3d4148);
}
html[data-theme="dark"] .om-card {
  border: 1px solid var(--border, #3d4148);
  background: #1c2025;
}
html[data-theme="dark"] .om-card h3 {
  color: #a2abb7;
}
html[data-theme="dark"] .om-items .oc-code {
  color: #b8c2ce;
}
html[data-theme="dark"] .cp-form {
  border: 1px solid var(--border, #3d4148);
  background: #1c2025;
}
html[data-theme="dark"] .cp-field label {
  color: #a2abb7;
}
html[data-theme="dark"] .cp-req {
  color: #da7777;
}
html[data-theme="dark"] .inv-done {
  border: 1px solid #3e5e4b;
  background: #1a2b20;
}
html[data-theme="dark"] .preview-modal-box {
  background: #1f1f1f;
}
html[data-theme="dark"] .pv-problems {
  background: #2d281b;
  border: 1px solid #63593d;
}
html[data-theme="dark"] .pv-ok {
  background: #1c2e24;
  border: 1px solid #3b5f4b;
}
html[data-theme="dark"] .pv-serp-title {
  color: #8076eb;
}
html[data-theme="dark"] .pv-serp-desc {
  color: #b6b9be;
}
html[data-theme="dark"] .uc-me {
  background: #1b252d;
}
html[data-theme="dark"] .updates-modal-box {
  background: #1f1f1f;
}
html[data-theme="dark"] .sg-msg-mine {
  background: #1c262e;
}
html[data-theme="dark"] .client-badge-repeat {
  background: #1c262e;
  color: #74c6eb;
}
html[data-theme="dark"] .client-badge-req {
  background: #1d2e21;
  color: #95d8a9;
}
html[data-theme="dark"] .cpl-row-replace {
  background: #2d251b;
}
html[data-theme="dark"] .cpl-was {
  color: #eab26d;
}
html[data-theme="dark"] .linklike {
  color: var(--primary-dark, #74c6eb);
}
html[data-theme="dark"] .inv-sent {
  background: #1d2e21;
  color: #95d8a9;
}
html[data-theme="dark"] .sm-row.is-primary {
  background: #1a232c;
}
html[data-theme="dark"] .open-site {
  background: #1b222c;
  border: 1px solid #344355;
}
html[data-theme="dark"] .open-site:hover {
  background: #1e2631;
}
html[data-theme="dark"] .off-flag {
  color: #a1a6b0;
  background: #212226;
}
html[data-theme="dark"] button.outline {
  border: 1px solid #344355;
}
html[data-theme="dark"] button.outline:hover {
  background: #1b222c;
}
html[data-theme="dark"] .signature-preview {
  background: repeating-linear-gradient(45deg, #1f1f1f 0 10px, #1d222a 10px 20px);
}
html[data-theme="dark"] .outline-file .btn-like {
  border: 1px solid #344355;
}
html[data-theme="dark"] .outline-file:hover .btn-like {
  background: #1b222c;
}
html[data-theme="dark"]::-webkit-scrollbar-track {
  background: #222429;
}
html[data-theme="dark"]::-webkit-scrollbar-thumb {
  border: 3px solid #343940;
}
html[data-theme="dark"] .orders-list::-webkit-scrollbar-thumb,
html[data-theme="dark"] .st-canvas::-webkit-scrollbar-thumb {
  background: #32353a;
}
html[data-theme="dark"] .orders-list::-webkit-scrollbar-track,
html[data-theme="dark"] .st-canvas::-webkit-scrollbar-track {
  background: #212226;
}
html[data-theme="dark"] .structure-btn {
  background: #1a232c;
  border: 1px solid #344355;
}
html[data-theme="dark"] .structure-btn:hover {
  background: #1e2831;
}
html[data-theme="dark"] .st-stat-warn {
  background: #2d281b;
  border-color: #63593d;
}
html[data-theme="dark"] .st-stat-bad {
  background: #2b1b1a;
  border-color: #573935;
}
html[data-theme="dark"] .lg-hidden-sec {
  background: #212226;
}
html[data-theme="dark"] .lg-empty {
  background: repeating-linear-gradient(45deg, #1f1f1f, #1f1f1f 3px, #362421 3px, #362421 6px);
  border: 1px solid #5f3f3a;
}
html[data-theme="dark"] .st-canvas {
  background: radial-gradient(circle, #262a2f 1px, transparent 1.2px) 0 0 / 22px 22px,
    #1a2026;
}
html[data-theme="dark"] .st-root-logo {
  background: #1f1f1f;
}
html[data-theme="dark"] .st-sec {
  border: 1px solid #3a4149;
}
html[data-theme="dark"] .st-toggle {
  background: color-mix(in srgb, var(--c) 10%, #1f1f1f);
}
html[data-theme="dark"] .st-toggle:hover {
  background: color-mix(in srgb, var(--c) 20%, #1f1f1f);
}
html[data-theme="dark"] .st-toggle-none {
  background: #1c2025;
}
html[data-theme="dark"] .st-more-btn {
  color: #9ea7b2;
}
html[data-theme="dark"] .st-more-btn:hover {
  background: #222429;
}
html[data-theme="dark"] .st-tag {
  color: #a1a6b0;
  background: #222429;
}
html[data-theme="dark"] .st-sec-hidden {
  background: #1d2026;
}
html[data-theme="dark"] .st-sec-hidden .st-sec-name {
  color: #a1a6b0;
}
html[data-theme="dark"] .st-sec-empty {
  background: repeating-linear-gradient(45deg, #1f1f1f, #1f1f1f 6px, #2b1d1a 6px, #2b1d1a 12px);
}
html[data-theme="dark"] .st-outside {
  background: #2b1d1a;
}
html[data-theme="dark"] .st-outside .st-sec-name {
  color: #df7b71;
}
html[data-theme="dark"] .st-bar {
  background: #222429;
}
html[data-theme="dark"] .st-bar-empty {
  background: #362421;
}
html[data-theme="dark"] .st-prod {
  border: 1px solid #383e46;
}
html[data-theme="dark"] .st-off .st-prod-name {
  color: #a0a7b1;
}
html[data-theme="dark"] .st-morenode {
  border: 1px dashed color-mix(in srgb, var(--c) 55%, #333333);
  background: color-mix(in srgb, var(--c) 6%, #1f1f1f);
}
html[data-theme="dark"] .st-morenode:hover {
  background: color-mix(in srgb, var(--c) 14%, #1f1f1f);
}
html[data-theme="dark"] .st-mi:hover {
  background: #1b232c;
}
html[data-theme="dark"] .st-mi-danger:hover {
  background: #2b1b1a;
}
html[data-theme="dark"] .team-plan {
  background: #1a2128;
}
html[data-theme="dark"] .team-card.open {
  border-color: #374556;
}
html[data-theme="dark"] .team-disabled {
  background: #212123;
}
html[data-theme="dark"] .tc-row:hover {
  background: #192129;
}
html[data-theme="dark"] .tc-role {
  background: #222429;
  color: #abb3bf;
}
html[data-theme="dark"] .tc-role.role-admin {
  background: #26282c;
  color: #d6dae5;
}
html[data-theme="dark"] .tc-role.role-head {
  background: #201b2d;
  color: #9b6ce5;
}
html[data-theme="dark"] .tc-role.role-manager {
  background: #1c262e;
}
html[data-theme="dark"] .tc-role.role-employee {
  background: #1d3130;
  color: #9cf1ea;
}
html[data-theme="dark"] .tc-off {
  background: #2b1b1a;
}
html[data-theme="dark"] .tc-plan em {
  color: #9b6ce5;
}
html[data-theme="dark"] .tc-plan-bar {
  background: #222429;
}
html[data-theme="dark"] .ur-group {
  background: #1a2026;
}
html[data-theme="dark"] .ur-title {
  color: #a2abb7;
}
html[data-theme="dark"] .ur-item em {
  color: #9b6ce5;
  background: #201b2d;
}
html[data-theme="dark"] .switch i {
  background: #2c3036;
}
html[data-theme="dark"] .switch i::after {
  background: #1f1f1f;
}
html[data-theme="dark"] .close-block {
  background: #1a2026;
}
html[data-theme="dark"] .close-review {
  background: #2d281b;
  border-color: #63593d;
}
html[data-theme="dark"] .close-closed {
  background: #1c2e24;
  border-color: #3b5f4b;
}
html[data-theme="dark"] .close-returned {
  background: #2b1b1a;
  border: 1px solid #573935;
  color: #df7b71;
}
html[data-theme="dark"] .pv-thumb-btn:hover {
  border-color: #344355;
}
html[data-theme="dark"] .vs-btn.active {
  background: #1c262e;
}
html[data-theme="dark"] .p-tile-off {
  background: #1f1f23;
}
html[data-theme="dark"] .p-tile-photo {
  background: #1e2126;
}
html[data-theme="dark"] .p-tile-meta {
  color: #abb3bf;
}
html[data-theme="dark"] .st-eye:hover {
  background: #222429;
}
html[data-theme="dark"] .st-grid {
  background: color-mix(in srgb, var(--c) 5%, #1f1f1f);
  border: 1px dashed color-mix(in srgb, var(--c) 45%, #333333);
}
html[data-theme="dark"] .st-tile {
  border: 1px solid #383e46;
}
html[data-theme="dark"] .st-tile-photo {
  background: #1e2126;
  border-bottom: 1px solid #343940;
}
html[data-theme="dark"] .st-grid-more {
  border: 1px dashed color-mix(in srgb, var(--c) 55%, #333333);
  background: #1f1f1f;
}
html[data-theme="dark"] .avail-in_stock {
  background: #1c2e24;
}
html[data-theme="dark"] .avail-in_transit {
  background: #1c262e;
}
html[data-theme="dark"] .avail-on_order {
  background: #212226;
  color: #a1a6b0;
}
html[data-theme="dark"] .code-flag {
  color: #f0d793;
  background: #342f1f;
  border: 1px solid #63593d;
}
html[data-theme="dark"] .code-warning {
  background: #2d281b;
  border: 1px solid #63593d;
  color: #f0d793;
}
html[data-theme="dark"] input.field-warn {
  background: #292619;
}
html[data-theme="dark"] .stock-warn {
  background: #2d281b;
  border: 1px solid #685d40;
  color: #f4e1af;
}
html[data-theme="dark"] .stock-table code {
  background: #222429;
}
html[data-theme="dark"] .stock-table tr.stock-only1c td {
  background: #1c2025;
  color: #abb3bf;
}
html[data-theme="dark"] .stock-st-ok {
  background: #1c2e24;
}
html[data-theme="dark"] .stock-st-bad {
  background: #2b1b1a;
}
html[data-theme="dark"] .stock-st-warn {
  background: #2d281b;
  color: #f0d793;
}
html[data-theme="dark"] .stock-st-muted {
  background: #212226;
  color: #a1a6b0;
}
html[data-theme="dark"] .cs-work {
  background: #1d3125;
  color: #97e6b9;
}
html[data-theme="dark"] .cs-lunch {
  background: #322c1e;
  color: #f0d298;
}
html[data-theme="dark"] .cs-soon {
  background: #1c252e;
  color: #7db3e5;
}
html[data-theme="dark"] .cs-off {
  background: #222429;
  color: #9fa7b2;
}
html[data-theme="dark"] .hr-card.hr-blocked {
  border-color: #5f3e3a;
  background: #2a1b19;
}
html[data-theme="dark"] .hr-warn.warn {
  background: #2f2a1c;
}
html[data-theme="dark"] .hr-warn.bad {
  background: #2d1d1b;
}
html[data-theme="dark"] .badge.hr-st-published {
  background: #1d3125;
  color: #97e6b9;
}
html[data-theme="dark"] .badge.hr-st-draft {
  background: #222429;
  color: #9fa7b2;
}
html[data-theme="dark"] .badge.hr-st-paused {
  background: #322c1e;
  color: #f0d298;
}
html[data-theme="dark"] .badge.hr-st-closed {
  background: #2d1d1b;
  color: #dd7d73;
}
html[data-theme="dark"] .badge.hr-ap-new {
  background: #1c252e;
  color: #7db3e5;
}
html[data-theme="dark"] .badge.hr-ap-in_work {
  background: #222429;
  color: #9fa7b2;
}
html[data-theme="dark"] .badge.hr-ap-invited {
  background: #1d3125;
  color: #97e6b9;
}
html[data-theme="dark"] .badge.hr-ap-rejected {
  background: #2d1d1b;
  color: #dd7d73;
}
html[data-theme="dark"] .badge.hr-ap-reserve {
  background: #322c1e;
  color: #f0d298;
}
html[data-theme="dark"] .badge.hr-ap-hired {
  background: #1e2931;
  color: #93cbee;
}
html[data-theme="dark"] .cal-work {
  background: #1e2b1e;
}
html[data-theme="dark"] .cal-short {
  background: #322c1e;
}
html[data-theme="dark"] .cal-weekend {
  background: #222429;
  color: #9fa7b2;
}
html[data-theme="dark"] .cal-holiday {
  background: #2d1d1b;
  color: #dd7d73;
}
html[data-theme="dark"] .serv-mark {
  background: #222429;
  color: #9fa7b2;
}
html[data-theme="dark"] .nav-count {
  background: #1c252e;
  color: #97cbe5;
}
html[data-theme="dark"] .nav-count.hot {
  background: #322b1e;
  color: #f0d298;
}
html[data-theme="dark"] .home-h {
  color: #95c6f0;
}
html[data-theme="dark"] .home-sec:hover {
  border-color: #3b5160;
}
html[data-theme="dark"] .hs-icon {
  background: linear-gradient(135deg, #1b262d, #1f2c34);
}
html[data-theme="dark"] .hs-body b {
  color: #95c6f0;
}
html[data-theme="dark"] .hs-count b {
  color: #67b6e9;
}
html[data-theme="dark"] .home-post {
  border-left: 5px solid #3b5160;
}
html[data-theme="dark"] .home-post.important {
  background: linear-gradient(90deg, #2c251a, var(--surface) 40%);
}
html[data-theme="dark"] .hp-kind-badge {
  background: #1c252e;
  color: #97cbe5;
}
html[data-theme="dark"] .hp-imp-badge {
  background: #372f21;
  color: #f0d298;
}
html[data-theme="dark"] .home-card-h {
  color: #95c6f0;
}
html[data-theme="dark"] .hb-date,
html[data-theme="dark"] .hh-date {
  color: #67b6e9;
}
html[data-theme="dark"] .hb-row.today {
  background: linear-gradient(90deg, #322c1e, transparent);
}
html[data-theme="dark"] .hb-wish {
  color: #f0d298;
}
html[data-theme="dark"] .home-bday {
  background: linear-gradient(180deg, #2a251a, var(--surface) 60%);
}
html[data-theme="dark"] .hn-row.unread b::before {
  color: #e9b068;
}
html[data-theme="dark"] .hn-row.hn-soon b {
  color: #f0d298;
}
html[data-theme="dark"] tr.j-go:hover td {
  background: #1a232a;
}
html[data-theme="dark"] .j-deleted {
  background: #2d1d1b;
}
html[data-theme="dark"] .j-changed {
  background: #322c1e;
  color: #f0d298;
}
html[data-theme="dark"] .res-line {
  color: #f0d298;
}
html[data-theme="dark"] .rl-card.soon {
  background: linear-gradient(90deg, #2d281b, var(--surface) 50%);
}
html[data-theme="dark"] .hi-row {
  background: linear-gradient(90deg, #302a1d, #2a251a);
}
html[data-theme="dark"] .hi-badge {
  color: #f0d298;
  background: #372f21;
}
