/* PAZME design system. Токены — в :root; меняйте цвета/радиусы здесь, а не в компонентах. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-cyrillic-400-normal.74a70a8b71d0.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.da03732a27e1.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-cyrillic-500-normal.0f5211cce140.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.51205681a1ba.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20BD, U+2212; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-cyrillic-600-normal.40727edfba55.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.2ede57db1a3a.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20BD, U+2212; }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-cyrillic-700-normal.fc4bfa8e4204.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.8ca0a5155296.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20BD, U+2212; }

:root {
  --bg: #F7F8FA; --surface: #FFFFFF; --text: #172022; --text-2: #657173; --border: #E5E9EA;
  --brand: #6D5EF5; --brand-hover: #5746E6; --brand-soft: #F0EEFF;
  --ok: #14885A; --ok-soft: #E7F5EE; --warn: #B66A11; --warn-soft: #FCF1E3; --err: #C94343; --err-soft: #FBEAEA;
  --r-btn: 12px; --r-field: 12px; --r-card: 20px; --r-promo: 28px;
  --shadow: 0 8px 28px rgba(23, 32, 34, .07);
  --pad: 32px; --max: 1200px; --sidebar: 244px;
  --t: 150ms ease;
  --font: "Inter", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (max-width: 1023px) { :root { --pad: 20px; } }
@media (max-width: 767px) { :root { --pad: 16px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/24px var(--font); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0 0 12px; letter-spacing: -.02em; }
h1 { font-size: 52px; line-height: 60px; font-weight: 700; }
h2 { font-size: 32px; line-height: 40px; font-weight: 700; }
h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
@media (max-width: 767px) { h1 { font-size: 36px; line-height: 42px; } h2 { font-size: 26px; line-height: 34px; } }
p { margin: 0 0 12px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; line-height: 18px; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.metrika-pixel { position: absolute; left: -9999px; } /* пиксель Яндекс.Метрики без JS */
.icon { display: inline-block; vertical-align: middle; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.container { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(12, 1fr); }
.col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; } .col-8 { grid-column: span 8; } .col-12 { grid-column: span 12; }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .col-4 { grid-column: span 6; } .col-8 { grid-column: span 12; } }
@media (max-width: 767px) { .grid, .grid-3, .grid-2 { grid-template-columns: 1fr; } .col-4, .col-6, .col-8, .col-12 { grid-column: auto; } }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--r-btn);
  border: 1px solid transparent; font: 600 16px/22px var(--font); text-decoration: none; cursor: pointer; transition: background var(--t), border-color var(--t), color var(--t); white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-2); color: var(--text); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #AF3333; color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--text); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; min-height: 44px; }

