/**
 * P-C convert wizard shell (SDC steps). Composed with Bootstrap 5 from base theme.
 */
.strateg-convert-wizard-page {
  width: 100%;
}

.strateg-convert-wizard-shell {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.strateg-convert-wizard__row {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(var(--bs-gutter-x, 1rem) * -0.5);
  margin-right: calc(var(--bs-gutter-x, 1rem) * -0.5);
}

.strateg-convert-wizard__main {
  flex: 0 0 100%;
  max-width: 100%;
  padding-left: calc(var(--bs-gutter-x, 1rem) * 0.5);
  padding-right: calc(var(--bs-gutter-x, 1rem) * 0.5);
}

.strateg-convert-wizard__rail-col {
  position: relative;
  flex: 0 0 100%;
  max-width: 100%;
  padding-left: calc(var(--bs-gutter-x, 1rem) * 0.5);
  padding-right: calc(var(--bs-gutter-x, 1rem) * 0.5);
}

@media (min-width: 992px) {
  /* Direct row children only — hub #359 embed reuses `__main` inside hub `__main`. */
  .strateg-convert-wizard__row > .strateg-convert-wizard__main {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .strateg-convert-wizard__row > .strateg-convert-wizard__rail-col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    /* Convert SKU wizard + hub: «Профиль» not flush under breadcrumbs (#273). */
    margin-top: 2.25rem;
    padding-top: 0.35rem;
  }
  /* Operator hub: air between «Профиль» rail and container right edge. */
  .strateg-operator-hub-page .strateg-convert-wizard__rail-col {
    padding-right: 1.25rem;
  }
}

/* Operator hub: page lead sits in main column under H1, not full-width over profile (#259). */
.strateg-operator-hub-page .strateg2026-convert-masthead--in-main {
  /* Top air under breadcrumbs (was page-title padding before H1 moved in-column). */
  margin: 2.25rem 0 1rem;
  padding: 0.35rem 0 0;
  background: transparent;
}
/* Hub H1 (#362 WS1): inner pages 1.75rem/600 ink; front uses clamp/700. */
.strateg-operator-hub-page__title {
  margin: 0 0 0.35rem;
  padding: 0;
  font-size: var(--strateg-type-h1-inner-size);
  font-weight: var(--strateg-type-h1-inner-weight);
  line-height: 1.25;
  text-align: left;
  color: var(--strateg-color-ink);
  background: transparent;
}
.strateg-front-hub-page .strateg-operator-hub-page__title {
  font-size: var(--strateg-type-h1-front-size);
  font-weight: var(--strateg-type-h1-front-weight);
  color: var(--strateg-color-ink);
  text-wrap: balance;
}
/* #355/#362: plump darker heart (SVG, not squeezed ♥); magic shimmers now and then. */
.strateg-front-hub-page .strateg-front-hub-title__heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.22em;
  padding: 0;
  line-height: 1;
  vertical-align: -0.08em;
  filter: drop-shadow(0 0.06em 0.04em rgba(60, 8, 16, 0.32));
}
.strateg-front-hub-page .strateg-front-hub-title__heart-svg {
  display: block;
  width: 0.92em;
  height: 0.78em;
  overflow: visible;
}
.strateg-front-hub-page .strateg-front-hub-title__magic {
  display: inline;
  color: var(--strateg-color-ink);
  background-image: linear-gradient(
    90deg,
    var(--strateg-color-ink) 0%,
    var(--strateg-color-ink) 35%,
    #e11d48 42%,
    #f59e0b 48%,
    #22c55e 54%,
    #0ea5e9 60%,
    #8b5cf6 66%,
    var(--strateg-color-ink) 73%,
    var(--strateg-color-ink) 100%
  );
  background-size: 320% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  animation: strateg-front-hub-magic-shimmer 16s ease-in-out infinite;
}
@keyframes strateg-front-hub-magic-shimmer {
  0%, 62% {
    background-position: 0% 50%;
  }
  76%, 84% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.strateg-operator-hub-page .strateg2026-convert-masthead--in-main .strateg2026-convert-subtitle {
  margin: 0;
  max-width: none;
  text-align: left;
  font-size: var(--strateg-type-lead-size);
  font-weight: var(--strateg-type-lead-weight);
  color: var(--strateg-color-ink);
  background: transparent;
}
/* Space under breadcrumb: H1 is in-column (funnel/convert hub); hide duplicate page title. */
body.path-lk main .block-page-title-block,
body.path-lk .region-page-title .block-page-title-block,
body.path-convert main .block-page-title-block,
body.path-convert main .region-page-title .block-page-title-block,
body.strateg-operator-directories-page.path-products main .block-page-title-block,
body.strateg-operator-directories-page.path-products main .region-page-title .block-page-title-block,
body.strateg-operator-catalog-page.path-products main .block-page-title-block,
body.strateg-operator-catalog-page.path-products main .region-page-title .block-page-title-block {
  display: none !important;
}

@media (min-width: 992px) {
  .strateg-convert-wizard__rail {
    position: sticky;
    /* Below Drupal admin toolbar (Drupal.displace → --drupal-displace-offset-top). */
    top: calc(0.75rem + var(--drupal-displace-offset-top, 0px));
    z-index: 120;
  }
}

.strateg-convert-side-rail__card {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.strateg-convert-side-rail__card-header {
  /* «Выйти» pinned to the right of the «Профиль» card title — DEC-2026-05-29-032 rev4. */
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.strateg-convert-side-rail__card-header .strateg-convert-side-rail__card-title {
  margin: 0;
}

.strateg-convert-side-rail__card-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  margin: 0 0 0.5rem;
}

.strateg-convert-side-rail__logout {
  font-size: 0.78rem;
  color: #6c757d;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  white-space: nowrap;
}
.strateg-convert-side-rail__logout:hover,
.strateg-convert-side-rail__logout:focus {
  color: #1f6feb;
  border-bottom-color: currentColor;
}

.strateg-convert-side-rail__profile-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.strateg-convert-side-rail__profile-meta {
  font-size: 0.82rem;
  color: #6c757d;
  margin: 0 0 0.5rem;
}

.strateg-convert-side-rail__balance {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #f3eeff 0%, #eef6ff 100%);
  border: 1px solid #d8d0f5;
}

.strateg-convert-side-rail__balance-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5c6b8a;
}

.strateg-convert-side-rail__balance-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #4b3f8f;
}

