.unified-catalog-view {
  display: grid;
  gap: 20px;
}

.unified-catalog-toolbar,
.unified-catalog-panel-head,
.unified-section-head,
.unified-submit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.unified-catalog-toolbar {
  min-height: 76px;
  padding: 16px 20px;
}

.unified-catalog-toolbar > div {
  display: grid;
  flex: 1;
  gap: 3px;
}

.unified-catalog-toolbar strong {
  color: #111827;
  font-size: 18px;
}

.unified-catalog-toolbar small,
.unified-section-head p,
.unified-catalog-panel-head p,
.unified-submit-card p,
.unified-safety p {
  margin: 0;
  color: #667085;
  line-height: 1.55;
}

.unified-back {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #dfe3eb;
  border-radius: 11px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.unified-back:hover {
  border-color: #b9c2d2;
  background: #f8fafc;
}

.unified-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6941c6;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.unified-form {
  display: grid;
  gap: 20px;
}

.unified-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr);
  gap: 30px;
  align-items: center;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 10%, rgba(124, 92, 255, .13), transparent 36%),
    linear-gradient(135deg, #fff, #fafaff);
}

.unified-hero-card h2,
.unified-section h3,
.unified-preview h3,
.unified-result h3,
.unified-catalog-panel h3 {
  margin: 4px 0 8px;
  color: #101828;
  letter-spacing: -.025em;
}

.unified-hero-card h2 {
  font-size: clamp(27px, 3vw, 38px);
}

.unified-hero-card p {
  max-width: 660px;
  margin: 0;
  color: #667085;
  line-height: 1.65;
}

.unified-marketplaces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.unified-marketplaces label {
  position: relative;
  cursor: pointer;
}

.unified-marketplaces input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.unified-marketplaces label > span {
  display: grid;
  min-height: 142px;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-content: center;
  padding: 18px;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.unified-marketplaces label:hover > span {
  transform: translateY(-1px);
  border-color: #c7cdd8;
}

.unified-marketplaces input:checked + span {
  border-color: #8b75ff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .12), 0 14px 34px rgba(16, 24, 40, .09);
}

.unified-marketplaces input:focus-visible + span {
  outline: 3px solid rgba(124, 92, 255, .22);
  outline-offset: 3px;
}

.unified-marketplaces strong {
  align-self: end;
  color: #101828;
  font-size: 18px;
}

.unified-marketplaces small {
  color: #667085;
  font-size: 12px;
}

.market-logo {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: 1 / span 2;
  place-items: center;
  align-self: center;
  border-radius: 13px;
  font-size: 18px;
  font-weight: 900;
}

.market-logo.kaspi {
  background: #ef3124;
  color: #fff;
}

.market-logo.ozon {
  background: #005bff;
  color: #fff;
}

.unified-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.unified-main-column,
.unified-side-column {
  display: grid;
  gap: 20px;
}

.unified-side-column {
  position: sticky;
  top: 18px;
}

.unified-section,
.unified-preview,
.unified-result,
.unified-safety,
.unified-submit-card,
.unified-catalog-panel {
  padding: 24px;
}

.unified-section-head {
  align-items: flex-start;
  margin-bottom: 22px;
}

.unified-section-head > div,
.unified-catalog-panel-head > div:first-child {
  min-width: 0;
}

.unified-section-head h3,
.unified-catalog-panel h3 {
  font-size: 23px;
}

.unified-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.unified-grid label,
.unified-dimensions label,
.unified-field,
.unified-vat-row label,
.unified-attribute label {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.unified-grid .full,
.unified-field.full {
  grid-column: 1 / -1;
}

.unified-grid label > span,
.unified-dimensions label > span,
.unified-field > span,
.unified-vat-row label > span,
.unified-attribute label > span {
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.unified-grid input,
.unified-grid textarea,
.unified-grid select,
.unified-dimensions input,
.unified-field input,
.unified-vat-row select,
.unified-attribute input,
.unified-attribute select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d0d5dd;
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: #101828;
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.unified-grid textarea {
  min-height: 118px;
  resize: vertical;
}

.unified-grid input:focus,
.unified-grid textarea:focus,
.unified-grid select:focus,
.unified-dimensions input:focus,
.unified-field input:focus,
.unified-vat-row select:focus,
.unified-attribute input:focus,
.unified-attribute select:focus {
  border-color: #7f6af4;
  box-shadow: 0 0 0 4px rgba(127, 106, 244, .1);
}

.unified-grid label > small,
.unified-attribute label > small {
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.45;
}

.unified-dimensions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.channel-section {
  border-top: 3px solid transparent;
}

.kaspi-channel {
  border-top-color: #ef3124;
}

.ozon-channel {
  border-top-color: #005bff;
}

.unified-picker {
  position: relative;
}

.unified-picker-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: 330px;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(16, 24, 40, .16);
}

.unified-picker-results button {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #101828;
  cursor: pointer;
  text-align: left;
}

.unified-picker-results button:hover,
.unified-picker-results button:focus-visible {
  background: #f5f3ff;
  outline: none;
}

.unified-picker-results strong {
  font-size: 13px;
}

.unified-picker-results small {
  color: #98a2b3;
  font-size: 11px;
}

.unified-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #d9d6fe;
  border-radius: 12px;
  background: #f7f5ff;
}

.unified-selected span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.unified-selected strong {
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unified-selected small {
  color: #7f56d9;
  font-size: 11px;
  font-weight: 800;
}

.unified-selected button,
.unified-attribute button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: #475467;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.unified-vat-row {
  display: flex;
  justify-content: flex-end;
  margin: 14px 0 6px;
}

.unified-vat-row label {
  width: min(260px, 100%);
}

.unified-state {
  padding: 18px;
  border: 1px dashed #d0d5dd;
  border-radius: 12px;
  background: #f9fafb;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.unified-attributes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}

.unified-attribute {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fcfcfd;
}

.unified-attribute label > div {
  display: flex;
  min-width: 0;
  gap: 7px;
}

.unified-attribute label > div input,
.unified-attribute label > div select {
  min-width: 0;
  flex: 1;
}

.unified-attribute select[multiple] {
  min-height: 112px;
}

.unified-submit-card {
  align-items: center;
  border: 1px solid #d9d6fe;
  background: linear-gradient(135deg, #fff, #f8f6ff);
}

.unified-submit-card > div {
  flex: 1;
}

.unified-submit-card .primary-button {
  min-width: 230px;
}

.unified-message {
  min-height: 20px;
  margin: 0 0 5px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.unified-message.success {
  color: #067647;
}

.unified-message.warning {
  color: #b54708;
}

.unified-message.error {
  color: #b42318;
}

.unified-preview,
.unified-result,
.unified-safety {
  overflow: hidden;
}

.unified-preview-image {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%),
    #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.unified-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.unified-preview-image span {
  color: #98a2b3;
  font-size: 13px;
}

#unifiedPreviewRows {
  display: grid;
  gap: 0;
}

#unifiedPreviewRows > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eaecf0;
}

#unifiedPreviewRows > div:last-child {
  border-bottom: 0;
}

