/* Фирменный стиль экосистемы DEEP IT (как в deep-chat и Deep Pulse) */
:root {
  --app: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #ececef;
  --surface-3: #e0e0e4;
  --content: #2a2b2f;
  --muted: #52545a;
  --faint: #696b71;
  --line: #e0e0e4;
  --accent: #bb080b;
  --accent-hover: #9e070a;
  --accent-soft: #fbe9e9;
  --ok: #0f7b3f;
  --ok-soft: #e3f4ea;
  --warn: #9a6200;
  --warn-soft: #fdf1dc;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 4px 16px rgb(0 0 0 / 0.04);
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --app: #17181c; --surface: #1f2025; --surface-2: #2a2b31; --surface-3: #35363d;
    --content: #f2f2f4; --muted: #b4b5bb; --faint: #8d8f96; --line: #33343a;
    --accent: #e02d30; --accent-hover: #f04346; --accent-soft: #3a1d1e;
    --ok: #4cc27f; --ok-soft: #173325; --warn: #e5a93a; --warn-soft: #3a2e17;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --app: #17181c; --surface: #1f2025; --surface-2: #2a2b31; --surface-3: #35363d;
  --content: #f2f2f4; --muted: #b4b5bb; --faint: #8d8f96; --line: #33343a;
  --accent: #e02d30; --accent-hover: #f04346; --accent-soft: #3a1d1e;
  --ok: #4cc27f; --ok-soft: #173325; --warn: #e5a93a; --warn-soft: #3a2e17;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px; line-height: 1.45; background: var(--app); color: var(--content);
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--faint); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Каркас */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; padding: 4px 8px 16px; letter-spacing: -0.02em; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; }
.logo b { color: var(--accent); font-weight: 800; }
.nav-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); padding: 14px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius);
  text-decoration: none; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--content); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.main { padding: 24px 28px 48px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.mobile-bar { display: none; }

/* Карточки и таблицы */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.stat .label { color: var(--faint); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: 12px; margin-top: 2px; }
.up { color: var(--ok); } .down { color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--faint); padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface);
}
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }
tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: none; }
.empty { padding: 40px 16px; text-align: center; color: var(--faint); }

/* Кнопки и поля */
button, .btn {
  font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--content);
  border-radius: var(--radius); padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; white-space: nowrap;
}
button:hover, .btn:hover { background: var(--surface-2); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-hover); }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: var(--surface-2); }
button.big { padding: 14px 20px; font-size: 16px; }
button.danger { color: var(--accent); }
input, select, textarea {
  font: inherit; color: var(--content); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input.cell { padding: 5px 8px; text-align: right; width: 96px; }
label.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form { display: grid; gap: 12px; }
.form-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 160px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { width: auto; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--accent-soft); color: var(--accent); }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: var(--radius); padding: 3px; gap: 2px; }
.tabs button { border: none; background: transparent; padding: 6px 12px; }
.tabs button.on { background: var(--surface); box-shadow: var(--shadow); }

