/* v1.14.43: Shop outstanding Invoice manager. */
.dsp-outstanding-manager-modal[hidden] {
  display: none !important;
}

.dsp-outstanding-manager-modal {
  position: fixed;
  inset: 0;
  z-index: 1000003;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: "Prompt", sans-serif;
}

.dsp-outstanding-manager-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 38, 32, .54);
  backdrop-filter: blur(3px);
}

.dsp-outstanding-manager-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, 96vw);
  max-height: min(92vh, 900px);
  overflow: hidden;
  border: 1px solid #cfdfd9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 49, 40, .24);
  color: #173a30;
}

.dsp-outstanding-manager-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #dbe8e3;
}

.dsp-outstanding-manager-header h2 {
  margin: 2px 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.dsp-outstanding-manager-header p {
  margin: 0;
  color: #6b7d77;
  font-size: 11px;
}

.dsp-outstanding-manager-close {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #ccddd6;
  border-radius: 50%;
  background: #fff;
  color: #315b4e;
  cursor: pointer;
}

.dsp-outstanding-manager-close:hover {
  border-color: #0f8b64;
  color: #087653;
}

.dsp-outstanding-manager-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.dsp-outstanding-manager-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 24px;
  overscroll-behavior: contain;
}

.dsp-outstanding-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d8e6e0;
  border-radius: 8px;
  background: #fbfdfc;
}

.dsp-outstanding-summary > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e0ebe6;
}

.dsp-outstanding-summary > div:last-child {
  border-right: 0;
}

.dsp-outstanding-summary span,
.dsp-outstanding-summary b,
.dsp-outstanding-summary small {
  display: block;
}

.dsp-outstanding-summary small i {
  font-style: normal;
  font-weight: 700;
}

.dsp-outstanding-summary span {
  color: #71827c;
  font-size: 10px;
}

.dsp-outstanding-summary b {
  margin-top: 2px;
  color: #087653;
  font-size: 21px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dsp-outstanding-summary small {
  margin-top: 2px;
  color: #87958f;
  font-size: 9px;
}

.dsp-outstanding-summary .is-overdue b {
  color: #bf4a3d;
}

.dsp-outstanding-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 6px;
  margin-top: 12px;
}

.dsp-outstanding-tabs button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #c9ddd5;
  border-radius: 6px;
  background: #f5faf8;
  color: #526a61;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.dsp-outstanding-tabs button b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  background: #e6f1ed;
  color: #087653;
  font-size: 9px;
}

.dsp-outstanding-tabs button.is-active {
  border-color: #087653;
  background: #087653;
  color: #fff;
}

.dsp-outstanding-tabs button.is-active b {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.dsp-outstanding-tab-note {
  margin: 5px 0 0;
  color: #82928c;
  font-size: 9px;
}

.dsp-outstanding-filters {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(160px, .9fr) minmax(135px, .72fr) minmax(130px, .68fr) auto auto;
  align-items: end;
  gap: 9px;
  padding: 14px 0 12px;
}

.dsp-outstanding-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
}

.dsp-outstanding-filters label span {
  color: #62746d;
  font-size: 10px;
  font-weight: 600;
}

.dsp-outstanding-filters input,
.dsp-outstanding-filters select {
  width: 100%;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid #c8dcd4;
  border-radius: 6px;
  background: #fff;
  color: #173a30;
  font: inherit;
  font-size: 12px;
}

.dsp-outstanding-filters button,
.dsp-outstanding-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #bfd6cd;
  border-radius: 6px;
  background: #fff;
  color: #087653;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.dsp-outstanding-filters a {
  border-color: #87d300;
  background: #87d300;
  color: #173b2f;
}

.dsp-outstanding-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8e6e0;
  border-radius: 8px;
}

