:root {
  --bg: #070b14;
  --bg-2: #0a1020;
  --panel: #0e1628;
  --panel-2: #121c31;
  --panel-3: #17233d;
  --line: #223150;
  --line-soft: #1a2742;
  --text: #e9effc;
  --muted: #95a6c5;
  --muted-2: #6f81a2;
  --mint: #5ce1b0;
  --mint-2: #35c795;
  --violet: #8b7cff;
  --violet-2: #6f5cff;
  --blue: #6cb6ff;
  --amber: #ffc46b;
  --red: #ff6b81;
  --green: #59d68f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.22);
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 700px at 82% -8%, rgba(139, 124, 255, 0.16), transparent 60%),
    radial-gradient(900px 600px at 6% 0%, rgba(92, 225, 176, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 150, 210, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 210, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  z-index: 0;
}

a { color: var(--mint); text-decoration: none; }
a:hover { color: #8cf0c9; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(92, 225, 176, 0.28); }

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
}
.boot-mark {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--mint), var(--violet));
  color: #04120d;
  box-shadow: 0 12px 40px rgba(92, 225, 176, 0.25);
}
.boot-text { font-size: 13px; }

.noscript {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bg); color: var(--text); padding: 24px; text-align: center;
}

/* ---------- shared ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mint);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 4px rgba(92, 225, 176, 0.12);
}

.grad {
  background: linear-gradient(100deg, #b7ffe9 0%, var(--mint) 28%, var(--violet) 78%, #c9bfff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hide { display: none !important; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.wrap { flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--panel-2);
  --btn-line: var(--line);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 42px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--btn-line);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  user-select: none;
}
.btn:hover { border-color: #33466d; background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--mint) 0%, #49d7a6 45%, #7ac9ff 100%);
  border-color: transparent; color: #04130e;
  box-shadow: 0 10px 26px rgba(53, 199, 149, 0.24);
}
.btn-primary:hover { background: linear-gradient(135deg, #7cf0c8 0%, #59e3b3 45%, #95d6ff 100%); border-color: transparent; }

.btn-soft {
  background: rgba(92, 225, 176, 0.09);
  border-color: rgba(92, 225, 176, 0.24);
  color: #a9f5dc;
}
.btn-soft:hover { background: rgba(92, 225, 176, 0.15); border-color: rgba(92, 225, 176, 0.4); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); }

.btn-danger { background: rgba(255, 107, 129, 0.10); border-color: rgba(255, 107, 129, 0.30); color: #ffb3bf; }
.btn-danger:hover { background: rgba(255, 107, 129, 0.18); }

.btn-sm { min-height: 34px; padding: 0 11px; border-radius: 9px; font-size: 12.5px; gap: 6px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 10px; }
.btn-icon svg { width: 16px; height: 16px; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges / platform ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge-green { color: #8cf0c9; background: rgba(92, 225, 176, 0.10); border-color: rgba(92, 225, 176, 0.24); }
.badge-amber { color: #ffd89a; background: rgba(255, 196, 107, 0.10); border-color: rgba(255, 196, 107, 0.24); }
.badge-red { color: #ffb3bf; background: rgba(255, 107, 129, 0.10); border-color: rgba(255, 107, 129, 0.24); }
.badge-violet { color: #cdc4ff; background: rgba(139, 124, 255, 0.12); border-color: rgba(139, 124, 255, 0.26); }
.badge-blue { color: #b6dcff; background: rgba(108, 182, 255, 0.10); border-color: rgba(108, 182, 255, 0.24); }
.badge-muted { color: var(--muted); background: rgba(149, 166, 197, 0.08); border-color: rgba(149, 166, 197, 0.18); }
.badge-plain::before { display: none; }

.platform {
  display: inline-flex; align-items: center; gap: 7px;
  height: 24px; padding: 0 9px; border-radius: 8px;
  font-size: 11.5px; font-weight: 650;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-soft);
  color: var(--muted);
}
.platform svg { width: 13px; height: 13px; }
.platform-telegram { color: #8fd3ff; background: rgba(56, 161, 230, 0.10); border-color: rgba(56, 161, 230, 0.22); }
.platform-vk { color: #a9c8ff; background: rgba(80, 130, 255, 0.10); border-color: rgba(80, 130, 255, 0.22); }
.platform-max { color: #c8b6ff; background: rgba(139, 124, 255, 0.10); border-color: rgba(139, 124, 255, 0.22); }
.platform-dzen { color: #ffc9a3; background: rgba(255, 140, 80, 0.10); border-color: rgba(255, 140, 80, 0.22); }

/* ---------- forms ---------- */

