/* Donatix — стили сайта и кабинета.
   Спокойная рабочая палитра: нейтральный фон, один цвет бренда, семантические цвета
   для статусов. Все цвета — через переменные; тёмная тема переопределяет только их. */

/* ── Токены ───────────────────────────────────────────── */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --line: #e2e4e9;
  --line-strong: #cfd3db;
  --text: #14161b;
  --muted: #5d6372;
  --accent: #4338ca;
  --accent-hover: #3730a3;
  --accent-ink: #ffffff;
  --accent-soft: #eef0fd;
  --accent-line: #c9cdf6;
  --ok: #157347;
  --ok-soft: #e8f5ee;
  --bad: #c42b2b;
  --bad-soft: #fcecec;
  --warn: #975a00;
  --warn-soft: #fdf4e3;
  --code-bg: #16181d;
  --code-text: #e4e6eb;
  --tg: #2481cc;   --tg-soft: #e7f2fb;
  --steam: #1b2838; --steam-soft: #e9ecf0;
  --game: #c2410c; --game-soft: #fdf0e8;
  --card: #a21caf; --card-soft: #f9ebfa;
  --r: 10px;
  --r-sm: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a20;
  --surface-2: #1e2229;
  --line: #2a2f38;
  --line-strong: #3a404b;
  --text: #eceef2;
  --muted: #9aa1ae;
  --accent: #8b8cf8;
  --accent-hover: #a5a6fa;
  --accent-ink: #11122a;
  --accent-soft: #1f2140;
  --accent-line: #33366b;
  --ok: #4ade80;   --ok-soft: #12261b;
  --bad: #f87171;  --bad-soft: #2b1515;
  --warn: #f5b942; --warn-soft: #2a2110;
  --code-bg: #0b0c10;
  --tg: #5cb3f0;   --tg-soft: #13253a;
  --steam: #aab8c8; --steam-soft: #1c232d;
  --game: #fb923c; --game-soft: #2c1a0e;
  --card: #e879f9; --card-soft: #2a1530;
  color-scheme: dark;
}

/* ── Основа ───────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code, pre, .mono, .amount, .price, .value, .pill {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}
code, pre { font-size: .86em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; vertical-align: middle; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ── Шапка ────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap, .top .bar { display: flex; align-items: center; gap: 8px; height: 58px; }
.top .bar { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.08rem; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
.logo { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a:not(.btn):not(.icon-btn) { color: var(--muted); padding: 8px 10px; border-radius: var(--r-sm); font-weight: 500; }
.nav > a:not(.btn):not(.icon-btn):hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.icon-btn {
  position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.dot-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.only-sm { display: none; }
@media (max-width: 860px) { .hide-sm { display: none !important; } .only-sm { display: inline-grid; } }

/* ── Кнопки и поля ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; touch-action: manipulation;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.dashed { border-style: dashed; }
.btn.block { width: 100%; }
.btn.lg { min-height: 48px; font-size: 1rem; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .88rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
form.inline { display: inline; }

label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .92rem; }
.label-caps { display: block; margin: 0 0 6px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hint { margin-top: 6px; font-size: .85rem; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit;
}
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select {
  appearance: none; padding-right: 36px; background-repeat: no-repeat; background-position: right 12px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6372' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.filters .full { grid-column: 1 / -1; }
.filters label, .filters .label-caps { margin-top: 0; }
@media (max-width: 480px) { .filters { grid-template-columns: 1fr; } }

/* ── Поверхности ──────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card.tight { padding: 14px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.grid > .card, .list > .card, .grid > .stat { margin-top: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 480px) { .grid.two { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { margin-bottom: 6px; font-size: .78rem; font-weight: 600; color: var(--accent); }

.page-hero { margin: 18px 0 14px; }
.page-hero h1 { margin: 0; }
.page-hero p { margin: 6px 0 0; color: var(--muted); }
.page-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: .9rem; }

.stat { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat .label { font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat .value { margin-top: 4px; font-size: 1.35rem; font-weight: 600; }
.stat .note { margin-top: 2px; font-size: .85rem; color: var(--muted); }
.stat.ok { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: var(--ok-soft); }

/* ── Статусы и сообщения ──────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--muted);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.pill { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: .8rem; }
.status { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.status .ico { width: 13px; height: 13px; }
.status.completed { background: var(--ok-soft); color: var(--ok); }
.status.failed { background: var(--bad-soft); color: var(--bad); }
.status.processing { background: var(--warn-soft); color: var(--warn); }
.flash { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash a { color: inherit; text-decoration: underline; }
.ok-text { color: var(--ok); font-weight: 600; }

/* ── Списки ───────────────────────────────────────────── */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
a.item:hover { border-color: var(--line-strong); text-decoration: none; color: var(--text); }
.item .grow { flex: 1; min-width: 0; }
.item .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.item .title { font-weight: 600; }
.item .sub { margin-top: 2px; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.item .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.amount { font-weight: 600; white-space: nowrap; }
.amount.plus { color: var(--ok); }
.amount.minus { color: var(--bad); }
.link-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); font-weight: 600;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.link-row:hover { border-color: var(--line-strong); color: var(--text); text-decoration: none; }
.link-row .grow { flex: 1; min-width: 0; }
.link-row .sub { display: block; margin-top: 1px; font-weight: 400; font-size: .88rem; color: var(--muted); }
.link-row .go { color: var(--muted); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 1.15rem; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 20px 0; }

