/* =============================================================
   SupportHub — Dashboard, Dialog showcase, Preset showcase chrome
   ============================================================= */

/* ---------- Widget builder ---------- */
.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 384px;
  gap: clamp(32px, 5vw, 56px);
  align-items: stretch;
  margin-top: 48px;
}
.builder > * { min-width: 0; }
.builder__controls {
  display: flex; flex-direction: column; gap: 22px;
  padding: 24px; border: 1px solid var(--stroke); border-radius: var(--r-card);
  background: linear-gradient(180deg, var(--hairline-top), transparent 50%), var(--bg-elev);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--hairline-top);
}
.ctl__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 11px; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.preset-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px 9px 10px;
  border: 1px solid var(--stroke-strong); border-radius: var(--r-pill); background: var(--bg-elev-2);
  font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; transition: all 0.18s var(--ease);
}
.preset-chip:hover { border-color: var(--text-dim); background: var(--bg-hover); }
.preset-chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--text); box-shadow: 0 0 0 1px var(--brand) inset; }
.preset-chip__swatch { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--stroke-strong); }
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer; display: grid; place-items: center;
  border: 2px solid transparent; box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255,255,255,0.12) inset; color: #fff; transition: transform 0.16s var(--ease);
}
.swatch svg { opacity: 0; transform: scale(0.5); transition: all 0.16s var(--ease); filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: var(--shadow-md), 0 0 0 3px var(--brand-soft); }
.swatch[aria-pressed="true"] svg { opacity: 1; transform: none; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--stroke); border-radius: var(--r-pill); background: var(--bg); }
.seg__btn { padding: 8px 15px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.16s var(--ease); }
.seg__btn:hover:not([aria-pressed="true"]) { color: var(--text); background: var(--bg-hover); }
.seg__btn[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: 0 2px 8px var(--brand-glow); }
.seg__btn[aria-pressed="true"] svg { opacity: 1; }
.ctl--toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tgl {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 13px 15px; border: 1px solid var(--stroke); border-radius: var(--r-card-sm); background: var(--bg-elev-2);
  transition: border-color 0.18s var(--ease);
}
.tgl[aria-pressed="true"] { border-color: rgba(82,119,226,0.5); background: var(--brand-soft); }
.tgl__switch { flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--bg-hover); position: relative; transition: background 0.18s var(--ease); }
.tgl__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-dim); transition: all 0.18s var(--ease); }
.tgl[aria-pressed="true"] .tgl__switch { background: var(--brand); }
.tgl[aria-pressed="true"] .tgl__switch::after { left: 19px; background: #fff; }
.tgl b { display: block; font-size: 13.5px; font-weight: 540; letter-spacing: -0.01em; }
.tgl small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.builder__features { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 18px; border-top: 1px solid var(--stroke); }
.builder__features span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); }
.builder__features svg { color: var(--ok); }
.preset-stage { display: flex; justify-content: center; align-items: center; position: relative; }
/* симметрия: виджет тянется в высоту левой панели настроек; в развёрнутом виде — потолок, чтобы не растягивался безмерно */
.preset-stage .widget { height: 100%; max-height: 760px; }
.preset-stage::after { content:""; position: absolute; inset: -10%; z-index: -1; background: radial-gradient(closest-side, var(--brand-glow), transparent 72%); opacity: 0.5; filter: blur(24px); }
.seg--wrap { display: inline-flex; flex-wrap: wrap; max-width: 100%; }
.seg__btn { display: inline-flex; align-items: center; gap: 6px; }
.seg__btn svg { opacity: 0.8; }

/* ---------- Expand toggle ---------- */
.builder__expand {
  display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
  padding: 11px 16px; border: 1px dashed var(--stroke-strong); border-radius: var(--r-pill);
  background: var(--bg-elev-2); color: var(--text); font-size: 13.5px; font-weight: 540;
  cursor: pointer; transition: all 0.18s var(--ease);
}
.builder__expand:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.builder__expand svg { color: var(--text-muted); }
.builder__expand:hover svg { color: var(--brand); }
.rot180 { transform: rotate(180deg); }

/* ---------- Advanced panel ---------- */
.builder__advanced {
  display: flex; flex-direction: column; gap: 22px;
  padding-top: 22px; border-top: 1px solid var(--stroke);
  animation: adv-in 0.34s var(--ease) both;
}
@keyframes adv-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* text fields */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field span { font-size: 12px; color: var(--text-muted); }
.field input {
  width: 100%; padding: 10px 13px; font-size: 13.5px; color: var(--text);
  background: var(--bg-elev-2); border: 1px solid var(--stroke); border-radius: var(--r-card-sm);
  outline: none; transition: border-color 0.16s var(--ease);
}
.field input:focus { border-color: var(--brand); }