/* Модальное окно и уведомления */
.overlay { position: fixed; inset: 0; background: rgb(0 0 0 / 0.4); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px; box-shadow: 0 12px 48px rgb(0 0 0 / 0.25); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; flex: 1; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 60; background: var(--content); color: var(--surface); padding: 12px 16px; border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / 0.2); max-width: 380px; }
.toast.error { background: var(--accent); color: #fff; }

/* Статус программы кассы (Deep Учёт Агент) */
.agent-bar { margin: -8px 0 16px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }
.agent-bar.warn { background: var(--warn-soft); color: var(--warn); }
.agent-bar.red { background: var(--accent-soft); color: var(--accent); }

/* Дисплей покупателя — крупно, читается с метра-двух */
.cd { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; background: var(--app); color: var(--content); font-size: 22px; }
.cd-head { display: flex; align-items: center; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cd-store { font-weight: 800; font-size: 24px; flex: 1; }
.cd-customer { font-size: 20px; color: var(--muted); }
.cd-lines { overflow-y: auto; padding: 8px 28px; }
.cd-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cd-name { font-weight: 600; }
.cd-qty { grid-row: 2; color: var(--faint); font-size: 18px; }
.cd-amount { grid-row: 1 / span 2; align-self: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-return { color: var(--accent); font-weight: 800; padding: 8px 0; text-transform: uppercase; }
.cd-total { padding: 18px 28px 24px; background: var(--surface); border-top: 1px solid var(--line); }
.cd-row { display: flex; justify-content: space-between; font-size: 22px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.cd-sum { font-size: 44px; font-weight: 800; }
.cd-sum b { color: var(--accent); }
.cd-thanks { font-size: 40px; font-weight: 800; text-align: center; padding: 8px 0 12px; }
.cd-idle { grid-template-rows: auto auto 1fr auto; place-items: center; text-align: center; padding: 48px; gap: 24px; }
.cd-brand .logo { font-size: 28px; padding: 0; }
.cd-title { font-size: 56px; font-weight: 800; letter-spacing: -0.02em; }
.cd-message { font-size: 36px; color: var(--accent); font-weight: 700; max-width: 900px; animation: cd-fade 0.6s ease; }
.cd-hint { color: var(--muted); font-size: 22px; }
.drop-on { outline: 2px dashed var(--accent); outline-offset: -6px; }
/* Слайды рекламы */
.cd-ads { display: block; background: #000; }
.cd-split { position: fixed; inset: 0; display: grid; grid-template-columns: 55% 45%; }
.cd-split .cd { position: relative; }
.cd-side { position: relative; background: #000; }
.ss { position: absolute; inset: 0; animation: cd-fade 0.6s ease; }
.ss img, .ss video { width: 100%; height: 100%; display: block; object-fit: contain; }
.ss-text { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 6vw; font-size: clamp(28px, 5vw, 80px); font-weight: 800; line-height: 1.15; }
.ss-thumb { width: 96px; height: 54px; border-radius: 6px; overflow: hidden; background: #000; position: relative; flex: none; }
.ss-thumb img, .ss-thumb video { width: 100%; height: 100%; object-fit: cover; }
.ss-thumb .ss-text { font-size: 9px; padding: 4px; }
@keyframes cd-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cd-message { animation: none; } }

/* Поиск товара */
.picker { position: relative; }
.picker-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); max-height: 320px; overflow-y: auto;
}
.picker-item { padding: 8px 12px; cursor: pointer; display: flex; gap: 12px; }
.picker-item:hover, .picker-item.on { background: var(--surface-2); }

/* Вход */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-hero { text-align: center; margin-bottom: 20px; }
.logo-mark svg { width: 66%; height: 66%; }
.auth-hero .logo { justify-content: center; font-size: 30px; padding: 0 0 8px; gap: 10px; }
.auth-hero .logo-mark { width: 44px; height: 44px; border-radius: 11px; }
.auth-hero p { color: var(--muted); margin: 0; }

/* Касса */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .pos { grid-template-columns: minmax(0, 1fr); } .pos-side { position: static; } }
.pos-cart td { padding: 8px 10px; }
.pos-total { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pos-side { position: sticky; top: 16px; display: grid; gap: 12px; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { padding: 2px 8px; }
.qty input { width: 64px; text-align: center; padding: 4px; }
.pos-scan input { font-size: 18px; padding: 12px 14px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* График */
.chart { width: 100%; height: 180px; display: block; }
.chart .bar { fill: var(--accent); opacity: 0.85; }
.chart .bar:hover { opacity: 1; }
.chart text { fill: var(--faint); font-size: 10px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 48px rgb(0 0 0 / 0.3); }
  .mobile-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .main { padding: 16px; }
  .pos { grid-template-columns: 1fr; }
  .pos-side { position: static; }
  .form-2 { grid-template-columns: 1fr; }
  .filters input, .filters select { min-width: 0; flex: 1 1 140px; }
}
@media print {
  .sidebar, .mobile-bar, .no-print, .page-head button { display: none !important; }
  .layout { display: block; }
  .card { box-shadow: none; border: none; }
}

/* Меню «Печать ▾» */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 240px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  display: grid; gap: 2px;
}
.dropdown-menu button { background: none; border: 0; text-align: left; justify-content: flex-start; padding: 8px 10px; border-radius: 6px; font-weight: 500; }
.dropdown-menu button:hover { background: var(--surface-2); }
@media (max-width: 640px) { .dropdown-menu { right: auto; left: 0; } }

/* Карточка компании */
.company-card { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.company-card h2 { margin: 0 0 4px; font-size: 16px; }
@media (max-width: 640px) { .company-card { grid-template-columns: 1fr; } }

/* Фото товара */
.thumb { flex: none; width: 36px; height: 36px; border-radius: 6px; background: var(--surface-2); overflow: hidden; display: inline-grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-head { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.photo-field { display: grid; gap: 6px; text-align: center; }
.photo-box { width: 150px; height: 150px; border: 1.5px dashed var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.photo-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.photo-field.drag .photo-box { border-color: var(--accent, #bb080b); }
@media (max-width: 520px) { .product-head { grid-template-columns: 1fr; } .photo-field { justify-items: center; } }
.org-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.org-card { display: grid; gap: 4px; cursor: pointer; }
.org-card:hover { border-color: var(--faint); }
.org-card h2 { margin: 6px 0 2px; font-size: 17px; }
.price-types { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); padding: 12px; border-radius: 10px; background: var(--surface-2); }

/* Товары: дерево групп, папки, колонки */
.products-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.products-layout.no-tree { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .products-layout { grid-template-columns: 1fr; } }
.tree { padding: 10px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree-row { display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; border: 1px dashed transparent; }
.tree-row:hover { background: var(--surface-2); }
.tree-row.on { background: var(--surface-3); font-weight: 600; }
.tree-row.over, .folder-row.over td { border-color: #bb080b; background: color-mix(in srgb, #bb080b 10%, transparent); }
.tree-caret { background: none; border: 0; padding: 0 2px; width: 16px; color: var(--muted); cursor: pointer; }
.tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count { font-size: 12px; color: var(--faint); }
.tree-actions { display: none; gap: 2px; }
.tree-row:hover .tree-actions { display: inline-flex; }
.tree-actions button { background: none; border: 0; padding: 2px 4px; color: var(--muted); cursor: pointer; border-radius: 4px; }
.tree-actions button:hover { background: var(--surface-3); color: var(--content); }
@media (hover: none) { .tree-actions { display: inline-flex; } }
.crumbs { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
button.link { background: none; border: 0; padding: 0; color: #bb080b; cursor: pointer; font: inherit; }
button.link:hover { text-decoration: underline; }
.folder-row td { background: var(--surface-2); }
.folder-icon { font-size: 18px; }
.group-row td { background: var(--surface-2); font-weight: 600; font-size: 13px; }
tr.selected td { background: color-mix(in srgb, #bb080b 6%, transparent); }
th.col-mark, td.col-mark { background: color-mix(in srgb, #f5b400 14%, transparent); font-weight: 600; }
.warn-text { color: #b26a00; font-weight: 600; }
.bulk-bar { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; gap: 10px; }
.bulk-bar select { width: auto; }
.col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.col-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.col-list li.dragging { opacity: .5; }
.grip { cursor: grab; color: var(--faint); user-select: none; letter-spacing: -2px; }
.filters .check { flex: none; white-space: nowrap; }
.filters .check input { width: auto; flex: none; min-width: 0; }

/* Каталог на кассе */
.pos-catalog { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 60vh; overflow: auto; padding: 2px; }
.cat-tile { position: relative; display: grid; grid-template-rows: 96px auto auto; gap: 4px; padding: 8px; text-align: left; align-content: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.cat-tile:hover { border-color: #bb080b; box-shadow: var(--shadow); }
.cat-tile:active { transform: scale(.98); }
.cat-tile.folder { background: var(--surface-2); }
.cat-tile.out { opacity: .6; }
.cat-img { height: 96px; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; overflow: hidden; font-size: 40px; color: var(--faint); }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-name { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.cat-added { position: absolute; top: 6px; right: 6px; background: #bb080b; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }

/* Дисплей покупателя: тема, фирменный цвет, масштаб шрифта из конструктора */
.cd-theme-dark { --cd-bg: #17181c; --cd-surface: #1f2025; --cd-text: #f2f2f4; --cd-muted: #b4b5bb; --cd-faint: #8d8f96; --cd-line: #33343a; }
.cd-theme-light { --cd-bg: #f4f4f6; --cd-surface: #ffffff; --cd-text: #17181c; --cd-muted: #55565c; --cd-faint: #7a7b82; --cd-line: #e0e0e4; }
.cd { background: var(--cd-bg, var(--app)); color: var(--cd-text, var(--content)); font-size: calc(22px * var(--cd-font, 1)); }
.cd-head, .cd-total { background: var(--cd-surface, var(--surface)); border-color: var(--cd-line, var(--line)); }
.cd-line { border-color: var(--cd-line, var(--line)); }
.cd-store { font-size: 1.1em; display: flex; align-items: center; gap: 12px; }
.cd-customer, .cd-hint { color: var(--cd-muted, var(--muted)); font-size: 0.9em; }
.cd-qty { color: var(--cd-faint, var(--faint)); font-size: 0.82em; }
.cd-row { font-size: 1em; }
.cd-sum { font-size: 2em; }
.cd-thanks { font-size: 1.8em; }
.cd-title { font-size: 2.5em; }
.cd-return, .cd-sum b, .cd-message { color: var(--cd-accent, var(--accent)); }
.cd-idle { background-size: cover; background-position: center; }
.cd-logo { max-height: 120px; max-width: 60%; object-fit: contain; }
.cd-logo.small { max-height: 1.6em; }
.cd-line.with-photo { grid-template-columns: auto 1fr auto; }
.cd-photo { grid-row: 1 / span 2; width: 2.6em; height: 2.6em; border-radius: 8px; overflow: hidden; background: var(--cd-line, var(--line)); align-self: center; }
.cd-photo img { width: 100%; height: 100%; object-fit: cover; }
.cd-line.with-photo .cd-qty { grid-row: 2; grid-column: 2; }
.cd-line.with-photo .cd-amount { grid-column: 3; }
.cd-split { display: flex; grid-template-columns: none; }
.cd-split .cd { flex: 1; min-width: 0; }

/* Предпросмотр в конструкторе: экран 1280×720, уменьшенный под ширину */
.cd-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.cd-preview-screen { position: absolute; top: 0; left: 0; width: 1280px; height: 720px; transform-origin: 0 0; }
.cd-preview-screen .cd, .cd-preview-screen .cd-split { position: absolute; inset: 0; }
.cd-preview-screen .cd-split .cd { position: relative; }
.display-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.display-builder .sticky { position: sticky; top: 12px; }
@media (max-width: 1100px) { .display-builder { grid-template-columns: 1fr; } .display-builder .sticky { position: static; } }
.data-table td:first-child { font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: nowrap; }

/* ---------- Посадочная страница (стиль экосистемы DEEP: deep-chat, Deep Pulse) ---------- */
.lp { background: var(--app); color: var(--content); min-height: 100vh; --lp-radius: 16px; }
.lp-wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }
.lp section { padding: 56px 0; }
.lp h1, .lp h2 { font-family: Montserrat, Inter, system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.lp h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.08; }
.lp h1 em, .lp-eco em { font-style: normal; color: var(--accent); }
.lp h2 { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; margin-bottom: 10px; }
.lp h3 { font-size: 17px; margin: 0 0 6px; }
.lp p { line-height: 1.55; }
.lp-center { text-align: center; }
.lp-kicker { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.lp-sub { color: var(--muted); margin: 0 0 24px; max-width: 760px; }
.lp-pill { border-radius: 999px !important; padding: 12px 22px !important; font-weight: 700; }
.lp-shadow { box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent); }

.lp-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--app) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-head-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.lp-head .logo { font-size: 20px; }
.lp-nav { display: flex; gap: 22px; margin-left: 24px; }
.lp-nav a { color: var(--content); text-decoration: none; font-size: 14px; font-weight: 500; }
.lp-nav a:hover { color: var(--accent); }
.lp-login { padding: 8px 18px !important; }
.lp-burger { display: none; }
@media (max-width: 960px) {
  .lp-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px; }
  .lp-nav.open { display: flex; }
  .lp-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .lp-burger { display: inline-flex; }
}

.lp-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 420px); gap: 48px; align-items: start; padding-top: 48px !important; }
@media (max-width: 960px) { .lp-hero { grid-template-columns: 1fr; gap: 28px; } }
.lp-badge { display: inline-block; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.lp-lead { font-size: 18px; margin: 20px 0 10px; }
.lp-note { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chips span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.lp-chips span:nth-child(-n+7) { background: #52545a; color: #fff; border-color: transparent; }
.lp-flow { margin-top: 28px; max-width: 360px; }
.lp-flow-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.lp-flow-card small { display: block; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.lp-arrow { color: var(--accent); text-align: center; padding: 2px 0; }
.lp-auth-wrap { position: sticky; top: 88px; }
.lp-auth { padding: 22px; border-radius: 20px; box-shadow: 0 18px 50px rgb(0 0 0 / .08); }

.lp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--lp-radius); padding: 22px; position: relative; }
.lp-card p { color: var(--muted); margin: 0; font-size: 15px; }
.lp-grid3, .lp-grid4 { display: grid; gap: 16px; }
.lp-grid3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lp-grid4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.lp-values h2 { margin-bottom: 24px; }
.lp-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); margin-bottom: 14px; }
.lp-tag { position: absolute; top: 16px; right: 16px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.lp-case small { color: var(--accent); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.lp-case ol { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.lp-num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.lp-eco { text-decoration: none; color: inherit; }
.lp-eco b { font-family: Montserrat, Inter, sans-serif; font-size: 22px; display: block; margin-bottom: 6px; }
.lp-eco.on { border-color: var(--accent); }
a.lp-eco:hover { border-color: var(--faint); }
.lp-plan { display: flex; flex-direction: column; gap: 8px; }
.lp-plan h3 { font-family: Montserrat, Inter, sans-serif; font-size: 24px; }
.lp-plan ul { margin: 8px 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; flex: 1; }
.lp-plan li::before { content: '✓'; color: var(--accent); font-weight: 800; margin-right: 8px; }
.lp-plan.popular { border: 2px solid var(--accent); box-shadow: 0 18px 50px color-mix(in srgb, var(--accent) 14%, transparent); }
.lp-price { font-weight: 800; font-size: 18px; margin: 4px 0 8px; }
.lp-faq .lp-q { padding: 0; margin-bottom: 10px; }
.lp-q button { width: 100%; display: flex; justify-content: space-between; gap: 12px; background: none; border: 0; padding: 18px 22px; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; }
.lp-q button span { color: var(--accent); font-size: 22px; line-height: 1; }
.lp-q p { padding: 0 22px 18px; }
.lp-band { background: linear-gradient(135deg, var(--accent), #6d0507); color: #fff; border-radius: 24px; padding: 48px 24px; text-align: center; }
.lp-band h2 { color: #fff; }
.lp-band p { color: rgb(255 255 255 / .85); margin: 0 0 22px; }
.lp-white { background: #fff !important; color: #1f2025 !important; border: 0 !important; }
.lp-outline { background: transparent !important; color: #fff !important; border: 1px solid rgb(255 255 255 / .6) !important; }
.lp-foot { background: #1f2025; color: #d9d9de; padding: 48px 0 24px; margin-top: 24px; }
.lp-foot h3 { color: #fff; }
.lp-foot p { margin: 4px 0; font-size: 14px; }
.lp-foot a { color: #fff; }
.lp-foot-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.lp-copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid #33343a; font-size: 13px; color: #8d8f96; }
.lp section, .lp footer { scroll-margin-top: 72px; }

/* Касса: баллы и любимые категории */
.pos-points { font-size: 15px; } .pos-points b { font-size: 26px; font-weight: 800; color: var(--accent); }
.fav-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-chip { border-radius: 999px; padding: 8px 14px; }
.fav-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Логотип компании вместо логотипа Deep Учёт */
.brand-logo img { max-height: 40px; max-width: 180px; object-fit: contain; display: block; }
.brand-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--content); }
.price-map { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
