/* Кабінет покупця й адмінка ТМ «Авеста». Стиль — як у CRM: світла тема, нейтральна палітра slate, Inter, радіус 8px.
   Спершу телефон: одна колонка, нижнє меню, великі зони натискання; від 900px — бокове меню й таблиці. */
@font-face { font-family: Inter; font-weight: 100 900; font-display: swap; src: url(/app/fonts/inter-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-weight: 100 900; font-display: swap; src: url(/app/fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-weight: 100 900; font-display: swap; src: url(/app/fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #fff; --fg: #020617; --card: #fff; --primary: #0f172a; --primary-fg: #f8fafc; --muted: #f1f5f9; --muted-fg: #64748b;
  --border: #e2e8f0; --ring: #94a3b8; --side: #f8fafc; --danger: #dc2626; --ok: #059669; --ok-bg: #ecfdf5; --warn: #b45309; --warn-bg: #fffbeb;
  --brand: #d2423d; --brand-bg: #fef2f2; --info: #1d4ed8; --info-bg: #eff6ff; --r: 8px; --top: 56px; --tabs: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px); --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 8px 24px -12px rgb(15 23 42 / .18);
}
*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: none; -webkit-tap-highlight-color: transparent; }
*::-webkit-scrollbar { display: none; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; overflow-x: clip; }
body { font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--fg); background: var(--bg); font-feature-settings: 'cv11', 'ss01'; overscroll-behavior-y: none; }
body.lock { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 14px; font-weight: 600; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted-fg); } .small { font-size: 12px; } .grow { flex: 1; min-width: 0; } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.num { font-variant-numeric: tabular-nums; } .b { font-weight: 600; } .rel { position: relative; display: inline-flex; } .cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 12px; } .gap4 { gap: 4px; } .gap16 { gap: 16px; }
.ic { display: inline-flex; flex: none; width: 18px; height: 18px; } .ic svg { width: 100%; height: 100%; } .ic.sm { width: 14px; height: 14px; } .ic.lg { width: 22px; height: 22px; }

/* каркас */
.shell { display: flex; min-height: 100svh; }
.side { display: none; }
.body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--bg); border-bottom: 1px solid var(--border); }
.top__logo { border-radius: 7px; }
.top__title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__actions { display: flex; gap: 6px; align-items: center; }
.main { flex: 1; padding: 14px 14px calc(var(--tabs) + var(--safe-b) + 104px); max-width: 1180px; width: 100%; margin: 0 auto; }
.tabs { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); background: var(--bg); border-top: 1px solid var(--border); padding-bottom: var(--safe-b); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; font-size: 11px; font-weight: 500; color: var(--muted-fg); text-decoration: none; min-height: var(--tabs); }
.tab .ic { width: 21px; height: 21px; } .tab.on { color: var(--primary); }
.dot { position: absolute; top: -6px; right: -11px; min-width: 16px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font: 600 10px/16px Inter, sans-serif; text-align: center; font-style: normal; }
@media (min-width: 900px) {
  .side { position: sticky; top: 0; display: flex; flex-direction: column; flex: none; width: 240px; height: 100svh; background: var(--side); border-right: 1px solid var(--border); }
  .side__brand { height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); }
  .side__brand img { border-radius: 7px; } .side__brand b { display: block; font-size: 15px; letter-spacing: -.01em; } .side__brand small { display: block; font-size: 11px; color: var(--muted-fg); }
  .side__nav { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
  .side__link { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r); font-weight: 500; color: var(--muted-fg); text-decoration: none; }
  .side__link:hover { background: rgb(241 245 249 / .7); color: var(--fg); } .side__link.on { background: var(--muted); color: var(--primary); }
  .side__link .ic { width: 20px; height: 20px; } .side__link .dot { position: static; margin-left: 4px; order: 3; }
  .side__link .rel { display: contents; } .side__link > span:last-child { flex: 1; }
  .side__user { display: flex; align-items: center; gap: 10px; margin: 8px; padding: 10px 6px 4px 10px; border-top: 1px solid var(--border); }
  .side__user b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .side__user small { display: block; font-size: 11px; color: var(--muted-fg); }
  .tabs, .top__logo { display: none; }
  .top { padding: 0 24px; } .top__title { font-size: 16px; }
  .main { padding: 24px 24px 48px; }
}