/* Иконки товаров: цветной знак на мягком фоне, по виду товара */
.tile {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
}
.tile.sm { width: 32px; height: 32px; }
.tile.sm .ico { width: 17px; height: 17px; }
.tile.ok, .tile.g4 { background: var(--ok-soft); color: var(--ok); }
.tile.bad { background: var(--bad-soft); color: var(--bad); }
.tile.g5, .tile.k-topup { background: var(--game-soft); color: var(--game); }
.tile.k-telegram_stars, .tile.k-telegram_premium, .tile.g2 { background: var(--tg-soft); color: var(--tg); }
.tile.k-steam_topup, .tile.k-steam_gift, .tile.g6, .tile.steam-tile { background: var(--steam-soft); color: var(--steam); }
.tile.k-gift_card, .tile.g3 { background: var(--card-soft); color: var(--card); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

pre { position: relative; margin: 0 0 1em; padding: 14px 16px; overflow-x: auto; border-radius: var(--r-sm);
  background: var(--code-bg); color: var(--code-text); line-height: 1.6; }
:not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); }
.keybox { white-space: pre-wrap; word-break: break-all; }

/* ── Кабинет: меню ────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; max-width: 1280px; margin: 0 auto; padding: 6px 16px 56px; }
.side { position: sticky; top: 70px; align-self: start; max-height: calc(100dvh - 84px); overflow-y: auto; }
.side h4 { margin: 18px 10px 6px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side a.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); font-weight: 500; }
.side a.nav-item .ico { color: var(--muted); width: 18px; height: 18px; }
.side a.nav-item .chev { display: none; }
.side a.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.side a.nav-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side a.nav-item.on .ico { color: var(--accent); }
.balance-card { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.balance-card b { display: block; margin: 2px 0 10px; font: 600 1.3rem/1.2 "JetBrains Mono", ui-monospace, monospace; }
.drawer-head { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  /* Меню на телефоне: шапка стоит, список прокручивается сам по себе (iOS прокручивает
     только внутренний блок с явной высотой, а не весь fixed-контейнер) */
  .side { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 60; max-height: none;
    display: flex; flex-direction: column; overflow: hidden; padding: 0; background: var(--bg);
    transform: translateX(-100%); visibility: hidden; transition: transform .22s var(--ease), visibility 0s .22s; }
  .side.open { transform: none; visibility: visible; transition: transform .22s var(--ease); }
  .side-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    touch-action: pan-y; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); }
  .drawer-head { display: flex; flex: none; align-items: center; justify-content: space-between;
    height: 58px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .side a.nav-item { padding: 12px; font-size: 1rem; }
  .side a.nav-item .chev { display: block; margin-left: auto; }
  .side .balance-card { display: none; }
  html.menu-open, body.menu-open { overflow: hidden; }
}

