:root {
  --bg: #eef2f6;
  --line: #e9edf2;
  --line-strong: #d8dde6;
  --text: #535c69;
  --muted: #7d8794;
  --blue: #2f6fc5;
  --blue-strong: #2067b0;
  --danger: #c0392b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.35 Arial, Helvetica, sans-serif;
}

.deal-products {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button {
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0 14px;
  cursor: pointer;
  font: inherit;
}

.button--ghost {
  background: #fff;
  color: var(--text);
}

.button--primary {
  border-color: var(--blue-strong);
  background: var(--blue);
  color: #fff;
}

.button:disabled {
  opacity: .6;
  cursor: default;
}

.notice,
.status {
  margin: 10px 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.status {
  display: none;
}

.status.is-visible {
  display: block;
}

.status.is-error {
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.items-table {
  width: 100%;
  min-width: 2450px;
  border-collapse: collapse;
  table-layout: fixed;
}

.items-table th,
.items-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 10px;
  text-align: left;
  vertical-align: top;
}

.items-table th {
  height: 46px;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
  background: #fff;
}

.items-table tbody tr {
  min-height: 62px;
}

.items-table tbody tr.is-deleted {
  opacity: .45;
}

.select-col,
.drag-col {
  width: 42px;
}

.drag-col {
  color: #aab2bd;
  text-align: center;
}

.items-table th:nth-child(3),
.items-table td:nth-child(3) { width: 230px; }
.items-table th:nth-child(4),
.items-table td:nth-child(4) { width: 145px; }
.items-table th:nth-child(5),
.items-table td:nth-child(5) { width: 165px; }
.items-table th:nth-child(6),
.items-table td:nth-child(6) { width: 190px; }
.items-table th:nth-child(7),
.items-table td:nth-child(7) { width: 150px; }
.items-table th:nth-child(8),
.items-table td:nth-child(8) { width: 120px; }
.items-table th:nth-child(9),
.items-table td:nth-child(9) { width: 190px; }
.items-table th:nth-child(10),
.items-table td:nth-child(10) { width: 190px; }
.items-table th:nth-child(11),
.items-table td:nth-child(11) { width: 170px; }
.items-table th:nth-child(12),
.items-table td:nth-child(12) { width: 170px; }
.items-table th:nth-child(13),
.items-table td:nth-child(13) { width: 120px; }
.items-table th:nth-child(14),
.items-table td:nth-child(14) { width: 190px; }
.items-table th:nth-child(15),
.items-table td:nth-child(15) { width: 180px; }
.items-table th:nth-child(16),
.items-table td:nth-child(16) { width: 180px; }

.field,
.select,
.money-input,
.currency-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 6px 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.field:focus,
.select:focus,
.money-input:focus,
.currency-select:focus {
  outline: none;
  border-color: #9bc4f5;
  background: #fff;
}

.money {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 4px;
}

.title-field {
  min-height: 34px;
  display: flex;
  align-items: center;
}

.title-link {
  color: var(--blue);
  text-decoration: none;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.title-link:hover {
  text-decoration: underline;
}

.title-text {
  color: var(--muted);
  line-height: 1.25;
}

.sum {
  display: block;
  min-height: 34px;
  padding: 7px;
  color: #5f6875;
}

.readonly-field {
  display: block;
  min-height: 34px;
  padding: 7px;
  color: #5f6875;
}

.row-menu-cell {
  position: relative;
  overflow: visible;
}

.row-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.row-menu__trigger {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #aab2bd;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.row-menu__trigger:hover,
.row-menu__trigger:focus {
  outline: none;
  background: #eef3f8;
  color: #6b7280;
}

.row-menu__panel {
  position: absolute;
  top: 30px;
  left: 0;
  z-index: 10;
  min-width: 112px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(83, 92, 105, .16);
}

.row-menu__item {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 3px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  white-space: nowrap;
}

.row-menu__item:hover,
.row-menu__item:focus {
  outline: none;
  background: #f3f6fa;
}

.row-menu__item--danger {
  color: var(--danger);
}

.empty {
  padding: 20px;
  color: var(--muted);
}

.deal-total {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #3f4857;
  font-size: 16px;
  font-weight: 600;
}

.deal-total[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .toolbar {
    align-items: center;
  }

  .toolbar__actions {
    width: 100%;
    justify-content: flex-start;
  }
}