/* avatar picker */
.ava-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ava {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 16px; font-weight: 600; cursor: pointer; border: 2px solid transparent;
  background: var(--bg-elev-2); transition: all 0.16s var(--ease);
}
.ava--emoji { font-size: 20px; }
.ava:hover { transform: translateY(-2px); }
.ava[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* sub-control row */
.subctl { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.subctl:first-of-type { margin-top: 0; }
.subctl__cap { font-size: 12.5px; color: var(--text-muted); min-width: 92px; }

/* quick-reply chip editor */
.chip-editor { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px 7px 13px;
  border: 1px solid var(--stroke); border-radius: var(--r-pill); background: var(--bg-elev-2);
  font-size: 13px; color: var(--text);
}
.qr-chip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--text-dim); cursor: pointer; transition: all 0.15s var(--ease); }
.qr-chip button:hover { background: var(--danger, #e2638d); color: #fff; }
.qr-add { display: inline-flex; align-items: center; border: 1px dashed var(--stroke-strong); border-radius: var(--r-pill); padding: 2px 2px 2px 12px; }
.qr-add input { width: 120px; border: none; background: transparent; color: var(--text); font-size: 13px; outline: none; padding: 6px 0; }
.qr-add button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; cursor: pointer; }

/* contact picker */
.contact-pick {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
  border: 1px solid var(--stroke); border-radius: var(--r-pill); background: var(--bg-elev-2);
  font-size: 13px; color: var(--text); cursor: pointer; transition: all 0.16s var(--ease);
}
.contact-pick svg { color: var(--text-muted); }
.contact-pick[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.contact-pick[aria-pressed="true"] svg { color: var(--brand); }

/* 3-up toggles grid */
.ctl--toggles-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* launcher preview */
.launcher-demo-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--stroke); }
.launcher-demo__cap { font-size: 12px; color: var(--text-muted); }
.launcher-demo {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px;
  border-radius: var(--r-pill); font-weight: 540; font-size: 14.5px; cursor: pointer;
  box-shadow: var(--shadow-md);
}
.launcher-demo__icon { display: grid; place-items: center; }
.launcher-demo.is-pulse { position: relative; }
.launcher-demo.is-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 var(--brand); opacity: 0.5;
  animation: launch-pulse 2.2s var(--ease) infinite;
}
@keyframes launch-pulse {
  0% { box-shadow: 0 0 0 0 var(--brand-soft); opacity: 0.6; }
  70%, 100% { box-shadow: 0 0 0 12px transparent; opacity: 0; }
}

@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .preset-stage { order: -1; }
  .preset-stage .widget { height: 560px; max-height: none; }
  .ctl--toggles { grid-template-columns: 1fr; }
  .ctl--toggles-3 { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
}

/* ---------- Dashboard ---------- */
.dash {
  margin: 48px auto 0;
  max-width: 1080px;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(82,119,226,0.10), transparent 70%),
    var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.dash__bar { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--stroke); }
.dash__bar .dots { display: flex; gap: 6px; }
.dash__bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-elev-2); display: block; }
.dash__bar h4 { font-size: 14px; font-weight: 540; letter-spacing: -0.01em; margin-left: 6px; }
.dash__bar .dash__live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }
.dash__bar .dash__live::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 1.6s infinite; }
.dash__body { padding: clamp(18px, 2.5vw, 28px); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 14px; }
.kpi { padding: 20px; border: 1px solid var(--stroke); border-radius: var(--r-card-sm); background: var(--bg-elev-2); position: relative; }
.kpi--north { background: linear-gradient(150deg, var(--brand-soft), transparent 70%), var(--bg-elev-2); border-color: rgba(82,119,226,0.3); }
.kpi__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-dim); text-transform: uppercase; }
.kpi__value { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 600; letter-spacing: -0.03em; margin-top: 10px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi--north .kpi__value { font-size: clamp(2rem, 3.4vw, 3rem); color: var(--text); }
.kpi--north .kpi__value b { color: var(--brand-bright); font-weight: 600; }
.kpi__hint { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; }
.kpi__spark { position: absolute; right: 16px; top: 16px; color: var(--brand); opacity: 0.5; }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi--north { grid-column: span 2; } }

/* charts row */
.dash__charts { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; margin-top: 14px; }
.dash-panel { padding: 20px; border: 1px solid var(--stroke); border-radius: var(--r-card-sm); background: var(--bg-elev-2); min-width: 0; }
.dash-panel__title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-dim); text-transform: uppercase; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.dash-panel__title b { color: var(--text); font-size: 13px; font-family: var(--font-sans); letter-spacing: -0.01em; }
.dash__charts--b { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .dash__charts { grid-template-columns: 1fr; } }

