/* Realtor Leads admin: свод по дизайн-словарю Dub (токены --zk-*).
   Кегли 11/12/13/14/16/18/20/24/30, начертания 400/500/600, радиусы 6/8/12/16/9999, отступы шагом 4px.
   Контейнер определяется границей, не тенью: тени только у всплывающих слоёв, кольца фокуса и подъёма карточки
   при наведении (размытие не больше 24px). Каждый селектор объявлен один раз; медиазапросы одним блоком в конце;
   !important только в prefers-reduced-motion. */

:root {
  --zk-canvas: #ffffff;
  --zk-paper: #f5f5f5;
  --zk-panel-alt: #fafafa;
  --zk-border: #e5e5e5;
  --zk-border-strong: #d4d4d4;
  --zk-ink: #0a0a0a;
  --zk-text: #171717;
  --zk-text-2: #262626;
  --zk-muted: #525252;
  --zk-muted-2: #737373;
  --zk-silver: #a3a3a3;
  --zk-accent: #2563eb;
  --zk-accent-soft: #eff6ff;
  --zk-accent-dark: #1e40af;
  --zk-action-fill: #0a0a0a;
  --zk-success: #16a34a;
  --zk-success-soft: #dcfce7;
  --zk-warning: #ea580c;
  --zk-warning-soft: #ffedd5;
  --zk-violet: #7c3aed;
  --zk-danger: #dc2626;
  --zk-danger-soft: #fee2e2;
  --zk-radius-input: 6px;
  --zk-radius-sm: 8px;
  --zk-radius-md: 12px;
  --zk-radius-lg: 16px;
  --zk-radius-pill: 9999px;
  --zk-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --zk-sidebar-w: 240px;
  --zk-tabbar-h: 60px;
  --zk-tap: 44px;
  /* Движение: одна кривая на весь раздел, три длительности */
  --zk-ease: cubic-bezier(.2, .7, .2, 1);
  --zk-fast: .15s;
  --zk-mid: .3s;
  --zk-slow: .6s;
  --zk-shadow-lift: 0 8px 24px rgba(0, 0, 0, .06);
  --zk-shadow-pop: 0 8px 24px rgba(0, 0, 0, .08);
  --zk-shimmer: linear-gradient(90deg, var(--zk-paper) 25%, var(--zk-border) 50%, var(--zk-paper) 75%);
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
.zk-body {
  margin: 0;
  font-family: var(--zk-font);
  font-size: 14px;
  line-height: 1.43;
  color: var(--zk-text);
  background: var(--zk-paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--zk-accent); text-decoration: none; transition: color var(--zk-fast) var(--zk-ease); }
a:hover { color: var(--zk-accent-dark); }
h1, h2, h3, p, ul, ol, dl, blockquote, pre, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre, .zk-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--zk-accent); outline-offset: 2px; border-radius: var(--zk-radius-input); }
::selection { background: var(--zk-accent-soft); color: var(--zk-accent-dark); }
.zk-icon { flex-shrink: 0; }

/* ---------- смена страниц: View Transitions с фолбэком на fade ---------- */
@view-transition { navigation: auto; }
::view-transition-old(zk-page) { animation: zk-vt-out .18s var(--zk-ease) both; }
::view-transition-new(zk-page) { animation: zk-vt-in .32s var(--zk-ease) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
.zk-no-vt .zk-page { animation: zk-vt-in var(--zk-mid) var(--zk-ease) backwards; }
.zk-no-vt.is-leaving .zk-page { opacity: 0; transform: translateY(4px); transition: opacity var(--zk-fast) var(--zk-ease), transform var(--zk-fast) var(--zk-ease); }
.zk-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 0;
  height: 2px;
  background: var(--zk-accent);
  opacity: 0;
  transition: width 1.6s var(--zk-ease), opacity var(--zk-mid) var(--zk-ease);
}
.zk-progress.is-active { width: 82%; opacity: 1; }
.zk-progress.is-done { width: 100%; opacity: 0; transition: width var(--zk-fast) var(--zk-ease), opacity var(--zk-mid) var(--zk-ease) var(--zk-fast); }

/* ---------- каркас ---------- */
.zk-shell { display: flex; min-height: 100vh; }
.zk-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: var(--zk-sidebar-w);
  height: 100vh;
  padding: 16px 12px;
  background: var(--zk-canvas);
  border-right: 1px solid var(--zk-border);
  flex-shrink: 0;
  view-transition-name: zk-sidebar;
}
.zk-brand { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 16px; font-weight: 600; color: var(--zk-text); }
.zk-brand:hover { color: var(--zk-text); }
.zk-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--zk-radius-sm);
  background: var(--zk-accent-soft);
  color: var(--zk-accent);
  transition: transform var(--zk-mid) var(--zk-ease);
}
.zk-brand:hover .zk-brand__mark { transform: rotate(-8deg) scale(1.06); }
.zk-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.zk-nav__group {
  margin-top: 16px;
  padding: 0 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--zk-muted-2);
}
.zk-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--zk-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--zk-text);
  transition: background-color var(--zk-fast) var(--zk-ease), color var(--zk-fast) var(--zk-ease), transform var(--zk-fast) var(--zk-ease);
}
.zk-nav__item:hover { background: var(--zk-paper); color: var(--zk-text); transform: translateX(2px); }
.zk-nav__item.active { background: var(--zk-accent-soft); color: var(--zk-accent); transform: none; }
.zk-nav__item .zk-icon { color: var(--zk-muted); transition: color var(--zk-fast) var(--zk-ease); }
.zk-nav__item:hover .zk-icon, .zk-nav__item.active .zk-icon { color: currentColor; }
.zk-nav__item--logout { color: var(--zk-muted); }
.zk-sidebar__foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--zk-border); }
.zk-me { display: flex; align-items: center; gap: 8px; padding: 4px 12px; }
.zk-me__body { display: flex; flex-direction: column; min-width: 0; }
.zk-me__name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zk-me__role { font-size: 12px; color: var(--zk-muted-2); }
.zk-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--zk-radius-pill);
  background: var(--zk-paper);
  border: 1px solid var(--zk-border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--zk-muted);
  flex-shrink: 0;
}
.zk-avatar--sm { width: 24px; height: 24px; }
.zk-lang { display: inline-flex; gap: 4px; padding: 0 12px; }
.zk-lang__item {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: var(--zk-radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--zk-muted);
  background: var(--zk-paper);
  transition: background-color var(--zk-fast) var(--zk-ease), color var(--zk-fast) var(--zk-ease);
}
.zk-lang__item:hover { color: var(--zk-text); background: var(--zk-border); }
.zk-lang__item.active { color: var(--zk-accent); background: var(--zk-accent-soft); }
.zk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zk-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 12px 0 4px;
  background: var(--zk-canvas);
  border-bottom: 1px solid var(--zk-border);
  view-transition-name: zk-topbar;
}
.zk-topbar .zk-lang { padding: 0; }
.zk-topbar__side { display: flex; align-items: center; gap: 8px; }
.zk-topbar__btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--zk-radius-sm); color: var(--zk-muted); transition: background-color var(--zk-fast) var(--zk-ease), color var(--zk-fast) var(--zk-ease); }
.zk-topbar__btn:hover { background: var(--zk-paper); color: var(--zk-text); }
.zk-page { width: 100%; max-width: 1200px; padding: 24px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; view-transition-name: zk-page; }
.zk-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: calc(var(--zk-tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--zk-canvas);
  border-top: 1px solid var(--zk-border);
  view-transition-name: zk-tabbar;
}
.zk-tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--zk-tap);
  font-size: 11px;
  font-weight: 500;
  color: var(--zk-muted);
  transition: color var(--zk-fast) var(--zk-ease);
}
.zk-tabbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 28px;
  border-radius: var(--zk-radius-pill);
  transition: background-color var(--zk-mid) var(--zk-ease), transform var(--zk-mid) var(--zk-ease);
}
.zk-tabbar__item:active .zk-tabbar__icon { transform: scale(.92); }
.zk-tabbar__item.active { color: var(--zk-accent); }
.zk-tabbar__item.active .zk-tabbar__icon { background: var(--zk-accent-soft); }

