/* PacketUP HUB — компоненты и каркас. Только токены из tokens.css, без «сырых» цветов,
   кроме обложек товаров (.cv-*), у которых своя фиксированная палитра. */

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: var(--fs-md)/1.5 var(--font-ui);
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }
code, .nums { font-family: var(--font-num); font-feature-settings: "tnum" 1, "lnum" 1; font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* Иконки PacketUP HUB: сетка 24, обводка 1.7, срезанный правый верхний угол у прямоугольных форм,
   второй тон (.d) — заливка 20 % текущего цвета. */
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i .d { fill: currentColor; stroke: none; opacity: .24; }
svg.i .f { fill: currentColor; stroke: none; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 22px; height: 22px; }
svg.i.xl { width: 40px; height: 40px; stroke-width: 1.4; }
.nav-item[aria-current="page"] svg.i .d { fill: var(--accent-text); opacity: .35; }

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.strong { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.t-success { color: var(--success); }
.t-danger { color: var(--danger); }
.t-warning { color: var(--warning); }
.t-accent { color: var(--accent-text); }

.row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.row.gap-3 { gap: var(--sp-3); } .row.gap-4 { gap: var(--sp-4); }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack.gap-2 { gap: var(--sp-2); } .stack.gap-3 { gap: var(--sp-3); } .stack.gap-6 { gap: var(--sp-6); }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--sp-5); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-side-main { grid-template-columns: 380px minmax(0, 1fr); align-items: start; }

/* ---------- Каркас ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-topbar);
  height: var(--topbar-h); display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-6);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .logo-link { width: calc(var(--sidebar-w) - var(--sp-6)); flex: none; }
.app-admin .topbar .logo-link { width: calc(var(--sidebar-w-admin) - var(--sp-6)); }
/* Логотип: знак (плитка со срезом + угловатая «P» + квадрат-«пакет»), словесный знак, плашка HUB */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text);
  font: 700 17px/1 var(--font-display); letter-spacing: -.025em; }
.logo:hover { text-decoration: none; }
.logo .mark { flex: none; filter: drop-shadow(0 4px 14px var(--accent-glow)); }
.logo .wm { display: inline-flex; align-items: center; gap: 7px; }
.logo .hub { background: linear-gradient(135deg, var(--accent-hover), var(--accent)); color: var(--text-on-accent);
  padding: 5px 8px 6px 7px; font-size: 14px; letter-spacing: .04em; border-radius: 4px 0 4px 4px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.logo .env { font: 600 10px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--border-strong); padding: 3px 6px; border-radius: 5px; margin-left: 6px; }
.topbar .search { flex: 1; max-width: 520px; }
.topbar .tools { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }

.balance-chip { display: inline-flex; align-items: center; gap: var(--sp-3); height: 40px; padding: 0 4px 0 14px;
  border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border); }
.balance-chip .v { font: 600 var(--fs-md) var(--font-num); }
.balance-chip .l { font-size: var(--fs-xs); color: var(--text-faint); }
.balance-chip .btn { height: 32px; border-radius: var(--r-full); padding: 0 12px; }

.user-chip { display: inline-flex; align-items: center; gap: var(--sp-2); height: 40px; padding: 0 10px 0 4px;
  border-radius: var(--r-full); color: var(--text); cursor: pointer; }
.user-chip:hover { background: var(--surface-2); text-decoration: none; }
.user-chip .who { line-height: 1.15; }
.user-chip .who b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.user-chip .who span { font-size: var(--fs-xs); color: var(--text-faint); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent-text); font: 600 12px var(--font-ui); }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h)); }
.app-admin .shell { grid-template-columns: var(--sidebar-w-admin) minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--border); padding: var(--sp-4) var(--sp-3); position: sticky;
  top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; display: flex; flex-direction: column; }
.nav-group { margin-top: var(--sp-5); }
.nav-group:first-child { margin-top: 0; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint);
  padding: 0 var(--sp-3) var(--sp-2); }
.nav-item { display: flex; align-items: center; gap: var(--sp-3); height: 38px; padding: 0 var(--sp-3);
  border-radius: var(--r-md); color: var(--text-muted); font-weight: 500; position: relative; white-space: nowrap; }
.nav-item > span:not(.count) { overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.nav-item[aria-current="page"] svg { color: var(--accent-text); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent-hover); }
.nav-item .count { margin-left: auto; font: 600 11px var(--font-num); padding: 2px 7px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-muted); }
.nav-item .count.hot { background: var(--warning-soft); color: var(--warning); }
.sidebar .foot { margin-top: auto; padding: var(--sp-3); font-size: var(--fs-xs); color: var(--text-faint); }
.app-admin .nav-item { height: 34px; }

.content { padding: var(--sp-6) var(--sp-8) var(--sp-12); min-width: 0; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.page-title { font: 600 var(--fs-2xl)/1.2 var(--font-display); letter-spacing: -.02em; }
.page-sub { color: var(--text-muted); margin-top: var(--sp-1); }
.crumbs { display: flex; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-faint); margin-bottom: var(--sp-2); }
.crumbs a { color: var(--text-muted); }
.section-title { font: 600 var(--fs-lg)/1.3 var(--font-ui); }
.section-title.display { font: 600 var(--fs-lg)/1.3 var(--font-display); letter-spacing: -.01em; }

/* ---------- Карточки ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: var(--sp-5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: var(--fs-md); font-weight: 600; }
.card-body { padding: var(--sp-5); }
.card-foot { padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); }
.card.glow { background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); }

.stat { padding: var(--sp-4) var(--sp-5); }
.stat .l { color: var(--text-muted); font-size: var(--fs-sm); display: flex; align-items: center; gap: var(--sp-2); }
.stat .v { font: 600 var(--fs-xl)/1.3 var(--font-display); letter-spacing: -.02em; margin-top: var(--sp-1); }
.stat .d { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 2px; }
.stat.alert { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }
.stat.alert .v { color: var(--warning); }

.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Кнопки ---------- */
.btn { appearance: none; border: 0; margin: 0; font: inherit; cursor: pointer; text-decoration: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); white-space: nowrap;
  height: var(--control-h); padding: 0 var(--sp-4); border-radius: var(--r-md);
  font-weight: 600; font-size: var(--fs-md); color: var(--text);
  transition: background var(--dur-fast), box-shadow var(--dur-fast), color var(--dur-fast), transform 50ms; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--accent-hover), var(--accent)); color: var(--text-on-accent);
  box-shadow: 0 6px 20px -8px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-secondary { background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-strong) inset; }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.btn-success { background: var(--success-soft); color: var(--success); }
