/* 1.99999 — dark theme (Профиль → Настройки → Тема). Graphite surfaces, Sigma yellow stays the accent.
   Everything is scoped to html[data-mode=dark]; data-mode is set from the profile (or the system) by theme-boot199999.js. */

/* interface size (Профиль → Размер интерфейса) */
html[data-scale="xs"] body{zoom:.84!important}
html[data-scale="s"] body{zoom:.92!important}
html[data-scale="m"] body{zoom:1!important}
html[data-scale="l"] body{zoom:1.15!important}

html[data-mode=dark]{color-scheme:dark;--ink:#e6e6e6;--muted:#9b9b9b;--line:#2c2c2c;--soft:#121212;--paper:#1a1a1a;--d-line:#2c2c2c;--d-soft:#161616;--d-ink:#e6e6e6;--d-mut:#9b9b9b}
html[data-mode=dark] body{background:#121212!important;color:#e6e6e6}
html[data-mode=dark] h1,html[data-mode=dark] h2,html[data-mode=dark] h3,html[data-mode=dark] strong{color:#f3f3f3}
html[data-mode=dark] a{color:#e8e8e8}
html[data-mode=dark] .muted,html[data-mode=dark] small{color:#9b9b9b}
html[data-mode=dark] .eyebrow{color:#d9a400}

/* surfaces */
html[data-mode=dark] .panel,html[data-mode=dark] .table-wrap,html[data-mode=dark] .lead-card,html[data-mode=dark] .deal-layout,html[data-mode=dark] .deal,
html[data-mode=dark] .feed-page .feed-list,html[data-mode=dark] .feed-page .feed-item,html[data-mode=dark] .feed-page .feed-item[open],
html[data-mode=dark] .bt-row,html[data-mode=dark] details.panel,html[data-mode=dark] .inbox-empty,html[data-mode=dark] .deal-empty{background:#1a1a1a!important;border-color:#2c2c2c!important;color:#e6e6e6}
html[data-mode=dark] .column{background:#171717!important}
html[data-mode=dark] .notice{background:#262011!important;border-color:#5c4a12!important;color:#eee!important}
html[data-mode=dark] hr{border-color:#2c2c2c}

/* forms */
html[data-mode=dark] input,html[data-mode=dark] select,html[data-mode=dark] textarea{background:#151515!important;border-color:#363636!important;color:#ececec!important}
html[data-mode=dark] input::placeholder,html[data-mode=dark] textarea::placeholder{color:#6f6f6f}
html[data-mode=dark] input:focus,html[data-mode=dark] select:focus,html[data-mode=dark] textarea:focus{border-color:#c79c00!important}
html[data-mode=dark] input:required:invalid:not([type=checkbox]):not([type=radio]):not([type=file]),html[data-mode=dark] select:required:invalid,html[data-mode=dark] textarea:required:invalid{background:#1e1519!important;border-color:#5a3443!important}
html[data-mode=dark] label{color:#d6d6d6}
html[data-mode=dark] button.secondary,html[data-mode=dark] .button.secondary,html[data-mode=dark] .secondary{background:#1f1f1f!important;color:#e2e2e2!important;border-color:#383838!important}
html[data-mode=dark] button.secondary:hover,html[data-mode=dark] .button.secondary:hover{background:#2a2a2a!important;border-color:#4a4a4a!important}
html[data-mode=dark] button:disabled{opacity:.45}
html[data-mode=dark] fieldset{border-color:#2c2c2c}

/* tables */
html[data-mode=dark] table{color:#e2e2e2}
html[data-mode=dark] th{background:#1f1f1f!important;color:#9b9b9b!important}
html[data-mode=dark] th,html[data-mode=dark] td{border-bottom-color:#262626!important}
html[data-mode=dark] tr:hover td{background:#1d1d1d}

/* menus, dropdowns, tabs */
html[data-mode=dark] .sidebar .grouped-nav .nav-drop,html[data-mode=dark] .action-menu[open]>div,html[data-mode=dark] .queue-filters,html[data-mode=dark] .notify-panel{background:#1d1d1d!important;border-color:#333!important;color:#e6e6e6}
html[data-mode=dark] .sidebar .grouped-nav .nav-drop a{color:#e6e6e6!important}
html[data-mode=dark] .sidebar .grouped-nav .nav-drop a:hover{background:#2a2410!important}
html[data-mode=dark] .ws-views,html[data-mode=dark] .inbox-tabs a:not(.current){background:#1c1c1c;color:#cfcfcf}
html[data-mode=dark] .ws-views a{color:#cfcfcf}html[data-mode=dark] .ws-views a.current{background:#2c2c2c;color:#fff}
html[data-mode=dark] .feed-tabs a{color:#bdbdbd}html[data-mode=dark] .feed-tabs a.current{color:#fff}
html[data-mode=dark] .feed-tabs{border-bottom-color:#2c2c2c!important}
html[data-mode=dark] .queue-filter-menu>summary,html[data-mode=dark] .deal-filters .queue-filter-menu>summary{background:#1c1c1c!important;border-color:#333!important;color:#ddd}
html[data-mode=dark] .flash-toast{background:#1f1f1f!important;color:#eee!important;border-color:#3a3a3a!important}

/* Входящие */
html[data-mode=dark] .feed-page .feed-item{border-bottom-color:#262626!important}
html[data-mode=dark] .feed-page .feed-item>summary:hover{background:#1f1f1f}
html[data-mode=dark] .feed-page .feed-item[open]>summary{background:#262011!important;border-bottom-color:#2c2c2c}
html[data-mode=dark] .feed-msg{background:#202020!important;border-color:#333!important;color:#e6e6e6}
html[data-mode=dark] .feed-src{background:#2a2a2a!important;color:#d0d0d0!important}
html[data-mode=dark] .feed-subject small,html[data-mode=dark] .feed-meta small{color:#9b9b9b}
html[data-mode=dark] .fa-inn,html[data-mode=dark] .fa-ai .pre{background:#262011!important;border-color:#5c4a12!important;color:#eee}
html[data-mode=dark] .feed-actions{border-left-color:#2c2c2c}

/* В работе */
html[data-mode=dark] .deal-list{border-right-color:#2c2c2c}
html[data-mode=dark] .deal-row{background:#1a1a1a;border-bottom-color:#242424;color:#e6e6e6}
html[data-mode=dark] .deal-row:hover{background:#1f1f1f}
html[data-mode=dark] .deal-row.chosen{background:#262011!important}
html[data-mode=dark] .dr-title{color:#cfcfcf}
html[data-mode=dark] .stage{filter:brightness(.85)}
html[data-mode=dark] .deal-actions{border-bottom-color:#2c2c2c}
html[data-mode=dark] .deal-actions .button.secondary,html[data-mode=dark] .deal-actions .action-menu>summary{background:transparent!important;border-color:transparent!important;color:#e6e6e6!important}
html[data-mode=dark] .deal-actions .button.secondary:hover{background:#242424!important}
html[data-mode=dark] .deal-side{border-left-color:#2c2c2c}
html[data-mode=dark] .deal-side a,html[data-mode=dark] .deal-side .context-link{color:#e6e6e6!important}
html[data-mode=dark] .deal-side-actions .deal-next,html[data-mode=dark] .deal-next{background:#262011!important;border-color:#5c4a12!important}
html[data-mode=dark] .dn-when{color:#e9c552}
html[data-mode=dark] .deal-page .chat .message.bubble{border-bottom-color:#262626!important}
html[data-mode=dark] .deal-page .chat .message.bubble.incoming{background:none!important}
html[data-mode=dark] .deal-page .chat .message.bubble.note{background:#262011!important}
html[data-mode=dark] .bubble .pre{color:#e6e6e6}
html[data-mode=dark] .chat-event{background:#1f1f1f!important;color:#9b9b9b}
html[data-mode=dark] .deal .reply-box,html[data-mode=dark] .reply-box{background:#171717!important;border-color:#2c2c2c!important}
html[data-mode=dark] .reply-box .ai-bar,html[data-mode=dark] .mail-compose .ai-bar{background:#1d1d1d!important;border-color:#2c2c2c!important}
html[data-mode=dark] .reply-box .ai-bar button,html[data-mode=dark] .ai-bar-title{color:#e6e6e6!important}
html[data-mode=dark] .reply-box .ai-result .pre,html[data-mode=dark] .mail-compose .ai-result .pre{background:#1d1d1d!important;border-color:#2c2c2c!important;color:#eee}
html[data-mode=dark] .ai-result{background:#1a1a1a!important}
html[data-mode=dark] .deal-step-menu{background:#1d1d1d!important;border-color:#333!important}
html[data-mode=dark] .deal-step-menu button,html[data-mode=dark] .deal-step-menu .now{color:#e6e6e6!important}
html[data-mode=dark] .deal-step-menu button:hover,html[data-mode=dark] .deal-step-menu .now{background:#2a2410!important}
html[data-mode=dark] .deal-row.has-unread-event,html[data-mode=dark] .feed-page .feed-item.has-unread-event>summary{box-shadow:inset 0 0 0 999px rgba(255,92,138,.13)}
html[data-mode=dark] .sdot-white{background:#1a1a1a}

/* карточка заявки, письма, документы */
html[data-mode=dark] .message{background:#1d1d1d;border-left-color:#3a3a3a}
html[data-mode=dark] .lead-steps a{background:#1f1f1f;color:#ddd;border-color:#333}
html[data-mode=dark] .buyer-choice,html[data-mode=dark] .identity-preview,html[data-mode=dark] .customer-identity,html[data-mode=dark] .identity-card{background:#1d1d1d!important;border-color:#333!important}
html[data-mode=dark] .invoice-footer{background:#000!important}
html[data-mode=dark] .mail-status{background:#1d1d1d;border-color:#333}
html[data-mode=dark] .sigma-file-card{background:#1f1f1f;border-color:#333;color:#e6e6e6}

/* чат */
html[data-mode=dark].im-page,html[data-mode=dark] .im-page{background:#121212!important;color:#e6e6e6}
html[data-mode=dark] .im-shell,html[data-mode=dark] .im-sidebar,html[data-mode=dark] .im-conversation,html[data-mode=dark] .im-header,html[data-mode=dark] .im-composer,html[data-mode=dark] .im-feed-wrap,html[data-mode=dark] .im-feed,html[data-mode=dark] .im-chat-tools{background:#171717!important;border-color:#2a2a2a!important;color:#e6e6e6}
html[data-mode=dark] .im-dialog{color:#e6e6e6}html[data-mode=dark] .im-dialog.is-current,html[data-mode=dark] .im-dialog:hover{background:#262011!important}
html[data-mode=dark] .im-bubble{background:#242424!important;color:#eee!important}
html[data-mode=dark] .im-message.is-mine .im-bubble{background:#3a300c!important}
html[data-mode=dark] .im-search{border-bottom-color:#2a2a2a!important}
html[data-mode=dark] .im-search input{background:#1f1f1f!important}
html[data-mode=dark] .im-date{color:#8a8a8a}
html[data-mode=dark] .im-empty-icon{background:#222}

/* профиль: переключатели */
.prefs fieldset{border:0;padding:0;margin:0 0 18px}
.prefs legend{font-weight:700;margin-bottom:8px}
.seg{display:inline-flex;flex-wrap:wrap;gap:4px;background:#f1f0eb;border-radius:10px;padding:4px}
.seg label{margin:0;font-weight:500}
.seg input{position:absolute;opacity:0;width:1px;height:1px}
.seg span{display:inline-block;padding:8px 16px;border-radius:8px;cursor:pointer}
.seg input:checked+span{background:#fec606;color:#111;font-weight:700}
.seg input:focus-visible+span{outline:2px solid #c79c00}
.prefs small{display:block;margin-top:6px}
.prefs-foot{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
html[data-mode=dark] .seg{background:#1f1f1f}
html[data-mode=dark] .seg span{color:#ddd}
html[data-mode=dark] .seg input:checked+span{color:#111}

/* dark — remaining light islands */
html[data-mode=dark] .notify-bell{background:#1d1d1d!important;border-color:#333!important;color:#fff!important}
html[data-mode=dark] .feed-state,html[data-mode=dark] .stage,html[data-mode=dark] .contact-avatar{filter:brightness(.78) saturate(1.1)}
html[data-mode=dark] .mail-read-state,html[data-mode=dark] .agenda-list,html[data-mode=dark] .cal-grid,html[data-mode=dark] .g-form,html[data-mode=dark] .buyer-intake,html[data-mode=dark] .payment-card,html[data-mode=dark] .im-avatar-preview{background:#1a1a1a!important;border-color:#2c2c2c!important;color:#e6e6e6}
html[data-mode=dark] td{background:transparent!important}
html[data-mode=dark] .cal-dow{background:#1f1f1f!important;color:#aaa}
html[data-mode=dark] .cal-day,html[data-mode=dark] .calendar-day{background:#171717!important;border-color:#262626!important}
html[data-mode=dark] .cal-day.other,html[data-mode=dark] .calendar-day.calendar-outside{background:#131313!important}
html[data-mode=dark] .cal-day.weekend{background:#191714!important}
html[data-mode=dark] .cal-item{filter:brightness(.6) saturate(1.3);color:#111!important}
html[data-mode=dark] .workspace-divider{background:#2a2a2a!important}
html[data-mode=dark] .im-profile{background:#1f1f1f!important;color:#ddd!important;border-color:#333!important}
html[data-mode=dark] summary{color:#e6e6e6}
html[data-mode=dark] details>summary:not(.st):not([class*=fa-]){background:transparent!important}
html[data-mode=dark] .bt-player{background:#1f1f1f!important;color:#ddd}
html[data-mode=dark] .bt-player.is-turn{background:#fec606!important;color:#111}
html[data-mode=dark] .notify-item{background:#1a1a1a!important;color:#e6e6e6;border-color:#2a2a2a!important}
html[data-mode=dark] .notify-item:not(.read){background:#1f1b10!important}
html[data-mode=dark] a.current:not(.sidebar a),html[data-mode=dark] a.active{background:#2a2410!important;color:#fff!important}
html[data-mode=dark] section:not([class]),html[data-mode=dark] .kanban section{background:#171717}
html[data-mode=dark] strong:not([class]){background:transparent}
html[data-mode=dark] .reply-box textarea,html[data-mode=dark] textarea{background:#151515!important}
html[data-mode=dark] .chat div:not([class]){background:transparent}

/* ── «Полночь»: deep blue-navy with a turquoise glow; Sigma yellow stays on the buttons ── */
html[data-theme=midnight]{--ink:#e7edf6;--muted:#8b9bb2;--line:#1f2d42;--soft:#0b1220;--d-line:#1f2d42;--d-soft:#0f1828;--d-ink:#e7edf6;--d-mut:#8b9bb2}
html[data-theme=midnight] body{background:#0b1220!important;color:#e7edf6}
html[data-theme=midnight] .sidebar{background:#060b15!important}
html[data-theme=midnight] .sidebar a:hover{background:#13213a}
html[data-theme=midnight] .panel,html[data-theme=midnight] .table-wrap,html[data-theme=midnight] .lead-card,html[data-theme=midnight] .deal-layout,html[data-theme=midnight] .deal,html[data-theme=midnight] .feed-page .feed-list,html[data-theme=midnight] .feed-page .feed-item,html[data-theme=midnight] .feed-page .feed-item[open],html[data-theme=midnight] .bt-row,html[data-theme=midnight] .inbox-empty,html[data-theme=midnight] .deal-empty,
html[data-theme=midnight] .mail-read-state,html[data-theme=midnight] .agenda-list,html[data-theme=midnight] .cal-grid,html[data-theme=midnight] .g-form,html[data-theme=midnight] .buyer-intake,html[data-theme=midnight] .payment-card,html[data-theme=midnight] .notify-item,html[data-theme=midnight] .deal-row,
html[data-theme=midnight] .im-shell,html[data-theme=midnight] .im-sidebar,html[data-theme=midnight] .im-conversation,html[data-theme=midnight] .im-header,html[data-theme=midnight] .im-composer,html[data-theme=midnight] .im-feed-wrap,html[data-theme=midnight] .im-feed,html[data-theme=midnight] .im-chat-tools{background:#111b2c!important;border-color:#1f2d42!important}
html[data-theme=midnight] .column,html[data-theme=midnight] .cal-day,html[data-theme=midnight] .calendar-day,html[data-theme=midnight] .kanban section,html[data-theme=midnight] section:not([class]){background:#0f1828!important;border-color:#1c2a3f!important}
html[data-theme=midnight] input,html[data-theme=midnight] select,html[data-theme=midnight] textarea,html[data-theme=midnight] .reply-box textarea{background:#0c1525!important;border-color:#25354d!important}
html[data-theme=midnight] input:focus,html[data-theme=midnight] select:focus,html[data-theme=midnight] textarea:focus{border-color:#2fc4d2!important;box-shadow:0 0 0 3px #2fc4d222!important}
html[data-theme=midnight] button.secondary,html[data-theme=midnight] .button.secondary,html[data-theme=midnight] .secondary,html[data-theme=midnight] .notify-bell,html[data-theme=midnight] .bt-player,html[data-theme=midnight] .im-profile,html[data-theme=midnight] .queue-filter-menu>summary{background:#15223a!important;border-color:#26395a!important;color:#dfe8f5!important}
html[data-theme=midnight] th,html[data-theme=midnight] .cal-dow{background:#15223a!important;color:#8b9bb2!important}
html[data-theme=midnight] th,html[data-theme=midnight] td{border-bottom-color:#1c2a3f!important}
html[data-theme=midnight] .sidebar .grouped-nav .nav-drop,html[data-theme=midnight] .action-menu[open]>div,html[data-theme=midnight] .queue-filters,html[data-theme=midnight] .notify-panel,html[data-theme=midnight] .deal-step-menu{background:#121d30!important;border-color:#26395a!important}
/* turquoise for «selected / opened / unread» */
html[data-theme=midnight] .deal-row.chosen,html[data-theme=midnight] .feed-page .feed-item[open]>summary,html[data-theme=midnight] .im-dialog.is-current,html[data-theme=midnight] .im-dialog:hover,html[data-theme=midnight] .notify-item:not(.read),html[data-theme=midnight] a.current:not(.sidebar a),html[data-theme=midnight] a.active,html[data-theme=midnight] .deal-step-menu button:hover,html[data-theme=midnight] .deal-step-menu .now,html[data-theme=midnight] .sidebar .grouped-nav .nav-drop a:hover{background:#0f3340!important}
html[data-theme=midnight] .deal-row.chosen{border-left-color:#2fc4d2!important}
html[data-theme=midnight] .deal-row:hover,html[data-theme=midnight] .feed-page .feed-item>summary:hover{background:#15223a}
html[data-theme=midnight] .notice,html[data-theme=midnight] .deal-next,html[data-theme=midnight] .deal-side-actions .deal-next,html[data-theme=midnight] .fa-inn,html[data-theme=midnight] .fa-ai .pre,html[data-theme=midnight] .deal-page .chat .message.bubble.note{background:#0f2e38!important;border-color:#1d6a78!important}
html[data-theme=midnight] .dn-when,html[data-theme=midnight] .dn-label{color:#5fd4e0!important}
html[data-theme=midnight] .feed-msg,html[data-theme=midnight] .im-bubble,html[data-theme=midnight] .chat-event,html[data-theme=midnight] .reply-box,html[data-theme=midnight] .reply-box .ai-bar,html[data-theme=midnight] .mail-compose .ai-bar,html[data-theme=midnight] .ai-result,html[data-theme=midnight] .reply-box .ai-result .pre{background:#15223a!important;border-color:#26395a!important}
html[data-theme=midnight] .im-message.is-mine .im-bubble{background:#0f3a44!important}
html[data-theme=midnight] .seg{background:#15223a}
html[data-theme=midnight] .deal-side,html[data-theme=midnight] .deal-list,html[data-theme=midnight] .deal-actions,html[data-theme=midnight] .feed-actions{border-color:#1f2d42!important}
html[data-theme=midnight] .feed-page .feed-item{border-bottom-color:#1c2a3f!important}
html[data-theme=midnight] .deal-row{border-bottom-color:#1c2a3f!important}
html[data-theme=midnight] .bt-root,html[data-theme=midnight] .gm-card{background:#0c1525!important}
html[data-theme=midnight] .bt-board{background:#111b2c;border-color:#1f2d42}
html[data-mode=dark] .deal-page .reply-box textarea:required:invalid,html[data-mode=dark] .deal-page .reply-box textarea{background:#151515!important;border-color:#363636!important;color:#ececec!important}
html[data-theme=midnight] .deal-page .reply-box textarea:required:invalid,html[data-theme=midnight] .deal-page .reply-box textarea{background:#0c1525!important;border-color:#25354d!important}

/* colour markers (tasks, requests, cards): pastel backgrounds → deep tints with a bright left stripe */
html[data-mode=dark] .color-blue{background:#142233!important;border-left-color:#3b82f6!important}
html[data-mode=dark] .color-green{background:#122a22!important;border-left-color:#22a06b!important}
html[data-mode=dark] .color-yellow{background:#2a2410!important;border-left-color:#e5b520!important}
html[data-mode=dark] .color-orange{background:#2e1d10!important;border-left-color:#f08c2e!important}
html[data-mode=dark] .color-purple{background:#221a33!important;border-left-color:#8b5cf6!important}
html[data-mode=dark] .color-pink{background:#2e1622!important;border-left-color:#e7609a!important}
html[data-mode=dark] .color-none,html[data-mode=dark] .color-none>summary,html[data-mode=dark] .approval-item[data-sales-category]>summary{background:#1a1a1a!important}
html[data-mode=dark] .agenda-row{border-bottom-color:#262626!important;color:#e6e6e6}
html[data-mode=dark] .agenda-row:hover{background:#202020!important}
html[data-mode=dark] .agenda-row a,html[data-mode=dark] .agenda-row strong{color:#f0f0f0!important}
html[data-mode=dark] .agenda-row small,html[data-mode=dark] .agenda-row .muted{color:#9b9b9b!important}
html[data-mode=dark] .agenda-switch a.current{background:#2a2410!important;color:#fff!important}
html[data-mode=dark] .lead-card{color:#e6e6e6}
html[data-theme=midnight] .color-none,html[data-theme=midnight] .color-none>summary,html[data-theme=midnight] .approval-item[data-sales-category]>summary{background:#111b2c!important}
html[data-theme=midnight] .agenda-row:hover{background:#15223a!important}
html[data-theme=midnight] .agenda-row{border-bottom-color:#1c2a3f!important}
html[data-mode=dark] .agenda-row .agenda-state,html[data-mode=dark] .agenda-row .agenda-who{color:#c4c4c4!important;opacity:1!important}
html[data-mode=dark] .agenda-row .agenda-when small,html[data-mode=dark] .agenda-row .agenda-main small{color:#a8a8a8!important}
html[data-mode=dark] .agenda-summary{color:#b5b5b5!important}html[data-mode=dark] .agenda-summary b{color:#fff!important}
html[data-mode=dark] .agenda-row .urgency-overdue,html[data-mode=dark] .agenda-row.urgency-overdue .agenda-when{color:#ff6b6b!important}

/* 1.99999 · dark safety net: white panels left over from older pages (Почта, Табель, Помощник, меню «⋯»),
   yellow buttons with light text, pale status chips. Found by an automatic contrast scan of every page. */
html[data-mode=dark] .mailbox-layout,html[data-mode=dark] .mailbox-folders,html[data-mode=dark] .mailbox-list-meta,
html[data-mode=dark] .payroll-console,html[data-mode=dark] .copilot-layout,html[data-mode=dark] .agent-history,html[data-mode=dark] .agent-status,
html[data-mode=dark] .agent-composer,html[data-mode=dark] details.action-menu>div,html[data-mode=dark] details.more-menu>div{background:#1a1a1a!important;border-color:#2c2c2c!important;color:#e6e6e6}
html[data-mode=dark] .mailbox-queue>a,html[data-mode=dark] .payroll-nav>a{background:#1f1f1f!important;border-color:#333!important;color:#e6e6e6!important}
html[data-mode=dark] .mailbox-queue>a.current,html[data-mode=dark] .payroll-nav>a.current,html[data-mode=dark] .nav-drop>a.current{background:#2a2410!important;border-color:#5c4a12!important;color:#fff!important}
html[data-mode=dark] .mailbox-folders a,html[data-mode=dark] .mailbox-folders h2,html[data-mode=dark] .mailbox-folders summary{color:#e6e6e6!important}
html[data-mode=dark] a.button:not(.secondary),html[data-mode=dark] .primary-action{color:#111!important}
html[data-mode=dark] .day-cell{background:#262d36!important;color:#c9d3df!important}
html[data-mode=dark] .day-cell.worked{background:#163a2a!important;color:#9fe3c2!important}
html[data-mode=dark] .timesheet th:first-child{background:#1a1a1a}
html[data-mode=dark] .timesheet .weekend{background:#1d2128}
html[data-mode=dark] em.stage,html[data-mode=dark] em.feed-state,html[data-mode=dark] .file-count{background:rgba(255,255,255,.08)!important;color:#e6e6e6!important}
html[data-mode=dark] em.feed-state.s-new,html[data-mode=dark] em.stage.stage-0{background:#3a300c!important;color:#ffd84d!important}
html[data-mode=dark] em.feed-state.s-reply{background:#3d2a12!important;color:#ffb871!important}
html[data-mode=dark] em.feed-state.s-spam{background:#3d1a1a!important;color:#ff9b96!important}
html[data-mode=dark] .feed-page a>b{background:#262626!important;color:#e6e6e6!important}
html[data-mode=dark] .feed-owner{color:#9b9b9b!important}
html[data-mode=dark] .calendar-reschedule{color:#9cc4e6!important}
html[data-mode=dark] .payroll-console label,html[data-mode=dark] .payroll-console span{color:#c9c9c9}
html[data-mode=dark] .sidebar .grouped-nav .nav-drop a.current{background:#2a2410!important;color:#fff!important}
html[data-mode=dark] .reorder-hint,html[data-mode=dark] .worker-drag-handle{color:#8fb3c4!important}
html[data-mode=dark] .energy-mark{color:#111!important}
html[data-mode=dark] .nav-unread,html[data-mode=dark] .sidebar .count{color:#ffd84d}
html[data-mode=dark] .department-heading th,html[data-mode=dark] .department-heading td{background:#202020!important;color:#cfcfcf!important}
html[data-mode=dark] .panel-divider{background:#232323!important}
html[data-mode=dark] .mailbox-row,html[data-mode=dark] .mailbox-list{border-color:#2c2c2c!important}

/* 2.0000001a · dark safety net, round 2: «Подключения», «С сайта», отчёт по заказам, импорт, калькулятор, профиль */
html[data-mode=dark] :is(.connection-hub>a,.analytics-kpi,.analytics-details,.analytics-chart-panel,.site-workspace,.site-list,.site-list-head,.ct-actions,.profile-cards>div,.import-tabs>a,.incoming-tabs>a,.site-switch>a){background:#1a1a1a!important;border-color:#2c2c2c!important;color:#e6e6e6!important}
html[data-mode=dark] :is(.connection-hub>a) :is(strong,b,h2,h3,span,small){color:inherit}
html[data-mode=dark] .connection-hub>a:hover{border-color:#5c4a12!important;background:#211d10!important}
html[data-mode=dark] :is(.import-tabs>a,.incoming-tabs>a,.site-switch>a):is(.current,.active,[aria-current]){background:#2a2410!important;border-color:#5c4a12!important;color:#fff!important}
html[data-mode=dark] :is(a.active>b,a.site-all>b,.department-label,.site-empty-symbol,span.tag,.g-addr){background:#262626!important;color:#e6e6e6!important}
html[data-mode=dark] a.active>.site-brand-mark{background:#2f3317!important;color:#e9f0a8!important}
html[data-mode=dark] :is(.plate,.cells>.cell,.seg>button,.tabs>button,.modeswitch>button,.actions>.btn){background:#262011!important;border-color:#5c4a12!important;color:#f1f1f1!important}
html[data-mode=dark] .analytics-day{color:#9cb4c4!important}
/* 2.0000001a · открытое письмо в «Почте» в тёмной/синей теме */
html[data-mode=dark] :is(.mailbox-reader-top,.mailbox-context,.mail-more-menu,.mailbox-file-form,.visible-files,.sigma-file-tile,.sigma-file-download){background:#1a1a1a!important;border-color:#2c2c2c!important;color:#e6e6e6!important}
html[data-theme=midnight] :is(.mailbox-reader-top,.mailbox-context,.mail-more-menu,.mailbox-file-form,.visible-files,.sigma-file-tile,.sigma-file-download,.panel,.deal-layout,.mailbox-layout){background:#111b2e!important;border-color:#22314d!important}
html[data-mode=dark] :is(.visible-files-label>span,.sigma-file-thumbnail){background:#262626!important;color:#e6e6e6!important}
html[data-mode=dark] .review-state.review-new{color:#ffcf4d!important}
html[data-mode=dark] .nav-unread,html[data-mode=dark] :is(.selected,[aria-current=true]) span{color:#ffd84d}
/* 2.0000007a · контраст после 2.0000006a: счётчики в выбранных вкладках, форма «УПД и входящие» */
html[data-mode=dark] main a.current span,html[data-mode=dark] main a.current b{color:#ffd84d!important}
html[data-mode=dark] .incoming-summary,html[data-mode=dark] .incoming-summary b{color:#b9c3c9!important}
html[data-mode=dark] .incoming-form legend{color:#f1f1f1!important}
html[data-mode=dark] .incoming-form label,html[data-mode=dark] .incoming-filters label{color:#c9d1d6!important}