/* ---------- типографика ---------- */
.zk-h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 30px; line-height: 1.38; font-weight: 500; letter-spacing: -.02em; }
.zk-h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 20px; line-height: 1.4; font-weight: 600; }
.zk-h2 .zk-icon { color: var(--zk-silver); }
.zk-muted { color: var(--zk-muted); font-weight: 400; }
.zk-muted-2 { color: var(--zk-muted-2); }
.zk-small { font-size: 12px; }
.zk-accent { color: var(--zk-accent); font-weight: 500; }
.zk-text { font-size: 16px; line-height: 1.5; }
.zk-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.zk-break { overflow-wrap: anywhere; }
.zk-code { font-size: 14px; letter-spacing: .04em; }

/* ---------- шапка страницы ---------- */
.zk-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.zk-page-head__main { min-width: 0; }
.zk-page-sub { margin-top: 4px; font-size: 14px; color: var(--zk-muted); }
.zk-page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zk-backlink { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; margin-bottom: 4px; font-size: 13px; font-weight: 500; color: var(--zk-muted); transition: color var(--zk-fast) var(--zk-ease), transform var(--zk-fast) var(--zk-ease); }
.zk-backlink:hover { color: var(--zk-accent); transform: translateX(-2px); }

/* ---------- панели, сетки, плитки ---------- */
.zk-panel { position: relative; padding: 16px; background: var(--zk-canvas); border: 1px solid var(--zk-border); border-radius: var(--zk-radius-md); }
.zk-panel--table { padding: 0; overflow: hidden; }
.zk-panel--deal { border-color: var(--zk-border-strong); }
.zk-panel__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.zk-panel__sub { font-size: 13px; color: var(--zk-muted); }
.zk-grid { display: grid; gap: 24px; }
.zk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zk-grid--lead { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.zk-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.zk-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.zk-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--zk-canvas);
  border: 1px solid var(--zk-border);
  border-radius: var(--zk-radius-md);
  overflow: hidden;
  transition: transform var(--zk-mid) var(--zk-ease), border-color var(--zk-mid) var(--zk-ease), box-shadow var(--zk-mid) var(--zk-ease);
}
.zk-tile:hover { transform: translateY(-2px); border-color: var(--zk-border-strong); box-shadow: var(--zk-shadow-lift); }
.zk-tile__label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--zk-muted-2); }
.zk-tile__label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zk-tile__label .zk-icon { color: var(--zk-silver); transition: color var(--zk-mid) var(--zk-ease), transform var(--zk-mid) var(--zk-ease); }
.zk-tile:hover .zk-tile__label .zk-icon { color: var(--zk-accent); transform: translateY(-1px); }
.zk-tile__value { font-size: 24px; line-height: 1.33; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.zk-tile__value--money { font-size: 18px; line-height: 1.56; }
.zk-tile__hint { display: flex; align-items: baseline; gap: 4px; font-size: 12px; color: var(--zk-muted); }
.zk-tile__hint b { font-weight: 600; color: var(--zk-text-2); font-variant-numeric: tabular-nums; }
.zk-tile.is-loading .zk-tile__value, .zk-tile.is-loading .zk-tile__hint { color: transparent; }
.zk-tile.is-loading .zk-tile__value::before { content: ""; position: absolute; left: 16px; right: 40%; top: 40px; height: 24px; border-radius: var(--zk-radius-input); background: var(--zk-shimmer); background-size: 200% 100%; animation: zk-shimmer 1.2s linear infinite; }

/* ---------- воронка: лента долей + строки ---------- */
.zk-strip { display: flex; gap: 2px; height: 10px; margin-bottom: 16px; border-radius: var(--zk-radius-pill); overflow: hidden; background: var(--zk-paper); }
.zk-strip__seg { display: block; flex: 0 0 var(--pct, 0%); min-width: 0; background: var(--zk-status, var(--zk-accent)); transform-origin: left center; animation: zk-grow var(--zk-slow) var(--zk-ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); transition: opacity var(--zk-fast) var(--zk-ease); }
.zk-strip:hover .zk-strip__seg { opacity: .55; }
.zk-strip .zk-strip__seg:hover { opacity: 1; }
.zk-funnel { display: flex; flex-direction: column; gap: 4px; }
.zk-funnel__row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 40px 44px;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 8px;
  margin: 0 -8px;
  border-radius: var(--zk-radius-sm);
  color: var(--zk-text);
  transition: background-color var(--zk-fast) var(--zk-ease), transform var(--zk-fast) var(--zk-ease);
}
.zk-funnel__row:hover { background: var(--zk-paper); transform: translateX(2px); }
.zk-funnel__label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zk-funnel__row:hover .zk-funnel__label { color: var(--zk-accent); }
.zk-funnel__dot { width: 8px; height: 8px; border-radius: var(--zk-radius-pill); background: var(--zk-status, var(--zk-accent)); flex-shrink: 0; }
.zk-funnel__track { position: relative; display: block; height: 8px; border-radius: var(--zk-radius-pill); background: var(--zk-paper); overflow: hidden; }
.zk-funnel__bar { display: block; width: var(--pct, 0%); height: 100%; border-radius: var(--zk-radius-pill); background: var(--zk-status, var(--zk-accent)); transform-origin: left center; animation: zk-grow var(--zk-slow) var(--zk-ease) backwards; animation-delay: calc(var(--i, 0) * 50ms + 120ms); transition: width var(--zk-slow) var(--zk-ease), filter var(--zk-fast) var(--zk-ease); }
.zk-funnel__row:hover .zk-funnel__bar { filter: brightness(1.08); }
.zk-funnel__count { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.zk-funnel__pct { font-size: 12px; color: var(--zk-muted-2); text-align: right; font-variant-numeric: tabular-nums; }
.zk-funnel.is-loading .zk-funnel__bar, .zk-funnel.is-loading .zk-strip__seg { animation: zk-shimmer 1.2s linear infinite; background: var(--zk-shimmer); background-size: 200% 100%; }
.zk-status--new { --zk-status: var(--zk-accent); }
/* Источники: цвет по порядку, самый крупный источник синим */
.zk-src-0 { --zk-status: var(--zk-accent); }
.zk-src-1 { --zk-status: var(--zk-violet); }
.zk-src-2 { --zk-status: var(--zk-warning); }
.zk-src-3 { --zk-status: var(--zk-success); }
.zk-src-4 { --zk-status: var(--zk-silver); }
.zk-status--taken { --zk-status: var(--zk-violet); }
.zk-status--contacted, .zk-status--viewing { --zk-status: var(--zk-warning); }
.zk-status--deal { --zk-status: var(--zk-success); }
.zk-status--lost, .zk-status--skipped { --zk-status: var(--zk-danger); }
.zk-status--other_city, .zk-status--repeat, .zk-status--dup { --zk-status: var(--zk-silver); }

/* ---------- строки-карточки (последние горячие) ---------- */
.zk-rows { display: flex; flex-direction: column; }
.zk-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--zk-border);
  border-radius: var(--zk-radius-sm);
  cursor: pointer;
  transition: background-color var(--zk-fast) var(--zk-ease), transform var(--zk-fast) var(--zk-ease);
}
.zk-row:last-child { border-bottom: 0; }
.zk-row:hover { background: var(--zk-paper); transform: translateX(2px); }
.zk-row__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--zk-radius-pill); background: var(--zk-paper); color: var(--zk-muted); flex-shrink: 0; transition: transform var(--zk-mid) var(--zk-ease); }
.zk-row__icon--hot { background: var(--zk-warning-soft); color: var(--zk-warning); }
.zk-row:hover .zk-row__icon { transform: scale(1.08); }
.zk-row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.zk-row__title { font-size: 14px; font-weight: 500; color: var(--zk-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zk-row:hover .zk-row__title { color: var(--zk-accent); }
.zk-row__sub { font-size: 12px; color: var(--zk-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zk-row__side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.zk-row__chev { color: var(--zk-silver); opacity: 0; transform: translateX(-4px); transition: opacity var(--zk-fast) var(--zk-ease), transform var(--zk-fast) var(--zk-ease); }
.zk-row:hover .zk-row__chev { opacity: 1; transform: none; }
.zk-rows.is-loading .zk-row__title, .zk-rows.is-loading .zk-row__sub { color: transparent; border-radius: var(--zk-radius-input); background: var(--zk-shimmer); background-size: 200% 100%; animation: zk-shimmer 1.2s linear infinite; max-width: 60%; }

/* ---------- чипы ---------- */
.zk-chip, .zk-tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--zk-radius-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--zk-paper);
  color: var(--zk-muted);
  transition: background-color var(--zk-mid) var(--zk-ease), color var(--zk-mid) var(--zk-ease), transform var(--zk-mid) var(--zk-ease);
}
.zk-chip::before { content: ""; width: 6px; height: 6px; border-radius: var(--zk-radius-pill); background: currentColor; flex-shrink: 0; transition: transform var(--zk-mid) var(--zk-ease); }
.zk-chip:hover::before { transform: scale(1.3); }
.zk-chip.is-pop { animation: zk-pop .4s var(--zk-ease); }
.zk-chip--new { background: var(--zk-accent-soft); color: var(--zk-accent); }
.zk-chip--new::before { animation: zk-pulse 2s var(--zk-ease) infinite; }
.zk-chip--taken { background: var(--zk-accent-soft); color: var(--zk-violet); }
.zk-chip--contacted, .zk-chip--viewing { background: var(--zk-warning-soft); color: var(--zk-warning); }
.zk-chip--deal { background: var(--zk-success-soft); color: var(--zk-success); }
.zk-chip--lost { background: var(--zk-danger-soft); color: var(--zk-danger); }
.zk-tier--hot { background: var(--zk-warning-soft); color: var(--zk-warning); }
.zk-tier--warm { background: var(--zk-accent-soft); color: var(--zk-accent); }
.zk-tier .zk-icon { width: 12px; height: 12px; }
.zk-count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--zk-radius-pill); background: var(--zk-paper); font-size: 11px; font-weight: 600; color: var(--zk-muted); font-variant-numeric: tabular-nums; }

