/* Панель Прохора — тёмный «центр управления»: стеклянные панели над живым градиентом. */
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url("fonts/jetbrains-mono-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20BD, U+2212; }

:root {
  --bg: #07090f;
  --bg-2: #0c1019;
  --glass: rgba(20, 26, 40, 0.62);
  --glass-strong: rgba(24, 31, 48, 0.82);
  --glass-hover: rgba(32, 41, 62, 0.7);
  --line: rgba(148, 163, 205, 0.12);
  --line-strong: rgba(148, 163, 205, 0.22);
  --text: #eef1f8;
  --text-2: #b4bdd3;
  --muted: #7d88a3;
  --indigo: #7c83ff;
  --violet: #b07cff;
  --teal: #2dd4bf;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --sky: #38bdf8;
  --grad: linear-gradient(135deg, #7c83ff 0%, #b07cff 50%, #2dd4bf 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
a { color: inherit; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 8px; }

/* ── Живой фон ───────────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(1200px 600px at 50% -10%, #121a33 0%, var(--bg) 60%); }
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.4; will-change: transform;
}
.aurora::before { background: radial-gradient(circle, #5b5ff5 0%, transparent 65%); top: -25vmax; left: -15vmax; animation: drift-a 26s var(--ease-in-out) infinite alternate; }
.aurora::after { background: radial-gradient(circle, #0fb9a5 0%, transparent 65%); bottom: -30vmax; right: -20vmax; opacity: 0.22; animation: drift-b 32s var(--ease-in-out) infinite alternate; }
.aurora .grid-lines {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 75%);
}
@keyframes drift-a { to { transform: translate(18vmax, 10vmax) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-14vmax, -8vmax) scale(0.95); } }

/* ── Стекло ──────────────────────────────────────────── */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* ── Кнопки и чипы ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04);
  font-weight: 600; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { border: 0; color: #0b0e18; background: var(--grad); background-size: 140% 140%; box-shadow: 0 10px 30px -10px rgba(124, 131, 255, 0.7); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background-color: rgba(255, 255, 255, 0.08); border-color: var(--line-strong); }
  .btn-primary:hover { background-position: 100% 0; background-color: transparent; }
  .btn-ghost:hover { color: var(--text); }
}

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.seg button {
  border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 7px 12px; border-radius: 10px; cursor: pointer; min-height: 32px;
  transition: color 160ms ease, background-color 200ms var(--ease-out);
}
.seg button[aria-pressed="true"] { color: var(--text); background: rgba(124, 131, 255, 0.18); box-shadow: 0 0 0 1px rgba(124, 131, 255, 0.35) inset; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: rgba(255, 255, 255, 0.06); color: var(--text-2); border: 1px solid var(--line);
}
.chip.adv { color: #c7c9ff; background: rgba(124, 131, 255, 0.14); border-color: rgba(124, 131, 255, 0.3); }
.chip.other { color: #a8f0e3; background: rgba(45, 212, 191, 0.12); border-color: rgba(45, 212, 191, 0.28); }
.chip.warn { color: #fde68a; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }
.chip.demo { color: #0b0e18; background: var(--grad); border: 0; }

.live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2.4s var(--ease-out) infinite; }
.pulse.warn { background: var(--amber); }
.pulse.bad { background: var(--red); }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(3); opacity: 0; } }

/* ── Вход ────────────────────────────────────────────── */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; padding: 36px 32px 32px; display: grid; gap: 18px; animation: rise 600ms var(--ease-out) both; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #0b0e18;
  background: var(--grad); box-shadow: 0 10px 30px -8px rgba(124, 131, 255, 0.8);
}
.brand-mark .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand-sub { color: var(--muted); font-size: 13px; }
.login h1 { margin: 6px 0 0; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
.login h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login p.lead { margin: 0; color: var(--text-2); }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.field input {
  min-height: 46px; padding: 0 14px; font-size: 16px; font-weight: 500;
  border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5, 8, 15, 0.55);
  transition: border-color 160ms ease, box-shadow 200ms var(--ease-out);
}
.field input:focus { outline: none; border-color: rgba(124, 131, 255, 0.7); box-shadow: 0 0 0 4px rgba(124, 131, 255, 0.18); }
.login .btn-primary { min-height: 48px; font-size: 15px; margin-top: 4px; }
.error { color: var(--red); font-size: 14px; min-height: 1.4em; margin: -4px 0; }
.login-foot { color: var(--muted); font-size: 12px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.login-foot .icon { width: 14px; height: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ── Каркас приложения ───────────────────────────────── */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; border-right: 1px solid var(--line); background: rgba(8, 11, 19, 0.55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.side .brand { padding: 4px 8px; }
.nav { display: grid; gap: 4px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px;
  border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 600;
  transition: color 160ms ease, background-color 160ms ease;
}
.nav a .soon { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.nav a[aria-current="page"] { color: var(--text); background: linear-gradient(90deg, rgba(124, 131, 255, 0.2), rgba(124, 131, 255, 0.04)); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--text); background-color: rgba(255, 255, 255, 0.04); } }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #0b0e18; background: var(--grad); text-transform: uppercase; }
.user-meta { min-width: 0; line-height: 1.25; }
.user-meta b { display: block; font-size: 14px; }
.user-meta span { font-size: 12px; color: var(--muted); }
.user form { margin: 0 0 0 auto; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out); }
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); } }