.dsp-outstanding-table {
  width: 100%;
  min-width: 960px;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.dsp-outstanding-table th,
.dsp-outstanding-table td {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2ece8;
  color: #27473d;
  font-size: 11px;
  text-align: left;
  vertical-align: middle;
}

.dsp-outstanding-table th {
  background: #f0f8f4;
  color: #46665b;
  font-size: 10px;
  text-transform: uppercase;
}

.dsp-outstanding-table th:nth-child(1) {
  width: 22%;
}

.dsp-outstanding-table th:nth-child(2) {
  width: 17%;
}

.dsp-outstanding-table th:nth-child(3) {
  width: 18%;
}

.dsp-outstanding-table th:nth-child(4) {
  width: 8%;
  text-align: center;
}

.dsp-outstanding-table th:nth-child(5) {
  width: 8%;
  text-align: center;
}

.dsp-outstanding-table th:nth-child(6) {
  width: 12%;
  text-align: center;
}

.dsp-outstanding-table th:nth-child(7) {
  width: 15%;
  text-align: right;
}

.dsp-outstanding-balance-head span,
.dsp-outstanding-balance-head small {
  display: block;
}

.dsp-outstanding-balance-head span {
  color: #173a30;
  font-size: 11px;
}

.dsp-outstanding-balance-head small {
  margin-top: 1px;
  color: #71847d;
  font-size: 8px;
  font-weight: 500;
  text-transform: none;
}

.dsp-outstanding-sales-cell {
  text-align: center !important;
}

.dsp-outstanding-credit-cell,
.dsp-outstanding-table td:nth-child(5),
.dsp-outstanding-table td:nth-child(6) {
  text-align: center;
}

.dsp-outstanding-table td:nth-child(6) .dsp-outstanding-status {
  margin-right: auto;
  margin-left: auto;
}

.dsp-outstanding-credit-cell b {
  display: block;
  color: #173a30;
  font-size: 13px;
}

.dsp-outstanding-sales-avatar {
  display: inline-grid !important;
  width: 34px;
  height: 34px;
  min-width: 34px !important;
  overflow: hidden;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e7f5ef;
  color: #087653;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 1px #c9ded5;
}

.dsp-outstanding-sales-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dsp-outstanding-item-summary {
  display: none !important;
  margin-top: 3px !important;
}

.dsp-outstanding-manager-modal[data-active-category="hs"] .dsp-outstanding-item-summary.is-hs,
.dsp-outstanding-manager-modal[data-active-category="other"] .dsp-outstanding-item-summary.is-other,
.dsp-outstanding-manager-modal[data-active-category="all"] tr[data-category="hs"] .dsp-outstanding-item-summary.is-hs,
.dsp-outstanding-manager-modal[data-active-category="all"] tr[data-category="other"] .dsp-outstanding-item-summary.is-other {
  display: block !important;
}

.dsp-outstanding-table tbody tr:last-child td {
  border-bottom: 0;
}

.dsp-outstanding-table tbody tr:hover {
  background: #f9fcfa;
}

.dsp-outstanding-table td strong,
.dsp-outstanding-table td span,
.dsp-outstanding-table td small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dsp-outstanding-table td strong,
.dsp-outstanding-table td b {
  color: #173a30;
  font-size: 12px;
  font-weight: 600;
}

.dsp-outstanding-table td small {
  margin-top: 2px;
  color: #82908b;
  font-size: 9px;
}

.dsp-outstanding-table td:last-child,
.dsp-outstanding-balance-cell {
  text-align: right;
}

.dsp-outstanding-table td:last-child b,
.dsp-outstanding-balance-cell b {
  color: #a44b28;
  font-size: 14px;
  white-space: nowrap;
}

.dsp-outstanding-status {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 0 3px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.dsp-outstanding-status.is-pending {
  background: #fff2d8;
  color: #996007;
}

.dsp-outstanding-status.is-overdue {
  background: #fde8e4;
  color: #b23f35;
}

.dsp-outstanding-empty-source td,
.dsp-outstanding-empty-filter td {
  height: 110px;
  color: #768680;
  text-align: center !important;
}

@media (max-width: 760px) {
  .dsp-outstanding-manager-modal {
    align-items: stretch;
    padding: 0;
  }

  .dsp-outstanding-manager-dialog {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .dsp-outstanding-manager-header {
    padding: 14px 15px 11px;
  }

  .dsp-outstanding-manager-header h2 {
    font-size: 20px;
  }

  .dsp-outstanding-manager-body {
    padding: 12px 14px calc(24px + env(safe-area-inset-bottom));
  }

  .dsp-outstanding-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dsp-outstanding-summary > div:nth-child(2) {
    border-right: 0;
  }

  .dsp-outstanding-summary > div:nth-child(-n+2) {
    border-bottom: 1px solid #e0ebe6;
  }

  .dsp-outstanding-summary > div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .dsp-outstanding-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dsp-outstanding-summary b {
    font-size: 18px;
  }

  .dsp-outstanding-filters {
    grid-template-columns: 1fr 1fr;
  }

  .dsp-outstanding-filters input,
  .dsp-outstanding-filters select {
    font-size: 16px;
  }

  .dsp-outstanding-table-wrap {
    overflow: visible;
    border: 0;
  }

  .dsp-outstanding-table {
    display: block;
    min-width: 0;
  }

  .dsp-outstanding-table thead {
    display: none;
  }

  .dsp-outstanding-table tbody,
  .dsp-outstanding-table tr,
  .dsp-outstanding-table td {
    display: block;
    width: 100%;
  }

  .dsp-outstanding-sales-cell {
    text-align: left !important;
  }

  .dsp-outstanding-table tr {
    margin-bottom: 8px;
    padding: 10px 11px;
    border: 1px solid #d8e6e0;
    border-radius: 7px;
  }

  .dsp-outstanding-table td {
    padding: 5px 0;
    border: 0;
    text-align: left !important;
  }

  .dsp-outstanding-table td::before {
    display: block;
    margin-bottom: 1px;
    color: #82908b;
    content: attr(data-label);
    font-size: 9px;
  }

  .dsp-outstanding-empty-source,
  .dsp-outstanding-empty-filter {
    padding: 0 !important;
  }

  .dsp-outstanding-empty-source td::before,
  .dsp-outstanding-empty-filter td::before {
    display: none;
  }
}

@media (max-width: 440px) {
  .dsp-outstanding-filters {
    grid-template-columns: 1fr;
  }

  .dsp-outstanding-filters button,
  .dsp-outstanding-filters a {
    grid-column: auto;
  }
}

/* v1.14.55: customer-facing Invoice status and credit-term disclosure. */
.dsp-profile-doc-status {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef3f1;
  color: #60716b;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.dsp-profile-doc-status.is-pending,
.dsp-document-credit-summary b.is-pending,
.dsp-bill-status.is-pending {
  background: #fff2d8 !important;
  color: #996007 !important;
}

.dsp-profile-doc-status.is-overdue,
.dsp-document-credit-summary b.is-overdue,
.dsp-bill-status.is-overdue {
  background: #fde8e4 !important;
  color: #b23f35 !important;
}

.dsp-profile-doc-status.is-paid,
.dsp-document-credit-summary b.is-paid,
.dsp-bill-status.is-paid {
  background: #e5f7ec !important;
  color: #08724d !important;
}

.dsp-document-credit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 10px;
}

.dsp-document-credit-summary > span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  background: #fff;
}

.dsp-document-credit-summary small,
.dsp-document-credit-summary b,
.dsp-document-credit-summary em {
  display: block;
}

.dsp-document-credit-summary small {
  margin: 0 0 3px;
  color: #778a82;
  font-size: 8px;
}

.dsp-document-credit-summary b {
  width: fit-content;
  padding: 2px 0;
  color: #21483a;
  font-size: 10px;
  font-weight: 700;
}

.dsp-document-credit-summary b.is-pending,
.dsp-document-credit-summary b.is-overdue,
.dsp-document-credit-summary b.is-paid {
  padding: 3px 7px;
  border-radius: 999px;
}

.dsp-document-credit-summary em {
  margin-top: 2px;
  color: #778a82;
  font-size: 8px;
  font-style: normal;
}

.dsp-bill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.dsp-bill-meta > span {
  display: inline-flex !important;
  align-items: center;
  width: fit-content;
  margin: 0 !important;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f0f5f2;
  color: #61766d;
  font-size: 8px !important;
  line-height: 1;
}

@media (max-width: 640px) {
  .dsp-document-credit-summary {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .dsp-document-credit-summary > span {
    padding: 7px 8px;
  }

  .dsp-outstanding-list article {
    align-items: flex-start !important;
  }
}
