/* ==========================================================================
   VMK Prices · Brutal · Production styles
   Используется на /prices и /admin

   ВАЖНО: все дизайн-токены (цвета, типографика, отступы, переходы) живут
   в tokens.css. Этот файл их только использует через var(--...).
   Меняй цвет/шрифт/что-угодно в tokens.css → меняется везде.
   Витрина с превью: /design-system.html
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
  min-height: 100vh;
  /* На мобайле никакой горизонтальной прокрутки: страница сидит ровно
     под ширину экрана. overflow-x: clip обрезает, НО (в отличие от hidden)
     не создаёт собственный скролл-контекст — иначе ломается position: sticky
     у шапки на iOS Safari. */
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  overscroll-behavior-x: none;
}
::selection { background: var(--flame); color: var(--bg); }
button { font-family: inherit; }
input { font-family: inherit; }
a { color: inherit; }

.loading {
  padding: 80px 32px;
  text-align: center;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ===== NAV ===== */
.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
  padding: 18px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand {
  font-size: 16px; font-weight: 800; letter-spacing: -0.015em;
  display: flex; align-items: center;
  color: inherit; text-decoration: none;
}
/* Точка в логотипе — нарисована CSS-кружком, чтобы позиция не зависела
   от метрик шрифта и контекста (flex / inline). Сам символ "●" внутри
   <span class="dot">●</span> прячется font-size:0; видимый круг — это
   background + border-radius на самом span. */
.brand .dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--flame);
  border-radius: 50%;
  margin-left: 4px;
  font-size: 0;          /* прячем сам символ ● */
  vertical-align: middle;
  flex-shrink: 0;        /* во flex-контексте не сжимается             */
  align-self: center;    /* во flex-контейнере — строго по центру      */
}
.brand-sep { color: var(--muted-2); margin: 0 12px; font-weight: 300; }
.brand-sub {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--muted); letter-spacing: 0.04em;
}
.nav-right { display: flex; gap: 16px; align-items: center; }
.nav-meta {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.05em;
  text-decoration: none;
}
a.nav-meta:hover { color: var(--fg-2); }
.live {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-2); letter-spacing: 0.05em;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  cursor: default;
}
.live::before {
  content: ''; width: 6px; height: 6px;
  background: var(--green);
  box-shadow: 0 0 6px var(--green-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .4; } }

/* ===== NAV · LANDING STYLE ==============================================
   Модификатор для главной/прайса/витрины. На .nav добавляется класс is-lg:
   sticky сверху, backdrop-blur, увеличенное лого (22px), пункты меню
   через .nav-link с подчёркиванием на hover. /admin использует обычный
   .nav без is-lg — у него своя компактная шапка.
   ========================================================================= */
/* Sticky-обёртка для шапки + мобильного дропдауна. Когда дропдаун открыт,
   они скроллятся как единое целое (как React-нав на лендинге). Все параметры
   1-в-1 повторяют Tailwind на лендинге: bg-ink/85 + backdrop-blur-md + border-b. */
.nav-sticky {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(10, 10, 10, 0.85);
  border-bottom: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav-sticky .nav.is-lg {
  background: transparent;
  border-bottom: 0;
  position: static;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.nav-sticky .nav-dropdown {
  background: transparent;
  border-bottom: 0;
  position: static;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav.is-lg {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(10, 10, 10, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 0 var(--pad-page-x);
  height: 56px;
}
.nav.is-lg .nav-right { gap: 32px; }
.nav.is-lg .brand {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.025em;
}
.nav.is-lg .brand .dot {
  width: 9px; height: 9px; margin-left: 4px;
}
.nav-link {
  position: relative;
  font-family: var(--font);
  font-size: 12px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-2);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--t-fast) var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--flame);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease-out;
}
.nav-link:hover { color: var(--fg); }
.nav-link:hover::after { transform: scaleX(1); }

/* Группа десктоп-пунктов меню внутри nav.is-lg. На мобайле скрыта,
   её место занимает гамбургер + выпадающий мобильный список. */
.nav-menu {
  display: flex; align-items: center; gap: 24px;
}

/* Основная CTA в шапке — всегда видна на мобайле и десктопе, ведёт на /prices.
   Тот же визуал, что и flame-кнопка в навигации лендинга. */
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--flame); color: var(--bg);
  padding: 7px 14px;
  font-family: var(--font); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--t-fast) var(--ease);
}
.nav-cta:hover { opacity: 0.9; }

/* Гамбургер — три полоски, превращаются в крестик в .open.
   Абсолютное позиционирование вместо flex: исключает iOS-quirks с gap+transform.
   Шаг 7px между полосками — как на лендинге (там flex gap-1.5 = 6px + 1px line). */
