/* Дизайн-код Copy.ru AI v1.0 → перенос без Tailwind (дизайн-код §12, путь «не Tailwind»).
   Токены §2 скопированы как есть. Лендинг — геометрия дизайн-кода; админка —
   та же палитра/шрифты, плотность переопределена (ТЗ §16.3). */

:root {
  /* ── Brand ─────────────────────────────────────────── */
  --brand-violet: #632ee6;
  --brand-violet-700: #5325c4;
  --brand-violet-50: #f3f0ff;
  --brand-yellow: #fdb913;
  --brand-yellow-600: #e5a711;

  --primary: var(--brand-yellow);
  --primary-hover: var(--brand-yellow-600);
  --primary-on: #1a1a1a;

  --secondary: #7c3aed;
  --secondary-hover: #6d28d9;
  --secondary-on: #ffffff;

  --bg: #ffffff;
  --bg-light: #f5f5f5;
  --bg-subtle: #fafafa;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #8a8a8a;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --warning: #f59e0b;
  --highlight: #f3f0ff;
  --cut: #e5004c;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(26, 26, 26, 0.05);
  --shadow-sm: 0 2px 6px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 6px 18px rgba(26, 26, 26, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 26, 26, 0.1);
  --shadow-violet: 0 12px 30px rgba(99, 46, 230, 0.18);
  --shadow-yellow: 0 10px 24px rgba(253, 185, 19, 0.3);

  --header-h: 72px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 320ms;

  --font-onest: "Onest";
  --font-jbmono: "JetBrains Mono";
}

/* Шрифты: self-host, не Google CDN (ТЗ §16.5) */
@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-cyrillic-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jbmono-cyrillic-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jbmono-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jbmono-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jbmono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip; /* только body, не html (дизайн-код §3) */
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-onest), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
}
::selection { background: var(--brand-violet); color: #fff; }
button:not(:disabled), [role="button"], select:not(:disabled) { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }

.mono { font-family: var(--font-jbmono), ui-monospace, "SF Mono", Menlo, monospace; }

.container-page {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

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

@keyframes crFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════ ЛЕНДИНГ (§16.2, геометрия дизайн-кода без изменений) ══════════ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}
.site-header .inner { display: flex; height: var(--header-h); align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 36px; width: auto; display: block; }
.api-chip {
  font-family: var(--font-jbmono), monospace; font-size: 12px; font-weight: 700;
  background: var(--brand-violet); color: #fff; border-radius: var(--radius-pill);
  padding: 3px 10px; margin-left: 10px; vertical-align: middle;
}
.header-spacer { margin-left: auto; }

/* Кнопки (дизайн-код §7.1) */
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 0; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--primary-on);
  font-weight: 700; font-family: inherit; text-decoration: none;
  box-shadow: var(--shadow-yellow);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
  padding: 14px 28px; font-size: 16px;
}
.btn-cta:hover { background: var(--primary-hover); }
.btn-cta:active { transform: scale(0.97); }
.btn-cta.sm { padding: 10px 20px; font-size: 14px; box-shadow: none; }

.btn-ghost-white {
  display: inline-flex; align-items: center; border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.3); padding: 14px 24px;
  font-size: 16px; font-weight: 600; color: #fff; text-decoration: none;
  transition: background-color var(--dur) var(--ease); background: transparent;
}
.btn-ghost-white:hover { background: rgba(255, 255, 255, 0.1); }

