/* CRM full contract v2.3.6 — draft.
   manifest SHA-256: f4be8661786c617f06c8b9ab2284cb68baf244567fb06d03631337ff39d6ae93.
   Owner-local mapping overrides legacy source CSS; no business DOM or API changes. */
@import url('/prototype/assets/design/v2.3.6/adoption.css');

html[data-sota-prototype-module="crm"][data-sota33] {
  color-scheme: light;
  --sota33-honeycomb:url('/prototype/assets/design/v2.3.6/honeycomb-raised-light.svg');
  --sota-color-bg-canvas: var(--sota33-canvas);
  --sota-color-bg-muted: var(--sota33-primary-soft);
  --sota-color-bg-surface-solid: var(--sota33-surface-solid);
  --sota-color-text-primary: var(--sota33-text);
  --sota-color-text-secondary: var(--sota33-muted);
  --sota-color-text-subtle: var(--sota33-faint);
  --sota-color-text-disabled: var(--sota33-muted);
  --sota-color-action-primary: var(--sota33-primary);
  --sota-color-action-link: var(--sota33-primary);
  --sota-color-on-action-primary: var(--sota33-on-primary);
  --sota-color-border-subtle: var(--sota33-border);
  --sota-color-surface-default: var(--sota33-glass);
  --sota-color-surface-elevated: var(--sota33-glass-raised);
  --sota-color-surface-interactive: var(--sota33-glass-raised);
  --sota-color-surface-modal: var(--sota33-popover-select);
  --sota-color-border-luminous: var(--sota33-border-strong);
  --sota-color-state-neutral-bg: var(--sota33-surface-solid);
  --sota-color-state-neutral-text: var(--sota33-muted);
  --green-deep: var(--sota33-primary);
  --green-mid: var(--sota33-primary);
  --green-tint: var(--sota33-primary-soft);
  --green-tint-border: var(--sota33-border-strong);
  --gold-tint: var(--sota33-primary-soft);
  --gold-tint-border: var(--sota33-border-strong);
  --amber-border: var(--sota33-border-strong);
  --red-border: var(--sota33-border-strong);
  --sota-color-selection-bg: var(--sota33-primary-soft);
  --sota-color-selection-text: var(--sota33-ink);
  --sota-color-field-bg: var(--sota33-glass-raised);
  --sota-color-field-border: var(--sota33-border-strong);
  --sota-color-field-text: var(--sota33-ink);
  --sota-color-field-placeholder: var(--sota33-muted);
  --sota-color-focus: var(--sota33-focus);
  --sota-color-state-warning-bg: color-mix(in srgb,var(--sota33-warning) 13%,var(--sota33-canvas));
  --sota-color-state-warning-text: var(--sota33-text);
  --sota-color-state-danger-bg: color-mix(in srgb,var(--sota33-danger) 13%,var(--sota33-canvas));
  --sota-color-state-danger-text: var(--sota33-text);
  --sota-color-state-success-bg: color-mix(in srgb,var(--sota33-success) 13%,var(--sota33-canvas));
  --sota-color-state-success-text: var(--sota33-text);
  --sota-shadow-surface: var(--sota33-shadow);
  --sota-shadow-elevated: var(--sota33-raised-shadow);
}
html[data-sota-prototype-module="crm"][data-theme="dark"] { color-scheme:dark;--sota33-honeycomb:url('/prototype/assets/design/v2.3.6/honeycomb-raised-dark.svg'); }
html[data-sota-prototype-module="crm"][data-sota33] body {
  margin: 0;
  font-family:var(--sota33-font) !important;
  padding: 0 !important;
  color: var(--sota33-text);
  background-color: var(--sota33-canvas) !important;
  background-image: linear-gradient(color-mix(in srgb,var(--sota33-canvas) var(--sota33-honeycomb-overlay),transparent),color-mix(in srgb,var(--sota33-canvas) var(--sota33-honeycomb-overlay),transparent)),var(--sota33-honeycomb) !important;
  background-repeat: repeat !important;
  background-size: auto,117.779px 102px !important;
  background-attachment: fixed !important;
}
html[data-sota-prototype-module="crm"] #root {
  width: calc(100% - 72px) !important;
  margin-left: 72px !important;
  min-width: 0;
  box-sizing: border-box;
}
/* ID specificity is intentional: injected legacy !important fonts must lose. */
html[data-sota-prototype-module="crm"] #root,
html[data-sota-prototype-module="crm"] #root *,
html[data-sota-prototype-module="crm"] :is(.sota23-menu,.sota23-menu *,dialog,dialog *, .sota-crm-skip,.toast,.toast *) {
  font-family: var(--sota33-font) !important;
  font-optical-sizing: auto;
}
html[data-sota-prototype-module="crm"] #root .crm-app {
  color: var(--sota33-text) !important;
  background: transparent !important;
}
html[data-sota-prototype-module="crm"] #root :is(h1,h2,h3) { color:var(--sota33-ink) !important; font-weight:400 !important; }
html[data-sota-prototype-module="crm"] #root .sota-crm-hero h1 { font-size:clamp(1.8rem,3vw,2.8rem) !important;line-height:1.15; }
html[data-sota-prototype-module="crm"] #root :is(pre,code,.font-mono) { font-variant-numeric:tabular-nums;overflow-wrap:anywhere;white-space:pre-wrap; }
html[data-sota-prototype-module="crm"] #root :is(.sota33-glass,.sota33-glass-raised) {
  background:var(--sota33-glass) !important;
  color:var(--sota33-text) !important;
  border-color:var(--sota33-border) !important;
  border-radius:18px !important;
  box-shadow:var(--sota33-shadow) !important;
  backdrop-filter:blur(var(--sota33-glass-blur)) saturate(var(--sota33-glass-saturation));
  -webkit-backdrop-filter:blur(var(--sota33-glass-blur)) saturate(var(--sota33-glass-saturation));
}
html[data-sota-prototype-module="crm"] #root .sota33-glass-raised {
  background:var(--sota33-glass-raised) !important;
  border-color:var(--sota33-border-strong) !important;
  box-shadow:var(--sota33-raised-shadow) !important;
  backdrop-filter:blur(var(--sota33-raised-blur)) saturate(var(--sota33-raised-saturation));
  -webkit-backdrop-filter:blur(var(--sota33-raised-blur)) saturate(var(--sota33-raised-saturation));
}
html[data-sota-prototype-module="crm"] #root :is(input:not([type="checkbox"]):not([type="file"]):not(.sota-wave-controls *),select,textarea) {
  min-height:40px;
  max-width:100%;
  border:1px solid var(--sota33-border-strong) !important;
  border-radius:12px !important;
  background:var(--sota33-glass-raised) !important;
  color:var(--sota33-ink) !important;
  font-weight:300;
  backdrop-filter:blur(var(--sota33-raised-blur));
  -webkit-backdrop-filter:blur(var(--sota33-raised-blur));
}
html[data-sota-prototype-module="crm"] #root :is(input,textarea)::placeholder { color:var(--sota33-muted) !important;opacity:.8; }
html[data-sota-prototype-module="crm"] #root option { color:var(--sota33-ink);background:var(--sota33-surface-solid); }
html[data-sota-prototype-module="crm"] #root input[type="checkbox"] { accent-color:var(--sota33-primary); }
html[data-sota-prototype-module="crm"] #root button:where(:not(.crm-stack button):not(.crm-chart-row):not(.sota-wave-controls *)) {
  min-height:40px;
  border-radius:12px !important;
  border-color:var(--sota33-border-strong) !important;
  background:var(--sota33-glass-raised) !important;
  color:var(--sota33-ink) !important;
  font-weight:400;
}
html[data-sota-prototype-module="crm"] #root button:is(.bg-indigo-600,.bg-indigo-700,.bg-slate-800,.bg-emerald-600,.sota-button--primary,.primary) {
  background:var(--sota33-primary) !important;
  color:var(--sota33-on-primary) !important;
}
html[data-sota-prototype-module="crm"] #root button:is(.bg-indigo-600,.bg-indigo-700,.bg-slate-800,.bg-emerald-600,.sota-button--primary,.primary):hover:not(:disabled) { background:var(--sota33-primary-hover) !important; }
html[data-sota-prototype-module="crm"] #root button:is(.bg-rose-600,.danger) { background:var(--sota-color-state-danger-bg) !important;color:var(--sota33-text) !important;border-color:var(--sota33-danger) !important; }
html[data-sota-prototype-module="crm"] #root button.sota-preset-card,
html[data-sota-prototype-module="crm"] #root button.sota-preset-card * { color:var(--sota33-text) !important; }
html[data-sota-prototype-module="crm"] #root button.sota-preset-card { text-align:left;line-height:1.45; }
html[data-sota-prototype-module="crm"] #root button:is(.sota-preset-card,[role="tab"])[aria-pressed="true"],
html[data-sota-prototype-module="crm"] #root button[role="tab"][aria-selected="true"] {
  background:var(--sota33-primary-soft) !important;
  border-color:var(--sota33-primary) !important;
  box-shadow:inset 0 0 0 1px var(--sota33-primary) !important;
  color:var(--sota33-ink) !important;
}
html[data-sota-prototype-module="crm"] #root :is(button,a,input,select,textarea,summary,[tabindex]):not(.sota-wave-controls *):focus-visible {
  outline:3px solid var(--sota33-focus) !important;
  outline-offset:3px;
}
html[data-sota-prototype-module="crm"] #root button:disabled:not(.sota-wave-controls *) {
  background:var(--sota33-surface-solid) !important;
  color:var(--sota33-muted) !important;
  border-color:var(--sota33-border-strong) !important;
  opacity:.65;
  cursor:not-allowed;
}
html[data-sota-prototype-module="crm"] #root .crm-chart-row { background:transparent !important;color:var(--sota33-text) !important; }
html[data-sota-prototype-module="crm"] #root .crm-stack button { border-radius:0 !important;background:var(--series-color) !important;color:var(--sota33-on-primary) !important; }
html[data-sota-prototype-module="crm"] #root .crm-stack button:nth-child(even) { background:repeating-linear-gradient(135deg,var(--series-color) 0,var(--series-color) 5px,transparent 5px,transparent 9px),var(--sota-color-bg-muted) !important; }
html[data-sota-prototype-module="crm"] #root :is(.sota-status--ok,.sota-status--wait,.sota-status--limited,.sota-status--block) { color:var(--sota33-text) !important; }
html[data-sota-prototype-module="crm"] #root .sota-status--ok { background:var(--sota-color-state-success-bg) !important; }
html[data-sota-prototype-module="crm"] #root :is(.sota-status--wait,.sota-status--limited) { background:var(--sota-color-state-warning-bg) !important; }
html[data-sota-prototype-module="crm"] #root .sota-status--block { background:var(--sota-color-state-danger-bg) !important; }
html[data-sota-prototype-module="crm"] #root :is(.crm-hash,.sota-preset-card) { overflow-wrap:anywhere; }
html[data-sota-prototype-module="crm"] #root :is(.sota-preset-panel,.sota-rules-workspace,.sota-rules-filters,.sota-rule-form,.sota-rule-row,.crm-chart-grid)>* { min-width:0; }
/* Defeat the old generic green button rule inside the common menu. */
html[data-sota-prototype-module="crm"][data-sota33] #sota-crm-common-menu button { background:transparent !important;color:var(--sota23-text) !important; }
html[data-sota-prototype-module="crm"][data-sota33] #sota-crm-common-menu button:hover { background:var(--sota23-menu-hover) !important; }
html[data-sota-prototype-module="crm"][data-sota33] #sota-crm-common-menu .sota23-scrim { background:rgba(6,20,16,.38) !important; }
html[data-sota-prototype-module="crm"] .sota-crm-skip {
  position:fixed;z-index:2147483647;top:-80px;left:84px;padding:10px 14px;
  border:2px solid var(--sota33-focus);border-radius:12px;
  background:var(--sota33-surface-solid);color:var(--sota33-ink);font-size:14px;text-decoration:none;
}
html[data-sota-prototype-module="crm"] .sota-crm-skip:focus-visible { top:12px;outline:3px solid var(--sota33-focus);outline-offset:2px; }
@media(max-width:1100px) {
  html[data-sota-prototype-module="crm"] #root .sota-rules-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html[data-sota-prototype-module="crm"] #root .sota-rules-search { grid-column:1 / -1; }
  html[data-sota-prototype-module="crm"] #root .crm-chart-grid { grid-template-columns:1fr; }
}
@media(max-width:800px) {
  html[data-sota-prototype-module="crm"] #root :is(.crm-chart-row,.crm-structure-row) { grid-template-columns:1fr;gap:6px; }
}
@media(max-width:720px) {
  html[data-sota-prototype-module="crm"][data-sota33] body { padding-bottom:calc(86px + env(safe-area-inset-bottom,0px)) !important; }
  html[data-sota-prototype-module="crm"] #root { width:100% !important;margin-left:0 !important; }
  html[data-sota-prototype-module="crm"] #root .sota-crm-hero h1 { font-size:1.8rem !important; }
  html[data-sota-prototype-module="crm"] #root :is(.sota-rule-form,.sota-rule-row) { flex-wrap:wrap; }
  html[data-sota-prototype-module="crm"] #root :is(button,input,select):not(.sota-wave-controls *) { min-height:44px; }
  html[data-sota-prototype-module="crm"] #root .crm-stack button { min-height:26px; }
  html[data-sota-prototype-module="crm"] .sota-crm-skip { left:12px; }
  html[data-sota-prototype-module="crm"][data-sota33] #sota-crm-common-menu :is(.sota23-theme,.sota23-mobile-open) { background:var(--sota23-menu-popover) !important; }
}
@media(max-width:600px) {
  html[data-sota-prototype-module="crm"] #root .sota-rules-filters { grid-template-columns:1fr; }
}
@media(prefers-reduced-transparency:reduce) {
  html[data-sota-prototype-module="crm"] #root :is(.sota33-glass,.sota33-glass-raised),
  html[data-sota-prototype-module="crm"] #root :is(input,select,textarea) { background:var(--sota33-surface-solid) !important;backdrop-filter:none;-webkit-backdrop-filter:none; }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  html[data-sota-prototype-module="crm"] #root :is(.sota33-glass,.sota33-glass-raised) { background:var(--sota33-surface-solid) !important; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-sota-prototype-module="crm"] #root *,html[data-sota-prototype-module="crm"] .sota23-menu * { scroll-behavior:auto !important;transition:none !important; }
}

