/* Lightweight editor workspace: the grid is primary, configuration lives in Properties. */
.customer-cohort-builder .cohort-editor-bar{flex-wrap:wrap}.customer-cohort-builder .cohort-editor-bar>div:first-child{flex:1 1 280px;min-width:0}.customer-cohort-builder .cohort-source-state{white-space:normal;overflow-wrap:anywhere;max-width:260px}
.customer-cohort-builder .cohort-properties{align-self:start;max-height:calc(100vh - 100px);position:sticky;top:0;scrollbar-gutter:stable;box-sizing:border-box}
.customer-cohort-builder .cohort-properties>nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;padding:0 5px}
.customer-cohort-builder .cohort-facets summary{display:flex;align-items:center;justify-content:flex-start;gap:8px;cursor:pointer;font-size:12px;line-height:1.5;color:#31434d}
.customer-cohort-builder .cohort-facets summary::before{content:'›';font-size:16px;color:#73838d}.customer-cohort-builder .cohort-facets details[open]>summary::before{transform:rotate(90deg)}.customer-cohort-builder .cohort-facets summary>b{margin-left:auto;font-size: 12px;color:#73838d;font-weight:500}
.customer-cohort-builder .cohort-facets details{border-bottom:1px solid #edf0f2}.customer-cohort-builder .cohort-facets details label{display:flex;align-items:center;gap:6px;padding:3px 0}.customer-cohort-builder .cohort-facets details label input[type=checkbox]{width:14px;height:14px;flex:0 0 14px}.customer-cohort-builder .cohort-facets details label b{margin-left:auto}.customer-cohort-builder .cohort-facets details label.exclude{margin-left:20px;color:#78868e}
.customer-cohort-builder .cohort-metric-properties article{display:grid;gap:6px;margin:8px 0;padding-bottom:8px;border-bottom:1px solid #e7ecef;font-size: 12px}.customer-cohort-builder .cohort-metric-properties article>span,.customer-cohort-builder .cohort-technical small,.customer-cohort-builder .cohort-unavailable-properties p>span{color:#73838d;font-size: 12px;overflow-wrap:anywhere}.customer-cohort-builder .cohort-metric-filter{display:grid;grid-template-columns:minmax(0,1fr) minmax(70px,.8fr);gap:5px}.customer-cohort-builder .cohort-unavailable-properties p{display:grid;gap:3px;margin:8px 0;font-size: 12px}
.customer-cohort-builder [hidden]{display:none!important}
.communication-action-editor [hidden]{display:none!important}
.customer-cohort-builder{display:grid!important;gap:8px!important;color:#18232d;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.cohort-editor-bar{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 12px;border-bottom:1px solid #dde5e9;background:#fff}.cohort-editor-bar>div:first-child{margin-right:auto}.cohort-editor-bar h2{margin:0;font:700 20px/1.25 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.cohort-editor-bar p{margin:2px 0 0;color:#6b7882;font-size:12px}
.cohort-source-state{align-self:center!important;padding:6px 9px!important;border-radius:5px!important;background:#eef6f4!important;font-size: 12px;white-space:nowrap}
.customer-cohort-builder .cohort-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 360px!important;gap:0!important;min-height:calc(100vh - 150px);border:1px solid #dce4e8;border-radius:8px;overflow:hidden;background:#fff}.customer-cohort-builder .cohort-workspace{display:grid!important;align-content:start;gap:8px!important;min-width:0;padding:10px;background:#f7f9fa}
.cohort-active-chips:empty{display:none}.cohort-active-chips{display:flex;gap:5px;overflow:auto;padding:4px 0}.cohort-active-chips span{padding:4px 7px;border:1px solid #d7e1e5;border-radius:4px;background:#fff;font-size: 12px}.cohort-truth>div{padding:8px 10px!important;border-radius:5px!important;font-size:12px}.cohort-results{gap:8px!important}.cohort-results>.card,.cohort-two>.card,.cohort-grid-sheet{padding:10px!important;border:1px solid #dce4e8!important;border-radius:6px!important;background:#fff!important;box-shadow:none!important}
.customer-cohort-builder .kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.customer-cohort-builder .kpi-card{display:grid;gap:2px;padding:9px 10px;text-align:left;border:1px solid #dce4e8;border-radius:5px;background:#fff}.customer-cohort-builder .kpi-card:hover{border-color:#159b78}.customer-cohort-builder .kpi-card b{font-size:17px}.customer-cohort-builder .kpi-card small{color:#6b7882}
.cohort-grid-sheet{padding:0!important;overflow:auto}.cohort-grid-sheet .card-hd{padding:8px 10px;border-bottom:1px solid #dce4e8}.customer-cohort-builder .dt-wrap{max-height:420px;overflow:auto}.customer-cohort-builder .dt{display:table!important;width:100%!important;border-collapse:separate;border-spacing:0;font-size:12px}.customer-cohort-builder .dt th{position:sticky;top:0;z-index:2;padding:7px 9px;text-align:left;background:#f0f4f6;border-bottom:1px solid #cfdae0}.customer-cohort-builder .dt td{padding:7px 9px;border-bottom:1px solid #e7ecef}.customer-cohort-builder .dt tbody tr:hover{background:#f0f8f6}
.cohort-properties{width:360px;min-width:300px;max-width:560px;resize:horizontal;direction:rtl;overflow:auto;border-left:1px solid #dce4e8;background:#fff;outline:none}.cohort-properties>*{direction:ltr}.cohort-properties>header{display:flex;justify-content:space-between;align-items:start;padding:12px}.cohort-properties>header small{color:#7a8790;font-size: 12px}.cohort-properties>header h3{margin:3px 0 0;font:650 15px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.cohort-properties>header button{border:0;background:transparent;font-size:20px;color:#6b7882}.cohort-properties>nav{display:flex;gap:0;overflow:auto;padding:0 7px;border-bottom:1px solid #dce4e8}.cohort-properties>nav button{padding:8px;border:0;border-bottom:2px solid transparent;background:transparent;font-size: 12px;white-space:nowrap}.cohort-properties>nav button.on{border-color:#159b78;color:#087d68}.cohort-properties>[data-cohort-properties-panel]{display:grid;gap:10px;padding:12px}.cohort-properties label{display:grid;gap:4px;font-size: 12px;color:#596873}.cohort-properties input,.cohort-properties select{width:100%;min-width:0}.cohort-properties select[multiple]{min-height:72px}.cohort-facets{position:static!important;max-height:none!important;padding:12px!important;border:0!important;border-radius:0!important;overflow:visible!important}.cohort-facets details{padding:6px 0!important}.cohort-facets details div{gap:3px!important;padding:6px 2px!important}
.cohort-properties>[data-cohort-properties-panel][hidden]{display:none!important}
.cohort-properties fieldset{display:grid;gap:8px;margin:4px 0;padding:10px;border:1px solid #dce4e8;border-radius:7px}.cohort-properties legend{padding:0 5px;color:#43545f;font-size: 12px;font-weight:700}.cohort-properties fieldset p{margin:0;font-size: 12px;line-height:1.45}
.cohort-combined-chart{padding:0!important}.cohort-combined-chart .dt-wrap{max-height:328px}.cohort-combined-chart .dt{table-layout:fixed}.cohort-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.cohort-combined-chart .dt th:not(:first-child){text-align:right}.cohort-month-link{display:inline-flex;align-items:center;min-height:28px;padding:2px 6px;border:0;border-radius:4px;background:transparent;color:#087d68;font:inherit;font-weight:600;cursor:pointer}.cohort-month-link:hover{background:#e5f3ee}.cohort-month-link:focus-visible{outline:2px solid #087d68;outline-offset:2px}.cohort-two{gap:8px!important}.cohort-quadrant-grid button{padding:9px!important;border-radius:5px!important}.cohort-action-summary{display:grid!important;font-size: 12px}.cohort-actions{margin-top:4px!important}.cohort-before-after{grid-template-columns:1fr!important;gap:5px!important}.cohort-before-after section{min-height:0!important;padding:8px!important;border-radius:5px!important}.cohort-quality-row{display:grid;gap:2px;padding:7px 0;border-bottom:1px solid #e8edef;font-size: 12px}.cohort-quality-row span{color:#6b7882}
.cohort-secondary>summary{cursor:pointer;padding:2px 0;font-weight:650}.cohort-secondary[open]>summary{margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #e7ecef}.cohort-secondary .cohort-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.72fr)}.cohort-secondary .cohort-two>article{min-width:0}.cohort-secondary .cohort-two>article+article{padding-left:8px;border-left:1px solid #e7ecef}
@media(max-width:1200px){.customer-cohort-builder .cohort-layout{grid-template-columns:minmax(0,1fr) 320px!important}.cohort-properties{width:320px}.customer-cohort-builder .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cohort-action-summary{display:flex;justify-content:space-between;gap:12px;margin-top:10px;color:var(--muted)}
.cohort-before-after{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cohort-before-after section{min-height:110px;padding:15px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(135deg,#fff,#f5fbf9)}
.cohort-before-after b{font-size:17px}
.cohort-before-after p{color:var(--muted)}
.communication-report-editor{display:grid;gap:10px;min-width:0}.communication-report-source{padding:8px 10px;border-radius:8px;background:#eef7f4;color:#35675d}.communication-report-tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--line)}.communication-report-tabs button{padding:9px 11px;border:0;border-bottom:2px solid transparent;background:transparent;white-space:nowrap}.communication-report-tabs button.on{border-color:#087d68;color:#087d68}.communication-report-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:560px}.communication-table-toolbar{display:flex;align-items:center;gap:12px;min-height:45px;padding:5px 8px}.communication-table-toolbar span{margin-right:auto;color:var(--muted)}.communication-grid-wrap{max-height:calc(100vh - 290px);overflow:auto;border:1px solid var(--line);border-radius:10px}.communication-grid thead{position:sticky;top:0;z-index:3}.communication-grid th:nth-child(-n+3),.communication-grid td:nth-child(-n+3){position:sticky;z-index:2;background:inherit}.communication-grid th:nth-child(1),.communication-grid td:nth-child(1){left:0;width:42px}.communication-grid th:nth-child(2),.communication-grid td:nth-child(2){left:42px;width:38px}.communication-grid th:nth-child(3),.communication-grid td:nth-child(3){left:80px}.communication-grid tr:focus{outline:2px solid #087d68;outline-offset:-2px}.communication-properties{width:340px;min-width:280px;max-width:520px;resize:horizontal;overflow:auto;border-left:1px solid var(--line);background:#fff}.communication-properties>header{display:flex;justify-content:space-between;padding:16px}.communication-properties h3{margin:4px 0}.communication-properties>header button{border:0;background:transparent;font-size:24px}.communication-properties>nav{display:flex;gap:2px;overflow:auto;padding:0 10px;border-bottom:1px solid var(--line)}.communication-properties>nav button{padding:8px;border:0;background:transparent;white-space:nowrap}.communication-properties>nav .on{color:#087d68;border-bottom:2px solid}.communication-properties>[data-properties-body]{display:grid;gap:14px;padding:16px}.communication-properties section{border-bottom:1px solid var(--line)}.communication-partial{padding:8px;color:var(--muted)}.communication-partial.unavailable{color:#a73932}.communication-partial.partial{color:#925d12}
.communication-grid th:nth-child(2),.communication-grid td:nth-child(2){box-sizing:border-box!important;width:38px!important;min-width:38px!important;max-width:38px!important;padding:8px 12px!important;overflow:visible!important}.communication-grid input[type="checkbox"]{appearance:auto!important;-webkit-appearance:checkbox!important;display:block!important;position:relative!important;visibility:visible!important;opacity:1!important;width:14px!important;height:14px!important;min-width:14px!important;margin:0!important;accent-color:#087d68}
.communication-client-cell{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.communication-client-cell .linklike{white-space:nowrap}.communication-completed-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.departed-manager-preset{display:grid;gap:12px;padding:14px;border:1px solid #d8e3df;border-radius:10px;background:linear-gradient(145deg,#f7fbfa,#fff)}.departed-manager-preset h4,.departed-manager-preset p{margin:0}.departed-manager-preset p{color:#6b7882;font-size: 12px;line-height:1.5}.departed-manager-preset [data-departed-summary]{display:grid;gap:12px;padding:0;background:transparent}.departed-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.departed-summary-head>div{display:grid;gap:3px}.departed-summary-head small{color:#718079;font-size: 12px;font-weight:750;letter-spacing:.12em}.departed-summary-head b{font-size:14px}.departed-summary-head>span{padding:5px 7px;border-radius:999px;background:#e4f4ef;color:#087d68!important;font-size: 12px!important;font-weight:700}.departed-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.departed-metrics>div{display:grid;gap:4px;min-width:0;padding:9px;border:1px solid #dce5e2;border-radius:7px;background:#fff}.departed-metrics small,.departed-capacity small{color:#718079;font-size: 12px}.departed-metrics b{overflow:hidden;font-size:13px;text-overflow:ellipsis}.departed-capacity{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:5px;padding:10px;border-radius:8px;background:#edf6f3}.departed-capacity>div{display:grid;gap:2px}.departed-capacity b{font-size:15px}.departed-capacity i{color:#8b9893;font-style:normal}.departed-member-list{display:grid;gap:1px;border:1px solid #dde6e3;border-radius:8px;overflow:hidden;background:#dde6e3}.departed-member{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px;background:#fff}.departed-member>span{display:grid;width:20px;height:20px;place-items:center;border-radius:5px;background:#edf6f3;color:#087d68!important;font-size: 12px!important}.departed-member>div{display:grid;min-width:0;gap:2px}.departed-member b,.departed-member small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.departed-member b{font-size: 12px}.departed-member small{color:#718079;font-size: 12px}.departed-member em{padding:4px 6px;border-radius:5px;background:#edf6f3;color:#087d68;font-size: 12px;font-style:normal;white-space:nowrap}.departed-member em.is-gap{background:#fff0e7;color:#9a4e1f}.departed-results{display:grid;gap:8px;padding-top:10px;border-top:1px solid #dce5e2}.departed-manager-preset .dt-wrap{max-height:none!important;overflow:visible!important}
.cohort-properties [data-cohort-presets]{display:grid;gap:7px;margin-top:12px}.cohort-properties [data-cohort-presets]>a{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 11px;border:1px solid #dce5e2;border-radius:8px;background:#fff;color:#26343c;text-decoration:none}.cohort-properties [data-cohort-presets]>a:hover{border-color:#8ccbbb;background:#f7fbfa}.cohort-properties [data-cohort-presets]>a b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cohort-properties [data-cohort-presets]>a span{color:#718079;font-size: 12px;white-space:nowrap}

/* The persisted Properties width is the grid contract, not decoration on the aside. */
.customer-cohort-builder .cohort-layout{grid-template-columns:minmax(0,1fr) var(--cohort-properties-width,360px)!important}
.communication-report-grid{grid-template-columns:minmax(0,1fr) var(--communication-properties-width,340px)}
.communication-report-grid:has(.communication-properties[hidden]){grid-template-columns:minmax(0,1fr) 0}
.customer-cohort-builder .cohort-layout:has(.cohort-properties[hidden]){grid-template-columns:minmax(0,1fr) 0!important}
@media(max-width:1200px){.customer-cohort-builder .cohort-layout{grid-template-columns:minmax(0,1fr) var(--cohort-properties-width,320px)!important}}

.communication-source-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.communication-source-chips span{padding:4px 8px;border:1px solid #cfe0da;border-radius:999px;background:#f4faf8;color:#35675d;font-size: 12px}.communication-source-chips .is-unavailable{border-color:#ead8c3;background:#fff9f1;color:#8a5d2c}.communication-filter-bar{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff}.communication-filter-bar label,.communication-action-editor label{display:grid;gap:4px;color:#687780;font-size: 12px}.communication-filter-bar select,.communication-action-editor input{min-width:0;width:100%;padding:8px;border:1px solid #d7e1e5;border-radius:6px;background:#fff;color:#24313a}.communication-quadrants{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px}.communication-quadrants button{display:grid;gap:6px;min-height:110px;padding:14px;text-align:left;border:1px solid #d7e3df;border-radius:8px;background:linear-gradient(145deg,#fff,#f5faf8)}.communication-quadrants strong{font-size:24px;color:#087d68}.communication-quadrants span{color:#687780;font-size: 12px}.communication-action-editor{display:grid;gap:10px;padding:14px}.communication-action-editor p{margin:0;color:#687780;font-size: 12px}.communication-action-editor>[data-communication-action-summary]{padding:9px;border-radius:6px;background:#f1f7f5}.communication-properties[hidden]{display:none!important}
@media(max-width:1400px){.communication-filter-bar{grid-template-columns:repeat(2,minmax(160px,1fr))}.communication-table-toolbar{flex-wrap:wrap}.communication-table-toolbar span{flex:1 0 55%}}
@media(max-width:900px){.customer-cohort-builder .cohort-layout{display:flex!important;flex-direction:column}.customer-cohort-builder .cohort-properties{position:static;width:100%!important;min-width:0;max-width:none;max-height:520px;resize:none;border-left:0;border-top:1px solid #dce4e8}.customer-cohort-builder .cohort-workspace{width:100%;box-sizing:border-box}.customer-cohort-builder .cohort-communication-link{flex-wrap:wrap;gap:8px}}
.cohort-drill-heading,.cohort-drill-meta,.cohort-category-sku{display:block}
.customer-cohort-builder .cohort-contact-copy{display:grid;gap:6px;min-width:0;align-content:start}.customer-cohort-builder .cohort-contact-copy h3,.customer-cohort-builder .cohort-contact-copy p{margin:0;white-space:normal;overflow-wrap:anywhere;line-height:1.45}.customer-cohort-builder .cohort-contact-copy p{font-size:12px;color:var(--text-muted,#64748b)}
.customer-cohort-builder [data-cohort-quality] .dt th{min-width:112px;white-space:normal;overflow-wrap:normal;word-break:normal}.customer-cohort-builder [data-cohort-quality] .dt td{white-space:nowrap}
.cohort-drill-meta{margin-top:4px;line-height:1.5}
[data-cohort-drill-totals]{margin:8px 0;max-width:100%;overflow-wrap:anywhere;line-height:1.5}
.cohort-category-sku{margin-top:3px;color:var(--text-muted,#64748b)}
.customer-cohort-builder .cohort-properties>[data-cohort-properties-panel],.customer-cohort-builder [data-cohort-quality]{min-width:0}

.customer-cohort-builder .btn:disabled{background:#eef1f3;color:#68757f;border-color:#dce2e6;box-shadow:none;cursor:not-allowed}

/* Keep panel navigation reachable while the active section scrolls. */
.customer-cohort-builder .cohort-properties{display:flex;flex-direction:column;overflow:hidden}
.cohort-properties>header,.cohort-properties>nav{flex:none}
.cohort-properties>header button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;padding:0;border-radius:8px}
.cohort-properties>header button:hover{background:#eef3f5}
.cohort-properties>[data-cohort-properties-panel]{min-height:0;overflow:auto}
.operation-help-card>summary{display:flex;align-items:start;gap:10px;padding:10px 0;cursor:pointer}
.operation-help-card>summary>span{flex:1;min-width:0}
.operation-help-card>summary b,.operation-help-card>summary small{display:block}
.operation-help-card>summary b{font-size:12px;line-height:1.45}
.operation-help-card>summary small{margin-top:4px;color:#657680;font-size: 12px;line-height:1.5}
.operation-help-card>summary em{flex:none;padding:3px 6px;border:1px solid #dde5e9;border-radius:6px;background:#f5f7f8;color:#657680;font-family:inherit;font-size: 12px;font-weight:500;line-height:1.4}
@media(max-width:760px){.cohort-properties>header button{min-width:40px;min-height:40px}}

/* Отказ конструктора отчётов должен отличаться от «готово» не только словами.
   Замер аудита 13.09.2026: классов .cohort-unavailable и .cohort-ready в дереве
   стилей не было ни одного, поэтому отказ рисовался тем же серым блоком 12-м
   кеглем, что и успешная загрузка справочников. Человек читал 400 символов
   мелким серым и не понимал, что перед ним стоп, а не подсказка. */
.cohort-truth > .cohort-unavailable {
  border-left: 3px solid var(--bad, #b42318);
  background: color-mix(in srgb, var(--bad, #b42318) 6%, transparent);
  color: var(--text, #101828);
  font-size: 13px;
  line-height: 1.45;
}
.cohort-truth > .cohort-ready {
  border-left: 3px solid var(--good, #0d9488);
  background: color-mix(in srgb, var(--good, #0d9488) 6%, transparent);
}

/* 17.09.2026 (аудит D8): единственная колонка сетки была auto и растягивалась по содержимому
   (1195 px при ширине 1016) — панель свойств уезжала за край. Колонка строго по ширине контейнера. */
.customer-cohort-builder{grid-template-columns:minmax(0,1fr)!important}
.customer-cohort-builder>*{min-width:0}
