/* B7 Releases — Apple-style theme (портирован со страницы selfbot/pc).
   Системные SF/Segoe шрифты, apple-blue акцент, стеклянные бары, мягкие тени,
   тонкие скроллы, радиальный фон с точечной сеткой. Светлая + тёмная тема
   через prefers-color-scheme (без внешних шрифтов). */

:root {
  color-scheme: light dark;

  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
               'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Cascadia Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* поверхности */
  --bg: #f5f5f7;
  --bg-grad-1: #f6f6f8;
  --bg-grad-2: #e8e8ee;
  --dot: rgba(0, 0, 0, 0.045);
  --card: #ffffff;
  --card-2: #f5f5f7;          /* вторичная поверхность: инпуты, тайлы */
  --border: #d2d2d7;
  --border-strong: #c7c7cc;

  /* текст */
  --fg: #1d1d1f;
  --fg-muted: #8e8e93;
  --fg-subtle: #a1a1a8;

  /* акцент (apple-blue) */
  --accent: #007aff;
  --accent-hover: #0071e3;
  --accent-fg: #ffffff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --accent-ring: rgba(0, 122, 255, 0.32);

  /* единое акцентное свечение «плавающих» кнопок (open-b7-app и sidebar-toggle
     светятся ОДИНАКОВО через эти переменные — правь тут, меняется в обеих) */
  --glow: 0 8px 24px -6px var(--accent);
  --glow-hover: 0 12px 30px -6px var(--accent);

  /* статусы */
  --danger: #ff3b30;
  --danger-hover: #ff5147;
  --danger-fg: #ffffff;
  --danger-soft: rgba(255, 59, 48, 0.12);
  --flash-bg: rgba(48, 209, 88, 0.12);
  --flash-fg: #248a3d;
  --flash-border: rgba(48, 209, 88, 0.32);
  --error-bg: rgba(255, 59, 48, 0.10);
  --error-fg: #d70015;
  --error-border: rgba(255, 59, 48, 0.30);

  --code-bg: rgba(140, 140, 150, 0.16);

  /* стекло */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 0, 0, 0.08);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px -18px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 20px 50px -16px rgba(0, 0, 0, 0.28);

  --radius: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-grad-1: #0d0d10;
    --bg-grad-2: #000000;
    --dot: rgba(255, 255, 255, 0.05);
    --card: #1c1c1e;
    --card-2: #2c2c2e;
    --border: #2c2c2e;
    --border-strong: #3a3a3c;

    --fg: #f5f5f7;
    --fg-muted: #8e8e93;
    --fg-subtle: #8e8e93;

    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-soft: rgba(10, 132, 255, 0.22);
    --accent-ring: rgba(10, 132, 255, 0.45);

    --danger: #ff453a;
    --danger-hover: #ff6961;
    --danger-soft: rgba(255, 69, 58, 0.18);
    --flash-bg: rgba(48, 209, 88, 0.16);
    --flash-fg: #30d158;
    --flash-border: rgba(48, 209, 88, 0.30);
    --error-bg: rgba(255, 69, 58, 0.16);
    --error-fg: #ff6961;
    --error-border: rgba(255, 69, 58, 0.32);

    --code-bg: rgba(140, 140, 150, 0.22);

    --glass-bg: rgba(28, 28, 30, 0.72);
    --glass-border: rgba(255, 255, 255, 0.09);

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 34px -18px rgba(0, 0, 0, 0.85);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, 0.75);
  }
}

* { box-sizing: border-box; }

/* тонкие скроллы во всём приложении (как в selfbot/pc) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 140, 150, 0.45) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(140, 140, 150, 0.4);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(140, 140, 150, 0.65); }

::selection { background: var(--accent-soft); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background-color: var(--bg);
  /* точечная сетка поверх мягкого радиального градиента — «канвас» из selfbot/pc */
  background-image:
    radial-gradient(var(--dot) 1.4px, transparent 1.4px),
    radial-gradient(130% 130% at 78% 4%, var(--bg-grad-1), var(--bg-grad-2));
  background-size: 26px 26px, 100% 100%;
  background-attachment: fixed;
  font: 13px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 { font-size: 20px; margin-top: 28px; }
h3 { font-size: 15px; margin-top: 0; font-weight: 600; }
h4 {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 18px 0 8px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Топбар (стекло) ─────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20; /* над контентом, под сайдбаром (toggle 30 / backdrop 40 / sidebar 50) */
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 700;
  color: var(--fg);
  font-size: 15px;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; opacity: 0.75; }
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav form { margin: 0; display: inline; }
/* обычные ссылки навигации — как таб-пилюли с hover */
.nav a:not(.open-b7-app) {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--fg-muted);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav a:not(.open-b7-app):hover {
  text-decoration: none;
  color: var(--accent);
  background: var(--accent-soft);
}
.linkish {
  background: none;
  border: none;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--fg-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.linkish:hover { text-decoration: none; color: var(--accent); background: var(--accent-soft); }

.open-b7-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--accent);
  box-shadow: var(--glow);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.open-b7-app::before { content: "⬢"; font-size: 12px; line-height: 1; }