html[data-sota-prototype-module="crm"] #root .sota-crm-data-issue {
  margin-bottom:16px;padding:14px 16px;border-left:3px solid var(--sota33-warning) !important;
}
html[data-sota-prototype-module="crm"] #root .sota-crm-data-issue p { margin:0 0 10px;line-height:1.5; }
html[data-sota-prototype-module="crm"] #root .sota-crm-data-issue button { padding:9px 14px; }
html[data-sota-prototype-module="crm"] #root .sota-crm-data-issue .sota-crm-data-issue-note { margin:10px 0 0;font-size:13px;color:var(--sota33-muted); }

/* Shared DateRangePicker20 uses its own cascade, including its body portal. */
html[data-sota-prototype-module="crm"] { --sota-wave-bottom-reserve:12px; }
html[data-sota-prototype-module="crm"] #root .sota-crm-native-date-hidden { display:none !important; }
html[data-sota-prototype-module="crm"] #root .sota-crm-period-host { grid-column:span 2;min-width:0; }
/* These three declarations defeat the older .crm-app button !important recipe.
   All calendar day/portal roles remain owned by the exact shared CSS. */
html[data-sota-prototype-module="crm"] #root .sota-wave-controls .date-range-trigger {
  border-radius:13px !important;font-weight:400;
  background:var(--material-05) !important;
  color:var(--lab-text) !important;
}
html[data-sota-prototype-module="crm"] #root .sota-preset-panel :is(.uppercase,.text-indigo-600,.text-indigo-700,.text-indigo-800,.text-violet-700) {
  color:var(--sota33-text) !important;
}
html[data-sota-prototype-module="crm"] #root :is(.sota-preset-panel,.sota-crm-hero) .uppercase { color:var(--sota33-muted) !important; }
html[data-sota-prototype-module="crm"] #root textarea { min-height:120px;line-height:1.5;opacity:1; }
@media(max-width:720px) {
  html[data-sota-prototype-module="crm"] { --sota-wave-bottom-reserve:calc(86px + env(safe-area-inset-bottom,0px)); }
  html[data-sota-prototype-module="crm"] #root .sota-crm-period-host { grid-column:1 / -1; }
}