/* кнопки й поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); font-weight: 500; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, opacity .12s, transform .12s; }
.btn:hover { background: var(--muted); } .btn:active { transform: scale(.97); }
.btn:focus-visible, .inp:focus-visible, .chk input:focus-visible, a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); } .btn.primary:hover { background: #1e293b; }
.btn.danger { color: var(--danger); } .btn.danger:hover { background: #fef2f2; }
.btn.ghost { border-color: transparent; background: none; } .btn.ghost:hover { background: var(--muted); }
.btn.icon { width: 36px; padding: 0; } .btn.sm { min-height: 30px; padding: 0 9px; font-size: 12.5px; } .btn.sm.icon { width: 30px; }
.btn.lg { min-height: 46px; padding: 0 20px; font-size: 15px; } .btn.block { width: 100%; }
.btn:disabled { opacity: .55; pointer-events: none; } .btn.loading { opacity: .7; }
.btn.tg { background: #229ed9; border-color: #229ed9; color: #fff; } .btn.wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.inp { width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); font-size: 16px; }
textarea.inp { min-height: 76px; resize: vertical; line-height: 1.4; } select.inp { appearance: auto; }
/* Поле пароля з кнопкою-оком */
.pw { position: relative; display: block; } .pw .inp { padding-right: 44px; } .pw .inp::-ms-reveal { display: none; }
.pw__eye { position: absolute; top: 0; right: 0; width: 42px; height: 100%; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--muted-fg); border-radius: var(--r); cursor: pointer; }
.pw__eye:hover, .pw__eye[aria-pressed="true"] { color: var(--fg); } .pw__eye:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.inp::placeholder { color: #94a3b8; } .inp.sm { min-height: 32px; padding: 4px 8px; }
@media (min-width: 900px) { .inp { font-size: 14px; min-height: 36px; } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .field__l { font-size: 12.5px; font-weight: 500; } .field__h { font-size: 12px; color: var(--muted-fg); }
.form { display: grid; gap: 12px; } @media (min-width: 640px) { .form.two { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 30px; } .chk input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--muted); border-radius: var(--r); max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; font-weight: 500; font-size: 13px; color: var(--muted-fg); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgb(15 23 42 / .12); }

/* картки, позначки, таблиці */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.card > h2 { margin-bottom: 12px; } .card.flat { padding: 0; overflow: hidden; }
.grid2 { display: grid; gap: 14px; } @media (min-width: 1100px) { .grid2 { grid-template-columns: 1fr 1fr; align-items: start; } .grid2.wide-left { grid-template-columns: 1.5fr 1fr; } }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--muted); color: #334155; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.err { background: #fef2f2; color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); } .badge.brand { background: var(--brand-bg); color: var(--brand); } .badge.dark { background: var(--primary); color: #fff; }
.tblwrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted-fg); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--side); position: sticky; top: 0; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--side); }
.tbl td.grp { background: var(--muted); font-weight: 600; font-size: 12.5px; padding: 7px 12px; }
.tbl .inp { min-height: 32px; padding: 4px 8px; font-size: 13.5px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted-fg); }
.empty .ic { width: 34px; height: 34px; margin: 0 auto 10px; display: block; opacity: .5; }
.list > * + * { border-top: 1px solid var(--border); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; }
a.item:hover, button.item:hover { background: var(--side); } button.item { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
.kv { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 6px 12px; font-size: 13.5px; } .kv dt { color: var(--muted-fg); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--muted); object-fit: contain; } .thumb.lg { width: 72px; height: 72px; }
.thumb.none { display: grid; place-items: center; color: #cbd5e1; }

/* вікна й сповіщення */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgb(2 6 23 / .5); animation: fade .16s; }
.modal__box { width: 100%; max-height: 92svh; display: flex; flex-direction: column; background: var(--bg); border-radius: 16px 16px 0 0; animation: up .22s cubic-bezier(.2, .8, .2, 1); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--border); }
.modal__body { padding: 16px; overflow-y: auto; overscroll-behavior: contain; } .modal__foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); }
.modal__foot .btn { flex: 1; min-height: 42px; } .modal.out { opacity: 0; transition: opacity .18s; }
@media (min-width: 640px) { .modal { align-items: center; padding: 24px; } .modal__box { max-width: 520px; border-radius: 14px; box-shadow: var(--shadow); animation-name: pop; } .modal__box.wide { max-width: 860px; } .modal__foot .btn { flex: none; min-height: 36px; } }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(24px); opacity: 0; } } @keyframes pop { from { transform: scale(.97); opacity: 0; } }
.toasts { position: fixed; z-index: 200; left: 12px; right: 12px; bottom: calc(var(--tabs) + var(--safe-b) + 76px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: 460px; padding: 10px 14px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 500; box-shadow: var(--shadow); animation: up .2s; }
.toast.err { background: var(--danger); } .toast.out { opacity: 0; transition: opacity .25s; }
@media (min-width: 900px) { .toasts { bottom: 96px; left: auto; right: 24px; align-items: flex-end; } }

/* вхід */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px 18px; background: var(--side); }
.login__box { width: 100%; max-width: 380px; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.login__logo { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto; } .login h1 { font-size: 20px; text-align: center; letter-spacing: -.02em; } .login p { text-align: center; }
.code { text-align: center; font-size: 26px !important; letter-spacing: .28em; font-weight: 600; min-height: 54px !important; font-variant-numeric: tabular-nums; }

/* ── кабінет: прайс ── */
.strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 2px 14px; }
.promo { flex: none; width: min(78vw, 300px); scroll-snap-align: start; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid #fecaca; background: linear-gradient(135deg, #fff5f5, #fff); cursor: pointer; text-align: left; }
.promo.new { border-color: #bfdbfe; background: linear-gradient(135deg, #eff6ff, #fff); } .promo.solo { width: 100%; }
.promo__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.25; }
.promo .old { text-decoration: line-through; color: var(--muted-fg); font-size: 12px; }
.tools { position: sticky; top: var(--top); z-index: 20; background: var(--bg); margin: 0 -14px; padding: 10px 14px 8px; display: grid; gap: 8px; }
.search { position: relative; } .search .ic { position: absolute; left: 11px; top: 50%; translate: 0 -50%; color: var(--muted-fg); } .search .inp { padding-left: 36px; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
.chip { flex: none; border: 1px solid var(--border); background: var(--bg); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.grp { margin: 16px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-fg); }
.prow { display: grid; grid-template-columns: 48px 1fr auto; gap: 3px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.prow .thumb { width: 48px; height: 48px; grid-row: span 2; cursor: zoom-in; }
.prow__name { font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; align-self: end; } .prow__meta { align-self: start; } .prow__meta { grid-column: 2; font-size: 12.5px; color: var(--muted-fg); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.prow__price { font-weight: 600; color: var(--fg); } .prow__price s { font-weight: 400; color: var(--muted-fg); margin-right: 4px; }
.prow__qty { grid-row: span 2; display: grid; justify-items: end; align-content: center; gap: 3px; } .prow__sum { font-size: 12px; font-weight: 600; min-height: 16px; }
.prow.off { opacity: .55; } .prow.has { background: linear-gradient(90deg, #f0fdf4, transparent 70%); margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.step { display: inline-flex; align-items: center; height: 38px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.step button { width: 34px; height: 36px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; } .step button:active { background: var(--muted); }
.step input { width: 40px; height: 36px; border: 0; text-align: center; font-weight: 600; font-size: 15px; padding: 0; background: none; -moz-appearance: textfield; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.step.zero button:first-child, .step.zero input { display: none; } .step.zero button:last-child { width: 44px; }
.bar { position: fixed; z-index: 35; left: 10px; right: 10px; bottom: calc(var(--tabs) + var(--safe-b) + 10px); display: flex; align-items: center; gap: 12px; padding: 9px 9px 9px 16px; border-radius: 14px; background: var(--primary); color: #fff; box-shadow: var(--shadow); animation: up .2s; }
.bar small { font-size: 11.5px; opacity: .75; } .bar b { font-size: 16px; } .bar .btn { background: #fff; color: var(--primary); border-color: #fff; min-height: 42px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); color: #1e3a8a; font-size: 13px; }
.note.warn { background: var(--warn-bg); color: #78350f; } .note.ok { background: var(--ok-bg); color: #065f46; } .note .ic { margin-top: 1px; }
@media (min-width: 900px) {
  .strip, .tools, .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .promo { width: 280px; }
  .prow.has { margin: 0; padding-left: 8px; padding-right: 0; border-radius: 8px; }
  .bar { left: calc(240px + 24px); right: 24px; bottom: 20px; max-width: 760px; margin: 0 auto; }
}
/* оформлення */
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); } .opt input { margin: 2px 0 0; width: 17px; height: 17px; accent-color: var(--primary); }
.opt b { display: block; font-weight: 600; } .opt small { color: var(--muted-fg); font-size: 12.5px; }
.suggest { position: relative; } .suggest__list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow-y: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.suggest__list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; cursor: pointer; font-size: 14px; } .suggest__list button:hover { background: var(--muted); }
.sumline { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; } .sumline.total { font-size: 17px; font-weight: 700; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
/* листування */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.msg { max-width: 86%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--muted); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; } .msg small { display: block; margin-top: 3px; font-size: 11px; opacity: .65; }
.msg.sys { align-self: center; background: none; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted-fg); font-size: 13px; text-align: center; }
.msg .badge { margin-bottom: 4px; }
.send { position: sticky; bottom: calc(var(--tabs) + var(--safe-b) + 8px); display: flex; gap: 8px; align-items: flex-end; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.send textarea { border: 0; min-height: 38px; max-height: 120px; padding: 8px; resize: none; } .send textarea:focus { outline: none; }
@media (min-width: 900px) { .send { bottom: 16px; } .msg { max-width: 64%; } }
.steps { display: grid; gap: 6px; counter-reset: s; padding: 0; margin: 0; list-style: none; } .steps li { counter-increment: s; display: flex; gap: 10px; align-items: baseline; }
.steps li::before { content: counter(s); flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; align-self: flex-start; }
.zoom img { width: 100%; max-height: 44svh; object-fit: contain; border-radius: 10px; background: var(--muted); }
.drop { border: 1.5px dashed var(--border); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted-fg); cursor: pointer; } .drop:hover, .drop.over { border-color: var(--ring); background: var(--side); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .side, .top, .tabs, .bar { display: none !important; } }
/* сітки не розпирає широкий вміст (таблиці гортаються всередині своєї рамки) */
.grid2 > *, .col > *, .form > * { min-width: 0; }
.card > h2:last-child { margin-bottom: 0; } .card.col > h2 { margin-bottom: 0; }
/* широкий екран: прайс — таблицею в один рядок */
@media (min-width: 1200px) {
  .tools { grid-template-columns: 300px 1fr; align-items: center; } .chips { flex-wrap: wrap; }
  .prow { grid-template-columns: 52px minmax(0, 1fr) 200px 250px; } .prow .thumb { grid-row: 1; }
  .prow__name { grid-column: 2; grid-row: 1; align-self: center; } .prow__meta { grid-column: 3; grid-row: 1; align-self: center; }
  .prow__qty { grid-column: 4; grid-row: 1; grid-template-columns: 1fr auto; align-items: center; gap: 12px; } .prow__sum { order: -1; text-align: right; font-size: 13px; }
}
@media (max-width: 640px) { .tbl th, .tbl td { padding: 8px; } table.tbl { font-size: 13px; } }
/* повтор замовлення: його позиції — виділеним блоком угорі прайсу, нижче весь асортимент */
.pinbox { margin-top: 14px; padding: 2px 12px; border: 1px solid #86efac; border-radius: 12px; background: #f0fdf4; }
.pinbox__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 0 6px; font-size: 13px; color: #166534; }
.pinbox .prow, .pinbox .prow.has { margin: 0; padding-left: 0; padding-right: 0; background: none; border-radius: 0; border-bottom-color: #bbf7d0; }
.pinbox .prow:last-child { border-bottom: 0; } .pinbox .thumb { background: #fff; }
.pinrest { margin: 22px 0 -6px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; }
/* нижня плашка замовлення: мініатюри всього кошика в один тонкий рядок, що гортається */
.bar { padding: 8px 8px 8px 12px; gap: 10px; }
.bar__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bar__thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 1px 16px 4px 1px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
.bthumb { position: relative; flex: none; width: 30px; height: 30px; padding: 2px; border: 0; border-radius: 7px; background: #fff; color: #94a3b8; display: grid; place-items: center; cursor: pointer; }
.bthumb img { width: 100%; height: 100%; object-fit: contain; }
.bthumb i { position: absolute; right: -4px; bottom: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 99px; background: #16a34a; color: #fff; font: 700 9.5px/15px Inter, sans-serif; text-align: center; box-shadow: 0 0 0 1.5px var(--primary); }
.bar__sum { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; } .bar__sum small { overflow: hidden; text-overflow: ellipsis; }
.prow.flash { animation: flash 1.4s ease-out; } @keyframes flash { 0%, 35% { box-shadow: inset 0 0 0 2px #16a34a; border-radius: 8px; } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@media (min-width: 900px) {
  .bar { padding: 9px 9px 9px 16px; gap: 14px; }
  .bar__info { flex-direction: row; align-items: center; gap: 16px; } .bar__sum { order: -1; flex: none; flex-direction: column; align-items: flex-start; gap: 0; } .bar__sum small { order: -1; }
  .bar__thumbs { flex: 1; } .bthumb { width: 34px; height: 34px; }
}
.zoom__qty { display: grid; justify-items: end; gap: 4px; flex: none; } .zoom__qty .step { height: 42px; } .zoom__qty .step button { width: 42px; height: 42px; } .zoom__qty .step input { width: 48px; height: 42px; font-size: 17px; }
.zoom__qty .step.zero button:last-child { width: 52px; background: var(--primary); color: #fff; } .zoom__qty .step.zero { border-color: var(--primary); }
.btn.off { opacity: .5; }
/* учёт по клиенту: итоги, график, доли, подробные плашки заказов */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.stat { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); display: grid; gap: 1px; min-width: 0; }
.stat small { font-size: 11.5px; color: var(--muted-fg); } .stat b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .stat span { font-size: 11.5px; color: var(--muted-fg); }
.chart { position: relative; width: 100%; min-height: 200px; } .chart svg { display: block; max-width: 100%; }
.chart__grid { stroke: var(--border); stroke-width: 1; } .chart__ax { fill: var(--muted-fg); font-size: 11px; } .chart__val { fill: var(--fg); font-size: 11.5px; font-weight: 600; }
.chart__bar { fill: #2a78d6; } .chart__bar.on { fill: #184f95; } .chart__hit { fill: transparent; cursor: default; }
.chart__tip { position: absolute; top: 0; z-index: 2; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow); white-space: nowrap; display: grid; gap: 1px; }
.share { position: relative; height: 18px; display: flex; align-items: center; min-width: 70px; } .share i { position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 0 4px 4px 0; background: #cde2fb; } .share span { position: relative; padding-left: 6px; font-size: 12px; }
.orow { align-items: flex-start; } .orow > .num, .orow > .ic { margin-top: 2px; }
.orow__meta { margin-top: 3px; font-size: 12px; line-height: 1.35; color: var(--muted-fg); overflow-wrap: anywhere; } .orow__meta .ic { vertical-align: -2px; }
.orow__items { margin-top: 3px; font-size: 12px; line-height: 1.35; color: #334155; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.report { padding: 12px 14px; border-radius: 10px; background: #effdde; border: 1px solid #d9f2c4; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.bar__thumbs { padding-top: 8px; margin-top: -6px; gap: 10px; }
.bwrap { position: relative; flex: none; display: block; }
.bthumb__x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #e2453f; color: #fff; font: 700 13px/18px system-ui, sans-serif; text-align: center; cursor: pointer; box-shadow: 0 0 0 1.5px var(--primary); }
.bthumb__x::before { content: ''; position: absolute; inset: -7px; } .bthumb__x:hover { background: #c62f2a; }
@media (max-width: 899px) { .bar { padding: 6px 6px 6px 10px; gap: 8px; } .bar .btn { min-height: 40px; } .bthumb { width: 28px; height: 28px; } .bthumb__x { width: 16px; height: 16px; font-size: 12px; line-height: 16px; top: -6px; right: -6px; } }
/* «Дізнатись вартість доставки»: м'яко мерехтить, щоб покупець точно помітив */
.btn.wa { position: relative; animation: wa-pulse 1.8s ease-in-out infinite; box-shadow: 0 0 0 0 rgb(31 168 85 / .55); }
.btn.wa:hover { animation-play-state: paused; } .btn.wa.off { animation: none; }
@keyframes wa-pulse { 0% { box-shadow: 0 0 0 0 rgb(31 168 85 / .55); filter: brightness(1); } 50% { filter: brightness(1.12); } 70% { box-shadow: 0 0 0 10px rgb(31 168 85 / 0); } 100% { box-shadow: 0 0 0 0 rgb(31 168 85 / 0); filter: brightness(1); } }
.wa-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #ecfdf3; border: 1px solid #b7ebc9; color: #14532d; font-size: 13px; line-height: 1.45; }
.wa-note .ic { color: #16a34a; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .btn.wa { animation: none; } }
