/* Шрифт Inter (0.61) — внутри приложения (www/fonts, лицензия OFL): одинаковый на всех телефонах и кассах.
   Переменная толщина 100–900; кириллица с таджикскими буквами (ғ ӣ қ ӯ ҳ ҷ — cyrillic-ext) и латиница. */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/inter-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/inter-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ProfitTracker Offline — интерфейс для планшета и телефона. Шрифты системные: приложение ничего не скачивает. */

/* ---------- Основа: цвета, размеры, тени ---------- */
:root {
  --navy: #14213d;
  --navy-2: #1e3160;
  --navy-3: #0d172c;
  --amber: #f5a524;
  --amber-2: #e8930c;
  --amber-ink: #5a3600;
  --amber-soft: #fef1d8;
  --bg: #f1f3f8;
  --card: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #5d6779;
  --line: #e1e5ee;
  --line-strong: #aab2c5;
  --ok: #12804a;
  --ok-soft: #e2f4ea;
  --bad: #b3261e;
  --bad-soft: #fde7e4;
  --warn: #9a5b00;
  --blue: #1f4fbf;
  /* Поверхности и рамки, которые в тёмной теме меняются */
  --field: #ffffff;
  --hover: #f6f8fc;
  --hover-2: #eef2f9;
  --head: #f7f8fb;
  --soft: #f3f5fa;
  --tile-hover-line: #cfd6e4;
  --placeholder: #8791a5;
  --notice-line: #f0cf94;
  --ok-line: #b9e3ca;
  --ok-ink: #0f5132;
  --bad-line: #efb0a9;
  --bad-ink: #6b130d;
  --info: #e4ecfb;
  --info-line: #b9c9ee;
  --info-ink: #17306b;
  --fav-bg: rgba(255, 255, 255, .9);
  color-scheme: light;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(17, 24, 39, .05), 0 1px 3px rgba(17, 24, 39, .06);
  --shadow-2: 0 6px 16px rgba(17, 24, 39, .08), 0 2px 4px rgba(17, 24, 39, .05);
  --shadow-3: 0 24px 48px rgba(10, 16, 32, .28);
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: Inter, Roboto, "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01"; /* у Inter: однозначные 1 и l, открытые цифры */
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); }
body { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
p { margin: 0 0 10px; line-height: 1.5; }
.muted { color: var(--muted); }
.low { color: var(--bad); font-weight: 600; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
::selection { background: #fde2a7; }

/* ---------- Каркас и меню ---------- */
.app { display: grid; grid-template-columns: 244px 1fr; height: 100vh; height: 100dvh; }
.nav { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.brand img { border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.brand-name { font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
.brand-shop { color: #aab6d2; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.nav-items { display: flex; flex-direction: column; gap: 2px; }
.nav-group { color: #7f8db0; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 6px; }
.nav-group:first-child { padding-top: 0; }
.nav-group-gap { padding: 8px 0 0; margin: 0 12px 6px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.nav-item, .nav-more { display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: var(--radius-sm); color: #cdd6ea; text-decoration: none; font-weight: 600; min-height: 46px; transition: background .15s, color .15s; position: relative; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active, .nav-more.active { background: rgba(245, 165, 36, .16); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--amber); }
.nav-item.active .ico, .nav-more.active .ico { color: var(--amber); }
.nav-foot { margin-top: auto; color: #8592af; font-size: .76rem; line-height: 1.4; padding: 10px 8px 0; border-top: 1px solid rgba(255, 255, 255, .09); }
.nav[hidden] { display: none; }
.nav-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; color: #fff; font-weight: 600; background: rgba(255, 255, 255, .06); border-radius: var(--radius-sm); }
.nav-user .btn-link { color: #ffd591; }
#content { overflow-y: auto; min-width: 0; scroll-behavior: smooth; }
.page { padding: 26px 28px 44px; max-width: 1280px; margin: 0 auto; }

.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-sm { width: 18px; height: 18px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.page-actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-title { margin: 28px 0 12px; font-size: 1.15rem; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.tools { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 16px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.tools .btn { border: none; box-shadow: none; background: none; min-height: 42px; padding: 0 12px; color: var(--ink-2); font-weight: 600; }
.tools .btn:hover { background: var(--hover-2); color: var(--ink); }
.tools .btn .ico { color: var(--muted); }

/* ---------- Кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1); transition: background .15s, box-shadow .15s, transform .08s; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn-primary { background: linear-gradient(180deg, #f8b23c 0%, var(--amber) 100%); border-color: var(--amber-2); color: #2b1a00; box-shadow: 0 2px 6px rgba(232, 147, 12, .35); }
.btn-primary:hover { background: linear-gradient(180deg, #f9ba4f 0%, #f6ab33 100%); }
.btn-danger { background: #b3261e; border-color: #b3261e; color: #fff; box-shadow: 0 2px 6px rgba(179, 38, 30, .3); }
.btn-danger:hover { background: #a2211a; }
.btn-link { border: none; background: none; box-shadow: none; color: var(--blue); padding: 0 8px; min-height: 44px; }
.btn-link:hover { background: rgba(31, 79, 191, .07); }
.btn-big { width: 100%; min-height: 60px; font-size: 1.15rem; border-radius: 14px; }

.search, .field input[type="text"], .field input[type="date"], .field select, .form input[type="text"], .count-input, .code-input, .pin {
  border: 1px solid var(--line-strong); background: var(--field); font: inherit; color: var(--ink); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
.search, .field input[type="text"], .field input[type="date"], .field select, .form input[type="text"] { width: 100%; min-height: 48px; padding: 0 14px; }
.search:focus, .field input:focus, .field select:focus, .form input[type="text"]:focus, .count-input:focus, .code-input:focus, .pin:focus { outline: none; border-color: var(--amber-2); box-shadow: 0 0 0 4px rgba(245, 165, 36, .25); }
.search { flex: 1; box-shadow: var(--shadow-1); }
::placeholder { color: var(--placeholder); }

/* ---------- Карточки, таблицы, метки ---------- */
.card, .kpi, .table-wrap, .receipt { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card { padding: 20px; margin-bottom: 16px; }
.notice { background: var(--amber-soft); border: 1px solid var(--notice-line); color: var(--amber-ink); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.empty { color: var(--muted); padding: 34px 16px; text-align: center; }
.empty::before { content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b869c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l9-5 9 5v8l-9 5-9-5z M3 8l9 5 9-5 M12 13v8'/%3E%3C/svg%3E") center / 28px no-repeat; }

.table-wrap { overflow-x: auto; margin-bottom: 16px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; color: var(--muted); font-weight: 700; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; background: var(--head); }
tr:last-child td { border-bottom: none; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--hover); }
tr.clickable:active td { background: var(--hover-2); }
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge-warn { background: var(--amber-soft); color: var(--warn); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; box-shadow: var(--shadow-1); transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Касса ---------- */
.page-pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; max-width: none; height: 100%; padding-bottom: 24px; }
.pos-left { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.page-pos .tabs { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 12px; padding: 2px 2px 4px; }
.page-pos .tab { flex: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 12px; overflow-y: auto; padding: 2px 2px 10px; align-content: start; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; min-height: 112px; padding: 14px 14px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); font: inherit; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-1); transition: box-shadow .15s, transform .08s, border-color .15s; overflow: hidden; }
.tile:hover { box-shadow: var(--shadow-2); border-color: var(--tile-hover-line); }
.tile:active { transform: scale(.98); background: var(--hover); }
.tile-out { opacity: .6; background: var(--soft); }
.tile-in { border-color: var(--amber-2); box-shadow: 0 0 0 2px var(--amber) inset, var(--shadow-1); }
.tile-photo { width: calc(100% + 28px); height: 96px; object-fit: cover; margin: -14px -14px 0; background: var(--soft); }
.tile-initial { display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; color: #fff; text-transform: uppercase; }
.tone-0 { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.tone-1 { background: linear-gradient(135deg, #10b981, #047857); }
.tone-2 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.tone-3 { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }
.tone-4 { background: linear-gradient(135deg, #ec4899, #9d174d); }
.tone-5 { background: linear-gradient(135deg, #14b8a6, #0f766e); }
/* Название — ровно две строки (длинное обрезается многоточием), поэтому цена и остаток у всех плиток на одной высоте. */
.tile-name { font-weight: 600; padding-right: 26px; line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.tile-price { font-weight: 800; font-size: 1.12rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile-stock { font-size: .76rem; font-weight: 600; color: var(--ok-ink); background: var(--ok-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tile-stock.low { color: var(--bad-ink); background: var(--bad-soft); }
.tile-fav { position: absolute; top: 9px; right: 8px; color: var(--line-strong); padding: 4px; background: var(--fav-bg); border-radius: 50%; line-height: 0; }
.tile-photo ~ .tile-fav, .tile-photo ~ .tile-qty { top: 8px; }
.tile-fav.on { color: var(--amber); }
.tile-fav.on .ico { fill: var(--amber); }
.tile-qty { display: none; }
.tile-in .tile-fav { display: none; }
.tile-in .tile-qty { display: grid; place-items: center; position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--amber); color: #2b1a00; font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(232, 147, 12, .4); }

.receipt { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 50px); position: sticky; top: 0; box-shadow: var(--shadow-2); overflow: hidden; }
.receipt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.receipt-head h2 { margin: 0; font-size: 1.2rem; }
.empty-cart { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; }
.empty-cart::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b869c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11h11.2L21 8H6.2 M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2z M18 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/%3E%3C/svg%3E"); }
.lines { overflow-y: auto; flex: 1; padding: 0 12px; }
.line { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: none; }
.line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; border: none; background: none; font: inherit; color: inherit; cursor: pointer; padding: 4px 0; min-height: 44px; justify-content: center; }
.line-name { font-weight: 600; overflow-wrap: anywhere; }
.line-qty { display: flex; align-items: center; gap: 6px; }
.line-qty .btn { min-height: 44px; width: 44px; padding: 0; border-radius: 50%; }
.line-total { min-width: 88px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.receipt-foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--head); }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.sum-total { font-size: 1.5rem; font-weight: 800; margin: 6px 0 12px; letter-spacing: -.01em; }
.change { font-size: 1.25rem; font-weight: 700; color: var(--ok); min-height: 1.6em; }
.cart-bar { display: none; }
.last-sale { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 14px 16px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--ok-ink); font-weight: 600; }

/* Отложенные чеки и списки в окнах */
.parked-item { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.parked-item:last-child { border-bottom: 0; }
.parked-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }

/* ---------- Отчёты ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px 18px; }
.kpi-label { color: var(--muted); font-size: .86rem; font-weight: 600; }
.kpi-value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.kpis-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis-hero .kpi { padding: 20px 22px; }
.kpis-hero .kpi-value { font-size: 1.9rem; }
.kpis-small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1500px) { .kpis-small { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpis-small .kpi { padding: 12px 16px; box-shadow: none; }
.kpis-small .kpi-value { font-size: 1.2rem; }
.kpi-profit.kpi-pos { background: var(--ok-soft); border-color: var(--ok-line); }
.kpi-profit.kpi-neg { background: var(--bad-soft); border-color: var(--bad-line); }
.kpi-main { background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy) 100%); border-color: var(--navy); color: #fff; box-shadow: var(--shadow-2); }
.kpi-main .kpi-label, .kpi-main .kpi-hint { color: #c3cce0; }
.kpi-pos .kpi-value { color: var(--ok); }
.kpi-neg .kpi-value { color: var(--bad); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.cols .table-wrap { border: none; margin: 0; box-shadow: none; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; overflow-x: auto; padding-top: 6px; }
.bar-col { flex: 1; min-width: 22px; display: flex; flex-direction: column; height: 100%; }
.bar-box { flex: 1; display: flex; align-items: flex-end; }
.bar { width: 100%; background: linear-gradient(180deg, #33508f 0%, var(--navy) 100%); border-radius: 6px 6px 0 0; min-height: 2px; }
.bar-neg { background: var(--bad); }
.bar-label { text-align: center; font-size: .7rem; color: var(--muted); margin-top: 5px; white-space: nowrap; }

/* Предпросмотр импорта товаров */
.import-preview .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.import-preview .kpi { padding: 10px 12px; box-shadow: none; }

/* ---------- «Ещё» на телефоне: остальные разделы плитками ---------- */
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.more-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 10px 6px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; font-size: .9rem; text-align: center; cursor: pointer; }
.more-item .ico { width: 28px; height: 28px; color: var(--navy-2); }
.more-item.active { border-color: var(--amber-2); background: var(--amber-soft); }

/* ---------- Окна, формы, сообщения ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 16, 32, .58); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; animation: fade .15s ease-out; }
.modal { background: var(--card); border-radius: 20px; padding: 24px; width: min(500px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-3); animation: pop .2s var(--ease); }
.modal-wide { width: min(780px, 100%); }
.modal h2 { font-size: 1.3rem; margin-bottom: 14px; }
.modal-body { overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.field-hint, .form-note { font-size: .82rem; color: var(--muted); }
.field-check { flex-direction: row; align-items: center; gap: 10px; min-height: 46px; }
.field-check input { width: 24px; height: 24px; accent-color: var(--amber-2); }
.form-error { color: var(--bad); font-weight: 600; min-height: 1.3em; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 14px; z-index: 40; max-width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-3); font-weight: 600; border-left: 5px solid #34d399; animation: rise .22s var(--ease); }
.toast-err { background: #8f1d17; border-left-color: #ffb4ab; }

.scanner { position: fixed; inset: 0; background: #000; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; }
.scanner-video { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 14px; }
.scanner-hint { color: #fff; font-weight: 600; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes sheet { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Вход по PIN-коду ---------- */
.login { position: fixed; inset: 0; background: radial-gradient(1200px 600px at 50% -10%, #2a4484 0%, var(--navy) 55%, var(--navy-3) 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; z-index: 50; overflow-y: auto; }
.login img { border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.login h1 { color: #fff; }
.login-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; align-items: stretch; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; padding: 20px; }
.login-hint { text-align: center; font-size: 1.15rem; font-weight: 600; margin: 2px 0 4px; }
.login .muted { color: #c3cce0; }
.login-users { display: flex; flex-direction: column; gap: 10px; }
.login-user { justify-content: flex-start; min-height: 62px; font-size: 1.05rem; }
.login-user .muted { margin-left: auto; color: var(--muted); font-weight: 400; }
.login .btn-link { color: #ffd591; align-self: center; }
.login .btn-link:hover { background: rgba(255, 255, 255, .08); }
.login .form-error { color: #ffb4ab; text-align: center; }
.pin { width: 100%; min-height: 62px; font-size: 1.7rem; text-align: center; letter-spacing: .3em; }
.recovery-code { font-size: 2rem; font-weight: 700; letter-spacing: .15em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Полосы-напоминания: копия и подписка ---------- */
.backup-alert, .license-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 28px 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bad-soft); border: 1px solid var(--bad-line); color: var(--bad-ink); box-shadow: var(--shadow-1); }
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 28px 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--info); border: 1px solid var(--info-line); color: var(--info-ink); box-shadow: var(--shadow-1); }
.license-alert.license-soon { background: var(--amber-soft); border-color: var(--notice-line); color: var(--amber-ink); }
.backup-last { font-weight: 600; }
.license-ok { color: var(--ok); font-weight: 600; }
.license-trial { color: var(--amber-ink); font-weight: 600; }
.device-code { display: inline-block; font-size: 1.8rem; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; user-select: all; background: var(--soft); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 8px 16px; }
.code-input { width: 100%; padding: 12px 14px; font-family: ui-monospace, "Roboto Mono", monospace; resize: vertical; margin-bottom: 10px; display: block; }

/* ---------- Склад, товары, фото ---------- */
.count-input { width: 130px; min-height: 46px; padding: 0 12px; text-align: right; font-variant-numeric: tabular-nums; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; flex: none; border: 1px solid var(--line); }
.photo-field { display: grid; gap: 8px; }
.photo-preview { width: 120px; height: 120px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); display: grid; place-items: center; overflow: hidden; background: var(--head); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Обзор: показатели, графики, списки ---------- */
:root { --c1: #2f5fd0; --c2: #12945a; --c3: #e8930c; --c4: #8b5cf6; --c1-soft: rgba(47, 95, 208, .14); --c2-soft: rgba(18, 148, 90, .14); }
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-1); }
.seg-btn { min-height: 38px; padding: 0 16px; border: none; border-radius: 999px; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--navy); color: #fff; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); min-height: 150px; }
.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat-label { color: var(--muted); font-weight: 600; font-size: .9rem; }
.stat-value { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; position: relative; z-index: 1; }
.stat-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .82rem; position: relative; z-index: 1; }
.stat-hint { color: var(--muted); font-size: .82rem; position: relative; z-index: 1; }
.stat .spark { display: block; width: calc(100% + 36px); height: 40px; margin: auto -18px -16px; }
.tone-blue .stat-icon { background: var(--c1-soft); color: var(--c1); }
.tone-green .stat-icon { background: var(--c2-soft); color: var(--c2); }
.tone-red .stat-icon { background: var(--bad-soft); color: var(--bad); }
.tone-red .stat-value { color: var(--bad); }
.tone-amber .stat-icon { background: var(--amber-soft); color: var(--c3); }
.tone-purple .stat-icon { background: rgba(139, 92, 246, .14); color: var(--c4); }
.trend { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.trend-up { background: var(--ok-soft); color: var(--ok); }
.trend-down { background: var(--bad-soft); color: var(--bad); }
.trend-flat { background: var(--soft); color: var(--muted); }

.ov-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.ov-grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ov-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ov-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-grid > .card { margin: 0; min-width: 0; }
.ov-card { display: flex; flex-direction: column; gap: 12px; }
.ov-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.ov-card-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.ov-card-head h2 .ico { color: var(--muted); }
.ov-card-head .btn-link { min-height: 36px; font-size: .9rem; }
.legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.swatch.c-1 { background: var(--c1); } .swatch.c-2 { background: var(--c2); } .swatch.c-3 { background: var(--c3); } .swatch.c-4 { background: var(--c4); }

.chart { position: relative; width: 100%; min-height: 120px; }
.chart-svg { display: block; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart-zero { stroke: var(--line-strong); }
.chart-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.c-1, .chart-point.c-1, .chart-dot.c-1 { stroke: var(--c1); }
.chart-line.c-2, .chart-point.c-2, .chart-dot.c-2 { stroke: var(--c2); }
.chart-area { stroke: none; }
.chart-area.c-1 { fill: var(--c1-soft); }
.chart-point { fill: var(--card); stroke-width: 2; }
.chart-dot { fill: var(--card); stroke-width: 3; }
.chart-guide { stroke: var(--line-strong); stroke-dasharray: 4 3; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--navy-3); color: #fff; border-radius: 10px; padding: 8px 10px; font-size: .8rem; pointer-events: none; box-shadow: var(--shadow-2); min-width: 140px; z-index: 2; }
.chart-tip-title { font-weight: 700; margin-bottom: 4px; }
.chart-tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.chart-track { fill: var(--soft); }
.chart-col.c-1 { fill: var(--c1); opacity: .55; }
.chart-col.chart-peak { opacity: 1; }
.chart-col.c-2 { fill: var(--c2); opacity: .6; }
.spark-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-line.c-1 { stroke: var(--c1); } .spark-line.c-2 { stroke: var(--c2); }
.spark-area.c-1 { fill: var(--c1-soft); } .spark-area.c-2 { fill: var(--c2-soft); }
.spark-area { opacity: .6; }

.donut { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.donut-figure { position: relative; width: 168px; height: 168px; flex: none; margin: 0 auto; }
.donut-svg { width: 100%; height: 100%; }
.donut-track { fill: none; stroke: var(--soft); stroke-width: 16; }
.donut-arc { fill: none; stroke-width: 16; stroke-linecap: butt; }
.donut-arc.c-1 { stroke: var(--c1); } .donut-arc.c-2 { stroke: var(--c2); } .donut-arc.c-3 { stroke: var(--c3); } .donut-arc.c-4 { stroke: var(--c4); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 30px; }
.donut-center b { font-size: 1.05rem; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.donut-center span { color: var(--muted); font-size: .75rem; }
.donut-legend { display: grid; gap: 10px; }
.donut-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; font-size: .92rem; }
.donut-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.donut-row em { font-style: normal; color: var(--muted); font-size: .8rem; min-width: 34px; text-align: right; }

.rank { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rank-row { display: flex; gap: 12px; align-items: flex-start; }
.rank-no { width: 26px; height: 26px; border-radius: 8px; background: var(--soft); color: var(--muted); display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.rank-row:first-child .rank-no { background: var(--amber-soft); color: var(--c3); }
.rank-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.rank-top { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.rank-top .num { flex: none; }
.rank-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-track { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.rank-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c1), #5b8cff); }
.rank-meta { font-size: .8rem; }

.ov-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.ov-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 10px; min-height: 56px; }
.ov-item:last-child { border-bottom: none; }
.ov-item:hover { background: var(--hover); }
.ov-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ov-item-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-item-main .muted { font-size: .85rem; }
.ov-item-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ov-chevron { color: var(--muted); }
.ov-time { min-width: 46px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.attn-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.attn-icon .ico { width: 20px; height: 20px; }
.attn-bad .attn-icon { background: var(--bad-soft); color: var(--bad); }
.attn-warn .attn-icon { background: var(--amber-soft); color: var(--c3); }
.attn-info .attn-icon { background: var(--info); color: var(--info-ink); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--c1-soft); color: var(--c1); font-weight: 800; text-transform: uppercase; }
.bad-text { color: var(--bad); font-weight: 600; font-size: .85rem; }
.pay-tag { font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pay-tag.pay-debt { color: var(--c4); background: rgba(139, 92, 246, .12); }
.ov-note { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.ov-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 26px 10px; flex: 1; }
.ov-empty .muted { font-size: .88rem; }
.ov-empty-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); margin-bottom: 4px; }
.ov-empty-icon .ico { width: 26px; height: 26px; }
.ov-empty-check .ov-empty-icon { background: var(--ok-soft); color: var(--ok); }

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid-main, .ov-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .ov-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .seg { width: 100%; }
  .seg-btn { flex: 1; }
  .ov-grid-3, .ov-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stat { min-height: 128px; padding: 14px; }
  .stat .spark { width: calc(100% + 28px); margin: auto -14px -14px; }
  .stat-value { font-size: 1.3rem; }
  .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
}
@media (max-width: 420px) { .stats { gap: 10px; } .stat-label { font-size: .82rem; } }
:root[data-theme="dark"] { --c1: #6f9bff; --c2: #3ccf86; --c3: #f5b347; --c4: #b197fc; --c1-soft: rgba(111, 155, 255, .16); --c2-soft: rgba(60, 207, 134, .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #6f9bff; --c2: #3ccf86; --c3: #f5b347; --c4: #b197fc; --c1-soft: rgba(111, 155, 255, .16); --c2-soft: rgba(60, 207, 134, .16); } }

/* ---------- Отчёты (0.36) ---------- */
:root { --c5: #0f9fb0; --c6: #94a3b8; }
.stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1500px) { .stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tone-red-soft .stat-icon { background: var(--bad-soft); color: var(--bad); }
.swatch.c-5, .donut-arc.c-5 { background: var(--c5); stroke: var(--c5); }
.swatch.c-6, .donut-arc.c-6 { background: var(--c6); stroke: var(--c6); }
.swatch.c-5, .swatch.c-6 { stroke: none; }
.report-bar { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.report-bar .tabs { flex: 1; margin-bottom: 0; min-width: 0; }
.report-bar .tab-toggle { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.report-bar .tab-toggle.active .ico { color: var(--amber); }
.page > .ov-card, .page > .card { margin-bottom: 16px; }

.wf { display: grid; gap: 10px; }
.wf-row { display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: .92rem; }
.wf-row-total .wf-label { font-weight: 700; }
.wf-track { position: relative; height: 26px; background: var(--soft); border-radius: 8px; }
.wf-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; }
.wf-total { background: var(--c2); }
.wf-row:first-child .wf-total { background: var(--c1); }
.wf-minus { background: var(--c3); opacity: .85; }
.wf-neg { background: var(--bad); }
.wf-zero { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line-strong); }
.wf-value { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 110px; }
.wf-value-neg { color: var(--ink-2); font-weight: 600; }
.wf-row-total .wf-value-neg { color: var(--bad); }
.wf-note { margin: 14px 0 0; font-size: .88rem; }
.day-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.day-summary > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--soft); border-radius: var(--radius-sm); }
.day-summary b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.compare-table { margin: 0; box-shadow: none; }
.diff-good { color: var(--ok); font-weight: 700; }
.diff-bad { color: var(--bad); font-weight: 700; }

th.sortable { padding: 0; }
.sort-btn { display: inline-flex; align-items: center; gap: 4px; width: 100%; min-height: 44px; padding: 0 16px; border: none; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
th.num .sort-btn { justify-content: flex-end; }
th.sorted { color: var(--ink); }
.sort-btn:hover { color: var(--ink); background: var(--hover-2); }
.sort-mark { font-size: .7rem; color: var(--c1); }
.name-share { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.share { height: 4px; border-radius: 999px; background: var(--soft); overflow: hidden; max-width: 220px; }
.share-fill { height: 100%; border-radius: 999px; background: var(--c1); opacity: .7; }
.low-tag { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--c3); }
.ico-xs { width: 16px; height: 16px; }
.breakdown-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.breakdown-tools .search { flex: 1 1 240px; min-height: 44px; }
.breakdown-split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.ov-card .table-wrap { box-shadow: none; margin-bottom: 0; }

@media (max-width: 1180px) {
  .breakdown-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-bar { flex-direction: column; align-items: stretch; }
  .report-bar .tab-toggle { align-self: flex-start; }
  .wf-row { grid-template-columns: minmax(0, 1fr) auto; }
  .wf-track { grid-column: 1 / -1; grid-row: 2; height: 20px; }
  .day-summary { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .table-wrap th.sortable { display: none; }
  /* Сравнение на телефоне — компактной таблицей: показатель, сейчас, разница (колонка «Было» скрыта). */
  .table-wrap.compare-table table { display: table; }
  .table-wrap.compare-table thead { display: table-header-group; }
  .table-wrap.compare-table tbody { display: table-row-group; }
  .table-wrap.compare-table tr { display: table-row; background: none; border: none; box-shadow: none; padding: 0; margin: 0; }
  .table-wrap.compare-table th, .table-wrap.compare-table td { display: table-cell; padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: .86rem; text-align: right; min-height: 0; }
  .table-wrap.compare-table td.cell-title { text-align: left; font-weight: 600; font-size: .86rem; margin: 0; }
  .table-wrap.compare-table th:first-child { text-align: left; }
  .table-wrap.compare-table td::before { display: none; }
  .table-wrap.compare-table th:nth-child(3), .table-wrap.compare-table td:nth-child(3) { display: none; }
  .table-wrap.compare-table th { font-size: .66rem; }
  .name-share { min-width: 0; }
}
:root[data-theme="dark"] { --c5: #3cc6d6; --c6: #7c8aa3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c5: #3cc6d6; --c6: #7c8aa3; } }

/* ---------- Размеры и цвета (0.37) ---------- */
.kind-choice { display: grid; gap: 10px; }
.kind-option { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: inherit; cursor: pointer; min-height: 72px; }
.kind-option:hover { border-color: var(--amber-2); background: var(--amber-soft); }
.kind-option b { font-size: 1.05rem; }
.thumb-model { display: grid; place-items: center; background: var(--c1-soft); color: var(--c1); }
.model-name { display: flex; flex-direction: column; gap: 2px; }
.model-sub { font-size: .82rem; }
tr.row-model td:first-child { font-weight: 600; }
tr.row-archived td { opacity: .5; }
.qty-grid-wrap { overflow-x: auto; margin-bottom: 8px; }
.qty-grid { border-collapse: separate; border-spacing: 6px; width: auto; }
.qty-grid th, .qty-grid td { border: none; padding: 0; background: none; text-transform: none; letter-spacing: 0; font-size: .9rem; vertical-align: middle; }
.qty-grid thead th { color: var(--muted); text-align: center; padding: 0 2px 4px; }
.qty-grid tbody th { text-align: right; padding-right: 8px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.qty-cell { width: 76px; min-height: 44px; padding: 0 10px; text-align: right; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; }
.qty-cell:focus { outline: none; border-color: var(--amber-2); box-shadow: 0 0 0 3px rgba(245, 165, 36, .25); }
.qty-hint { display: block; font-size: .7rem; color: var(--muted); text-align: right; margin-top: 2px; }
.tile-sizes { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-model::after { content: ""; position: absolute; right: 10px; bottom: 44px; width: 8px; height: 8px; border-right: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); transform: rotate(-45deg); }
.variant-pick { display: grid; gap: 14px; }
.variant-colors { margin-bottom: 0; }
.variant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.variant-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 76px; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow-1); }
.variant-btn b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.variant-btn span { font-size: .78rem; color: var(--ok); font-weight: 600; }
.variant-btn em { font-style: normal; font-size: .78rem; color: var(--muted); }
.variant-btn:hover { border-color: var(--amber-2); }
.variant-btn:active { transform: scale(.97); }
.variant-out { opacity: .45; cursor: default; box-shadow: none; }
.variant-out span { color: var(--bad); }
.variant-in { border-color: var(--amber-2); box-shadow: 0 0 0 2px var(--amber) inset; }
.variant-count { position: absolute; top: 4px; right: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: #2b1a00; font-style: normal; font-weight: 800; font-size: .75rem; display: grid; place-items: center; }

.size-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; }
.size-chip { padding: 2px 8px; border-radius: 999px; background: var(--soft); font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Цифровая панель (0.38, с 0.45 — маленькая 3×4, js/keyboard.js) ---------- */
.kb { position: fixed; z-index: 60; width: 288px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 20px; box-shadow: 0 18px 44px rgba(10, 16, 32, .28), 0 2px 6px rgba(10, 16, 32, .12); user-select: none; -webkit-user-select: none; touch-action: manipulation; animation: kb-in .14s ease-out; }
@keyframes kb-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
/* Узкий экран или нет места рядом с полем — внизу экрана, по центру. */
.kb-docked { left: 50% !important; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(360px, calc(100vw - 16px)); animation: none; }
.kb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kb-key { min-width: 0; min-height: 54px; padding: 0 4px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); color: var(--ink); font: inherit; font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .08s, transform .08s; }
.kb-key:hover { border-color: var(--line-strong); }
.kb-pressed { background: var(--amber-soft); border-color: var(--amber-2); transform: scale(.96); }
.kb-fn { background: transparent; color: var(--ink-2); }
.kb-ico { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.kb-blank { visibility: hidden; }
.kb-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.kb-actions .kb-key { min-height: 48px; font-size: 1.05rem; }
.kb-hide { font-size: 1.3rem !important; }
.kb-enter { background: var(--amber); border-color: var(--amber-2); color: #2b1a00; font-weight: 800; }
.kb-enter.kb-pressed { background: var(--amber-2); }
/* Панель внизу экрана: страница и окна заканчиваются над ней — поле ввода видно. */
.kb-open #content { padding-bottom: calc(var(--kb-height, 0px) + 16px); }
.kb-open .overlay { bottom: calc(var(--kb-height, 0px) + 8px); }
.kb-open .modal, .kb-open .modal-wide { max-height: calc(100dvh - var(--kb-height, 0px) - 24px); }
.kb-open .toast { bottom: calc(var(--kb-height, 0px) + 24px); }

/* Экран входа: PIN-код точками и крупными кнопками (всегда). */
.pin-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pin-pad { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pin-dots { display: flex; gap: 14px; min-height: 18px; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); transition: background .1s, transform .1s; }
.pin-dot-on { background: #ffd591; border-color: #ffd591; transform: scale(1.1); }
.pin-pad .kb-grid { width: min(300px, 100%); gap: 12px; }
.pin-pad .kb-key { min-height: 62px; border-radius: 50%; aspect-ratio: 1; width: 100%; max-width: 76px; justify-self: center; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; font-size: 1.7rem; font-weight: 600; }
.pin-pad .kb-fn { background: transparent; border-color: transparent; }
.pin-pad .kb-pressed { background: rgba(255, 213, 145, .35); border-color: #ffd591; }
.pin-shake { animation: pin-shake .35s; }
.pin-shake .pin-dot { border-color: #ffb4ab; }
@keyframes pin-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- Фасовки (0.39) ---------- */
.packs-field { display: grid; gap: 8px; }
.packs-list { display: grid; gap: 8px; }
.pack-row { display: grid; grid-template-columns: minmax(90px, 1.3fr) minmax(90px, 1fr) minmax(80px, 1fr) minmax(100px, 1.3fr) auto; gap: 6px; align-items: end; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); }
.pack-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pack-cell input { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; }
.pack-size { display: flex; align-items: center; gap: 4px; }
.pack-unit { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.pack-choice { display: grid; gap: 10px; }
.pack-option { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "stock stock"; gap: 2px 12px; text-align: left; padding: 14px 16px; min-height: 64px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow-1); }
.pack-option b { grid-area: name; font-size: 1.05rem; }
.pack-option span { grid-area: price; font-weight: 800; font-variant-numeric: tabular-nums; }
.pack-option em { grid-area: stock; font-style: normal; color: var(--muted); font-size: .82rem; }
.pack-option:hover { border-color: var(--amber-2); }
.pack-option:disabled { opacity: .45; cursor: default; }
@media (max-width: 640px) {
  .pack-row { grid-template-columns: 1fr 1fr auto; }
  .pack-name { grid-column: 1 / 3; }
  .pack-code { grid-column: 1 / 3; }
}

/* ---------- Партии и сроки годности (0.40) ---------- */
.batch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.batch-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-variant-numeric: tabular-nums; }
.batch-expired { background: var(--bad-soft) !important; color: var(--bad-ink); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Обмен (0.41) ---------- */
.exchange-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 12px 12px 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--info); border: 1px solid var(--info-line); color: var(--info-ink); }
.exchange-bar > div { display: flex; flex-direction: column; gap: 2px; }
.exchange-sum { display: grid; gap: 4px; min-width: 280px; }

/* ---------- Акции (0.42) ---------- */
/* Значок — обычный элемент над названием (order), без :has(): старые WebView его не знают. */
.tile-promo { order: -1; align-self: flex-start; padding: 2px 8px; margin-bottom: -2px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.tile-photo { order: -2; }
.line-promo { color: var(--bad); font-size: .8rem; font-weight: 600; }
.promo-name { display: flex; align-items: center; gap: 8px; }
.promo-badge { padding: 2px 8px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); font-weight: 800; font-size: .8rem; white-space: nowrap; }
.badge-off { background: var(--soft); color: var(--muted); }

/* ---------- Синхронизация устройств (0.43) ---------- */
.sync-peers { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.sync-peers li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: var(--soft); }
.from-device { font-size: .85rem; }

/* ---------- Две кассы по Wi‑Fi (0.44) ---------- */
.net-status { font-weight: 600; padding: 8px 12px; border-radius: 10px; background: var(--soft); }
.net-server, .net-client { background: var(--ok-soft); color: var(--ok-ink); }
.net-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.net-pair > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.net-big { font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; user-select: all; }
.net-code { letter-spacing: .12em; }

/* «Ещё» нужен только нижней полосе телефона. */
@media (min-width: 861px) { .nav-more { display: none; } }

/* ---------- Телефон и узкий планшет в портрете ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .nav { order: 2; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 0; overflow-x: auto; background: var(--navy); box-shadow: 0 -4px 16px rgba(10, 16, 32, .18); }
  .brand, .nav-foot { display: none; }
  .nav { overflow: visible; }
  .nav-items { flex-direction: row; flex: 1; gap: 2px; }
  .nav-group, .nav-extra { display: none; }
  .nav-item, .nav-more { flex: 1; flex-direction: column; gap: 3px; padding: 7px 4px; font-size: .7rem; min-width: 0; min-height: 56px; justify-content: center; border: none; background: none; font-family: inherit; cursor: pointer; }
  .nav-more { display: flex; order: 50; }
  .nav-item { order: var(--phone-order, 40); }
  .nav-item.active::before { left: 25%; right: 25%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .nav-item span, .nav-more span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-user { padding: 0 4px; background: none; }
  .nav-user > span { display: none; }
  .nav-user .btn span { display: none; }
  .page { padding: 18px 14px 30px; }
  .page-head { align-items: stretch; }
  .page-head > div:first-child { flex: 1 1 100%; }
  .page-actions { flex: 1 1 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  /* Вкладки и инструменты — одной строкой с прокруткой вбок, а не в три ряда. */
  .tabs, .tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .tabs::-webkit-scrollbar, .tools::-webkit-scrollbar { display: none; }
  .tab, .tools .btn { flex: none; }
  .tools { border-radius: 0; border-left: none; border-right: none; }
  .kpis-hero { grid-template-columns: 1fr; }
  .kpis-hero .kpi-value { font-size: 1.6rem; }
  .kpis-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 1.5rem; }
  .page-pos { grid-template-columns: 1fr; height: auto; }
  .receipt { position: static; max-height: none; }
  .tiles { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .backup-alert, .license-alert, .view-bar { margin: 12px 14px 0; }
  .import-preview .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th, td { padding: 12px 12px; }
  .cart-bar { display: flex; position: sticky; bottom: 10px; z-index: 5; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 16px; border: none; border-radius: 16px; background: var(--navy); color: #fff; font: inherit; box-shadow: var(--shadow-3); cursor: pointer; }
  .cart-bar strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
  .cart-bar-go { margin-left: auto; background: var(--amber); color: #2b1a00; font-weight: 700; padding: 8px 14px; border-radius: 10px; }
  /* Окна выезжают снизу, как привычно на телефоне. */
  .overlay { align-items: flex-end; padding: 0; }
  .modal, .modal-wide { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheet .24s var(--ease); }
  .modal-actions .btn { flex: 1 1 auto; }
  .toast { bottom: 84px; }
}

/* ---------- Таблицы на телефоне: каждая строка — карточка «подпись — значение» ---------- */
@media (max-width: 640px) {
  .table-wrap { background: none; border: none; box-shadow: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 10px 14px; margin-bottom: 10px; }
  .table-wrap td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 6px 0; border: none; text-align: right; white-space: normal; min-height: 32px; }
  .table-wrap td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .85rem; font-weight: 600; text-align: left; flex: none; max-width: 45%; }
  .table-wrap td.cell-title { font-weight: 700; font-size: 1.05rem; text-align: left; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .table-wrap td.cell-title::before { display: none; }
  .table-wrap td:not([data-label]) { justify-content: flex-start; padding-top: 10px; }
  .table-wrap td:not([data-label]):empty { display: none; }
  .table-wrap td .row-actions { width: 100%; }
  .table-wrap td .row-actions .btn { flex: 1 1 auto; }
  .cols .table-wrap tr { box-shadow: none; }
  .count-input { width: 140px; }
}

/* Переключатель «Опт» в чеке */
.tab-toggle { min-height: 46px; box-shadow: none; }
.page-pos.wholesale .tile-price { color: var(--blue); }

/* Выбор товаров для ценников */
.label-pick { max-height: 46dvh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 12px; }

/* ---------- Тёмная тема: «Авто» — как на устройстве; выбор в «Настройках» (data-theme на <html>) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --navy: #22345f;
  --navy-2: #2b4277;
  --navy-3: #0c1528;
  --amber-ink: #f6d391;
  --amber-soft: #33270f;
  --bg: #0b1220;
  --card: #131c2e;
  --ink: #e8ecf4;
  --ink-2: #c9d1df;
  --muted: #9aa5ba;
  --line: #263149;
  --line-strong: #3b4865;
  --ok: #3ccf86;
  --ok-soft: #10301f;
  --bad: #ff7b6e;
  --bad-soft: #3a1714;
  --warn: #f0b34a;
  --blue: #8fb0ff;
  --field: #0e1625;
  --hover: #1b2539;
  --hover-2: #222e45;
  --head: #172135;
  --soft: #1a2437;
  --tile-hover-line: #3b4865;
  --placeholder: #7d889c;
  --notice-line: #6b5320;
  --ok-line: #1f5a3b;
  --ok-ink: #9fe5bf;
  --bad-line: #6e2a24;
  --bad-ink: #ffc1b9;
  --info: #172744;
  --info-line: #2d4475;
  --info-ink: #c6d6ff;
  --fav-bg: rgba(19, 28, 46, .9);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 6px 16px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 48px rgba(0, 0, 0, .6);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #22345f;
  --navy-2: #2b4277;
  --navy-3: #0c1528;
  --amber-ink: #f6d391;
  --amber-soft: #33270f;
  --bg: #0b1220;
  --card: #131c2e;
  --ink: #e8ecf4;
  --ink-2: #c9d1df;
  --muted: #9aa5ba;
  --line: #263149;
  --line-strong: #3b4865;
  --ok: #3ccf86;
  --ok-soft: #10301f;
  --bad: #ff7b6e;
  --bad-soft: #3a1714;
  --warn: #f0b34a;
  --blue: #8fb0ff;
  --field: #0e1625;
  --hover: #1b2539;
  --hover-2: #222e45;
  --head: #172135;
  --soft: #1a2437;
  --tile-hover-line: #3b4865;
  --placeholder: #7d889c;
  --notice-line: #6b5320;
  --ok-line: #1f5a3b;
  --ok-ink: #9fe5bf;
  --bad-line: #6e2a24;
  --bad-ink: #ffc1b9;
  --info: #172744;
  --info-line: #2d4475;
  --info-ink: #c6d6ff;
  --fav-bg: rgba(19, 28, 46, .9);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 6px 16px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 48px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* Крупный шрифт: всё в rem растёт, высота кнопок и полей — не меньше прежней. */
:root[data-size="large"] { font-size: 18px; }
:root[data-size="large"] .btn { min-height: 50px; }

/* История цен в карточке товара */
.price-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.price-history li { padding: 8px 10px; border-radius: 10px; background: var(--soft); font-variant-numeric: tabular-nums; }
.price-history .muted { font-size: .82rem; }

/* Штрихкоды в карточке товара */
.codes-field { display: grid; gap: 8px; }
.codes-field .row-actions { flex-wrap: nowrap; }
.codes-field input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--field); font: inherit; color: var(--ink); }
.code-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.code-chips:empty { display: none; }
.code-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.code-chip-remove { border: none; background: none; color: var(--muted); font: inherit; font-size: 1.2rem; min-width: 32px; min-height: 32px; border-radius: 50%; cursor: pointer; }
.code-chip-remove:hover { background: var(--hover); color: var(--bad); }

/* Справка и помощник первого запуска */
.help { display: grid; gap: 10px; max-width: 860px; }
.help-item { margin: 0; padding: 0; }
.help-item summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "+"; font-size: 1.4rem; color: var(--muted); }
.help-item[open] summary::after { content: "−"; }
.help-item p { padding: 0 20px; color: var(--ink-2); }
.help-item p:last-child { padding-bottom: 14px; }
.onboarding-langs .tab { min-height: 52px; font-size: 1.1rem; padding: 0 26px; }
.onboarding-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }

.change.change-short { color: var(--bad); }

/* Экран «приложение не запустилось» (js/boot.js) — без переменных и новых свойств: его видят и очень старые браузеры. */
.boot-error { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; overflow: auto; padding: 32px 24px; background: #ffffff; color: #111827; font-family: Roboto, "Noto Sans", sans-serif; font-size: 18px; line-height: 1.5; }
.boot-error h1 { font-size: 24px; margin: 0 0 16px; color: #b3261e; }
.boot-error p { margin: 0 0 12px; max-width: 760px; }
.boot-error pre { white-space: pre-wrap; background: #f3f5fa; border: 1px solid #e1e5ee; border-radius: 10px; padding: 12px; font-size: 14px; max-width: 760px; }
.boot-error button { margin-top: 8px; min-height: 52px; padding: 0 22px; border-radius: 12px; border: 1px solid #e8930c; background: #f5a524; color: #2b1a00; font-size: 18px; font-weight: 700; }

/* ---------- Журнал действий (0.46, js/pages/audit.js) ---------- */
.audit-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 14px; }
.audit-warn-toggle { margin-left: auto; }
.audit-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.audit-chip { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.audit-chip b { font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.audit-chip span { color: var(--muted); font-size: .85rem; }
.audit-chip-on { border-color: var(--amber-2); background: var(--amber-soft); }
.audit-chip-on b { color: var(--ink); }
.audit-day { margin-bottom: 14px; }
.audit-day h2 { font-size: 1rem; margin: 0 0 6px; color: var(--muted); }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-row { display: grid; grid-template-columns: 52px 30px 1fr auto; gap: 10px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line); }
.audit-row:first-child { border-top: 0; }
.audit-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.audit-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); }
.audit-warn .audit-icon { background: var(--amber-soft); color: var(--amber-2); }
.audit-warn .audit-text { font-weight: 600; }
.audit-who { color: var(--muted); font-size: .9rem; text-align: right; }
.audit-who em { font-style: normal; }
@media (max-width: 640px) {
  .audit-row { grid-template-columns: 44px 26px 1fr; }
  .audit-who { grid-column: 3; text-align: left; font-size: .82rem; margin-top: -6px; }
  .audit-warn-toggle { margin-left: 0; }
}

/* ---------- Окно оплаты (0.47, js/pages/payment.js) ---------- */
.modal:has(.pay) { width: min(560px, 100%); }
.pay { display: flex; flex-direction: column; gap: 14px; }
.pay-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 12px 14px; border-radius: 18px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3, #0f1a33) 100%); color: #fff; }
.pay-label { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.pay-total { font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pay-sub { font-size: .9rem; opacity: .8; min-height: 1.2em; }
.pay-customer { display: flex; flex-direction: column; gap: 8px; }
.pay-add-customer { justify-content: center; border-style: dashed; }
.pay-chip { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.pay-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #2b1a00; font-weight: 800; font-size: 1.1rem; flex: none; }
.pay-chip-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pay-chip-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-bday { color: var(--amber-2); font-weight: 700; font-size: .85rem; }
.pay-chip-x { font-size: 1.4rem; padding: 4px 10px; }
.pay-bonus { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--amber-2); cursor: pointer; font-weight: 600; }
.pay-bonus.on { background: var(--amber-soft); border-style: solid; }
.pay-earn { color: var(--ok); font-size: .9rem; font-weight: 600; padding-left: 4px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.pay-method { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-weight: 700; cursor: pointer; transition: border-color .12s, background .12s, transform .08s; }
.pay-method .ico { width: 26px; height: 26px; }
.pay-method:active { transform: scale(.97); }
.pay-method.active { border-color: var(--amber-2); background: var(--amber-soft); color: var(--ink); }
.pay-panel { display: flex; flex-direction: column; gap: 10px; min-height: 110px; }
.pay-panel input[type="text"] { font-size: 1.4rem; font-variant-numeric: tabular-nums; min-height: 54px; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-cash-chip { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.pay-cash-chip:active { background: var(--amber-soft); }
.pay-result { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-ink, var(--ok)); min-height: 48px; }
.pay-result:empty { display: none; }
.pay-result b { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.pay-result.short { background: var(--bad-soft); color: var(--bad); }
.pay-result .muted, .pay-result .low { font-weight: 600; }
.pay-transfer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px; border-radius: 14px; background: var(--soft); font-weight: 600; }
.pay-transfer .muted { flex-basis: 100%; font-weight: 400; font-size: .9rem; }
.pay-transfer .ico { width: 30px; height: 30px; flex: none; }
.pay-go { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; font-size: 1.15rem; padding: 0 20px; }
.pay-go b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.pick { display: flex; flex-direction: column; gap: 10px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.pick-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pick-item:hover { border-color: var(--amber-2); }
.pick-name { font-weight: 700; flex: 1 1 auto; }
.bonus-pill { padding: 2px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--ink); font-size: .8rem; font-weight: 700; }

/* «Оплачено»: галочка рисуется, сумма и сдача крупно; не мешает работе (касание и сканер проходят). */
.paid { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle at center, rgba(10, 16, 32, .35), rgba(10, 16, 32, .15)); animation: paid-fade .18s ease-out; }
.paid-out { animation: paid-fade-out .22s ease-in forwards; }
.paid-card { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 280px; padding: 26px 34px 22px; border-radius: 26px; background: var(--card); box-shadow: 0 30px 80px rgba(10, 16, 32, .35); animation: paid-pop .32s cubic-bezier(.2, 1.4, .4, 1); }
.paid-mark { width: 104px; height: 104px; margin-bottom: 6px; }
.paid-circle { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 6; stroke-dasharray: 330; stroke-dashoffset: 330; animation: paid-draw .45s ease-out forwards; }
.paid-tick { fill: none; stroke: var(--ok); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: paid-draw .3s .38s ease-out forwards; }
.paid-title { font-size: 1.25rem; font-weight: 800; color: var(--ok); }
.paid-sum { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.paid-change { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; padding: 8px 16px; border-radius: 14px; background: var(--amber-soft); }
.paid-change b { font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.paid-note { font-weight: 600; }
.paid-bonus { color: var(--ok); }
.paid-no { margin-top: 4px; font-size: .9rem; }
@keyframes paid-draw { to { stroke-dashoffset: 0; } }
@keyframes paid-pop { from { transform: scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes paid-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes paid-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .paid, .paid-card, .paid-out { animation: none; }
  .paid-circle, .paid-tick { animation: none; stroke-dashoffset: 0; }
}
@media (max-width: 640px) {
  .pay-methods { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .pay-method { padding: 8px 2px; font-size: .78rem; gap: 2px; }
  .pay-method .ico { width: 22px; height: 22px; }
  .pay-head { padding: 12px; }
  .pay-total { font-size: 2rem; }
  .paid-card { min-width: 0; width: calc(100vw - 48px); }
}

/* ---------- Заказы поставщикам (0.48, js/pages/orders.js) ---------- */
.order-lines { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; padding-right: 2px; }
.order-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.order-line .check { flex: 1; min-width: 0; }
.order-qty { display: flex; align-items: center; gap: 6px; }
.order-qty .count-input, .order-field .count-input { width: 96px; text-align: right; }
.order-receive { flex-wrap: wrap; }
.order-name { flex: 1 1 100%; font-weight: 600; }
.order-field { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.order-field input[type="date"] { min-height: 40px; }

/* QR-код магазина в окне оплаты (0.49) */
.pay-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pay-qr-img { width: min(240px, 60vw); height: min(240px, 60vw); object-fit: contain; background: #fff; border-radius: 16px; padding: 10px; border: 1px solid var(--line); }
.pay-qr-sum { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Горячие клавиши кассы (0.49): подсказки видны только там, где есть клавиатура и мышь. */
kbd, .hk { display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--card); color: var(--ink-2); font: 600 .75rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; text-align: center; }
.btn .hk { margin-left: 8px; opacity: .8; }
.btn-primary .hk { background: rgba(255, 255, 255, .35); border-color: rgba(0, 0, 0, .15); color: inherit; }
.hk, .hk-help { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
  .hk { display: inline-block; }
  .hk-help { display: inline-flex; align-items: center; gap: 6px; }
}
.hk-list { display: flex; flex-direction: column; gap: 8px; }
.hk-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 12px; }
.hk-keys { display: flex; gap: 4px; }
.qr-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 12px; }
.qr-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.qr-thumb { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 10px; }
.qr-pick { display: flex; align-items: center; gap: 12px; }

/* ======================================================================================================
   0.51: телефон и планшет.
   Планшет (641–1100): боковая полоса значков с подписями вместо нижней полосы — все разделы под рукой.
   Телефон (≤640): нижняя полоса с «таблеткой» под значком, компактное напоминание, кнопки заголовка в два столбца.
   Правила ниже перекрывают общие (≤860) — они стоят позже с той же силой селекторов.
   ====================================================================================================== */
@media (min-width: 641px) and (max-width: 1100px), (pointer: coarse) and (min-width: 641px) and (max-width: 1700px) {
  .app { grid-template-columns: 92px 1fr; grid-template-rows: 1fr; }
  .nav { order: 0; flex-direction: column; padding: 14px 8px calc(12px + env(safe-area-inset-bottom)); gap: 12px; overflow-x: hidden; overflow-y: auto; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%); box-shadow: none; }
  .brand { display: flex; justify-content: center; padding: 0 0 12px; }
  .brand > div { display: none; }
  .brand img { width: 44px; height: 44px; }
  .nav-foot, .nav-group, .nav-more { display: none; }
  .nav-items { flex-direction: column; flex: none; gap: 4px; }
  .nav-extra { display: flex; }
  .nav-item { order: 0; flex: none; flex-direction: column; justify-content: center; gap: 4px; min-height: 62px; padding: 8px 2px; font-size: .68rem; text-align: center; border-radius: 14px; }
  .nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-item .ico { width: 24px; height: 24px; }
  .nav-item.active { background: rgba(245, 165, 36, .16); }
  .nav-item.active::before { left: -8px; right: auto; top: 16px; bottom: 16px; width: 4px; height: auto; border-radius: 0 4px 4px 0; }
  .nav-user { flex-direction: column; gap: 2px; padding: 6px 2px; background: rgba(255, 255, 255, .06); text-align: center; }
  .nav-user > span { display: block; font-size: .7rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-user .btn { padding: 4px; min-height: 36px; }
  .nav-user .btn span { display: none; }
  .page { padding: 22px 22px 36px; }
}

@media (max-width: 640px) {
  .nav { padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .nav-item, .nav-more { min-height: 60px; gap: 4px; font-size: .68rem; color: #b9c4dc; }
  .nav-item.active, .nav-more.active { background: none; color: #fff; }
  .nav-item.active::before { display: none; }
  .nav-item .ico, .nav-more .ico { width: 24px; height: 24px; padding: 3px 16px; border-radius: 14px; box-sizing: content-box; transition: background .15s; }
  .nav-item.active .ico, .nav-more.active .ico { background: rgba(245, 165, 36, .2); color: var(--amber); }
  /* Кнопки заголовка раздела: главная — во всю ширину сверху, остальные — по две в ряд. */
  .page-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-actions .btn { width: 100%; min-height: 44px; padding: 0 10px; font-size: .92rem; white-space: normal; line-height: 1.2; }
  .page-actions .btn-primary { grid-column: 1 / -1; order: -1; min-height: 48px; }
  .page-actions > .btn:only-child { grid-column: 1 / -1; }
  /* Касса: «Сканер» — только значок, поиску больше места. */
  .pos-left .toolbar .btn span { display: none; }
  .pos-left .toolbar .btn { padding: 0 14px; }
}

/* Напоминания сверху на планшете и телефоне — одной строкой, без длинного пояснения. */
@media (max-width: 860px) {
  .backup-alert, .license-alert { flex-wrap: nowrap; padding: 10px 12px; gap: 10px; font-size: .9rem; line-height: 1.3; }
  .backup-alert .btn, .license-alert .btn { flex: none; min-height: 40px; padding: 0 12px; font-size: .88rem; }
  .alert-more { display: none; }
  /* Вкладки с прокруткой: края растворяются — видно, что дальше есть ещё. */
  .tabs { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); }
}
@media (max-width: 400px) {
  .backup-alert .btn span, .license-alert .btn span { display: none; }
}
@media (max-width: 640px) {
  .page-actions > .btn:last-child:nth-child(odd):not(.btn-primary) { grid-column: 1 / -1; } /* нечётная последняя — во всю ширину */
}
/* «Только важное» в журнале — переключатель-«таблетка», а не мелкая галочка. */
.audit-warn-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; color: var(--muted); cursor: pointer; box-shadow: var(--shadow-1); }
.audit-warn-toggle:has(input:checked) { border-color: var(--amber-2); background: var(--amber-soft); color: var(--ink); }
.audit-warn-toggle input { width: 18px; height: 18px; accent-color: var(--amber-2); }

/* Тип бизнеса и возможности (0.52) */
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.feature-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.feature-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--amber-2); flex: none; }
.feature-row span { display: flex; flex-direction: column; gap: 2px; }
.feature-row .muted { font-size: .85rem; }
.feature-row.on { border-color: var(--amber-2); background: var(--amber-soft); }
.feature-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }

/* Раздел владельца под кодом (0.53) */
.owner-lock { max-width: 380px; margin: 6vh auto 0; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 28px 22px; border-radius: 24px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; box-shadow: var(--shadow-3); }
.owner-lock h1 { color: #fff; margin: 0; }
.owner-lock .muted { color: #c3cce0; margin: 0; }
.owner-lock-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(245, 165, 36, .18); color: var(--amber); }
.owner-lock-icon .ico { width: 32px; height: 32px; }
.owner-lock .form-error { color: #ffb4ab; min-height: 1.2em; }
.owner-lock .btn-big { width: 100%; }
.owner-lock-hint { font-size: .85rem; }
.nav-owner-close { border: none; background: rgba(245, 165, 36, .12); font: inherit; cursor: pointer; width: 100%; }

/* Окно оплаты: кнопка «Оплатить» всегда видна внизу окна (на телефоне окно длинное). */
.pay-go { position: sticky; bottom: -1px; z-index: 2; box-shadow: 0 -10px 18px var(--card), var(--shadow-2, 0 4px 12px rgba(10, 16, 32, .18)); }
.pay-head { border: 1px solid rgba(255, 255, 255, .08); }

/* Касса на телефоне (0.54): строка чека уходит свайпом влево. */
.line { touch-action: pan-y; transition: transform .16s ease-out, opacity .16s, background .12s; position: relative; }
.line-swiping { background: var(--bad-soft); border-radius: 12px; }
.line-swiping::after { content: "✕"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--bad); font-weight: 800; font-size: 1.2rem; }
.line-gone { transform: translateX(-110%) !important; opacity: 0; }

/* Банки при переводе (0.55) */
.pay-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; width: 100%; }
.pay-bank { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.pay-bank i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 900; font-size: .85rem; }
.pay-bank.active { border-color: var(--amber-2); background: var(--amber-soft); color: var(--ink); }
.pay-qr .field-label { align-self: flex-start; }
.bank-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #fff; font-weight: 900; font-size: .75rem; margin-right: 8px; vertical-align: middle; }
.bank-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.bank-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; flex-wrap: wrap; }
.bank-name { display: flex; flex-direction: column; flex: 1; min-width: 140px; }
.bank-name .muted { font-size: .85rem; }
.qr-thumb-sm { width: 44px; height: 44px; border-radius: 8px; }
.bank-break { display: flex; flex-direction: column; gap: 4px; }
.bank-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--line); margin: 2px 0 8px; }
.bank-bar i { display: block; height: 100%; }
.bank-line { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.bank-line:first-of-type { border-top: 0; }
.bank-line .bank-dot { margin-right: 0; flex: none; }
.bank-line-name { flex: 1; font-weight: 700; }
.bank-line b { font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }
.bank-total { border-top: 2px solid var(--line); }

/* ======================================================================================================
   0.57: новый вид телефона и планшета (по утверждённым макетам).
   Телефон: светлая нижняя полоса, «Касса» — большой оранжевый круг в центре. Планшет: тёмная полоса значков слева,
   выбранный раздел — оранжевая «таблетка», редкие разделы — в «Ещё» внизу.
   ====================================================================================================== */
@media (min-width: 641px) and (max-width: 1100px), (pointer: coarse) and (min-width: 641px) and (max-width: 1700px) {
  .app { grid-template-columns: 96px 1fr; }
  .nav { padding: 16px 10px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #16213a 0%, #0d1526 100%); }
  .brand img { width: 48px; height: 48px; border-radius: 14px; }
  .nav-items { flex: 1; gap: 6px; }
  .nav-norail { display: none !important; }
  .nav-more { display: flex; flex: none; flex-direction: column; justify-content: center; gap: 4px; margin-top: auto; min-height: 62px; padding: 8px 2px; border: none; border-radius: 14px; background: none; color: #cdd6ea; font: inherit; font-size: .68rem; font-weight: 600; cursor: pointer; }
  .nav-more.nav-more-phone { display: none; }
  .nav-item { color: #c7d0e4; }
  .nav-item.active, .nav-more.active { background: linear-gradient(160deg, #ffb53b 0%, var(--amber-2) 100%); color: #2b1a00; box-shadow: 0 6px 16px rgba(245, 165, 36, .35); }
  .nav-item.active .ico, .nav-more.active .ico { color: #2b1a00; }
  .nav-item.active::before { display: none; }
}

@media (max-width: 640px) {
  .nav { background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(10, 16, 32, .08); padding: 2px 4px calc(4px + env(safe-area-inset-bottom)); overflow: visible; }
  .nav-more.nav-more-rail { display: none; }
  .nav-item, .nav-more { color: var(--muted); font-weight: 600; }
  .nav-item.active, .nav-more.active { color: var(--ink); }
  .nav-item.active .ico, .nav-more.active .ico { background: var(--amber-soft); color: var(--amber-2); }
  .nav-user .btn { color: var(--muted); }
  /* Касса — круг над полосой (0.61: отдельный элемент; полоса — поверх страницы, иначе верх круга уходил под карточки). */
  .nav { position: relative; z-index: 15; }
  .nav-item.nav-fab { position: relative; justify-content: flex-end; padding-bottom: 6px; color: var(--ink); overflow: visible; }
  .nav-item.nav-fab .nav-fab-rail { display: none; }
  .nav-item.nav-fab span { font-weight: 800; }
}

/* Касса 0.57: плитки с картинкой — пастельный фон и значок (или фото). */
.tile-art { display: grid; place-items: center; font-size: 2.7rem; line-height: 1; }
.tile-art-letter { font-size: 2.2rem; font-weight: 800; text-transform: uppercase; }
.art-0 { background: #ffe4e6; color: #be123c; }
.art-1 { background: #fef3c7; color: #b45309; }
.art-2 { background: #e0f2fe; color: #0369a1; }
.art-3 { background: #dcfce7; color: #15803d; }
.art-4 { background: #ffedd5; color: #c2410c; }
.art-5 { background: #ede9fe; color: #6d28d9; }
.tiles-art .tile { padding-top: 14px; gap: 6px; min-height: 196px; flex-shrink: 0; }
.tiles-art .tile > * { flex-shrink: 0; }
.tiles-art .tile-foot { margin-top: auto; }
.tiles-art .tile-photo { height: 92px; }
.tiles-art .tile-promo { position: absolute; top: 8px; left: 8px; margin: 0; z-index: 1; }
.tiles-art .tile-in { border: 2px solid var(--amber-2); box-shadow: 0 6px 16px rgba(232, 147, 12, .22); }
.tiles-art .tile-name { min-height: 2.5em; }
:root[data-theme="dark"] .art-0 { background: rgba(244, 63, 94, .16); color: #fda4af; }
:root[data-theme="dark"] .art-1 { background: rgba(245, 158, 11, .16); color: #fcd34d; }
:root[data-theme="dark"] .art-2 { background: rgba(14, 165, 233, .16); color: #7dd3fc; }
:root[data-theme="dark"] .art-3 { background: rgba(34, 197, 94, .16); color: #86efac; }
:root[data-theme="dark"] .art-4 { background: rgba(249, 115, 22, .16); color: #fdba74; }
:root[data-theme="dark"] .art-5 { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .art-0 { background: rgba(244, 63, 94, .16); color: #fda4af; }
  :root:not([data-theme="light"]) .art-1 { background: rgba(245, 158, 11, .16); color: #fcd34d; }
  :root:not([data-theme="light"]) .art-2 { background: rgba(14, 165, 233, .16); color: #7dd3fc; }
  :root:not([data-theme="light"]) .art-3 { background: rgba(34, 197, 94, .16); color: #86efac; }
  :root:not([data-theme="light"]) .art-4 { background: rgba(249, 115, 22, .16); color: #fdba74; }
  :root:not([data-theme="light"]) .art-5 { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
}

/* Оплата двумя кнопками — на телефоне и планшете; на компьютере — «Принять оплату» (F2). */
.pay-two, .pay-more, .sheet-grip, .receipt-back { display: none; }
@media (max-width: 1100px), (pointer: coarse) and (max-width: 1700px) {
  .receipt-foot .pay-one { display: none; }
  .pay-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
  .pay-two .btn { min-height: 62px; border: none; border-radius: 16px; font-size: 1.08rem; font-weight: 800; gap: 8px; justify-content: center; }
  .pay-cash { background: linear-gradient(160deg, #ffb53b 0%, var(--amber-2) 100%); color: #2b1a00; box-shadow: 0 8px 18px rgba(232, 147, 12, .3); }
  .pay-transfer { background: var(--navy); color: #fff; box-shadow: 0 8px 18px rgba(20, 33, 61, .25); }
  .pay-two .btn:disabled { opacity: .45; box-shadow: none; }
  .pay-more { display: flex; justify-content: space-around; gap: 6px; flex-wrap: wrap; }
  .pay-more .btn-link { font-weight: 700; }
  .receipt-foot .sum-total span:last-child { font-size: 1.7rem; }
}

/* Телефон и планшет в портрете (0.67): полоса «В чеке» и чек — листом снизу. */
@media (max-width: 860px) {
  .cart-bar { bottom: calc(10px + env(safe-area-inset-bottom)); min-height: 64px; padding: 0 10px 0 12px; border-radius: 18px; background: linear-gradient(160deg, #1b2a4c 0%, var(--navy-3) 100%); }
  .cart-bar-count { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; background: rgba(255, 255, 255, .14); font-weight: 800; }
  .cart-bar-sum { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
  .cart-bar-sum small { color: #b9c4dc; font-size: .75rem; }
  .cart-bar-go { padding: 12px 16px; border-radius: 12px; background: linear-gradient(160deg, #ffb53b 0%, var(--amber-2) 100%); }
  .cart-bar-go::after { content: " →"; }
  .page-pos .receipt { position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 18; max-height: 88dvh; overflow-y: auto; border-radius: 24px 24px 0 0; transform: translateY(110%); box-shadow: 0 -12px 40px rgba(10, 16, 32, .25); padding-bottom: env(safe-area-inset-bottom); }
  .page-pos.sheet-open .receipt { transform: none; animation: sheet .26s var(--ease); }
  .page-pos.sheet-open .receipt-back { display: block; position: fixed; inset: 0; z-index: 17; background: rgba(10, 16, 32, .45); animation: fade .2s; }
  .page-pos.sheet-open .cart-bar { visibility: hidden; }
  .sheet-grip { display: block; width: 44px; height: 5px; margin: 10px auto 2px; border-radius: 3px; background: var(--line-strong); cursor: pointer; }
}
.tiles-art .tile-foot { flex-wrap: nowrap; }
.tiles-art .tile-price { font-size: 1.05rem; white-space: nowrap; }
.tiles-art .tile-stock { font-size: .72rem; padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; }
.pay-two .btn { white-space: nowrap; padding: 0 10px; font-size: 1rem; }
.pay-two .btn .ico { width: 20px; height: 20px; flex: none; }

/* Главная «Сегодня» на телефоне и планшете (0.57) */
.today { display: flex; flex-direction: column; gap: 16px; }
.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.today-head h1 { margin: 2px 0 0; font-size: 1.9rem; letter-spacing: -.02em; }
.today-hello { color: var(--muted); font-size: .9rem; font-weight: 600; }
.today-grid { display: grid; gap: 16px; }
.today-left, .today-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.today-sec { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px -4px; }
.today-sec h2 { margin: 0; font-size: 1.1rem; }
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 20px 20px 18px; border-radius: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #2c4a8a 0%, transparent 55%), linear-gradient(160deg, #1b2a4c 0%, #0d1526 100%); box-shadow: 0 14px 32px rgba(13, 21, 38, .28); }
.hero-label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #c3cce0; }
.hero-value { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 6px 0 8px; }
.hero-change { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(60, 207, 134, .2); color: #7ff0b4; font-size: .82rem; font-weight: 700; }
.hero-change.down { background: rgba(255, 120, 110, .2); color: #ffb4ab; }
.hero-spark { margin-top: 10px; height: 46px; }
.hero-spark .spark { width: 100%; height: 46px; }
.spark-line.c-hero { stroke: var(--amber); stroke-width: 2.5; fill: none; }
.spark-area.c-hero { fill: rgba(245, 165, 36, .14); stroke: none; }
.hero-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hero-mini { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); min-width: 0; }
.hero-mini b { font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-mini span { font-size: .75rem; color: #c3cce0; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 12px 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .85rem; text-align: center; transition: transform .08s; }
.quick-btn:active { transform: scale(.97); }
.quick-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.5rem; }
.qa-amber .quick-ico { background: #fef1d8; }
.qa-blue .quick-ico { background: #e0ecff; }
.qa-red .quick-ico { background: #fde7e4; }
.qa-green .quick-ico { background: #dcfce7; }
.today .ov-list, .today .rank, .today .empty-state { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); padding: 4px 14px; }
.today-chart .card { border-radius: 18px; }
.today .attn-icon { border-radius: 12px; }
@media (min-width: 900px) {
  .today-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 640px) {
  .today-head .seg { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-value { font-size: 2.1rem; }
  .quick { gap: 8px; }
  .quick-btn { min-height: 88px; font-size: .78rem; border-radius: 16px; }
}
:root[data-theme="dark"] .qa-amber .quick-ico, :root[data-theme="dark"] .qa-blue .quick-ico, :root[data-theme="dark"] .qa-red .quick-ico, :root[data-theme="dark"] .qa-green .quick-ico { background: rgba(255, 255, 255, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .quick-ico { background: rgba(255, 255, 255, .07) !important; } }

/* Карточка товара на телефоне и планшете (0.57) */
.pcard { display: flex; flex-direction: column; gap: 12px; }
.pc-art { height: 150px; border-radius: 20px; display: grid; place-items: center; font-size: 4rem; overflow: hidden; }
.pc-art img { width: 100%; height: 100%; object-fit: cover; }
.pc-meta { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.pc-name { margin: -6px 0 0; font-size: 1.35rem; }
.pc-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; }
.pc-box { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--soft); min-width: 0; }
.pc-box span { color: var(--muted); font-size: .78rem; }
.pc-box b { font-size: 1.12rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-box.pc-ok b { color: var(--ok); }
.pc-stock-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .92rem; }
.pc-stock-row span { font-weight: 700; }
.pc-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.pc-bar i { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.pc-warn .pc-bar i { background: var(--amber-2); }
.pc-warn .pc-stock-row span { color: var(--amber-2); }
.pc-bad .pc-bar i { background: var(--bad); }
.pc-bad .pc-stock-row span { color: var(--bad); }
.pc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; }
.pc-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 74px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; box-shadow: var(--shadow-1); }
.pc-act-main { border: none; background: linear-gradient(160deg, #ffb53b 0%, var(--amber-2) 100%); color: #2b1a00; box-shadow: 0 8px 18px rgba(232, 147, 12, .28); }
.pc-sub { margin: 6px 0 -2px; font-size: 1rem; }
.pc-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; padding: 2px 12px; }
.pc-li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pc-li:first-child { border-top: 0; }
.pc-li > div { display: flex; flex-direction: column; gap: 2px; }
.pc-li .muted { font-size: .85rem; }
.pc-li-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--soft); font-size: 1.1rem; flex: none; }

/* «Отчёты» на телефоне и планшете (0.57): прибыль крупно */
.profit-hero { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ph-card { padding: 18px 18px 10px; border-radius: 20px; }
.ph-label { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ph-value { font-size: 2.2rem; font-weight: 800; color: var(--ok); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.ph-change { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok-ink); font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.ph-change.down { background: var(--bad-soft); color: var(--bad-ink); }
.ph-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ph-box { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); min-width: 0; }
.ph-box span { color: var(--muted); font-size: .78rem; }
.ph-box b { font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-best h2 { font-size: 1.05rem; margin: 4px 2px 8px; }
.ph-best .pc-list { background: var(--card); }
.ph-plus { margin-left: auto; color: var(--ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-card-head { flex-wrap: wrap; row-gap: 4px; }

/* 0.59: планшет и касса-моноблок в альбомной ориентации — окна по центру, а не листом снизу; длинные формы —
   широкое окно, поля в два столбца (меньше прокрутки вверх-вниз). Телефон в портрете — лист снизу, как раньше. */
@media (orientation: landscape) and (min-width: 700px) {
  .overlay { align-items: center; padding: 12px; }
  .modal, .modal-wide { width: min(500px, 100%); max-height: calc(100dvh - 24px); border-radius: 20px; padding: 20px 22px; animation: pop .2s var(--ease); }
  .modal-wide { width: min(820px, 100%); }
  .modal-form { width: min(900px, 100%); }
  .modal-form .form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 12px 20px; align-items: start; }
  .modal-form .form > .field-side { grid-column: 2; grid-row: span 3; }
  .modal-form .form > .field-full, .modal-form .form > .form-note, .modal-form .form > .form-error { grid-column: 1 / -1; }
  .modal-form .form-error:empty { display: none; }
  .modal h2 { margin-bottom: 10px; }
  .modal-actions { margin-top: 14px; }
  .modal-actions .btn { flex: 0 0 auto; min-width: 140px; }
}
/* Цифровая панель включена: широкая форма оставляет место для панели сбоку; на узком экране — один столбец. */
@media (orientation: landscape) and (min-width: 700px) {
  .kb-app .modal-form { width: min(900px, calc(100vw - 608px)); }
}
@media (orientation: landscape) and (min-width: 700px) and (max-width: 1167px) {
  .kb-app .modal-form { width: min(500px, 100%); }
  .kb-app .modal-form .form { display: flex; }
}

/* 0.60: окна прокручиваются на любом экране. Старые WebView (кассы) не сжимают тело окна в flex без min-height: 0 —
   содержимое обрезалось без прокрутки. Полоса прокрутки видна, прокрутка пальцем — плавная и не уводит страницу. */
.modal { overflow: hidden; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal h2, .modal-actions { flex: none; }

/* Демо-магазин (0.60) */
.view-bar.demo-bar { background: var(--amber-soft); border-color: var(--amber-2); color: var(--amber-ink); }
.demo-loading { max-width: 420px; margin: 18vh auto 0; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; font-size: 1.1rem; }
.demo-progress { width: 100%; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.demo-progress i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .2s; }

/* Круг кассы (0.61): только на телефоне; на планшете и компьютере — обычный пункт меню. */
.fab-circle { display: none; }
@media (max-width: 640px) {
  .fab-circle { display: grid; place-items: center; position: absolute; top: -24px; left: 50%; width: 58px; height: 58px; margin-left: -29px; border-radius: 50%; background: linear-gradient(160deg, #ffb53b 0%, #e8930c 100%); color: #2b1a00; border: 4px solid var(--card); box-shadow: 0 8px 18px rgba(232, 147, 12, .45); box-sizing: border-box; }
  .fab-circle .ico { width: 26px; height: 26px; padding: 0; margin: 0; background: none !important; color: #2b1a00 !important; border-radius: 0; }
  .nav-item.nav-fab:active .fab-circle { transform: scale(.94); }
}

/* 0.61: иконки вместо смайликов */
.tile-art .tile-art-ico { width: 40px; height: 40px; stroke-width: 1.6; }
.pc-art .pc-art-ico { width: 64px; height: 64px; stroke-width: 1.4; }
.pc-li-ico .ico, .quick-ico .ico { width: 24px; height: 24px; }
.qa-amber .quick-ico { color: #b45309; } .qa-blue .quick-ico { color: #1d4ed8; } .qa-red .quick-ico { color: #be123c; } .qa-green .quick-ico { color: #15803d; }
.bday { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: #db2777; }
.bday-today { display: inline-flex; align-items: center; gap: 4px; color: #db2777; }
.art-6 { background: #e0e7ff; color: #4338ca; } .art-7 { background: #f1f5f9; color: #475569; }

/* 0.61: единый стиль кнопок и анимации (по макету). Три вида: главная оранжевая, обычная с рамкой, текстовая. */
.btn { border-radius: 14px; border: 1.5px solid #cfd6e2; box-shadow: none; transition: background .15s, box-shadow .15s, transform .1s, border-color .15s; }
.btn:hover { border-color: #b4bfd0; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(160deg, #ffb53b 0%, #e8930c 100%); border-color: transparent; color: #2b1a00; font-weight: 700; box-shadow: 0 6px 14px rgba(232, 147, 12, .28); }
.btn-primary:hover { background: linear-gradient(160deg, #ffbd4f 0%, #ef9a16 100%); border-color: transparent; }
.btn-danger { border-color: transparent; }
.btn-link { border: none; font-weight: 600; }
.btn-link:active { transform: none; opacity: .7; }
.card, .stat, .tile, .quick-btn, .pc-act, .ov-list, .table-wrap { border-radius: 18px; }
:root[data-theme="dark"] .btn { border-color: var(--line-strong); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.btn-primary):not(.btn-danger):not(.btn-link) { border-color: var(--line-strong); } }

/* Раздел открывается плавно; плитка «подпрыгивает», когда товар попал в чек. */
.page-enter { animation: page-in .22s var(--ease, ease-out); }
@keyframes page-in { from { opacity: 0; } } /* только прозрачность: transform сделал бы «фиксированные» листы (чек) зависимыми от страницы */
.tile.bump { animation: tile-bump .28s ease-out; }
@keyframes tile-bump { 0% { transform: scale(1); } 35% { transform: scale(.95); } 70% { transform: scale(1.02); } 100% { transform: scale(1); } }
.tile-in .tile-qty { animation: qty-pop .22s ease-out; }
@keyframes qty-pop { from { transform: scale(.4); opacity: 0; } }
.quick-btn, .pc-act, .tile { transition: transform .1s, box-shadow .15s, border-color .15s; }
.quick-btn:active, .pc-act:active { transform: scale(.96); }

/* «Отчёты» на телефоне и планшете (0.62) */
.ok-text { color: var(--ok); }
.page-rt { display: flex; flex-direction: column; gap: 12px; }
.rt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rt-head h1 { margin: 0; font-size: 1.8rem; letter-spacing: -.02em; }
.rt-period { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--soft); border-radius: 12px; padding: 3px; }
.rt-period-btn { border: none; background: none; font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); padding: 9px 0; border-radius: 10px; cursor: pointer; }
.rt-period-btn.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.rt-range { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-2); font-weight: 600; }
.rt-arrow { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.rt-arrow:disabled { opacity: .35; cursor: default; }
.rt-lbl { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rt-profit { padding: 16px; }
.rt-big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--ok); margin: 2px 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-big.neg { color: var(--bad); }
.rt-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok-ink); font-size: .82rem; font-weight: 700; }
.rt-chip.down { background: var(--bad-soft); color: var(--bad-ink); }
.rt-chart { margin-top: 14px; }
.rt-bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; }
.rt-col { flex: 1; min-width: 4px; border: none; padding: 0; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #34c27a, #12804a); opacity: .85; cursor: pointer; transition: opacity .15s, transform .1s; }
.rt-col:hover, .rt-col:focus-visible { opacity: 1; }
.rt-col:active { transform: scaleY(.97); }
.rt-col.neg { background: linear-gradient(180deg, #f07167, #c0352b); }
.rt-col.today { background: linear-gradient(180deg, #ffbd4a, #e8930c); opacity: 1; }
.rt-col:disabled { cursor: default; }
.rt-axis { display: flex; justify-content: space-between; gap: 2px; font-size: .7rem; color: var(--muted); margin-top: 6px; }
.rt-axis span { flex: 1; text-align: center; white-space: nowrap; }
.rt-hint { font-size: .78rem; margin-top: 8px; text-align: center; }
.rt-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rt-kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt-kpis span { font-size: .76rem; color: var(--muted); }
.rt-kpis b { font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-kpis em { font-style: normal; font-size: .76rem; font-weight: 700; }
.rt-insights { padding: 12px 14px 6px; }
.rt-ins { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.35; }
.rt-lbl + .rt-ins { border-top: 0; }
.rt-sq { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; font-weight: 800; }
.rt-sq .ico { width: 20px; height: 20px; }
.rt-blocks { display: flex; flex-direction: column; gap: 8px; }
.rt-blocks-title { margin: 4px 4px 0; }
.rt-block { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rt-block.open { border-color: var(--line-strong); }
.rt-block-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: none; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.rt-block-head > b { flex: 1; font-size: .98rem; }
.rt-block-sum { font-size: .82rem; color: var(--muted); font-weight: 600; text-align: right; }
.rt-chev { color: var(--muted); }
.rt-block-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 8px; animation: fade .18s ease-out; }
.rt-note { font-size: .85rem; margin: 2px 0; }
.rt-row { display: flex; flex-direction: column; gap: 4px; }
.rt-row-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.rt-row-top span { font-weight: 700; font-variant-numeric: tabular-nums; }
.rt-bar { height: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.rt-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.rt-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--soft); border-radius: 12px; padding: 3px; gap: 2px; }
.rt-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.rt-pill { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.rt-seg .rt-pill { border: none; background: none; border-radius: 10px; padding: 8px 0; }
.rt-pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.rt-seg .rt-pill.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.rt-list { display: flex; flex-direction: column; }
.rt-prod { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.rt-prod:first-child { border-top: 0; }
.rt-prod-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rt-prod-main b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-prod-main small { font-size: .74rem; }
.rt-prod > b { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .92rem; }
.rt-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #7c3aed; color: #fff; font-weight: 800; flex: none; }
.rt-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--soft); }
.rt-stack i { display: block; height: 100%; }
.rt-pay { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.rt-pay b { flex: 1; font-weight: 600; }
.rt-pay > span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.rt-bank { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .78rem; flex: none; }
.rt-hours { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.rt-hour { flex: 1; border-radius: 4px 4px 2px 2px; background: #93b4f5; }
.rt-hour.peak { background: #2563eb; }
.rt-day h2 { display: flex; align-items: center; gap: 8px; }
.rt-day { display: flex; flex-direction: column; gap: 10px; }
.modal h2:empty { display: none; }
.rt-day + * {}
.rt-receipts { display: flex; flex-direction: column; }
.rt-receipt { display: grid; grid-template-columns: 46px 1fr auto; grid-template-areas: "time name sum" "time pay pay"; gap: 0 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.rt-receipt > span { grid-area: time; } .rt-receipt > b { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rt-receipt > em { grid-area: sum; font-style: normal; font-weight: 700; } .rt-receipt > small { grid-area: pay; font-size: .76rem; }
.rt-share { display: flex; flex-direction: column; }
.rt-share-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: none; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.rt-share-text { display: flex; flex-direction: column; }
.rt-share-text small { color: var(--muted); font-size: .82rem; }
.rt-grid { display: flex; flex-direction: column; gap: 12px; }
.rt-main { display: flex; flex-direction: column; gap: 10px; }
/* Планшет (широкий экран): прибыль слева, «Что изменилось» справа, блоки ниже слева. */
@media (min-width: 900px) {
  .rt-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
  .rt-main { grid-column: 1; grid-row: 1; }
  .rt-side { grid-column: 2; grid-row: 1 / span 2; }
  .rt-blocks { grid-column: 1; grid-row: 2; }
  .rt-bars { height: 170px; }
  .rt-period { width: 420px; }
  .page-rt > .rt-period, .page-rt > .rt-range { align-self: flex-start; }
}
.rt-side { display: flex; flex-direction: column; gap: 12px; }
.rt-top { display: none; }
@media (min-width: 900px) { .rt-top { display: block; } }

/* «Настройки» по группам (0.63) */
.page-settings-home { max-width: 760px; }
.set-search { width: 100%; margin: 4px 0 10px; }
.set-head-label { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 4px 6px; }
.set-group { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.set-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 60px; transition: background .12s; }
.set-item:first-child { border-top: 0; }
.set-item:hover { background: var(--hover); }
.set-item:active { background: var(--soft); }
.set-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.set-ico .ico { width: 20px; height: 20px; }
.set-text { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.set-text b { font-size: .98rem; font-weight: 600; }
.set-text small { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-chev { color: var(--line-strong); }
.set-badge { font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.set-ok { background: var(--ok-soft); color: var(--ok-ink); }
.set-warn { background: var(--amber-soft); color: var(--amber-ink); }
.set-about { margin: 18px 4px 0; font-size: .85rem; }
.set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.set-head h1 { margin: 0; font-size: 1.6rem; }
.set-back { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; flex: none; }
.page-settings-section { max-width: 900px; }
.page-settings-section > .card { margin-bottom: 14px; }

/* Колокольчик (0.63) */
.bell { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; flex: none; padding: 0; }
.bell .ico { width: 22px; height: 22px; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--amber-2); color: #fff; font-style: normal; font-size: .72rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); box-sizing: border-box; }
.bell-urgent .bell-count { background: var(--bad); }
.bell-count[hidden] { display: none; }
.bell-nav { margin-left: auto; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #e2e8f0; }
.bell-nav .bell-count { border-color: var(--navy); }
.bell-inline { width: 28px; height: 28px; border: none; background: none; }
.more-bell { position: relative; }
.today-tools { display: flex; align-items: center; gap: 10px; }
.bell-list { display: flex; flex-direction: column; }
.bell-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.bell-item:first-child { border-top: 0; }
.bell-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--ink-2); }
.bell-bad .bell-ico { background: var(--bad-soft); color: var(--bad); }
.bell-warn .bell-ico { background: var(--amber-soft); color: var(--amber-2); }
.bell-info .bell-ico { background: #e6efff; color: #2563eb; }
.bell-ok { background: var(--ok-soft); color: var(--ok); }
.bell-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bell-text small { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-chev { color: var(--line-strong); }
.bell-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 0; text-align: center; }
/* Телефон: на «Ещё» — точка, если есть напоминания. */
.has-notices .nav-more { position: relative; }
.has-notices .nav-more::after { content: ""; position: absolute; top: 8px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--bad); border: 2px solid var(--card); }
/* Полоса планшета: колокольчик под логотипом. */
@media (min-width: 641px) and (max-width: 1100px), (pointer: coarse) and (min-width: 641px) and (max-width: 1700px) {
  .brand { flex-direction: column; gap: 10px; }
  .bell-nav { margin-left: 0; }
}
@media (max-width: 640px) { .bell-nav { display: none; } }

/* 0.64: «Смешанно · В долг · Клиент» под кнопками оплаты — аккуратные кнопки, а не голые ссылки. */
@media (max-width: 1100px), (pointer: coarse) and (max-width: 1700px) {
  .pay-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
  .pay-more .btn-link { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font-size: .92rem; font-weight: 700; padding: 0 8px; justify-content: center; }
  .pay-more .btn-link:disabled { opacity: .45; }
}

/* ======================================================================================================
   0.64: макеты v3 и v5 (утверждены). Нижняя панель — плавающая «таблетка», касса — кнопка внутри панели.
   Товары без фото — одна общая заглушка. Главная, товары и продажи на телефоне — тонкими строками.
   ====================================================================================================== */
:root { --t-violet: #7c3aed; --t-rose: #e11d48; --t-cyan: #0891b2; --t-blue: #2563eb; --t-green: #12804a; --t-amber: #e8930c; --t-slate: #475569; --t-gray: #94a3b8; --t-red: #c0352b; }

/* Общая заглушка товара без фото и квадрат фото. */
.pthumb { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(160deg, var(--soft), var(--hover-2)); color: var(--line-strong); overflow: hidden; }
.pthumb-photo { object-fit: cover; background: var(--soft); }
.pthumb-ico { width: 50%; height: 50%; stroke-width: 1.7; }

/* --- Нижняя панель телефона --- */
@media (max-width: 640px) {
  .nav { background: transparent; border-top: none; box-shadow: none; padding: 0 10px calc(10px + env(safe-area-inset-bottom)); }
  .nav-items { background: var(--card); border-radius: 22px; box-shadow: 0 8px 26px rgba(15, 23, 42, .13), 0 0 0 1px rgba(15, 23, 42, .04); padding: 4px 6px; align-items: center; min-height: 66px; }
  .nav-user { align-self: center; }
  .nav-item, .nav-more { min-height: 58px; padding: 4px 2px; gap: 3px; color: var(--ink-2); font-weight: 600; font-size: .7rem; }
  .nav-item .ico, .nav-more .ico { width: 22px; height: 22px; padding: 4px 12px; border-radius: 15px; stroke-width: 2.1; }
  .nav-item.active, .nav-more.active { color: var(--ink); font-weight: 800; }
  .nav-item.active .ico, .nav-more.active .ico { background: var(--amber-soft); color: var(--amber-2); }
  /* Касса — оранжевый квадрат со скруглением в одном ряду со всеми (не круг над панелью). */
  .nav-item.nav-fab { justify-content: center; padding-bottom: 4px; }
  .fab-circle { position: static; width: 50px; height: 38px; margin: 0; border: none; border-radius: 14px; box-shadow: 0 4px 12px rgba(232, 147, 12, .35); }
  .fab-circle .ico { width: 23px; height: 23px; }
  .nav-item.nav-fab.active .fab-circle { box-shadow: 0 0 0 3px var(--amber-soft), 0 4px 12px rgba(232, 147, 12, .35); }
  .nav-item.nav-fab span { font-weight: 700; }
  .has-notices .nav-more::after { top: 4px; background: var(--amber-2); }
  /* Демо — тонкая полоса, а не большая карточка. */
  .view-bar.demo-bar { margin: 8px 12px 0; padding: 6px 8px 6px 14px; flex-wrap: nowrap; font-size: .85rem; border-radius: 14px; }
  .view-bar.demo-bar .demo-more { display: none; }
  .view-bar.demo-bar .btn { min-height: 34px; padding: 0 12px; font-size: .8rem; flex: none; }
}
:root[data-theme="dark"] .nav-items { box-shadow: 0 8px 26px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); }

/* --- Общие мелочи v3 --- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 15px; border-radius: 18px; border: none; background: var(--card); color: var(--ink-2); font: inherit; font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-1); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--card); }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 7px; font-size: .74rem; font-weight: 700; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok-ink); } .tag-bad { background: var(--bad-soft); color: var(--bad-ink); }
.tag-warn { background: var(--amber-soft); color: var(--amber-ink); } .tag-blue { background: var(--info); color: var(--info-ink); }
.pill { display: inline-block; font-style: normal; font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 7px; background: var(--ok-soft); color: var(--ok-ink); white-space: nowrap; }
.pill-bad { background: var(--bad-soft); color: var(--bad-ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: block; background: var(--line-strong); }
.dot-bad { background: var(--bad); } .dot-warn { background: var(--amber-2); } .dot-info { background: var(--blue); } .dot-ok { background: var(--ok); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; border: none; background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); cursor: pointer; }
.icon-btn-primary { background: linear-gradient(160deg, #ffb53b, var(--amber-2)); color: #2b1a00; box-shadow: 0 6px 14px rgba(232, 147, 12, .3); }
.ico-dots { stroke-width: 3.2; }
.ph-touch { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.ph-touch .ph-title { flex: 1; min-width: 0; }
.ph-touch h1 { margin: 0; }
.ph-touch p { margin: 2px 0 0; font-size: .85rem; }
.thin-list { display: flex; flex-direction: column; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-1); padding: 2px 14px; }
.thin-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border: none; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; width: 100%; cursor: pointer; }
.thin-row:first-child { border-top: none; }
.thin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.thin-main b { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thin-main small { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.thin-time { width: 40px; flex: none; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.thin-sum { font-variant-numeric: tabular-nums; white-space: nowrap; }
.thin-chev { color: var(--line-strong); }
.sec-more { border: none; background: none; color: var(--blue); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; padding: 4px; }

/* --- Главная (макет v3) --- */
.today-v3 { gap: 14px; }
.th { display: flex; align-items: center; gap: 12px; }
.th-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(160deg, #ffb53b, var(--amber-2)); color: #2b1a00; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; flex: none; }
.th-text { flex: 1; min-width: 0; }
.th-hello { font-size: .8rem; color: var(--muted); }
.th-shop { margin: 0; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-v3 .bell-head { width: 44px; height: 44px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-1); }
.hero-light { background: var(--card); border-radius: 20px; padding: 16px 18px 14px; box-shadow: var(--shadow-1); }
.hl-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.hl-label::first-letter { text-transform: uppercase; }
.hl-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-light .hero-value { margin: 4px 0 10px; font-size: 2.2rem; color: var(--ink); }
.hl-change { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--ok-soft); color: var(--ok-ink); }
.hl-change.down { background: var(--bad-soft); color: var(--bad-ink); }
.hl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.hl-stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hl-stat b { font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-stat span { font-size: .75rem; color: var(--muted); }
.hl-stat .ok-text, .hl-stat .bad-text { font-size: 1.05rem; font-weight: 800; }
.hl-bars { display: flex; align-items: flex-end; gap: 5px; height: 44px; margin-top: 12px; }
.hl-bars i { flex: 1; min-height: 4px; border-radius: 5px; background: var(--hover-2); display: block; }
.hl-bars i.now { background: linear-gradient(180deg, #ffbd4a, var(--amber-2)); }
.quick-round { gap: 6px; }
.quick-round .quick-btn { background: none; border: none; box-shadow: none; min-height: 0; padding: 4px 0; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.quick-round .quick-ico { width: 54px; height: 54px; border-radius: 50%; }
.today-v3 .today-sec { margin: 4px 2px -6px; }
.today-v3 .empty-state { background: var(--card); border-radius: 18px; }

/* --- Касса: плитки с квадратом фото (или общей заглушкой) --- */
.tiles-art .tile-ph { display: grid; place-items: center; background: linear-gradient(160deg, var(--soft), var(--hover-2)); color: var(--line-strong); }
.tile-ph-ico { width: 34%; height: 34%; stroke-width: 1.6; }
@media (max-width: 640px) { .tiles.tiles-art { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
@media (min-width: 641px) { .tiles.tiles-art { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.tiles-art .tile { padding: 6px 6px 9px; gap: 3px; min-height: 0; border-radius: 16px; }
.tiles-art .tile-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; margin: 0; border-radius: 12px; }
@supports not (aspect-ratio: 1 / 1) { .tiles-art .tile-photo { height: 96px; } }
.tiles-art .tile-name { font-size: .8rem; padding: 2px 4px 0; min-height: 2.5em; line-height: 1.25; }
.tiles-art .tile-foot { padding: 0 4px; }
.tiles-art .tile-price { font-size: .95rem; }
.tiles-art .tile-stock:not(.low) { display: none; }
.tiles-art .tile-stock.low { font-size: .66rem; padding: 1px 6px; background: var(--amber-soft); color: var(--amber-ink); }
.tiles-art .tile-out .tile-stock.low { background: var(--bad-soft); color: var(--bad-ink); }
.tiles-art .tile-fav { top: 10px; right: 10px; padding: 3px; }
.tiles-art .tile-in .tile-qty { top: 10px; right: 10px; border: 2px solid var(--card); }
.tiles-art .tile-promo { top: 10px; left: 10px; }
.tiles-art .tile-in { border: 2px solid var(--amber-2); box-shadow: 0 6px 16px rgba(232, 147, 12, .22); }

/* --- Товары строками (телефон и планшет) --- */
.prow-list { display: flex; flex-direction: column; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-1); padding: 2px 12px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border: none; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; width: 100%; cursor: pointer; }
.prow:first-child { border-top: none; }
.prow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prow-main b { font-size: .93rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-main small { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.prow-end b { font-variant-numeric: tabular-nums; }
.prow:active, .thin-row:active { background: var(--hover); }

/* Лист «Инструменты» товаров. */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tool-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.tool-tile b { font-size: .84rem; line-height: 1.2; }
.tool-tile small { font-size: .72rem; color: var(--muted); }
.tool-sq { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--tone, var(--t-slate)); box-shadow: 0 6px 14px -6px var(--tone, var(--t-slate)); }
.tool-sq .ico { width: 24px; height: 24px; stroke-width: 2.1; }
.t-violet { --tone: var(--t-violet); } .t-rose { --tone: var(--t-rose); } .t-cyan { --tone: var(--t-cyan); } .t-blue { --tone: var(--t-blue); }
.t-green { --tone: var(--t-green); } .t-amber { --tone: var(--t-amber); } .t-slate { --tone: var(--t-slate); } .t-gray { --tone: var(--t-gray); } .t-red { --tone: var(--t-red); }

/* Карточка товара: квадрат фото или заглушка. */
.pcard .pc-art.pthumb { width: 100%; height: 140px; border-radius: 18px; }
.pcard img.pc-art { width: 100%; height: 160px; }

/* --- Продажи (макет v3) --- */
.s-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); border-radius: 16px; box-shadow: var(--shadow-1); padding: 10px 6px; text-align: center; }
.s-sum div { display: flex; flex-direction: column; gap: 2px; }
.s-sum span { font-size: .74rem; color: var(--muted); }
.s-sum b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.sday { display: flex; flex-direction: column; gap: 6px; }
.sday-head { font-size: .8rem; font-weight: 700; color: var(--muted); padding: 4px 4px 0; }
.page-sales .thin-main small .tag { font-size: .7rem; }

/* Чек на телефоне. */
.rc { display: flex; flex-direction: column; gap: 8px; }
.rc-when { font-size: .8rem; }
.rc-total { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-lines { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 4px; }
.rc-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rc-line > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-line b { font-size: .9rem; font-weight: 600; }
.rc-line small { font-size: .76rem; }
.rc-line > span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-minor b { font-weight: 500; }
.rc-sum { border-bottom: none; }
.rc-sum b { font-size: 1.05rem; font-weight: 800; }
.rc-sum > span { font-size: 1.15rem; font-weight: 800; }
.rc-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.rc-act { display: flex; flex-direction: column; align-items: center; gap: 5px; border: none; background: none; color: var(--ink-2); font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; padding: 4px 0; text-align: center; }
.rc-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
@supports not (background: color-mix(in srgb, red 10%, white)) { .rc-ico { background: var(--soft); } }
.rc-return { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--bad); font: inherit; font-weight: 700; cursor: pointer; }

/* --- Окно товара (телефон): главное сверху, редкое под «Ещё» --- */
.form .field-half { min-width: 0; }
@media (max-width: 860px) {
  .modal .form.form-pairs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .modal .form.form-pairs > :not(.field-half) { grid-column: 1 / -1; }
}
.field-suffix { position: relative; display: block; }
.field-suffix input { width: 100%; padding-right: 48px; }
.field-suffix em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .82rem; color: var(--muted); font-weight: 600; pointer-events: none; }
.segment { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); overflow-x: auto; }
.segment button { flex: 1 0 auto; min-width: 46px; min-height: 40px; border: none; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.segment button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 800; }
.form-live { padding: 9px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-ink); font-size: .86rem; }
.form-live b { font-weight: 800; }
.form-more { border-radius: 14px; }
.form-more > summary { cursor: pointer; color: var(--blue); font-weight: 700; padding: 8px 2px; list-style: none; }
.form-more > summary::-webkit-details-marker { display: none; }
.form-more > summary::before { content: "+ "; }
.form-more[open] > summary::before { content: "− "; }
.form-more-body { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.modal-product .photo-field { display: flex; align-items: center; gap: 12px; }
.modal-product .photo-preview { width: 76px; height: 76px; border-radius: 16px; flex: none; }
.modal-product .photo-field .row-actions { flex-wrap: wrap; gap: 6px; }
.modal-product .photo-field .btn { min-height: 38px; padding: 0 12px; font-size: .82rem; }
.photo-empty { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); }
.photo-empty small { font-size: .7rem; }
/* Чек кассы (0.64): степпер «− 1 +», сумма строки справа; на компьютере — как было (сумма между кнопками). */
.line-count, .line-sum { display: none; }
@media (max-width: 1100px), (pointer: coarse) and (max-width: 1700px) {
  .line-qty { gap: 0; border: 1.5px solid var(--line); border-radius: 12px; height: 40px; }
  .line-qty .btn { min-height: 36px; width: 36px; border: none; background: none; box-shadow: none; border-radius: 10px; }
  .line-qty .btn .ico { width: 18px; height: 18px; }
  .line-qty .line-total { display: none; }
  .line-count { display: block; min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
  .line-sum { display: block; min-width: 64px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
  .pay-more .btn .ico { width: 18px; height: 18px; }
}

/* ======================================================================================================
   0.65: клиенты (связь в одно нажатие), поставщики, расходы, смена — по макетам v4/v5.
   ====================================================================================================== */
.warn-text { color: #b45309; }
:root[data-theme="dark"] .warn-text { color: var(--warn); }
.pill-warn { background: var(--amber-soft); color: var(--amber-ink); }
.avatar2 { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; flex: none; }
.avatar2.avatar-big { width: 64px; height: 64px; font-size: 1.6rem; }
.avatar2.avatar-sq { border-radius: 12px; font-size: .8rem; }
.crow-list { display: flex; flex-direction: column; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-1); padding: 2px 10px 2px 12px; }
.crow { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.crow:first-child { border-top: none; }
.crow-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: none; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.crow-main .thin-main b { display: flex; align-items: center; gap: 5px; }
.bday-ico { color: #db2777; width: 15px; height: 15px; }
.crow-call { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.crow-call .ico { width: 20px; height: 20px; stroke-width: 2.1; }
.cc { display: flex; flex-direction: column; gap: 12px; }
.cc-head { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.cc-name { font-size: 1.2rem; }
.cq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cq-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: .74rem; font-weight: 600; }
.cq-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.cq-ico .ico { width: 24px; height: 24px; stroke-width: 2.1; }
.cq-call .cq-ico { background: #12804a; box-shadow: 0 6px 14px -6px #12804a; }
.cq-wa .cq-ico { background: #22a35a; box-shadow: 0 6px 14px -6px #22a35a; }
.cq-tg .cq-ico { background: #229ed9; box-shadow: 0 6px 14px -6px #229ed9; }
.cq-sms .cq-ico { background: #64748b; box-shadow: 0 6px 14px -6px #64748b; }
.cc-addphone { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: none; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.cc-debt { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border-radius: 16px; background: var(--bad-soft); color: var(--bad-ink); }
.cc-debt span { font-size: .8rem; font-weight: 600; }
.cc-debt b { font-size: 1.7rem; letter-spacing: -.02em; color: var(--bad); font-variant-numeric: tabular-nums; }
.cc-debt small { font-size: .8rem; }
.cc-debt-soft { background: var(--amber-soft); color: var(--amber-ink); }
.cc-debt-soft b { color: var(--amber-ink); }
.cc-ok { background: var(--ok-soft); color: var(--ok-ink); }
.cc-ok b { color: var(--ok); font-size: 1.3rem; }
.cc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-two .btn { min-height: 48px; }
.cc-small { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-small > * { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.cc-small .ico { width: 16px; height: 16px; }
.cc-sec { font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: 4px; }
.cc-feed { width: 100%; border-left: none; border-right: none; border-top: none; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hl-split { display: flex; align-items: center; gap: 12px; }
.hl-split > div { flex: 1; min-width: 0; }
.hl-split .hero-value { margin-bottom: 0; font-size: 1.8rem; }
.hl-split .btn { flex: none; min-height: 44px; }
.ex-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--hover-2); margin-top: 2px; }
.ex-bar i { display: block; height: 100%; }
.ex-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .8rem; color: var(--ink-2); }
.ex-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ex-legend i { width: 9px; height: 9px; border-radius: 3px; display: block; }
.ex-ico { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; color: var(--tone); background: var(--soft); }
.ex-ico .ico { width: 20px; height: 20px; }
.ex-hint { margin: 0 4px; font-size: .85rem; }
.sh-sub { font-size: .82rem; margin-top: -6px; }
.hero-light .rc-lines { margin-top: 8px; }
.sh-acts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sh-closed { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sh-closed p { margin: 0; color: var(--muted); }
.sh-lock { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.btn-big .ico { width: 20px; height: 20px; }

/* ======================================================================================================
   0.66: склад — четыре цветные карточки, полоса остатка; ревизия вживую (кольцо, счётчики, разница по товару).
   ====================================================================================================== */
.blue-text { color: var(--blue); font-weight: 700; }
.sa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 900px) { .sa-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sa-card { position: relative; display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; border-radius: 18px; border: none; background: var(--card); box-shadow: var(--shadow-1); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sa-card:active { transform: scale(.97); }
.sa-ico { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--tone); box-shadow: 0 6px 14px -6px var(--tone); }
.sa-ico .ico { width: 26px; height: 26px; stroke-width: 2; }
.sa-card b { font-size: 1rem; }
.sa-card small { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-live { position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .18); animation: live 1.4s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgba(37, 99, 235, .06); } }
.sk-alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--notice-line); background: var(--amber-soft); color: var(--amber-ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.sk-alert span { flex: 1; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border: none; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; width: 100%; cursor: pointer; }
.sk-row:first-child { border-top: none; }
.sk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sk-main b { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-main small { font-size: .76rem; color: var(--muted); }
.sk-bar { display: block; height: 6px; border-radius: 4px; background: var(--hover-2); overflow: hidden; }
.sk-bar i { display: block; height: 100%; border-radius: 4px; }
.bar-ok { background: var(--ok); } .bar-warn { background: var(--amber-2); } .bar-bad { background: var(--bad); }
.sk-main small.warn-hint, .sk-qty.warn-hint { color: #b45309; }
.sk-main small.bad-hint, .sk-qty.bad-hint { color: var(--bad); }
.sk-qty { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pick { display: flex; flex-direction: column; gap: 10px; }
.pick-list { max-height: 55vh; max-height: 55dvh; overflow-y: auto; }
.pick-list .prow { padding: 11px 0; }

.inv-top { display: flex; align-items: center; gap: 16px; }
.inv-ring { width: 112px; height: 112px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--hover-2); }
.inv-ring-in { width: 88px; height: 88px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.inv-ring-in b { font-size: 1.5rem; line-height: 1.1; }
.inv-ring-in small { font-size: .72rem; color: var(--muted); }
.inv-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.inv-legend div { display: flex; align-items: center; gap: 7px; font-size: .82rem; }
.inv-legend i { width: 9px; height: 9px; border-radius: 3px; display: block; flex: none; }
.inv-legend span { flex: 1; color: var(--ink-2); }
.inv-legend b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.inv-row:first-child { border-top: none; }
.inv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inv-main b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-main small { font-size: .75rem; color: var(--muted); }
.inv-step { display: flex; align-items: center; height: 40px; border: 1.5px solid var(--line); border-radius: 12px; flex: none; }
.inv-done .inv-step { border-color: var(--ok-line); }
.inv-step button { width: 32px; height: 36px; border: none; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.inv-step button .ico { width: 16px; height: 16px; }
.inv-input { width: 52px; border: none !important; background: none !important; text-align: center; font: inherit; font-weight: 700; padding: 0 !important; min-height: 0 !important; box-shadow: none !important; }
.inv-diff-box { width: 44px; flex: none; display: flex; justify-content: flex-end; }
.inv-diff { display: grid; place-items: center; min-width: 38px; height: 26px; padding: 0 5px; border-radius: 9px; font-style: normal; font-size: .76rem; font-weight: 800; background: var(--soft); }
.inv-short { background: var(--bad-soft); color: var(--bad-ink); }
.inv-over { background: var(--info); color: var(--info-ink); }
.inv-same { background: var(--ok-soft); color: var(--ok); }
.inv-bottom { position: sticky; bottom: 8px; z-index: 5; margin-top: 4px; }
.inv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--navy); color: #fff; box-shadow: 0 10px 24px rgba(15, 23, 42, .28); }
.inv-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inv-bar small { font-size: .72rem; opacity: .75; }
.inv-bar .btn { flex: none; min-height: 44px; }
.inv-hero { text-align: center; }
.inv-hero .hero-value { margin: 4px 0; }
.inv-sec { display: flex; justify-content: space-between; }
.inv-sum { display: flex; flex-direction: column; gap: 10px; }
.page-touch { display: flex; flex-direction: column; gap: 12px; }
.page-touch > .page-head { margin-bottom: 0; }
.page-touch .toolbar, .page-touch .tabs { margin-bottom: 0; }
.page-touch .today-sec { margin: 6px 2px -4px; display: flex; align-items: center; justify-content: space-between; }
.page-touch .today-sec h2 { margin: 0; font-size: 1.05rem; }
.cc-two > :only-child { grid-column: 1 / -1; }

/* ======================================================================================================
   0.65: инструменты товаров — категории карточками, штрихкоды, прайс-лист, загрузка списком; акции карточками.
   ====================================================================================================== */
.cat-body { display: flex; flex-direction: column; gap: 10px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cat-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 14px 14px 12px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--tone, var(--line-strong)); }
.cat-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: var(--tone, transparent); opacity: .12; }
.cat-card b { font-size: 1rem; }
.cat-card small { font-size: .78rem; color: var(--muted); }
.cat-card span { font-size: .82rem; font-weight: 700; margin-top: 6px; }
.cat-none { background: var(--soft); border-style: dashed; }
.cat-none::before, .cat-none::after, .cat-add::before, .cat-add::after { display: none; }
.cat-add { flex-direction: row; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--notice-line); background: var(--amber-soft); color: var(--amber-ink); min-height: 92px; }
.link-text { color: var(--blue); }
.cat-hint { margin: 0; font-size: .84rem; }

.bc-body { display: flex; flex-direction: column; gap: 12px; }
.bc-how { display: flex; flex-direction: column; gap: 9px; }
.bc-art { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 4px; }
.bc-bars { display: flex; height: 54px; padding: 0 6px; background: #fff; border-radius: 4px; }
.bc-bars i { display: block; background: #111827; }
.bc-bars i.gap { background: transparent; }
.bc-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; letter-spacing: .14em; }
.bc-step { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; line-height: 1.4; color: var(--ink-2); }
.bc-step em { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .75rem; font-weight: 800; background: var(--info); color: var(--info-ink); }
.bc-off { margin: 0; font-size: .82rem; color: var(--warn); }
.bc-warn { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--amber-soft); border: 1.5px solid var(--notice-line); }
.bc-warn small { color: var(--muted); }
.bc-warn .btn { margin-top: 6px; }
.bc-ok { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--ok-soft); color: var(--ok-ink); font-weight: 600; }
.plu { flex: none; min-width: 46px; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; padding: 5px 8px; border-radius: 10px; background: var(--ok-soft); color: var(--ok-ink); }
.plu-none { background: var(--bad-soft); color: var(--bad-ink); font-family: inherit; font-size: .78rem; }

.pl-body { display: flex; flex-direction: column; gap: 12px; }
.pl-paper { background: #fff; color: #111827; border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 26px -12px rgba(15, 23, 42, .3), 0 0 0 1px #e6e9ef; font-size: .82rem; max-height: 46vh; max-height: 46dvh; overflow-y: auto; }
.pl-head { display: flex; flex-direction: column; align-items: center; border-bottom: 2px solid #111827; padding-bottom: 8px; margin-bottom: 6px; text-align: center; }
.pl-head b { font-size: 1rem; }
.pl-head small { font-size: .72rem; color: #6b7280; }
.pl-group { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #c77700; margin: 8px 0 2px; }
.pl-row { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; }
.pl-row i { flex: 1; border-bottom: 1.5px dotted #cbd3dd; }
.pl-row b { white-space: nowrap; }
.pl-more { margin-top: 6px; color: #6b7280; text-align: center; }
.pl-opts { display: flex; flex-direction: column; gap: 10px; }
.pl-opt { display: flex; flex-direction: column; gap: 6px; }
.pl-opt > span { font-size: .8rem; font-weight: 700; color: var(--muted); }

.ts-body { display: flex; flex-direction: column; gap: 12px; }
.ts-list { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 14px; }
.ts-step { display: flex; gap: 12px; padding: 12px 0; }
.ts-step + .ts-step { border-top: 1px solid var(--line); }
.ts-step > em { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: var(--soft); color: var(--muted); }
.ts-step > em .ico { width: 16px; height: 16px; }
.ts-done > em { background: var(--ok); color: #fff; }
.ts-step > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ts-step small { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.ts-btn { min-height: 38px; margin-top: 4px; }
.xl { width: 100%; border: 1px solid #cfe0d3; border-radius: 8px; overflow: hidden; font-size: .74rem; margin: 2px 0; background: #fff; color: #111827; }
.xl > div { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.xl span { padding: 4px 6px; border-right: 1px solid #e3e8ef; border-top: 1px solid #e3e8ef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl .xl-h span { background: #e8f3ea; font-weight: 700; border-top: none; color: #1d6b38; }
.ts-safe { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--ink-2); padding: 10px 12px; border-radius: 14px; background: var(--ok-soft); }
.ts-safe .ico { color: var(--ok); width: 18px; height: 18px; }

.pm-list { display: flex; flex-direction: column; gap: 8px; }
.pm-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.pm-card.pm-off { opacity: .6; }
.pm-badge { width: 62px; height: 62px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; background: var(--tone, var(--t-rose)); box-shadow: 0 8px 16px -8px var(--tone, var(--t-rose)); }
.pm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; border: none; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; padding: 0; }
.pm-main b { font-size: .98rem; }
.pm-main small { font-size: .78rem; color: var(--muted); }
.switch { width: 46px; height: 28px; flex: none; border-radius: 14px; border: none; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch.on { background: var(--ok); }
.switch.on::after { left: 22px; }
.pm-how { padding: 12px 14px; border-radius: 16px; background: var(--soft); font-size: .84rem; line-height: 1.5; color: var(--ink-2); }
.pm-how b { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }

/* Справка (0.65): поиск «что вы хотите сделать», плитки главных тем, темы раскрываются на месте. */
.help-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (min-width: 900px) { .help-tiles { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
.help-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border-radius: 16px; border: none; background: var(--card); box-shadow: var(--shadow-1); color: var(--ink); font: inherit; cursor: pointer; }
.help-tile b { font-size: .8rem; text-align: center; }
.help-item summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; }
.help-item summary::-webkit-details-marker { display: none; }
.help-chev { color: var(--muted); transition: transform .15s; flex: none; }
.help-item[open] .help-chev { transform: rotate(180deg); }
.help-none { text-align: center; padding: 20px; }

/* Первый запуск (0.65, макет v4): один вопрос на экран, полоски прогресса, крупный заголовок, большие кнопки. */
.modal.ob > h2 { font-size: .78rem; font-weight: 600; color: var(--muted); }
.ob-body { display: flex; flex-direction: column; gap: 12px; }
.ob-dots { display: flex; gap: 6px; justify-content: center; }
.ob-dots i { width: 28px; height: 5px; border-radius: 3px; background: var(--line); display: block; }
.ob-dots i.on { background: var(--amber-2); }
.ob-dots i.done { background: #f6c77a; }
.ob-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 4px 0; }
.ob-hero h3 { margin: 0; font-size: 1.45rem; letter-spacing: -.02em; }
.ob-hero p { margin: 0; color: var(--muted); line-height: 1.45; }
.ob-pic { width: 80px; height: 80px; border-radius: 24px; display: grid; place-items: center; overflow: hidden; background: var(--amber-soft); color: var(--amber-2); }
.ob-pic img { width: 80px; height: 80px; }
.ob-pic .ico { width: 40px; height: 40px; }
.ob-amber { border-radius: 50%; }
.ob-green { border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.ob-choices { display: flex; flex-direction: column; gap: 10px; }
.ob-choice { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 1.05rem; cursor: pointer; }
.ob-choice.on { border-color: var(--amber-2); background: var(--amber-soft); }
.ob-choice .ico { color: var(--amber-2); }
.ob-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ob-type { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ob-type.on { border-color: var(--amber-2); background: var(--amber-soft); }
.ob-type b { font-size: .84rem; line-height: 1.25; }
.ob-type-ico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); }
.ob-type.on .ob-type-ico { background: var(--amber-2); color: #fff; }
.ob-type-ico .ico { width: 20px; height: 20px; }
.ob-checks { list-style: none; margin: 0; padding: 4px 14px; border-radius: 16px; border: 1px solid var(--line); }
.ob-checks li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-weight: 600; }
.ob-checks li + li { border-top: 1px solid var(--line); }
.ob-checks li > span:first-child { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.ob-checks .ico { width: 15px; height: 15px; }
.ob-small { font-size: .82rem; margin: 0; }
.modal.ob .device-code { text-align: center; }
.ob-options { display: flex; flex-direction: column; gap: 10px; }
.ob-option { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ob-option > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ob-option small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.ob-list { margin: 0; }

/* 0.66: компьютер в новом виде — плитки кассы не сжимаются по высоте (строки сетки — по содержимому). */
.tiles.tiles-art { grid-auto-rows: max-content; align-content: start; }
.tiles-art .tile { overflow: visible; }
.tiles-art .tile-photo { overflow: hidden; }

/* ======================================================================================================
   0.67: по отзыву с устройств.
   ====================================================================================================== */
/* Количество в чеке — нажатием на число (откроется ввод количества и цены). */
.line-count { border: none; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline dotted var(--line-strong); text-underline-offset: 4px; }
/* Смена: сколько идёт — живой таймер. */
.sh-timer { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ok-ink); background: var(--ok-soft); padding: 4px 10px; border-radius: 10px; font-size: .88rem; }
.sh-timer .ico { width: 16px; height: 16px; }

/* ======================================================================================================
   0.68: «Главная» A2 (светлая и тёмная), двухтоновые значки, меню-«таблетка», меню с подписями на компьютере.
   ====================================================================================================== */
.ico .ico-fill { fill: currentColor; fill-opacity: .2; stroke: none; }
:root {
  --a2-top: linear-gradient(165deg, #eef3ff 0%, #dfe8fb 100%); --a2-top-ink: #0f1d3a; --a2-top-mut: #5b6b8c;
  --a2-pill: rgba(255, 255, 255, .8); --a2-pill-on: #1b2a4c; --a2-pill-on-ink: #fff; --a2-mini: rgba(255, 255, 255, .85);
  --a2-line: #2f5fd0; --a2-shadow: 0 8px 22px rgba(47, 95, 208, .12); --a2-ok: #12804a;
}
:root[data-theme="dark"] {
  --a2-top: linear-gradient(165deg, #1b2a4c 0%, #0b1426 100%); --a2-top-ink: #fff; --a2-top-mut: rgba(255, 255, 255, .62);
  --a2-pill: rgba(255, 255, 255, .08); --a2-pill-on: #fff; --a2-pill-on-ink: #0b1426; --a2-mini: rgba(255, 255, 255, .07);
  --a2-line: #f5a524; --a2-shadow: 0 10px 30px rgba(0, 0, 0, .35); --a2-ok: #7ee2ad;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --a2-top: linear-gradient(165deg, #1b2a4c 0%, #0b1426 100%); --a2-top-ink: #fff; --a2-top-mut: rgba(255, 255, 255, .62);
    --a2-pill: rgba(255, 255, 255, .08); --a2-pill-on: #fff; --a2-pill-on-ink: #0b1426; --a2-mini: rgba(255, 255, 255, .07);
    --a2-line: #f5a524; --a2-shadow: 0 10px 30px rgba(0, 0, 0, .35); --a2-ok: #7ee2ad;
  }
}
.a2 { gap: 12px; }
.page-today .a2-top { margin: -18px -14px 0; }
.a2-top { background: var(--a2-top); color: var(--a2-top-ink); padding: 16px 16px 18px; border-radius: 0 0 28px 28px; box-shadow: var(--a2-shadow); display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 641px) { .page-today .a2-top { margin: 0; border-radius: 28px; } }
.a2-head { display: flex; align-items: center; gap: 12px; }
.a2-head .th-hello { color: var(--a2-top-mut); }
.a2-head .th-hello::first-letter { text-transform: uppercase; }
.a2-head .th-shop { color: var(--a2-top-ink); }
.a2-head .bell-head { width: 42px; height: 42px; border-radius: 14px; background: var(--a2-mini); color: var(--a2-top-ink); border: none; box-shadow: none; }
.a2-pills { display: flex; gap: 6px; margin: 10px 0 6px; overflow-x: auto; scrollbar-width: none; }
.a2-pills .chip { background: var(--a2-pill); color: var(--a2-top-ink); box-shadow: none; height: 32px; padding: 0 13px; font-size: .82rem; }
.a2-pills .chip.on { background: var(--a2-pill-on); color: var(--a2-pill-on-ink); }
.a2-label { font-size: .8rem; color: var(--a2-top-mut); font-weight: 600; margin-top: 4px; }
.a2-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.a2 .a2-row .hero-value { font-size: 2.3rem; margin: 0; color: var(--a2-top-ink); }
.a2-cur { color: var(--a2-top-mut); font-weight: 600; }
.a2-change { font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 8px; background: rgba(18, 128, 74, .14); color: var(--a2-ok); }
.a2-change.down { background: rgba(179, 38, 30, .14); color: #e5534b; }
.a2-chart { width: 100%; height: 56px; display: block; margin: 6px 0 8px; overflow: visible; }
.a2-area { fill: var(--a2-line); fill-opacity: .18; }
.a2-line { fill: none; stroke: var(--a2-line); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.a2-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.a2-mini { background: var(--a2-mini); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.a2-mini b { font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--a2-top-ink); }
.a2-mini b.a2-ok { color: var(--a2-ok); }
.a2-mini span { font-size: .7rem; color: var(--a2-top-mut); }
.a2-acts.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--card); border-radius: 22px; padding: 14px 6px 10px; box-shadow: var(--shadow-1); }
.a2-acts .quick-btn { background: none; border: none; box-shadow: none; min-height: 0; padding: 0; gap: 6px; font-size: .76rem; font-weight: 700; color: var(--ink-2); }
.a2-ico { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; color: var(--tone); background: var(--tone-soft); }
.a2-ico .ico { width: 27px; height: 27px; stroke-width: 2.1; }
.a2-amber { --tone: #e8930c; --tone-soft: #fff1da; } .a2-green { --tone: #12804a; --tone-soft: #e2f4ea; }
.a2-red { --tone: #c0352b; --tone-soft: #fde7e4; } .a2-blue { --tone: #2563eb; --tone-soft: #e6efff; }
:root[data-theme="dark"] .a2-amber, :root[data-theme="dark"] .a2-green, :root[data-theme="dark"] .a2-red, :root[data-theme="dark"] .a2-blue { --tone-soft: color-mix(in srgb, var(--tone) 18%, var(--card)); }
:root[data-theme="dark"] .a2-amber { --tone: #f5a524; } :root[data-theme="dark"] .a2-green { --tone: #3ccf86; } :root[data-theme="dark"] .a2-red { --tone: #ff7b6e; } :root[data-theme="dark"] .a2-blue { --tone: #6f9bff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .a2-amber { --tone: #f5a524; --tone-soft: rgba(245, 165, 36, .16); } :root:not([data-theme="light"]) .a2-green { --tone: #3ccf86; --tone-soft: rgba(60, 207, 134, .16); }
  :root:not([data-theme="light"]) .a2-red { --tone: #ff7b6e; --tone-soft: rgba(255, 123, 110, .16); } :root:not([data-theme="light"]) .a2-blue { --tone: #6f9bff; --tone-soft: rgba(111, 155, 255, .16); }
}
.a2-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px -4px; }
.a2-sec h2 { margin: 0; font-size: 1.02rem; }
.a2-alerts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
.a2-alerts::-webkit-scrollbar { display: none; }
.a2-alert { flex: 0 0 42%; min-width: 140px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 16px; text-decoration: none; color: var(--ink); border: 1px solid; }
.a2-alert .ico { width: 22px; height: 22px; margin-bottom: 4px; stroke-width: 2.1; }
.a2-alert b { font-size: .84rem; line-height: 1.25; }
.a2-alert small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a2-alert.a2-bad { background: var(--bad-soft); border-color: var(--bad-line); } .a2-alert.a2-bad .ico { color: var(--bad); }
.a2-alert.a2-warn { background: var(--amber-soft); border-color: var(--notice-line); } .a2-alert.a2-warn .ico { color: var(--amber-2); }
.a2-alert.a2-info { background: var(--info); border-color: var(--info-line); } .a2-alert.a2-info .ico { color: var(--blue); }
.a2-list { background: var(--card); border-radius: 18px; padding: 2px 12px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.a2-sale { display: flex; align-items: center; gap: 10px; padding: 10px 0; border: none; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; width: 100%; cursor: pointer; }
.a2-sale:first-child { border-top: none; }
.a2-ri { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--tone); background: var(--tone-soft); }
.a2-ri .ico { width: 20px; height: 20px; stroke-width: 2.1; }

/* Меню-«таблетка» на телефоне: выбранный раздел — тёмная капсула, «Касса» — оранжевый круг в ряду. */
@media (max-width: 640px) {
  .nav-items { min-height: 64px; border-radius: 24px; }
  .nav-item .ico, .nav-more .ico { width: 23px; height: 23px; padding: 4px 13px; stroke-width: 2.1; }
  .nav-item.active .ico, .nav-more.active .ico { background: var(--ink); color: var(--card); }
  .nav-item.active .ico .ico-fill { fill-opacity: .35; }
  .nav-item, .nav-more { color: var(--muted); }
  .nav-item.active, .nav-more.active { color: var(--ink); }
  .nav-item.nav-fab { padding: 0; }
  .nav-item.nav-fab > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fab-circle { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 6px 14px rgba(232, 147, 12, .45); }
  .fab-circle .ico { width: 25px; height: 25px; }
  .nav-item.nav-fab.active .fab-circle { box-shadow: 0 0 0 3px var(--amber-soft), 0 6px 14px rgba(232, 147, 12, .45); }
}

/* Компьютер в новом виде: меню слева с подписями и группами (как классическое), содержимое — новое. */
@media (min-width: 1101px) and (pointer: fine) {
  :root:not(.ui-classic) .app { grid-template-columns: 244px 1fr; }
  :root:not(.ui-classic) .nav { padding: 18px 12px 14px; gap: 18px; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%); }
  :root:not(.ui-classic) .brand { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 2px 8px 14px; }
  :root:not(.ui-classic) .brand > div { display: block; }
  :root:not(.ui-classic) .brand img { width: 40px; height: 40px; border-radius: 12px; }
  :root:not(.ui-classic) .nav-group, :root:not(.ui-classic) .nav-foot { display: block; }
  :root:not(.ui-classic) .nav-norail { display: flex !important; }
  :root:not(.ui-classic) .nav-more { display: none !important; }
  :root:not(.ui-classic) .nav-items { flex: none; gap: 2px; }
  :root:not(.ui-classic) .nav-item { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; font-size: .95rem; text-align: left; border-radius: 12px; color: #cdd6ea; box-shadow: none; background: none; }
  :root:not(.ui-classic) .nav-item span { max-width: none; overflow: visible; }
  :root:not(.ui-classic) .nav-item .ico { width: 22px; height: 22px; padding: 0; background: none; }
  :root:not(.ui-classic) .nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  :root:not(.ui-classic) .nav-item.active { background: rgba(245, 165, 36, .16); color: #fff; box-shadow: none; }
  :root:not(.ui-classic) .nav-item.active .ico { color: var(--amber); }
  :root:not(.ui-classic) .nav-item.active::before { display: block; left: -12px; top: 10px; bottom: 10px; width: 4px; height: auto; border-radius: 0 4px 4px 0; }
  :root:not(.ui-classic) .nav-user { flex-direction: row; padding: 8px 10px; text-align: left; }
  :root:not(.ui-classic) .nav-user .btn span { display: inline; }
}

/* «Справка» на широком экране — темы в две колонки. */
@media (min-width: 1101px) {
  .help { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
/* Фасовки в окне товара на телефоне — в две строки, поля не сжимаются. */
@media (max-width: 640px) {
  .pack-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "name name del" "size price price" "code code code"; }
  .pack-row > :nth-child(1) { grid-area: name; } .pack-row > :nth-child(2) { grid-area: size; } .pack-row > :nth-child(3) { grid-area: price; }
  .pack-row > :nth-child(4) { grid-area: code; } .pack-row > :nth-child(5) { grid-area: del; align-self: end; }
}
@media (min-width: 641px) { .a2-alert { flex: 1 1 0; min-width: 180px; } .a2-alerts { margin: 0; padding: 0 0 2px; } }

/* ======================================================================================================
   0.69: приход и списание списком — экран на телефоне, большое окно на планшете и компьютере.
   ====================================================================================================== */
.bs-screen { width: min(1120px, 100%); height: min(880px, calc(100dvh - 32px)); max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.bs-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.bs-head h2 { margin: 0; font-size: 1.15rem; }
.bs-title { display: flex; flex-direction: column; min-width: 0; }
.bs-sub { font-size: .8rem; color: var(--muted); }
.bs-back { width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--soft); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.bs-body { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.bs-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.bs-foot .bs-go { margin-left: auto; min-height: 48px; padding: 0 22px; font-weight: 800; }
.bs-gap { flex: 1; }
.bs-step { display: flex; flex-direction: column; gap: 10px; }
.bs-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.bs-count { font-size: .84rem; }
.bs-pick { display: flex; flex-direction: column; gap: 4px; }
.bs-prow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bs-prow.on { border-color: var(--amber-2); background: var(--amber-soft); }
.bs-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bs-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-main small { color: var(--muted); font-size: .8rem; }
.bs-main .tag { align-self: flex-start; margin-top: 3px; }
.bs-check { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); flex: none; }
.bs-prow.on .bs-check { background: var(--amber-2); color: #fff; }
.bs-check .ico { width: 18px; height: 18px; }
.bs-empty { text-align: center; padding: 24px 0; }
.bs-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bs-top label, .bs-fields label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 600; min-width: 0; }
.bs-in, .bs-reason { width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); font: inherit; font-size: 1rem; }
.bs-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; border-radius: 14px; background: var(--soft); font-size: .88rem; }
.bs-lines { display: flex; flex-direction: column; gap: 8px; }
.bs-line { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.bs-line-head { display: flex; align-items: flex-start; gap: 10px; }
.bs-del { width: 38px; height: 38px; border-radius: 12px; border: none; background: var(--bad-soft); color: var(--bad); display: grid; place-items: center; cursor: pointer; flex: none; }
.bs-del .ico { width: 18px; height: 18px; }
.bs-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.tag.warn { background: var(--amber-soft); color: var(--amber-2); }
.bs-label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.bs-reasons { flex-wrap: wrap; }
.bs-wo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bs-wo-row .qty-stepper { display: inline-flex; align-items: center; gap: 4px; }
.bs-wo-row .step-btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.bs-qty { width: 76px; text-align: center; font-weight: 800; }
.bs-wo-row .bs-reason { width: auto; flex: 1; min-width: 140px; }
.bs-loss { margin-left: auto; font-variant-numeric: tabular-nums; }
.bs-row2 { display: flex; gap: 8px; }
.bs-row2 .btn { flex: 1; }
.bs-photo { max-width: 220px; border-radius: 14px; border: 1px solid var(--line); }
.bs-sum { display: flex; flex-direction: column; }
.bs-sum b { font-size: 1.15rem; }
@media (min-width: 900px) {
  .bs-line:not(.bs-wo) { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr); align-items: center; }
}
/* Телефон: на весь экран, как отдельная страница. */
@media (max-width: 640px) {
  .overlay.bs-overlay { padding: 0; align-items: stretch; }
  .bs-screen { width: 100%; height: 100dvh; border-radius: 0; animation: none; }
  .bs-head, .bs-body { padding-left: 14px; padding-right: 14px; }
  .bs-foot { padding-left: 14px; padding-right: 14px; flex-wrap: wrap; }
  .bs-top { grid-template-columns: 1fr 1fr; }
  .bs-top label:first-child { grid-column: 1 / -1; }
  .bs-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bs-foot .btn:not(.bs-go) { flex: 1; }
  .bs-foot .bs-go { flex: 1 1 100%; order: 3; }
  .bs-foot .bs-gap { display: none; }
}
.audit-photo { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--ink); font: inherit; font-size: .78rem; cursor: pointer; }
.audit-photo-big { width: 100%; border-radius: 12px; }

/* 0.69: ценники, штрихкоды и прайс-лист — выбор товаров и живой предпросмотр. */
.pt-tabs { display: none; }
.pt-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; min-height: 0; }
.pt-pick { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .85rem; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .82rem; }
.pt-list { display: flex; flex-direction: column; gap: 4px; }
.pt-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); }
.pt-row.on { border-color: var(--amber-2); background: var(--amber-soft); }
.pt-tick { width: 36px; height: 36px; border-radius: 50%; border: none; display: grid; place-items: center; background: var(--soft); color: var(--muted); cursor: pointer; flex: none; }
.pt-row.on .pt-tick { background: var(--amber-2); color: #fff; }
.pt-tick .ico { width: 18px; height: 18px; }
.pt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; border: none; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; padding: 4px 0; }
.pt-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-main small { color: var(--muted); font-size: .78rem; }
.pt-copies { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.pt-copies button { width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.pt-copies b { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.pt-empty, .pt-note { margin: 4px 0; }
.pt-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; min-width: 0; }
.pt-opts { display: flex; flex-direction: column; gap: 8px; }
.pt-opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); font-weight: 600; }
.pt-check { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.pt-check input { width: 20px; height: 20px; }
.pt-paper { aspect-ratio: 210 / 297; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 26px rgba(17, 24, 39, .12); padding: 3.5%; overflow: hidden; border: 1px solid var(--line); }
.pt-canvas { width: 100%; height: auto; display: block; }
.pt-blank { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #9aa3b5; }
.pt-blank .ico { width: 40px; height: 40px; }
.pt-caption { font-size: .84rem; text-align: center; }
.pt-pl { aspect-ratio: auto; min-height: 320px; color: #111; }
@media (max-width: 899px) {
  .pt-tabs { display: block; }
  .pt-tabs .segment { width: 100%; }
  .pt-tabs .segment button { flex: 1; }
  .pt-panes { grid-template-columns: 1fr; }
  .pt-panes[data-tab="pick"] > :last-child, .pt-panes[data-tab="preview"] > :first-child { display: none; }
  .pt-side { position: static; }
}

/* 0.69: «Отчёты» — прежний вид; новые блоки «Показатели периода», «Динамика», «Итоги периода», «По дням». */
.rt-kpis8 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rt-kpi { background: var(--soft); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt-kpi > span { font-size: .76rem; color: var(--muted); font-weight: 600; }
.rt-kpi > b { font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-kpi > em { font-style: normal; font-size: .74rem; font-weight: 700; }
.rt-kpi > small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.rt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-line.c-3, .chart-point.c-3, .chart-dot.c-3 { stroke: var(--c3); }
.donut-arc.c-bad { stroke: var(--bad); }
.rt-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; font-size: .88rem; margin-bottom: 6px; }
.rt-kv span { color: var(--muted); }
.rt-kv b { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-table-wrap { max-height: 380px; overflow: auto; }
.rt-table { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
.rt-table th { text-align: right; color: var(--muted); font-weight: 600; font-size: .74rem; padding: 6px 8px; position: sticky; top: 0; background: var(--card); }
.rt-table td { text-align: right; padding: 8px; border-top: 1px solid var(--line); }
.rt-table th:first-child, .rt-table td:first-child { text-align: left; }
.rt-table tfoot td { font-weight: 800; border-top: 2px solid var(--line-strong); }
@media (min-width: 641px) { .rt-kpis8 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* 0.69: окна на телефоне — короткие выборы листом снизу (с «ручкой»), большие формы — отдельным экраном со стрелкой. */
.modal-back { display: none; }
@media (max-width: 640px) {
  .modal:not(.modal-wide):not(.modal-form):not(.bs-screen)::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: -8px auto 12px; flex: none; }
  .modal.modal-wide, .modal.modal-form { max-height: none; height: 100dvh; border-radius: 0; padding-top: calc(12px + env(safe-area-inset-top)); animation: screen-in .22s var(--ease); }
  .modal.modal-wide > .modal-back, .modal.modal-form > .modal-back { display: grid; place-items: center; position: absolute; left: 12px; top: calc(10px + env(safe-area-inset-top)); width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--soft); color: var(--ink); cursor: pointer; }
  .modal.modal-wide > h2, .modal.modal-form > h2 { padding-left: 50px; min-height: 40px; display: flex; align-items: center; margin-bottom: 10px; }
  .modal.modal-wide, .modal.modal-form { position: relative; }
  .modal.modal-wide .modal-actions, .modal.modal-form .modal-actions { margin-top: auto; padding-top: 10px; }
}
@keyframes screen-in { from { transform: translateX(24px); opacity: .4; } }

/* 0.70: «Отчёты» по утверждённому рисунку — карточка прибыли, «Куда уходит выручка», показатели, динамика, итоги. */
.rp { display: flex; flex-direction: column; gap: 12px; }
.rp .rt-head { display: flex; align-items: center; gap: 10px; }
.rp .rt-head h1 { flex: 1; }
.rp-dl { width: 42px; height: 42px; border-radius: 13px; border: none; background: var(--card); color: var(--ink-2); display: grid; place-items: center; box-shadow: var(--shadow-1); cursor: pointer; flex: none; }
.rp-controls { display: flex; flex-direction: column; gap: 10px; }
.rp .rt-range { justify-content: flex-start; }
.rp-open { margin-left: auto; font-size: .74rem; font-weight: 700; color: var(--amber-2); background: var(--amber-soft); padding: 3px 9px; border-radius: 8px; }
.rp-grid { display: flex; flex-direction: column; gap: 12px; }
.rp-side, .rp-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rp-card { background: var(--card); border-radius: 20px; padding: 14px 15px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-head > b { font-size: 1rem; white-space: nowrap; }
.rp-head > small { color: var(--muted); font-size: .76rem; }
.rp-hero { background: linear-gradient(160deg, var(--card) 0%, #f2f6ff 100%); border: 1px solid #e1e8f7; gap: 8px; }
:root[data-theme="dark"] .rp-hero { background: linear-gradient(160deg, #1b2a4c 0%, #101b33 100%); border-color: #24365c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rp-hero { background: linear-gradient(160deg, #1b2a4c 0%, #101b33 100%); border-color: #24365c; } }
.rp-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-chip { font-size: .72rem; font-weight: 800; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.rp-chip.ok { background: var(--ok-soft); color: var(--ok-ink, var(--ok)); } .rp-chip.bad { background: var(--bad-soft); color: var(--bad); }
.rp .rt-big { margin: 0; font-size: 2.2rem; }
.rp .rt-chart { margin-top: 2px; }
.rp .rt-bars { height: 90px; gap: 3px; }
.rp .rt-col { background: #9bb6ee; opacity: 1; border-radius: 4px 4px 2px 2px; }
.rp .rt-col.today { background: #2f5fd0; }
.rp .rt-col.neg { background: var(--bad); opacity: .65; }
:root[data-theme="dark"] .rp .rt-col { background: #3c5a9a; } :root[data-theme="dark"] .rp .rt-col.today { background: #f5a524; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rp .rt-col { background: #3c5a9a; } :root:not([data-theme="light"]) .rp .rt-col.today { background: #f5a524; } }
.rp-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rp-three > div { background: var(--soft); border-radius: 12px; padding: 8px 10px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
:root[data-theme="dark"] .rp-three > div { background: rgba(255, 255, 255, .06); }
.rp-three b { width: 100%; font-size: 1.02rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-three span { font-size: .72rem; color: var(--muted); }
.rp-three em { font-style: normal; font-size: .7rem; font-weight: 700; }
.rp-stack { display: flex; height: 12px; border-radius: 7px; overflow: hidden; gap: 2px; }
.rp-stack i { display: block; min-width: 3px; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--ink-2); }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rp-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.rp-ins .rt-ins { font-size: .85rem; }
.rp-kpis .rt-kpi { background: var(--card); box-shadow: var(--shadow-1); border-radius: 16px; }
.rp-kpis .rt-kpi.lead { background: linear-gradient(160deg, #1b2a4c, #0d1526); color: #fff; }
.rp-kpis .rt-kpi.lead > span { color: rgba(255, 255, 255, .7); }
.rp-kpis .rt-kpi.lead > em.ok-text { color: #7ee2ad; } .rp-kpis .rt-kpi.lead > em.bad-text { color: #ff9b91; }
.rp-dyn .rt-seg { margin: 0; }
.rp-pills { display: flex; gap: 4px; }
.rp-pills button { border: none; font: inherit; font-size: .76rem; font-weight: 700; padding: 5px 9px; border-radius: 9px; background: var(--soft); color: var(--muted); cursor: pointer; white-space: nowrap; }
.rp-pills button.on { background: var(--ink); color: var(--card); }
.rp-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rp-top li { display: flex; align-items: center; gap: 10px; }
.rp-top em { width: 24px; height: 24px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-2); font-style: normal; font-weight: 800; font-size: .78rem; display: grid; place-items: center; flex: none; }
.rp-top li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-top li > div b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-top strong { font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-more { margin: 0; }
.rp-days { display: none; }
@media (min-width: 641px) {
  .rp-days { display: flex; }
  .rp-phone-only { display: none; }
  .rp .rt-head h1 { flex: 0 0 auto; margin-right: auto; }
  .rp-controls { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .rp-controls .rt-period { width: 380px; }
  .rp-controls .rt-range { flex: 1; }
  .rp-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "hero side" "kpis kpis" "dyn dyn" "best right" "more more"; align-items: start; }
  .rp-grid > .rp-hero { grid-area: hero; } .rp-grid > .rp-side { grid-area: side; } .rp-grid > .rp-kpis { grid-area: kpis; }
  .rp-grid > .rp-dyn { grid-area: dyn; } .rp-grid > .rp-right { grid-area: right; } .rp-grid > .rp-best { grid-area: best; } .rp-grid > .rp-more { grid-area: more; }
  .rp-kpis .rt-kpis8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rp-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; align-items: start; }
  .rp-more .rt-blocks-title { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .rp-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "hero kpis side" "dyn dyn right" "best best right" "more more more"; }
  .rp-grid > .rp-right { align-self: stretch; }
  .rp-kpis .rt-kpis8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.rp-days .rt-table td, .rp-days .rt-table th { white-space: nowrap; padding: 6px 5px; }
.rp-days .rt-table { font-size: .8rem; }
.rp-dyn .chart { min-height: 220px; } /* график рисуется после вставки — место под него заранее, страница не прыгает */

/* 0.70: выбор направления бизнеса — карточки с картинкой, группы, поиск, «Другой» со своим названием. */
.bp-intro h3 { margin: 4px 0 2px; font-size: 1.4rem; letter-spacing: -.02em; }
.bp-intro p { margin: 0; }
.bp-groups { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.bp-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.bp-card, .bp-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bp-card.on, .bp-pick.on { border-color: var(--blue); background: var(--info); }
.bp-emoji { width: 50px; height: 50px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; font-size: 1.7rem; line-height: 1; flex: none; }
.bp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-text b { font-size: 1rem; }
.bp-text small { color: var(--muted); font-size: .84rem; }
.bp-text em { font-style: normal; color: var(--blue); font-weight: 700; font-size: .82rem; }
.bp-radio { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.bp-card.on .bp-radio { background: var(--blue); border-color: var(--blue); color: #fff; }
.bp-radio .ico { width: 15px; height: 15px; stroke-width: 3; }
.bp-other .bp-emoji { color: var(--blue); background: var(--info); font-weight: 700; }
.bp-card-wrap { display: flex; flex-direction: column; gap: 10px; padding: 0 0 12px; border: 1.5px solid var(--blue); border-radius: 18px; background: var(--info); }
.bp-card-wrap .bp-card { border: none; background: none; }
.bp-custom { margin: 0 12px; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--field); color: var(--ink); font: inherit; }
.bp-custom.bp-need { border-color: var(--bad); }
.bp-pick { margin-top: 4px; }
.bp-pick > .ico { color: var(--muted); }
.badge.badge-blue { background: var(--info); color: var(--blue); }
@media (min-width: 900px) { .bp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .bp-card-wrap { grid-column: 1 / -1; } }
.bp-groups, .bs-chips, .bs-body > .search, .bs-body > .segment { flex: none; } /* в колонке с прокруткой ряд кнопок не сжимается до нуля */

/* 0.70: первый запуск на телефоне — окно по центру, а не листом снизу. */
@media (max-width: 640px) {
  .overlay.ob-overlay { align-items: center; padding: 14px; }
  .modal.ob { width: 100%; max-height: calc(100dvh - 28px); border-radius: 26px; padding: 20px 18px 18px; animation: pop .22s var(--ease); }
  .modal.ob::before { display: none !important; }
}

/* 0.70: вид товаров в кассе — плитки с фото, крупные, компактные, списком. */
.pos-view-btn { flex: none; width: 46px; padding: 0; justify-content: center; }
.tiles.view-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 641px) { .tiles.view-large { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.tiles.view-large .tile-name { font-size: 1.02rem; }
.tiles.view-large .tile-price { font-size: 1.15rem; }
.tiles.view-compact .tile-photo { display: none; }
.tiles.view-compact .tile { padding: 10px 10px 9px; gap: 6px; min-height: 0; }
.tiles.view-compact .tile-name { min-height: 2.5em; font-size: .9rem; }
@media (min-width: 641px) { .tiles.view-compact { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
.tiles.view-list { grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 900px) { .tiles.view-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tiles.view-list .tile { flex-direction: row; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; min-height: 64px; border-radius: 14px; }
.tiles.view-list .tile-photo { width: 48px; height: 48px; aspect-ratio: auto; flex: none; border-radius: 10px; order: 0; margin: 0; }
.tiles.view-list .tile-ph .ico { width: 22px; height: 22px; }
.tiles.view-list .tile-name { flex: 1; min-height: 0; -webkit-line-clamp: 2; padding-right: 0; }
.tiles.view-list .tile-foot { margin: 0; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.tiles.view-list .tile-sizes { display: none; }
.tiles.view-list .tile-promo { position: static; order: 3; }
.tiles.view-list .tile-fav { position: static; order: 4; }
.pv-menu { display: flex; flex-direction: column; gap: 8px; }
.pv-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pv-item.on { border-color: var(--amber-2); background: var(--amber-soft); }
.pv-item > .ico { color: var(--amber-2); }
.pv-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pv-text small { color: var(--muted); font-size: .8rem; }
.pv-pic { width: 58px; height: 48px; flex: none; display: grid; gap: 3px; padding: 4px; border-radius: 10px; background: var(--soft); }
.pv-pic i { display: block; border-radius: 3px; background: var(--line-strong); }
.pv-photo { grid-template-columns: repeat(3, 1fr); } .pv-compact { grid-template-columns: repeat(3, 1fr); }
.pv-compact i { background: none; border: 1.5px solid var(--line-strong); }
.pv-large { grid-template-columns: repeat(2, 1fr); }
.pv-pic.pv-list { grid-template-columns: 1fr; display: grid; }

/* 0.70: копия в Telegram — шаги подключения. */
.tg-card h2 { display: flex; align-items: center; gap: 8px; }
.tg-card h2 .ico { color: #229ed9; }
.tg-steps { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tg-steps li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; flex-wrap: wrap; }
.tg-steps em { width: 26px; height: 26px; border-radius: 50%; background: #e3f2fb; color: #1d8cc4; font-style: normal; font-weight: 800; display: grid; place-items: center; flex: none; }
.tg-steps li > span { flex: 1; min-width: 200px; }
.tg-token { width: 100%; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); font: inherit; font-family: ui-monospace, monospace; }
.tiles { grid-auto-rows: max-content; } /* 0.70: при множестве товаров строки не сжимаются (компактный вид на компьютере) */

/* 0.70: «Назад» над страницей на телефоне и планшете. */
.back-bar { padding: 8px 14px 0; }
.back-bar[hidden] { display: none; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px 0 8px; border: none; border-radius: 12px; background: var(--card); color: var(--ink-2); font: inherit; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-1); cursor: pointer; }
.back-btn .ico { width: 20px; height: 20px; }
@media (min-width: 641px) { .back-bar { padding: 14px 28px 0; } }
.back-bar:not([hidden]) + .page { padding-top: 10px; }

/* 0.70: «Отчёты» по вкладкам — как на сайте. */
.rx-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); overflow-x: auto; scrollbar-width: none; flex: none; }
.rx-tabs::-webkit-scrollbar { display: none; }
.rx-tabs button { flex: 1 0 auto; min-height: 40px; padding: 0 14px; border: none; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.rx-tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.rx-tab { display: flex; flex-direction: column; gap: 12px; }
.rx-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rx-sub { color: var(--muted); font-size: .78rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.rx-bar { display: flex; flex-direction: column; gap: 4px; }
.rx-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.rx-bar-top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-bar-top b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rx-track { height: 8px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.rx-track i { display: block; height: 100%; border-radius: 5px; }
.rx-extra { color: var(--muted); font-size: .72rem; }
.rx-banks { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.rx-banks .rx-track { background: var(--card); }
.rx-cols { display: flex; align-items: stretch; gap: 3px; height: 170px; }
.rx-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rx-col-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1px; }
.rx-col-bars i { width: 45%; max-width: 12px; min-height: 0; border-radius: 3px 3px 1px 1px; background: #1b2a4c; display: block; }
:root[data-theme="dark"] .rx-col-bars i { background: #6f9bff; }
.rx-col-bars i.ret { background: #e8930c; }
.rx-col > span { font-size: .66rem; color: var(--muted); text-align: center; height: 12px; }
.rx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rx-tile { background: var(--soft); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rx-tiles:not(.rp-card .rx-tiles) .rx-tile { background: var(--card); box-shadow: var(--shadow-1); }
.rx-tile-head { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); font-weight: 600; }
.rx-tile > b { font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-tile > small { font-size: .72rem; color: var(--muted); }
.rx-tile.rx-bad > b { color: var(--bad); }
.rx-list { display: flex; flex-direction: column; }
.rx-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rx-row:first-child { border-top: none; }
.rx-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rx-row small { color: var(--muted); font-size: .76rem; }
.rx-right { text-align: right; flex: none; }
.rx-stack { height: 14px; }
.rx-cat { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.rx-cat > i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.rx-cat > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-cat > em { font-style: normal; color: var(--muted); font-size: .76rem; }
.rx-cat > b { font-variant-numeric: tabular-nums; }
.rx-cat > small { grid-column: 2 / -1; color: var(--muted); font-size: .72rem; }
.rx-date { width: auto; min-width: 150px; }
.rx-kv { margin-top: 4px; }
.rx-staff td, .rx-staff th { white-space: nowrap; }
.rx-two { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 641px) {
  .rx-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rx-tiles.rx-tiles3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rx-cols { height: 210px; }
}
@media (min-width: 1000px) { .rx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.rp-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* 0.72: единицы — шесть нужных кнопками, остальные по группам в окне «Ещё». */
.segment .seg-more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; color: var(--blue); font-weight: 700; }
.segment .seg-extra[hidden] { display: none; }
.unit-groups { display: flex; flex-direction: column; gap: 14px; }
.unit-group { display: flex; flex-direction: column; gap: 8px; }
.unit-group > b { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.unit-chips .chip { min-width: 64px; justify-content: center; }
/* 0.72: аптека — пометка «по рецепту» на плитке, отбор сроков. */
.tile-rx { display: inline-block; margin-right: 4px; padding: 0 5px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); font-style: normal; font-weight: 800; font-size: .7rem; vertical-align: 1px; }
.exp-body { display: flex; flex-direction: column; gap: 10px; }
.exp-chips { flex-wrap: wrap; }
.segment.segment-wrap { flex-wrap: wrap; overflow: visible; }
.segment.segment-wrap > button { flex: 1 0 calc(25% - 4px); }
.segment.segment-wrap > .seg-more { flex: 1 0 calc(25% - 4px); justify-content: center; }

/* 0.72: скидка процентом или суммой. */
.dc-body { display: flex; flex-direction: column; gap: 10px; }
.dc-mode button { flex: 1; font-size: 1rem; }
.dc-input { font-size: 1.6rem; font-weight: 800; text-align: center; min-height: 56px; }
.dc-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.dc-quick .chip { flex: 1; justify-content: center; }
.dc-preview { display: flex; flex-direction: column; gap: 4px; font-weight: 600; text-align: center; }
.dc-over { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--amber-2); font-weight: 600; }
/* 0.72: таймер смены в кассе и на «Главной» */
.pos-shift, .a2-shift { display: inline-flex; text-decoration: none; flex: none; align-self: flex-start; }
.pos-shift { margin: 0 0 8px; }
.a2-shift { margin-top: 4px; }
.a2-shift .sh-timer { font-size: .8rem; padding: 3px 8px; }
.tg-shifts { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; cursor: pointer; }
.tg-shifts input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--accent); }

/* --- Режим кассира (0.72) --- */
.pt-cashier .app { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) !important; }
.pt-cashier .nav { display: none !important; }
.pt-cashier #content { display: flex; flex-direction: column; overflow: hidden; }
.pt-cashier #content > .page { flex: 1 1 auto; min-height: 0; overflow-y: auto; width: 100%; box-sizing: border-box; }
.pt-cashier #content > .page-pos { height: auto; padding-top: 12px; }
.pt-cashier .pos-shift { display: none; }
.cm-top { flex: none; background: linear-gradient(160deg, #1b2a4c 0%, var(--navy-3) 100%); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.cm-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cm-ava { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-2); color: #fff; font-weight: 800; }
.cm-who { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.cm-who b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-who small { opacity: .7; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-top .sh-timer { flex: none; background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.cm-closed { flex: none; font-size: .8rem; font-weight: 700; color: #fcd34d; background: rgba(252, 211, 77, .14); padding: 4px 10px; border-radius: 10px; }
.cm-lock { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cm-lock .ico { width: 18px; height: 18px; }
.cm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cm-stat { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 7px 10px; min-width: 0; display: flex; flex-direction: column; }
.cm-stat small { opacity: .7; font-size: .72rem; }
.cm-stat b { font-variant-numeric: tabular-nums; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-foot { flex: none; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.cm-btn { flex: 1 1 0; min-width: 0; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.cm-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-btn .ico { width: 18px; height: 18px; flex: none; }
.cm-btn.active { border-color: var(--amber-2); color: var(--amber-2); background: var(--amber-soft); }
.cm-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .55); }
.cm-gate-card { width: min(380px, 100%); background: var(--card); color: var(--ink); border-radius: 20px; padding: 24px 20px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: center; box-shadow: var(--shadow-3); }
.cm-gate-card h2 { margin: 0; }
.cm-gate-card p { margin: 0; }
.cm-gate-ico { align-self: center; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--amber-2); color: #fff; }
.cm-gate-ico .ico { width: 28px; height: 28px; }
.cm-gate-exit { align-self: center; margin-top: 2px; }
.cm-exit-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (max-width: 420px) { .cm-btn { flex-direction: column; gap: 2px; font-size: .76rem; min-height: 52px; } .cm-top .sh-timer span { font-size: .8rem; } }
.cm-gate-card .field { margin: 0; }
.cm-gate-card .field input { font-size: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  /* Касса кассира на телефоне: плитки занимают место, полоса чека — внизу и обычной высоты. */
  .pt-cashier #content > .page-pos { display: flex; flex-direction: column; }
  .pt-cashier .page-pos .pos-left { flex: 1 0 auto; }
  .pt-cashier .page-pos .cart-bar { flex: none; }
}
/* 0.73: PIN владельца в светлом окне — кнопки видны */
.cm-exit .pin-pad .kb-key { background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
.cm-exit .pin-pad .kb-fn { background: transparent; border-color: transparent; }
.cm-exit .pin-pad .kb-pressed { background: var(--amber-soft); border-color: var(--amber-2); }
.cm-exit .pin-dot { border-color: var(--line-strong); }
.cm-exit .pin-dot-on { background: var(--amber-2); border-color: var(--amber-2); }
/* 0.73: колокольчик не вылезает за край меню (крупный шрифт, длинное название) */
.brand > div:not(.bell-wrap) { min-width: 0; flex: 1 1 auto; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-shop { max-width: none; }
.brand img { flex: none; }
.brand .bell-nav { flex: none; }
/* 0.73: «нет в наличии» не обрезается — переносится под цену */
.tiles-art .tile-foot { flex-wrap: wrap; row-gap: 3px; }
.tiles-art .tile-stock { max-width: 100%; text-overflow: clip; }
.pos-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 12px; text-align: center; }
.pos-empty .btn { width: auto; align-self: center; }
/* 0.73: «По дням» на планшете — один раз (справа); блок для телефона скрыт и при поздних правилах .rt-blocks */
@media (min-width: 641px) { .rt-blocks.rp-phone-only { display: none !important; } }
/* 0.73: переключатели «Выручка / Количество / Прибыль / Маржа» — в одну строку */
.rp-head > div.rp-pills { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }

/* --- 0.73: шапка чека в одну строку, кнопка режима кассира — значком --- */
.receipt-head { flex-wrap: nowrap; }
.receipt-head .row-actions { flex-wrap: nowrap; gap: 6px; margin: 0; }
.receipt-head .row-actions .btn, .receipt-head .row-actions .tab { min-height: 38px; padding: 0 12px; }
.receipt-head .rh-parked { gap: 6px; font-weight: 700; }
.cm-enter span { display: none; }
.cm-enter { padding: 0 12px; }

/* --- 0.73: режим кассира на компьютере и планшете — больше товаров, чек во всю высоту, оплата всегда видна --- */
@media (min-width: 861px) {
  .pt-cashier #content > .page-pos { overflow: hidden; padding-bottom: 12px; grid-template-rows: minmax(0, 1fr); }
  .pt-cashier .page-pos .pos-left { min-height: 0; overflow: hidden; }
  .pt-cashier .page-pos .tiles { min-height: 0; }
  .pt-cashier .page-pos .tiles.tiles-art:not(.view-list):not(.view-large) { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .pt-cashier .page-pos .tiles-art:not(.view-list) .tile-photo { aspect-ratio: 4 / 3; }
  .pt-cashier .page-pos .receipt { max-height: 100%; height: 100%; position: static; }
  .pt-cashier .page-pos .lines { padding: 0 8px; }
  .pt-cashier .page-pos .line { padding: 4px 2px; }
  .pt-cashier .page-pos .line-main { min-height: 36px; padding: 2px 0; }
  .pt-cashier .page-pos .line-qty .btn { min-height: 34px; width: 34px; }
  .pt-cashier .page-pos .receipt-foot { padding: 10px 14px 12px; }
  .pt-cashier .page-pos .sum-total { margin: 2px 0 8px; font-size: 1.35rem; }
}
/* Телефон: товары прокручиваются сами, полоса чека — над кнопками и не закрывает плитки */
@media (max-width: 860px) {
  .pt-cashier #content > .page-pos { overflow: hidden; padding-bottom: 8px; }
  .pt-cashier .page-pos .pos-left { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  .pt-cashier .page-pos .cart-bar { position: static; margin-top: 8px; }
}
@media (min-width: 861px) {
  .pt-cashier .page-pos .line-main { gap: 0; }
  .pt-cashier .page-pos .line-main .muted { font-size: .78rem; }
  .pt-cashier .page-pos .line-name { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pt-cashier .page-pos .sum-row { padding: 2px 0; }
}
/* 0.73: остаток в карточке товара и «сейчас → останется» при списании и приходе */
.stock-badge { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-ink); font-weight: 600; }
.stock-badge.low { background: var(--amber-soft); color: var(--amber-ink); }
.stock-badge.bad { background: var(--bad-soft); color: var(--bad-ink); }
.stock-badge b { font-size: 1.05rem; }
.stock-badge small { font-weight: 500; opacity: .85; }
.stock-live { font-variant-numeric: tabular-nums; }
.stock-live b { font-size: 1.02rem; }
.bs-left { color: var(--muted); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 0.73: «Обзор» без пустых мест */
.rp-herocol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 641px) { .rp-grid > .rp-herocol { grid-area: hero; } }
.rp-hours .chart { min-height: 150px; }
.rp-attn-item { width: 100%; border: none; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 6px 0; align-items: center; }
.rp-attn-item > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rp-attn-item small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-attn-item + .rp-attn-item { border-top: 1px solid var(--line); }
/* 0.73: «Отчёты → Баланс» */
.bl-grid { display: flex; flex-direction: column; gap: 12px; }
.bl-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 900px) { .bl-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.bl-formula { margin: 4px 0 0; font-size: .8rem; }
.bl-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bl-name > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.bl-name small { font-size: .76rem; }
.bl-val { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-row { padding: 6px 0; }
.bl-row + .bl-row { border-top: 1px solid var(--line); }
.bl-edit { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 8px; width: 30px; height: 30px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.bl-trend .chart { min-height: 160px; }
/* 0.73: раскладка «Обзора» — обёртки прозрачны на телефоне и планшете, колонки — на широком экране */
.rp-main, .rp-top2, .rp-aside { display: contents; }
.rp-grid > .rp-main .rp-herocol { order: 1; } .rp-grid .rp-side { order: 2; } .rp-grid .rp-kpis { order: 3; } .rp-grid .rp-dyn { order: 4; } .rp-grid .rp-right { order: 5; } .rp-grid .rp-best { order: 6; } .rp-grid > .rp-more { order: 7; }
@media (min-width: 641px) and (max-width: 1099px) {
  .rp-grid .rp-herocol { grid-area: hero; } .rp-grid .rp-side { grid-area: side; } .rp-grid .rp-kpis { grid-area: kpis; }
  .rp-grid .rp-dyn { grid-area: dyn; } .rp-grid .rp-right { grid-area: right; } .rp-grid .rp-best { grid-area: best; }
}
@media (min-width: 1100px) {
  .rp-grid { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); grid-template-areas: none; align-items: start; }
  .rp-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .rp-top2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: start; }
  .rp-aside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .rp-grid > .rp-main .rp-herocol, .rp-grid .rp-side, .rp-grid .rp-kpis, .rp-grid .rp-dyn, .rp-grid .rp-right, .rp-grid .rp-best { grid-area: auto; order: 0; }
  .rp-grid > .rp-more { grid-column: 1 / -1; }
}
/* 0.73: вид ценника */
.pt-styles { flex-direction: column; align-items: stretch; }
.pt-style-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.pt-style { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pt-style b { font-size: .88rem; }
.pt-style small { color: var(--muted); font-size: .72rem; line-height: 1.25; }
.pt-style.on { border-color: var(--amber-2); background: var(--amber-soft); }
/* 0.74: остаток на плитке виден всегда и уменьшается вместе с чеком */
.tiles-art .tile-stock:not(.low) { display: inline-block; }
.tile-stock { background: transparent; color: var(--muted); padding: 2px 0; font-variant-numeric: tabular-nums; }
.tile-stock.low { background: var(--amber-soft); color: var(--amber-ink); padding: 2px 7px; }
.tile-stock.out, .tiles-art .tile-stock.out { background: var(--bad-soft); color: var(--bad-ink); padding: 2px 7px; }
.tiles-art .tile-foot { justify-content: space-between; align-items: baseline; }

/* --- 0.74: чек в режиме кассира — шире, строки крупнее, низ короче --- */
.cm-foot-r { display: flex; flex-direction: column; gap: 10px; }
.cm-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.cm-total > div { display: flex; flex-direction: column; gap: 2px; }
.cm-total > div > span { font-weight: 700; font-size: 1.05rem; }
.cm-total > b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cm-disc { padding: 0; min-height: 0; font-size: .85rem; text-align: left; }
.cm-pay { display: grid; grid-template-columns: 1fr 1fr 54px; gap: 8px; }
.cm-pay .btn { min-height: 56px; border-radius: 14px; font-weight: 800; font-size: 1rem; gap: 8px; }
.cm-pay .pay-cash { background: linear-gradient(160deg, #ffb53b 0%, var(--amber-2) 100%); color: #2b1a00; border: none; }
.cm-pay .pay-transfer { background: var(--navy); color: #fff; border: none; }
.cm-pay .cm-pay-more { padding: 0; justify-content: center; }
.cm-pay .btn:disabled { opacity: .45; }
.cm-paymore { display: flex; flex-direction: column; gap: 8px; }
.cm-paymore .btn { min-height: 52px; justify-content: flex-start; }
@media (min-width: 861px) {
  .pt-cashier #content > .page-pos { grid-template-columns: minmax(0, 1fr) clamp(380px, 36%, 520px); }
  .pt-cashier .page-pos .line-main .muted { display: none; }
  .pt-cashier .page-pos .line-main { min-height: 48px; }
  .pt-cashier .page-pos .line-name { font-size: 1.02rem; font-weight: 700; white-space: normal; overflow: visible; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .pt-cashier .page-pos .line-total { font-size: 1.08rem; min-width: 80px; }
  .pt-cashier .page-pos .line-qty .btn { min-height: 40px; width: 40px; }
  .pt-cashier .page-pos .line { padding: 6px 2px; }
}
.cm-btn.cm-park-now { border-color: var(--amber-2); background: var(--amber-soft); color: var(--amber-ink); }
/* 0.74: остаток — справа от цены, в одну строку; низ чека кассира — у нижнего края */
.tiles-art .tile-foot { flex-wrap: wrap; row-gap: 0; }
.tiles-art .tile-stock, .tiles-art .tile-stock:not(.low) { flex: none; margin-left: auto; font-size: .74rem; font-weight: 600; }
.pt-cashier .page-pos .receipt-foot { margin-top: auto; }
/* 0.74: устройства магазина */
.dev-head { margin-top: 10px; }
.dev-list { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dev { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.dev > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dev small { color: var(--muted); font-size: .8rem; }
.dev-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--line-strong); }
.dev.on .dev-dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.dev.off .dev-dot { background: var(--amber-2); box-shadow: 0 0 0 4px var(--amber-soft); }
.dev.off small { color: var(--warn); }

/* --- 0.74: нижняя панель телефона — вариант B (тёмная, у выбранного — оранжевая плашка с подписью) --- */
@media (max-width: 640px) {
  .nav { background: linear-gradient(180deg, #1b2a4c 0%, var(--navy) 100%); border: none; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px rgba(10, 16, 32, .18); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .nav-items { background: transparent; box-shadow: none; border-radius: 0; padding: 0; min-height: 56px; align-items: center; justify-content: space-between; gap: 4px; }
  .nav-user { display: none; }
  .nav-item, .nav-more { flex: 0 1 auto; flex-direction: row; align-items: center; justify-content: center; gap: 0; min-height: 48px; padding: 0 13px; border-radius: 15px; color: #93a0bd; font-size: .86rem; font-weight: 700; background: none; transition: background .28s ease, color .28s ease, padding .28s ease, gap .28s ease; }
  .nav-item .ico, .nav-more .ico { width: 23px; height: 23px; padding: 0; background: none !important; color: inherit !important; border-radius: 0; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
  .nav-item span, .nav-more span { max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s ease, opacity .2s ease; }
  .nav-item.active, .nav-more.active { background: linear-gradient(160deg, #ffb53b 0%, var(--amber-2) 100%); color: #2b1a00; gap: 7px; padding: 0 15px; box-shadow: 0 6px 16px rgba(245, 165, 36, .35); }
  .nav-item.active span, .nav-more.active span { max-width: 110px; opacity: 1; }
  .nav-item:active .ico, .nav-more:active .ico { transform: scale(.82); }
  .nav-item.active::before { display: none; }
  /* Касса — белый квадрат в центре; на кассе — с оранжевой рамкой. */
  .nav-item.nav-fab { padding: 0 4px; background: none !important; box-shadow: none !important; gap: 0; }
  .nav-item.nav-fab > span { display: none; }
  .nav-item.nav-fab .fab-circle { position: static; display: grid; place-items: center; width: 54px; height: 50px; margin: 0; border: none; border-radius: 16px; background: #fff; color: var(--navy); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .25s; }
  .nav-item.nav-fab .fab-circle .ico { color: var(--navy) !important; width: 25px; height: 25px; }
  .nav-item.nav-fab.active .fab-circle { box-shadow: 0 0 0 3px var(--amber), 0 6px 16px rgba(0, 0, 0, .25); }
  .nav-item.nav-fab:active .fab-circle { transform: scale(.9); }
  .has-notices .nav-more::after { top: 6px; right: 6px; background: var(--amber); border-color: var(--navy); }
}
/* 0.74: панель B на узком экране (масштаб 125 %) — сжимается, подпись выбранного обрезается многоточием */
@media (max-width: 640px) {
  .nav-items { min-width: 0; }
  .nav-item, .nav-more { min-width: 0; flex-shrink: 1; }
  .nav-item.active span, .nav-more.active span { max-width: 96px; text-overflow: ellipsis; }
}
@media (max-width: 380px) {
  .nav { padding-left: 6px; padding-right: 6px; }
  .nav-item, .nav-more { padding: 0 9px; }
  .nav-item.active, .nav-more.active { padding: 0 11px; gap: 5px; }
  .nav-item.active span, .nav-more.active span { max-width: 74px; }
  .nav-item.nav-fab .fab-circle { width: 48px; height: 46px; }
}
@media (max-width: 640px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav { min-width: 0; max-width: 100vw; box-sizing: border-box; }
  .nav-items { width: 100%; }
}
/* 0.74: «Типовые товары» */
.st-body { display: flex; flex-direction: column; gap: 14px; }
.st-body > p { margin: 0; }
.st-group h3 { margin: 0 0 6px; font-size: .95rem; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 80px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.st-name { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.st-name input { width: 20px; height: 20px; flex: none; accent-color: var(--amber-2); }
.st-name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-name small { color: var(--muted); }
.st-row input[type="text"] { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; box-sizing: border-box; }
@media (max-width: 480px) { .st-row { grid-template-columns: minmax(0, 1fr) 78px 64px; gap: 6px; } }
@media (max-width: 480px) { .st-row { grid-template-columns: minmax(0, 1fr) 72px 74px; } .st-row input[type="text"] { padding: 0 7px; font-size: .85rem; } }

/* --- 0.75: цели продаж --- */
.goal-card { gap: 10px; }
.goal-pills { flex-wrap: wrap; }
.goal-nums { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.goal-nums b { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.goal-nums span { color: var(--muted); font-weight: 600; }
.goal-pct { margin-left: auto; font-style: normal; font-weight: 800; font-size: 1.05rem; color: var(--ink-2); }
.goal-pct.warm { color: var(--amber-2); } .goal-pct.ok { color: var(--ok); }
.goal-bar { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5b8def, var(--blue)); transition: width .6s ease; }
.goal-bar.warm i { background: linear-gradient(90deg, #ffb53b, var(--amber-2)); }
.goal-bar.ok i { background: linear-gradient(90deg, #34c27a, var(--ok)); }
.goal-note { margin: 0; color: var(--ink-2); font-size: .88rem; }
.today .goal-card { margin: 0 0 4px; }
.goal-form { display: flex; flex-direction: column; gap: 10px; }
.goal-form > p { margin: 0; }
.goal-field { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; font-weight: 600; }
.goal-field input { min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink); font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.goal-main input { border-color: var(--amber-2); box-shadow: 0 0 0 3px var(--amber-soft); }
.pos-strips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.pos-strips .pos-shift { margin: 0; }
.goal-strip { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.goal-strip-text { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-strip-bar { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.goal-strip-bar i { display: block; height: 100%; background: var(--amber-2); border-radius: inherit; }
.goal-strip.ok .goal-strip-text { color: var(--ok); } .goal-strip.ok .goal-strip-bar i { background: var(--ok); }
.goal-cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; }
.goal-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .74rem; color: var(--muted); }
.goal-col-bar { position: relative; width: 100%; max-width: 34px; height: 90px; border-radius: 8px; background: var(--soft); display: flex; align-items: flex-end; overflow: hidden; }
.goal-col-bar i { display: block; width: 100%; background: var(--line-strong); border-radius: 8px 8px 0 0; }
.goal-col.ok .goal-col-bar i { background: var(--ok); }
.goal-col.now .goal-col-bar i { background: var(--amber-2); }
.goal-col-bar em { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); opacity: .55; }
.goal-col small { font-weight: 800; color: var(--ink-2); }
.goal-col.ok small { color: var(--ok); }

/* --- 0.75: изменить цены и цены по одному --- */
.rp-panes { display: grid; gap: 14px; }
@media (min-width: 900px) { .rp-panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
.rp-opts { display: flex; flex-direction: column; gap: 14px; }
.rp-opt { display: flex; flex-direction: column; gap: 8px; }
.rp-opt > span { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rp-seg { width: 100%; flex-wrap: wrap; }
.rp-seg .seg-btn { flex: 1 1 auto; }
.rp-scope-box { display: flex; flex-direction: column; gap: 8px; }
.rp-scope { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.rp-scope .chip { flex: none; }
.rp-value-box { display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 58px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); }
.rp-value-box b { color: var(--ok); font-size: 1.4rem; }
.rp-value-box input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1.6rem; font-weight: 800; text-align: right; color: var(--ink); outline: none; font-variant-numeric: tabular-nums; }
.rp-value-box em { font-style: normal; color: var(--muted); font-weight: 700; }
.rp-opt .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-preview { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--info); border: 1px solid var(--info-line); }
.rp-rows { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.rp-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 16px auto auto; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; cursor: pointer; }
.rp-row input { width: 18px; height: 18px; accent-color: var(--amber-2); }
.rp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; }
.rp-name small { color: var(--bad); font-size: .72rem; }
.rp-was { color: var(--muted); }
.rp-row em { font-style: normal; font-size: .76rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--ok-soft); color: var(--ok-ink); }
.rp-row em.down { background: var(--bad-soft); color: var(--bad-ink); }
.rp-row.off { opacity: .45; }
.rp-row.below b { color: var(--bad); }
.rp-undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0; }
.pw { display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin: 0 auto; width: 100%; }
.pw-top { display: flex; align-items: stretch; gap: 8px; }
.pw-card { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.pw-head small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.pw-head b { font-size: 1.15rem; }
.pw-price-box { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 14px 16px; border: 2px solid var(--blue); border-radius: 16px; background: var(--info); }
.pw-price-box > span { position: absolute; left: 16px; top: 16px; font-weight: 700; }
.pw-price { font-size: 2.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pw-markup { color: var(--muted); font-weight: 600; }
.pw-clear { position: absolute; left: 16px; bottom: 14px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--line); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.pw-pad .kb-grid { gap: 10px; }
.pw-pad .kb-key { min-height: 58px; font-size: 1.5rem; font-weight: 700; border-radius: 14px; }
.pw-next { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
/* 0.75: отмена списания */
.mv-undo { min-height: 30px; padding: 0 10px; font-size: .78rem; gap: 4px; }
.thin-row .mv-undo { margin-left: 6px; flex: none; }
.mv-off { text-decoration: line-through; opacity: .55; }
/* 0.75: правила кассы */
.rules-card { display: flex; flex-direction: column; gap: 4px; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.rule-row:last-child { border-bottom: 0; }
.rule-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rule-row small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.rule-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--amber-2); }
.rule-num { width: 84px; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; text-align: right; flex: none; }
.pos-profit { color: var(--ok); font-weight: 700; font-size: .92rem; }
.tg-daily { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tg-daily .tg-shifts { margin: 0; }
.tg-time { min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; }

/* 0.76: окно «Аналоги» (аптека) */
.an-head { display: flex; gap: 12px; align-items: center; background: rgba(242, 163, 58, .14); border: 1px solid rgba(242, 163, 58, .55); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.an-head.in { background: var(--ok-soft); border-color: transparent; }
.an-head b { display: block; font-size: 1.02rem; }
.an-head small { color: var(--muted); }
.an-ico { width: 40px; height: 40px; border-radius: 12px; background: #f2a33a; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.an-head.in .an-ico { background: var(--ok); }
.an-sub { color: var(--muted); font-size: .9rem; margin: 2px 0 10px; }
.an-sub b { color: var(--ink); }
.an-list { display: flex; flex-direction: column; gap: 8px; }
.an-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--card); }
.an-row.off { opacity: .55; }
.an-name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.an-meta { grid-column: 1; color: var(--muted); font-size: .84rem; display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.an-price { grid-row: 1; grid-column: 2; text-align: right; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.an-add { grid-column: 2; grid-row: 2; min-height: 40px; padding: 0 14px; border-radius: 10px; border: none; background: var(--ok); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.an-add:disabled { background: var(--line); color: var(--muted); cursor: default; }
.an-row .tag { font-size: .74rem; padding: 2px 8px; border-radius: 99px; font-weight: 700; }
.an-row .tag.ok { background: var(--ok-soft); color: var(--ok); }
.an-row .tag.warn { background: rgba(242, 163, 58, .2); color: #8a5a12; }
.an-row .tag.no { background: var(--line); color: var(--muted); }
.an-row .tag.cheap { background: rgba(31, 79, 191, .12); color: #1f4fbf; }
.an-foot { color: var(--muted); font-size: .82rem; margin-top: 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .an-row .tag.warn { color: #f5c27a; } :root:not([data-theme="light"]) .an-row .tag.cheap { color: #8fb2ff; } }
:root[data-theme="dark"] .an-row .tag.warn { color: #f5c27a; }
:root[data-theme="dark"] .an-row .tag.cheap { color: #8fb2ff; }

/* 0.76: веб-версия — подсказка «На экран Домой» и «Готова новая версия» */
.pwa-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; width: min(520px, calc(100vw - 24px)); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(10, 16, 32, .22); animation: sheet .24s var(--ease); }
.pwa-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.pwa-text span { color: var(--muted); font-size: .88rem; }
.pwa-actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 700px) { .pwa-banner { bottom: calc(84px + env(safe-area-inset-bottom)); } }
