/* SeeTech Склад. Язык — как у сайта SeeTech: системный SF, светло-серый фон, белые группы, синий Apple для действий. */
:root {
  --bg: #f5f5f7;            /* фон страницы */
  --side: #fbfbfd;          /* боковая панель */
  --group: #ffffff;         /* белые группы, карточки, окна */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;         /* вторичный текст: 4.6:1 на фоне, 5.1:1 на белом */
  --ink-3: #86868b;         /* третичный: только подписи и крупное */
  --sep: rgba(0, 0, 0, .09);
  --fill: rgba(118, 118, 128, .12);   /* поля ввода, серые кнопки, трек сегментов */
  --fill-2: rgba(118, 118, 128, .2);
  --hover: rgba(0, 0, 0, .04);
  --sel: #e8e8ed;
  --accent: #0071e3; --accent-hover: #0077ed; --on-accent: #fff; --accent-soft: rgba(0, 113, 227, .1);
  --ok: #248a3d; --ok-soft: rgba(36, 138, 61, .12);
  --warn: #b25000; --warn-soft: rgba(255, 149, 0, .16);
  --bad: #d70015; --bad-soft: rgba(255, 59, 48, .12);
  --ring: rgba(0, 113, 227, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.25, .1, .25, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000; --side: #161617; --group: #1c1c1e; --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #8e8e93;
    --sep: rgba(255, 255, 255, .1); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .36);
    --hover: rgba(255, 255, 255, .05); --sel: #2c2c2e;
    --accent: #2997ff; --accent-hover: #47a6ff; --on-accent: #fff; --accent-soft: rgba(41, 151, 255, .16);
    --ok: #30d158; --ok-soft: rgba(48, 209, 88, .16); --warn: #ff9f0a; --warn-soft: rgba(255, 159, 10, .16);
    --bad: #ff453a; --bad-soft: rgba(255, 69, 58, .16); --ring: rgba(41, 151, 255, .55);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000; --side: #161617; --group: #1c1c1e; --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #8e8e93;
  --sep: rgba(255, 255, 255, .1); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .36);
  --hover: rgba(255, 255, 255, .05); --sel: #2c2c2e;
  --accent: #2997ff; --accent-hover: #47a6ff; --on-accent: #fff; --accent-soft: rgba(41, 151, 255, .16);
  --ok: #30d158; --ok-soft: rgba(48, 209, 88, .16); --warn: #ff9f0a; --warn-soft: rgba(255, 159, 10, .16);
  --bad: #ff453a; --bad-soft: rgba(255, 69, 58, .16); --ring: rgba(41, 151, 255, .55);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ─── База ───────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.47 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent); text-decoration: none; }
::selection { background: var(--accent-soft); }
input, textarea { caret-color: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; border-radius: 8px; }
.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: 0; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.small { font-size: 13px; letter-spacing: -.005em; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ─── Каркас ─────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--sep); padding: 22px 12px 14px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: block; padding: 0 10px 18px; color: var(--ink); }
.brand svg { display: block; width: 152px; height: auto; }
.nav-sec { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 16px 10px 5px; letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 0 10px; min-height: 34px; border-radius: 8px;
  color: var(--ink); font-weight: 500; transition: background .15s var(--ease); }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--sel); font-weight: 600; }
.nav svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.side .me { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--sep); display: grid; gap: 10px; }
.side .me b { font-weight: 600; }
.main-wrap { min-width: 0; }
.main { min-width: 0; padding: 26px 32px 48px; max-width: 1600px; }
.topbar { display: none; }
.page-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.page-h h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.022em; margin: 0; }
.page-h .grow { flex: 1; }

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 272px; transform: translateX(-100%);
    transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; height: 52px; padding: 0 8px;
    background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--sep); }
  .topbar b { flex: 1; font-size: 17px; font-weight: 600; }
  .main { padding: 18px 16px 40px; }
}
@media (max-width: 640px) { .hide-sm { display: none; } .page-h h1 { font-size: 24px; } }

/* ─── Группы и раскладка ─────────────────────────────── */
.card { background: var(--group); border-radius: 14px; box-shadow: var(--shadow); }
.card.pad { padding: 16px 18px; }
.card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.sec-title { font-size: 17px; font-weight: 600; margin: 22px 0 8px; letter-spacing: -.015em; }
.sec-title:first-child { margin-top: 0; }