.strateg-convert-side-rail__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c4dff 0%, #5a8dee 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.strateg-convert-side-rail__quota-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #7c4dff;
  line-height: 1.1;
}

.strateg-convert-side-rail__explore-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.strateg-convert-side-rail__explore-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  text-decoration: none;
  color: inherit;
  background: #fafbfc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.strateg-convert-side-rail__explore-link:hover {
  border-color: #7c4dff;
  background: #f6f2ff;
  text-decoration: none;
  color: inherit;
}

.strateg-convert-side-rail__explore-icon {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7c4dff;
}

.strateg-convert-side-rail__explore-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.strateg-convert-side-rail__explore-text span {
  display: block;
  font-size: 0.72rem;
  color: #6c757d;
  line-height: 1.25;
}

.strateg-convert-side-rail__ops-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.strateg-convert-side-rail__ops-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  text-decoration: none;
  color: inherit;
  background: #fafbfc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.strateg-convert-side-rail__ops-link:hover {
  border-color: #0d6efd;
  background: #eef5ff;
  text-decoration: none;
  color: inherit;
}

.strateg-convert-side-rail__ops-link--active {
  border-color: #0d6efd;
  background: #eef5ff;
  /* Inherit link radius; avoid sharp UA/selection chrome (#262). */
  border-radius: 0.4rem;
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.15);
  outline: none;
}

.strateg-convert-side-rail__ops-link:focus,
.strateg-convert-side-rail__ops-link:focus-visible {
  outline: none;
  border-radius: 0.4rem;
}

.strateg-convert-side-rail__explore-link:focus,
.strateg-convert-side-rail__explore-link:focus-visible {
  outline: none;
  border-radius: 0.4rem;
}

.strateg-convert-side-rail__ops-icon {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0d6efd;
}

.strateg-convert-side-rail__ops-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.strateg-convert-side-rail__ops-text span {
  display: block;
  font-size: 0.72rem;
  color: #6c757d;
  line-height: 1.25;
}