.open-b7-app:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: var(--accent-hover);
  color: var(--accent-fg);
  box-shadow: var(--glow-hover);
}
.open-b7-app:active { transform: translateY(0); }

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  animation: fadeIn 0.25s ease-out;
}

/* Админ-страницы (body.wide) — во всю ширину окна. */
body.wide .topbar-inner,
body.wide .page {
  max-width: none;
}

/* ── Карточки ────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-narrow {
  max-width: 420px;
  margin: 8vh auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.24s ease-out;
}

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; }

/* ── Поля ввода ──────────────────────────────────────────────────────── */
input[type=text], input[type=password], input[type=file], select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit;
  color: var(--fg);
  background: var(--card-2);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input[type=text]:focus, input[type=password]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  background: var(--card);
}
input[type=file] {
  padding: 7px 10px;
  background: var(--card-2);
  cursor: pointer;
}
input::placeholder { color: var(--fg-subtle); }

/* ── Кнопки ──────────────────────────────────────────────────────────── */
button {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-2);
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s, filter 0.15s;
}
/* :where() даёт guard'у нулевую специфичность → это правило (0,1,1) НЕ перебивает
   собственный :hover-фон у .sidebar-toggle/.docs-tab/.admin-tab/.linkish (они (0,2,0)).
   Иначе на наведении их фон затемнялся до --card (в тёмной теме — почти чёрный). */
button:hover:not(:where(:disabled)) { background: var(--card); border-color: var(--border-strong); }
button:active:not([disabled]) { transform: translateY(0.5px) scale(0.99); }
button:disabled { opacity: 0.45; cursor: default; }
button.primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 6px 16px -8px var(--accent);
}
button.primary:hover:not([disabled]) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 8px 22px -8px var(--accent);
}
button.danger {
  background: var(--danger);
  color: var(--danger-fg);
  border-color: var(--danger);
  font-weight: 600;
  box-shadow: 0 6px 16px -8px var(--danger);
}
button.danger:hover:not([disabled]) { background: var(--danger-hover); border-color: var(--danger-hover); }
button.small { padding: 5px 11px; font-size: 12px; }

.btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--fg);
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.btn:hover { text-decoration: none; background: var(--card); border-color: var(--border-strong); }
.btn:active { transform: translateY(0.5px); }
.btn.primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 6px 16px -8px var(--accent);
}
.btn.primary:hover {
  text-decoration: none;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-fg);
  box-shadow: 0 8px 22px -8px var(--accent);
}
.btn.small { padding: 5px 11px; font-size: 12px; }

.muted { color: var(--fg-muted); }
.small { font-size: 12px; }

/* ── Флеш / ошибка ───────────────────────────────────────────────────── */
.error, .flash {
  padding: 11px 15px;
  border-radius: var(--radius-md);
  margin: 10px 0;
  font-weight: 500;
}
.error { background: var(--error-bg); color: var(--error-fg); border: 1px solid var(--error-border); }
.flash { background: var(--flash-bg); color: var(--flash-fg); border: 1px solid var(--flash-border); }

/* ── Загрузки ────────────────────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.version-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.version-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  margin: 0 -10px;
  border-radius: var(--radius-sm);
  transition: background 0.13s;
}
.version-list li:hover { background: var(--accent-soft); }

.changelog { padding: 18px 22px; }
.changelog-file {
  color: var(--fg-muted);
  font-size: 12px;
  margin-bottom: 6px;
}

/* ── Плавающие кнопки сайдбаров ──────────────────────────────────────── */
.sidebar-toggle {
  position: fixed;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--glow);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.sidebar-toggle:hover {
  transform: translateY(-1px);
  background: var(--accent-hover);
  box-shadow: var(--glow-hover);
}
.sidebar-toggle.right { right: 20px; }
.sidebar-toggle.left { left: 20px; }
.sidebar-toggle-icon { font-size: 16px; line-height: 1; }

#sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}
#sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

/* ── Сайдбары (стекло) ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(720px, 92vw);
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.sidebar.right {
  right: 0;
  transform: translateX(100%);
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--glass-border);
}
.sidebar.left {
  left: 0;
  transform: translateX(-100%);
  box-shadow: var(--shadow-lg);
  border-right: 1px solid var(--glass-border);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 11px 15px;
  background: var(--card-2);
  flex-wrap: wrap;
}
.sidebar-title {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  min-width: 0;
}
.sidebar-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  padding: 2px 10px;
  cursor: pointer;
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
  order: 99;
}
.sidebar-close:hover { color: var(--fg); background: var(--code-bg); }

.sidebar-body {
  flex: 1;
  overflow-y: auto;
}

/* Табы (в правом доке документации) */
.docs-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}
.docs-tab {
  background: none;
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--fg-muted);
  font-weight: 500;
}
.docs-tab:hover { color: var(--fg); background: var(--code-bg); }
.docs-tab.active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  box-shadow: 0 6px 16px -8px var(--accent);
}

