/* Optional third palette. Paint only; no billing, entitlement, geometry or data changes.
   The ordinary dark/light themes remain governed by their existing styles. */
html[data-theme="exclusive"] {
  color-scheme: dark;
  --bg: #031743;
  --system-surface-color: #031743;
  --system-surface-background: radial-gradient(ellipse at 0% 0%,#0865e9 0%,#063c95 24%,#041f55 53%,#020d29 100%);
  --panel: #07316c;
  --panel2: #0d4088;
  --text: #f7fbff;
  --muted: #adc8ef;
  --line: rgba(65,153,255,.38);
  --accent: #25e39a;
  --green: #25e39a;
  --iq-top: #41edaa;
  --iq-upper: #11ce86;
  --iq-lower: #069461;
  --iq-bottom: #046146;
  --iq-gradient: linear-gradient(145deg,#52f3b7 0%,#12d58c 30%,#079966 70%,#035b43 100%);
  --iq-tint: linear-gradient(145deg,rgba(65,237,170,.20),rgba(4,97,70,.28));
  --exclusive-blue-fill: radial-gradient(ellipse at 0% 0%,rgba(39,151,255,.34),transparent 65%),linear-gradient(135deg,#104eab 0%,#082f70 55%,#031b48 100%);
  --exclusive-panel-fill: linear-gradient(135deg,#0c3776,#041b46);
  --depth-dark-finish: var(--exclusive-blue-fill);
  --depth-edge: rgba(93,186,255,.58);
  --depth-side: rgba(76,160,255,.18);
  --depth-bottom: rgba(0,7,34,.40);
  --depth-shadow: rgba(0,5,29,.50);
  --depth-lip: rgba(0,12,48,.28);
  --home-iq-button-fill: var(--iq-gradient);
  --creation-button-fill: var(--iq-gradient);
  --brand-action-fill: var(--iq-gradient);
  --creation-button-shadow: inset 0 1px 1px rgba(204,255,230,.64),0 6px 22px rgba(0,211,134,.23);
  --brand-action-shadow: var(--creation-button-shadow);
  --scanner-library-back-border: rgba(105,255,193,.35);
  --scanner-library-back-shadow: var(--creation-button-shadow);
  /* Deletion uses dark-theme IQ violet, independent of ordinary green accents. */
  --exclusive-delete-fill: linear-gradient(180deg,#8a29fa 0%,#6726e1 35%,#471ac0 70%,#330a9e 100%);
  --exclusive-delete-border: transparent;
  --exclusive-delete-shadow: 0 6px 18px rgb(51 10 158 / .2);
  --danger-bg: var(--iq-gradient);
  --danger-bg-hover: var(--iq-gradient);
  --danger-bg-active: var(--iq-gradient);
  --danger-border: rgba(37,227,154,.44);
  --danger-outline-text: #73f1bf;
  --danger-outline-border: rgba(37,227,154,.42);
  --danger-outline-hover: var(--iq-tint);
  --danger-shadow: 0 5px 18px rgba(0,164,109,.20);
  --surface-raised: #0b3a7c;
  --surface-subtle: #062657;
  --surface-accent: #10539c;
  --surface-scrim: rgba(0,8,34,.65);
}

/* Last, deliberately scoped paint layer wins over legacy hard-coded violet.
   The reserved id increases specificity without selecting another element. */
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body {
  color: var(--text);
  background: radial-gradient(ellipse at 0% 0%,#0865e9 0%,#063c95 24%,#041f55 53%,#020d29 100%) !important;
  background-attachment: fixed !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body.home-route :is(#app .home-cards,.home-cards.home-drag-layer) > .card[data-home-card] {
  background: var(--exclusive-blue-fill) !important;
  border-color: rgba(47,150,255,.64) !important;
  box-shadow: inset 0 1px 1px rgba(129,209,255,.44),inset 1px 0 0 rgba(79,167,255,.22),inset 0 -2px 3px rgba(0,9,40,.4),0 6px 20px rgba(0,8,37,.3) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :is(.home-ai-search,.assistant-composer,.chat-composer,.tabbar,.desktop-topbar,#desktopAssistantPanel,.desktop-cases-sidebar) {
  background: var(--exclusive-panel-fill) !important;
  border-color: var(--line) !important;
  box-shadow: inset 0 1px 0 rgba(75,169,255,.18),0 5px 24px rgba(0,8,32,.26) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel,.tabbar) :is(
  .primary,.button-variant-1,.ui-button-primary,.article395-submit,#addMain,.home-attach,.send-question,.chat-send,.assistant-send,
  .case-edit-save,.profile-logout,.calendar-voice-fab,.calendar-event-form-head button:last-child,
  .tab-plus,.profile-unified-icon,.case-action.archive,.document-swipe-pin,.document-swipe-delete,
  .case-tabs button.active,.filter-token.active,.document-filter-chips .chip.active,.scanner-filters button.active,
  .timeline-switch button[aria-selected="true"],.auth-tabs button.active,.text-size-options button.active
) {
  background: var(--iq-gradient) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: rgba(105,255,193,.35) !important;
  box-shadow: var(--creation-button-shadow) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) :is(
  .secondary,.button-variant-2,.icon-btn,button[data-back],.bell,.voice-question,.chat-voice,.assistant-voice,
  .case-tabs button:not(.active),.document-filter-chips .chip:not(.active),.auth-tabs button:not(.active),
  .timeline-filters button:not(.active),.case-section-option:not(.active),.scanner-filters button:not(.active)
) {
  background: linear-gradient(145deg,rgba(19,113,181,.38),rgba(1,36,83,.62)) !important;
  border-color: rgba(61,163,255,.45) !important;
  color: #eaf7ff !important;
  -webkit-text-fill-color: #eaf7ff !important;
  box-shadow: inset 0 1px 0 rgba(113,205,255,.16),0 4px 12px rgba(0,10,39,.18) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel,.tabbar) #addMain {
  border-color: var(--bg) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) #addMain .desktop-add-label {
  background: none !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) .tab.active {
  color: #27e69d !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) .tab.active svg {
  color:#27e69d !important;
  stroke:currentColor !important;
  filter: drop-shadow(0 0 6px rgba(34,235,157,.35));
}
@media (min-width:1024px) {
  html[data-theme="exclusive"]:not(#exclusive-paint-reserve) .nav-items-row .tab.active {
    background:linear-gradient(145deg,rgba(37,227,154,.20),rgba(1,67,85,.35)) !important;
    box-shadow:inset 0 0 0 1px rgba(72,247,184,.3),0 5px 16px rgba(0,8,35,.3) !important;
  }
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :is(.home-ai-search,.assistant-composer,.chat-composer) :is(input,textarea) {
  color: var(--text) !important;
  caret-color: var(--accent);
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :is(input,textarea)::placeholder { color:#a5c1e9; }
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :is(.home-layout-hint,.plan-home-count,.home-card-count) { color:#41e6ac !important; }

/* Reuse the original silhouettes and alpha. Only branded decorative art is
   hue-shifted; photos, user documents, gold coins and semantic statuses are untouched. */
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :is([data-brand-theme="dark"],.desktop-brand img,.auth-brand img),
html[data-theme="exclusive"] [data-home-card="recommendations"] .art-dark,
html[data-theme="exclusive"] [data-home-card="document-builder"] .art-dark,
html[data-theme="exclusive"] [data-home-card="discussion"] .art-dark {
  filter: hue-rotate(245deg) saturate(.85) brightness(1.2) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :is(.assistant-fab,.assistant-intro-brain,.assistant-avatar,.assistant-brain,.case-discussion-orb) {
  background-color: #031335 !important;
  border-color: #25e39a !important;
  box-shadow: 0 0 0 3px rgba(37,227,154,.18),0 6px 24px rgba(0,211,134,.22) !important;
}
html[data-theme="exclusive"] :is(.assistant-avatar,.assistant-intro-brain,.case-brain-fab-orb) :is(img,video) { filter:none !important; }
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) .profile-unified-icon svg { color:#fff !important; }
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :focus-visible { outline-color:#72ffc5; }

/* This new swatch is visible in all themes; no existing option is repainted. */
html body #app .theme-option.exclusive-preview {
  grid-column: 1 / -1;
  border-color: #237dda;
}
html body #app .exclusive-preview .theme-preview {
  background: linear-gradient(135deg,#0865e9,#031743) !important;
}
html body #app .exclusive-preview .theme-preview i {
  background: linear-gradient(145deg,#145bc0,#07265a) !important;
  border:1px solid rgba(101,188,255,.4);
}
html body #app .exclusive-preview .theme-preview i:last-child {
  background:linear-gradient(145deg,#52f3b7,#079966) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) .theme-option.active {
  border-color:#25e39a !important;
  box-shadow:0 0 0 2px rgba(37,227,154,.22) !important;
}

/* Viewer chrome only. The rendered PDF canvas and source colours are preserved. */
html[data-theme="exclusive"]:not(#exclusive-paint-reserve),
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) #pdfViewport { background-color:#031743; }
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) :is(#pdfStatus,.pdf-focus-hint,.pdf-ocr-note) {
  background:var(--exclusive-panel-fill) !important;
  color:#f7fbff !important;
  border-color:var(--line) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) #pdfRotatePage {
  background:var(--iq-gradient) !important;
  color:#fff !important;
}

.exclusive-home-art { display:none; }
html[data-theme="exclusive"] .exclusive-home-art,
html .exclusive-home-art.exclusive-tile-art { display:block; background-image:url('/assets/theme-exclusive/home-icons-20261102.webp'); background-size:200% 300%; background-position:var(--exclusive-art-x) var(--exclusive-art-y); background-repeat:no-repeat; pointer-events:none; }
html:not(#exclusive-paint-reserve) body .card:has(> .exclusive-tile-art) > .home-card-art,
html[data-theme="exclusive"] .home-library-item:has(> .exclusive-home-art) > .home-library-art { display:none !important; }
/* 10.11.2026: Казахстан — тот же лист иконок, на монете госпошлины тенге (home.js добавляет класс). */
html .exclusive-home-art.exclusive-art-kz { background-image:url('/assets/theme-exclusive/home-icons-kz-20261110.webp'); }
html:not(#exclusive-paint-reserve) body .card > .exclusive-tile-art { position:absolute !important; --exclusive-art-size:89.6px; width:var(--exclusive-art-size); height:var(--exclusive-art-size); flex:none; right:calc(10px - var(--exclusive-art-size) * var(--exclusive-pad-right)); bottom:calc(10px - var(--exclusive-art-size) * var(--exclusive-pad-bottom)); z-index:0; }
html[data-theme="exclusive"] .exclusive-library-art { width:64px; height:64px; flex:none; }
@media(min-width:1024px) { html:not(#exclusive-paint-reserve) body .card > .exclusive-tile-art { --exclusive-art-size:105.6px; } }
html [data-home-card="recommendations"] > .exclusive-tile-art { --exclusive-pad-right:0.056640625; --exclusive-pad-bottom:0.0; }
html [data-home-card="document-builder"] > .exclusive-tile-art { --exclusive-pad-right:0.060546875; --exclusive-pad-bottom:0.0; }
html [data-home-card="news"] > .exclusive-tile-art { --exclusive-pad-right:0.017578125; --exclusive-pad-bottom:0.099609375; }
html [data-home-card="article-395-calculator"] > .exclusive-tile-art { --exclusive-pad-right:0.083984375; --exclusive-pad-bottom:0.15625; }
html [data-home-card="discussion"] > .exclusive-tile-art { --exclusive-pad-right:0.07421875; --exclusive-pad-bottom:0.220703125; }
html [data-home-card="state-duty-calculator"] > .exclusive-tile-art { --exclusive-pad-right:0.060546875; --exclusive-pad-bottom:0.1875; }

html[data-theme="exclusive"] .exclusive-home-art.exclusive-scanner-art,
html .exclusive-tile-art.exclusive-scanner-art { background-image:url('/assets/theme-exclusive/scanner-pdf-inside-20261108.webp'); background-size:100% 100%; background-position:center; }
html [data-home-card="document-builder"] > .exclusive-tile-art { --exclusive-pad-right:0.19457735247208932; --exclusive-pad-bottom:0.07655502392344497; }

/* Фиолетовые детали иллюстраций только на Главной тёмной темы. */
html[data-theme="dark"] body .card > .exclusive-tile-art {background-image:url('/assets/theme-dark/home-icons-violet-muted-20261108.webp');}
html[data-theme="dark"] body .card > .exclusive-tile-art.exclusive-scanner-art {background-image:url('/assets/theme-dark/scanner-pdf-violet-muted-20261108.webp');}

html[data-theme="dark"] body .card[data-home-card="news"] > .exclusive-tile-art {clip-path:inset(4% 0 0 0);}

/* Край телефона из соседней ячейки спрайта не должен быть виден над монетами. */
@media(min-width:1024px) {
  html body .card[data-home-card="article-395-calculator"] > .exclusive-tile-art {clip-path:inset(4% 0 0 0);}
}

/* Match IQ to the navigation plus using the same palette and original letter mask. */
html[data-theme="exclusive"] body #app .home-header .home-brand { position:relative; }
html[data-theme="exclusive"] body #app .home-header .home-brand::after {
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:80%;
  aspect-ratio:2172 / 724;
  transform:translateY(-50%);
  pointer-events:none;
  background:var(--iq-gradient);
  background-size:21% 46%;
  background-position:95% 47%;
  background-repeat:no-repeat;
  -webkit-mask:url('/assets/advokat-iq-wordmark-dark.png') center / 100% 100% no-repeat;
  mask:url('/assets/advokat-iq-wordmark-dark.png') center / 100% 100% no-repeat;
  clip-path:inset(0 0 0 75%);
}

/* Three equally sized square theme choices, in every palette. */
html body #app.screen .theme-options {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px !important;
  align-items:stretch;
}
html body #app .theme-options > .theme-option {
  grid-column:auto;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:0;
  height:auto;
  aspect-ratio:1;
  padding:10px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  position:relative;
}
html body #app .theme-options > .theme-option .theme-preview {
  width:100%;
  height:auto;
  min-height:0;
  flex:1 1 0;
  overflow:hidden;
}
html body #app .theme-options > .theme-option > strong {
  font-size:clamp(10px,2.5vw,14px);
  line-height:1.2;
  white-space:nowrap;
}
html body #app .theme-options > .theme-option > small { display:none; }
html body #app .theme-options > .theme-option > b {
  position:absolute;
  top:4px;
  right:6px;
  margin:0;
  line-height:1;
}

/* App icon choices sit directly on the screen, with labels below. */
html:not(#app-icon-choice-reserve) body #app .app-icon-options > .app-icon-option {
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  position:relative;
  padding:12px;
}
html:not(#app-icon-choice-reserve) body #app .app-icon-option::before,
html:not(#app-icon-choice-reserve) body #app .app-icon-option::after { content:none !important; }
html body #app .app-icon-option > img { width:72px; height:72px; flex:none; }
html body #app .app-icon-option > b { position:absolute; top:8px; right:calc(50% - 51px); }
html body #app .app-icon-option:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }


/* Зелёные акценты тёмной темы — цвет клавиши на иллюстрации калькулятора Главной.
   :where сохраняет специфичность исходных правил; геометрия и другие темы не меняются. */
/* design-tokens.css */
:root:where([data-theme="dark"]) {
  --calendar-tag-green: #15e878;
}
/* styles.css */
:root:where([data-theme="dark"]) {
  --green: #15e878;
}
:where(html[data-theme="dark"]) .success-mark {
  background-color: rgba(21, 232, 120, .12);
}
:where(html[data-theme="dark"]) .toast {
  color: #086430;
}
:where(html[data-theme="dark"]) .auth-data-note {
  color: #15e878;
  background-color: rgba(21, 232, 120, .09);
  border-top-color: rgba(21, 232, 120, .2);
  border-right-color: rgba(21, 232, 120, .2);
  border-bottom-color: rgba(21, 232, 120, .2);
  border-left-color: rgba(21, 232, 120, .2);
}
:where(html[data-theme="dark"]) .document-opening-toast {
  color: #086430;
}
:where(html[data-theme="dark"]) .document-opening-spinner {
  border-top-color: #086430;
  border-right-color: rgba(8, 100, 48, .2);
  border-bottom-color: rgba(8, 100, 48, .2);
  border-left-color: rgba(8, 100, 48, .2);
}
:where(html[data-theme="dark"]) .calendar-form-voice-control button {
  background-color: rgba(21, 232, 120, .12);
}
/* discussions.css */
:where(html[data-theme="dark"]) .discussion-card {
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .18), #11223a 76%);
  border-top-color: rgba(21, 232, 120, .22);
  border-right-color: rgba(21, 232, 120, .22);
  border-bottom-color: rgba(21, 232, 120, .22);
  border-left-color: rgba(21, 232, 120, .22);
}
:where(html[data-theme="dark"]) .discussion-top > b {
  color: #15e878;
}
:where(html[data-theme="dark"]) .discussion-icon {
  background-color: rgba(21, 232, 120, .14);
  color: #15e878;
}
:where(html[data-theme="dark"]) .discussion-meta strong {
  color: #15e878;
}
:where(html[data-theme="dark"]) .discussion-summary {
  background-color: rgba(21, 232, 120, .09);
  border-top-color: rgba(21, 232, 120, .17);
  border-right-color: rgba(21, 232, 120, .17);
  border-bottom-color: rgba(21, 232, 120, .17);
  border-left-color: rgba(21, 232, 120, .17);
}
:where(html[data-theme="dark"]) .discussion-summary > span {
  background-color: rgba(21, 232, 120, .14);
  color: #15e878;
}
:where(html[data-theme="dark"]) .history-item time {
  color: #15e878;
}
/* iphone15.css */
:where(html[data-theme="dark"]) .calendar-voice-fab {
  border-top-color: rgba(21, 232, 120, .32);
  border-right-color: rgba(21, 232, 120, .32);
  border-bottom-color: rgba(21, 232, 120, .32);
  border-left-color: rgba(21, 232, 120, .32);
  background-image: linear-gradient(145deg, #15e878, #00b955);
  color: #042e16;
  box-shadow: 0 14px 32px rgba(21, 232, 120, .38),inset 0 1px 0 rgba(255,255,255,.28);
}
:where(html[data-theme="dark"]) .calendar-voice-fab.dragging {
  box-shadow: 0 18px 42px rgba(21, 232, 120, .52),inset 0 1px 0 rgba(255,255,255,.34);
}
:where(html[data-theme="dark"]) .voice-recognized-mark {
  background-color: rgba(21, 232, 120, .14);
}
:where(html[data-theme="dark"]) .calendar-voice-confirm {
  border-top-color: rgba(21, 232, 120, .3);
  border-right-color: rgba(21, 232, 120, .3);
  border-bottom-color: rgba(21, 232, 120, .3);
  border-left-color: rgba(21, 232, 120, .3);
  background-color: rgba(21, 232, 120, .16);
  color: #15e878;
}
:where(html[data-theme="dark"]) .voice-created {
  border-top-color: rgba(21, 232, 120, .18);
  border-right-color: rgba(21, 232, 120, .18);
  border-bottom-color: rgba(21, 232, 120, .18);
  border-left-color: rgba(21, 232, 120, .18);
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .09), var(--panel));
}
:where(html[data-theme="dark"]) .profile-tool-icon.percent {
  border-top-color: rgba(21, 232, 120, .2);
  border-right-color: rgba(21, 232, 120, .2);
  border-bottom-color: rgba(21, 232, 120, .2);
  border-left-color: rgba(21, 232, 120, .2);
  background-color: rgba(21, 232, 120, .1);
}
:where(html[data-theme="dark"]) .storage-type.photo {
  background-color: rgba(21, 232, 120, .12);
}
:where(html[data-theme="dark"]) .storage-note {
  border-top-color: rgba(21, 232, 120, .18);
  border-right-color: rgba(21, 232, 120, .18);
  border-bottom-color: rgba(21, 232, 120, .18);
  border-left-color: rgba(21, 232, 120, .18);
  background-color: rgba(21, 232, 120, .07);
}
:where(html[data-theme="dark"]) .note-voice-button {
  background-color: rgba(21, 232, 120, .14);
  box-shadow: 0 7px 18px rgba(21, 232, 120, .12);
}
:where(html[data-theme="dark"]) .case-type-option.civil > span {
  background-color: rgba(21, 232, 120, .13);
}
:where(html[data-theme="dark"]) .case-kind-badge.civil {
  background-color: rgba(21, 232, 120, .1);
}
:where(html[data-theme="dark"]) .document-file-info {
  border-top-color: rgba(21, 232, 120, .18);
  border-right-color: rgba(21, 232, 120, .18);
  border-bottom-color: rgba(21, 232, 120, .18);
  border-left-color: rgba(21, 232, 120, .18);
  background-color: rgba(21, 232, 120, .07);
}
:where(html[data-theme="dark"]) .search-result-icon.chat {
  background-color: rgba(21, 232, 120, .14);
  color: #15e878;
}
:where(html[data-theme="dark"]) .workflow-badge.clear {
  background-color: rgba(21, 232, 120, .12);
  color: #15e878;
}
:where(html[data-theme="dark"]) .upload-center-summary {
  background-image: linear-gradient(135deg, rgba(125,96,239,.18), rgba(21, 232, 120, .08));
}
:where(html[data-theme="dark"]) .upload-progress i {
  background-image: linear-gradient(90deg, #765bea, #15e878);
}
:where(html[data-theme="dark"]) .home-layout-row input:checked + i {
  background-color: #15e878;
}
:where(html[data-theme="dark"]) .upload-job.done {
  border-top-color: rgba(21, 232, 120, .25);
  border-right-color: rgba(21, 232, 120, .25);
  border-bottom-color: rgba(21, 232, 120, .25);
  border-left-color: rgba(21, 232, 120, .25);
}
:where(html[data-theme="dark"]) .case-action.pin {
  background-color: #15e878;
}
:where(html[data-theme="dark"]) .calendar .days button.selected:not(.today) {
  border-top-color: rgba(21, 232, 120, .32);
  border-right-color: rgba(21, 232, 120, .32);
  border-bottom-color: rgba(21, 232, 120, .32);
  border-left-color: rgba(21, 232, 120, .32);
  background-image: linear-gradient(145deg, #15e878, #00b955);
  color: #042e16;
  box-shadow: 0 7px 18px rgba(21, 232, 120, .32);
}
:where(html[data-theme="dark"]) .task-edit-action {
  background-color: #15e878;
}
:where(html[data-theme="dark"]) .document-builder-card {
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .17), rgba(116, 88, 255, .18) 72%, var(--panel));
  border-top-color: rgba(21, 232, 120, .25);
  border-right-color: rgba(21, 232, 120, .25);
  border-bottom-color: rgba(21, 232, 120, .25);
  border-left-color: rgba(21, 232, 120, .25);
}
:where(html[data-theme="dark"]) .document-builder-card-icon {
  background-color: rgba(21, 232, 120, .14);
}
:where(html[data-theme="dark"]) .state-duty-card {
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .20), rgba(6, 81, 39, .34) 72%, var(--panel));
  border-top-color: rgba(21, 232, 120, .28);
  border-right-color: rgba(21, 232, 120, .28);
  border-bottom-color: rgba(21, 232, 120, .28);
  border-left-color: rgba(21, 232, 120, .28);
}
:where(html[data-theme="dark"]) .legal-calculator-icon {
  color: #15e878;
}
:where(html[data-theme="dark"]) .state-duty-price {
  border-top-color: rgba(21, 232, 120, .22);
  border-right-color: rgba(21, 232, 120, .22);
  border-bottom-color: rgba(21, 232, 120, .22);
  border-left-color: rgba(21, 232, 120, .22);
}
:where(html[data-theme="dark"]) .state-duty-result-group h2 {
  color: #15e878;
}
:where(html[data-theme="dark"]) .state-duty-keypad button:active {
  background-color: rgba(21, 232, 120, .17);
}
:where(html[data-theme="dark"]) .article395-principal {
  border-top-color: rgba(21, 232, 120, .22);
  border-right-color: rgba(21, 232, 120, .22);
  border-bottom-color: rgba(21, 232, 120, .22);
  border-left-color: rgba(21, 232, 120, .22);
}
:where(html[data-theme="dark"]) .article395-submit {
  background-image: linear-gradient(145deg, #15e878, #00b955);
  box-shadow: 0 8px 20px rgba(21, 232, 120, .20);
}
:where(html[data-theme="dark"]) .article395-empty span {
  color: #15e878;
}
:where(html[data-theme="dark"]) .article395-result-main > strong {
  color: #15e878;
}
:where(html[data-theme="dark"]) .article395-breakdown article small {
  color: #15e878;
}
:where(html[data-theme="dark"]) .document-builder-intro,
:where(html[data-theme="dark"]) .document-builder-ready {
  border-top-color: rgba(21, 232, 120, .20);
  border-right-color: rgba(21, 232, 120, .20);
  border-bottom-color: rgba(21, 232, 120, .20);
  border-left-color: rgba(21, 232, 120, .20);
  background-image: linear-gradient(135deg, rgba(21, 232, 120, .12), rgba(116, 88, 255, .08));
}
:where(html[data-theme="dark"]) .document-builder-brain,
:where(html[data-theme="dark"]) .document-builder-ready > span {
  background-image: linear-gradient(145deg, #15e878, #6552dc);
}
:where(html[data-theme="dark"]) .calendar-row-icon {
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .22), rgba(0, 185, 85, .13));
  color: #15e878;
  box-shadow: inset 0 0 0 1px rgba(21, 232, 120, .06);
}
:where(html[data-theme="dark"]) .calendar-event-form .calendar-form-voice-control button {
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .22), rgba(0, 185, 85, .16));
  color: #15e878;
}
/* home-drag.css */
:where(html[data-theme="dark"]) .home-drag-ready i {
  box-shadow: 0 0 0 4px rgba(21, 232, 120, .1);
}
/* responsive-fix.css */
:where(html[data-theme="dark"]) .upload-case-current > .upload-case-image {
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .28), rgba(21, 232, 120, .12));
}
:where(html[data-theme="dark"]) .file-upload-progress-card {
  border-top-color: rgba(21, 232, 120, .22);
  border-right-color: rgba(21, 232, 120, .22);
  border-bottom-color: rgba(21, 232, 120, .22);
  border-left-color: rgba(21, 232, 120, .22);
  background-color: rgba(21, 232, 120, .07);
}
:where(html[data-theme="dark"]) .file-upload-card-fill {
  background-color: rgba(21, 232, 120, .17);
}
:where(html[data-theme="dark"]) .file-upload-type {
  background-color: rgba(21, 232, 120, .13);
}
:where(html[data-theme="dark"]) .file-upload-meter > span {
  background-color: rgba(21, 232, 120, .12);
}
:where(html[data-theme="dark"]) .document-pin-action {
  background-color: #15e878;
}
:where(html[data-theme="dark"]) .case-recommendation-orb {
  color: #15e878;
  background-image: linear-gradient(145deg, rgba(21, 232, 120, .34), rgba(61, 67, 157, .48));
}
:where(html[data-theme="dark"]) .case-category-picker-row.selected {
  border-top-color: rgba(21, 232, 120, .45);
  border-right-color: rgba(21, 232, 120, .45);
  border-bottom-color: rgba(21, 232, 120, .45);
  border-left-color: rgba(21, 232, 120, .45);
  background-color: rgba(21, 232, 120, .08);
}
:where(html[data-theme="dark"]) .case-category-picker-row input:checked + .case-category-picker-check {
  border-top-color: #15e878;
  border-right-color: #15e878;
  border-bottom-color: #15e878;
  border-left-color: #15e878;
  background-color: #15e878;
  color: #021e0e;
}
:where(html[data-theme="dark"]) .profile-unified-lock,
:where(html[data-theme="dark"]) .profile-unified-privacy {
  color: #15e878;
}
:where(html[data-theme="dark"]) .profile-toggle-row:has(input:checked) .profile-unified-face {
  color: #15e878;
}
:where(html[data-theme="dark"]) .upload-history-card {
  border-top-color: rgba(21, 232, 120, .22);
  border-right-color: rgba(21, 232, 120, .22);
  border-bottom-color: rgba(21, 232, 120, .22);
  border-left-color: rgba(21, 232, 120, .22);
}
:where(html[data-theme="dark"]) body.home-route .home-cards .document-builder-card-icon {
  background-color: rgba(21, 232, 120, .075);
}
:where(html[data-theme="dark"]) body.home-route .home-cards .legal-calculator-icon {
  border-top-color: rgba(21, 232, 120, .12);
  border-right-color: rgba(21, 232, 120, .12);
  border-bottom-color: rgba(21, 232, 120, .12);
  border-left-color: rgba(21, 232, 120, .12);
  background-color: rgba(21, 232, 120, .075);
  color: #15e878;
}
:where(html[data-theme="dark"]) body.home-route .home-cards .document-builder-card::after {
  background-color: rgba(21, 232, 120, .04);
}
html:where([data-theme="dark"]) body #app .auth-security svg {
  color: #15e878;
}
html:where([data-theme="dark"]) body #app .doc-library .doc-readiness.ready {
  color: #15e878;
}
html:where([data-theme="dark"]) body #app .doc-library .doc-readiness.ready i {
  background-color: #15e878;
  box-shadow: 0 0 0 3px rgba(21, 232, 120, .14);
}
html:where([data-theme="dark"]) body :is(#app, #sheetRoot .plan-case-list) .case-preview-avatar.has-type-art.civil {
  background-color: rgba(21, 232, 120, .14);
  border-top-color: rgba(21, 232, 120, .3);
  border-right-color: rgba(21, 232, 120, .3);
  border-bottom-color: rgba(21, 232, 120, .3);
  border-left-color: rgba(21, 232, 120, .3);
}
:where(html[data-theme="dark"]) .case-type-current.civil > span {
  background-color: rgba(21, 232, 120, .13);
}
/* ui-kit.css */
:where(html[data-theme="dark"]) .material-job-card.expanded {
  border-top-color: rgba(21, 232, 120, .27);
  border-right-color: rgba(21, 232, 120, .27);
  border-bottom-color: rgba(21, 232, 120, .27);
  border-left-color: rgba(21, 232, 120, .27);
}
:where(html[data-theme="dark"]) .material-job-steps li.done span {
  border-top-color: #15e878;
  border-right-color: #15e878;
  border-bottom-color: #15e878;
  border-left-color: #15e878;
  background-color: #15e878;
  color: #032612;
}
:where(html[data-theme="dark"]) .material-job-steps li.current span {
  border-top-color: #15e878;
  border-right-color: #15e878;
  border-bottom-color: #15e878;
  border-left-color: #15e878;
  color: #15e878;
  box-shadow: 0 0 0 4px rgba(21, 232, 120, .09);
}
:where(html[data-theme="dark"]) .document-text-head button {
  color: #15e878;
}
:where(html[data-theme="dark"]) .document-action.text {
  border-top-color: rgba(21, 232, 120, .3);
  border-right-color: rgba(21, 232, 120, .3);
  border-bottom-color: rgba(21, 232, 120, .3);
  border-left-color: rgba(21, 232, 120, .3);
  background-color: rgba(21, 232, 120, .09);
  color: #15e878;
}
/* document-scanner.css */
:where(html[data-theme="dark"]) .scanner-camera-shell {
  border-top-color: rgba(21, 232, 120, .22);
  border-right-color: rgba(21, 232, 120, .22);
  border-bottom-color: rgba(21, 232, 120, .22);
  border-left-color: rgba(21, 232, 120, .22);
}
:where(html[data-theme="dark"]) .scanner-frame {
  border-top-color: rgba(21, 232, 120, .72);
  border-right-color: rgba(21, 232, 120, .72);
  border-bottom-color: rgba(21, 232, 120, .72);
  border-left-color: rgba(21, 232, 120, .72);
}
:where(html[data-theme="dark"]) .scanner-shutter i {
  background-image: linear-gradient(145deg, #3aef86, #15e878);
}
:where(html[data-theme="dark"]) .scanner-crop-lines polygon {
  fill: rgba(21, 232, 120, .08);
  stroke: #15e878;
}
:where(html[data-theme="dark"]) .scanner-result-mark {
  color: #15e878;
  background-color: rgba(21, 232, 120, .13);
  box-shadow: 0 0 35px rgba(21, 232, 120, .12);
}
:where(html[data-theme="dark"]) .scanner-build-progress i {
  background-color: rgba(21, 232, 120, .12);
}
:where(html[data-theme="dark"]) .scanner-case-list>button>span {
  color: #15e878;
  background-color: rgba(21, 232, 120, .1);
}
/* audio-materials.css */
:where(html[data-theme="dark"]) .audio-time {
  color: var(--accent, #15e878);
}
:where(html[data-theme="dark"]) .audio-live-transcript progress {
  accent-color: var(--accent, #15e878);
}
:where(html[data-theme="dark"]) .audio-voice.voice-1 {
  --voice: #15e878;
}
/* bulk-import.css */
:where(html[data-theme="dark"]) .bulk-row.done .bulk-name small {
  color: var(--green, #15e878);
}
/* timeline-view.css */
:where(html[data-theme="dark"]) .timeline-source {
  color: var(--green, #15e878);
}
:where(html[data-theme="dark"]) .timeline-origin.edited,
:where(html[data-theme="dark"]) .timeline-origin.manual {
  background-color: rgba(21, 232, 120, .14);
  color: var(--green, #15e878);
}
:where(html[data-theme="dark"]) .timeline-actions .link-button:not(.danger) {
  color: var(--green, #15e878);
}
/* case-analytics-view.css */
:where(html[data-theme="dark"]) .case-audit {
  --sig-info: var(--green, #15e878);
}
/* legal-news.css */
:where(html[data-theme="dark"]) .legal-news-card {
  --legal-news-accent: #15e878;
}
/* plan-tasks.css */
html:where([data-theme="dark"]) body #app .plan-swipe-actions>.plan-swipe-pin {
  background: var(--emerald-gradient, linear-gradient(180deg,#15e878 0%,#00b955 35%,#00b955 70%,#064b24 100%)) !important;
}
html:where([data-theme="dark"]) body.home-route :is(#app .home-cards,.home-cards.home-drag-layer) > .plan-home-card[data-home-card] .home-card-recommendation-stat > span {
  color: #15e878;
}
/* theme-surfaces.css */
html:where([data-theme="dark"]) body :is(#sheetRoot, #app) :is([role="dialog"], [role="alertdialog"], .sheet) :is(header, .calendar-event-form-head, .bulk-sheet-head) button.popup-action-button-three {
  color: #15e878 !important;
}
html:where([data-theme="dark"]) body :is(#sheetRoot, #app) :is([role="dialog"], [role="alertdialog"], .sheet) :is(header, .calendar-event-form-head, .bulk-sheet-head) button.popup-action-button-three:focus-visible {
  outline-color: #15e878 !important;
}
html:where([data-theme="dark"]):not([data-theme="light"]) body :is(#sheetRoot, #app) :is([role="dialog"], [role="alertdialog"], .sheet) :is(header, .calendar-event-form-head, .bulk-sheet-head) button.popup-action-button-three {
  color: #15e878 !important;
}
html:where([data-theme="dark"]) body #app .scanner-live-toolbar button.button-variant-3[data-scanner-back] {
  color: #15e878 !important;
}
html:where([data-theme="dark"]):not([data-theme="light"]) body #app .scanner-live-toolbar button.button-variant-3[data-scanner-back] {
  color: #15e878 !important;
}
html:where([data-theme="dark"]):not([data-theme="light"]) body :is(#sheetRoot, #app) :is([role="dialog"], [role="alertdialog"], .sheet) :is(header, .calendar-event-form-head, .bulk-sheet-head) button.popup-action-button-three:focus-visible {
  outline-color: #15e878 !important;
}
:where(html[data-theme="dark"]) .assistant-thread .message.user .assistant-message-body > p {
  color: #15e878;
}
/* pdf-viewer.css */
:where(html[data-theme="dark"]) .pdf-rendered-page:focus-visible {
  outline-color: #15e878;
}
:where(html[data-theme="dark"]) #pdfRotatePage:focus-visible {
  outline-color: #15e878;
}

/* Match the green key artwork in both mobile and desktop notification bells. */
html[data-theme="dark"] body #app .home-header .bell .home-bell-art,
html[data-theme="dark"] body > .desktop-topbar .desktop-topbar-bell .home-bell-art {
  filter: hue-rotate(-10deg) saturate(1.6) brightness(1.35) !important;
}
html[data-theme="dark"] body #app .calendar-voice-fab,
html[data-theme="dark"] body #app .calendar .days button.selected:not(.today) {
  background: linear-gradient(145deg,#3aef86,#15e878 45%,#00b955) !important;
  border-color: rgba(21,232,120,.38);
  box-shadow: 0 7px 18px rgba(21,232,120,.3);
  color: #06351a;
}


html body #app .app-icon-options { grid-template-columns:repeat(3,minmax(0,1fr)); }
html body #app .app-icon-option { min-width:0; }
html body #app .app-icon-option > strong { font-size:clamp(10px,2.5vw,14px); white-space:nowrap; }

/* Theme previews and captions stand directly on the settings background. */
html:not(#theme-choice-surface-reserve) body #app .theme-options > .theme-option {
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0;
  padding:6px;
}
html:not(#theme-choice-surface-reserve) body #app .theme-option::before,
html:not(#theme-choice-surface-reserve) body #app .theme-option::after { content:none !important; }
html body #app .theme-options > .theme-option .theme-preview { flex:none; aspect-ratio:1.35; }
html body #app .theme-options > .theme-option:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }


/* Section headers share the viewport-anchored exclusive background. */
html[data-theme="exclusive"]:not(#exclusive-header-reserve) body #app > :is(.page-head,.case-sticky-head) {
  background:var(--system-surface-background) !important;
  background-attachment:fixed !important;
  border-color:transparent !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
html[data-theme="exclusive"]:not(#exclusive-header-reserve) body #app > .case-sticky-head > .page-head {
  background:transparent !important;
  box-shadow:none !important;
  border-color:transparent !important;
}

/* Case assistant: green plus palette around the green/blue animated brain. */
html[data-theme="exclusive"]:not(#exclusive-case-brain-reserve) body.case-route #app .assistant-fab.case-brain-fab {
  background:#031b2c !important;
  border:3px solid var(--iq-top) !important;
  color:#f7fbff !important;
  box-shadow:0 0 0 3px rgb(37 227 154 / .42),0 8px 22px rgb(0 112 73 / .52),0 0 22px rgb(18 213 140 / .38) !important;
}
html[data-theme="exclusive"] body #app .case-brain-fab-orb { background:#031b2c; }
html[data-theme="exclusive"]:not(#exclusive-case-brain-reserve) body #app .case-brain-fab-orb video { filter:none !important; }

/* The same medallion on mobile chat, desktop panel, and navigation. */
html[data-theme="exclusive"]:not(#exclusive-chat-brain-reserve) body :is(#app,#desktopAssistantPanel,.tabbar) .assistant-intro-brain {
  background:#031b2c !important;
  border:3px solid var(--iq-top) !important;
  box-shadow:0 0 0 3px rgb(37 227 154 / .42),0 8px 22px rgb(0 112 73 / .52),0 0 22px rgb(18 213 140 / .38) !important;
}
html[data-theme="exclusive"]:not(#exclusive-chat-brain-reserve) body .desktop-assistant-toggle[aria-pressed="false"] > .assistant-intro-brain {
  border-color:rgb(37 227 154 / .45) !important;
  box-shadow:none !important;
}

/* Case creation: show category artwork directly, without an icon tile, in every theme. */
html:not(#case-type-art-reserve):not(#case-type-art-reserve) body #app :is(.case-type-option,.case-type-current) > span.has-type-art {
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

/* Mobile case details use one viewport canvas, just like the Cases list.
   Keep the fixed toolbar opaque so scrolled content cannot show through it. */
@media(max-width:1023px) {
  html:not(#mobile-case-canvas-reserve) body.case-route {
    background-attachment:fixed !important;
    background-size:100vw 100dvh !important;
  }
  html:not(#mobile-case-canvas-reserve) body.case-route :is(.app-shell,#app.screen) {
    background:transparent !important;
  }
  html:not(#mobile-case-canvas-reserve) body.case-route #app > :is(.case-sticky-head,.page-head) {
    background-color:var(--system-surface-color) !important;
    background-image:var(--system-surface-background) !important;
    background-position:center top !important;
    background-repeat:no-repeat !important;
    background-size:100vw 100dvh !important;
    background-attachment:fixed !important;
    border-color:transparent !important;
    border-radius:0 !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  html:not(#mobile-case-canvas-reserve) body.case-route #app > .case-sticky-head > .page-head {
    background:transparent !important;
    border-color:transparent !important;
    box-shadow:none !important;
  }
}

/* Existing and future case cards share these artwork hosts. Keep their layout
   and the urgency marker; photos and initials retain their own presentation. */
html:not(#case-type-art-reserve):not(#case-type-art-reserve) body :is(#app,#sheetRoot) .case-preview-avatar.has-type-art,
html:not(#case-type-art-reserve):not(#case-type-art-reserve) body .desktop-case-rail-avatar:has(> img[src*="assets/case-types/"]) {
  background:transparent !important;
  border-color:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
  overflow:visible;
}

/* Ordinary actions use the Add palette even when a component owns a violet
   token or injects its styles after startup. Deletion is painted separately below. */
html[data-theme="exclusive"]:not(#exclusive-paint-reserve):not(#exclusive-action-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel,.tabbar) :is(
  .plan-add-button,[data-plan-action="unlink"],.case-create-icon-change,
  [data-system-notifications="connect"],.chat-scroll-down
) {
  background:var(--brand-action-fill) !important;
  background-clip:border-box !important;
  -webkit-background-clip:border-box !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:rgba(105,255,193,.35) !important;
  box-shadow:var(--creation-button-shadow) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve):not(#exclusive-action-reserve) body .transient-notice-stack :is(.toast,.undo-toast) :is(button,a) {
  background:var(--brand-action-fill) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:rgba(105,255,193,.35) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) :is(
  .calendar .days button.today,.calendar-week-strip button.today,
  .calendar-view-popover button.active,.calendar-year-grid button.active,
  .profile-hero-card,.summary-field,.profile-choice-list button.active,
  .case-section-option.active,.assistant-followups button,.answer-page-link,.audit-source,
  .text-size-options button.active,.case-tabs button.case-tab-dragging
) { border-color:rgba(105,255,193,.35) !important; }
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) :is(
  .preference-row > span,.case-type-option > span
) { background-color:rgba(37,227,154,.14) !important; }
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) :is(
  .urgent-panel button,.calendar-ai-preview header button,.calendar-ai-action,
  .notification-detail-sheet > header button,
  .calendar-ai-case-choices button,.case-type-current button,
  .notification-actions button:not([data-delete-notification]),.calendar-search-result > button,
  .calendar-voice-examples button,.assistant-followups button,
  .document-action:not(.retry):not(.quiet),.answer-page-link,
  .case-category-picker-row,.case-category-picker-check,.case-sections-arrow,
  .case-preview-avatar.has-type-art.criminal
):not(.danger) {
  background-color:rgba(37,227,154,.14) !important;
  border-color:rgba(105,255,193,.35) !important;
  color:#75dfb8 !important;
  -webkit-text-fill-color:currentColor !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) :is(
  .text-btn,.document-action:not(.retry):not(.quiet),.assistant-source-link,
  .head-text-action,.notification-actions button:not([data-delete-notification]),
  .calendar-search-result > button,.upload-history-title button,
  .case-type-current button,.calendar-picker-display,.ios-date-wheel header button,
  .menu-row > span,.app-icon-option > b
):not(.danger) {
  color:#75dfb8 !important;
  -webkit-text-fill-color:currentColor !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) :is(
  .menu-row > span,.app-icon-option > b,.assistant-source-link
) svg.ui-icon { stroke:currentColor !important; }
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body #app .text-size-options button.active::after {
  color:#fff !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve) body #app .calendar-year-grid button.active span {
  background-image:radial-gradient(circle,#fff 1.25px,transparent 1.5px) !important;
}

/* Desktop: общий градиент IQ и кнопки «Добавить» для трёх тем. */
@media(min-width:1024px) {
  html body > .desktop-topbar .desktop-brand { position: relative; }
  /* Оригинальные очертания IQ, заливка той же палитры, что у «Добавить». */
  html body > .desktop-topbar .desktop-brand::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    height: 88px;
    transform: translateY(-50%);
    pointer-events: none;
    background: var(--brand-action-fill);
    background-size: 21% 46%;
    background-position: 95% 47%;
    background-repeat: no-repeat;
    -webkit-mask: url('/assets/advokat-iq-wordmark-dark.png') center / 100% 100% no-repeat;
    mask: url('/assets/advokat-iq-wordmark-dark.png') center / 100% 100% no-repeat;
    clip-path: inset(0 0 0 75%);
  }
  html[data-theme="light"] body > .desktop-topbar .desktop-brand::after {
    background-image: var(--emerald-gradient);
  }

}

/* Shared profile footer: match user-message text in each current palette.
   Keep these final overrides together with the dark user-message paint above. */
html body #app.screen > .profile-security-note strong {
  color: #70d9b1;
  -webkit-text-fill-color: currentColor;
}
html[data-theme="light"] body #app.screen > .profile-security-note strong {
  color: #0b6a50;
}
html[data-theme="dark"] body #app.screen > .profile-security-note strong {
  color: #15e878;
}
html body #app.screen > .profile-section-card:has(+ .profile-security-note) {
  margin-bottom: 0 !important;
}
html body #app.screen > .security-note.profile-security-note {
  justify-content: center;
  text-align: center;
  margin-top: 30px !important;
  margin-bottom: 30px !important;
}

/* Desktop size control keeps one clear accent in every palette. */
html body #app.screen .desktop-size-control { --size-control-color: #fff; color: var(--size-control-color); margin: 12px 0 24px; }
html[data-theme="light"] body #app.screen .desktop-size-control { --size-control-color: #36dfad; }
html body #app.screen .desktop-size-control output { display: block; text-align: center; font-size: 16px; font-weight: 600; }
html body #app.screen .desktop-size-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 8px; align-items: center; }
html body #app.screen .desktop-size-control :is(output, span, button, input) { color: var(--size-control-color) !important; -webkit-text-fill-color: currentColor !important; }
html body #app.screen .desktop-size-control button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0 !important; border-radius: 8px; background: none !important; box-shadow: none !important; font: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
html body #app.screen .desktop-size-control button:disabled { opacity: 1; cursor: default; }
html body #app.screen .desktop-size-control input[type="range"] { display: block; appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 44px; min-height: 44px !important; margin: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; cursor: pointer; }
html body #app.screen .desktop-size-control input::-webkit-slider-runnable-track { height: 4px; border: 0; border-radius: 4px; background: var(--size-control-color); }
html body #app.screen .desktop-size-control input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border: 0; border-radius: 50%; background: var(--size-control-color); box-shadow: none; }
html body #app.screen .desktop-size-control input::-moz-range-track { height: 4px; border: 0; border-radius: 4px; background: var(--size-control-color); }
html body #app.screen .desktop-size-control input::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--size-control-color); box-shadow: none; }
html body #app.screen .desktop-size-control :is(button,input):focus-visible { outline: 2px solid var(--size-control-color); outline-offset: 3px; }
html body #app.screen .desktop-size-limits { display: flex; justify-content: space-between; margin: 0 52px; font-size: 12px; }

/* A manually selected day stays distinct from today's green accent. */
html[data-theme="exclusive"]:not(#exclusive-selected-day):not(#exclusive-selected-day) body #app .calendar .days button.selected:not(.today) {
  background: #fff !important;
  border-color: #fff !important;
  color: #071c46 !important;
  -webkit-text-fill-color: #071c46 !important;
  box-shadow: 0 4px 12px rgba(0,8,35,.18) !important;
}
html[data-theme="exclusive"]:not(#exclusive-selected-day):not(#exclusive-selected-day) body #app .calendar .days button.selected:not(.today) .calendar-day-number {
  color: #071c46 !important;
  -webkit-text-fill-color: #071c46 !important;
}

/* 10.11.2026: подпись кнопки «Добавить» в боковом меню компьютера задана в CSS (desktop-layout.css),
   поэтому казахский вариант — по языку страницы (html lang="kk", ставит applyInterfaceLanguage в app.js). */
@media (min-width: 1024px) {
  html[lang="kk"] body nav.tabbar .nav-items-row .add-main::after { content: "Қосу"; }
}

/* Scanner chrome uses the same exclusive tokens as the application.
   Only interface elements are painted; video, canvas and document images stay raw. */
html[data-theme="exclusive"] {
  --scanner-secondary-fill: linear-gradient(145deg,rgba(19,113,181,.38),rgba(1,36,83,.62));
  --scanner-secondary-shadow: inset 0 1px 0 rgba(113,205,255,.16),0 4px 12px rgba(0,10,39,.18);
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .document-scanner-screen,.scanner-live,.scanner-review,.scanner-library,.scanner-fullscreen-document-view
) {
  background: var(--system-surface-background) !important;
  color: var(--text);
  font-family: inherit;
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .document-scanner-screen,.scanner-document-actions,.scanner-rename-dialog
) :is(button,input,select,textarea) { font-family: inherit; }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-live-toolbar,.scanner-live-footer,.scanner-camera-state,.scanner-live-filters,
  .scanner-document-actions,.scanner-rename-dialog .sheet
) {
  background: var(--exclusive-panel-fill) !important;
  color: var(--text);
  border-color: var(--line);
}
/* Safe areas belong to their control panels, so each blue surface reaches
   the screen edge without a separate strip above or below it. */
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body #app .scanner-live {
  padding-top: 0;
  padding-bottom: 0;
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body #app .scanner-live .scanner-live-toolbar {
  min-height: calc(58px + env(safe-area-inset-top,0px));
  padding-top: env(safe-area-inset-top,0px);
  background: var(--system-surface-background) !important;
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body #app .scanner-live .scanner-live-footer {
  padding-bottom: calc(20px + env(safe-area-inset-bottom,0px));
  background: var(--system-surface-background) !important;
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-session-card,.scanner-page-row,.scanner-result-card,.scanner-recovery,.scanner-case-list>button
) {
  background: var(--exclusive-blue-fill) !important;
  border-color: var(--line) !important;
  color: var(--text);
  box-shadow: inset 0 1px 1px rgba(129,209,255,.25),0 6px 20px var(--depth-shadow);
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-head h1,.scanner-recovery h2
) { color: var(--text); font-size: var(--text-2xl); font-weight: var(--weight-bold); line-height: var(--leading-snug); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-session-card strong,.scanner-page-row strong,.scanner-document-actions>strong,.scanner-camera-state strong
) { color: var(--text); font-size: var(--text-md); font-weight: var(--weight-semibold); line-height: var(--leading-snug); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-guidance,.scanner-crop-help,.scanner-camera-note,.scanner-case-hint,.scanner-empty-pages,
  .scanner-library-note,.scanner-library-empty,.scanner-camera-state p,.scanner-page-count,
  .scanner-history-content>p,.scanner-session-card small,.scanner-document-actions>small,.scanner-fullscreen-page figcaption
) { color: var(--muted) !important; font-size: var(--text-sm); line-height: var(--leading-normal); font-weight: var(--weight-regular); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-guidance {
  background: color-mix(in srgb,var(--panel) 92%,transparent);
  color: var(--text) !important;
  border: 1px solid var(--line);
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-live .scanner-camera-shell,.scanner-crop-stage,.scanner-history-image,.scanner-last-thumb,.scanner-document-actions-preview
) { background: var(--surface-subtle); border-color: var(--line); color: var(--accent); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-live-edges polygon,.scanner-crop-lines polygon
) { stroke: var(--accent); fill: color-mix(in srgb,var(--accent) 12%,transparent); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-frame { border-color: var(--accent); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-frame i { border-color: var(--accent) !important; }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-corner::after { background: var(--accent); border-color: var(--text); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .document-scanner-screen .primary,.scanner-document-actions .primary,.scanner-rename-dialog .primary,
  .scanner-done,.scanner-auto[aria-pressed="true"],.scanner-live-filters button[aria-pressed="true"],
  .scanner-filters button.active,.scanner-live-toolbar [data-scanner-flash][aria-pressed="true"]
):not(.danger):not(.scanner-recovery-delete):not([data-scanner-delete-page]):not([data-scanner-session-delete]) {
  background: var(--creation-button-fill) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid rgba(105,255,193,.35) !important;
  border-radius: var(--radius-md);
  box-shadow: var(--creation-button-shadow) !important;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-done { padding: 8px 12px; }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .document-scanner-screen .secondary,.scanner-document-actions .secondary,.scanner-rename-dialog .secondary,
  .scanner-head button:not(.button-variant-3),.scanner-live-toolbar .scanner-menu-button,
  .scanner-live-toolbar [data-scanner-flash]:not([aria-pressed="true"]),.scanner-live-filter button,
  .scanner-live-filters button:not([aria-pressed="true"]),.scanner-filters button:not(.active),
  .scanner-page-actions button,.scanner-auto:not([aria-pressed="true"])
):not(.danger):not(.scanner-recovery-delete):not([data-scanner-delete-page]):not([data-scanner-session-delete]) {
  background: var(--scanner-secondary-fill) !important;
  color: #eaf7ff !important;
  -webkit-text-fill-color: #eaf7ff !important;
  border: 1px solid rgba(61,163,255,.45) !important;
  border-radius: var(--radius-md);
  box-shadow: var(--scanner-secondary-shadow) !important;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-live-toolbar button.button-variant-3,.scanner-result-actions .text-btn,.scanner-session-card em
) { color: var(--accent) !important; -webkit-text-fill-color: currentColor !important; font-size: var(--text-md); font-weight: var(--weight-semibold); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-live .scanner-shutter {
  border-color: var(--accent); background: var(--panel); box-shadow: var(--creation-button-shadow);
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-shutter i { background: var(--creation-button-fill) !important; }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-shutter .scanner-shutter-mode { color: #fff !important; -webkit-text-fill-color: #fff !important; font-size: var(--text-xs); font-weight: var(--weight-bold); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-live .scanner-done:disabled { opacity: .45; }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) :is(
  .scanner-result-mark,.scanner-case-list>button>span,.scanner-recovery>span
) { background: var(--iq-tint); color: var(--accent); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-result-card input {
  background: var(--surface-subtle); border-color: var(--line); color: var(--text); font-size: var(--text-md); caret-color: var(--accent);
}
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-build-progress { background: var(--panel); color: var(--text); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-build-progress i { background: var(--iq-tint); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-capture-flash { background: var(--surface-accent); }
html[data-theme="exclusive"]:not(#exclusive-scanner-reserve) body :is(#app,#sheetRoot) .scanner-document-actions::backdrop { background: var(--surface-scrim); }

/* Paint only: legacy swipe actions sometimes bypass semantic danger tokens. */
html[data-theme="exclusive"]:not(#exclusive-paint-reserve):not(#exclusive-delete-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) button:is(
  .danger,.case-edit-delete,.case-action.delete,.task-delete-action,
  .calendar-event-delete-action,.document-delete-action,.document-swipe-delete,
  .upload-history-delete,.plan-swipe-delete,.scanner-recovery-delete,
  .notification-desktop-delete,.filter-remove,.assistant-attachment-remove,
  [data-delete-discussion],[data-delete-notification],[data-scanner-session-delete],
  [data-scanner-delete-page],[data-delete-upload],[data-upload-action="delete-file"],[data-audio-dismiss]
):not(.link-button):not([data-confirm-calendar-event-discard]) {
  background:var(--exclusive-delete-fill) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:var(--exclusive-delete-border) !important;
  /* Paint the gradient once across the border area, without a repeated bright rim. */
  background-origin:border-box !important;
  background-repeat:no-repeat !important;
  box-shadow:var(--exclusive-delete-shadow) !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve):not(#exclusive-delete-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) button:is(
  .danger,.case-edit-delete,.case-action.delete,.task-delete-action,
  .calendar-event-delete-action,.document-delete-action,.document-swipe-delete,
  .upload-history-delete,.plan-swipe-delete,.scanner-recovery-delete,
  .notification-desktop-delete,.filter-remove,.assistant-attachment-remove,
  [data-delete-discussion],[data-delete-notification],[data-scanner-session-delete],
  [data-scanner-delete-page],[data-delete-upload],[data-upload-action="delete-file"],[data-audio-dismiss]
):not(.link-button):not([data-confirm-calendar-event-discard]):disabled {
  opacity:.5 !important;
  box-shadow:none !important;
}
html[data-theme="exclusive"]:not(#exclusive-paint-reserve):not(#exclusive-delete-reserve) body :is(#app,#sheetRoot,#desktopAssistantPanel) button.link-button.danger {
  color:#b993ff !important;
  -webkit-text-fill-color:currentColor !important;
}
