/**
 * SalesHive — единая дизайн-система (типографика, кнопки, таблицы, поля, окна).
 * Подключается после sh-app-shell.css; токены --sh-* заданы в shell CSS.
 */

:root,
html[data-theme="light"] {
  --sh-success: #059669;
  --sh-warning: #d97706;
  --sh-table-header-bg: #f4f7fa;
  --sh-table-row-line: color-mix(in srgb, var(--sh-border) 55%, var(--sh-surface));
  --sh-surface-3: color-mix(in srgb, var(--sh-border) 22%, var(--sh-surface));
  --sh-text-2xs: 0.625rem;
  --sh-text-xs: 0.6875rem;
  --sh-text-sm: 0.75rem;
  --sh-text-compact: 0.8125rem;
  --sh-text-base: 0.875rem;
  --sh-text-md: 0.9375rem;
  --sh-text-lg: 1rem;
  --sh-text-xl: 1.125rem;
  --sh-text-h2: 1rem;
  --sh-text-h1: 1.5rem;
  --sh-table-cell-py: 0.625rem;
  --sh-table-cell-px: 0.75rem;
  --sh-table-font: var(--sh-text-sm);
  --sh-table-th-weight: 600;
  --sh-col-sku-width: 10rem;
  /* Как на Рекламе: колонка имени + ряд плашек метрик без лишнего воздуха. */
  --sh-col-name-width: 21.5rem;
  --sh-col-metric-width: 5.6rem;
  --sh-col-metric-wide-width: 9.1rem;
  --sh-metric-cell-px: 0.35rem;
  --sh-workspace-shell-radius: 0.75rem;
  --sh-radius-sm: 0.375rem;
  --sh-shadow-md: 0 10px 40px rgba(0, 26, 52, 0.12), 0 2px 10px rgba(0, 26, 52, 0.08);
  --sh-focus-ring: 0 0 0 2px color-mix(in srgb, var(--sh-primary) 22%, transparent);
}

html[data-theme="dark"] {
  --sh-table-header-bg: #1a2332;
  --sh-table-row-line: color-mix(in srgb, var(--sh-border) 50%, var(--sh-surface));
  --sh-surface-3: #111c35;
  --sh-shadow-md: 0 12px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ——— Типографика разделов ——— */
.sh-page-title,
.unit-page-title,
.fin-page-title {
  margin: 0;
  font-size: var(--sh-text-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sh-text);
  line-height: 1.2;
}

.sh-section-head,
.unit-head,
.fin-section-head,
.ads-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sh-space-md);
}

.sh-section-head h2,
.unit-head h2,
.fin-section-head h2,
.ads-head h2 {
  margin: 0;
  font-size: var(--sh-text-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sh-text);
  line-height: 1.25;
}

.sh-section-sub,
.unit-sub,
.fin-section-head .sub,
.unit-note {
  margin: 0;
  font-size: var(--sh-text-sm);
  color: var(--sh-muted);
  line-height: 1.45;
}

.sh-muted-text,
.ai-assist-muted,
.ads-cell-muted,
.ads-cell-center-muted {
  color: var(--sh-muted);
  font-size: var(--sh-text-base);
  line-height: 1.45;
}

.ads-cell-muted {
  font-variant-numeric: tabular-nums;
}

/* ——— Кнопки ——— */
.sh-btn,
button.sh-btn,
a.sh-btn,
.unit-btn,
.unit-unit-btn.unit-unit-download-btn,
.fin-btn-compact,
.home-detail-btn,
button.fbs-btn,
button.probe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sh-space-sm);
  min-height: var(--sh-control-height);
  padding: 0 var(--sh-space-md);
  border-radius: var(--sh-control-radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--sh-text);
  font-family: inherit;
  font-size: var(--sh-text-base);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none !important;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.unit-files-download-item {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.unit-files-download-item.is-disabled,
.unit-files-download-item[aria-disabled="true"] {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.55;
}

.sh-btn:disabled,
button.sh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sh-btn--primary,
.sh-btn-primary,
.content-btn,
button.fbs-btn {
  background: var(--sh-primary);
  color: #fff;
  border-color: transparent;
}

.sh-btn--primary:hover,
.sh-btn-primary:hover,
.content-btn:hover,
button.fbs-btn:hover:not(:disabled),
a.sh-btn-primary:hover,
a.sh-btn--primary:hover {
  background: var(--sh-primary-hover);
  color: #fff;
  text-decoration: none;
}

button.sh-btn.sh-btn-primary,
button.sh-btn.sh-btn--primary,
a.sh-btn.sh-btn-primary {
  background: var(--sh-primary);
  color: #fff;
  border-color: transparent;
}
button.sh-btn.sh-btn-primary:hover:not(:disabled),
button.sh-btn.sh-btn--primary:hover:not(:disabled),
a.sh-btn.sh-btn-primary:hover {
  background: var(--sh-primary-hover);
  color: #fff;
}

.sh-btn--secondary,
.sh-btn-secondary,
.sh-btn.sh-btn-secondary,
.unit-btn,
.unit-unit-download-btn,
.fin-btn-compact,
.home-detail-btn,
button.probe-btn {
  background: var(--sh-surface);
  color: var(--sh-text);
  border-color: var(--sh-border);
}

.sh-btn--secondary:hover,
.sh-btn-secondary:hover,
.unit-btn:hover,
.unit-unit-download-btn:hover,
.fin-btn-compact:hover,
.home-detail-btn:hover,
button.probe-btn:hover {
  background: var(--sh-surface-2);
  color: var(--sh-text);
}

.unit-btn-reset:disabled,
.unit-btn-reset.is-idle {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.25);
  box-shadow: none;
}

.unit-btn-reset.unit-btn-reset--on {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
  filter: none;
}

.unit-btn-reset:disabled:hover,
.unit-btn-reset.is-idle:hover {
  background: var(--sh-surface);
  color: var(--sh-text);
}

.sh-btn--ghost {
  background: transparent;
  color: var(--sh-muted);
  border-color: transparent;
}

.sh-btn--ghost:hover {
  background: var(--sh-surface-2);
  color: var(--sh-text);
}

.sh-btn--danger {
  background: transparent;
  color: var(--sh-danger);
  border-color: color-mix(in srgb, var(--sh-danger) 45%, var(--sh-border));
}

.sh-btn--danger:hover {
  background: color-mix(in srgb, var(--sh-danger) 10%, var(--sh-surface));
}

.sh-btn--sm,
.sh-btn-sm {
  min-height: 2rem;
  padding: 0 0.625rem;
  font-size: var(--sh-text-sm);
}

.sh-btn--md,
.sh-btn-md,
.sh-btn-eq {
  min-height: var(--sh-control-height);
  padding: 0 var(--sh-space-md);
  font-size: var(--sh-text-base);
}

/* Пресеты периода (period_bar) */
.sh-btn.sh-btn-secondary.sh-btn-tall-date {
  flex-shrink: 0;
  white-space: nowrap;
  height: var(--sh-control-height);
  min-height: var(--sh-control-height);
}

.sh-btn.sh-btn-secondary.sh-btn-tall-date.sh-preset-active {
  font-weight: 700;
  color: var(--sh-text);
  background: color-mix(in srgb, var(--sh-primary) 14%, var(--sh-surface));
  border-color: color-mix(in srgb, var(--sh-primary) 40%, var(--sh-border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--sh-primary) 22%, transparent),
    0 1px 3px color-mix(in srgb, var(--sh-primary) 8%, transparent);
}

/* ——— Поля ввода ——— */
.sh-input,
input.sh-input,
select.sh-input,
select.sh-select,
.sh-pager-size-label select,
textarea.sh-input,
.unit-planned-input,
.sh-date-text {
  box-sizing: border-box;
  min-height: var(--sh-control-height);
  padding: 0 var(--sh-space-md);
  border-radius: var(--sh-control-radius);
  border: 1px solid var(--sh-input-border, var(--sh-border));
  background: var(--sh-input-bg, var(--sh-surface));
  color: var(--sh-text);
  font-family: inherit;
  font-size: var(--sh-text-base);
  line-height: 1.2;
}

/* Явные классы workspace — не form input { width:100% }; размеры — в стилях вкладки */
.unit-cell-input,
.unit-cell-input--money,
.unit-cell-input--pct,
.fbs-select:not(.sh-select),
.fbo-row-select:not(.sh-select),
.content-head-input,
.content-check,
.ads-drr-period-input {
  width: auto;
  max-width: 100%;
  min-height: unset;
}