#unifiedPreviewRows span {
  color: #98a2b3;
  font-size: 12px;
}

#unifiedPreviewRows strong {
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 12px;
  text-align: right;
}

#unifiedResultRows {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.unified-result-row {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e4e7ec;
  border-radius: 13px;
  background: #fff;
}

.unified-result-row.accepted {
  border-color: #abefc6;
  background: #f6fef9;
}

.unified-result-row.failed {
  border-color: #fecdca;
  background: #fffbfa;
}

.unified-result-row > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unified-result-row .market-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 14px;
}

.unified-result-row span {
  display: grid;
}

.unified-result-row strong {
  color: #101828;
  font-size: 13px;
}

.unified-result-row small,
.unified-result-row p,
.unified-result-row em {
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.unified-result-row p {
  margin: 0;
}

.unified-result-row em {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  font-style: normal;
  font-weight: 800;
}

.unified-result-row.accepted em {
  background: #dcfae6;
  color: #067647;
}

.unified-result-row.failed em {
  background: #fee4e2;
  color: #b42318;
}

.unified-safety {
  border: 1px solid #fedf89;
  background: #fffaeb;
}

.unified-safety strong {
  display: block;
  margin-bottom: 6px;
  color: #93370d;
}

.unified-catalog-panel {
  margin: 18px 0;
}

.unified-catalog-panel-head {
  align-items: flex-start;
}

.unified-catalog-panel-head > div:last-child {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.unified-catalog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 14px;
}

.unified-catalog-stats span {
  padding: 7px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #f9fafb;
  color: #667085;
  font-size: 12px;
}

.unified-catalog-stats b {
  color: #101828;
}

.unified-catalog-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.unified-catalog-table th,
.unified-catalog-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #eaecf0;
  color: #475467;
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.unified-catalog-table th {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.unified-product-cell {
  display: grid;
  max-width: 360px;
  gap: 3px;
}

.unified-product-cell strong {
  color: #101828;
  font-size: 13px;
}

.unified-product-cell small {
  color: #98a2b3;
  font-size: 11px;
}

.unified-channel-badge {
  display: inline-grid;
  min-width: 96px;
  gap: 1px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 850;
}

.unified-channel-badge small {
  max-width: 160px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unified-channel-badge.kaspi {
  background: #fff1f0;
  color: #c43227;
}

.unified-channel-badge.ozon {
  background: #eef4ff;
  color: #004eeb;
}

.unified-channel-badge.empty {
  background: #f2f4f7;
  color: #98a2b3;
}

@media (max-width: 1180px) {
  .unified-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .unified-attributes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .unified-hero-card,
  .unified-layout {
    grid-template-columns: 1fr;
  }

  .unified-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unified-safety {
    grid-column: 1 / -1;
  }

  .unified-preview-image {
    max-height: 330px;
  }
}

@media (max-width: 720px) {
  .unified-catalog-toolbar,
  .unified-catalog-panel-head,
  .unified-section-head,
  .unified-submit-card {
    align-items: stretch;
    flex-direction: column;
  }

  .unified-catalog-toolbar {
    gap: 12px;
  }

  .unified-chip {
    align-self: flex-start;
  }

  .unified-hero-card,
  .unified-section,
  .unified-preview,
  .unified-result,
  .unified-safety,
  .unified-submit-card,
  .unified-catalog-panel {
    padding: 18px;
  }

  .unified-marketplaces,
  .unified-grid,
  .unified-dimensions,
  .unified-side-column {
    grid-template-columns: 1fr;
  }

  .unified-marketplaces label > span {
    min-height: 100px;
  }

  .unified-grid .full,
  .unified-field.full,
  .unified-safety {
    grid-column: auto;
  }

  .unified-submit-card .primary-button,
  .unified-catalog-panel-head > div:last-child,
  .unified-catalog-panel-head button {
    width: 100%;
  }

  .unified-catalog-panel-head > div:last-child {
    display: grid;
    grid-template-columns: 1fr;
  }

  .unified-attribute label > div {
    align-items: stretch;
    flex-direction: column;
  }

  .unified-selected {
    align-items: flex-start;
  }

  .unified-vat-row {
    justify-content: stretch;
  }

  .unified-vat-row label {
    width: 100%;
  }
}
