/* Executive Light 2026 — final visual authority.
   The interface is a decision workspace, not a wall of bordered widgets. */
:root {
  --exec-canvas: #f5f7f8;
  --exec-paper: #fff;
  --exec-ink: #162027;
  /* было #69757d: 4,44 на #f0faf6 при норме 4,5 — псевдоним канона, как у --cmd-* */
  --exec-muted: var(--muted);
  --exec-line: #e1e7ea;
  --exec-accent: #087864;
  --exec-accent-soft: #eaf5f2;
  --exec-danger: #c8423a;
  /* было #a66b13: 4,44 на белом при норме 4,5 — псевдоним канона */
  --exec-warn: var(--warn);
  --exec-radius: 10px;
}

body { background: var(--exec-canvas); color: var(--exec-ink); }
.app, .app.no-inbox { grid-template-columns: 232px minmax(0, 1fr); }
.side { padding: 10px 9px; }
.brand { min-height: 48px; margin-bottom: 6px; padding-bottom: 10px; }
.sidebar-nav .nav-section-label { margin-top: 9px; padding-top: 7px; }
.sidebar-nav .nav-area { min-height: 36px; padding: 7px 9px; }
.sidebar-nav .nav-area-items { margin-bottom: 5px; }
.sidebar-nav .nav-area-items .nav-item { min-height: 30px; padding: 5px 7px; }

.ws-top { min-height: 50px; padding: 7px 18px; }
.ws-body { gap: 8px; padding: 12px clamp(16px, 1.6vw, 24px) 32px; }
.today-new-view, .team-new-view, .customers-new-view,
.conversations-new-view, .archi-control-view, .purchase-new-view {
  width: min(100%, 1460px);
}

/* Breadcrumb + sidebar are the cross-domain navigation. Keep only local tabs. */
.tn-contour-shell > .card-hd,
.tn-contour-shell > .tn-new-contour-cats { display: none; }
.tn-contour-shell {
  display: none;
}
.tn-contour-shell .tn-new-contour-subnav,
.today-new-view > .chips,
.conversations-new-view > .chips,
.purchase-new-tabs {
  display: none;
}

/* The expanded sidebar owns route navigation. Embedded tab bars used to
   repeat the same destinations and consumed an entire row on every screen. */
.screen-local-tabs:not(.entity-card-tabs) {
  display: none;
}
.one-c-gateway-view > .new-contour-nav { display: none; }

.entity-card-tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 10px;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--exec-line);
  border-radius: 9px;
  background: #eef1f3;
  scrollbar-width: none;
}
.chips .chip {
  min-height: 32px;
  padding: 7px 12px;
  white-space: nowrap;
  border: 0;
  border-radius: 7px;
  color: #59656d;
  background: transparent;
  box-shadow: none;
}
.chips .chip.on {
  color: var(--exec-accent);
  background: var(--exec-paper);
  box-shadow: 0 1px 2px rgba(19, 31, 38, .08);
}

/* Section headings should read as hierarchy, not as another card. */
.today-new-view > .card-hd,
.team-new-view > .card-hd,
.customers-new-view > .card-hd,
.conversations-new-view > .card-hd,
.archi-control-view > .card-hd {
  padding: 5px 2px 2px;
  border: 0;
  background: transparent;
}
.card-hd h3 { font-size: 17px; letter-spacing: -.025em; }
.card-hd p.muted, .card-hd .meta { max-width: 78ch; }
.explain {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 0;
  border-left: 2px solid #a8c8c0;
  border-radius: 0 7px 7px 0;
  color: var(--exec-muted);
  background: rgba(255,255,255,.58);
}