.nav-burger {
  display: none;
  position: relative;
  background: transparent; border: none;
  outline: none;
  width: 28px; height: 28px;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger span {
  position: absolute;
  left: 4px; right: 4px;
  height: 1px;
  background: var(--fg);
  transform-origin: center center;
  transition: top var(--t-base) var(--ease), transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-burger span:nth-child(1) { top: 7px; }
.nav-burger span:nth-child(2) { top: 14px; }
.nav-burger span:nth-child(3) { top: 21px; }
.nav-burger.open span:nth-child(1) { top: 14px; transform: rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { top: 14px; transform: rotate(-45deg); }

/* Мобильный выпадающий список — приклеен под шапкой (top:56px = высота .nav.is-lg). */
.nav-dropdown {
  display: none;
  position: fixed; top: 56px; left: 0; right: 0;
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
  padding: 20px var(--pad-page-x);
  flex-direction: column; gap: 18px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.nav-dropdown.open { display: flex; }
.nav-dropdown .nav-link::after { display: none; }   /* подчёркивание не нужно в списке */
.nav-dropdown .nav-link { padding: 6px 0; }

@media (max-width: 1023px) {
  .nav.is-lg .nav-menu { display: none; }
  .nav-burger { display: inline-block; }
}
@media (max-width: 768px) {
  .nav-dropdown { padding: 20px var(--pad-page-x-mobile); }
}

@media (max-width: 540px) {
  .nav.is-lg { padding: 0 var(--pad-page-x-mobile); }
  .nav.is-lg .nav-right { gap: 20px; }
  .nav-link { font-size: 11px; letter-spacing: 0.08em; }
  .nav-dropdown .nav-link { font-size: 13px; letter-spacing: 0.1em; }
}

/* ===== LANG SWITCH ===== */
/* Тумблер RU / EN в навигации. Визуальный язык: моно, аппер, флэйм-акцент
   на активной кнопке. Используется в шапке на /price (через nav.html partial)
   и на главной (React-Nav). */
.lang-switch {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-2);
  height: 28px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0 10px;
  cursor: pointer;
  outline: none;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.lang-switch button + button { border-left: 1px solid var(--line-2); }
.lang-switch button:hover { color: var(--fg); }
.lang-switch button.active {
  background: var(--flame); color: var(--bg);
}

/* В мобильной выпадашке свитчер встаёт отдельной строкой снизу. */
.nav-dropdown .lang-switch { align-self: flex-start; margin-top: 6px; }

/* ===== HERO ===== */
.hero {
  padding: 96px 32px 72px;
  border-bottom: 1px solid var(--line-2);
}
.hero-eyebrow {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.hero h1 {
  font-size: clamp(48px, 6vw, 84px); font-weight: 900;
  letter-spacing: -0.04em; line-height: 0.95;
  color: var(--fg); max-width: 1000px;
}
.hero h1 em { font-style: normal; color: var(--flame); font-weight: 900; }
.hero-sub {
  margin-top: 28px; font-size: 16px; line-height: 1.55;
  color: var(--fg-2); max-width: 600px;
}

/* ===== MOEX ===== */
.moex { background: var(--bg-2); border-bottom: 1px solid var(--line-2); }
.moex-head {
  padding: 28px 32px;
  border-bottom: 1px solid var(--line-2);
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: start;
}
.moex-source {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--flame); margin-bottom: 8px;
}
.moex-source::before {
  content: ''; width: 6px; height: 6px;
  background: var(--flame);
  box-shadow: 0 0 8px var(--flame-glow-2);
}
.moex-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.moex-spec {
  margin-top: 4px;
  font-family: var(--mono); font-size: 14px;
  color: var(--muted); letter-spacing: 0.02em;
}
.moex-time {
  font-family: var(--mono); font-size: 13px;
  color: var(--muted); text-align: right;
}
.moex-time-l {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted-2); margin-bottom: 4px;
}
.moex-body { display: grid; grid-template-columns: 1fr 1fr; }
.moex-price-col {
  padding: 40px 32px; border-right: 1px solid var(--line-2);
  position: relative; overflow: hidden;
}
.moex-price-col::before {
  content: ''; position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  background: linear-gradient(to top, transparent, transparent);
  transition: background 400ms ease;
}
.moex-price-col.up::before {
  background: linear-gradient(to top, rgba(74, 222, 128, 0.25) 0%, rgba(74, 222, 128, 0) 55%);
}
.moex-price-col.down::before {
  background: linear-gradient(to top, rgba(255, 92, 92, 0.25) 0%, rgba(255, 92, 92, 0) 55%);
}
.moex-price-col > * { position: relative; z-index: 1; }
.moex-price-l {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--muted);
  margin-bottom: 14px;
}
.moex-price-row {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 6px;
}
.moex-price-delta {
  align-self: flex-end;
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green-bd);
  padding: 4px 8px;
  white-space: nowrap; flex-shrink: 0;
}
.moex-price-delta.down {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red-bd);
}
.moex-price {
  font-size: clamp(56px, 8vw, 104px); font-weight: 900;
  letter-spacing: -0.05em; line-height: 0.9;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: flex; align-items: baseline; gap: 8px;
}
.moex-price-unit {
  font-family: var(--mono); font-size: 20px; font-weight: 600;
  color: var(--fg-2);
}
.moex-legal {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); line-height: 1.5;
  letter-spacing: 0.02em;
  max-width: 420px;
}
.moex-legal a {
  color: var(--fg-2); text-decoration: underline;
  text-decoration-color: var(--muted); text-underline-offset: 2px;
}
.moex-legal a:hover { color: var(--fg); }