/* Диспуты */
.dispute-stat__big { padding-bottom: 14px; border-bottom: 1px solid var(--stroke); margin-bottom: 14px; }
.dispute-stat__big b { display: block; font-size: 1.7rem; font-weight: 680; letter-spacing: -0.03em; color: var(--ok); line-height: 1; }
.dispute-stat__big span { display: block; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.dispute-stat__row { display: grid; gap: 9px; }
.dispute-stat__row span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.dispute-stat__row b { margin-left: auto; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.dispute-stat__row i { width: 8px; height: 8px; border-radius: 50%; }
.dispute-stat__row span[data-tone="ok"] i { background: var(--ok); }
.dispute-stat__row span[data-tone="warn"] i { background: var(--warn); }
.dispute-stat__row span[data-tone="lost"] i { background: var(--danger); }

/* Мониторинг */
.mon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mon-cell { padding: 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--stroke); }
.mon-cell__val { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mon-cell__val[data-tone="ok"] { color: var(--ok); }
.mon-cell__lbl { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
@media (max-width: 900px) { .dash__charts--b { grid-template-columns: 1fr; } }

/* line chart */
.linechart { width: 100%; height: 130px; }
.linechart .area { fill: url(#area-grad); }
.linechart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.linechart .dot { fill: var(--brand-bright); transform-box: fill-box; transform-origin: center; will-change: transform, opacity; }
/* пульс-кольцо на последней точке */
.lc-pulse { fill: none; stroke: var(--brand-bright); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: lc-pulse 2.4s ease-out infinite; }
@keyframes lc-pulse {
  0% { transform: scale(0.5); opacity: 0.7; }
  70%, 100% { transform: scale(3.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .linechart .line, .linechart .area, .linechart .dot { transition: none !important; }
  .lc-pulse { display: none; }
}
.line-days { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { flex: none; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.donut-legend span { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.donut-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.donut-legend b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 11.5px; }

/* topic bars */
.tbar { margin-bottom: 13px; }
.tbar:last-child { margin-bottom: 0; }
.tbar__top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.tbar__top span { color: var(--text-muted); }
.tbar__top b { color: var(--text); font-family: var(--font-mono); font-size: 12px; }
.tbar__track { height: 7px; border-radius: 4px; background: var(--bg-hover); overflow: hidden; }
.tbar__fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand-deep), var(--brand-bright)); width: 0; transition: width 1s var(--ease-out); }

/* AI health */
.aihealth { margin-top: 14px; padding: 20px; border: 1px solid var(--stroke); border-radius: var(--r-card-sm); background: var(--bg-elev-2); }
.aihealth__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 16px; }
.aihealth__cell { padding: 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--stroke); }
.aihealth__val { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.aihealth__val[data-tone="ok"] { color: var(--ok); }
.aihealth__val[data-tone="warn"] { color: var(--warn); }
.aihealth__lbl { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.35; }
.aihealth__sub { font-size: 10.5px; color: var(--text-dim); margin-top: 4px; font-family: var(--font-mono); }
.aihealth__gaps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.aihealth__gaps span { font-size: 10.5px; font-family: var(--font-mono); padding: 2px 7px; border-radius: 5px; background: var(--warn-soft); color: var(--warn); }
@media (max-width: 900px) { .aihealth__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Dialog showcase ---------- */
.showcase {
  min-width: 0;
  margin-top: 50px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.showcase > * { min-width: 0; }
.showcase__tabs { min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 8px; }
.showcase-tab {
  display: flex; align-items: center; gap: 13px; text-align: left;
  min-height: 70px; padding: 14px 16px; border-radius: var(--r-card-sm);
  border: 1px solid var(--stroke); background: var(--bg-elev); cursor: pointer;
  transition: border-color 0.2s, background 0.2s; width: 100%;
}
.showcase-tab:hover { border-color: var(--stroke-strong); }
.showcase-tab[aria-selected="true"] { border-color: var(--brand); background: linear-gradient(90deg, var(--brand-soft), transparent); }
.showcase-tab__icon { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--bg-elev-2); color: var(--brand-bright); }
.showcase-tab[aria-selected="true"] .showcase-tab__icon { background: var(--brand); color: #fff; }
.showcase-tab__name { display: block; font-weight: 540; font-size: 15px; letter-spacing: -0.01em; }
.showcase-tab__desc { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.showcase__stage { background: var(--bg-elev); border: 1px solid var(--stroke); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-md); }
.showcase__chatbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--stroke); background: var(--bg-elev-2); }
.showcase__chatbar .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; }
.showcase__chatbar h4 { font-size: 14px; }
.showcase__chatbar small { color: var(--text-dim); font-size: 12px; font-family: var(--font-mono); }
.showcase__replay { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); background: var(--bg); border: 1px solid var(--stroke); padding: 7px 13px; border-radius: var(--r-pill); cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.showcase__replay:hover { color: var(--text); border-color: var(--stroke-strong); }
.showcase__feed { padding: 22px; min-height: 380px; max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; }
/* dark-theme chat bubbles inside showcase */
.showcase__feed .msg--bot .msg__bubble { background: var(--bg-elev-2); border: 1px solid var(--stroke); color: var(--text); border-bottom-left-radius: 5px; }
.showcase__feed .msg--user .msg__bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.showcase__feed .msg__bubble { padding: 11px 14px; border-radius: 14px; font-size: 15px; line-height: 1.5; }
.showcase__feed .msg { max-width: 78%; }
.showcase__feed .toolcard { background: var(--bg); border-color: var(--stroke); }
.showcase__feed .toolcard__label { color: var(--text); }
.showcase__feed .srcbadge { background: var(--bg); border-color: var(--stroke); color: var(--text-muted); }
.showcase__feed .notice--warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(224,162,60,0.3); }
.showcase__feed .notice--human { background: var(--brand-soft); color: var(--brand-bright); border-color: rgba(82,119,226,0.3); }
.showcase__feed .typing { background: var(--bg-elev-2); border: 1px solid var(--stroke); }
.showcase__feed .typing span { background: var(--text-dim); }
/* ---- Радар возможностей ---- */
.radar-head { text-align: center; margin-top: 56px; }
.radar-head__title {
  font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.2; letter-spacing: -0.02em;
  margin: 10px auto 0; max-width: 560px; font-weight: 600;
}
.radar-wrap {
  position: relative; margin-top: 28px;
  height: 380px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(20px, 4vh, 40px);
  border: 1px solid var(--stroke); border-radius: var(--r-card);
  background:
    radial-gradient(120% 90% at 50% 108%, rgba(82,119,226,0.16), transparent 58%),
    var(--bg-elev);
}
.radar-row { position: relative; z-index: 50; display: flex; align-items: center; justify-content: center; }
.radar-row--0 { gap: clamp(40px, 20vw, 300px); }
.radar-row--1 { gap: clamp(36px, 13vw, 200px); }
.radar-row--2 { gap: clamp(40px, 12vw, 170px); }
.radar-ic {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  /* по умолчанию скрыты; JS выставит каждой иконке свою задержку под луч.
     fallback-анимация на случай, если JS не отработал. */
  opacity: 0; animation: radar-pop 0.76s var(--ease-out) 2.6s both, radar-float 5s ease-in-out 3.36s infinite;
}
.radar-ic__tile {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  color: var(--brand-bright); background: var(--bg-elev-2);
  border: 1px solid var(--stroke-strong);
  box-shadow: inset 0 1px 0 var(--hairline-top), 0 10px 24px rgba(0,0,0,0.35);
}
.radar-ic small { font-size: 12.5px; font-weight: 540; color: var(--text-muted); white-space: nowrap; }
@keyframes radar-pop {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
/* «парение» иконок после появления — мягкое колебание по вертикали */
@keyframes radar-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.radar {
  position: absolute; left: 50%; bottom: -64px; transform: translateX(-50%);
  width: 80px; height: 80px; display: grid; place-items: center; z-index: 1;
}
.radar__ring {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border-style: solid; border-width: 1px;
}
.radar__sweep {
  position: absolute; right: 50%; top: 50%; height: 5px; width: 440px;
  transform-origin: right center; z-index: 40; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  animation: radar-spin 13s linear infinite;
}
.radar__sweep span {
  display: block; height: 1.5px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--brand-bright) 75%, var(--brand-bright));
}
@keyframes radar-spin { from { transform: rotate(12deg); } to { transform: rotate(372deg); } }
.radar-baseline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px; z-index: 41;
  background: linear-gradient(90deg, transparent, var(--stroke-strong), transparent);
}
@media (prefers-reduced-motion: reduce) {
  .radar__sweep { animation: none; opacity: 0.5; }
  .radar-ic { animation: none; opacity: 1; }
}
@media (max-width: 820px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase__tabs {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
  }
  .showcase-tab { flex: 0 0 200px; scroll-snap-align: start; }
  .showcase-tab__desc { display: none; }
  .radar-wrap { height: 340px; }
  .radar-ic__tile { width: 50px; height: 50px; }
  .radar-ic small { font-size: 11px; }
}

/* =============================================================
   AdminPeek — рабочее место оператора живой вёрсткой (light surface)
   ============================================================= */
.app-window--wide { max-width: 1120px; }

.desk { background: var(--light-bg); color: var(--light-text); font-size: 13px; }
.desk__top { display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--light-stroke); background: var(--light-bg-2); }
.desk__brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.desk__nav { display: flex; gap: 20px; font-size: 13.5px; color: var(--light-muted); }
.desk__nav span { display: inline-flex; align-items: center; gap: 6px; }
.desk__nav .is-active { color: var(--light-text); font-weight: 540; }
.desk__nav b { color: var(--brand); font-weight: 600; }
.desk__top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.desk__status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--light-muted); }
.desk__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.desk__icon-btn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--light-muted); }
.desk__me { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 540; }