.unit-cell-input--below-catalog {
  border-radius: var(--sh-pill-radius, 0.5rem) !important;
  border: 1px solid color-mix(in srgb, #fb7185 26%, var(--sh-border)) !important;
  color: #9f1239 !important;
  -webkit-text-fill-color: #9f1239 !important;
  background-color: color-mix(in srgb, #fb7185 11%, var(--sh-surface)) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  caret-color: #9f1239;
}
.unit-cell-input--cost-missing {
  border-radius: var(--sh-pill-radius, 0.5rem) !important;
  border: 1px solid color-mix(in srgb, #fb7185 40%, var(--sh-border)) !important;
  background-color: #ffe4e6 !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fb7185 18%, transparent) !important;
}
.unit-cell-input-wrap:has(.unit-cell-input--cost-missing) .unit-cell-input-ghost {
  color: #881337 !important;
  font-weight: 700 !important;
}
/* Пустой ввод ниже пола: фон прозрачный, чтобы ghost-цена оставалась видна. */
.unit-cell-input--below-floor.unit-cell-input--below-floor-empty,
.unit-cell-input--below-floor.unit-cell-input--below-floor-empty:focus {
  background-color: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}
.unit-cell-input-wrap:has(.unit-cell-input--below-floor-empty) .unit-cell-input-ghost {
  color: #881337 !important;
  font-weight: 700 !important;
}
.unit-cell-input--exp-rub-empty {
  caret-color: var(--sh-text);
}
.unit-cell-input--exp-rub.unit-cell-input--exp-rub-empty::placeholder {
  color: transparent !important;
  opacity: 0 !important;
  -webkit-text-fill-color: transparent !important;
}
.unit-cell-input-wrap:has(.unit-cell-input--exp-rub-empty) .unit-cell-input-ghost {
  opacity: 1 !important;
  color: var(--sh-text-muted, #6b7280);
}
.unit-cell-input--exp-rub::placeholder {
  color: var(--sh-text-muted, #6b7280);
  opacity: 1;
}
.unit-cell-input--below-floor::placeholder {
  color: color-mix(in srgb, #881337 55%, #fff) !important;
  opacity: 1;
}
.unit-cell-input--below-floor:focus {
  border-color: color-mix(in srgb, #fb7185 26%, var(--sh-border)) !important;
  background-color: #ffe4e6 !important;
  box-shadow: none !important;
}
.unit-cell-input--below-floor.unit-cell-input--below-floor-empty:focus {
  background-color: transparent !important;
}

.sh-main-workspace .unit-planned-input {
  box-sizing: border-box;
  min-height: var(--sh-control-height);
  padding: 0 2.45rem 0 0.45rem;
}
.sh-main-workspace .sh-period-sag-input {
  box-sizing: border-box;
  min-height: var(--sh-control-height);
  padding: 0 0.5rem;
  border: 1px solid var(--sh-input-border);
  border-radius: var(--sh-control-radius);
  background: var(--sh-input-bg);
  color: var(--sh-text);
  font-family: inherit;
  font-size: var(--sh-text-base);
  line-height: 1.2;
}

.sh-input:focus,
select.sh-select:focus,
.unit-planned-input:focus,
.sh-date-text:focus {
  outline: none;
  border-color: var(--sh-primary);
  box-shadow: var(--sh-focus-ring);
}

.sh-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.sh-field__label,
.unit-planned-field__lab {
  font-size: var(--sh-text-xs);
  font-weight: 600;
  color: var(--sh-muted);
  white-space: nowrap;
}

/* ——— Карточки и алерты ——— */
.sh-card,
.card {
  padding: var(--sh-space-lg) var(--sh-space-xl);
  margin-bottom: var(--sh-space-lg);
}

.sh-motion-reveal {
  opacity: 0;
  transform: translateY(0.5rem);
  transition:
    opacity 320ms ease-out,
    transform 320ms ease-out;
  will-change: opacity, transform;
}

.sh-motion-reveal.is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.sh-motion-card .sh-ico,
.sh-motion-icon .sh-ico {
  transition: transform 180ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .sh-motion-card:hover .sh-ico,
  .sh-motion-card:focus-within .sh-ico,
  .sh-motion-icon:hover .sh-ico,
  .sh-motion-icon:focus-visible .sh-ico {
    transform: translateY(-0.125rem) scale(1.06);
  }
}

.sh-inline-err,
.unit-inline-err,
.fin-inline-err,
.ads-err {
  border-radius: var(--sh-control-radius);
  padding: var(--sh-space-md) var(--sh-space-lg);
  font-size: var(--sh-text-base);
  line-height: 1.45;
  border: 1px solid color-mix(in srgb, var(--sh-danger) 40%, var(--sh-border));
  background: color-mix(in srgb, var(--sh-danger) 12%, var(--sh-surface));
  color: var(--sh-danger);
}

.sh-placeholder,
.unit-placeholder,
.fin-sku-placeholder {
  border-radius: var(--sh-radius);
  border: 1px dashed var(--sh-border);
  background: var(--sh-surface-3);
  padding: var(--sh-space-xl) var(--sh-space-lg);
  text-align: center;
  font-size: var(--sh-text-base);
  color: var(--sh-muted);
  line-height: 1.55;
}

.sh-status-line,
.unit-refresh-line,
.fin-loading-line,
.fin-refresh-line {
  font-size: var(--sh-text-sm);
  font-weight: 500;
  min-height: 1.25rem;
  margin: 0 0 var(--sh-space-sm);
}

/* Скелетон вместо спиннера — меньше визуального шума, стабильная вёрстка */
.sh-skeleton-grid {
  width: 100%;
}
.sh-skeleton-card {
  min-height: 5.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-content: center;
  border-style: dashed;
}
.fin-metric-card.sh-skeleton-card {
  min-height: 12.5rem;
  align-items: stretch;
}
.fin-metric-card.sh-skeleton-card .sh-skeleton--value {
  width: 72%;
}
.fin-metric-grid.sh-skeleton-grid,
#home-grid.fin-metric-grid.sh-skeleton-grid {
  min-height: 14rem;
}
.fin-sku-table-shell:not(:empty) {
  min-height: 11rem;
}
#fin-raw-body:not(:empty) .sh-table-wrap {
  min-height: 9rem;
}
.home-news-card.sh-skeleton-card {
  min-height: 5.5rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--sh-border);
  border-radius: var(--sh-card-radius, var(--sh-radius));
  background: var(--sh-surface);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.home-news-card.sh-skeleton-card .sh-skeleton--row {
  height: 2.4rem;
}
.sh-skeleton {
  display: block;
  border-radius: var(--sh-control-radius);
  background: linear-gradient(
    90deg,
    var(--sh-surface-3) 0%,
    color-mix(in srgb, var(--sh-border) 35%, var(--sh-surface-3)) 50%,
    var(--sh-surface-3) 100%
  );
  background-size: 200% 100%;
  animation: sh-skeleton-shimmer 1.35s ease-in-out infinite;
}
.sh-skeleton--label { height: 0.62rem; width: 42%; }
.sh-skeleton--value { height: 1.3rem; width: 55%; }
.sh-skeleton--sub { height: 0.52rem; width: 34%; }
.sh-skeleton--row { height: 0.85rem; width: 70%; max-width: 11rem; }
.sh-skeleton--cell { height: 0.85rem; width: 64%; max-width: 8.5rem; }
.sh-skeleton-table { width: 100%; border-collapse: collapse; background: transparent; }
.sh-skeleton-table td {
  padding: 0.85rem 0.75rem;
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--sh-border) 70%, transparent);
}
.sh-skeleton-table td:first-child .sh-skeleton--cell { width: 92%; max-width: 18rem; }
.sh-skeleton-table .sh-skeleton {
  height: 0.72rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--sh-border) 45%, var(--sh-surface-3)) 0%,
    var(--sh-surface-3) 48%,
    color-mix(in srgb, var(--sh-border) 45%, var(--sh-surface-3)) 100%
  );
  background-size: 200% 100%;
}
.sh-skeleton-table td:nth-child(3) .sh-skeleton,
.sh-skeleton-table td:nth-child(5) .sh-skeleton { width: 46%; }
.sh-skeleton-table td:nth-child(even) .sh-skeleton { width: 58%; }
.home-trend-slot { min-height: 16rem; }
.home-trend-slot:empty { min-height: 16rem; }
.home-trend-wait,
.sh-panel-wait {
  min-height: 15.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  background: var(--sh-surface, #fff);
  border: 1px solid var(--sh-border, #e1e7f0);
  border-radius: 12px;
}
.home-trend-wait__legend,
.sh-panel-wait__legend {
  width: 28%;
  max-width: 9rem;
  height: 0.7rem;
  border-radius: 999px;
}
.home-trend-wait__plot,
.sh-panel-wait__plot {
  display: block;
  flex: 1 1 auto;
  min-height: 11rem;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    var(--sh-surface-3, #f4f7fb) 0%,
    color-mix(in srgb, var(--sh-border, #d5deea) 55%, var(--sh-surface, #fff)) 100%
  );
  background-size: 100% 200%;
  animation: sh-panel-wait-sweep 1.6s ease-in-out infinite;
}
#home-trend-chart:has(.sh-trend__svg) .sh-panel-wait,
#unit-table-shell:has(table.unit-table) .sh-panel-wait,
#sag-shell:has(table) .sh-panel-wait,
.content-table-shell:has(tbody td) .sh-panel-wait {
  display: none;
}
.sh-trend {
  position: relative;
  overflow: visible;
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  background: var(--sh-surface);
  padding: var(--sh-space-md);
  box-shadow: var(--sh-shadow);
}
.sh-trend__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  background: var(--sh-surface);
}
.sh-trend__title { margin: 0; font-size: 1rem; }
.sh-trend__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  background: var(--sh-surface);
}
.sh-trend__dropdown { position: relative; z-index: 6; }
.sh-trend__dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 8.5rem;
  border: 1px solid var(--sh-border);
  border-radius: 0.5rem;
  background: var(--sh-surface);
  color: var(--sh-text);
  padding: 0.38rem 0.65rem;
  font-size: var(--sh-text-sm);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.sh-trend__dropdown > summary::-webkit-details-marker { display: none; }
.sh-trend__dropdown > summary::after { content: "▾"; color: var(--sh-muted); font-size: 0.7rem; }
.sh-trend__menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  max-height: 20rem;
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid var(--sh-border);
  border-radius: 0.55rem;
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow-md);
}
.sh-trend__menu-btn {
  width: 100%;
  border: 0;
  border-radius: 0.4rem;
  background: var(--sh-surface);
  color: var(--sh-text);
  padding: 0.45rem 0.6rem;
  text-align: left;
  font: inherit;
  font-size: var(--sh-text-sm);
  cursor: pointer;
}
.sh-trend__plot { display: flex; align-items: stretch; min-width: 0; background: var(--sh-surface); }
.sh-trend__y-axis { flex: 0 0 auto; background: var(--sh-surface); }
.sh-trend__scroll { flex: 1; min-width: 0; overflow-x: auto; background: var(--sh-surface); }
.sh-trend__svg { display: block; height: auto; min-height: 145px; }
.sh-trend__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sh-trend__band { opacity: .28; pointer-events: none; }
.sh-trend__band--holiday { fill: url(#sh-trend-hatch-holiday); }
.sh-trend__band--holiday_prep { fill: url(#sh-trend-hatch-prep); }
.sh-trend__band--tax_report { fill: #2563eb; opacity: .22; }
.sh-trend__band--tax_pay { fill: #cb11ab; opacity: .22; }
.sh-trend__band--payout { fill: #16a34a; }
.sh-trend__prep-ramp { fill: url(#sh-trend-hatch-prep); opacity: .22; pointer-events: none; }
.sh-trend__prep-ramp-line { stroke: #d97706; stroke-width: 1.25; stroke-dasharray: 4 3; opacity: .55; pointer-events: none; }
.sh-trend__band-amt { fill: #047857; font-size: 9px; font-weight: 700; opacity: .95; pointer-events: none; }
.sh-trend__grid { stroke: var(--sh-border); stroke-width: 1; }
.sh-trend__axis { fill: var(--sh-muted); font-size: 11px; }
.sh-trend__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin: 0.55rem 0 0;
  font-size: var(--sh-text-sm);
  color: var(--sh-muted);
}
.sh-trend__legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.sh-trend__legend-swatch { width: 0.7rem; height: 0.7rem; border-radius: 0.2rem; flex: 0 0 auto; opacity: 0.85; }
.sh-trend__legend-swatch--holiday { background: repeating-linear-gradient(-45deg, #f59e0b 0 2px, transparent 2px 5px); }
.sh-trend__legend-swatch--holiday_prep { background: repeating-linear-gradient(-45deg, #fbbf24 0 2px, transparent 2px 5px); }
.sh-trend__legend-swatch--tax_report { background: #2563eb; }
.sh-trend__legend-swatch--tax_pay { background: #cb11ab; }
.sh-trend__legend-swatch--payout { background: #16a34a; }
.unit-table-shell.unit-table-shell--wait {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}
.unit-wait {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.unit-wait__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1.6fr) repeat(5, minmax(2.6rem, 0.7fr));
  gap: 0.7rem 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--sh-surface, #fff);
  border: 1px solid var(--sh-border, #e1e7f0);
  border-radius: 12px;
}
.unit-wait__bar {
  height: 0.7rem;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--sh-border) 70%, var(--sh-surface)) 0%,
    var(--sh-surface-3) 46%,
    color-mix(in srgb, var(--sh-border) 70%, var(--sh-surface)) 100%
  );
  background-size: 200% 100%;
}
.unit-wait__bar--name { width: 86%; }
.unit-wait__bar--m { width: 74%; }
.unit-wait__bar--s { width: 52%; }
#home-err:empty,
.home-inline-err:empty,
#contentGridErr:empty,
.content-err:empty { display: none !important; }
#unit-refresh,
#home-refresh,
#fin-refresh,
#fin-loading,
#ads-refresh { display: none !important; }
@keyframes sh-panel-wait-sweep {
  0% { background-position: 0 0; }
  100% { background-position: 0 100%; }
}
.sh-skeleton--w80 { width: 80%; }
.sh-skeleton-tr td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
}
.sh-route-loading--quiet {
  padding: 0.35rem 0;
}
.sh-route-loading--quiet .sh-route-loading__text {
  color: var(--sh-muted);
}

/* Инфо-баннер (догрузка / stale) — не красить как ошибку */
.sh-status-info,
.home-inline-err.sh-status-info,
.fin-inline-err.sh-status-info,
.unit-inline-err.sh-status-info,
.content-err.sh-status-info {
  color: var(--sh-muted);
  border-color: var(--sh-border);
  background: var(--sh-surface-3);
}

@keyframes sh-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-skeleton,
  .sh-route-loading__spin,
  .sh-workspace-gate__spin,
  .ads-cell-loading {
    animation: none !important;
  }
  .sh-skeleton {
    background: var(--sh-surface-3);
  }
}

.unit-refresh-line,
.fin-refresh-line {
  color: var(--sh-primary);
}

/* ——— Оболочка и таблицы данных ——— */
.sh-table-shell,
.unit-table-shell,
.fin-sku-table-shell,
.ads-shell,
.content-table-shell,
.ai-assist-table-shell,
.sag-shell {
  position: relative;
  min-width: 0;
  /* Вертикальный скролл — у страницы; горизонталь — у .sh-table-x-scroll (иначе sticky th не работает) */
  overflow: visible;
  border-radius: var(--sh-workspace-shell-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow);
}

.sh-table-x-scroll {
  overflow-x: auto;
  /* visible: иначе position:sticky у thead/колонок ломается (clip создаёт containing block) */
  overflow-y: visible;
  max-width: 100%;
  /* gutter убран: с нижним .sh-bottom-x-scroll давал «двойной» скролл */
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
  /* Запас под нижний H-бар — последняя строка не перекрывается */
  padding-bottom: 0.35rem;
  box-sizing: border-box;
}

/* Прячем нативный H-скролл везде, где есть нижний бар (иначе дубль).
   График (.sh-trend__scroll) — исключение: свой скролл под плотом, без fixed-бара. */
.sh-table-x-scroll,
[data-sh-bottom-scroll]:not(.sh-trend__scroll),
.fbs-shell > .sh-table-x-scroll,
.unit-workspace .sh-table-x-scroll,
.unit-table-scroll,
.ads-shell,
.ads-shell > .sh-table-x-scroll,
.repricer-shell > .sh-table-x-scroll,
.promo-shell .sh-table-x-scroll,
.sag-shell > .sh-table-x-scroll,
.fin-sku-table-shell > .sh-table-x-scroll,
.price-shell .sh-table-x-scroll {
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}
.sh-table-x-scroll::-webkit-scrollbar,
[data-sh-bottom-scroll]:not(.sh-trend__scroll)::-webkit-scrollbar,
.fbs-shell > .sh-table-x-scroll::-webkit-scrollbar,
.unit-workspace .sh-table-x-scroll::-webkit-scrollbar,
.ads-shell::-webkit-scrollbar,
.repricer-shell > .sh-table-x-scroll::-webkit-scrollbar,
.promo-shell .sh-table-x-scroll::-webkit-scrollbar,
.sag-shell > .sh-table-x-scroll::-webkit-scrollbar,
.fin-sku-table-shell > .sh-table-x-scroll::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
/* Фин.отчёт: вертикальный скролл видим; H — нижний бар (горизонтальный натив скрыт). */
.fin-workspace .sh-table-wrap.finance-raw-scroll {
  scrollbar-width: thin !important;
  -ms-overflow-style: auto;
}
.fin-workspace .sh-table-wrap.finance-raw-scroll::-webkit-scrollbar {
  width: 0.55rem !important;
  height: 0 !important;
}
.fin-workspace .sh-table-wrap.finance-raw-scroll::-webkit-scrollbar:horizontal {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
/* FBO: порт не растягивается вместе с таблицей, нативный H-скролл виден. */
.fbo-shell {
  contain: inline-size;
  overflow-x: hidden;
}
.fbo-shell > .sh-table-x-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.fbo-shell > .sh-table-x-scroll::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.fin-workspace .sh-table-wrap.finance-raw-scroll::-webkit-scrollbar:vertical {
  width: 0.55rem !important;
  display: block !important;
}

/* Акции: цена + M/ROI под каждой ценой (Ozon и WB) */
.promo-price-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.45rem;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  line-height: 1.35;
}
.promo-price-stack__col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 5.35rem;
}
.promo-table th.promo-action-col,
.promo-table td.promo-cell {
  min-width: 17rem;
  max-width: 19rem;
}
.promo-action-col__title {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}
.promo-action-col__dates {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--sh-muted);
  line-height: 1.3;
  white-space: normal;
}
.promo-action-col__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin-top: 0.35rem;
}
.promo-action-price-input {
  width: 5.6rem;
  min-width: 5.6rem;
  font-size: 0.75rem;
}
.promo-check--current {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--sh-muted);
  white-space: nowrap;
}
.sh-table-row-search {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin: 0 0 0.55rem;
  background: transparent;
  flex: 0 1 auto;
  min-width: 0;
}
.sh-table-row-search__lab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--sh-muted);
  font-weight: 600;
  background: transparent;
  white-space: nowrap;
}
.sh-table-row-search__field {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
  z-index: 2;
}
.sh-table-row-search__input {
  min-width: 16rem;
  max-width: min(36rem, 70vw);
  padding-right: 1.6rem;
  background: #fff !important;
  background-color: #fff !important;
}
.sh-table-row-search__input::-webkit-search-cancel-button,
.sh-table-row-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.sh-table-row-search__clear {
  display: none;
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.15rem !important;
  min-width: 1.15rem !important;
  max-width: 1.15rem;
  height: 1.15rem !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--sh-muted, #667085) !important;
  line-height: 0;
  z-index: 5;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.75;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  box-shadow: none;
}
.sh-table-row-search__clear.is-on,
.sh-table-row-search__clear:not([hidden]) {
  display: inline-flex;
}
.sh-table-row-search__clear svg {
  display: block;
  width: 12px;
  height: 12px;
}
.sh-table-row-search__clear:hover {
  background: transparent !important;
  opacity: 1;
  color: var(--sh-text, #101828) !important;
}
.sh-table-row-search__count {
  margin-left: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sh-muted);
  white-space: nowrap;
}
.sh-table-toolbar-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
}
.sh-table-toolbar-row .promo-planned-row,
.sh-table-toolbar-row .repricer-target-upload-card,
.sh-table-toolbar-row.fin-sku-toolbar #fin-sku-expand {
  margin-left: auto;
  flex: 0 0 auto;
}
.sh-table-toolbar-row.fin-sku-toolbar {
  align-items: center;
}
.sh-table-toolbar-row.fin-sku-toolbar #fin-sku-expand {
  margin-left: auto;
}
.sh-table-toolbar-row .sh-table-row-search {
  margin: 0;
}
.sh-table-toolbar-row .unit-head-actions,
.sh-table-toolbar-row .ads-drr-toolbar {
  margin-left: auto;
}
.fin-metric-rub {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}
.fin-metric-amount {
  white-space: nowrap;
  flex-shrink: 0;
}
.fin-metric-units {
  font-size: 0.78em;
  font-weight: 650;
  color: var(--sh-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.fin-metric-debt {
  margin: 0.15rem 0 0;
  font-size: 0.82em;
  font-weight: 650;
  color: var(--sh-muted);
  white-space: nowrap;
}
.fin-metric-debt--neg {
  color: var(--sh-danger, #b42318);
}
.promo-cell-eco__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  align-items: center;
}
.promo-cell-eco__item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.promo-cell .ads-badge {
  white-space: nowrap;
}
.promo-cell-eco__lbl {
  font-size: 0.6rem;
  color: var(--sh-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* По товарам / фин.отчёт: явный вертикальный скролл; H — нижний бар. */
.fin-workspace .fin-sku-table-shell {
  max-height: min(78vh, 56rem);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  /* Не даём expanded-таблице раздувать viewport влево/вправо */
  contain: inline-size;
}
.fin-workspace .fin-sku-table-shell > .sh-table-x-scroll,
.fin-workspace .sh-table-wrap.finance-raw-scroll {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
}
.fin-workspace {
  max-width: 100%;
  overflow-x: clip;
}
.fin-workspace .fin-sku-table-shell.is-collapsed {
  max-height: none !important;
  overflow-y: hidden !important;
}
.fin-workspace .fin-sku-table-shell::-webkit-scrollbar {
  width: 0.55rem;
  height: 0;
  display: block;
}
.fin-workspace .sh-table-wrap.finance-raw-scroll {
  scrollbar-width: thin;
}
.fin-workspace .sh-table-wrap.finance-raw-scroll::-webkit-scrollbar {
  width: 0.55rem;
  height: 0;
  display: block;
}
.fin-workspace .sh-table-wrap.finance-raw-scroll.expanded {
  overflow-y: auto !important;
  scrollbar-width: thin;
}
.fin-workspace .sh-table-wrap.finance-raw-scroll.expanded::-webkit-scrollbar {
  width: 0.55rem;
  height: 0;
  display: block;
}

.sh-bottom-x-scroll {
  position: fixed;
  bottom: max(0px, env(safe-area-inset-bottom, 0px));
  /* Выше таблиц, ниже bugfab (3200) / cookie (2500) — но выше обычного контента */
  z-index: 2400;
  display: none;
  height: 0.875rem;
  pointer-events: auto;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--sh-muted) color-mix(in srgb, var(--sh-surface) 92%, transparent);
  scrollbar-width: thin;
  background: color-mix(in srgb, var(--sh-surface) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--sh-border) 80%, transparent);
  border-radius: 999px;
  box-shadow: 0 -0.125rem 0.5rem color-mix(in srgb, #0f172a 12%, transparent);
  -webkit-overflow-scrolling: touch;
}

.sh-bottom-x-scroll.is-visible {
  display: block;
}

.sh-bottom-x-scroll__spacer {
  height: 1px;
  pointer-events: none;
}

.sh-bottom-x-scroll::-webkit-scrollbar {
  height: 0.75rem;
}

.sh-bottom-x-scroll::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--sh-surface) 92%, transparent);
  border-radius: 999px;
}

.sh-bottom-x-scroll::-webkit-scrollbar-thumb {
  background: var(--sh-muted);
  border: 0.1875rem solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

@media (max-width: 640px) {
  .sh-bottom-x-scroll {
    height: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-motion-reveal,
  .sh-motion-reveal.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .sh-motion-card .sh-ico,
  .sh-motion-icon .sh-ico {
    transform: none !important;
    transition: none;
  }
}

.sh-table,
.unit-table,
.fin-sku-table,
.ads-table,
.ai-assist-table,
table.sh-table {
  table-layout: fixed;
  width: max-content;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--sh-table-font);
  color: var(--sh-text);
}

/* Не оставлять справа полосу фона scroll-container при дробном округлении ширин Unit. */
.unit-workspace .sh-table-x-scroll {
  background: var(--sh-surface);
}
.unit-workspace table.unit-table {
  width: max-content;
  min-width: max-content;
}

/* Липкая шапка: table.sh-sticky-head-active + --sh-sticky-viewport-top (sh-table-sticky-head.js) */

.sh-table thead th,
.unit-table thead th,
.fin-sku-table thead th,
.ads-table thead th,
.ai-assist-table thead th,
.sh-table tbody td,
.unit-table tbody td,
.fin-sku-table tbody td,
.ads-table td,
.ai-assist-table tbody td {
  box-sizing: border-box;
  padding: var(--sh-table-cell-py) var(--sh-table-cell-px);
  border-bottom: 1px solid var(--sh-table-row-line);
  vertical-align: middle;
}

.sh-table thead th,
.unit-table thead th,
.fin-sku-table thead th,
.ads-table thead th,
.ai-assist-table thead th {
  background: var(--sh-table-header-bg) !important;
  text-align: left;
  font-size: var(--sh-table-font);
  font-weight: var(--sh-table-th-weight);
  white-space: nowrap;
}

.sh-table tbody td,
.unit-table tbody td,
.fin-sku-table tbody td,
.ads-table td,
.ai-assist-table tbody td {
  background: var(--sh-surface);
}

.ai-assist-table tbody td {
  vertical-align: top;
}

.sh-table tbody tr:hover td,
.unit-table tbody tr:hover td,
.fin-sku-table tbody tr:hover td,
.ads-table tbody tr:hover td,
.ai-assist-table tbody tr:hover td {
  background: var(--sh-surface-3);
}
/* Sticky ДРР на Рекламе иначе остаётся с !important surface и «выпадает» из hover строки. */
.ads-table tbody tr:hover td.ads-td-total-drr,
.ads-table tbody tr:hover td.ads-td-sku,
.ads-table tbody tr:hover td.ads-td-name,
.ads-table tbody tr:hover > td.ads-td-total-drr,
.ads-wrap .ads-table tbody tr:hover td.ads-td-total-drr {
  background: var(--sh-surface-3) !important;
}

.sh-table .text-right,
.unit-table .text-right,
.fin-sku-table .text-right,
.ads-table .text-right {
  text-align: right;
}

.sh-table .text-center,
.unit-table .text-center,
.ads-table .text-center {
  text-align: center;
}

/* ——— Диалоги / всплывающие панели ——— */
.sh-dialog,
.sh-cal-popover,
.sh-cab-panel,
.sh-brand-panel {
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow-md);
}

.sh-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1990;
  background: color-mix(in srgb, var(--sh-text) 28%, transparent);
  backdrop-filter: blur(2px);
}

.sh-dialog-panel {
  position: fixed;
  z-index: 2000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(85vh, 40rem);
  overflow: auto;
  padding: var(--sh-space-xl);
}

.sh-dialog-panel__title {
  margin: 0 0 var(--sh-space-md);
  font-size: var(--sh-text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sh-text);
}

.sh-dialog-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--sh-space-sm);
  margin-top: var(--sh-space-lg);
}