.moex-chart-col { padding: 0; display: flex; flex-direction: column; }
.moex-chart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 32px 18px;
}
.moex-chart-l {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--muted);
}
.periods { display: flex; border: 1px solid var(--line-2); }
.period {
  background: transparent; border: none; cursor: pointer;
  padding: 8px 14px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; color: var(--muted);
  border-right: 1px solid var(--line-2);
  transition: all .15s;
}
.period:last-child { border-right: none; }
.period:hover { color: var(--fg-2); background: var(--surface); }
.period.active { background: var(--flame); color: var(--bg); }
.moex-chart {
  flex: 1; min-height: 220px;
  background: var(--bg);
  position: relative;
  touch-action: pan-y;
}
.moex-chart svg { width: 100%; height: 100%; display: block; }
.moex-chart .moex-pt {
  fill: var(--flame); opacity: 0;
  transition: opacity 120ms ease, r 120ms ease;
  pointer-events: none;
}
.moex-chart .moex-pt.active { opacity: 1; }
.moex-chart .moex-crosshair {
  stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3;
  opacity: 0; pointer-events: none;
  transition: opacity 100ms ease;
}
.moex-chart .moex-crosshair.active { opacity: 1; }
.moex-chart-tip {
  position: absolute; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line-2);
  padding: 8px 10px; border-radius: 6px;
  font-family: var(--mono); font-size: 11px; line-height: 1.4;
  color: var(--fg); white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  opacity: 0; transition: opacity 120ms ease;
  z-index: 2;
}
.moex-chart-tip.active { opacity: 1; }
.moex-chart-tip .tip-date { color: var(--muted); margin-bottom: 2px; }
.moex-chart-tip .tip-price { color: var(--flame); font-weight: 600; }
.moex-foot { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-2); }
.delta-cell { padding: 20px 24px; border-right: 1px solid var(--line-2); }
.delta-cell:last-child { border-right: none; }
.delta-l {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--muted);
  margin-bottom: 8px;
}
.delta-v {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.delta-v.up { color: var(--green); }
.delta-v.down { color: var(--red); }

/* ===== CATALOG ===== */
.cat-head {
  padding: 64px 32px 32px;
  border-bottom: 1px solid var(--line-2);
  display: grid; grid-template-columns: 1fr auto;
  gap: 32px; align-items: end;
}
.cat-eyebrow {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.cat-h2 { font-size: 56px; font-weight: 900; letter-spacing: -0.03em; line-height: 0.95; }
.cat-h2 em { font-style: normal; color: var(--flame); }
.cat-basis {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--flame); color: var(--flame);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
}

.cat-filters {
  padding: 28px 32px;
  border-bottom: 1px solid var(--line-2);
  display: flex; gap: 32px; align-items: center;
  flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group-l {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted-2);
}
.seg { display: flex; border: 1px solid var(--line-2); }
.seg-btn {
  background: transparent; border: none; cursor: pointer;
  padding: 12px 22px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted);
  border-right: 1px solid var(--line-2);
  transition: all .15s;
  display: flex; align-items: center; gap: 10px;
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover { color: var(--fg-2); background: var(--surface); }
.seg-btn.active { background: var(--flame); color: var(--bg); }
.seg-btn .count { font-size: 10px; opacity: 0.6; }
.seg-btn.active .count { opacity: 0.5; }
.chips { display: flex; border: 1px solid var(--line-2); }
.chip {
  background: transparent; border: none; cursor: pointer;
  padding: 12px 18px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
  border-right: 1px solid var(--line-2);
  transition: all .15s;
}
.chip:last-child { border-right: none; }
.chip:hover { color: var(--fg-2); background: var(--surface); }
.chip.active { background: var(--flame); color: var(--bg); }

/* ===== PRICE CARDS ===== */
.cards {
  background: var(--surface);
  padding: 12px 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.pcard {
  background: var(--bg);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  padding: 28px 32px;
  display: grid; grid-template-columns: auto 1fr auto auto;
  gap: 32px; align-items: center;
  transition: background .15s;
  position: relative;
}
.pcard:hover { background: var(--surface-2); }
.pcard:hover::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--flame);
}
.pcard-class {
  background: transparent; color: var(--flame);
  border: 1px solid var(--flame);
  padding: 4px 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  white-space: nowrap;
}
.pcard-title-row {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 6px;
}
.pcard-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pcard-yr {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.05em;
}
.pcard-metrics {
  display: flex; gap: 20px; margin-top: 12px;
  font-family: var(--mono); font-size: 12px;
  flex-wrap: wrap;
}
.pcard-metric { display: flex; align-items: baseline; gap: 6px; }
.pcard-metric .l {
  color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.pcard-metric .v { color: var(--fg-2); font-weight: 600; }
.pcard-metric.protein .l { color: var(--flame); }
.pcard-metric.protein .v { color: var(--flame); font-weight: 700; }

.pcard-price-block {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px; flex-shrink: 0;
}
.pcard-price-row {
  display: flex; align-items: baseline; gap: 12px;
  white-space: nowrap;
}
.pcard-delta {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green-bd);
  padding: 3px 8px;
  flex-shrink: 0; white-space: nowrap;
}
.pcard-delta.down {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red-bd);
}
.pcard-price-main {
  font-size: 32px; font-weight: 900; letter-spacing: -0.025em;
  line-height: 1; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pcard-price-unit {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  color: var(--muted); margin-left: 4px;
}
.pcard-price-vat {
  font-family: var(--mono); font-size: 13px;
  color: var(--muted); white-space: nowrap;
}
.pcard-price-vat .v { color: var(--fg-2); font-weight: 700; margin-left: 4px; }
.pcard-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--flame); color: var(--bg);
  padding: 14px 22px;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--flame);
  transition: background .15s, color .15s;
}
.pcard-cta:hover { background: transparent; color: var(--flame); }

/* ===== LEGAL ===== */
.legal {
  padding: 40px 32px 48px;
  border-top: 1px solid var(--line-2);
  background: var(--bg-2);
}
.legal-row {
  max-width: 1200px;
}
.legal-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--flame);
  padding: 6px 10px;
  border: 1px solid var(--flame);
  white-space: nowrap; align-self: start;
}
.legal-text {
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
  color: var(--muted);
}
.legal-text strong { color: var(--fg-2); font-weight: 600; }
.legal-text a {
  color: var(--fg-2); text-decoration: underline;
  text-decoration-color: var(--muted-2); text-underline-offset: 2px;
}
.legal-text a:hover { color: var(--flame); }

/* ==========================================================================
   AUTH SCREENS (login, forgot, reset)
   ========================================================================== */
.auth-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px;
  background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  padding: 48px 40px;
}
.auth-eyebrow {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.auth-title {
  font-size: 32px; font-weight: 900; letter-spacing: -0.025em;
  line-height: 1.05; margin-bottom: 12px;
}
.auth-sub { font-size: 14px; line-height: 1.5; color: var(--fg-2); margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; }
.auth-form label > span {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted);
}
.auth-form input {
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--fg);
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.auth-form input:focus { border-color: var(--flame); }
.auth-form input::placeholder { color: var(--muted); }
.auth-error {
  font-family: var(--mono); font-size: 12px;
  color: var(--red);
  padding: 10px 12px;
  background: var(--red-soft);
  border: 1px solid var(--red-bd);
  display: none;
}
.auth-error.visible { display: block; }
.auth-info {
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
  color: var(--green);
  padding: 12px;
  background: var(--green-soft);
  border: 1px solid var(--green-bd);
  display: none;
}
.auth-info.visible { display: block; }
.btn.auth-submit { margin-top: 8px; padding: 14px 24px; font-size: 12px; height: auto; }
.auth-link {
  margin-top: 4px;
  font-size: 11px;
  background: transparent !important;
  border: none !important;
  color: var(--muted) !important;
  cursor: pointer;
  padding: 6px 0;
  text-align: center;
}
.auth-link:hover { color: var(--fg-2) !important; }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.adm-page-head {
  padding: 64px 32px 40px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
}
.adm-h1 {
  font-size: 48px; font-weight: 900; letter-spacing: -0.03em; line-height: 0.95;
  margin-bottom: 12px;
}
.adm-page-sub { font-size: 15px; line-height: 1.5; color: var(--fg-2); max-width: 540px; }

