.price-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.price-method-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 118px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.price-method-card span,
.price-method-card small {
  color: var(--muted);
  font-size: .76rem;
}

.price-method-card strong {
  font-size: 1rem;
}

.price-method-card form {
  margin-top: auto;
}

.price-method-warning {
  background: #fff8e8;
}

.price-formula-note {
  padding: 13px 16px;
  margin-bottom: 12px;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  background: #f1edff;
  color: #514b6b;
  font-size: .82rem;
}

.price-search {
  display: grid;
  grid-template-columns: minmax(260px, 520px) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.price-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: .72rem;
}

.price-table .price-col-product { width: 22%; }
.price-table .price-col-seller { width: 7%; }
.price-table .price-col-discount { width: 5%; }
.price-table .price-col-wb { width: 6.5%; }
.price-table .price-col-spp { width: 6%; }
.price-table .price-col-buyer { width: 8.5%; }
.price-table .price-col-ozon-buyer { width: 8.5%; }
.price-table .price-col-wb-cost { width: 8%; }
.price-table .price-col-cost { width: 7%; }
.price-table .price-col-revenue { width: 6%; }
.price-table .price-col-advertising { width: 7.5%; }
.price-table .price-col-payout { width: 6%; }

.price-table th,
.price-table td {
  padding: 7px 5px;
  overflow-wrap: anywhere;
}

.price-table thead th {
  vertical-align: bottom;
  font-size: .61rem;
  line-height: 1.15;
  letter-spacing: .025em;
}

.price-table thead th.num {
  white-space: normal;
}

.price-table thead th small {
  margin-top: 2px;
  font-size: .55rem;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
}

.price-table td.num > strong {
  display: block;
  font-size: .72rem;
  white-space: nowrap;
}

.price-input-cell input {
  width: 100%;
  min-width: 0;
  margin-left: auto;
  padding: 4px 5px;
  font-size: .72rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-input-cell .price-seller-input {
  max-width: 82px;
}

.price-input-cell .price-discount-input {
  max-width: 50px;
}

.price-input-cell small,
.price-table td.num small {
  margin-top: 3px;
  font-size: .59rem;
  line-height: 1.2;
  white-space: normal;
}

.price-draft-label {
  display: block;
  min-height: 1.1em;
  margin: 4px 0 0 66px;
  color: var(--violet) !important;
  font-size: .6rem;
  line-height: 1.2;
}

.price-table .product-identity {
  min-width: 0;
  gap: 6px;
}

.price-table .product-identity-image {
  flex-basis: 36px;
  width: 36px;
  height: 44px;
  border-radius: 8px;
}

.price-table .product-seller-article {
  font-size: .72rem;
}

.price-table .product-one-c-name,
.price-table .product-wb-title {
  font-size: .61rem;
  line-height: 1.18;
}

.price-table .product-wb-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.price-table .product-wb-code {
  font-size: .57rem;
}

.price-product-select {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.price-product-select .form-check-input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 14px;
}

.price-report-period {
  font-variant-numeric: tabular-nums;
}

.price-marketplace-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #c7c3d8;
  text-underline-offset: 2px;
}

.ozon-action-badge {
  color: #136c3c !important;
  font-weight: 700;
}

.price-publication-actions,
.price-publication-status,
.publication-confirm-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.price-publication-actions {
  justify-content: space-between;
}

.price-publication-status,
.publication-confirm-form {
  align-items: flex-start;
  flex-direction: column;
}

.price-publication-status span {
  color: var(--muted);
  font-size: .82rem;
}

.publication-preview-table {
  min-width: 1000px;
}

.publication-confirm-form {
  max-width: 620px;
  margin-top: 14px;
}

.publication-confirm-form .form-control {
  max-width: 280px;
}

@media (max-width: 900px) {
  .price-method-grid {
    grid-template-columns: 1fr;
  }

  .price-method-card {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .price-search {
    grid-template-columns: 1fr;
  }

  .price-table {
    min-width: 0;
  }

  .price-table td:nth-child(2)::before { content: "Ваша цена, ₽"; }
  .price-table td:nth-child(3)::before { content: "Скидка, %"; }
  .price-table td:nth-child(4)::before { content: "Цена для WB, ₽"; }
  .price-table td:nth-child(5)::before { content: "СПП WB, %"; }
  .price-table td:nth-child(6)::before { content: "Цена покупателя WB, ₽"; }
  .price-table td:nth-child(7)::before { content: "Цена Ozon API, ₽"; }
  .price-table td:nth-child(8)::before { content: "Расходы WB / шт."; }
  .price-table td:nth-child(9)::before { content: "Наша СС / шт."; }
  .price-table td:nth-child(10)::before { content: "Выручка / шт."; }
  .price-table td:nth-child(11)::before { content: "Реклама / шт."; }
  .price-table td:nth-child(12)::before { content: "К перечислению / шт."; }

  .price-input-cell .input-group {
    width: 160px;
    margin-left: auto;
  }

  .price-input-cell .price-seller-input,
  .price-input-cell .price-discount-input {
    width: 110px;
    max-width: none;
    margin-left: auto;
  }

  .price-publication-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