.sh-cookie-banner {
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  box-shadow: var(--sh-shadow-md);
}

/* ——— Тулбар workspace ——— */
.sh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sh-space-md) var(--sh-space-lg);
}

.sh-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sh-space-sm) var(--sh-space-md);
}

/* ——— SKU-таблицы workspace (единый регламент) ——— */
.sh-col-sku,
.sh-th-sku,
.sh-td-sku,
.unit-th-sku,
.unit-td-sku,
.ads-th-sku,
.ads-td-sku,
.fbo-th-sku,
.fbo-td-sku,
.fbs-col-sku-th,
.fbs-col-sku-td,
.content-th-sku,
.content-td-sku,
.sag-th-sku,
.sag-td-sku {
  width: var(--sh-col-sku-width);
  min-width: var(--sh-col-sku-width);
  max-width: var(--sh-col-sku-width);
}

.sh-col-name,
.sh-th-name,
.sh-td-name,
.unit-th-name,
.unit-td-name,
.ads-th-name,
.ads-td-name,
.fbo-th-name,
.fbo-td-name,
.fbs-col-name-th,
.fbs-col-name-td,
.content-th-name,
.content-td-name,
.sag-th-name,
.sag-td-name {
  width: var(--sh-col-name-width) !important;
  min-width: var(--sh-col-name-width) !important;
  max-width: var(--sh-col-name-width) !important;
  box-sizing: border-box;
}
.content-td-name,
.sag-td-name {
  overflow: hidden;
}
.fbs-col-name-td,
.fbo-td-name {
  overflow: visible;
}
.fbs-table thead th.fbs-col-name-th,
.content-table thead th.content-th-name,
.sag-table thead th.sag-th-name {
  overflow: visible;
  text-overflow: clip;
}

.unit-name-clip,
.fbo-name-clip,
.fbs-ellipsis,
.content-ellipsis,
.fin-sku-title,
.fin-name-clip,
.ads-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.content-table thead th.content-dyn-head,
.content-table tbody td.content-check-cell {
  width: 8.25rem;
  min-width: 8.25rem;
  max-width: 8.25rem;
  box-sizing: border-box;
}

.content-table tbody td.content-check-cell {
  width: 3.25rem;
  min-width: 3.25rem;
  max-width: 3.25rem;
  text-align: center;
}

.sh-td-planfact,
.fbo-th-planfact,
.fbo-td-planfact,
.sag-td-planfact {
  box-sizing: border-box;
  min-width: var(--sh-col-metric-width) !important;
  width: var(--sh-col-metric-width) !important;
  max-width: var(--sh-col-metric-width) !important;
  padding-left: var(--sh-metric-cell-px) !important;
  padding-right: var(--sh-metric-cell-px) !important;
  text-align: center;
}

/* План-факт: плашки по центру ячейки (на Юнит/Акции не трогаем — иначе «съезжают»). */
.fbo-table td.fbo-td-planfact,
.fbo-table td.sh-td-planfact,
.sag-table td.sag-td-planfact,
.sag-table td.sh-td-planfact {
  vertical-align: middle !important;
}

.sh-col-metric,
.sh-table .sh-col-metric,
.unit-table .sh-col-metric,
.ads-table .sh-col-metric,
.fbs-table .sh-col-metric,
.fbo-table .sh-col-metric,
.content-table .sh-col-metric {
  box-sizing: border-box;
  min-width: var(--sh-col-metric-width) !important;
  width: var(--sh-col-metric-width) !important;
  max-width: var(--sh-col-metric-width) !important;
  padding-left: var(--sh-metric-cell-px) !important;
  padding-right: var(--sh-metric-cell-px) !important;
}

/* Вкладки SKU-таблиц: одинаковые отступы у блоков метрик (эталон — FBO ABC) */
.fbo-table thead th.sh-col-metric,
.fbo-table tbody td.sh-col-metric,
.fbs-table thead th.sh-col-metric,
.fbs-table tbody td.sh-col-metric,
.fbs-table thead th.fbs-col-abc,
.fbs-table tbody td.fbs-col-abc,
.ads-table thead th.sh-col-metric,
.ads-table tbody td.sh-col-metric,
.ads-table thead th.sh-col-metric-wide,
.ads-table tbody td.sh-col-metric-wide,
.content-table thead th.sh-col-metric,
.content-table tbody td.sh-col-metric,
.unit-table thead th.sh-col-metric,
.unit-table tbody td.sh-col-metric,
.sag-table thead th.sh-col-metric,
.sag-table tbody td.sh-col-metric {
  padding-left: var(--sh-metric-cell-px) !important;
  padding-right: var(--sh-metric-cell-px) !important;
  text-align: center;
}

