.receive-heading > div:nth-child(2) {
  margin-right: auto;
}

.receive-scan-card {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(360px, 1.35fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.receive-scan-card label > span,
.receive-scan-card label > small {
  display: block;
}

.receive-scan-card label > span {
  margin-bottom: 5px;
  font-weight: 750;
}

.receive-scan-card label > small {
  color: #68756f;
  line-height: 1.45;
}

.receive-scan-control {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  border: 2px solid #8bb9aa;
  border-radius: 10px;
  background: #fff;
  padding-left: 11px;
  color: #4e675e;
}

.receive-scan-control:focus-within {
  border-color: #286854;
  box-shadow: 0 0 0 3px #8bb9aa3d;
}

.receive-scan-control input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 6px;
}

.receive-scan-control button {
  margin: 4px;
}

.receive-scan-message {
  grid-column: 2;
  min-height: 18px;
  margin: -13px 0 0;
  color: #68756f;
  font-size: 12px;
}

.receive-scan-message.success {
  color: #23664f;
}

.receive-scan-message.error {
  color: #a33b31;
}

.receive-products-card {
  padding: 0;
  overflow: hidden;
}

.receive-products-card .card-heading {
  gap: 20px;
}

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

.receive-legend span {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 750;
}

.receive-legend .not-received {
  background: #f4e5e2;
  color: #8b3d35;
}

.receive-legend .part-received {
  background: #fff1d2;
  color: #765715;
}

.receive-legend .fully-received {
  background: #def2e8;
  color: #23664f;
}

.receive-legend .over-received {
  background: #eee4f6;
  color: #6d4388;
}

.receive-table {
  overflow-x: auto;
}

.receive-page-line-head,
.receive-page-line {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 76px 66px 82px 94px 82px 82px 82px 90px 68px 68px;
  gap: 10px;
  align-items: center;
  min-width: 1160px;
}

.receive-page-line-head {
  padding: 10px 16px;
  border-top: 1px solid #e6ebe8;
  border-bottom: 1px solid #e6ebe8;
  background: #fafbfa;
  color: #738078;
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.receive-page-line-head span:not(:first-child),
.receive-page-line > :not(:first-child) {
  text-align: center;
}

.receive-page-line-head > :first-child,
.receive-page-line > .product-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.receive-page-line-head > :first-child {
  z-index: 3;
  background: #fafbfa;
}

.receive-page-line {
  position: relative;
  min-height: 76px;
  padding: 13px 16px 13px 20px;
  border-bottom: 1px solid #e9eeeb;
  font-size: 13px;
  transition: background .15s ease;
}

.receive-page-line:last-child {
  border-bottom: 0;
}

.receive-page-line::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  content: "";
}

.receive-page-line.not-received {
  background: #fffafa;
}

.receive-page-line.not-received::before {
  background: #c5685d;
}

.receive-page-line.part-received {
  background: #fffdf7;
}

.receive-page-line.part-received::before {
  background: #d4a137;
}

.receive-page-line.fully-received {
  background: #f8fcfa;
}

.receive-page-line.fully-received::before {
  background: #429171;
}

.receive-page-line.over-received {
  background: #fbf8fd;
}

.receive-page-line.over-received::before {
  background: #8b5da7;
}

.receive-page-line.scan-hit {
  animation: receive-scan-hit .75s ease;
}

@keyframes receive-scan-hit {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: inset 0 0 0 2px #286854; }
}

.receive-quantity input {
  width: 100%;
  padding: 8px;
  text-align: center;
  font-weight: 750;
}

.receive-stock-updated {
  color: #23664f;
  font-weight: 750;
}

.receive-stock-updated.over {
  color: #6d4388;
}

.receive-commercial,
.receive-percent {
  white-space: nowrap;
}

.receive-commercial strong,
.receive-commercial small {
  display: block;
}

.receive-commercial small {
  margin-top: 4px;
  color: #748078;
  font-size: 10px;
}

.receive-commercial.changed {
  border-radius: 7px;
  background: #fff1d2;
  padding: 6px 4px;
  color: #765715;
}

.receive-commercial.changed small {
  color: #765715;
  font-weight: 700;
}

.receive-percent.negative {
  color: #a33b31;
}

.receive-bottom {
  width: min(420px, 100%);
  margin-top: 18px;
}

.receive-bottom .summary-card {
  margin: 0;
}

@media (max-width: 900px) {
  .receive-scan-card {
    grid-template-columns: 1fr;
  }

  .receive-scan-message {
    grid-column: 1;
  }
}

@media (max-width: 700px) {
  .receive-heading {
    flex-wrap: wrap;
  }

  .receive-heading .editor-actions {
    width: 100%;
  }

  .receive-scan-control {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .receive-scan-control button {
    grid-column: 1 / -1;
  }

  .receive-products-card .card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .receive-legend {
    justify-content: flex-start;
  }

}