.desk__grid { display: grid; grid-template-columns: 248px minmax(0, 1fr) 290px; height: 560px; }
.desk__grid > * { min-width: 0; }

/* Аватары */
.desk-av { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.inbox__ch { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1.5px var(--light-bg-2); }
.desk-av--1 { background: #FDE5E2; color: #C0413B; }
.desk-av--2 { background: #E7DEF8; color: #6B3FB0; }
.desk-av--3 { background: #DFF0E7; color: #2E8B57; }
.desk-av--4 { background: #E4ECFC; color: #3A57B8; }
.desk-av--5 { background: #FBEAD6; color: #B5722A; }
.desk-av--6 { background: #E2EAF6; color: #42566F; }

/* Очередь */
.desk__inbox { border-right: 1px solid var(--light-stroke); background: var(--light-bg-2); display: flex; flex-direction: column; }
.inbox__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.inbox__head h4 { font-size: 17px; font-weight: 600; }
.inbox__head svg { color: var(--light-muted); }
.inbox__search { margin: 0 14px 12px; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--light-stroke); border-radius: 10px; color: var(--light-muted); font-size: 12.5px; background: var(--light-bg); }
.inbox__search kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 5px; background: #fff; border: 1px solid var(--light-stroke); }
.inbox__tabs { display: flex; gap: 7px; padding: 0 14px 12px; font-size: 12.5px; }
.inbox__tabs span { display: inline-flex; gap: 5px; padding: 5px 10px; border-radius: 999px; color: var(--light-muted); }
.inbox__tabs .is-active { background: var(--brand-soft); color: var(--brand); font-weight: 540; }
.inbox__tabs b { font-weight: 600; }
.inbox__list { flex: 1; overflow: hidden; }
.inbox__item { display: flex; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--light-stroke); cursor: pointer; transition: background 0.15s; }
.inbox__item:hover { background: var(--light-bg); }
.inbox__item.is-active { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.inbox__body { flex: 1; min-width: 0; }
.inbox__row1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.inbox__row1 b { font-size: 13.5px; font-weight: 540; }
.inbox__time { font-size: 11px; color: var(--light-muted); flex: none; }
.inbox__row2 { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.inbox__prev { font-size: 12.5px; color: var(--light-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.inbox__badge { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.inbox__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.inbox__typing { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--brand); font-style: italic; }
.inbox__typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); animation: typedot 1s infinite; }
.inbox__typing i:nth-child(2) { animation-delay: 0.15s; }
.inbox__typing i:nth-child(3) { animation-delay: 0.3s; }

/* Диалог */
.desk__chat { display: flex; flex-direction: column; background: var(--light-bg); }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--light-stroke); background: var(--light-bg-2); }
.chat__who b { font-size: 15px; font-weight: 600; display: block; }
.chat__who small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--light-muted); margin-top: 2px; }
.chat__live { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.chat__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chat__close { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--light-stroke); background: #fff; color: var(--light-text); font-size: 13px; font-weight: 540; cursor: pointer; }
.chat__feed { flex: 1; overflow: hidden; padding: 18px 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.chat__day { align-self: center; font-size: 11.5px; color: var(--light-muted); margin-bottom: 4px; }
.chat__sys { align-self: center; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--brand); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; }

/* Светлые баблы чата (desk + mkt) */
.desk .msg, .mkt .msg { max-width: 78%; }
.desk .msg--bot, .mkt .msg--bot { align-self: flex-start; }
.desk .msg--user, .mkt .msg--user { align-self: flex-end; }
.desk .msg__bubble, .mkt .msg__bubble { padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.desk .msg--bot .msg__bubble, .mkt .msg--bot .msg__bubble { background: #fff; border: 1px solid var(--light-stroke); color: var(--light-text); border-bottom-left-radius: 5px; }
.desk .msg--user .msg__bubble, .mkt .msg--user .msg__bubble { background: #E8EDFB; color: #1F2840; border-bottom-right-radius: 5px; }
.msg__t { display: block; font-size: 10.5px; margin-top: 5px; opacity: 0.55; }
.typing--desk { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--light-stroke); border-radius: 14px; border-bottom-left-radius: 5px; }
.typing--desk span { width: 6px; height: 6px; border-radius: 50%; background: var(--light-muted); opacity: 0.5; animation: typedot 1s infinite; }
.typing--desk span:nth-child(2) { animation-delay: 0.15s; }
.typing--desk span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typedot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Карточка клиента */
.desk__client { border-left: 1px solid var(--light-stroke); background: var(--light-bg-2); padding: 18px 16px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.client__top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.client__av { width: 58px; height: 58px; font-size: 19px; margin-bottom: 4px; }
.client__name { font-size: 16px; font-weight: 600; }
.client__handle { font-size: 12.5px; color: var(--brand); }
.client__since { font-size: 11.5px; color: var(--light-muted); }
.client__tags { display: flex; gap: 6px; margin-top: 6px; }
.client__tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--light-bg); border: 1px solid var(--light-stroke); color: var(--light-muted); }
.client__tag--vip { background: var(--warn-soft); color: #9A6B1A; border-color: transparent; font-weight: 600; }
.draft { border: 1px solid rgba(82, 119, 226, 0.28); background: linear-gradient(180deg, var(--brand-soft), transparent); border-radius: 12px; padding: 12px; }
.draft__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.draft__head span { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-weight: 600; letter-spacing: 0.02em; }
.draft__head b { color: var(--light-muted); font-weight: 540; }
.draft__text { font-size: 12.5px; line-height: 1.5; color: var(--light-text); margin: 9px 0 11px; }
.draft__actions { display: flex; gap: 7px; }
.draft__accept { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 540; border: none; cursor: pointer; }
.draft__edit, .draft__reject { padding: 8px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--light-stroke); color: var(--light-muted); font-size: 12.5px; cursor: pointer; }
.client__label { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--light-muted); margin-bottom: 6px; }
.client__field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.client__field span { display: inline-flex; align-items: center; gap: 7px; color: var(--light-muted); }
.client__field b { font-weight: 540; }
.client__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.client__stats div { background: var(--light-bg); border: 1px solid var(--light-stroke); border-radius: 10px; padding: 11px 12px; }
.client__stats b { font-size: 20px; font-weight: 600; display: block; }
.client__stats span { font-size: 11px; color: var(--light-muted); line-height: 1.3; display: block; margin-top: 2px; }
.client__hist { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid var(--light-stroke); border-radius: 10px; background: var(--light-bg); }
.client__hist > span { position: relative; padding-left: 14px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.client__hist > span i { position: absolute; left: 0; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.client__hist small { color: var(--light-muted); font-size: 10.5px; }
.client__hist svg { color: var(--light-muted); flex: none; }

@media (max-width: 1080px) { .desk__grid { grid-template-columns: 240px minmax(0, 1fr); } .desk__client { display: none; } }
@media (max-width: 760px) { .desk__grid { grid-template-columns: 1fr; height: auto; } .desk__inbox, .desk__nav { display: none; } .chat__feed { min-height: 420px; } }

/* =============================================================
   Marketing engine — диалог → касса (light surface, анимировано)
   ============================================================= */
.mkt { background: var(--light-bg); color: var(--light-text); display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.05fr); align-items: stretch; min-height: 480px; }
.mkt > * { min-width: 0; }
.mkt__chat { display: flex; flex-direction: column; border-right: 1px solid var(--light-stroke); background: var(--light-bg-2); }
.mkt__chatbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--light-stroke); }
.mkt__chatbar .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.mkt__chatbar h4 { font-size: 14px; font-weight: 600; }
.mkt__chatbar small { font-size: 11.5px; color: var(--light-muted); font-family: var(--font-mono); }
.mkt__feed { flex: 1; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; overflow: hidden; }
.mkt-pitch { align-self: flex-start; max-width: 90%; border: 1px solid rgba(82, 119, 226, 0.32); background: linear-gradient(180deg, var(--brand-soft), rgba(82, 119, 226, 0.04)); border-radius: 14px; border-bottom-left-radius: 5px; padding: 9px 12px 11px; opacity: 0; transform: translateY(8px); animation: pitchIn 0.45s var(--ease-out) forwards; }
.mkt-pitch.is-on { box-shadow: 0 0 0 3px var(--brand-soft); }
.mkt-pitch__tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
.mkt-pitch .msg__bubble { background: transparent; border: none; padding: 0; font-size: 13.5px; line-height: 1.5; color: var(--light-text); }
@keyframes pitchIn { to { opacity: 1; transform: none; } }

.mkt__flow { position: relative; display: flex; align-items: center; justify-content: center; }
.mkt__flow-line { position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; transform: translateY(-50%); background-image: linear-gradient(90deg, var(--brand) 45%, transparent 0); background-size: 9px 2px; background-repeat: repeat-x; opacity: 0.5; animation: flowmove 0.9s linear infinite; }
.mkt__flow-ic { position: relative; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--light-stroke); display: grid; place-items: center; color: var(--brand); box-shadow: 0 4px 14px rgba(82, 119, 226, 0.2); }
.mkt__chip { position: absolute; z-index: 3; top: 50%; left: 50%; white-space: nowrap; padding: 6px 11px; border-radius: 999px; background: var(--ok); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 6px 16px rgba(63, 179, 127, 0.45); animation: chipFly 1.85s var(--ease-out) forwards; }
@keyframes flowmove { to { background-position: 9px 0; } }
@keyframes chipFly { 0% { opacity: 0; transform: translate(-50%, 6px) scale(0.8); } 16% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 72% { opacity: 1; transform: translate(40%, -50%) scale(1); } 100% { opacity: 0; transform: translate(120%, -50%) scale(0.9); } }

.mkt__cash { padding: 18px; background: var(--light-bg); display: flex; flex-direction: column; gap: 12px; }
.mkt-kpi { border: 1px solid var(--light-stroke); border-radius: 12px; background: var(--light-bg-2); padding: 14px 16px; position: relative; }
.mkt-kpi--north { background: linear-gradient(135deg, var(--brand-soft), var(--light-bg-2)); border-color: rgba(82, 119, 226, 0.3); }
.mkt-kpi__spark { position: absolute; top: 12px; right: 12px; color: var(--brand); }
.mkt-kpi__label { font-size: 11.5px; color: var(--light-muted); }
.mkt-kpi__value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 4px; color: var(--light-text); }
.mkt-kpi--sm .mkt-kpi__value { font-size: 22px; font-weight: 600; }
.mkt-kpi__unit { font-size: 15px; margin-left: 1px; color: var(--light-muted); }
.mkt-kpi__hint { font-size: 11px; color: var(--light-muted); margin-top: 3px; }
.mkt-kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mkt-camps { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.mkt-camp { border: 1px solid var(--light-stroke); border-radius: 12px; background: var(--light-bg-2); padding: 12px 14px; transition: border-color 0.3s, box-shadow 0.3s; }
.mkt-camp.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mkt-camp__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mkt-camp__top b { font-size: 13px; font-weight: 540; }
.mkt-camp__tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); flex: none; }
.mkt-camp__bar { height: 6px; border-radius: 999px; background: var(--light-bg); margin: 9px 0 8px; overflow: hidden; }
.mkt-camp__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-bright), var(--brand)); transition: width 1.1s var(--ease-out); }
.mkt-camp__foot { display: flex; gap: 14px; font-size: 11.5px; color: var(--light-muted); }
.mkt-camp__foot b { color: var(--light-text); font-weight: 600; }