/* Вертикальная линия только после «Наименование» (контент / юнит / реклама / FBS / FBO / promo) */
.fbs-table thead th,
.fbs-table tbody td,
.content-table thead th,
.content-table tbody td,
.ads-table thead th,
.ads-table tbody td,
.unit-table thead th,
.unit-table tbody td,
.fbo-table thead th,
.fbo-table tbody td,
.promo-table thead th,
.promo-table tbody td {
  border-right: none;
}
.fbs-col-name-th,
.fbs-col-name-td,
.content-th-name,
.content-td-name,
.ads-th-name,
.ads-td-name,
.unit-th-name,
.unit-td-name,
.fbo-th-name,
.fbo-td-name,
.promo-th-sticky-name,
.promo-td-sticky-name {
  border-right: 1px solid var(--sh-table-row-line) !important;
}
.repricer-table thead th,
.repricer-table tbody td {
  border-right: none;
}
.repricer-th-name,
.repricer-td-name {
  border-right: 1px solid var(--sh-table-row-line) !important;
}
.repricer-table thead th.sh-th-sortable .sh-th-sortable__icon {
  opacity: 0.85;
  min-width: 0.65rem;
}
.repricer-after-name {
  border-left: 1px solid var(--sh-border) !important;
}
/* План/факт: без линий после SKU, ABC, Динамика; разделитель после наименования и остатков */
.sag-table thead th,
.sag-table tbody td {
  border-right: none;
}
.sag-th-name,
.sag-td-name,
.sag-th-stock,
.sag-td-stock {
  border-right: 1px solid var(--sh-table-row-line) !important;
}
.sag-th-sku,
.sag-td-sku,
.sag-td-sku.sh-td-sku-article,
.sag-th-abc,
.sag-td-abc,
.sag-th-dynamics,
.sag-td-dynamics {
  border-right: none !important;
  box-shadow: none !important;
}
.sag-th-name,
.sag-td-name,
.sag-th-stock,
.sag-td-stock {
  box-shadow: none !important;
}

.sh-col-metric-wide {
  min-width: var(--sh-col-metric-wide-width) !important;
  width: var(--sh-col-metric-wide-width) !important;
  max-width: var(--sh-col-metric-wide-width) !important;
}

.fbo-table .sh-abc-pair,
.fbs-table .sh-abc-pair,
.ads-table .sh-abc-pair,
.unit-table .sh-abc-pair,
.sag-table .sh-abc-pair {
  justify-content: center;
}

.sh-after-product-col,
.fbs-after-name,
.fbo-after-name {
  border-left: 1px solid var(--sh-border) !important;
}

.fbo-after-box-weight {
  border-right: 1px solid var(--sh-border) !important;
}

.sh-tabular {
  font-variant-numeric: tabular-nums;
}

.sh-cell-right,
.fbs-num,
.fbo-num,
.ads-td-num {
  text-align: right;
}

.sh-cell-center,
.fbs-center,
.fbo-center,
.ads-cell-center,
.ads-cell-center-muted {
  text-align: center;
}

.fbo-shell {
  position: relative;
  min-width: 0;
  overflow: visible;
  border-radius: var(--sh-workspace-shell-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow);
}

.fbs-shell {
  position: relative;
  min-width: 0;
  overflow: visible;
  border-radius: var(--sh-workspace-shell-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow);
}

.fbo-shell {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.fbo-table,
.content-table {
  table-layout: fixed;
  width: max-content;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--sh-table-font);
  color: var(--sh-text);
}

.fbs-table {
  table-layout: fixed;
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--sh-table-font);
  color: var(--sh-text);
}

/* fbo/fbs/content: липкий thead — через .sh-sticky-head-active */

.fbs-table thead th,
.fbo-table thead th,
.content-table thead th,
.fbs-table td,
.fbo-table td,
.content-table tbody td {
  box-sizing: border-box;
  padding: var(--sh-table-cell-py) var(--sh-table-cell-px);
  border-bottom: 1px solid var(--sh-table-row-line);
  vertical-align: middle;
  font-size: var(--sh-table-font);
}

.fbs-table thead th,
.fbo-table thead th,
.content-table thead th {
  background: var(--sh-table-header-bg) !important;
  text-align: left;
  font-weight: var(--sh-table-th-weight);
  white-space: nowrap;
}

.fbs-table td,
.fbo-table td,
.content-table tbody td {
  background: var(--sh-surface);
}

.fbs-table tbody tr:hover td,
.fbo-table tbody tr:hover td:not(.fbo-td-sku):not(.fbo-td-art):not(.fbo-td-name):not(.fbo-td-abc):not(.fbo-td-dynamics):not(.fbo-td-planfact),
.content-table tbody tr:hover td:not(.content-td-sku):not(.content-td-name) {
  background: var(--sh-surface-3);
}

/* План/Факт: компактная сетка по дням (отдельные отступы ячеек) */
.sag-table {
  width: max-content;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--sh-table-font);
  color: var(--sh-text);
}

.fbo-table tbody tr:hover .fbo-td-sku,
.fbo-table tbody tr:hover .fbo-td-art,
.fbo-table tbody tr:hover .fbo-td-name,
.fbo-table tbody tr:hover .fbo-td-abc,
.fbo-table tbody tr:hover .fbo-td-dynamics,
.fbo-table tbody tr:hover .fbo-td-planfact,
.content-table tbody tr:hover .content-td-sku,
.content-table tbody tr:hover .content-td-name {
  background: var(--sh-surface-3);
}

.sh-th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: relative;
}

.sh-th-sortable__inner {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}

th.text-right.sh-th-sortable .sh-th-sortable__inner,
.sh-th-sortable.text-right .sh-th-sortable__inner {
  justify-content: flex-end;
  width: 100%;
}
.unit-workspace .unit-table thead th.text-right.sh-th-sortable .sh-th-sortable__inner,
.unit-workspace .sh-sticky-head-float__table.unit-table thead th.text-right.sh-th-sortable .sh-th-sortable__inner {
  width: auto;
  max-width: 100%;
}

th.sh-col-metric.sh-th-sortable .sh-th-sortable__inner,
.fbs-center.sh-th-sortable .sh-th-sortable__inner {
  justify-content: center;
  width: 100%;
}

.sh-th-sortable__tools {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.sh-th-sortable .sh-help-wrap {
  position: static;
  transform: none;
  flex-shrink: 0;
  z-index: auto;
  margin: 0;
  pointer-events: auto;
}

.sh-th-sortable.sh-col-metric .sh-help-wrap,
.fbs-center.sh-th-sortable .sh-help-wrap,
.unit-workspace .unit-table thead th.sh-th-sortable .sh-help-wrap,
.sag-table thead th.sh-th-sortable .sh-help-wrap,
.fbs-table thead th.sh-th-sortable .sh-help-wrap {
  right: auto;
}

.sh-th-sortable__tools {
  margin-left: 0.15rem;
}

.sh-th-sortable .sh-th-sortable__inner {
  padding-right: 0.1rem;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.sh-th-sortable__label {
  display: inline;
}

.sh-th-sortable__icon {
  display: inline-block;
  width: 0.65rem;
  flex-shrink: 0;
  opacity: 0.7;
  vertical-align: middle;
}

.sh-th-sortable__icon::before {
  content: "⇅";
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: -0.08em;
}

.sh-th-sort--active .sh-th-sortable__icon {
  opacity: 1;
  color: var(--sh-primary);
}

.sh-th-sort--asc .sh-th-sortable__icon::before {
  content: "▲";
  font-size: 0.5rem;
}

.sh-th-sort--desc .sh-th-sortable__icon::before {
  content: "▼";
  font-size: 0.5rem;
}

.sh-th-sortable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sh-primary) 55%, transparent);
  outline-offset: -2px;
}

.sag-table thead th.sh-th-sortable,
.fbs-table thead th.sh-th-sortable,
.sh-sku-period-table thead th.sh-th-sortable,
.finance-raw-table thead th.sh-th-sortable {
  overflow: visible;
}

button.sh-cal-day.sh-cal-day--pick-from,
button.sh-cal-day.sh-cal-day--pick-to {
  color: var(--sh-text) !important;
}

.sh-table-pager,
.unit-table-pager,
.fbs-table-pager,
.fbo-table-pager,
.ads-table-pager,
.content-table-pager,
.fin-table-pager {
  margin-top: var(--sh-space-sm);
  display: block;
  width: 100%;
}

.ads-unclassified-wrap {
  margin-top: var(--sh-space-lg);
  padding-top: var(--sh-space-md);
  border-top: 1px solid var(--sh-border, #e5e7eb);
}

.ads-unclassified-wrap.is-hidden {
  display: none;
}

.ads-unclassified-title {
  margin: 0 0 var(--sh-space-xs);
  font-size: var(--sh-text-md, 1rem);
  font-weight: 600;
}

.ads-unclassified-hint {
  margin: 0 0 var(--sh-space-sm);
  color: var(--sh-muted);
  font-size: var(--sh-text-sm);
}

.ads-table--unclassified {
  width: 100%;
  font-size: var(--sh-text-sm);
}

.ads-unclassified-list {
  display: flex;
  flex-direction: column;
  gap: var(--sh-space-sm);
}

.ads-unclassified-item {
  border: 1px solid var(--sh-border, #e5e7eb);
  border-radius: var(--sh-radius-sm, 6px);
  background: var(--sh-surface-2, #f9fafb);
}

.ads-unclassified-item__summary {
  cursor: pointer;
  padding: var(--sh-space-sm) var(--sh-space-md);
  font-size: var(--sh-text-sm);
  list-style: none;
}

.ads-unclassified-item__summary::-webkit-details-marker {
  display: none;
}

.ads-unclassified-item__num {
  color: var(--sh-muted);
  font-weight: 600;
}

.ads-unclassified-raw {
  margin: 0 0 var(--sh-space-sm);
  padding: var(--sh-space-sm) var(--sh-space-md);
  overflow: auto;
  max-height: min(60vh, 28rem);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--sh-surface-1, #fff);
  border: 1px solid var(--sh-border, #e5e7eb);
  border-radius: var(--sh-radius-sm, 6px);
}

.ads-unclassified-raw-label {
  margin: var(--sh-space-sm) 0 var(--sh-space-xs);
  font-size: var(--sh-text-xs, 0.8125rem);
  font-weight: 600;
  color: var(--sh-muted);
}

.sh-table-pager__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sh-space-md);
  flex-wrap: wrap;
}

.sh-pager-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--sh-muted);
  font-size: var(--sh-text-sm);
  line-height: 1.35;
  flex-wrap: wrap;
}
.sh-pager-meta__lab {
  white-space: nowrap;
}
.sh-pager-goto {
  width: 3.25rem;
  min-width: 3.25rem;
  max-width: 4.5rem;
  padding: 0.2rem 0.35rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--sh-text);
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-control-radius, 0.45rem);
}

.sh-pager-controls {
  display: flex;
  align-items: center;
  gap: var(--sh-space-sm);
  flex-wrap: wrap;
}

.sh-pager-size-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sh-muted);
  font-size: var(--sh-text-sm);
  line-height: 1.35;
}

select.sh-select,
.sh-pager-size-label select {
  min-width: 5.5rem;
  padding-right: 1.75rem;
  cursor: pointer;
  vertical-align: middle;
}

.sh-pager-size-label select:focus {
  outline: none;
  border-color: var(--sh-primary);
  box-shadow: var(--sh-focus-ring);
}

/* Компактные поля в шапке таблицы (Content и др.) */
.sh-table-head-input,
.content-head-input {
  box-sizing: border-box;
  min-height: 1.75rem;
  padding: var(--sh-space-xs) var(--sh-space-sm);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius-sm);
  background: color-mix(in srgb, var(--sh-surface) 88%, transparent);
  color: var(--sh-text);
  font-family: inherit;
  font-size: var(--sh-text-sm);
  font-weight: 600;
  line-height: 1.2;
}

.sh-table-head-input:focus,
.content-head-input:focus {
  outline: none;
  border-color: var(--sh-primary);
  box-shadow: var(--sh-focus-ring);
}

.sh-table-head-btn,
.content-col-del {
  width: 1.5rem;
  height: 1.5rem;
  min-width: 1.5rem;
  border-radius: var(--sh-radius-sm);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  color: var(--sh-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--sh-text-sm);
  line-height: 1;
  padding: 0;
}

.sh-table-head-btn:hover,
.content-col-del:hover {
  color: var(--sh-danger);
  border-color: color-mix(in srgb, var(--sh-danger) 45%, var(--sh-border));
}

.content-col-del[hidden] {
  display: none;
}

.sh-table-pager .sh-pager-wrap,
.unit-table-pager .sh-pager-wrap,
.fbs-table-pager .sh-pager-wrap,
.fbo-table-pager .sh-pager-wrap,
.ads-table-pager .sh-pager-wrap,
.content-table-pager .sh-pager-wrap,
.fin-table-pager .sh-pager-wrap {
  width: 100%;
  padding: 0 !important;
}
.fbo-table-pager,
.fbs-table-pager,
.ads-table-pager,
.repricer-table-pager,
.fin-table-pager,
.content-table-pager,
.unit-table-pager,
#promo-pager,
.sag-table-pager,
.sag-planfact-pager {
  position: relative;
  z-index: 3;
  margin-top: 0.5rem;
  /* Запас под fixed H-бар — без белой «подложки» */
  padding-bottom: 1.25rem;
  background: transparent;
}

/* Sticky SKU / name — общая геометрия (z-index задаётся в workspace) */
/* Разделитель только у name; у SKU без box-shadow и без border-right */
.sh-sticky-sku,
.unit-th-sku,
.unit-td-sku,
.ads-th-sku,
.ads-td-sku,
.fbo-th-sku,
.fbo-td-sku,
.fbs-col-sku-th,
.fbs-col-sku-td,
.content-th-sku,
.content-td-sku,
.sag-th-sku,
.sag-td-sku,
.promo-td-sticky-sku,
.promo-th-sticky-sku,
.repricer-td-sku,
.repricer-th-sku {
  position: sticky;
  left: 0;
  box-shadow: none !important;
  border-right: none !important;
}

.sh-td-sku-article,
.unit-td-sku,
.ads-td-sku,
.promo-td-sticky-sku,
.repricer-td-sku,
.fbo-td-sku,
.fbs-col-sku-td,
.content-td-sku,
.sag-td-sku {
  vertical-align: top;
  padding-top: var(--sh-table-cell-py);
}