.main { min-width: 0; padding: 22px clamp(16px, 3vw, 36px) 48px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.top h1 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.top .sub { display: flex; align-items: center; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Обзор ───────────────────────────────────────────── */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.card { padding: 20px; min-width: 0; }
.reveal { animation: rise 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.card-title .icon { color: var(--muted); }
.card-note { font-size: 12px; color: var(--muted); }

.kpi { position: relative; overflow: hidden; padding: 18px 20px 0; display: flex; flex-direction: column; min-height: 168px; }
.kpi::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--tint, rgba(124, 131, 255, 0.22)), transparent 70%); pointer-events: none; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--c, var(--indigo)); background: color-mix(in srgb, var(--c, var(--indigo)) 16%, transparent); }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-value { margin-top: 10px; display: flex; align-items: baseline; gap: 10px; }
.kpi-value b { font-size: clamp(30px, 3vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.delta { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 8px; }
.delta.up { color: var(--green); background: rgba(52, 211, 153, 0.12); }
.delta.down { color: var(--red); background: rgba(251, 113, 133, 0.12); }
.delta.flat { color: var(--muted); background: rgba(255, 255, 255, 0.06); }
.spark { margin: auto -20px 0; height: 56px; width: calc(100% + 40px); display: block; }

.funnel { display: grid; gap: 10px; }
.f-row { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 64px; gap: 14px; align-items: center; }
.f-label { font-weight: 600; color: var(--text-2); font-size: 14px; }
.f-bar { height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); overflow: hidden; position: relative; }
.f-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--w, 0)); border-radius: 10px; background: linear-gradient(90deg, var(--c1), var(--c2)); transition: transform 900ms var(--ease-out); }
.f-bar .f-num { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 15px; color: #0b0e18; mix-blend-mode: normal; }
.f-num.zero { color: var(--muted); }
.f-conv { font-size: 12px; color: var(--muted); text-align: right; }
.f-conv b { color: var(--text); font-weight: 600; }
.f-foot { margin-top: 14px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.f-foot b { color: var(--text); }

.stat-list { display: grid; gap: 2px; }
.stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.stat:last-child { border-bottom: 0; }
.stat b { font-size: 14px; color: var(--text); font-weight: 600; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.big small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }

.waiting { display: grid; gap: 8px; }
.w-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); text-decoration: none; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.w-item:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .w-item:hover { background: var(--glass-hover); } }
.w-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-sub { font-size: 12px; color: var(--muted); }
.timer { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--amber); white-space: nowrap; }
.timer.hot { color: var(--red); }
.empty { color: var(--muted); font-size: 14px; padding: 18px 0; text-align: center; }