.field { display: grid; gap: 7px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; background: #0a1324; border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 13px; color: var(--text);
  outline: none; transition: border-color 0.16s ease, box-shadow 0.16s ease;
  min-height: 44px;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(92, 225, 176, 0.55);
  box-shadow: 0 0 0 3px rgba(92, 225, 176, 0.10);
}
.textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--muted-2); line-height: 1.45; }
.error-text { font-size: 12.5px; color: #ffb3bf; }
.char-count { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.char-count.warn { color: var(--amber); }
.char-count.over { color: var(--red); }

.seg {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 4px;
  background: #0a1324; border: 1px solid var(--line); border-radius: 12px;
}
.seg button {
  flex: 1 1 0; min-width: 82px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600;
  padding: 8px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button svg { width: 14px; height: 14px; }
.seg button.active { background: var(--panel-3); border-color: #32466f; color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.seg button:hover { color: var(--text); }

.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--mint); }

/* ---------- landing ---------- */

.landing { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 24px 40px; }
.landing-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0 12px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--mint), var(--violet));
  color: #04120d; font-weight: 800; letter-spacing: -0.05em; font-size: 15px;
  box-shadow: 0 10px 26px rgba(92, 225, 176, 0.18);
}
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.brand-sub { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px; }
.landing-nav { display: flex; align-items: center; gap: 22px; }
.landing-nav a { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.landing-nav a:hover { color: var(--text); }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 42px; align-items: center; padding: 54px 0 46px; }
.hero-title { font-size: clamp(36px, 5.2vw, 62px); line-height: 1.02; margin: 16px 0 18px; letter-spacing: -0.045em; }
.hero-sub { font-size: 16px; color: var(--muted); max-width: 540px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--muted-2); display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 14px; height: 14px; color: var(--mint); }