/* Filters are controls, not a hero block. */
.today-new-summary-toolbar,
.today-new-entity-toolbar,
.purchase-filterbar {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-color: var(--exec-line);
  border-radius: var(--exec-radius);
  background: rgba(255,255,255,.78);
}
.today-new-summary-toolbar .card-hd,
.today-new-entity-toolbar .card-hd { display: none; }
.tn-filter-grid {
  display: flex;
  align-items: end;
  gap: 6px;
  flex-wrap: wrap;
}
.tn-filter-grid > * { flex: 0 1 150px; }
.tn-filter-grid > .tn-filter-search,
.tn-filter-grid > .fl:has(input[type="search"]) { flex: 1 1 250px; }
.tn-filter-grid > .tn-filter-periods { flex: 0 1 auto; }
.tn-filter-grid > .tn-filter-actions { flex: 0 0 auto; flex-wrap: wrap; }
.tn-filter-grid > .fl { min-width: 0; }
.tn-filter-grid > .fl select { width: 100%; min-width: 0; }
.tn-filter-grid .btn, .tn-filter-grid button { min-height: 32px; }
.tn-custom-date.is-hidden { display: none; }
.tns-summary-controls {
  display: flex;
  align-items: end;
  gap: 6px;
  flex-wrap: wrap;
}
.tns-summary-controls > * { flex: 0 1 150px; }
.tns-summary-controls > .tns-period-seg { flex: 0 1 auto; }
.tns-summary-controls > .tns-grow { flex: 1 1 250px; }
.tns-summary-controls > .btn { flex: 0 0 auto; min-height: 32px; }
.fl > span, .lbl, .meta { color: var(--exec-muted); }
input, select, textarea, .btn { min-height: 32px; border-radius: 7px; }
.btn-primary { background: var(--exec-accent); }
.kpi-grid,
.purchase-command-kpis{
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.kpi-card,
.home-tile,
.purchase-command-kpi{
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--exec-line);
  border-radius: var(--exec-radius);
  background: var(--exec-paper);
}
.kpi-card::before, .kpi-card::after { display: none; }
.kpi-card .big, .home-tile .ht-value, .purchase-command-kpi b {
  margin-top: 7px;
  font-size: clamp(23px, 1.8vw, 31px);
  line-height: 1;
}
.kpi-card .sub { margin-top: 7px; font-size: 12px; }
.card,
.ui-card-soft,
.purchase-screen-intro,
.purchase-decision-strip{
  border-color: var(--exec-line);
  border-radius: var(--exec-radius);
  box-shadow: none;
}
.card-pad-lg { padding: 14px 16px; }
.card + .card { margin-top: 10px; }
.grid-2 { gap: 10px; }
.dt-wrap,
.table-wrap{ border-radius: 8px; }
.dt th, .purchase-new-view th {
  padding: 9px 11px;
  color: #738089;
  background: #f5f7f8;
  font-size: 12px;
  letter-spacing: .065em;
}
.dt td, .purchase-new-view td { padding: 7px 10px; border-color: #edf0f2; }
.dt tbody tr:hover td { background: #f7faf9; }
.purchase-screen-intro { padding: 12px 15px; }
.workspace-launchers { gap: 10px; }
.workspace-launcher { min-height: 86px; border-color: var(--exec-line); box-shadow: none; }

/* One visual language across legacy presenters that still serve unique data. */
.content-grid { gap: 10px; }
.section-head { margin-bottom: 10px; }
.section-head h2 { font-size: clamp(21px, 2vw, 28px); letter-spacing: -.035em; }
.section-head .eyebrow { margin-bottom: 4px; }
.ui-soft-panel, .ui-card-soft { box-shadow: none !important; }
.toolbar,
.filters,
.filter-bar{
  gap: 7px;
  padding: 8px 10px;
  border-color: var(--exec-line);
  border-radius: var(--exec-radius);
  background: rgba(255,255,255,.76);
}
.toolbar .muted, .filters .muted, .filter-bar .muted { display: none; }
.ws-top,
.topbar{
  min-width: 0;
}
.table-wrap,
.dt-wrap,
.card:has(> table){
  max-width: 100%;
  overflow-x: auto;
}

.view--master-merge .dup-group { overflow: hidden; }
.view--master-merge .dup-group .card-hd { margin: 0; border-bottom: 1px solid var(--exec-line); }
.view--master-merge .dup-group .card-actions {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid var(--exec-line);
}
.view--master-merge .dt { min-width: 1080px; }
.today-new-view .kpi-grid.tn-command-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.customers-new-view #customersNewRoot .kpi-grid.customer-command-kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tn-command-kpis .kpi-card, .customer-command-kpis .kpi-card { min-width: 0; }
.brief-section .sh.graph360-head { flex-direction: row; align-items: flex-start; justify-content: space-between; }
.graph360-search { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(320px, 2fr) auto; align-items: end; gap: 10px; }
.graph360-search > .fl { min-width: 0; }
.graph360-search .fl > span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.graph360-search input, .graph360-search select { width: 100%; }
.graph360-search .btn-primary { min-height: 36px; padding-inline: 18px; white-space: nowrap; }
.graph360-body { margin-top: 10px; min-height: 132px; }
.graph360-empty { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.graph360-empty b { font-size: 16px; }
.graph360-empty p { margin: 5px 0 0; max-width: 70ch; color: var(--exec-muted); }
.graph360-empty nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.progressive-section { padding: 0; overflow: clip; }
.progressive-section > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 54px; padding: 11px 14px; cursor: pointer; list-style: none;
}
.progressive-section > summary::-webkit-details-marker { display: none; }
.progressive-section > summary span:first-child { display: grid; gap: 3px; }
.progressive-section > summary b { font-size: 14px; }
.progressive-section > summary small { color: var(--exec-muted); font-size: 12px; }
.progressive-section-action { color: var(--exec-accent); font-size: 12px; font-weight: 700; }
.progressive-section[open] .progressive-section-action::before { content: "Скрыть"; }
.progressive-section[open] .progressive-section-action { font-size: 0; }
.progressive-section[open] .progressive-section-action::before { font-size: 12px; }
.progressive-section-body { padding: 0 12px 12px; border-top: 1px solid var(--exec-line); }
.progressive-section-body > .card { margin-top: 12px; }
.actualization-context-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.actualization-context-strip a {
  display: grid; grid-template-columns: auto max-content; gap: 3px 12px; align-items: baseline;
  padding: 10px 13px; color: inherit; text-decoration: none; background: var(--exec-paper);
  border: 1px solid var(--exec-line); border-radius: var(--exec-radius);
}
.actualization-context-strip span { color: var(--exec-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.actualization-context-strip b { font-size: 18px; }
.actualization-context-strip small { grid-column: 1 / -1; color: var(--exec-muted); }
.classification-core-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.classification-dimension {
  flex: 1 1 calc(50% - 8px); min-width: 320px; padding: 11px 13px;
  border: 1px solid var(--exec-line); border-radius: var(--exec-radius); background: var(--exec-paper);
}
.classification-dimension-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.classification-dimension-head h3 { margin: 0; font-size: 14px; }
.classification-dimension-head span { color: var(--exec-muted); font-size: 12px; }
.classification-dimension .chips { gap: 5px; }
.classification-dimension .pill { font-size: 12px; }
.customers-new-view #customersNewRoot .cohort-primary-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customers-new-view #customersNewRoot .touches-primary-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.customers-new-view #customersNewRoot .overview-primary-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-metric-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.compact-metric {
  flex: 1 1 190px; display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 3px 12px;
  align-items: baseline; padding: 9px 12px; color: inherit; text-decoration: none;
  border: 1px solid var(--exec-line); border-radius: var(--exec-radius); background: var(--exec-paper);
}
.compact-metric span { color: var(--exec-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.compact-metric b { font-size: 17px; }
.compact-metric small { grid-column: 1 / -1; color: var(--exec-muted); }
@media (max-width: 1380px) {
  .today-new-view .kpi-grid.tn-command-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customers-new-view #customersNewRoot .kpi-grid.customer-command-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .today-new-view .kpi-grid.tn-command-kpis,
  .customers-new-view #customersNewRoot .kpi-grid.customer-command-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actualization-context-strip { grid-template-columns: 1fr; }
  .classification-dimension { min-width: 100%; }
  .graph360-search { grid-template-columns: 1fr; }
  .graph360-empty { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 1280px) {
  .app, .app.no-inbox { grid-template-columns: 210px minmax(0, 1fr); }
  .ws-body { padding-inline: 16px; }
}
@media (max-width: 1100px) {
  .app, .app.no-inbox { display: block; }
.kpi-grid,
.purchase-command-kpis{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
.kpi-grid,
.purchase-command-kpis{ grid-template-columns: 1fr; }
  .ws-body { padding: 12px 10px 78px; }
}

/* Dialog chrome stays reachable while long forms and records scroll. */
.manager-overlay { padding:20px; background:rgba(18,32,39,.32); backdrop-filter:blur(5px); }
.manager-overlay .manager-modal { padding:0; overflow:hidden; max-height:calc(100dvh - 40px); border:1px solid var(--exec-line); border-radius:14px; box-shadow:0 24px 70px rgba(18,32,39,.2); }
.manager-overlay .manager-modal-close { top:10px; right:12px; width:34px; height:34px; z-index:3; }
.manager-overlay #managerModalBody { overflow:auto; max-height:calc(100dvh - 42px); padding:22px; padding-top:50px; overscroll-behavior:contain; }
@media(max-width:620px) { .manager-overlay { padding:8px; } .manager-overlay .manager-modal { max-height:calc(100dvh - 16px); } .manager-overlay #managerModalBody { max-height:calc(100dvh - 18px); padding:48px 14px 16px; } }

/* Mail editors keep dialog actions outside the long field scroll region. */
.mailings-workspace dialog.record-editor-dialog[open] { display:flex; flex-direction:column; max-height:calc(100dvh - 32px); padding:0; overflow:hidden; }
.mailings-workspace .record-editor-dialog > .dialog-heading { flex:none; margin:0; padding:16px 18px; border-bottom:1px solid var(--line); }
.mailings-workspace .record-editor-dialog > .notice { flex:none; margin:10px 18px; }
.mailings-workspace .record-editor-dialog > form { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; padding:0 18px; }
.mailings-workspace .record-editor-dialog > form > label { flex:none; }
.mailings-workspace .record-editor-dialog > form > :is(.mailing-editor-layout,.segment-editor-filters) { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:4px 2px 12px; }
.mailings-workspace .record-editor-dialog > form > .editor-actions { flex:none; margin:0; padding:12px 0; border-top:1px solid var(--line); background:var(--surface,#fff); }
@media(max-width:680px) { .mailings-workspace dialog.record-editor-dialog[open] { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); } .mailings-workspace .record-editor-dialog > .dialog-heading { padding:12px; } .mailings-workspace .record-editor-dialog > .notice { margin:8px 12px; } .mailings-workspace .record-editor-dialog > form { padding:0 12px; } }

/* Effect source totals: keep the native table controls within the modal width. */
.tns-effect-summary .dt-enhancer-main { flex-wrap:wrap; min-width:0; }
.tns-effect-summary .dt-enhancer-search { flex:1 1 220px; min-width:0; max-width:100%; grid-template-columns:auto minmax(0,1fr); }
.tns-effect-summary .dt-enhancer-toolbar, .tns-effect-summary .dt-enhancer-main, .tns-effect-summary .dt-enhancer-controls { max-width:100%; box-sizing:border-box; }