.health { display: grid; gap: 10px; }
.h-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.h-row .pulse { margin: 0 4px; }
.h-row span:nth-child(2) { color: var(--text-2); font-weight: 600; }
.h-row b { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.last-error { margin-top: 14px; padding: 12px; border-radius: 12px; font-size: 13px; color: var(--text-2); background: rgba(251, 113, 133, 0.07); border: 1px solid rgba(251, 113, 133, 0.18); display: flex; gap: 10px; }
.last-error .icon { color: var(--red); margin-top: 1px; }

/* Каналы: одна полоса из долей + легенда */
.mix { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.mix-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.mix-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; }
.mix-bar span { flex: var(--v) 1 0; background: var(--c); transform-origin: left; animation: grow 900ms var(--ease-out) both; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.mix-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--c); margin-right: 7px; }
.mix-legend b { color: var(--text); margin-left: 6px; }
@keyframes grow { from { transform: scaleX(0); } }

/* ── Путь клиента ────────────────────────────────────── */
.clients { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; }
.list-card { padding: 14px; position: sticky; top: 20px; max-height: calc(100dvh - 120px); display: flex; flex-direction: column; }
.search { position: relative; flex: none; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: 42px; padding: 0 12px 0 38px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5, 8, 15, 0.5); font-size: 16px; }
.search input:focus { outline: none; border-color: rgba(124, 131, 255, 0.6); box-shadow: 0 0 0 4px rgba(124, 131, 255, 0.15); }
.filters { flex: none; display: flex; gap: 6px; margin: 12px 0 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.filters button[aria-pressed="true"] { color: var(--text); background: rgba(124, 131, 255, 0.16); border-color: rgba(124, 131, 255, 0.4); }
.rows { overflow-y: auto; margin: 0 -6px; padding: 0 6px; display: grid; gap: 4px; align-content: start; }
.row {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .row:hover { background: rgba(255, 255, 255, 0.04); } }
.row[aria-current="true"] { background: rgba(124, 131, 255, 0.12); border-color: rgba(124, 131, 255, 0.3); }
.row .avatar { width: 38px; height: 38px; border-radius: 12px; font-size: 14px; }
.row .avatar.other { background: linear-gradient(135deg, #2dd4bf, #38bdf8); }
.row-main { min-width: 0; }
.row-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time { font-size: 12px; color: var(--muted); text-align: right; display: grid; gap: 4px; justify-items: end; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.detail { padding: 24px; min-height: 420px; }
.detail-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.detail-head .avatar { width: 54px; height: 54px; border-radius: 16px; font-size: 20px; }
.detail-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.detail-head .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.back { display: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 20px 0 6px; }
.fact { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.fact span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.fact b { font-size: 14px; font-weight: 700; word-break: break-word; }
.timeline { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--indigo), var(--teal)); opacity: 0.35; border-radius: 2px; }
.t-item { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 8px 0; }
.t-node { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--c, var(--text-2)); position: relative; z-index: 1; }
.t-node .icon { width: 16px; height: 16px; }
.t-body { padding-top: 4px; }
.t-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-weight: 700; font-size: 14px; }
.t-title time { font-size: 12px; color: var(--muted); font-weight: 500; }
.t-text { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.t-item.client .t-text { display: inline-block; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--text); }
.placeholder { display: grid; place-items: center; text-align: center; gap: 10px; min-height: 380px; color: var(--muted); }
.placeholder .icon { width: 40px; height: 40px; stroke-width: 1.4; color: var(--indigo); opacity: 0.8; }

/* ── «Скоро» ─────────────────────────────────────────── */
.soon-card { padding: 40px 28px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.soon-card .brand-mark { width: 56px; height: 56px; border-radius: 18px; }
.soon-card h2 { margin: 6px 0 0; font-size: 22px; }
.soon-card p { margin: 0; color: var(--text-2); max-width: 520px; }
.soon-card ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; }
.soon-card li { display: flex; gap: 10px; color: var(--text-2); }
.soon-card li .icon { color: var(--teal); margin-top: 2px; }

/* ── Скелетон ────────────────────────────────────────── */
.skeleton { border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Телефон ─────────────────────────────────────────── */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .span-3 { grid-column: span 6; } .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; } .span-6 { grid-column: span 12; }
  .clients { grid-template-columns: minmax(260px, 340px) 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
    padding: 6px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--line-strong);
    backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; min-height: 48px; border-radius: 14px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; transition: color 160ms ease, background-color 160ms ease; }
  .tabbar a[aria-current="page"] { color: var(--text); background: rgba(124, 131, 255, 0.16); }
  .tabbar .icon { width: 20px; height: 20px; }
  .span-3 { grid-column: span 6; }
  .clients { grid-template-columns: 1fr; }
  .list-card { position: static; max-height: none; }
  .clients.has-detail .list-card { display: none; }
  .clients:not(.has-detail) .detail { display: none; }
  .back { display: inline-flex; }
  .f-row { grid-template-columns: 1fr 56px; }
  .f-label { grid-column: 1 / -1; font-size: 13px; }
}
@media (max-width: 460px) {
  .grid { gap: 12px; }
  .kpi { min-height: 128px; padding: 14px 14px 0; }
  .kpi-label { font-size: 12px; gap: 6px; }
  .kpi-icon { width: 26px; height: 26px; }
  .kpi-value { margin-top: 8px; gap: 6px; flex-wrap: wrap; }
  .kpi-value b { font-size: 28px; }
  .spark { height: 40px; margin: auto -14px 0; width: calc(100% + 28px); }
  .big { font-size: 28px; }
  .top-actions { width: 100%; }
  .top-actions .seg { flex: 1; }
  .top-actions .seg button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora::before, .aurora::after, .pulse::after, .skeleton { animation: none; }
  .reveal, .login-card { animation: fade 200ms ease both; }
  .mix-bar span { animation: none; }
  .f-fill { transition: none; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

/* ── Подвкладки раздела ─────────────────────────────── */
.seg-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none;
  transition: color 160ms ease, background-color 200ms var(--ease-out);
}
.seg-link .icon { width: 16px; height: 16px; }
.seg-link[aria-selected="true"] { color: var(--text); background: rgba(124, 131, 255, 0.18); box-shadow: 0 0 0 1px rgba(124, 131, 255, 0.35) inset; }
@media (hover: hover) and (pointer: fine) { .seg-link:hover { color: var(--text); } }

/* ── Карта ответов ──────────────────────────────────── */
.map-shell { padding: 12px; display: flex; flex-direction: column; gap: 10px; height: calc(100dvh - 130px); min-height: 520px; }
.map-skel { flex: 1; }
.map-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.map-search { flex: 1 1 260px; max-width: 420px; }
.map-hits { font-size: 13px; color: var(--muted); }
.map-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.map-btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.map-btn .icon { width: 16px; height: 16px; }
.map-body { position: relative; flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: rgba(5, 8, 15, 0.45); }
.map-stage {
  position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; outline: none;
  background-image: radial-gradient(rgba(148, 163, 205, 0.14) 1px, transparent 1px); background-size: 22px 22px;
}
.map-stage.dragging { cursor: grabbing; }
.map-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.map-world.animating { transition: transform 420ms var(--ease-out); }
.map-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.map-edge { fill: none; stroke-width: 2; opacity: 0.45; }
.map-edge.goto { stroke-dasharray: 5 6; opacity: 0.35; }

.map-node {
  position: absolute; left: 0; top: 0; width: 264px; height: 104px; padding: 10px 12px 9px 16px;
  display: flex; flex-direction: column; gap: 4px; border-radius: 14px; cursor: pointer; user-select: none;
  background: var(--glass-strong); border: 1px solid var(--line-strong);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8);
  transition: border-color 160ms ease, box-shadow 200ms var(--ease-out), background-color 160ms ease;
}
.map-node::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--k); }
.mn-top { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; min-width: 0; }
.mn-top .icon { width: 14px; height: 14px; flex: none; }
.mn-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-ai { margin-left: auto; color: var(--violet); display: inline-flex; }
.mn-text { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mn-kind { font-size: 11.5px; font-weight: 600; color: var(--k); }
.mn-toggle {
  min-width: 34px; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.mn-toggle:active { transform: scale(0.94); }
.map-node.is-start { background: linear-gradient(135deg, rgba(124, 131, 255, 0.28), rgba(45, 212, 191, 0.18)); border-color: rgba(124, 131, 255, 0.5); }
.map-node.is-start .mn-text { font-size: 15px; }
.map-node.is-chapter { background: rgba(251, 191, 36, 0.08); border-style: dashed; }
.map-node.is-goto { background: rgba(255, 255, 255, 0.03); border-style: dashed; box-shadow: none; }
.map-node.is-goto .mn-text { color: var(--text-2); font-weight: 500; }
.map-node.is-selected { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(124, 131, 255, 0.35), 0 14px 30px -12px rgba(124, 131, 255, 0.5); }
.map-node.is-hit { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45); }
.map-node.flash { animation: flash 1.2s var(--ease-out); }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 6px rgba(124, 131, 255, 0.6); } 100% { box-shadow: 0 0 0 0 rgba(124, 131, 255, 0); } }
@media (hover: hover) and (pointer: fine) {
  .map-node:hover { border-color: rgba(124, 131, 255, 0.55); }
  .mn-toggle:hover { background: rgba(124, 131, 255, 0.2); color: var(--text); }
}