@media (max-width: 991.98px) {
  .strateg-convert-wizard__rail-col {
    order: 2;
  }
  .strateg-convert-wizard__main {
    order: 1;
  }
  .strateg-convert-side-rail__profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
  }
}

.strateg-convert-wizard__step {
  margin-bottom: 0.75rem;
}

.strateg-convert-step {
  padding: 1rem 1.25rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
  background-color: var(--bs-body-bg, #fff);
}

.strateg-convert-step--viewer {
  min-height: 12rem;
}

.strateg-convert-source__preview-panel {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
}

.strateg-convert-source__preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.strateg-convert-source__preview-img {
  max-height: 320px;
  width: 100%;
  object-fit: contain;
  background: #fff;
}

.strateg-convert-source__stock-pick {
  width: 100%;
  text-align: start;
}

.strateg-convert-source__stock-card-img {
  max-height: 140px;
  width: 100%;
  object-fit: contain;
  background: #fff;
}

.strateg-convert-source__stock-card-pick:hover,
.strateg-convert-source__stock-card-pick:focus {
  text-decoration: none;
}

.nav-tabs-sm .nav-link {
  font-size: 0.9rem;
  padding: 0.35rem 0.65rem;
}

/* Pipeline stepper sticks to the top of the page (rev I) — пользователь
 * всегда видит, где находится, даже на длинном шаге конвертации. */
.strateg-convert-stepper {
  position: sticky;
  top: var(--drupal-displace-offset-top, 0px);
  z-index: 110;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #e9f2ff 0%, #f5fff5 100%);
  border: 1px solid #cfe2ff;
  border-radius: 0.5rem;
  counter-reset: scw-step;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.06);
}

.strateg-convert-stepper__item {
  flex: 1 1 8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.6);
  color: #6c757d;
  position: relative;
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.strateg-convert-stepper__item::before {
  counter-increment: scw-step;
  content: counter(scw-step);
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #adb5bd;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.strateg-convert-stepper__item--active {
  background: #fff;
  color: #0d6efd;
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.strateg-convert-stepper__item--active::before {
  background: #0d6efd;
}

.strateg-convert-stepper__item--done {
  background: #d1e7dd;
  color: #0f5132;
}

.strateg-convert-stepper__item--done::before {
  background: #198754;
  content: '✓';
}

.strateg-convert-stepper__title {
  font-weight: 600;
  line-height: 1.1;
}

.strateg-convert-stepper__hint {
  font-size: 0.7rem;
  opacity: 0.85;
  line-height: 1.1;
}

/* T2i progress bar — full Bootstrap progress height (1rem) so the %-label fits
   inside the bar, matching step-3 progress (UX 2026-05-27). */
.strateg-convert-source__t2i-progress .progress {
  height: 1rem;
  font-size: 0.75rem;
}

.strateg-convert-source__t2i-progress .progress-bar {
  overflow: visible;
  white-space: nowrap;
}

.strateg-convert-source__t2i-progress [data-strateg-convert-t2i-progress-bar-label] {
  padding: 0 0.4rem;
}

/* Quality auto-check badge under the preview image (UX rev 2026-05-24). */
.strateg-convert-source__quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid transparent;
  line-height: 1.2;
}

.strateg-convert-quality-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.strateg-convert-source__quality-badge.strateg-convert-quality-badge--pass {
  background: #d1e7dd;
  color: #0f5132;
  border-color: #badbcc;
}
.strateg-convert-source__quality-badge.strateg-convert-quality-badge--pass .strateg-convert-quality-badge__icon {
  background: #198754;
}

.strateg-convert-source__quality-badge.strateg-convert-quality-badge--warn {
  background: #fff3cd;
  color: #664d03;
  border-color: #ffecb5;
}
.strateg-convert-source__quality-badge.strateg-convert-quality-badge--warn .strateg-convert-quality-badge__icon {
  background: #fd7e14;
}

.strateg-convert-source__quality-badge.strateg-convert-quality-badge--fail {
  background: #f8d7da;
  color: #842029;
  border-color: #f5c2c7;
}
.strateg-convert-source__quality-badge.strateg-convert-quality-badge--fail .strateg-convert-quality-badge__icon {
  background: #dc3545;
}