@media (max-width: 900px) { .mkt { grid-template-columns: 1fr; } .mkt__chat { border-right: none; border-bottom: 1px solid var(--light-stroke); } .mkt__flow { height: 52px; } .mkt__flow-line { left: 50%; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; background-image: linear-gradient(180deg, var(--brand) 45%, transparent 0); background-size: 2px 9px; background-repeat: repeat-y; } @keyframes chipFly { 0% { opacity: 0; transform: translate(-50%, -60%) scale(0.8); } 16% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 72% { opacity: 1; transform: translate(-50%, 10%) scale(1); } 100% { opacity: 0; transform: translate(-50%, 60%) scale(0.9); } } }
@media (prefers-reduced-motion: reduce) { .mkt__flow-line, .mkt-pitch, .inbox__typing i, .typing--desk span { animation: none; } .mkt-pitch { opacity: 1; transform: none; } }

/* ============ Диспуты и чарджбеки ============ */
.disputes-section { position: relative; overflow: hidden; }
.disputes__glow { width: 640px; height: 460px; top: 4%; right: 2%; left: auto; opacity: 0.3; }
.disputes-layout {
  margin-top: 44px;
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 44px); align-items: start;
}
/* карточка диспута */
.dispute-case {
  border: 1px solid var(--stroke-strong); border-radius: var(--r-card); overflow: hidden;
  background: radial-gradient(120% 80% at 0% 0%, var(--brand-soft), transparent 60%), var(--bg-elev);
  box-shadow: var(--shadow-md), var(--shadow-brand);
}
.dispute-case__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--stroke); }
.dispute-case__id { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--text-dim); }
.dispute-case__title { display: block; margin-top: 5px; font-size: 17px; letter-spacing: -0.015em; }
.dispute-case__deadline { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--warn); padding: 5px 10px; border-radius: var(--r-pill); background: var(--warn-soft); border: 1px solid rgba(224,162,60,0.3); }
.dispute-case__right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
/* нейтральная парящая иконка банка в углу карточки спора */
.bank-glyph {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  color: var(--text-muted); background: var(--bg-elev-2); border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 var(--hairline-top);
  animation: bank-float 4.6s ease-in-out infinite;
}
@keyframes bank-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .bank-glyph { animation: none; } }
.dispute-case__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--stroke); }
.dispute-case__fields > div { padding: 14px 18px; background: var(--bg-elev); }
.dispute-case__fields span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.dispute-case__fields b { display: block; margin-top: 5px; font-size: 14px; font-weight: 500; }
.dispute-case__fields b.is-progress { color: var(--warn); }
.dispute-case__evidence { padding: 16px 18px; border-top: 1px solid var(--stroke); }
.dispute-case__evidence small { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.dispute-case__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dispute-case__chips span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); padding: 6px 11px; border-radius: var(--r-pill); background: var(--ok-soft); border: 1px solid rgba(63,179,127,0.26); }
.dispute-case__chips svg { color: var(--ok); }
.dispute-case__draft { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--stroke); background: var(--brand-soft); }
.dispute-case__draft-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--brand-bright); }
.dispute-case__draft-by { font-size: 12px; color: var(--text-muted); }
/* пункты */
.disputes-points { display: grid; gap: 14px; }
.dispute-point {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  border: 1px solid var(--stroke); border-radius: var(--r-card);
  background: linear-gradient(180deg, var(--hairline-top), transparent 60%), var(--bg-elev);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--hairline-top);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.dispute-point:hover { transform: translateY(-3px); border-color: rgba(82,119,226,0.4); }