.adm-controls {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-2);
}
.adm-panel { padding: 32px 36px; border-right: 1px solid var(--line-2); }
.adm-panel:last-child { border-right: none; }
.adm-panel-head {
  display: flex; justify-content: space-between; align-items: start;
  margin-bottom: 8px; gap: 16px;
}
.adm-panel-eyebrow {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--flame); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.adm-panel-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.adm-panel-desc { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--fg-2); max-width: 460px; }
/* Подмена «справа»/«снизу» в описании синхронизации в зависимости от лейаута */
.coef-pos-mobile { display: none; }
.coef-pos-desktop { display: inline; }
.adm-panel-meta {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line-2);
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted);
}
.adm-panel-meta strong { color: var(--fg-2); font-weight: 700; }
.status-on, .status-off {
  display: inline-flex; align-items: center; gap: 6px;
}
.status-on { color: var(--flame); }
.status-on::before {
  content: ''; width: 6px; height: 6px; background: var(--flame);
  box-shadow: 0 0 6px var(--flame-glow);
}
.status-off { color: var(--muted); }
.status-off::before {
  content: ''; width: 6px; height: 6px; background: var(--muted-2);
}
.toggle {
  width: 56px; height: 32px;
  background: var(--flame);
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}
.toggle::after {
  content: ''; position: absolute; right: 2px; top: 2px;
  width: 28px; height: 28px;
  background: var(--bg);
  transition: all .2s;
}
.toggle.off { background: var(--muted-2); }
.toggle.off::after { left: 2px; right: auto; background: var(--bg); }

.coef-block { margin-top: 16px; }
.coef-row { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.coef-sign-toggle { display: flex; border: 1px solid var(--line-2); height: 32px; }
.coef-sign-btn {
  background: transparent; border: none; cursor: pointer;
  padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  color: var(--muted);
  border-right: 1px solid var(--line-2);
  transition: all .15s;
  min-width: 44px;
}
.coef-sign-btn:last-child { border-right: none; }
.coef-sign-btn:hover { color: var(--fg-2); background: var(--surface); }
.coef-sign-btn.active { background: var(--flame); color: var(--bg); }
.coef-unit-toggle { display: flex; border: 1px solid var(--line-2); height: 32px; }
.coef-unit-btn {
  background: transparent; border: none; cursor: pointer;
  padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--muted);
  border-right: 1px solid var(--line-2);
  transition: all .15s;
  min-width: 44px;
}
.coef-unit-btn:last-child { border-right: none; }
.coef-unit-btn:hover { color: var(--fg-2); background: var(--surface); }
.coef-unit-btn.active { background: var(--flame); color: var(--bg); }
.coef-input-wrap { display: flex; align-items: stretch; border: 1px solid var(--line-2); height: 32px; }
.coef-input {
  background: transparent; border: none; outline: none;
  padding: 0 14px;
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  color: var(--fg);
  width: 100px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.coef-pct {
  padding: 0 14px;
  display: flex; align-items: center;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  color: var(--muted);
  border-left: 1px solid var(--line-2);
}
.coef-example {
  margin-top: 14px;
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-2);
}
.coef-example strong { color: var(--fg); font-weight: 700; }
.coef-example .arrow { color: var(--fg-2); margin: 0 6px; }

.adm-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
}
.adm-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 16px 24px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted);
  border-right: 1px solid var(--line-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
  display: flex; align-items: center; gap: 6px;
}
.adm-tab:hover { color: var(--fg-2); background: var(--surface); }
.adm-tab.active { color: var(--flame); border-bottom-color: var(--flame); background: var(--surface); }
.adm-tab .count { font-size: 11px; opacity: 0.6; }

/* Admin price cards container — слегка приподнятый фон, через gap-промежутки
   видны как «плавающие» плашки, как .cards/.pcard на публичном прайсе. */