/* Карточки */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; }
.card-lead { box-shadow: var(--shadow); }
.card-promo { border-radius: var(--r-promo); padding: 32px; }
.card h3 { margin-bottom: 8px; }
@media (max-width: 767px) { .card { padding: 18px; } .card-promo { padding: 22px; } }
.metric { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.02em; }
.metric-label { color: var(--text-2); font-size: 13px; line-height: 18px; }
.hero-metric { background: var(--brand); color: #fff; border: 0; }
.hero-metric .metric { font-size: 40px; line-height: 48px; }
.hero-metric .metric-label { color: rgba(255,255,255,.85); font-size: 15px; }
.hero-metric .btn-secondary { border: 0; }

/* Бейджи и статусы */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; line-height: 18px; font-weight: 600;
  background: var(--bg); color: var(--text-2); border: 1px solid var(--border); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.badge-brand { background: var(--brand-soft); color: var(--brand-hover); border-color: transparent; }
.status-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--r-card); background: var(--brand-soft); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: var(--r-card); border: 1px solid transparent; }
.banner-err { background: var(--err-soft); color: #8E2B2B; border-color: #F1C9C9; }
.banner-warn { background: var(--warn-soft); color: #7A460A; }
.banner-ok { background: var(--ok-soft); color: #0E5E3E; }
.banner-info { background: var(--brand-soft); color: #3A2FA6; }
.banner .btn { margin-left: auto; }

/* Формы */
.field { margin-bottom: 18px; }
.field label, .label { display: block; font-weight: 600; font-size: 14px; line-height: 20px; margin-bottom: 6px; }
.field .help { color: var(--text-2); font-size: 13px; line-height: 18px; margin-top: 6px; }
.field .error, .form-error { color: var(--err); font-size: 13px; line-height: 18px; margin-top: 6px; }
.form-error { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-field); background: var(--err-soft); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-field); background: var(--surface);
  font: 400 16px/22px var(--font); color: var(--text); transition: border-color var(--t); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--err); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding-top: 10px; font-weight: 400 !important; }
.check input { margin-top: 2px; }
fieldset { border: 0; padding: 0; margin: 0; }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.role-card { position: relative; display: block; padding: 16px; border: 2px solid var(--border); border-radius: 16px; cursor: pointer; background: var(--surface); transition: border-color var(--t); }
.role-card input { position: absolute; opacity: 0; }
.role-card strong { display: block; margin: 6px 0 4px; }
.role-card span { color: var(--text-2); font-size: 13px; line-height: 18px; display: block; }
.role-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.role-card:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (max-width: 420px) { .role-cards { grid-template-columns: 1fr; } }
.form-section { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); margin-bottom: 20px; }
.form-section > h3 { display: flex; gap: 10px; align-items: center; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-hover); font-weight: 700; font-size: 14px; flex: none; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.seg-item { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-weight: 600 !important; }
.seg-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-item:has(input:checked) { background: var(--surface); box-shadow: 0 1px 3px rgba(23, 32, 34, .12); }
.seg-item:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.checklist > li { display: flex; gap: 10px; align-items: flex-start; }
.checklist > li > .icon { flex: none; margin-top: 2px; }
.checklist > li.is-ok > .icon { color: var(--ok); }
.checklist > li.is-todo > .icon { color: var(--warn); }
.checklist ul { margin: 4px 0 0; padding-left: 18px; }
.submit-box { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.submit-why { margin: 0; }
.req { color: var(--err); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; position: sticky; bottom: 0; padding: 16px 0; background: linear-gradient(transparent, var(--bg) 30%); }

/* Auth */
.auth-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 32px var(--pad); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 30px; line-height: 38px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 20px; border-radius: 999px; background: var(--bg); }
.auth-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-weight: 600; }
.auth-tabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(23, 32, 34, .12); }
.register-form .for-advertiser { display: none; }
.register-form:has(input[name=role][value=advertiser]:checked) .for-advertiser { display: inline; }
.register-form:has(input[name=role][value=advertiser]:checked) .for-promoter { display: none; }

/* Шапка лендинга */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(247, 248, 250, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo .icon { color: var(--brand); stroke-width: 0; fill: currentColor; }
.nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:not(.btn):hover { background: var(--brand-soft); }
.drawer { position: fixed; inset: 0; z-index: 50; display: none; }
.drawer.is-open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(23, 32, 34, .35); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 6px; animation: slide 160ms ease; overflow-y: auto; }
.drawer-panel a:not(.btn), .drawer-panel button.nav-item { display: flex; gap: 10px; align-items: center; min-height: 48px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; }
.drawer-panel a:not(.btn):hover, .drawer-panel a[aria-current] { background: var(--brand-soft); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Лендинг */
.hero { padding: 64px 0 48px; }
.hero .grid { align-items: center; }
.hero-sub { font-size: 20px; line-height: 30px; color: var(--text-2); max-width: 560px; margin-bottom: 28px; }
.hero-art { border-radius: var(--r-promo); overflow: hidden; background: var(--brand-soft); aspect-ratio: 4 / 5; display: grid; place-items: center; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.section { padding: 56px 0; }
.section-title { margin-bottom: 28px; max-width: 720px; }
.step-card .step-num { width: 40px; height: 40px; font-size: 18px; margin-bottom: 16px; }
.photo-pair img { border-radius: var(--r-card); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--brand-soft); display: block; }
@media (max-width: 767px) { .hero { padding: 32px 0; } .section { padding: 36px 0; } }
.biz-note { max-width: 640px; padding-top: 24px; border-top: 1px solid var(--border); }
.launch-note { max-width: 440px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }
details.faq { border-bottom: 1px solid var(--border); }
details.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; min-height: 44px; font-weight: 600; font-size: 18px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 24px; color: var(--brand); transition: transform var(--t); }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq > div { padding: 0 0 18px; color: var(--text-2); max-width: 760px; }
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; margin-top: 40px; color: var(--text-2); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-footer a { color: var(--text-2); }

