/* ============================================================================
   BINCORT — единая дизайн-система
   v2.0.7 — VK-proportioned buttons, plain language for non-technical users
   Базовые цвета: cream (#f8f7f2) и navy (#071b34)
   ============================================================================ */

/* ── Дизайн-токены ──────────────────────────────────────────────────────── */
:root {
  /* Цвета */
  --bg: #f8f7f2;
  --bg-elev: #fbfaf6;
  --surface: #ffffff;
  --surface-soft: #f0eee7;
  --ink: #071b34;
  --ink-2: #0b274a;
  --muted: #5a6a7e;
  --muted-2: #7c8998;
  --line: rgba(8, 29, 57, 0.10);
  --line-2: rgba(8, 29, 57, 0.18);
  --good: #246b53;
  --good-bg: #e9f4ef;
  --warn: #8a5d12;
  --warn-bg: #fff3d9;
  --danger: #a23a30;
  --danger-bg: #fff0ed;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(8, 29, 57, 0.04), 0 1px 6px rgba(8, 29, 57, 0.04);
  --shadow-md: 0 8px 24px rgba(8, 29, 57, 0.06), 0 2px 6px rgba(8, 29, 57, 0.04);
  --shadow-lg: 0 22px 60px rgba(8, 29, 57, 0.10);

  /* Радиусы */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Раскладка */
  --container: 1200px;
  --gutter: 24px;

  /* Типографика — системный стек, без внешних шрифтов */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Segoe UI",
          system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Mono", "Roboto Mono", monospace;

  /* Анимации */
  --easing: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── База ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body, html { width: 100%; max-width: 100%; }

a { color: inherit; text-decoration: none; transition: color 0.18s var(--easing); }
a:hover { color: var(--ink-2); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { border: 0; background: none; font: inherit; cursor: pointer; color: inherit; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

/* ── Контейнер ──────────────────────────────────────────────────────────── */
.container {
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin: 0 auto;
}

/* ── Доступность ────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r-md);
  z-index: 999;
  font-weight: 600;
  transition: top 0.2s var(--easing);
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Типографика ────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { margin: 0 0 0.4em; color: var(--ink); }
h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}
h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.028em;
  font-weight: 700;
}
h3 {
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 600;
}
p { margin: 0 0 1em; color: var(--muted); }
.lead {
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
  color: #4c5d70;
  max-width: 720px;
}
.eyebrow, .kicker {
  display: inline-block;
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ── Шапка с glass-навигацией (логотип сверху, меню по центру под ним) ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 22px 0 16px;
  background: linear-gradient(180deg, rgba(248, 247, 242, 0.96) 0%, rgba(248, 247, 242, 0.78) 70%, rgba(248, 247, 242, 0) 100%);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.header-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  width: 190px;
  height: auto;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}
.glass-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 14px 36px rgba(8, 29, 57, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.glass-nav::-webkit-scrollbar { display: none; }
.glass-nav a {
  flex: 0 0 auto;
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: #31425a;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.18s var(--easing), color 0.18s var(--easing);
}
.glass-nav a:hover {
  background: rgba(8, 29, 57, 0.06);
  color: var(--ink);
}
.glass-nav a.active {
  background: var(--ink);
  color: #fff;
}
.login-icon-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  transition: background 0.18s var(--easing), transform 0.18s var(--easing);
}
.login-icon-btn:hover { background: var(--ink-2); }
.login-icon-btn:active { transform: scale(0.96); }
.login-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ── Кнопки ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s var(--easing), transform 0.18s var(--easing), box-shadow 0.18s var(--easing);
  box-shadow: 0 4px 14px rgba(8, 29, 57, 0.12);
}
.btn:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(8, 29, 57, 0.18); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--surface-soft); color: var(--ink); transform: translateY(-1px); }
.btn-soft {
  background: rgba(8, 29, 57, 0.06);
  color: var(--ink);
  box-shadow: none;
}
.btn-soft:hover { background: rgba(8, 29, 57, 0.1); color: var(--ink); transform: translateY(-1px); box-shadow: none; }
.btn-invert { background: #fff; color: var(--ink); }
.btn-invert:hover { background: #f0eee7; color: var(--ink); }
.btn-large { min-height: 52px; padding: 0 28px; font-size: 16px; }

/* ── Секции ─────────────────────────────────────────────────────────────── */
.main { display: block; min-height: 60vh; }
.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section-bg-soft { background: var(--bg); }
.section-bg-elev { background: var(--bg-elev); }
.section-bg-ink { background: var(--ink); color: #fff; }
.section-bg-ink h1, .section-bg-ink h2, .section-bg-ink h3, .section-bg-ink p { color: inherit; }
.section-bg-ink p { color: rgba(255, 255, 255, 0.78); }

/* Заголовок секции */
.section-head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head.left { text-align: left; margin-left: 0; }
.section-head p { color: var(--muted); font-size: 18px; line-height: 1.55; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 56px 0 88px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 28px;
  border-radius: var(--r-pill);
  background: rgba(8, 29, 57, 0.06);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.hero h1 {
  max-width: 980px;
  margin: 0 auto 24px;
}
.hero .lead {
  margin: 0 auto 36px;
  text-align: center;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
}

/* Демо-карточка под Hero */
.hero-demo {
  margin: 0 auto;
  max-width: 920px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.hero-demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-demo-top .label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.flow-list { display: grid; gap: 10px; }
.flow-list article {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: start;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
}
.flow-list time { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.flow-list strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 15px; font-weight: 600; }
.flow-list p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }

/* ── Карточки ───────────────────────────────────────────────────────────── */
.card,
.feature,
.channel-card,
.step-card,
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s var(--easing), box-shadow 0.24s var(--easing), border-color 0.24s var(--easing);
}
.card:hover,
.feature:hover,
.channel-card:hover,
.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.card-num,
.step-num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Сетки */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Каналы (компактные плитки) ─────────────────────────────────────────── */
.channels-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.channel-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.channel-chip.muted { background: transparent; color: var(--muted); }

/* ── Тарифы ─────────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.price-card {
  display: flex;
  flex-direction: column;
  padding: 32px 26px;
}
.price-card .plan-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.price-card h3 {
  font-size: 24px;
  margin-bottom: 14px;
}
.price-card .desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 60px;
  margin-bottom: 18px;
}
.price-card .amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 4px;
}
.price-card .amount-extra {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.price-card li {
  position: relative;
  padding-left: 22px;
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 8px;
  border-left: 2px solid var(--good);
  border-bottom: 2px solid var(--good);
  transform: rotate(-45deg) translateY(-2px);
}
.price-card .btn { margin-top: auto; }
.price-card.featured {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.price-card.featured h3,
.price-card.featured .amount { color: #fff; }
.price-card.featured .desc,
.price-card.featured ul,
.price-card.featured .plan-name,
.price-card.featured .amount-extra { color: rgba(255, 255, 255, 0.78); }
.price-card.featured li::before { border-color: #c8e1d6; }
.price-card.featured .btn-soft { background: rgba(255, 255, 255, 0.14); color: #fff; }
.price-card.featured .btn-soft:hover { background: rgba(255, 255, 255, 0.22); }

/* ── CTA блок ───────────────────────────────────────────────────────────── */
.cta-block {
  margin-top: 64px;
  padding: 56px 48px;
  border-radius: var(--r-xl);
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.cta-block h2 { color: #fff; margin: 0 auto 16px; max-width: 720px; }
.cta-block p { color: rgba(255, 255, 255, 0.8); margin: 0 auto 28px; max-width: 600px; font-size: 17px; }
.cta-block .btn { background: #fff; color: var(--ink); }
.cta-block .btn:hover { background: var(--bg); color: var(--ink); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.18s var(--easing), box-shadow 0.18s var(--easing);
}
.faq-list details[open] {
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 400;
  font-size: 22px;
  color: var(--muted);
  transition: transform 0.2s var(--easing), background 0.2s var(--easing);
}
.faq-list details[open] summary::after {
  content: "−";
  background: var(--ink);
  color: #fff;
}
.faq-list .answer {
  padding: 0 24px 22px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

/* ── Калькулятор Individual ─────────────────────────────────────────────── */
.calc-box {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.calc-form { display: grid; gap: 18px; }
.calc-row { display: grid; gap: 8px; }
.calc-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.calc-row input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  outline: none;
  font-size: 16px;
  transition: border-color 0.15s var(--easing);
}
.calc-row input[type="number"]:focus { border-color: var(--ink); }
.calc-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.calc-modules label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s var(--easing), background 0.15s var(--easing);
}
.calc-modules label:hover { border-color: var(--line-2); }
.calc-modules input[type="checkbox"] { accent-color: var(--ink); }
.calc-result {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}
.calc-result .label {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.66);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.calc-result .price {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
  color: #fff;
}
.calc-result .meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 18px;
}

/* ── Page hero (внутренние страницы) ────────────────────────────────────── */
.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.page-hero .breadcrumbs {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.page-hero .breadcrumbs a:hover { color: var(--ink); }
.page-hero h1 {
  margin: 0 0 16px;
  max-width: 920px;
}
.page-hero .lead { margin-bottom: 0; }

/* ── Документы (privacy, offer, cookies и др.) ──────────────────────────── */
.doc-body { max-width: 800px; }
.doc-body h2 { margin-top: 48px; font-size: 22px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { margin-top: 28px; font-size: 17px; }
.doc-body p, .doc-body li { font-size: 16px; line-height: 1.75; color: #4d5f74; }
.doc-body ul, .doc-body ol { padding-left: 1.5em; margin: 0 0 1em; }
.doc-body li { margin-bottom: 0.35em; }
.doc-body strong { color: var(--ink); }
.doc-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-body .doc-note {
  background: var(--bg);
  border-left: 3px solid var(--ink);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin: 24px 0;
  font-size: 15px;
  color: var(--muted);
}

/* ── Документ — таблица (cookies.html и др.) ────────────────────────────── */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 1.5em;
}
.doc-table th {
  text-align: left;
  padding: 8px 12px 8px 0;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid var(--line-2);
}
.doc-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc-table td:not(:first-child) { padding-left: 12px; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table code { font-family: var(--mono); font-size: 13px; }

/* ── Органические / SEO секции ──────────────────────────────────────────── */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.seo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.seo-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
}
.seo-card li {
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.seo-card li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted-2);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 32px;
}
.compare-table th {
  padding: 16px 20px;
  text-align: left;
  background: var(--bg-elev);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--line-2);
}
.compare-table th:first-child { width: 36%; }
.compare-table td {
  padding: 14px 20px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .col-yes { color: var(--good); font-weight: 600; }
.compare-table .col-no { color: var(--danger); }
.compare-table td:nth-child(2) { background: rgba(36, 107, 83, 0.025); }

/* ── Прозрачный текст-блок ──────────────────────────────────────────────── */
.prose { max-width: 760px; }
.prose h2 { margin-top: 48px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li {
  font-size: 17px;
  line-height: 1.7;
  color: #4d5f74;
}

/* ── Каналы (страница) ──────────────────────────────────────────────────── */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.channel-card {
  display: flex;
  flex-direction: column;
}
.channel-card .channel-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.channel-card p { flex: 1; font-size: 15px; line-height: 1.55; }
.channel-card .channel-status {
  margin-top: 16px;
  align-self: flex-start;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 12px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  font-weight: 500;
}
.footer-grid p, .footer-grid a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.55;
  display: block;
  margin: 0 0 8px;
}
.footer-grid a:hover { color: #fff; }
.footer-grid .brand img { width: 144px; margin-bottom: 18px; }
.footer-social-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.footer-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap;
}
.footer-social-btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.footer-social-btn svg { flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Модалка авторизации ─────────────────────────────────────────────────
   Bootstrap 5 pattern: backdrop scrolls, card never clipped.
   - .modal         — фиксированный backdrop с overflow-y: auto
   - .modal-scroll  — flex-контейнер c min-height calc(100% - 48px)
                      центрирует карточку когда та короче вьюпорта;
                      когда длиннее — backdrop начинает скроллиться
   - .modal-card    — без overflow:hidden, чтобы не обрезать поля
────────────────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: rgba(8, 29, 57, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  outline: 0;
  display: none;
}
.modal.open {
  display: block;
  animation: modalFade 0.2s var(--easing);
}
@keyframes modalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* Flex-wrapper: min-height = 100% минус (margin-top + margin-bottom = 48px) */
.modal-scroll {
  min-height: calc(100% - 48px);
  margin: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  box-sizing: border-box;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(8, 29, 57, 0.22);
  animation: modalSlide 0.3s var(--easing);
}
.modal-body {
  padding: 32px;
  box-sizing: border-box;
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-head img { width: 130px; }
.icon-button {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s var(--easing);
}
.icon-button:hover { background: var(--surface-soft); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-panel h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.auth-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 22px;
}
.form { display: grid; gap: 14px; width: 100%; box-sizing: border-box; }
.field { display: grid; gap: 6px; width: 100%; min-width: 0; box-sizing: border-box; }
.field span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: var(--r-sm);
  padding: 0 14px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s var(--easing);
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--ink); }
.field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}
.field-checkbox input[type="checkbox"] {
  min-height: auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
.field-checkbox span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.field-checkbox a { color: var(--ink); text-decoration: underline; }
.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.auth-actions .btn { min-height: 48px; }
.auth-link {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  background: transparent;
}
.auth-link:hover { color: var(--ink); }
.auth-verify-box {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  display: grid;
  gap: 12px;
}
.auth-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.message {
  display: none;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-top: 6px;
}
.message.show { display: block; }
.message:not(.error):not(.ok) {
  background: var(--bg);
  color: var(--muted);
}
.message.ok { background: var(--good-bg); color: var(--good); }
.message.error { background: var(--danger-bg); color: var(--danger); }

/* ── Cookie-баннер ──────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  margin-inline: auto;
  width: auto;
  max-width: 880px;
  z-index: 1200;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.32s var(--easing), transform 0.32s var(--easing);
}
.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cookie-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(8, 29, 57, 0.10);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px rgba(8, 29, 57, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.cookie-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.cookie-text { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cookie-text a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ── Reveal-анимации ────────────────────────────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--easing), transform 0.7s var(--easing);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Адаптив ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .calc-box { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .seo-grid { grid-template-columns: 1fr; }
  .compare-table th:first-child { width: auto; }
  .compare-table th, .compare-table td { padding: 12px 14px; font-size: 13px; }
  .hero { padding: 32px 0 64px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-demo { padding: 20px; }
  .flow-list article { grid-template-columns: 1fr; gap: 6px; padding: 14px; }
  .site-header { padding: 16px 0 12px; }
  .header-stack { gap: 12px; }
  .brand img { width: 156px; }
  .nav-wrap { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-wrap::-webkit-scrollbar { display: none; }
  .glass-nav { padding: 5px; gap: 1px; }
  .glass-nav a {
    font-size: 12px;
    padding: 0 12px;
    height: 34px;
  }
  .login-icon-btn { flex: 0 0 40px; width: 40px; height: 40px; }
  .login-icon-btn svg { width: 16px; height: 16px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-block { padding: 40px 24px; }
  .cookie-panel { grid-template-columns: 1fr; gap: 12px; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .auth-grid-2, .auth-actions { grid-template-columns: 1fr; }
  .calc-modules { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 32px); }
  .glass-nav a[data-mobile-hide] { display: none; }
  .modal-scroll { margin: 12px 8px; min-height: calc(100% - 24px); }
  .modal-card { border-radius: var(--r-lg); }
  .modal-body { padding: 20px 16px; }
  .price-card { padding: 26px 22px; }
  .cta-block { padding: 32px 20px; border-radius: var(--r-lg); }
  .page-hero { padding: 48px 0 40px; }
  .hero-tag { font-size: 12px; padding: 5px 12px; }
}

/* ── Нижняя навигация (мобильный, ≤ 768px) ──────────────────────────────── */
.bottom-nav {
  display: none;
}
@media (max-width: 768px) {
  body.has-bottom-nav { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--line-2);
    z-index: 150;
  }
  .bottom-nav a, .bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav a:hover, .bottom-nav button:hover,
  .bottom-nav a.active, .bottom-nav button.active { color: var(--ink); }
  .bottom-nav svg { width: 22px; height: 22px; stroke-width: 1.6; }
  /* скрыть верхнее меню на мобиле — его заменяет нижнее */
  .site-header .glass-nav { display: none; }
  .site-header .nav-wrap { display: none; }
  .site-header { padding: 14px 0 14px; }
  .header-stack { gap: 0; }
}

/* ── Admin (owner control) ────────────────────────────────────────────────── */
.admin-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: grid;
  gap: 24px;
}
.admin-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: 0 4px 24px rgba(8, 29, 57, 0.06);
}
.admin-card-wide { max-width: 100%; }
.admin-card img { height: 36px; margin-bottom: 8px; }
.admin-card .lead { color: var(--muted); font-size: 14px; line-height: 1.6; }
.admin-card .lead code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: rgba(8, 29, 57, 0.06);
  padding: 1px 6px; border-radius: 4px; font-size: 12px;
}
.admin-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.admin-grid article {
  background: var(--bg-elev);
  border: 1px solid rgba(8, 29, 57, 0.08);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: grid; gap: 4px;
}
.admin-grid article span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.admin-grid article b {
  font-size: 22px;
  color: var(--ink);
  font-weight: 600;
}
.admin-output {
  background: rgba(8, 29, 57, 0.04);
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
  max-height: 600px;
}
.admin-output-block { margin-top: 16px; }
.admin-output-block summary {
  cursor: pointer; font-weight: 500; color: var(--muted);
  padding: 8px 0;
}
.admin-filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.admin-filters input, .admin-filters select {
  box-sizing: border-box;
  min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 16px;
  font-family: inherit;
}
.admin-filters input { flex: 1; min-width: 200px; }
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(8, 29, 57, 0.08);
  border-radius: var(--r-sm);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th, .admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(8, 29, 57, 0.06);
  white-space: nowrap;
}
.admin-table th {
  background: var(--bg-elev);
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(8, 29, 57, 0.02); }
.admin-pagination {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid rgba(8, 29, 57, 0.15);
  min-height: 36px; padding: 0 14px; font-size: 13px;
}
.btn-ghost:hover { background: rgba(8, 29, 57, 0.05); border-color: var(--ink); }
.btn-tiny {
  min-height: 28px; padding: 0 10px; font-size: 12px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(8, 29, 57, 0.08);
  color: var(--ink);
}
.badge-active, .badge-trial_active { background: rgba(36, 107, 83, 0.15); color: var(--good); }
.badge-grace, .badge-past_due { background: rgba(138, 93, 18, 0.15); color: var(--warn); }
.badge-suspended, .badge-cancelled { background: rgba(162, 58, 48, 0.15); color: var(--danger); }
.badge-trial_available { background: rgba(8, 29, 57, 0.06); color: var(--muted); }

/* ============================================================================
   BINCORT — Личный кабинет
   ============================================================================ */

/* ── Базовые утилиты кабинета ─────────────────────────────────────────────── */
.hint {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Раскладка кабинета ───────────────────────────────────────────────────── */
.cabinet-body { overflow: hidden; }

.cabinet-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.cabinet-side {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 12px;
  overflow-y: auto;
}
.cabinet-side p { margin: 0; font-size: 13px; color: var(--muted); }
.cabinet-side .btn { font-size: 14px; min-height: 40px; width: 100%; justify-content: center; }
.cabinet-side .btn-soft { background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); }
.cabinet-side .btn-soft:hover { background: var(--line-2); }
.cabinet-side .btn-ghost { border-color: var(--line-2); color: var(--muted); }
.cabinet-side .btn-ghost:hover { background: var(--bg); color: var(--ink); }

.cabinet-logo { display: block; padding: 4px 8px 8px; }
.cabinet-logo img { height: 28px; width: auto; }

.business-id-card {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}
.business-id-card span { color: var(--muted); display: block; margin-bottom: 2px; }
.business-id-card strong { font-size: 15px; display: block; color: var(--ink); }
.business-id-card small { color: var(--muted); }
.business-id-card b { color: var(--ink); }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.side-nav button[data-tab] {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  color: var(--muted);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.side-nav button[data-tab]:hover { background: var(--bg); color: var(--ink); }
.side-nav button[data-tab].active { background: rgba(8,29,57,0.08); color: var(--ink); font-weight: 600; }

.cabinet-main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cabinet-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.cabinet-top h1 { margin: 4px 0 8px; font-size: 26px; font-weight: 700; }
.cabinet-top .eyebrow { margin-bottom: 0; }
.cabinet-top .hint { max-width: 560px; }

.account-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}
.account-status-banner[hidden] { display: none; }
.account-status-info    { background: #e8f4fd; color: #1a6fa0; border: 1px solid #b8d8f0; }
.account-status-warn    { background: #fff8e1; color: #7a5800; border: 1px solid #ffe082; }
.account-status-danger  { background: #fdecea; color: #a93226; border: 1px solid #f5c6c2; }

.cabinet-status-pill {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Табы ─────────────────────────────────────────────────────────────────── */
.cabinet-section { display: none; }
.cabinet-section.active { display: contents; }

/* ── Панели ───────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.panel h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.panel > .hint { margin-bottom: 16px; }
.panel.wide { grid-column: 1 / -1; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.panel-title-row h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.panel-title-row .hint { margin: 0; }

/* ── Метрики ──────────────────────────────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.metric-grid article {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-grid article span { font-size: 13px; color: var(--muted); font-weight: 500; }
.metric-grid article b { font-size: 28px; font-weight: 700; color: var(--ink); }

/* ── Список ───────────────────────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; gap: 10px; }
.empty {
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ── Заявки ───────────────────────────────────────────────────────────────── */
.lead-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lead-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.lead-card-info { display: flex; flex-direction: column; gap: 2px; }
.lead-card-info strong { font-size: 15px; font-weight: 600; }
.lead-card-info small { font-size: 12px; color: var(--muted); }
.lead-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lead-message { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.lead-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-id { font-size: 11px; color: var(--muted-2); }
.lead-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  background: rgba(8,29,57,0.06);
  color: var(--muted);
}
.lead-status.status-new { background: rgba(8,29,57,0.08); color: var(--ink); }
.lead-status.status-progress { background: rgba(36,107,83,0.12); color: var(--good); }
.lead-status.status-done { background: rgba(36,107,83,0.08); color: var(--good); }
.lead-status.status-spam, .lead-status.status-dup { background: rgba(162,58,48,0.08); color: var(--danger); }
.lead-priority {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  background: rgba(138,93,18,0.12);
  color: var(--warn);
}

/* ── Биллинг ──────────────────────────────────────────────────────────────── */
.billing-summary { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; }
.billing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  gap: 8px;
}
.billing-row:last-child { border-bottom: none; }
.billing-row span:first-child { color: var(--muted); }
.billing-row strong { font-weight: 600; }
.billing-row.warn { background: var(--warn-bg); margin: 0 -16px; padding: 10px 16px; }
.billing-status { font-weight: 600; }
.billing-status.status-ok { color: var(--good); }
.billing-status.status-warn { color: var(--warn); }
.billing-status.status-bad { color: var(--danger); }
.billing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.billing-actions .btn { min-width: 100px; }
.trial-cta {
  background: var(--good-bg);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.trial-cta p { margin: 0; font-size: 14px; color: var(--good); flex: 1; }

/* ── Настройки ────────────────────────────────────────────────────────────── */
.settings-help-note {
  background: var(--surface-soft);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-help-note strong { font-size: 14px; font-weight: 600; }
.settings-help-note span { font-size: 14px; color: var(--muted); }
.settings-grid-live {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.settings-form .field { margin-bottom: 0; }
.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ── 152-ФЗ секция в настройках ──────────────────────────────────────────── */
.settings-pd-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.settings-pd-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.btn-danger-hover:hover { background: var(--danger, #d9534f); color: #fff; border-color: var(--danger, #d9534f); }
.settings-logout-row {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}

/* ── Сводка состояния ─────────────────────────────────────────────────────── */
.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.control-row:last-child { border-bottom: none; }
.control-row span { color: var(--muted); }
.control-row strong { font-weight: 600; }
.control-row.warn { color: var(--warn); }
.control-row.warn span { color: var(--warn); }

/* ── Действия (action-center) ─────────────────────────────────────────────── */
.action-item {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-soft);
  border-left: 3px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.action-item strong { font-size: 14px; font-weight: 600; }
.action-item p { margin: 0; font-size: 13px; color: var(--muted); }
.action-urgent { border-left-color: var(--danger); background: var(--danger-bg); }
.action-urgent strong { color: var(--danger); }
.action-high { border-left-color: var(--warn); background: var(--warn-bg); }
.action-high strong { color: var(--warn); }
.action-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.action-warn strong { color: var(--warn); }
.action-ok { border-left-color: var(--good); background: var(--good-bg); }

/* ── AI-бейджики ──────────────────────────────────────────────────────────── */
.ai-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  line-height: 1.6;
  white-space: nowrap;
}
.ai-badge-complaint { background: var(--danger-bg); color: var(--danger); }
.ai-badge-support   { background: var(--warn-bg);   color: var(--warn); }
.ai-badge-billing   { background: #e8f0fe;           color: #1967d2; }
.ai-badge-sales     { background: var(--good-bg);    color: var(--good); }
.ai-badge-question  { background: #e8f0fe;           color: #1967d2; }
.ai-badge-spam      { background: var(--bg-elev);    color: var(--muted); }

/* ── Фильтры списка заявок ────────────────────────────────────────────────── */
.lead-filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.lead-filter-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.lead-filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.lead-filter-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Модал карточки лида ──────────────────────────────────────────────────── */
.lead-modal-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}
.lead-modal-field label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.lead-modal-field span { font-size: 14px; line-height: 1.45; }
.lead-modal-message {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
}
.lead-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

/* ── Каналы ───────────────────────────────────────────────────────────────── */
.channel-catalog-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.channel-catalog-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.channel-catalog-top strong { font-size: 15px; font-weight: 600; display: block; }
.channel-catalog-top small { font-size: 12px; color: var(--muted); }
.channel-catalog-top p { margin: 0; font-size: 14px; color: var(--muted); }
.channel-catalog-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.channel-catalog-meta div { display: flex; gap: 6px; font-size: 13px; }
.channel-catalog-meta b { color: var(--muted); min-width: 140px; flex-shrink: 0; }
.channel-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
}
.channel-status.status-ok { background: var(--good-bg); color: var(--good); }
.channel-status.status-warn { background: var(--warn-bg); color: var(--warn); }

/* ── Помощь ───────────────────────────────────────────────────────────────── */
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.help-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.help-card span { font-size: 28px; font-weight: 800; color: var(--line-2); display: block; margin-bottom: 4px; }
.help-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.help-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.help-card.primary { border-color: rgba(8,29,57,0.15); background: var(--surface); }
.help-flow {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.help-flow h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.help-flow ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.help-flow li { font-size: 14px; line-height: 1.5; }
.help-channel-list { margin-bottom: 20px; }
.help-channel-list h3 { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.help-channel-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.help-channel-row:last-child { border-bottom: none; }
.help-channel-row b { min-width: 200px; flex-shrink: 0; font-weight: 600; }
.help-channel-row span { color: var(--muted); }
.help-warnings {
  background: var(--surface-soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.help-warnings h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.help-warnings ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.help-warnings li { font-size: 14px; line-height: 1.5; }
.help-warnings.danger-soft { background: var(--danger-bg); }
.help-warnings.danger-soft h3 { color: var(--danger); }

/* ── Адаптивность кабинета ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
  .settings-grid-live { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .help-channel-row b { min-width: 140px; }
}

/* Мобильная шапка кабинета (только на мобиле) */
.cabinet-mobile-header { display: none; }

/* Нижняя навигация кабинета (только на мобиле) */
.cabinet-bottom-nav { display: none; }

@media (max-width: 768px) {
  .cabinet-shell { flex-direction: column; height: auto; overflow: visible; }
  .cabinet-side { display: none; }
  .cabinet-main { padding: 16px; overflow-y: visible; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .cabinet-top h1 { font-size: 20px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid article b { font-size: 22px; }
  .billing-actions { flex-direction: column; }
  .billing-actions .btn { width: 100%; }
  .lead-card-top { flex-direction: column; }
  .lead-card-meta { align-items: flex-start; flex-direction: row; }
  .help-channel-row { flex-direction: column; gap: 2px; }
  .help-channel-row b { min-width: unset; }
  .billing-row { flex-direction: column; gap: 4px; }
  .settings-actions { flex-direction: column; }
  .settings-actions .btn { width: 100%; }
  .panel-grid { grid-template-columns: 1fr; }
  .control-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .channel-catalog-meta b { min-width: 110px; }
  .account-status-banner { font-size: 13px; padding: 10px 14px; }

  /* Разрешаем скролл body на мобиле (на десктопе overflow:hidden нужен для фиксированного layout) */
  body.cabinet-body { overflow: auto; }

  /* Мобильная шапка */
  .cabinet-mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line-2);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .cabinet-mobile-header img { height: 20px; width: auto; }
  .cabinet-mobile-header .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }

  /* Нижняя навигация */
  .cabinet-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--line-2);
    z-index: 150;
  }
  .cabinet-bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .cabinet-bottom-nav button:hover,
  .cabinet-bottom-nav button.active { color: var(--ink); }
  .cabinet-bottom-nav svg { width: 22px; height: 22px; stroke-width: 1.6; }
}

@media (max-width: 480px) {
  .cabinet-main { padding: 12px; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .cabinet-top { padding: 14px 0 10px; }
  .cabinet-top h1 { font-size: 18px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-grid article { padding: 12px 10px; }
  .metric-grid article b { font-size: 20px; }
  .lead-card { padding: 12px; }
  .billing-summary { padding: 14px; }
  .trial-cta { padding: 14px; }
  .trial-cta h3 { font-size: 15px; }
  .help-grid { grid-template-columns: 1fr; }
  .help-card { padding: 12px 14px; }
  .help-flow { padding: 14px; }
  .channel-catalog-card { padding: 10px 12px; }
  .channel-catalog-meta b { min-width: 90px; }
  .settings-form .field input,
  .settings-form .field textarea { font-size: 16px; min-height: 44px; }
  .section-panel { padding: 14px; }
  .section-panel h2 { font-size: 16px; }
}