/* ── Главная ──────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 48px 0 28px; }
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.12; }
.hero .lead { max-width: 540px; font-size: 1.05rem; color: var(--muted); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; } }
.section { padding: 36px 0; }
.section-head { max-width: 640px; margin-bottom: 20px; }
.section-head p { color: var(--muted); }
.feature h3 { margin-top: 12px; }
.feature p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; color: var(--text); }
a.chip:hover { text-decoration: none; border-color: var(--line-strong); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps .num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.price-card .big { margin: 8px 0 2px; font: 600 2rem/1.1 "JetBrains Mono", ui-monospace, monospace; }
.price-card.featured { border-color: var(--accent); }
.price-card .tag { margin-bottom: 8px; }
.checks { list-style: none; margin: 14px 0 18px; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.checks .ico { margin-top: 3px; color: var(--ok); }
details.faq { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.2rem; line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 0 16px; color: var(--muted); }
.cta-card { padding: 32px 20px; text-align: center; }
.foot { margin-top: 40px; padding: 32px 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .92rem; }
.foot .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot .links a { color: var(--muted); }
.foot .brandline { color: var(--text); font-weight: 700; font-size: 1.05rem; }

/* Пример заказа на главной — настоящий интерфейс, а не картинка */
.window { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.window .chrome { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.window .url { flex: 1; }
.window .dot { display: none; }
.window .body { padding: 14px; }
.window pre { margin: 0 0 12px; font-size: .78rem; }
.window .orders { display: flex; flex-direction: column; gap: 8px; }
.window .orders .item { padding: 10px 12px; align-items: center; }

/* ── Покупка ──────────────────────────────────────────── */
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.step-head .n { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .8rem; font-weight: 700; }
.step-head h3 { margin: 0; }
.step-head .grow-title { flex: 1; }
.summary { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.summary > div:last-child { border-bottom: 0; }
.summary > div > span:first-child { color: var(--muted); }
.summary > div > span:last-child { text-align: right; white-space: nowrap; }
.summary > div > span.wrap-text { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.summary > div.total { background: var(--surface-2); font-weight: 700; }
.summary > div.total > span { color: var(--text); font-family: inherit; }
.summary > div.total > span:last-child { color: var(--accent); font-family: "JetBrains Mono", ui-monospace, monospace; }
.card.summary { padding: 0; }

.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pack, .pick, .cur, .paym {
  position: relative; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer; transition: border-color .12s var(--ease), background .12s var(--ease);
}
.pack { padding: 10px 12px; text-align: left; }
.pack b { display: flex; align-items: center; gap: 6px; }
.pack b .ico { color: #d69e00; }
.pack span { color: var(--muted); font-size: .88rem; font-family: "JetBrains Mono", ui-monospace, monospace; }
.pack.on, .pick.on, .cur.on, .paym.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

.currencies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .currencies { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cur { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0; }
.cur input, .paym input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.cur:has(input:focus-visible), .paym:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.flag { border-radius: 2px; flex: none; }
.auth-head.steam-head { flex-wrap: wrap; }
.steam-head .btn { margin-left: auto; }

.gift-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sticky-summary { position: sticky; top: 70px; }
@media (max-width: 900px) { .gift-grid { grid-template-columns: minmax(0, 1fr); } .sticky-summary { position: static; } }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 440px; margin-top: 12px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 9px 12px; text-align: left; }
.pick .grow { flex: 1; min-width: 0; }
.pick b { display: block; }
.pick .sub { display: block; font-size: .86rem; color: var(--muted); }
.pick .cover { width: 104px; height: 49px; flex: none; object-fit: cover; border-radius: 6px; background: var(--surface-2); }

.paymethods { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.paym { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; font-weight: 500; }
.paym .sub { display: block; font-size: .8rem; color: var(--muted); }

/* Каталог с обложками поставщика */
.grid.products { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.product-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.product-card:hover { border-color: var(--line-strong); color: var(--text); text-decoration: none; }
.product-card > :not(.media) { padding: 0 4px; }
.product-card .price { font-weight: 600; font-size: 1.05rem; }
.product-card .row2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.media { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border-radius: var(--r-sm);
  display: grid; place-items: end start; padding: 10px; background: var(--surface-2); color: var(--muted); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-initials { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2.2rem); letter-spacing: .02em; opacity: .9; }
.media:has(img) .media-initials { display: none; }
.media.k-topup { background: var(--game-soft); color: var(--game); }
.media.k-telegram_stars, .media.k-telegram_premium { background: var(--tg-soft); color: var(--tg); }
.media.k-steam_topup, .media.k-steam_gift { background: var(--steam-soft); color: var(--steam); }
.media.k-gift_card { background: var(--card-soft); color: var(--card); }
.media.banner { aspect-ratio: 21 / 7; margin-top: 14px; }
@media (max-width: 560px) {
  .grid.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-card .tile.sm { display: none; }
  .product-card .title { font-size: .92rem; }
  .product-card .muted.small { font-size: .78rem; }
  .product-card .row2 { flex-direction: column; align-items: stretch; }
  .media { aspect-ratio: 4 / 3; }
}

/* ── Вход ─────────────────────────────────────────────── */
.auth { max-width: 440px; margin: 28px auto; padding: 0 16px; }
.auth .card { padding: 24px; }
.auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.auth-head h2 { margin: 0; font-size: 1.3rem; }
.auth-head p { margin: 2px 0 0; color: var(--muted); }


/* ── Движение ─────────────────────────────────────────────
   Короткие, мягкие переходы: появление страницы, подъём карточек под курсором,
   плавное раскрытие FAQ и смена темы. Всё отключается при prefers-reduced-motion. */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); interpolate-size: allow-keywords; }

/* Переход между страницами: шапка и меню стоят, меняется только содержимое */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
@media (min-width: 861px) { .side { view-transition-name: side; } }
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .28s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* Появление блоков страницы по очереди */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.shell > main > *, .auth > .card, .hero > * { animation: rise .5s var(--ease-out) backwards; }
.shell > main > :nth-child(2), .hero > :nth-child(2) { animation-delay: .06s; }
.shell > main > :nth-child(3) { animation-delay: .12s; }
.shell > main > :nth-child(4) { animation-delay: .18s; }
.shell > main > :nth-child(n+5) { animation-delay: .24s; }
.grid > *, .list > * { animation: rise .45s var(--ease-out) backwards; }
.grid > :nth-child(2), .list > :nth-child(2) { animation-delay: .04s; }
.grid > :nth-child(3), .list > :nth-child(3) { animation-delay: .08s; }
.grid > :nth-child(4), .list > :nth-child(4) { animation-delay: .12s; }
.grid > :nth-child(5), .list > :nth-child(5) { animation-delay: .16s; }
.grid > :nth-child(n+6), .list > :nth-child(n+6) { animation-delay: .2s; }

/* Главная: секции проявляются при прокрутке (без JS остаются видимыми) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal] .grid > * { animation-name: none; }
.js [data-reveal].in .grid > * { animation-name: rise; }
.window .item { animation: rise .5s var(--ease-out) .45s backwards; }
.window .item + .item { animation-delay: .7s; }

/* Карточки и ссылки поднимаются под курсором */
.product-card, .quick-tile, a.item, .link-row, .card.feature, .stat {
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out);
}
@media (hover: hover) {
  .product-card:hover, .quick-tile:hover, a.item:hover, .link-row:hover, .card.feature:hover {
    transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgb(20 22 40 / .25);
  }
  .product-card:hover .media img { transform: scale(1.04); }
  .link-row:hover .go { transform: translateX(3px); color: var(--accent); }
}
.media img { transition: transform .5s var(--ease-out); }
.link-row .go { transition: transform .2s var(--ease-out), color .2s; }

.btn { transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease); }
.btn:active:not([disabled]), .icon-btn:active { transform: scale(.97); }
.btn.primary:hover { box-shadow: 0 6px 18px -8px var(--accent); }
.icon-btn { transition: background .15s var(--ease), transform .12s var(--ease); }
.theme-toggle .ico { transition: transform .4s var(--ease-out); }
.theme-toggle:hover .ico { transform: rotate(-20deg); }
.side a.nav-item { transition: background .18s var(--ease), color .18s var(--ease); }
.side a.nav-item:hover .ico { color: var(--text); }
.pack, .pick, .cur, .paym { transition: border-color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease); }
.pack:active, .pick:active, .cur:active, .paym:active { transform: scale(.98); }
.flash { animation: flash-in .4s var(--ease-out) backwards; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }
.dot-count { animation: pop .4s var(--ease-out) backwards; }
@keyframes pop { from { transform: scale(0); } 60% { transform: scale(1.15); } }

/* FAQ раскрывается по высоте; плюс поворачивается в крестик */
details.faq::details-content { height: 0; overflow: clip; transition: height .3s var(--ease-out), content-visibility .3s allow-discrete; }
details.faq[open]::details-content { height: auto; }
details.faq summary::after, details.faq[open] summary::after { content: "+"; transition: transform .25s var(--ease-out); }
details.faq[open] summary::after { transform: rotate(45deg); }

/* Быстрые действия в кабинете */
.grid.quick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; color: var(--text); font-weight: 600;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.quick-tile:hover { color: var(--text); text-decoration: none; border-color: var(--line-strong); }
@media (max-width: 480px) { .grid.quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Смена темы — плавный переход цветов */
.theme-fade::view-transition-old(root) { animation: vt-out .3s ease both; }
.theme-fade::view-transition-new(root) { animation: vt-fade-in .3s ease both; }
@keyframes vt-fade-in { from { opacity: 0; } }

/* Каталог по играм: обложка игры от поставщика, у пакетов — только значок */
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; margin-bottom: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--muted); }
.search input { border: 0; padding-left: 0; background: transparent; box-shadow: none !important; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid.games { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.game-card { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 12px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out); }
.game-card:hover { color: var(--text); text-decoration: none; border-color: var(--line-strong); }
.game-card .media { aspect-ratio: 1 / 1; }
.game-meta span { white-space: nowrap; }
.game-name { padding: 0 4px; font-weight: 600; font-size: .92rem; line-height: 1.3; overflow-wrap: anywhere; }
.game-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; padding: 0 4px; font-size: .84rem; color: var(--muted); }
@media (hover: hover) {
  .game-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgb(20 22 40 / .25); }
  .game-card:hover .media img { transform: scale(1.04); }
}
.game-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.game-head .media.cover { width: 88px; height: 88px; aspect-ratio: 1; flex: none; padding: 6px; }
.game-head .media.cover .media-initials { font-size: 1.5rem; }
.game-head h1 { margin: 0; }
.game-head p { margin: 2px 0 0; }
.chips.regions { margin-bottom: 16px; }
.grid.packs-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pack-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out); }
.pack-card:hover { color: var(--text); text-decoration: none; border-color: var(--accent-line); }
.pack-name { font-weight: 600; line-height: 1.3; }
.pack-price { margin-top: auto; font: 600 1rem/1.2 "JetBrains Mono", ui-monospace, monospace; color: var(--accent); }
.pack-price small { font-size: .75rem; color: var(--muted); font-weight: 500; }
@media (hover: hover) { .pack-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgb(20 22 40 / .25); } }
@media (max-width: 480px) {
  .grid.games, .grid.packs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .game-head .media.cover { width: 64px; height: 64px; }
}

