/* Дизайн-токены и AppShell (единый стиль интерфейса) */
      :root,
      html[data-theme="light"] {
        color-scheme: light;
        --sh-bg: #f2f5f9;
        --sh-surface: #ffffff;
        --sh-surface-2: #f7f9fc;
        --sh-primary: #005bff;
        --sh-primary-hover: #0047cc;
        --sh-text: #001a34;
        --sh-muted: #5c6a7a;
        --sh-border: #e5e9ef;
        --sh-shadow: 0 1px 3px rgba(0, 26, 52, 0.06);
        --sh-radius: 12px;
        --sh-danger: #dc2626;
        --sh-input-bg: #ffffff;
        --sh-input-border: #cbd5e1;
        --sh-bg-graph-line: rgba(37, 99, 235, 0.34);
        --sh-bg-graph-bar: rgba(59, 130, 246, 0.24);
        --sh-bg-graph-glow: rgba(59, 130, 246, 0.2);
      }
      html[data-theme="dark"] {
        color-scheme: dark;
        --sh-bg: #0b1220;
        --sh-surface: #0f172a;
        --sh-surface-2: #111c35;
        --sh-primary: #3b82f6;
        --sh-primary-hover: #2563eb;
        --sh-text: #e5e7eb;
        --sh-muted: #94a3b8;
        --sh-border: #1f2a44;
        --sh-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
        --sh-danger: #f87171;
        --sh-input-bg: #0b1220;
        --sh-input-border: #334155;
        --sh-bg-graph-line: rgba(96, 165, 250, 0.42);
        --sh-bg-graph-bar: rgba(96, 165, 250, 0.28);
        --sh-bg-graph-glow: rgba(59, 130, 246, 0.22);
      }

      :root,
      html[data-theme="light"],
      html[data-theme="dark"] {
        --sh-space-xs: 0.25rem;
        --sh-space-sm: 0.5rem;
        --sh-space-md: 0.75rem;
        --sh-space-lg: 1rem;
        --sh-space-xl: 1.5rem;
        --sh-control-height: 2.5rem;
        --sh-control-radius: 0.625rem;
        --sh-radius-sm: 0.375rem;
        --sh-text-2xs: 0.625rem;
        --sh-text-compact: 0.8125rem;
        --sh-ico-sm: 1rem;
        --sh-ico-md: 1.1875rem;
        --sh-ico-lg: 1.375rem;
        --sh-ico-xl: 1.5rem;
      }

      * { box-sizing: border-box; }

      .sh-ico {
        display: block;
        flex-shrink: 0;
        width: var(--sh-ico-md);
        height: var(--sh-ico-md);
        transform-origin: center;
        will-change: transform;
      }
      .sh-ico--sm { width: var(--sh-ico-sm); height: var(--sh-ico-sm); }
      .sh-ico--md { width: var(--sh-ico-md); height: var(--sh-ico-md); }
      .sh-ico--lg { width: var(--sh-ico-lg); height: var(--sh-ico-lg); }
      .sh-ico--xl { width: var(--sh-ico-xl); height: var(--sh-ico-xl); }
      .sh-ico--tone-primary { color: var(--sh-primary); opacity: 0.92; }
      .sh-ico--tone-muted { color: var(--sh-muted); opacity: 0.95; }
      .sh-ico--tone-text { color: var(--sh-text); opacity: 0.92; }

      /* Клиентская анимация иконок: анимируем обёртку .sh-ico-anim (SVG transform часто «молчит»). */
      @keyframes sh-ico-soft-float {
        0%, 100% { transform: translateY(0) scale(1); }
        50% { transform: translateY(-5px) scale(1.1); }
      }
      @keyframes sh-ico-soft-pulse {
        0%, 100% { opacity: 0.85; filter: drop-shadow(0 0 0 transparent); }
        50% { opacity: 1; filter: drop-shadow(0 0 0.55rem color-mix(in srgb, currentColor 55%, transparent)); }
      }
      @keyframes sh-ico-nudge {
        0% { transform: translateY(0) rotate(0deg) scale(1); }
        40% { transform: translateY(-6px) rotate(-8deg) scale(1.12); }
        70% { transform: translateY(-2px) rotate(5deg) scale(1.06); }
        100% { transform: translateY(0) rotate(0deg) scale(1); }
      }
      @keyframes sh-ico-reveal {
        0% { transform: translateY(8px) scale(0.88); opacity: 0.45; }
        100% { transform: translateY(0) scale(1); opacity: 1; }
      }
      .sh-ico-anim {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 0;
        transform-origin: center bottom;
        will-change: transform, filter, opacity;
      }
      .feature .ico,
      .welcome-page .roadmap-pin,
      .sh-page-heading-ico,
      .feature .ico .sh-ico-anim,
      .welcome-page .roadmap-pin .sh-ico-anim,
      .welcome-page .sh-ico-anim,
      .sh-page-heading-ico .sh-ico-anim,
      .sh-nav-link-inner .sh-ico-anim,
      .sh-nav a .sh-ico-anim {
        transition: color 0.2s ease, opacity 0.2s ease, filter 0.28s ease;
      }
      .feature .ico .sh-ico,
      .feature .ico svg,
      .welcome-page .roadmap-pin .sh-ico,
      .welcome-page .roadmap-pin svg,
      .welcome-page .sh-ico,
      .welcome-page .ico svg,
      .sh-page-heading-ico .sh-ico,
      .sh-page-heading-ico svg,
      .sh-nav-link-inner .sh-ico,
      .sh-nav a .sh-ico {
        display: block;
      }
      .feature:hover .ico .sh-ico-anim,
      .welcome-page .roadmap-pin:hover .sh-ico-anim,
      .welcome-page a:hover .sh-ico-anim,
      .sh-page-heading:hover .sh-page-heading-ico .sh-ico-anim,
      .sh-page-heading-ico:hover .sh-ico-anim,
      .sh-nav a:hover .sh-ico-anim,
      .sh-nav a:focus-visible .sh-ico-anim,
      .sh-nav a:hover .sh-nav-link-inner > .sh-ico-anim,
      .sh-nav a:focus-visible .sh-nav-link-inner > .sh-ico-anim {
        animation: sh-ico-nudge 0.6s ease !important;
        filter: drop-shadow(0 0 0.55rem color-mix(in srgb, currentColor 50%, transparent));
      }
      .feature.is-in-view .ico .sh-ico-anim,
      .welcome-page .roadmap-stop.is-in-view .roadmap-pin .sh-ico-anim,
      .sh-page-heading-ico .sh-ico-anim {
        animation: sh-ico-reveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) both,
          sh-ico-soft-float 2.4s ease-in-out 0.65s infinite;
        filter: drop-shadow(0 0 0.4rem color-mix(in srgb, currentColor 35%, transparent));
      }
      /* Иконки вкладок: idle-float; на hover — nudge (выше по специфичности). */
      .sh-nav a .sh-ico-anim,
      .sh-nav-link-inner > .sh-ico-anim {
        animation: sh-ico-soft-float 2.6s ease-in-out infinite;
      }
      .sh-nav a:nth-child(3n + 2) .sh-ico-anim { animation-delay: 0.35s; }
      .sh-nav a:nth-child(3n) .sh-ico-anim { animation-delay: 0.7s; }
      .sh-nav a.is-active .sh-ico-anim,
      .sh-nav a.is-active .sh-nav-link-inner > .sh-ico-anim {
        animation:
          sh-ico-soft-float 1.8s ease-in-out infinite,
          sh-ico-soft-pulse 1.8s ease-in-out infinite;
        filter: drop-shadow(0 0 0.5rem color-mix(in srgb, var(--sh-primary) 45%, transparent));
      }
      .sh-nav a:hover .sh-ico-anim,
      .sh-nav a:focus-visible .sh-ico-anim {
        animation: sh-ico-nudge 0.65s ease !important;
      }
      .sh-nav a.is-active .sh-ico,
      .sh-nav a.is-active .sh-ico--tone-muted,
      .sh-nav a.is-active .sh-ico--tone-primary {
        color: var(--sh-primary) !important;
        opacity: 1;
      }
      .welcome-page .feature.is-in-view,
      .welcome-page .roadmap-stop.is-in-view .roadmap-pin {
        transition: transform 0.4s ease;
      }
      .welcome-page .feature.is-in-view {
        transform: translateY(-3px);
      }
      @media (prefers-reduced-motion: reduce) {
        .sh-ico-anim,
        .feature .ico .sh-ico-anim,
        .welcome-page .roadmap-pin .sh-ico-anim,
        .welcome-page .sh-ico-anim,
        .sh-page-heading-ico .sh-ico-anim,
        .sh-nav a .sh-ico-anim,
        .sh-nav-link-inner > .sh-ico-anim,
        .sh-nav a:hover .sh-ico-anim,
        .sh-nav a:focus-visible .sh-ico-anim,
        .sh-nav a.is-active .sh-ico-anim {
          animation: none !important;
          transition: none !important;
          filter: none !important;
        }
      }

      /* Единый индикатор маршрутной загрузки (workspace) */
      .sh-route-loading {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        color: var(--sh-muted);
        font-size: var(--sh-text-base);
        font-weight: 500;
      }
      .sh-route-loading__spin {
        box-sizing: border-box;
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
        border: 2px solid var(--sh-border);
        border-top-color: var(--sh-primary);
        border-radius: 50%;
        animation: sh-route-spin 0.65s linear infinite;
      }
      @keyframes sh-route-spin {
        to { transform: rotate(360deg); }
      }
      .sh-route-loading-cell {
        padding: 2rem;
        text-align: center;
        vertical-align: middle;
      }
      .sh-route-loading--block {
        display: flex;
        padding: 1.25rem 1rem;
        justify-content: center;
      }

      .sh-nav a:hover .sh-ico--tone-muted {
        color: var(--sh-text);
        opacity: 1;
      }
      body {
        margin: 0;
        font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-size: 0.9375rem;
        line-height: 1.5;
        letter-spacing: 0.01em;
        background: var(--sh-bg);
        color: var(--sh-text);
        min-height: 100vh;
      }
      a { color: var(--sh-primary); text-decoration: none; }
      a:hover:not(.sh-btn):not([class*="sh-btn"]):not(.tariff-btn):not(.sh-nav a):not(.sh-cab-item):not(.sh-brand-panel-item):not(.sh-legal-footer a) {
        text-decoration: underline;
        color: var(--sh-primary-hover);
      }
      a.tariff-btn--primary:hover,
      a.sh-btn-primary:hover,
      a.sh-btn--primary:hover,
      a.fbs-btn:hover {
        color: #fff;
        text-decoration: none;
      }

      .sh-app {
        position: relative;
        display: flex;
        min-height: 100vh;
        flex-direction: column;
        background: var(--sh-bg);
        overflow: hidden;
      }
      .sh-market-bg {
        position: fixed;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background-color: var(--sh-bg);
        overflow: hidden;
      }
      .sh-market-bg__img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center bottom;
        display: block;
        position: absolute;
        inset: 0;
      }
      .sh-market-bg__img--dark {
        display: none;
      }
      html[data-theme="dark"] .sh-market-bg__img--light {
        display: none;
      }
      html[data-theme="dark"] .sh-market-bg__img--dark {
        display: block;
      }
      html[data-theme="light"] .sh-market-bg {
        background-image: radial-gradient(1200px 540px at 8% 96%, rgba(59, 130, 246, 0.1), transparent 74%);
      }
      html[data-theme="dark"] .sh-market-bg {
        background-image: radial-gradient(1200px 540px at 8% 96%, rgba(59, 130, 246, 0.2), transparent 74%);
      }
      .sh-app:not(.sh-app--landing)::before,
      .sh-app:not(.sh-app--landing)::after {
        content: none !important;
        display: none !important;
      }
      html[data-theme="dark"] .sh-app:not(.sh-app--landing)::before,
      html[data-theme="dark"] .sh-app:not(.sh-app--landing)::after {
        content: none !important;
        display: none !important;
      }
      @media (max-width: 900px) {
        .sh-market-bg {
          background-size: cover, 100% 100%;
        }
      }
      /* Лендинг / вход / регистрация: только фон и контент, без шапки */
      .sh-app--public .sh-main--public {
        max-width: 1600px;
        margin: 0 auto;
        padding-top: 4.5rem;
      }
      @media (min-width: 640px) {
        .sh-app--public .sh-main--public { padding-top: 4.75rem; }
      }
      .sh-public-theme {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 1100;
      }
      @media (min-width: 640px) {
        .sh-public-theme { top: 20px; right: 24px; }
      }
      .sh-header {
        position: sticky;
        top: 0;
        /* Выше нижнего H-скролла (2400), чтобы меню кабинетов не уходило под бар. */
        z-index: 2600;
        isolation: isolate;
        border-bottom: 1px solid var(--sh-border);
        background: var(--sh-surface);
        box-shadow: 0 1px 0 var(--sh-border);
      }
      .sh-header-row {
        max-width: 1600px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--sh-space-lg);
        padding: var(--sh-space-md) var(--sh-space-lg);
      }
      @media (min-width: 640px) {
        .sh-header-row { padding: var(--sh-space-md) var(--sh-space-xl); }
      }
      .sh-brand {
        flex-shrink: 0;
        color: inherit;
        text-decoration: none !important;
        display: inline-flex;
        align-items: center;
      }
      .sh-brand-menu { position: relative; }
      /* Не даём браузеру выделять текст при hover/click (в т.ч. на вложенных span/ссылках). */
      .sh-brand-menu,
      .sh-brand-menu * {
        user-select: none;
        -webkit-user-select: none;
      }
      .sh-brand-menu ::selection {
        background: transparent;
        color: inherit;
      }
      .sh-brand-menu ::-moz-selection {
        background: transparent;
        color: inherit;
      }
      .sh-brand-btn {
        min-height: auto;
        border: 0;
        background: transparent !important;
        box-shadow: none;
        padding: 0;
        cursor: pointer;
        gap: 6px;
        font: inherit;
        color: inherit;
        user-select: none;
        -webkit-user-select: none;
      }
      .sh-brand-btn:hover,
      .sh-brand-btn:focus-visible { background: transparent !important; }
      .sh-brand:hover { text-decoration: none !important; }
      .sh-brand-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--sh-text); }
      .sh-brand-accent { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--sh-primary); }
      .sh-brand-drum {
        position: relative;
        display: inline-block;
        height: 1.5rem;
        margin-left: 0.2rem;
        vertical-align: baseline;
        overflow: hidden;
      }
      .sh-brand-drum-track {
        display: flex;
        flex-direction: column;
        transform: translateY(0);
        animation: shBrandDrumSpin 3.2s linear infinite;
      }
      .sh-brand-drum-track > span {
        display: block;
        height: 1.5rem;
        line-height: 1.5rem;
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        white-space: nowrap;
      }
      .sh-brand-consulting {
        background: linear-gradient(180deg, #d2a673 0%, #b8834f 48%, #9a6538 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
      }
      @keyframes shBrandDrumSpin {
        0% { transform: translateY(0); }
        100% { transform: translateY(-3rem); }
      }
      .sh-brand-panel {
        display: none;
        position: absolute;
        left: 0;
        top: calc(100% + 8px);
        min-width: 210px;
        padding: 8px;
        border-radius: 12px;
        border: 1px solid var(--sh-border);
        background: var(--sh-surface);
        box-shadow: var(--sh-shadow);
        z-index: 1150;
      }
      .sh-brand-panel.is-open { display: block; }
      .sh-brand-panel-item {
        display: block;
        padding: 8px 10px;
        border-radius: var(--sh-control-radius);
        color: var(--sh-text);
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none !important;
      }
      .sh-brand-panel-item:hover {
        background: var(--sh-surface-2);
        text-decoration: none !important;
      }
      .sh-brand-panel-item--analytics {
        font-weight: 700;
      }
      .sh-brand-panel-item--analytics .sh-brand-accent-split {
        font-size: 0.9rem;
      }
      .sh-brand-panel-item--analytics:hover {
        background: var(--sh-surface-2);
      }
      .sh-brand-panel-item--consulting {
        font-weight: 700;
        color: #b8834f;
      }
      .sh-brand-panel-item--consulting:hover {
        color: #9a6538 !important;
      }
      .sh-header-actions { display: flex; align-items: center; gap: var(--sh-space-sm); flex-shrink: 0; pointer-events: auto; }

      /* Выпадающее меню кабинетов / аккаунта */
      .sh-cab-menu { position: relative; }
      .sh-cab-trigger {
        display: inline-flex;
        align-items: center;
        gap: var(--sh-space-sm);
        max-width: min(220px, 42vw);
        min-height: var(--sh-control-height);
        padding: 0 var(--sh-space-md);
        margin: 0;
        border: 0;
        border-radius: var(--sh-control-radius);
        background: transparent;
        color: var(--sh-text);
        font: inherit;
        font-size: var(--sh-text-base);
        font-weight: 600;
        letter-spacing: 0.02em;
        cursor: pointer;
        line-height: 1.2;
      }
      .sh-cab-trigger:hover {
        background: var(--sh-surface-2);
        color: var(--sh-text);
      }
      .sh-cab-trigger:focus-visible { outline: 2px solid var(--sh-primary); outline-offset: 2px; }
      .sh-cab-trigger-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-transform: uppercase;
      }
      .sh-cab-chevron {
        flex-shrink: 0;
        width: 0.75rem;
        height: 0.75rem;
        color: var(--sh-muted);
      }
      .sh-cab-panel {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 4px);
        min-width: 280px;
        max-width: min(22rem, calc(100vw - 16px));
        padding: 12px 0;
        background: var(--sh-surface);
        border: 1px solid var(--sh-border);
        border-radius: 12px;
        box-shadow: var(--sh-shadow);
        /* Выше нижнего H-скролла графика/таблиц (2400), ниже bugfab (3200). */
        z-index: 2600;
      }
      .sh-cab-panel.is-open { display: block; }
      .sh-cab-panel-inner { padding: 0 12px; }
      .sh-cab-group-title {
        margin: 0 0 8px;
        font-size: var(--sh-text-sm);
        font-weight: 600;
        color: var(--sh-muted);
        letter-spacing: 0;
      }
      .sh-cab-cab-row {
        display: flex;
        align-items: stretch;
        gap: 0;
        border-radius: var(--sh-control-radius);
        margin-bottom: 4px;
        overflow: hidden;
        border: 1px solid transparent;
        min-width: 0;
      }
      .sh-cab-cab-row--active {
        background: color-mix(in srgb, var(--sh-primary) 12%, var(--sh-surface));
        border-color: color-mix(in srgb, var(--sh-primary) 22%, var(--sh-border));
      }
      .sh-cab-cab-name {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 10px;
        font-size: var(--sh-text-base);
        font-weight: 500;
        color: var(--sh-text);
        text-decoration: none !important;
      }
      .sh-cab-cab-row--active .sh-cab-cab-name { color: var(--sh-primary); }
      .sh-cab-cab-name:hover { background: color-mix(in srgb, var(--sh-border) 40%, transparent); }
      .sh-cab-cab-name--locked {
        cursor: not-allowed;
        color: var(--sh-muted);
        opacity: 0.78;
      }
      .sh-cab-cab-name--locked:hover {
        background: transparent;
        color: var(--sh-muted);
      }
      .sh-cab-cab-name-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-transform: uppercase;
        letter-spacing: 0.02em;
      }
      .sh-cab-active-dot {
        flex-shrink: 0;
        width: 0.65em;
        font-size: var(--sh-text-sm);
        color: var(--sh-primary);
        line-height: 1;
        text-align: center;
      }
      .sh-cab-active-dot--placeholder {
        visibility: hidden;
      }
      @media (max-width: 640px) {
        .sh-cab-panel {
          right: 0;
          left: auto;
          max-width: calc(100vw - 12px);
        }
        .sh-cab-cab-name {
          padding: 8px 6px;
        }
        button.sh-cab-gear {
          width: 36px;
          min-width: 36px;
        }
      }
      button.sh-cab-gear {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        min-width: 40px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent !important;
        color: var(--sh-muted);
        cursor: pointer;
        text-decoration: none !important;
      }
      button.sh-cab-gear:hover {
        background: color-mix(in srgb, var(--sh-border) 45%, transparent) !important;
        color: var(--sh-text);
      }
      button.sh-cab-lock {
        cursor: not-allowed;
        opacity: 0.82;
      }
      button.sh-cab-lock:hover {
        background: transparent !important;
        color: var(--sh-muted);
      }
      .sh-cab-item {
        display: block;
        padding: 10px 10px;
        border-radius: var(--sh-control-radius);
        color: var(--sh-text);
        font-size: var(--sh-text-base);
        font-weight: 500;
        text-decoration: none !important;
      }
      button.sh-cab-item {
        width: 100%;
        border: 0;
        background: transparent;
        cursor: pointer;
        font: inherit;
        text-align: left;
      }
      .sh-cab-item:hover { background: var(--sh-surface-2); color: var(--sh-text); }
      .sh-cab-item.is-danger { color: var(--sh-danger); font-weight: 600; }
      .sh-cab-item.is-danger:hover {
        background: color-mix(in srgb, var(--sh-danger) 12%, var(--sh-surface));
      }
      .sh-cab-item-add {
        margin-top: 6px;
        padding: 8px 10px;
        border: 1px dashed color-mix(in srgb, var(--sh-primary) 45%, var(--sh-border));
        text-align: center;
        font-size: var(--sh-text-sm);
        font-weight: 600;
        color: var(--sh-primary);
      }
      .sh-cab-item-add:hover {
        background: color-mix(in srgb, var(--sh-primary) 8%, var(--sh-surface));
        color: var(--sh-primary-hover);
      }
      .sh-cab-item-add--ozon {
        color: var(--sh-ozon-primary, #005bff);
        border-color: color-mix(in srgb, var(--sh-ozon-primary, #005bff) 45%, var(--sh-border));
      }
      .sh-cab-item-add--ozon:hover {
        background: color-mix(in srgb, var(--sh-ozon-primary, #005bff) 8%, var(--sh-surface));
        color: var(--sh-ozon-primary, #005bff);
      }
      .sh-cab-item-add--wb {
        color: var(--sh-wb-primary, #cb11ab);
        border-color: color-mix(in srgb, var(--sh-wb-primary, #cb11ab) 45%, var(--sh-border));
      }
      .sh-cab-item-add--wb:hover {
        background: color-mix(in srgb, var(--sh-wb-primary, #cb11ab) 8%, var(--sh-surface));
        color: var(--sh-wb-primary-hover, #a00e8c);
      }
      .sh-cab-item-add--locked {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: not-allowed;
        opacity: 0.72;
        border-style: solid;
        border-color: var(--sh-border);
        color: var(--sh-muted);
        pointer-events: none;
      }
      .sh-cab-item-add--locked:hover {
        background: transparent;
        color: var(--sh-muted);
      }
      .sh-cab-item-add-lock {
        flex: 0 0 auto;
      }
      .sh-cab-hr {
        margin: 12px 0 10px;
        border: 0;
        border-top: 1px solid var(--sh-border);
      }
      .sh-cab-panel.sh-cab-panel--settings,
      .sh-cab-panel.sh-cab-panel--account {
        min-width: min(22rem, calc(100vw - 16px));
        max-width: min(28rem, calc(100vw - 16px));
      }
      .sh-cab-settings-scroll {
        max-height: min(70vh, 34rem);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0 2px 4px 0;
      }
      button.sh-cab-back {
        display: block;
        width: auto;
        margin: 0 0 10px;
        padding: 4px 8px;
        border: 0;
        background: transparent;
        color: var(--sh-primary);
        font-size: var(--sh-text-compact);
        font-weight: 600;
        cursor: pointer;
        text-align: left;
      }
      button.sh-cab-back:hover {
        background: color-mix(in srgb, var(--sh-primary) 10%, transparent);
        color: var(--sh-primary-hover);
      }
      button.sh-cab-item-add {
        width: 100%;
        margin-top: 6px;
        padding: 8px 10px;
        border: 1px dashed color-mix(in srgb, var(--sh-primary) 45%, var(--sh-border));
        border-radius: var(--sh-control-radius);
        background: transparent;
        color: var(--sh-primary);
        font-size: var(--sh-text-sm);
        font-weight: 600;
        cursor: pointer;
      }
      button.sh-cab-item-add:hover {
        background: color-mix(in srgb, var(--sh-primary) 8%, var(--sh-surface));
        color: var(--sh-primary-hover);
      }
      button.sh-cab-item-add.sh-cab-item-add--ozon {
        color: var(--sh-ozon-primary, #005bff) !important;
        border-color: color-mix(in srgb, var(--sh-ozon-primary, #005bff) 45%, var(--sh-border)) !important;
      }
      button.sh-cab-item-add.sh-cab-item-add--ozon:hover {
        background: color-mix(in srgb, var(--sh-ozon-primary, #005bff) 8%, var(--sh-surface)) !important;
        color: var(--sh-ozon-primary, #005bff) !important;
      }
      button.sh-cab-item-add.sh-cab-item-add--wb {
        color: var(--sh-wb-primary, #cb11ab) !important;
        border-color: color-mix(in srgb, var(--sh-wb-primary, #cb11ab) 45%, var(--sh-border)) !important;
      }
      button.sh-cab-item-add.sh-cab-item-add--wb:hover {
        background: color-mix(in srgb, var(--sh-wb-primary, #cb11ab) 8%, var(--sh-surface)) !important;
        color: var(--sh-wb-primary-hover, #a00e8c) !important;
      }
      .sh-cab-settings-form { margin-top: 4px; }
      .sh-cab-settings-form .sh-cab-field { margin-bottom: 10px; }
      .sh-cab-api-guide { margin: 2px 0 0; }
      .sh-cab-api-guide-link {
        font-size: var(--sh-text-xs);
        font-weight: 600;
        color: var(--sh-primary);
        text-decoration: none;
      }
      .sh-cab-api-guide-link:hover {
        color: var(--sh-primary-hover);
        text-decoration: underline;
      }
      .sh-cab-settings-form label {
        display: block;
        margin-bottom: 4px;
        color: var(--sh-muted);
        font-size: var(--sh-text-sm);
        font-weight: 600;
      }
      .sh-cab-settings-form input:not([type="checkbox"]):not([type="radio"]),
      .sh-cab-settings-form select,
      .sh-cab-settings-form textarea {
        width: 100%;
        box-sizing: border-box;
        padding: 8px 10px;
        font-size: var(--sh-text-compact);
      }
      .sh-cab-form-errors,
      .sh-cab-field-errors {
        margin-top: 4px;
        font-size: var(--sh-text-sm);
        color: var(--sh-danger);
      }
      .sh-cab-settings-submit {
        display: block;
        width: 100%;
        margin-top: 4px;
        padding: 0.625rem 1rem;
        min-height: var(--sh-control-height);
        border-radius: var(--sh-control-radius);
        border: 0;
        background: var(--sh-primary);
        color: #fff;
        font-weight: 600;
        font-size: var(--sh-text-base);
        font-family: inherit;
        cursor: pointer;
        box-sizing: border-box;
      }
      .sh-cab-settings-submit:hover {
        background: var(--sh-primary-hover);
        color: #fff;
      }
      .sh-cab-settings-submit--muted {
        background: var(--sh-surface-2, #eef1f5);
        color: var(--sh-text);
        border: 1px solid var(--sh-border, #d8dee8);
      }
      .sh-cab-settings-submit--muted:hover {
        background: var(--sh-surface-3, #e4e9f0);
        color: var(--sh-text);
      }
      .sh-cab-settings-submit--danger {
        background: var(--sh-danger, #c0392b);
      }
      .sh-cab-settings-submit--danger:hover {
        background: #a93226;
        color: #fff;
      }
      .sh-cab-form-h {
        margin: 14px 0 8px;
        font-size: var(--sh-text-compact);
        font-weight: 700;
        color: var(--sh-text);
        letter-spacing: 0.01em;
      }
      .sh-cab-form-h:first-child {
        margin-top: 0;
      }
      .sh-cab-form-hint {
        margin: 0 0 10px;
        font-size: var(--sh-text-xs);
        line-height: 1.5;
        color: var(--sh-muted);
      }
      .sh-cab-legend {
        padding: 0;
        margin: 0 0 6px;
        font-size: var(--sh-text-sm);
        font-weight: 600;
        color: var(--sh-muted);
      }
      .sh-cab-field--radios {
        border: 0;
        padding: 0;
        margin: 0 0 10px;
      }
      .sh-cab-field--radios ul {
        list-style: none;
        margin: 0;
        padding: 0;
      }
      .sh-cab-field--radios li,
      .sh-cab-tax-mode > div {
        margin: 6px 0;
      }
      .sh-cab-field--radios li {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .sh-cab-field--radios input[type="radio"] {
        width: 1rem;
        height: 1rem;
        min-width: 1rem;
        min-height: 1rem;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
        accent-color: var(--sh-primary);
        cursor: pointer;
      }
      .sh-cab-field--radios label {
        margin: 0;
        font-size: var(--sh-text-compact);
        font-weight: 500;
        color: var(--sh-text);
        line-height: 1.35;
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .sh-cab-field--checkbox .sh-cab-check-label {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        cursor: pointer;
        font-size: var(--sh-text-compact);
        font-weight: 500;
        color: var(--sh-text);
        line-height: 1.35;
      }
      .sh-cab-field--checkbox .sh-cab-check-label:focus-within {
        outline: none;
      }
      .sh-cab-field--checkbox .sh-cab-check-label input[type="checkbox"] {
        width: 1rem;
        height: 1rem;
        min-width: 1rem;
        min-height: 1rem;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
        accent-color: var(--sh-primary);
        cursor: pointer;
      }
      .sh-cab-field--checkbox .sh-cab-check-label span {
        font-weight: 500;
        color: var(--sh-text);
      }
      .sh-cab-delete-form {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--sh-border);
      }
      .sh-cab-delete-btn {
        width: 100%;
        border: 1px solid color-mix(in srgb, var(--sh-danger) 45%, var(--sh-border));
        background: transparent !important;
        color: var(--sh-danger) !important;
        font-weight: 600;
      }
      .sh-cab-delete-btn:hover {
        background: color-mix(in srgb, var(--sh-danger) 10%, var(--sh-surface)) !important;
      }
      a.sh-cab-cab-name.sh-cab-cab-name--btn,
      button.sh-cab-cab-name.sh-cab-cab-name--btn {
        font: inherit;
        text-align: left;
        cursor: pointer;
        border: 0;
        background: transparent;
      }
      .sh-flash-msgs { margin: 0 0 12px; }
      .sh-flash-msg {
        margin: 0 0 6px;
        padding: 10px 12px;
        border-radius: var(--sh-control-radius);
        font-size: var(--sh-text-base);
        line-height: 1.45;
      }
      .sh-flash-msg--success {
        background: color-mix(in srgb, #059669 14%, var(--sh-surface));
        color: var(--sh-text);
        border: 1px solid color-mix(in srgb, #059669 35%, var(--sh-border));
      }
      .sh-flash-msg--error {
        background: color-mix(in srgb, var(--sh-danger) 12%, var(--sh-surface));
        color: var(--sh-text);
        border: 1px solid color-mix(in srgb, var(--sh-danger) 35%, var(--sh-border));
      }
      .sh-flash-msg--info,
      .sh-flash-msg--debug {
        background: var(--sh-surface-2);
        color: var(--sh-text);
        border: 1px solid var(--sh-border);
      }
      .sh-flash-msg--warning {
        background: color-mix(in srgb, #d97706 14%, var(--sh-surface));
        color: var(--sh-text);
        border: 1px solid color-mix(in srgb, #d97706 35%, var(--sh-border));
      }
      .is-hidden { display: none; }

      .sh-nav {
        max-width: 1600px;
        margin: 0 auto;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px 8px;
        border-top: 1px solid var(--sh-border);
        padding: 0 8px 4px;
      }
      .sh-nav::-webkit-scrollbar { display: none; }
      @media (min-width: 640px) {
        .sh-nav { padding: 0 16px 4px; gap: 8px 16px; }
      }
      .sh-nav a {
        display: inline-flex;
        align-items: center;
        gap: var(--sh-space-sm);
        flex-shrink: 0;
        padding: 0.625rem 0.75rem;
        min-height: var(--sh-control-height);
        font-size: var(--sh-text-base);
        font-weight: 500;
        color: var(--sh-muted);
        border-radius: var(--sh-control-radius);
        text-decoration: none !important;
      }
      .sh-nav-link-inner {
        display: inline-flex;
        align-items: center;
        gap: var(--sh-space-sm);
      }
      .sh-nav-staff-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 2px;
        opacity: 0.72;
        color: #d97706;
      }
      .sh-nav a.is-active .sh-nav-staff-badge {
        opacity: 0.95;
      }
      .sh-nav-staff-badge-ico {
        width: 13px;
        height: 13px;
      }
      .sh-nav a:hover { color: var(--sh-text); background: color-mix(in srgb, var(--sh-border) 35%, transparent); }
      .sh-nav a.is-active {
        font-weight: 600;
        color: var(--sh-text);
        background: color-mix(in srgb, var(--sh-primary) 12%, transparent);
      }
      .sh-nav-ico-dual {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: var(--sh-ico-md);
        height: var(--sh-ico-md);
        flex-shrink: 0;
      }
      .sh-nav-ico-dual .sh-ico {
        position: absolute;
        inset: 0;
        margin: auto;
      }
      .sh-nav-ico-dual__mob { display: none; }
      @media (max-width: 900px) {
        .sh-nav-ico-dual__desk { display: none; }
        .sh-nav-ico-dual__mob { display: block; }
      }

      .sh-main {
        position: relative;
        z-index: 1;
        flex: 1;
        width: 100%;
        /* Иначе flex-элемент с min-width:auto может «растянуться» под широкие таблицы и сломать overflow у вложенных блоков */
        min-width: 0;
        max-width: 1600px;
        margin: 0 auto;
        padding: var(--sh-space-xl) var(--sh-space-lg) 3rem;
      }
      @media (min-width: 640px) {
        .sh-main { padding: var(--sh-space-xl) var(--sh-space-xl) 3rem; }
      }

      .sh-legal-footer {
        position: relative;
        z-index: 0;
        flex-shrink: 0;
        width: 100%;
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 var(--sh-space-lg) 1rem;
        min-width: 0;
      }
      @media (min-width: 640px) {
        .sh-legal-footer { padding: 0 var(--sh-space-xl) 1.25rem; }
      }
      .sh-legal-footer__nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 4px 8px;
        font-size: var(--sh-text-sm);
        line-height: 1.45;
        color: var(--sh-muted);
        text-align: center;
      }
      .sh-legal-footer a {
        color: var(--sh-muted);
        text-decoration: none;
      }
      .sh-legal-footer a:hover {
        color: var(--sh-primary);
        text-decoration: underline;
      }
      .sh-legal-footer__sep {
        color: var(--sh-border);
        user-select: none;
      }

      .sh-main--gate {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
      }
      .sh-main-workspace--hidden {
        display: none !important;
      }
      .sh-workspace-gate {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: min(72vh, 640px);
        margin: var(--sh-space-lg) var(--sh-space-lg) var(--sh-space-xl);
        padding: var(--sh-space-xl);
        border-radius: var(--sh-radius);
        border: 2px solid color-mix(in srgb, var(--sh-danger) 55%, transparent);
        background: color-mix(in srgb, var(--sh-danger) 12%, var(--sh-surface));
        box-shadow: var(--sh-shadow);
        position: relative;
        z-index: 2;
      }
      @media (min-width: 640px) {
        .sh-workspace-gate {
          margin: var(--sh-space-xl) var(--sh-space-xl) 2rem;
          padding: 2.5rem 2rem;
        }
      }
      .sh-workspace-gate--bootstrap {
        border-color: color-mix(in srgb, var(--sh-primary) 45%, transparent);
        background: color-mix(in srgb, var(--sh-primary) 8%, var(--sh-surface));
      }
      .sh-workspace-gate__inner {
        max-width: 36rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--sh-space-lg);
      }
      .sh-workspace-gate__title {
        margin: 0;
        font-size: clamp(1.25rem, 2.4vw, 1.75rem);
        font-weight: 700;
        line-height: 1.35;
        color: var(--sh-danger);
      }
      .sh-workspace-gate--bootstrap .sh-workspace-gate__title {
        color: var(--sh-text);
      }
      .sh-workspace-gate__skeleton {
        width: min(18rem, 100%);
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
      }
      .sh-workspace-gate__spin {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        border: 3px solid color-mix(in srgb, var(--sh-primary) 25%, transparent);
        border-top-color: var(--sh-primary);
        animation: sh-workspace-gate-spin 0.85s linear infinite;
      }
      @media (prefers-reduced-motion: reduce) {
        .sh-workspace-gate__spin {
          display: none;
        }
      }
      @media (prefers-reduced-motion: no-preference) {
        .sh-workspace-gate__skeleton {
          display: none;
        }
      }
      @keyframes sh-workspace-gate-spin {
        to { transform: rotate(360deg); }
      }

      /* Заголовок раздела — над полосой периода (как раньше во вкладках) */
      .sh-page-heading {
        margin: 0 0 var(--sh-space-md);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.14rem;
      }
      .sh-page-heading-export-col {
        flex-shrink: 0;
      }
      .sh-page-heading-title-row {
        display: flex;
        align-items: center;
        gap: var(--sh-space-md);
        flex-wrap: nowrap;
        width: 100%;
      }
      .sh-page-heading-export-anchor {
        position: relative;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }
      .sh-page-heading-main {
        display: contents;
      }
      .sh-page-heading-export-label {
        margin: 0;
        padding: 0;
        font-size: 0.5625rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: var(--sh-muted);
        line-height: 1.1;
        text-align: left;
        white-space: nowrap;
        pointer-events: none;
      }
      .sh-page-heading-export-status {
        position: absolute;
        left: 0;
        top: calc(100% + 0.12rem);
        display: block;
        width: max-content;
        max-width: 12rem;
        min-height: 0;
        margin: 0.12rem 0 0;
        padding: 0;
        font-size: 0.5625rem;
        color: var(--sh-muted);
        text-align: left;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        pointer-events: none;
        z-index: 12;
      }
      .sh-page-heading-export-status:empty {
        display: none;
      }
      .sh-page-heading-export--static {
        pointer-events: none;
      }
      .sh-page-heading-export-label--spacer {
        display: block;
        height: calc(0.5625rem * 1.1);
        margin: 0 0 0.14rem;
        overflow: hidden;
      }
      .sh-page-heading-ico {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: var(--sh-control-radius);
        background: var(--sh-surface);
        border: 1px solid var(--sh-border);
        transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
      }
      .sh-page-heading-export-anchor .sh-page-heading-ico,
      [data-sh-excel-export] .sh-page-heading-ico {
        margin: 0;
        padding: 0;
        font: inherit;
        font-weight: 400;
        color: inherit;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        background: var(--sh-surface);
        border: 1px solid var(--sh-border);
      }
      .sh-page-heading-export-anchor .sh-page-heading-ico:hover:not(:disabled),
      [data-sh-excel-export] .sh-page-heading-ico:hover:not(:disabled) {
        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) 18%, transparent),
          0 1px 2px color-mix(in srgb, var(--sh-primary) 8%, transparent);
      }
      .sh-page-heading-export-anchor .sh-page-heading-ico:disabled,
      [data-sh-excel-export] .sh-page-heading-ico:disabled {
        opacity: 0.55;
        cursor: wait;
      }
      .sh-page-heading-ico .sh-ico {
        width: var(--sh-ico-lg);
        height: var(--sh-ico-lg);
      }
      .sh-page-heading-title-row h1 {
        margin: 0;
        padding: 0;
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        color: var(--sh-text);
        line-height: 1.2;
        flex: 0 1 auto;
      }
      .sh-table-pager label {
        white-space: nowrap;
      }
      /* Полоса периода: без отдельной «карточки», на фоне страницы */
      .sh-period-bar-wrap {
        position: relative;
        margin: 0 0 1.25rem;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
      }
      .sh-period-bar {
        position: relative;
        z-index: 20;
        display: flex;
        max-width: 100%;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 0.5rem 0.75rem;
        pointer-events: auto;
      }
      .sh-period-col { display: flex; min-width: 0; max-width: 100%; flex-direction: column; gap: 0.375rem; flex: 1; }
      .sh-period-caption { font-size: var(--sh-text-base); color: var(--sh-muted); }
      .sh-period-inputs-row {
        position: relative;
        display: flex;
        max-width: 100%;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
        overflow-x: auto;
      }
      .sh-cal-btn {
        flex-shrink: 0;
        height: var(--sh-control-height);
        width: var(--sh-control-height);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--sh-control-radius);
        border: 1px solid var(--sh-border);
        background: var(--sh-surface);
        color: var(--sh-primary);
        cursor: pointer;
        padding: 0;
      }
      .sh-cal-btn:hover { background: var(--sh-surface-2); }
      .sh-cal-btn .sh-ico,
      .sh-cal-btn svg {
        width: var(--sh-ico-md);
        height: var(--sh-ico-md);
        display: block;
        opacity: 0.88;
      }
      .sh-date-text {
        box-sizing: border-box;
        flex: 0 0 auto;
        flex-shrink: 0;
        height: var(--sh-control-height);
        width: 7.375rem;
        min-width: 7.375rem;
        max-width: 7.375rem;
        border-radius: var(--sh-control-radius);
        border: 1px solid var(--sh-border);
        background: var(--sh-surface);
        padding: 0 0.5rem;
        text-align: center;
        font-size: var(--sh-text-base);
        font-variant-numeric: tabular-nums;
        color: var(--sh-text);
        outline: none;
      }
      .sh-date-text:focus {
        border-color: var(--sh-primary);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--sh-primary) 20%, transparent);
      }
      .sh-dash-sep { flex-shrink: 0; color: var(--sh-muted); user-select: none; font-size: var(--sh-text-base); }
      /* Кастомный календарь периода (вместо нативного date) */
      .sh-cal-popover {
        position: fixed;
        z-index: 2000;
        min-width: 17.5rem;
        max-width: calc(100vw - 16px);
        padding: 0;
        border: 1px solid var(--sh-border);
        border-radius: var(--sh-radius, 12px);
        background: var(--sh-surface);
        box-shadow: 0 10px 40px rgba(0, 26, 52, 0.12), 0 2px 10px rgba(0, 26, 52, 0.08);
        overflow: hidden;
      }
      html[data-theme="dark"] .sh-cal-popover {
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
      }
      .sh-cal-popover[hidden] {
        display: none !important;
      }
      .sh-cal-popover-inner {
        padding: 0.65rem 0.75rem 0.75rem;
      }
      .sh-cal-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
      }
      .sh-cal-title {
        flex: 1;
        text-align: center;
        font-size: 0.9375rem;
        font-weight: 700;
        color: var(--sh-text);
        line-height: 1.2;
      }
      .sh-cal-nav {
        flex-shrink: 0;
        width: 2rem;
        height: 2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--sh-control-radius);
        border: 1px solid var(--sh-border);
        background: var(--sh-surface-2);
        color: var(--sh-text);
        font-size: 1.125rem;
        line-height: 1;
        cursor: pointer;
        padding: 0;
      }
      .sh-cal-nav:hover:not(:disabled) {
        background: color-mix(in srgb, var(--sh-primary) 10%, var(--sh-surface-2));
        border-color: color-mix(in srgb, var(--sh-primary) 35%, var(--sh-border));
        color: var(--sh-primary);
      }
      .sh-cal-nav:disabled {
        opacity: 0.35;
        cursor: not-allowed;
      }
      .sh-cal-weekdays {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 0;
        margin-bottom: 0.25rem;
      }
      .sh-cal-weekdays span {
        text-align: center;
        font-size: var(--sh-text-xs);
        font-weight: 600;
        color: var(--sh-muted);
        padding: 0.2rem 0;
      }
      .sh-cal-weekdays span:nth-child(6),
      .sh-cal-weekdays span:nth-child(7) {
        color: var(--sh-danger);
      }
      .sh-cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
      }
      .sh-cal-day {
        position: relative;
        aspect-ratio: 1;
        max-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: var(--sh-control-radius);
        background: transparent;
        color: var(--sh-text);
        cursor: pointer;
        padding: 0;
        font: inherit;
      }
      .sh-cal-day:hover:not(:disabled):not(.sh-cal-day--muted) {
        background: color-mix(in srgb, var(--sh-primary) 12%, var(--sh-surface));
      }
      .sh-cal-day--muted {
        cursor: default;
        opacity: 0.38;
      }
      .sh-cal-day--muted .sh-cal-day-num {
        color: var(--sh-muted);
      }
      .sh-cal-day:disabled,
      .sh-cal-day.sh-cal-day--disabled {
        cursor: not-allowed;
        opacity: 0.35;
      }
      .sh-cal-day-num {
        font-size: var(--sh-text-compact);
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        color: var(--sh-text);
      }
      .sh-cal-day--weekend:not(.sh-cal-day--muted) .sh-cal-day-num {
        color: var(--sh-danger);
        font-weight: 700;
      }
      .sh-cal-day--today:not(.sh-cal-day--muted) .sh-cal-day-num {
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--sh-primary) 45%, transparent);
        border-radius: 999px;
        padding: 0 0.28rem;
      }
      .sh-cal-day--pick-from,
      .sh-cal-day--pick-to {
        background: color-mix(in srgb, var(--sh-primary) 16%, var(--sh-surface));
        color: var(--sh-text);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sh-primary) 42%, transparent);
      }
      .sh-cal-day--pick-from:hover:not(:disabled):not(.sh-cal-day--muted),
      .sh-cal-day--pick-to:hover:not(:disabled):not(.sh-cal-day--muted) {
        background: color-mix(in srgb, var(--sh-primary) 22%, var(--sh-surface));
      }
      .sh-cal-day--pick-from .sh-cal-day-num,
      .sh-cal-day--pick-to .sh-cal-day-num {
        background: transparent;
        color: var(--sh-text) !important;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        font-weight: 700;
      }
      button.sh-cal-day.sh-cal-day--pick-from,
      button.sh-cal-day.sh-cal-day--pick-to {
        color: var(--sh-text) !important;
      }
      .sh-cal-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 0.45rem;
        padding-top: 0.45rem;
        border-top: 1px solid var(--sh-border);
      }
      .sh-cal-foot-btn {
        border: 0;
        background: transparent;
        color: var(--sh-primary);
        font-size: var(--sh-text-sm);
        font-weight: 600;
        cursor: pointer;
        padding: 0.2rem 0.35rem;
        font-family: inherit;
      }
      .sh-cal-foot-btn:hover {
        text-decoration: underline;
      }
      .auth-birthdate-row {
        display: flex;
        align-items: stretch;
        gap: 0.35rem;
        max-width: 100%;
      }
      .auth-birthdate-row .sh-date-text {
        flex: 1 1 auto;
        min-width: 0;
      }
      .auth-birthdate-row .sh-cal-btn {
        flex-shrink: 0;
      }
      .sh-period-bar .sh-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--sh-control-radius);
        font-weight: 600;
        cursor: pointer;
        line-height: 1.2;
        font-family: inherit;
      }
      .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);
        padding: 0 var(--sh-space-md);
        border: 1px solid var(--sh-border);
        background: var(--sh-surface);
        color: var(--sh-text);
        font-size: var(--sh-text-base);
        border-radius: var(--sh-control-radius);
      }
      .sh-btn.sh-btn-secondary.sh-btn-tall-date:hover { background: var(--sh-surface-2); }
      /* Выбранный пресет периода (7 / 28 дней) — в тон навигации и иконки раздела */
      .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-btn.sh-btn-secondary.sh-btn-tall-date.sh-preset-active:hover {
        background: color-mix(in srgb, var(--sh-primary) 22%, var(--sh-surface-2));
        border-color: color-mix(in srgb, var(--sh-primary) 52%, var(--sh-border));
      }
      .sh-btn.sh-btn-secondary.sh-btn-tall-date:focus-visible.sh-preset-active {
        outline: 2px solid color-mix(in srgb, var(--sh-primary) 45%, transparent);
        outline-offset: 2px;
      }
      .sh-btn-eq {
        min-height: var(--sh-control-height);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        border-radius: var(--sh-control-radius);
        white-space: nowrap;
      }
      .sh-btn-sm {
        min-height: 2rem;
        padding: 0 0.625rem;
        font-size: var(--sh-text-sm);
        font-weight: 600;
      }
      .sh-btn-md {
        min-height: var(--sh-control-height);
        padding: 0 var(--sh-space-md);
        font-size: var(--sh-text-base);
        font-weight: 600;
      }

      .sh-card,
      .card {
        background: var(--sh-surface);
        border: 1px solid var(--sh-border);
        border-radius: var(--sh-radius);
        padding: var(--sh-space-lg) var(--sh-space-xl);
        margin-bottom: var(--sh-space-lg);
        box-shadow: var(--sh-shadow);
      }
      .sh-card h1,
      .card h1 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; color: var(--sh-text); }
      .sh-card h2,
      .card h2 { margin: 0 0 12px; font-size: 1.125rem; font-weight: 700; color: var(--sh-text); }
      .muted { color: var(--sh-muted); font-size: var(--sh-text-base); line-height: 1.55; }

      .badge { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; text-transform: lowercase; }
      .badge-fresh { background: #064e3b; color: #d1fae5; }
      .badge-warming { background: #78350f; color: #fef3c7; }
      .badge-stale { background: #374151; color: #e5e7eb; }
      html[data-theme="light"] .badge-stale { background: #e2e8f0; color: #475569; }
      .badge-error { background: #7f1d1d; color: #fee2e2; }

      .sh-card table,
      .card table,
      .auth-page table {
        width: 100%;
        border-collapse: collapse;
      }
      .sh-card th,
      .sh-card td,
      .card th,
      .card td,
      .auth-page th,
      .auth-page td {
        border-bottom: 1px solid var(--sh-border);
        padding: var(--sh-table-cell-py, 0.625rem) var(--sh-table-cell-px, 0.75rem);
        text-align: left;
        vertical-align: top;
      }
      /* Только формы (не ячейки таблиц workspace, не период, не чекбоксы) */
      .sh-cab-settings-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      .auth-page form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      .sh-card form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      .card form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      .sh-cab-settings-form textarea,
      .auth-page form textarea,
      .sh-card form textarea,
      .card form textarea,
      .sh-cab-settings-form select,
      .auth-page form select,
      .sh-card form select,
      .card form select {
        width: 100%;
        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);
        background: var(--sh-input-bg);
        color: var(--sh-text);
        font-size: var(--sh-text-base, 0.875rem);
        font-family: inherit;
        line-height: 1.2;
        box-sizing: border-box;
      }
      .sh-cab-settings-form input:not([type="checkbox"]):not([type="radio"]):focus,
      .auth-page form input:not([type="checkbox"]):not([type="radio"]):focus,
      .sh-card form input:not([type="checkbox"]):not([type="radio"]):focus,
      .card form input:not([type="checkbox"]):not([type="radio"]):focus,
      .sh-cab-settings-form textarea:focus,
      .auth-page form textarea:focus,
      .sh-card form textarea:focus,
      .card form textarea:focus,
      .sh-cab-settings-form select:focus,
      .auth-page form select:focus,
      .sh-card form select:focus,
      .card form select:focus {
        outline: none;
        border-color: var(--sh-primary);
        box-shadow: var(--sh-focus-ring, 0 0 0 2px color-mix(in srgb, var(--sh-primary) 22%, transparent));
      }
      input[type="checkbox"],
      input[type="radio"] {
        width: 1rem;
        height: 1rem;
        min-width: 0;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 0.25rem;
        background: transparent;
        box-shadow: none;
        accent-color: var(--sh-primary);
        flex-shrink: 0;
        vertical-align: middle;
        cursor: pointer;
      }
      input[type="checkbox"]:focus,
      input[type="radio"]:focus {
        outline: none;
        box-shadow: none;
      }
      button:not(.sh-btn):not(.fin-btn-compact):not(.home-detail-btn):not(.fbs-btn):not(.unit-btn):not(.probe-btn):not(.content-col-del):not(.sh-cab-settings-submit):not(.consulting-submit):not(.sh-cookie-ok):not(.sh-brand-btn):not(.sh-cab-back):not(.sh-cab-trigger):not(.theme-toggle):not(.sh-cab-item):not(.sh-cab-gear):not(.sh-cab-item-add):not(.sh-cal-btn):not(.sh-cal-day):not(.sh-cal-nav):not(.tariff-period-chip):not(.sh-page-heading-ico):not(.unit-step-btn):not(.referral-btn):not(.sh-bugfab-btn):not(.sh-bugfab-submit):not(.fbo-cluster-toggle):not(.sh-excel-export-menu-item):not(.repricer-fn-trigger):not(.repricer-fn-menu-item):not(.sh-trend__menu-btn):not(.sh-trend__save):not(.sh-trend__popup-close):not(.sh-trend__delete):not(.promo-btn):not(.promo-fab-btn) {
        padding: 0.625rem 1rem;
        min-height: var(--sh-control-height);
        border-radius: var(--sh-control-radius);
        border: 0;
        background: var(--sh-primary);
        color: #fff;
        font-weight: 600;
        font-size: var(--sh-text-base);
        font-family: inherit;
        cursor: pointer;
      }
      button:not(.sh-btn):not(.fin-btn-compact):not(.home-detail-btn):not(.fbs-btn):not(.unit-btn):not(.probe-btn):not(.content-col-del):not(.sh-cab-settings-submit):not(.consulting-submit):not(.sh-cookie-ok):not(.sh-brand-btn):not(.sh-cab-back):not(.sh-cab-trigger):not(.theme-toggle):not(.sh-cab-item):not(.sh-cab-gear):not(.sh-cab-item-add):not(.sh-cal-btn):not(.sh-cal-day):not(.sh-cal-nav):not(.tariff-period-chip):not(.sh-page-heading-ico):not(.unit-step-btn):not(.referral-btn):not(.sh-bugfab-btn):not(.sh-bugfab-submit):not(.fbo-cluster-toggle):not(.sh-excel-export-menu-item):not(.repricer-fn-trigger):not(.repricer-fn-menu-item):not(.sh-trend__menu-btn):not(.sh-trend__save):not(.sh-trend__popup-close):not(.sh-trend__delete):not(.promo-btn):not(.promo-fab-btn):hover {
        background: var(--sh-primary-hover);
        color: #fff;
      }
      button.sh-cal-day,
      button.sh-cal-nav {
        padding: 0;
        min-height: 0;
        border: 0;
        border-radius: var(--sh-control-radius);
        background: transparent;
        color: inherit;
        font-weight: inherit;
        font-size: inherit;
      }
      button.sh-cal-nav {
        min-height: 2rem;
        min-width: 2rem;
      }
      button.sh-cal-day:hover:not(:disabled):not(.sh-cal-day--muted),
      button.sh-cal-nav:hover:not(:disabled) {
        background: color-mix(in srgb, var(--sh-primary) 12%, var(--sh-surface));
        color: inherit;
      }
      button.sh-cab-trigger {
        background: transparent;
        color: var(--sh-text);
        padding: 0 var(--sh-space-md);
        font-weight: 600;
      }
      button.sh-cab-trigger:hover {
        background: var(--sh-surface-2);
        color: var(--sh-text);
      }
      button.sh-btn.sh-btn-primary,
      button.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) {
        background: var(--sh-primary-hover);
        color: #fff;
      }
      button.sh-page-heading-ico,
      button[data-sh-excel-trigger] {
        min-height: auto;
        padding: 0;
        border: 1px solid var(--sh-border);
        background: var(--sh-surface);
        color: var(--sh-text);
        font-weight: 400;
      }
      button.sh-page-heading-ico:hover:not(:disabled),
      button[data-sh-excel-trigger]:hover:not(:disabled) {
        background: color-mix(in srgb, var(--sh-primary) 14%, var(--sh-surface));
        color: var(--sh-text);
        border-color: color-mix(in srgb, var(--sh-primary) 40%, var(--sh-border));
      }
      button.unit-step-btn {
        min-height: auto;
        padding: 0;
        border: 1px solid var(--sh-border);
        background: var(--sh-surface);
        color: var(--sh-muted);
        font-weight: 400;
        font-size: var(--sh-text-2xs);
      }
      button.unit-step-btn:hover:not(:disabled) {
        background: var(--sh-surface);
        color: var(--sh-text);
        border-color: var(--sh-primary);
      }
      button.referral-btn {
        min-height: var(--sh-control-height);
        font-weight: 600;
      }
      button.sh-bugfab-btn {
        min-height: auto;
        padding: 0;
        border: 1px solid var(--sh-border);
        border-radius: 999px;
        background: color-mix(in srgb, var(--sh-surface) 88%, transparent);
        color: var(--sh-text);
        font-weight: 400;
        box-shadow: var(--sh-shadow);
      }
      button.sh-bugfab-btn:hover:not(:disabled) {
        background: color-mix(in srgb, var(--sh-surface) 96%, transparent);
        color: var(--sh-text);
      }
      button:focus-visible,
      .sh-btn:focus-visible,
      .theme-toggle:focus-visible,
      .sh-cal-btn:focus-visible,
      .sh-nav a:focus-visible {
        outline: 2px solid var(--sh-primary);
        outline-offset: 2px;
      }
      form p { margin: 0 0 12px; }
      form label { display: block; margin-bottom: 6px; color: var(--sh-muted); font-size: var(--sh-text-sm); font-weight: 500; }

      .theme-toggle {
        width: var(--sh-control-height);
        height: var(--sh-control-height);
        min-width: var(--sh-control-height);
        border: 1px solid var(--sh-border);
        background: var(--sh-surface-2);
        color: var(--sh-text);
        border-radius: var(--sh-control-radius);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: var(--sh-shadow);
        transition: transform 0.12s ease, background 0.18s ease;
        padding: 0;
      }
      .theme-toggle:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--sh-primary) 14%, var(--sh-surface-2)); }
      .theme-toggle-glyph {
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .theme-toggle-glyph .sh-ico {
        width: var(--sh-ico-lg);
        height: var(--sh-ico-lg);
      }
      html[data-theme="dark"] .theme-toggle-glyph--sun { display: none; }
      html[data-theme="dark"] .theme-toggle-glyph--moon { display: flex; }
      html[data-theme="light"] .theme-toggle-glyph--sun { display: flex; }
      html[data-theme="light"] .theme-toggle-glyph--moon { display: none; }

      /* Auth pages */
      .auth-page { max-width: 28rem; margin: 0 auto; padding: 40px 0 24px; }
      .auth-page h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 8px; color: var(--sh-text); letter-spacing: -0.02em; }
      .auth-intro { font-size: var(--sh-text-base); color: var(--sh-muted); margin: 0 0 8px; line-height: 1.55; }
      .auth-intro a { font-weight: 600; }
      .auth-intro.tight { margin-top: -8px; margin-bottom: 24px; }
      .auth-card-form { padding: 16px; }
      .auth-card-form .auth-field { margin-bottom: 16px; }
      .auth-card-form label { color: var(--sh-muted); }
      .auth-card-form input:not([type="checkbox"]):not([type="radio"]) { height: 40px; }
      .auth-card-form ul.errorlist { margin: 6px 0 0; padding: 0; list-style: none; font-size: var(--sh-text-compact); color: var(--sh-danger); }
      .auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
      .auth-actions button,
      .auth-actions .secondary-link {
        min-height: var(--sh-control-height);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 14px;
        border-radius: var(--sh-control-radius);
        font-size: var(--sh-text-base);
        line-height: 1.2;
        text-decoration: none !important;
      }
      .auth-actions button {
        font-weight: 600;
        border: 0;
        background: var(--sh-primary);
        color: #fff;
      }
      .auth-actions button:hover:not(:disabled) {
        background: var(--sh-primary-hover);
        color: #fff;
      }
      .auth-actions .secondary-link {
        border: 1px solid var(--sh-border);
        background: var(--sh-surface);
        color: var(--sh-muted);
        font-weight: 500;
      }
      .auth-actions .secondary-link:hover { color: var(--sh-text); background: var(--sh-surface-2); }
      /* Компактная регистрация: без скролла на невысоких экранах */
      .auth-page--register {
        padding-top: 12px;
        padding-bottom: 8px;
      }
      .auth-page--register .auth-intro.tight { margin-bottom: 12px; }
      .auth-page--register .auth-card-form { padding: 12px; }
      .auth-page--register .auth-card-form .auth-field { margin-bottom: 10px; }
      .auth-page--register .auth-card-form input:not([type="checkbox"]):not([type="radio"]) { height: 36px; }
      .auth-page--register .auth-actions { margin-top: 10px; gap: 10px; }
      .auth-page--register .auth-actions button,
      .auth-page--register .auth-actions .secondary-link {
        min-height: 2.2rem;
        padding: 0 12px;
      }
      .auth-agreements {
        margin-top: 4px;
        margin-bottom: 10px;
      }
      .auth-agreement-item {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 6px;
        color: var(--sh-muted);
        font-size: var(--sh-text-compact);
        line-height: 1.35;
        cursor: pointer;
      }
      .auth-agreement-item:focus-within {
        outline: none;
      }
      .auth-agreement-item input[type="checkbox"] {
        width: 1rem;
        height: 1rem;
        min-width: 1rem;
        min-height: 1rem;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
        accent-color: var(--sh-primary);
        cursor: pointer;
      }
      .auth-agreement-item > span {
        flex: 1;
        min-width: 0;
      }
      .auth-agreement-item a {
        color: var(--sh-primary);
        text-decoration: underline;
        text-underline-offset: 2px;
      }
      .auth-page--register .auth-agreements ul.errorlist {
        margin: 0 0 6px 22px;
        padding: 0;
        list-style: none;
        font-size: 0.78rem;
        color: var(--sh-danger);
      }
      .auth-page--register .auth-actions button:disabled {
        opacity: 0.55;
        cursor: not-allowed;
      }
      .auth-nonfield {
        padding: 12px; border-radius: var(--sh-control-radius); margin-bottom: 16px; font-size: var(--sh-text-base);
        background: color-mix(in srgb, var(--sh-danger) 18%, var(--sh-surface));
        border: 1px solid color-mix(in srgb, var(--sh-danger) 45%, var(--sh-border));
        color: var(--sh-danger);
      }
      html[data-theme="light"] .auth-nonfield {
        background: #fef2f2;
        border-color: #fecaca;
        color: #991b1b;
      }

      /* Плашка «закрытые по тарифу» динамика: клик ведёт на страницу тарифов.
         Не привязываем max-width к 100% ячейки — в узких колонках (FBS/FBO ABC) это резало «PRO» до «P…». */
      a.sh-tariff-paywall {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: max-content;
        max-width: 14rem;
        min-height: 1.5rem;
        padding: 0.22rem 0.65rem;
        border-radius: 0.45rem;
        font-size: var(--sh-text-xs);
        font-weight: 700;
        line-height: 1;
        text-decoration: none;
        color: var(--sh-primary);
        vertical-align: middle;
        border: 1px dashed color-mix(in srgb, var(--sh-primary) 50%, var(--sh-border));
        background: color-mix(in srgb, var(--sh-primary) 14%, var(--sh-surface));
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sh-surface) 35%, transparent);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        cursor: pointer;
      }
      a.sh-tariff-paywall:hover {
        background: color-mix(in srgb, var(--sh-primary) 24%, var(--sh-surface));
        border-color: color-mix(in srgb, var(--sh-primary) 70%, var(--sh-border));
      }
      a.sh-tariff-paywall:focus-visible {
        outline: 2px solid var(--sh-primary);
        outline-offset: 2px;
      }
      .sh-tariff-paywall__label {
        position: relative;
        z-index: 1;
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      /* Unified status pills (baseline from Unit: margin/ROI/ABC) */
      :root,
      html[data-theme="light"],
      html[data-theme="dark"] {
        --sh-pill-min-h: 1.875rem;
        --sh-pill-min-w: 2.5rem;
        --sh-pill-radius: 0.5rem;
        --sh-pill-pad-y: 0.375rem;
        --sh-pill-pad-x: 0.75rem;
        --sh-pill-font: 0.875rem;
        --sh-tone-pos-bg: #d1fae5;
        --sh-tone-pos-fg: #064e3b;
        --sh-tone-neg-bg: #ffe4e6;
        --sh-tone-neg-fg: #881337;
        --sh-tone-warn-bg: #fde68a;
        --sh-tone-warn-fg: #92400e;
        --sh-tone-mid-bg: color-mix(in srgb, var(--sh-border) 35%, var(--sh-surface));
        --sh-tone-mid-fg: var(--sh-text);
      }
      html[data-theme="dark"] {
        --sh-tone-pos-bg: color-mix(in srgb, #34d399 22%, var(--sh-surface));
        --sh-tone-pos-fg: #6ee7b7;
        --sh-tone-neg-bg: color-mix(in srgb, #fb7185 22%, var(--sh-surface));
        --sh-tone-neg-fg: #fda4af;
        --sh-tone-warn-bg: color-mix(in srgb, #f59e0b 24%, var(--sh-surface));
        --sh-tone-warn-fg: #fcd34d;
      }
      .unit-badge,
      .unit-pct-badge,
      .unit-abc-pill,
      .sh-abc-pill,
      .sh-metric-pill,
      .fbo-abc,
      .fbs-badge,
      .ads-badge,
      .fin-sku-signed-badge,
      .sag-abc-pill {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        border: 1px solid var(--sh-border) !important;
        min-height: var(--sh-pill-min-h) !important;
        min-width: var(--sh-pill-min-w) !important;
        border-radius: var(--sh-pill-radius) !important;
        padding: var(--sh-pill-pad-y) var(--sh-pill-pad-x) !important;
        font-size: var(--sh-pill-font) !important;
        font-weight: 700 !important;
        font-variant-numeric: tabular-nums;
        line-height: 1 !important;
      }
      .unit-b-pos, .unit-pct-pos, .unit-pct-target-good, .unit-abc-a, .unit-stock-ok, .sh-abc-pill--a, .sh-metric-pill--pos, .fbo-a, .fbs-a, .ads-b-pos, .ads-abc-a, .sag-abc-a {
        background: #d1fae5 !important;
        color: #064e3b !important;
        border-color: color-mix(in srgb, #16a34a 24%, var(--sh-border)) !important;
      }
      .unit-b-neg, .unit-pct-neg, .unit-pct-target-bad, .unit-abc-c, .unit-stock-0, .sh-abc-pill--c, .sh-metric-pill--neg, .fbo-c, .fbs-c, .ads-b-neg, .ads-abc-c, .sag-abc-c {
        background: #ffe4e6 !important;
        color: #881337 !important;
        border-color: color-mix(in srgb, #fb7185 26%, var(--sh-border)) !important;
      }
      .unit-pct-target-warn, .unit-abc-b, .unit-stock-low, .sh-abc-pill--b, .sh-metric-pill--warn, .fbo-b, .fbs-b, .ads-abc-b, .sag-abc-b {
        background: #fde68a !important;
        color: #92400e !important;
        border-color: color-mix(in srgb, #f59e0b 28%, var(--sh-border)) !important;
      }
      .unit-b-zero, .unit-pct-zero, .sh-metric-pill--zero, .ads-b-zero {
        background: color-mix(in srgb, var(--sh-border) 35%, var(--sh-surface)) !important;
        color: var(--sh-text) !important;
      }
      html[data-theme="dark"] .unit-b-pos,
      html[data-theme="dark"] .unit-pct-pos,
      html[data-theme="dark"] .unit-pct-target-good,
      html[data-theme="dark"] .unit-abc-a,
      html[data-theme="dark"] .unit-stock-ok,
      html[data-theme="dark"] .sh-abc-pill--a,
      html[data-theme="dark"] .sh-metric-pill--pos,
      html[data-theme="dark"] .fbo-a,
      html[data-theme="dark"] .fbs-a,
      html[data-theme="dark"] .ads-b-pos,
      html[data-theme="dark"] .ads-abc-a,
      html[data-theme="dark"] .sag-abc-a {
        background: color-mix(in srgb, #34d399 22%, var(--sh-surface)) !important;
        color: #6ee7b7 !important;
        border-color: color-mix(in srgb, #34d399 32%, var(--sh-border)) !important;
      }
      html[data-theme="dark"] .unit-b-neg,
      html[data-theme="dark"] .unit-pct-neg,
      html[data-theme="dark"] .unit-pct-target-bad,
      html[data-theme="dark"] .unit-abc-c,
      html[data-theme="dark"] .unit-stock-0,
      html[data-theme="dark"] .sh-abc-pill--c,
      html[data-theme="dark"] .sh-metric-pill--neg,
      html[data-theme="dark"] .fbo-c,
      html[data-theme="dark"] .fbs-c,
      html[data-theme="dark"] .ads-b-neg,
      html[data-theme="dark"] .ads-abc-c,
      html[data-theme="dark"] .sag-abc-c {
        background: color-mix(in srgb, #fb7185 22%, var(--sh-surface)) !important;
        color: #fda4af !important;
        border-color: color-mix(in srgb, #fb7185 34%, var(--sh-border)) !important;
      }
      html[data-theme="dark"] .unit-pct-target-warn,
      html[data-theme="dark"] .unit-abc-b,
      html[data-theme="dark"] .unit-stock-low,
      html[data-theme="dark"] .sh-abc-pill--b,
      html[data-theme="dark"] .sh-metric-pill--warn,
      html[data-theme="dark"] .fbo-b,
      html[data-theme="dark"] .fbs-b,
      html[data-theme="dark"] .ads-abc-b,
      html[data-theme="dark"] .sag-abc-b {
        background: color-mix(in srgb, #f59e0b 24%, var(--sh-surface)) !important;
        color: #fcd34d !important;
        border-color: color-mix(in srgb, #f59e0b 36%, var(--sh-border)) !important;
      }

      .sh-td-sku-article {
        overflow: hidden;
        vertical-align: middle;
      }
      .sh-sku-stack {
        display: flex;
        flex-direction: column;
        gap: 0.12rem;
        line-height: 1.2;
        min-width: 0;
        max-width: 100%;
      }
      .sh-sku-stack__sku {
        font-weight: 700;
        font-size: var(--sh-text-compact);
      }
      .sh-sku-stack__art {
        font-size: var(--sh-text-sm);
        color: var(--sh-muted);
        font-weight: 500;
      }
      .sh-abc-pair {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        flex-wrap: nowrap;
        max-width: 100%;
        box-sizing: border-box;
      }
      .sh-abc-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        white-space: nowrap;
        border: 1px solid transparent;
      }
      .sh-metric-pill,
      .sh-dyn-pill,
      .sh-planfact-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: var(--sh-pill-min-h, 1.875rem);
        min-width: var(--sh-pill-min-w, 2.5rem);
        max-width: 100%;
        border-radius: var(--sh-pill-radius, 0.5rem);
        padding: var(--sh-pill-pad-y, 0.375rem) var(--sh-pill-pad-x, 0.75rem);
        font-size: var(--sh-pill-font, 0.875rem);
        font-weight: 700;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
        box-sizing: border-box;
        border: 1px solid transparent;
        line-height: 1;
      }
      .sh-td-planfact {
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .sh-metric-pill--pos,
      .sh-dyn-pill--pos,
      .sh-planfact-pill--ok {
        background: color-mix(in srgb, #16a34a 12%, var(--sh-surface)) !important;
        color: #047857 !important;
        border-color: color-mix(in srgb, #16a34a 24%, var(--sh-border)) !important;
      }
      .sh-metric-pill--neg,
      .sh-dyn-pill--neg,
      .sh-planfact-pill--bad {
        background: color-mix(in srgb, #fb7185 11%, var(--sh-surface)) !important;
        color: #9f1239 !important;
        border-color: color-mix(in srgb, #fb7185 26%, var(--sh-border)) !important;
      }
      .sh-metric-pill--warn {
        background: color-mix(in srgb, #f59e0b 14%, var(--sh-surface)) !important;
        color: #92400e !important;
        border-color: color-mix(in srgb, #f59e0b 28%, var(--sh-border)) !important;
      }
      .sh-metric-pill--zero,
      .sh-dyn-pill--zero,
      .sh-dyn-pill--na,
      .sh-planfact-pill--none,
      .sh-planfact-pill--na {
        background: color-mix(in srgb, var(--sh-border) 14%, var(--sh-surface)) !important;
        color: var(--sh-text) !important;
        border-color: var(--sh-border) !important;
      }
      /* Ширины метрик — см. static/app/sh-design-system.css (--sh-col-metric-*) */

/* Cookie banner, bug FAB, column-help float (раньше inline в base.html) */
.sh-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 2500;
  width: min(94vw, 680px);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--sh-border);
  background: color-mix(in srgb, var(--sh-surface) 94%, transparent);
  box-shadow: var(--sh-shadow);
  backdrop-filter: blur(6px);
}
.sh-cookie-banner.is-visible { display: flex; }
.sh-cookie-text {
  margin: 0;
  color: var(--sh-muted);
  font-size: var(--sh-text-base);
  line-height: 1.35;
}
.sh-cookie-text a { font-weight: 600; }
.sh-cookie-ok {
  min-height: 2.2rem;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: var(--sh-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sh-cookie-ok:hover { background: var(--sh-primary-hover); }
@media (max-width: 640px) {
  .sh-cookie-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 12px;
  }
  .sh-cookie-ok { width: 100%; }
}
.sh-bugfab-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3200;
}
.sh-bugfab-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--sh-border);
  background: color-mix(in srgb, var(--sh-surface) 88%, transparent);
  color: var(--sh-text);
  box-shadow: var(--sh-shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sh-bugfab-btn:hover {
  background: color-mix(in srgb, var(--sh-surface) 96%, transparent);
}
.sh-bugfab-panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: min(92vw, 340px);
  border-radius: 12px;
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow);
  padding: 12px;
}
.sh-bugfab-panel[hidden] { display: none; }
.sh-bugfab-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
}
.sh-bugfab-label {
  display: block;
  margin: 0 0 4px;
  font-size: var(--sh-text-sm);
  color: var(--sh-muted);
}
.sh-bugfab-field {
  width: 100%;
  border: 1px solid var(--sh-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sh-surface) 92%, transparent);
  color: var(--sh-text);
  padding: 8px 10px;
  font-size: 0.82rem;
  margin: 0 0 10px;
}
.sh-bugfab-actions {
  display: flex;
  justify-content: flex-end;
}
.sh-bugfab-submit {
  min-height: 2rem;
  padding: 0 12px;
  border-radius: 8px;
  border: 0;
  background: var(--sh-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.sh-bugfab-submit:hover {
  background: var(--sh-primary-hover);
}
.sh-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.2rem;
  vertical-align: middle;
  flex: 0 0 auto;
}
.sh-help-inline {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.sag-th-abc-stack.sh-help-inline,
.sag-th-month-stack.sh-help-inline,
.sag-day-head-inner.sh-help-inline {
  flex-direction: row !important;
  gap: 0.2rem !important;
  line-height: 1.1;
}
.sag-th-abc-stack.sh-help-inline .sag-th-abc-line2,
.sag-th-month-stack.sh-help-inline .sag-th-month-line2 {
  display: inline;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}
.sh-help-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--sh-border) 78%, transparent);
  background: color-mix(in srgb, var(--sh-surface) 88%, transparent);
  color: var(--sh-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
}
.sh-help-float {
  position: fixed;
  left: 0;
  top: 0;
  min-width: 200px;
  max-width: min(360px, 88vw);
  border: 1px solid var(--sh-border);
  border-radius: 10px;
  background: var(--sh-surface);
  color: var(--sh-text);
  box-shadow: var(--sh-shadow);
  padding: 0.45rem 0.55rem;
  font-size: 0.74rem;
  line-height: 1.35;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.sh-help-float.is-visible {
  opacity: 1;
  visibility: visible;
}
.sh-help-float.sh-help-float--cell {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: color-mix(in srgb, var(--sh-border) 70%, #cbd5e1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  max-width: min(520px, 92vw);
  white-space: normal;
  word-break: break-word;
}
html[data-theme="dark"] .sh-help-float.sh-help-float--cell {
  background: #ffffff !important;
  color: #0f172a !important;
}

.sh-edit-dock {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  /* Выше футера (.sh-legal-footer z-index:1) и cookie (2500); ниже bugfab (3200). */
  z-index: 3100;
  pointer-events: none;
}
.sh-edit-dock[hidden] {
  display: none !important;
}
.sh-edit-dock__inner {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--sh-border) 80%, var(--sh-primary) 20%);
  background: color-mix(in srgb, var(--sh-surface) 92%, transparent);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
}
.sh-edit-dock__hint {
  font-size: var(--sh-text-sm);
  color: var(--sh-muted);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .sh-edit-dock__inner {
    border-radius: 16px;
    max-width: calc(100vw - 16px);
  }
  .sh-edit-dock__hint {
    width: 100%;
    text-align: center;
  }
}