#adminCardsContainer {
  background: var(--surface);
  padding: 12px 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.ac {
  background: var(--bg);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  padding: 32px;
  display: grid; grid-template-columns: 1fr 380px;
  gap: 48px;
  transition: background .15s;
}
.ac.dirty {
  background: var(--flame-soft);
  border-left: 3px solid var(--flame);
  padding-left: 29px;
}
.ac-info-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.ac-class {
  background: var(--flame); color: var(--bg);
  padding: 5px 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.ac-class.outline {
  background: transparent; color: var(--flame);
  border: 1px solid var(--flame); padding: 4px 9px;
}
.ac-status {
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-2); margin-left: auto;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.ac-status.dirty {
  color: var(--flame); font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.ac-status.dirty::before {
  content: ''; width: 6px; height: 6px; background: var(--flame);
  animation: pulse 1.5s infinite;
}
.ac-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.ac-metrics { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; }
.ac-metrics > span { display: flex; align-items: baseline; gap: 6px; }
.ac-metrics .l {
  color: var(--fg-2); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.ac-metrics .v { color: var(--fg); font-weight: 600; }

.ac-controls { display: flex; flex-direction: column; gap: 12px; }
.ac-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ac-row-l {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg);
}
.ac-input,
.ac-vat {
  width: 160px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--muted-2);
  color: var(--fg);
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.ac-input { outline: none; cursor: text; }
.ac-input:hover { border-color: var(--muted); }
.ac-input:focus { border-color: var(--flame); border-style: solid; }
.ac-input.dirty { border-color: var(--flame); border-style: solid; border-width: 2px; padding: 9px 13px; }
.ac-input.invalid { border-color: var(--red); border-style: solid; color: var(--red); -webkit-text-fill-color: var(--red); }
.ac-input-error {
  display: none;
  font-family: var(--mono); font-size: 10px;
  color: var(--red);
  text-align: right;
  margin-top: -4px;
}
.ac-input-error.visible { display: block; }
.ac-aston {
  margin-top: 4px; padding-top: 14px;
  border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-between; align-items: center;
}
.ac-aston-l {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-2);
}
/* Префикс «Астон · » скрыт везде — он избыточен (контекст уже Aston-плашка),
   и без него 24Ч/7Д бейджи помещаются в одну строку и на десктопе тоже. */
.ac-aston-prefix { display: none; }
.ac-aston-v { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--fg-2); }
.ac-aston-d { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; white-space: nowrap; }
.ac-aston-d.up { color: var(--green); }
.ac-aston-d.down { color: var(--red); }
.ac-aston-d-l {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 5px;
  background: var(--tint-soft-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: baseline;
}
.ac-actions { display: flex; gap: 8px; margin-top: 4px; }

.btn {
  background: transparent; border: 1px solid var(--line-2);
  color: var(--fg-2);
  height: 32px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  cursor: pointer; flex: 1;
  transition: all .15s;
}
.btn:hover { border-color: var(--fg-2); color: var(--fg); background: var(--surface); }
.btn.primary { background: var(--flame); color: var(--bg); border-color: var(--flame); }
.btn.primary:hover { background: var(--flame-hover); border-color: var(--flame-hover); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg-2); border-color: var(--line-2); }
.btn.danger { border-color: var(--muted); color: var(--fg); }
.btn.danger:hover { border-color: var(--flame); color: var(--flame); background: var(--flame-soft); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.save-bar {
  position: sticky; bottom: 0; z-index: 10;
  background: var(--bg-2);
  border-top: 1px solid var(--flame);
  padding: 18px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.save-bar-text {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--flame);
  display: flex; align-items: center; gap: 10px;
}
.save-bar-text::before {
  content: ''; width: 8px; height: 8px; background: var(--flame);
  animation: pulse 1.5s infinite;
}
.save-bar-actions { display: flex; gap: 8px; }

/* User dropdown */
.user-menu { position: relative; }
.user-menu .live { cursor: pointer; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  min-width: 180px;
  display: none;
  z-index: 100;
}
.user-dropdown.open { display: block; }
.user-dropdown button {
  display: block; width: 100%;
  background: transparent; border: none;
  padding: 12px 16px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-2);
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.user-dropdown button:last-child { border-bottom: none; }
.user-dropdown button:hover { background: var(--surface); color: var(--fg); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  width: 100%; max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  padding: 32px;
}
.modal h2 {
  font-size: 24px; font-weight: 900; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.modal-actions {
  display: flex; gap: 8px; margin-top: 16px;
}

/* ==========================================================================
   COOKIE CONSENT BANNER (cookie-consent.js — показывает на публичных
   страницах, прячется в localStorage после принятия)
   ========================================================================== */
.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  width: calc(100% - 32px);
  max-width: 880px;
  transform: translateX(-50%) translateY(140%);
  opacity: 0;
  z-index: var(--z-modal);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  display: flex; flex-wrap: wrap;
  gap: 16px; align-items: center; justify-content: space-between;
  font-family: var(--font);
  transition: transform .35s var(--ease), opacity .35s var(--ease);
  box-shadow: var(--shadow-md);
}
.cookie-bar--show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.cookie-bar-text {
  flex: 1 1 320px;
  font-size: 13px; line-height: 1.5;
  color: var(--fg-2);
}
.cookie-bar-text a {
  color: var(--flame);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-bar-text a:hover { color: var(--flame-hover); }
.cookie-bar-actions { flex: 0 0 auto; }
.cookie-bar-accept {
  background: var(--flame);
  color: var(--bg);
  font-family: var(--font);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  transition: opacity var(--t-fast) var(--ease);
}
.cookie-bar-accept:hover { opacity: 0.9; }
@media (max-width: 768px) {
  .cookie-bar {
    left: 8px; right: 8px; bottom: 8px;
    width: auto; max-width: none;
    transform: translateY(140%);
    padding: 10px 12px; gap: 10px;
    flex-wrap: nowrap; align-items: center;
  }
  .cookie-bar--show { transform: translateY(0); }
  .cookie-bar-text { font-size: 11px; line-height: 1.4; flex: 1 1 auto; min-width: 0; }
  .cookie-bar-accept {
    width: auto;
    padding: 6px 12px;
    font-size: 11px; letter-spacing: 0.1em;
    white-space: nowrap;
  }
}

/* ==========================================================================
   SHARED SITE FOOTER (используется на /price, /design-system,
   /privacy, /cookies, /requisites. На / своя React-версия с теми же
   токенами/типографикой/структурой.)
   ========================================================================== */
.vmk-footer {
  background: var(--bg);
  border-top: 1px solid var(--line-2);
  padding: 80px var(--pad-page-x) 48px;
  font-family: var(--font);
}
.vmk-footer-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 40px;
}
.vmk-footer-brand {
  display: inline-flex; align-items: center;
  font-size: 22px; font-weight: 700; letter-spacing: -0.025em;
  color: var(--fg); text-decoration: none;
}
.vmk-footer-brand .dot {
  display: inline-block; width: 9px; height: 9px;
  background: var(--flame); border-radius: 50%;
  margin-left: 4px; vertical-align: middle;
}
.vmk-footer-contact { margin-top: 32px; }
.vmk-footer-label {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--flame);
}
.vmk-footer-name {
  margin-top: 12px;
  font-size: 20px; font-weight: 600; color: var(--fg);
}
.vmk-footer-email {
  display: block; margin-top: 20px;
  font-family: var(--mono); font-size: 16px;
  color: var(--fg); text-decoration: none;
}
.vmk-footer-email:hover { text-decoration: underline; }
.vmk-footer-tel {
  display: block; margin-top: 4px;
  font-family: var(--mono); font-size: 15px;
  color: var(--fg-2); text-decoration: none;
}
.vmk-footer-addr {
  margin-top: 12px;
  font-size: 14px; line-height: 1.55; color: var(--fg);
}
.vmk-footer-coords {
  margin-top: 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}