/* Кабинет */
.cabinet { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.sidebar .logo { padding: 4px 12px 2px; }
.sidebar .role { padding: 0 12px 20px; color: var(--text-2); font-size: 13px; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; }
.side-link:hover { background: var(--bg); color: var(--text); }
.side-link[aria-current="page"] { background: var(--brand-soft); color: var(--brand-hover); }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 0 var(--pad); border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 22px; line-height: 30px; margin: 0; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14px; }
.content { padding: 28px var(--pad) 48px; max-width: calc(var(--max) + var(--pad) * 2); }
.page-greeting { margin-bottom: 24px; }
.bottom-nav { display: none; }
.mobile-only { display: none; }
@media (max-width: 1023px) {
  .cabinet { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar .user .email { display: none; }
  .mobile-only { display: inline-flex; }
  .desktop-only { display: none !important; }
}
@media (max-width: 767px) {
  .has-bottom-nav .content { padding-bottom: 104px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 60px; font-size: 12px; color: var(--text-2); text-decoration: none; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); }
  .topbar h1 { font-size: 18px; }
}
.adv-tabs { display: none; }
@media (max-width: 1023px) {
  .adv-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--pad); background: var(--surface); border-bottom: 1px solid var(--border); scrollbar-width: none; }
  .adv-tabs a { flex: none; padding: 10px 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; color: var(--text); background: var(--bg); font-size: 14px; }
  .adv-tabs a[aria-current="page"] { background: var(--brand); color: #fff; }
}

/* Таблицы → карточки на телефоне */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: 13px; line-height: 18px; color: var(--text-2); font-weight: 600; background: #FBFCFC; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
@media (max-width: 767px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--text-2); font-size: 13px; text-align: left; }
  .table td.num { text-align: right; }
}

