/* SKLAD PRO Mobile — премиальная мобильная тема (светлая / тёмная, золотой акцент) */

:root {
  --bg: #F3F2EF;
  --surface: #FFFFFF;
  --surface-2: #FAF9F7;
  --soft: #EDEBE6;
  --line: rgba(28, 30, 34, .08);
  --line-2: rgba(28, 30, 34, .14);
  --ink: #1C1E22;
  --ink-2: #4A4D54;
  --muted: #7C7F86;
  --gold: #B8923F;
  --gold-hi: #D2B06A;
  --gold-ink: #7A5E22;
  --gold-soft: rgba(184, 146, 63, .13);
  --on-gold: #1B1406;
  --red: #C8453A;   --red-soft: rgba(200, 69, 58, .11);
  --orange: #C57A12; --orange-soft: rgba(213, 138, 31, .14);
  --green: #25855A; --green-soft: rgba(37, 133, 90, .12);
  --blue: #3F6DC8;  --blue-soft: rgba(63, 109, 200, .11);
  --hero-a: #22252B; --hero-b: #16181C; --hero-ink: #F4F1EA;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 6px 20px -10px rgba(20, 22, 26, .12);
  --shadow-lg: 0 -10px 40px rgba(0, 0, 0, .18);
  --scrim: rgba(12, 13, 16, .42);
  --r: 18px;
  --nav-h: 64px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --wrap: 600px;
  --side: max(0px, calc((100vw - var(--wrap)) / 2));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121316; --surface: #1B1D21; --surface-2: #202227; --soft: #26282E;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --ink: #EDEBE6; --ink-2: #C3C1BB; --muted: #8D8F95;
  --gold: #CFAA5C; --gold-hi: #E2C27F; --gold-ink: #E2C27F; --gold-soft: rgba(207, 170, 92, .14);
  --red: #F0766A; --red-soft: rgba(240, 118, 106, .14);
  --orange: #EBA24A; --orange-soft: rgba(235, 162, 74, .15);
  --green: #4FC08A; --green-soft: rgba(79, 192, 138, .14);
  --blue: #7EA2EE; --blue-soft: rgba(126, 162, 238, .14);
  --hero-a: #24262B; --hero-b: #1A1B1F; --hero-ink: #F4F1EA;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 8px 24px -14px rgba(0, 0, 0, .6);
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121316; --surface: #1B1D21; --surface-2: #202227; --soft: #26282E;
    --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
    --ink: #EDEBE6; --ink-2: #C3C1BB; --muted: #8D8F95;
    --gold: #CFAA5C; --gold-hi: #E2C27F; --gold-ink: #E2C27F; --gold-soft: rgba(207, 170, 92, .14);
    --red: #F0766A; --red-soft: rgba(240, 118, 106, .14);
    --orange: #EBA24A; --orange-soft: rgba(235, 162, 74, .15);
    --green: #4FC08A; --green-soft: rgba(79, 192, 138, .14);
    --blue: #7EA2EE; --blue-soft: rgba(126, 162, 238, .14);
    --hero-a: #24262B; --hero-b: #1A1B1F; --hero-ink: #F4F1EA;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 8px 24px -14px rgba(0, 0, 0, .6);
    --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
/* Telegram: учитываем его safe area (Bot API 8+) */
body.tg {
  --sat: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --sab: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  font-variant-numeric: tabular-nums;
}
body.lock { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; touch-action: manipulation; }
button:disabled { opacity: .4; cursor: default; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
small { font-size: 12px; }
[hidden] { display: none !important; }
.ic { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:active:not(:disabled), a.sbtn:active, label.sbtn:active, label.btn:active { transform: scale(.975); }
button, a, label { transition: transform .12s ease, background-color .2s, color .2s, opacity .2s; }

/* цветовые утилиты */
.red { color: var(--red); } .orange { color: var(--orange); } .green { color: var(--green); }
.blue { color: var(--blue); } .gold, .gold-t { color: var(--gold-ink); } .muted { color: var(--muted); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt20 { margin-top: 20px; }
.pb10 { padding-bottom: 10px; } .pad { padding: 16px; }
.grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.meta { font-size: 13px; color: var(--muted); line-height: 1.35; }
.rt { font-size: 15px; font-weight: 600; line-height: 1.3; }

/* ---------- шапка ---------- */
#top {
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--sat);
  padding-left: var(--side); padding-right: var(--side);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { #top { background: var(--bg); } }
.bar { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 16px; }
.bar-title { flex: 1; min-width: 0; }
.bar-title h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sub b { color: var(--ink-2); font-weight: 600; }
.bar-right { display: flex; gap: 6px; flex: none; }
.brand { font-size: 21px; font-weight: 800; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.brand em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; }
.hpad { padding: 0 16px 10px; }

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.icon-btn.ghost { background: transparent; border-color: transparent; margin-left: -8px; }
.bar-right .icon-btn.ghost { margin-left: 0; }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 11px; }
.badge {
  position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface); box-sizing: content-box; transform: translate(35%, -35%);
}

/* поиск */
.search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--muted);
}
.search:focus-within { border-color: var(--gold); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); height: 100%; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input::placeholder { color: var(--muted); }

