.customer-search { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.customer-search label { display: grid; gap: .35rem; flex: 1 1 15rem; color: var(--ink); font-weight: 750; }
.customer-search input { width: 100%; }
.customer-search .btn { min-height: 2.55rem; }
.customer-directory-list, .customer-history ul { list-style: none; margin: 0; padding: 0; }
.customer-list-item + .customer-list-item { border-top: 1px solid var(--line); }
.customer-row, .customer-history-row { display: grid; align-items: center; width: 100%; gap: .8rem; padding: .85rem .5rem; border: 0; border-radius: .7rem; background: transparent; text-align: left; color: var(--ink); }
.customer-row { grid-template-columns: 2.75rem minmax(9rem,2fr) minmax(6rem,1fr) auto; }
.customer-row:hover, .customer-history-row:hover { background: #f7f0fd; }
.customer-avatar { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .7rem; background: #f0e4ff; color: #594181; font-weight: 850; }
.customer-list-item:nth-child(3n + 2) .customer-avatar { background: #ffede9; color: #934b55; }
.customer-list-item:nth-child(3n) .customer-avatar { background: #fff0c9; color: #744f21; }
.customer-row-name, .customer-history-row > span:first-child { display: grid; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.customer-row-name > span, .customer-row-phone, .customer-history-row small { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.customer-events-count { justify-self: end; font-size: .86rem; font-weight: 750; color: #5c3881; background: #f3e9fb; border-radius: .45rem; padding: .27rem .5rem; white-space: nowrap; }
.customer-profile-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 1rem; border-radius: .75rem; background: #f0e5fc; }
.customer-profile-heading > div { flex: 1; min-width: min(13rem,100%); }
.customer-profile-heading h2 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.customer-profile-heading p { margin: .25rem 0 0; color: #604d70; font-size: .87rem; }
.customer-contact-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: 1rem 0; }
.customer-contact-details > div, .customer-notes { border: 1px solid var(--line); border-radius: .7rem; padding: .8rem; }
.customer-contact-details dt { color: #543b69; font-weight: 750; }
.customer-contact-details dd { margin: .3rem 0 0; overflow-wrap: anywhere; }
.customer-contact-details a { color: #5c3881; text-decoration: underline; text-underline-offset: .16em; }
.customer-notes p { margin: .4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-history { margin-top: 1.2rem; }
.customer-history h3, .customer-notes h3 { margin: 0 0 .45rem; }
.customer-history li + li { border-top: 1px solid var(--line); }
.customer-history-row { grid-template-columns: minmax(0,1fr) auto minmax(4rem,auto); }
.customer-history-amount { text-align: right; font-size: .9rem; font-weight: 800; }
.customer-history-paging { margin-top: .8rem; justify-content: flex-end; }

@media (max-width: 600px) {
  .customer-row { grid-template-columns: 2.5rem minmax(0,1fr) auto; gap: .55rem; padding: .72rem .2rem; }
  .customer-row-phone { display: none; }
  .customer-events-count { font-size: .75rem; }
  .customer-contact-details { grid-template-columns: 1fr; }
  .customer-history-row { grid-template-columns: minmax(0,1fr) auto; gap: .35rem .55rem; }
  .customer-history-amount { grid-column: 2; }
}
