/* iSklad — разделы на телефоне.
   Таблицы на узком экране уезжали вбок: клиент, сумма, остаток и цены были за правым краем.
   Здесь — строки вместо таблиц, одна главная кнопка «+», остальное в «⋯», поиск и чипы сверху.
   Всё включается только на ширине до 820px: на компьютере страницы остаются прежними. */

.m-only { display:none !important; }
@media (max-width:820px) {
  .m-only { display:block !important; }
  .m-hide { display:none !important; }
  .founder-banner.off-mobile { display:none !important; }   /* на телефоне — на Главной и в колокольчике */
}

/* ---------- заголовок страницы: назад · название · «⋯» · «+ Новое» ---------- */
.mh { display:flex; align-items:center; gap:8px; margin:0 0 12px; }
.mh-back { width:36px; height:36px; margin-left:-8px; flex:none; display:grid; place-items:center; border-radius:10px; color:var(--fg) !important;
  text-decoration:none !important; -webkit-tap-highlight-color:transparent; }
.mh-back svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.mh-title { flex:1; min-width:0; margin:0 !important; font-size:26px !important; font-weight:700 !important; letter-spacing:-.02em; line-height:1.15;
  overflow-wrap:anywhere; }
.mh-title.small { font-size:21px !important; line-height:1.25; }
.mh-title .h-sub, .mh-title small { display:block; font-size:13px; font-weight:500; letter-spacing:0; color:var(--muted); margin-top:2px; }
.mh-btn { width:40px; height:40px; flex:none; display:grid; place-items:center; padding:0; border:1px solid var(--line); border-radius:12px;
  background:var(--card); color:var(--fg); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.mh-btn svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.mh-plus { display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 15px 0 12px; flex:none; border:0; border-radius:12px;
  background:var(--action); color:#fff !important; font:600 15px var(--ui); white-space:nowrap; text-decoration:none !important; -webkit-tap-highlight-color:transparent; }
.mh-plus svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.3; stroke-linecap:round; }
.mh-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:-6px 0 12px; font-size:13px; color:var(--muted); }

/* ---------- поиск, чипы, период ---------- */
.m-search { display:flex; align-items:center; gap:10px; height:48px; margin:0 0 10px; padding:0 6px 0 14px; border:1px solid var(--line); border-radius:14px;
  background:var(--card); color:var(--muted); }
.m-search > svg { width:19px; height:19px; flex:none; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; }
/* 16px — иначе iPhone увеличивает страницу при касании поля */
.m-search input { flex:1; min-width:0; height:44px; margin:0 !important; padding:0 !important; border:0 !important; background:transparent !important;
  box-shadow:none !important; color:var(--fg); font:400 16px var(--ui); outline:none; -webkit-appearance:none; appearance:none; }