.btn-success:hover { background: color-mix(in srgb, var(--success) 22%, transparent); }
.btn-sm { height: var(--control-h-sm); padding: 0 var(--sp-3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-lg { height: var(--control-h-lg); padding: 0 var(--sp-6); font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn-icon { width: var(--control-h); padding: 0; }
.btn-icon.btn-sm { width: var(--control-h-sm); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
.label .req { color: var(--accent-text); }
.input, .select, .textarea { appearance: none; font: inherit; color: var(--text); width: 100%;
  height: var(--control-h); padding: 0 var(--sp-3); border-radius: var(--r-md); border: 0;
  background: var(--bg); box-shadow: 0 0 0 1px var(--border-strong) inset;
  transition: box-shadow var(--dur-fast); }
.card .input, .card .select, .card .textarea, .drawer .input, .modal .input { background: var(--bg); }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: 0 0 0 1px var(--accent-text) inset, 0 0 0 4px var(--accent-soft); }
.input.is-invalid { box-shadow: 0 0 0 1px var(--danger) inset; }
.input.is-valid { box-shadow: 0 0 0 1px var(--success) inset; }
.input.nums { font-family: var(--font-num); }
.input-lg { height: var(--control-h-lg); font-size: var(--fs-lg); }
.input-sm { height: var(--control-h-sm); font-size: var(--fs-sm); }
.select { padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%), linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.textarea { height: auto; min-height: 88px; padding: var(--sp-2) var(--sp-3); resize: vertical; }
.hint { font-size: var(--fs-xs); color: var(--text-faint); }
.hint.err { color: var(--danger); } .hint.ok { color: var(--success); } .hint.warn { color: var(--warning); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 12px; color: var(--text-faint); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap .kbd { position: absolute; right: 10px; }
.input-group { display: flex; }
.input-group > .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; height: auto; }
.input-group > .addon { display: flex; align-items: center; padding: 0 var(--sp-3); color: var(--text-muted);
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-strong) inset; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: var(--fs-sm); }
.kbd { font: 500 11px var(--font-num); color: var(--text-faint); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; padding: 1px 6px; border-radius: 5px; }

.check { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); }
.check input { appearance: none; width: 16px; height: 16px; margin: 0; border-radius: 4px; flex: none; cursor: pointer;
  box-shadow: 0 0 0 1px var(--border-strong) inset; background: var(--bg); display: grid; place-items: center; }
.check input:checked { background: var(--accent); box-shadow: none; }
.check input:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0;
  transform: translateY(-1px) rotate(-45deg); }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: #fff; transform: none; }

.switch { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--border-strong) inset; position: relative; cursor: pointer; margin: 0; flex: none;
  transition: background var(--dur-fast); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-muted); transition: transform var(--dur-fast), background var(--dur-fast); }
.switch:checked { background: var(--accent); box-shadow: none; }
.switch:checked::after { transform: translateX(14px); background: #fff; }

/* Сегменты и табы */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg > button, .seg > a { appearance: none; border: 0; background: none; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 7px;
  color: var(--text-muted); font-weight: 500; font-size: var(--fs-sm); text-decoration: none; }
.seg > [aria-pressed="true"], .seg > [aria-current="true"] { background: var(--surface-3); color: var(--text); }
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); }
.tab { appearance: none; border: 0; background: none; font: inherit; cursor: pointer; padding: 10px var(--sp-3);
  color: var(--text-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: var(--sp-2); }
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent-hover); }
.tab .count { font: 600 11px var(--font-num); padding: 1px 6px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-muted); }
.tab[aria-selected="true"] .count { background: var(--accent-soft); color: var(--accent-text); }

.chip { appearance: none; border: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: 500;
  background: var(--surface); color: var(--text-muted); box-shadow: 0 0 0 1px var(--border) inset; }
.chip:hover { color: var(--text); box-shadow: 0 0 0 1px var(--border-strong) inset; }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-text) 45%, transparent) inset; }
.chip .x { color: var(--text-faint); }

/* Выбор номинала */
.denoms { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.denom { appearance: none; border: 0; font: inherit; cursor: pointer; text-align: left; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg); box-shadow: 0 0 0 1px var(--border-strong) inset; color: var(--text); }
.denom b { display: block; font-weight: 600; }
.denom span { font: 500 var(--fs-sm) var(--font-num); color: var(--text-muted); }
.denom:hover { box-shadow: 0 0 0 1px var(--text-faint) inset; }
.denom[aria-pressed="true"] { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent-text) inset; }
.denom[disabled] { opacity: .45; cursor: not-allowed; }

.stepper { display: inline-flex; align-items: center; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--border-strong) inset; background: var(--bg); }
.stepper button { appearance: none; border: 0; background: none; color: var(--text-muted); width: 38px; height: 38px; cursor: pointer; font-size: 18px; }
.stepper button:hover { color: var(--text); }
.stepper input { appearance: none; border: 0; background: none; color: var(--text); width: 72px; text-align: center; font: 600 var(--fs-md) var(--font-num); }
.stepper input:focus { outline: none; }

/* ---------- Бейджи статусов ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pulse::before { animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.b-ok   { background: var(--success-soft); color: var(--success); }
.b-warn { background: var(--warning-soft); color: var(--warning); }
.b-err  { background: var(--danger-soft);  color: var(--danger); }
.b-info { background: var(--info-soft);    color: var(--info); }
.b-acc  { background: var(--accent-soft);  color: var(--accent-text); }
.b-mut  { background: var(--surface-3);    color: var(--text-muted); }
.b-outline { background: transparent; box-shadow: 0 0 0 1px var(--border-strong) inset; color: var(--text-muted); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font: 600 11px var(--font-num);
  background: var(--surface-3); color: var(--text-muted); letter-spacing: .02em; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th { text-align: left; font-weight: 500; font-size: var(--fs-xs); color: var(--text-faint); white-space: nowrap;
  padding: 10px var(--sp-4); border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; }
.table td { padding: 12px var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr.is-selected td { background: var(--accent-soft); }
.table tr.is-open td { background: var(--surface-2); border-bottom-color: transparent; }
.table tr.detail td { background: var(--surface-2); padding-top: 0; }
.table .num { text-align: right; font-family: var(--font-num); white-space: nowrap; }
.table .cb { width: 40px; padding-right: 0; }
.table .act { width: 1%; white-space: nowrap; text-align: right; }
.table .sub { display: block; font-size: var(--fs-xs); color: var(--text-faint); }
.table-dense td { padding: 8px var(--sp-3); }
.table-dense th { padding: 8px var(--sp-3); }
.table a.id { font-family: var(--font-num); font-weight: 600; }
.prod-cell { display: flex; align-items: center; gap: var(--sp-3); }
.table .prod-cell { white-space: nowrap; }
.page-head > .row, .page-head > .seg { flex: none; flex-wrap: nowrap; }
.prod-cell .thumb { width: 36px; height: 36px; border-radius: 8px; flex: none; }

.toolbar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.toolbar .input-wrap { width: 300px; }
.toolbar .select { width: auto; }
.bulkbar { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4);
  background: var(--accent-soft); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.pager { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- Коды ---------- */
