/* ==========================================================================
   Беркут AI PRO — дизайн-система 3.0
   Деловой стиль: светлая основа, графитовый текст, тёплый акцент.
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f1f3f6;
  --ink: #0c111d;
  --ink-2: #344054;
  --muted: #667085;
  --dim: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;

  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-soft: #fdf1ea;
  --accent-line: #f6d8c6;
  --gold: #b7791f;
  --green: #0f766e;
  --green-soft: #edf7f4;
  --red: #b42318;
  --red-soft: #fef3f2;
  --blue: #175cd3;

  --radius: 14px;
  --radius-s: 9px;
  --radius-l: 20px;
  --max: 1180px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Manrope', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-s: 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-m: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-l: 0 24px 64px rgba(16, 24, 40, .12);
}

[data-theme="dark"] {
  --bg: #0a0e15;
  --surface: #111722;
  --surface-2: #0e131c;
  --surface-3: #1a2230;
  --ink: #e8ecf3;
  --ink-2: #c3cad6;
  --muted: #98a2b3;
  --dim: #6b7686;
  --line: #1f2937;
  --line-strong: #2b3648;

  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-soft: #1f1610;
  --accent-line: #3a2517;
  --gold: #e0a83a;
  --green: #34d399;
  --green-soft: #0d201a;
  --red: #f87171;
  --red-soft: #23100f;
  --blue: #60a5fa;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-s: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-m: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-l: 0 24px 64px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv11";
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.link:hover { color: var(--accent-hover); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
::selection { background: #ffd9c2; color: #101828; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  letter-spacing: -.025em;
  line-height: 1.15;
  font-weight: 800;
  margin: 0;
}
h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -.035em; }
h2 { font-size: clamp(26px, 3.2vw, 38px); }
h3 { font-size: 17px; letter-spacing: -.015em; font-weight: 700; }
p { margin: 0 0 12px; }
small { font-size: 13px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- каркас ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.accent { color: var(--accent); }
.green { color: var(--green); }
.red { color: var(--red); }
.mono { font-family: var(--mono); font-size: .92em; }
.sep { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.center { text-align: center; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; letter-spacing: -.005em;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .1s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--ink); color: #fff; border-color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: #1d2939; border-color: #1d2939; }
[data-theme="dark"] .btn-primary { background: #f97316; border-color: #f97316; color: #1a0d02; }
[data-theme="dark"] .btn-primary:hover { background: #fb923c; border-color: #fb923c; }

.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger { color: var(--red); border-color: #f3c6c1; background: var(--red-soft); }
.btn-danger:hover { background: #fde5e2; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font-size: 15px; transition: .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- поверхности ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-xs);
}
.card-flat { box-shadow: none; }
.card-pad-0 { padding: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line);
}
.badge.hot { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge.ok { background: var(--green-soft); color: var(--green); border-color: #c7e6df; }
.badge.err { background: var(--red-soft); color: var(--red); border-color: #f3c6c1; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-weight: 500;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------- формы ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 10px 12px; outline: none;
  font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(12, 17, 29, .07); }
textarea.input { resize: vertical; min-height: 92px; line-height: 1.55; }
select.input {
  appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23667085' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: calc(100% - 12px) center;
}

/* ---------- таблицы ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--dim);
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--surface-2); }

.empty {
  padding: 32px 20px; text-align: center; color: var(--dim); font-size: 14px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2);
}

.spin {
  width: 15px; height: 15px; border: 2px solid var(--line-strong);
  border-top-color: var(--ink); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3));
  background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px;
}
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- тосты и модалки ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9000; max-width: 390px; }
.toast {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ink); padding: 12px 16px; border-radius: 10px;
  box-shadow: var(--shadow-m); font-size: 13.5px; color: var(--ink);
  animation: tin .18s ease; transition: opacity .3s, transform .3s;
}
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.modal-bg {
  position: fixed; inset: 0; background: rgba(12, 17, 29, .45);
  backdrop-filter: blur(3px); z-index: 9500; display: flex;
  align-items: center; justify-content: center; padding: 20px; animation: tin .15s ease;
}
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-l);
  width: 100%; max-width: 540px; max-height: 88vh; overflow: auto; padding: 26px;
}
.modal h3 { font-size: 19px; margin: 0 0 6px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ==========================================================================
   Маркетинг
   ========================================================================== */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .site-head { background: rgba(10, 14, 21, .86); }