/* Проверка аккаунта игрока */
.acc-check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.acc-result { font-weight: 600; font-size: .92rem; }
.acc-result:empty { display: none; }
.acc-result.ok { color: var(--ok); }
.acc-result.bad { color: var(--bad); }
.acc-result.wait { color: var(--muted); }
.acc-result.ok::before { content: "✓ "; }

/* ── Код в стиле терминала ───────────────────────────────── */
:root { --term-bg: #0d1117; --term-head: #161b22; --term-line: #262c36; }
.term { margin: 0 0 14px; border: 1px solid var(--term-line); border-radius: 12px; overflow: hidden; background: var(--term-bg);
  box-shadow: 0 10px 30px -18px rgb(0 0 0 / .6); }
.term-head { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px 0 14px;
  background: var(--term-head); border-bottom: 1px solid var(--term-line); }
.term .dots { display: flex; gap: 7px; }
.term .dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term .dots i:nth-child(2) { background: #febc2e; }
.term .dots i:nth-child(3) { background: #28c840; }
.term-title { flex: 1; font: 500 .78rem/1 "JetBrains Mono", ui-monospace, monospace; color: #8b949e; }
.term-copy { padding: 5px 10px; border: 1px solid var(--term-line); border-radius: 6px; background: transparent;
  color: #c9d1d9; font: 500 .75rem/1 "Onest", system-ui, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.term-copy:hover { background: #21262d; color: #fff; }
.term pre { margin: 0; border-radius: 0; background: var(--term-bg); padding: 16px 18px; font-size: .84rem; }
pre.hl { color: #c9d1d9; }
.t-str { color: #a5d6ff; }
.t-key { color: #7ee787; }
.t-num { color: #f2cc60; }
.t-kw { color: #ff7b72; }
.t-com { color: #8b949e; font-style: italic; }
.t-fn { color: #d2a8ff; }
.t-flag { color: #ffa657; }
.t-var { color: #f2cc60; }
.t-url { color: #79c0ff; text-decoration: underline; text-decoration-color: #79c0ff55; text-underline-offset: 3px; }
.t-punct { color: #8b949e; }

/* ── Документация ─────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; padding: 28px 0 20px; }
.docs-nav { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { padding: 7px 10px; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; font-size: .93rem;
  transition: background .15s, color .15s; }
.docs-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.docs-nav a.on { background: var(--accent-soft); color: var(--accent); }
.docs-nav .ext { margin-top: 10px; }
.doc-sec { padding-top: 28px; scroll-margin-top: 70px; }
.doc-sec > h2 { margin-bottom: 14px; }
.doc-sec h3 { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.step-n { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .8rem; }
.statuses { display: grid; gap: 8px; }
.statuses > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.endpoints { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.ep { display: grid; grid-template-columns: 62px minmax(0, auto) 1fr; align-items: center; gap: 14px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); }
.ep:last-child { border-bottom: 0; }
.ep code { background: none; padding: 0; font-weight: 500; overflow-wrap: anywhere; }
.ep .what { color: var(--muted); font-size: .9rem; }
.method { justify-self: start; padding: 3px 8px; border-radius: 6px; font: 700 .72rem/1.2 "JetBrains Mono", ui-monospace, monospace; }
.method.get { background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 12px; }
  .docs-nav { position: sticky; top: 58px; z-index: 5; flex-direction: row; gap: 4px; overflow-x: auto; margin: 0 -16px;
    padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .docs-nav .label-caps, .docs-nav .ext { display: none; }
  .docs-nav a { white-space: nowrap; }
  .ep { grid-template-columns: 56px minmax(0, 1fr); }
  .ep .what { grid-column: 2; margin-top: -8px; }
}
@media (max-width: 560px) { .term pre { font-size: .76rem; padding: 14px; } }

/* ── Админка ──────────────────────────────────────────────── */
.dash-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.todo { display: grid; gap: 8px; margin-bottom: 16px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); font-weight: 600;
  border: 1px solid transparent; transition: transform .2s var(--ease-out); }
.todo-item span { flex: 1; }
.todo-item:hover { text-decoration: none; transform: translateX(3px); }
.todo-item.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.todo-item.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.kpi .tile { position: absolute; top: 14px; right: 14px; }
.kpi .label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.kpi .value { margin-top: 10px; font: 600 1.6rem/1.1 "JetBrains Mono", ui-monospace, monospace; }
.kpi .note { margin-top: 6px; font-size: .84rem; color: var(--muted); }
.grid.dash-two { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); margin-top: 14px; }
@media (max-width: 900px) { .grid.dash-two { grid-template-columns: minmax(0, 1fr); } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.legend { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.legend .rev, .chart .stack { background: var(--accent-line); }
.legend .pro, .chart .pro { background: var(--accent); }
.chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); align-items: end; gap: 6px; height: 180px; }
.chart .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.chart .stack { position: relative; width: 100%; max-width: 28px; height: max(var(--h), 2px); border-radius: 5px 5px 2px 2px;
  display: flex; align-items: flex-end; overflow: hidden; transform-origin: bottom; animation: grow .7s var(--ease-out) backwards; }
.chart .bar:nth-child(n) .stack { animation-delay: calc(var(--i, 0) * 30ms); }
.chart .pro { width: 100%; height: var(--p); }
.chart .day { font-size: .7rem; color: var(--muted); font-family: "JetBrains Mono", ui-monospace, monospace; }
.chart .bar:hover .stack { filter: brightness(1.1); }
@keyframes grow { from { transform: scaleY(0); } }
.list.tight { gap: 4px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-sm); color: var(--text); }
.person:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.person .grow { flex: 1; min-width: 0; }
.person .sub { display: block; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .82rem; }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; }
a.who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }

/* ── Профиль клиента ──────────────────────────────────────── */
.profile-hero { margin: 18px 0 14px; padding: 22px; border: 1px solid var(--accent-line); border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.profile-hero h1 { margin: 0; }
.profile-hero p { margin: 6px 0 0; color: var(--muted); }
.profile-card .who-row { display: flex; align-items: center; gap: 14px; }
.profile-card h2 { margin: 0; font-size: 1.45rem; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.05rem; }
.profile-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.profile-links .btn { min-height: 50px; }
@media (max-width: 700px) { .profile-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid.profile-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 14px; }
.pstat { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pstat .label { color: var(--muted); }
.pstat .value { margin-top: 4px; font: 700 1.7rem/1.2 "JetBrains Mono", ui-monospace, monospace; }
.pstat .note, .pstat .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); font-weight: 600; }
.pstat .more:hover { color: var(--accent); text-decoration: none; }
.pstat .more .ico { transition: transform .2s var(--ease-out); }
.pstat .more:hover .ico { transform: translateX(3px); }
.tier-card { margin-top: 14px; padding: 18px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line));
  background: linear-gradient(135deg, var(--ok-soft), var(--surface)); }
.tier-card.wait { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: linear-gradient(135deg, var(--warn-soft), var(--surface)); }
.tier-name { margin: 2px 0 12px; font-size: 1.5rem; font-weight: 700; }
.tier-status { display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); }
.tier-status .status { width: 30px; height: 30px; }
.tier-status .sub { display: block; font-size: .86rem; color: var(--muted); }
.section-label { margin: 26px 0 10px; }
.kv { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.kv .k { color: var(--muted); font-size: .9rem; }
.kv .v { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.key-card { margin-top: 16px; }
.key-card h3 { margin: 0; }
.key-card > p { margin: 4px 0 12px; }
.key-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.key-box code { flex: 1; min-width: 0; background: none; padding: 0; font-size: .95rem; overflow-wrap: anywhere; }
.key-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.docs-callout { margin-top: 16px; padding: 18px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); }
.docs-callout h3 { margin: 0; }
.docs-callout p { margin: 4px 0 12px; }

/* ── Аналитика ────────────────────────────────────────────── */
:root { --c-created: #6d4aff; --c-done: #16a34a; --c-ref: #e5484d; }
:root[data-theme="dark"] { --c-created: #9b87ff; --c-done: #4ade80; --c-ref: #ff6b6f; }
.periods { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  max-width: 100%; overflow-x: auto; }
.periods a { padding: 9px 16px; border-radius: 9px; color: var(--muted); font-weight: 600; white-space: nowrap;
  transition: background .2s var(--ease-out), color .2s, box-shadow .2s; }
.periods a:hover { color: var(--text); text-decoration: none; }
.periods a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.tz { margin: 8px 0 14px; }
.grid.scards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 560px) { .grid.scards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.scard { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.scard .label { color: var(--muted); font-weight: 500; }
.scard .value { margin: 6px 0 4px; font: 700 clamp(1.3rem, 4.5vw, 1.8rem)/1.15 "JetBrains Mono", ui-monospace, monospace; overflow-wrap: anywhere; }
.scard .note { font-size: .86rem; color: var(--muted); }
.value.c-created, .c-created { color: var(--c-created); }
.value.c-done, .c-done { color: var(--c-done); }
.value.c-ref, .c-ref { color: var(--c-ref); }
.chart-card, .kinds-card { margin-top: 14px; }
.legend.big { gap: 16px; flex-wrap: wrap; margin: -4px 0 10px; font-size: .9rem; }
.legend.big span { display: inline-flex; align-items: center; gap: 7px; }
.legend.big i { width: 11px; height: 11px; border-radius: 50%; margin: 0; background: currentColor; }
.line-chart { display: block; width: 100%; height: 260px; overflow: visible; }
.line-chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart-wrap { --axw: 34px; position: relative; padding-left: var(--axw); }
.chart-wrap .ax { position: absolute; font: 500 .7rem/1 "JetBrains Mono", ui-monospace, monospace; color: var(--muted); pointer-events: none; }
.chart-wrap .ax.y { left: 0; width: calc(var(--axw) - 6px); text-align: right; transform: translateY(-50%); }
.chart-wrap .ax.x { bottom: 2px; transform: translateX(-50%); white-space: nowrap; }
.line-chart .ln { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.2s var(--ease-out) forwards; }
.line-chart .ln.c-created { stroke: var(--c-created); }
.line-chart .ln.c-done { stroke: var(--c-done); animation-delay: .15s; }
.line-chart .ln.c-ref { stroke: var(--c-ref); animation-delay: .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .line-chart .ln { stroke-dasharray: none; stroke-dashoffset: 0; } }
.kinds-head, .kr-top { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px 64px; gap: 8px; align-items: center; }
.kinds-head { padding: 0 16px 10px; border-bottom: 1px dashed var(--line-strong); font-size: .78rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kinds-head span:not(:first-child), .kr-top span { text-align: right; font-family: "JetBrains Mono", ui-monospace, monospace; }
.kind-row { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.kr-sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.kr-sum b { font: 700 1.15rem/1.2 "JetBrains Mono", ui-monospace, monospace; }

.key-eye { position: relative; display: grid; place-items: center; width: 100%; height: 52px; margin-bottom: 10px;
  border: 1px solid var(--accent-line); border-radius: 12px; background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: background .15s, border-color .15s; }
.key-eye:hover, .key-eye.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.key-eye .tip { position: absolute; right: 10px; top: -38px; padding: 7px 12px; border-radius: 9px; background: var(--text); color: var(--bg);
  font-size: .82rem; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .15s, transform .15s; }
.key-eye:hover .tip, .key-eye:focus-visible .tip { opacity: 1; transform: none; }

/* Реквизиты в админке */
.pm.off { opacity: .6; }
.pm-new { border-style: dashed; }
.pm-head { display: flex; align-items: center; gap: 10px; }
.pm-head b { flex: 1; }
.pm-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 480px) { .pm-grid { grid-template-columns: minmax(0, 1fr); } }
.switch, .del { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; cursor: pointer; }
.switch input, .del input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.del { margin-top: 10px; color: var(--bad); font-size: .9rem; }
.save-bar { position: sticky; bottom: 12px; margin-top: 16px; box-shadow: 0 10px 30px -10px var(--accent); }
.flash.low-bal { align-items: center; }
.flash.low-bal span { flex: 1; }

/* Финансы в админке */
.fin-card { margin-top: 14px; }
.fin-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.fin-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.fin-item .label, .fin-item .note { color: var(--muted); font-size: .85rem; }
.fin-item b { font: 700 1.3rem/1.2 "JetBrains Mono", ui-monospace, monospace; overflow-wrap: anywhere; }
.fin-item.profit { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.fin-item.profit b { color: var(--ok); }
.fin-op { font-size: 1.4rem; color: var(--muted); text-align: center; }
@media (max-width: 700px) { .fin-flow { grid-template-columns: minmax(0, 1fr); } .fin-op { line-height: .6; } }
.fin-bar { display: flex; height: 12px; margin-top: 16px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.fin-bar .cost { background: var(--accent-line); }
.fin-bar .gain { background: var(--ok); }
.fin-card .legend { margin-top: 8px; }
.fin-card .legend .lc { background: var(--accent-line); }
.fin-card .legend .lg { background: var(--ok); }
.fin-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); }
.fin-rows > div:last-child { border-bottom: 0; }
.fin-rows span { color: var(--muted); }
.fin-rows b { font-family: "JetBrains Mono", ui-monospace, monospace; white-space: nowrap; }
.fin-rows .total span { color: var(--text); font-weight: 700; }
.fin-rows .total b { color: var(--ok); font-size: 1.15rem; }
.fin-rows .total.bad b { color: var(--bad); }

/* Загрузка каталога */
.sync-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 16px 0; }
.sync-btn { display: flex; align-items: center; gap: 12px; padding: 16px; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s; }
.sync-btn b { display: block; }
.sync-btn .sub { display: block; font-size: .85rem; color: var(--muted); }
.sync-btn:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 8px 24px -14px var(--accent); }
.sync-btn.main { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.sync-btn[disabled] { opacity: .5; cursor: progress; }
.job-stage { font-weight: 600; margin-bottom: 10px; }
.progress { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.progress span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 5px; background: var(--accent); transition: width .5s var(--ease-out); }
.progress.indet span { animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { from { left: -35%; } to { left: 100%; } }
.job-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.job-nums div { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.job-nums span { display: block; font-size: .8rem; color: var(--muted); }
.job-nums b { font-family: "JetBrains Mono", ui-monospace, monospace; }
@media (max-width: 560px) { .job-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.job-log { margin: 14px 0 0; max-height: 260px; overflow-y: auto; font-size: .78rem; background: var(--code-bg); color: #9fb3c8; white-space: pre-wrap; }

/* Ключи игр */
.key-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.regions-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.regions-box .chip { font-size: .8rem; padding: 3px 9px; }
.chips.off .chip { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); text-decoration: line-through; }

/* ── Страница покупки ─────────────────────────────────────── */
.buy-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 18px; }
.buy-head .media.cover { width: 84px; height: 84px; aspect-ratio: 1; flex: none; border-radius: 16px; padding: 6px;
  box-shadow: 0 8px 24px -14px rgb(0 0 0 / .5); }
.buy-head .media.cover .media-initials { font-size: 1.4rem; }
.buy-head h1 { margin: 2px 0 6px; font-size: clamp(1.35rem, 5vw, 1.8rem); }
.bh-kind { font-size: .8rem; font-weight: 600; color: var(--muted); }
.bh-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.buy-main { display: flex; flex-direction: column; gap: 14px; }
.buy-main .card + .card { margin-top: 0; }
.buy-side { position: sticky; top: 74px; }
.buy-btn { margin-top: 16px; }
.pack-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.pp { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  transition: border-color .15s, background .15s, transform .12s var(--ease); }
.pp:hover { color: var(--text); text-decoration: none; border-color: var(--accent-line); }
.pp:active { transform: scale(.98); }
.pp.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pp.on::after { content: "✓"; position: absolute; top: 8px; right: 10px; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; }
.pp-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--game-soft); color: var(--game); }
.pp-ico.k-gift_card { background: var(--card-soft); color: var(--card); }
.pp-ico.k-game_key { background: var(--steam-soft); color: var(--steam); }
.pp-name { font-weight: 600; font-size: .92rem; line-height: 1.25; overflow-wrap: anywhere; }
.pp-reg { font-size: .74rem; color: var(--muted); }
.pp-price { margin-top: auto; font: 600 .95rem/1.2 "JetBrains Mono", ui-monospace, monospace; color: var(--accent); }
.qty-row { display: flex; gap: 8px; align-items: center; }
.qty-row input { text-align: center; font-weight: 600; }
.qty-row .icon-btn { width: 44px; height: 44px; flex: none; }
.buy-bar { display: none; }
@media (max-width: 900px) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 76px; }
  .buy-side { position: static; }
  .buy-side .buy-btn { display: none; }
  .buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -16px rgb(0 0 0 / .35); }
  .buy-bar > div { flex: 1; display: flex; flex-direction: column; }
  .buy-bar b { font: 700 1.15rem/1.2 "JetBrains Mono", ui-monospace, monospace; color: var(--accent); }
  .buy-bar .btn { min-width: 140px; }
  .pack-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Конструктор ботов */
.bot-new .pm-head { margin-bottom: 4px; }
.bot-head { display: flex; align-items: center; gap: 12px; }
.bot-head .grow { flex: 1; min-width: 0; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--line-strong); }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: pulse 2s ease-in-out infinite; }
.status-dot.wait { background: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.bot-meta { margin: 10px 0; }
.bot-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bot-admins { display: flex; gap: 8px; margin-top: 10px; }
.bot-admins input { min-height: 34px; padding: 6px 10px; font-size: .9rem; }

/* Сеть USDT на странице пополнения */
.net-badge { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.net-badge b { font-weight: 700; }
.net-warn { margin-top: 8px; font-size: 13px; }

/* Кабинет → Мой Telegram-бот */
.bot-steps { margin: 10px 0 6px; padding-left: 20px; line-height: 1.7; }
.bot-feats { margin: 8px 0; padding-left: 0; list-style: none; line-height: 1.9; }

/* Вход через Google */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px;
  background: var(--surface, #fff); border: 1px solid var(--line-strong); color: var(--text); font-weight: 600; }
.google-btn:hover { border-color: var(--accent); }
.or-line { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; color: var(--muted, #888); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line, #ddd); }

/* ── Компактный вид (как у FazerCards): меньше размеры, аккуратнее ── */
h1 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h2 { font-size: clamp(1.08rem, 2vw, 1.3rem); }
.btn { min-height: 38px; padding: 8px 14px; font-size: .93rem; }
.btn.lg { min-height: 44px; font-size: .97rem; }
.btn.sm { min-height: 32px; font-size: .85rem; }
.card { padding: 16px; border-radius: 14px; }
.page-hero, .profile-hero { margin: 14px 0 12px; }
.profile-hero { padding: 18px; }
.profile-hero h1 { font-size: 1.5rem; }
.profile-hero p, .page-hero p { font-size: .93rem; }
.stat .value, .kpi .value { font-size: 1.25rem; }
.pstat { padding: 14px; }
.pstat .value { font-size: 1.3rem; }
.tier-card { padding: 14px; }
.tier-card .tier-name { font-size: 1.25rem; }
.kv { padding: 10px 12px; font-size: .93rem; }
.label-caps { font-size: .72rem; }

.bal-hero { margin-top: 12px; padding: 18px; border-radius: 16px; border: 1px solid var(--accent-line);
  background: linear-gradient(160deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 45%, var(--surface))); }
.bal-amount { font: 800 1.9rem/1.1 "Onest", system-ui, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bal-sub { margin-top: 4px; color: var(--muted); font-size: .95rem; }
.bal-btn { margin-top: 14px; min-height: 44px; border-radius: 12px; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent); }
.bal-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
@media (max-width: 520px) { .bal-tiles { grid-template-columns: minmax(0, 1fr); } }
.bal-tile { display: block; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
a.bal-tile:hover { text-decoration: none; border-color: var(--accent-line); }
.bal-tile .t-label { color: var(--muted); font-size: .9rem; }
.bal-tile .t-value { margin-top: 2px; font: 800 1.3rem/1.2 "Onest", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.bal-tile .t-note { margin-top: 2px; color: var(--muted); font-size: .8rem; }

.quick { margin-top: 12px; }
.quick .who-row { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.quick .who { display: flex; flex-direction: column; min-width: 0; }
.quick .who b { font-size: 1rem; }
.quick .who .muted { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-title { margin: 14px 0 2px; font-size: 1.05rem; }
.quick-sub { margin: 0 0 10px; color: var(--muted); font-size: .85rem; }
.qrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface);
  transition: border-color .15s var(--ease), background .15s var(--ease); }
.qrow:hover { text-decoration: none; border-color: var(--accent-line); background: var(--surface-2); color: var(--text); }
.qrow span { display: flex; flex-direction: column; }
.qrow b { font-size: .97rem; }
.qrow small { color: var(--muted); font-size: .82rem; }
.qrow .ico { flex: none; width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.kv .k { font-size: .85rem; }
.kv .v { font-size: .95rem; font-weight: 600; word-break: break-word; }
.tier-card .tier-status { padding: 10px 12px; }

/* Иконки способов оплаты (логотипы банков, USDT) */
.pm-logo { width: 36px; height: 36px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface-2);
  border: 1px solid var(--line); }
.pm-icon-row { margin-top: 10px; }
.pm-icon-row input[type=file] { min-height: 0; padding: 8px; font-size: .88rem; }
.paym { gap: 10px; }
