.pricing-shell {
  padding: 24px;
}

.pricing-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pricing-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #e8edf5;
}

.pricing-status {
  font-size: 13px;
  color: #8fa0b8;
}

.pricing-status-ok {
  color: #5de8a0;
}

.pricing-status-err {
  color: #f07070;
}

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
}

.pricing-card {
  background: #0c1e3a;
  border: 1px solid #1e3560;
  border-radius: 8px;
  padding: 20px;
}

.pricing-card h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #c4d0e0;
}

/* Внутренний скролл: на невысоких экранах сетка до 500 не растягивает страницу,
   а скроллится; шапка остаётся видимой (sticky). На высоких — влезает целиком. */
.pricing-table-wrap {
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pricing-table th {
  text-align: left;
  padding: 8px 10px;
  color: #8fa0b8;
  font-weight: 500;
  border-bottom: 1px solid #1e3560;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: #0c1e3a;
  z-index: 1;
}

.pricing-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #142040;
  color: #c4d0e0;
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

.pricing-label {
  color: #e8edf5;
  font-weight: 500;
  white-space: nowrap;
}

.pricing-input {
  width: 100px;
  background: #0e243f;
  border: 1px solid #2a4570;
  border-radius: 4px;
  color: #e8edf5;
  font-size: 13px;
  padding: 5px 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pricing-input:focus {
  border-color: #3d7fd4;
}

.pricing-input.is-empty {
  border-color: #f07070;
  box-shadow: 0 0 0 2px rgba(240, 112, 112, 0.18);
}

.pricing-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.pricing-save-btn {
  border: none;
  border-radius: 6px;
  padding: 9px 28px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  color: #ffffff;
  min-width: 140px;
}

.pricing-save-btn.is-idle {
  background: #2a4570;
  color: #6a8aaa;
  cursor: default;
}

.pricing-save-btn.is-dirty {
  background: #2ea65a;
}

.pricing-save-btn.is-dirty:hover {
  background: #258a4b;
}

.pricing-save-btn.is-empty {
  background: #c14242;
  color: #ffffff;
  cursor: not-allowed;
}

.pricing-save-btn.is-saved {
  background: #2a4570;
  color: #5de8a0;
  cursor: default;
}

.pricing-right {
  position: sticky;
  top: 20px;
  height: calc(100vh - 130px);
}

.pricing-audit-card {
  background: #0c1e3a;
  border: 1px solid #1e3560;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pricing-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

.pricing-audit-card h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #c4d0e0;
}

.pricing-audit-clear {
  background: transparent;
  border: 1px solid #2a4570;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  color: #8fa0b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pricing-audit-clear:hover {
  color: #f07070;
  border-color: #f07070;
  background: rgba(240, 112, 112, 0.08);
}

.pricing-audit-wrap {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #2a4570;
  border-radius: 6px;
  background: #0a1a33;
}

.pricing-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.pricing-audit-table thead th {
  position: sticky;
  top: 0;
  background: #112a4f;
  text-align: left;
  padding: 9px 12px;
  color: #c4d0e0;
  font-weight: 600;
  border-bottom: 1px solid #2a4570;
  border-right: 1px solid #1e3560;
  z-index: 1;
}

.pricing-audit-table thead th:last-child {
  border-right: none;
}

.pricing-audit-table tbody tr:nth-child(odd) {
  background: #0c1e3a;
}

.pricing-audit-table tbody tr:nth-child(even) {
  background: #0a1830;
}

.pricing-audit-table tbody tr:hover {
  background: #143055;
}

.pricing-audit-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #1e3560;
  border-right: 1px solid #1e3560;
  color: #c4d0e0;
  vertical-align: top;
}

.pricing-audit-table td:last-child {
  border-right: none;
}

.pricing-audit-time {
  white-space: nowrap;
  width: 1%;
  color: #e8edf5;
}

.pricing-audit-actor {
  font-size: 11px;
  color: #6a8aaa;
  margin-top: 2px;
}

.pricing-audit-summary {
  color: #c4d0e0;
  line-height: 1.4;
}

.pricing-audit-empty {
  text-align: center;
  color: #6a8aaa;
  padding: 18px 0;
}

.pricing-audit-footer {
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #6a8aaa;
  text-align: right;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-right {
    position: static;
  }
  .pricing-audit-card {
    max-height: 360px;
  }
}
