/* Анализ категорий - светлая минималистичная тема с розовым акцентом */

:root {
  --bg: #fafafb;
  --surface: #ffffff;
  --surface-soft: #f6f6f8;
  --line: #e8e8ee;
  --line-strong: #d8d8e2;
  --text: #24242b;
  --text-soft: #6b6b78;
  --text-faint: #9a9aa6;

  --accent: #d96c88;
  --accent-soft: #fbeef1;
  --accent-line: #f0cdd6;
  --accent-deep: #b9506c;

  --good: #7fc08a;
  --good-soft: #eaf6ec;
  --warn: #efc36a;
  --warn-soft: #fdf5e6;
  --bad: #e88b8b;
  --bad-soft: #fbeded;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(30, 30, 45, .04), 0 6px 20px rgba(30, 30, 45, .05);
  --shadow-lift: 0 4px 8px rgba(30, 30, 45, .06), 0 16px 40px rgba(30, 30, 45, .09);

  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Каркас --- */
.layout { display: flex; min-height: 100vh; }

/* Полоса с фоном тянется на всю высоту документа, а содержимое внутри прилипает */
.sidebar {
  width: 216px;
  flex: 0 0 216px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar-inner {
  position: sticky;
  top: 0;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 18px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
}
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13.5px;
  transition: background .12s, color .12s;
  user-select: none;
}
.nav-item:hover { background: var(--surface-soft); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 500; }
.nav-item .ico { width: 16px; text-align: center; opacity: .8; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 20px;
}

.nav-sep { height: 1px; background: var(--line); margin: 12px 10px; }
.nav-label {
  padding: 6px 10px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
}

.main { flex: 1; min-width: 0; padding: 26px 32px 80px; }
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.page-head .grow { flex: 1; min-width: 0; }
.page-sub { color: var(--text-soft); font-size: 13px; margin-top: 4px; }

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent-line); background: #fff; box-shadow: var(--shadow); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface-soft); box-shadow: none; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-danger:hover { border-color: var(--bad); color: #b44; }

/* --- Карточки --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head .grow { flex: 1; min-width: 0; }

.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  position: relative;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--accent-line);
}
.project-card .title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.project-card .meta { color: var(--text-faint); font-size: 12.5px; }
.project-card .stats {
  display: flex; gap: 14px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.project-card .stat-val { font-weight: 600; font-size: 15px; }
.project-card .stat-lbl { color: var(--text-faint); font-size: 11.5px; }
.project-card { display: flex; flex-direction: column; }
.card-foot {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px;
}
.project-card .stats + .card-foot { margin-top: 12px; }
.card-foot.muted { font-size: 12px; }
.card-foot .btn { padding: 7px 12px; font-size: 13px; }
.card-foot .pd-btn { flex: 1 1 100%; justify-content: center; }
.card-foot .btn-ghost { border-color: var(--line); }
.card-foot .card-del:hover { border-color: var(--bad); color: #b44; }
.card-foot .pd-sent { background: #e8f4e1; border-color: #bcdcaa; color: #3d6b2a; }
.card-foot .pd-sent:hover { background: #dcefd2; }
.card-foot .pd-btn { transition: background .45s ease, color .45s ease, border-color .45s ease; }
.card-foot .pd-btn.pd-just { animation: pd-pop .5s cubic-bezier(.2,.8,.3,1.3); }
@keyframes pd-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* Искорки (sparkle.js) */
.sparkle-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.sparkle { position: fixed; filter: drop-shadow(0 0 3px rgba(232, 120, 154, .45)); }
.sparkle-ring { position: fixed; border: 1.5px solid #f4b6c8; box-sizing: border-box; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
}
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* --- Степпер этапов --- */
.stepper { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-soft);
  transition: all .12s;
}
.step:hover { border-color: var(--accent-line); }
.step.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-deep); font-weight: 500; }
.step.done .num { background: var(--good); color: #fff; border-color: var(--good); }
.step .num {
  width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-soft);
}
.step.active .num { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- Формы --- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-soft);
  margin-bottom: 5px;
  font-weight: 500;
}
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  font-size: 12.5px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
}
.chip:hover { border-color: var(--accent-line); }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-deep); }
.chip .x { color: var(--text-faint); font-size: 14px; line-height: 1; }
.chip .x:hover { color: var(--accent-deep); }

/* --- Дропзона --- */
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 34px 20px;
  text-align: center;
  color: var(--text-soft);
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.dropzone .big { font-size: 28px; margin-bottom: 8px; opacity: .6; }

/* --- Таблицы --- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
table.data {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
table.data th, table.data td {
  padding: 5px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  text-align: right;
}
table.data th {
  background: var(--surface-soft);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text-soft);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 3;
}
table.data th.group-head { text-align: left; }
table.data thead tr:first-child th { border-top: none; }
/* Закреплённые колонки разрезов. Ширина задана жёстко, иначе sticky-сдвиг
   второго уровня не совпадает с реальной шириной первого и колонки наезжают. */
table.data td.dim, table.data th.dim {
  text-align: left;
  position: sticky;
  left: 0;
  width: 152px;
  min-width: 152px;
  max-width: 152px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--surface);
  z-index: 2;
  font-weight: 500;
  border-right: 1px solid var(--line-strong);
}
table.data th.dim { z-index: 4; background: var(--surface-soft); }
table.data td.dim.dim-2, table.data th.dim.dim-2 { left: 152px; }
table.data td.dim.dim-2 { font-weight: 400; color: var(--text-soft); }
table.data td.dim:not(.dim-2), table.data th.dim:not(.dim-2) {
  border-right-color: var(--line);
}
table.data tbody tr:hover td { background-color: #fcfbfc; }
table.data tbody tr:hover td.dim { background-color: #f8f6f7; }
table.data tr.total td {
  font-weight: 700;
  background: var(--accent-soft) !important;
  border-top: 1.5px solid var(--accent-line);
}
table.data td.sep-left { border-left: 1px solid var(--line-strong); }
table.data th.sep-left { border-left: 1px solid var(--line-strong); }

table.data tr.marked td.dim { box-shadow: inset 3px 0 0 var(--accent); }
table.data td.cell-mark { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Компактная таблица без градиентов - для списков */
table.plain {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.plain th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
table.plain td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.plain tr:last-child td { border-bottom: none; }
table.plain tr:hover td { background: var(--surface-soft); }

/* Фото стиля: крупно, чтобы модель было видно */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  align-items: start;
}
.ref-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-soft);
  min-height: 300px;
  display: grid;
  place-items: center;
}
/* Референсы бывают широкими - два кадра рядом. Вписываем целиком, не обрезая. */
.ref-item img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}
.ref-remove {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px;
  border: none; border-radius: 50%;
  background: rgba(24, 24, 34, .6);
  color: #fff; cursor: pointer;
  font-size: 12px; line-height: 1;
  opacity: 0; transition: opacity .15s;
}
.ref-item:hover .ref-remove { opacity: 1; }
.ref-add {
  color: var(--text-faint);
  cursor: pointer;
  border-style: dashed;
  min-height: 300px;
}
.ref-add:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }

/* Обложка стиля в списке */
.style-card { padding-top: 0; overflow: hidden; }
.style-cover {
  margin: -1px -19px 12px;
  height: 200px;
  background: var(--surface-soft);
}
.style-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.style-cover.empty::after {
  content: "фото не добавлено";
  display: grid; place-items: center; height: 100%;
  color: var(--text-faint); font-size: 12px;
}

/* Карточки-папки: пастель как у папок на macOS, язычок сверху слева.
   Цвет закреплён за анализом (HomeView.folderClass) */
