/* Персональные витрины клиентов, заказы и КП: оформление панелей менеджера (mgr.js) и корзины клиента (shop.js).
   Цвета и размеры - переменные app.css. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; text-decoration: none; color: var(--text); }
.btn svg { width: 17px; height: 17px; }
.btn.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn[disabled] { cursor: default; }

/* ---------- вкладки менеджера ---------- */
.view .badge, .pr-ord .badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 2px;
  border-radius: 999px; background: var(--up); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.view.on .badge { background: #fff; color: var(--accent); }
.view.on[data-v="clients"], .view.on[data-v="orders"], .view.on[data-v="kp"] { background: var(--accent); }
.app.pnl { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
.app.pnl .side, .app.pnl .tree-btn, .app.pnl .scrim { display: none !important; }
.main.pnl > :not(.views):not(.panel):not(.print-head) { display: none !important; }
.main.pnl { max-width: 1440px; width: 100%; margin: 0 auto; }
.panel { min-width: 0; }
html.client .client-hide, html:not(.client) .client-only { display: none !important; }

/* ---------- панели: заголовок, список, карточки ---------- */
/* заголовок раздела, действия, отбор, возврат к списку, пустое состояние - компоненты ui.css; здесь только раскладка панели */
.pn-head h1 { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }      /* название и метка состояния в одну строку */
.pn-tools { justify-content: space-between; }
.ui-crumbs .back { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--h-sm); margin-left: calc(var(--s-2) * -1); padding: 0 var(--s-3) 0 var(--s-2); }
.pn-empty { max-width: 560px; }
.pn-empty .ui-btn { margin-top: var(--s-4); }
.me-sel { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.me-sel svg { width: 17px; height: 17px; }
.me-sel .ui-select { max-width: 260px; }

/* списки строк - компонент ui-list / ui-row (ui.css); здесь сетки колонок экранов */
.prow { --cols: minmax(200px, 1.6fr) minmax(0, 2fr) minmax(150px, auto) 96px; padding-block: var(--s-6); }
.pr-main { min-width: 0; }
.pr-main b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.pr-main small, .pr-meta small { display: block; color: var(--dim); font-size: 12px; overflow-wrap: anywhere; }
.pr-tags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.pr-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.pr-ord { justify-self: end; display: inline-flex; align-items: center; gap: var(--s-3); text-align: right; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-ord b { font-size: 15px; color: var(--text); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; }
.chip.new { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }
.chip.work { background: var(--staff-soft); border-color: transparent; color: var(--staff); font-weight: 600; }
.chip.done { background: var(--down-soft); border-color: transparent; color: var(--down); font-weight: 600; }
.chip.cancel { background: var(--up-soft); border-color: transparent; color: var(--up); font-weight: 600; }

.ed > .pn-head { position: sticky; top: var(--top-h); z-index: 9; margin: -6px -6px 12px; padding: 8px 6px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; align-items: start; }
.ed-col { min-width: 0; }
.ed-col.wide { grid-column: span 1; }
.ed-dirty { font-size: 12px; color: var(--warn); }
.ui-btn.primary.pulse { box-shadow: var(--focus); }      /* «Сохранить» при несохраненных изменениях */
.ed .ui-card { margin-bottom: var(--s-8); }      /* карточки редактора идут колонкой */
.pc-r { font-size: var(--fs-xl); font-weight: 650; font-variant-numeric: tabular-nums; }
.ui-card-b h4 { margin: var(--s-8) 0 var(--s-4); font-size: var(--fs-sm); font-weight: 650; }
.ui-card-b h4 small { font-weight: 400; color: var(--text-3); }
.pc-sub { margin: var(--s-4) 0 0; font-size: var(--fs-xs); color: var(--text-2); line-height: 1.45; }
.ui-card-b > .pc-sub:first-child { margin-top: 0; }
.ui-card.danger { border-color: var(--st-bad-soft); }
.ui-card.kp-send { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); border-color: var(--accent-line); }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.fld input, .fld textarea { width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid var(--line-2);
  border-radius: 10px; background: var(--surface-2); font: inherit; font-size: 14px; color: var(--text); outline: none; }
.fld textarea { resize: vertical; line-height: 1.45; }
.fld input:focus, .fld textarea:focus { border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.ui-card-b > .ui-seg { margin-bottom: var(--s-5); }
.kchecks { margin: 0 0 var(--s-6); }
.stores { margin: var(--s-5) 0 0; }
.pbtns { margin-top: var(--s-6); }
.ui-card-b > .pbtns:first-child { margin-top: 0; }
.acc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); }
.acc small { display: block; font-size: 11.5px; color: var(--muted); }
.acc-code b { font: 650 19px/1.25 var(--mono); letter-spacing: .04em; white-space: nowrap; }
.acc-link a, .acc-link .acc-url { display: block; font-size: 13px; overflow-wrap: anywhere; line-height: 1.5; }
.acc-link .acc-url { user-select: all; }
.vis { margin: 2px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 14px; }
.vis b { font-size: 17px; color: var(--accent); }
.vis small { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.tag button { flex: none; width: 22px; height: 22px; border-radius: 6px; color: var(--dim); font-size: 16px; line-height: 1; }
.tag button:hover { background: var(--up-soft); color: var(--up); }
.tag.more { padding-right: 10px; color: var(--muted); }
@media (max-width: 760px), (pointer: coarse) {
  .tag { padding: 0 0 0 10px; }
  .tag button { width: 44px; height: 44px; }
}
.sp-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px 16px var(--h-sm); align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); }
.sp-n b { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.sp-n small { font-size: 11.5px; color: var(--dim); }
.sp-row .ui-input { font-weight: 600; }
.sp-r { color: var(--muted); font-size: 13px; }
.sp-add { position: relative; }
.sp-res { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow: auto; padding: 4px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.sp-res button { display: block; width: 100%; padding: 7px 9px; border-radius: 8px; text-align: left; }
.sp-res button:hover { background: var(--hover); }
.sp-res b { display: block; font-size: 13px; font-weight: 500; }
.sp-res small { font-size: 11.5px; color: var(--dim); }
.sp-res p { margin: 6px 9px; color: var(--muted); font-size: 13px; }
.mgrs { display: flex; flex-direction: column; gap: 6px; }
.mg-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr var(--h-sm); gap: 6px; align-items: center; }

/* таблица КП */
.kpt-h, .kpt-r { --cols: 30px minmax(0, 1fr) 150px 128px 104px calc(var(--h-sm) * 2 + 4px); gap: var(--s-4); padding: var(--s-4) var(--s-5); }
.kpt-h span:nth-child(n+3) { text-align: right; }
.kpt-n { color: var(--dim); font-size: 12px; }
.kpt-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kpt-name img { flex: none; width: 36px; height: 36px; object-fit: contain; border-radius: 7px; background: #fff; border: 1px solid var(--line); }
.kpt-name > span { min-width: 0; flex: 1; }
.kpt-name b { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.kpt-name small { display: block; font-size: 11.5px; color: var(--dim); }
.kpt-q .ui-input, .kpt-p .ui-input { font-weight: 600; }
.kpt-q, .kpt-p { display: flex; align-items: center; gap: 4px; }
.kpt-q small { flex: none; width: 34px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.kpt-q .kpt-u { width: 64px; flex: none; padding: 0 6px; text-align: left; font-weight: 500; }
.kpt-r.manual .kpt-p input { border-color: var(--warn); }
.kpt-rs { color: var(--st-warn); font-size: var(--fs-lg); }
.kpt-s { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.kpt-x { display: flex; justify-content: flex-end; }

/* заказ */
.ot-h, .ot-r { --cols: 40px minmax(0, 1fr) 76px 92px 100px; gap: var(--s-5); padding: var(--s-4) var(--s-6); }
.ot-h { --cols: minmax(0, 1fr) 76px 92px 100px; padding-left: 62px; }
.ot-h span:nth-child(n+2), .ot-r > span:nth-child(n+3), .ot-r > b { text-align: right; font-variant-numeric: tabular-nums; }
.ot-r { font-size: 13.5px; }
.ot-r img, .ot-r .ln-ph { width: 40px; height: 40px; object-fit: contain; border-radius: 7px; background: #fff; border: 1px solid var(--line); }
.ot-n b { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ot-n small { font-size: 11.5px; color: var(--dim); }
.ot-t { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; background: var(--surface-2); }
.ot-t b { font-size: 18px; font-variant-numeric: tabular-nums; }
.o-cl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; font-size: 15px; }
.o-ct { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.o-ct li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.o-ct a { display: inline-flex; align-items: center; min-height: var(--h-sm); }      /* телефон клиента: зона нажатия */
.o-ct svg { width: 16px; height: 16px; color: var(--muted); }
.o-cm { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--staff-soft); }
.o-cm small { font-size: 11.5px; color: var(--muted); }
.o-cm p { margin: 2px 0 0; white-space: pre-line; }
.o-hist { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.o-hist li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.o-hist li:last-child { border-bottom: 0; }
.o-hist span { color: var(--dim); margin-right: 8px; font-variant-numeric: tabular-nums; }
.ln-ph { display: grid; place-items: center; color: var(--line-2); }
.ln-ph svg { width: 20px; height: 20px; }

/* ---------- выбор товаров в каталоге ---------- */
.sel { flex: none; position: relative; display: inline-block; width: 20px; height: 20px; border-radius: 6px; border: 1.8px solid var(--line-2);
  background: var(--surface); cursor: pointer; transition: background .1s, border-color .1s; }
.sel:hover { border-color: var(--accent); }
.sel.on, .sel.grp, .sel.in { background: var(--accent); border-color: var(--accent); }
.sel.grp, .sel.in { opacity: .55; }
.sel.on::after, .sel.grp::after, .sel.in::after { content: ""; position: absolute; left: 5.5px; top: 1.5px; width: 5px; height: 10px; border: solid #fff;
  border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.sel.part { border-color: var(--accent); }
.sel.part::after { content: ""; position: absolute; left: 3.5px; right: 3.5px; top: 7.2px; height: 2.2px; border-radius: 2px; background: var(--accent); }
.sel.exc { border-color: var(--up); background: var(--up-soft); }
.sel.exc::after { content: "×"; position: absolute; inset: -2px 0 0; display: grid; place-items: center; color: var(--up); font: 700 15px/1 var(--font); }
.node .sel { width: 18px; height: 18px; margin: 0 2px 0 0; }
.node .sel.on::after, .node .sel.grp::after, .node .sel.in::after { left: 4.8px; top: 1.2px; width: 4.5px; height: 9px; }
.node .sel.part::after { top: 6.3px; }
.row.sel-row { background: var(--accent-soft); }
.row.sel-row:hover { background: color-mix(in srgb, var(--accent-soft) 100%, var(--hover)); }
.selbar { position: sticky; top: calc(var(--top-h) + 6px); z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px;
  flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--accent);
  box-shadow: var(--shadow); }
.sb-t { min-width: 0; font-size: 14px; }
.sb-t > b { margin-right: 8px; }
.sb-t span b { color: var(--accent); }
.sb-t small { display: block; font-size: 12px; color: var(--dim); }
.sb-a { display: flex; flex-wrap: wrap; gap: 6px; }
html.selecting .cols { top: calc(var(--top-h) + 76px); }
html.selecting .sec-h { top: calc(var(--top-h) + var(--cols-h) + 76px); }

/* ---------- витрина клиента ---------- */
.lvl.cl { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); background: var(--accent-soft);
  text-transform: none; letter-spacing: 0; font-size: 12px; }
.greet { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r);
  background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--surface); border: 1px solid var(--accent-line); position: relative; }
.gr-t { flex: 1 1 340px; min-width: 0; padding-right: 26px; }
.gr-t b { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; white-space: pre-line; }
.gr-t span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.gr-m { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.gr-m a, .gr-mn { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.gr-m a:hover { color: var(--accent); }
.gr-m svg { width: 16px; height: 16px; color: var(--accent); }
.gr-mn { font-weight: 600; }
.gr-mn small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.gr-x { position: absolute; top: 8px; right: 8px; }
@media (min-width: 761px) {
  .greet { padding-right: 46px; }
  .gr-t { padding-right: 0; }
}
.buy-add { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--accent-line);
  color: var(--accent); background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
.buy-add:hover { background: var(--accent); color: #fff; }
.buy-add svg { width: 16px; height: 16px; }
.buy { display: inline-flex; align-items: center; height: 34px; border: 1.5px solid var(--accent); border-radius: 10px; background: var(--surface); overflow: hidden; }
.buy-b { width: 30px; height: 100%; display: grid; place-items: center; color: var(--accent); }
.buy-b:hover { background: var(--accent-soft); }
.buy-b svg { width: 15px; height: 15px; }
.buy-q { width: 48px; height: 100%; border: 0; border-left: 1px solid var(--accent-line); border-right: 1px solid var(--accent-line); background: var(--accent-soft);
  text-align: center; font: 650 14px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text); outline: none; padding: 0 2px; }
.buy-none { display: inline-block; width: 1px; }
.c-act { gap: 6px; align-items: center; }
.list.buying .copy { opacity: 0; }
.list.buying .row:hover .copy { opacity: 1; }
.row.in-cart { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.c-st.flag { font-weight: 600; cursor: default; }
.c-st.flag:hover { background: none; }
.cart-fab { position: fixed; right: 22px; bottom: 80px; z-index: 26; display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 18px 0 15px;
  border-radius: 999px; background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent-line); box-shadow: var(--shadow); font-weight: 650; }
.cart-fab svg { width: 22px; height: 22px; }
.cart-fab.has { background: var(--accent); color: #fff; border-color: var(--accent); }
.cf-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft);
  font-size: 12px; font-variant-numeric: tabular-nums; }
.cart-fab.has .cf-n { background: #fff; color: var(--accent); }
.cf-t { font-size: 15px; font-variant-numeric: tabular-nums; }
html.drawer-open { overflow: hidden; }
.dr-scrim { position: fixed; inset: 0; z-index: 54; background: rgba(10, 14, 20, .42); }
.drawer { position: fixed; z-index: 55; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); display: flex; flex-direction: column; background: var(--surface);
  box-shadow: var(--shadow); border-left: 1px solid var(--line); }
.dr-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.dr-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); }
.dr-tabs button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dr-tabs button.on { background: var(--accent); color: #fff; }
.dr-who { flex: 1; min-width: 0; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.dr-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 28px; }
.dr-lines { display: flex; flex-direction: column; }
.ln { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto 30px; align-items: center; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ln img, .ln .ln-ph { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.ln-t { min-width: 0; }
.ln-t b { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ln-t small { font-size: 11.5px; color: var(--dim); }
.ln-c { display: flex; align-items: center; gap: 4px; }
.ln-q { width: 64px; height: 32px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); text-align: center;
  font: 650 14px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text); }
.ln-u { font-size: 11.5px; color: var(--muted); min-width: 22px; }
.ln-s { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; text-align: right; }
.dr-total { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0 4px; font-size: 14px; color: var(--muted); }
.dr-total b { font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.dr-note { margin: 0 0 12px; font-size: 12px; color: var(--dim); }
.dr-form { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.dr-form .btn svg { width: 18px; height: 18px; }
.dr-err { margin: 0; min-height: 1.2em; color: var(--up); font-size: 13px; }
.dr-warn { margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--staff-soft); color: var(--staff); font-size: 13px; }
.dr-clear { margin-top: 10px; }
.dr-empty, .dr-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 46px 10px; text-align: center; color: var(--muted); }
.dr-empty svg, .dr-done svg { width: 44px; height: 44px; color: var(--accent); opacity: .85; }
.dr-done svg { color: var(--down); }
.dr-empty b, .dr-done b { font-size: 18px; color: var(--text); }
.dr-done .btn { margin-top: 10px; }
.dr-wait { color: var(--muted); }
.ords { display: flex; flex-direction: column; gap: 8px; }
.ord { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ord-h { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; }
.ord-h:hover { background: var(--hover); }
.ord-n { font-weight: 650; }
.ord-d { font-size: 12px; color: var(--dim); }
.ord-h b { font-variant-numeric: tabular-nums; }
.ord-b { display: none; padding: 4px 12px 10px; border-top: 1px solid var(--line); background: var(--surface-2); }
.ord.open .ord-b { display: block; }
.ord-l { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.ord-l:last-child { border-bottom: 0; }
.ord-l span:nth-child(2) { color: var(--muted); white-space: nowrap; }
.ord-c { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); white-space: pre-line; }
.v-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.v-buy-t { font-size: 13px; color: var(--muted); }
.pv-bar { position: fixed; left: 16px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 14px;
  border-radius: 999px; background: #1d2330; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 13px; }
.pv-bar svg { width: 18px; height: 18px; color: #74b3ff; }
.pv-bar .btn { color: #131722; }

/* ---------- узкие экраны ---------- */
@media (max-width: 1100px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .prow { --cols: minmax(0, 1fr) auto; }
  .pr-tags { grid-column: 1 / -1; grid-row: 2; }
  .pr-meta { grid-column: 1; grid-row: 3; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .pr-ord { grid-column: 2; grid-row: 1 / 4; align-self: center; }
}
@media screen and (max-width: 760px) {
  .views { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .views::-webkit-scrollbar { display: none; }
  .view { flex: 0 0 auto; padding: 0 12px; }
  .pn-head h1 { font-size: 21px; }
  .ed > .pn-head { position: static; margin: 0 0 14px; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ed > .pn-head .pn-act { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: 10px; justify-content: flex-end; padding: 8px;
    border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .ed > .pn-head .pn-act .ed-dirty { flex: 1; }
  .app.pnl ~ .to-top { bottom: 84px; }
  .acc { grid-template-columns: minmax(0, 1fr); }
  .mg-row { grid-template-columns: 1fr 1fr var(--h-sm); }
  .mg-row input:nth-child(3), .mg-row input:nth-child(4) { grid-column: span 1; }
  .kpt-h { display: none; }
  .kpt-r { --cols: 22px minmax(0, 1fr) auto; grid-template-areas: "n name x" "n q q" "n p s"; row-gap: 6px; }
  .kpt-n { grid-area: n; align-self: start; }
  .kpt-name { grid-area: name; }
  .kpt-q { grid-area: q; }
  .kpt-p { grid-area: p; }
  .kpt-s { grid-area: s; align-self: center; }
  .kpt-x { grid-area: x; align-self: start; }
  .kpt-q input, .kpt-p input { max-width: 120px; }
  .ot-h { display: none; }
  .ot-r { --cols: 40px minmax(0, 1fr) auto; grid-template-areas: "ph n n" "ph q s"; }
  .ot-r > :first-child { grid-area: ph; }
  .ot-n { grid-area: n; }
  .ot-r > span:nth-child(3) { grid-area: q; text-align: left !important; color: var(--muted); }
  .ot-r > span:nth-child(4) { display: none; }
  .ot-r > b { grid-area: s; }
  .selbar { top: calc(var(--top-h) + 4px); padding: 8px 10px; }
  .sb-t small { display: none; }
  html.selecting .sec-h { top: calc(var(--top-h) + 104px); }
  .c-act { order: 3; flex: 1 0 100%; justify-content: flex-start; margin: 10px 0 0; }
  html:not(.client) .c-act { order: 1; flex: none; margin: -4px -6px 0 0; }
  .list.buying .copy { display: none; }
  .buy-add { height: 36px; padding: 0 14px; }
  .buy { height: 38px; }
  .buy-b { width: 38px; }
  .buy-q { width: 60px; font-size: 16px; }
  .row .sel { margin-top: 18px; }
  .cart-fab { right: 14px; bottom: 74px; height: 50px; }
  .greet { padding: 12px 12px; }
  .lvl.cl { max-width: 25vw; }
  .ln { grid-template-columns: 44px minmax(0, 1fr) auto 30px; grid-template-areas: "ph t t x" "ph c s s"; }
  .ln > :first-child { grid-area: ph; }
  .ln-t { grid-area: t; }
  .ln-c { grid-area: c; }
  .ln-s { grid-area: s; }
  .ln-x { grid-area: x; align-self: start; }
  .ln-q { font-size: 16px; }
  .pv-bar { left: 10px; right: 10px; bottom: 12px; border-radius: 14px; }
  .pv-bar span { flex: 1; min-width: 0; }
}

/* ---------- печать панели (заказ) ---------- */
@media print {
  .panel .no-print, .panel .pn-act, .panel .back, .selbar, .cart-fab, .drawer, .dr-scrim, .pv-bar, .greet, .buy, .buy-add { display: none !important; }
  .main.pnl > .views { display: none !important; }
  .panel .ui-card { border: 0; break-inside: avoid; }
  .panel .ui-card-h, .panel .ui-card-b { padding-left: 0; padding-right: 0; }
  .ed-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