.map-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); padding: 2px 4px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.map-legend .icon { width: 14px; height: 14px; }

.map-panel {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: 380px; z-index: 2; border-radius: 16px;
  display: flex; flex-direction: column; background: var(--glass-strong);
  transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none;
  transition: transform 320ms var(--ease-out), opacity 200ms ease;
}
.map-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.map-panel-close { position: absolute; top: 8px; right: 8px; z-index: 1; }
.map-panel-in { overflow-y: auto; padding: 18px 18px 22px; display: grid; gap: 8px; align-content: start; }
.map-panel h3 { margin: 4px 30px 0 0; font-size: 18px; }
.mp-kind { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--k); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 34px; }
.mp-kind span { display: inline-flex; align-items: center; gap: 4px; color: var(--violet); }
.mp-kind .icon { width: 14px; height: 14px; }
.mp-label { margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.bubble { padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.bubble.client { background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.28); border-top-left-radius: 4px; justify-self: start; max-width: 92%; }
.bubble.bot { background: rgba(124, 131, 255, 0.12); border: 1px solid rgba(124, 131, 255, 0.28); border-top-left-radius: 4px; }
.bubble.bot.ai { background: rgba(176, 124, 255, 0.12); border-color: rgba(176, 124, 255, 0.3); font-style: italic; }
.mp-silent { color: var(--text-2); font-size: 14px; padding: 8px 0; }
.mp-btns { display: grid; gap: 6px; }
.kb-row { display: flex; gap: 6px; }
.kb-btn { flex: 1; text-align: center; padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-strong); }
.kb-btn.b-primary { background: rgba(56, 132, 255, 0.22); border-color: rgba(56, 132, 255, 0.45); }
.kb-btn.b-positive { background: rgba(52, 211, 153, 0.2); border-color: rgba(52, 211, 153, 0.45); }
.kb-btn.b-negative { background: rgba(251, 113, 133, 0.18); border-color: rgba(251, 113, 133, 0.42); }
.mp-brain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mp-brain li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.mb-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: var(--text-2); }
.mb-ic .icon { width: 14px; height: 14px; }
.mb-ai { color: var(--violet); background: rgba(176, 124, 255, 0.14); }
.mb-t { color: var(--amber); background: rgba(251, 191, 36, 0.12); }
.mp-staff { padding: 10px 12px; border-radius: 12px; background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.22); font-size: 13.5px; white-space: pre-wrap; color: var(--text-2); }
.mp-staff b { display: flex; align-items: center; gap: 6px; color: var(--text); margin-bottom: 4px; white-space: normal; }
.mp-staff .icon { width: 15px; height: 15px; color: var(--amber); }
.mp-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.mp-next { display: grid; gap: 4px; }
.mp-link {
  display: grid; grid-template-columns: 18px 1fr 16px; gap: 10px; align-items: center; text-align: left;
  min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.mp-link:active { transform: scale(0.99); }
.mp-link .icon { width: 16px; height: 16px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .mp-link:hover { background: var(--glass-hover); color: var(--text); } }

@media (max-width: 820px) {
  .map-shell { height: calc(100dvh - 200px); min-height: 460px; padding: 10px; }
  .map-tools .map-btn { display: none; }
  .map-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72%; border-radius: 18px 18px 0 0;
    transform: translateY(105%);
  }
  .map-panel.open { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .map-world.animating, .map-panel { transition: opacity 150ms ease; }
}

/* ── Очистка тестовых ───────────────────────────────── */
.detail { display: flex; flex-direction: column; }
.danger-zone {
  order: 10; margin-top: 26px; padding: 14px 16px; border-radius: 14px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 1px dashed rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.05);
}
.danger-zone > div { flex: 1 1 260px; display: grid; gap: 2px; font-size: 13px; color: var(--text-2); }
.danger-zone b { color: var(--red); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.btn-danger { border: 0; color: #fff; background: #e11d48; box-shadow: 0 10px 26px -12px rgba(225, 29, 72, 0.8); }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-danger-ghost { color: var(--red); border-color: rgba(251, 113, 133, 0.4); background: transparent; }
.btn .icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  .btn-danger:not(:disabled):hover { background: #be123c; }
  .btn-danger-ghost:hover { background: rgba(251, 113, 133, 0.1); border-color: rgba(251, 113, 133, 0.6); }
}
.purge-tests { flex: none; justify-content: flex-start; margin: -2px 0 8px; min-height: 34px; font-size: 13px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .purge-tests:hover { color: var(--red); } }

.pd {
  width: min(480px, calc(100vw - 32px)); padding: 0; color: var(--text); background: var(--glass-strong);
  border: 1px solid var(--line-strong); border-radius: 20px;
  animation: pd-in 260ms var(--ease-out);
}
.pd::backdrop { background: rgba(3, 5, 10, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes pd-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.pd-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 0; }
.pd-head h2 { flex: 1; margin: 0; font-size: 18px; line-height: 1.25; }
.pd-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--red); background: rgba(251, 113, 133, 0.14); flex: none; }
.pd-body { padding: 14px 18px 0; display: grid; gap: 10px; }
.pd-sum { font-weight: 700; }
.pd-rows { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pd-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 14px; border-bottom: 1px solid var(--line); }
.pd-row:last-child { border-bottom: 0; }
.pd-row.zero { color: var(--muted); }
.pd-note { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.pd-note .icon { width: 16px; height: 16px; margin-top: 1px; color: var(--muted); }
.pd-note.warn { background: rgba(251, 191, 36, 0.07); border-color: rgba(251, 191, 36, 0.25); }
.pd-note.warn .icon { color: var(--amber); }
.pd-confirm { padding: 14px 18px 0; }
.pd-input { min-height: 44px; padding: 0 12px; font-size: 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5, 8, 15, 0.55); }
.pd-input:focus { outline: none; border-color: rgba(251, 113, 133, 0.6); box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.15); }
.pd-status { padding: 8px 18px 0; min-height: 1.6em; font-size: 13px; color: var(--text-2); }
.pd-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; }
@media (prefers-reduced-motion: reduce) { .pd { animation: none; } }