.vmk-footer-docs {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 12px;
  font-family: var(--font); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.vmk-footer-docs a {
  color: var(--fg); text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.vmk-footer-docs a:hover { color: var(--flame); }
.vmk-footer-bottom {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 11px;
}
.vmk-footer-bottom .place {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase;
}
@media (min-width: 1024px) {
  .vmk-footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 64px; }
}
@media (max-width: 768px) {
  .vmk-footer { padding: 48px var(--pad-page-x-mobile) 32px; }
  .vmk-footer-bottom { margin-top: 40px; }
}

/* === LEGAL PAGE LAYOUT (privacy/cookies/requisites) === */
.legal-page {
  padding: 96px var(--pad-page-x) 64px;
  max-width: 880px; margin: 0 auto;
}
.legal-page .hero-eyebrow { margin-bottom: 16px; }
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 900; letter-spacing: -0.03em;
  line-height: 1.05; color: var(--fg);
}
.legal-page h1 em { font-style: normal; color: var(--flame); }
.legal-page h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700; letter-spacing: -0.01em;
  color: var(--fg);
  margin-top: 48px; margin-bottom: 16px;
}
.legal-page p, .legal-page li {
  font-size: 15px; line-height: 1.65; color: var(--fg-2);
}
.legal-page p + p { margin-top: 14px; }
.legal-page ul, .legal-page ol {
  margin-top: 14px; padding-left: 24px;
}
.legal-page li { margin-top: 8px; }
.legal-page a { color: var(--flame); text-decoration: underline; text-underline-offset: 2px; }
.legal-page a:hover { text-decoration-color: var(--flame); }
.legal-page .meta {
  margin-top: 12px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.05em; color: var(--muted);
}
.legal-page .kv-list {
  margin-top: 24px;
  display: grid; grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line-2);
}
.legal-page .kv-list > div {
  display: grid; grid-template-columns: 1fr;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
}
.legal-page .kv-list > div:last-child { border-bottom: none; }
.legal-page .kv-list dt {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.legal-page .kv-list dd {
  font-size: 14px; line-height: 1.5; color: var(--fg);
  margin: 0;
}
@media (min-width: 768px) {
  .legal-page .kv-list > div {
    grid-template-columns: 240px 1fr;
    gap: 24px; align-items: baseline;
  }
  .legal-page .kv-list dt { margin-bottom: 0; }
}
@media (max-width: 768px) {
  .legal-page { padding: 56px var(--pad-page-x-mobile) 40px; }
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 980px) {
  .nav { padding: 14px 20px; }
  .moex-body { grid-template-columns: 1fr; }
  .moex-price-col { border-right: none; border-bottom: 1px solid var(--line-2); padding: 28px 24px; }
  .moex-chart-col { padding: 0; }
  .moex-chart-head { padding: 24px 24px 16px; }
  .moex-foot { grid-template-columns: 1fr 1fr; }
  .delta-cell:nth-child(2) { border-right: none; }
  .delta-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .moex-head { padding: 20px 24px; }
  .moex-name { font-size: 18px; }

  .hero { padding: 56px 24px 40px; }

  /* Eyebrow-заголовки на мобайле остаются компактными — крупнее их
     сделали только на десктопе, чтобы вернуть читаемость после
     удаления оранжевой чёрточки. */
  .hero-eyebrow,
  .cat-eyebrow,
  .auth-eyebrow { font-size: 11px; }
  .adm-panel-eyebrow { font-size: 10px; }

  .cat-head { padding: 40px 24px 24px; grid-template-columns: 1fr; gap: 20px; }
  .cat-basis { justify-self: start; }
  .cat-h2 { font-size: 40px; }
  .cat-filters { padding: 20px 24px; gap: 20px; }

  /* Фильтры: каждая группа во всю ширину, кнопки внутри seg/chips делятся
     равномерно (flex:1) и ужимают паддинг — все 4 сегмента "Мука + ..."
     помещаются в одну строку, не выходя за контейнер. */
  .filter-group { width: 100%; }
  .seg, .chips { width: 100%; }
  .seg-btn, .chip {
    flex: 1; min-width: 0;
    padding: 12px 6px;
    gap: 6px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }
  .seg-btn .count { font-size: 10px; }

  /* Карточки на мобильнике */
  .pcard {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 24px;
  }
  .pcard-class { align-self: flex-start; justify-self: start; width: auto; }
  .pcard-cta { justify-self: stretch; text-align: center; padding: 13px 18px; }
  .pcard-title { font-size: 20px; }
  .pcard-price-block { align-items: flex-start; }
  .pcard-price-main { font-size: 28px; }
  .pcard-metrics { gap: 14px; }

  .legal { padding: 32px 24px 40px; }
  .legal-row { grid-template-columns: 1fr; gap: 14px; }

  .adm-page-head { padding: 40px 24px 28px; }
  .adm-h1 { font-size: 36px; }
  .adm-controls { grid-template-columns: 1fr; }
  .adm-panel { border-right: none; border-bottom: 1px solid var(--line-2); padding: 24px; }
  .adm-panel:last-child { border-bottom: none; }
  .ac { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .ac.dirty { padding-left: 21px; }
  /* Шрифты карточек в админке на мобиле побольше — на десктопе мелковато */
  .ac-name { font-size: 22px; }
  .ac-metrics { font-size: 14px; gap: 14px; }
  .ac-metrics .l { font-size: 12px; }
  .ac-metric-input { font-size: 14px; width: 64px; }
  .ac-status { font-size: 11px; margin-left: 0; }
  .ac-class { font-size: 12px; padding: 6px 12px; }
  .ac-row-l { font-size: 12px; }
  .ac-input { font-size: 18px; height: 46px; }
  .ac-vat { font-size: 16px; height: 46px; display: flex; align-items: center; justify-content: flex-end; }
  .ac-pulled { font-size: 12px; }
  .ac-buyer-l { font-size: 11px; }
  .ac-buyer-field > span { font-size: 11px; }
  .ac-buyer-input { font-size: 14px; height: 46px; padding: 0 30px 0 14px; }
  .adm-panel-title { font-size: 20px; }
  .adm-panel-desc { font-size: 14px; }
  .coef-pos-desktop { display: none; }
  .coef-pos-mobile { display: inline; }
  .adm-panel-meta {
    font-size: 13px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    align-items: center;
  }
  .adm-panel-meta-time { min-width: 0; }
  /* Кнопка «Запустить вручную» — отдельная строка, на всю ширину контейнера,
     текст по центру. */
  .adm-panel-meta > .btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    margin-left: 0 !important;
  }

  /* Все интерактивные контролы выровнены на 46px (как .pcard-cta на мобайле).
     Свитч и маленький свитч-в-карточке остаются десктопного размера —
     чтобы не нависать визуально над текстом панели. */
  .btn { height: 46px; font-size: 12px; }
  .coef-sign-toggle, .coef-unit-toggle, .coef-input-wrap { height: 46px; }

  /* Coef-row: знак + единица в одну строку, поле ввода — новая строка во всю ширину,
     «Применить» — отдельная строка во всю ширину. */
  .coef-row { gap: 8px; }
  .coef-input-wrap { flex-basis: 100%; width: 100%; }
  .coef-input { flex: 1; width: auto; }
  .coef-row > .btn { flex-basis: 100%; }


  .adm-tab { font-size: 13px; padding: 14px 12px; flex: 1; justify-content: center; }
  .adm-tab:last-child { border-right: none; }
  .save-bar { padding: 14px 24px; }
  .auth-card { padding: 36px 24px; }
  .auth-title { font-size: 28px; }
}

@media (max-width: 540px) {
  .hero h1 { font-size: 38px; }
  .moex-price { font-size: 56px; }
  .cat-h2 { font-size: 32px; }
  .nav-meta { display: none; }
}

/* ==========================================================================
   ADMIN · INLINE METRICS EDIT
   ========================================================================== */
.ac-metric-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--muted-2);
  color: var(--fg-2); font-weight: 600;
  font-family: var(--mono); font-size: 12px;
  outline: none;
  width: 52px;
  padding: 0 2px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.ac-metric-input::-webkit-outer-spin-button,