.code { display: inline-flex; align-items: center; gap: var(--sp-2); font: 500 var(--fs-sm) var(--font-num); letter-spacing: .04em;
  background: var(--surface-2); padding: 4px 10px; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--border) inset; white-space: nowrap; }
.code.masked { color: var(--text-faint); }
.code.lg { font-size: var(--fs-lg); padding: 8px 14px; }
.copy { appearance: none; border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.copy:hover { color: var(--text); background: var(--surface-3); }
.copy.done { color: var(--success); }
.hash { font: 500 var(--fs-xs) var(--font-num); color: var(--text-muted); }

/* ---------- Алерты ---------- */
.alert { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); font-size: var(--fs-sm);
  background: var(--surface-2); border: 1px solid var(--border); }
.alert > svg { margin-top: 1px; }
.alert b { font-weight: 600; }
.alert .grow > * + * { margin-top: 2px; }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert-info > svg { color: var(--info); }
.alert-warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.alert-warn > svg { color: var(--warning); }
.alert-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.alert-danger > svg { color: var(--danger); }
.alert-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.alert-success > svg { color: var(--success); }
.alert-accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent-text) 30%, transparent); }
.alert-accent > svg { color: var(--accent-text); }

/* ---------- Пустые состояния, загрузка, ошибки ---------- */
.empty { text-align: center; padding: var(--sp-12) var(--sp-6); display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); }
.empty .ic.err { background: var(--danger-soft); color: var(--danger); }
.empty h3 { font: 600 var(--fs-lg) var(--font-ui); }
.empty p { color: var(--text-muted); max-width: 420px; }

