/* doimi — интерфейсы приложения: вход, карта клиента, админка бизнеса, панель платформы */

:root {
  --ink: #0C0C14; --paper: #F4F4F1; --line: #E2E1DC; --text: #3D3C39; --muted: #6B6A66;
  --yellow: #FFC83D; --ok: #1E7A4E; --err: #B42318;
  --fd: 'Wix Madefor Display', system-ui, sans-serif; --ft: 'Wix Madefor Text', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
/* Страница не уезжает вбок на телефоне; касания без задержки и серой вспышки */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body { margin: 0; }
img { max-width: 100%; }
.app-body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--ft); -webkit-font-smoothing: antialiased; }
.bp-body { background: #E6E5E0; margin: 0; }
.app-body a { color: inherit; }
.app-body h1, .app-body h2 { font-family: var(--fd); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.app-body h2 { font-size: 19px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- Базовые элементы ---------- */
.panel { background: #FFF; border-radius: 20px; padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.center { align-items: center; }

input, select, textarea { font: 16px var(--ft); color: var(--ink); background: #FAFAF7; border: 1px solid #D9D7CF; border-radius: 12px; padding: 0 14px; min-height: 48px; width: 100%; }
textarea { padding: 12px 14px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent, #3550FF); outline-offset: 1px; border-color: transparent; }
label, legend { font-size: 14px; font-weight: 600; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }

button, .btn-ink, .btn-accent, .btn-ghost, .btn-big { font: 600 15px/1 var(--ft); cursor: pointer; border: 0; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-ink { background: var(--ink); color: #FFF !important; border-radius: 12px; min-height: 48px; padding: 0 18px; }
.btn-accent { background: var(--accent, #3550FF); color: #FFF !important; border-radius: 12px; min-height: 48px; padding: 0 18px; }
.btn-ghost { background: #FFF; color: var(--ink); border: 1px solid #D6D5CF; border-radius: 12px; min-height: 44px; padding: 0 16px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-big { width: 100%; min-height: 60px; border-radius: 16px; font-size: 17px; padding: 0 20px; }
.btn-big.btn-accent { box-shadow: 0 4px 0 color-mix(in srgb, var(--accent, #3550FF) 60%, #000); }
.btn-gold { background: linear-gradient(180deg, #FFDA70, #FFC23A); color: var(--ink); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 4px 0 #B8860B; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:active:not(:disabled) { transform: translateY(1px); }

.flash { border-radius: 14px; padding: 12px 16px; font-weight: 600; margin-bottom: 14px; }
.flash--ok { background: #E3F4EA; color: var(--ok); }
.flash--err { background: #FDECEA; color: var(--err); }
.bp-body > .flash { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 5; max-width: 456px; margin: 0 auto; }

.tile-logo { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; background: var(--accent, #3550FF); color: #FFF; display: inline-grid; place-items: center; font: 800 18px/1 var(--fd); }
.tile-logo--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 28px; }
.logo-dot { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE59A, #FFC83D 50%, #E9A814); box-shadow: 0 3px 0 #B27806; display: inline-grid; place-items: center; }
.logo-dot::after { content: ''; width: 15px; height: 15px; border-radius: 50%; background: #1C2BB8; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #D6D5CF; background: #FFF; display: grid; place-items: center; flex: 0 0 auto; }
.avatar { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: #E6E5E0; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.avatar--lg { width: 56px; height: 56px; font-size: 19px; }

/* ---------- Сообщения и вход ---------- */
.msg { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.msg > .panel { width: 100%; max-width: 420px; padding: 32px 24px; text-align: center; }
.msg h1 { font-size: 26px; }
.auth { gap: 16px; }
.btn-tg { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 320px; min-height: 52px; padding: 0 20px; border-radius: 14px; background: #2AABEE; color: #FFF !important; font-weight: 600; font-size: 16px; text-decoration: none; }
.btn-tg:hover { background: #229ED9; }
.auth__or { font-size: 13px; color: var(--muted); }
.auth__dev { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px dashed var(--line); }
.auth__fine { font-size: 13px; color: var(--muted); margin: 0; }
.code-form__row { display: flex; gap: 8px; }
.code-form__row input { flex: 1; min-width: 0; }

/* ---------- Карта клиента ---------- */
.cc { max-width: 480px; margin: 0 auto; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.cc__head { display: flex; align-items: center; gap: 12px; }
.cc__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cc__who span { font-size: 14px; color: var(--muted); }
.cc__welcome { display: flex; gap: 10px; align-items: center; background: var(--yellow); border-radius: 16px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.cc__card { background: var(--accent); color: #FFF; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 0 color-mix(in srgb, var(--accent) 65%, #000); }
.cc__stamps { display: grid; gap: 10px; max-width: 320px; }
.cc__stamps span { aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(255,255,255,.55); }
.cc__stamps span.on { border: 0; background: radial-gradient(circle at 35% 30%, #FFE08A, #FFC83D 55%, #E9A814); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.cc__note { font-size: 15px; color: rgba(255,255,255,.95); }
.cc__big { font: 800 48px/1 var(--fd); letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 10px; }
.cc__big small { font: 600 16px/1 var(--ft); letter-spacing: 0; opacity: .9; }
.cc__tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; font-size: 12px; }
.cc__tiers i { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); margin-bottom: 6px; }
.cc__tiers .on i { background: #FFF; }
.cc__qr { background: #FFF; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cc__qr-label { color: var(--text); font-size: 15px; }
.cc__qr-img { width: min(260px, 70vw); }
.cc__qr-img svg { display: block; width: 100%; height: auto; }
.cc__code { font: 700 22px/1 var(--fd); letter-spacing: .12em; }
.cc__home { border: 1px dashed #A3A29C; border-radius: 16px; padding: 12px 14px; }
.cc__home summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cc__home summary::-webkit-details-marker { display: none; }
.cc__home summary > svg { width: 36px; height: 36px; padding: 9px; border-radius: 10px; background: var(--ink); flex: 0 0 auto; }
.cc__home summary span { display: flex; flex-direction: column; line-height: 1.3; }
.cc__home small { color: var(--muted); font-size: 13px; }
.cc__home p { font-size: 14px; color: var(--text); margin: 12px 0 0; }
.cc__history { display: flex; flex-direction: column; }
.cc__history h2 { margin-bottom: 6px; }
.cc__history div, .hist { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cc__history time, .hist time { color: var(--muted); white-space: nowrap; }
.cc__foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding-top: 8px; }

/* ---------- Админка ---------- */
.adm { min-height: 100vh; }
.adm__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: #FFF; border-bottom: 1px solid var(--line); }
.adm__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.adm__brand > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.adm__brand small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm__open { display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--ft); text-decoration: none; white-space: nowrap; color: var(--ink); }
.adm__nav { display: flex; gap: 4px; padding: 8px 12px; background: #FFF; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 4; }
.adm__nav a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; }
.adm__nav a[aria-current="page"] { background: #F0EFEA; color: var(--ink); font-weight: 700; }
.adm__nav a[aria-current="page"] svg { color: var(--accent); }
.adm__main { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.adm__h1 { font-size: 28px; }

@media (max-width: 720px) {
  .adm__nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; border-top: 1px solid var(--line); border-bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .adm__nav a { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 11px; flex: 1 1 0; min-width: 0; justify-content: center; }
  .adm__nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .adm__nav a[aria-current="page"] { background: none; }
  .adm__main { padding-bottom: 110px; }
}

.stats { display: flex; flex-direction: column; gap: 14px; }
.stats__main { display: flex; align-items: baseline; gap: 10px; }
.stats__main b { font: 800 56px/0.9 var(--fd); letter-spacing: -0.04em; }
.stats__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stats__row div { padding-top: 12px; display: flex; flex-direction: column; }
.stats__row div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.stats__row b { font: 800 22px/1.2 var(--fd); }
.stats__row span { font-size: 13px; color: var(--muted); }

.scan-cta { display: flex; align-items: center; gap: 16px; background: var(--accent); color: #FFF !important; text-decoration: none; border-radius: 20px; min-height: 80px; padding: 0 22px; font: 700 18px/1.2 var(--ft); box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.scan-cta span { flex: 1; }

.list { display: flex; flex-direction: column; }
.list__head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 6px; }
.list__head a { font-size: 14px; color: var(--text); }
.row-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.row-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.row-item__text small { color: var(--muted); font-size: 13px; }
.notice { display: flex; align-items: center; gap: 12px; border: 1px dashed #A3A29C; border-radius: 16px; padding: 14px 14px 14px 16px; }
.notice > div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.notice small { color: var(--muted); font-size: 13px; }
.empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.link-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; border-top: 1px solid var(--line); text-decoration: none; font-weight: 500; }

.scanner { position: relative; background: #161615; border-radius: 22px; aspect-ratio: 1; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; color: #C9C8D6; text-align: center; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.scanner.is-on video { opacity: 1; }
.scanner__frame { position: relative; width: 62%; aspect-ratio: 1; border-radius: 22px; box-shadow: 0 0 0 4px var(--accent), 0 0 0 999px rgba(0,0,0,.35); }
.scanner__hint { position: relative; margin: 0; font-size: 14px; }
.scanner .btn-ink { position: relative; background: #FFF; color: var(--ink) !important; }

.mp { display: flex; flex-direction: column; gap: 16px; }
.mp__who { display: flex; align-items: center; gap: 14px; }
.mp__who > div { display: flex; flex-direction: column; line-height: 1.3; }
.mp__who b { font: 800 22px/1.2 var(--fd); }
.mp__who small { color: var(--muted); font-size: 13px; }
.mp__stamps { display: grid; gap: 6px; }
.mp__stamps span { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #A3A29C; }
.mp__stamps span.on { border: 0; background: var(--accent); }
.mp__note { font-size: 14px; color: var(--text); }
.mp__big { font: 800 44px/1 var(--fd); display: flex; align-items: baseline; gap: 10px; }
.mp__big small { font: 600 15px var(--ft); color: var(--muted); }
.mp__actions { display: flex; flex-direction: column; gap: 10px; }
.mp__tip { margin: 0; font-size: 16px; }
.form-inline { display: flex; flex-direction: column; gap: 8px; }

.search { display: flex; gap: 8px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; font-weight: 400; }
.choice input { width: 20px; min-height: 0; accent-color: var(--accent); }
.choice span { display: flex; flex-direction: column; line-height: 1.3; }
.choice small { color: var(--muted); font-size: 13px; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; font-size: 14px; }

/* «Внешний вид» */
.adm:has(.look) .adm__main { max-width: 1120px; }
.look { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.look__form { flex: 1 1 420px; min-width: 0; }
.look__preview { flex: 0 0 auto; margin: 0 auto; position: sticky; top: 76px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.look__url { background: #FFF; border-radius: 999px; padding: 8px 14px; font-size: 13px; }
.look__phone { width: 312px; height: 675px; border-radius: 34px; overflow: hidden; box-shadow: 0 0 0 7px var(--ink), 0 24px 48px rgba(0,0,0,.15); }
.look__phone > div { width: 390px; height: 844px; transform: scale(.8); transform-origin: 0 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.photo-opt { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: pointer; }
.photo-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; }
.photo-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-opt:has(input:checked) { box-shadow: 0 0 0 2px #FFF, 0 0 0 4px var(--ink); }
.photo-opt:has(input:focus-visible) { outline: 2px solid var(--accent); }
.photo-opt--upload { border: 1.5px dashed #A3A29C; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 500; background: #FAFAF7; }
.photo-opt--upload input { inset: 0; width: 100%; height: 100%; cursor: pointer; }
.photo-opt--upload.is-loading { opacity: .5; }
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; background: #F0EFEA; border-radius: 12px; }
.seg label { cursor: pointer; font-weight: 500; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 9px; font-size: 14px; text-align: center; }
.seg input:checked + span { background: #FFF; box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 700; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.font-wide { font-family: 'Unbounded', sans-serif; } .font-serif { font-family: 'Cormorant', serif; font-size: 17px !important; } .font-grotesk { font-family: 'Golos Text', sans-serif; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { cursor: pointer; }
.swatches input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; }
.swatches span { display: block; width: 40px; height: 40px; border-radius: 50%; }
.swatches input:checked + span { box-shadow: 0 0 0 2px #FFF, 0 0 0 4px var(--ink); }
.swatch-custom input { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; border: 1.5px dashed #A3A29C; cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 20px; min-height: 0; accent-color: var(--accent); }
.domain { display: flex; border: 1px solid #D9D7CF; border-radius: 12px; overflow: hidden; background: #FAFAF7; }
.domain input { border: 0; border-radius: 0; background: transparent; }
.domain span { display: flex; align-items: center; padding: 0 14px; background: #EEECE5; color: var(--text); border-left: 1px solid #D9D7CF; white-space: nowrap; }

/* Панель платформы */
.app-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.app-row__main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.app-row__main small { color: var(--text); font-size: 13px; }
.app-row__actions { display: flex; gap: 8px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #F0EFEA; }
.badge--new { background: var(--yellow); }
.badge--done { background: #E3F4EA; color: var(--ok); }
.adm:not(:has(.look)) .adm__main:has(.app-row) { max-width: 860px; }

/* Наклейка для печати */
.sticker-page { max-width: 640px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; align-items: center; }
.sticker-page__bar { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.print-sticker { width: 105mm; min-height: 148mm; background: #FFF; border-radius: 6mm; padding: 9mm 8mm; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4mm; box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.print-sticker header { display: flex; align-items: center; gap: 3mm; font: 800 6mm/1 var(--fd); }
.print-sticker h1 { font-size: 7.5mm !important; line-height: 1.1; color: var(--accent); }
.print-sticker__offer { margin: 0; font-size: 4.2mm; color: var(--text); }
.print-sticker__qr { width: 62mm; }
.print-sticker__qr svg { width: 100%; height: auto; display: block; }
.print-sticker__how { margin: 0; font-size: 3.8mm; font-weight: 600; }
.print-sticker footer { margin-top: auto; font-size: 3.4mm; color: var(--muted); }
@media print {
  @page { size: A6; margin: 0; }
  body { background: #FFF !important; }
  .no-print { display: none !important; }
  .sticker-page { padding: 0; }
  .print-sticker { box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Главный экран кабинета: выгода, KPI, сканер ---------- */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
.hero-card { position: relative; overflow: hidden; isolation: isolate; border-radius: 26px; padding: 22px 20px 18px; color: #FFF;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 55%, #FFF) 0%, var(--accent) 48%, color-mix(in srgb, var(--accent) 62%, #000) 100%);
  background-color: var(--accent); box-shadow: 0 26px 50px -26px color-mix(in srgb, var(--accent) 85%, #000); }
.hero-card::before, .hero-card::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.14); }
.hero-card::before { width: 260px; height: 260px; right: -90px; top: -110px; }
.hero-card::after { width: 380px; height: 380px; right: -150px; top: -170px; }
.hero-card__icon { position: absolute; right: 6px; top: 4px; width: 92px; height: auto; animation: adm-float 5s ease-in-out infinite; filter: drop-shadow(0 12px 16px rgba(0,0,0,.25)); }
.hero-label { display: block; font: 600 12px/1 var(--ft); letter-spacing: .08em; text-transform: uppercase; opacity: .78; }
.hero-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 12px 0 4px; padding-right: 84px; }
.hero-big b { font: 800 50px/0.95 var(--fd); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hero-big span { font: 600 17px/1.2 var(--ft); opacity: .9; }
.hero-sub { margin: 0 0 12px; font-size: 14px; opacity: .85; max-width: 30ch; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.2); font: 700 12.5px/1 var(--ft); }
.hero-chip.is-down { background: rgba(0,0,0,.22); }
.hero-bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); grid-template-rows: 100%; gap: 5px; align-items: end; height: 76px; margin-top: 18px; }
.hero-bars i { display: block; height: var(--h); border-radius: 6px 6px 3px 3px; background: rgba(255,255,255,.34); transform-origin: 50% 100%; animation: adm-grow .8s cubic-bezier(.2,.9,.25,1.15) both; animation-delay: calc(var(--i) * 35ms + 150ms); }
.hero-bars i.is-today { background: #FFC83D; box-shadow: 0 0 16px rgba(255,200,61,.6); }
.hero-bars__legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; opacity: .7; }
.hero-ask { margin-top: 16px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.14); display: flex; flex-direction: column; gap: 8px; }
.hero-ask label { font: 600 13px/1.35 var(--ft); color: #FFF; }
.hero-ask div { display: flex; align-items: center; gap: 8px; }
.hero-ask input { min-height: 44px; background: #FFF; border: 0; flex: 1; min-width: 0; }
.hero-ask span { font-weight: 600; }
.hero-ask button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: #0C0C14; color: #FFF; font: 700 15px var(--ft); cursor: pointer; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { background: #FFF; border-radius: 18px; padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; animation: adm-rise .5s ease both; }
.kpi:nth-child(2) { animation-delay: .06s; }
.kpi:nth-child(3) { animation-delay: .12s; }
.kpi img { width: 36px; height: 36px; margin-bottom: 6px; }
.kpi b { font: 800 30px/1 var(--fd); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; line-height: 1.25; color: var(--muted); }

.scan-cta { position: relative; gap: 14px; min-height: 86px; padding: 0 18px; border-radius: 22px; box-shadow: 0 16px 30px -16px var(--accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 68%, #000)); background-color: var(--accent); }
.scan-cta span small { display: block; margin-top: 3px; font: 500 13px/1.2 var(--ft); opacity: .78; }
.scan-cta .scan-cta__ico { position: relative; flex: 0 0 auto; width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: rgba(255,255,255,.16); }
.scan-cta__ico::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(255,255,255,.6); animation: adm-pulse 2s ease-out infinite; }

.insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.insight { background: #FFF; border-radius: 18px; padding: 14px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.insight--wide { grid-column: 1 / -1; }
.insight > div:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.insight b { font: 800 22px/1.1 var(--fd); }
.insight small { font-size: 12.5px; color: var(--muted); }
.insight .insight__t { font: 700 16px/1.2 var(--ft); }
.insight img { width: 48px; height: 48px; flex: 0 0 auto; }
.ring { position: relative; flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #ECEBE6 0); animation: adm-ring 1.1s cubic-bezier(.2,.8,.2,1) both; }
.ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #FFF; }
.insight .ring b { position: relative; font: 800 15px/1 var(--fd); }
.list.panel { padding: 14px 16px 6px; }
.list__head h2 { display: flex; align-items: center; gap: 8px; }
.list__head h2 img { width: 26px; height: 26px; }
.list .row-item:last-child { border-bottom: 0; }
.mini-stamps { width: 54px; height: 8px; flex: 0 0 auto; border-radius: 99px; background: #ECEBE6; overflow: hidden; }
.mini-stamps::after { content: ''; display: block; height: 100%; width: var(--p); border-radius: inherit; background: var(--accent); }
.notice { border: 0; background: #FFF4D6; border-radius: 18px; padding: 12px 12px 12px 14px; }
.notice img { width: 44px; height: 44px; flex: 0 0 auto; }

.onboard { position: relative; overflow: hidden; }
.onboard h2 { padding-right: 76px; font-size: 21px; }
.onboard__icon { position: absolute; right: 10px; top: 8px; width: 68px; height: auto; animation: adm-float 5s ease-in-out infinite; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 12px 0 12px 46px; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--fd); background: #F0EFEA; }
.steps li.is-done::before { content: '✓'; background: var(--accent); color: #FFF; }
.steps b, .steps span { display: block; }
.steps span { font-size: 13px; color: var(--muted); }
.steps a { text-decoration: none; display: block; }
.steps a b::after { content: ' →'; color: var(--accent); }

.more { display: flex; flex-direction: column; gap: 10px; }
.more-item { display: flex; align-items: center; gap: 14px; background: #FFF; border-radius: 18px; padding: 14px 14px 14px 12px; text-decoration: none; transition: transform .15s; }
.more-item:active { transform: scale(.98); }
.more-item img { width: 46px; height: 46px; flex: 0 0 auto; }
.more-item > span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.more-item small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.scanner__line { position: absolute; left: 6%; right: 6%; top: 8%; height: 3px; border-radius: 3px; opacity: 0; background: linear-gradient(90deg, transparent, #FFF, transparent); box-shadow: 0 0 14px 2px var(--accent); }
.scanner.is-on .scanner__line { opacity: 1; animation: adm-scan 1.8s ease-in-out infinite alternate; }
.scanner.is-found .scanner__frame { box-shadow: 0 0 0 5px #2BD67B, 0 0 0 999px rgba(0,0,0,.45); transform: scale(1.04); transition: .2s; }
.scanner.is-found .scanner__line { display: none; }
.scanner .btn-ink:disabled { opacity: .6; }

@keyframes adm-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes adm-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes adm-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes adm-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes adm-ring { from { --p: 0; } }
@keyframes adm-scan { from { top: 8%; } to { top: calc(92% - 3px); } }
@media (prefers-reduced-motion: reduce) { .hero-card *, .kpi, .ring, .scan-cta__ico::after, .scanner__line, .onboard__icon { animation: none !important; } }

/* ---------- Рассылка ---------- */
.bc { display: flex; flex-direction: column; gap: 16px; }
.bc h2 { font-size: 18px; }
.bc-h { padding: 0 4px; }
.bc-segs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.bc-seg { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 16px; background: #F6F5F1; border: 1.5px solid transparent; cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s, transform .15s; }
.bc-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; }
.bc-seg img { width: 34px; height: 34px; margin-bottom: 6px; }
.bc-seg b { font: 800 24px/1 var(--fd); }
.bc-seg span { font-size: 12.5px; line-height: 1.25; color: var(--muted); }
.bc-seg:has(input:checked) { background: color-mix(in srgb, var(--accent) 9%, #FFF); border-color: var(--accent); }
.bc-seg:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.bc-seg:active { transform: scale(.97); }
.bc-head { display: flex; align-items: baseline; justify-content: space-between; }
.bc-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bc-tpls { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 2px; }
.bc-tpls::-webkit-scrollbar { display: none; }
.bc-tpl { flex: 0 0 auto; border: 1px solid var(--line); background: #FFF; border-radius: 999px; padding: 8px 14px; font: 600 14px var(--ft); color: var(--ink); cursor: pointer; white-space: nowrap; }
.bc-tpl:active { background: #F0EFEA; }
.bc textarea { min-height: 128px; font-size: 16px; }
.bc-tip { font-size: 12.5px; }
.bc-send:disabled { opacity: .5; }

.tg { border-radius: 22px; padding: 18px 12px 14px; overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.35) 0 2px, transparent 3px) 0 0 / 34px 34px, linear-gradient(160deg, #D7E6C6 0%, #B9D6C0 55%, #A6C8CF 100%); }
.tg__msg { max-width: 92%; display: flex; flex-direction: column; gap: 4px; }
.tg__bubble { position: relative; background: #FFF; border-radius: 16px 16px 16px 4px; padding: 9px 12px 20px; box-shadow: 0 1px 1px rgba(0,0,0,.12); font: 15px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif; color: #000; overflow-wrap: anywhere; }
.tg__sign { margin-top: 8px; }
.tg__sign i { color: #707579; }
.tg__text { white-space: pre-wrap; }
.tg__ph { color: #A0A4A8; }
.tg__quote { margin: 8px 0 0; padding: 4px 8px; border-left: 3px solid #3390EC; border-radius: 4px; background: rgba(51,144,236,.1); font-size: 14px; }
.tg__time { position: absolute; right: 10px; bottom: 5px; font-size: 11.5px; color: #8E9398; }
.tg__btn { position: relative; padding: 9px 12px; border-radius: 10px; text-align: center; font: 500 14px/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif; color: #FFF; background: rgba(20,50,40,.32); }
.tg__btn::after { content: '↗'; position: absolute; right: 7px; top: 3px; font-size: 10px; opacity: .8; }

.bc-hist { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bc-hist:last-child { border-bottom: 0; }
.bc-hist p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; white-space: pre-line; }
.bc-hist__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.bc-hist__n { margin-left: auto; font-weight: 600; color: var(--ink); }
.bc-chip { padding: 3px 9px; border-radius: 999px; background: #F0EFEA; color: var(--ink); font-weight: 600; }
.bc-hist__bar { height: 4px; margin-top: 8px; border-radius: 99px; background: #ECEBE6; overflow: hidden; }
.bc-hist__bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* Визит сегодня уже засчитан */
.mp__done { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: #E5F4EC; color: #14532D; }
.mp__done svg { flex: 0 0 auto; }
.mp__done span { display: flex; flex-direction: column; line-height: 1.3; }
.mp__done small { font-size: 13px; color: #3F6B52; }

/* ---------- Карточка клиента: кто перед кассиром ---------- */
.mp__id { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 4px 0 6px; }
.mp__photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; background: #E6E5E0; box-shadow: 0 0 0 4px #FFF, 0 0 0 6px var(--accent); }
.mp__photo--none { display: grid; place-items: center; font: 800 38px/1 var(--fd); color: var(--ink); }
.mp__photo--none[hidden] { display: none; }
.mp__name { font: 800 24px/1.15 var(--fd); letter-spacing: -0.02em; }
.mp__id small { font-size: 13px; color: var(--muted); }
.mp__check { margin: 8px 0 0; padding: 6px 12px; border-radius: 999px; background: #F3F2EE; font-size: 12.5px; color: var(--text); }
.mp__check b { color: #B42318; }
.hist__who { display: block; font-size: 12px; color: var(--muted); }

/* ---------- Контроль кассы ---------- */
.cashier { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cashier:last-of-type { border-bottom: 0; }
.cashier__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cashier__text small { font-size: 13px; color: var(--muted); }
.cashier__manual { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cashier.is-warn .cashier__manual { color: #B42318; background: #FDECEA; padding: 4px 9px; border-radius: 999px; }
.cashiers__tip { margin: 8px 0 6px; padding: 10px 12px; border-radius: 12px; background: #FFF4D6; font-size: 13px; line-height: 1.4; }
