:root {
  --crm-bg: #f9f9fb;
  --crm-card: #ffffff;
  --crm-border: #e4e4e7;
  --crm-border-strong: #d1d1d6;
  --crm-text: #111118;
  --crm-muted: #5a5a6a;
  --crm-faint: #9090a0;
  --crm-accent: #2563eb;
  --crm-accent-soft: rgba(37, 99, 235, 0.08);
  --crm-success: #0f7b3f;
  --crm-warning: #b45309;
  --crm-danger: #e03e3e;
  --crm-header: #f4f4f6;
  --radius: 8px;
  --landing-bg: #f4f7fc;
  --landing-border: #e2e8f3;
  --landing-accent: #1d4ed8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
section[id] { scroll-margin-top: 82px; }
body {
  font-family: Inter, sans-serif;
  background: var(--landing-bg);
  color: var(--crm-text);
  line-height: 1.55;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
section { padding: 88px 0; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--landing-border);
}
.header-inner {
  height: 70px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 21px; width: auto; display: block; }
.nav { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--crm-muted); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: #eff6ff; color: var(--landing-accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; border: 1px solid var(--landing-border); border-radius: 8px; overflow: hidden; background: #fff;
}
.lang-btn {
  border: none; background: transparent; padding: 7px 11px; font-size: 12px; font-weight: 700;
  color: var(--crm-muted); cursor: pointer;
}
.lang-btn.active { background: #eff6ff; color: var(--landing-accent); }
.header-actions .btn {
  padding: 7px 14px; font-size: 13px; border-radius: 8px; line-height: 1.2;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; transition: .18s;
}
.btn-primary { background: var(--landing-accent); color: #fff; }
.btn-outline { background: #fff; border-color: var(--landing-border); color: var(--crm-text); }

/* Welcome — кто мы (Notion / Crewvector style) */
.welcome {
  padding: 64px 0 56px;
  background: #fff;
  border-bottom: 1px solid var(--landing-border);
  text-align: center;
}
.welcome-intro {
  max-width: 620px; margin: 0 auto 40px;
}
.welcome h1 {
  font-size: clamp(32px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -.8px;
  margin-bottom: 12px;
}
.welcome-sub {
  font-size: clamp(17px, 2vw, 19px); line-height: 1.35; font-weight: 500;
  color: var(--crm-text); letter-spacing: -.25px; margin-bottom: 16px;
}
.welcome-lead {
  font-size: 16px; line-height: 1.65; color: var(--crm-muted);
  margin: 0;
}
.welcome-lead strong { color: var(--crm-text); font-weight: 600; }
.welcome-lead span { font-weight: 400; }
.welcome-pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 960px; margin: 0 auto; text-align: left;
}
.welcome-pillar {
  padding: 22px 20px; border-radius: 14px;
  border: 1px solid var(--landing-border); background: var(--landing-bg);
}
.welcome-pillar h3 {
  font-size: 14px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 8px;
}
.welcome-pillar p { font-size: 13px; color: var(--crm-muted); line-height: 1.55; }
.welcome-cta {
  margin-top: 32px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}

.hero { padding: 56px 0 56px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.12fr; gap: 40px; align-items: center;
}
.eyebrow {
  display: inline-flex; padding: 6px 12px; border-radius: 999px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: var(--landing-accent);
  font-size: 12px; font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 4.8vw, 54px); line-height: 1.06; letter-spacing: -1.2px; margin-bottom: 18px;
}
.hero-lead { color: var(--crm-muted); font-size: 17px; max-width: 520px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero-points { display: grid; gap: 10px; }
.hero-point { display: flex; gap: 10px; font-size: 14px; color: #334155; }
.check {
  width: 20px; height: 20px; border-radius: 50%; background: #dcfce7; color: #059669;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0;
}

/* ── 3D CRM preview shell ── */
.crm-stage {
  perspective: 1200px;
  transform-style: preserve-3d;
}
.crm-3d {
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.crm-app {
  background: var(--crm-bg);
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12), 0 2px 8px rgba(15, 23, 42, .06);
  overflow: hidden;
  transform: translateZ(0);
}
.crm-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--crm-border);
}
.crm-dots { display: flex; gap: 5px; }
.crm-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.crm-dots i:nth-child(1) { background: #ff5f57; }
.crm-dots i:nth-child(2) { background: #febc2e; }
.crm-dots i:nth-child(3) { background: #28c840; }
.crm-url {
  flex: 1; margin: 0 6px; text-align: center; font-size: 10px; color: var(--crm-faint);
  background: var(--crm-bg); border: 1px solid var(--crm-border); border-radius: 5px; padding: 4px 8px;
}

.crm-body { padding: 12px; min-height: 320px; }

/* mini sidebar hint */
.crm-layout {
  display: grid; grid-template-columns: 148px 1fr; gap: 0;
  background: var(--crm-card); border: 1px solid var(--crm-border); border-radius: var(--radius);
  overflow: hidden;
}
.crm-side {
  background: #fff; border-right: 1px solid var(--crm-border); padding: 8px 4px 6px;
  font-size: 10px; display: flex; flex-direction: column; min-height: 0;
}
.crm-side-nav {
  flex: 1; min-height: 0; max-height: 340px; overflow-y: auto; overflow-x: hidden;
  padding-right: 2px;
}
.crm-side-nav::-webkit-scrollbar { width: 3px; }
.crm-side-nav::-webkit-scrollbar-thumb { background: var(--crm-border-strong); border-radius: 3px; }
.crm-side-logo {
  font-weight: 800; font-size: 11px; padding: 4px 6px 8px; letter-spacing: -.2px;
}
.crm-side-sec {
  font-size: 8px; font-weight: 600; color: var(--crm-faint); text-transform: uppercase;
  letter-spacing: .5px; padding: 6px 6px 2px;
}
.crm-side-item {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 4px 6px; border-radius: 6px; color: var(--crm-muted); margin-bottom: 1px;
  cursor: pointer; transition: background .12s;
}
.crm-side-item > span:first-child {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crm-side-item:hover { background: var(--crm-bg); }
.crm-side-item.on { background: var(--crm-accent-soft); color: var(--crm-accent); font-weight: 600; }
.crm-side-item.muted { opacity: .45; cursor: default; pointer-events: none; }
.crm-side-badge {
  font-size: 9px; padding: 1px 5px; border-radius: 4px; background: var(--crm-bg); color: var(--crm-faint);
}
.crm-side-item.on .crm-side-badge { background: rgba(37,99,235,.12); color: var(--crm-accent); }

.crm-main { padding: 10px 12px 12px; min-width: 0; }

/* page header + filter (CRM pattern) */
.crm-ph {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.crm-ph h4 { font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.crm-ph-btn {
  font-size: 10px; font-weight: 600; padding: 5px 10px; border-radius: 6px;
  background: var(--crm-accent); color: #fff; border: none; cursor: pointer;
}
.crm-filter {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px;
  padding: 6px 8px; background: var(--crm-bg); border: 1px solid var(--crm-border); border-radius: var(--radius);
}
.crm-fi {
  font-size: 10px; color: var(--crm-muted); padding: 4px 8px;
  background: #fff; border: 1px solid var(--crm-border); border-radius: 5px; cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.crm-fi:hover, .crm-fi.active { border-color: var(--crm-accent); box-shadow: 0 0 0 2px var(--crm-accent-soft); }

/* dashboard KPI */
.crm-kpi-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px;
}
.crm-kpi {
  background: var(--crm-card); border: 1px solid var(--crm-border);
  border-left: 3px solid var(--crm-border); border-radius: var(--radius);
  padding: 8px 9px; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.crm-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.06); background: #fafafa; }
.crm-kpi.accent { border-left-color: var(--crm-accent); }
.crm-kpi.warn { border-left-color: var(--crm-warning); }
.crm-kpi.danger { border-left-color: var(--crm-danger); }
.crm-kpi-lbl { font-size: 9px; color: var(--crm-faint); }
.crm-kpi-val { font-size: 18px; font-weight: 700; letter-spacing: -.4px; line-height: 1.1; margin-top: 2px; }
.crm-kpi.accent .crm-kpi-val { color: var(--crm-accent); }
.crm-kpi.danger .crm-kpi-val { color: var(--crm-danger); }

/* table */
.crm-table-wrap {
  border: 1px solid var(--crm-border); border-radius: var(--radius);
  overflow: hidden; background: #fff;
}
.crm-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.crm-table thead th {
  text-align: left; padding: 6px 8px; font-weight: 600; color: var(--crm-faint);
  background: var(--crm-header); border-bottom: 1px solid var(--crm-border);
  white-space: nowrap;
}
.crm-table tbody td {
  padding: 7px 8px; border-bottom: 1px solid var(--crm-border);
  color: var(--crm-text); vertical-align: middle;
}
.crm-table tbody tr {
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.crm-table tbody tr:hover td { background: #f5f8ff; }
.crm-table tbody tr.selected td { background: var(--crm-accent-soft); }
.crm-table tbody tr:last-child td { border-bottom: none; }

.crm-vessel td {
  background: color-mix(in srgb, var(--crm-card) 62%, var(--crm-bg) 38%);
  font-weight: 600; font-size: 10px; padding: 8px !important;
  cursor: pointer;
}
.crm-rank td {
  background: color-mix(in srgb, var(--crm-card) 92%, var(--crm-bg) 8%);
  border-left: 2px solid rgba(37,99,235,.35);
  font-weight: 600; font-size: 10px; padding-left: 14px !important;
}

.crm-link { color: var(--crm-accent); font-weight: 600; }
.crm-muted { color: var(--crm-muted); }

.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 3px; font-size: 9px; font-weight: 500;
  white-space: nowrap; border: 1px solid transparent;
}
.status-pill .dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.st-blue { background: rgba(37,99,235,.1); color: #1d4ed8; border-color: rgba(37,99,235,.2); }
.st-blue .dot { background: #2563eb; }
.st-amber { background: rgba(180,83,9,.1); color: #92400e; border-color: rgba(180,83,9,.2); }
.st-amber .dot { background: #d97706; }
.st-green { background: rgba(15,123,63,.1); color: #166534; border-color: rgba(15,123,63,.2); }
.st-green .dot { background: #16a34a; }
.st-red { background: rgba(224,62,62,.1); color: #b91c1c; border-color: rgba(224,62,62,.2); }
.st-red .dot { background: #dc2626; }

.traffic { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.traffic.g { background: #22c55e; }
.traffic.y { background: #eab308; }
.traffic.r { background: #ef4444; }

.prio {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
}
.prio-h { background: rgba(224,62,62,.1); color: var(--crm-danger); }
.prio-m { background: rgba(180,83,9,.1); color: var(--crm-warning); }

.crm-panel { display: none; animation: fadeIn .25s ease; }
.crm-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Дашборд: пайплайн по статусам */
.dash-pipe-card {
  background: #fff; border: 1px solid var(--crm-border); border-radius: var(--radius);
  padding: 10px 12px;
}
.dash-pipe-title {
  font-size: 11px; font-weight: 600; color: var(--crm-text); margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--crm-border);
}
.dash-pipe-title span { color: var(--crm-faint); font-weight: 500; }
.pipe-bar-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 42%) 28px;
  align-items: center; gap: 6px; padding: 4px 0;
  border-bottom: 1px solid rgba(228,228,231,.6); cursor: pointer;
  transition: background .12s;
}
.pipe-bar-row:last-child { border-bottom: none; }
.pipe-bar-row:hover { background: #f8fafc; }
.pipe-bar-row.selected { background: #f8fafc; }
.pipe-bar-row.selected .pipe-bar-label { color: var(--crm-text); font-weight: 600; }
.pipe-bar-label { font-size: 9px; color: var(--crm-muted); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-bar-track { height: 7px; background: #eef0f4; border-radius: 4px; overflow: hidden; }
.pipe-bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.pipe-bar-count { font-size: 10px; font-weight: 700; text-align: right; color: var(--crm-text); }

.mock-scroll { max-height: 280px; overflow-y: auto; overflow-x: hidden; }
.mock-scroll::-webkit-scrollbar { width: 4px; }
.mock-scroll::-webkit-scrollbar-thumb { background: var(--crm-border-strong); border-radius: 4px; }

/* Пайплайн: Kanban */
.kanban-wrap {
  overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.kanban {
  display: flex; gap: 8px; min-width: max-content;
}
.kanban-col {
  width: 118px; flex-shrink: 0;
  background: var(--crm-bg); border: 1px solid var(--crm-border); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: 300px;
}
.kanban-head {
  padding: 8px 8px 6px; border-bottom: 1px solid var(--crm-border);
  display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600;
  background: #fff; position: sticky; top: 0; z-index: 1;
}
.kanban-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.kanban-count {
  margin-left: auto; font-size: 9px; color: var(--crm-faint); font-weight: 600;
  background: var(--crm-bg); padding: 1px 5px; border-radius: 4px;
}
.kanban-cards { padding: 6px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; flex: 1; }
.k-card {
  background: #fff; border: 1px solid var(--crm-border); border-radius: 8px;
  padding: 7px 8px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.k-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.08); border-color: #c7d2fe; }
.k-card.selected { border-color: var(--crm-accent); box-shadow: 0 0 0 2px var(--crm-accent-soft); }
.k-name { font-size: 10px; font-weight: 700; color: var(--crm-text); line-height: 1.2; }
.k-rank { font-size: 8px; color: var(--crm-faint); text-transform: uppercase; letter-spacing: .3px; margin: 2px 0 4px; }
.k-vessel { font-size: 9px; color: var(--crm-accent); font-weight: 600; display: flex; align-items: center; gap: 3px; }
.k-vessel::before { content: "⚓"; font-size: 8px; opacity: .7; }
.k-co { font-size: 8px; color: var(--crm-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-meta { font-size: 8px; color: var(--crm-muted); display: flex; flex-wrap: wrap; gap: 4px 6px; line-height: 1.4; }
.k-meta span { display: inline-flex; align-items: center; gap: 2px; }
.k-note { font-size: 8px; color: var(--crm-faint); margin-top: 3px; font-style: italic; }
.k-fee { font-size: 8px; color: var(--crm-text); font-weight: 600; margin-top: 2px; }

.crm-table.dense tbody td { padding: 5px 6px; font-size: 9px; }
.crm-table.dense thead th { padding: 5px 6px; font-size: 9px; }

/* feature blocks */
.pain-strip { padding: 56px 0 72px; }
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pain-card {
  background: #fff; border: 1px solid var(--landing-border); border-radius: 12px; padding: 18px;
}
.pain-card h3 { font-size: 14px; margin-bottom: 6px; }
.pain-card p { font-size: 13px; color: var(--crm-muted); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.6px; margin-bottom: 12px; }
.section-head p { color: var(--crm-muted); }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin-bottom: 56px;
}
.feature:last-child { margin-bottom: 0; }
.feature.reverse .feature-copy { order: 2; }
.feature.reverse .feature-visual { order: 1; }
.feature-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--landing-accent); margin-bottom: 10px; display: inline-block;
}
.feature h3 { font-size: 26px; letter-spacing: -.4px; margin-bottom: 12px; }
.feature p { color: var(--crm-muted); margin-bottom: 16px; font-size: 15px; }
.bullets { list-style: none; display: grid; gap: 8px; }
.bullets li { font-size: 14px; color: #334155; padding-left: 18px; position: relative; }
.bullets li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--landing-accent);
}

.mock-stage { perspective: 900px; }
.mock-3d { transition: transform .3s cubic-bezier(.16,1,.3,1); transform-style: preserve-3d; }

.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.module-card {
  background: #fff; border: 1px solid var(--landing-border); border-radius: 16px; padding: 22px;
}
.module-card h4 { font-size: 16px; margin-bottom: 8px; }
.module-card p { font-size: 13px; color: var(--crm-muted); }

.outcomes { background: #fff; border-top: 1px solid var(--landing-border); border-bottom: 1px solid var(--landing-border); }
.outcomes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.outcome { border: 1px solid var(--landing-border); border-radius: 14px; padding: 24px; background: var(--landing-bg); }
.outcome-num { font-size: 32px; font-weight: 800; color: var(--landing-accent); margin-bottom: 6px; }

.cta-box {
  background: linear-gradient(135deg, #0f2d6e, #1d4ed8 55%, #3b82f6);
  color: #fff; border-radius: 20px; padding: 48px;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.cta-box h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 10px; }
.cta-box p { color: rgba(255,255,255,.9); max-width: 560px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
/* контактная форма */
#cta { padding: 80px 0; background: var(--crm-bg); position: relative; overflow: hidden; }
#cta::before { content: ''; position: absolute; width: 700px; height: 700px; background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 65%); top: -250px; right: -150px; border-radius: 50%; pointer-events: none; }
#cta::after { content: ''; position: absolute; width: 500px; height: 500px; background: radial-gradient(circle, rgba(124,58,237,0.14) 0%, transparent 65%); bottom: -180px; left: -100px; border-radius: 50%; pointer-events: none; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-form-col h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: var(--crm-text); }
.contact-form-col > p { color: var(--crm-muted); font-size: 14px; margin-bottom: 28px; line-height: 1.6; }
.cf-field { margin-bottom: 16px; }
.cf-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--crm-text); }
.cf-field input, .cf-field textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--crm-border); border-radius: 8px; font-size: 14px; font-family: inherit; background: var(--crm-card); color: var(--crm-text); outline: none; transition: border-color .15s; box-sizing: border-box; }
.cf-field input:focus, .cf-field textarea:focus { border-color: #2563EB; }
.cf-field textarea { resize: vertical; min-height: 100px; }
.contact-details-col h3 { font-size: 20px; font-weight: 700; margin-bottom: 24px; color: var(--crm-text); }
.contact-detail-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.contact-detail-block strong { font-size: 14px; font-weight: 600; color: var(--crm-text); }
.contact-detail-block span { font-size: 14px; color: var(--crm-muted); }
.contact-detail-block a { font-size: 14px; color: var(--crm-muted); text-decoration: none; }
.contact-detail-block a:hover { color: #2563EB; }
.cf-success { display: none; padding: 14px 18px; background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; color: #166534; font-size: 14px; margin-top: 12px; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.btn-white { background: #fff; color: #1838a8; }
.btn-ghost { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff; }

footer {
  padding: 28px 0 40px; background: #fff; border-top: 1px solid var(--landing-border); margin-top: 84px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--crm-muted);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--crm-muted); text-decoration: none; }

@media (max-width: 980px) {
  .welcome-pillars { grid-template-columns: 1fr; }
  .hero-grid, .feature, .pain-grid, .modules-grid, .outcomes-grid, .cta-box { grid-template-columns: 1fr; }
  .feature.reverse .feature-copy, .feature.reverse .feature-visual { order: unset; }
  .nav { display: none; }
  .crm-layout { grid-template-columns: 1fr; }
  .crm-side { display: none; }
}
/* Welcome: заголовок в 2 строки, лид остаётся узким */
.welcome-intro { max-width: 780px; }
.welcome h1, .welcome-sub { text-wrap: balance; }
.welcome-sub, .welcome-lead { max-width: 620px; margin-left: auto; margin-right: auto; }

/* Карточка сделки в канбане: сумма */
.k-sum { font-size: 9px; color: var(--crm-accent); font-weight: 600; margin-bottom: 3px; }

/* Кому подходит */
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.audience-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid var(--landing-border); border-radius: 16px; padding: 22px;
  color: inherit; text-decoration: none;
}
.audience-card h4 { font-size: 16px; }
.audience-card p { font-size: 13px; color: var(--crm-muted); }
.audience-card.accent { background: #eff6ff; border-color: #bfdbfe; transition: border-color .18s, transform .18s; }
.audience-card.accent:hover { border-color: var(--landing-accent); transform: translateY(-2px); }
.audience-link { margin-top: auto; padding-top: 4px; font-size: 13px; font-weight: 600; color: var(--landing-accent); }

/* Как работаем: этапы */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { background: #fff; border: 1px solid var(--landing-border); border-radius: 16px; padding: 22px; }
.step-num { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--landing-accent); margin-bottom: 10px; }
.step h4 { font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--crm-muted); }

/* Канбан в мокапе листается свайпом, без видимого скроллбара */
.kanban-wrap { scrollbar-width: none; }
.kanban-wrap::-webkit-scrollbar { display: none; }

@media (max-width: 980px) {
  .audience-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  /* мокапы не распирают страницу на узких экранах */
  .hero-grid > *, .feature > * { min-width: 0; }
}
@media (max-width: 560px) {
  .audience-grid, .steps-grid { grid-template-columns: 1fr; }
}

/* ── Многостраничный сайт ── */
.section-white { background: #fff; border-top: 1px solid var(--landing-border); border-bottom: 1px solid var(--landing-border); }
/* две белые секции подряд читаются как одна: без линии между ними */
.section-white:has(+ .section-white) { border-bottom: none; }
.section-white + .section-white { border-top: none; padding-top: 24px; }
section.tight { padding: 64px 0; }

/* Навигация: активная страница и мобильное меню */
.nav a.active { background: #eff6ff; color: var(--landing-accent); }
.burger { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--landing-border); border-radius: 8px; background: #fff; color: var(--crm-text); cursor: pointer; }
.mobile-menu { display: none; border-top: 1px solid var(--landing-border); background: #fff; }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; display: grid; gap: 2px; padding: 8px 20px 16px; }
.mobile-menu a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--crm-text); text-decoration: none; }
.mobile-menu a:hover, .mobile-menu a.active { background: #eff6ff; color: var(--landing-accent); }
.mobile-menu a.btn-primary { margin-top: 8px; text-align: center; background: var(--landing-accent); color: #fff; }
.footer-links { flex-wrap: wrap; }

/* Шапка внутренних страниц */
.page-head { padding: 56px 0 0; text-align: center; }
.page-head h1 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -.8px; margin-bottom: 12px; text-wrap: balance; }
.page-head p { max-width: 620px; margin: 0 auto; font-size: 17px; color: var(--crm-muted); }
.page-head + section { padding-top: 40px; }
.crumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--crm-faint); }
.crumbs a { color: var(--crm-muted); text-decoration: none; }
.crumbs a:hover { color: var(--landing-accent); }
.head-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.section-link { margin-top: 24px; text-align: center; }
.link-arrow { font-size: 14px; font-weight: 600; color: var(--landing-accent); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Карточки: выгоды, плитки, отрасли, функции */
.benefit-grid, .tile-grid, .ind-grid, .feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.benefit, .tile, .ind-card, .feat-card { background: #fff; border: 1px solid var(--landing-border); border-radius: 14px; padding: 20px 22px; }
.section-white .benefit, .section-white .tile, .section-white .ind-card, .section-white .feat-card,
.section-white .module-card, .section-white .step, .section-white .svc-card, .section-white .chip-link { background: var(--landing-bg); }
.benefit::before { content: ""; display: block; width: 24px; height: 3px; margin-bottom: 14px; border-radius: 2px; background: var(--landing-accent); }
.benefit h3 { font-size: 17px; letter-spacing: -.2px; margin-bottom: 4px; }
.benefit p, .tile p, .ind-card p, .feat-card p { font-size: 13px; color: var(--crm-muted); }
.tile, .ind-card { color: inherit; text-decoration: none; transition: border-color .18s, transform .18s; }
.tile:hover, .ind-card:hover { border-color: var(--landing-accent); transform: translateY(-2px); }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile .step-num { margin-bottom: 4px; }
.tile h3, .ind-card h3, .feat-card h3 { font-size: 16px; }
.feat-card h3 { margin-bottom: 4px; }
.ind-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ind-card h3 { margin-bottom: 2px; }
.ind-arrow { flex-shrink: 0; font-size: 18px; color: var(--crm-faint); transition: transform .18s, color .18s; }
.ind-card:hover .ind-arrow { color: var(--landing-accent); transform: translateX(3px); }
.ind-card.accent, .section-white .ind-card.accent { background: #eff6ff; border-color: #bfdbfe; }
.chip-row, .pain-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip-link { padding: 9px 14px; border: 1px solid var(--landing-border); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; color: var(--crm-text); text-decoration: none; transition: border-color .18s, color .18s; }
.chip-link:hover { border-color: var(--landing-accent); color: var(--landing-accent); }
.pain-pill { padding: 8px 14px; border: 1px solid var(--landing-border); border-radius: 999px; background: #fff; font-size: 14px; color: var(--crm-muted); }
.other-inds { margin-top: 48px; text-align: center; }
.other-inds h3 { font-size: 16px; margin-bottom: 14px; }

/* Услуги: заголовок + строка + чипы */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.svc-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--landing-border); border-radius: 16px; padding: 22px; }
.svc-card .step-num { margin-bottom: 4px; }
.svc-card h3 { font-size: 17px; letter-spacing: -.2px; }
.svc-card p { font-size: 13px; color: var(--crm-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.chip { padding: 4px 9px; border-radius: 999px; background: var(--crm-accent-soft); font-size: 12px; font-weight: 500; color: var(--landing-accent); }

/* Демо CRM */
.demo-wrap { max-width: 860px; margin: 0 auto; }
.demo-tabs { display: none; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.demo-tab { padding: 6px 12px; border: 1px solid var(--landing-border); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 500; color: var(--crm-muted); cursor: pointer; }
.demo-tab.on { border-color: var(--landing-accent); background: #eff6ff; color: var(--landing-accent); }
.demo-kpi-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 10px; }
.demo-kpi-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }

/* Контакты */
.contact-form-col h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: var(--crm-text); }

/* Форматы работы */
.formats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.format-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--landing-border); border-radius: 16px; padding: 22px; }
.section-white .format-card { background: var(--landing-bg); }
.format-card h4 { font-size: 16px; }
.format-card p { font-size: 13px; color: var(--crm-muted); }
.format-card.accent, .section-white .format-card.accent { background: #eff6ff; border-color: #bfdbfe; }

/* Частые вопросы */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { background: var(--landing-bg); border: 1px solid var(--landing-border); border-radius: 12px; }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; font-size: 20px; font-weight: 400; line-height: 1; color: var(--landing-accent); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 20px 18px; font-size: 14px; color: var(--crm-muted); }

@media (max-width: 980px) {
  .burger { display: inline-flex; }
  .demo-tabs { display: flex; }
  .benefit-grid, .tile-grid, .ind-grid, .feat-grid, .svc-grid, .formats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  section { padding: 64px 0; }
  .benefit-grid, .tile-grid, .ind-grid, .feat-grid, .svc-grid, .formats-grid { grid-template-columns: 1fr; }
  .header-actions .btn { display: none; }
  .page-head { padding-top: 40px; }
  .cta-box { padding: 28px 22px; }
}
/* узкие телефоны: шапка помещается без горизонтального скролла */
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; }
  .lang-btn { padding: 7px 7px; }
}

/* Полировка: переносы заголовков, пустые места */
.cta-box h2 { line-height: 1.2; text-wrap: balance; }
.page-head p { text-wrap: balance; }
.feature-visual .crm-body { min-height: 0; }
main:has(#cta) + footer { margin-top: 0; }
.pain-label { margin-bottom: 14px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--crm-faint); }

/* ── Нарисованные экраны (иллюстрации, данные условные) ── */
.scr { position: relative; max-width: 520px; margin: 0 auto; overflow: hidden; border: 1px solid var(--crm-border); border-radius: 14px; background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .04); font-size: 13px; line-height: 1.45; }
.scr-toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; width: max-content; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 999px; background: #0f172a; color: #fff; font-size: 12px; font-weight: 500; text-align: center; box-shadow: 0 8px 20px rgba(15, 23, 42, .25); }
.scr-toast i { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.scr-note { margin-top: 28px; text-align: center; font-size: 12px; color: var(--crm-faint); }

/* Telegram-чат */
.scr-tg { background: #e9eef4; }
.tg-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--crm-border); background: #fff; }
.tg-ava { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--landing-accent); color: #fff; font-size: 14px; font-weight: 700; }
.tg-head b { display: block; font-size: 13px; }
.tg-head div span { font-size: 11px; color: var(--crm-faint); }
.tg-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 64px; }
.tg-msg { max-width: 80%; padding: 8px 11px; border-radius: 12px; box-shadow: 0 1px 1px rgba(15, 23, 42, .06); }
.tg-msg.in { align-self: flex-start; border-bottom-left-radius: 4px; background: #fff; }
.tg-msg.out { align-self: flex-end; border-bottom-right-radius: 4px; background: #dbeafe; }
.tg-kb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 80%; }
.tg-kb span { padding: 6px 4px; border-radius: 8px; background: rgba(255, 255, 255, .75); text-align: center; font-size: 12px; font-weight: 500; color: var(--landing-accent); }
.tg-report { min-width: 70%; }
.tg-report > b { display: block; }
.rp-dates { display: block; font-size: 11px; color: var(--crm-faint); }
.rp-bars { display: flex; align-items: flex-end; gap: 4px; height: 40px; margin: 10px 0 6px; }
.rp-bars i { flex: 1; border-radius: 3px 3px 0 0; background: #bfdbfe; }
.rp-bars i:last-child { background: var(--landing-accent); }
.rp-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.rp-row span { color: var(--crm-muted); }
.rp-row b.bad { color: var(--crm-danger); }

/* Договор по шаблону */
.scr-doc { display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; padding: 16px; background: var(--crm-bg); }
.doc-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--crm-border); border-radius: 10px; background: #fff; }
.doc-card span { font-size: 12px; color: var(--crm-muted); }
.doc-card .doc-sum { font-size: 16px; font-weight: 700; color: var(--crm-text); }
.doc-card .doc-btn { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--landing-accent); color: #fff; font-weight: 600; text-align: center; }
.doc-files { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.doc-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--crm-border); border-radius: 8px; background: #fff; font-size: 12px; }
.ext { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 30px; height: 20px; padding: 0 4px; border-radius: 4px; background: #fee2e2; color: #b91c1c; font-size: 9px; font-weight: 700; font-style: normal; }
.ext.doc { background: #dbeafe; color: #1d4ed8; }
.doc-sent { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #166534; }
.doc-sent i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.doc-sheet { display: flex; flex-direction: column; gap: 7px; padding: 18px 16px; border: 1px solid var(--crm-border); border-radius: 6px; background: #fff; box-shadow: 0 6px 16px rgba(15, 23, 42, .06); }
.doc-title { font-size: 12px; letter-spacing: .04em; text-align: center; }
.doc-date { margin-bottom: 4px; font-size: 10px; color: var(--crm-faint); text-align: center; }
.doc-line { height: 6px; border-radius: 3px; background: #eef0f4; }
.doc-field { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--crm-muted); }
.doc-field mark { padding: 0 4px; border-radius: 3px; background: #fef3c7; color: var(--crm-text); font-weight: 600; }
.doc-sign { display: flex; justify-content: space-between; margin-top: 10px; }
.doc-sign span { width: 38%; border-top: 1px solid var(--crm-border-strong); }

/* Форма сайта → карточка в CRM */
.scr-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 16px; background: var(--crm-bg); }
.flow-pane { overflow: hidden; border: 1px solid var(--crm-border); border-radius: 10px; background: #fff; }
.flow-form, .flow-crm { display: flex; flex-direction: column; gap: 5px; padding: 12px; }
.flow-form > b, .flow-crm > b { margin-bottom: 2px; font-size: 13px; }
.flow-form label { font-size: 10px; color: var(--crm-faint); }
.ff-input { padding: 6px 8px; border: 1px solid var(--crm-border); border-radius: 6px; font-size: 11px; }
.ff-btn { margin-top: 4px; padding: 7px; border-radius: 6px; background: var(--landing-accent); color: #fff; font-size: 11px; font-weight: 600; text-align: center; }
.flow-arrow { font-size: 20px; color: var(--landing-accent); }
.flow-badge { align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 10px; font-weight: 600; }
.flow-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid #f0f1f4; font-size: 11px; }
.flow-row > span:first-child { color: var(--crm-faint); }
.flow-row b { font-weight: 600; text-align: right; }

/* Распознавание документа */
.scr-ai { padding: 16px 16px 64px; background: var(--crm-bg); }
.ai-file { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px dashed var(--crm-border-strong); border-radius: 10px; background: #fff; }
.ai-file .ext { height: 28px; min-width: 36px; font-size: 10px; }
.ai-file b { display: block; font-size: 13px; }
.ai-file div span { font-size: 11px; font-weight: 600; color: var(--landing-accent); }
.ai-fields { border: 1px solid var(--crm-border); border-radius: 10px; background: #fff; }
.ai-row { display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid #f0f1f4; font-size: 12px; }
.ai-row:first-child { border-top: 0; }
.ai-row span { color: var(--crm-faint); }
.ai-ok { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #dcfce7; color: #059669; font-size: 10px; font-weight: 800; font-style: normal; }

/* Заказ с доставкой */
.scr-order { padding: 16px 16px 64px; background: var(--crm-bg); }
.ord-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ord-head b { font-size: 14px; }
.ord-src { padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 11px; font-weight: 600; }
.ord-items { margin-bottom: 12px; padding: 4px 12px; border: 1px solid var(--crm-border); border-radius: 10px; background: #fff; }
.ord-item, .ord-total { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f1f4; font-size: 12px; }
.ord-total { border-bottom: 0; font-weight: 700; }
.ord-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.trk { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--crm-faint); }
.trk i { height: 4px; border-radius: 2px; background: #e5e7eb; }
.trk.done { color: var(--crm-text); }
.trk.done i { background: #16a34a; }
.trk.now { color: var(--landing-accent); font-weight: 600; }
.trk.now i { background: var(--landing-accent); }
.ord-np { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--crm-border); border-radius: 10px; background: #fff; font-size: 12px; }
.ord-np span { font-weight: 700; color: #b91c1c; }

@media (max-width: 560px) {
  .scr-flow, .scr-doc { grid-template-columns: 1fr; }
  .flow-arrow { justify-self: center; transform: rotate(90deg); }
}

/* ── Интерактивное демо CRM (demo.html) ── */
.dm-try { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.dm-try > span { padding: 7px 12px; border: 1px solid var(--landing-border); border-radius: 999px; background: #fff; font-size: 13px; color: var(--crm-muted); }
.dm-try b { color: var(--landing-accent); font-weight: 700; margin-right: 4px; }
.dm-app { overflow: hidden; border: 1px solid var(--crm-border); border-radius: 14px; background: #fff; box-shadow: 0 30px 80px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .04); font-size: 13px; line-height: 1.45; color: var(--crm-text); text-align: left; }
.dm-reset { padding: 4px 10px; border: 1px solid var(--crm-border); border-radius: 6px; background: #fff; font: inherit; font-size: 12px; color: var(--crm-muted); cursor: pointer; white-space: nowrap; }
.dm-reset:hover { border-color: var(--crm-accent); color: var(--crm-accent); }
.dm-body { display: grid; grid-template-columns: 184px 1fr; min-height: 640px; }
.dm-side { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--crm-border); background: var(--crm-bg); }
.dm-logo { padding: 2px 8px 12px; font-size: 14px; font-weight: 700; }
.dm-sec { padding: 12px 8px 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--crm-faint); }
.dm-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; background: none; font: inherit; font-size: 13px; color: var(--crm-muted); text-align: left; cursor: pointer; }
.dm-nav:hover { background: #eef1f6; color: var(--crm-text); }
.dm-nav.on { background: var(--crm-accent-soft); color: var(--crm-accent); font-weight: 600; }
.dm-badge { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #e9ecf2; font-size: 11px; font-weight: 600; text-align: center; color: var(--crm-muted); }
.dm-badge.warn { background: rgba(224, 62, 62, .12); color: var(--crm-danger); }
.dm-main { min-width: 0; padding: 16px 18px 20px; }
.dm-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.dm-top h3 { font-size: 18px; letter-spacing: -.2px; }
.dm-top-act { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-search { width: 220px; max-width: 100%; padding: 7px 10px; border: 1px solid var(--crm-border); border-radius: 8px; font: inherit; font-size: 13px; outline: none; }
.dm-search:focus, .dm-add input:focus, .dm-add select:focus, .dm-modal input:focus, .dm-modal select:focus, .dm-dl select:focus { border-color: var(--crm-accent); box-shadow: 0 0 0 3px var(--crm-accent-soft); }
.dm-btn { padding: 7px 12px; border: 1px solid transparent; border-radius: 8px; background: var(--landing-accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.dm-btn:hover { filter: brightness(1.08); }
.dm-btn.ghost { border-color: var(--crm-border); background: #fff; color: var(--crm-text); }
.dm-btn.ghost:hover { border-color: var(--crm-accent); color: var(--crm-accent); filter: none; }
.dm-btn-s { padding: 4px 9px; border: 1px solid var(--crm-border); border-radius: 6px; background: #fff; font: inherit; font-size: 12px; color: var(--crm-text); white-space: nowrap; cursor: pointer; }
.dm-btn-s:hover { border-color: var(--crm-accent); color: var(--crm-accent); }
.dm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.dm-chip { padding: 5px 10px; border: 1px solid var(--crm-border); border-radius: 999px; background: #fff; font: inherit; font-size: 12px; color: var(--crm-muted); cursor: pointer; }
.dm-chip:hover { color: var(--crm-text); }
.dm-chip.on { border-color: var(--crm-accent); background: var(--crm-accent-soft); color: var(--crm-accent); font-weight: 600; }
.dm-hint { margin-left: auto; font-size: 12px; color: var(--crm-faint); }
.dm-app .status-pill { padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.dm-app .prio { font-size: 11px; white-space: nowrap; }
.prio-l { background: #eef0f4; color: var(--crm-muted); }
.st-violet { background: rgba(124, 58, 237, .1); color: #6d28d9; border-color: rgba(124, 58, 237, .2); }
.st-violet .dot { background: #7c3aed; }

/* Дашборд */
.dm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.dm-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; border: 1px solid var(--crm-border); border-left: 3px solid var(--crm-accent); border-radius: 10px; background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.dm-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .06); }
.dm-kpi.static { cursor: default; }
.dm-kpi.static:hover { transform: none; box-shadow: none; }
.dm-kpi.warn { border-left-color: var(--crm-warning); }
.dm-kpi.danger { border-left-color: var(--crm-danger); }
.dm-kpi-l { font-size: 11px; color: var(--crm-faint); }
.dm-kpi-v { font-size: 22px; font-weight: 700; letter-spacing: -.4px; line-height: 1.15; }
.dm-kpi.danger .dm-kpi-v { color: var(--crm-danger); }
.dm-kpi-s { font-size: 11px; color: var(--crm-muted); }
.dm-grid2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-bottom: 12px; }
.dm-card { min-width: 0; padding: 14px; border: 1px solid var(--crm-border); border-radius: 10px; background: #fff; }
.dm-card h4 { margin-bottom: 10px; font-size: 13px; }
.dm-bar { display: grid; grid-template-columns: 110px 1fr 24px; align-items: center; gap: 10px; width: 100%; padding: 7px 0; border: 0; border-bottom: 1px solid #f0f1f4; background: none; font: inherit; font-size: 12px; color: var(--crm-muted); text-align: left; cursor: pointer; }
.dm-bar:last-child { border-bottom: 0; }
.dm-bar:hover .dm-bar-l { color: var(--crm-text); }
.dm-bar-t { height: 8px; overflow: hidden; border-radius: 4px; background: #eef0f4; }
.dm-bar-t i { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }
.dm-bar-n { font-weight: 700; text-align: right; color: var(--crm-text); }
.dm-feed { list-style: none; display: grid; gap: 8px; }
.dm-feed li { display: grid; grid-template-columns: 76px 1fr; gap: 8px; font-size: 12px; }
.dm-feed-t { color: var(--crm-faint); }

/* Канбан */
.dm-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.dm-col { display: flex; flex-direction: column; min-width: 0; padding: 8px; border: 1px solid var(--crm-border); border-radius: 10px; background: var(--crm-bg); transition: border-color .15s, background .15s; }
.dm-col.over { border-color: var(--crm-accent); background: var(--crm-accent-soft); }
.dm-col-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.dm-col-h i { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; }
.dm-col-h span { flex: 1; min-width: 0; line-height: 1.25; overflow-wrap: anywhere; }
.dm-col-h b { padding: 0 6px; border-radius: 999px; background: #e9ecf2; font-size: 11px; color: var(--crm-muted); }
.dm-col-sum { margin: 2px 0 8px 14px; font-size: 11px; color: var(--crm-faint); }
.dm-cards { display: flex; flex-direction: column; gap: 6px; min-height: 64px; }
.dm-deal { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border: 1px solid var(--crm-border); border-radius: 8px; background: #fff; cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s; }
.dm-deal:hover, .dm-deal:focus-visible { border-color: #c7d2fe; box-shadow: 0 6px 14px rgba(0, 0, 0, .07); transform: translateY(-1px); outline: none; }
.dm-deal.dragging { opacity: .45; }
.dm-deal b { font-size: 12px; }
.dm-deal > span { font-size: 11px; color: var(--crm-muted); }
.dm-deal-f { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.dm-deal-f em { font-size: 12px; font-weight: 600; font-style: normal; color: var(--crm-accent); }
.dm-ava { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #e0e7ff; color: #3730a3; font-size: 9px; font-weight: 700; font-style: normal; }
.dm-col-empty { padding: 8px; text-align: center; font-size: 12px; color: var(--crm-faint); }

/* Таблицы */
.dm-table-wrap { overflow: hidden; border: 1px solid var(--crm-border); border-radius: 10px; }
.dm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dm-table th { padding: 8px 10px; border-bottom: 1px solid var(--crm-border); background: var(--crm-bg); font-size: 11px; font-weight: 600; text-align: left; color: var(--crm-faint); }
.dm-table td { padding: 9px 10px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
.dm-table tbody tr:last-child td { border-bottom: 0; }
.dm-table tbody tr[data-act] { cursor: pointer; }
.dm-table tbody tr:hover td { background: #f7f9ff; }
.dm-dot-cell { width: 18px; padding-right: 0 !important; }
.dm-name { color: var(--crm-accent); }
.dm-sub { display: block; font-size: 11px; color: var(--crm-faint); }
.dm-link { color: var(--crm-accent); cursor: pointer; }
.dm-link:hover { text-decoration: underline; }
.dm-acts-cell { text-align: right; }
.dm-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.dm-empty { padding: 16px; text-align: center; color: var(--crm-faint); }

/* Задачи */
.dm-add { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dm-add input { flex: 1 1 240px; min-width: 0; }
.dm-add input, .dm-add select, .dm-modal input, .dm-modal select, .dm-dl select { padding: 7px 10px; border: 1px solid var(--crm-border); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--crm-text); outline: none; }
.dm-tasks { display: grid; gap: 6px; }
.dm-task { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--crm-border); border-radius: 8px; background: #fff; }
.dm-task.done .dm-task-t { color: var(--crm-faint); text-decoration: line-through; }
.dm-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 1.5px solid var(--crm-border-strong); border-radius: 6px; background: #fff; color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.dm-check:hover { border-color: var(--crm-accent); }
.dm-check.on { border-color: #16a34a; background: #16a34a; }
.dm-task-main { min-width: 0; }
.dm-task-t { display: block; font-size: 13px; }
.dm-due { font-size: 12px; white-space: nowrap; color: var(--crm-muted); }
.dm-due.today { font-weight: 600; color: var(--crm-warning); }
.dm-due.late { font-weight: 600; color: var(--crm-danger); }

/* Карточка (drawer), модалка, уведомления — поверх страницы */
.dm-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .28); animation: dmFade .2s ease; }
.dm-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; display: flex; flex-direction: column; width: min(420px, 100%); border-left: 1px solid var(--crm-border); background: #fff; box-shadow: -12px 0 40px rgba(15, 23, 42, .14); font-size: 13px; line-height: 1.45; text-align: left; animation: dmSlide .25s cubic-bezier(.16, 1, .3, 1); }
.dm-drawer-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--crm-border); }
.dm-drawer-h h4 { font-size: 15px; }
.dm-x { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--crm-muted); cursor: pointer; }
.dm-x:hover { background: var(--crm-bg); color: var(--crm-text); }
.dm-drawer-b { flex: 1; overflow-y: auto; padding: 14px 16px 24px; }
.dm-drawer-b h5 { margin: 18px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--crm-faint); }
.dm-drawer .status-pill { padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.dm-drawer .prio { font-size: 11px; white-space: nowrap; }
.dm-dl > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0f1f4; }
.dm-dl span { color: var(--crm-faint); }
.dm-dl b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.dm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dm-mini { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--crm-border); border-radius: 8px; font-size: 12px; }
.dm-mini[data-act] { cursor: pointer; }
.dm-mini[data-act]:hover { border-color: #c7d2fe; }
.dm-modal { position: fixed; top: 50%; left: 50%; z-index: 91; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100% - 32px)); padding: 0 0 16px; border: 1px solid var(--crm-border); border-radius: 12px; background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .2); font-size: 13px; text-align: left; transform: translate(-50%, -50%); animation: dmModal .2s ease; }
.dm-modal label { display: flex; flex-direction: column; gap: 4px; margin: 0 16px; font-size: 12px; color: var(--crm-muted); }
.dm-modal label[hidden] { display: none; }
.dm-modal .dm-btn { margin: 4px 16px 0; }
.dm-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 95; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: calc(100% - 32px); pointer-events: none; }
.dm-toast { display: inline-flex; align-items: center; gap: 8px; max-width: 360px; padding: 10px 14px; border-radius: 10px; background: #0f172a; color: #fff; font-size: 13px; box-shadow: 0 10px 24px rgba(15, 23, 42, .25); animation: dmPop .2s ease; }
.dm-toast i { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
@keyframes dmFade { from { opacity: 0; } }
@keyframes dmSlide { from { opacity: 0; transform: translateX(24px); } }
@keyframes dmPop { from { opacity: 0; transform: translateY(6px); } }
@keyframes dmModal { from { opacity: 0; transform: translate(-50%, -46%); } }

@media (max-width: 980px) {
  .dm-body { grid-template-columns: 170px 1fr; }
  .dm-kpis { grid-template-columns: repeat(2, 1fr); }
  .dm-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dm-body { grid-template-columns: 1fr; min-height: 0; }
  .dm-side { flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--crm-border); }
  .dm-logo, .dm-sec { display: none; }
  .dm-nav { width: auto; padding: 6px 10px; border-color: var(--crm-border); border-radius: 999px; background: #fff; }
  .dm-nav.on { border-color: var(--crm-accent); }
  .dm-main { padding: 14px 12px 16px; }
  .dm-board { grid-template-columns: 1fr; }
  .dm-hint, .sm-hide { display: none; }
  .dm-top-act, .dm-search { width: 100%; }
  .dm-task { grid-template-columns: 22px 1fr auto; }
  .dm-task .prio { display: none; }
  .dm-feed li { grid-template-columns: 1fr; gap: 0; }
  .dm-bar { grid-template-columns: 96px 1fr 20px; }
  .dm-reset { padding: 3px 8px; font-size: 11px; }
  .dm-app .sm-only { display: block; margin-top: 4px; }
  .dm-acts .dm-btn-s { white-space: normal; text-align: center; }
}
.dm-app .sm-only { display: none; }

/* Кейсы: ссылка на живую демо-копию CRM */
.live-crm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; }
.live-crm-note { font-size: 13px; color: var(--crm-faint); }

/* Форма заявки: скрытое поле-ловушка для ботов */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