.sh-sticky-name,
.unit-th-name,
.unit-td-name,
.ads-th-name,
.ads-td-name,
.fbo-th-name,
.fbo-td-name,
.fbs-col-name-th,
.fbs-col-name-td,
.content-th-name,
.content-td-name,
.sag-th-name,
.sag-td-name,
.promo-td-sticky-name,
.promo-th-sticky-name,
.repricer-td-name,
.repricer-th-name {
  position: sticky;
  left: var(--sh-col-sku-width);
  box-shadow: 1px 0 0 var(--sh-table-row-line);
}

/* Finance / отчёты: периодная SKU-таблица */
.sh-sku-period-table {
  table-layout: fixed;
  width: max-content;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--sh-table-font);
  color: var(--sh-text);
  -webkit-font-smoothing: antialiased;
}

.sh-sku-period-table thead th,
.sh-sku-period-table tbody td {
  box-sizing: border-box;
  padding: var(--sh-table-cell-py) var(--sh-table-cell-px);
  border-bottom: 1px solid var(--sh-table-row-line);
  vertical-align: middle;
  background: var(--sh-surface);
}

.sh-sku-period-table thead th {
  background: var(--sh-table-header-bg) !important;
  text-align: left;
  font-weight: var(--sh-table-th-weight);
  white-space: nowrap;
}

.sh-sku-period-table thead th.text-right,
.sh-sku-period-table tbody td.text-right {
  text-align: right;
  white-space: nowrap;
  width: 6.75rem;
  min-width: 6.75rem;
  max-width: 7.25rem;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-sku-period-table tbody tr:hover td {
  background: var(--sh-surface-3);
}

.sh-sku-period-table--sku-art-merged .fin-th-sticky-sku,
.sh-sku-period-table--sku-art-merged .fin-td-sticky-sku.sh-td-sku-article {
  width: var(--sh-col-sku-width);
  min-width: var(--sh-col-sku-width);
  max-width: var(--sh-col-sku-width);
}

.sh-sku-period-table--sku-art-merged .fin-th-sticky-name,
.sh-sku-period-table--sku-art-merged .fin-td-sticky-name {
  left: var(--sh-col-sku-width);
  width: var(--sh-col-name-width);
  min-width: var(--sh-col-name-width);
  max-width: var(--sh-col-name-width);
}

.fin-sku-table-shell {
  position: relative;
  min-width: 0;
  /* Финансы: вертикальный скролл внутри панели — см. finance_workspace_styles */
  overflow: visible;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow);
}

/* Утилиты типографики (workspace inline → токены) */
.sh-text-2xs { font-size: var(--sh-text-2xs); }
.sh-text-xs { font-size: var(--sh-text-xs); }
.sh-text-sm { font-size: var(--sh-text-sm); }
.sh-text-compact { font-size: var(--sh-text-compact); }
.sh-text-base { font-size: var(--sh-text-base); }
.sh-text-md { font-size: var(--sh-text-md); }
.sh-text-lg { font-size: var(--sh-text-lg); }
.sh-text-xl { font-size: var(--sh-text-xl); }
.sh-text-h2 { font-size: var(--sh-text-h2); }
.sh-text-h1 { font-size: var(--sh-text-h1); }

.muted,
.sh-muted-text {
  color: var(--sh-muted);
}

/* Липкая шапка: fixed-копия thead (sh-table-sticky-head.js) */
.sh-sticky-head-float {
  position: fixed;
  z-index: 44;
  display: none;
  overflow: hidden;
  pointer-events: none;
  background: var(--sh-table-header-bg);
  box-shadow: 0 2px 0 var(--sh-table-row-line), 0 4px 12px -4px rgba(0, 0, 0, 0.08);
}
/* Ads: чекбоксы типов не клипать по краю float-бара */
body > .sh-sticky-head-float:has(table.ads-table),
.sh-sticky-head-float:has(table.ads-table) {
  overflow: hidden;
}
/* Сортировка: клики только по th (остальной float — none, чтобы не ломать скролл тела). */
.sh-sticky-head-float__inner,
.sh-sticky-head-float__scroll,
.sh-sticky-head-float__table,
.sh-sticky-head-float__table thead,
.sh-sticky-head-float__table thead tr {
  pointer-events: none;
}
.sh-sticky-head-float__table thead th[data-sh-sort],
.sh-sticky-head-float__table thead th.sh-th-sortable,
.fbs-shell > .sh-sticky-head-float thead th[data-sh-sort],
.unit-workspace .sh-sticky-head-float thead th[data-sh-sort],
.ads-wrap .sh-sticky-head-float thead th[data-sh-sort],
.ads-wrap .sh-sticky-head-float thead th.ads-th-type-with-toggle,
.sh-sticky-head-float thead th .ads-th-type-all,
.sh-sticky-head-float thead th input.ads-type-all-cb,
.sh-sticky-head-float thead th input[type="checkbox"] {
  pointer-events: auto;
  cursor: pointer;
}
.sag-shell > .sh-sticky-head-float {
  z-index: 46;
  /* Одна линия снизу вместо shadow + border thead */
  box-shadow: 0 1px 0 0 var(--sh-table-row-line, var(--sh-border));
  background: var(--sh-table-header-bg);
}
/* Заполняем ширину оболочки: flex-трек тянется, фон не обрывается справа */
.sag-shell > .sh-sticky-head-float .sh-sticky-head-float__inner,
.sag-shell > .sh-sticky-head-float .sh-sticky-head-float__scroll {
  height: 100%;
}
.sag-shell > .sh-sticky-head-float .sh-sticky-head-float__inner {
  width: 100%;
  min-width: 100%;
}
.sag-shell > .sh-sticky-head-float .sh-sag-float-head {
  width: 100%;
  min-width: 100%;
  height: 100%;
}
.sag-shell > .sh-sticky-head-float .sh-sag-float-head__pin,
.sag-shell > .sh-sticky-head-float .sh-sag-float-ws--pin {
  height: 100%;
  align-self: stretch;
}
.sag-shell > .sh-sticky-head-float .sh-sag-float-head__scroll {
  background: var(--sh-table-header-bg);
  height: 100%;
  align-self: stretch;
}
.sh-sag-float-head__pin .sh-sticky-head-float__table.sag-table thead th {
  padding: 0 !important;
  vertical-align: middle !important;
}
.sh-sag-float-head__pin .sag-float-th-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: 0.22rem 0.15rem;
  text-align: center;
  line-height: 1.25;
}
.sh-sag-float-head__pin .sag-th-sku .sag-float-th-inner,
.sh-sag-float-head__pin .sag-th-name .sag-float-th-inner {
  justify-content: flex-start;
  text-align: left;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
.sh-sag-float-head__track .sh-sticky-head-float__table.sag-table thead th {
  vertical-align: middle !important;
  box-sizing: border-box;
}
/* Нижняя линия только у .sh-sticky-head-float (box-shadow), не у коротких th */
.sag-shell > .sh-sticky-head-float .sag-table thead th {
  border-bottom-color: transparent !important;
}
.fbs-shell > .sh-sticky-head-float {
  z-index: 46;
  box-shadow: 0 1px 0 0 var(--sh-table-row-line, var(--sh-border));
  background: var(--sh-table-header-bg);
}
.fbs-shell > .sh-sticky-head-float .sh-sticky-head-float__inner,
.fbs-shell > .sh-sticky-head-float .sh-sticky-head-float__scroll {
  width: 100%;
  min-width: 100%;
  background: var(--sh-table-header-bg);
}
/* Скрытый нативный thead при pin: без нижней границы — иначе «двойная» линия */
table.sag-table.sh-sticky-head-active.sh-sticky-head-pinned > thead th {
  border-bottom-color: transparent !important;
}
.sh-sticky-head-float.is-visible {
  display: block;
}
.sh-sticky-head-float__scroll {
  /* Делаем реальный scroll-контейнер (как .sh-table-x-scroll), иначе sticky-колонки и colspans
     в сложных шапках (FBO) могут раскладываться иначе и визуально "съезжать". */
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  background: var(--sh-table-header-bg);
  scrollbar-width: none; /* Firefox */
}
.sh-sticky-head-float__scroll::-webkit-scrollbar { width: 0; height: 0; }
.sh-sticky-head-float__inner {
  display: block;
  width: 100%;
  min-width: 100%;
  background: var(--sh-table-header-bg);
}
.sh-sticky-head-float__table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}
.sh-sag-float-ws {
  display: block;
  width: max-content;
  min-width: 100%;
}
.sh-sag-float-ws .sh-sticky-head-float__table.sag-table {
  width: max-content;
  min-width: 100%;
}
/* План/Факт: закреплённые колонки отдельно, даты — transform как у тела таблицы */
.sh-sag-float-head {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-width: 100%;
  height: 100%;
}
.sh-sag-float-head__pin {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sh-table-header-bg);
  box-shadow: 1px 0 0 var(--sh-table-row-line);
  z-index: 3;
}
.sh-sag-float-head__pin > .sh-sticky-head-float__table {
  height: 100%;
  flex: 1 1 auto;
}
.sh-sag-float-head__scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.sh-sag-float-head__track {
  will-change: auto;
}
/* Pin/track: не тянуть таблицу на 100% — иначе pin схлопывается и пропадают SKU/Наименование */
.sh-sag-float-head__pin > .sh-sticky-head-float__table,
.sh-sag-float-head__track > .sh-sticky-head-float__table {
  min-width: 0 !important;
  width: max-content !important;
}
.sh-sag-float-head__pin table,
.sh-sag-float-head__track table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.sh-sag-float-head__pin thead th,
.sh-sag-float-head__track thead th {
  position: static !important;
  top: auto !important;
  background: var(--sh-table-header-bg) !important;
}
/* FBO: rowspan-колонки pin — по центру по вертикали, как в спокойной шапке */
.sh-sag-float-head__pin .fbo-th-sku,
.sh-sag-float-head__pin .fbo-th-name,
.sh-sag-float-head__pin .fbo-th-abc,
.sh-sag-float-head__pin .fbo-th-dynamics,
.sh-sag-float-head__pin .fbo-th-planfact,
.sh-sag-float-head__pin thead th[rowspan] {
  vertical-align: middle !important;
  padding: 0 !important;
}
.sh-sag-float-head__pin .fbo-float-th-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: var(--sh-table-cell-py) calc(var(--sh-table-cell-px) + 1.1rem) var(--sh-table-cell-py) var(--sh-table-cell-px);
  text-align: center;
  line-height: 1.25;
}
.sh-sag-float-head__pin .fbo-float-th-inner .sh-help-wrap {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
}
.sh-sag-float-head__pin .fbo-th-sku .fbo-float-th-inner,
.sh-sag-float-head__pin .fbo-th-name .fbo-float-th-inner {
  justify-content: flex-start;
  text-align: left;
}
.sh-sticky-head-float__table thead th {
  background: var(--sh-table-header-bg) !important;
  top: 0;
}

/* Горизонтально липкие колонки в плавающей шапке (scrollLeft у __scroll) */
.sh-sticky-head-float__table .unit-th-sku,
.sh-sticky-head-float__table .unit-th-name,
.sh-sticky-head-float__table .ads-th-sku,
.sh-sticky-head-float__table .ads-th-name,
.sh-sticky-head-float__table .fbo-th-sku,
.sh-sticky-head-float__table .fbo-th-name,
.sh-sticky-head-float__table .content-th-sku,
.sh-sticky-head-float__table .content-th-name {
  position: sticky !important;
  box-shadow: 1px 0 0 var(--sh-table-row-line);
}
.sh-sticky-head-float__table .fbs-col-sku-th,
.sh-sticky-head-float__table .fbs-col-name-th {
  position: sticky !important;
  box-shadow: none !important;
}
.sh-sticky-head-float__table .unit-th-sku,
.sh-sticky-head-float__table .ads-th-sku,
.sh-sticky-head-float__table .fbo-th-sku,
.sh-sticky-head-float__table .fbs-col-sku-th,
.sh-sticky-head-float__table .content-th-sku {
  left: 0 !important;
  z-index: 56 !important;
}
.sh-sticky-head-float__table .unit-th-name,
.sh-sticky-head-float__table .ads-th-name,
.sh-sticky-head-float__table .fbo-th-name,
.sh-sticky-head-float__table .fbs-col-name-th,
.sh-sticky-head-float__table .content-th-name {
  left: var(--sh-col-sku-width) !important;
  z-index: 55 !important;
}
/* Ads: типы в float-шапке ниже липких SKU/Name/ДРР — иначе наезд при гориз. скролле. */
.sh-sticky-head-float__table.ads-table thead th:not(.ads-th-sku):not(.ads-th-name):not(.ads-th-drr):not(.ads-th-total-drr),
.sh-sticky-head-float__table.ads-table thead th.sh-col-metric:not(.ads-th-drr):not(.ads-th-total-drr) {
  z-index: 1 !important;
}
.sh-sticky-head-float__table.ads-table thead th.ads-th-drr,
.sh-sticky-head-float__table.ads-table thead th.ads-th-total-drr {
  z-index: 50 !important;
}
/* План/Факт: left для sticky-колонок копируется из исходной таблицы (syncStickyLeftStyles) */
.sh-sticky-head-float__table .sag-th-sku {
  z-index: 56 !important;
}
.sh-sticky-head-float__table .sag-th-name {
  z-index: 55 !important;
}
.sh-sticky-head-float__table .sag-th-abc {
  z-index: 54 !important;
}
.sh-sticky-head-float__table .sag-th-dynamics,
.sh-sticky-head-float__table .sag-th-stock,
.sh-sticky-head-float__table .sag-th-month,
.sh-sticky-head-float__table .sag-th-kind {
  z-index: 53 !important;
}
table.sh-sticky-head-active.sh-sticky-head-pinned > thead {
  visibility: hidden;
  pointer-events: none;
}
/*
 * Ads: НЕ скрываем нативный thead при pin — float перекрывает его фоном.
 * visibility:hidden давал вспышку чекбоксов (появляются → пропадают) при открытии вкладки.
 */