/* Сводка ключ — значение, как в «Настройках» */
.kvl { background: var(--group); border-radius: 14px; box-shadow: var(--shadow); }
.kvl > div { display: flex; align-items: baseline; gap: 16px; padding: 12px 18px; position: relative; }
.kvl > div + div::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; border-top: 1px solid var(--sep); }
.kvl dt, .kvl .k { color: var(--ink); flex: 1; margin: 0; }
.kvl dd, .kvl .v { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.kvl .note { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; }
.kvl .big .v { font-size: 22px; letter-spacing: -.02em; }

/* ─── Кнопки ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: 10px; border: 0; background: var(--fill); color: var(--ink); cursor: pointer; font-weight: 500;
  white-space: nowrap; transition: background .15s var(--ease), opacity .15s; }
.btn:hover { background: var(--fill-2); }
.btn:active { opacity: .7; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary, .btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover, .btn.accent:hover { background: var(--accent-hover); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { min-height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { min-height: 50px; font-size: 17px; font-weight: 600; padding: 0 24px; border-radius: 980px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 36px; padding: 0; }
.btn .kbd { font-size: 12px; font-weight: 500; opacity: .7; }

/* ─── Поля ───────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; min-height: 36px; padding: 7px 11px; border: 0; border-radius: 10px;
  background: var(--fill); outline: none; transition: box-shadow .15s var(--ease), background .15s; }
.input::placeholder { color: var(--ink-3); }
.input:focus { background: var(--group); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
select.input { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5l3-3' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
.input.big { min-height: 46px; font-size: 17px; padding: 10px 14px; border-radius: 12px; }
.input.money { text-align: right; font-variant-numeric: tabular-nums; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 40px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

/* ─── Метки ──────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 980px; font-size: 12px; font-weight: 600;
  background: var(--fill); color: var(--ink-2); white-space: nowrap; letter-spacing: 0; vertical-align: 1px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
.pay-st { margin: 3px 0 1px; }
.pay-st .badge { white-space: nowrap; }
/* Дни на складе в остатках: красный залит целиком — залежавшийся товар должен бросаться в глаза */
.age { display: inline-block; padding: 2px 8px; border-radius: 980px; font-size: 12.5px; font-weight: 700;
  text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.age.ok { background: var(--ok); color: #fff; }
:root[data-theme="dark"] .age.ok { color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .age.ok { color: #000; } }
.age.warn { background: #ffcc00; color: #1d1d1f; }
.age.bad { background: var(--bad); color: #fff; }

/* ─── Таблицы ────────────────────────────────────────── */
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 10px 14px 8px; border-bottom: 1px solid var(--sep);
  position: sticky; top: 0; background: var(--group); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--sep); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--hover); }
.t tr.t-grp td { font-size: 13px; font-weight: 700; color: var(--ink); padding: 8px 14px; background: var(--bg); }
.t .r { text-align: right; }
.t-wrap { overflow-x: auto; }
.card.t-wrap { overflow: auto; }
.empty { padding: 40px 18px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 17px; font-weight: 600; margin-bottom: 4px; }

/* Сегменты, как в macOS */
.tabs { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; }
.tabs button { border: 0; background: transparent; padding: 0 14px; min-height: 30px; border-radius: 7px; cursor: pointer;
  font-weight: 500; color: var(--ink); transition: background .15s var(--ease); white-space: nowrap; }
.tabs button.on { background: var(--group); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 600; }
:root[data-theme="dark"] .tabs button.on { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs button.on { background: #636366; } }
/* на узком экране любой переключатель не шире экрана: лишние кнопки листаются вбок (период, вид отчёта, приход/расход…) */
.tabs { max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; }
/* Способ оплаты: у каждого свой цвет и значок, выбранный — залит целиком, чтобы кассир не путал */
.pay-card { --pc: var(--accent); --pc-soft: var(--accent-soft); --pc-on: #fff; }
.pay-cash { --pc: var(--ok); --pc-soft: var(--ok-soft); --pc-on: #fff; }
.pay-mix { --pc: var(--warn); --pc-soft: var(--warn-soft); --pc-on: #fff; }
:root[data-theme="dark"] .pay-cash, :root[data-theme="dark"] .pay-mix { --pc-on: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pay-cash, :root:not([data-theme="light"]) .pay-mix { --pc-on: #000; } }
.paytabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paytabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 68px; padding: 6px 8px;
  border: 2px solid transparent; border-radius: 14px; background: var(--pc-soft); color: var(--pc); cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.paytabs button svg { width: 26px; height: 26px; }
.paytabs button:hover { border-color: var(--pc); }
.paytabs button.on { background: var(--pc); color: var(--pc-on); border-color: var(--pc); box-shadow: 0 2px 10px var(--pc-soft); }
.paytabs button.on::after { content: "выбрано"; font-size: 11px; font-weight: 500; opacity: .85; margin-top: -2px; }
.btn.lg.pay-card, .btn.lg.pay-cash, .btn.lg.pay-mix { background: var(--pc); color: var(--pc-on); }
.btn.lg.pay-card:hover, .btn.lg.pay-cash:hover, .btn.lg.pay-mix:hover { filter: brightness(1.06); }
.pay-swap { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 4px; }
.pay-swap .pay-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-weight: 600;
  background: var(--pc-soft); color: var(--pc); }
.pay-swap .pay-chip.to { background: var(--pc); color: var(--pc-on); }
.pay-swap .pay-chip svg { width: 20px; height: 20px; }
.pay-swap .arr { color: var(--ink-3); font-size: 20px; }

/* ─── Касса ──────────────────────────────────────────── */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
@media (max-width: 1150px) { .pos { grid-template-columns: minmax(0, 1fr); } }
.shiftbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; min-height: 36px; }
.shiftbar .status { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.shiftbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.shiftbar .dot.on { background: var(--ok); }
.shiftbar select.input { width: auto; min-height: 32px; font-weight: 600; }
.results { margin-top: 12px; max-height: calc(100vh - 210px); overflow-y: auto; }
.res { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; gap: 14px; align-items: center; padding: 10px 14px 10px 18px;
  cursor: pointer; position: relative; transition: background .12s var(--ease); }
.res + .res::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; border-top: 1px solid var(--sep); }
.res:hover { background: var(--hover); }
.res.kb { background: var(--accent-soft); }
.res:first-child { border-radius: 14px 14px 0 0; } .res:last-child { border-radius: 0 0 14px 14px; }
.res .nm { font-weight: 500; }
.res .st { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.res .st .here { color: var(--ok); font-weight: 600; }
.res .pr { font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.res.off .nm, .res.off .pr { color: var(--ink-2); }
.add { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid;
  place-items: center; cursor: pointer; padding: 0; }
.add svg { width: 15px; height: 15px; stroke-width: 2.4; }
.res.off .add { background: var(--fill-2); color: var(--ink-2); }
.cart { position: sticky; top: 24px; display: flex; flex-direction: column; max-height: calc(100vh - 48px); border-radius: 18px; }
.cart-h { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px 20px; }
.cart-h h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; flex: 1; }
.cart-lines { overflow-y: auto; flex: 1; min-height: 120px; }
.cl { padding: 12px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; position: relative; }
.cl + .cl::before { content: ""; position: absolute; top: 0; left: 20px; right: 0; border-top: 1px solid var(--sep); }
.cl .nm { font-weight: 500; }
.cl .sn { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); letter-spacing: 0; }
.cl .ctl { display: flex; gap: 6px; align-items: center; grid-column: 1 / -1; margin-top: 6px; }
.cl .ctl .input { min-height: 30px; padding: 4px 8px; width: 96px; border-radius: 8px; font-size: 14px; }
.cl .ctl .qty { width: 58px; text-align: center; }
.cl .ctl .disc { width: 74px; }
.cl .sum { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cart-foot { padding: 14px 20px 20px; display: grid; gap: 12px; border-top: 1px solid var(--sep); }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total span { color: var(--ink-2); }
.total b { font-size: 34px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.change { font-size: 13px; color: var(--ink-2); min-height: 18px; }

/* ─── Окна и уведомления ─────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); z-index: 60; display: grid; place-items: center; padding: 16px;
  animation: fade .18s var(--ease); }
.modal { background: var(--group); border-radius: 18px; box-shadow: var(--shadow-lg); width: min(540px, 100%); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; animation: rise .22s cubic-bezier(.16, 1, .3, 1); }
.modal.wide { width: min(960px, 100%); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 16px 6px 22px; }
.modal-h h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; flex: 1; }
.modal-h .btn.icon-btn { width: 30px; min-height: 30px; border-radius: 50%; }
.modal-b { padding: 12px 22px 18px; overflow-y: auto; display: grid; gap: 14px; grid-auto-rows: max-content; align-content: start; }   /* строки по содержимому: иначе в низком окне фото налезает на соседние блоки */
.modal-b .card { box-shadow: none; background: var(--bg); }
.modal-b .kvl { box-shadow: none; background: var(--bg); }
.modal-b .card .t th { background: var(--bg); }
.modal-f { padding: 12px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px;
  width: min(480px, calc(100% - 24px)); justify-items: center; }
.toast { background: #1d1d1f; color: #f5f5f7; padding: 11px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 500;
  animation: rise .22s cubic-bezier(.16, 1, .3, 1); max-width: 100%; }
.toast.err { background: var(--bad); color: #fff; }
.toast.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #30d158; margin-right: 9px; vertical-align: 1px; }

/* ─── Вход ───────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login form { width: min(360px, 100%); display: grid; gap: 14px; }
.login .brand { padding: 0 0 18px; justify-self: center; }
.login .brand svg { width: 200px; }
.login h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.022em; text-align: center; }
.login p { margin: 0; text-align: center; color: var(--ink-2); }
.login .btn.lg { width: 100%; margin-top: 6px; }

/* ─── Прочее ─────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; }
.imei-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px 0 12px; min-height: 30px; border-radius: 980px; background: var(--fill);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0; border: 0; color: var(--ink); }
button.chip { cursor: pointer; padding: 0 12px; } button.chip:hover { background: var(--fill-2); }
.chip button { border: 0; background: transparent; cursor: pointer; color: var(--ink-2); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.chip button:hover { background: var(--fill-2); }
.chip button svg { width: 12px; height: 12px; }
.group-sel { box-shadow: 0 0 0 2px var(--accent) !important; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 12px; }
.sticky-foot { position: sticky; bottom: 12px; margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 20px;
  background: color-mix(in srgb, var(--group) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-radius: 980px; box-shadow: var(--shadow-lg); }
/* ─── Отчёты, сводка, ревизия, trade-in ─── */
.period { gap: 8px; }
/* строка периода: даты переносятся под кнопки, если не влезают */
.period { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--ink); }
.t tr.t-foot td { border-top: 1px solid var(--sep); background: transparent; }
.sum-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sum-grid > .col { gap: 16px; }
@media (max-width: 1100px) { .sum-grid { grid-template-columns: 1fr; } }
.kvl a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
.kvl a:hover { color: var(--accent); border-color: var(--accent); }
.kvl > div.click { cursor: pointer; }
.kvl > div.click:hover { background: var(--hover); }
.kvl > div.sel { background: var(--accent-soft); }
.kvl > div:first-child { border-radius: 14px 14px 0 0; } .kvl > div:last-child { border-radius: 0 0 14px 14px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; }
.bar { flex: 1; height: 100%; position: relative; min-width: 2px; }
.bar i, .bar b { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px 3px 0 0; }
.bar i { background: var(--accent-soft); }
.bar b { background: var(--accent); left: 22%; right: 22%; }
.bar:hover i { background: var(--fill-2); }
.lg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--accent-soft); vertical-align: -1px; margin-left: 8px; }
.lg-dot.p { background: var(--accent); }
.attn { border-left: 3px solid var(--warn); }
.attn div { padding: 3px 0; }
.attn a { color: var(--warn); font-weight: 600; text-decoration: none; }
.attn a:hover { text-decoration: underline; }
.inv-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.inv-stats { min-width: 280px; }
.scanfeed { display: flex; flex-direction: column; gap: 4px; max-height: 236px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 2px 4px; }   /* ~6½ строк: видно, что ниже есть ещё */
.sf { flex: none; display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-radius: 10px; font-size: 13px; background: var(--group); box-shadow: var(--shadow); }
.sf span { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf.ok { color: var(--ok); } .sf.warn { color: var(--warn); } .sf.bad { color: var(--bad); }
.sf:not(.new) { opacity: .62; }
.sf.new { animation: sf-in .22s ease-out; }
@keyframes sf-in { from { transform: translateY(-4px); opacity: 0; } }
.chip.bad, .chip.warn { padding: 0 12px; }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.cl.tradein-line { background: var(--accent-soft); border-radius: 12px; }
.cl.tradein-line .sum { color: var(--accent); }
.ti-steps { display: flex; flex-direction: column; gap: 14px; }
.ti-steps .field > span { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .sf.new { animation: none; } }

/* ─── Остатки: фильтры и итоги ─── */
.stock-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; align-items: end; }
.stock-filters .field { min-width: 0; }
/* Остатки: дерево групп слева, как в МойСклад (можно скрыть); на узком экране вместо него — список «Группа» */
.stock-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: start; }
.gtree { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 6px 4px; font-size: 12.5px; }
.gtree ul { list-style: none; margin: 0; padding: 0 0 0 12px; }
.gtree > ul { padding-left: 0; }
.gt-row { display: flex; align-items: flex-start; gap: 2px; padding: 4px 6px; border-radius: 6px; cursor: pointer; line-height: 1.3; }
.gt-row:hover { background: var(--hover); }
.gt-row.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.gt-root { font-weight: 600; }
.gt-tw { flex: none; width: 14px; height: 16px; padding: 0; border: 0; background: none; color: var(--ink-3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
button.gt-tw::before { content: ""; border: 4px solid transparent; border-left: 5px solid currentColor; border-right: 0; transition: transform .15s var(--ease); }
button.gt-tw.open::before { transform: rotate(90deg); }
.gt-ck { flex: none; width: 13px; height: 13px; margin: 2px 4px 0 0; accent-color: var(--accent); cursor: pointer; }
.gt-sel { margin: 2px 6px 4px; font-size: 11.5px; color: var(--accent); }
.gtree.gtree-modal { position: static; max-height: 55vh; padding: 0; font-size: 13.5px; }
/* Выбор одной папки (новый товар, карточка товара): кнопка-поле и дерево с поиском */
.gp-btn { display: flex; align-items: center; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.gp-btn::after { content: ""; flex: none; margin-left: auto; border: 4px solid transparent; border-top: 5px solid var(--ink-3); border-bottom: 0; }
.gp-btn .gp-val { margin-right: 8px; }
.gp-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-tree { min-height: 240px; margin-top: 8px; }
.gp-path { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.stock-wrap.no-tree { grid-template-columns: minmax(0, 1fr); }
.stock-wrap.no-tree .gtree { display: none; }
.stock-wrap:not(.no-tree) .only-narrow { display: none; }
@media (max-width: 1280px) { .stock-wrap { grid-template-columns: minmax(0, 1fr); } .gtree, .tree-tog { display: none; } .stock-wrap:not(.no-tree) .only-narrow { display: flex; } }
/* компактные фильтры и плотная таблица остатков */
.stock-filters.compact { padding: 10px 12px; gap: 8px 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stock-filters.compact .field { gap: 3px; }
.stock-filters.compact .field > span { font-size: 11.5px; }
.stock-filters.compact .input, .stock-filters.compact .btn { min-height: 32px; padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
.stock-filters.compact .f-wide { grid-column: span 2; }
.t-dense th { padding: 8px 8px 6px; }
.t-dense td { padding: 7px 8px; font-size: 13px; }
.t-dense td:first-child { min-width: 180px; }
.t-dense .st-cell { max-width: 140px; line-height: 1.35; }
.t-dense .st-cell div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-dense .unit { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.t-dense .money { white-space: nowrap; }
/* «по 23 000 ₽–30 000 ₽» переносится по тире, а не растягивает таблицу за край карточки */
.t-dense .unit.wrap { white-space: normal; }
.t-dense .nw { white-space: nowrap; }
/* Узкая карточка остатков (дерево групп + ноутбук): колонку «Код» прячем, чтобы «Лежит» не уезжала за край. Код ищется поиском */
#slist { container-type: inline-size; }
@container (max-width: 770px) { #slist .col-code { display: none; } }
/* Заголовок папки в остатках — короткое имя («AirPods 4 без ANC»), крупно и с синей полосой, чтобы глаз цеплялся при прокрутке */
.t-dense tr.t-grp td { padding: 10px 12px 9px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; background: var(--sel);
  box-shadow: inset 4px 0 0 var(--accent); }
.stock-sum { display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: baseline; padding: 4px 4px 12px; }
.stock-sum > div { display: flex; flex-direction: column; }
.stock-sum span { font-size: 12px; color: var(--ink-2); }
.stock-sum b { font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stock-sum .note { font-size: 13px; color: var(--ink-2); align-self: flex-end; }

/* ─── Фото товара ─── */
.prod-photo { display: block; max-height: 220px; max-width: 100%; margin: 0 auto 6px; border-radius: 12px; object-fit: contain; background: #fff; }
.res.with-thumb { grid-template-columns: 44px minmax(0, 1fr) auto 32px; }
.res .thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; }

.bm-line { margin: -4px 0 6px; padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); }
/* напоминание в чеке без покупателя: спросить номер для бонусной карты */
.bm-line.loy-ask { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.bm-line.loy-ask svg { flex: none; width: 16px; height: 16px; color: var(--accent); }
.bm-line.loy-ask span { flex: 1; min-width: 0; }
.bm-line.loy-ask .btn { flex: none; }

@media print {
  body { background: #fff; }
  .app > .side, .topbar, .no-print, .modal-bg { display: none !important; }
}

/* Просмотр продажи перед товарным чеком */
.rp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rp-actions .btn { flex: 1; min-width: 200px; justify-content: center; }
.rp-lines { background: var(--group); border-radius: 14px; box-shadow: var(--shadow); }
.rp-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 18px; position: relative; }
.rp-line + .rp-line::before { content: ""; position: absolute; top: 0; left: 80px; right: 0; border-top: 1px solid var(--sep); }
.rp-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: var(--fill); display: grid; place-items: center; }
.rp-thumb.ph { color: var(--ink-3); }
.rp-thumb.ph svg { width: 22px; height: 22px; }
.rp-nm { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.rp-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.rp-sn { font-size: 13px; margin-top: 4px; font-family: var(--mono); color: var(--ink); }
.rp-sum { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.rp-tot .big dd { font-size: 22px; letter-spacing: -.02em; }
@media (max-width: 560px) { .rp-line { grid-template-columns: 40px minmax(0, 1fr); } .rp-thumb { width: 40px; height: 40px; } .rp-sum { grid-column: 2; } }

/* Сотрудник: разделы меню */
.acc { border-top: 1px solid var(--sep); padding-top: 12px; }
.acc-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
#acc-list { columns: 2 220px; column-gap: 24px; }
.acc-sec { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 4px; break-after: avoid; }
.acc-it { display: flex; align-items: center; gap: 8px; padding: 4px 0; break-inside: avoid; cursor: pointer; }
.acc-it svg { width: 16px; height: 16px; color: var(--ink-2); }

/* Документы: вкладки по видам, дни, быстрый просмотр */
.doc-tabs { margin-bottom: 12px; overflow-x: auto; }
.doc-tabs .tabs { display: inline-flex; flex-wrap: nowrap; }
.doc-tabs .tabs button { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.doc-tabs .cnt { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 500; }
.docs-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.doc-peek { display: none; }
@media (min-width: 1200px) {
  .docs-split { grid-template-columns: minmax(0, 1fr) 400px; }
  .doc-peek { display: block; position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow: auto; }
}
.doc-peek.busy { opacity: .55; transition: opacity .15s var(--ease); }
.doc-peek .empty { padding: 48px 24px; }
.peek-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.peek-h > div { flex: 1; min-width: 0; }
.peek-h h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.01em; }
.peek-sum { font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.peek-b { padding: 0 18px 8px; display: grid; gap: 12px; }
.peek-b .kv { grid-template-columns: 110px minmax(0, 1fr); }
.peek-b .card { box-shadow: none; border: 1px solid var(--sep); }
.peek-f { display: flex; gap: 8px; align-items: center; padding: 12px 18px 16px; border-top: 1px solid var(--sep); position: sticky; bottom: 0; background: var(--group); }
.docs-t tr.t-day td { background: var(--bg); font-weight: 600; font-size: 13px; padding: 8px 14px; position: sticky; top: 0; z-index: 1; }
.docs-t tr.sel td { background: var(--accent-soft); }
.docs-t tr.sel:hover td { background: var(--accent-soft); }
.docs-t tr.cancelled td { opacity: .55; }
.doc-what { font-size: 13px; color: var(--ink-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; max-width: 520px; }
.dt-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--fill); color: var(--ink-2); margin-right: 4px; }
.dt-pill.ok { background: var(--ok-soft); color: var(--ok); }
.dt-pill.warn { background: var(--warn-soft); color: var(--warn); }
.dt-pill.info { background: var(--accent-soft); color: var(--accent); }
.dt-pill.bad { background: var(--bad-soft); color: var(--bad); }
.docs-t .doc-n { white-space: nowrap; }
.docs-t { table-layout: fixed; width: 100%; }
.docs-t td { overflow: hidden; }
.docs-t .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-t td.r { white-space: nowrap; }
.docs-t .doc-what { max-width: none; }
.docs-t .doc-n { display: block; overflow: hidden; text-overflow: ellipsis; }
.peek-b .t th:not(:first-child), .peek-b .t td:not(:first-child) { white-space: nowrap; width: 1%; padding-left: 6px; padding-right: 10px; }
.peek-b .t td:first-child, .peek-b .t th:first-child { padding-left: 12px; }
.peek-b .rp-lines { box-shadow: none; border: 1px solid var(--sep); }
.rp-line.peek-line { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
.rp-line.peek-line + .rp-line.peek-line::before { left: 14px; }

/* Отчёты: фильтры товара */
.rep-f { margin-top: 2px; }
.rep-f .tabs { flex-wrap: nowrap; }

/* Касса: наличные в смене */
.cash-btn { gap: 6px; }
.cash-btn b { font-weight: 600; }
.cash-now .note { display: block; }

/* Взаиморасчёты с контрагентом */
.led-head { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.led-debt { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.led-debt.bad { color: var(--bad); } .led-debt.ok { color: var(--ok); }
.led-parts { display: flex; gap: 6px 22px; flex-wrap: wrap; margin: 0; flex: 1; justify-content: flex-end; }
.led-parts > div { text-align: right; } .led-parts dt { font-size: 12px; color: var(--ink-2); } .led-parts dd { margin: 0; font-weight: 600; }
.led-body { max-height: min(56vh, 520px); overflow: auto; }
.led-t { table-layout: fixed; width: 100%; } .led-t td { overflow: hidden; }
.led-t .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.led-t .led-minus { color: var(--ok); }

/* Фото товаров */
.prod-ph { position: relative; border-radius: 14px; background: var(--fill); min-height: 120px; display: grid; place-items: center; }   /* без overflow:hidden — иначе в сетке окна фото сжимается */
.prod-ph img { display: block; max-height: 240px; max-width: 100%; margin: 0 auto; object-fit: contain; background: #fff; border-radius: 12px; }
.prod-ph:not(.empty) { background: #fff; min-height: min-content; display: block; padding: 6px 0; }   /* фото — во всю свою высоту, не сжимается сеткой окна */
.prod-ph.editable.empty { cursor: pointer; border: 1.5px dashed var(--fill-2); }
.prod-ph.editable.empty:hover, .prod-ph.drag { border-color: var(--accent); background: var(--accent-soft); }
.prod-ph.busy { opacity: .5; pointer-events: none; }
.ph-empty { display: grid; justify-items: center; gap: 4px; padding: 18px; text-align: center; color: var(--ink-2); }
.ph-empty svg { width: 22px; height: 22px; color: var(--accent); }
.ph-acts { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s var(--ease); }
.prod-ph:hover .ph-acts, .prod-ph:focus-within .ph-acts { opacity: 1; }
@media (hover: none) { .ph-acts { opacity: 1; } }
.ph-acts .btn { background: var(--group); box-shadow: var(--shadow); }
.row-thumb { width: 32px; height: 32px; border-radius: 7px; object-fit: contain; background: #fff; border: 1px solid var(--sep); flex: none; }
.row-thumb.ph { display: inline-block; background: var(--fill); border-color: transparent; }
.nm-c { display: flex; gap: 10px; align-items: center; }
.nm-c .nm-t { min-width: 0; }
.rp-thumb.sm { width: 36px; height: 36px; }
.rp-line.peek-line { grid-template-columns: 36px minmax(0, 1fr) auto; }
.rp-line.peek-line + .rp-line.peek-line::before { left: 62px; }

/* Подсказки при вводе */
.sg-box { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--group); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 4px; max-height: 340px; overflow: auto; }
.sg-it { display: flex; gap: 12px; align-items: baseline; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.sg-it:hover, .sg-it.on { background: var(--accent-soft); }
.sg-t { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-t b { color: var(--ink); font-weight: 600; }
.sg-n { font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Сводка: по видам товаров */
.kinds-card .t tr.kind-acc td { background: var(--accent-soft); }
.kinds-card .t tr.kind-acc td:first-child { font-weight: 600; }

/* Печать приёмки: выбор */
.print-pick { display: grid; gap: 10px; }
.print-pick .btn { justify-content: flex-start; gap: 14px; padding: 14px 16px; min-height: 64px; text-align: left; }
.print-pick .btn svg { width: 22px; height: 22px; flex: none; }
.print-pick .btn span { display: grid; gap: 2px; }
.print-pick small { color: var(--ink-2); font-size: 12.5px; font-weight: 400; }

/* Касса: шапка чека с «Отложить» — переносится, если не влезает */
.cart-h { flex-wrap: wrap; }

/* Экосистема Edge: карточки CRM и бота, журнал событий */
.edge-intro { margin: -8px 0 18px; max-width: 760px; }
.edge-warn { margin-bottom: 14px; background: var(--warn-soft); box-shadow: none; }
.edge-warn b { color: var(--warn); }
.edge-warn .small { margin-top: 4px; color: var(--ink); }
.edge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .edge-grid { grid-template-columns: minmax(0, 1fr); } }
.edge-card { padding: 16px 0 14px; min-width: 0; }
.edge-h { display: flex; align-items: center; gap: 10px; padding: 0 18px 12px; }
.edge-h svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.edge-h h3 { margin: 0; flex: 1; min-width: 0; }
.edge-kv { box-shadow: none; border-radius: 0; border-top: 1px solid var(--sep); border-bottom: 1px solid var(--sep); }
.edge-kv > div { padding: 10px 18px; flex-wrap: wrap; gap: 4px 16px; }
.edge-kv dt { color: var(--ink-2); flex: 0 0 150px; font-size: 13px; }
.edge-kv dd { flex: 1 1 180px; min-width: 0; text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.edge-url { overflow-wrap: anywhere; }
.edge-err { color: var(--bad); overflow-wrap: anywhere; }
.edge-none { margin: 0; padding: 0 18px; }
.edge-btns { padding: 14px 18px 0; gap: 8px; }
.edge-log { padding: 6px 18px 0; }
.edge-log .sec-title { margin: 12px 0 6px; }
.edge-evs { border-radius: 12px; background: var(--bg); }
.edge-ev { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; position: relative; }
.edge-ev + .edge-ev::before { content: ""; position: absolute; top: 0; left: 12px; right: 0; border-top: 1px solid var(--sep); }
.edge-ev-m { flex: 1; min-width: 0; display: grid; gap: 2px; }
.edge-ev-m b { font-weight: 600; overflow-wrap: anywhere; }
.edge-code { font-size: 13px; line-height: 1.45; word-break: break-all; resize: vertical; }
@media (max-width: 640px) { .edge-kv dt { flex-basis: 100%; } .edge-card .btn.sm { flex: 1 1 auto; } }

/* Ecosystem results use the existing cashier cards and remain readable on narrow screens. */
#edge-results {display:grid;gap:8px;min-width:0}
#edge-results .card {overflow-wrap:anywhere;min-width:0}
#edge-results .btn {margin-top:8px;white-space:normal}
#edge-orders {white-space:normal;min-height:40px}
#cart .bm-line {overflow-wrap:anywhere}
/* выбор документов галочками и выгрузка в Excel */
.docs-t td.ck, .docs-t th.ck { width: 36px; padding-left: 10px; padding-right: 0; text-align: center; }
.docs-t td.ck input, .docs-t th.ck input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); vertical-align: middle; }
.docs-t tr.picked td { background: var(--accent-soft); }
.pick-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px;
  border-radius: 12px; background: var(--accent-soft); position: sticky; top: 0; z-index: 3; }
.pick-bar .grow { flex: 1; }
@media (max-width: 640px) {   /* телефон: галочка, время, документ, сумма; контрагент — в карточке документа */
  .docs-t col.c-cp { width: 0 !important; } .docs-t .cp-c { padding: 0 !important; font-size: 0; } .docs-t td.cp-c > * { display: none; }
  .docs-t col.c-time { width: 48px !important; } .docs-t col.c-sum { width: 112px !important; }
  .docs-t td.num { padding-left: 4px; padding-right: 4px; }
  .docs-t .doc-n { white-space: normal; } .docs-t .doc-n b { white-space: nowrap; } .docs-t th { overflow: hidden; text-overflow: clip; }
  .pick-bar .btn.sm { flex: 1 1 auto; }
}
.row > .grow { flex: 1; }
/* свои бонусы покупателей */
.loy-card { margin: 10px 0; }
.loy-bal { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.loy-plus { color: var(--ok, #1f8a4c); }
.loy-off { margin-bottom: 12px; background: var(--warn-soft); }
.loy-pct { width: 84px; text-align: right; display: inline-block; }