/* Кампании, QR */
.campaign-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.campaign-card .thumb { aspect-ratio: 16 / 10; background: var(--brand-soft); overflow: hidden; }
.campaign-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.campaign-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.campaign-card .places { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.campaign-card .btn { margin-top: auto; }
.qr-tile { display: flex; gap: 16px; align-items: flex-start; }
.qr-thumb { width: 96px; height: 96px; flex: none; border-radius: 14px; border: 1px solid var(--border); background: #fff; padding: 4px; }
.qr-thumb img { width: 100%; height: 100%; }
.qr-big { width: 100%; max-width: 360px; border-radius: var(--r-card); border: 1px solid var(--border); background: #fff; padding: 12px; }
.url-box { font-family: var(--mono); font-size: 14px; padding: 10px 12px; background: var(--bg); border-radius: 10px; word-break: break-all; }
.chart svg { width: 100%; height: auto; display: block; }
.chart rect.bar { fill: var(--brand); }
.chart rect.bar-2 { fill: var(--ok); }
.chart .axis { stroke: var(--border); }
.progress { width: 100%; height: 10px; border-radius: 999px; overflow: hidden; appearance: none; border: 0; background: var(--bg); }
.progress::-webkit-progress-bar { background: var(--bg); border-radius: 999px; }
.progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
.progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.check-list li:last-child { border: 0; }
.ok-text { color: var(--ok); } .err-text { color: var(--err); } .warn-text { color: var(--warn); }
.kv { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 16px; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; word-break: break-word; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }
.empty { text-align: center; padding: 40px 24px; }
.empty .icon { color: var(--brand); margin-bottom: 12px; }
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps-list > li { position: relative; padding: 0 0 24px 48px; }
.steps-list > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-hover); display: grid; place-items: center; font-weight: 700; }
.token-box { font-family: var(--mono); font-size: 16px; padding: 14px; background: var(--text); color: #fff; border-radius: 12px; word-break: break-all; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }

/* Тосты и диалоги */
.toasts { position: fixed; z-index: 60; top: 16px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 440px; padding: 14px 18px; border-radius: 14px; background: var(--text); color: #fff; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: fadein 160ms ease; }
.toast.error { background: var(--err); }
.toast.success { background: var(--ok); }
.toast button { background: none; border: 0; color: inherit; cursor: pointer; margin-left: auto; min-width: 32px; min-height: 32px; font-size: 18px; }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
dialog { border: 0; border-radius: var(--r-card); padding: 24px; max-width: min(92vw, 460px); box-shadow: var(--shadow); color: var(--text); }
dialog::backdrop { background: rgba(23, 32, 34, .45); }
dialog .row { justify-content: flex-end; margin-top: 20px; }
.htmx-request .spinner, .is-loading .spinner { display: inline-block; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Страница ошибок */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px var(--pad); }
.error-code { font-size: 96px; line-height: 1; font-weight: 800; color: var(--brand); letter-spacing: -.04em; }

/* Скан-страница (/q/) — отдельный mobile-first дизайн */
.scan-body { background: linear-gradient(180deg, var(--brand-soft) 0, var(--bg) 320px); }
.scan { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }
.scan-mark { display: flex; justify-content: center; color: var(--brand); margin-bottom: 14px; }
.scan-mark .icon { fill: currentColor; stroke-width: 0; }
.found { background: var(--surface); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); text-align: center; margin-bottom: 16px; }
.found h1 { font-size: 28px; line-height: 34px; margin: 10px 0 6px; }
.found .discount { font-size: 18px; line-height: 26px; }
.found .discount b { color: var(--brand); font-size: 22px; }
.scan-photo { border-radius: var(--r-card); overflow: hidden; background: var(--surface); margin-bottom: 16px; aspect-ratio: 1 / 1; }
.scan-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-text { margin-bottom: 16px; }
.message { background: var(--surface); border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.code-card { background: var(--surface); border: 2px dashed var(--brand); border-radius: var(--r-card); padding: 16px; margin-bottom: 16px; text-align: center; }
.code-card .code { font-family: var(--mono); font-size: 26px; line-height: 34px; font-weight: 700; letter-spacing: .06em; margin: 6px 0 12px; word-break: break-all; }
.scan .btn-primary { min-height: 56px; font-size: 18px; }
.product-mini { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.product-mini img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; background: var(--brand-soft); }
.product-mini .grow { flex: 1; min-width: 0; }
.metrics-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 1023px) { .metrics-row { grid-template-columns: repeat(2, 1fr); } }
.offer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.offer-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 96px minmax(0, 1fr); }
.offer-photo { background: var(--brand-soft); }
.offer-photo img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 112px; }
.offer-body { padding: 14px 14px; min-width: 0; }
.offer-body p { margin: 4px 0; }
.offer-title { font-size: 18px; line-height: 24px; margin: 2px 0; }
.offer-discount b { color: var(--brand); font-size: 20px; }
.offer-body .btn { margin-top: 10px; white-space: normal; }
.scan-back { margin: 0 0 10px; }
.scan-foot { margin-top: 28px; text-align: center; color: var(--text-2); font-size: 13px; line-height: 18px; }

/* Утилиты (inline style запрещён CSP) */
.mt-8 { margin-top: 8px; } .mt-20 { margin-top: 20px; } .mt-32 { margin-top: 32px; } .mb-20 { margin-bottom: 20px; } .mb-0 { margin-bottom: 0; }
.center { justify-content: center; text-align: center; }
.w-100 { width: 100%; }
.hidden, [hidden] { display: none !important; }