/* ---------- кнопки ---------- */
.zk-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--zk-border-strong);
  border-radius: var(--zk-radius-sm);
  background: var(--zk-canvas);
  color: var(--zk-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--zk-fast) var(--zk-ease), border-color var(--zk-fast) var(--zk-ease), color var(--zk-fast) var(--zk-ease), transform var(--zk-fast) var(--zk-ease), box-shadow var(--zk-fast) var(--zk-ease);
}
.zk-btn:hover { background: var(--zk-paper); color: var(--zk-text); border-color: var(--zk-silver); transform: translateY(-1px); }
.zk-btn:active { transform: translateY(0); }
.zk-btn:focus-visible { outline: none; border-color: var(--zk-accent); box-shadow: 0 0 0 3px var(--zk-accent-soft); }
.zk-btn[aria-disabled="true"], .zk-btn:disabled { color: var(--zk-silver); pointer-events: none; }
.zk-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.zk-btn--block { width: 100%; }
.zk-btn--primary { background: var(--zk-action-fill); border-color: var(--zk-action-fill); color: var(--zk-canvas); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.zk-btn--primary:hover { background: var(--zk-text-2); border-color: var(--zk-text-2); color: var(--zk-canvas); }
.zk-btn--ghost { border-color: transparent; color: var(--zk-muted); }
.zk-btn--ghost:hover { border-color: transparent; }
.zk-btn--accent { color: var(--zk-accent); }
.zk-btn--accent:hover { color: var(--zk-accent-dark); background: var(--zk-accent-soft); border-color: var(--zk-accent-soft); }
.zk-btn--success { color: var(--zk-success); }
.zk-btn--success:hover { color: var(--zk-success); background: var(--zk-success-soft); border-color: var(--zk-success-soft); }
.zk-btn--danger { color: var(--zk-danger); }
.zk-btn--danger:hover { color: var(--zk-danger); background: var(--zk-danger-soft); border-color: var(--zk-danger-soft); }
/* «Пропустить» в строке списка: на десктопе только крестик, подпись раскрывается на телефоне */
.zk-btn--skip { width: 32px; padding: 0; color: var(--zk-muted); }
.zk-btn--skip:hover { color: var(--zk-danger); background: var(--zk-danger-soft); border-color: var(--zk-danger-soft); }
.zk-btn--skip .zk-btn__label { display: none; }
.zk-btn.is-busy { color: transparent; pointer-events: none; }
.zk-btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--zk-border-strong); border-top-color: var(--zk-accent); border-radius: var(--zk-radius-pill); animation: zk-spin .7s linear infinite; }
.zk-btn.is-done { color: var(--zk-success); border-color: var(--zk-success-soft); background: var(--zk-success-soft); }
.zk-inline { display: inline-flex; }
.zk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- формы ---------- */
.zk-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zk-field--grow { flex: 1 1 240px; }
.zk-field--full { grid-column: 1 / -1; }
.zk-field-row { display: flex; gap: 8px; }
.zk-field-inline { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.zk-label { font-size: 12px; font-weight: 600; color: var(--zk-muted); }
.zk-hint { font-size: 12px; color: var(--zk-muted-2); }
.zk-input, .zk-select, .zk-textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--zk-border-strong);
  border-radius: var(--zk-radius-input);
  background: var(--zk-canvas);
  font-size: 14px;
  transition: border-color var(--zk-fast) var(--zk-ease), box-shadow var(--zk-fast) var(--zk-ease);
}
.zk-input:hover, .zk-select:hover, .zk-textarea:hover { border-color: var(--zk-silver); }
.zk-input:focus, .zk-select:focus, .zk-textarea:focus { outline: none; border-color: var(--zk-accent); box-shadow: 0 0 0 3px var(--zk-accent-soft); }
.zk-input.is-invalid { border-color: var(--zk-danger); box-shadow: 0 0 0 3px var(--zk-danger-soft); }
.zk-input::placeholder, .zk-textarea::placeholder { color: var(--zk-muted-2); }
.zk-input--sm, .zk-select--sm { min-height: 32px; padding: 4px 8px; font-size: 13px; }
.zk-input-wrap { position: relative; display: flex; align-items: center; }
.zk-input-wrap .zk-icon { position: absolute; left: 12px; color: var(--zk-silver); pointer-events: none; }
.zk-input-wrap .zk-input { padding-left: 36px; }
.zk-select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.zk-textarea { resize: vertical; line-height: 1.5; }
.zk-check { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; font-size: 14px; cursor: pointer; }
.zk-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--zk-accent); cursor: pointer; }
.zk-checks, .zk-radios { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 0; }
.zk-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.zk-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zk-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.zk-settings { display: flex; flex-direction: column; gap: 24px; }
.zk-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  background: var(--zk-canvas);
  border: 1px solid var(--zk-border);
  border-radius: var(--zk-radius-md);
}
.zk-filters .zk-field { flex: 0 1 160px; }
.zk-filters .zk-field--grow { flex: 1 1 240px; }
.zk-filters__row { display: contents; }
.zk-filters__more { display: contents; }
.zk-filters__toggle { display: none; }
.zk-filters__actions { display: flex; gap: 8px; }
.zk-alert { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px; border: 1px solid var(--zk-border); border-radius: var(--zk-radius-sm); font-size: 14px; animation: zk-rise var(--zk-mid) var(--zk-ease) backwards; }
.zk-alert .zk-icon { margin-top: 2px; flex-shrink: 0; }
.zk-alert__actions { margin-left: auto; flex-shrink: 0; }
.zk-alert--danger { background: var(--zk-danger-soft); border-color: var(--zk-danger-soft); color: var(--zk-danger); }
.zk-alert--success { background: var(--zk-success-soft); border-color: var(--zk-success-soft); color: var(--zk-success); }
.zk-alert--warn { background: var(--zk-warning-soft); border-color: var(--zk-warning-soft); color: var(--zk-warning); }

