/* LeafNet AI — тёмный неон */
:root {
  --bg: #07060e;
  --bg-2: #0c0a18;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #eeecf8;
  --muted: #a3a0bd;
  --dim: #6f6c8a;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --grad: linear-gradient(120deg, #a78bfa 0%, #818cf8 45%, #22d3ee 100%);
  --grad-btn: linear-gradient(120deg, #7c3aed 0%, #6366f1 50%, #0ea5e9 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Unbounded", "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
code, pre { font-family: var(--mono); }
::selection { background: rgba(139, 92, 246, .45); }

/* фон со свечением */
.glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 500px at 15% -10%, rgba(124, 58, 237, .28), transparent 60%),
    radial-gradient(700px 500px at 95% 5%, rgba(34, 211, 238, .16), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(99, 102, 241, .14), transparent 60%);
}
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #c4b5fd;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(32px, 4.6vw, 56px); }
h2 { font-size: clamp(26px, 3.4vw, 42px); margin-top: 12px; }
h3 { font-size: 18px; }
.lead { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); margin: 18px 0 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 14px; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font: 600 15px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad-btn); color: #fff;
  box-shadow: 0 8px 30px -8px rgba(124, 58, 237, .7), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-primary:hover { box-shadow: 0 10px 40px -6px rgba(99, 102, 241, .9), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(167, 139, 250, .5); }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn-danger { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); color: #fecaca; }
.btn-danger:hover { background: rgba(248, 113, 113, .18); }
.btn svg { width: 18px; height: 18px; }

/* навигация */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(7, 6, 14, .72); border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 18px var(--font-head); letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 24px rgba(124, 58, 237, .5); }
.brand b { font-weight: 600; }
.brand span { color: #a78bfa; }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border-2); color: var(--text); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }

/* hero */
.hero { padding: 88px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px;
  border: 1px solid var(--border-2); background: var(--surface); border-radius: 999px;
  font-size: 14px; color: var(--muted);
}
.pill .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--grad-btn); display: grid; place-items: center; font-size: 12px; color: #fff; }
.hero h1 { margin-top: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 14px; }
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note svg { width: 18px; height: 18px; color: var(--green); }

/* мок чата */
.chat {
  position: relative; border-radius: 26px; padding: 18px;
  background: linear-gradient(180deg, rgba(20, 17, 38, .92), rgba(12, 10, 24, .92));
  border: 1px solid var(--border-2);
  box-shadow: 0 40px 120px -30px rgba(124, 58, 237, .55), 0 0 0 1px rgba(167,139,250,.08) inset;
}
.chat::before {
  content: ""; position: absolute; inset: -1px; border-radius: 26px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(167,139,250,.7), transparent 35%, transparent 65%, rgba(34,211,238,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px 16px; border-bottom: 1px solid var(--border); }
.chat-head img { width: 40px; height: 40px; border-radius: 12px; }
.chat-head b { display: block; font-size: 15px; }
.chat-head small { color: var(--green); font-size: 12.5px; }
.chat-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 4px 6px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.msg.me { align-self: flex-end; background: linear-gradient(120deg, #6d28d9, #4f46e5); border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg code { background: rgba(0,0,0,.35); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.msg .meta { display: block; margin-top: 4px; font-size: 11.5px; color: rgba(255,255,255,.55); text-align: right; }
.msg.voice { display: flex; align-items: center; gap: 10px; }
.wave { display: flex; gap: 3px; align-items: center; height: 22px; }
.wave i { width: 3px; border-radius: 2px; background: rgba(255,255,255,.8); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.float-badge {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
  background: rgba(15, 12, 30, .9); border: 1px solid var(--border-2); font-size: 13px; font-weight: 600;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); backdrop-filter: blur(8px);
}
.float-badge.b1 { top: -18px; right: 24px; }
.float-badge.b2 { bottom: -20px; left: -28px; }
.float-badge .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--grad-btn); font-size: 14px; }

/* полоса цифр */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.strip > div { background: var(--bg-2); padding: 26px 24px; }
.strip b { display: block; font: 600 28px var(--font-head); letter-spacing: -.02em; }
.strip span { color: var(--muted); font-size: 14px; }

/* карточки */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, transform .2s, background .2s;
}
.card:hover { border-color: rgba(167, 139, 250, .35); background: rgba(255,255,255,.045); transform: translateY(-2px); }
.card p { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(140deg, rgba(124,58,237,.3), rgba(34,211,238,.15));
  border: 1px solid rgba(167,139,250,.3); color: #ddd6fe;
}
.icon svg { width: 22px; height: 22px; }
.card.wide { grid-column: span 2; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(52, 211, 153, .12); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, .25); }
.tag.violet { background: rgba(139, 92, 246, .14); color: #c4b5fd; border-color: rgba(139, 92, 246, .3); }
.tag.red { background: rgba(248, 113, 113, .12); color: #fca5a5; border-color: rgba(248, 113, 113, .3); }

/* таблицы */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--dim); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.02); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.model-name { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.model-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad-btn); box-shadow: 0 0 12px rgba(139,92,246,.8); }