.strateg-convert-source__quality-badge.strateg-convert-quality-badge--checking {
  background: #e7f1ff;
  color: #084298;
  border-color: #cfe2ff;
}
.strateg-convert-source__quality-badge.strateg-convert-quality-badge--checking .strateg-convert-quality-badge__icon {
  background: #0d6efd;
}

/* Legacy «Quality» SDC section is collapsed visually — the badge under the preview
   replaces it. Keep the markup in the DOM for backward-compat selectors + tests. */
.strateg-convert-step--quality-collapsed {
  display: none;
}

/* Friendly progress line (no monospace, no JSON). */
.strateg-convert-step--progress [data-strateg-convert-progress-status] {
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  white-space: normal;
  color: #212529;
  margin: 0 0 0.5rem;
}

/* UX 2026-05-30: while conversion runs, the status line under the bar gently
   shifts color so the user sees activity even when the bar is still near 4%. */
@keyframes strateg-convert-progress-status-color {
  0%,
  100% {
    color: #1a5fb4;
  }
  50% {
    color: #6f42c1;
  }
}

@keyframes strateg-convert-progress-status-bg {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes strateg-convert-progress-status-sheen {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.strateg-convert-step--progress-active [data-strateg-convert-progress-status]:not([hidden]) {
  font-weight: 500;
  border-color: rgba(13, 110, 253, 0.45);
  background: linear-gradient(120deg, #eef5ff 0%, #f3eeff 45%, #eef5ff 100%);
  background-size: 220% 220%;
  animation:
    strateg-convert-progress-status-color 3.2s ease-in-out infinite,
    strateg-convert-progress-status-bg 5s ease-in-out infinite;
}

.strateg-convert-step--progress-active [data-strateg-convert-progress-status]:not([hidden])::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 62%
  );
  background-size: 260% 100%;
  animation: strateg-convert-progress-status-sheen 2.8s ease-in-out infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .strateg-convert-step--progress-active [data-strateg-convert-progress-status]:not([hidden]) {
    animation: none;
    color: #0d6efd;
    font-weight: 600;
  }
  .strateg-convert-step--progress-active [data-strateg-convert-progress-status]:not([hidden])::after {
    display: none;
  }
  .strateg-front-hub-page .strateg-front-hub-title__magic {
    animation: none;
    background-image: none;
    -webkit-text-fill-color: var(--strateg-color-ink);
    color: var(--strateg-color-ink);
  }
}

/* «Далее» / «Назад» bar at the bottom of each step (UX rev 2026-05-24-b). */
.strateg-convert-step__nav {
  border-top: 1px dashed var(--bs-border-color, #dee2e6);
  padding-top: 0.6rem;
}

/* Locked previous step — visually present (so the user sees context) but
   non-interactive until they click the «Назад» button on the next step. */
.strateg-convert-step--locked {
  opacity: 0.55;
  pointer-events: none;
  filter: saturate(0.6);
  position: relative;
}
.strateg-convert-step--locked::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0) 18px,
    rgba(0, 0, 0, 0.02) 18px,
    rgba(0, 0, 0, 0.02) 36px
  );
  pointer-events: none;
  border-radius: 0.375rem;
}