/* ---------- таблицы ---------- */
.zk-table-wrap { overflow-x: auto; }
.zk-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.zk-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--zk-border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  color: var(--zk-muted-2);
  white-space: nowrap;
}
.zk-table td { height: 44px; padding: 8px 16px; border-bottom: 1px solid var(--zk-border); vertical-align: middle; }
.zk-table tbody tr { transition: background-color var(--zk-fast) var(--zk-ease); }
.zk-table tbody tr:last-child td { border-bottom: 0; }
.zk-table tbody tr:hover { background: var(--zk-panel-alt); }
.zk-table tbody tr[data-href] { cursor: pointer; }
.zk-table tfoot td { font-weight: 600; border-top: 1px solid var(--zk-border); border-bottom: 0; background: var(--zk-panel-alt); }
.zk-table .col-num { text-align: right; font-variant-numeric: tabular-nums; }
.zk-table .th-unit { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--zk-silver); }
.zk-table__wide { min-width: 240px; }
.zk-table__actions { white-space: nowrap; text-align: right; }
.zk-table__actions .zk-inline { margin-left: 4px; }
/* Список лидов: девять колонок должны уместиться в 1152px без горизонтальной прокрутки */
.zk-table--leads th, .zk-table--leads td { padding-left: 12px; padding-right: 12px; }
.zk-table--leads .c-summary { min-width: 200px; }
.zk-table--leads .c-district { white-space: nowrap; }
.zk-cell-link { color: var(--zk-text); }
.zk-cell-link:hover { color: var(--zk-accent); }
.zk-cell-link--strong { font-weight: 500; }
.zk-cell-strong { font-weight: 500; }
.zk-cell-time { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.zk-cell-time small { font-size: 11px; color: var(--zk-muted-2); font-variant-numeric: tabular-nums; }
.zk-cell-author { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--zk-text); }
.zk-cell-author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 112px; }
.zk-cell-author:hover { color: var(--zk-accent); }
.zk-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zk-bar-cell { position: relative; display: inline-block; min-width: 48px; }
.zk-bar-cell::after { content: ""; position: absolute; right: 0; bottom: -6px; width: var(--pct, 0%); max-width: 100%; height: 3px; border-radius: var(--zk-radius-pill); background: var(--zk-accent); opacity: .5; transform-origin: right center; animation: zk-grow var(--zk-slow) var(--zk-ease) backwards; animation-delay: calc(var(--i, 0) * 40ms + 100ms); }
.zk-lead-row.is-updated { animation: zk-flash 1.4s var(--zk-ease); }
.zk-pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--zk-border); }
.zk-pager__info { font-size: 13px; color: var(--zk-muted); font-variant-numeric: tabular-nums; }
.zk-skeleton { display: block; min-width: 48px; height: 12px; border-radius: var(--zk-radius-input); background: var(--zk-shimmer); background-size: 200% 100%; animation: zk-shimmer 1.2s linear infinite; }
.zk-skeleton--pill { height: 22px; width: 64px; border-radius: var(--zk-radius-pill); }
.zk-skeleton--btn { height: 32px; width: 72px; border-radius: var(--zk-radius-sm); display: inline-block; }
.zk-skeleton--w60 { width: 60%; }
.zk-skeleton--w80 { width: 80%; }
.zk-skeleton--w100 { width: 100%; }
.zk-skeleton + .zk-skeleton { margin-top: 8px; }
.zk-skeleton-row td { height: 56px; }

