/* ============================================================
   mix Витрина — дизайн-система и стили Mini App
   ============================================================ */

:root {
  --accent: #9769FD;
  --accent-600: #7c4dee;
  --accent-700: #6a3ce0;
  --accent-soft: #EDE7FF;
  --accent-softer: #F3EFFF;
  --bg: #F9F6FF;
  --text: #161616;
  --text-2: #5b5670;
  --muted: #918da8;
  --surface: #FFFFFF;
  --line: #ece7f7;
  --line-2: #f0ecfa;
  --success: #34c17b;
  --danger: #ff5d6c;
  --warn: #ffb020;

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --r-pill: 999px;

  --shadow-sm: 0 4px 14px rgba(90, 60, 180, .06);
  --shadow-md: 0 12px 30px rgba(90, 60, 180, .10);
  --shadow-lg: 0 20px 50px rgba(90, 60, 180, .16);

  --app-w: 440px;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

/* Базовый размер inline-иконок (защита от «раздувания» SVG без width/height) */
.screen svg { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.pill-note svg, .summary svg, .lead svg { width: 15px; height: 15px; }
.action .ic svg { width: 22px; height: 22px; }
.plan-feats .fc { display: inline-flex; color: var(--success); vertical-align: -2px; }
.plan-feats .fc svg { width: 14px; height: 14px; }
.success-ic svg { width: 46px; height: 46px; }
.empty svg { width: 54px; height: 54px; }
.shop-header .meta svg { width: 15px; height: 15px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Прокручиваемый экран ---------- */
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 18px 24px;
  scrollbar-width: none;
}
.screen.with-tabs { padding-bottom: 100px; }   /* запас под нижнее меню — только когда оно есть */
.screen::-webkit-scrollbar { display: none; }

/* ---------- Топ-бар ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 2px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.topbar .title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.topbar .sub { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.iconbtn {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .15s;
}
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 20px; height: 20px; }
.spacer { flex: 1; }

/* ---------- Кнопки ---------- */
.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  border-radius: var(--r-pill);
  padding: 15px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: .16s ease;
  letter-spacing: -.01em;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 22px var(--accent-shadow, rgba(151,105,253,.35)); }
.btn-primary:hover { background: var(--accent-600); }
.btn-dark { background: var(--text); color: #fff; }
.btn-soft { background: var(--accent-soft); color: var(--accent-700); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 17px 24px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Карточки ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-2);
}

/* ---------- Чипы / категории ---------- */
.chips { display: flex; gap: 9px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700; color: var(--text-2);
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- Хиро на онбординге ---------- */
.hero {
  background: linear-gradient(160deg, #fff 0%, #f4efff 100%);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero .blob { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .5; }

/* ---------- Логотип ---------- */
.brandmark { display: inline-flex; align-items: center; gap: 10px; }
.brandmark img { height: 26px; }

/* Брендовая шапка дашборда (лого по центру + подпись ниже) */
.brandbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 0 16px;
  background: linear-gradient(var(--bg) 72%, transparent);
}
.brandbar img { height: 30px; }
.brandbar-sub { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }

/* Символ-знак лого в шапках внутренних экранов */
.brand-sym { height: 24px; width: auto; flex: none; display: block; }
.topbar .brand-sym { margin-left: 8px; opacity: .9; }

/* Сегмент-переключатель (Товар / Услуга) */
.seg { display: flex; gap: 8px; background: var(--accent-softer); padding: 5px; border-radius: var(--r-sm); }
.seg-btn {
  flex: 1; border: none; background: transparent; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: 14px; color: var(--text-2);
  padding: 11px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .15s;
}
.seg-btn.on { background: var(--surface); color: var(--accent-700); box-shadow: var(--shadow-sm); }
.seg-btn svg { width: 17px; height: 17px; }
.seg-hint { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 8px; line-height: 1.45; }

.info-card {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-softer); border-radius: var(--r-sm); padding: 14px;
  font-size: 13px; color: var(--accent-700); font-weight: 600; line-height: 1.45; margin-bottom: 16px;
}
.info-card svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* Строка с чекбоксом */
.check-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 13px 15px; margin-bottom: 16px; font-size: 14px; font-weight: 700; color: var(--text-2);
}

/* Мини-тег «услуга» / тип заявки */
.mini-tag {
  display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  background: var(--accent-soft); color: var(--accent-700); padding: 2px 7px; border-radius: 6px; vertical-align: 1px;
}
.mini-tag.svc { background: #ffe9c9; color: #b57900; }

/* Кнопки под заявкой */
.lead-actions { display: flex; gap: 9px; margin-top: 12px; }
.lead-actions .btn { flex: 1; }

/* ---------- Онбординг ---------- */
.onb { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 14px; }
.onb-art {
  border-radius: var(--r-lg);
  flex: 1 1 auto; min-height: 120px;
  display: grid; place-items: center;
  margin: 6px 0 18px;
  position: relative;
  overflow: hidden;
}
.onb-art > div { font-size: clamp(64px, 16vh, 104px); line-height: 1; }
.onb h1 { font-size: 27px; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 10px; font-weight: 800; }
.onb .hl { background: var(--accent-soft); color: var(--accent-700); padding: 0 8px; border-radius: 8px; }
.onb p { font-size: 15px; line-height: 1.45; color: var(--text-2); margin: 0; font-weight: 500; }
.dots-nav { display: flex; gap: 7px; justify-content: center; margin: 16px 0; }
.dots-nav i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-soft); transition: .2s; }
.dots-nav i.on { width: 26px; border-radius: 6px; background: var(--accent); }