/* ---------- Каталог ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: var(--sp-4); }
.pc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur), box-shadow var(--dur); display: flex; flex-direction: column; }
.pc:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent-text) 45%, var(--border));
  box-shadow: 0 14px 32px -14px var(--accent-glow); }
.pc.is-out { opacity: .6; }
.pc .body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.pc .name { font-weight: 600; line-height: 1.3; }
.pc .meta { color: var(--text-faint); font-size: var(--fs-xs); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.pc .foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.price { font: 600 var(--fs-lg) var(--font-num); letter-spacing: -.01em; }
.price small { color: var(--text-faint); font-size: var(--fs-xs); font-weight: 500; }
.price .from { font: 500 var(--fs-xs) var(--font-ui); color: var(--text-faint); display: block; letter-spacing: 0; }

.cover { position: relative; height: 128px; display: flex; align-items: flex-end; padding: 12px 14px; overflow: hidden;
  color: #fff; font: 700 21px/1.05 var(--font-display); letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.35)); }
.cover > * { position: relative; z-index: 1; }
.cover .kind { position: absolute; top: 10px; left: 10px; font: 600 10px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px); padding: 5px 7px; border-radius: 6px; text-shadow: none; }
.cover .region { position: absolute; top: 10px; right: 10px; font: 600 10px/1 var(--font-num); background: rgba(255,255,255,.18);
  padding: 5px 6px; border-radius: 6px; text-shadow: none; }
.cover.sm { height: 72px; font-size: 16px; padding: 10px 12px; }
.cover.lg { height: 148px; font-size: 26px; border-radius: var(--r-lg); }
/* Фирменные градиенты обложек: выбираются по хэшу бренда, если у товара нет картинки */
.cv-1 { background: radial-gradient(circle at 82% 18%, #E9A24A 0, transparent 46%), linear-gradient(135deg, #3A2210, #7A3E12); }
.cv-2 { background: radial-gradient(circle at 20% 28%, #4FB3FF 0, transparent 46%), linear-gradient(135deg, #0C1D3A, #1B3F78); }
.cv-3 { background: radial-gradient(circle at 76% 72%, #A46CFF 0, transparent 46%), linear-gradient(135deg, #1C0F33, #43207A); }
.cv-4 { background: radial-gradient(circle at 28% 76%, #38D39F 0, transparent 46%), linear-gradient(135deg, #0B2A22, #13574A); }
.cv-5 { background: radial-gradient(circle at 78% 26%, #FF6A88 0, transparent 46%), linear-gradient(135deg, #3A0C1A, #7D2336); }
.cv-6 { background: radial-gradient(circle at 24% 24%, #FFD25E 0, transparent 44%), linear-gradient(135deg, #2B2410, #5E4A12); }
.cv-7 { background: radial-gradient(circle at 70% 76%, #5EE1FF 0, transparent 46%), linear-gradient(135deg, #0A2530, #0F4C5E); }
.cv-8 { background: radial-gradient(circle at 26% 70%, #C0C6D0 0, transparent 46%), linear-gradient(135deg, #1A1D22, #3A404A); }

.filters { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.filters .sep { width: 1px; height: 22px; background: var(--border); margin: 0 var(--sp-1); }

/* ---------- Drawer и модальные окна ---------- */
.scrim { position: fixed; inset: 0; background: var(--overlay); z-index: var(--z-drawer); backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: var(--drawer-w); max-width: 100vw; z-index: calc(var(--z-drawer) + 1);
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); }
.drawer-head h2 { font: 600 var(--fs-lg) var(--font-ui); }
.drawer-body { padding: var(--sp-5); overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: var(--sp-5); }
.drawer-foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); background: var(--surface); }
.drawer.wide { width: 640px; }

.modal-wrap { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--sp-6); background: var(--overlay); backdrop-filter: blur(2px); }
.modal { width: 520px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.modal-head { padding: var(--sp-5) var(--sp-6) 0; display: flex; justify-content: space-between; gap: var(--sp-4); }
.modal-head h2 { font: 600 var(--fs-xl) var(--font-display); letter-spacing: -.01em; }
.modal-body { padding: var(--sp-4) var(--sp-6) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.modal-foot { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--sp-2); }

.summary { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.summary .line { display: flex; justify-content: space-between; gap: var(--sp-4); }
.summary .line span:last-child { font-family: var(--font-num); }
.summary .total { font-size: var(--fs-lg); font-weight: 600; padding-top: var(--sp-2); margin-top: var(--sp-1); border-top: 1px dashed var(--border-strong); }

/* ---------- Таймлайн ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--sp-4) 28px; font-size: var(--fs-sm); }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--surface); display: grid; place-items: center; }
.timeline .dot.ok { background: var(--success); }
.timeline .dot.warn { background: var(--warning); }
.timeline .dot.err { background: var(--danger); }
.timeline .dot.now { background: var(--info); animation: pulse 1.4s infinite; }
.timeline .dot svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3; }
.timeline .when { color: var(--text-faint); font-size: var(--fs-xs); font-family: var(--font-num); }
.timeline .what { font-weight: 500; }
.timeline .more { color: var(--text-muted); margin-top: 2px; }

/* ---------- Пополнение USDT ---------- */
.invoice-amount { font: 600 36px/1.1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.invoice-amount .uniq { color: var(--accent-text); background: var(--accent-soft); border-radius: 6px; padding: 0 2px; }
.invoice-amount .cur { font-size: var(--fs-xl); color: var(--text-muted); font-weight: 500; margin-left: var(--sp-2); }
.addr { display: flex; align-items: center; gap: var(--sp-2); padding: 10px 12px; border-radius: var(--r-md); background: var(--bg);
  box-shadow: 0 0 0 1px var(--border-strong) inset; font: 500 var(--fs-md) var(--font-num); overflow-wrap: anywhere; }
.qr { width: 168px; height: 168px; padding: 10px; background: #fff; border-radius: var(--r-md); flex: none; }
.timer { --p: 0.8; width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent-text) calc(var(--p) * 360deg), var(--surface-3) 0); }
.timer > div { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  font: 600 var(--fs-md) var(--font-num); }
.timer.low { background: conic-gradient(var(--warning) calc(var(--p) * 360deg), var(--surface-3) 0); }
.steps { display: flex; gap: var(--sp-2); counter-reset: s; }
.steps li { list-style: none; flex: 1; display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-faint); }
.steps li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 600 11px var(--font-num); background: var(--surface-3); color: var(--text-muted); flex: none; }
.steps li.done::before { content: "✓"; background: var(--success-soft); color: var(--success); }
.steps li.cur { color: var(--text); font-weight: 500; }
.steps li.cur::before { background: var(--accent); color: #fff; }
.steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent-text); border-radius: inherit; }
.progress.ok > span { background: var(--success); }
.progress.warn > span { background: var(--warning); }
.progress.err > span { background: var(--danger); }

/* ---------- Вход ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-8);
  background: radial-gradient(60% 50% at 50% 0%, var(--accent-soft), transparent 70%), radial-gradient(40% 40% at 90% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--bg); }
.auth-card { width: 420px; max-width: 100%; }
.auth-card .card { padding: var(--sp-8); }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-8); }
.auth h1 { font: 600 var(--fs-2xl)/1.2 var(--font-display); letter-spacing: -.02em; }
.otp { display: flex; gap: var(--sp-2); justify-content: space-between; }
.otp input { width: 52px; height: 60px; text-align: center; font: 600 24px var(--font-num); padding: 0; }
.otp .gap { width: 8px; }
.auth-foot { text-align: center; color: var(--text-faint); font-size: var(--fs-xs); margin-top: var(--sp-6); }

/* ---------- Админка: плотнее и сдержаннее ---------- */
.app-admin { --control-h: 34px; }
.app-admin .content { padding: var(--sp-5) var(--sp-6) var(--sp-10); max-width: none; }
.app-admin .page-title { font-size: var(--fs-xl); }
.app-admin .page-head { margin-bottom: var(--sp-5); }
.app-admin .table td { padding: 9px var(--sp-3); }
.app-admin .table th { padding: 8px var(--sp-3); }
.app-admin .card-head { padding: var(--sp-3) var(--sp-4); }
.app-admin .card-body { padding: var(--sp-4); }
.margin-bar { display: inline-block; width: 48px; height: 4px; border-radius: 2px; background: var(--surface-3); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.margin-bar > span { display: block; height: 100%; background: var(--success); }
.split { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.queue-item { display: block; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); color: var(--text); cursor: pointer; }
.queue-item:hover { background: var(--surface-2); text-decoration: none; }
.queue-item[aria-current="true"] { background: var(--accent-soft); box-shadow: 3px 0 0 var(--accent-hover) inset; }
.log { font: 400 var(--fs-xs)/1.6 var(--font-code); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4); white-space: pre-wrap; overflow-x: auto; color: var(--text-muted); margin: 0; }
.log .k { color: var(--accent-text); } .log .ok { color: var(--success); } .log .err { color: var(--danger); } .log .warn { color: var(--warning); }
.diff-old { background: var(--danger-soft); color: var(--danger); padding: 0 4px; border-radius: 4px; text-decoration: line-through; }
.diff-new { background: var(--success-soft); color: var(--success); padding: 0 4px; border-radius: 4px; }

/* ---------- Тосты ---------- */
.toasts { position: fixed; right: var(--sp-6); bottom: var(--sp-6); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--sp-2); }
.toast { display: flex; gap: var(--sp-3); align-items: flex-start; width: 360px; padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-md);
  font-size: var(--fs-sm); animation: toast-in .42s var(--ease-out, ease) backwards; }
.toast > svg { color: var(--success); margin-top: 1px; }
.toast.err > svg { color: var(--danger); }
@keyframes toast-in { from { transform: translateX(24px) scale(.97); opacity: 0; } }

/* ---------- Панель состояний макета (только в design/, не для продакшена) ---------- */
.mock-states { position: fixed; left: 12px; bottom: 12px; z-index: 100;
  display: flex; align-items: center; gap: 4px; padding: 5px 5px 5px 12px; border-radius: 999px;
  background: #0B0909; color: #CFC4C1; border: 1px dashed #5A4E4E; font: 500 12px var(--font-ui); box-shadow: 0 10px 30px rgba(0,0,0,.4);
  white-space: nowrap; max-width: calc(100vw - 32px); overflow-x: auto; }
.mock-states button { appearance: none; border: 0; font: inherit; cursor: pointer; padding: 5px 10px; border-radius: 999px; background: none; color: #A79A97; }
.mock-states button[aria-pressed="true"] { background: #3A2E2E; color: #fff; }

/* ---------- Статусы PacketUP HUB ----------
   Ярлык со срезанным углом: плитка-иконка цвета статуса + подпись на мягком градиенте.
   Разметка: <span class="st st-ok">Выполнен</span>; иконку и прогресс добавляет app.js,
   в templ это компонент Status(kind, label, done, total). */
.st { --c: var(--text-muted); display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 4px;
  font: 600 12px/1 var(--font-ui); letter-spacing: .01em; white-space: nowrap; color: var(--c);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 17%, transparent), color-mix(in srgb, var(--c) 5%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent);
  border-radius: 6px 0 6px 6px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.st-ic { width: 18px; height: 18px; flex: none; display: grid; place-items: center; color: var(--bg); background: var(--c);
  border-radius: 4px 0 4px 4px; clip-path: polygon(0 0, calc(100% - var(--cut-sm)) 0, 100% var(--cut-sm), 100% 100%, 0 100%); }
.st-ic svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.st-ic svg .f { fill: currentColor; stroke: none; }
.st-proc .st-ic svg { animation: spin 1s linear infinite; }
.st-bar { width: 30px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--c) 22%, transparent); overflow: hidden; }
.st-bar > span { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.st-n { font: 700 11px var(--font-num); font-feature-settings: "tnum" 1; opacity: .85; }
.st-ok     { --c: var(--success); }
.st-proc   { --c: var(--info); }
.st-wait   { --c: var(--info); }
.st-review { --c: var(--warning); }
.st-part   { --c: var(--accent-text); }
.st-err    { --c: var(--danger); }
.st-mut    { --c: var(--text-faint); }
.st.lg { height: 30px; font-size: 13px; padding-right: 13px; }
.st.lg .st-ic { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Загрузка: три точки «жидко» сливаются в полоску и расходятся обратно ----------
   Слияние даёт SVG-фильтр #ph-goo (размытие + порог альфы, вставляет app.js),
   движение — только transform, поэтому без рывков. Цикл 2.4 с, у каждой фазы есть пауза. */
.loader { --d: 15px; --b: 8.5px; --s: 8px; position: relative; display: inline-block; width: 60px; height: 22px;
  color: var(--accent-text); filter: url(#ph-goo); }
.loader i { position: absolute; top: 50%; left: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 99px; background: currentColor; will-change: transform; animation: 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
.loader i:nth-child(1) { animation-name: ph-l; }
.loader i:nth-child(2) { animation-name: ph-m; }
.loader i:nth-child(3) { animation-name: ph-r; }
@keyframes ph-l {
  0%, 12%   { transform: translateX(calc(var(--d) * -1)) scale(1); }
  42%, 58%  { transform: translateX(calc(var(--b) * -1)) scale(1.95, .72); }
  88%, 100% { transform: translateX(calc(var(--d) * -1)) scale(1); }
}
@keyframes ph-m {
  0%, 12%   { transform: translateY(0) scale(1); }
  27%       { transform: translateY(-2px) scale(1.1); }
  42%, 58%  { transform: translateY(0) scale(1.95, .72); }
  88%, 100% { transform: translateY(0) scale(1); }
}
@keyframes ph-r {
  0%, 12%   { transform: translateX(var(--d)) scale(1); }
  42%, 58%  { transform: translateX(var(--b)) scale(1.95, .72); }
  88%, 100% { transform: translateX(var(--d)) scale(1); }
}
.loader.sm { --d: 11px; --b: 6.5px; --s: 6px; width: 44px; height: 18px; }
.loader.lg { --d: 22px; --b: 12.5px; --s: 12px; width: 88px; height: 30px; }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4);
  padding: var(--sp-12) var(--sp-6); color: var(--text-muted); font-size: var(--fs-sm); }
.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading .loader { position: absolute; inset: 0; margin: auto; color: var(--text-on-accent); }
.btn-secondary.is-loading .loader, .btn-ghost.is-loading .loader { color: var(--text); }

/* ---------- Каталог: категории ---------- */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); margin-bottom: var(--sp-8); }
.cat { position: relative; display: flex; flex-direction: column; min-height: 300px; overflow: hidden; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl) 0 var(--r-xl) var(--r-xl);
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%);
  transition: transform var(--dur) var(--ease), border-color var(--dur), box-shadow var(--dur); }
.cat:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent-text) 45%, var(--border));
  box-shadow: 0 20px 44px -20px var(--accent-glow); }
.cat .art { position: relative; height: 168px; overflow: hidden; }
.cat .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--surface)); }
.cat .art .big { position: absolute; left: 22px; top: 22px; width: 56px; height: 56px; display: grid; place-items: center;
  color: #fff; background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border-radius: 12px 0 12px 12px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); z-index: 1; }
.cat .art .big svg.i { width: 30px; height: 30px; stroke-width: 1.6; }
.cat .art .big svg.i .d { opacity: .35; }
.cat .tiles { position: absolute; right: -6px; top: 26px; display: flex; gap: 10px; transform: rotate(-8deg); }
.cat .tiles span { width: 74px; height: 96px; border-radius: 10px 0 10px 10px; box-shadow: 0 12px 26px rgba(0,0,0,.35);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); display: flex; align-items: flex-end; padding: 8px;
  color: #fff; font: 700 13px/1 var(--font-display); }
.cat .tiles span:nth-child(2) { transform: translateY(18px); }
.cat .body { padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; position: relative; }
.cat .title { font: 600 var(--fs-xl)/1.2 var(--font-display); letter-spacing: -.02em; }
.cat .desc { color: var(--text-muted); font-size: var(--fs-sm); }
.cat .foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.cat .count { font: 700 var(--fs-sm) var(--font-num); color: var(--text-muted); }
.cat .go { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px 0 8px 8px; background: var(--surface-2);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); transition: background var(--dur); }
.cat:hover .go { background: var(--accent); color: #fff; }
.art-gift  { background: radial-gradient(circle at 85% 20%, #A46CFF 0, transparent 50%), radial-gradient(circle at 20% 90%, #4FB3FF 0, transparent 45%), linear-gradient(135deg, #1C0F33, #2A1A4A); }
.art-keys  { background: radial-gradient(circle at 80% 30%, #4FB3FF 0, transparent 50%), radial-gradient(circle at 15% 85%, #5EE1FF 0, transparent 40%), linear-gradient(135deg, #0C1D3A, #10294F); }
.art-topup { background: radial-gradient(circle at 80% 25%, #FF6A88 0, transparent 48%), radial-gradient(circle at 20% 85%, #E9A24A 0, transparent 44%), linear-gradient(135deg, #3A0C1A, #5A1A2A); }

/* Переключатель категорий над списком товаров и разделы заказов */
.cat-switch { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.cat-switch a, .cat-switch button { appearance: none; border: 0; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; color: var(--text-muted);
  font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); border-radius: 10px 0 10px 10px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cat-switch a:hover, .cat-switch button:hover { color: var(--text); text-decoration: none; }
.cat-switch [aria-current="true"] { color: var(--text); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 40%, transparent); }
.cat-switch [aria-current="true"] svg { color: var(--accent-text); }
.cat-switch .n { font: 700 11px var(--font-num); color: var(--text-faint); }

[data-view="table"] .products, [data-view="grid"] .products-table { display: none; }

/* =====================================================================
   Движение PacketUP HUB
   Принципы: появляется — снизу вверх с замедлением (--ease-out), исчезает — быстрее (--ease-in);
   группы — каскадом с шагом --stagger; «щелчки» (галочка, копирование) — пружиной;
   двигаем только transform и opacity. При prefers-reduced-motion всё отключается.
   ===================================================================== */
@property --p { syntax: "<number>"; inherits: true; initial-value: 1; }

@keyframes ph-in      { from { opacity: 0; transform: translateY(12px); } }
@keyframes ph-in-x    { from { opacity: 0; transform: translateX(-6px); } }
@keyframes ph-fade    { from { opacity: 0; } }
@keyframes ph-fade-out { to { opacity: 0; } }
@keyframes ph-pop     { from { opacity: 0; transform: translateY(14px) scale(.965); } }
@keyframes ph-pop-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes ph-slide   { from { transform: translateX(32px); opacity: 0; } }
@keyframes ph-slide-out { to { transform: translateX(32px); opacity: 0; } }
@keyframes ph-click   { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes ph-grow-x  { from { transform: scaleX(0); } }
@keyframes ph-grow-y  { from { transform: scaleY(0); } }
@keyframes ph-draw    { from { stroke-dashoffset: var(--len, 30); } to { stroke-dashoffset: 0; } }
@keyframes ph-float   { from { transform: translateY(0); } to { transform: translateY(-7px); } }
@keyframes ph-glow    { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); } 50% { box-shadow: 0 0 0 6px transparent; } }
@keyframes ph-shine   { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
@keyframes ph-indet   { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes ph-toast-out { to { opacity: 0; transform: translateX(24px); } }

/* Появление страницы: блоки контента каскадом */
.content > :not(.layer, .modal-wrap, .toasts), .auth-card { animation: ph-in var(--dur-slow) var(--ease-out) backwards; }
.content > :nth-child(2) { animation-delay: calc(var(--stagger) * 1); }
.content > :nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
.content > :nth-child(4) { animation-delay: calc(var(--stagger) * 3); }
.content > :nth-child(5) { animation-delay: calc(var(--stagger) * 4); }
.content > :nth-child(n+6) { animation-delay: calc(var(--stagger) * 5); }

/* Сетки карточек: каскад по элементам (индекс --i ставит app.js) */
.products > *, .cats > *, .grid > .card, .screens > *, .denoms > *, .cat-switch > *, .queue-item {
  animation: ph-in var(--dur-slow) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * var(--stagger)); }
.table tbody tr { animation: ph-fade var(--dur-slow) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
.timeline li { animation: ph-in-x var(--dur-slow) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.timeline .dot { animation: ph-click .5s var(--ease-spring) backwards; animation-delay: calc(var(--i, 0) * 70ms + 160ms); }

/* Блок, который появился при смене состояния (app.js ставит .ph-appear) */
.ph-appear { animation: ph-in var(--dur-slow) var(--ease-out) backwards !important; animation-delay: 0s !important; }

/* Окна: модалка выпрыгивает из центра, drawer выезжает справа, фон проявляется */
.layer:not([hidden]) .scrim, .modal-wrap:not([hidden]) { animation: ph-fade .28s var(--ease-out) backwards; }
.layer:not([hidden]) .drawer { animation: ph-slide .42s var(--ease-out) backwards; }
.modal-wrap:not([hidden]) .modal { animation: ph-pop .42s var(--ease-out) backwards; }
.layer.is-closing .scrim, .modal-wrap.is-closing { animation: ph-fade-out .2s var(--ease-in) both; }
.layer.is-closing .drawer { animation: ph-slide-out .2s var(--ease-in) both; }
.modal-wrap.is-closing .modal { animation: ph-pop-out .2s var(--ease-in) both; }

/* Кнопки: подъём, блик на основной, нажатие */
.btn { transition: background var(--dur), box-shadow var(--dur), color var(--dur), transform .18s var(--ease-out); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: 60ms; }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transform: translateX(-120%) skewX(-20deg); }
.btn-primary:hover::before { animation: ph-shine .9s var(--ease-out); }
.btn-primary:hover { box-shadow: 0 10px 28px -8px var(--accent-glow); }

/* Мелкие переходы у переключателей */
.seg > button, .chip, .tab, .denom, .nav-item, .cat-switch a, .queue-item, .copy, .input, .select, .textarea, .switch, .check input {
  transition: background var(--dur) var(--ease), color var(--dur), box-shadow var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out); }
.denom:hover:not([disabled]) { transform: translateY(-2px); }
.denom[aria-pressed="true"] { animation: ph-click .35s var(--ease-spring); }
.chip:active, .seg > button:active { transform: scale(.96); }
.nav-item[aria-current="page"]::before { animation: ph-grow-y .4s var(--ease-out) backwards; transform-origin: center; }
.nav-item:hover svg.i { transform: translateX(1px) scale(1.06); transition: transform var(--dur) var(--ease-out); }
.switch::after { transition: transform .28s var(--ease-spring), background var(--dur); }

/* Статусы: подпись въезжает, иконка «щёлкает», галочка рисуется */
.st { animation: ph-in-x .4s var(--ease-out) backwards; }
.st-ic { animation: ph-click .45s var(--ease-spring) .08s backwards; }
.st-ok .st-ic path { stroke-dasharray: 22; animation: ph-draw .5s var(--ease-out) .2s backwards; --len: 22; }
.st-bar > span, .progress > span { transform-origin: left; animation: ph-grow-x 1s var(--ease-out) .15s backwards; }
.progress.indet { position: relative; }
.progress.indet > span { width: 40% !important; animation: ph-indet 1.4s var(--ease) infinite; }

/* Копирование: иконка подпрыгивает зелёным */
.copy.done svg, [data-copy].done svg { animation: ph-click .45s var(--ease-spring); color: var(--success); }

/* Таймер счёта: кольцо убывает плавно, а не скачками раз в секунду */
.timer { transition: --p 1s linear; }

/* Карточки категорий: плитки-обложки медленно «дышат», при наведении расходятся */
.cat .tiles span { animation: ph-float 3.6s ease-in-out infinite alternate; transition: transform .5s var(--ease-out); }
.cat .tiles span:nth-child(2) { animation-delay: -1.2s; }
.cat .tiles span:nth-child(3) { animation-delay: -2.4s; }
.cat:hover .tiles { transform: rotate(-4deg) translateX(-6px); }
.cat .tiles { transition: transform .6s var(--ease-out); }
.cat .art .big { transition: transform .5s var(--ease-spring); }
.cat:hover .art .big { transform: scale(1.08) rotate(-4deg); }
.cat .go svg { transition: transform .3s var(--ease-out); }
.cat:hover .go svg { transform: translateX(3px); }
.pc .cover { transition: filter .4s var(--ease-out); }
.pc:hover .cover { filter: saturate(1.25) brightness(1.08); }

/* Уникальный хвост суммы счёта подсвечивается, чтобы на него обратили внимание */
.invoice-amount .uniq { animation: ph-glow 2.4s var(--ease) 0.6s 3; border-radius: 6px; }

/* Тосты: уезжают вправо */
.toast.out { animation: ph-toast-out .25s var(--ease-in) both; }

/* Успешная покупка: круг проявляется, галочка рисуется */
.done-mark { width: 72px; height: 72px; border-radius: 22px 0 22px 22px; display: grid; place-items: center; color: var(--success);
  background: var(--success-soft); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  animation: ph-click .6s var(--ease-spring) backwards; }
.done-mark svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done-mark svg path { stroke-dasharray: 30; --len: 30; animation: ph-draw .55s var(--ease-out) .3s backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
  .loader i { animation: none !important; }
}

/* ---------- Окно покупки: по центру, слева параметры, справа итог ---------- */
.modal.buy { width: 940px; max-height: calc(100vh - 48px); display: flex; overflow: hidden; position: relative;
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%); }
.buy-main { flex: 1; min-width: 0; overflow-y: auto; padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); }
.buy-side { width: 300px; flex: none; background: var(--surface-2); border-left: 1px solid var(--border);
  padding: 56px var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.buy-side .pay { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
.buy-side h3 { font: 600 var(--fs-xs) var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.buy-side .grand { display: flex; align-items: baseline; justify-content: space-between; padding-top: var(--sp-3); border-top: 1px dashed var(--border-strong); }
.buy-side .grand b { font: 600 26px var(--font-display); letter-spacing: -.02em; transition: color var(--dur); }
.buy-side .grand.bump b { animation: ph-click .35s var(--ease-spring); }
.buy-close { position: absolute; top: 14px; right: 14px; z-index: 4; }
.buy-prod { display: flex; gap: var(--sp-4); align-items: center; padding-right: 0; }
.buy-prod .cover { width: 104px; height: 76px; border-radius: 12px; flex: none; }
.buy-prod h2 { font: 600 var(--fs-xl) var(--font-display); letter-spacing: -.01em; margin-bottom: 2px; }

/* Результат проверки ID игрока */
.nick-hint { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.nick-hint > * { animation: ph-in-x .3s var(--ease-out) backwards; }
.nick-hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nick-hint svg path { stroke-dasharray: 20; --len: 20; animation: ph-draw .4s var(--ease-out) backwards; }
.nick-hint[data-check="ok"] { color: var(--success); } .nick-hint[data-check="ok"] b { color: var(--text); }
.nick-hint[data-check="err"] { color: var(--danger); }
.nick-hint[data-check="wait"] { color: var(--text-faint); }

/* Оформление: поверх формы, без смены размера окна */
.buy-over { position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-5); padding: var(--sp-8); text-align: center; background: var(--surface); }
.modal.buy[data-phase="proc"] .buy-proc, .modal.buy[data-phase="done"] .buy-done { display: flex; animation: ph-fade .35s var(--ease-out) backwards; }
.modal.buy[data-phase="proc"] .buy-close { visibility: hidden; }
.buy-over h2 { font: 600 var(--fs-2xl) var(--font-display); letter-spacing: -.01em; }
.buy-over p { color: var(--text-muted); max-width: 440px; }
.buy-over > * { animation: ph-in .45s var(--ease-out) backwards; }
.buy-over > :nth-child(2) { animation-delay: 80ms; } .buy-over > :nth-child(3) { animation-delay: 160ms; }
.buy-over > :nth-child(4) { animation-delay: 240ms; } .buy-over > :nth-child(5) { animation-delay: 320ms; }
.proc-steps { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 320px; padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg); background: var(--surface-2); }
.done-sum { display: grid; grid-template-columns: repeat(3, auto); gap: var(--sp-2) var(--sp-8); padding: var(--sp-4) var(--sp-6);
  border-radius: var(--r-lg); background: var(--surface-2); text-align: left; }
.done-sum .l { font-size: var(--fs-xs); color: var(--text-faint); }
.done-sum .v { font: 600 var(--fs-lg) var(--font-num); }

/* =====================================================================
   Уровень продавца. Названия уровней — только на английском.
   Цвет уровня задаётся классом .t-base … .t-exclusive через --tier.
   ===================================================================== */
.t-base      { --tier: #8E8380; --tier-2: #5E5553; }
.t-standard  { --tier: #8FA6BD; --tier-2: #55687C; }
.t-advanced  { --tier: #D08D5C; --tier-2: #8A4F2A; }
.t-premium   { --tier: #D9607A; --tier-2: #7D2336; }
.t-exclusive { --tier: #E6C068; --tier-2: #9A7224; }
:root[data-theme="light"] .t-base      { --tier: #7A6E6B; }
:root[data-theme="light"] .t-standard  { --tier: #4F6D8C; }
:root[data-theme="light"] .t-advanced  { --tier: #A85F2C; }
:root[data-theme="light"] .t-premium   { --tier: #7D2336; }
:root[data-theme="light"] .t-exclusive { --tier: #94701F; }

/* Значок уровня: срезанный ромб-ярлык с градиентом */
.tier-mark { --s: 22px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--tier), var(--tier-2)); border-radius: 6px;
  clip-path: polygon(0 0, calc(100% - var(--s) * .28) 0, 100% calc(var(--s) * .28), 100% 100%, 0 100%); }
.tier-mark svg.i { width: calc(var(--s) * .62); height: calc(var(--s) * .62); stroke-width: 2.2; }
.tier-mark.lg { --s: 56px; border-radius: 14px; box-shadow: 0 10px 30px -10px var(--tier); }
.tier-name { font: 600 var(--fs-md) var(--font-display); letter-spacing: -.01em; color: var(--tier); }
.tier-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px 0 3px; border-radius: 6px; white-space: nowrap;
  font: 600 var(--fs-xs) var(--font-ui); color: var(--tier); background: color-mix(in srgb, var(--tier) 14%, transparent); }
.tier-tag .tier-mark { --s: 18px; border-radius: 4px; }

/* Плашка в шапке кабинета */
.level-chip { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 8px; border-radius: var(--r-full);
  background: var(--surface); box-shadow: 0 0 0 1px var(--border) inset; color: var(--text); transition: box-shadow var(--dur), background var(--dur); }
.level-chip:hover { text-decoration: none; background: var(--surface-2); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier) 55%, var(--border)) inset; }
.level-chip .tx { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.level-chip .tx b { font: 600 var(--fs-sm) var(--font-display); color: var(--tier); }
.level-chip .bar { width: 74px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.level-chip .bar > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--tier-2), var(--tier));
  transform-origin: left; animation: ph-grow-x 1.2s var(--ease-out) .3s backwards; }
.level-chip .tier-mark { animation: ph-click .6s var(--ease-spring) .2s backwards; }

/* Главная карточка уровня */
.level-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-6); align-items: center; padding: var(--sp-6);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tier) 16%, transparent), transparent 55%), var(--surface); }
.level-hero h2 { font: 600 30px var(--font-display); letter-spacing: -.02em; color: var(--tier); line-height: 1.1; }
.level-hero .track { position: relative; height: 10px; border-radius: 10px; background: var(--surface-3); margin: var(--sp-3) 0 var(--sp-2); }
.level-hero .track > span { position: absolute; inset: 0 auto 0 0; border-radius: 10px; background: linear-gradient(90deg, var(--tier-2), var(--tier));
  transform-origin: left; animation: ph-grow-x 1.4s var(--ease-out) .25s backwards; }
.level-hero .track > span::after { content: ""; position: absolute; right: -1px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tier) 40%, transparent); }
.level-hero .ticks { display: flex; justify-content: space-between; font: 600 var(--fs-xs) var(--font-num); color: var(--text-faint); }
.level-hero .side { min-width: 220px; padding-left: var(--sp-6); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--sp-2); }

/* Лестница уровней */
.tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-3); }
.tier { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5) var(--sp-4) var(--sp-4); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: 0 0 0 1px var(--border) inset;
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%);
  transition: transform .35s var(--ease-out), box-shadow var(--dur); }
.tier::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--tier-2), var(--tier)); }
.tier:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier) 45%, var(--border)) inset; }
.tier.is-current { box-shadow: 0 0 0 1.5px var(--tier) inset, 0 18px 40px -22px var(--tier);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tier) 10%, var(--surface)), var(--surface) 60%); }
.tier .now { position: absolute; top: 12px; right: 18px; font: 600 10px var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--tier); }
.tier .price { font: 600 var(--fs-2xl) var(--font-display); letter-spacing: -.02em; }
.tier .price small { font: 500 var(--fs-xs) var(--font-ui); color: var(--text-faint); letter-spacing: 0; margin-left: 2px; }
.tier .or { font-size: var(--fs-xs); color: var(--text-muted); }
.tier .or b { font-family: var(--font-num); color: var(--text); }
.tier ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--text-muted); flex: 1; }
.tier li { display: flex; gap: 6px; } .tier li svg.i { color: var(--tier); flex: none; margin-top: 2px; }
.tier .btn { margin-top: auto; }
.tier.is-current .tier-mark, .tier:hover .tier-mark { animation: ph-click .5s var(--ease-spring); }
.tier.is-exclusive { background: linear-gradient(160deg, color-mix(in srgb, var(--tier) 9%, var(--surface)), var(--surface) 55%); }
.tier.is-exclusive::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--tier) 16%, transparent) 50%, transparent 65%);
  transform: translateX(-100%); animation: ph-sheen 5s var(--ease) 1s infinite; }