.site-head .inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(150deg, #1d2939, #0c111d);
  display: flex; align-items: center; justify-content: center;
  color: #f6c453; font-weight: 800; font-size: 15px;
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .brand .logo { background: linear-gradient(150deg, #f97316, #c2410c); color: #1a0d02; }
.brand small { display: block; font-size: 9.5px; letter-spacing: .18em; color: var(--dim); font-weight: 700; margin-top: -3px; }

.nav { display: flex; gap: 24px; font-size: 14px; color: var(--muted); font-weight: 500; }
.nav a { transition: color .15s; }
.nav a:hover { color: var(--ink); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.hero { position: relative; padding: 76px 0 64px; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero:before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(720px 320px at 12% -10%, rgba(194, 65, 12, .07), transparent 70%),
    radial-gradient(600px 300px at 88% 0%, rgba(23, 92, 211, .05), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; position: relative; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.kicker:before { content: ''; width: 18px; height: 1.5px; background: var(--accent); }
h1.hero-title { margin: 0 0 18px; }
h1.hero-title em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 17px; line-height: 1.62; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-stats div { font-size: 12.5px; color: var(--muted); }
.hero-stats b { display: block; font-family: var(--display); font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: 1px; }

.mock {
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: var(--surface); box-shadow: var(--shadow-l); overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-size: 12px; color: var(--dim); font-family: var(--mono);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.mock-body { padding: 18px; display: grid; gap: 12px; min-height: 306px; background: var(--surface); }
.mock-msg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.mock-msg.me { background: var(--surface-3); border-color: var(--line); margin-left: 40px; color: var(--ink); }
.mock-msg .who { font-size: 9.5px; letter-spacing: .12em; color: var(--dim); margin-bottom: 5px; font-weight: 700; }
.mock-input {
  display: flex; gap: 8px; align-items: center; border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 12px; color: var(--dim); font-size: 12.5px;
  background: var(--surface-2); margin-top: 2px;
}

.trustbar { padding: 22px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.trustbar .row { gap: 26px; flex-wrap: wrap; }
.trustbar .lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.trust-name { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--dim); letter-spacing: -.01em; }

.section { padding: 72px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.section.alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head .kicker { margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 16px; margin: 12px 0 0; line-height: 1.6; }

.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.feature:hover { border-color: var(--line-strong); box-shadow: var(--shadow-s); transform: translateY(-2px); }
.feature .ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center; margin-bottom: 15px; color: var(--ink);
}
.feature .ico svg { width: 19px; height: 19px; stroke-width: 1.7; }
.feature h3 { margin: 0 0 7px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.8px; line-height: 1.6; }

.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim);
  font-weight: 600; text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.price-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:hover td { background: var(--surface-2); }
.model-name { font-weight: 650; font-size: 15px; color: var(--ink); }
.model-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.price { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

.tabs { display: inline-flex; gap: 2px; background: var(--surface-3); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.tabs button {
  background: transparent; border: none; padding: 7px 15px; border-radius: 7px;
  color: var(--muted); font-size: 13px; font-weight: 600; transition: .15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 26px; position: relative; transition: .18s;
}
.plan:hover { box-shadow: var(--shadow-m); border-color: var(--line-strong); }
.plan.pop { border-color: var(--ink); box-shadow: var(--shadow-m); }
[data-theme="dark"] .plan.pop { border-color: var(--accent); }
.plan .tag {
  position: absolute; top: -10px; right: 20px; background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: .06em;
}
[data-theme="dark"] .plan .tag { background: var(--accent); color: #1a0d02; }
.plan .plan-name { font-family: var(--display); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.plan .price-big { font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -.035em; margin: 10px 0 2px; }
.plan .price-big span { font-size: 14px; font-weight: 500; color: var(--dim); letter-spacing: 0; font-family: var(--font); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.plan li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.5; }
.plan li svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; color: var(--green); }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; gap: 20px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:after { content: '+'; color: var(--dim); font-size: 20px; line-height: 1; font-weight: 400; }
.faq details[open] summary:after { content: '−'; }
.faq p { color: var(--muted); font-size: 14px; margin: 10px 0 0; max-width: 780px; line-height: 1.65; }

.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--radius-l);
  padding: 48px; text-align: center; position: relative; overflow: hidden;
}
.cta-band:before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(500px 240px at 50% 0%, rgba(246, 196, 83, .16), transparent 70%);
}
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: #c3cad6; max-width: 560px; margin: 12px auto 24px; position: relative; }
.cta-band .btn-primary { background: #fff; color: #0c111d; border-color: #fff; }
.cta-band .btn-primary:hover { background: #e8ecf3; border-color: #e8ecf3; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.site-foot { padding: 44px 0 36px; background: var(--surface); color: var(--muted); font-size: 13px; }
.site-foot .cols { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 32px; margin-bottom: 34px; }
.site-foot .col b { display: block; color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; font-weight: 700; }
.site-foot .col a { display: block; margin-bottom: 9px; color: var(--muted); transition: color .15s; }
.site-foot .col a:hover { color: var(--ink); }
.legal-note {
  border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; color: var(--dim);
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between;
}

/* ==========================================================================
   Консоль
   ========================================================================== */
.console { display: grid; grid-template-columns: 268px 1fr; height: 100vh; overflow: hidden; background: var(--bg); }
.side {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.side-head { padding: 14px; border-bottom: 1px solid var(--line); }
.side-brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 14.5px; margin-bottom: 13px; letter-spacing: -.02em; }
.side-brand .logo {
  width: 27px; height: 27px; border-radius: 7px; background: linear-gradient(150deg, #1d2939, #0c111d);
  display: flex; align-items: center; justify-content: center; color: #f6c453; font-weight: 800; font-size: 13px;
}
[data-theme="dark"] .side-brand .logo { background: linear-gradient(150deg, #f97316, #c2410c); color: #1a0d02; }
.btn-new {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; background: var(--ink); color: #fff; border: 1px solid var(--ink);
  border-radius: 9px; font-weight: 600; font-size: 13.5px; transition: .15s;
}
.btn-new:hover { background: #1d2939; }
[data-theme="dark"] .btn-new { background: var(--accent); border-color: var(--accent); color: #1a0d02; }

.side-search { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.side-search input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 12.5px; outline: none;
}
.side-search input:focus { border-color: var(--line-strong); background: var(--surface); }

.conv-list { flex: 1; overflow: auto; padding: 8px; }
.conv {
  position: relative; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center;
  margin-bottom: 1px; transition: .12s;
}
.conv:hover { background: var(--surface-2); color: var(--ink); }
.conv.active { background: var(--surface-3); color: var(--ink); font-weight: 500; }
.conv .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.conv .menu-dot { opacity: 0; border: none; background: transparent; color: var(--dim); padding: 0 14px; font-size: 15px; line-height: 0; }
.conv:hover .menu-dot, .conv.active .menu-dot { opacity: 1; }

.side-foot { border-top: 1px solid var(--line); padding: 8px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--muted); width: 100%; background: transparent;
  border: none; text-align: left; transition: .12s; font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ic { width: 16px; display: inline-flex; justify-content: center; opacity: .9; }
.nav-item .badge { margin-left: auto; }

.user-chip { display: flex; align-items: center; gap: 9px; padding: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  font-weight: 700; color: var(--ink-2); border: 1px solid var(--line); flex-shrink: 0;
}

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap;
}
.balance-chip {
  display: flex; align-items: center; gap: 18px; padding: 6px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px;
}
.balance-chip .lbl { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.balance-chip b { font-family: var(--mono); font-size: 12.5px; color: var(--ink); font-weight: 500; }

.content { flex: 1; overflow: auto; min-height: 0; }
.panel-page { padding: 34px 28px 48px; max-width: 1000px; }
.panel-page h2 { font-size: 24px; margin-bottom: 4px; }
.page-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 24px; }

/* чат */
.chat-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-scroll { flex: 1; overflow: auto; padding: 28px 20px 12px; }
.chat-inner { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.msg { display: flex; gap: 12px; align-items: flex-start; animation: tin .14s ease; }
.msg .ava {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; margin-top: 1px;
}
.msg.user .ava { background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); }
.msg.assistant .ava { background: linear-gradient(150deg, #1d2939, #0c111d); color: #f6c453; }
[data-theme="dark"] .msg.assistant .ava { background: linear-gradient(150deg, #f97316, #c2410c); color: #1a0d02; }
.msg .body { min-width: 0; flex: 1; }
.msg .meta {
  display: flex; gap: 8px; align-items: center; font-size: 10px; color: var(--dim);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700;
}
.msg .status { font-size: 11px; color: var(--accent); font-weight: 500; text-transform: none; letter-spacing: 0; }
.msg .text { font-size: 15px; line-height: 1.68; word-wrap: break-word; overflow-wrap: anywhere; color: var(--ink-2); }
.msg.user .text { color: var(--ink); }
.msg .text p { margin: 0 0 11px; }
.msg .text p:last-child { margin-bottom: 0; }
.msg .text h1, .msg .text h2, .msg .text h3 { font-size: 16px; margin: 18px 0 8px; letter-spacing: -.01em; }
.msg .text ul, .msg .text ol { margin: 8px 0 12px; padding-left: 22px; }
.msg .text li { margin-bottom: 5px; }
.msg .text strong { color: var(--ink); font-weight: 650; }
.msg .text pre {
  background: #0e1420; border: 1px solid #1f2937; border-radius: 10px;
  padding: 14px 15px; overflow: auto; font-family: var(--mono); font-size: 12.5px;
  line-height: 1.6; margin: 12px 0; position: relative; color: #dbe2ee;
}
.msg .text code { font-family: var(--mono); font-size: 12.7px; background: var(--surface-3); padding: 1.5px 5px; border-radius: 5px; color: var(--ink); }
.msg .text pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.msg .text blockquote { border-left: 2.5px solid var(--line-strong); margin: 10px 0; padding: 2px 0 2px 14px; color: var(--muted); }
.msg .text a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.msg .text table { border-collapse: collapse; margin: 12px 0; font-size: 13px; width: 100%; }
.msg .text th, .msg .text td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.msg .text th { background: var(--surface-2); font-weight: 600; }
.msg .text hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

.copy-code {
  position: absolute; top: 8px; right: 8px; font-size: 10.5px; padding: 3px 8px;
  border-radius: 6px; background: #1a2230; border: 1px solid #2b3648; color: #98a2b3;
  opacity: 0; transition: opacity .15s;
}
pre:hover .copy-code { opacity: 1; }
.copy-code:hover { color: #e8ecf3; }

.msg-tools { display: flex; gap: 12px; margin-top: 8px; opacity: 0; transition: opacity .15s; align-items: center; }
.msg:hover .msg-tools { opacity: 1; }
.msg-tools button { background: transparent; border: none; color: var(--dim); font-size: 11.5px; padding: 0; }
.msg-tools button:hover { color: var(--ink); text-decoration: underline; }
.cursor-blink:after { content: '▍'; color: var(--accent); animation: blink 1.05s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.sources { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.sources .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; margin-bottom: 6px; }
.sources a { display: block; font-size: 12.5px; color: var(--blue); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.composer-wrap { border-top: 1px solid var(--line); padding: 12px 20px 16px; background: var(--bg); }
.composer {
  max-width: 780px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 14px; padding: 10px 12px;
  box-shadow: var(--shadow-s); transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(12, 17, 29, .06); }
.composer textarea {
  width: 100%; background: transparent; border: none; outline: none; resize: none;
  font-size: 14.5px; line-height: 1.55; max-height: 200px; min-height: 26px; padding: 4px 2px;
  color: var(--ink);
}
.composer textarea::placeholder { color: var(--dim); }
.composer-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted); border-radius: 7px;
  height: 28px; padding: 0 9px; font-size: 11.5px; font-weight: 600; transition: .15s;
}
.chip-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.chip-toggle.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.chip-toggle svg { width: 13px; height: 13px; }
.send-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; margin-left: auto; transition: .15s;
}
.send-btn:hover { background: #1d2939; }
.send-btn:disabled { background: var(--surface-3); border-color: var(--line); color: var(--dim); }
.send-btn.stop { background: var(--red-soft); border-color: #f3c6c1; color: var(--red); }
[data-theme="dark"] .send-btn { background: var(--accent); border-color: var(--accent); color: #1a0d02; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; font-size: 11.5px; color: var(--ink-2);
}
.attach-chip b { cursor: pointer; color: var(--dim); font-weight: 400; }
.attach-chip b:hover { color: var(--red); }
.hint { max-width: 780px; margin: 8px auto 0; font-size: 11px; color: var(--dim); text-align: center; }

.model-pick {
  display: flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; font-size: 12.5px; height: 34px;
}
.model-pick select { background: transparent; border: none; outline: none; color: var(--ink); font-weight: 600; font-size: 12.5px; }
.model-pick .dot-ok { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.welcome { max-width: 700px; margin: 7vh auto 0; text-align: center; padding: 0 10px; }
.welcome h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.03em; }
.welcome p { color: var(--muted); font-size: 14.5px; margin: 0 0 30px; }
.starter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; text-align: left; }
.starter {
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 15px; font-size: 13px; color: var(--muted); transition: .15s; text-align: left;
}
.starter:hover { border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-xs); transform: translateY(-1px); }
.starter b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 3px; font-weight: 650; }

/* ==========================================================================
   Авторизация
   ========================================================================== */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-left {
  padding: 56px; display: flex; flex-direction: column; justify-content: center;
  background: var(--surface-2); border-right: 1px solid var(--line); position: relative; overflow: hidden;
}
.auth-left:before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 20% 10%, rgba(194, 65, 12, .07), transparent 70%);
}
.auth-left h1 { font-size: 38px; margin: 24px 0 16px; position: relative; }
.auth-left p { color: var(--muted); max-width: 400px; position: relative; font-size: 15px; }
.auth-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--surface); }
.auth-card { width: 100%; max-width: 396px; }
.auth-card h2 { font-size: 23px; margin: 0 0 5px; }
.auth-tabs { display: inline-flex; gap: 2px; background: var(--surface-3); border: 1px solid var(--line); padding: 3px; border-radius: 9px; margin: 20px 0 22px; width: 100%; }
.auth-tabs button { flex: 1; background: transparent; border: none; padding: 7px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 13px; }
.auth-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.auth-err {
  background: var(--red-soft); border: 1px solid #f3c6c1; color: var(--red);
  border-radius: 8px; padding: 9px 11px; font-size: 12.5px; margin-bottom: 14px;
}
.auth-note { font-size: 11.5px; color: var(--dim); margin-top: 16px; text-align: center; }
.auth-note + .auth-note { margin-top: 8px; }

/* ==========================================================================
   Данные, статистика
   ========================================================================== */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 15px 16px; }
.stat .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 650; }
.stat .val { font-family: var(--display); font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin-top: 3px; color: var(--ink); }
.stat .sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 104px; padding-top: 8px; }
.bars .bar { flex: 1; background: var(--ink); border-radius: 3px 3px 1px 1px; min-height: 3px; position: relative; opacity: .82; transition: opacity .15s; }
.bars .bar:hover { opacity: 1; }
.bars .bar:hover:after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 4px 8px; border-radius: 5px; font-size: 10.5px; white-space: nowrap; z-index: 5;
}

.key-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.key-row:last-child { border-bottom: none; }
.key-val { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 8px; border-radius: 6px; }

.copy-field {
  display: flex; gap: 8px; align-items: center; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-family: var(--mono); font-size: 12px; overflow: hidden;
}
.copy-field span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.method {
  display: flex; gap: 11px; align-items: center; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; cursor: pointer; background: var(--surface); transition: .15s;
}
.method:hover { border-color: var(--line-strong); }
.method.active { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.method.off { opacity: .45; cursor: not-allowed; }
.method .radio { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; }
.method.active .radio { border-color: var(--ink); box-shadow: inset 0 0 0 3.5px var(--ink); }

.callout {
  border: 1px solid #cfe0fb; background: #f4f8ff; border-radius: 9px;
  padding: 12px 14px; font-size: 13px; color: #1e3a8a; line-height: 1.55;
}
.callout.warn { border-color: #f3e0bd; background: #fffbf2; color: #7a4d0b; }
[data-theme="dark"] .callout { background: #0d1a2d; border-color: #1e3a8a; color: #bfd3f5; }
[data-theme="dark"] .callout.warn { background: #201a0d; border-color: #4a3a1a; color: #e8d5a8; }
.callout code { font-family: var(--mono); font-size: 12px; }

/* ==========================================================================
   Документация
   ========================================================================== */
.doc-hero { padding: 52px 0 34px; border-bottom: 1px solid var(--line); background: var(--surface); }
.doc-grid { display: grid; grid-template-columns: 216px 1fr; gap: 48px; padding: 40px 0 80px; max-width: var(--max); margin: 0 auto; }
.doc-nav { position: sticky; top: 84px; align-self: start; font-size: 13.5px; }
.doc-nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); font-weight: 700; margin: 16px 0 6px; padding-left: 10px; }
.doc-nav a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--muted); border-left: 2px solid transparent; }
.doc-nav a:hover { color: var(--ink); background: var(--surface-2); }
.doc-nav a.active { color: var(--ink); border-left-color: var(--accent); background: var(--surface-2); font-weight: 600; }
.doc-body { min-width: 0; font-size: 14.5px; color: var(--ink-2); }
.doc-body h1 { font-size: 32px; margin: 0 0 8px; }
.doc-body h2 { font-size: 24px; margin: 42px 0 12px; scroll-margin-top: 84px; padding-top: 6px; }
.doc-body h3 { font-size: 16px; margin: 26px 0 8px; }
.doc-body p, .doc-body li { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.doc-body ul, .doc-body ol { padding-left: 22px; margin: 10px 0; }
.doc-body li { margin-bottom: 6px; }
.doc-body code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; color: var(--ink); }
.doc-body pre {
  background: #0e1420; border: 1px solid #1f2937; border-radius: 11px; padding: 16px;
  overflow: auto; font-size: 12.5px; line-height: 1.65; position: relative; color: #dbe2ee;
}
.doc-body pre code { background: none; padding: 0; color: inherit; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 14px 0; }
.doc-body th { text-align: left; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 9px; border-bottom: 1px solid var(--line); font-weight: 650; }
.doc-body td { padding: 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-body .copy-code { position: absolute; }

/* ==========================================================================
   Админка
   ========================================================================== */
.admin-shell { min-height: 100vh; background: var(--bg); }
.admin-head {
  border-bottom: 1px solid var(--line); padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.admin-body { max-width: 1280px; margin: 0 auto; padding: 26px 24px 60px; }
.admin-grid { display: grid; grid-template-columns: 210px 1fr; gap: 26px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 86px; align-self: start; }
.admin-nav button {
  text-align: left; background: transparent; border: none; padding: 8px 11px;
  border-radius: 7px; color: var(--muted); font-size: 13.5px; font-weight: 500; transition: .12s;
  display: flex; align-items: center; gap: 8px;
}
.admin-nav button:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-xs); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 9px 16px; font-size: 13px; }
.kv .k { color: var(--dim); }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .plans { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .console { grid-template-columns: 1fr; }
  .side { display: none; }
  .console.side-open .side {
    display: flex; position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 500;
    box-shadow: var(--shadow-l);
  }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .doc-grid { grid-template-columns: 1fr; padding: 24px 24px 60px; }
  .doc-nav { display: none; }
  .price-table .hide-sm { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; overflow: auto; position: static; padding-bottom: 4px; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .starter-grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 48px 0; }
  .panel-page { padding: 26px 16px 40px; }
  .chat-scroll { padding: 18px 12px 8px; }
  .composer-wrap { padding: 10px 12px 12px; }
  .hero-stats { gap: 22px; }
  .site-head .inner { gap: 12px; height: 58px; }
  .head-actions .btn-ghost { display: none; }
  .cta-band { padding: 32px 20px; }
  .plan { padding: 22px; }
  .admin-body { padding: 18px 14px 40px; }
  .msg .text { font-size: 14.5px; }
}

/* печать */
@media print {
  .site-head, .site-foot, .side, .topbar, .composer-wrap { display: none !important; }
  .console { display: block; height: auto; }
}

/* ==========================================================================
   3.1 — оплата, вложения, статусы и источники в чате
   ========================================================================== */
.attach-chip { background: var(--surface); }
.attach-chip b { cursor: default; color: var(--ink); font-weight: 600; }
.attach-chip i { cursor: pointer; font-style: normal; color: var(--dim); font-size: 12px; }
.attach-chip i:hover { color: var(--red); }
.attach-chip.loading { border-style: dashed; color: var(--muted); }

.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-status { margin: 2px 0 8px; color: var(--accent); font-size: 12px; letter-spacing: .01em; }
.msg-status::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px;
  border-radius: 50%; background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }

.msg-sources { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; }
.msg-sources b { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 6px; }
.msg-sources ol { margin: 0; padding-left: 18px; color: var(--ink-2); }
.msg-sources li { margin: 3px 0; }
.msg-sources a { color: var(--blue); text-decoration: none; border-bottom: 1px solid transparent; }
.msg-sources a:hover { border-bottom-color: currentColor; }

.callout.ok { border-color: #bfe3d8; background: var(--green-soft); color: var(--green); }
.callout.err { border-color: #f5c9c4; background: var(--red-soft); color: var(--red); }
[data-theme="dark"] .callout.ok { background: #0c211d; border-color: #1c4a41; color: #9fd8c9; }
[data-theme="dark"] .callout.err { background: #24100f; border-color: #52201c; color: #f0b4ae; }

.pay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.pay-sum { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.pay-steps { margin: 0 0 16px; padding-left: 20px; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.pay-steps li { margin-bottom: 6px; }
.pay-grid { display: grid; grid-template-columns: 1fr 148px; gap: 18px; align-items: start; margin-bottom: 16px; }
.pay-grid .kv { margin: 0; }
.pay-qr { text-align: center; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px; background: var(--surface-2); }
.pay-qr img { width: 100%; max-width: 128px; height: auto; border-radius: 6px; background: #fff; padding: 4px; }
@media (max-width: 620px) {
  .pay-grid { grid-template-columns: 1fr; }
  .pay-qr { max-width: 200px; }
  .pay-sum { font-size: 26px; }
}