.dispute-point__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--brand-bright); background: var(--brand-soft); border: 1px solid rgba(82,119,226,0.24); }
.dispute-point h4 { font-size: 16px; letter-spacing: -0.015em; margin-bottom: 5px; }
.dispute-point p { font-size: 13.6px; line-height: 1.5; color: var(--text-muted); margin: 0; }
/* статы */
.disputes-stats { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.disputes-stats > div { padding: 18px 20px; border: 1px solid var(--stroke); border-radius: var(--r-card-sm); background: var(--bg-elev); }
.disputes-stats b { display: block; font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 680; letter-spacing: -0.03em; color: var(--brand-bright); line-height: 1; }
.disputes-stats span { display: block; margin-top: 7px; font-size: 12.5px; color: var(--text-muted); line-height: 1.35; }
@media (max-width: 900px) {
  .disputes-layout { grid-template-columns: 1fr; }
  .disputes-stats { grid-template-columns: 1fr 1fr; }
  .dispute-case__draft { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 480px) { .disputes-stats { grid-template-columns: 1fr; } .dispute-case__fields { grid-template-columns: 1fr; } }

/* ============ Agent core: 3D-робот + способности вокруг ============ */
.agent-core { position: relative; margin-top: 28px; min-height: 580px; display: grid; place-items: center; }
.agent-core__links { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 42% 46% at 50% 50%, transparent 0 38%, #000 60%);
          mask-image: radial-gradient(ellipse 42% 46% at 50% 50%, transparent 0 38%, #000 60%); }
.agent-core__link { animation: agent-flow 1.3s linear infinite; }
@keyframes agent-flow { to { stroke-dashoffset: -7.2; } }

.agent-core__stage { position: relative; z-index: 2; width: clamp(300px, 36vw, 470px); height: clamp(340px, 40vw, 480px); }
.robot-stage { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.robot-stage__halo {
  position: absolute; inset: -6% -4% -2%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle at 50% 56%, var(--brand-glow), transparent 70%);
  filter: blur(30px); opacity: 0.95;
}
.robot-stage__viewer {
  position: relative; z-index: 1; display: block; width: 100% !important; height: 100% !important;
  /* растушёвываем жёсткую прямоугольную границу сцены: робот по центру цел,
     фиолетовый фон по краям плавно уходит в прозрачность и сливается с фоном страницы */
  -webkit-mask-image:
    radial-gradient(116% 112% at 50% 42%, #000 46%, rgba(0,0,0,0.5) 72%, transparent 96%),
    linear-gradient(180deg, #000 56%, rgba(0,0,0,0.4) 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(116% 112% at 50% 42%, #000 46%, rgba(0,0,0,0.5) 72%, transparent 96%),
    linear-gradient(180deg, #000 56%, rgba(0,0,0,0.4) 82%, transparent 100%);
  mask-composite: intersect;
}
/* скрываем вотермарку Spline, если она экспонирована как ::part(logo) */
.robot-stage__viewer::part(logo) { display: none !important; opacity: 0 !important; pointer-events: none !important; }
/* Вотермарка Spline рендерится WebGL-пассом ПРЯМО НА CANVAS (logoOverlayPass) — это
   пиксели 3D-сцены, а не DOM-элемент, поэтому скрыть её через CSS/JS нельзя. Единственный
   способ — перекрыть. Заглушка в правом-нижнем углу, растушёвана под тёмный фон сцены. */
.robot-stage__wm {
  position: absolute; right: -6px; bottom: -6px; z-index: 2;
  width: min(64%, 290px); height: 124px;
  pointer-events: none;
  background: radial-gradient(120% 130% at 100% 100%, var(--bg) 54%, rgba(12,14,24,0.94) 70%, transparent 85%);
}
.robot-stage__spinner {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--stroke-strong); border-top-color: var(--brand-bright);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.agent-core__badges { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; white-space: nowrap; }
.agent-core__badges span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); padding: 5px 11px; border-radius: 999px; background: rgba(12,14,24,0.72); border: 1px solid var(--stroke); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.agent-core__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

.agent-ability {
  position: absolute; z-index: 3; width: clamp(190px, 17vw, 232px);
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px;
  border: 1px solid var(--stroke); border-radius: var(--r-card);
  background: linear-gradient(180deg, var(--hairline-top), transparent 60%), rgba(16,19,33,0.82);
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--hairline-top);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: ability-float 7s var(--ease) infinite;
}
.agent-ability:hover { border-color: rgba(82,119,226,0.45); }
.agent-ability__icon { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--brand-bright); background: var(--brand-soft); border: 1px solid rgba(82,119,226,0.24); }
.agent-ability b { display: block; font-size: 14px; letter-spacing: -0.01em; color: var(--text); }
.agent-ability small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
.agent-ability--tl { left: 0; top: 4%; animation-delay: 0s; }
.agent-ability--ml { left: 0; top: 40%; animation-delay: -1.4s; }
.agent-ability--bl { left: 0; bottom: 4%; animation-delay: -2.8s; }
.agent-ability--tr { right: 0; top: 4%; animation-delay: -0.7s; }
.agent-ability--mr { right: 0; top: 40%; animation-delay: -2.1s; }
.agent-ability--br { right: 0; bottom: 4%; animation-delay: -3.5s; }
@keyframes ability-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (prefers-reduced-motion: reduce) { .agent-ability, .agent-core__link { animation: none; } }
@media (max-width: 960px) {
  .agent-core { display: flex; flex-direction: column; min-height: 0; gap: 16px; margin-top: 20px; }
  .agent-core__links { display: none; }
  .agent-core__stage { width: min(360px, 86vw); height: 340px; }
  .agent-core__badges { position: static; transform: none; justify-content: center; margin-top: 4px; }
  .agent-ability { position: static; width: 100%; animation: none; }
}