/* ---------- пустой экран с иллюстрацией из CSS ---------- */
.zk-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; }
.zk-empty--compact { padding: 24px 16px; }
.zk-empty--compact .zk-empty__art { transform: scale(.8); margin-bottom: -8px; }
.zk-empty__art { position: relative; width: 96px; height: 72px; margin-bottom: 8px; animation: zk-float 4s var(--zk-ease) infinite; }
.zk-empty__card { position: absolute; left: 12px; right: 12px; top: 8px; bottom: 0; border: 1px solid var(--zk-border-strong); border-radius: var(--zk-radius-sm); background: var(--zk-canvas); }
.zk-empty__card:nth-child(1) { transform: translateY(-12px) scale(.86); opacity: .45; }
.zk-empty__card:nth-child(2) { transform: translateY(-6px) scale(.93); opacity: .7; }
.zk-empty__card:nth-child(3)::before, .zk-empty__card:nth-child(3)::after { content: ""; position: absolute; left: 12px; height: 6px; border-radius: var(--zk-radius-pill); background: var(--zk-paper); }
.zk-empty__card:nth-child(3)::before { top: 14px; width: 60%; background: var(--zk-border); }
.zk-empty__card:nth-child(3)::after { top: 28px; width: 40%; }
.zk-empty__badge { position: absolute; right: 4px; bottom: -6px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--zk-radius-pill); background: var(--zk-accent-soft); color: var(--zk-accent); border: 2px solid var(--zk-canvas); }
.zk-empty__badge--warn { background: var(--zk-warning-soft); color: var(--zk-warning); }
.zk-empty__title { font-size: 16px; font-weight: 600; }
.zk-empty__text { max-width: 480px; font-size: 13px; color: var(--zk-muted); }
.zk-empty__actions { margin-top: 8px; }

