.detail-page-heading {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
}

.detail-page-heading .back {
  margin-right: 12px;
}

.detail-page-actions {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.detail-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.detail-route div > span,
.detail-info-card span {
  display: block;
  margin-bottom: 7px;
  color: #68756f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.detail-route div > strong {
  display: block;
  font-size: 15px;
}

.detail-route div > small {
  display: block;
  margin-top: 4px;
  color: #68756f;
  font-size: 12px;
  line-height: 1.35;
}

.detail-products {
  padding: 0;
  overflow: hidden;
}

.detail-line-head,
.detail-product-line {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 90px 90px 110px 110px;
  gap: 12px;
  align-items: center;
}

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

.detail-line-head span:not(:first-child),
.detail-product-line > span,
.detail-product-line > strong {
  text-align: right;
}

.detail-product-line {
  min-height: 70px;
  padding: 13px 16px;
  border-bottom: 1px solid #e9eeeb;
  font-size: 13px;
}

.detail-product-line:last-child {
  border-bottom: 0;
}

.detail-bottom {
  display: grid;
  grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

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

.detail-info-card > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 11px 0;
  border-bottom: 1px solid #e9eeeb;
}

.detail-info-card > div > strong {
  color: #53615a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: right;
}

.detail-info-card > div:last-child {
  border-bottom: 0;
}

.detail-info-card .detail-note {
  display: block;
}

.detail-info-card .detail-note strong {
  display: block;
  margin-top: 8px;
  color: #5f6b65;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
}

.detail-info-card span {
  margin: 0;
}

.receipt-history {
  max-height: 520px;
  padding: 20px 24px;
  overflow: auto;
}

.receipt-entry {
  margin-bottom: 16px;
  border: 1px solid #dce3df;
  border-radius: 9px;
}

.receipt-entry:last-child {
  margin-bottom: 0;
}

.receipt-entry-heading,
.receipt-entry-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 13px;
}

.receipt-entry-heading {
  background: #fafbfa;
  border-bottom: 1px solid #e6ebe8;
}

.receipt-entry-heading small,
.receipt-history-empty {
  color: #748078;
}

.receipt-entry-line + .receipt-entry-line {
  border-top: 1px solid #edf0ee;
}

#send-purchase-order-dialog {
  width: min(620px, calc(100% - 32px));
}

#confirm-delivery-dialog {
  width: min(520px, calc(100% - 32px));
}

.confirm-delivery-body {
  display: grid;
  gap: 16px;
  padding: 22px 24px;
}

.confirm-delivery-body > p {
  margin: 0;
  color: #42524b;
  line-height: 1.5;
}

.confirm-delivery-body > p:last-child {
  color: #718079;
  font-size: 12px;
}

.confirm-delivery-summary {
  overflow: hidden;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: #fafbfa;
}

.confirm-delivery-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
}

.confirm-delivery-summary > div + div {
  border-top: 1px solid #e6ebe8;
}

.confirm-delivery-summary span {
  color: #718079;
  font-size: 12px;
}

.confirm-delivery-summary strong {
  text-align: right;
}

.send-purchase-order-body {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}

.send-purchase-order-body > label {
  color: #596861;
  font-size: 12px;
  font-weight: 700;
}

.send-purchase-order-body input,
.send-purchase-order-body textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
}

.send-purchase-order-body > p {
  margin: 0;
  color: #718079;
  font-size: 12px;
}

.send-purchase-order-body > .email-history {
  padding: 11px 13px;
  border: 1px solid #d7e3dd;
  border-radius: 8px;
  background: #f2f7f4;
  color: #425a50;
}

.email-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: #f8faf9;
}

.email-route div > span {
  display: block;
  margin-bottom: 4px;
  color: #718079;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.email-route strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.email-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #eef5f1;
  font-size: 13px;
}

.email-attachment span {
  border-radius: 5px;
  padding: 4px 6px;
  background: #286854;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

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

  .detail-page-actions {
    width: 100%;
    margin-top: 14px;
  }

  .detail-page-actions button {
    width: 100%;
  }

  .detail-route,
  .detail-bottom {
    grid-template-columns: 1fr;
  }

  .detail-route .route-arrow {
    display: none;
  }

  .detail-products {
    overflow-x: auto;
  }

  .detail-line-head,
  .detail-product-line {
    min-width: 760px;
  }

}