.hero-visual { position: relative; min-height: 360px; }
.hero-visual::before {
  content: ""; position: absolute; inset: -20px -10px -30px -30px;
  background: radial-gradient(closest-side, rgba(139, 124, 255, 0.18), transparent 70%);
  filter: blur(10px);
}
.mock-app {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(20, 30, 51, 0.92), rgba(12, 20, 36, 0.96));
  border: 1px solid #26375a; border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px;
  transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
}
.mock-top { display: flex; align-items: center; gap: 7px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: #2b3c5f; }
.mock-dot.g { background: var(--mint); }
.mock-title { margin-left: 8px; font-size: 11px; color: var(--muted-2); letter-spacing: 0.06em; text-transform: uppercase; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.mock-kpi { background: #0a1324; border: 1px solid var(--line-soft); border-radius: 11px; padding: 10px; }
.mock-kpi b { display: block; font-size: 18px; letter-spacing: -0.03em; }
.mock-kpi span { font-size: 10px; color: var(--muted-2); }
.mock-kpi .spark { height: 18px; margin-top: 6px; opacity: 0.8; }
.mock-chart { background: #0a1324; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; }
.mock-chart-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 10px; color: var(--muted-2); }
.mock-chart svg { width: 100%; height: 108px; }
.mock-post { margin-top: 12px; background: #0f1a2e; border: 1px solid #26375a; border-radius: 13px; padding: 12px; }
.mock-post-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.mock-post-head span { font-size: 10.5px; color: var(--muted-2); }
.mock-post p { font-size: 11.5px; color: #c8d5ec; line-height: 1.5; }
.mock-post .mock-actions { display: flex; gap: 6px; margin-top: 9px; }
.mock-actions i { height: 22px; border-radius: 6px; background: #16233c; flex: 1; }
.mock-actions i:first-child { background: rgba(92, 225, 176, 0.18); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card {
  background: linear-gradient(180deg, rgba(18, 28, 49, 0.78), rgba(12, 20, 36, 0.78));
  border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.feature-card:hover { border-color: #2f4268; transform: translateY(-2px); }
.feature-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(92, 225, 176, 0.10); color: var(--mint); margin-bottom: 14px;
}
.feature-icon.violet { background: rgba(139, 124, 255, 0.12); color: #c3b8ff; }
.feature-icon.amber { background: rgba(255, 196, 107, 0.10); color: var(--amber); }
.feature-icon.blue { background: rgba(108, 182, 255, 0.10); color: var(--blue); }
.feature-card h3 { font-size: 15.5px; margin-bottom: 7px; }
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

.section { padding: 46px 0; }
.section-head { max-width: 660px; margin-bottom: 24px; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.035em; margin: 10px 0 10px; }
.section-sub { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.step { border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px; background: rgba(14, 22, 40, 0.7); }
.step-num {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--mint);
  background: rgba(92, 225, 176, 0.10); border: 1px solid rgba(92, 225, 176, 0.22);
  margin-bottom: 13px;
}
.step h3 { font-size: 15px; margin-bottom: 7px; }
.step p { font-size: 13px; color: var(--muted); line-height: 1.6; }

.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.works-card { border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px; background: rgba(14, 22, 40, 0.7); }
.works-card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.works-card h3 svg { width: 17px; height: 17px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.check-list li { display: flex; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.check-list li svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--mint); }
.check-list.limits li svg { color: var(--amber); }

.cta-band {
  position: relative; overflow: hidden;
  border: 1px solid rgba(92, 225, 176, 0.22);
  border-radius: 22px; padding: 34px;
  background:
    radial-gradient(600px 220px at 10% 0%, rgba(92, 225, 176, 0.16), transparent 60%),
    radial-gradient(600px 260px at 90% 100%, rgba(139, 124, 255, 0.18), transparent 60%),
    #0c1527;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.03em; margin-bottom: 8px; }
.cta-band p { color: var(--muted); font-size: 14px; }
.landing-footer {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 30px 0 0; margin-top: 34px; border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--muted-2);
}
.landing-footer p { max-width: 620px; line-height: 1.6; }

/* ---------- app shell ---------- */

.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 16px;
  border-right: 1px solid var(--line-soft);
  background: rgba(8, 13, 25, 0.72); backdrop-filter: blur(14px);
}
.sidebar-brand { padding: 4px 8px 12px; border-bottom: 1px solid var(--line-soft); }
.sidebar-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.sidebar-brand .brand-name { font-size: 14.5px; }
.sidebar-nav { display: grid; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--muted); font-size: 13.5px; font-weight: 550;
  border: 1px solid transparent; transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.nav-item.active { color: var(--text); background: rgba(92, 225, 176, 0.09); border-color: rgba(92, 225, 176, 0.18); }
.nav-item.active svg { color: var(--mint); }
.nav-icon { width: 18px; height: 18px; flex: none; color: var(--muted-2); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.demo-badge {
  border: 1px solid rgba(255, 196, 107, 0.24); background: rgba(255, 196, 107, 0.07);
  border-radius: 12px; padding: 11px; font-size: 11.5px; color: #f3d6a4; line-height: 1.45;
}
.demo-badge b { display: block; color: #ffe4b8; font-size: 12px; margin-bottom: 3px; }
.user-card { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 11px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.025); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(92, 225, 176, 0.25), rgba(139, 124, 255, 0.3));
  color: #d8fff2; font-size: 11px; font-weight: 700; flex: none;
}
.user-meta { min-width: 0; }
.user-meta b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; font-size: 10.5px; color: var(--muted-2); }

.main { min-width: 0; padding: 0 26px 46px; }
.topbar {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0 12px; margin-bottom: 6px;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.94) 65%, rgba(7, 11, 20, 0));
  backdrop-filter: blur(10px);
}
.topbar-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.topbar-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.demo-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 999px; border: 1px solid rgba(255, 196, 107, 0.22);
  background: rgba(255, 196, 107, 0.07); color: #f3d6a4; font-size: 11px; font-weight: 600;
}
.demo-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.page { animation: fadeUp 0.25s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 8px 0 18px; flex-wrap: wrap; }
.page-title { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.04em; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 5px; max-width: 680px; line-height: 1.55; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- cards / grids ---------- */

.card {
  background: linear-gradient(180deg, rgba(18, 28, 49, 0.86), rgba(12, 20, 36, 0.86));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.card-title { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; }
.card-sub { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.grid { display: grid; gap: 14px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px; border-radius: 15px; border: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(18, 28, 49, 0.8), rgba(12, 20, 36, 0.8)); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kpi-label { font-size: 11.5px; color: var(--muted-2); font-weight: 550; }
.kpi-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(92, 225, 176, 0.08); color: var(--mint); }
.kpi-icon.violet { background: rgba(139, 124, 255, 0.1); color: #c3b8ff; }
.kpi-icon.blue { background: rgba(108, 182, 255, 0.1); color: var(--blue); }
.kpi-icon.amber { background: rgba(255, 196, 107, 0.1); color: var(--amber); }
.kpi-value { font-size: 25px; font-weight: 750; letter-spacing: -0.04em; line-height: 1.1; }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; margin-top: 7px; color: var(--green); font-weight: 600; }
.kpi-trend.down { color: var(--red); }
.kpi-trend svg { width: 12px; height: 12px; }

.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

/* ---------- charts ---------- */

.chart-wrap { margin-top: 4px; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-labels { display: flex; justify-content: space-between; padding: 4px 2px 0; font-size: 10.5px; color: var(--muted-2); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--muted-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.mint { background: var(--mint); }
.dot.violet { background: var(--violet); }
.dot.blue { background: var(--blue); }
.dot.amber { background: var(--amber); }

/* ---------- lists ---------- */

.list { display: grid; gap: 9px; }
.list-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px;
  border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(10, 18, 34, 0.6);
}
.list-row:hover { border-color: #2b3d61; }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.list-time { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }

.empty {
  display: grid; place-items: center; text-align: center; gap: 8px;
  padding: 38px 20px; border: 1px dashed #2a3b5e; border-radius: 15px;
  color: var(--muted); background: rgba(10, 18, 34, 0.35);
}
.empty-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(139, 124, 255, 0.09); color: var(--violet); }
.empty-title { font-size: 13.5px; font-weight: 650; color: var(--text); }
.empty-text { font-size: 12px; color: var(--muted-2); max-width: 360px; line-height: 1.5; }

/* ---------- onboarding ---------- */

.onboard { display: grid; gap: 8px; }
.onboard-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; font-size: 12.5px; color: var(--muted); }
.onboard-item.done { color: var(--muted-2); }
.onboard-item.done .onboard-check { background: rgba(92, 225, 176, 0.15); border-color: rgba(92, 225, 176, 0.4); color: var(--mint); }
.onboard-check { width: 21px; height: 21px; border-radius: 7px; border: 1px solid #32466f; display: grid; place-items: center; flex: none; color: transparent; }
.onboard-check svg { width: 13px; height: 13px; }
.onboard-item a { margin-left: auto; font-size: 11.5px; color: var(--mint); }
.progress { height: 6px; border-radius: 999px; background: #0a1324; border: 1px solid var(--line-soft); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--violet)); border-radius: 999px; transition: width 0.4s ease; }

/* ---------- tabs ---------- */

.tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; background: #0a1324; border: 1px solid var(--line); border-radius: 12px; width: fit-content; }
.tab { border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 8px; }
.tab.active { background: var(--panel-3); border-color: #32466f; color: var(--text); }
.tab:hover { color: var(--text); }

/* ---------- posts ---------- */

.post-list { display: grid; gap: 11px; }
.post-card { padding: 16px; border-radius: 15px; border: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(18, 28, 49, 0.78), rgba(12, 20, 36, 0.78)); }
.post-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.post-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.post-title { font-size: 14px; font-weight: 650; margin: 10px 0 5px; letter-spacing: -0.01em; }
.post-text { font-size: 12.5px; color: var(--muted); line-height: 1.6; max-height: 76px; overflow: hidden; }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 11px; font-size: 11px; color: var(--muted-2); }
.post-meta b { color: var(--muted); font-weight: 550; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.post-metrics { display: flex; gap: 14px; margin-top: 9px; font-size: 11px; color: var(--muted-2); }
.post-metrics b { color: var(--text); font-weight: 600; }
.post-metrics span { display: inline-flex; align-items: center; gap: 5px; }
.post-metrics svg { width: 13px; height: 13px; color: var(--muted-2); }
.status-error { border-color: rgba(255, 107, 129, 0.28); }

/* ---------- composer ---------- */

.composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); gap: 14px; align-items: start; }
.brief-card { padding: 20px; }
.brief-fields { display: grid; gap: 13px; }
.variants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.variant { padding: 14px; border-radius: 13px; border: 1px solid var(--line-soft); background: rgba(10, 18, 34, 0.7); display: flex; flex-direction: column; gap: 8px; }
.variant.selected { border-color: rgba(92, 225, 176, 0.45); box-shadow: 0 0 0 2px rgba(92, 225, 176, 0.08); }
.variant h4 { font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.variant p { font-size: 11.5px; color: var(--muted); line-height: 1.55; flex: 1; max-height: 150px; overflow: auto; white-space: pre-wrap; }
.variant .hashtags { font-size: 10.5px; color: var(--blue); word-break: break-word; }
.variant-actions { display: flex; gap: 6px; margin-top: 4px; }
.ai-note { font-size: 11.5px; color: var(--amber); background: rgba(255, 196, 107, 0.06); border: 1px solid rgba(255, 196, 107, 0.18); border-radius: 10px; padding: 9px 11px; line-height: 1.5; }

.editor-card { padding: 20px; margin-top: 14px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.editor-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.hashtag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.schedule-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* fake preview */
.preview-card { padding: 16px; position: sticky; top: 78px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.preview-device { border-radius: 16px; border: 1px solid #26375a; background: #0a1222; overflow: hidden; }
.preview-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.02); }
.preview-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2b8fd6, #6cb6ff); color: #04121e; font-size: 10px; font-weight: 700; }
.preview-channel { font-size: 11.5px; font-weight: 650; }
.preview-channel small { display: block; font-size: 9.5px; color: var(--muted-2); font-weight: 500; }
.preview-body { padding: 12px; min-height: 190px; }
.preview-text { font-size: 12px; color: #d6e2f6; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.preview-text:empty::before { content: "Здесь появится текст поста…"; color: var(--muted-2); }
.preview-hashtags { margin-top: 8px; font-size: 10.5px; color: #8fc7ff; word-break: break-word; }
.preview-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 9.5px; color: var(--muted-2); border-top: 1px solid var(--line-soft); padding-top: 8px; }
.preview-meta span { display: inline-flex; align-items: center; gap: 4px; }
.preview-meta svg { width: 10px; height: 10px; }
.preview-telegram .preview-text { font-size: 12.5px; }
.preview-vk .preview-text { font-size: 12px; }
.preview-max .preview-text { font-size: 12px; }
.preview-dzen .preview-text { font-size: 11.5px; line-height: 1.65; }

/* ---------- channels ---------- */

.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.channel-card { padding: 18px; }
.channel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.channel-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-soft); flex: none; }
.channel-logo svg { width: 18px; height: 18px; }
.channel-name b { display: block; font-size: 13.5px; }
.channel-name span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.channel-form { display: grid; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.channel-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.channel-note { font-size: 11.5px; color: var(--muted-2); line-height: 1.55; margin-top: 9px; }
.channel-connected { color: var(--mint); font-size: 11.5px; }
.code-pill { font-family: var(--mono); font-size: 10.5px; background: #0a1324; border: 1px solid var(--line-soft); border-radius: 6px; padding: 2px 6px; color: var(--blue); }

/* ---------- analytics ---------- */

.analytics-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.bar-list { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 11.5px; }
.bar-label { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.bar-track { height: 8px; border-radius: 999px; background: #0a1324; border: 1px solid var(--line-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--violet)); }
.bar-value { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 13px; }
.table { width: 100%; border-collapse: collapse; font-size: 11.5px; min-width: 620px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { font-size: 10.5px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(255, 255, 255, 0.02); }
.table tr:last-child td { border-bottom: 0; }
.table td b { font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .title-cell { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- chatbot ---------- */

.bot-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(300px, 360px); gap: 14px; align-items: start; }
.flow-list { padding: 12px; display: grid; gap: 7px; }
.flow-item { text-align: left; border: 1px solid var(--line-soft); background: rgba(10, 18, 34, 0.55); border-radius: 11px; padding: 11px; color: var(--muted); width: 100%; }
.flow-item:hover { border-color: #2c3f64; }
.flow-item.active { border-color: rgba(92, 225, 176, 0.36); background: rgba(92, 225, 176, 0.06); }
.flow-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.flow-triggers { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-editor { padding: 18px; }
.flow-editor .field + .field { margin-top: 12px; }
.chat-panel { padding: 0; overflow: hidden; position: sticky; top: 78px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.02); }
.chat-head b { font-size: 12.5px; }
.chat-head span { font-size: 10.5px; color: var(--muted-2); }
.chat-log { height: 360px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; border-radius: 12px; padding: 8px 11px; font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.bot { align-self: flex-start; background: #14213a; border: 1px solid #24365a; border-bottom-left-radius: 4px; color: #d8e4f7; }
.msg.user { align-self: flex-end; background: rgba(92, 225, 176, 0.14); border: 1px solid rgba(92, 225, 176, 0.24); border-bottom-right-radius: 4px; color: #d7fff1; }
.msg.typing { color: var(--muted-2); font-style: italic; }
.msg-time { display: block; font-size: 9px; opacity: 0.55; margin-top: 3px; }
.chat-form { display: flex; gap: 8px; padding: 11px; border-top: 1px solid var(--line-soft); }
.chat-form .input { min-height: 38px; padding: 8px 11px; font-size: 12px; }
.chat-form .btn { min-height: 38px; padding: 0 12px; }
.kb { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }

/* ---------- settings ---------- */

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.settings-card { padding: 20px; }
.settings-card h3 { font-size: 14.5px; margin-bottom: 12px; }
.data-list { display: grid; gap: 8px; }
.data-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.data-row:last-child { border-bottom: 0; }
.data-row b { color: var(--text); font-weight: 600; }
.danger-zone { border-color: rgba(255, 107, 129, 0.22); }
.danger-zone h3 { color: #ffb3bf; }
.about-text { font-size: 12px; color: var(--muted); line-height: 1.65; }
.about-text + .about-text { margin-top: 8px; }

/* ---------- toast ---------- */

.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 8px; max-width: min(390px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  background: #101b30; border: 1px solid #2a3d62; border-radius: 12px;
  padding: 11px 13px; font-size: 12.5px; color: var(--text); line-height: 1.45;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); animation: toastIn 0.2s ease both;
}
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast-ok { border-color: rgba(92, 225, 176, 0.3); }
.toast-ok svg { color: var(--mint); }
.toast-err { border-color: rgba(255, 107, 129, 0.32); }
.toast-err svg { color: var(--red); }
.toast-info svg { color: var(--blue); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(3, 6, 13, 0.7);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
  animation: fadeIn 0.18s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(520px, 100%); background: #101a2e; border: 1px solid #2a3d62;
  border-radius: 18px; box-shadow: var(--shadow); padding: 20px;
  animation: fadeUp 0.2s ease both;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.modal-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.modal-x { background: transparent; border: 0; color: var(--muted); padding: 4px; border-radius: 8px; }
.modal-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.modal-body { font-size: 13px; color: var(--muted); line-height: 1.6; }
.modal-body p + p { margin-top: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---------- skeleton ---------- */

.skeleton { border-radius: 10px; background: linear-gradient(90deg, #121d33 25%, #1a2845 37%, #121d33 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-card { height: 120px; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .hero { gap: 28px; }
  .composer-grid { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .bot-grid { grid-template-columns: 230px minmax(0, 1fr); }
  .chat-panel { grid-column: 1 / -1; position: static; }
  .chat-log { height: 280px; }
  .variants { grid-template-columns: 1fr; }
  .variant p { max-height: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; height: auto; z-index: 20;
    flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px;
    border-right: 0; border-bottom: 1px solid var(--line-soft);
    overflow-x: auto; background: rgba(7, 11, 20, 0.92);
  }
  .sidebar-brand { padding: 0; border: 0; flex: none; }
  .sidebar-brand .brand-sub, .sidebar-brand .brand-name { display: none; }
  .sidebar-nav { display: flex; gap: 3px; flex: 1; }
  .nav-item { white-space: nowrap; padding: 8px 9px; font-size: 12px; }
  .nav-item .nav-icon { display: none; }
  .sidebar-foot { display: none; }
  .main { padding: 0 16px 40px; }
  .topbar { padding: 12px 0 8px; }
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-visual { order: -1; min-height: 0; max-width: 560px; }
  .mock-app { transform: none; }
  .feature-grid, .steps { grid-template-columns: 1fr 1fr; }
  .split, .split-2, .settings-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .landing { padding: 0 16px 30px; }
  .landing-header { flex-wrap: wrap; }
  .landing-nav { display: none; }
  .hero-title { font-size: 38px; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { padding: 13px; }
  .kpi-value { font-size: 21px; }
  .editor-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .bot-grid { grid-template-columns: 1fr; }
  .row, .schedule-row { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 24px; }
  .page-head { align-items: flex-start; }
  .topbar-title { font-size: 14px; }
  .topbar-sub { display: none; }
  .demo-pill { display: none; }
  .main { padding: 0 12px 36px; }
  .card-pad, .brief-card, .editor-card, .settings-card, .flow-editor { padding: 15px; }
  .toast-host { right: 12px; bottom: 12px; }
  .table { min-width: 540px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