/* ---------- карточка лида ---------- */
.zk-page-head--lead .zk-h1 { font-size: 24px; line-height: 1.33; }
.zk-page-head--lead .zk-page-actions { flex-shrink: 0; }
.zk-steps { display: flex; align-items: center; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.zk-steps::-webkit-scrollbar { display: none; }
.zk-step { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 12px; font-weight: 500; color: var(--zk-silver); animation: zk-rise var(--zk-mid) var(--zk-ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.zk-step::after { content: ""; display: block; width: 24px; height: 1px; margin: 0 8px; background: var(--zk-border-strong); }
.zk-step:last-child::after { content: none; }
.zk-step__dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: var(--zk-radius-pill); border: 1px solid var(--zk-border-strong); background: var(--zk-canvas); color: var(--zk-canvas); transition: background-color var(--zk-mid) var(--zk-ease), border-color var(--zk-mid) var(--zk-ease); }
.zk-step__dot .zk-icon { width: 12px; height: 12px; }
.zk-step--current .zk-step__dot::after { content: ""; width: 8px; height: 8px; border-radius: var(--zk-radius-pill); background: currentColor; }
.zk-step--deal.zk-step--current .zk-step__dot::after { content: none; }
.zk-step--done { color: var(--zk-muted); }
.zk-step--done .zk-step__dot { background: var(--zk-accent); border-color: var(--zk-accent); }
.zk-step--done::after { background: var(--zk-accent); }
.zk-step--current { color: var(--zk-accent); font-weight: 600; }
.zk-step--current .zk-step__dot { border-color: var(--zk-accent); color: var(--zk-accent); box-shadow: 0 0 0 3px var(--zk-accent-soft); animation: zk-ring 2s var(--zk-ease) infinite; }
.zk-step--deal.zk-step--current { color: var(--zk-success); }
.zk-step--deal.zk-step--current .zk-step__dot { background: var(--zk-success); border-color: var(--zk-success); color: var(--zk-canvas); box-shadow: 0 0 0 3px var(--zk-success-soft); animation: none; }
.zk-step--end { color: var(--zk-danger); font-weight: 600; }
.zk-step--end .zk-step__dot { background: var(--zk-danger-soft); border-color: var(--zk-danger-soft); color: var(--zk-danger); }
.zk-deal { position: relative; }
.zk-deal summary { list-style: none; }
.zk-deal summary::-webkit-details-marker { display: none; }
.zk-deal[open] > summary { background: var(--zk-success-soft); border-color: var(--zk-success-soft); }
.zk-deal__form {
  position: absolute;
  top: 40px;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 296px;
  padding: 16px;
  background: var(--zk-canvas);
  border: 1px solid var(--zk-border);
  border-radius: var(--zk-radius-md);
  box-shadow: var(--zk-shadow-pop);
  animation: zk-pop-in var(--zk-mid) var(--zk-ease) backwards;
}
.zk-deal__title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.zk-deal__title .zk-icon { color: var(--zk-success); }
.zk-force { gap: 4px; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--zk-border); }
.zk-force .zk-select { width: auto; }
.zk-brief { display: flex; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-left: 2px solid var(--zk-accent); border-radius: 0 var(--zk-radius-sm) var(--zk-radius-sm) 0; background: var(--zk-panel-alt); font-size: 14px; font-weight: 500; color: var(--zk-text-2); }
.zk-brief .zk-icon { color: var(--zk-accent); margin-top: 2px; }
.zk-original { margin-top: 12px; }
.zk-original__summary { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; font-size: 12px; font-weight: 600; color: var(--zk-muted); cursor: pointer; list-style: none; transition: color var(--zk-fast) var(--zk-ease); }
.zk-original__summary::-webkit-details-marker { display: none; }
.zk-original__summary:hover { color: var(--zk-accent); }
.zk-original__summary .zk-icon { transition: transform var(--zk-mid) var(--zk-ease); }
.zk-original[open] .zk-original__summary .zk-icon { transform: rotate(90deg); }
.zk-quote { margin-top: 8px; padding: 12px 16px; border-left: 2px solid var(--zk-border-strong); background: var(--zk-panel-alt); border-radius: 0 var(--zk-radius-sm) var(--zk-radius-sm) 0; font-size: 14px; color: var(--zk-text-2); animation: zk-rise var(--zk-mid) var(--zk-ease) backwards; }
.zk-copyblock { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.zk-copyblock__text { width: 100%; margin: 0; padding: 12px 16px; background: var(--zk-panel-alt); border: 1px solid var(--zk-border); border-radius: var(--zk-radius-sm); font-family: inherit; font-size: 14px; line-height: 1.5; transition: border-color var(--zk-fast) var(--zk-ease); }
.zk-copyblock:hover .zk-copyblock__text { border-color: var(--zk-border-strong); }
.zk-copyblock__btn { flex-shrink: 0; }
.zk-note-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.zk-note-state { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--zk-muted-2); transition: color var(--zk-mid) var(--zk-ease); }
.zk-note-state.is-saving { color: var(--zk-accent); }
.zk-note-state.is-saved { color: var(--zk-success); }
.zk-note-state.is-error { color: var(--zk-danger); }
.zk-facts { display: flex; flex-direction: column; }
.zk-facts__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--zk-border); font-size: 13px; }
.zk-facts__row:last-child { border-bottom: 0; }
.zk-facts dt { display: flex; align-items: center; gap: 6px; color: var(--zk-muted-2); }
.zk-facts dt .zk-icon { width: 14px; height: 14px; color: var(--zk-silver); }
.zk-facts dd { margin: 0; min-width: 0; }
.zk-author-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.zk-author-head .zk-avatar { width: 40px; height: 40px; font-size: 14px; }
.zk-author-head__name { font-size: 14px; font-weight: 600; }
.zk-author-head__sub { font-size: 12px; color: var(--zk-muted); }
.zk-contact-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.zk-commission-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.zk-commission-form .zk-field, .zk-commission-form .zk-facts { width: 100%; }
.zk-share-box { width: 100%; padding: 12px 16px; border-radius: var(--zk-radius-sm); background: var(--zk-success-soft); color: var(--zk-success); }
.zk-share-box__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.zk-share-box__value { display: block; font-size: 20px; line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; }
.zk-events { position: relative; display: flex; flex-direction: column; }
.zk-events::before { content: ""; position: absolute; left: 3px; top: 12px; bottom: 12px; width: 1px; background: var(--zk-border); }
.zk-event { position: relative; display: flex; gap: 12px; padding: 8px 0; }
.zk-event__dot { width: 8px; height: 8px; margin-top: 6px; border-radius: var(--zk-radius-pill); background: var(--zk-silver); flex-shrink: 0; box-shadow: 0 0 0 3px var(--zk-canvas); }
.zk-event__dot--status { background: var(--zk-accent); }
.zk-event__dot--commission { background: var(--zk-success); }
.zk-event__body { display: flex; flex-direction: column; min-width: 0; }
.zk-event__text { font-size: 13px; }
.zk-event__meta { font-size: 12px; color: var(--zk-muted-2); }
.zk-page.is-loading .zk-panel { pointer-events: none; }
.zk-page.is-loading .zk-panel > :not(.zk-panel__head) { opacity: .35; filter: saturate(0); transition: opacity var(--zk-mid) var(--zk-ease); }

/* ---------- логин ---------- */
.zk-body--login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.zk-login { width: 100%; max-width: 400px; animation: zk-rise var(--zk-slow) var(--zk-ease) backwards; }
.zk-login__card { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--zk-canvas); border: 1px solid var(--zk-border); border-radius: var(--zk-radius-lg); }
.zk-login__head { display: flex; align-items: center; justify-content: space-between; }
.zk-login__head .zk-brand { padding: 0; }
.zk-login__head .zk-lang { padding: 0; }
.zk-login__foot { text-align: center; font-size: 12px; color: var(--zk-muted-2); margin-top: 16px; }