.project-card.folder {
  --f-top: #f7f3f4; --f: #ece5e8; --f-tab: #e2d8dd; --f-ink: #3c2a31; --f-soft: #8a7780;
  background: linear-gradient(180deg, var(--f-top) 0%, var(--f) 100%);
  border: none;
  border-radius: 4px 14px 14px 14px;
  margin-top: 13px;
  padding: 16px 18px 14px;
  overflow: visible;
  color: var(--f-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 10px 22px -16px rgba(70, 25, 45, .55);
  transition: transform .18s ease, box-shadow .18s ease;
}
.project-card.folder::before {
  content: ""; position: absolute; left: 0; top: -11px;
  width: 40%; height: 15px;
  background: var(--f-tab);
  border-radius: 9px 14px 0 0;
}
.project-card.folder::after {
  /* тонкая «задняя стенка» папки под язычком */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  border-radius: 0 14px 0 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), transparent);
  pointer-events: none;
}
.project-card.folder:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 16px 28px -16px rgba(70, 25, 45, .6);
}
/* Аналитик в разделе отдела: ещё не отправленное - бледное */
.project-card.pd-unsent { opacity: .55; filter: saturate(.6); transition: opacity .4s ease, filter .4s ease, transform .18s ease; }
.project-card.pd-unsent:hover { opacity: .9; filter: none; }
.folder .title { color: var(--f-ink); }
.folder .meta, .folder .stat-lbl, .folder .muted { color: var(--f-soft); }
.folder .stats { border-top-color: rgba(255,255,255,.5); }
.folder .badge { background: rgba(255,255,255,.6); border-color: rgba(255,255,255,.8); color: var(--f-ink); }
.folder.style-card { padding-top: 14px; }
.folder .style-cover {
  margin: 0 0 12px; height: 180px; padding: 6px;
  background: rgba(255,255,255,.6); border-radius: 10px;
  box-shadow: 0 2px 8px -4px rgba(60, 20, 40, .35);
}
.folder .style-cover img { border-radius: 6px; }
.folder .style-cover.empty::after { color: var(--f-soft); }
.folder .card-foot .btn {
  background: rgba(255,255,255,.5); border-color: rgba(255,255,255,.75); color: var(--f-ink);
}
.folder .card-foot .btn:hover { background: rgba(255,255,255,.82); }
.folder .card-foot .btn-primary { background: rgba(255,255,255,.92); color: #b83a64; font-weight: 600; }
.folder .card-foot .pd-sent { background: rgba(232, 244, 225, .92); border-color: #cfe5c2; color: #3d6b2a; }
.folder .card-foot .card-del:hover { color: #b44; border-color: #e9b4b4; }
.folder.f-mauve  { --f-top: #e2cdd7; --f: #c9a7b8; --f-tab: #b9929f; --f-ink: #3a2330; --f-soft: #6d5160; }
.folder.f-pink   { --f-top: #fadbe6; --f: #efb9cc; --f-tab: #e3a3b9; --f-ink: #4a2333; --f-soft: #8a5a6c; }
.folder.f-greige { --f-top: #e8e2d5; --f: #cfc6b4; --f-tab: #bfb49f; --f-ink: #3b3427; --f-soft: #6f6656; }
.folder.f-rose   { --f-top: #efcbd0; --f: #d9a3ac; --f-tab: #c98c97; --f-ink: #44222a; --f-soft: #7a4e57; }
.folder.f-peach  { --f-top: #f5dad4; --f: #e6b6ae; --f-tab: #d9a097; --f-ink: #4a2a25; --f-soft: #84594f; }
.folder.f-mist   { --f-top: #f5f3f2; --f: #e2dfdd; --f-tab: #d4d0cd; --f-ink: #333033; --f-soft: #7a7573; }
.folder.f-plum   { --f-top: #93304f; --f: #6e1934; --f-tab: #5a1229; --f-ink: #fff4f7; --f-soft: #efc3d1; }
.folder.f-plum .card-foot .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff4f7; }
.folder.f-plum .card-foot .btn:hover { background: rgba(255,255,255,.26); }
.folder.f-plum .card-foot .btn-primary { background: #fff4f7; color: #8e2b4c; }
.folder.f-plum .card-foot .pd-sent { background: rgba(232, 244, 225, .92); border-color: #cfe5c2; color: #3d6b2a; }
.folder.f-plum .stats { border-top-color: rgba(255,255,255,.18); }

/* Отдел продаж (sales.js) */
.sl-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.65); white-space: nowrap; }
.sl-status.sl-in_work { background: #fdf0d4; color: #8a6420; }
.sl-status.sl-done { background: #e3f2da; color: #3d6b2a; }
.sl-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sl-note { border-left: 3px solid var(--accent); }
.sl-note-head { font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.sl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sl-table th { text-align: left; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.sl-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sl-table tr.sl-group td {
  padding: 16px 12px 6px; border-bottom: none; font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep);
}
.sl-label { width: 34%; color: var(--text-soft); }
.sl-hint { font-size: 11.5px; color: var(--text-faint); font-weight: 400; }
.sl-val { font-weight: 600; cursor: copy; border-radius: 6px; transition: background .15s; }
.sl-val:hover { background: var(--accent-soft); }
.sl-val.muted { cursor: default; font-weight: 400; }
.sl-val.muted:hover { background: none; }
.sl-copy { width: 40px; text-align: right; }
.sl-inputs .field { min-width: 150px; }
.sl-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sl-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.sl-photo { display: block; aspect-ratio: 3 / 4; background: var(--surface-soft); }
.sl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-item-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.sl-item-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-item-brand { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-item-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-soft); }
.sl-item-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sl-item-links .chip { text-decoration: none; color: inherit; }
.sl-handoff { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-color: var(--accent-line); }
.sl-confirm { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.card-foot .sl-btn { flex: 1 1 100%; justify-content: center; }

/* Воронка Jam */
.funnel { display: flex; gap: 10px; flex-wrap: wrap; }
.funnel-step {
  flex: 1; min-width: 120px;
  padding: 12px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  text-align: center;
}
.funnel-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.funnel-label { font-size: 11.5px; color: var(--text-faint); }
.funnel-extra { font-size: 11.5px; color: var(--accent-deep); margin-top: 2px; }

/* Полосы размеров и запросов в итоге */
.size-bars { display: flex; flex-direction: column; gap: 7px; }
.size-bar { display: flex; align-items: center; gap: 10px; }
.size-bar-name { min-width: 70px; font-size: 12.5px; font-weight: 500; }
.size-bar .mini-bar { flex: 1; height: 9px; margin: 0; }
.size-bar-value { min-width: 96px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }

/* Юнит-экономика */
.unit-summary {
  display: flex; gap: 26px; flex-wrap: wrap;
  padding: 12px 0 4px; border-bottom: 1px solid var(--line);
}
.unit-tile { min-width: 96px; }
.unit-tile-val { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.unit-photo {
  width: 40px; height: 52px; border-radius: 6px; overflow: hidden;
  background: var(--surface-2); flex: none;
}
.unit-photo img { width: 100%; height: 100%; object-fit: cover; }
.unit-photo.empty { border: 1px dashed var(--line); }

.unit-tile .stat-lbl { color: var(--text-faint); font-size: 11.5px; }
.unit-tile-val.good { color: #3f7d52; }
.unit-tile-val.warn { color: #97742c; }
.unit-tile-val.bad { color: #b4485f; }

/* Широкие страницы: таблица юнитки занимает всю ширину */
.main.main-wide { padding: 18px 20px 40px; }

/* Шапка раздела: книга и вкладки листов */
.unit-head { margin-bottom: 12px; }
.unit-head-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.unit-head-top h1 { font-size: 20px; color: var(--accent-deep); }
.unit-book-pick { width: auto; min-width: 200px; padding: 5px 10px; font-size: 13px; }
.unit-book-name {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-soft); background: var(--surface);
}
.unit-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.unit-tabs-sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 6px; }
.unit-tab {
  border: 1px solid transparent; background: transparent; border-radius: 20px;
  padding: 5px 12px; font: inherit; font-size: 12.5px; color: var(--text-soft); cursor: pointer;
}
.unit-tab:hover { background: var(--surface); border-color: var(--line); color: var(--text); }
.unit-tab.on {
  background: var(--accent-soft); border-color: var(--accent-line);
  color: var(--accent-deep); font-weight: 500;
}

/* Переключатель из нескольких кнопок */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px;
}
.seg-btn {
  border: none; background: transparent; padding: 4px 11px; border-radius: 6px;
  font: inherit; font-size: 12.5px; color: var(--text-soft); cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--surface); color: var(--accent-deep); font-weight: 500;
  box-shadow: 0 1px 2px rgba(30, 30, 45, .08); }

/* Всплывающее меню */
.unit-pop {
  position: fixed; z-index: 60; min-width: 200px; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift); padding: 6px;
}
.unit-pop-item { padding: 7px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.unit-pop-item:hover { background: var(--surface-soft); }
.unit-pop-item.danger { color: #b4485f; }
.ug-presets { display: flex; gap: 6px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line);
  margin-bottom: 4px; flex-wrap: wrap; }
.ug-block-row { display: flex; align-items: center; gap: 6px; padding: 2px 4px; }
.ug-block-row label { display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  cursor: pointer; min-width: 0; }
.ug-block-row label span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ug-block-row .grow { flex: 1; }

/* --- Таблица юнитки --- */
.ug-card { padding: 12px 14px 14px; }
.ug-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ug-toolbar .grow { flex: 1; }
.ug-label { font-size: 12px; color: var(--text-faint); }
.ug-search { width: 230px !important; padding: 6px 10px !important; font-size: 13px !important; }
.ug-card .unit-summary { padding: 8px 2px 10px; border-bottom: none; gap: 30px; }

.ug-wrap {
  overflow: auto;
  max-height: calc(100vh - 250px);
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
table.ug {
  border-collapse: separate; border-spacing: 0;
  width: max-content; min-width: 100%;
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.ug th, .ug td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ug thead th {
  position: sticky; z-index: 3;
  background: var(--surface-soft);
  font-weight: 600; color: var(--text-soft);
}
.ug tr.ug-groups th { top: 0; height: 30px; font-size: 11.5px; }
.ug tr.ug-cols th { top: 30px; height: 46px; }

.ug th.ug-g {
  text-align: center; padding: 4px 8px; cursor: pointer;
  border-left: 2px solid var(--line-strong); color: var(--text);
}
.ug th.ug-g:hover { background: var(--accent-soft); color: var(--accent-deep); }
/* Подпись блока прилипает к левому краю, пока блок виден - иначе
   у широкого блока название уезжает за экран */
.ug th.ug-g:not(.ug-g-off) { text-align: left; }
.ug-g-name {
  display: inline-block; position: sticky; left: 320px;
  max-width: 420px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.warn-badge {
  font-size: 11px; line-height: 1; padding: 2px 4px; border-radius: 4px;
  background: var(--warn-soft); color: #97742c; cursor: help;
}
.ug th.ug-g-in { background: #fdf2f5; }
.ug th.ug-g-off, .ug td.ug-g-off {
  width: 26px; min-width: 26px; max-width: 26px; padding: 0;
  border-left: 2px solid var(--line-strong);
  background: repeating-linear-gradient(135deg, #f6f6f8 0 6px, #fbfbfc 6px 12px);
}
.ug th.ug-g-off { cursor: pointer; vertical-align: top; }
.ug th.ug-g-off:hover { background: var(--accent-soft); }
.ug-vert {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 10.5px; font-weight: 500; color: var(--text-faint);
  padding: 8px 0; max-height: 76px; overflow: hidden; text-overflow: ellipsis; margin: 0 auto;
}

.ug th.ug-c {
  padding: 4px 7px; font-size: 11px; line-height: 1.25; font-weight: 500;
  white-space: normal; text-align: center; vertical-align: middle; cursor: pointer;
}
.ug th.ug-c:hover { color: var(--text); }
.ug th.ug-c-in { background: #fdf2f5; color: var(--accent-deep); }
.ug-c-name {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ug-sort { color: var(--accent); font-size: 11px; margin-left: 2px; }
.ug .ug-first { border-left: 2px solid var(--line-strong); }

/* Закреплённые слева и справа колонки */
.ug .ug-act {
  position: sticky; left: 0; z-index: 2;
  width: 58px; min-width: 58px; max-width: 58px;
  text-align: center; background: var(--surface);
}
.ug .ug-prod {
  position: sticky; left: 58px; z-index: 2;
  width: 250px; min-width: 250px; max-width: 250px;
  background: var(--surface);
  border-right: 1px solid var(--line-strong);
  box-shadow: 4px 0 6px -4px rgba(30, 30, 45, .12);
}
.ug thead .ug-act, .ug thead .ug-prod { z-index: 5; top: 0; background: var(--surface-soft); }
.ug thead .ug-prod { text-align: center; font-size: 12px; }
.ug-act-in { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; }
.ug-act-in b { color: var(--accent-deep); font-size: 12px; }
.ug input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.ug .ug-total {
  position: sticky; right: 0; z-index: 2;
  width: 98px; min-width: 98px; text-align: center; font-weight: 600;
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  box-shadow: -4px 0 6px -4px rgba(30, 30, 45, .12);
}
.ug thead .ug-total { z-index: 5; top: 0; font-size: 11.5px; white-space: normal; }
.ug td.ug-total.good { background: var(--good-soft); color: #3f7d52; }
.ug td.ug-total.warn { background: var(--warn-soft); color: #97742c; }
.ug td.ug-total.bad { background: var(--bad-soft); color: #b4485f; }

.ug tbody tr { height: 56px; }
.ug tbody tr:hover td { background-color: #fdfbfc; }
.ug tbody tr:hover td.ug-act, .ug tbody tr:hover td.ug-prod { background-color: #fbf7f8; }
.ug tr.ug-paused td { color: var(--text-faint); }
.ug tr.ug-paused .ug-photo { opacity: .5; }

.ug td.ug-cell { padding: 4px 9px; text-align: right; }
.ug td.ug-left { text-align: left; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ug td.ug-calc { background: #fcfcfd; color: var(--text-soft); }
.ug td.ug-in { cursor: text; color: var(--text); }
.ug td.ug-in:hover { box-shadow: inset 0 0 0 1px var(--accent-line); background: #fff; }
.ug td.ug-off {
  cursor: default;
  background: repeating-linear-gradient(135deg, transparent 0 5px, #f2f2f5 5px 6px);
}
.ug td.ug-off:hover { box-shadow: none; }
.ug td.ug-flag { background: var(--warn-soft); }
.ug td.ug-err, .ur-calc-val.ug-err { color: #b4485f; font-size: 11px; }
.ug td.ug-good { background: var(--good-soft); color: #3f7d52; font-weight: 600; }
.ug td.ug-warn { background: var(--warn-soft); color: #97742c; font-weight: 600; }
.ug td.ug-bad { background: var(--bad-soft); color: #b4485f; font-weight: 600; }
.ug td.ug-neg { color: #b4485f; }
.ug td.editing { box-shadow: inset 0 0 0 2px var(--accent); }
.ug td.saving { opacity: .45; }
.ug td.ug-empty { padding: 30px; text-align: center; color: var(--text-faint); }

.ug-prod-in { display: flex; align-items: center; gap: 10px; padding: 4px 8px; position: relative; }
.ug-photo {
  width: 38px; height: 46px; flex: none; border-radius: 6px; overflow: hidden;
  background: var(--surface-soft); cursor: pointer; display: grid; place-items: center;
  color: var(--text-faint); font-size: 15px; position: relative;
}
.ug-photo.no-photo { border: 1px dashed var(--line-strong); }
.ug-photo:hover { outline: 2px solid var(--accent-line); }
.ug-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ug-prod-text { min-width: 0; flex: 1; cursor: pointer; }
.ug-prod-text:hover .ug-prod-title { color: var(--accent-deep); }
.ug-prod-title { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.ug-prod-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ug-sku { font-size: 11.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; }
.ug-badges { display: inline-flex; gap: 3px; flex: none; }
.mp-badge, .sch-badge {
  font-size: 10px; font-weight: 600; line-height: 1; padding: 3px 5px; border-radius: 4px;
  letter-spacing: .02em;
}
.mp-badge.mp-wb { background: #f3e8fb; color: #8a3fb8; }
.mp-badge.mp-ozon { background: #e6f0fd; color: #2e6bc6; }
.sch-badge { background: var(--surface-soft); color: var(--text-soft); border: 1px solid var(--line); }
.ug-prod-actions {
  display: none; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: var(--surface); border-radius: 8px; box-shadow: var(--shadow);
}
.ug-prod-actions .icon-btn { width: 26px; height: 26px; font-size: 13px; }
.ug tbody tr:hover .ug-prod-actions { display: flex; }

/* Редактор поверх ячейки */
.cell-editor {
  z-index: 80; margin: 0; border-radius: 0 !important;
  border: 2px solid var(--accent) !important; box-shadow: var(--shadow-lift) !important;
  padding: 2px 7px !important; font-size: 12.5px !important; background: #fff;
}

/* Справочные листы */
.us-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.us-title { font-weight: 600; font-size: 14px; }
.us-notes { font-size: 12px; color: var(--text-faint); max-width: 640px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-wrap { margin-top: 8px; max-height: calc(100vh - 230px); }
table.us {
  border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%;
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.us th, .us td {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 5px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: right; height: 30px;
}
.us thead { position: sticky; top: 0; z-index: 4; }
.us thead th {
  background: var(--surface-soft); font-weight: 600; font-size: 11.5px; color: var(--text-soft);
  white-space: normal; text-align: center; vertical-align: middle; line-height: 1.25; height: auto;
}
.us .us-num {
  position: sticky; left: 0; z-index: 2; width: 40px; min-width: 40px; max-width: 40px;
  background: var(--surface-soft); color: var(--text-faint); font-size: 10.5px; text-align: center;
  font-weight: 400;
}
.us thead .us-num { z-index: 5; }
.us .us-stick { position: sticky; z-index: 2; background: var(--surface); }
.us thead .us-stick { z-index: 5; background: var(--surface-soft); }
.us td.us-stick { border-right: 1px solid var(--line-strong); }
.us td.ug-left { text-align: left; }
.us td.us-b { font-weight: 600; color: var(--text); }
.us td.us-f { background: #f7f7f9; color: var(--text-soft); font-style: italic; }
.us td.us-in { cursor: text; }
.us td.us-in:hover { box-shadow: inset 0 0 0 1px var(--accent-line); background: #fff; }
.us td.us-e { box-shadow: inset 3px 0 0 var(--accent); background: #fff8fa; }
.us td.us-section-cell {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .03em;
  color: var(--accent-deep); background: #fdf6f8;
}
.us td.saving { opacity: .45; }
.us-legend { display: flex; gap: 18px; margin-top: 8px; font-size: 11.5px; color: var(--text-faint); }
.us-legend span { display: inline-flex; align-items: center; gap: 6px; }
.us-sw { width: 14px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid var(--line); }
.us-sw-in { background: #fff; }
.us-sw-f { background: #f0f0f3; }
.us-sw-e { background: #fff8fa; box-shadow: inset 3px 0 0 var(--accent); }

/* Карточка товара */
.ur-top { display: flex; gap: 16px; align-items: stretch; margin-bottom: 14px; }
.ur-photo-col { display: flex; gap: 12px; align-items: flex-start; }
.ur-photo {
  width: 96px; height: 124px; border-radius: var(--radius-sm); overflow: hidden; flex: none;
  background: var(--surface-soft); display: grid; place-items: center; font-size: 12px;
  border: 1px solid var(--line);
}
.ur-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ur-photo-ctl { display: flex; flex-direction: column; gap: 6px; width: 210px; }
.ur-photo-ctl input { padding: 6px 9px; font-size: 12.5px; }
.ur-totals-card { flex: 1; border-color: var(--accent-line); padding: 12px 16px; min-width: 0; }
.ur-calc details { border-top: 1px solid var(--line); padding: 8px 0; }
.ur-calc summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
}
.ur-calc-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 4px 24px; padding: 8px 0 2px;
}
.ur-calc-row { display: flex; gap: 10px; font-size: 12.5px; border-bottom: 1px dotted var(--line);
  padding: 2px 0; }
.ur-calc-name { flex: 1; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.ur-calc-val { font-variant-numeric: tabular-nums; font-weight: 500; }
.unit-off-note { display: none; font-size: 10.5px; color: var(--text-faint); margin-top: 3px; }
.unit-field.off input, .unit-field.off select { opacity: .4; background: var(--surface-soft); }
.unit-field.off .unit-off-note { display: block; }
.unit-field.off .unit-hint { display: none; }

.unit-totals { display: flex; gap: 22px; flex-wrap: wrap; padding: 4px 0 2px; }
.unit-form { display: flex; flex-direction: column; gap: 16px; }
.unit-group { border-top: 1px solid var(--line); padding-top: 12px; }
.unit-group-title {
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--accent-deep); margin-bottom: 10px;
}
.unit-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px;
}
.unit-field label {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12px; color: var(--text-soft); margin-bottom: 4px;
}
.unit-field input, .unit-field select { width: 100%; }
.unit-letter { font-size: 10px; color: var(--text-faint); font-family: var(--mono); }
.unit-hint { font-size: 10.5px; color: var(--text-faint); margin-top: 3px; }

/* Карточки единорогов */
.unicorn-list { display: flex; flex-direction: column; }
.unicorn-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.unicorn-row:first-child { border-top: none; }
.unicorn-name {
  font-weight: 600; font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.unicorn-why { font-size: 12.5px; color: var(--text-soft); margin-top: 5px; line-height: 1.45; }
.unicorn-nums { display: flex; gap: 16px; flex: none; }
.unicorn-nums > div { text-align: right; min-width: 74px; }
.unicorn-nums b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.unicorn-charts { display: flex; gap: 10px; flex: none; }
.spark-box { text-align: center; }

/* Выбор категории для сбора из MPStats */
.cat-list {
  margin-top: 10px; max-height: 320px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: var(--surface-2); }
.cat-row.on { background: var(--accent-soft); }
.cat-row.muted-row { color: var(--text-faint); }
.cat-name { font-weight: 500; }
.cat-path { color: var(--text-faint); font-size: 11.5px; margin-left: 10px; }
.cat-picked { margin-top: 10px; font-size: 13px; }

/* Полоса хода сбора */
.progress {
  margin-top: 12px; height: 6px; border-radius: 3px;
  background: var(--line); overflow: hidden;
}
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.month-year {
  min-width: 42px; font-size: 11.5px; color: var(--text-faint);
  display: flex; align-items: center; font-variant-numeric: tabular-nums;
}

/* Клиенты (скрытый раздел) */
.client-mark {
  margin-top: auto; padding: 12px 14px 4px;
  font-size: 11px; color: var(--text-faint); cursor: pointer;
  letter-spacing: .02em;
}
.client-mark:hover { color: var(--accent-deep); }

.client-list { display: flex; flex-direction: column; }
.client-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.client-row:first-child { border-top: none; }
.client-row.on { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.client-row select { max-width: 240px; margin-left: auto; }
.client-row .grow { min-width: 220px; }

/* Размерная сетка */
.sizing-grid input.attr-input { width: 82px; text-align: center; }
.sizing-grid th { white-space: nowrap; font-size: 11.5px; }
.sizing-grid td { padding: 3px 4px; }
tr.row-big td { background: var(--accent-soft); }

.issue-list { display: flex; flex-direction: column; gap: 14px; }
.issue { border-left: 3px solid var(--line); padding: 2px 0 2px 14px; }
.issue-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.issue-level { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.issue-area { font-size: 11.5px; color: var(--text-faint); }
.issue-title { font-weight: 600; font-size: 14px; }
.issue-detail { font-size: 13px; margin-top: 4px; }
.issue-advice {
  font-size: 13px; line-height: 1.5; margin-top: 6px;
  color: var(--text-soft); border-left: 2px solid var(--accent-line);
  padding-left: 10px;
}

/* Загруженные выгрузки запросов */
.file-list { margin-top: 12px; display: flex; flex-direction: column; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px;
}

/* Что изменить в товаре - список рекомендаций по частоте жалоб */
.advice-list { display: flex; flex-direction: column; gap: 10px; }
.advice-item { display: flex; gap: 12px; align-items: flex-start; }
.advice-num {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 12px; font-weight: 600; display: flex;
  align-items: center; justify-content: center;
}
.advice-text { font-size: 13.5px; line-height: 1.45; }

/* Сами отзывы */
.review-list { max-height: 520px; overflow-y: auto; margin-top: 10px; }
.review-item { padding: 10px 0; border-top: 1px solid var(--line); }
.review-item:first-child { border-top: none; }
.review-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 11.5px; margin-bottom: 4px;
}
.review-stars { color: var(--warn); letter-spacing: 1px; }
.review-stars.low { color: var(--bad); }
.review-text { font-size: 13px; line-height: 1.5; color: var(--text); }
.tag {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--text-faint);
}
.tag-bad { border-color: var(--bad); color: var(--bad); }
.tag-good { border-color: var(--good); color: var(--good); }

.grade-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.verdict-score { text-align: center; min-width: 120px; }

/* Сравнение стилей */
.compare-cover {
  width: 100%; max-width: 150px; height: 120px;
  object-fit: contain; display: block; margin: 0 auto 6px;
  background: var(--surface-soft); border-radius: 6px;
}
.compare-table th { vertical-align: top; padding: 8px 10px; }
.compare-table td { min-width: 130px; }
.compare-best {
  background: var(--good-soft) !important;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #cfe7d4;
}

/* Свод по конкурентам: фото крупно, графики по дням */
.rivals-table td.dim, .rivals-table th.dim {
  width: 330px; min-width: 330px; max-width: 330px;
  white-space: normal;
}
.rival-photo {
  width: 78px; min-width: 78px; height: 104px;
  border-radius: 6px; overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.rival-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rival-photo.empty::after {
  content: "нет фото"; display: grid; place-items: center; height: 100%;
  color: var(--text-faint); font-size: 10px;
}
.rival-place { font-size: 10.5px; color: var(--text-faint); font-weight: 600; }
.rival-name {
  font-weight: 500; font-size: 12.5px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.spark-cell { padding: 4px 6px !important; }
.spark { display: block; line-height: 0; position: relative; }
.spark svg { display: block; cursor: crosshair; }
.spark-tip {
  position: absolute; bottom: 100%; transform: translateX(-50%);
  background: var(--text); color: #fff;
  font-size: 10.5px; line-height: 1.3; white-space: nowrap;
  padding: 3px 7px; border-radius: 5px;
  opacity: 0; transition: opacity .12s; pointer-events: none; z-index: 6;
}
.rival-photo.small { width: 52px; min-width: 52px; height: 70px; }

/* Подсветка процента выкупа */
.buyout-good { background: var(--good-soft) !important; color: #3f7d52; font-weight: 600; }
.buyout-warn { background: var(--warn-soft) !important; color: #97742c; font-weight: 600; }
.buyout-bad { background: var(--bad-soft) !important; color: #b4485f; font-weight: 600; }

/* Панель периода */
.period-bar .period-field {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-soft);
}
.period-bar input[type="month"] { width: 150px; }

/* Графики */
.chart-box { width: 100%; overflow-x: auto; }
.chart { display: block; min-width: 100%; }
.chart-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 6px; font-size: 12px; color: var(--text-soft);
}
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart-line { width: 14px; height: 2.5px; border-radius: 2px; display: inline-block; }

.mini-bar {
  height: 5px; background: var(--surface-soft); border-radius: 3px;
  overflow: hidden; margin-top: 3px; min-width: 40px;
}
.mini-bar-fill { height: 100%; border-radius: 3px; }

/* Свод по стилю: критерии читаются целиком, без обрезки */
table.data.wide-dim td.dim, table.data.wide-dim th.dim {
  width: auto;
  min-width: 260px;
  max-width: none;
  white-space: normal;
}

/* ТОП карточек: фото слева, показатели справа */
.top-group + .top-group { margin-top: 26px; }
.top-group-head {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.top-group-head h3 { font-size: 15px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}
.product-card {
  display: flex;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}
.product-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }

.pc-photo {
  position: relative;
  width: 96px;
  min-width: 96px;
  height: 128px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-soft);
}
.pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-photo.empty::after {
  content: "нет фото";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--text-faint); font-size: 11px;
}
.pc-place {
  position: absolute; top: 5px; left: 5px;
  background: rgba(24, 24, 34, .72);
  color: #fff; font-size: 10.5px; font-weight: 600;
  padding: 1px 6px; border-radius: 10px;
}

.pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }

/* Свои характеристики стиля */
.trait-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.trait-pill {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px;
  background: var(--surface-soft); min-width: 220px; max-width: 420px;
}
.trait-pill-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.trait-pill-head .muted { font-size: 11.5px; flex: 1; }
.trait-pill-head .icon-btn { width: 24px; height: 24px; font-size: 12px; }
.trait-values { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.trait-value {
  font-size: 11.5px; padding: 2px 8px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-soft);
}
.trait-add {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: none;
  padding: 8px 16px; font: inherit; font-size: 13px; color: var(--text-soft); cursor: pointer;
}
.trait-add:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.pc-traits { display: flex; flex-direction: column; gap: 4px; margin-top: 2px;
  padding-top: 6px; border-top: 1px dashed var(--line); }
.pc-trait { display: flex; flex-direction: column; gap: 3px; }
.pc-trait-name { font-size: 11px; color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-trait .chips { gap: 4px; }
.chip.chip-sm { padding: 2px 8px; font-size: 11.5px; }
.chip.chip-add { color: var(--text-faint); border-style: dashed; }

.type-toggle {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-soft);
  cursor: pointer; white-space: nowrap;
}
.type-toggle input { accent-color: var(--accent); width: 15px; height: 15px; }

/* --- Вход и регистрация --- */
body.auth-mode .sidebar { display: none; }
body.auth-mode .main { padding: 0; }
body.auth-mode .nav-toggle, body.auth-mode .nav-backdrop { display: none; }
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(circle at 20% 10%, var(--accent-soft), transparent 55%), var(--bg);
}
.auth-card {
  width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lift); padding: 28px 28px 24px;
}
.auth-card h1 { margin-bottom: 6px; }
.auth-card input[type="email"], .auth-card input[type="password"] {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font: inherit; font-size: 13.5px;
}
.auth-error { color: #b4485f; font-size: 12.5px; min-height: 18px; margin-bottom: 8px; }

/* Кто вошёл - внизу меню */
.me-mark {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px;
  border-top: 1px solid var(--line);
}
.me-mark .grow { flex: 1; min-width: 0; }
.me-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-pos { font-size: 11.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Продуктовый отдел --- */
.pd-card { display: flex; flex-direction: column; }
.pd-cover { margin: -16px -18px 10px; height: 150px; background: var(--surface-soft);
  border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.pd-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block; }
.pd-summary-short {
  font-size: 12.5px; color: var(--text-soft); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-status {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
  background: var(--surface-soft); color: var(--text-soft); border: 1px solid var(--line);
}
.pd-case-new { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-line); }
.pd-case-in_work, .pd-in_progress { background: var(--warn-soft); color: #97742c; border-color: #f1dfb4; }
.pd-case-done, .pd-done { background: var(--good-soft); color: #3f7d52; border-color: #cfe7d4; }
.pd-mine { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pd-mine .grow { flex: 1; min-width: 0; }
.pd-mine a { font-size: 12px; }
.pd-due { font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.pd-due.late, .pd-due-box.late input { color: #b4485f; font-weight: 600; }
.pd-tasks { display: flex; flex-direction: column; }
.pd-task {
  display: grid; grid-template-columns: 120px 1fr 220px 140px 28px; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.pd-task.done .pd-text { color: var(--text-faint); text-decoration: line-through; }
.pd-text { font-size: 13.5px; padding: 4px 6px; border-radius: 6px; outline: none; }
.pd-text:focus { background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.pd-task select, .pd-new select, .pd-date {
  width: 100%; padding: 5px 8px !important; font-size: 12.5px !important;
}
.pd-status-sel { font-weight: 600; border-radius: 14px !important; }
.pd-status-sel.pd-todo { color: var(--text-soft); }
.pd-new {
  display: grid; grid-template-columns: 1fr 220px 140px auto; gap: 10px; align-items: center;
  margin-top: 12px;
}
.pd-handoff { border-color: var(--accent-line); }
.pd-handoff-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .pd-task, .pd-new { grid-template-columns: 1fr; }
}

/* Режим продуктового отдела: кнопки механики прячем */
.pd-mode .ug-prod-actions, .pd-mode .unit-head-top .icon-btn,
.pd-mode .ug-toolbar .btn-primary, .pd-mode .us-legend, .pd-mode .mech { display: none !important; }
.pd-mode .ug td.ug-in { cursor: default; }
.pd-mode .ug td.ug-in:hover { box-shadow: none; }

/* --- Разделы меню --- */
.nav-section { margin-top: 6px; }
.nav-group {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--text-soft); cursor: pointer; user-select: none;
}
.nav-group:hover { background: var(--surface-soft); }
.nav-group .ico { width: 16px; text-align: center; }
.nav-caret { transition: transform .15s; font-size: 11px; }
.nav-group:not(.open) .nav-caret { transform: rotate(-90deg); }
.nav-group-body { padding-left: 8px; border-left: 1px solid var(--line); margin-left: 17px; }
.conclusion-read {
  white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; padding: 10px 12px;
  background: var(--surface-soft); border-radius: var(--radius-sm);
}

/* --- Задачи --- */
.tk-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.tk-row:hover { background: var(--surface-soft); }
.tk-row .grow { flex: 1; min-width: 0; }
.tk-row.done .tk-title { color: var(--text-faint); text-decoration: line-through; }
.tk-row.high .tk-title::before { content: "! "; color: #b4485f; font-weight: 700; }
.tk-title { font-size: 13.5px; }
.tk-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.tk-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--surface-soft);
  color: var(--text-soft); border: 1px solid var(--line);
}
.tk-tag.late { color: #b4485f; border-color: var(--bad); background: var(--bad-soft); }
.tk-tag.sku { font-family: var(--mono); }
.tk-tag.prog { background: var(--warn-soft); color: #97742c; border-color: #f1dfb4; }
.task-check {
  width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: var(--surface); cursor: pointer; margin-top: 1px; padding: 0;
}
.task-check.tiny { width: 15px; height: 15px; }
.task-check.on { background: var(--good); border-color: var(--good); position: relative; }
.task-check.on::after { content: "✓"; color: #fff; font-size: 11px; position: absolute; inset: 0;
  display: grid; place-items: center; line-height: 1; }
.tk-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tk-bar .grow { flex: 1; }
.tk-nav { display: flex; align-items: center; gap: 4px; }
.tk-range { font-weight: 600; font-size: 14px; min-width: 150px; text-align: center; }
.weekbar {
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 12px;
}
.weekbar.drop { border-color: var(--accent); background: var(--accent-soft); }
.weekbar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.weekbar-head .grow { flex: 1; }
.weekbar-title { font-weight: 600; }
.weekbar-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.tk-week { display: grid; gap: 8px; }
.tk-day {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 260px; display: flex; flex-direction: column;
}
.tk-day.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tk-day.drop, .tk-mcell.drop { background: var(--accent-soft); }
.tk-day-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 10px 4px; }
.tk-dow { font-size: 11px; color: var(--text-faint); text-transform: uppercase; }
.tk-dnum { font-size: 18px; font-weight: 600; }
.day-add {
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px; width: 22px; height: 22px;
  cursor: pointer; color: var(--text-soft); font-size: 14px; line-height: 1;
}
.day-add:hover { border-color: var(--accent); color: var(--accent-deep); }
.tk-day-body { padding: 4px 6px 8px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.tk-empty { font-size: 11.5px; color: var(--text-faint); text-align: center; padding: 14px 0; }
.tk-chip {
  display: flex; gap: 7px; align-items: flex-start; padding: 6px 7px; border-radius: 8px;
  background: var(--surface-soft); border: 1px solid var(--line); cursor: pointer; font-size: 12.5px;
}
.tk-chip:hover { border-color: var(--accent-line); }
.tk-chip .grow { flex: 1; min-width: 0; }
.tk-chip.done .tk-chip-title { color: var(--text-faint); text-decoration: line-through; }
.tk-chip.high { border-left: 3px solid #e88b8b; }
.tk-chip.late { background: var(--bad-soft); }
.tk-chip-title { line-height: 1.3; overflow-wrap: anywhere; }
.tk-chip-meta { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.tk-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.tk-mdow { font-size: 11px; color: var(--text-faint); text-align: center; text-transform: uppercase; padding: 4px; }
.tk-mcell {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-height: 96px;
  padding: 4px 5px; display: flex; flex-direction: column; gap: 3px;
}
.tk-mcell.out { opacity: .45; }
.tk-mcell.today { border-color: var(--accent); }
.tk-mhead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; }
.tk-mchip {
  font-size: 11px; padding: 2px 5px; border-radius: 5px; background: var(--surface-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.tk-mchip.week { background: var(--accent-soft); }
.tk-mchip.done { text-decoration: line-through; color: var(--text-faint); }
.tk-mchip.late { background: var(--bad-soft); }
.tk-week-tag { font-size: 9.5px; font-weight: 700; color: var(--accent-deep); margin-right: 4px; }
.tk-more { font-size: 10.5px; color: var(--text-faint); }

/* --- Итог категории --- */
.cs-group h3 { margin-bottom: 10px; }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.cs-tile { background: var(--surface-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.cs-val { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cs-val.good { color: #3f7d52; } .cs-val.bad { color: #b4485f; } .cs-val.warn { color: #97742c; }
.cs-lbl { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.cs-hint { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.cs-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }

/* --- Сезонность --- */
.sv-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.sv-table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 11px; }
.sv-table th, .sv-table td { border: 1px solid var(--line); padding: 3px 4px; text-align: center; vertical-align: middle; }
.sv-table th { background: var(--surface-soft); font-weight: 600; color: var(--text-soft); }
.sv-table th.sv-name, .sv-table td.sv-name { width: 230px; text-align: left; }
.sv-table td.sv-name { font-size: 12px; }
.sv-table th.sv-group { font-size: 13px; color: var(--text); }
.sv-table .sv-col { width: 92px; }
.sv-table .sv-act { width: 230px; text-align: left; font-size: 10.5px; color: var(--text-soft); }
.sv-act-in { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.sv-table .sv-x { width: 56px; white-space: nowrap; }
.sv-filter { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sv-filter .sv-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.sv-filter .chip { font-size: 12px; padding: 3px 10px; }
.sv-filter .chip-n { color: var(--text-faint); font-size: 11px; margin-left: 5px; }
.sv-filter-right { display: flex; align-items: center; gap: 10px; }
.sv-search { width: 230px; }
.sv-table .sv-x .icon-btn { width: 22px; height: 22px; font-size: 11px; display: inline-grid; place-items: center; margin: 0 1px; }
th.sv-spring { background: #eef6e6 !important; } th.sv-summer { background: #fdf3d6 !important; }
th.sv-autumn { background: #fbe7dc !important; } th.sv-winter { background: #e3edf8 !important; }
.sv-cell { line-height: 1.2; height: 34px; overflow: hidden; white-space: nowrap; font-size: 10.5px; padding: 3px 1px !important; }
.sv-fason td.sv-name { padding-left: 14px; color: var(--accent-deep); }
.sv-branch { color: var(--text-faint); }
.sv-launch { color: var(--text-faint); font-size: 10.5px; }
.st-born, .sv-legend i.st-born { background: #e7f3df; }
.st-grow, .sv-legend i.st-grow { background: #cfe8bf; }
.st-peak, .sv-legend i.st-peak { background: #a9d48f; font-weight: 600; }
.st-active, .sv-legend i.st-active { background: #bfe0a8; }
.st-sale, .sv-legend i.st-sale { background: #fbefc4; }
.st-end, .sv-legend i.st-end { background: #f4b7b7; }
.st-ny, .sv-legend i.st-ny { background: #5d8a4a; color: #fff; }
.st-low, .sv-legend i.st-low { background: #f1f1f4; color: var(--text-faint); }
.sv-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-soft); }
.sv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sv-legend i { width: 16px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--line); }

/* --- Команда --- */
.invite-row { display: flex; gap: 8px; align-items: center; }
.invite-row input { flex: 1; font-family: var(--mono); font-size: 12.5px; }
.team-flag { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; white-space: nowrap; }
.team-flag input { accent-color: var(--accent); }
tr.team-off td { color: var(--text-faint); }

/* Итог стиля: какой вариант интереснее */
.rank-card .auto-note { margin-bottom: 14px; }
.rank-grid { display: flex; flex-direction: column; gap: 12px; }
.rank-grid table.data td.dim, .rank-grid table.data th.dim,
.rank-card table.data td.dim, .rank-card table.data th.dim {
  width: 230px; min-width: 230px; max-width: 230px;
}
.rank-score { min-width: 110px; }
.rank-score b { font-size: 12px; margin-left: 6px; }
.rank-bar { display: inline-block; width: 64px; height: 7px; border-radius: 4px;
  background: var(--surface-soft); vertical-align: middle; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 4px; }
.rank-badge {
  margin-left: 8px; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px;
  background: var(--good-soft); color: #3f7d52;
}
tr.rank-best td { background: #f6fbf7; }
tr.rank-few td { color: var(--text-faint); }
td.rank-strong { color: #3f7d52; font-weight: 600; }
td.rank-weak { color: #b4485f; }

/* Разрезы по характеристикам */
.cut-controls { display: flex; flex-direction: column; gap: 10px; }
.cut-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cut-label { font-size: 12.5px; color: var(--text-soft); min-width: 86px; }
.cut-select { width: auto !important; padding: 5px 9px !important; font-size: 12.5px !important; }
.cut-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.cut-thumbs { display: flex; gap: 4px; }
.cut-thumb {
  width: 30px; height: 40px; border-radius: 4px; overflow: hidden; display: block;
  background: var(--surface-soft); border: 1px solid var(--line); flex: none;
}
.cut-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cut-chart-box { margin-bottom: 12px; }
.cut-chart { width: 100%; height: auto; display: block; }
.cut-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; margin-top: 4px; }
.cut-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cut-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.pc-name {
  font-weight: 500; font-size: 13px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-brand { font-size: 11.5px; color: var(--text-faint); }
.pc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-tag {
  font-size: 10.5px; padding: 1px 7px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-deep);
  border: 1px solid var(--accent-line);
}
.pc-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.pc-stat { display: flex; flex-direction: column; }
.pc-stat-val { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-stat-lbl { font-size: 10px; color: var(--text-faint); }

.pc-months { display: flex; gap: 5px; margin-top: 2px; }
.pc-month { flex: 1; text-align: center; min-width: 0; }
.pc-bar-wrap { height: 26px; display: flex; align-items: flex-end; }
.pc-bar { width: 100%; background: var(--accent-line); border-radius: 2px 2px 0 0; }
.pc-month-lbl { font-size: 9.5px; color: var(--text-faint); margin-top: 2px; }
.pc-month-val { font-size: 9.5px; color: var(--text-soft); }

.pc-link { align-self: flex-start; margin-top: auto; }

/* Раскрытие строки сводной до списка артикулов */
.drill-btn {
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 11px;
  padding: 0 5px 0 0;
  line-height: 1;
  transition: color .12s, transform .12s;
}
.drill-btn:hover { color: var(--accent); }
.drill-btn.open { color: var(--accent); }
.drill-row > td {
  background: var(--surface-soft) !important;
  padding: 12px 14px !important;
  white-space: normal;
  text-align: left;
  position: static;
}
.drill-box { max-width: 1100px; }
.drill-head { margin-bottom: 8px; font-size: 13px; }
.drill-row table.data { font-size: 12px; background: var(--surface); }
.drill-row table.data td.dim { position: static; }

/* Прирост к прошлому месяцу - второй строкой под значением */
.mom {
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--text-faint);
  margin-top: 1px;
}
.mom.num-neg { color: #c0576f; opacity: .85; }

.num-neg { color: #c0576f; }
.num-pos { color: #3f8b52; }
.muted { color: var(--text-faint); }
.mono { font-family: var(--mono); font-size: 12px; }

/* --- Блоки приближения --- */
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s;
}
.block.dragging { opacity: .45; }
.block.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.block-head .grow { flex: 1; min-width: 0; }
.block-title {
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 6px;
  margin: -3px -6px;
  cursor: text;
}
.block-title:hover { border-color: var(--line); }
.block-title:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.block-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; padding-left: 0; }
.block-body { padding: 14px 16px; }
.block-actions { display: flex; gap: 4px; align-items: center; }

.icon-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 14px;
  transition: all .12s;
}
.icon-btn:hover { background: var(--surface-soft); color: var(--text); border-color: var(--line); }
.icon-btn.ask:hover { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-line); }
.icon-btn.drag { cursor: grab; }
.icon-btn.drag:active { cursor: grabbing; }

/* Вывод под таблицей */
.conclusion { margin-top: 14px; }
.conclusion-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); font-weight: 600; margin-bottom: 6px;
}
.auto-note {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13px;
  color: var(--text-soft);
  white-space: pre-wrap;
  line-height: 1.6;
  margin-bottom: 12px;
}
.auto-note.collapsed { max-height: 78px; overflow: hidden; position: relative; }
.auto-note.collapsed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
  background: linear-gradient(to bottom, rgba(246,246,248,0), var(--surface-soft));
}
.conclusion textarea {
  background: var(--surface);
  border-color: var(--line);
}
.conclusion textarea::placeholder { color: var(--text-faint); }
.save-state { font-size: 11.5px; color: var(--good); opacity: 0; transition: opacity .2s; }
.save-state.on { opacity: 1; }

/* --- Панель задания (значок ?) --- */
.ask-panel {
  margin-top: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
.ask-panel h4 { font-size: 13px; color: var(--accent-deep); margin-bottom: 8px; }
.ask-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ask-context {
  font-size: 12px; color: var(--text-soft);
  background: var(--surface); border-radius: 6px;
  padding: 7px 9px; margin-bottom: 9px;
  border: 1px solid var(--accent-line);
}

/* --- Модалка --- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(24, 24, 34, .32);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  z-index: 100;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  width: min(720px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.modal.wide { width: min(1080px, 100%); }
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.modal-head .grow { flex: 1; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* --- Тосты --- */
.toasts {
  position: fixed; right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-lift);
  animation: toast-in .2s ease;
  max-width: 380px;
}
.toast.err { background: #b4485f; }
.toast.ok { background: #3f7d52; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* --- Прочее --- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  background: var(--surface-soft);
  color: var(--text-soft);
  border: 1px solid var(--line);
}
.badge.a { background: #eef2fb; border-color: #dbe3f5; color: #4a5f8e; }
.badge.b { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-deep); }
.badge.ok { background: var(--good-soft); border-color: #cfe7d4; color: #3f7d52; }
.badge.warn { background: var(--warn-soft); border-color: #f2e2bd; color: #97742c; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading { display: flex; align-items: center; gap: 10px; color: var(--text-soft); padding: 30px; justify-content: center; }

.scheme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}
.scheme-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  text-align: center;
}
.scheme-item img { width: 100%; height: 132px; object-fit: cover; display: block; background: var(--surface-soft); }
.scheme-item .cap { padding: 6px 8px; font-size: 12px; font-weight: 500; }
.scheme-item .add {
  height: 132px; display: grid; place-items: center;
  color: var(--text-faint); cursor: pointer; background: var(--surface-soft);
  font-size: 22px;
}
.scheme-item .add:hover { background: var(--accent-soft); color: var(--accent-deep); }

.sku-photo {
  width: 40px; height: 52px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.attr-input {
  width: 100%;
  min-width: 110px;
  padding: 4px 7px;
  font-size: 12.5px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
}
.attr-input:hover { border-color: var(--line); background: var(--surface); }
.attr-input:focus { border-color: var(--accent); background: var(--surface); }

/* --- Печать / PDF --- */
.print-root { display: none; }

@media print {
  .sidebar, .block-actions, .btn, .toasts, .page-head .actions,
  .conclusion textarea, .no-print { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; font-size: 11px; }
  .block { break-inside: avoid; box-shadow: none; border-color: #ddd; margin-bottom: 12px; }
  .table-wrap { overflow: visible; }
  table.data { font-size: 9px; width: 100%; }
  table.data th, table.data td { padding: 2px 4px; }
  .conclusion .printed-conclusion { display: block !important; }
  @page { size: A3 landscape; margin: 12mm; }

  /* Весь разбор стиля одной лентой: печатаем только собранный документ */
  body.printing > *:not(.print-root) { display: none !important; }
  body.printing .print-root { display: block; }
  body.printing .modal-backdrop, body.printing .toasts { display: none !important; }

  /* Иначе Chrome печатает таблицы белыми - вся условная заливка пропадает */
  .print-root, .print-root * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .print-cover { padding: 0 0 14px; border-bottom: 2px solid var(--accent); margin-bottom: 18px; }
  .print-cover h1 { font-size: 24px; margin: 0 0 6px; }
  .print-sub { font-size: 12px; color: var(--text-soft); }
  .print-section { break-before: page; }
  .print-section:first-of-type { break-before: auto; }
  .print-title {
    font-size: 15px; margin: 0 0 10px; padding-bottom: 5px;
    border-bottom: 1px solid var(--accent-line); color: var(--accent-deep);
  }
  .print-root .card { break-inside: avoid; box-shadow: none; margin-bottom: 10px; }
  .print-root .dropzone, .print-root .chips, .print-root .period-bar { display: none !important; }
  .print-root .review-list { max-height: none; overflow: visible; }
  /* В PDF идут только первые отзывы каждой группы - иначе документ не кончается */
  .print-root .review-item:nth-child(n+26) { display: none; }
  .print-root .table-wrap {
    max-height: none !important; overflow: visible !important; width: 100%;
  }
  /* Поразмерная таблица на десять артикулов шире листа - ужимаем её */
  .print-root table.data { width: 100%; table-layout: fixed; font-size: 7.5px; }
  .print-root table.data th, .print-root table.data td {
    padding: 1px 2px; overflow: hidden; text-overflow: ellipsis;
  }
  .print-root table.data .dim { width: 90px; }
  /* Ссылки на артикулы остаются кликабельными и видимыми */
  .print-root a { color: var(--accent-deep); text-decoration: none; }
}
.printed-conclusion { display: none; white-space: pre-wrap; font-size: 12px; line-height: 1.55; }

/* ========================================================================
   Облик «стекло» (07.10.2026): светлый фон с мягкими цветными пятнами,
   полупрозрачное меню слева, крупные скругления. Архитектура прежняя -
   здесь только переопределения внешнего вида.
   ======================================================================== */
:root {
  --bg: #eeedf0;
  --radius: 20px;
  --radius-sm: 12px;
  --glass: rgba(255, 255, 255, .62);
  --glass-line: rgba(255, 255, 255, .75);
  --shadow: 0 1px 2px rgba(60, 30, 45, .04), 0 10px 30px -12px rgba(60, 30, 45, .14);
  --shadow-lift: 0 2px 6px rgba(60, 30, 45, .06), 0 22px 44px -18px rgba(60, 30, 45, .28);
}
html { background: var(--bg); }
body { background: transparent; }
body::before {
  /* Пятна цвета за стеклом: розовое за меню, персиковое и сиреневое справа */
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(30% 42% at 4% 18%, rgba(236, 104, 146, .85), transparent 70%),
    radial-gradient(26% 38% at 12% 80%, rgba(186, 64, 112, .7), transparent 70%),
    radial-gradient(22% 30% at 22% 50%, rgba(250, 170, 196, .6), transparent 70%),
    radial-gradient(34% 40% at 88% 6%, rgba(248, 190, 150, .5), transparent 70%),
    radial-gradient(36% 44% at 94% 80%, rgba(196, 176, 242, .5), transparent 72%),
    radial-gradient(40% 40% at 50% 50%, rgba(255, 255, 255, .7), transparent 70%);
  filter: blur(20px);
  animation: bg-drift 42s ease-in-out infinite alternate;
}
/* Фон медленно «дышит»: пятна сдвигаются и чуть меняют размер - заметно, но не отвлекает */
@keyframes bg-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  35%  { transform: translate3d(2.5%, -2%, 0) scale(1.05); }
  70%  { transform: translate3d(-2%, 2.5%, 0) scale(.98); }
  100% { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }
.layout { position: relative; }
.nav-item .ico { width: 18px; height: 18px; display: inline-grid; place-items: center; flex: 0 0 18px; }
.nav-item .ico svg { display: block; }
.nav-item .ico-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }

/* --- Меню: стеклянная панель --- */
.sidebar { width: 262px; flex: 0 0 262px; background: transparent; border-right: none; }
.sidebar-inner {
  top: 14px; margin: 14px 0 14px 14px; padding: 16px 14px 14px;
  max-height: calc(100vh - 28px); min-height: calc(100vh - 28px);
  border-radius: 28px;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, .7) 0%, rgba(255, 228, 237, .5) 40%, rgba(236, 160, 188, .42) 100%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 24px 48px -24px rgba(120, 40, 70, .35);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  gap: 2px;
  scrollbar-width: thin;
}
.win-dots { display: flex; gap: 7px; padding: 2px 6px 14px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.win-dots i:nth-child(1) { background: #f2726b; }
.win-dots i:nth-child(2) { background: #f5c04f; }
.win-dots i:nth-child(3) { background: #5fcf73; }
.hello { display: flex; align-items: center; gap: 11px; padding: 4px 6px 16px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .7); }
.hello .grow { flex: 1; min-width: 0; }
.hello-ava {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff;
  background: radial-gradient(circle at 30% 25%, #f7a7bf, #d96c88 55%, #9e3a5c);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 6px 14px -6px rgba(160, 50, 90, .6);
}
.hello-hi { font-size: 11.5px; color: var(--text-soft); }
.hello-name { font-size: 16.5px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hello-out { background: rgba(255, 255, 255, .6); }

.nav-section { margin-top: 6px; }
.nav-group {
  padding: 8px 8px 6px; border-radius: 10px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .01em; text-transform: none; color: var(--text-soft);
}
.nav-group:hover { background: rgba(255, 255, 255, .45); }
.nav-group .ico { display: none; }
.nav-count { font-weight: 700; color: var(--text); }
.nav-group-body { padding-left: 0; border-left: none; margin-left: 0; }
.nav-item {
  padding: 9px 12px; border-radius: 14px; font-size: 13.5px; color: #4b4450; gap: 11px;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.nav-item .ico { opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .6); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, #e97f9c 0%, #c9567a 100%);
  color: #fff; font-weight: 600;
  box-shadow: 0 10px 20px -10px rgba(185, 60, 100, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.nav-item.active .ico { filter: brightness(1.15); }
.nav-sep { background: rgba(255, 255, 255, .75); margin: 12px 8px; }
.nav-label { color: var(--text-soft); text-transform: none; letter-spacing: .01em; font-size: 11.5px; }

.nav-quick {
  margin-top: auto; margin-bottom: 6px; padding: 16px 12px 14px; text-align: center;
  background: rgba(255, 255, 255, .82); border-radius: 20px;
  box-shadow: 0 10px 24px -16px rgba(120, 40, 70, .45);
}
.nav-quick-plus {
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: #fff;
  background: linear-gradient(135deg, #ee8aa6, #c9567a);
  box-shadow: 0 10px 18px -8px rgba(185, 60, 100, .8);
  transition: transform .18s ease;
}
.nav-quick-plus:hover { transform: scale(1.08) rotate(90deg); }
.nav-quick-title { font-weight: 600; font-size: 13.5px; margin-top: 8px; }
.nav-quick-sub { font-size: 11px; color: var(--text-faint); }
.client-mark { margin-top: 2px; padding: 6px 10px 0; text-align: center; }

/* --- Контент --- */
.main { padding: 30px 34px 80px; }
.page-head h1 { font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.card {
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.btn { border-radius: 12px; }
.btn-primary {
  background: linear-gradient(135deg, #e97f9c, #c9567a); border-color: transparent;
  box-shadow: 0 8px 16px -10px rgba(185, 60, 100, .8);
}
.btn-primary:hover { background: linear-gradient(135deg, #e3718f, #b9506c); border-color: transparent; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=email], select, textarea {
  border-radius: 12px;
}
.chip { border-radius: 999px; }

/* --- Отдел продаж: шапка, плитки, разделы --- */
.sl-hero {
  display: flex; gap: 22px; align-items: stretch; margin-bottom: 18px; padding: 18px;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--glass-line); border-radius: 26px;
  box-shadow: var(--shadow);
}
.sl-hero-photo {
  width: 170px; flex: 0 0 170px; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, #fbe3eb, #f1c3d2);
}
.sl-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sl-back { font-size: 12.5px; color: var(--text-soft); }
.sl-hero h1 { font-size: 32px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.sl-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-chip { font-size: 12.5px; padding: 4px 11px; border-radius: 999px; background: #fbeef2; color: var(--accent-deep); }
.sl-chip-link { background: rgba(255, 255, 255, .9); border: 1px solid var(--accent-line); }
.sl-chip-link:hover { text-decoration: none; background: #fff; }
.sl-chip-soft { background: rgba(0, 0, 0, .04); color: var(--text-soft); }
.sl-hero-note { margin-top: auto; font-size: 13.5px; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(135deg, #fff6f9, #fdeaf0); color: #5a3a46; }
.sl-hero-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 180px; }
.sl-status-select { border-radius: 12px; }

.sl-scope { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; flex-wrap: wrap; }
.sl-period { font-size: 12px; }

.sl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.sl-kpi {
  position: relative; overflow: hidden; cursor: copy; color: #fff;
  border-radius: 24px; padding: 16px 18px 14px; min-height: 150px;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 30px -20px rgba(80, 30, 50, .55);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sl-kpi:hover { transform: translateY(-3px); box-shadow: 0 24px 36px -20px rgba(80, 30, 50, .6); }
.sl-kpi-label { font-size: 12.5px; opacity: .9; }
.sl-kpi-value { font-size: 34px; font-weight: 300; letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; }
.sl-kpi-sub { font-size: 12px; opacity: .92; margin-top: auto; padding-top: 6px; position: relative; z-index: 1; }
.sl-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46px; opacity: .9; }
.sl-kpi.k-season { background: radial-gradient(120% 90% at 20% 0%, #f7e08c 0%, #8fd27a 45%, #3f9e4f 100%); }
.sl-kpi.k-season .sl-kpi-sub { padding-bottom: 34px; }
.sl-kpi.k-depth { background: radial-gradient(120% 90% at 80% 0%, #ffd6a5 0%, #f6a05c 45%, #e3672f 100%); }
.sl-kpi.k-margin { background: radial-gradient(120% 90% at 20% 10%, #ffd0de 0%, #f07fa2 45%, #c9467a 100%); }
.sl-kpi.k-compete { background: radial-gradient(120% 90% at 80% 10%, #e6dcff 0%, #a998ec 45%, #6d5bc4 100%); }

.sl-secs { display: flex; flex-direction: column; gap: 12px; }
.sl-sec { background: rgba(255, 255, 255, .8); border: 1px solid var(--glass-line); border-radius: 22px; box-shadow: var(--shadow); }
.sl-sec-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; user-select: none; }
.sl-sec-head:hover .sl-sec-title { color: var(--accent-deep); }
.sl-sec-head .grow { flex: 1; min-width: 0; }
.sl-sec-ico .ico { color: var(--accent-deep); display: inline-grid; place-items: center; }
.sl-sec-ico svg { width: 19px; height: 19px; }
.sl-sec-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(135deg, #fff, #fbe7ee); box-shadow: inset 0 0 0 1px rgba(233, 127, 156, .18); }
.sl-sec-title { font-size: 16px; font-weight: 600; transition: color .15s; }
.sl-sec-sub { font-size: 12.5px; color: var(--text-faint); }
.sl-sec-caret { font-size: 18px; color: var(--text-faint); transition: transform .25s ease; transform: rotate(-90deg); }
.sl-sec.open .sl-sec-caret { transform: rotate(0deg); }
.sl-sec-body { display: none; padding: 2px 18px 18px; }
.sl-sec.open .sl-sec-body { display: block; animation: sl-in .3s ease; }
@keyframes sl-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sl-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.sl-chart { min-width: 0; }

.sl-facts { display: flex; flex-direction: column; }
.sl-fact { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed rgba(0, 0, 0, .07); }
.sl-fact:last-child { border-bottom: none; }
.sl-fact-label { flex: 1; color: var(--text-soft); font-size: 13.5px; }
.sl-fact-val { font-weight: 600; font-size: 14.5px; cursor: copy; padding: 3px 8px; border-radius: 8px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s; }
.sl-fact-val:hover { background: var(--accent-soft); }
.sl-fact-val.muted { cursor: default; font-weight: 400; color: var(--text-faint); }
.sl-fact-val.muted:hover { background: none; }
.sl-fact-copy { font-size: 11px; color: var(--text-faint); opacity: 0; transition: opacity .15s; }
.sl-fact-val:hover .sl-fact-copy { opacity: 1; }

.sl-bars { display: flex; flex-direction: column; gap: 16px; }
.sl-bar-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.sl-bar-row { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.sl-bar-name { width: 104px; font-size: 12px; color: var(--text-soft); }
.sl-bar-track { flex: 1; height: 12px; border-radius: 999px; background: rgba(0, 0, 0, .05); overflow: hidden; }
.sl-bar-fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2, .8, .3, 1); }
.sl-bar-fill.b-sub { background: linear-gradient(90deg, #ffd6a5, #e3672f); }
.sl-bar-fill.b-style { background: linear-gradient(90deg, #f7b3c7, #c9567a); }
.sl-bar-val { width: 84px; text-align: right; font-weight: 600; font-size: 13px; }

.sl-donut-wrap { display: flex; flex-direction: column; align-items: center; }
.sl-donut { width: 170px; height: 170px; }
.sl-donut-text { font-size: 22px; font-weight: 600; fill: var(--text); }
.sl-donut-cap { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }

.sl-stack-title { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.sl-stack { display: flex; height: 22px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(0, 0, 0, .04); }
.sl-stack-seg { min-width: 4px; }
.e-purchase { background: #c9b6f2; } .e-comm { background: #f6a05c; } .e-log { background: #f2cf8b; }
.e-tax { background: #d8d2cc; } .e-margin { background: linear-gradient(90deg, #8fd27a, #3f9e4f); }
.sl-stack-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-soft); }
.sl-stack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sl-stack-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sl-stack-legend b { color: var(--text); }
.sl-mini { height: 6px; border-radius: 999px; background: rgba(0, 0, 0, .06); margin: -2px 10px 6px 2px; overflow: hidden; }
.sl-mini-fill { height: 100%; background: linear-gradient(90deg, #f7b3c7, #c9567a); border-radius: 999px; }
.sl-inputs-det { margin-top: 14px; border-top: 1px dashed rgba(0, 0, 0, .08); padding-top: 10px; }
.sl-inputs-det summary { cursor: pointer; font-size: 13px; color: var(--accent-deep); font-weight: 500; }
.sl-inputs-box { padding-top: 10px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sl-inputs-box .row { width: 100%; }

@media (max-width: 1100px) {
  .sl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sl-split { grid-template-columns: 1fr; }
  .sl-hero { flex-wrap: wrap; }
}

@media print {
  body::before { display: none; }
  .sidebar-inner { backdrop-filter: none; background: none; box-shadow: none; }
}

/* ========================================================================
   Меню-шторка (07.10.2026): спрятано, открывается кнопкой слева сверху,
   после выбора раздела закрывается. Стекло почти бесцветное, розовый
   приглушённый, всё помещается без прокрутки.
   ======================================================================== */
body::before {
  background:
    radial-gradient(30% 42% at 4% 18%, rgba(214, 150, 170, .55), transparent 70%),
    radial-gradient(26% 38% at 12% 82%, rgba(190, 140, 165, .42), transparent 70%),
    radial-gradient(34% 40% at 88% 6%, rgba(240, 200, 170, .42), transparent 70%),
    radial-gradient(36% 44% at 94% 80%, rgba(196, 184, 232, .42), transparent 72%),
    radial-gradient(40% 40% at 50% 50%, rgba(255, 255, 255, .7), transparent 70%);
}
.layout { display: block; }
.main { padding: 28px 40px 80px 96px; }

.nav-toggle {
  position: fixed; top: 22px; left: 24px; z-index: 60;
  width: 46px; height: 46px; border-radius: 16px; cursor: pointer;
  display: grid; place-items: center; color: #4b4450;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 10px 24px -14px rgba(60, 30, 45, .45);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, .8); transform: scale(1.05); }
body.nav-open .nav-toggle { opacity: 0; pointer-events: none; }

.nav-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(40, 25, 35, .12);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 80;
  width: 276px; flex: none;
  transform: translateX(-105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
body.nav-open .sidebar { transform: none; }
.sidebar-inner {
  position: relative; top: 0; margin: 12px; padding: 14px 12px 12px;
  height: calc(100vh - 24px); max-height: none; min-height: 0;
  overflow-y: auto; scrollbar-width: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, .62) 0%, rgba(252, 246, 248, .5) 55%, rgba(244, 228, 234, .48) 100%);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 30px 60px -28px rgba(60, 30, 45, .45);
  backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px) saturate(1.2);
}
.sidebar-inner::-webkit-scrollbar { display: none; }

.hello { padding: 2px 4px 10px; margin-bottom: 4px; }
.hello-ava { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px;
  background: radial-gradient(circle at 30% 25%, #ecc3cf, #c98ea2 60%, #9f6a7e); }
.hello-name { font-size: 15px; }

/* Заголовок раскрывающейся группы - заметный: крупнее, со счётчиком и стрелкой справа */
.nav-section { margin-top: 8px; }
.nav-group {
  padding: 9px 10px; margin-bottom: 2px; border-radius: 12px;
  font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.01em;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.nav-group:hover { background: rgba(255, 255, 255, .8); }
.nav-group .grow { display: flex; align-items: center; gap: 8px; }
.nav-count {
  font-size: 11px; font-weight: 600; color: #8a5a6c; background: rgba(214, 150, 170, .2);
  padding: 0 7px; border-radius: 999px; line-height: 18px;
}
.nav-caret {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: var(--text-soft); background: rgba(255, 255, 255, .7);
}
.nav-group-body { padding: 2px 0 2px 6px; }

.nav-item { padding: 6px 11px; font-size: 13px; border-radius: 12px; }
.nav-item.active {
  background: linear-gradient(135deg, #e3b2c0 0%, #c98ea2 100%);
  color: #fff;
  box-shadow: 0 8px 16px -10px rgba(150, 80, 105, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.nav-sep { margin: 10px 8px 6px; }

.nav-quick {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  margin-top: auto; padding: 9px 12px; border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  transition: background .18s ease;
}
.nav-quick:hover { background: #fff; }
.nav-quick-plus {
  width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; font-size: 16px;
  background: linear-gradient(135deg, #e3b2c0, #c98ea2);
  box-shadow: 0 6px 12px -6px rgba(150, 80, 105, .7);
}
.nav-quick:hover .nav-quick-plus { transform: rotate(90deg); }
.nav-quick-title { margin-top: 0; font-size: 13px; }
.client-mark { padding-top: 4px; }

/* Главный акцент интерфейса тоже чуть мягче */
.btn-primary { background: linear-gradient(135deg, #e09aae, #c27a92); box-shadow: 0 8px 16px -10px rgba(150, 80, 105, .7); }
.btn-primary:hover { background: linear-gradient(135deg, #d68ba1, #b56c85); }

@media print { .nav-toggle, .nav-backdrop { display: none !important; } }
/* --- Полный итог стиля для продуктового отдела (product-summary.js) --- */
.ps-verdict { display: flex; align-items: center; gap: 14px; }
.ps-score {
  min-width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center;
  font-size: 26px; font-weight: 300; color: #fff; letter-spacing: -.02em;
  background: radial-gradient(120% 90% at 20% 0%, #e9e4ea 0%, #b8a9b6 100%);
  box-shadow: 0 14px 24px -16px rgba(80, 30, 50, .6);
}
.ps-score.k-season { background: radial-gradient(120% 90% at 20% 0%, #f7e08c 0%, #8fd27a 45%, #3f9e4f 100%); }
.ps-score.k-depth { background: radial-gradient(120% 90% at 80% 0%, #ffd6a5 0%, #f6a05c 45%, #e3672f 100%); }
.ps-score.k-margin { background: radial-gradient(120% 90% at 20% 10%, #ffd0de 0%, #f07fa2 45%, #c9467a 100%); }
.ps-verdict-title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ps-sub { font-size: 13px; font-weight: 600; margin: 16px 0 8px; color: var(--text-soft); }
.ps-crit { display: flex; flex-direction: column; }
.ps-crit-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed rgba(0, 0, 0, .07); font-size: 13.5px; flex-wrap: wrap; }
.ps-crit-row:last-child { border-bottom: none; }
.ps-crit-row i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.ps-crit-row .grow { flex: 1; min-width: 160px; }
.ps-crit-hint { flex-basis: 100%; padding-left: 20px; font-size: 12px; }
.ps-query { width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ps-funnel-step {
  padding: 12px 14px; border-radius: 16px; background: linear-gradient(160deg, #fff, #faf3f6);
  box-shadow: inset 0 0 0 1px rgba(201, 142, 162, .18);
}
.ps-funnel-step b { display: block; font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin: 2px 0; }
.ps-link { display: flex; align-items: center; gap: 12px; border-color: var(--accent-line); }
.ps-link .grow { flex: 1; min-width: 0; }

.ue-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ue-empty {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #fff7fa, #fbecf1);
}
.ue-empty .grow { flex: 1; min-width: 220px; }

.ul-rows { max-height: 320px; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ul-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.ul-row:hover { background: var(--surface-soft); }
.ul-row.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
@media (max-width: 1100px) { .ps-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* --- Обратный расчёт, фильтры итога, карточка товара в базу --- */
.ue-rev { margin-top: 18px; padding: 16px; border-radius: 18px; background: linear-gradient(160deg, #fff, #f8f2f5);
  box-shadow: inset 0 0 0 1px rgba(201, 142, 162, .2); }
.ue-rev-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ue-rev-head .grow { flex: 1; min-width: 240px; }
.ue-target-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.ue-target { width: 70px; text-align: center; font-weight: 600; }
.ue-rev-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.ue-rev-main { padding: 16px 18px; border-radius: 18px; color: #fff; display: flex; flex-direction: column; gap: 4px;
  background: radial-gradient(120% 90% at 20% 0%, #e9e4ea 0%, #a99aa7 100%); }
.ue-rev-main .muted { color: rgba(255, 255, 255, .85); }
.ue-rev-main.good { background: radial-gradient(120% 90% at 20% 0%, #f7e08c 0%, #8fd27a 45%, #3f9e4f 100%); }
.ue-rev-main.warn { background: radial-gradient(120% 90% at 80% 0%, #ffd6a5 0%, #f6a05c 45%, #e3672f 100%); }
.ue-rev-main.bad { background: radial-gradient(120% 90% at 20% 10%, #ffd0de 0%, #f07fa2 45%, #c9467a 100%); }
.ue-rev-big { font-size: 34px; font-weight: 300; letter-spacing: -.03em; line-height: 1.15; }
.ue-rev-verdict { margin-top: 12px; padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 13.5px; }
.ue-rev-verdict.good { background: #e6f4de; color: #3d6b2a; }
.ue-rev-verdict.warn { background: #fdf0d4; color: #8a6420; }
.ue-rev-verdict.bad { background: #fde4ea; color: #a8385a; }

.ur-table td, .ur-table th { white-space: nowrap; }
.ur-sku { text-align: left; }
.ur-strong { font-weight: 600; }
.ur-good { color: #3d6b2a; } .ur-warn { color: #a6701c; } .ur-bad { color: #b7385d; }
.ur-verdict { text-align: left; white-space: normal !important; min-width: 200px; }

.ps-filters { padding: 12px 16px; }
.fb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fb-label { font-size: 12.5px; color: var(--text-soft); margin-right: 4px; }
.fb-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--text); background: rgba(255, 255, 255, .85);
  border: 1px solid var(--line); max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fb-chip:hover { border-color: var(--accent-line); }
.fb-chip.on { background: linear-gradient(135deg, #f3dbe3, #ead0da); border-color: #e0b9c7; color: #6b3449; font-weight: 600; }
.fb-caret { font-size: 10px; color: var(--text-faint); }
.fb-x { font-size: 11px; opacity: .7; padding: 0 2px; }
.fb-x:hover { opacity: 1; }
.fb-reset { border: none; background: none; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--accent-deep); padding: 4px 8px; }
.fb-reset:hover { text-decoration: underline; }
.fb-pop {
  position: absolute; z-index: 200; width: 280px; padding: 12px; border-radius: 16px;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--line); box-shadow: var(--shadow-lift);
}
.fb-pop-title { font-weight: 600; margin-bottom: 8px; }
.fb-search { width: 100%; margin-bottom: 8px; }
.fb-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.fb-opt { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.fb-opt:hover { background: var(--surface-soft); }
.fb-pop-actions { display: flex; justify-content: space-between; margin-top: 10px; }

.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.pb-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.pb-size label { font-size: 12px; }
@media (max-width: 1100px) { .ue-rev-grid { grid-template-columns: 1fr; } }
/* Широкие страницы (юнитка, сезонность): слева место под кнопку меню */
.main.main-wide { padding-left: 88px; }
.ur-note { font-size: 11px; color: var(--text-faint); white-space: normal; max-width: 150px; }

/* --- Итоги: что выбрать, цвета --- */
.sb-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sb-card { padding: 14px 16px; border-radius: 18px; background: linear-gradient(160deg, #fff, #faf3f6);
  box-shadow: inset 0 0 0 1px rgba(201, 142, 162, .18); display: flex; flex-direction: column; gap: 4px; }
.sb-combo { background: linear-gradient(160deg, #fdf6e6, #f6ead2); }
.sb-trait { font-size: 12px; color: var(--text-soft); }
.sb-best { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.sb-score { display: flex; align-items: center; gap: 8px; }
.sb-score .rank-bar { flex: 1; }
.sb-why { font-size: 12.5px; color: #3d6b2a; }
.sb-facts { font-size: 12px; color: var(--text-soft); }
.sb-next { font-size: 11.5px; }
.sb-details { margin-top: 12px; }
.sb-details summary { cursor: pointer; font-size: 13px; color: var(--accent-deep); font-weight: 500; margin-bottom: 8px; }
.sb-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sb-color { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }
.sb-color.on { box-shadow: inset 0 0 0 2px #8fd27a; }
.sb-color i { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.compare-table tr.compare-group td { font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-deep); background: rgba(251, 238, 242, .6); text-align: left; }
.card-foot .unit-on { background: #eef6e8; border-color: #cfe5c2; color: #3d6b2a; }
.unit-head-btn.on { background: #eef6e8; border-color: #cfe5c2; color: #3d6b2a; }
.compare-table tr.compare-group td .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