table.ads-table.sh-sticky-head-active.sh-sticky-head-pinned > thead {
  visibility: visible !important;
  pointer-events: none;
}
table.ads-table.sh-sticky-head-active.sh-sticky-head-pinned > thead .ads-th-type-all,
table.ads-table.sh-sticky-head-active.sh-sticky-head-pinned > thead input.ads-type-all-cb {
  pointer-events: none;
}
.sh-sticky-head-float__table.ads-table thead th .ads-th-type-all,
.sh-sticky-head-float__table.ads-table thead th input.ads-type-all-cb {
  visibility: visible !important;
  opacity: 1 !important;
  display: inline-flex !important;
  pointer-events: auto !important;
}
.sh-sticky-head-float__table.ads-table thead th input.ads-type-all-cb {
  display: inline-block !important;
}
/* Unit: липкие th в нативной шапке не должны просвечивать под float-копией */
table.unit-table.sh-sticky-head-active.sh-sticky-head-pinned > thead th {
  border-bottom-color: transparent !important;
}
/* Остальные таблицы: при pin скрываем нижнюю границу нативного thead, чтобы не было «двойной» линии */
table.sh-sticky-head-active.sh-sticky-head-pinned > thead th {
  border-bottom-color: transparent !important;
}

/* Мобильная версия: без липких колонок и плавающей шапки (ПК без изменений) */
@media (max-width: 900px) {
  .sh-sticky-sku,
  .sh-sticky-name,
  .unit-th-sku,
  .unit-td-sku,
  .unit-th-name,
  .unit-td-name,
  .ads-th-sku,
  .ads-td-sku,
  .ads-th-name,
  .ads-td-name,
  .fbo-th-sku,
  .fbo-td-sku,
  .fbo-th-name,
  .fbo-td-name,
  .fbo-th-abc,
  .fbo-td-abc,
  .fbo-th-dynamics,
  .fbo-td-dynamics,
  .fbo-th-planfact,
  .fbo-td-planfact,
  .fbs-page .fbs-table thead th.fbs-col-sku-th,
  .fbs-page .fbs-table thead th.fbs-col-name-th,
  .fbs-col-sku-th,
  .fbs-col-sku-td,
  .fbs-col-name-th,
  .fbs-col-name-td,
  .content-th-sku,
  .content-td-sku,
  .content-th-name,
  .content-td-name,
  .sag-workspace .sag-table .sag-th-sku,
  .sag-workspace .sag-table .sag-td-sku,
  .sag-workspace .sag-table .sag-th-art,
  .sag-workspace .sag-table .sag-td-art,
  .sag-workspace .sag-table .sag-th-name,
  .sag-workspace .sag-table .sag-td-name,
  .sag-workspace .sag-table .sag-th-abc,
  .sag-workspace .sag-table .sag-td-abc,
  .sag-workspace .sag-table .sag-th-dynamics,
  .sag-workspace .sag-table .sag-td-dynamics,
  .sag-workspace .sag-table .sag-th-stock,
  .sag-workspace .sag-table .sag-td-stock,
  .sag-workspace .sag-table .sag-th-month,
  .sag-workspace .sag-table .sag-td-month,
  .sag-workspace .sag-table .sag-th-kind,
  .sag-workspace .sag-table .sag-td-kind,
  .sag-th-sku,
  .sag-td-sku,
  .sag-th-art,
  .sag-td-art,
  .sag-th-name,
  .sag-td-name,
  .sag-th-abc,
  .sag-td-abc,
  .sag-th-dynamics,
  .sag-td-dynamics,
  .sag-th-stock,
  .sag-td-stock,
  .sag-th-month,
  .sag-td-month,
  .sag-th-kind,
  .sag-td-kind,
  .fin-th-sticky-sku,
  .fin-td-sticky-sku,
  .fin-th-sticky-art,
  .fin-td-sticky-art,
  .fin-th-sticky-name,
  .fin-td-sticky-name {
    position: static !important;
    left: auto !important;
    box-shadow: none !important;
    z-index: auto !important;
  }
  .fin-workspace .sh-table.finance-raw-table thead th,
  .fin-sku-table-shell .sh-sku-period-table thead > tr > th {
    position: static !important;
    top: auto !important;
    box-shadow: none !important;
  }
  .sh-sticky-head-float {
    display: none !important;
  }
  table.sh-sticky-head-active.sh-sticky-head-pinned > thead {
    visibility: visible !important;
  }

  /* План/Факт (в period bar, если встроен): одна строка — план/факт слева, сброс справа */
  .sh-period-bar .sh-period-inputs-row {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .sh-period-sag-actions {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.3rem 0.4rem;
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
  }
  .sh-period-sag-field {
    flex: 0 1 auto;
    min-width: 0;
  }
  .sh-period-sag-reset {
    margin-left: auto;
    flex-shrink: 0;
  }
  .sag-planfact-toolbar .sh-period-sag-field > span {
    font-size: var(--sh-text-xs);
  }
  .sag-planfact-toolbar .sh-period-sag-actions #sag-global-plan-rub,
  .sag-planfact-toolbar .sh-period-sag-actions #sag-global-fact-rub,
  .sag-planfact-toolbar .sh-period-sag-actions .sh-period-sag-input,
  .sag-planfact-toolbar .sh-period-sag-reset.unit-btn {
    min-height: var(--sh-control-height);
    height: var(--sh-control-height);
    font-size: var(--sh-text-sm);
  }
  .sag-planfact-toolbar .sh-period-sag-actions #sag-global-plan-rub,
  .sag-planfact-toolbar .sh-period-sag-actions #sag-global-fact-rub {
    width: 6.75rem;
    min-width: 6.75rem;
    max-width: 6.75rem;
  }
  .sag-planfact-toolbar .sh-period-sag-reset.unit-btn {
    padding: 0 0.65rem;
    white-space: nowrap;
  }
  .fbs-page .sh-sticky-head-float__table.fbs-table thead th.fbs-col-sku-th,
  .fbs-page .sh-sticky-head-float__table.fbs-table thead th.fbs-col-name-th {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }
}