/* Caption preview panel. */
.strateg-convert-caption__preview-panel {
  min-height: 220px;
}
.strateg-convert-caption__preview-img {
  max-height: 380px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* Partner pickup cards on step «Печать». */
.strateg-convert-pickup-card {
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: #fff;
}
.strateg-convert-pickup-card:hover {
  border-color: var(--bs-primary, #0d6efd) !important;
  background: #f6f9ff;
}
.strateg-convert-pickup-card input[type='radio']:checked + div {
  font-weight: 500;
}
.strateg-convert-pickup-card:has(input[type='radio']:checked) {
  border-color: var(--bs-primary, #0d6efd) !important;
  background: #eef5ff;
  box-shadow: 0 0 0 1px var(--bs-primary, #0d6efd) inset;
}

/* UX rev 2026-05-24-e: палитра печати (6× Bambu PLA Basic) + квантованное превью под caption */
.strateg-convert-caption__palette {
  border-top: 1px dashed var(--bs-border-color, #dee2e6);
  padding-top: 0.5rem;
}
.strateg-convert-caption__swatches {
  margin-bottom: 0.25rem;
}
.strateg-convert-caption__swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 999px;
  background: #fff;
  font-size: 0.72rem;
  line-height: 1;
}
.strateg-convert-caption__swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
}
.strateg-convert-caption__swatch-label {
  color: var(--bs-body-color, #212529);
}
.strateg-convert-caption__pipeline-img {
  max-width: 100%;
  height: auto;
}

/* UX rev 2026-05-24-f: серый плейсхолдер на caption и progress (как пустая
   рамка на step 1 source preview), палитра переехала в левую колонку. */
.strateg-convert-caption__preview-panel {
  min-height: 14rem;
  display: flex;
  flex-direction: column;
}
.strateg-convert-caption__placeholder,
.strateg-convert-progress__placeholder {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.strateg-convert-caption__placeholder-box,
.strateg-convert-progress__placeholder-box {
  width: 100%;
  min-height: 9rem;
  border-radius: 0.25rem;
  border: 1px dashed rgba(0,0,0,0.15);
  background: repeating-linear-gradient(
    45deg,
    #e9ecef 0 8px,
    #f1f3f5 8px 16px
  );
}
.strateg-convert-progress__preview-panel {
  min-height: 14rem;
  display: flex;
  flex-direction: column;
}
.strateg-convert-caption__palette {
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: 0.375rem;
  padding: 0.5rem 0.65rem;
  background: #fafafa;
}
.strateg-convert-caption__palette-note {
  line-height: 1.35;
}
.strateg-convert-progress__bar .progress {
  height: 1.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.strateg-convert-step--progress-active .strateg-convert-progress__bar .progress {
  background-color: #dce8f8;
  box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.22);
}
.strateg-convert-step--progress-active .strateg-convert-progress__bar .progress-bar {
  box-shadow: 0 0 10px rgba(13, 110, 253, 0.35);
}
.strateg-convert-progress__bar .progress-bar {
  transition: width 0.3s ease;
}
.strateg-convert-progress__viewer-canvas-wrap {
  min-height: 12rem;
  background: #353540;
}
.strateg-convert-progress__viewer-canvas-wrap canvas {
  touch-action: none;
}
.strateg-convert-step--viewer-shell {
  display: none;
}

/* UX rev J (2026-05-24): bottom nav of step 3 — back link слева, скачать ссылкой,
   forward-кнопка справа. */
.strateg-convert-back-link {
  color: var(--bs-secondary, #6c757d);
  text-decoration: underline;
  background: none;
  border: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.strateg-convert-back-link:hover,
.strateg-convert-back-link:focus {
  color: var(--bs-primary, #0d6efd);
  text-decoration: underline;
}
.strateg-convert-download-link {
  color: var(--bs-primary, #0d6efd);
  text-decoration: underline;
  font-size: 0.95rem;
  line-height: 1.4;
}
.strateg-convert-download-link:hover,
.strateg-convert-download-link:focus {
  color: var(--bs-primary, #0d6efd);
  text-decoration: underline;
  filter: brightness(0.85);
}

/* Self-print card on step 4 (Распечатаю сам). Visually distinct from partner cards. */
.strateg-convert-pickup-card--self {
  border-style: dashed !important;
  background: #fdfdf5;
}
.strateg-convert-pickup-card--self:hover {
  border-color: var(--bs-warning, #ffc107) !important;
  background: #fff8e1;
}
.strateg-convert-pickup-card--self:has(input[type='radio']:checked) {
  border-color: var(--bs-warning, #ffc107) !important;
  background: #fff3cd;
  box-shadow: 0 0 0 1px var(--bs-warning, #ffc107) inset;
}

/* UX rev 2026-05-25: step 3 3D viewer howto (parity with convert-strateg lab-step3-howto). */
.strateg-convert-progress__howto {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c9d2f0;
  border-radius: 8px;
  background: #f8f9ff;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #333;
}
.strateg-convert-progress__howto-fig {
  flex: 0 0 auto;
  width: 5.5rem;
  height: 4.25rem;
}
.strateg-convert-progress__howto-fig svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* UX rev 2026-05-25: palette modal buffer→print mapping (parity with lab). */
.strateg-convert-buffer-group {
  margin: 0.45rem 0 0.55rem 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fafafa;
}
.strateg-convert-buffer-group__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #222;
}
.strateg-convert-buffer-group__head.strateg-convert-buffer-group__head--drop-active {
  outline: 2px dashed var(--bs-primary, #0d6efd);
  outline-offset: 2px;
}
.strateg-convert-buffer-dot {
  display: inline-block;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.strateg-convert-buffer-dot--dst {
  width: 1.55rem;
  height: 1.55rem;
}
.strateg-convert-buffer-dot--src {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  cursor: grab;
}
.strateg-convert-buffer-dot--src.strateg-convert-buffer-bucket--selected {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 1px;
}
.strateg-convert-buffer-dot--src.strateg-convert-buffer-bucket--override-manual {
  box-shadow: 0 0 0 2px var(--bs-warning, #ffc107);
}
.strateg-convert-buffer-group__sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.strateg-convert-buffer-group__meta {
  font-weight: 600;
}
.strateg-convert-buffer-group__sum {
  font-size: 0.68rem;
  font-weight: 500;
  color: #555;
}
.strateg-convert-palette-modal__swatches .strateg-convert-caption__swatch {
  font-size: 0.78rem;
}

.strateg-convert-delivery-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.strateg-convert-delivery-card:hover {
  border-color: var(--bs-primary, #0d6efd) !important;
}
.strateg-convert-delivery-card--selected {
  border-color: var(--bs-success, #198754) !important;
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.25);
}
.strateg-convert-delivery-card--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.strateg-convert-delivery-card__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

/* UX rev 2026-05-30: карточка оформленного заказа (шаг 5) — заказчик,
   печатающий партнёр, способ + стоимость доставки, итог в подвале. */
.strateg-order-summary {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  background: #f8fbff;
}
.strateg-order-summary__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  padding-bottom: 0.4rem;
}
.strateg-order-summary__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}
.strateg-order-summary__state {
  margin: 0;
  font-size: 0.85rem;
  color: #495057;
}
.strateg-order-summary__section-title {
  margin: 0.75rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6c757d;
  font-weight: 600;
  font-size: 0.78rem;
}
.strateg-order-summary__meta {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.2rem 0.6rem;
  margin: 0;
}
.strateg-order-summary__meta > div {
  display: contents;
}
.strateg-order-summary__meta dt {
  color: #6c757d;
  font-weight: 500;
  font-size: 0.85rem;
}
.strateg-order-summary__meta dd {
  margin: 0;
  font-size: 0.9rem;
  color: #212529;
}
.strateg-order-summary__lines {
  margin-top: 0.75rem;
}
.strateg-order-summary__lines-table {
  width: 100%;
  font-size: 0.9rem;
  border-collapse: collapse;
}
.strateg-order-summary__lines-table th,
.strateg-order-summary__lines-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  text-align: left;
}
.strateg-order-summary__lines-table th {
  color: #6c757d;
  font-weight: 500;
}
.strateg-order-summary__footer {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 2px solid #198754;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.05rem;
}
.strateg-order-summary__total-label {
  color: #495057;
  font-weight: 500;
}
.strateg-order-summary__total-value {
  color: #0f5132;
  font-size: 1.2rem;
  font-weight: 700;
}

/* «Завершить» state for step 5 — back-link locked. */
[data-strateg-convert-delivery-back][disabled],
[data-strateg-convert-delivery-back].disabled {
  color: #adb5bd !important;
  cursor: not-allowed;
  text-decoration: none;
}

/* UX rev 2026-05-30 (kanban #130): per-field `×` clear inside caption inputs. */
.strateg-convert-caption__input-wrap {
  position: relative;
}
.strateg-convert-caption__input-wrap .form-control {
  padding-right: 2rem;
}
.strateg-convert-caption__clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0.55;
}
.strateg-convert-caption__clear:hover {
  opacity: 1;
}

/* UX rev 2026-05-30 (kanban #130): stock-card label centered under thumbnail. */
.strateg-convert-source__stock-card-pick {
  display: block;
}
.strateg-convert-source__stock-card-img {
  max-height: 120px;
  object-fit: contain;
}
