.crm-client-order {
  --order-border: rgba(255, 255, 255, .10);
  overflow: hidden;
  border: 1px solid var(--order-border);
  border-radius: 16px;
  background: #191919;
  color: #ededed;
}
.crm-client-order__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem 1rem;
  align-items: start;
  padding: 1rem 1.125rem;
  background: linear-gradient(115deg, rgba(181, 51, 27, .11), transparent 64%);
}
.crm-client-order__header h3 {
  margin: 0 0 .25rem;
  font-weight: 650;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}
.crm-client-order__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .8rem;
  color: #b0adaa;
  font-size: .8125rem;
  overflow-wrap: anywhere;
}
.crm-client-order__total {
  color: #fff0e8;
  text-align: right;
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.crm-client-order__total small { display: block; color: #b0adaa; font-size: .75rem; font-weight: 400; }
.crm-client-order__statuses { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .375rem; }
.crm-client-order__statuses span {
  padding: .2rem .6rem;
  border-radius: 999px;
  background: #383020;
  color: #f3d995;
  font-size: .75rem;
  line-height: 1.35;
}
.crm-client-order__statuses [data-status="paid"], .crm-client-order__statuses [data-status="shipped"] { background:#20362d; color:#a1e4c3; }
.crm-client-order__statuses [data-status="draft"], .crm-client-order__statuses [data-status="invoiced"] { background:#323034; color:#e2dce8; }
.crm-client-order__items { width: 100%; border-collapse: collapse; font-size: .875rem; }
.crm-client-order__items th, .crm-client-order__items td {
  padding: .65rem 1.125rem;
  border-top: 1px solid var(--order-border);
  text-align: right;
  vertical-align: top;
}
.crm-client-order__items th:first-child { text-align: left; overflow-wrap: anywhere; }
.crm-client-order__items thead th { background: #151515; color: #b0adaa; font-size: .75rem; font-weight: 500; }
.crm-client-order__items tbody th { width: 56%; font-weight: 500; }
.crm-client-order__items td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.crm-client-order__items td:last-child { font-weight: 650; }
.crm-client-order__footer { padding: .75rem 1.125rem; border-top: 1px solid var(--order-border); font-size: .8125rem; }
.crm-client-order__footer > * + * { margin-top: .55rem; }
.crm-client-order__footer summary { color: #c9c5c2; cursor: pointer; width: fit-content; }
.crm-client-order__footer details p { margin: .45rem 0 0; color: #d1cecc; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-client-order__footer button { color: #dabcf8; text-decoration: underline; }
@media (max-width: 600px) {
  .crm-client-order__header { padding: .875rem; grid-template-columns: minmax(0, 1fr) minmax(0, auto); }
  .crm-client-order__total { font-size: 1rem; max-width: 8.5rem; }
  .crm-client-order__header h3 { font-size: 1rem; }
  .crm-client-order__items thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .crm-client-order__items, .crm-client-order__items tbody { display: block; }
  .crm-client-order__items tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: .45rem;
    padding: .7rem .875rem;
    border-top: 1px solid var(--order-border);
  }
  .crm-client-order__items tbody th { grid-column: 1 / -1; width: auto; }
  .crm-client-order__items th, .crm-client-order__items td { padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .crm-client-order__items td::before { display: block; content: attr(data-label); color: #b0adaa; font-size: .7rem; font-weight: 400; }
  .crm-client-order__footer { padding: .65rem .875rem; }
}