/* цены */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.price { display: flex; flex-direction: column; padding: 28px 24px; }
.price.popular { border-color: rgba(167,139,250,.55); background: linear-gradient(180deg, rgba(124,58,237,.16), rgba(255,255,255,.03)); box-shadow: 0 30px 80px -40px rgba(124,58,237,.8); }
.price .badge { position: absolute; top: -12px; left: 24px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--grad-btn); }
.price .amount { font: 600 40px var(--font-head); letter-spacing: -.03em; margin-top: 8px; }
.price .amount small { font-size: 16px; color: var(--muted); font-family: var(--font); font-weight: 500; }
.price .cost { font-size: 22px; font-weight: 700; margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.price ul { list-style: none; padding: 0; margin: 18px 0 24px; color: var(--muted); font-size: 14.5px; display: grid; gap: 8px; }
.price li::before { content: "✓"; color: var(--green); margin-right: 8px; font-weight: 700; }
.price .btn { margin-top: auto; }
.star { color: #fcd34d; }

/* код */
.code {
  border-radius: var(--radius); background: #0a0914; border: 1px solid var(--border-2); overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(34, 211, 238, .35);
}
.code-tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); align-items: center; }
.code-tabs button { background: none; border: 0; color: var(--muted); font: 600 13px var(--font); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.code-tabs button.active { background: rgba(139,92,246,.18); color: #ddd6fe; }
.code-tabs .copy { margin-left: auto; }
.code pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; color: #d4d2e8; }
.code pre[hidden] { display: none; }
.tok-k { color: #c4b5fd; } .tok-s { color: #86efac; } .tok-c { color: #6f6c8a; } .tok-n { color: #67e8f9; }
.api-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; color: var(--muted); }
.checks li b { color: var(--text); }
.checks svg { flex: none; width: 22px; height: 22px; color: var(--cyan); margin-top: 2px; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { counter-increment: s; }
.step::before {
  content: counter(s, decimal-leading-zero); display: block; margin-bottom: 16px;
  font: 600 14px var(--mono); color: #a78bfa;
}

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: rgba(167,139,250,.35); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: #a78bfa; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); }

/* CTA */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 72px 32px; border-radius: 28px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(124,58,237,.45), transparent 70%), var(--bg-2);
  border: 1px solid rgba(167,139,250,.3);
}
.cta .hero-actions { justify-content: center; }

/* подвал */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; color: var(--dim); font-size: 14px; }
.footer-inner { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.footer a:hover { color: var(--text); }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* кабинет / админка */
.page { padding: 48px 0 40px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(26px, 3vw, 36px); }
.panel { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.panel + .panel { margin-top: 16px; }
.two > .panel + .panel { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat span { color: var(--muted); font-size: 14px; }
.stat b { display: block; font: 600 30px var(--font-head); letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--dim); font-size: 13px; }
.stat.hl { background: linear-gradient(140deg, rgba(124,58,237,.22), rgba(34,211,238,.06)); border-color: rgba(167,139,250,.35); }
.two { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.input {
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-2);
  background: rgba(0,0,0,.25); color: var(--text); font: 15px var(--font); min-width: 0; flex: 1;
}
.input:focus { outline: none; border-color: rgba(167,139,250,.7); box-shadow: 0 0 0 4px rgba(139,92,246,.15); }
.keybox {
  display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 12px; margin-top: 12px;
  background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .3);
}
.keybox code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 14px; color: #a7f3d0; }
.mono { font-family: var(--mono); font-size: 13.5px; }
.empty { padding: 28px; text-align: center; color: var(--dim); }
.flash { padding: 14px 18px; border-radius: 12px; margin-bottom: 16px; border: 1px solid rgba(52,211,153,.3); background: rgba(52,211,153,.08); color: #a7f3d0; }
.flash.err { border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.08); color: #fecaca; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 9px 16px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a.active { background: rgba(139,92,246,.2); color: #ede9fe; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: linear-gradient(140deg, rgba(124,58,237,.5), rgba(34,211,238,.3)); flex: none; }
.pager { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* график в админке */
.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 180px; padding-top: 10px; border-bottom: 1px solid var(--border-2); }
.bar-col { position: relative; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.bar-col .bar { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: #8b5cf6; transition: background .15s; }
.bar-col:hover .bar { background: #a78bfa; }
.bar-col .tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 6px 10px; border-radius: 8px; font-size: 12.5px; white-space: nowrap;
  background: #1a1630; border: 1px solid var(--border-2); color: var(--text);
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 2;
}
.bar-col:hover .tip { opacity: 1; }
.bar-col.zero .bar { background: var(--border-2); }
.chart-x { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-top: 8px; font-size: 11.5px; color: var(--dim); text-align: center; }

/* документация */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 48px 0; }
.docs-nav { position: sticky; top: 92px; align-self: start; display: grid; gap: 4px; }
.docs-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 15px; }
.docs-nav a:hover { background: var(--surface); color: var(--text); }
.docs-body { min-width: 0; }
.docs-body section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.docs-body section:last-child { border-bottom: 0; }
.docs-body h2 { font-size: 26px; margin: 0 0 14px; scroll-margin-top: 90px; }
.docs-body p, .docs-body li { color: var(--muted); }
.docs-body p code, .docs-body li code, .docs-body td code { background: rgba(139,92,246,.14); color: #ddd6fe; padding: 2px 7px; border-radius: 6px; font-size: 13.5px; }
.docs-body .code { margin: 16px 0; box-shadow: none; }
.callout { padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(34,211,238,.3); background: rgba(34,211,238,.06); color: #cffafe; margin: 16px 0; }

/* вход */
.auth { min-height: calc(100vh - 68px - 120px); display: grid; place-items: center; padding: 48px 0; }
.auth-card { width: min(460px, 100%); text-align: center; padding: 40px 32px; }
.auth-card img.logo { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 18px; box-shadow: 0 0 40px rgba(124,58,237,.6); }
.auth-card .tg-widget { display: flex; justify-content: center; min-height: 44px; margin: 28px 0 14px; }
.or { display: flex; align-items: center; gap: 14px; color: var(--dim); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* админка: поддержка, промокоды, выдача */
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; }
.tabs-sm a { padding: 7px 12px; font-size: 13px; }
.tag.green { background: rgba(52, 211, 153, .12); color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.check { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; cursor: pointer; white-space: nowrap; }
.check input { accent-color: #8b5cf6; width: 16px; height: 16px; }
.grant-form { display: grid; grid-template-columns: 1.1fr .7fr 1.6fr auto auto; gap: 10px; align-items: center; }
.promo-form { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 12px; }
.promo-form label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.promo-form label > span { font-size: 12px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.promo-form .wide { grid-column: 1 / -2; }
select.input { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select.input option { background: #14121f; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; width: 100%; font: 15px/1.5 var(--font); }
td.actions { display: flex; gap: 6px; justify-content: flex-end; }
td.plus { color: #6ee7b7; }
tr.off td { opacity: .55; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: rgba(255,255,255,.025); }
.ticket-row { display: grid; grid-template-columns: 60px 180px 1fr auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); transition: background .15s; }
.ticket-row:hover { background: rgba(255,255,255,.03); }
.ticket-row.compact { grid-template-columns: 44px 1fr auto; padding: 9px 2px; font-size: 14px; }
.ticket-row.current { background: rgba(139,92,246,.1); border-radius: 8px; }
.thread { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; padding: 4px 4px 12px; }
.bubble { max-width: 80%; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255,255,255,.04); }
.bubble.user { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.admin { align-self: flex-end; border-bottom-right-radius: 6px; background: linear-gradient(140deg, rgba(124,58,237,.28), rgba(99,102,241,.16)); border-color: rgba(167,139,250,.35); }
.bubble-meta { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.bubble-text { white-space: pre-wrap; word-break: break-word; }
.bubble-img { max-width: 100%; max-height: 320px; border-radius: 10px; margin-bottom: 8px; }
.bubble-file { display: inline-block; margin-bottom: 6px; color: #c4b5fd; }
.reply-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

/* адаптив */
@media (max-width: 1020px) {
  .grant-form { grid-template-columns: 1fr 1fr; }
  .promo-form { grid-template-columns: repeat(2, 1fr); }
  .promo-form .wide { grid-column: 1 / -1; }
  .ticket-row { grid-template-columns: 50px 1fr; }
  .ticket-row > :nth-child(n+3) { grid-column: 2; }
  .hero-grid, .api-grid, .two { grid-template-columns: 1fr; }
  .pricing, .stats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card.wide { grid-column: span 2; }
  .float-badge.b2 { left: 12px; }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 40px; }
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .nav.open .nav-inner { flex-wrap: wrap; height: auto; padding: 14px 0; }
  .nav.open .nav-links, .nav.open .nav-cta { display: flex; flex-direction: column; width: 100%; margin: 0; gap: 12px; }
  .nav.open .nav-cta .btn { width: 100%; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .cards, .pricing, .steps, .stats { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; }
  .float-badge { display: none; }
  .hero-actions .btn { flex: 1; }
  th, td { padding: 12px 14px; }
  .chart-x span:nth-child(even) { visibility: hidden; }
  .grant-form, .promo-form { grid-template-columns: 1fr; }
  .bubble { max-width: 94%; }
}
section[id] { scroll-margin-top: 72px; }