.m-search input::-webkit-search-cancel-button { -webkit-appearance:none; }
.m-scan { width:38px; height:38px; flex:none; display:grid; place-items:center; padding:0; border:0; border-radius:10px; background:var(--action-soft);
  color:var(--action); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.m-scan svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.m-chips { display:flex; gap:8px; margin:0 -14px 10px; padding:0 14px; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.m-chips::-webkit-scrollbar { display:none; }
.m-chip { flex:none; display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 13px; border-radius:17px; border:1px solid var(--line);
  background:var(--card); color:var(--fg) !important; font:500 14px var(--ui); white-space:nowrap; text-decoration:none !important; cursor:pointer;
  -webkit-tap-highlight-color:transparent; }
.m-chip svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.m-chip.on { background:var(--ink); border-color:var(--ink); color:#fff !important; }
.m-chip.wait { background:color-mix(in srgb, var(--amber) 16%, var(--card)); border-color:color-mix(in srgb, var(--amber) 55%, var(--line)); }
.m-chip.wait.on { background:var(--amber); border-color:var(--amber); color:#1b1400 !important; }
.m-chip.dot::after { content:""; width:7px; height:7px; border-radius:50%; background:var(--action); }
.m-seg { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); gap:2px; margin:0 0 12px; padding:3px; border-radius:12px;
  background:var(--card-2); border:1px solid var(--line); }
.m-seg a { display:grid; place-items:center; height:34px; border-radius:9px; font:600 14px var(--ui); color:var(--muted) !important; text-decoration:none !important;
  -webkit-tap-highlight-color:transparent; }
.m-seg a.on { background:var(--card); color:var(--fg) !important; box-shadow:0 1px 3px rgba(16,23,42,.16); }
:root[data-theme="dark"]:not([data-tone="navy"]) .m-seg { background:var(--card); }
:root[data-theme="dark"]:not([data-tone="navy"]) .m-seg a.on { background:#636366; color:#fff !important; }
.m-info { display:flex; justify-content:space-between; gap:10px; margin:0 4px 10px; font-size:13px; color:var(--muted); }

/* ---------- списки строками ---------- */
.m-day { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin:14px 4px 8px; font-size:13px; color:var(--muted); }
.m-day:first-child { margin-top:2px; }
.m-day b { color:var(--fg); font-size:15px; font-weight:650; }
.m-list { margin:0 0 10px; background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; box-shadow:var(--shadow); }
.m-row { display:flex; align-items:center; gap:12px; min-height:64px; padding:10px 14px; border-top:1px solid var(--line-2); color:var(--fg) !important;
  text-decoration:none !important; -webkit-tap-highlight-color:transparent; }
.m-row:first-child { border-top:0; }
.m-row[hidden] { display:none !important; }
.m-row:active { background:var(--card-2); }
.m-av { width:40px; height:40px; flex:none; display:grid; place-items:center; border-radius:12px; font:700 14px var(--ui); letter-spacing:.01em;
  --tone:#2143d6; background:color-mix(in srgb, var(--tone) 13%, var(--card)); color:var(--tone); }
.m-av.round { border-radius:50%; }
.m-av svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.m-av.t0 { --tone:#2143d6; } .m-av.t1 { --tone:#137a4b; } .m-av.t2 { --tone:#a3630b; }
.m-av.t3 { --tone:#6a3fb0; } .m-av.t4 { --tone:#1d6b7d; } .m-av.t5 { --tone:#b5322a; }
.m-av.gray { --tone:#5b6478; }
:root[data-theme="dark"] .m-av { background:color-mix(in srgb, var(--tone) 26%, var(--card)); color:color-mix(in srgb, var(--tone) 55%, #fff); }
.m-ph { width:48px; height:48px; flex:none; border-radius:12px; overflow:hidden; background:var(--card-2); border:1px solid var(--line-2);
  display:grid; place-items:center; color:var(--muted); }
.m-ph img { width:100%; height:100%; object-fit:cover; display:block; }
.m-ph svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.m-mid { flex:1; min-width:0; }
.m-nm { font-size:15px; font-weight:600; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-nm.wrap { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.m-sub { display:flex; align-items:center; gap:6px; margin-top:2px; font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-sub > span { overflow:hidden; text-overflow:ellipsis; }
.m-sub b { color:var(--fg); font-weight:650; }
.m-sub b.neg, .m-sum.neg, .m-rt .neg { color:var(--err); }
.m-sum.pos, .m-rt .pos { color:var(--ok); }
.m-rt { flex:none; max-width:46%; display:flex; flex-direction:column; align-items:flex-end; gap:3px; text-align:right; }
.m-sum { font-size:15px; font-weight:650; white-space:nowrap; }
.m-rt small { font-size:11.5px; color:var(--muted); white-space:nowrap; }
.m-tag { display:inline-block; padding:1px 7px; border-radius:6px; font-size:11.5px; font-weight:600; line-height:1.5; white-space:nowrap;
  background:var(--card-2); color:var(--muted); }
.m-tag.ok { background:var(--ok-soft); color:var(--ok); }
.m-tag.wait { background:color-mix(in srgb, var(--amber) 20%, var(--card)); color:#7a4f00; }
:root[data-theme="dark"] .m-tag.wait { color:var(--amber); }
.m-tag.late, .m-tag.err { background:var(--err-soft); color:var(--err); }
.m-empty { padding:22px 16px; text-align:center; color:var(--muted); }
.m-pager { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:6px 0 16px; font-size:14px; color:var(--muted); }
.m-pager a { display:inline-flex; align-items:center; height:40px; padding:0 14px; border:1px solid var(--line); border-radius:12px; background:var(--card);
  font-weight:600; text-decoration:none !important; }
.m-more { display:block; width:100%; padding:13px; border:0; border-top:1px solid var(--line-2); background:none; color:var(--action) !important;
  font:600 14.5px var(--ui); text-align:center; text-decoration:none !important; cursor:pointer; }
.m-list .m-extra { display:none; }
.m-list.open .m-extra { display:flex; }
.m-list.open .m-more { display:none; }

/* ---------- плитки, кнопки действий, итог ---------- */
.m-lbl { margin:16px 4px 8px; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
.m-tiles { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin:0 0 12px; }
.m-tile { display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; padding:13px 14px 12px; border:1px solid var(--line); border-radius:16px;
  background:var(--card); color:var(--fg) !important; text-decoration:none !important; box-shadow:var(--shadow); -webkit-tap-highlight-color:transparent; }
.m-tile .m-ic { margin-bottom:6px; }
.m-tile span { font-size:13px; font-weight:600; color:var(--muted); }
.m-tile b { max-width:100%; font-size:20px; font-weight:700; letter-spacing:-.015em; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.m-tile small { font-size:12px; color:var(--muted); line-height:1.3; }
.m-tile.act b { font-size:15.5px; font-weight:650; white-space:normal; }
.m-ic { width:38px; height:38px; flex:none; display:grid; place-items:center; border-radius:11px; background:var(--action-soft); color:var(--action); }
.m-ic svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.m-ic.ok { background:var(--ok-soft); color:var(--ok); } .m-ic.err { background:var(--err-soft); color:var(--err); }
.m-ic.wait { background:color-mix(in srgb, var(--amber) 20%, var(--card)); color:#7a4f00; }
:root[data-theme="dark"] .m-ic.wait { color:var(--amber); }
.m-acts { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; margin:0 0 12px; }
.m-acts.three { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.m-act { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:70px; padding:10px 2px 9px; border:1px solid var(--line);
  border-radius:14px; background:var(--card); color:var(--fg) !important; font:600 12.5px var(--ui); text-align:center; text-decoration:none !important;
  cursor:pointer; -webkit-tap-highlight-color:transparent; }
.m-act svg { width:22px; height:22px; fill:none; stroke:var(--action); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.m-act.main { background:var(--action); border-color:var(--action); color:#fff !important; }
.m-act.main svg { stroke:#fff; }
.m-act:active { transform:scale(.97); }
.m-total { margin:0 0 12px; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:var(--card); box-shadow:var(--shadow); }
.m-total small { display:block; font-size:12.5px; color:var(--muted); }
.m-total b { display:block; margin:2px 0; font-size:30px; font-weight:700; letter-spacing:-.02em; line-height:1.15; }
.m-total span { font-size:12.5px; color:var(--muted); }
.m-total.split { display:flex; align-items:flex-end; gap:12px; }
.m-total.split > div { flex:1; min-width:0; }
.m-two { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin:0 0 12px; }
.m-big { display:flex; align-items:center; justify-content:center; gap:8px; height:52px; border-radius:14px; font:650 16px var(--ui); text-decoration:none !important;
  -webkit-tap-highlight-color:transparent; }
.m-big svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.m-big.in { background:var(--ok-soft); color:var(--ok) !important; }
.m-big.out { background:var(--err-soft); color:var(--err) !important; }
.m-big.main { background:var(--action); color:#fff !important; }
.m-big.ghost { background:var(--card); border:1.5px solid var(--action); color:var(--action) !important; }
.m-btn { display:inline-flex; align-items:center; justify-content:center; height:44px; padding:0 16px; border:0; border-radius:12px; background:var(--action);
  color:#fff !important; font:600 15px var(--ui); white-space:nowrap; text-decoration:none !important; cursor:pointer; }
.m-card { margin:0 0 12px; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:var(--card); box-shadow:var(--shadow); }
.m-card.warn { border-color:color-mix(in srgb, var(--amber) 55%, var(--line)); background:color-mix(in srgb, var(--amber) 8%, var(--card)); }
.m-kv { display:flex; justify-content:space-between; gap:12px; padding:12px 14px; border-top:1px solid var(--line-2); font-size:15px; }
.m-kv:first-child { border-top:0; }
.m-kv span { color:var(--muted); }
.m-kv b { font-weight:600; text-align:right; overflow-wrap:anywhere; }
.m-kv small { display:block; font-size:12px; color:var(--ok); font-weight:500; }

/* ---------- шторки: действия «⋯» и фильтры ---------- */
.m-sheet-act { display:flex; align-items:center; gap:14px; width:100%; padding:12px 4px; border:0; border-top:1px solid var(--line-2); background:none;
  color:var(--fg) !important; font:500 16px var(--ui); text-align:left; text-decoration:none !important; cursor:pointer; }
.m-sheet-act:first-of-type, h3 + .m-sheet-act, .m-lbl + .m-sheet-act { border-top:0; }
.m-sheet-act > span:not(.m-ic) { flex:1; min-width:0; }
.m-sheet-act small { display:block; margin-top:1px; font-size:12.5px; font-weight:400; color:var(--muted); }
.m-sheet-act .cnt { flex:none !important; font-size:14px; color:var(--muted); }
.m-sheet-act.danger { color:var(--err) !important; }
.m-sheet-act.danger .m-ic { background:var(--err-soft); color:var(--err); }
dialog.msheet form.m-sheet-form { margin:0; }
dialog.msheet form.m-sheet-form .m-sheet-act { width:100%; }
.m-opts { display:flex; flex-wrap:wrap; gap:8px; }
.m-opt { display:inline-flex; align-items:center; height:38px; padding:0 14px; border-radius:19px; border:1px solid var(--line); background:var(--card);
  color:var(--fg) !important; font:500 14.5px var(--ui); text-decoration:none !important; cursor:pointer; }
.m-opt.on, .m-opt:has(input:checked) { background:var(--action-soft); border-color:var(--action); color:var(--action) !important; font-weight:600; }
.m-opt input { position:absolute; opacity:0; pointer-events:none; }
.m-dates { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.m-dates label { margin:0; font-size:12.5px; color:var(--muted); }
.m-dates input { width:100%; margin:4px 0 0 !important; font-size:16px !important; }
.m-go { display:flex; align-items:center; justify-content:center; width:100%; height:50px; margin-top:18px; border:0; border-radius:14px;
  background:var(--action); color:#fff; font:650 16px var(--ui); cursor:pointer; }
.m-sheet-head { display:flex; align-items:center; justify-content:space-between; margin:4px 2px 4px; }
.m-sheet-head h3 { margin:0 !important; }
.m-sheet-head a { font-size:14.5px; font-weight:600; text-decoration:none !important; }

/* ---------- карточки: длинные таблицы свёрнуты, открываются по нажатию ---------- */
details.m-fold > summary { list-style:none; cursor:pointer; }
details.m-fold > summary::-webkit-details-marker { display:none; }
details.m-fold > summary > h2 { display:inline; }
@media (max-width:820px) {
  details.m-fold { margin:0 0 10px; border:1px solid var(--line); border-radius:16px; background:var(--card); overflow:hidden; }
  details.m-fold > summary { display:flex; align-items:center; gap:10px; padding:14px 14px 14px 16px; -webkit-tap-highlight-color:transparent; }
  details.m-fold > summary > h2 { flex:1; margin:0 !important; font-size:15.5px !important; font-weight:600 !important; }
  details.m-fold > summary::after { content:""; width:9px; height:9px; margin-right:4px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted);
    transform:rotate(-45deg); transition:transform .15s; }
  details.m-fold[open] > summary::after { transform:rotate(45deg); }
  details.m-fold > summary .m-fold-sub { font-size:13px; color:var(--muted); }
  details.m-fold > :not(summary) { margin-left:12px !important; margin-right:12px !important; }
  details.m-fold > .table-scroll:last-child, details.m-fold > table:last-child, details.m-fold > :last-child { margin-bottom:12px !important; }
}

/* ---------- новая продажа: нижняя панель «Итого · Провести», редкие поля свёрнуты ---------- */
.m-bar { display:none; }
@media (max-width:820px) {
  form.m-form-short .doc-head .m-extra { display:none; }
  form.m-form-short .doc-head.open .m-extra { display:block; }
  form.m-form-short .doc-head.open .m-extra.check { display:flex; }
  .m-params { display:flex !important; align-items:center; gap:10px; width:100%; margin:4px 0 0; padding:12px 2px 2px; border:0; border-top:1px solid var(--line-2);
    background:none; color:var(--fg); font:500 15px var(--ui); text-align:left; cursor:pointer; }
  .m-params span { flex:none; }
  .m-params small { flex:1; text-align:right; }
  .m-params small { min-width:0; color:var(--muted); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .m-params::after { content:""; width:8px; height:8px; flex:none; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(45deg);
    margin:-4px 4px 0 0; transition:transform .15s; }
  .doc-head.open .m-params::after { transform:rotate(-135deg); margin-top:4px; }
  form.m-form-short .doc-foot .actions { display:none; }
  form.m-form-short .doc-foot .totals { min-width:0; width:100%; }
  .m-bar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:45; align-items:center; gap:12px;
    padding:10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background:var(--card); border-top:1px solid var(--line);
    box-shadow:0 -10px 24px -16px rgba(16,23,42,.35); }
  .m-bar .m-bar-tot { flex:1; min-width:0; }
  .m-bar small { display:block; font-size:12px; color:var(--muted); }
  .m-bar b { display:block; font-size:19px; font-weight:700; letter-spacing:-.01em; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .m-bar i { display:block; font-style:normal; font-size:12px; font-weight:600; color:var(--ok); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .m-bar i.neg { color:var(--err); }
  .m-bar button { flex:none; height:50px; padding:0 20px; border:0; border-radius:14px; background:var(--action); color:#fff; font:650 16px var(--ui); cursor:pointer; }
  .m-bar button.ghost { padding:0 12px; background:var(--card-2); color:var(--fg); border:1px solid var(--line); font-weight:600; font-size:14.5px; }
  body.has-m-bar .content { padding-bottom:110px !important; }
  table.grid.lines tr.empty td { position:static !important; padding:6px 2px !important; }
  .picker.m-picker { display:flex; gap:8px; align-items:flex-start; }
  .picker.m-picker > input { flex:1; min-width:0; font-size:16px; }
  .picker.m-picker > .m-scan { width:46px; height:46px; border-radius:12px; background:var(--action); color:#fff; }
}

/* ---------- сканер штрихкода ---------- */
.m-scanner { position:fixed; inset:0; z-index:200; display:flex; flex-direction:column; background:#000; color:#fff; }
.m-scanner video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.m-scanner .m-scan-top { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; background:linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); }
.m-scanner .m-scan-top b { font:650 17px var(--ui); }
.m-scanner button.m-scan-close { height:40px; padding:0 16px; border:0; border-radius:20px; background:rgba(255,255,255,.18); color:#fff; font:600 15px var(--ui); cursor:pointer; }
.m-scanner .m-scan-frame { position:relative; z-index:1; flex:1; display:grid; place-items:center; pointer-events:none; }
.m-scanner .m-scan-frame i { width:min(78vw, 340px); height:min(46vw, 200px); border-radius:18px; box-shadow:0 0 0 100vmax rgba(0,0,0,.42);
  outline:2px solid rgba(255,255,255,.9); outline-offset:-2px; }
.m-scanner .m-scan-frame i::after { content:""; position:absolute; left:12%; right:12%; top:50%; height:2px; background:#ff453a; opacity:.85; }
.m-scanner .m-scan-bottom { position:relative; z-index:2; padding:16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); text-align:center;
  background:linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.6)); font:500 15px var(--ui); }
.m-scanner .m-scan-last { display:inline-block; max-width:100%; margin-bottom:10px; padding:8px 14px; border-radius:12px; background:rgba(48,209,88,.9); color:#00230c;
  font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-scanner .m-scan-last.err { background:rgba(255,69,58,.92); color:#fff; }
.m-scanner .m-scan-last[hidden] { display:none; }

/* короткое сообщение внизу экрана */
.m-toast { position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom, 0px)); z-index:210; max-width:calc(100vw - 32px); transform:translate(-50%, 20px);
  padding:11px 16px; border-radius:14px; background:#10172a; color:#fff; font:500 14.5px var(--ui); box-shadow:0 12px 30px -10px rgba(0,0,0,.5);
  opacity:0; transition:opacity .2s, transform .2s; pointer-events:none; }
.m-toast.show { opacity:1; transform:translate(-50%, 0); }
:root[data-theme="dark"] .m-toast { background:#f2f2f7; color:#000; }
:root[data-theme="dark"][data-tone="navy"] .m-toast { background:#e8ecf6; color:#10172a; }

/* шторка «⋯» документа: все кнопки документа столбиком */
.m-sheet-acts { display:flex; flex-direction:column; gap:8px; }
.m-sheet-acts form { margin:0; display:block; }
.m-sheet-acts .btn { display:flex !important; align-items:center; width:100% !important; min-height:48px; margin:0 !important; justify-content:flex-start;
  padding:0 16px !important; border-radius:12px !important; font-size:15.5px !important; text-align:left; }
.m-sheet-acts .btn.ghost { background:var(--card-2) !important; color:var(--fg) !important; border:1px solid var(--line) !important; box-shadow:none !important; }
.m-sheet-acts .btn.danger { color:var(--err) !important; }

/* отчёт на телефоне: сверху «‹» к плиткам; период — кнопками в ряд; «как смотреть» (по клиентам/товарам, валюта) — рядом;
   свои даты — по нажатию на строку с периодом */
@media (max-width:820px) {
  form.rep-filters { display:flex !important; flex-flow:row wrap; align-items:center; gap:8px; }
  form.rep-filters > * { flex:1 1 140px; min-width:0; }
  form.rep-filters .presets { order:-2; flex:1 1 100%; display:flex; gap:8px; margin:0 -14px; padding:0 14px; overflow-x:auto; scrollbar-width:none; }
  form.rep-filters .presets::-webkit-scrollbar { display:none; }
  form.rep-filters .presets a { flex:none; display:inline-flex; align-items:center; height:34px; padding:0 13px; border-radius:17px; border:1px solid var(--line);
    background:var(--card); color:var(--fg) !important; font:500 14px var(--ui); white-space:nowrap; text-decoration:none !important; }
  form.rep-filters .presets a.on { background:var(--ink); border-color:var(--ink); color:#fff !important; }
  form.rep-filters .rep-own { order:-1; flex:1 1 100%; display:block !important; padding:9px 12px; border:1px dashed var(--line); border-radius:12px; background:none;
    color:var(--muted); font:500 13.5px var(--ui); text-align:left; cursor:pointer; }
  form.rep-filters > label.inline, form.rep-filters > button.mini, form.rep-filters > .filters-info { display:none !important; }
  form.rep-filters.own > label.inline { display:flex !important; flex:1 1 40%; }
  form.rep-filters.own > label.inline input { flex:1; min-width:0; font-size:16px; }
  form.rep-filters.own > button.mini { display:flex !important; flex:1 1 100%; justify-content:center; height:44px; }
  .pnl-row > :last-child { white-space:nowrap; }
}

/* ---------- розница: карточка точки ---------- */
.rt-store .rt-top { display:flex; align-items:center; gap:12px; }
.rt-store .m-sub span { display:inline-flex; align-items:center; gap:6px; }
.rt-dot { width:8px; height:8px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 3px var(--ok-soft); }
.rt-nums { display:grid; grid-template-columns:1.6fr 1fr; gap:10px; margin:12px 0; }
.rt-nums > div { padding:10px 12px; border-radius:12px; background:var(--card-2); }
.rt-nums small { display:block; font-size:12px; color:var(--muted); }
.rt-nums b { display:block; font-size:21px; font-weight:700; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rt-store .m-big { margin-top:12px; }
.rt-store .rt-nums + .m-big { margin-top:0; }