/* Body portals and loader are outside React's legacy root. Their font role
   must defeat legacy declarations even when the old decorative link is absent. */
html[data-sota-prototype-module="crm"][data-sota33] :is(.sota-wave-controls,.sota-wave-controls *) {
  font-family:var(--sota33-font) !important;
  font-optical-sizing:auto;
}

html[data-sota-prototype-module="crm"] #root .sota-crm-navigation-status { color:var(--sota33-text);padding:12px 14px;border-left:3px solid var(--sota33-warning);background:var(--sota33-glass-raised);border-radius:12px;line-height:1.5; }

/* Loading belongs to the affected section, with no page scrim or animation. */
html[data-sota-prototype-module="crm"] #root .sota-crm-inline-loading {
  display:flex;align-items:center;gap:8px;max-width:100%;min-height:24px;
  margin:6px 0;color:var(--sota33-muted);font-size:12px;line-height:1.5;
  background:transparent;border:0;box-shadow:none;position:static;
}
html[data-sota-prototype-module="crm"] #root .sota-crm-inline-loading[hidden] { display:none; }
html[data-sota-prototype-module="crm"] #root .sota-crm-loading-mark {
  flex:0 0 10px;width:10px;height:12px;background:var(--sota33-primary);
  clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
}
html[data-sota-prototype-module="crm"] #root [role="progressbar"][aria-label="Загрузка CRM"] { display:none; }
html[data-sota-prototype-module="crm"] #root .sota-crm-data-issue button { margin:4px 8px 4px 0; }
html[data-sota-prototype-module="crm"] #root #crm-loading-data { grid-column:1 / -1; }