/* ---------- тосты ---------- */
.zk-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.zk-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--zk-canvas);
  border: 1px solid var(--zk-border);
  border-radius: var(--zk-radius-md);
  box-shadow: var(--zk-shadow-pop);
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  pointer-events: auto;
  animation: zk-toast-in var(--zk-mid) var(--zk-ease) backwards;
  --zk-toast-color: var(--zk-accent);
  --zk-toast-soft: var(--zk-accent-soft);
}
.zk-toast--error { --zk-toast-color: var(--zk-danger); --zk-toast-soft: var(--zk-danger-soft); }
.zk-toast--success { --zk-toast-color: var(--zk-success); --zk-toast-soft: var(--zk-success-soft); }
.zk-toast__icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--zk-radius-pill); background: var(--zk-toast-soft); color: var(--zk-toast-color); flex-shrink: 0; }
.zk-toast__text { flex: 1; min-width: 0; }
.zk-toast__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--zk-toast-color); transform-origin: left center; animation: zk-drain 3.2s linear forwards; }
.zk-toast:hover .zk-toast__bar { animation-play-state: paused; }
.zk-toast.is-leaving { opacity: 0; transform: translateY(8px) scale(.98); transition: opacity var(--zk-mid) var(--zk-ease), transform var(--zk-mid) var(--zk-ease); }

/* ---------- появление с задержкой ---------- */
.zk-stagger > * { animation: zk-rise .45s var(--zk-ease) backwards; animation-delay: min(calc(var(--i, 0) * 40ms), 480ms); }
.zk-stagger--fast > * { animation-duration: var(--zk-mid); animation-delay: min(calc(var(--i, 0) * 25ms), 400ms); }