/* ── Тексты бота и база знаний ──────────────────────── */
.ed { gap: 8px; }
.ed-hint { font-size: 12.5px; color: var(--muted); margin: 10px 2px 8px; }
.ed-group { margin: 10px 4px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ed-row { grid-template-columns: 1fr; padding: 9px 10px; }
.ed-row .row-sub { white-space: nowrap; }
.ed-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 4px; }
.ed-head h2 { margin: 0; font-size: 21px; letter-spacing: -0.01em; }
.ed-head .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip.mono { font-family: var(--mono); font-weight: 500; font-size: 11.5px; }
.ed-preview { max-width: 560px; font-style: normal; }
.ed-label { display: flex; justify-content: space-between; align-items: baseline; }
.ed-count { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.ed-area {
  width: 100%; resize: vertical; min-height: 140px; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 15px; line-height: 1.5;
  border: 1px solid var(--line-strong); background: rgba(5, 8, 15, 0.55);
  transition: border-color 160ms ease, box-shadow 200ms var(--ease-out);
}
.ed-area:focus { outline: none; border-color: rgba(124, 131, 255, 0.6); box-shadow: 0 0 0 4px rgba(124, 131, 255, 0.15); }
.ed-area[readonly] { color: var(--text-2); }
.ed-warn { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 13.5px; color: #fde68a; padding: 10px 12px; border-radius: 12px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.28); }
.ed-warn .icon { width: 16px; height: 16px; color: var(--amber); }
.ed-force { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.ed-force input { width: 18px; height: 18px; accent-color: var(--amber); }
.ed-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; }
.ed-spacer { flex: 1; }
.ed-listhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 2px 4px; flex: none; }
.ed-listhead .btn { min-height: 34px; font-size: 13px; }
.ed-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ed-hist li { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); display: grid; gap: 8px; }
.eh-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.eh-top b { color: var(--text); }
.eh-note { font-style: italic; }
.eh-revert { margin-left: auto; min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.eh-diff { display: grid; gap: 6px; font-size: 13px; }
.eh-before, .eh-after { padding: 8px 10px; border-radius: 10px; white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow: auto; }
.eh-before { background: rgba(251, 113, 133, 0.07); color: var(--text-2); text-decoration: line-through; text-decoration-color: rgba(251, 113, 133, 0.5); }
.eh-after { background: rgba(52, 211, 153, 0.08); }
.ed-hist-empty { font-size: 13.5px; color: var(--muted); }

.kb-ask { padding: 14px; margin-bottom: 16px; display: grid; gap: 10px; }
.kb-ask-row { display: flex; gap: 10px; }
.kb-ask-row .search { flex: 1; }
.kb-hits { display: grid; gap: 8px; }
.kb-hits:empty { display: none; }
.kb-hits-note { font-size: 12.5px; color: var(--muted); }
.kb-hit { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); text-decoration: none; transition: background-color 160ms ease; }
.kb-hit.top { border-color: rgba(124, 131, 255, 0.35); background: rgba(124, 131, 255, 0.07); }
@media (hover: hover) and (pointer: fine) { .kb-hit:hover { background: var(--glass-hover); } }
.kb-sim { display: grid; gap: 4px; align-content: start; }
.kb-sim span { display: block; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--indigo), var(--teal)); transform-origin: left; transform: scaleX(var(--w)); }
.kb-sim b { font-family: var(--mono); font-size: 13px; }
.kb-hit-text { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600;
  background: var(--glass-strong); border: 1px solid rgba(52, 211, 153, 0.4); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: toast-in 260ms var(--ease-out); transition: opacity 300ms ease, transform 300ms var(--ease-out);
}
.toast .icon { color: var(--green); }
.toast.bad { border-color: rgba(251, 113, 133, 0.45); }
.toast.bad .icon { color: var(--red); }
.toast.out { opacity: 0; transform: translate(-50%, 8px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (max-width: 820px) {
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px); }
  .kb-ask-row { flex-direction: column; }
  .kb-hit { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: opacity 200ms ease; } }