@keyframes ph-sheen { 0% { transform: translateX(-100%); } 30%, 100% { transform: translateX(100%); } }
.tiers > * { animation: ph-in var(--dur-slow) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
.tbd { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font: 600 10px var(--font-ui);
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); background: var(--surface-3); }
.modal.buy.narrow { width: 520px; }
.modal.buy.narrow .buy-main { gap: var(--sp-4); }
.modal.buy.narrow .buy-prod h2 { color: var(--tier); }

/* A product's own picture fills its cover or thumb; the cover's shade stays over it for the labels */
.cover > .cover-img, .thumb > .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.thumb:has(> .cover-img) { position: relative; overflow: hidden; }
.catalog-pictures { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-start; }
.catalog-pictures figure { margin: 0; display: grid; gap: 6px; }
.catalog-pictures img { width: 160px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-3); }
.catalog-pictures .paste-drop { flex: 1; min-width: 240px; padding: var(--sp-3); border: 1px dashed var(--border); border-radius: 10px; transition: border-color var(--dur), background var(--dur); }
.catalog-pictures:hover .paste-drop, .catalog-pictures.is-over .paste-drop { border-color: var(--accent-text); }
.catalog-pictures.is-over .paste-drop { background: var(--surface-3); }

/* Supplier catalog in the admin: the product's fields and the denominations with their markup */
.pc-flag { padding: 0 14px 12px; }
.denom-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-2); }
.denoms > .denom[hidden] { display: none; }
.catalog-product { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); }
.catalog-product > .field:first-child, .catalog-product > .catalog-note { grid-column: span 2; }
.catalog-items .input-sm { min-width: 150px; }
.catalog-items .input-pct { width: 96px; }
.input-pct > .input { padding-left: 10px; padding-right: 26px; }
.input-pct > span { position: absolute; right: 10px; }
.buy-note { margin: 6px 0 0; color: var(--text-muted); max-width: 46ch; }
@media (max-width: 900px) { .catalog-product { grid-template-columns: 1fr 1fr; } }