.ac-metric-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ac-metric-input:hover { border-bottom-color: var(--muted); }
.ac-metric-input:focus { border-bottom-color: var(--flame); color: var(--flame); }
.ac-metrics-apply {
  margin-top: 12px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.ac-metrics-apply > .btn { flex: 1; }

.ac-manual-edited {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.ac-manual-edited > .ac-pulled { margin-top: 12px; }
.ac-manual-edited > .ac-manual-edited-btn { flex: 0 0 auto; }
.btn.small { height: 28px; padding: 0 14px; font-size: 11px; }

.ac-toast {
  display: none;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--green-soft-4);
  border: 1px solid var(--green-bd-3);
  color: var(--green);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em;
}
.ac-toast.visible { display: block; animation: ac-toast-in 240ms ease; }
@keyframes ac-toast-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ac.archived { opacity: 0.85; }
.ac.archived .ac-name { color: var(--muted); }

/* Источник цены — статус «откуда подтянулось» */
.ac-pulled {
  margin-top: 12px;
  padding: 6px 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid var(--line-2);
  display: inline-block;
}
.ac-pulled.ok     { color: var(--green); border-color: var(--green-bd-2); background: var(--green-soft-2); }
.ac-pulled.manual { color: var(--fg-2); border-color: var(--line-2); }
.ac-pulled.fail   { color: var(--red); border-color: var(--red-bd-2); background: var(--red-soft-2); }

/* Per-card выбор основного / резерв-покупателя Aston */
.ac-buyer-block {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line-2);
  background: var(--tint-soft);
}
.ac-buyer-l {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--fg-2);
  margin-bottom: 18px;
}
.ac-buyer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ac-buyer-field { display: flex; flex-direction: column; gap: 10px; }
.ac-buyer-field > span {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-2);
}
.ac-buyer-input {
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--fg) !important;
  -webkit-text-fill-color: var(--fg);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 8px 30px 8px 10px;
  outline: none;
  width: 100%;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.ac-buyer-input:focus { border-color: var(--flame); }
.ac-buyer-input::placeholder {
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
  opacity: 1;
}

/* ==== Custom buyer combo ==== */
.bc { position: relative; }
/* Нативный <select> прячется на десктопе — там работает кастомный дропдаун */
.bc-native { display: none; }
.bc-toggle {
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px;
  padding: 4px 6px;
}
.bc-toggle:hover { color: var(--fg); }
.bc-options {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0;
  z-index: var(--z-sticky);
  background: var(--surface);
  border: 1px solid var(--line-2);
  max-height: 280px; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.bc-opt {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%;
  background: transparent; border: none; cursor: pointer;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--mono);
}
.bc-opt:last-child { border-bottom: none; }
.bc-opt:hover { background: var(--surface-2); }
.bc-buyer { font-size: 12px; color: var(--fg); font-weight: 600; line-height: 1.3; }
.bc-price { font-size: 11px; color: var(--flame); }
.bc-price.muted { color: var(--muted); }
.bc-opt.no-price { opacity: 0.75; }
.bc-opt.no-price .bc-buyer { color: var(--fg-2); font-weight: 500; }
.bc-empty {
  padding: 14px; font-family: var(--mono); font-size: 11px;
  color: var(--muted); text-align: center;
}