/* чипсы и сегменты */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; padding: 0; overflow: visible; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.ghost { border-style: dashed; color: var(--muted); }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--soft); }
.seg button { flex: 1; min-width: 0; min-height: 38px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); text-align: center; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg.big button { min-height: 50px; font-size: 15px; }

/* ---------- основной контент ---------- */
#view {
  padding: 8px calc(16px + var(--side)) calc(var(--nav-h) + var(--sab) + 28px);
  min-height: 60vh;
}
body.has-cart #view { padding-bottom: calc(var(--nav-h) + var(--sab) + 96px); }
body.ready #view { animation: fade .25s ease; }
@keyframes fade { from { opacity: .4; } to { opacity: 1; } }

.sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 2px 10px; }
.sec h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.sec h2.red { color: var(--red); } .sec h2.muted { color: var(--muted); }
.cnt { font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--soft); color: var(--ink-2); display: inline-grid; place-items: center; }
.link { color: var(--gold-ink); font-size: 14px; font-weight: 600; padding: 6px 0; }
.link.sm { font-size: 13px; margin-top: 8px; }
#view > .sec:first-child, #view > .hint:first-child + .sec { margin-top: 10px; }
#view > .hint:first-child { margin-top: 4px; }
.count { font-size: 13px; color: var(--muted); margin: 4px 2px 10px; }
.hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: var(--soft); padding: 10px 12px; border-radius: 12px; margin: 8px 0 12px; line-height: 1.4; }
.hint .ic { margin-top: 1px; color: var(--gold-ink); }
.ver { text-align: center; font-size: 12px; color: var(--muted); margin-top: 24px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
article.card + article.card, .sec + article.card { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid2.g8 { gap: 8px; }

/* ---------- hero «Сегодня» ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, rgba(207, 170, 92, .22), transparent 55%), linear-gradient(160deg, var(--hero-a), var(--hero-b));
  color: var(--hero-ink); border-radius: 24px; padding: 18px 18px 16px;
  box-shadow: 0 14px 34px -18px rgba(20, 18, 12, .55);
  border: 1px solid rgba(207, 170, 92, .18);
}
.hero-top { display: flex; justify-content: space-between; font-size: 13px; color: rgba(244, 241, 234, .62); margin-bottom: 14px; }
.hero-top span:first-child { color: var(--gold-hi); font-weight: 700; font-size: 15px; }
.hk { font-size: 12.5px; color: rgba(244, 241, 234, .6); }
.hero-rev { font-size: clamp(34px, 10.5vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; }
.hero-rev small { font-size: 16px; font-weight: 600; color: var(--gold-hi); margin-left: 6px; letter-spacing: 0; }
.hero-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .09); }
.hero-row.two { grid-template-columns: 1fr 1fr; margin-top: 0; padding-top: 0; border-top: 0; }
.hv { font-size: 20px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.hv small { font-size: 12px; font-weight: 600; color: rgba(244, 241, 234, .6); }
.hv.gold { color: var(--gold-hi); }
.hv.red-l { color: #FF9A8C; }
.hs { font-size: 12px; color: rgba(244, 241, 234, .55); margin-top: 3px; }
.hero-go { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(207, 170, 92, .16); color: var(--gold-hi); border: 1px solid rgba(207, 170, 92, .3); }
.hero.slim { padding: 18px; }

/* мини-карточки главной */
.mini {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "mi mk" "mv mv" "ms ms";
  column-gap: 8px; row-gap: 2px; align-items: center; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px 12px; box-shadow: var(--shadow); min-height: 104px;
}
.mi { grid-area: mi; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); }
.mk { grid-area: mk; font-size: 13px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.mv { grid-area: mv; font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv small { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.ms { grid-area: ms; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini.warn-red .mi { background: var(--red-soft); color: var(--red); }
.mini.warn-orange .mi { background: var(--orange-soft); color: var(--orange); }
.mini.warn-orange .mv { color: var(--orange); }

/* быстрые действия */
.qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qa button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 92px; padding: 12px 6px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 600; text-align: center; line-height: 1.15;
}
.qa button span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); }
.qa button:first-child .qi { background: var(--gold); color: var(--on-gold); }

/* ---------- списки ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.list > .empty { padding: 28px 16px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 11px 14px; text-align: left; position: relative; color: var(--ink); }
.list > .row + .row::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.row > .ic:last-child { color: var(--muted); }
.row .grow { gap: 2px; }
.ri { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); }
.ri.gold { background: var(--gold-soft); color: var(--gold-ink); }
.ri.red { background: var(--red-soft); color: var(--red); }
.ri.orange { background: var(--orange-soft); color: var(--orange); }
.ri.green { background: var(--green-soft); color: var(--green); }
.ri.blue { background: var(--blue-soft); color: var(--blue); }
.ri.muted { background: var(--soft); color: var(--muted); }
.ra { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; max-width: 45%; }
.ra b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.ra small { color: var(--muted); white-space: nowrap; }
.day-h { font-size: 13px; font-weight: 700; color: var(--muted); margin: 20px 4px 8px; }
.day-h:first-child { margin-top: 6px; }

.thumb { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; flex: none; background: var(--soft); }
.thumb.sm { width: 38px; height: 38px; border-radius: 11px; }
.thumb.lg { width: 76px; height: 76px; border-radius: 16px; }
.prow2.dim { opacity: .5; }
.addbtn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); }
.incart { font-size: 11.5px; font-weight: 700; color: var(--on-gold); background: var(--gold); border-radius: 8px; padding: 2px 7px; white-space: nowrap; }

/* задачи */
.row.task { gap: 10px; padding: 8px 10px 8px 14px; }
.tcheck { width: 28px; height: 28px; border-radius: 50%; flex: none; border: 2px solid var(--line-2); display: grid; place-items: center; color: #fff; }
.row.task.done .tcheck { background: var(--green); border-color: var(--green); }
.row.task.done .rt { text-decoration: line-through; color: var(--muted); }
.row.task.over .tcheck { border-color: var(--red); }
.row.task.over .rt b { color: var(--red); }
.tbody { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; text-align: left; }
.tbody .rt b { color: var(--gold-ink); font-weight: 700; margin-right: 2px; }
.list > .row.task + .row.task::before { left: 52px; }

/* ---------- пилюли ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; line-height: 1.35; flex: none; }
.pill-gold { background: var(--gold-soft); color: var(--gold-ink); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-orange { background: var(--orange-soft); color: var(--orange); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.pill-muted { background: var(--soft); color: var(--ink-2); }

/* ---------- кнопки ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px;
  font-size: 15.5px; font-weight: 650; text-align: center; line-height: 1.2; cursor: pointer; border: 1px solid transparent;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--on-gold); box-shadow: 0 8px 20px -12px rgba(184, 146, 63, .9); }
.btn-soft { background: var(--soft); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-red { background: var(--red); color: #fff; }
.btn-lg { min-height: 56px; font-size: 16.5px; font-weight: 750; letter-spacing: .01em; border-radius: 16px; }
.btn.sm { min-height: 42px; font-size: 14px; border-radius: 12px; padding: 0 10px; }
.btn.w-auto { width: auto; display: inline-flex; padding: 0 20px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; min-width: 0; }
.sbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 8px;
  border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; cursor: pointer; min-width: 0;
}
.sbtn.gold { background: var(--gold); color: var(--on-gold); }
.sbtn.green { color: var(--green); background: var(--green-soft); }
.sbtn:disabled { opacity: .35; }

/* ---------- склад ---------- */
.pcard { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px 14px; padding: 12px; }
.pcard .ph { width: 100px; height: 112px; border-radius: 14px; overflow: hidden; background: var(--soft); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sku { font-size: 12px; font-weight: 700; color: var(--gold-ink); letter-spacing: .04em; }
.name { font-size: 16px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinfo .meta b { color: var(--ink); font-weight: 650; }
.pinfo .meta b.red { color: var(--red); } .pinfo .meta b.orange { color: var(--orange); }
.prow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 5px; }
.price { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.pactions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.pbig { aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--soft); box-shadow: var(--shadow); }
.pbig img { width: 100%; height: 100%; object-fit: cover; }
.ptitle { font-size: 24px; font-weight: 750; letter-spacing: -.02em; margin-top: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; box-shadow: var(--shadow); min-width: 0; }
.stat > span { font-size: 12.5px; color: var(--muted); }
.stat > b { font-size: 19px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > b small { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat > small { color: var(--muted); line-height: 1.3; }
.stat > small em { font-style: normal; font-weight: 700; }
.stat.bad { border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.stat.goldb { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.stat.goldb > b { color: var(--gold-ink); }
em.up { color: var(--green); } em.dn { color: var(--red); }
.bc { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bc b { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; font-size: 15px; }

/* ---------- продажа ---------- */
.scan-cta {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px;
  border-radius: var(--r); background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--gold) 55%, transparent);
}
.scan-cta b { display: block; font-size: 16px; }
.scan-cta small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.sc-ic { width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); }
.steps { display: flex; gap: 6px; margin: 14px 0 6px; }
.steps span { flex: 1; min-width: 0; text-align: center; font-size: 12px; font-weight: 600; padding: 7px 4px; border-radius: 10px; background: var(--soft); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps span.on { background: var(--gold-soft); color: var(--gold-ink); }

/* корзина-полоса */
#cartbar {
  position: fixed; z-index: 29;
  left: calc(12px + var(--side)); right: calc(12px + var(--side));
  bottom: calc(var(--nav-h) + var(--sab) + 10px);
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px 0 10px;
  border-radius: 18px; background: var(--hero-a); color: var(--hero-ink);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45); border: 1px solid rgba(207, 170, 92, .28);
  animation: up .25s ease;
}
#cartbar.empty { background: var(--surface); color: var(--muted); border: 1px dashed var(--line-2); box-shadow: none; }
#cartbar > .ic { color: var(--gold-hi); }
@keyframes up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.cb-ic { position: relative; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); flex: none; }
#cartbar.empty .cb-ic { background: var(--soft); color: var(--muted); }
.cb-ic i { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--hero-ink); color: var(--hero-b); font: 700 11px/18px inherit; font-style: normal; text-align: center; }
.cb-txt { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-txt b { color: var(--gold-hi); font-size: 15px; }

/* ---------- CRM ---------- */
.kpis { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 4px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.kpis::-webkit-scrollbar { display: none; }
.kpi { flex: none; min-width: 98px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-snap-align: start; }
.kpi b { font-size: 24px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.kpi.orange b { color: var(--orange); } .kpi.red b { color: var(--red); } .kpi.gold b { color: var(--gold-ink); } .kpi.blue b { color: var(--blue); }

.ctop { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.ctop .grow { gap: 1px; }
.cstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.cstats > div { display: flex; flex-direction: column; min-width: 0; }
.cstats span { font-size: 12px; color: var(--muted); }
.cstats b { font-size: 16px; font-weight: 700; white-space: nowrap; }
.cstats small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cstats small.red { color: var(--red); }
.cactions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
@media (min-width: 410px) { .ccard .cactions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .ccard .cactions .sbtn { flex-direction: column; gap: 2px; min-height: 52px; font-size: 12px; } }

.av { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.av.vip { background: linear-gradient(145deg, var(--gold-hi), var(--gold)); color: var(--on-gold); }
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.av.sm { width: 38px; height: 38px; font-size: 13px; }
.av.xs { width: 26px; height: 26px; font-size: 10.5px; }

/* воронка */
.fstage { padding: 12px 14px; border-left: 4px solid var(--c); }
.fhead { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.fdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.row > .fdot { margin: 0 6px; }
.fcount { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; min-height: 36px; border-radius: 99px; background: var(--soft); font-size: 14px; font-weight: 600; }
.fchip .av:not(.vip) { background: var(--surface); }
.farrow { display: grid; place-items: center; height: 26px; color: var(--muted); }

/* карточка клиента */
.profile { display: flex; align-items: center; gap: 14px; }
.profile h2 { font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.status-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--muted); align-self: flex-start; }
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.contact .sbtn { flex-direction: column; gap: 3px; min-height: 58px; font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); }
.contact .sbtn .ic { color: var(--gold-ink); }
.acts .btn { min-height: 48px; font-size: 14.5px; }
.note p { font-size: 14.5px; line-height: 1.45; margin-bottom: 6px; }
.card.note + .card.note { margin-top: 8px; }

/* timeline */
.tl { position: relative; padding: 2px 0 4px; }
.tl::before { content: ""; position: absolute; left: 15px; top: 12px; bottom: 8px; width: 2px; background: var(--line-2); border-radius: 1px; }
.tl-day { position: relative; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 8px 44px; }
.tl-day:first-child { margin-top: 4px; }
.tl-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; }
.tl-item[data-act] { cursor: pointer; }
.tl-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--soft); color: var(--muted); box-shadow: 0 0 0 4px var(--bg); }
.tl-dot.gold { background: var(--gold); color: var(--on-gold); }
.tl-dot.red { background: var(--red-soft); color: var(--red); }
.tl-dot.green { background: var(--green-soft); color: var(--green); }
.tl-dot.blue { background: var(--blue-soft); color: var(--blue); }
.tl-dot.orange { background: var(--orange-soft); color: var(--orange); }
.tl-main { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.tl-t { font-size: 14.5px; font-weight: 600; }
.tl-t b { white-space: nowrap; }
.tl-time { flex: none; font-size: 12px; color: var(--muted); padding-top: 12px; min-width: 36px; text-align: right; }

/* долги */
.dcard { border-left: 4px solid var(--green); }
.dcard.over { border-left-color: var(--red); } .dcard.soon { border-left-color: var(--orange); }
.amt { font-size: 17px; font-weight: 750; white-space: nowrap; flex: none; }
.dcard.over .amt { color: var(--red); }
.dmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.dmeta > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.gdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: currentColor; }
.gdot.red { color: var(--red); } .gdot.orange { color: var(--orange); } .gdot.green { color: var(--green); }

/* ещё */
.me { display: flex; align-items: center; gap: 14px; }
.me h2 { font-size: 18px; font-weight: 750; }
.demo-card { border-style: dashed; }
.demo-card .rt { display: flex; align-items: center; gap: 8px; color: var(--gold-ink); }
.demo-card p { margin: 6px 0 12px; }

/* ---------- аналитика ---------- */
.net { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.net b { font-size: 18px; white-space: nowrap; }
.chart { padding: 14px 14px 10px; }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.ch-head b { font-size: 15px; }
.chart-svg { width: 100%; height: 124px; display: block; overflow: visible; }
.chart-svg .b { fill: color-mix(in srgb, var(--gold) 45%, transparent); }
.chart-svg .b-now { fill: var(--gold); }
.chart-svg .b0 { fill: var(--soft); }
.chart-svg .line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .lg1 { stop-color: var(--gold); stop-opacity: .32; }
.chart-svg .lg2 { stop-color: var(--gold); stop-opacity: 0; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.row.top { gap: 10px; }
.rank { width: 18px; flex: none; text-align: center; font-weight: 750; color: var(--muted); }
.row.top:first-child .rank { color: var(--gold-ink); }
.meter { display: block; height: 5px; border-radius: 3px; background: var(--soft); margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--gold); }
.big-num { font-size: 28px; font-weight: 750; letter-spacing: -.02em; margin: 2px 0 4px; }
.catbar { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.catbar i { display: block; min-width: 3px; }
.catlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.catlegend span { display: inline-flex; align-items: center; gap: 6px; }
.catlegend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.catlegend b { color: var(--ink); font-weight: 650; }

/* ---------- формы ---------- */
.field { margin-bottom: 14px; min-width: 0; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 2px 6px; }
.inp {
  display: block; width: 100%; min-height: 50px; padding: 0 14px; border-radius: 13px;
  border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; min-width: 0;
}
textarea.inp { padding: 12px 14px; line-height: 1.45; resize: vertical; }
select.inp { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input[type="date"].inp, input[type="time"].inp { line-height: 46px; }
.inp:focus { border-color: var(--gold); background: var(--surface); }
.inp:disabled { opacity: .55; }
.inp.sm { min-height: 38px; width: 96px; font-size: 16px; padding: 0 10px; border-radius: 10px; }
.inrow { display: flex; gap: 8px; align-items: stretch; }
.inrow .inp { flex: 1; }
.inrow .chip { height: auto; min-height: 50px; border-radius: 13px; }
.inrow .btn.w-auto { min-height: 50px; }

.stepper { display: inline-flex; align-items: center; background: var(--soft); border-radius: 14px; padding: 3px; }
.stepper button { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; }
.stepper button:active { background: var(--surface); }
.stepper span { min-width: 48px; text-align: center; font-size: 19px; font-weight: 750; }
.stepper.sm { border-radius: 12px; }
.stepper.sm button { width: 36px; height: 36px; border-radius: 9px; }
.stepper.sm span { min-width: 28px; font-size: 15px; }
.sum-line { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--gold-soft); font-size: 14px; color: var(--ink-2); }
.sum-line b { font-size: 21px; color: var(--ink); }
.qs-prod { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.qs-prod .price { font-size: 20px; }
.paybox { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--soft); margin-bottom: 14px; }
.paybox span { font-size: 12.5px; color: var(--muted); }
.paybox b { font-size: 21px; }
.warnbox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); font-size: 13.5px; font-weight: 600; margin-top: 10px; }

/* корзина */
.cart-sum-top { font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
.ci { display: flex; gap: 12px; align-items: flex-start; padding: 12px; position: relative; }
.list > .ci + .ci::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: var(--line); }
.ci .rt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-price span { white-space: nowrap; }
.ci .inp.sm { width: 78px; }
.ci-price { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ci-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.del { width: 34px; height: 30px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); text-align: left; }
.pick b { display: block; font-size: 15px; }
.pick small { display: block; color: var(--muted); }
.pick > .ic:last-child { color: var(--muted); }
.totals { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; color: var(--ink-2); }
.totals .tot { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 16px; font-weight: 700; color: var(--ink); }
.totals .tot b { font-size: 21px; }
.totals .muted { color: var(--muted); font-size: 13px; }

/* фото */
.photo-box { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.photo-prev { height: 180px; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; overflow: hidden; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-btns .sbtn { min-height: 46px; }

/* сканер */
.scan-box { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #0E0F11; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 22% 12%; border: 2px solid var(--gold-hi); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scan-frame i { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: var(--gold-hi); box-shadow: 0 0 12px var(--gold-hi); animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-38px); } 50% { transform: translateY(38px); } }
.scan-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; font-size: 13px; text-align: center; background: rgba(0, 0, 0, .5); padding: 8px 10px; border-radius: 10px; }
.scan-box.off { aspect-ratio: auto; min-height: 150px; display: grid; place-items: center; padding: 20px; background: var(--soft); }
.scan-box.off video, .scan-box.off .scan-frame { display: none; }
.scan-box.off .scan-msg { position: static; background: none; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.demo-scan { margin-top: 6px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.demo-scan .btn-row { margin-top: 8px; }

/* успех */
.done { text-align: center; padding: 4px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.done-ic { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; margin-bottom: 10px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--green) 70%, transparent); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-body .grid2.g8 .btn { font-size: 14.5px; padding: 0 8px; gap: 6px; }
.done h2 { font-size: 22px; font-weight: 750; }
.done-sum { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 8px; }

/* чек */
.receipt { background: #fff; color: #141414; font: 14px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; padding: 18px 16px; border-radius: 12px; border: 1px solid rgba(0, 0, 0, .1); max-width: 380px; margin: 0 auto; }
.r-shop { text-align: center; font-weight: 800; font-size: 17px; }
.r-c { text-align: center; color: #555; }
.r-hr { border-top: 1px dashed #aaa; margin: 10px 0; }
.r-item { margin-top: 4px; }
.r-line { display: flex; justify-content: space-between; gap: 10px; }
.r-tot { font-weight: 800; font-size: 17px; margin: 4px 0; }

/* пустые состояния / skeleton */
.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; }
.ei { width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; background: var(--soft); color: var(--muted); margin-bottom: 14px; }
.empty b { font-size: 16px; }
.empty p { font-size: 14px; color: var(--muted); margin: 6px 0 16px; max-width: 280px; }
.sk { border-radius: var(--r); background: linear-gradient(90deg, var(--soft) 25%, color-mix(in srgb, var(--soft) 55%, var(--surface)) 50%, var(--soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- FAB ---------- */
.fab {
  position: fixed; z-index: 28;
  right: calc(16px + var(--side));
  bottom: calc(var(--nav-h) + var(--sab) + 16px);
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--on-gold);
  box-shadow: 0 14px 28px -10px rgba(150, 110, 30, .7);
}
body.has-cart .fab { bottom: calc(var(--nav-h) + var(--sab) + 80px); }

/* ---------- нижняя навигация ---------- */
.nav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--sab)); padding: 0 var(--side) var(--sab);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 0; }
.nav button span { white-space: nowrap; }
.nav button.on { color: var(--ink); }
.nav button.on svg { color: var(--gold); }
.nav-sale-ic { width: 44px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); }
.nav .nav-sale.on .nav-sale-ic { background: var(--gold); }
.nav .nav-sale.on .nav-sale-ic svg { color: var(--on-gold); }
.nav .nav-sale svg { width: 22px; height: 22px; }

/* ---------- bottom sheet ---------- */
#scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .28s ease; }
#scrim.on { opacity: 1; pointer-events: auto; }
#sheet {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: var(--wrap);
  max-height: calc(100dvh - var(--sat) - 24px); max-height: calc(100vh - var(--sat) - 24px);
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .9, .25, 1); visibility: hidden;
}
@supports (height: 100dvh) { #sheet { max-height: calc(100dvh - var(--sat) - 24px); } }
#sheet.on { transform: none; visibility: visible; }
.grab { display: grid; place-items: center; height: 22px; flex: none; touch-action: none; }
.grab i { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 8px 18px; flex: none; touch-action: none; }
.sheet-head h3 { flex: 1; min-width: 0; font-size: 19px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 16px 16px; }
.sheet-body > .list { margin-bottom: 4px; }
.sheet-foot { flex: none; padding: 12px 16px calc(12px + var(--sab)); border-top: 1px solid var(--line); background: var(--bg); }
.sheet-body:last-child { padding-bottom: calc(18px + var(--sab)); }
.sticky-in { position: sticky; top: -6px; z-index: 2; background: var(--bg); padding: 6px 0 10px; margin-top: -6px; }

/* ---------- модальное подтверждение ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: grid; place-items: center; padding: 24px; animation: fade .18s ease; }
.modal { width: 100%; max-width: 360px; background: var(--surface); border-radius: 22px; padding: 22px 18px 16px; box-shadow: var(--shadow-lg); animation: pop .25s ease; }
.modal h3 { font-size: 18px; font-weight: 750; }
.modal p { color: var(--ink-2); font-size: 14.5px; margin: 8px 0 18px; line-height: 1.45; }

/* ---------- toast ---------- */
.toast {
  visibility: hidden; opacity: 0;
  position: fixed; z-index: 70; left: 50%; top: calc(var(--sat) + 10px);
  transform: translate(-50%, -140%); max-width: calc(100vw - 32px); width: max-content;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); transition: transform .3s cubic-bezier(.2, .9, .25, 1), opacity .3s, visibility .3s; pointer-events: none;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; opacity: 1; }
.toast .ic { color: var(--gold-hi); }
.toast.err .ic { color: #FF8F82; }

/* ---------- pull to refresh ---------- */
#ptr { position: fixed; z-index: 25; left: 50%; top: calc(var(--sat) + 8px); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--gold-ink); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 0); pointer-events: none; }
#ptr.spin { opacity: 1 !important; animation: spin .8s linear infinite; }
@keyframes spin { from { transform: translate(-50%, 64px) rotate(0); } to { transform: translate(-50%, 64px) rotate(360deg); } }

/* ---------- offline ---------- */
#net { display: none; position: fixed; z-index: 65; left: 0; right: 0; top: 0; padding: calc(var(--sat) + 6px) 16px 6px; text-align: center; font-size: 13px; font-weight: 600; background: var(--red); color: #fff; }
body.offline #net { display: block; }
body.offline #top { padding-top: calc(var(--sat) + 30px); }

/* ---------- печать чека (PDF) ---------- */
#printArea { display: none; }
@media print {
  @page { margin: 10mm; }
  body { background: #fff !important; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  #printArea .receipt { border: 0; max-width: 80mm; margin: 0 auto; }
}

/* узкие экраны (360 px) */
@media (max-width: 370px) {
  .bar-title h1 { font-size: 22px; }
  .qa { gap: 8px; }
  .qa button { min-height: 86px; font-size: 12.5px; }
  .pcard { grid-template-columns: 88px minmax(0, 1fr); }
  .pcard .ph { width: 88px; height: 104px; }
  .sbtn { font-size: 13px; }
  .mv { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