.docs-panel {
  display: none;
  padding: 0 26px 40px;
}
.docs-panel.active { display: block; }

.docs-panel-toolbar {
  position: sticky;
  top: 0;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 14px 0 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  z-index: 1;
}

.api-doc { padding: 20px 26px 40px; }
.api-doc table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.api-doc th, .api-doc td {
  border: 1px solid var(--border);
  padding: 7px 11px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}
.api-doc th { background: var(--card-2); font-weight: 600; }
.api-doc blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  margin: 10px 0;
  padding: 8px 12px;
  color: var(--fg-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--fg);
  font-size: 12px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-download:hover {
  background: var(--card);
  border-color: var(--border-strong);
  text-decoration: none;
}
.btn-download code {
  background: none;
  padding: 0;
  font-size: 0.92em;
  color: var(--accent);
}

body.no-scroll { overflow: hidden; }

@media (max-width: 640px) {
  .topbar-inner { padding: 10px 14px; }
  .nav { gap: 2px; }
  .page { padding: 18px 14px 56px; }
  .card { padding: 16px 16px; }
  .card-narrow { margin: 6vh auto; }
  .sidebar-toggle { bottom: 16px; padding: 10px 14px; }
  .sidebar-toggle.right { right: 14px; }
  .sidebar-toggle.left { left: 14px; }
  .docs-panel { padding: 16px 18px 32px; }
  .api-doc { padding: 16px 18px 32px; }
}

/* ── Markdown (changelog / docs) ─────────────────────────────────────── */
.markdown h1, .markdown h2 {
  margin-top: 6px;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--accent-soft);
}
.markdown h3, .markdown h4 {
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.markdown code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}
.markdown pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  overflow-x: auto;
}
.markdown pre code { background: none; padding: 0; }
.markdown a { color: var(--accent); }
.markdown blockquote {
  border-left: 3px solid var(--accent);
  margin: 0.7em 0;
  padding: 0.1em 1em;
  color: var(--fg-muted);
}
.markdown table { border-collapse: collapse; margin: 0.7em 0; }
.markdown th, .markdown td { border: 1px solid var(--accent-soft); padding: 0.4em 0.7em; text-align: left; }
.markdown th { background: var(--code-bg); }

/* ── Таблицы данных ──────────────────────────────────────────────────── */
table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
}
table.data th, table.data td {
  padding: 9px 11px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  font-weight: 600;
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--card-2);
}
table.data tbody tr { transition: background 0.13s; }
table.data tbody tr:hover { background: var(--accent-soft); }

.json-dump {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* ── Менеджер changelog (админка) ────────────────────────────────────── */
.cl-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 0.12s, border-color 0.12s, opacity 0.12s, transform 0.12s;
}
.cl-item:hover { border-color: var(--border-strong); }
.cl-item.cl-dragging {
  opacity: 0.5;
  transform: scale(0.99);
}
.cl-item.cl-drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cl-item.cl-hidden {
  opacity: 0.6;
}
.cl-item.cl-hidden .cl-title { text-decoration: line-through; }
.cl-item.cl-saving { outline: 2px solid var(--accent); outline-offset: -2px; }

.cl-handle {
  cursor: grab;
  color: var(--fg-subtle);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  user-select: none;
  letter-spacing: -2px;
}
.cl-handle:active { cursor: grabbing; }
.cl-handle-demo {
  color: var(--fg-muted);
  letter-spacing: -2px;
  font-weight: 600;
}

.cl-meta { flex: 1; min-width: 0; }
.cl-title {
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-file {
  color: var(--fg-muted);
  font-size: 12px;
  margin-top: 2px;
}

.cl-eye {
  border: none;
  background: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--fg-muted);
}
.cl-eye:hover { background: var(--code-bg); }
.cl-eye .cl-eye-off { display: none; }
.cl-item.cl-hidden .cl-eye .cl-eye-on { display: none; }
.cl-item.cl-hidden .cl-eye .cl-eye-off { display: inline; }

/* ── Токены доступа (админка) ────────────────────────────────────────── */
.token-create { max-width: 420px; margin-bottom: 16px; }
.token-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.token-cell code {
  background: var(--code-bg);
  padding: 2px 7px;
  border-radius: 6px;
  word-break: break-all;
}
tr.row-new { background: var(--accent-soft); }
tr.row-new:hover { background: var(--accent-soft); }

/* ── Вкладки админки (сегментированный контрол) ──────────────────────── */
.admin-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  margin: 6px 0 20px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.admin-tab {
  border: none;
  background: none;
  padding: 8px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.admin-tab:hover:not(.active) { color: var(--fg); }
.admin-tab.active {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 6px 16px -8px var(--accent);
}
.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeIn 0.2s ease-out; }

/* ── Анимации ────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

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