/* ---------- Дашборд: приветствие ---------- */
.greeting { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.greeting .hi { font-size: 13px; color: var(--muted); font-weight: 600; }
.greeting .nm { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }

/* ---------- Статистика ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--surface); border-radius: var(--r-sm); padding: 14px 12px;
  border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
}
.stat .n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat.accent { background: var(--accent); border-color: var(--accent); }
.stat.accent .n, .stat.accent .l { color: #fff; }
.stat.accent .l { opacity: .85; }

/* ---------- Секции ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 8px; }
.section-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.section-head a { font-size: 13px; color: var(--accent-700); font-weight: 700; text-decoration: none; }

/* ---------- Быстрые действия ---------- */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.action {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 16px; cursor: pointer; box-shadow: var(--shadow-sm); transition: .15s;
  display: flex; flex-direction: column; gap: 12px;
}
.action:active { transform: scale(.98); }
.action .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-700); }
.action.dark { background: var(--text); border-color: var(--text); }
.action.dark .t, .action.dark .d { color: #fff; }
.action.dark .ic { background: rgba(255,255,255,.14); color: #fff; }
.action .t { font-weight: 800; font-size: 15px; }
.action .d { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- Список товаров (владелец) ---------- */
.prod-row {
  display: flex; gap: 13px; align-items: center; padding: 12px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); margin-bottom: 10px;
}
.prod-row .thumb { width: 62px; height: 62px; border-radius: 14px; object-fit: cover; flex: 0 0 62px; background: var(--accent-softer); }
.prod-row .info { flex: 1; min-width: 0; }
.prod-row .nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-row .pr { font-weight: 800; color: var(--accent-700); font-size: 14px; margin-top: 3px; }
.prod-row .badge-hidden { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---------- Витрина: карточки товаров ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.pcard {
  background: var(--surface); border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); cursor: pointer; transition: .15s;
  display: flex; flex-direction: column;
}
.pcard:active { transform: scale(.98); }
.pcard .ph { position: relative; width: 100%; padding-top: 100%; background: var(--accent-softer); overflow: hidden; }
.pcard .ph > img, .pcard .ph > div:not(.status-tag) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.pcard .status-tag {
  position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); backdrop-filter: blur(4px);
  font-size: 10.5px; font-weight: 800; padding: 5px 10px; border-radius: var(--r-pill); color: var(--text);
}
.pcard .body { padding: 12px 12px 13px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.pcard .nm { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.pcard .cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .cat { font-size: 11px; color: var(--muted); font-weight: 600; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.pcard .pr { font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.pcard .add {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; border: none; cursor: pointer; box-shadow: 0 6px 14px rgba(151,105,253,.4);
}
.pcard .add:active { transform: scale(.9); }
.pcard .add.svc { background: #ffb020; box-shadow: 0 6px 14px rgba(255,176,32,.4); }
.pcard .add.off { background: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.pcard .status-tag.off { color: var(--danger); }

/* ---------- Звёзды и репутация ---------- */
.stars { display: inline-flex; gap: 1px; font-size: 14px; line-height: 1; letter-spacing: 1px; }
.stars .star { color: #e2dcf2; }
.stars .star.on { color: #ffb020; }

.trust-strip {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 12px 15px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
  font-size: 13px; font-weight: 700; color: var(--text-2);
}
.trust-strip b { color: var(--text); font-size: 14px; margin-left: 2px; }
.ts-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); display: inline-block; }

.rating-hero {
  display: flex; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.rating-hero .rh-num { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.rating-hero .rh-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 7px; }

/* Карточка отзыва */
.review {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 15px; box-shadow: var(--shadow-sm); margin-bottom: 11px;
}
.review .rv-top { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.review .rv-av {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent-700);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.review .rv-name { font-weight: 800; font-size: 14.5px; }
.review .rv-date { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.review .rv-text { font-size: 14px; line-height: 1.55; color: var(--text-2); font-weight: 500; }

/* Выбор оценки в форме отзыва */
.star-pick { display: flex; gap: 10px; font-size: 40px; line-height: 1; }
.star-pick .sp { color: #e2dcf2; cursor: pointer; transition: .12s; }
.star-pick .sp.on { color: #ffb020; }
.star-pick .sp:active { transform: scale(.85); }

/* ---------- Лента предпросмотра (режим владельца) ---------- */
.preview-ribbon {
  display: flex; align-items: center; gap: 8px;
  background: var(--text); color: #fff; border-radius: var(--r-pill);
  padding: 10px 8px 10px 16px; font-size: 12.5px; font-weight: 700; margin-bottom: 14px;
}
.preview-ribbon svg { width: 15px; height: 15px; flex: none; }
.preview-ribbon button {
  margin-left: auto; border: none; cursor: pointer; font-family: var(--font);
  background: rgba(255,255,255,.16); color: #fff; font-weight: 700; font-size: 12.5px;
  padding: 7px 14px; border-radius: var(--r-pill); flex: none;
}

/* ---------- Шапка публичной витрины ---------- */
.shop-header {
  border-radius: var(--r-lg); padding: 22px; color: #fff; margin-bottom: 16px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-700) 100%);
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.shop-header::after { content:""; position:absolute; width:180px; height:180px; border-radius:50%; background:rgba(255,255,255,.12); right:-50px; top:-60px; }
.shop-header .logo { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 26px; margin-bottom: 12px; }
.shop-header h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.02em; }
.shop-header p { margin: 0; font-size: 14px; opacity: .9; line-height: 1.4; font-weight: 500; }
.shop-header .meta { display: flex; gap: 16px; margin-top: 16px; font-size: 12.5px; font-weight: 700; }
.shop-header .meta span { display: flex; align-items: center; gap: 5px; opacity: .95; }

/* Buyer storefront: readable text for every seller accent, compact mobile cards. */
.storefront .shop-header {
  color: var(--text); background: linear-gradient(145deg, var(--accent-softer), #fff 78%);
  border: 1px solid var(--line); padding: 24px; box-shadow: var(--shadow-sm);
}
.storefront .shop-header::after { pointer-events: none; background: var(--accent); opacity: .08; }
.storefront .shop-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 18px; }
.storefront .shop-header .logo { width: 72px; height: 72px; font-size: 32px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.storefront .shop-header h1 { font-size: 27px; line-height: 1.15; overflow-wrap: anywhere; }
.storefront .shop-header p { color: var(--muted); opacity: 1; line-height: 1.55; overflow-wrap: anywhere; }
.storefront .shop-header .meta { flex-wrap: wrap; gap: 8px 16px; color: var(--muted); }
.storefront .shop-header .meta span { max-width: 100%; overflow-wrap: anywhere; }
.storefront .shop-contact, .storefront .shop-delivery { min-height: 44px; position: relative; z-index: 1; }
.storefront .trust-strip { flex-wrap: wrap; gap: 6px; min-height: 48px; }
.no-rating { color: var(--muted); font-size: 12px; }
.storefront .pcard .foot { gap: 8px; align-items: flex-end; }
.storefront .pcard .pr { overflow-wrap: anywhere; min-width: 0; line-height: 1.35; }
.storefront .pcard .add { flex: none; width: 44px; height: 44px; box-shadow: none; }
.storefront .pcard.sold-out .ph > img { opacity: .6; }
.storefront .pcard .status-tag { max-width: calc(100% - 12px); font-size: 10px; }
.image-fallback { display: grid; place-items: center; width: 100%; height: 100%; font-size: 32px; background: var(--accent-softer); }
.storefront .pcard .ph > .image-fallback { position: absolute; inset: 0; }
@media (max-width: 350px) {
  .storefront .grid { gap: 8px; }
  .storefront .pcard .body { padding: 10px 8px; }
  .storefront .pcard .foot { flex-wrap: wrap; }
  .storefront .shop-header { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .storefront *, .storefront *::before, .storefront *::after { animation: none !important; transition: none !important; }
}

/* ---------- Карточка товара (детально) ---------- */
.gallery { position: relative; width: 100%; padding-top: 100%; border-radius: var(--r-lg); overflow: hidden; background: var(--accent-softer); margin-bottom: 16px; }
.gallery > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.detail h1 { font-size: 24px; letter-spacing: -.02em; margin: 4px 0 6px; }
.detail .price-lg { font-size: 26px; font-weight: 800; color: var(--accent-700); letter-spacing: -.02em; }
.detail .desc { color: var(--text-2); line-height: 1.55; font-size: 15px; margin: 14px 0; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Формы ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text-2); }
.input, textarea.input, select.input {
  width: 100%; font-family: var(--font); font-size: 15px; font-weight: 500;
  padding: 14px 16px; border-radius: var(--r-sm); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text); transition: .15s; outline: none;
}
.input:focus, textarea.input:focus, select.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-softer); }
textarea.input { resize: vertical; min-height: 90px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Загрузка фото */
.uploader { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.upcell { position: relative; padding-top: 100%; border-radius: var(--r-sm); border: 1.5px dashed var(--line); background: var(--accent-softer); color: var(--accent); cursor: pointer; overflow: hidden; }
.upcell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upcell svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Свотчи темы */
.swatches { display: flex; gap: 12px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; border: 3px solid #fff; box-shadow: var(--shadow-sm); position: relative; }
.swatch.on::after { content:""; position:absolute; inset:-6px; border:2px solid var(--text); border-radius:50%; }

/* ---------- Корзина ---------- */
.cart-item { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.cart-item .thumb { width: 58px; height: 58px; border-radius: 13px; object-fit: cover; background: var(--accent-softer); }

/* --- Категории (управление) --- */
.cat-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; margin-top: 10px; }
.cat-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13.5px; }
.cat-count { font-size: 12px; color: var(--muted); font-weight: 700; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; }
.cat-rm { border: 0; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 0 0 2px; }
.cat-rm:hover { color: var(--danger); }
.cat-pick .chip { cursor: pointer; }

/* --- Разделы каталога (товары / услуги) --- */
.catalog-sec { margin-bottom: 12px; }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; }
.sec-title h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.sec-title svg { width: 20px; height: 20px; color: var(--accent-700); flex-shrink: 0; }
.sec-count { font-size: 12px; font-weight: 700; color: var(--accent-700); background: var(--accent-soft); border-radius: var(--r-pill); padding: 2px 9px; }
.catalog-sec.service { background: var(--accent-softer); border-radius: var(--r-md); padding: 14px 12px 4px; }

/* --- Карточки услуг --- */
.svc-list { display: flex; flex-direction: column; gap: 10px; }
.svc-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); cursor: pointer; transition: .12s; }
.svc-card:active { transform: scale(.99); }
.svc-thumb { width: 54px; height: 54px; border-radius: 13px; background: var(--accent-softer); display: grid; place-items: center; font-size: 26px; overflow: hidden; flex-shrink: 0; }
.svc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.svc-body .cat { font-size: 11px; color: var(--muted); font-weight: 600; }
.svc-body .nm { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.svc-body .cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-body .pr { font-weight: 800; font-size: 15px; color: var(--accent-700); letter-spacing: -.02em; }
.svc-req { flex-shrink: 0; white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: 18px; font-weight: 700; cursor: pointer; color: var(--accent-700); display: grid; place-items: center; }
.qty span { min-width: 20px; text-align: center; font-weight: 800; }

.summary { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); }
.summary .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--text-2); font-weight: 500; }
.summary .total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 800; }

/* ---------- Заявки ---------- */
.lead {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 15px; box-shadow: var(--shadow-sm); margin-bottom: 11px;
}
.lead .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.lead .who { font-weight: 800; font-size: 15px; }
.lead .when { font-size: 12px; color: var(--muted); font-weight: 600; }
.lead .items { font-size: 13.5px; color: var(--text-2); line-height: 1.5; font-weight: 500; }
.lead .sum { font-weight: 800; color: var(--accent-700); margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 5px 11px; border-radius: var(--r-pill); }
.tag.new { background: var(--accent-soft); color: var(--accent-700); }
.tag.in_progress { background: #fff2d9; color: #b57900; }
.tag.done { background: #d9f7e7; color: #1c9a5f; }
.tag.rejected { background: #ffe0e4; color: #d83a49; }

/* ---------- Пост в канал (превью) ---------- */
.post-preview {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.post-preview .cover { aspect-ratio: 16/9; background: linear-gradient(140deg, var(--accent), var(--accent-700)); display: grid; place-items: center; color: #fff; }
.post-preview .pbody { padding: 16px; }
.post-preview .ch { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.post-preview .ch .cav { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-700); font-weight: 800; }
.post-preview .ch .cn { font-weight: 800; font-size: 14px; }
.post-preview .ch .cn small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }
.post-preview .ptext { font-size: 14px; line-height: 1.5; color: var(--text); font-weight: 500; }

/* ---------- Успех ---------- */
.success-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 20px; }
.success-ic { width: 96px; height: 96px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 22px; color: var(--accent); animation: pop .4s ease; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.success-wrap h1 { font-size: 24px; margin: 0 0 10px; letter-spacing: -.02em; }
.success-wrap p { color: var(--text-2); font-size: 15px; line-height: 1.5; margin: 0 0 26px; max-width: 300px; font-weight: 500; }

/* ---------- Нижняя навигация ---------- */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 78px; padding: 10px 20px 20px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-around; align-items: center; z-index: 30;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; color: var(--muted); transition: .15s; padding: 4px 10px; border-radius: 12px; }
.tab svg { width: 23px; height: 23px; }
.tab span { font-size: 10.5px; font-weight: 700; }
.tab.active { color: var(--accent-700); }
.tab.fab {
  background: var(--accent); color: #fff; width: 52px; height: 52px; border-radius: 18px;
  justify-content: center; margin-top: -18px; box-shadow: 0 10px 22px rgba(151,105,253,.45);
}
.tab.fab span { display: none; }
.tab.fab svg { width: 26px; height: 26px; }

/* ---------- Плавающая корзина ---------- */
.cart-fab {
  position: absolute; left: 18px; right: 18px; bottom: 20px; z-index: 25;
  background: var(--text); color: #fff; border-radius: var(--r-pill); padding: 15px 22px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  box-shadow: var(--shadow-lg); animation: slideup .3s ease;
}
@keyframes slideup { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cart-fab .l { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.cart-fab .count { background: var(--accent); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.cart-fab .r { font-weight: 800; }

/* ---------- Разное ---------- */
.empty { text-align: center; padding: 24px 20px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; margin-bottom: 10px; color: var(--accent-soft); }
.empty p { font-weight: 600; font-size: 14px; margin: 0; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.pill-note { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-700); font-size: 12px; font-weight: 700; padding: 7px 13px; border-radius: var(--r-pill); }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 13px 22px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; z-index: 999; box-shadow: var(--shadow-lg);
  animation: toastin .3s ease;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }


/* ---------- Mini App: полноэкранный режим внутри MAX ---------- */
.device {
  width: 100%; max-width: var(--app-w); margin: 0 auto; height: 100vh; height: 100dvh;
  position: relative; display: flex; flex-direction: column; background: var(--bg);
}
.screen { padding-top: max(6px, env(safe-area-inset-top)); }
.tabbar { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
button { font-family: var(--font); }
a.btn { text-decoration: none; }
.link { color: var(--accent-700); font-weight: 700; text-decoration: none; cursor: pointer; }
.lead-contact { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.check-inline { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; margin: 4px 0 14px; }
.check-inline input { width: 20px; height: 20px; accent-color: var(--accent); }
.uploader .upcell { position: relative; }
.uploader .upcell .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(22,22,22,.65); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.uploader input[type=file] { display: none; }
.gallery img, .thumb img, .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.gallery-strip img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; cursor: pointer; flex: none; }
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 24px; gap: 14px; }
.gate img { height: 44px; }
.gate h1 { font-size: 26px; letter-spacing: -.02em; margin: 6px 0 0; }
.gate p { color: var(--text-2); font-weight: 500; line-height: 1.5; margin: 0; max-width: 320px; }
.admin-shop { padding: 14px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tag.blocked { background: #ffe6e9; color: var(--danger); }

/* ---------- Удобство и доступность ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.iconbtn, .chip, .tab, .btn-sm { min-height: 44px; }
.iconbtn { min-width: 44px; }
.toast { max-width: calc(100vw - 32px); text-align: center; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.skel { padding: 18px 2px; display: grid; gap: 14px; }
.skel i { display: block; border-radius: 16px; background: linear-gradient(90deg, #efe9fb 25%, #f8f5ff 50%, #efe9fb 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel-h { height: 54px; width: 60%; }
.skel-b { height: 92px; }
.skel-b.short { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.sheet-overlay { position: fixed; inset: 0; background: rgba(22,22,22,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; animation: fade .15s ease; }
.sheet { width: 100%; max-width: var(--app-w); background: var(--surface); border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.sheet h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.01em; }
.sheet p { margin: 0 0 18px; color: var(--text-2); font-weight: 500; line-height: 1.45; font-size: 14.5px; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; }

/* --- Кроп фото --- */
.cropper .crop-info { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.crop-frame { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 2px auto 8px; border-radius: var(--r-md); overflow: hidden; background: #000; touch-action: none; cursor: grab; }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.crop-frame::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); border-radius: var(--r-md); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 12px; margin: 6px 4px 4px; color: var(--muted); font-weight: 700; }
.crop-zoom input[type=range] { flex: 1; accent-color: var(--accent); }

/* --- Карточка-предупреждение (удаление/восстановление) --- */
.danger-card { background: #fff2f2; border: 1px solid #ffd6d6; border-radius: var(--r-sm); padding: 14px; color: var(--danger); }
.danger-card .btn-primary { background: var(--accent); color: #fff; }

/* --- Подвал витрины с логотипом mix Витрина --- */
.shop-footer { text-align: center; padding: 22px 0 6px; margin-top: 20px; }
.shop-footer .sf-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.shop-footer .sf-actions .btn-sm svg { width: 15px; height: 15px; }
.shop-footer .sf-contact { margin-top: 12px; font-size: 13px; color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.shop-footer .sf-contact svg { width: 14px; height: 14px; }
.shop-footer .sf-brand { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.shop-footer .sf-brand .brand-lockup { opacity: .55; }
.shop-footer .sf-brand span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }

/* --- Лого-связка «Max Витрина» --- */
.brand-lockup { display: inline-block; vertical-align: middle; }

/* --- Полиш: анимации кнопок, чипов, карточек, переходов --- */
.btn { transition: transform .12s ease, box-shadow .22s ease, background .2s ease, filter .2s ease; will-change: transform; }
.btn:active { transform: scale(.97); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 15px 28px var(--accent-shadow, rgba(151,105,253,.42)); }
.btn-primary:active { transform: scale(.97); }
.btn-lg { transition: transform .12s ease, box-shadow .22s ease, background .2s ease; }
.chip:active, .seg-btn:active, .swatch:active { transform: scale(.94); }
.chip.active { animation: pop .2s ease; }
.tab:active { transform: scale(.9); }
.tab.active svg { animation: pop .24s ease; }
.tab.fab:active { transform: scale(.88); }
.swatch { transition: transform .14s ease, box-shadow .2s ease; }
.pcard { transition: transform .14s ease, box-shadow .22s ease; }
.pcard:hover, .svc-card:hover { box-shadow: 0 12px 26px rgba(90,60,180,.14); }
.pcard:active, .svc-card:active { transform: scale(.98); }
.add { transition: transform .14s ease, box-shadow .2s ease; }
.add:hover { transform: scale(1.1); }
.add:active { transform: scale(.88); }
.cart-fab { animation: fabIn .32s cubic-bezier(.2,.7,.3,1); transition: transform .15s ease, box-shadow .22s ease; }
.cart-fab:active { transform: scale(.98); }
.action { transition: transform .14s ease, box-shadow .22s ease; }
.action:active { transform: scale(.97); }
.stat { transition: transform .14s ease; }
.stat:active { transform: scale(.97); }
@keyframes pop { 0% { transform: scale(.82); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes fabIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* более плавный переход между экранами */
.fade-in { animation: fade .32s cubic-bezier(.22,.61,.36,1); }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* --- Заголовки секций в настройках --- */
.settings-sec { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-700); margin: 16px 2px 8px; }
.settings-sec:first-of-type { margin-top: 4px; }

/* --- Панель форматирования поста --- */
.fmt-bar { display: flex; gap: 8px; margin-bottom: 8px; }
.fmt-btn { width: 42px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; cursor: pointer; font-size: 16px; color: var(--text); transition: transform .12s ease, background .15s ease; }
.fmt-btn:hover { background: var(--accent-softer); }
.fmt-btn:active { transform: scale(.9); }

.checklist { margin-bottom: 14px; }
.ck-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.ck-head span { color: var(--muted); font-weight: 700; }
.ck-bar { height: 6px; border-radius: 6px; background: var(--accent-soft); overflow: hidden; margin-bottom: 8px; }
.ck-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.ck-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ck-row.ok { color: var(--muted); cursor: default; text-decoration: line-through; }
.ck-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--accent-soft); display: grid; place-items: center; flex: none; }
.ck-row.ok .ck-dot { background: var(--success); border-color: var(--success); color: #fff; }
.ck-dot svg { width: 13px !important; height: 13px !important; }

.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .input { flex: 1; min-width: 0; }
.promo-row { display: flex; align-items: center; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); margin-top: 10px; }
.promo-row > div { flex: 1; }
.chips { flex-wrap: wrap; }

/* ---------- Тарифы ---------- */
.plan-card { margin-bottom: 12px; }
.plan-card.current { border: 2px solid var(--accent); }
.plan-card.pro { background: linear-gradient(160deg, var(--accent-softer), var(--surface)); }
.plan-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 18px; }
.plan-top b { display: flex; gap: 6px; align-items: center; }
.plan-price { font-weight: 800; color: var(--accent-700); font-size: 22px; }
.plan-price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.plan-f { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; color: var(--text-2); padding: 4px 0; }
.plan-f svg { color: var(--success); width: 15px !important; height: 15px !important; }
.periods .disc { color: var(--success); font-weight: 800; margin-left: 4px; }
.chip.active .disc { color: #b9f3d3; }
.swatch.locked { opacity: .45; }
.swatch.locked::before { content: ""; background-image:url("/assets/ui/lock.svg"); background-size:16px 16px; background-position:center; background-repeat:no-repeat; position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* Визуальный редактор поста */
.rich-post { min-height:200px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.rich-post:focus { outline:2px solid var(--accent); outline-offset:2px; }
.fmt-bar { flex-wrap:wrap; gap:6px; }
.fmt-bar .fmt-btn { width:auto; min-height:44px; padding:8px 12px; font-size:13px; }

.post-format-menu { position:fixed; z-index:1000; margin:0; padding:6px; max-width:calc(100vw - 16px); background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:0 6px 24px rgba(0,0,0,.18); gap:4px; }
.post-format-menu[hidden] { display:none; }
.post-format-menu .fmt-btn { border:0; padding:8px 10px; }
.post-format-menu .fmt-btn[aria-pressed="true"] { background:var(--accent-softer); }

/* Illustrated header: decoration never covers the content or controls. */
.frame-meadow { background-image:url('/assets/decor/frame-meadow.svg') !important; }
.frame-sea { background-image:url('/assets/decor/frame-sea.svg') !important; }
.frame-forest { background-image:url('/assets/decor/frame-forest.svg') !important; }
.storefront .shop-header.framed { position:relative; background-size:100% 100%; background-repeat:no-repeat; padding:30px 28px 72px; border:0; isolation:isolate; }
.storefront .shop-header.with-totem { position:relative; padding-bottom:96px; }
.header-totem { position:absolute; right:22px; bottom:6px; width:94px; height:80px; object-fit:contain; pointer-events:none; }
.storefront .shop-header.framed h1 { font-family:Georgia,'Times New Roman',serif; font-weight:600; letter-spacing:-.6px; }
.storefront .shop-header.framed .shop-kicker { color:#526951; }
.storefront .shop-header.framed .logo { box-shadow:0 4px 16px #384e4714; background:#fffdf5; }
.decor-settings { margin:24px 0; padding:18px 14px; border:1px solid var(--line); border-radius:24px; background:var(--surface); }
.decor-heading { display:flex; align-items:flex-start; gap:8px; justify-content:space-between; margin-bottom:20px; }
.decor-heading h2 { margin:0; font-size:20px; }
.decor-heading p { margin:6px 0 0; font-size:12px; color:var(--muted); }
.decor-beta { white-space:nowrap; border-radius:20px; padding:6px 8px; font-size:10px; color:#59735e; background:#edf3e9; }
.decor-label { display:block; font-size:13px; font-weight:700; margin:20px 0 10px; }
.decor-frames { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.decor-option { min-width:0; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:16px; padding:6px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:6px; font:inherit; }
.decor-option > span:last-child { padding:2px 0 6px; font-size:12px; font-weight:600; }
.decor-option.selected { border:2px solid var(--accent); padding:5px; box-shadow:0 0 0 2px var(--accent-soft); }
.frame-sample { width:100%; height:120px; background-size:100% 100%; display:grid; place-items:center; border-radius:11px; }
.frame-sample > span { font:600 18px/1.15 Georgia,serif; color:#384e47; text-align:center; margin-bottom:20px; }
.frame-plain { background:#f6f5fa; }
.decor-totems { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.decor-totems img,.no-totem { width:100%; height:60px; object-fit:contain; }
.no-totem { display:grid; place-items:center; color:var(--muted); font-size:24px; }
.decor-preview .shop-header { margin:0; }
.decor-preview .logo img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.decor-preview-contact { display:inline-block; margin-top:10px; padding:10px 14px; background:var(--accent); color:white; font-size:12px; border-radius:12px; }
@media(max-width:360px) { .storefront .shop-header.framed { padding-left:25px; padding-right:25px; } .decor-preview h1 { font-size:25px; } .decor-heading { flex-wrap:wrap; } }
.storefront .shop-header.framed::after { display:none; }
.storefront .shop-header.framed p,.storefront .shop-header.framed .meta { color:#5b6b5d; }
.storefront .shop-header.frame-sea p,.storefront .shop-header.frame-sea .meta { color:#526e70; }

.storefront .shop-header.framed .logo { width:60px; height:60px; font-size:28px; margin-bottom:10px; }
.storefront .shop-header.framed .shop-kicker { margin-bottom:12px; }
.storefront .shop-header.framed h1 { font-size:25px; }
.storefront .shop-header .shop-contact { background:var(--accent); color:#fff; }
.storefront .shop-header .shop-contact:hover { background:var(--accent-600); }
.storefront .shop-header .shop-delivery { background:var(--accent-soft); color:var(--accent-700); }

.frame-city { background-image:url('/assets/decor/frame-city.svg') !important; }
.frame-travel { background-image:url('/assets/decor/frame-travel.svg') !important; }
.frame-studio { background-image:url('/assets/decor/frame-studio.svg') !important; }
.settings-page .topbar { position:sticky; top:-1px; z-index:10; background:var(--bg); padding-top:8px; padding-bottom:12px; }
.settings-profile { display:flex; align-items:center; gap:12px; padding:16px; margin:4px 0 20px; background:var(--surface); border:1px solid var(--line); border-radius:20px; }
.settings-profile b { font-size:17px; overflow-wrap:anywhere; }
.settings-profile small { display:block; color:var(--muted); font-size:12px; margin-top:5px; }
.settings-avatar { width:48px; height:48px; flex:none; display:grid; place-items:center; border-radius:15px; font-size:25px; background:var(--accent-softer); overflow:hidden; }
.settings-avatar img { width:100%; height:100%; object-fit:cover; }
.settings-caption { text-transform:uppercase; letter-spacing:.08em; font-weight:700; font-size:10px; color:var(--muted); margin:20px 12px 9px; }
.settings-group { background:var(--surface); border:1px solid var(--line); border-radius:18px; margin-bottom:8px; }
.settings-group > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:12px; padding:14px; min-height:72px; }
.settings-group > summary::-webkit-details-marker { display:none; }
.settings-group > summary b { display:block; font-size:14px; }
.settings-group > summary small { display:block; font-size:11px; color:var(--muted); margin-top:5px; overflow-wrap:anywhere; }
.settings-group-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:12px; background:var(--accent-softer); color:var(--accent-700); flex:none; }
.settings-chevron { margin-left:auto; font-size:25px; color:var(--muted); transition:transform .15s; }
.settings-group[open] > summary .settings-chevron { transform:rotate(90deg); }
.settings-group[open] > summary { border-bottom:1px solid var(--line); }
.settings-group-body { padding:16px 14px 8px; }
.settings-group-body .field:last-child { margin-bottom:6px; }
.settings-group-body input[type=checkbox] { width:20px; height:20px; accent-color:var(--accent); }
.settings-save-note { margin:18px 12px; color:var(--muted); font-size:11px; line-height:1.5; }
.settings-decor-launch { display:flex; align-items:center; text-align:left; gap:12px; width:100%; border:1px solid var(--line); background:var(--accent-softer); border-radius:16px; padding:10px; margin-bottom:22px; color:var(--text); cursor:pointer; font:inherit; }
.settings-decor-launch b { display:block; font-size:14px; }
.settings-decor-launch small { display:block; font-size:11px; color:var(--muted); margin-top:5px; }
.settings-decor-launch > svg { margin-left:auto; flex:none; }
.settings-decor-thumb { width:56px; height:64px; flex:none; border-radius:10px; background-size:100% 100%; display:grid; place-items:center; }
.settings-decor-thumb img { width:48px; height:44px; object-fit:contain; align-self:end; }
.settings-link { display:flex; align-items:center; gap:10px; width:100%; border:0; background:none; color:var(--text); font:inherit; font-size:13px; padding:13px 2px; cursor:pointer; }
.settings-link svg:last-child { margin-left:auto; }
.settings-danger { color:var(--danger); }
.decor-dialog { width:min(420px,calc(100% - 20px)); max-height:88vh; max-height:88dvh; border:0; border-radius:24px; padding:0; color:var(--text); background:var(--surface); box-shadow:0 20px 80px #16161633; display:none; overflow:hidden; }
.decor-dialog[open] { display:flex; flex-direction:column; }
.decor-dialog::backdrop { background:#25263080; backdrop-filter:blur(3px); }
.decor-menu-header { display:flex; align-items:center; justify-content:space-between; padding:18px 16px 14px; border-bottom:1px solid var(--line); flex:none; gap:8px; }
.decor-menu-header h2 { font-size:18px; margin:0; }
.decor-menu-choice { color:var(--muted); font-size:11px; margin:6px 0 0; }
.decor-menu-content { overflow-y:auto; min-height:0; flex:1; overscroll-behavior:contain; }
.decor-menu-tabs { position:sticky; top:0; z-index:2; display:flex; gap:4px; padding:10px 12px; background:var(--surface); border-bottom:1px solid var(--line); }
.decor-menu-tabs button { flex:1; border:0; border-radius:10px; padding:12px 3px; font:inherit; font-size:12px; font-weight:600; background:transparent; color:var(--muted); cursor:pointer; }
.decor-menu-tabs button.on { background:var(--accent-softer); color:var(--accent-700); }
.decor-menu-body { padding:4px 14px 18px; }
.decor-menu-hint { font-size:12px; color:var(--muted); line-height:1.5; margin:10px 0 12px; }
.decor-menu-footer { flex:none; display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--line); background:var(--surface); }
.decor-menu-footer .btn { flex:1; padding:12px; min-height:44px; }
.decor-totem-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.decor-totem-heading .link { border:0; background:none; font-size:11px; white-space:nowrap; cursor:pointer; }
.decor-dialog .frame-sample { height:112px; }
.decor-dialog .decor-totems img,.decor-dialog .no-totem { height:70px; }
.decor-dialog .storefront { color:var(--text); }
.decor-dialog .shop-kicker { font-size:11px; }
.decor-dialog .decor-preview .logo { display:grid; place-items:center; }
.decor-dialog .iconbtn svg { width:18px; height:18px; }
.decor-dialog .iconbtn { flex:none; }

/* Give WebView flex layout a definite height; only the gallery scrolls. */
.decor-dialog[open] { height:min(720px,88vh); height:min(720px,88dvh); }
.decor-menu-content { flex:1 1 0%; width:100%; }
.decor-menu-tabs { flex-shrink:0; }
.decor-menu-body .decor-frames { grid-auto-rows:minmax(148px,auto); align-items:stretch; }
.decor-dialog .frame-sample { flex-shrink:0; min-height:112px; }
.decor-dialog .decor-totems .decor-option { min-height:104px; }
.ui-symbol { display:inline-grid; place-items:center; width:32px; height:32px; flex:none; color:var(--accent-700); vertical-align:middle; }
.ui-symbol svg { width:100% !important; height:100% !important; }
.avatar .ui-symbol { color:#fff; width:30px; height:30px; }
.ph .ui-symbol,.gallery .ui-symbol { width:56px; height:56px; }
.svc-thumb .ui-symbol { width:28px; height:28px; }
.onb-art .ui-symbol { width:92px; height:92px; }
.post-preview .cover .ui-symbol { width:64px; height:64px; }
.post-preview .cav .ui-symbol { width:22px; height:22px; }
.image-fallback .ui-symbol { width:44px; height:44px; }
.item-icon-chooser { margin:0 0 18px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.item-icon-chooser summary { cursor:pointer; font-size:13px; padding:14px; color:var(--text-2); }
.item-icon-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding:0 10px 12px; }
.item-icon { border:1px solid var(--line); background:var(--surface); border-radius:12px; display:flex; flex-direction:column; align-items:center; gap:8px; padding:10px 3px; font:inherit; font-size:10px; cursor:pointer; min-height:84px; color:var(--text-2); }
.item-icon .ui-symbol { width:27px; height:27px; }
.item-icon.on { border-color:var(--accent); background:var(--accent-softer); color:var(--accent-700); }
.star svg { width:14px !important; height:14px !important; vertical-align:middle; fill:currentColor; }
.star-pick .sp svg { width:30px !important; height:30px !important; }
.star-pick .sp.on svg { fill:currentColor; }
.rv-name svg { width:14px !important; height:14px !important; vertical-align:middle; }

/* Role entry: workplaces first, personal shop is an optional separate journey. */
.entry-options { display:grid; gap:12px; margin:16px 0; }
.entry-option { display:flex; align-items:center; gap:14px; width:100%; text-align:left; color:var(--text); font:inherit; cursor:pointer; }
.entry-option > svg { width:24px; height:24px; flex-shrink:0; color:var(--accent-700); }
.entry-option > span { flex:1; min-width:0; }
.entry-option b { display:block; font-size:16px; }
.entry-option small { display:block; color:var(--muted); line-height:1.45; margin-top:5px; }
.entry-option > svg:last-child { width:18px; }
.workspace-card { display:block; width:100%; text-align:left; color:var(--text); font:inherit; margin-bottom:12px; cursor:pointer; }
.workspace-heading { display:flex; align-items:center; gap:12px; }
.workspace-heading > span:nth-child(2) { flex:1; min-width:0; overflow-wrap:anywhere; }
.workspace-heading b { display:block; font-size:16px; line-height:1.3; }
.workspace-heading small { display:block; color:var(--muted); font-size:12px; margin-top:5px; }
.workspace-heading > svg { width:18px; height:18px; color:var(--muted); flex-shrink:0; }
.workspace-symbol { display:grid; place-items:center; width:42px; height:42px; flex-shrink:0; border-radius:13px; background:var(--accent-softer); color:var(--accent-700); }
.workspace-symbol svg { width:22px; height:22px; }
.workspace-rights { display:flex; flex-wrap:wrap; gap:6px; margin-top:14px; }
.workspace-rights span { padding:5px 9px; border-radius:9px; font-size:11px; font-weight:600; background:var(--accent-softer); color:var(--accent-700); }
.workspace-orders { display:flex; align-items:center; gap:6px; margin-top:12px; color:var(--accent-700); font-size:12px; font-weight:700; }
.workspace-orders svg { width:16px; height:16px; }
.staff-invite-help { margin:12px 0 18px; padding:14px; border:1px solid var(--line-2); border-radius:var(--r-md); }
.staff-invite-help summary { cursor:pointer; font-size:13px; font-weight:700; }
.own-shop-option p { color:var(--muted); font-size:13px; line-height:1.5; margin:0 0 14px; }

.shop-footer .sf-notice { margin:20px auto 0; padding:16px 14px; max-width:560px; border-top:1px solid var(--line-2); text-align:left; color:var(--muted); font-size:12px; line-height:1.6; }
.shop-footer .sf-notice strong { display:block; margin-bottom:6px; color:var(--text-2); font-size:12px; font-weight:700; }
.shop-footer .sf-notice p { margin:0; }

/* Team management: compact roster with per-person access controls. */
.team-panel { margin-top: 8px; }
.team-panel h2 { font-size: 15px; margin: 0; font-weight: 650; }
.team-panel h2 > span { margin-left: 5px; color: var(--muted); font-weight: 500; }
.team-invite p, .team-empty p { font-size: 13px; line-height: 1.5; color: var(--text-2); margin: 6px 0 0; }
.team-heading { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.team-list { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; overflow: hidden; }
.team-member + .team-member { border-top: 1px solid var(--line); }
.team-member > summary, .team-settings > summary { display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; list-style: none; }
.team-member > summary::-webkit-details-marker, .team-settings > summary::-webkit-details-marker { display: none; }
.team-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--bg); color: var(--text-2); font-size: 15px; font-weight: 600; }
.team-person { flex: 1; min-width: 0; }
.team-person b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.team-person small, .team-pending-row small { display: block; font-size: 12px; line-height: 1.5; color: var(--text-2); margin-top: 3px; }
.team-chevron { font-size: 24px; color: var(--muted); transition: transform .15s; }
.team-member[open] > summary .team-chevron, .team-settings[open] > summary .team-chevron { transform: rotate(90deg); }
.team-permissions { padding: 0 16px 16px; border-top: 1px solid var(--line-2); }
.team-caption { color: var(--muted); font-size: 12px; margin: 16px 0 4px; }
.team-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 14px; line-height: 1.4; cursor: pointer; }
.team-switch + .team-switch { border-top: 1px solid var(--line-2); }
.team-switch small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.team-switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 23px; border-radius: 20px; background: #d9d8df; flex-shrink: 0; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.team-switch input::after { content: ''; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; background: white; border-radius: 50%; transition: transform .15s; }
.team-switch input:checked { background: var(--accent); }
.team-switch input:checked::after { transform: translateX(15px); }
.team-switch input:disabled { opacity: .45; cursor: default; }
.team-switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.team-member-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.team-remove { color: var(--danger); }
.team-footnote { color: var(--text-2); font-size: 12px; line-height: 1.6; margin: 12px 0 20px; }
.team-empty { padding: 22px 18px; }
.team-empty b { font-size: 14px; }
.team-settings { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.team-settings > summary { padding: 16px 0; justify-content: space-between; font-size: 14px; font-weight: 600; }
.team-settings-body { padding-bottom: 16px; }
.team-pending { margin-top: 24px; }
.team-pending-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.team-link { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 16px; }
.team-link label { display: block; font-size: 13px; margin-bottom: 10px; }
.team-link .btn { margin-top: 10px; }
.team-panel .btn { border-radius: 10px; box-shadow: none; }
.team-panel .btn-ghost { background: transparent; border-color: transparent; }

/* ============================================================
   Команда, рабочие витрины, чат поддержки, регионы
   ============================================================ */
.muted { color: var(--muted) !important; background: transparent !important; padding-left: 0 !important; }
.team-avatar.sm { width: 28px; height: 28px; font-size: 12px; background: var(--accent-softer); color: var(--accent-700); }
.team-avatar.ghost svg { width: 15px; height: 15px; }
.role-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-700); font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* заявки: кто обработал и откуда покупатель */
.lead-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); flex-wrap: wrap; }
.region-other { padding: 2px 8px; border-radius: var(--r-pill); background: #fff2d9; color: #a86f00; font-size: 11px; font-weight: 700; }
.lead-handler { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg); font-size: 12.5px; color: var(--text-2); line-height: 1.35; }

/* рабочие витрины сотрудника */
.work-welcome { display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r-md); background: #e3f8ec; color: #176b45; }
.work-welcome > svg { width: 22px; height: 22px; flex: none; }
.work-welcome b { display: block; font-size: 15px; } .work-welcome span { font-size: 13px; }
.work-summary, .team-stats, .work-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.work-summary > div, .team-stats > div, .work-stats > div { padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.work-summary b, .team-stats b, .work-stats b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.work-summary span, .team-stats span, .work-stats span { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; line-height: 1.3; }
.work-summary .hot, .work-stats .hot { background: var(--accent-soft); border-color: transparent; }
.work-summary .hot b, .work-stats .hot b { color: var(--accent-700); }
.workspace-card { border-left: 4px solid var(--ws, var(--accent)); }
.workspace-symbol { overflow: hidden; }
.workspace-symbol img, .work-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.workspace-rights .muted { font-weight: 600; }
.work-empty { text-align: center; padding: 26px 18px; }
.work-empty .ui-symbol { display: inline-grid; margin-bottom: 8px; }
.work-empty b { display: block; font-size: 15px; } .work-empty p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 6px 0 0; }
.staff-invite-help summary { display: flex; align-items: center; gap: 6px; list-style: none; }
.staff-invite-help summary::-webkit-details-marker { display: none; }
.work-hero { padding: 16px; border-radius: var(--r-md); background: linear-gradient(150deg, var(--accent-softer), var(--surface) 70%); border: 1px solid var(--line); margin-bottom: 14px; }
.work-hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.work-hero-top b { display: block; font-size: 18px; letter-spacing: -.01em; margin-bottom: 5px; overflow-wrap: anywhere; }
.work-hero-logo { display: grid; place-items: center; width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; background: var(--accent); color: #fff; overflow: hidden; box-shadow: 0 8px 18px var(--accent-shadow); }
.work-hero-logo svg { width: 26px; height: 26px; }
.work-owner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); margin-bottom: 12px; }
.work-owner > span:nth-child(2) { flex: 1; min-width: 0; }
.work-owner small { display: block; font-size: 11px; color: var(--muted); } .work-owner b { font-size: 14px; overflow-wrap: anywhere; }
.work-stats { margin-bottom: 12px; } .work-stats > div { padding: 10px; }
.work-stats b { font-size: 18px; }
.work-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 6px; }
.work-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.work-tile > svg { width: 22px; height: 22px; color: var(--accent-700); margin-bottom: 4px; }
.work-tile b { font-size: 14px; } .work-tile span { font-size: 11.5px; color: var(--text-2); line-height: 1.3; }
.tile-count, .ticket-unread { position: absolute; top: 10px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; font-style: normal; display: grid; place-items: center; }

/* команда владельца */
.team-card { padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.team-card h2 { display: flex; align-items: center; gap: 6px; }
.team-card h2 svg { width: 18px; height: 18px; color: var(--accent-700); }
.team-invite .input { margin-top: 12px; }
.team-invite > .btn { margin-top: 14px; }
.role-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.role-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.role-tile svg { width: 19px; height: 19px; color: var(--muted); margin-bottom: 3px; }
.role-tile b { font-size: 13px; } .role-tile span { font-size: 10.5px; line-height: 1.3; color: var(--text-2); }
.role-tile.on { border-color: var(--accent); background: var(--accent-softer); }
.role-tile.on svg { color: var(--accent-700); }
.team-custom { margin-top: 12px; border-top: 1px solid var(--line-2); }
.team-custom > summary { padding: 12px 0 4px; font-size: 13px; font-weight: 700; color: var(--accent-700); cursor: pointer; list-style: none; }
.team-custom > summary::-webkit-details-marker { display: none; }
.team-saved { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; min-height: 16px; }
.team-member > summary .role-badge { margin-left: auto; }
.team-person small { overflow-wrap: anywhere; }
.team-link { background: #effbf4; border-color: #c9efd9; }
.team-link-head { display: flex; align-items: center; gap: 8px; color: #176b45; }
.team-link-head svg { width: 18px; height: 18px; }
.team-link p { font-size: 12.5px; color: var(--text-2); margin: 6px 0 10px; line-height: 1.45; }
.team-pending-row { gap: 10px; }
.team-pending-row > div { flex: 1; min-width: 0; }
.team-pending-row b { font-size: 13.5px; overflow-wrap: anywhere; }
.team-empty { text-align: center; }
.team-empty .ui-symbol { display: inline-grid; margin-bottom: 6px; }
.team-activity { margin: 24px 0 16px; }
.team-activity h2 { margin-bottom: 8px !important; }
.activity-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.activity-row p { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.activity-row small { font-size: 11.5px; color: var(--muted); }
.act-title { color: var(--accent-700); font-weight: 600; }
.team-footnote svg { width: 13px; height: 13px; vertical-align: -2px; }

/* чат поддержки */
.chat-page { display: flex; flex-direction: column; min-height: 100%; }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 6px 0 12px; }
.chat-day { text-align: center; margin: 10px 0 4px; }
.chat-day span { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface); padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.chat-system { align-self: center; max-width: 88%; text-align: center; font-size: 12px; color: var(--text-2); background: var(--accent-softer); padding: 7px 12px; border-radius: 12px; line-height: 1.4; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.chat-msg.own { align-self: flex-end; align-items: flex-end; }
.chat-bubble { padding: 10px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.42; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.chat-msg.own .chat-bubble { border-radius: 18px 18px 6px 18px; background: var(--accent); color: #fff; border-color: transparent; }
.chat-msg small { font-size: 10.5px; color: var(--muted); margin: 3px 6px 0; font-weight: 600; }
.chat-intro { margin: auto 0; text-align: center; padding: 30px 12px; }
.chat-intro .ui-symbol { display: inline-grid; margin-bottom: 10px; }
.chat-intro b { display: block; font-size: 17px; } .chat-intro p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin: 8px 0 0; }
.chat-composer { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 75%, transparent); }
.chat-composer .input { flex: 1; resize: none; min-height: 46px; max-height: 140px; border-radius: 22px; padding: 12px 16px; line-height: 1.35; }
.chat-send { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px var(--accent-shadow); }
.chat-send svg { width: 20px; height: 20px; } .chat-send:disabled { opacity: .5; }
.chat-confirm { padding: 14px; border-radius: var(--r-md); background: #fff8e8; border: 1px solid #ffe2a8; margin-bottom: 6px; }
.chat-confirm b { font-size: 15px; } .chat-confirm p { font-size: 13px; color: var(--text-2); margin: 4px 0 10px; line-height: 1.45; }
.chat-closed { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); line-height: 1.45; margin-bottom: 8px; }
.chat-closed svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--success); }
.chat-history { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.chat-history > summary { display: flex; align-items: center; gap: 6px; padding: 11px 14px; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.chat-history > summary::-webkit-details-marker { display: none; }
.chat-history > summary svg { width: 15px; height: 15px; }
.chat-history-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--line-2); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; font-size: 13px; }
.chat-history-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chat-history-row small { color: var(--muted); flex-shrink: 0; }
.chat-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; }
.chat-user > span:nth-child(2) { flex: 1; min-width: 0; }
.chat-user b { display: block; font-size: 14px; } .chat-user small { font-size: 11.5px; color: var(--text-2); overflow-wrap: anywhere; }
.chat-resolve { margin-bottom: 4px; }
.ticket-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ticket-row { position: relative; display: flex; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ticket-row.unread { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-softer); }
.ticket-row.compact { padding: 10px 12px; margin-bottom: 8px; align-items: center; }
.ticket-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ticket-top b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ticket-top small { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.ticket-preview { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-bottom { display: flex; align-items: center; gap: 8px; } .ticket-bottom small { font-size: 11px; color: var(--muted); }
.ticket-bottom .ticket-unread { position: static; margin-left: auto; }
.support-summary { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; margin-bottom: 10px; }
.support-summary > span:nth-child(2) { flex: 1; min-width: 0; }
.support-summary b { display: block; font-size: 15px; } .support-summary small { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.support-summary > svg { width: 18px; height: 18px; color: var(--muted); }
.support-summary-icon { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-700); flex-shrink: 0; }
.support-summary-icon svg { width: 22px; height: 22px; }
.support-summary-icon .ticket-unread { top: -6px; right: -6px; }
.badge-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; font-style: normal; }
.badge-dot[hidden] { display: none; }

/* регионы */
.meta-region { font-weight: 700; }
.region-notice { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; line-height: 1.4; color: var(--text); text-align: left; }
.region-notice > svg { width: 20px; height: 20px; flex: none; }
.region-notice > span { flex: 1; min-width: 0; }
.region-notice i { font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--accent-700); flex-shrink: 0; }
button.region-notice { cursor: pointer; }
.region-notice.ask > svg { color: var(--accent-700); }
.region-notice.same { background: #e9f9f0; border-color: #c9efd9; color: #176b45; font-weight: 600; }
.region-notice.other { background: #fff8e8; border-color: #ffe2a8; }
.region-notice.other > svg { color: #c98a00; }
.region-notice.compact { margin: 14px 0 0; }
.region-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text); cursor: pointer; }
.region-chip svg { width: 15px; height: 15px; color: var(--accent-700); }
.region-chip span { color: var(--accent-700); font-weight: 600; margin-left: 4px; }
.region-nudge { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 14px; padding: 14px; border-radius: var(--r-md); border: 1.5px dashed var(--accent); background: var(--accent-softer); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.region-nudge > svg:first-child { width: 24px; height: 24px; color: var(--accent-700); flex: none; }
.region-nudge > span { flex: 1; } .region-nudge b { display: block; font-size: 14.5px; } .region-nudge small { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.region-nudge > svg:last-child { width: 18px; height: 18px; color: var(--accent-700); flex: none; }
.region-field { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.region-field svg { width: 18px; height: 18px; color: var(--accent-700); }
.region-field span { flex: 1; font-weight: 600; } .region-field small { color: var(--accent-700); font-weight: 700; }
.region-sheet { display: flex; flex-direction: column; max-height: 88vh; }
.region-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.region-sheet-head h3 { margin: 0; }
.region-sheet > p { margin: 6px 0 12px; font-size: 13.5px; }
.region-locate { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 0; background: var(--accent); color: #fff; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 8px 18px var(--accent-shadow); }
.region-locate svg { width: 24px; height: 24px; flex: none; }
.region-locate b { display: block; font-size: 14.5px; } .region-locate small { font-size: 11.5px; opacity: .85; }
.region-locate:disabled { opacity: .7; }
.region-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; padding: 12px; border-radius: 14px; background: #e9f9f0; font-size: 13px; }
.region-suggest[hidden] { display: none; }
.region-suggest svg { width: 15px; height: 15px; vertical-align: -3px; }
.region-suggest b { flex: 1; min-width: 120px; } 
.region-tabs { display: flex; gap: 8px; margin: 14px 0 10px; }
.region-tab { flex: 1; padding: 9px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
.region-tab.on { background: var(--text); color: #fff; border-color: var(--text); }
.region-list { flex: 1; overflow-y: auto; margin: 10px -4px 6px; min-height: 160px; -webkit-overflow-scrolling: touch; }
.region-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 14px; color: var(--text); text-align: left; cursor: pointer; }
.region-row span { flex: 1; } .region-row small { color: var(--muted); font-size: 11.5px; }
.region-row svg { width: 18px; height: 18px; color: var(--accent-700); }
.region-row:hover, .region-row.on { background: var(--accent-softer); }
.region-row.on { font-weight: 700; }
@media (max-width: 360px) { .role-tiles { grid-template-columns: 1fr; } .role-tile { flex-direction: row; align-items: center; gap: 8px; } .role-tile span { display: none; } }
/* выбор канала для поста */
.channel-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.channel-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.channel-card.on { border-color: var(--accent); background: var(--accent-softer); }
.channel-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(140deg, var(--accent), var(--accent-700)); color: #fff; font-weight: 800; font-size: 17px; }
.channel-info { flex: 1; min-width: 0; }
.channel-info b { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.channel-info small { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 3px; line-height: 1.35; overflow-wrap: anywhere; }
.channel-check { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--line); color: #fff; }
.channel-card.on .channel-check { background: var(--accent); border-color: var(--accent); }
.channel-check svg { width: 14px; height: 14px; }
.channel-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); font-size: 13px; color: var(--text-2); line-height: 1.45; }
.channel-empty > svg { width: 20px; height: 20px; flex: none; color: var(--accent-700); }
.channel-empty > span { flex: 1; min-width: 180px; }
/* админ-панель */
.admin-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.admin-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 9px 6px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.admin-tab.on { background: var(--text); color: #fff; }
.admin-tab .badge-dot { margin-left: 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.kpi { padding: 13px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.kpi[data-act] { cursor: pointer; }
.kpi b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.kpi span { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; line-height: 1.3; }
.kpi small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.kpi.hot { background: var(--accent); border-color: transparent; color: #fff; }
.kpi.hot small { color: rgba(255,255,255,.8); }
.admin-alert { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 8px; border-radius: 16px; border: 1px solid #ffd0d5; background: #fff1f3; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.admin-alert > svg { width: 20px; height: 20px; color: var(--danger); flex: none; }
.admin-alert > span { flex: 1; } .admin-alert b { display: block; font-size: 14px; } .admin-alert small { font-size: 12px; color: var(--text-2); }
.failed-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.failed-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; } .failed-row small { display: block; color: var(--muted); font-size: 11.5px; }
.rank-list { display: flex; flex-direction: column; gap: 6px; }
.rank-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.rank-num { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 8px; background: var(--bg); font-size: 12px; font-weight: 800; color: var(--text-2); }
.rank-num.top { background: var(--accent); color: #fff; }
.rank-logo { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: var(--accent-softer); color: var(--accent-700); overflow: hidden; }
.rank-logo img { width: 100%; height: 100%; object-fit: cover; } .rank-logo svg { width: 20px; height: 20px; }
.rank-main { flex: 1; min-width: 0; }
.rank-main b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-main small { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.rank-date { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.admin-quiet { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #e9f9f0; color: #176b45; font-size: 13px; font-weight: 600; }
.admin-quiet svg { width: 16px; height: 16px; }
.admin-sorts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px 2px; }
.admin-sorts::-webkit-scrollbar { display: none; }
.admin-sorts .chip { flex-shrink: 0; }
.admin-shop-card { margin-bottom: 10px; }
.admin-shop-head { display: flex; align-items: center; gap: 10px; }
.admin-shop-title { flex: 1; min-width: 0; }
.admin-shop-title b { display: block; font-size: 15px; overflow-wrap: anywhere; } .admin-shop-title small { font-size: 12px; color: var(--text-2); }
.admin-shop-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0 10px; }
.admin-shop-stats > div { padding: 8px; border-radius: 12px; background: var(--bg); text-align: center; min-width: 0; }
.admin-shop-stats b { display: block; font-size: 16px; font-weight: 800; } .admin-shop-stats span { display: block; font-size: 10.5px; color: var(--text-2); line-height: 1.25; }
.admin-shop-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-2); margin-bottom: 10px; }
.admin-shop-meta svg { width: 12px; height: 12px; vertical-align: -1px; }
/* подсказка внутри строки с галочкой */
.check-row small { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-top: 3px; line-height: 1.35; }

/* аудитория в админке */
.aud-card { margin-bottom: 14px; }
.aud-bot { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.aud-bot > svg { width: 22px; height: 22px; color: var(--accent-700); flex: none; }
.aud-bot b { display: block; font-size: 14.5px; } .aud-bot small { font-size: 12px; color: var(--text-2); }
.aud-table { margin: 10px 0 6px; }
.aud-row { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 6px; align-items: center; padding: 7px 0; font-size: 13px; }
.aud-row b { font-size: 16px; text-align: right; }
.aud-row.head { font-size: 11px; color: var(--muted); padding-top: 0; }
.aud-row.head span:not(:first-child) { text-align: right; }
.aud-chart { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 8px 0 4px; }
.aud-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; min-width: 0; }
.aud-stack { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 5px; background: var(--bg); overflow: hidden; }
.aud-stack i, .aud-legend i { display: block; }
.aud-stack .app, .aud-legend .app { background: var(--accent); }
.aud-stack .web, .aud-legend .web { background: #ffb020; }
.aud-bar small { font-size: 9.5px; color: var(--muted); }
.aud-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-2); }
.aud-legend span { display: inline-flex; align-items: center; gap: 5px; }
.aud-legend i { width: 9px; height: 9px; border-radius: 3px; }
/* предложение подключить бота */
.bot-banner { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 40px 14px 14px; margin: 0 0 14px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--accent-soft); text-align: left; }
.bot-banner-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--accent); color: #fff; }
.bot-banner-icon svg { width: 21px; height: 21px; }
.bot-banner-text { flex: 1; min-width: 170px; }
.bot-banner-text b { display: block; font-size: 14.5px; } .bot-banner-text small { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.bot-banner > .btn { flex-shrink: 0; }
.bot-banner-close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.bot-banner-close svg { width: 14px; height: 14px; }
.success-wrap .bot-banner { margin-top: 6px; width: 100%; }
/* первый экран: приветствие, живой пример, шаги, роли */
.welcome { padding-top: 4px; }
.welcome-hero { position: relative; overflow: hidden; padding: 18px 18px 20px; margin: 0 0 18px; border-radius: 28px; color: #fff;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,.22), transparent 55%), linear-gradient(155deg, var(--accent) 0%, var(--accent-700) 100%);
  box-shadow: 0 18px 40px var(--accent-shadow); }
.welcome-hero::after { content: ''; position: absolute; width: 220px; height: 220px; right: -90px; bottom: 120px; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; }
.welcome-top .brand-lockup { filter: brightness(0) invert(1); }
.welcome-help { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; }
.welcome-help svg { width: 19px; height: 19px; }
.welcome-hi { margin: 18px 0 4px; font-size: 14px; font-weight: 700; opacity: .9; }
.welcome-hero h1 { margin: 0; font-size: 31px; line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.welcome-lead { margin: 10px 0 0; font-size: 14.5px; line-height: 1.45; opacity: .92; max-width: 330px; }
.hero-preview { position: relative; height: 196px; margin: 18px 0 16px; }
.hp-shop { position: absolute; left: 0; top: 0; width: 78%; padding: 12px; border-radius: 20px; background: #fff; color: var(--text); box-shadow: 0 14px 30px rgba(30,10,80,.25); transform: rotate(-2.5deg); }
.hp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.hp-head b { display: block; font-size: 13.5px; } .hp-head small { display: block; font-size: 10.5px; color: var(--muted); }
.hp-logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-700); }
.hp-logo svg { width: 18px; height: 18px; }
.hp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hp-tile { padding: 8px; border-radius: 12px; background: var(--bg); }
.hp-tile i { display: grid; place-items: center; height: 46px; border-radius: 9px; margin-bottom: 6px; background: var(--accent-softer); color: var(--accent-700); }
.hp-tile i svg { width: 22px; height: 22px; }
.hp-tile b { display: block; font-size: 11.5px; } .hp-tile small { font-size: 11px; font-weight: 800; color: var(--accent-700); }
.hp-toast { position: absolute; right: 0; bottom: 18px; display: flex; align-items: center; gap: 9px; max-width: 74%; padding: 10px 12px; border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 14px 30px rgba(30,10,80,.3); transform: rotate(1.5deg); animation: hp-pop .6s .3s both cubic-bezier(.2,1.4,.4,1); }
.hp-toast > span { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff; }
.hp-toast > span svg { width: 16px; height: 16px; }
.hp-toast b { display: block; font-size: 12px; } .hp-toast small { display: block; font-size: 11px; color: var(--text-2); }
.hp-done { position: absolute; right: 14px; bottom: -4px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: #d9f7e7; color: #1c9a5f; font-size: 11px; font-weight: 800; animation: hp-pop .5s .9s both cubic-bezier(.2,1.4,.4,1); }
.hp-done svg { width: 12px; height: 12px; }
@keyframes hp-pop { from { transform: translateY(12px) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .hp-toast, .hp-done { animation: none; } }
.welcome-cta { background: #fff !important; color: var(--accent-700) !important; border: 0; font-weight: 800; box-shadow: 0 10px 24px rgba(20,0,60,.22) !important; text-decoration: none; }
.welcome-cta svg { width: 18px; height: 18px; }
.welcome-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 12px; font-size: 12px; font-weight: 600; opacity: .92; }
.welcome-trust span { display: inline-flex; align-items: center; gap: 4px; }
.welcome-trust svg { width: 13px; height: 13px; }
.welcome h2 { font-size: 17px; letter-spacing: -.01em; margin: 0 0 10px; }
.welcome-steps, .welcome-roles { margin-bottom: 18px; }
.welcome-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.welcome-step-num { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.welcome-step-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; background: var(--accent-softer); color: var(--accent-700); }
.welcome-step-icon svg { width: 19px; height: 19px; }
.welcome-step b { display: block; font-size: 14.5px; } .welcome-step small { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.welcome-role, .welcome-orders { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; margin-bottom: 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.welcome-orders { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-softer); margin-bottom: 18px; }
.welcome-role > span:nth-child(2), .welcome-orders > span:nth-child(2) { flex: 1; min-width: 0; }
.welcome-role b, .welcome-orders b { display: block; font-size: 15px; } .welcome-role small, .welcome-orders small { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.welcome-role > svg, .welcome-orders > svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.welcome-role-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; }
.welcome-role-icon svg { width: 21px; height: 21px; }
.welcome-role-icon.buyer { background: #fff2d9; color: #b57900; }
.welcome-role-icon.team { background: #e3f8ec; color: #1c9a5f; }
.gate-page { max-width: var(--app-w); margin: 0 auto; padding: 14px 16px 24px; }
/* витрина: вкладки товары/услуги и страницы */
.shop-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 4px 0 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.shop-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 8px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.shop-tab svg { width: 17px; height: 17px; }
.shop-tab span { padding: 1px 7px; border-radius: 999px; background: var(--bg); font-size: 12px; }
.shop-tab.on { background: var(--accent); color: #fff; box-shadow: 0 6px 14px var(--accent-shadow); }
.shop-tab.on span { background: rgba(255,255,255,.22); }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 6px; flex-wrap: wrap; }
.pager-btn { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; display: inline-grid; place-items: center; }
.pager-btn.on { background: var(--text); border-color: var(--text); color: #fff; }
.pager-btn.arrow svg { width: 16px; height: 16px; }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-gap { color: var(--muted); padding: 0 2px; }
.svc-booking { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; padding: 3px 8px; border-radius: 999px; background: var(--accent-softer); color: var(--accent-700); font-size: 11px; font-weight: 700; }
.svc-booking svg { width: 12px; height: 12px; }

/* заявки: время записи и ссылки на людей */
.lead-slot { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; padding: 8px 10px; border-radius: 12px; background: var(--accent-softer); color: var(--accent-700); font-size: 13.5px; }
.lead-slot svg { width: 16px; height: 16px; }
.lead-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* выбор времени записи */
.slot-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.slot-days::-webkit-scrollbar { display: none; }
.slot-day { flex: 0 0 auto; width: 58px; padding: 8px 0; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.slot-day b { font-size: 18px; line-height: 1.1; } .slot-day small { font-size: 11px; color: var(--muted); }
.slot-day.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.slot-day.on small { color: rgba(255,255,255,.85); }
.slot-day.full:not(.on) { opacity: .45; }
.slot-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot-time { padding: 9px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.slot-time b { font-size: 15px; } .slot-time small { font-size: 10.5px; color: var(--success); font-weight: 600; }
.slot-time.on { border-color: var(--accent); background: var(--accent-softer); }
.slot-time:disabled { opacity: .45; cursor: default; background: var(--bg); }
.slot-time:disabled small { color: var(--muted); }

/* расписание в редакторе услуги */
.sched-box { margin: -4px 0 14px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sched-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.sched-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 14px; }
.sched-day { padding: 9px 0; border-radius: 11px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.sched-day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sched-sum { display: flex; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 12px; background: var(--accent-softer); color: var(--accent-700); font-size: 13px; font-weight: 700; }
.sched-sum svg { width: 15px; height: 15px; }

/* посты в каналы: закрепить / открепить */
.post-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.post-row.pinned { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-softer); }
.post-row-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; background: var(--accent-softer); color: var(--accent-700); }
.post-row-icon svg { width: 17px; height: 17px; }
.post-row-main { flex: 1; min-width: 0; }
.post-row-main b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row-main small { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; }.svc-booking { white-space: nowrap; }

/* ============================================================
   Обновление витрины покупателя (v13): поиск, порядок, счётчики, галерея, «Ещё в витрине»
   ============================================================ */
/* шапка витрины — мягкое свечение в цвете продавца */
.storefront .shop-header::before { content: ""; position: absolute; inset: auto auto -90px -70px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%); opacity: .9; pointer-events: none; z-index: 0; }
.storefront .shop-header > * { position: relative; z-index: 1; }
.storefront .shop-header .logo { box-shadow: 0 0 0 4px var(--accent-softer), var(--shadow-sm); }

/* поиск с кнопкой очистки */
.storefront .search-field { position: relative; margin-bottom: 10px; }
.storefront .search-field .input { padding-right: 46px; background: var(--surface); box-shadow: var(--shadow-sm); }
.storefront .search-field .input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: var(--accent-softer); color: var(--accent-700); display: grid; place-items: center; cursor: pointer; }
.search-clear[hidden] { display: none; }
.search-clear svg { width: 15px; height: 15px; }

/* порядок: по порядку / дешевле / дороже */
.sort-row { display: flex; gap: 6px; margin: -2px 0 12px; overflow-x: auto; scrollbar-width: none; }
.sort-row::-webkit-scrollbar { display: none; }
.sort-btn { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.sort-btn.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-700); }

/* счётчик прямо на карточке */
.storefront .pcard.in-cart { border-color: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-softer), var(--shadow-sm); }
.card-qty { flex: none; display: flex; align-items: center; height: 44px; border-radius: 999px; background: var(--accent); color: #fff; box-shadow: 0 6px 14px var(--accent-shadow); animation: pop .22s ease; }
.card-qty button { width: 36px; height: 44px; border: 0; background: none; color: inherit; font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.card-qty button:disabled { opacity: .4; cursor: default; }
.card-qty span { min-width: 18px; text-align: center; font-weight: 800; font-size: 15px; }
@media (max-width: 360px) { .card-qty button { width: 30px; } }

/* карточки появляются лесенкой */
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.storefront .grid > .pcard:not(.no-anim), .storefront .svc-list > .svc-card { animation: cardIn .42s cubic-bezier(.2,.7,.3,1) both; }
.storefront .grid > .pcard:nth-child(2), .storefront .svc-list > .svc-card:nth-child(2) { animation-delay: .04s; }
.storefront .grid > .pcard:nth-child(3), .storefront .svc-list > .svc-card:nth-child(3) { animation-delay: .08s; }
.storefront .grid > .pcard:nth-child(4), .storefront .svc-list > .svc-card:nth-child(4) { animation-delay: .12s; }
.storefront .grid > .pcard:nth-child(5), .storefront .svc-list > .svc-card:nth-child(5) { animation-delay: .16s; }
.storefront .grid > .pcard:nth-child(6), .storefront .svc-list > .svc-card:nth-child(6) { animation-delay: .2s; }
.storefront .grid > .pcard:nth-child(n+7), .storefront .svc-list > .svc-card:nth-child(n+7) { animation-delay: .24s; }

/* галерея позиции: свайп между фото */
.gallery-multi { padding-top: 0; aspect-ratio: 1 / 1; }
.gallery-multi > .gallery-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-multi > .gallery-count { position: absolute; inset: auto 12px 12px auto; width: auto; height: auto; padding: 5px 11px; border-radius: 999px;
  background: rgba(22,22,22,.55); backdrop-filter: blur(6px); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; display: block; }
.gallery-strip { margin: -6px 0 10px; scrollbar-width: none; }
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip img { border: 2px solid transparent; opacity: .65; transition: opacity .15s, border-color .15s; }
.gallery-strip img.on { border-color: var(--accent); opacity: 1; }

/* нижняя панель позиции, когда она уже в корзине */
.product-bar { position: absolute; left: 18px; right: 18px; bottom: 20px; z-index: 25; display: flex; gap: 10px; align-items: center;
  padding: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: slideup .3s ease; }
.product-bar .pb-qty { padding-left: 4px; gap: 6px; }
.product-bar .pb-qty button { width: 38px; height: 38px; border-radius: 50%; }
.product-bar .pb-qty button:disabled { opacity: .4; cursor: default; }
.product-bar .pb-go { flex: 1; min-width: 0; border-radius: 999px; padding: 13px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; }
.product-bar .pb-go svg { width: 17px; height: 17px; }

/* «Ещё в витрине» */
.rel-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rel-row::-webkit-scrollbar { display: none; }
.rel-card { flex: 0 0 132px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .14s ease; }
.rel-card:active { transform: scale(.97); }
.rel-ph { position: relative; padding-top: 100%; background: var(--accent-softer); }
.rel-ph > img, .rel-ph > div, .rel-ph > .image-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.rel-ph .ui-symbol { width: 40px; height: 40px; }
.rel-nm { padding: 8px 10px 0; font-size: 12.5px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.rel-pr { padding: 4px 10px 10px; font-size: 13px; font-weight: 800; color: var(--accent-700); }

/* «Мои заявки»: две кнопки в ряд */
.my-lead-actions .btn { flex: 1 1 auto; justify-content: center; }

/* панель продавца: что пора пополнить, новые заявки */
.stock-alert { padding: 14px 14px 8px; margin-bottom: 14px; border-color: #ffe2b0; background: linear-gradient(160deg, #fff8ea, var(--surface) 70%); }
.sa-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sa-head svg { width: 18px; height: 18px; color: #c98a00; }
.sa-head b { font-size: 14.5px; }
.sa-head span { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-2); }
.sa-row { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-top: 1px solid #f6ead2; cursor: pointer; font-size: 13.5px; }
.sa-row .sa-nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-row svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.sa-out { color: var(--danger); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.sa-low { color: #b57900; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.sa-more { padding: 8px 2px 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.has-new { border-color: var(--accent-soft); position: relative; }
.stat.has-new .n { color: var(--accent-700); }
.stat.has-new::after { content: ""; position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(255,93,108,.5); animation: dotPulse 1.8s ease-out infinite; }
@keyframes dotPulse { 0% { box-shadow: 0 0 0 0 rgba(255,93,108,.5); } 70% { box-shadow: 0 0 0 9px rgba(255,93,108,0); } 100% { box-shadow: 0 0 0 0 rgba(255,93,108,0); } }

@media (prefers-reduced-motion: reduce) {
  .card-qty, .product-bar, .rel-card, .stat.has-new::after, .gallery-strip img { animation: none !important; transition: none !important; }
  .gallery-track { scroll-behavior: auto; }
}

/* ============================================================
   v14 — акции, варианты, избранное, статистика продаж
   ============================================================ */
:root { --sale: #ff4d6d; --sale-soft: #ffe4ea; }

/* цена со скидкой */
.old-price { font-size: .78em; font-weight: 600; color: var(--muted); text-decoration: line-through; margin-left: 2px; white-space: nowrap; }
.pcard .pr { min-width: 0; line-height: 1.15; }
.pcard .pr.pr-sale { color: var(--sale); }
.pcard .pr .old-price { display: block; margin: 1px 0 0; font-size: 11.5px; }
.price-lg .old-price { font-size: 17px; margin-left: 8px; }
.pcard .sale-tag { position: absolute; left: 10px; bottom: 10px; background: var(--sale); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: var(--r-pill); box-shadow: 0 4px 12px rgba(255,77,109,.35); letter-spacing: -.01em; }
.sale-inline { display: inline-block; background: var(--sale-soft); color: var(--sale); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: var(--r-pill); vertical-align: 1px; }
.sale-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 11px; border-radius: var(--r-pill); background: var(--sale-soft); color: var(--sale); font-size: 13px; font-weight: 700; }
.sale-note svg { width: 15px; height: 15px; }
.summary .save-line { color: var(--sale); font-weight: 700; }
.summary .save-line svg { width: 14px; height: 14px; margin-right: 4px; }

/* избранное */
.fav-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px); color: var(--muted); box-shadow: 0 3px 10px rgba(0,0,0,.08); transition: color .15s, transform .15s; }
.fav-btn svg { width: 18px; height: 18px; }
.fav-btn.on { color: var(--sale); }
.fav-btn.on svg { fill: currentColor; }
.fav-btn:active { transform: scale(.88); }
.fav-btn.pop { animation: favPop .38s ease; }
@keyframes favPop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.pcard .ph > .fav-btn { position: absolute; top: 8px; right: 8px; }
.topbar .fav-btn.fav-top { width: 40px; height: 40px; background: var(--surface); border: 1px solid var(--line); box-shadow: none; margin-left: 6px; }
.fav-btn.inline { flex: none; background: var(--sale-soft); box-shadow: none; }
.fav-group { margin-bottom: 16px; }
.fav-shop { display: flex; align-items: center; gap: 8px; padding: 4px 2px 8px; cursor: pointer; font-size: 14px; }
.fav-shop b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-open { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--accent-700); }
.fav-open svg { width: 14px; height: 14px; }
.fav-row { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); cursor: pointer; }
.fav-row .thumb { width: 58px; height: 58px; flex: none; border-radius: 14px; overflow: hidden; background: var(--accent-softer); }
.fav-row .thumb img, .fav-row .thumb > div { width: 100%; height: 100%; object-fit: cover; font-size: 28px !important; }
.fav-row .info { flex: 1; min-width: 0; }
.fav-row .nm { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-row .pr { font-weight: 800; font-size: 14px; color: var(--accent-700); margin-top: 2px; }
.fav-row .st { font-size: 11.5px; color: var(--success); font-weight: 600; margin-top: 2px; }
.fav-row .st.off { color: var(--danger); }
.fav-empty svg { color: var(--sale); }

/* подборки над каталогом */
.special-row { display: flex; gap: 8px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.special-row::-webkit-scrollbar { display: none; }
.special-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.special-chip svg { width: 16px; height: 16px; }
.special-chip span { font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: var(--r-pill); background: var(--line-2); color: var(--text-2); }
.special-chip.sale { border-color: #ffc9d4; color: var(--sale); }
.special-chip.sale.on { background: var(--sale); border-color: var(--sale); color: #fff; }
.special-chip.fav svg { color: var(--sale); }
.special-chip.fav.on { background: var(--text); border-color: var(--text); color: #fff; }
.special-chip.fav.on svg { color: #fff; fill: #fff; }
.special-chip.on span { background: rgba(255,255,255,.22); color: #fff; }

/* варианты на карточке и странице позиции */
.var-note { font-size: 11.5px; color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .add.add-count { font-size: 15px; font-weight: 800; background: var(--text); box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.var-label { margin: 14px 0 8px; font-size: 13.5px; color: var(--text-2); }
.var-label b { color: var(--text); }
.var-left { color: var(--warn); font-weight: 700; font-size: 12.5px; }
.var-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.var-chip { position: relative; min-width: 52px; padding: 9px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; transition: border-color .15s, background .15s; }
.var-chip .vn { font-weight: 800; font-size: 14px; }
.var-chip .vp { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.var-chip.on { border-color: var(--accent); background: var(--accent-softer); box-shadow: 0 0 0 3px var(--accent-soft); }
.var-chip.off { color: var(--muted); background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--line-2) 6px 8px); }
.var-chip.off .vn { text-decoration: line-through; }
.var-chip .vq { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.cart-var { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

/* редактор: варианты и акция */
.var-box, .sale-box { margin: -4px 0 14px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.var-quick, .sale-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.var-quick .chip, .sale-quick .chip { padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.sale-quick { margin: 0 0 12px; }
.var-head, .var-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .85fr) 34px; gap: 6px; align-items: center; }
.var-head { font-size: 11px; font-weight: 700; color: var(--muted); margin: 2px 0 6px; padding-left: 4px; }
.var-row { margin-bottom: 8px; }
.var-row .input { padding: 11px 10px; min-width: 0; }
.var-rm { width: 34px; height: 34px; color: var(--muted); }
.sale-preview { padding: 10px 12px; border-radius: 12px; background: var(--sale-soft); color: var(--text); font-size: 13.5px; line-height: 1.4; }
.sale-preview s { color: var(--muted); }
.sale-preview b { color: var(--sale); }

/* панель продавца */
.own-search { margin-bottom: 10px; }
.own-chips { margin-bottom: 10px; }
.sales-teaser { cursor: pointer; margin-bottom: 14px; padding: 14px 16px; }
.st-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.st-head svg { color: var(--accent); }
.st-head span { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--accent-700); }
.st-head span svg { width: 14px; height: 14px; color: inherit; }
.st-nums { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.st-nums b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-nums small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.sales-teaser.loading .st-nums i { display: block; height: 34px; border-radius: 10px; background: linear-gradient(90deg, var(--line-2), var(--accent-softer), var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 30px; margin-top: 10px; }
.spark i { flex: 1; background: var(--accent); border-radius: 3px 3px 1px 1px; opacity: .85; }
.spark i.z { background: var(--line); opacity: 1; }
.trend { display: inline-block !important; font-size: 11px !important; font-weight: 800 !important; padding: 1px 6px; border-radius: var(--r-pill); margin-top: 4px !important; }
.trend.up { background: #d9f7e7; color: #1c9a5f; }
.trend.down { background: #ffe0e4; color: #d83a49; }
.trend.flat { background: var(--line-2); color: var(--text-2); }
.st-nums small .trend { margin: 0 0 0 4px !important; }

/* экран статистики */
.stats-seg { margin-bottom: 12px; }
.stats-page .kpi small { margin: 0 0 4px; font-size: 12px; font-weight: 600; }
.stats-page .kpi b { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-page .kpi.main { background: linear-gradient(140deg, var(--accent), var(--accent-700)); border-color: transparent; color: #fff; }
.stats-page .kpi.main small { color: rgba(255,255,255,.8); }
.stats-page .kpi.main .trend { background: rgba(255,255,255,.2); color: #fff; }
.kpi-sub { font-size: 11px !important; color: var(--muted); font-weight: 500 !important; }
.stat-chart, .funnel, .top-list { padding: 14px 16px; margin-bottom: 14px; }
.sc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.sc-head span { font-size: 12px; color: var(--muted); font-weight: 600; }
.bars-wrap { position: relative; padding-top: 16px; border-bottom: 1px solid var(--line); }
.bars-max { position: absolute; top: 0; left: 0; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.bars-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: 16px; border-top: 1px dashed var(--line); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.bars.nmany { gap: 2px; }
.bar { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .78; transition: opacity .15s; }
.bar:hover i, .bar.on i, .bar:focus-visible i { opacity: 1; }
.bar.on i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-soft); }
.bar.zero::after { content: ''; display: block; width: 100%; height: 2px; background: var(--line); border-radius: 2px; }
.bars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.stat-tip { min-height: 22px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.stat-tip b { color: var(--text); }
.stat-empty { text-align: center; padding: 18px 8px 6px; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.stat-empty svg { width: 30px; height: 30px; color: var(--accent); }
.fn-row { display: grid; grid-template-columns: 86px 1fr 44px; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 13px; }
.fn-row b { text-align: right; font-size: 14px; }
.fn-bar { height: 10px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.fn-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.fn-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.stat-tips { display: grid; gap: 8px; margin-bottom: 6px; }
.stat-tipcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(140deg, var(--accent-softer), var(--surface)); border: 1px solid var(--line); cursor: pointer; }
.stat-tipcard > svg:first-child { color: var(--accent); }
.stat-tipcard div { flex: 1; min-width: 0; }
.stat-tipcard b { display: block; font-size: 14px; }
.stat-tipcard small { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }
.top-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.top-row + .top-row { border-top: 1px solid var(--line-2); }
.top-row[data-act] { cursor: pointer; }
.top-n { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--accent-softer); color: var(--accent-700); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.top-n.fav { background: var(--sale-soft); color: var(--sale); }
.top-n.fav svg { width: 14px; height: 14px; fill: currentColor; }
.top-info { flex: 1; min-width: 0; }
.top-nm { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-bar { height: 5px; margin-top: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.top-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.top-val { text-align: right; flex: none; }
.top-val b { display: block; font-size: 13.5px; white-space: nowrap; }
.top-val small { font-size: 11px; color: var(--muted); }

@media (max-width: 360px) {
  .st-nums b { font-size: 15.5px; }
  .var-head, .var-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .8fr) 30px; gap: 4px; }
  .stats-page .kpi b { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .fav-btn.pop, .sales-teaser.loading .st-nums i { animation: none; }
}
.var-row .iconbtn.var-rm { width: 34px; height: 34px; min-width: 0; padding: 0; }
/* исход сделки: отменилась / возврат */
.tag.refund { background: #fff2d9; color: #a86a00; }
.lead.has-outcome { opacity: .92; }
.outcome-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 4px; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; }
.outcome-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.outcome-note.canceled { background: #ffe0e4; color: #b42a3a; }
.outcome-note.refunded { background: #fff2d9; color: #8a5800; }
.outcome-sheet .field { margin-bottom: 12px; }
.outcome-sheet .check-row { margin-bottom: 12px; }

/* редактор позиции: карточки разделов, кнопка «Сохранить» всегда внизу */
.ed-type { margin-bottom: 6px; }
.ed-type-hint { margin: 0 2px 14px; }
.ed-sec { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: 14px 14px 16px; margin-bottom: 12px; }
.ed-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 800; color: var(--text); }
.ed-h > svg, .ed-h .ed-rub { width: 28px; height: 28px; flex: none; padding: 5px; border-radius: 9px; background: var(--accent-softer); color: var(--accent-700); box-sizing: border-box; }
.ed-h .ed-rub { display: grid; place-items: center; font-size: 15px; padding: 0; }
.ed-h small { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ed-sec .check-row { background: var(--bg); }
.ed-sec .sale-box, .ed-sec .var-box, .ed-sec .sched-box { background: var(--bg); }
.ed-sec .field:last-child, .ed-sec .seg-hint:last-child { margin-bottom: 0; }
.upcell .up-main { position: absolute; left: 4px; bottom: 4px; font-size: 9.5px; font-weight: 800; color: #fff; background: rgba(0,0,0,.55); padding: 2px 6px; border-radius: 999px; }
.stock-step { display: flex; align-items: stretch; gap: 6px; }
.stock-step .input { text-align: center; min-width: 0; padding-left: 6px; padding-right: 6px; }
.stock-step button { flex: none; width: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; font-weight: 700; color: var(--accent-700); cursor: pointer; }
.stock-step button:active { transform: scale(.94); }
.cat-add { display: flex; gap: 8px; margin-top: 10px; }
.cat-add .input { flex: 1; min-width: 0; }
.cat-add .btn { flex: none; white-space: nowrap; }
.ed-more { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 6px; }
.ed-more .btn { flex: 1 1 auto; }
.ed-savebar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 18px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(249,246,255,0)); }
.ed-savebar .btn { width: 100%; box-shadow: var(--shadow-lg); }
/* QR-код витрины */
.qr-stage { position: relative; display: grid; place-items: center; padding: 14px; margin-bottom: 8px; border-radius: var(--r-md);
  background: repeating-conic-gradient(var(--line-2) 0 25%, var(--surface) 0 50%) 0 0 / 22px 22px; border: 1px solid var(--line-2); min-height: 280px; }
.qr-preview { display: block; max-width: 100%; max-height: 62vh; border-radius: 18px; box-shadow: 0 18px 44px rgba(40, 20, 110, .22); background: var(--surface); }
.qr-preview:not([src]) { visibility: hidden; }
.qr-preview.tpl-clean, .qr-preview.tpl-sticker { max-width: 78%; }
.qr-loading { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.qr-hint { display: block; font-size: 12px; color: var(--muted); margin: 0 0 10px; text-align: center; line-height: 1.4; }
.qr-hint svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.qr-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 14px; }
.qr-seg .seg-btn:disabled { opacity: .45; }
.qr-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.qr-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); font: inherit; color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.qr-tpl b { font-size: 13.5px; }
.qr-tpl small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.qr-tpl.on { border-color: var(--accent); background: var(--accent-softer); box-shadow: 0 0 0 3px var(--accent-soft); }
.qr-tpl-ic { width: 30px; height: 38px; border-radius: 7px; margin-bottom: 4px; background: linear-gradient(140deg, var(--accent), var(--accent-700)); position: relative; }
.qr-tpl-ic::after { content: ''; position: absolute; left: 50%; top: 52%; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 4px; background:
  radial-gradient(circle, #1b1530 32%, transparent 34%) 0 0 / 5px 5px, #fff; }
.qr-tpl-ic.tpl-table { background: linear-gradient(var(--accent) 0 34%, #fbfaff 34%); border: 1px solid var(--line); }
.qr-tpl-ic.tpl-story { height: 42px; width: 24px; }
.qr-tpl-ic.tpl-sticker { width: 34px; height: 34px; }
.qr-tpl-ic.tpl-clean { width: 34px; height: 34px; background: #fff; border: 1px solid var(--line); }
.qr-row-label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 2px 0 8px; }
.qr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.qr-chips:last-child { margin-bottom: 0; }
.qr-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.qr-chip.on { border-color: var(--accent); color: var(--accent-700); background: var(--accent-softer); }
.qr-color i { width: 16px; height: 16px; border-radius: 50%; display: block; }
/* посты: единая кнопка, наборы, расписание */
.pk-h { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-2); margin: 16px 2px 8px; }
.pk-h small { font-size: 12px; font-weight: 600; color: var(--muted); }
.pk-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pk-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; min-height: 96px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.pk-tile:active { transform: scale(.98); }
.pk-tile b { font-size: 14px; }
.pk-tile small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pk-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-softer); display: grid; place-items: center; font-size: 18px; margin-bottom: 2px; }
.pk-new { position: absolute; top: 9px; right: 9px; background: var(--sale, #e8345a); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.pk-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pk-em { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent-softer); display: grid; place-items: center; font-size: 20px; }
.pk-main { flex: 1; min-width: 0; }
.pk-main b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-main small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.pk-main .pk-err { color: var(--danger); }
.pk-x { width: 34px; height: 34px; flex: none; color: var(--muted); font-size: 14px; }
.pk-row .tag { flex: none; }
.post-row-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pk-sec .ed-h .pk-step { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.pk-cats { margin-bottom: 0; }
.pk-list { max-height: 360px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.pk-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; margin-bottom: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.pk-item.off { opacity: .5; }
.pk-thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden; background: var(--accent-softer); }
.pk-thumb img, .pk-thumb > div { width: 100%; height: 100%; object-fit: cover; font-size: 20px !important; }
.pk-mv { width: 28px; height: 28px; flex: none; font-size: 14px; color: var(--text-2); }
.pk-ck { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); color: #fff; font-weight: 900; font-size: 14px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pk-ck.on { background: var(--accent); border-color: var(--accent); }
.pk-cover-seg { margin-bottom: 10px; }
.pk-cover { border-radius: 16px; overflow: hidden; margin-bottom: 10px; background: var(--accent-softer); }
.pk-cover img { display: block; width: 100%; max-height: 280px; object-fit: cover; }
.pk-up { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; padding-top: 18px; margin-bottom: 10px; font-weight: 700; font-size: 13px; }
.pk-up input { display: none; }
.pk-text { min-height: 140px; }
.pk-text-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 2px 10px; }
.pk-kb { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pk-kb span { padding: 9px 6px; border-radius: 11px; background: var(--accent-softer); color: var(--accent-700); font-size: 12.5px; font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-kb span.wide { grid-column: 1 / -1; background: var(--accent); color: #fff; }
.pk-sub { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--text-2); margin: 4px 2px 8px; }
.pk-sub ~ .pk-sub { margin-top: 14px; }
.pk-setbox { margin-top: 8px; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.pk-icons { margin: 10px 0 0; flex-wrap: wrap; }
.pk-icons .chip { padding: 6px 9px; font-size: 16px; cursor: pointer; }
.pk-row.sch { flex-wrap: wrap; }
.pk-row.sch .pk-main b { white-space: normal; }
.pk-acts { width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-left: 50px; }
.pk-acts .tag { margin-right: auto; }
/* Списки товаров для постов */
.pk-newlist { width: 100%; margin: 2px 0 4px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pk-newlist svg { width: 16px; height: 16px; }
.pk-changed { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 13px; }
.pk-changed span { flex: 1; min-width: 0; }
.ed-savebar .btn[disabled] { opacity: .5; }
.pk-acts .btn svg { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }
/* Кнопки под постом: выбор вида и товаров */
.pk-btnmode, .pk-choices { margin-top: 6px; }
#pk-btnctl { margin-top: 16px; }
#pk-choices:not(:empty) { margin-top: 14px; }
.pk-choices .chip { font-size: 13px; }
.pk-nobtn { margin: 8px 0 0; }
/* Админ-панель: главный канал */
.adm-ch { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 10px; }
.adm-ch-main { flex: 1; min-width: 0; }
.adm-ch-main b { display: block; }
.adm-ch-main small { color: var(--text-2); font-size: 13px; }
.adm-post-text { min-height: 180px; resize: vertical; font: inherit; line-height: 1.45; }
.adm-preview { background: #dfe6ef; border-radius: 18px; padding: 10px; }
.adm-msg { background: #fff; border-radius: 16px; overflow: hidden; color: #111; }
.adm-msg img { display: block; width: 100%; }
.adm-msg-text { padding: 10px 12px; font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; }
.adm-preview .pk-kb { margin-top: 6px; }
/* Service details, product clips and release editor dialogs */
.product-clip { display: block; width: 100%; max-height: 400px; background: #16141c; border-radius: 14px; margin-block: 12px; }
.service-overview, .post-editor-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-block: 12px; }
.service-overview span { border: 1px solid var(--line, #e6e2eb); border-radius: 10px; padding: 5px 10px; overflow-wrap: anywhere; }
.release-dialog { width: min(92vw, 500px); max-height: 85dvh; overflow: auto; padding: 20px; border: 1px solid var(--line, #e6e2eb); border-radius: 18px; }
.release-dialog::backdrop { background: #1c152b80; }
.release-dialog h2 { margin-top: 0; font-size: 18px; }
.post-preview-cover { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; }
.post-preview-text { margin-block: 12px; overflow-wrap: anywhere; }