@keyframes zk-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes zk-vt-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes zk-vt-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes zk-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes zk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes zk-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes zk-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes zk-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.7); } }
@keyframes zk-ring { 0%, 100% { box-shadow: 0 0 0 3px var(--zk-accent-soft); } 50% { box-shadow: 0 0 0 6px var(--zk-accent-soft); } }
@keyframes zk-spin { to { transform: rotate(360deg); } }
@keyframes zk-flash { from { background-color: var(--zk-success-soft); } to { background-color: transparent; } }
@keyframes zk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes zk-toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes zk-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- отзывчивость ---------- */
@media (max-width: 1023px) {
  .zk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zk-grid--2, .zk-grid--lead { grid-template-columns: minmax(0, 1fr); }
  .zk-form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zk-page-head--lead .zk-page-actions { flex-basis: 100%; }
}
@media (max-width: 767px) {
  .zk-sidebar { display: none; }
  .zk-topbar { display: flex; }
  .zk-tabbar { display: flex; }
  .zk-page { padding: 16px 12px calc(var(--zk-tabbar-h) + env(safe-area-inset-bottom) + 24px); gap: 16px; }
  .zk-page--lead { padding-bottom: calc(var(--zk-tabbar-h) + env(safe-area-inset-bottom) + 136px); }
  .zk-h1 { font-size: 24px; line-height: 1.33; }
  .zk-page-head--lead .zk-h1 { font-size: 20px; line-height: 1.4; }
  .zk-h2 { font-size: 18px; line-height: 1.56; }
  .zk-page-head { gap: 12px; }
  .zk-page-sub { font-size: 13px; }
  .zk-form-grid, .zk-form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .zk-form-actions .zk-btn { flex: 1; }
  .zk-tiles { gap: 8px; }
  .zk-tile { padding: 12px; }
  .zk-tile__value { font-size: 20px; line-height: 1.4; }
  .zk-tile__value--money { font-size: 16px; line-height: 1.5; }
  .zk-funnel__row { grid-template-columns: 96px minmax(0, 1fr) 32px 40px; }
  .zk-row { padding: 12px 4px; margin: 0 -4px; }
  .zk-row__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .zk-row__chev { display: none; }
  .zk-toasts { left: 12px; right: 12px; width: auto; bottom: calc(var(--zk-tabbar-h) + env(safe-area-inset-bottom) + 12px); }
  /* На карточке лида низ занят липкими кнопками статуса: тосты уходят под шапку */
  .zk-body--lead .zk-toasts { top: 64px; bottom: auto; }
  .zk-force { margin-left: 0; padding-left: 0; border-left: 0; flex-basis: 100%; }
  .zk-force .zk-select { flex: 1; }
  /* Крупные тапы: кнопки, поля и переключатели не ниже 44px */
  .zk-btn, .zk-btn--sm { min-height: var(--zk-tap); height: auto; padding-top: 8px; padding-bottom: 8px; }
  .zk-btn--sm { font-size: 14px; }
  .zk-lang__item { min-height: 36px; padding: 6px 12px; }
  .zk-input, .zk-select, .zk-textarea, .zk-input--sm, .zk-select--sm { min-height: var(--zk-tap); font-size: 16px; }
  .zk-check { min-height: 36px; }
  .zk-check input { width: 20px; height: 20px; }
  /* Фильтры: поиск и статус всегда, остальное за кнопкой-переключателем */
  .zk-filters { padding: 12px; gap: 8px; align-items: stretch; }
  .zk-filters .zk-field, .zk-filters .zk-field--grow { flex: 1 1 100%; }
  .zk-filters__row { display: flex; gap: 8px; width: 100%; align-items: flex-end; }
  .zk-filters__row .zk-field { flex: 1 1 auto; }
  .zk-js .zk-filters__more { display: none; width: 100%; flex-wrap: wrap; gap: 8px; }
  .zk-js .zk-filters__more .zk-field { flex: 1 1 calc(50% - 4px); }
  .zk-js .zk-filters.is-open .zk-filters__more, .zk-js .zk-filters.has-active .zk-filters__more { display: flex; animation: zk-rise var(--zk-mid) var(--zk-ease) backwards; }
  .zk-js .zk-filters__toggle { display: inline-flex; width: var(--zk-tap); padding: 0; flex-shrink: 0; }
  .zk-filters.is-open .zk-filters__toggle, .zk-filters.has-active .zk-filters__toggle { color: var(--zk-accent); border-color: var(--zk-accent); background: var(--zk-accent-soft); }
  .zk-filters__toggle .zk-count-pill { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; background: var(--zk-accent); color: var(--zk-canvas); }
  .zk-filters__actions { width: 100%; }
  .zk-filters__actions .zk-btn { flex: 1; }
  /* Таблицы с подписями превращаются в список карточек: шапка скрыта, каждая ячейка подписана data-label */
  .zk-panel--table { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .zk-panel--table .zk-empty { background: var(--zk-canvas); border: 1px solid var(--zk-border); border-radius: var(--zk-radius-md); }
  .zk-table thead { display: none; }
  .zk-table, .zk-table tbody, .zk-table tfoot, .zk-table tr, .zk-table td { display: block; }
  .zk-table tbody, .zk-table tfoot { display: flex; flex-direction: column; gap: 8px; }
  .zk-table tfoot { margin-top: 8px; }
  .zk-table tr { padding: 12px 16px; background: var(--zk-canvas); border: 1px solid var(--zk-border); border-radius: var(--zk-radius-md); transition: transform var(--zk-fast) var(--zk-ease), border-color var(--zk-fast) var(--zk-ease); }
  .zk-table tbody tr:hover { background: var(--zk-canvas); }
  .zk-table tbody tr[data-href]:active { transform: scale(.99); }
  .zk-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: auto; min-height: 28px; padding: 4px 0; border-bottom: 0; text-align: right; }
  .zk-table td::before { content: attr(data-label); flex-shrink: 0; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--zk-muted-2); text-align: left; }
  .zk-table td:empty { display: none; }
  .zk-table .col-num { text-align: right; }
  .zk-table tfoot td { background: transparent; border-top: 0; }
  .zk-table tfoot tr { background: var(--zk-panel-alt); }
  .zk-table__wide { min-width: 0; }
  .zk-table__actions { justify-content: flex-end; }
  .zk-table__actions::before { content: none; }
  .zk-table--users td, .zk-table--codes td { text-align: left; }
  .zk-table--users .zk-input, .zk-table--users .zk-select { max-width: 60%; }
  .zk-table--users .zk-table__actions .zk-btn { width: 100%; }
  .zk-bar-cell::after { display: none; }
  .zk-pager { border-top: 0; padding: 8px 0; }
  .zk-pager .zk-btn { flex: 1; }
  /* Список лидов: строка становится карточкой с собственной раскладкой, без подписей */
  .zk-table--leads tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .zk-table--leads td { display: block; min-height: 0; padding: 0; text-align: left; }
  .zk-table--leads td::before { content: none; }
  .zk-table--leads .c-time { order: 1; }
  .zk-table--leads .c-tier { order: 2; }
  .zk-table--leads .c-status { order: 3; margin-left: auto; }
  .zk-table--leads .c-summary { order: 4; flex: 0 0 100%; margin-top: 4px; }
  .zk-table--leads .c-summary .zk-clamp { -webkit-line-clamp: 3; }
  .zk-table--leads .c-summary .zk-cell-link--strong { font-size: 14px; line-height: 1.43; }
  .zk-table--leads .c-meta { order: 5; display: inline-flex; align-items: center; font-size: 12px; color: var(--zk-muted); max-width: 100%; }
  .zk-table--leads .c-meta:not(:empty) ~ .c-meta:not(:empty)::before { content: "·"; margin-right: 8px; color: var(--zk-silver); }
  .zk-table--leads .c-meta .zk-cell-author { gap: 4px; }
  .zk-table--leads .c-meta .zk-avatar { display: none; }
  .zk-table--leads .c-actions { order: 6; flex: 0 0 100%; display: flex; gap: 8px; margin-top: 8px; }
  .zk-table--leads .c-actions:empty { display: none; }
  .zk-table--leads .c-actions .zk-inline { flex: 1; margin: 0; }
  .zk-table--leads .c-actions .zk-btn { width: 100%; }
  .zk-table--leads .zk-cell-time { flex-direction: row; align-items: baseline; gap: 6px; }
  .zk-table--leads .zk-skeleton-row .c-summary { flex: 0 0 100%; }
  /* Карточка лида: кнопки статуса липнут к низу над таббаром, форма сделки всплывает над ними */
  .zk-page-head--lead .zk-page-actions { position: fixed; left: 0; right: 0; bottom: calc(var(--zk-tabbar-h) + env(safe-area-inset-bottom)); z-index: 19; padding: 8px 12px; background: var(--zk-canvas); border-top: 1px solid var(--zk-border); }
  .zk-page-head--lead .zk-page-actions .zk-inline, .zk-page-head--lead .zk-page-actions .zk-deal { flex: 1 1 calc(50% - 4px); }
  .zk-page-head--lead .zk-page-actions .zk-btn { width: 100%; }
  .zk-page-head--lead .zk-page-actions .zk-force { display: flex; flex-basis: 100%; }
  .zk-page-head--lead .zk-page-actions .zk-force .zk-btn { width: auto; }
  .zk-deal__form { position: fixed; top: auto; right: 12px; left: 12px; bottom: calc(var(--zk-tabbar-h) + env(safe-area-inset-bottom) + 8px); width: auto; z-index: 25; animation-name: zk-rise; }
  .zk-steps { margin-top: 8px; }
  .zk-step::after { width: 12px; margin: 0 4px; }
  /* На телефоне подписи только у текущего шага, следующего за ним и финального; остальные шаги лишь точки */
  .zk-step:not(.zk-step--current):not(.zk-step--end) > span:last-child { display: none; }
  .zk-steps .zk-step--current + .zk-step > span:last-child { display: inline; }
  .zk-copyblock__btn { width: 100%; }
  .zk-btn--skip { width: 100%; padding: 8px 12px; }
  .zk-btn--skip .zk-btn__label { display: inline; }
  .zk-facts__row { grid-template-columns: 96px minmax(0, 1fr); }
  .zk-author-head .zk-avatar { width: 36px; height: 36px; }
  .zk-login__card { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .zk-no-vt.is-leaving .zk-page { opacity: 1 !important; transform: none !important; }
}