.ac-buyer-status {
  margin-top: 6px;
  font-family: var(--mono); font-size: 12px;
  line-height: 1.45;
}
.ac-buyer-status.muted { color: var(--muted); }
.ac-buyer-status.ok    { color: var(--green); }
.ac-buyer-status.fail  { color: var(--red); }
.ac-buyer-priority-link {
  color: var(--flame); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer;
}
.ac-buyer-priority-link:hover { color: var(--fg); text-decoration-color: var(--flame); }

/* Priority chooser modal */
.priority-modal { max-width: 560px; }
.priority-desc {
  font-family: var(--font); font-size: 13px; line-height: 1.5;
  color: var(--fg-2); margin-bottom: 16px;
}
.priority-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 60vh; overflow-y: auto;
}
.priority-item {
  display: grid; grid-template-columns: 1fr auto;
  gap: 4px 12px; align-items: center;
  background: var(--bg);
  border: 1px solid var(--line-2);
  padding: 12px 14px;
  cursor: pointer;
  font-family: var(--mono);
  text-align: left;
  transition: border-color .15s, background .15s;
}
.priority-item:hover { border-color: var(--flame); background: var(--surface-2); }
.priority-item.current { border-color: var(--flame); background: var(--flame-soft); }
.priority-buyer { font-size: 13px; color: var(--fg); font-weight: 600; }
.priority-price {
  grid-row: 2; grid-column: 1;
  font-size: 11px;
}
.priority-item.has .priority-price { color: var(--green); }
.priority-item.no .priority-price  { color: var(--muted); }
.priority-tick {
  grid-row: 1 / span 2; grid-column: 2;
  font-size: 11px; color: var(--flame); font-weight: 700;
  letter-spacing: 0.05em;
}

.ac-buyer-empty .ac-buyer-empty-msg {
  font-family: var(--font); font-size: 13px; line-height: 1.5;
  color: var(--fg-2);
}
.ac-buyer-empty .ac-buyer-empty-msg::before {
  content: '⚠ ';
  color: var(--flame);
  margin-right: 2px;
}

/* Toggle row под buyer-блоком */
.ac-toggle-row {
  margin-top: 14px;
  padding: 12px 14px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  border: 1px solid var(--line-2);
  background: var(--tint-soft);
}
.ac-toggle-text { flex: 1; }
.ac-toggle-l {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg);
}
.ac-toggle-d {
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  color: var(--fg-2); margin-top: 6px;
}
/* Тумблер в карточке — теперь того же размера, что и в шапке (Синхронизация с Aston) */
.toggle.small {
  width: 56px; height: 32px;
}
.toggle.small::after {
  width: 28px; height: 28px;
}
.ac-buyer-apply {
  margin-top: 10px;
  display: flex; gap: 8px; justify-content: flex-end;
}
.ac-aston.not-pulled {
  color: var(--red); border-top: 1px solid var(--red-bd-3);
}

@media (max-width: 540px) {
  .ac-buyer-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ADMIN · SYNC RESULT MODAL
   ========================================================================== */
.sync-result-modal {
  max-width: 920px; width: 94vw; max-height: 82vh;
  display: flex; flex-direction: column;
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1;
  padding: 8px 10px;
  font-family: var(--mono);
}
.modal-close:hover { color: var(--fg); }

.sync-summary { margin-bottom: 14px; }
.sync-summary-row { display: flex; gap: 24px; flex-wrap: wrap; }
.sync-stat { display: flex; flex-direction: column; gap: 4px; }
.sync-stat-l {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--muted);
}
.sync-stat-v { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--fg); }
.sync-stat-v.ok { color: var(--green); }
.sync-stat-v.fail { color: var(--red); }

.sync-rows {
  overflow-y: auto;
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px;
  min-height: 0;
}
@media (max-width: 900px) {
  .sync-body { grid-template-columns: 1fr; }
  .sync-onboarding { max-height: 280px; }
}
.sync-row {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1.1fr 110px;
  gap: 12px; align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  color: var(--fg-2);
}
.sync-row:last-child { border-bottom: none; }
.sync-row-name { display: flex; flex-direction: column; gap: 2px; }
.sync-row-title { color: var(--fg); font-weight: 600; }
.sync-row-meta { color: var(--muted); font-size: 10px; }
.sync-row-buyer { color: var(--fg-2); font-size: 11px; line-height: 1.3; }
.sync-row-price { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.sync-row-price-main { color: var(--fg); font-weight: 700; }
.sync-row-price-vat { color: var(--muted); font-size: 10px; }
.sync-status { font-weight: 700; font-size: 11px; letter-spacing: 0.05em; text-align: right; }
.sync-status.ok { color: var(--green); }
.sync-status.fail { color: var(--red); }
.sync-row.ok { background: var(--green-soft-3); }
.sync-row.fail { background: var(--red-soft-3); }
.sync-empty { padding: 24px; text-align: center; color: var(--muted); }

@media (max-width: 720px) {
  /* Fullscreen modal: занимает 100vw × 100vh, X в правом верхнем углу */
  .modal-backdrop {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }
  .modal.sync-result-modal {
    max-width: none; width: 100vw; max-height: 100vh; height: 100vh;
    border: none; border-radius: 0;
    padding: 18px;
    overflow-y: auto;
  }
  .modal.sync-result-modal h2 { font-size: 20px; padding-right: 56px; }
  /* На мобайле — большой крестик сверху, нижнюю кнопку «Закрыть» прячем */
  .modal.sync-result-modal .modal-close {
    top: 14px; right: 14px;
    font-size: 28px;
    padding: 10px 14px;
    color: var(--fg);
  }
  .modal.sync-result-modal .modal-actions { display: none; }

  .sync-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name   price"
      "buyer  status";
    row-gap: 6px;
  }
  .sync-row-name { grid-area: name; }
  .sync-row-buyer { grid-area: buyer; }
  .sync-row-price { grid-area: price; }
  .sync-status { grid-area: status; text-align: right; }
}

