/* MELANIN_RECEPTION_HISTORY_COMPLETE_V1 */
.history-table [data-melanin-treatment-cell] strong {
  display: block;
  max-width: 260px;
  white-space: normal;
  line-height: 1.4;
}
.history-table [data-melanin-treatment-cell] small {
  display: block;
  margin-top: 3px;
}
.melanin-history-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.melanin-history-invoice-button {
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid #bfded5;
  border-radius: 7px;
  background: #eff9f6;
  color: #176c5c;
  font: inherit;
  font-size: 8.5px;
  font-weight: 850;
  cursor: pointer;
}
.melanin-history-invoice-button:hover {
  border-color: #16816c;
  background: #16816c;
  color: #fff;
}
.melanin-history-invoice-backdrop {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 25, 21, .62);
  backdrop-filter: blur(4px);
}
.melanin-history-invoice-modal {
  width: min(1040px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid #d8e5e1;
  border-radius: 16px;
  background: #f8fbfa;
  box-shadow: 0 24px 80px rgba(5, 22, 18, .32);
}
.melanin-history-invoice-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #dce7e4;
  background: rgba(255, 255, 255, .96);
}
.melanin-history-invoice-header span {
  color: #708780;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.melanin-history-invoice-header h2 {
  margin: 4px 0 0;
  color: #214b42;
  font-size: 20px;
}
.melanin-history-invoice-header p {
  margin: 4px 0 0;
  color: #72857f;
  font-size: 10px;
}
.melanin-history-invoice-header > button {
  width: 34px;
  height: 34px;
  border: 1px solid #dce6e3;
  border-radius: 10px;
  background: #fff;
  color: #365c54;
  font-size: 22px;
  cursor: pointer;
}
.melanin-history-invoice-details,
.melanin-history-invoice-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 12px 16px 0;
}
.melanin-history-invoice-totals {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.melanin-history-invoice-detail {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dfe9e6;
  border-radius: 10px;
  background: #fff;
}
.melanin-history-invoice-detail span {
  display: block;
  color: #849690;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}
.melanin-history-invoice-detail strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #284f47;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.melanin-history-invoice-section {
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px solid #dce7e4;
  border-radius: 12px;
  background: #fff;
}
.melanin-history-invoice-section h3 {
  margin: 0 0 9px;
  color: #285149;
  font-size: 12px;
}
.melanin-history-invoice-table-wrap {
  overflow: auto;
}
.melanin-history-invoice-table-wrap table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}
.melanin-history-invoice-table-wrap th,
.melanin-history-invoice-table-wrap td {
  padding: 8px 7px;
  border-bottom: 1px solid #e8efed;
  text-align: left;
  font-size: 9.5px;
}
.melanin-history-invoice-table-wrap th {
  color: #607a73;
  background: #f7faf9;
  font-weight: 900;
}
.melanin-history-payment-list {
  display: grid;
  gap: 6px;
}
.melanin-history-payment-list article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 3px 10px;
  padding: 8px 10px;
  border: 1px solid #e3ebe9;
  border-radius: 9px;
  background: #fbfdfc;
}
.melanin-history-payment-list article strong {
  grid-row: 1 / 3;
  align-self: center;
  color: #176f5f;
}
.melanin-history-payment-list span,
.melanin-history-payment-list small {
  color: #637b75;
  font-size: 9px;
}
.melanin-history-invoice-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 16px;
}
.melanin-history-invoice-footer button {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid #ccdcd8;
  border-radius: 9px;
  background: #fff;
  color: #355c54;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.melanin-history-invoice-loading {
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 30px;
  color: #55736c;
  font-size: 12px;
  font-weight: 800;
}
.melanin-history-invoice-loading.error {
  color: #a43e37;
}
@media (max-width: 760px) {
  .melanin-history-invoice-backdrop { padding: 0; }
  .melanin-history-invoice-modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .melanin-history-invoice-details,
  .melanin-history-invoice-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