/* ——— Copy + name stack metrics ——— */
.sh-copy-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  min-width: 0;
}
.sh-copy-btn {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin: 0 0 0 0.15rem;
  padding: 0;
  border: 0 !important;
  border-radius: 2px;
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: pointer;
  opacity: 0.8;
  box-shadow: none !important;
  overflow: visible;
}
.sh-copy-btn__svg {
  display: block;
  width: 12px;
  height: 12px;
  overflow: visible;
  pointer-events: none;
}
.sh-copy-btn:hover,
.sh-copy-btn:focus-visible {
  opacity: 1;
  color: #64748b !important;
  background: transparent !important;
  outline: none;
  box-shadow: none !important;
}
[data-theme="dark"] .sh-copy-btn {
  color: #94a3b8 !important;
}
[data-theme="dark"] .sh-copy-btn:hover,
[data-theme="dark"] .sh-copy-btn:focus-visible {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .sh-copy-btn__svg rect[fill] {
  fill: var(--sh-surface, #1e293b);
}
.sh-name-metric__stack {
  display: contents;
}
.sh-name-metric__line,
.sh-name-metric__fact,
.sh-name-metric__sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.08rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  line-height: 1.15;
  position: relative;
}
.sh-name-metric__pfx {
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--sh-muted, #64748b);
  flex: 0 0 auto;
  min-width: 0;
  line-height: 1;
  text-align: center;
}
.sh-name-metric__sub {
  font-size: 0.92em;
  color: var(--sh-muted, #64748b);
}
.sh-sku-stack {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  line-height: 1.15 !important;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
}
.sh-sku-stack__metrics {
  display: grid;
  grid-template-rows: auto auto auto;
  row-gap: 0.1rem;
  align-items: center;
  justify-items: start;
  width: 100%;
}
.sh-sku-stack__lab {
  grid-row: 1;
  min-height: 0.95rem;
  visibility: hidden;
}
.sh-sku-stack__row--sku {
  align-self: flex-start;
  min-height: 1.15rem;
  text-align: left;
}
.sh-sku-stack__row--art {
  grid-row: 2;
  align-self: center;
}
.sh-sku-stack__row--schema {
  grid-row: 3;
  align-self: center;
  margin-top: 0.15rem;
}
.sh-sku-stack__metrics .sh-sku-stack__row--schema {
  /* Середина плашки FBS/FBO на середине строки «Динамика». */
  margin-top: 1.15rem !important;
}
.sh-sku-stack__row--schema .sh-schema-badge,
.sh-sku-stack__row--schema .sh-schema-select {
  margin-top: 0;
}
.sh-sku-stack > .sh-copy-wrap,
.sh-sku-stack > .sh-sku-stack__sku,
.sh-sku-stack > .sh-sku-stack__art {
  display: flex;
  align-items: baseline;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  gap: 0.1rem;
}
/* Вторая строка плотно под первой (SKU / артикул). */
.sh-sku-stack > .sh-copy-wrap + .sh-copy-wrap,
.sh-sku-stack > .sh-sku-stack__sku + .sh-sku-stack__art,
.sh-sku-stack > .sh-copy-wrap + .sh-sku-stack__art,
.sh-sku-stack > .sh-sku-stack__sku + .sh-copy-wrap,
.sh-sku-stack__row + .sh-sku-stack__row {
  margin-top: 0 !important;
}
.sh-sku-stack .sh-sku-stack__sku,
.sh-sku-stack .sh-sku-stack__art {
  display: inline-block;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.sh-sku-stack .sh-copy-btn {
  width: 10px;
  height: 10px;
  margin: 0 0 0 0.06rem;
  align-self: baseline;
  position: relative;
  top: 0;
  line-height: 1 !important;
}
.sh-sku-stack .sh-copy-btn__svg {
  width: 9px;
  height: 9px;
}
.sh-schema-badge,
.sh-schema-select {
  display: inline-flex;
  align-items: center;
  margin-top: 0.2rem;
  padding: 0.12rem 0.45rem;
  border-radius: var(--sh-pill-radius, 0.5rem);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  border: 1px solid transparent;
}
.sh-schema-select {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-width: 2.8rem;
  overflow: visible;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%23334155' d='M1.2 1.2 6 6.2 10.8 1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.28rem center;
  background-size: 0.55rem 0.4rem;
  padding: 0.1rem 1.15rem 0.1rem 0.38rem;
  font-size: 0.625rem;
  line-height: 1.2;
  white-space: nowrap;
  color-scheme: light;
}
.sh-schema-badge--fbo,
.sh-schema-select--fbo {
  color: #1e3a8a;
  background-color: #dbeafe;
  border-color: #bfdbfe;
}
.sh-schema-badge--fbs,
.sh-schema-select--fbs {
  color: var(--sh-tone-pos-fg, #064e3b);
  background-color: var(--sh-tone-pos-bg, #d1fae5);
  border-color: #a7f3d0;
}
.sh-schema-badge--rfbs,
.sh-schema-select--rfbs {
  color: #9a3412;
  background-color: #fdba74;
  border-color: #fb923c;
}
.sh-schema-badge--both,
.sh-schema-badge--mix,
.sh-schema-select--both,
.sh-schema-select--mix {
  color: var(--sh-tone-warn-fg, #92400e);
  background-color: var(--sh-tone-warn-bg, #fde68a);
  border-color: #fcd34d;
}
html[data-theme="dark"] .sh-schema-badge--fbo,
html[data-theme="dark"] .sh-schema-select--fbo {
  color: #bfdbfe;
  background-color: #1e3a8a;
  border-color: #1d4ed8;
}
html[data-theme="dark"] .sh-schema-badge--fbs,
html[data-theme="dark"] .sh-schema-select--fbs {
  color: #6ee7b7;
  background-color: color-mix(in srgb, #34d399 22%, var(--sh-surface, #0f172a));
  border-color: #065f46;
}
html[data-theme="dark"] .sh-schema-badge--rfbs,
html[data-theme="dark"] .sh-schema-select--rfbs {
  color: #ffedd5;
  background-color: #9a3412;
  border-color: #c2410c;
}
html[data-theme="dark"] .sh-schema-badge--both,
html[data-theme="dark"] .sh-schema-badge--mix,
html[data-theme="dark"] .sh-schema-select--both,
html[data-theme="dark"] .sh-schema-select--mix {
  color: #fcd34d;
  background-color: color-mix(in srgb, #f59e0b 24%, var(--sh-surface, #0f172a));
  border-color: #92400e;
}
html[data-theme="dark"] .sh-schema-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%23e2e8f0' d='M1.2 1.2 6 6.2 10.8 1.2'/></svg>");
}
.sh-header,
.sh-header a,
nav.sh-nav,
nav.sh-nav a {
  pointer-events: auto;
}
.sh-name-stack {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.sh-name-stack__title {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  max-width: 100%;
}
.sh-name-stack__title .sh-copy-wrap {
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}
.sh-name-stack__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 600;
}
/* Плашки метрик: фиксированная сетка — одинаковые метрики выровнены между строками. */
.sh-name-metric__below {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin-top: 0.22rem;
  width: 100%;
}
.sh-name-metric__below .sh-name-metric__lab {
  font-size: 0.68em;
}
.sh-box-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  min-width: 3.4rem;
}
.sh-box-col__line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.04rem;
}
.sh-box-col__lab {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--sh-muted);
  line-height: 1.1;
}
.sh-col-box-col,
.fbs-col-box-col,
.fbs-col-box-th,
.fbs-col-box,
.fbo-th-box,
.fbo-td-box,
.sh-td-box {
  width: 3.6rem;
  min-width: 3.6rem;
  max-width: 3.8rem;
  overflow: hidden;
  vertical-align: top;
  box-sizing: border-box;
}
.sh-name-stack__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  column-gap: 0.12rem;
  row-gap: 0.1rem;
  align-items: start;
  justify-items: stretch;
  max-width: 100%;
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
}
.sh-name-stack__metrics:has(.sh-name-metric[data-sh-name-metric="box"]) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1fr);
}
.sh-name-metric {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  align-items: center;
  justify-items: center;
  gap: 0.1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
  z-index: 0;
}
.sh-name-metric[data-sh-name-metric="margin"],
.sh-name-metric[data-sh-name-metric="roi"] {
  align-items: center;
}
.sh-name-metric[data-sh-name-metric="stock"] {
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
  z-index: 6;
  padding-right: 0.35rem;
  padding-bottom: 0.7rem;
}
.sh-name-metric[data-sh-name-metric="stock"]:hover,
.sh-name-metric[data-sh-name-metric="stock"]:focus-within {
  z-index: 50;
}
.sh-name-box-slot {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.12rem;
  width: auto;
  max-width: 100%;
  margin-top: 0.22rem;
}
.sh-name-box-slot__lab {
  font-size: 0.62rem;
  line-height: 1.1;
  color: var(--sh-muted);
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
}
.sh-name-box-slot .sh-edit-field {
  display: inline-flex !important;
  width: auto !important;
  max-width: 3.25rem;
}
.sh-box-weight,
input.sh-box-input.sh-input {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 2.7rem !important;
  min-width: 2.7rem !important;
  max-width: 2.7rem !important;
  min-height: var(--sh-pill-min-h, 1.875rem) !important;
  height: var(--sh-pill-min-h, 1.875rem) !important;
  max-height: var(--sh-pill-min-h, 1.875rem) !important;
  padding: var(--sh-pill-pad-y, 0.375rem) 0.2rem !important;
  border-radius: var(--sh-pill-radius, 0.5rem) !important;
  border: 1px solid var(--sh-border) !important;
  background: var(--sh-surface);
  font-size: var(--sh-pill-font, 0.875rem) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: var(--sh-text);
}
input.sh-box-input.sh-input {
  padding: 0 0.85rem 0 0.1rem !important;
  text-align: center !important;
  -moz-appearance: textfield;
  appearance: textfield;
}
input.sh-box-input.sh-input::-webkit-outer-spin-button,
input.sh-box-input.sh-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.sh-edit-field {
  position: relative;
  display: block;
}
.sh-box-pill {
  white-space: nowrap;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="date"]):not([readonly]):not(:disabled),
textarea:not([readonly]):not(:disabled) {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.3rem center;
  background-size: 0.72rem 0.72rem;
}
select:not(:disabled) {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%2364748b' d='M1.2 1.2 6 6.2 10.8 1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 0.7rem 0.45rem;
  padding-right: 1.35rem;
}
#sh_draft_from,
#sh_draft_to,
#id_birth_date_display,
input.flatpickr-input,
.flatpickr-calendar input,
.flatpickr-calendar textarea,
.sh-edit-dock,
.sh-edit-dock * {
  background-image: none !important;
}
.repricer-target-input,
.unit-cell-input--exp-rub,
.unit-cell-input--pct {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.4rem center !important;
  background-size: 0.72rem 0.72rem !important;
  padding-left: 0.55rem !important;
  padding-right: 1.45rem !important;
  text-align: right !important;
}
.repricer-target-input {
  background-position: right 1.55rem center !important;
  padding-right: 2.55rem !important;
  text-align: center !important;
}
.unit-planned-input,
.promo-planned-input,
.ads-drr-period-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 1.35rem center !important;
  background-size: 0.72rem 0.72rem !important;
  padding-left: 0.35rem !important;
  padding-right: 2.15rem !important;
  text-align: center !important;
}
.unit-cell-input.unit-cell-input--below-floor,
.unit-cell-input.unit-cell-input--below-catalog,
.unit-cell-input.unit-cell-input--cost-missing,
.unit-exp-pct .unit-cell-input--exp-rub {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.35rem center !important;
  background-size: 0.72rem 0.72rem !important;
}
.repricer-td-name .sh-stock-pill-wrap,
.repricer-td-name .sh-name-metric[data-sh-name-metric="stock"],
.ads-td-name .sh-stock-pill-wrap,
.ads-td-name .sh-name-metric[data-sh-name-metric="stock"],
.fbs-col-name-td .sh-stock-pill-wrap,
.fbo-td-name .sh-stock-pill-wrap,
.sag-td-name .sh-stock-pill-wrap {
  overflow: visible !important;
}
.repricer-table .repricer-td-name {
  overflow: visible !important;
}
.sh-stock-pill-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  z-index: 2;
  overflow: visible;
  /* место под стикер, чтобы overflow родителей не срезал */
  padding: 0.2rem 0.7rem 0.95rem 0.1rem;
  margin-right: 0.1rem;
}
.sh-stock-pill-wrap--paywall {
  z-index: 2;
}
.sh-stock-pill-wrap--paywall > a.sh-tariff-paywall,
.sh-stock-pill-wrap--paywall > .sh-tariff-paywall {
  position: relative;
  z-index: 3;
}
.sh-stock-paid-badge {
  position: absolute;
  right: 0.15rem;
  bottom: 0.42rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.38rem;
  border-radius: 0.22rem 0.34rem 0.22rem 0.34rem;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #fff;
  box-shadow:
    1px 1px 0 color-mix(in srgb, #000 22%, transparent),
    0 1px 2px color-mix(in srgb, #000 16%, transparent);
  white-space: nowrap;
  transform: rotate(-8deg);
  transform-origin: 100% 100%;
  cursor: help;
  pointer-events: auto;
  user-select: none;
}
.sh-stock-paid-badge--paid {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 55%, #b91c1c 100%);
  border: 1px solid color-mix(in srgb, #7f1d1d 55%, #fff 10%);
}
.sh-stock-paid-badge--soon {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%);
  border: 1px solid color-mix(in srgb, #92400e 50%, #fff 12%);
  color: #78350f;
}
.fbo-td-cluster-stock,
.fbo-metric-td.fbo-td-cluster-stock {
  overflow: visible;
  position: relative;
}
.fbo-stock-paid-wrap {
  z-index: 2;
}
/* paid-badge-cluster-v1 */
.sh-stock-pill-wrap--paywall .sh-stock-paid-badge {
  z-index: 1;
}
html[data-theme="dark"] .sh-stock-paid-badge--soon {
  color: #fff7ed;
}
.sh-name-metric__lab {
  display: inline-flex !important;
  visibility: visible !important;
  flex: 0 0 auto;
  order: 0;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 100%;
  min-height: 0.85rem;
  font-size: 0.62rem !important;
  line-height: 1.1;
  color: var(--sh-muted, #64748b);
  white-space: nowrap;
  letter-spacing: 0.01em;
  font-weight: 500;
  text-align: center;
  align-self: stretch;
  overflow: visible !important;
}
.sh-name-metric__lab .sh-th-sortable__tools {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.sh-name-metric__lab .sh-th-sortable__icon {
  width: 0.55rem;
  opacity: 0.75;
}
.sh-name-metric__lab[data-sh-sort] {
  cursor: pointer !important;
  user-select: none;
  text-decoration: none;
}
.sh-name-metric__lab[data-sh-sort]:hover {
  color: var(--sh-text, #0f172a);
}
.sh-name-metric__lab[data-sh-sort].sh-th-sort--active,
.sh-name-metric.sh-th-sort--active > .sh-name-metric__lab {
  color: var(--sh-primary, #005bff);
}
.sh-name-metric__lab[data-sh-sort].sh-th-sort--active .sh-th-sortable__icon,
.sh-name-metric.sh-th-sort--active > .sh-name-metric__lab .sh-th-sortable__icon {
  opacity: 1;
  color: var(--sh-primary, #005bff);
}
.sh-name-metric.sh-th-sort--asc > .sh-name-metric__lab .sh-th-sortable__icon::before,
.sh-name-metric__lab.sh-th-sort--asc .sh-th-sortable__icon::before {
  content: "▲";
  font-size: 0.5rem;
}
.sh-name-metric.sh-th-sort--desc > .sh-name-metric__lab .sh-th-sortable__icon::before,
.sh-name-metric__lab.sh-th-sort--desc .sh-th-sortable__icon::before {
  content: "▼";
  font-size: 0.5rem;
}
.sh-name-metric > :not(.sh-name-metric__lab) {
  order: 1;
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  align-self: center;
}
.sh-name-metric .unit-cell-stack--name-metric {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  width: max-content;
  min-width: 100%;
}
.sh-name-metric .unit-name-metric-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  white-space: nowrap;
  width: 100%;
}
.sh-name-metric .unit-name-metric-line__lab {
  font-size: 0.62rem;
  line-height: 1.1;
  color: var(--sh-muted, #64748b);
  font-weight: 500;
  flex: 0 0 auto;
  min-width: 2.6rem;
}
.sh-name-metric .unit-cell-stack--name-metric > .unit-cell-subline {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  font-size: inherit;
  white-space: nowrap;
}
.sh-name-metric .unit-name-metric-line .sh-metric-pill,
.sh-name-metric .unit-name-metric-line .unit-pct-badge,
.sh-name-metric .unit-cell-stack--name-metric .sh-metric-pill {
  margin-left: 0;
}
.sh-name-metric .sh-abc-pair {
  width: max-content;
}
.sh-stock-pill { position: relative; cursor: default; }
.sh-stock-tip {
  display: none;
  position: fixed;
  right: auto;
  left: 0;
  top: 0;
  bottom: auto;
  z-index: 4000;
  padding: .35rem .55rem;
  background: #fff;
  color: #111827;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.sh-stock-tip.sh-stock-tip--open { display: block; }
/* Ширина колонки = метрики; название обрезается, плашки не клипаем по Y. */
.ads-td-name:has(.sh-name-stack),
.unit-td-name:has(.sh-name-stack),
.promo-td-sticky-name:has(.sh-name-stack),
.fbo-td-name:has(.sh-name-stack),
.fbs-col-name-td:has(.sh-name-stack),
.sag-td-name:has(.sh-name-stack),
.sh-td-name-metrics:has(.sh-name-stack):not(.ai-td-name),
th.unit-th-name,
th.promo-th-sticky-name,
th.fbo-th-name,
th.fbs-col-name-th,
th.sag-th-name,
th.ads-th-name {
  width: var(--sh-col-name-width) !important;
  min-width: var(--sh-col-name-width) !important;
  max-width: var(--sh-col-name-width) !important;
  white-space: normal !important;
  overflow: visible !important;
  vertical-align: top;
}
.ads-td-name:has(.sh-name-stack),
.unit-td-name:has(.sh-name-stack),
.promo-td-sticky-name:has(.sh-name-stack),
.fbo-td-name:has(.sh-name-stack),
.fbs-col-name-td:has(.sh-name-stack),
.sag-td-name:has(.sh-name-stack),
.sh-td-name-metrics:has(.sh-name-stack):not(.ai-td-name) {
  overflow: visible !important;
  white-space: normal !important;
}
/* Не перебивать ряд плашек на колонку и не сжимать до наезда. */
.sh-name-stack__metrics {
  max-width: 100%;
  width: 100%;
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  align-items: start;
  justify-items: stretch;
  column-gap: 0.12rem;
  row-gap: 0.1rem;
  box-sizing: border-box;
}
.sh-name-stack__metrics:has(.sh-name-metric[data-sh-name-metric="box"]) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1fr);
}
/* Паритет: шире наименование — Факт/Расчёт маржи и ROI не наезжают. */
.unit-workspace,
.fbs-workspace,
.fbo-workspace,
.promo-workspace,
.promo-table,
.fin-workspace,
.sag-workspace,
.repricer-workspace,
.repricer-page,
.ads-wrap {
  --sh-col-name-width: 22.5rem;
}
.unit-workspace {
  --sh-col-name-width: 22.5rem;
}
.fbs-workspace,
.fbo-workspace,
.fbs-page,
.fbo-shell {
  --sh-col-name-width: 26.5rem;
}
.fbs-workspace .sh-name-stack__metrics,
.fbo-workspace .sh-name-stack__metrics {
  padding-right: 0.85rem;
  box-sizing: border-box;
}
.fbs-col-name-td .sh-stock-pill-wrap,
.fbo-td-name .sh-stock-pill-wrap {
  padding-right: 0.2rem;
  margin-right: 0;
}
.fbs-col-name-td .sh-name-box-slot,
.fbo-td-name .sh-name-box-slot {
  max-width: none;
  overflow: visible;
  position: relative;
  z-index: 2;
}
/* Факт/Расчёт: запас ширины под подписи на всех вкладках. */
.sh-td-name-metrics .sh-name-metric[data-sh-name-metric="margin"],
.sh-td-name-metrics .sh-name-metric[data-sh-name-metric="roi"],
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="margin"],
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="roi"] {
  min-width: 0;
  overflow: hidden;
  z-index: 1;
}
.sh-td-name-metrics .sh-name-metric__stack,
.unit-workspace .unit-td-name .sh-name-metric__stack,
.fin-workspace .sh-name-metric__stack,
.unit-td-name .sh-name-metric__stack {
  display: contents;
  max-width: 100%;
  width: 100%;
  align-items: center;
  gap: 0.08rem;
}
.sh-td-name-metrics .sh-name-metric__fact,
.sh-td-name-metrics .sh-name-metric__sub,
.unit-workspace .unit-td-name .sh-name-metric__fact,
.unit-workspace .unit-td-name .sh-name-metric__sub {
  max-width: 100%;
  width: auto;
  overflow: visible;
  gap: 0.12rem;
  line-height: 1.2;
}
.ads-wrap .sh-td-name-metrics .sh-name-metric[data-sh-name-metric="margin"],
.ads-wrap .sh-td-name-metrics .sh-name-metric[data-sh-name-metric="roi"] {
  min-width: 0;
  overflow: visible;
}
.ads-wrap .ads-table tbody td.ads-td-name,
.unit-table tbody td.unit-td-name,
.fbs-table tbody td.fbs-col-name-td,
.fbo-table tbody td.fbo-td-name,
.sh-sku-period-table tbody td.sh-td-name-metrics {
  overflow: visible !important;
}
.ads-wrap {
  --sh-col-name-width: 21.5rem;
}
.ads-wrap .sh-name-stack__metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 0.12rem;
  overflow: visible !important;
  padding-right: 0;
  padding-bottom: 0.45rem;
  width: 100%;
  box-sizing: border-box;
}
.ads-wrap .sh-name-metric[data-sh-name-metric="stock"] {
  min-width: 4.8rem;
  overflow: visible !important;
  z-index: 5;
  position: relative;
}
.ads-wrap .sh-name-metric[data-sh-name-metric="turnover"] {
  min-width: 3.6rem;
  overflow: visible !important;
}
.ads-wrap .sh-name-metric[data-sh-name-metric="abc"] {
  min-width: 5.2rem;
  max-width: 100%;
  overflow: visible;
}
.ads-wrap .sh-name-metric[data-sh-name-metric="dynamics"] {
  min-width: 3.8rem;
  z-index: 1;
  overflow: visible;
}
.ads-wrap .sh-name-metric[data-sh-name-metric="abc"] .sh-abc-pair {
  max-width: 100%;
}
.ads-wrap .ads-td-name:has(.sh-name-stack),
.ads-wrap .sh-td-name-metrics:has(.sh-name-stack) {
  overflow: visible !important;
  padding-right: 0.85rem !important;
}
.sh-td-name-metrics .sh-name-metric__pfx {
  font-size: 0.68em;
  letter-spacing: -0.01em;
}
.sh-name-stack__metrics {
  /* ABC+динамика | Маржа | ROI | Оборач.+остатки */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0.1rem 0.12rem;
  overflow: visible;
}
.sh-name-stack__metrics:has(.sh-name-metric[data-sh-name-metric="box"]) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1fr);
}
.unit-workspace .unit-td-name .sh-name-stack__metrics,
.fin-workspace .fin-td-sticky-name .sh-name-stack__metrics,
.sag-workspace .sh-name-stack__metrics,
.repricer-page .sh-name-stack__metrics,
.ads-wrap .sh-name-stack__metrics,
.promo-table .sh-name-stack__metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0.1rem 0.12rem;
  overflow: visible;
}
button.sh-box-sizes-btn,
.sh-box-sizes-pop button {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  min-width: 2.6rem;
  min-height: 1.65rem;
  padding: 0.08rem 0.35rem;
  border-radius: 0.4rem;
  border: 1px solid var(--sh-border, #d0d5dd) !important;
  background: var(--sh-surface, #fff) !important;
  color: var(--sh-text, #111827) !important;
  box-shadow: none !important;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
button.sh-box-sizes-pop__save,
.sh-box-sizes-pop button.sh-box-sizes-pop__save {
  width: 100%;
  margin-top: 0.15rem;
  border: 0 !important;
  color: #fff !important;
  background: #2563eb !important;
}
html[data-marketplace="wb"] button.sh-box-sizes-pop__save,
html[data-marketplace="wb"] .sh-box-sizes-pop button.sh-box-sizes-pop__save {
  background: #7c3aed !important;
  color: #fff !important;
}
.sh-pager-btn--wait {
  color: transparent !important;
  position: relative;
  overflow: hidden;
  pointer-events: none;
  background: #e5e7eb !important;
}
.sh-pager-btn--wait::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  top: 0.38rem;
  bottom: 0.38rem;
  border-radius: 0.35rem;
  background: linear-gradient(90deg, #e5e7eb 0%, #f8fafc 45%, #e5e7eb 100%);
  background-size: 200% 100%;
  animation: sh-pager-shimmer 0.9s linear infinite;
}
@keyframes sh-pager-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.sh-box-sizes-btn__num {
  font-variant-numeric: tabular-nums;
}
.sh-box-sizes-btn__pencil {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
  margin-left: 0;
  flex: 0 0 0.72rem;
}
.fin-td-sticky-name,
.fin-workspace .sh-td-name-metrics,
.sh-td-name-metrics {
  overflow: visible !important;
}
.sh-box-sizes-pop {
  position: fixed;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem;
  min-width: 8.2rem;
  background: var(--sh-surface, #fff);
  color: inherit;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}
.sh-box-sizes-pop__row {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.sh-box-sizes-pop__row input {
  width: 5.2rem;
}
.sh-box-sizes-pop__del,
.sh-box-sizes-pop__add {
  border: 1px solid var(--sh-border, #d0d5dd);
  background: transparent;
  color: inherit;
  border-radius: 0.35rem;
  min-width: 1.7rem;
  min-height: 1.7rem;
  cursor: pointer;
  font-weight: 700;
}
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="abc"],
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="dynamics"] {
  min-width: 0;
}
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="abc"] {
  min-width: 5.5rem;
  overflow: hidden;
}
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="abc"] > :not(.sh-name-metric__lab),
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="abc"] .sh-abc-pair {
  max-width: 100%;
  width: auto;
}
.unit-workspace .unit-td-name .sh-name-metric[data-sh-name-metric="dynamics"] {
  z-index: 2;
  min-width: 4.75rem;
  overflow: visible;
  padding-left: 0.12rem;
  padding-right: 0.12rem;
}
.repricer-page {
  --repricer-c-name: 21.5rem;
  --sh-col-name-width: 21.5rem;
}
.repricer-page .repricer-td-name:has(.sh-name-stack) .sh-name-stack__metrics,
.repricer-table .repricer-td-name .sh-name-stack__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0.1rem 0.12rem;
  max-width: 100%;
  width: 100%;
}
.ads-table col.ads-col-name-col,
.unit-table col.unit-col-name,
.promo-table col.promo-col-name,
.repricer-table col.repricer-col-name {
  width: var(--sh-col-name-width);
}
.ads-wrap .ads-table.ads-table--wide {
  table-layout: auto;
  min-width: 100%;
  width: max-content;
}
.ads-wrap .ads-table thead,
.ads-wrap .ads-table thead tr {
  background: var(--sh-table-header-bg);
}
.ads-table col.ads-col-sku-col {
  width: var(--sh-col-sku-width);
}
.ads-table col.ads-col-drr-col {
  width: 8.4rem;
  min-width: 8.4rem;
}
.ads-table col.ads-col-stat-col {
  width: 9.6rem;
  min-width: 9.6rem;
}
/* Репрайсер: как Unit/Ads — фиксированная ширина метрик, название клипается. */
.repricer-td-name:has(.sh-name-stack),
th.repricer-th-name {
  width: var(--sh-col-name-width) !important;
  min-width: var(--sh-col-name-width) !important;
  max-width: var(--sh-col-name-width) !important;
  white-space: normal !important;
  overflow: visible !important;
  vertical-align: top;
}

/* Как на Акциях: наименование / SKU / артикул — top + одинаковый padding (не «скачут»). */
.unit-td-name,
.unit-td-sku,
.ads-td-name,
.ads-td-sku,
.fbo-td-name,
.fbo-td-sku,
.fbs-col-name-td,
.fbs-col-sku-td,
.content-td-name,
.content-td-sku,
.sag-td-name,
.sag-td-sku,
.promo-td-sticky-name,
.promo-td-sticky-sku,
.repricer-td-name,
.repricer-td-sku,
.fin-td-sticky-name,
.fin-td-sticky-sku,
.ai-td-name,
.ai-td-sku,
.sh-td-name,
.sh-td-sku,
.sh-td-sku-article,
th.unit-th-name,
th.unit-th-sku,
th.ads-th-name,
th.ads-th-sku,
th.fbo-th-name,
th.fbo-th-sku,
th.fbs-col-name-th,
th.fbs-col-sku-th,
th.content-th-name,
th.content-th-sku,
th.sag-th-name,
th.sag-th-sku,
th.promo-th-sticky-name,
th.promo-th-sticky-sku,
th.repricer-th-name,
th.repricer-th-sku,
th.fin-th-sticky-name,
th.fin-th-sticky-sku {
  vertical-align: top !important;
  padding-top: var(--sh-table-cell-py) !important;
  padding-bottom: var(--sh-table-cell-py) !important;
}

/* paid-badge-visible-v5 */

.ads-wrap,
.ads-wrap .ads-table {
  overflow-anchor: none;
}
.unit-cell-input--filled,
.unit-cell-input.unit-cell-input--filled {
  background: color-mix(in srgb, var(--sh-primary, #2563eb) 12%, #fff) !important;
  border-color: color-mix(in srgb, var(--sh-primary, #2563eb) 45%, var(--sh-line, #d8dee8)) !important;
}
.sh-sticky-head-float thead th .unit-exp-bulk-btn,
.sh-sticky-head-float thead th .unit-exp-bulk-pop,
.sh-sticky-head-float thead th .sh-help-wrap {
  pointer-events: auto;
  cursor: pointer;
}
.unit-exp-bulk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.2rem;
  flex-shrink: 0;
  width: 1.15rem !important;
  min-width: 1.15rem !important;
  height: 1.15rem !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--sh-line, #d8dee8) !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--sh-muted, #667085) !important;
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  z-index: 2;
  overflow: visible;
}
.sh-sticky-head-float thead th,
.unit-table thead th {
  overflow: visible;
}
.unit-exp-bulk-btn:hover {
  color: var(--sh-text, #101828);
  border-color: var(--sh-text, #101828);
}
.unit-exp-bulk-pop {
  position: fixed;
  z-index: 5200;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  background: #fff;
  border: 1px solid var(--sh-line, #d8dee8);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
  white-space: nowrap;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.unit-exp-bulk-pop__lab {
  font-size: 0.7rem;
  color: var(--sh-muted, #667085);
}
.unit-exp-bulk-pop label {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--sh-text, #101828);
}
.unit-exp-bulk-pop__inp {
  width: 4.2rem;
  min-width: 4.2rem;
  height: 1.6rem;
  padding: 0 0.3rem;
  font-size: 0.75rem;
}
.unit-exp-bulk-pop__reset {
  height: 1.6rem;
  padding: 0 0.45rem;
  border: 1px solid var(--sh-border, #d1d5db);
  border-radius: 6px;
  background: #fff;
  color: var(--sh-text, #111827);
  font-size: 0.72rem;
  cursor: pointer;
}
.unit-exp-bulk-pop__ok {
  height: 1.6rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 6px;
  background: var(--sh-primary, #2563eb);
  color: #fff;
  font-size: 0.72rem;
  cursor: pointer;
}

/* FBO: оболочка шириной экрана, таблица шире — скролл у внутреннего порта. */
.fbo-shell {
  contain: inline-size;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
}
.fbo-workspace,
.fbo-page,
.fbo-shell {
  overflow-x: hidden !important;
  max-width: 100% !important;
}
.fbo-shell > .sh-table-x-scroll,
.fbo-shell > .sh-table-x-scroll[data-sh-bottom-scroll] {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.fbo-shell > .sh-table-x-scroll::-webkit-scrollbar,
.fbo-shell > .sh-table-x-scroll[data-sh-bottom-scroll]::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.fbo-shell > .sh-table-x-scroll > table.fbo-table,
.fbo-shell > table.fbo-table {
  table-layout: auto !important;
  width: max-content !important;
  min-width: max-content !important;
}


.sh-table-row-search--busy .sh-table-row-search__input {
  background-image: linear-gradient(90deg, rgba(148,163,184,.15), rgba(255,255,255,.85), rgba(148,163,184,.15)) !important;
  background-size: 200% 100% !important;
  animation: sh-search-shimmer 0.9s linear infinite;
}
@keyframes sh-search-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.sh-th-ff-stock,
.sh-td-ff-stock {
  position: static;
  z-index: 1;
  width: 6.6rem;
  min-width: 6.6rem;
  max-width: 7.4rem;
  text-align: center !important;
  vertical-align: middle;
  background: var(--sh-surface);
  box-shadow: none;
  white-space: normal;
  line-height: 1.15;
  overflow: visible;
  color: var(--sh-text, #101828);
  border-right: 2px solid #98a2b3 !important;
}
.fbs-table thead th.sh-th-ff-stock,
.fbo-table thead th.sh-th-ff-stock,
.fbs-table tbody td.sh-td-ff-stock,
.fbo-table tbody td.sh-td-ff-stock {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  text-align: center !important;
  border-right: 2px solid #98a2b3 !important;
}
.sh-th-ff-stock {
  z-index: 2;
  background: var(--sh-table-header-bg, #f4f7fb);
  color: var(--sh-text, #101828);
  font-size: 0.68rem;
  font-weight: 650;
  padding: 0.35rem 0.25rem;
  text-align: center !important;
}
.sh-ff-stock__label {
  display: block;
  text-align: center;
}
.sh-ff-stock__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-decoration: none;
  line-height: 1.05;
}
.sh-ff-stock__brand-name {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #127a45;
}
.sh-ff-stock__brand-sub {
  font-size: 0.58rem;
  font-weight: 700;
  color: #c2410c;
}
.sh-ff-stock__qty {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}
.sh-ff-stock__off {
  display: none;
}
tr.sh-search-hidden { display: none !important; }
.sh-table-toolbar-row { flex-wrap: wrap; }
.sh-table-row-search { min-width: 0; }
.sh-table-row-search__count { white-space: nowrap; }
.sh-table-row-search__field { position: relative; }
.sh-table-row-search__status {
  position: static;
  margin-left: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sh-muted, #667085);
  pointer-events: none;
  white-space: nowrap;
}
.sh-table-toolbar-row {
  overflow: visible;
}
.sh-table-row-search__count {
  flex: 0 0 auto;
  color: var(--sh-muted, #667085);
}
.fbs-table thead th.sh-th-ff-stock,
.fbo-table thead th.sh-th-ff-stock,
.fbs-table tbody td.sh-td-ff-stock,
.fbo-table tbody td.sh-td-ff-stock {
  border-left: 2px solid #98a2b3 !important;
  border-right: 2px solid #98a2b3 !important;
}
.sh-ff-stock__qty { font-weight: 700; }