.chip-violet {
  display: inline-flex; border-radius: var(--radius-pill); background: var(--brand-violet-50);
  padding: 10px 20px; font-size: 14px; font-weight: 700; color: var(--brand-violet);
  text-decoration: none; border: 0; font-family: inherit;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip-violet:hover { background: var(--brand-violet); color: #fff; }

/* Hero-band (дизайн-код §7.5) */
.hero-band { position: relative; isolation: isolate; overflow: hidden; background: var(--brand-violet); color: #fff; }
.hero-band .glow {
  pointer-events: none; position: absolute; inset: 0;
  background: radial-gradient(70% 110% at 50% -15%, rgba(255, 255, 255, 0.14), transparent 60%);
}
.hero-band .inner {
  position: relative; display: grid; gap: 40px; align-items: center;
  padding-block: 64px;
}
@media (min-width: 1024px) {
  .hero-band .inner { grid-template-columns: 1.05fr 0.95fr; gap: 56px; padding-block: 80px; }
}
.eyebrow {
  display: inline-block; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.15);
  padding: 6px 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
}
.hero-band h1 {
  margin: 16px 0; font-size: 36px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em;
}
@media (min-width: 640px) { .hero-band h1 { font-size: 48px; } }
@media (min-width: 1024px) { .hero-band h1 { font-size: 56px; } }
.hero-band .lead { font-size: 18px; color: rgba(255, 255, 255, 0.85); margin: 0 0 28px; }
@media (min-width: 640px) { .hero-band .lead { font-size: 20px; } }
.hero-band .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 32px; margin-top: 36px; }
.hero-stats .stat .num { font-family: var(--font-jbmono), monospace; font-size: 24px; font-weight: 800; }
.hero-stats .stat .cap { font-size: 13px; color: rgba(255, 255, 255, 0.7); }

/* Код-превью в hero */
.code-preview {
  white-space: pre;
  background: #14101f; border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 20px 22px; font-family: var(--font-jbmono), monospace; font-size: 13px;
  line-height: 1.65; color: #e6e1f5; overflow-x: auto; box-shadow: var(--shadow-lg);
}
.code-preview .c-comment { color: #7d7395; }
.code-preview .c-key { color: #b39dfa; }
.code-preview .c-str { color: #fdb913; }
.code-preview .c-num { color: #7ee7c7; }

/* Секции лендинга: ритм pt-20 (80px), без линий-разделителей */
.section { padding-top: 80px; }
.section h2 { margin: 0 0 12px; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
@media (min-width: 640px) { .section h2 { font-size: 32px; } }
.section .sub { color: var(--text-secondary); margin: 0 0 32px; max-width: 640px; }

/* Карточки (дизайн-код §7.3) */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }
.card {
  display: flex; flex-direction: column; height: 100%;
  border-radius: var(--radius-xl); border: 1px solid var(--border); padding: 24px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--brand-violet); box-shadow: var(--shadow-violet); }
.card h3 { margin: 12px 0 8px; font-size: 18px; font-weight: 700; line-height: 1.35; }
.card p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.card .icon-circle {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--radius-pill); background: var(--brand-violet-50); color: var(--brand-violet);
}

/* Bento (дизайн-код §7.4) */
.bento { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .bento { grid-template-columns: repeat(4, 1fr); } }
.bento .tile {
  border-radius: var(--radius-xl); padding: 28px; border: 1px solid var(--border);
}
.bento .tile-accent {
  grid-column: span 2; background: var(--brand-violet); color: #fff; border: 0;
}
@media (min-width: 768px) { .bento .tile-accent { grid-row: span 2; } }
.bento .tile-accent h3 { margin: 16px 0 8px; font-size: 22px; font-weight: 800; line-height: 1.3; }
.bento .tile-accent p { color: rgba(255, 255, 255, 0.85); font-size: 15px; margin: 0; }
.bento .tile-accent .icon-circle { background: rgba(255, 255, 255, 0.15); color: #fff; width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-pill); }
.bento .tile-risk { border: 2px solid var(--brand-violet); background: var(--brand-violet-50); }
.bento .big-num {
  font-family: var(--font-jbmono), monospace; font-size: 38px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--brand-violet);
}
.bento .tile-fact { background: var(--bg-subtle); }
.bento .tile h4 { margin: 8px 0 4px; font-weight: 700; font-size: 15px; }
.bento .tile p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.bento .tile-accent p { color: rgba(255,255,255,.85); }
.bento .tile-cta {
  grid-column: span 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
@media (min-width: 768px) { .bento .tile-cta { grid-column: span 4; } }
.bento .tile-cta:hover { transform: translateY(-4px); border-color: var(--brand-violet); box-shadow: var(--shadow-violet); }

/* Сетка «Кому это нужно»: три карточки */
@media (min-width: 1024px) { .card-grid.three { grid-template-columns: repeat(3, 1fr); } }

/* Сравнение «было/стало» */
.flow-illustration {
  display: block; width: 100%; max-width: 860px; height: auto;
  margin: 0 auto 36px; border-radius: var(--radius-lg);
}
.compare { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .col { border-radius: var(--radius-xl); border: 1px solid var(--border); padding: 28px; }
.compare .col.after { border: 2px solid var(--brand-violet); background: var(--brand-violet-50); }
.compare h3 { margin: 0; font-size: 17px; font-weight: 800; }
.compare .col.before h3 { color: var(--text-muted); }
.compare .col.after h3 { color: var(--brand-violet); }
.compare ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.compare li { display: flex; gap: 10px; font-size: 14.5px; align-items: flex-start; }
.compare .col.before li { color: var(--text-secondary); }
.compare .mark { font-family: var(--font-jbmono), monospace; font-weight: 700; flex-shrink: 0; }
.compare .col.before .mark { color: var(--text-muted); }
.compare .col.after .mark { color: var(--brand-violet); }

/* Баннер «за API — производство» */
.production-band {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  min-height: 380px; display: flex; align-items: flex-end; box-shadow: var(--shadow-lg);
}
.production-band img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.production-band .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.05) 25%, rgba(26, 26, 26, 0.82) 100%);
}
.production-band .content { position: relative; width: 100%; padding: 40px 28px 32px; color: #fff; }
@media (min-width: 640px) { .production-band .content { padding: 48px 48px 40px; } }
.production-band h2 { color: #fff; margin: 0 0 8px; }
.production-band p { margin: 0; max-width: 560px; color: rgba(255, 255, 255, 0.85); font-size: 15px; }
.production-facts { display: flex; flex-wrap: wrap; gap: 28px 40px; margin-top: 24px; }
.production-facts .num { font-family: var(--font-jbmono), monospace; font-size: 26px; font-weight: 800; color: var(--brand-yellow); }
.production-facts .cap { font-size: 13px; color: rgba(255, 255, 255, 0.75); max-width: 200px; }

/* Тёмная панель «Как работает» (дизайн-код §7.9) */
.dark-panel {
  border-radius: var(--radius-xl); background: var(--text); color: #fff;
  padding: 48px 28px;
}
@media (min-width: 640px) { .dark-panel { padding: 56px 48px; } }
.dark-panel h2 { color: #fff; }
.dark-panel .lead { color: rgba(255, 255, 255, 0.7); margin: 0 0 36px; }
.steps { display: grid; gap: 28px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps .num { font-family: var(--font-jbmono), monospace; font-size: 30px; font-weight: 800; color: var(--brand-yellow); }
.steps h3 { margin: 10px 0 6px; font-size: 17px; font-weight: 700; }
.steps p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.7); }

/* Пример интеграции */
.integration-code {
  background: #14101f; border-radius: var(--radius-xl); padding: 28px;
  font-family: var(--font-jbmono), monospace; font-size: 13px; line-height: 1.7;
  color: #e6e1f5; overflow-x: auto;
}

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 12px; }
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::after { content: "+"; font-family: var(--font-jbmono), monospace; color: var(--brand-violet); font-size: 18px; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .body { padding: 0 20px 16px; font-size: 14px; color: var(--text-secondary); }

/* ── Формы (рецепты §16.4, добавлены в языке дизайн-кода) ── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 11px 14px; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-violet); box-shadow: 0 0 0 3px var(--brand-violet-50);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin-top: 5px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand-violet); flex-shrink: 0;
}
.form-panel {
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px;
  max-width: 560px; box-shadow: var(--shadow-sm); background: var(--bg);
}
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Футер */
.site-footer { margin-top: 80px; background: var(--bg-subtle); border-top: 1px solid var(--border); }
.site-footer .inner { padding-block: 36px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--brand-violet); }

/* ══════════ АДМИНКА (§16.3: палитра та же, плотность другая) ══════════ */

.admin body { font-size: 14px; }
.admin-shell { display: flex; min-height: 100vh; background: var(--bg-subtle); font-size: 14px; }
.admin-nav {
  width: 220px; flex-shrink: 0; background: var(--bg); border-right: 1px solid var(--border);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh;
}
.admin-nav .brand { display: flex; align-items: center; padding: 8px 10px 16px; text-decoration: none; }
.admin-nav a.item {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none;
  color: var(--text-secondary); font-weight: 500; font-size: 14px;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.admin-nav a.item:hover { background: var(--brand-violet-50); color: var(--brand-violet); }
.admin-nav a.item.active { background: var(--brand-violet-50); color: var(--brand-violet); font-weight: 700; }
.admin-nav .bottom { margin-top: auto; font-size: 12px; color: var(--text-muted); padding: 10px; }
.admin-main { flex: 1; padding: 24px 28px; min-width: 0; }
.admin-main h1 { font-size: 20px; font-weight: 800; margin: 0 0 16px; letter-spacing: -0.01em; }
.admin-main h2 { font-size: 16px; font-weight: 700; margin: 24px 0 12px; }

.panel {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; box-shadow: var(--shadow-xs); margin-bottom: 16px;
}

/* Кнопки админки: радиус sm, нейтральные тени (§16.3).
   Жёлтая — одна на экран: главное действие (§16.3). */
.abtn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; font-family: inherit;
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: background-color var(--dur-fast) var(--ease);
}
.abtn-primary { background: var(--primary); color: var(--primary-on); font-weight: 700; box-shadow: var(--shadow-xs); }
.abtn-primary:hover { background: var(--primary-hover); }
.abtn-secondary { background: transparent; color: var(--brand-violet); border: 1px solid var(--brand-violet); }
.abtn-secondary:hover { background: var(--brand-violet-50); }
.abtn-danger { background: var(--danger); color: #fff; }
.abtn-danger:hover { background: var(--danger-hover); }
.abtn-neutral { background: var(--bg-light); color: var(--text); }
.abtn-neutral:hover { background: var(--border); }
.abtn.sm { padding: 5px 10px; font-size: 13px; }

/* Таблицы (рецепт §16.4) */
.table-wrap { overflow-x: auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--bg-subtle);
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background-color var(--dur-fast) var(--ease); }
table.data tbody tr:hover { background: var(--brand-violet-50); }
table.data .empty { text-align: center; color: var(--text-muted); padding: 32px; }
/* font-mono в админке шире: ID, суммы, префиксы ключей, даты (§16.3) */
td.mono, .num { font-family: var(--font-jbmono), monospace; font-size: 12.5px; }

/* Статус-бейджи (маппинг §16.4) */
.badge {
  display: inline-block; border-radius: var(--radius-pill); padding: 2px 10px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge-violet { background: var(--brand-violet-50); color: var(--brand-violet); }
.badge-yellow { background: #fdf3d7; color: #8a6407; }
.badge-success { background: #d9f5eb; color: #067154; }
.badge-danger { background: #fde3e3; color: #b91c1c; }
.badge-neutral { background: var(--bg-light); color: var(--text-muted); }
.badge-warning { background: #fdeed3; color: #92610a; }

/* Формы админки — плотнее */
.admin-main .field { margin-bottom: 12px; }
.admin-main .input, .admin-main .select, .admin-main .textarea { padding: 8px 11px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }

/* Фильтры над таблицей */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.filters .input, .filters .select { width: auto; padding: 6px 10px; font-size: 13px; }

/* Модалка подтверждения (рецепт §16.4) */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(26, 26, 26, 0.4); backdrop-filter: blur(2px);
  display: grid; place-items: center; z-index: 90;
}
.modal {
  background: var(--bg); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 24px; max-width: 440px; width: calc(100% - 40px);
  animation: crFadeUp var(--dur-slow) var(--ease-out);
}
.modal h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.modal p { margin: 0 0 16px; font-size: 14px; color: var(--text-secondary); }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Тост (рецепт §16.4) */
.toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 95;
  border-radius: var(--radius-sm); padding: 12px 18px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-md); animation: crFadeUp var(--dur-slow) var(--ease-out);
  background: var(--text); color: #fff;
}
.toast.success { background: var(--success); }
.toast.danger { background: var(--danger); }

/* Дифф-вид аудита (рецепт §16.4) */
.diff { font-family: var(--font-jbmono), monospace; font-size: 12px; border-radius: var(--radius-xs); overflow: hidden; }
.diff .del { background: #fde3e3; color: #b91c1c; display: block; padding: 1px 8px; }
.diff .add { background: #d9f5eb; color: #067154; display: block; padding: 1px 8px; }

/* Пагинация (рецепт §16.4) */
.pagination { display: flex; gap: 6px; margin-top: 12px; align-items: center; font-size: 13px; }
.pagination a, .pagination span.cur {
  padding: 5px 11px; border-radius: var(--radius-xs); text-decoration: none; color: var(--text-secondary);
  font-family: var(--font-jbmono), monospace; font-size: 12.5px;
}
.pagination a:hover { background: var(--brand-violet-50); color: var(--brand-violet); }
.pagination span.cur { background: var(--brand-violet); color: #fff; font-weight: 700; }

/* Лента заметок */
.note { border-left: 3px solid var(--brand-violet-50); padding: 8px 12px; margin-bottom: 8px; background: var(--bg-subtle); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.note .meta { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }

/* Дерево allowlist */
.allowlist-tree details { margin-bottom: 4px; }
.allowlist-tree summary { font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.allowlist-tree .leaf { display: flex; align-items: center; gap: 8px; padding: 3px 0 3px 20px; font-size: 13.5px; }
.allowlist-tree .leaf input[type="checkbox"] { accent-color: var(--brand-violet); }
.allowlist-tree .leaf .alias-input { width: 200px; padding: 3px 8px; font-size: 12.5px; }

/* Страница логина и активации */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg-subtle); padding: 20px; }
.auth-card {
  background: var(--bg); border-radius: var(--radius-md); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); padding: 32px; width: 100%; max-width: 400px;
}
.auth-card h1 { font-size: 20px; font-weight: 800; margin: 0 0 20px; }
.key-reveal {
  font-family: var(--font-jbmono), monospace; font-size: 15px; font-weight: 700;
  background: var(--bg-subtle); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 14px 16px; word-break: break-all; margin: 16px 0;
}

/* ══════════ КАБИНЕТ КЛИЕНТА ══════════ */
/* Шапка лендинга + плотность данных как в админке (§16.3). */

.header-login {
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; padding: 10px 14px; border-radius: var(--radius-pill);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.header-login:hover { background: var(--brand-violet-50); color: var(--brand-violet); }

.cab-nav { display: none; gap: 2px; margin-left: 24px; }
@media (min-width: 900px) { .cab-nav { display: flex; } }
.cab-nav-item {
  padding: 8px 12px; border-radius: var(--radius-pill); text-decoration: none;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.cab-nav-item:hover { background: var(--brand-violet-50); color: var(--brand-violet); }
.cab-nav-item.active { background: var(--brand-violet-50); color: var(--brand-violet); font-weight: 700; }

.cab-who { font-size: 12.5px; color: var(--text-muted); }
.cab-main { padding-top: 28px; padding-bottom: 60px; font-size: 14px; }
.cab-h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 18px; }

/* Плитки показателей: число — моноширинным (дизайн-код §5) */
.cab-tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
@media (min-width: 900px) { .cab-tiles { grid-template-columns: repeat(5, 1fr); } }
.cab-tile {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; background: var(--bg);
}
.cab-tile-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.cab-tile-value { font-size: 22px; font-weight: 800; color: var(--brand-violet); letter-spacing: -0.02em; }
.cab-tile-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
