#crm-customers {
  min-width: 0;
}

#crm-customers .crm-layout {
  display: grid;
  grid-template-columns: minmax(22rem, 1fr) minmax(0, 1.6fr);
  align-items: start;
  gap: var(--gap);
}

#crm-customers :is(.crm-layout > *, .crm-fields > *) {
  min-width: 0;
}

#crm-customers .crm-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}

#crm-customers .crm-wide {
  grid-column: 1 / -1;
}

#crm-customers .crm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-block: 1rem;
}

#crm-customers .page-heading .crm-actions {
  margin-block: 0;
}

#crm-customers :is(button, select, textarea, input:not([type=checkbox])) {
  min-height: 44px;
  max-width: 100%;
}

#crm-customers .profile-list form {
  display: grid;
  gap: .75rem;
  margin-block: 1rem;
}

#crm-customers .crm-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--control-line) var(--surface);
}

#crm-customers .crm-table-wrap table {
  min-width: 36rem;
}

#crm-customers :is(td, th) {
  vertical-align: top;
}

#crm-customers th {
  white-space: nowrap;
}

#crm-customers td button {
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}

#crm-customers :is([role=status], #crm-profile-heading, #crm-receipt) {
  overflow-wrap: anywhere;
}

#crm-customers .crm-section {
  min-width: 0;
  border-top: 1px solid var(--line);
  margin-block-start: 1.5rem;
  padding-block-start: 1.25rem;
}

#crm-customers .crm-section :is(h3, legend) {
  margin-block-end: .75rem;
}

#crm-customers :is(dl.crm-meta, .crm-meta dl) {
  display: grid;
  gap: .65rem;
  margin-block: 1.25rem;
}

#crm-customers :is(dl.crm-meta, .crm-meta dl) > div {
  display: grid;
  grid-template-columns: minmax(8rem, .65fr) minmax(0, 1.35fr);
  gap: 1rem;
}

#crm-customers .crm-meta :is(dt, dd) {
  margin: 0;
  overflow-wrap: anywhere;
}

#crm-customers .crm-meta dt {
  color: var(--muted);
}

#crm-customers .crm-tag-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

#crm-customers .crm-tag-choices label,
#crm-customers .crm-confirm {
  display: flex;
  align-items: flex-start;
  min-height: 44px;
  gap: .65rem;
  margin-block: .5rem;
  font-weight: 400;
}

#crm-customers .crm-tag-choices input,
#crm-customers .crm-confirm input {
  margin-block-start: .2rem;
}

#crm-customers .crm-note {
  border-top: 1px solid var(--line);
  padding-block: 1rem;
}

#crm-customers .crm-note:first-child {
  border-top: 0;
}

#crm-customers .crm-note summary {
  min-height: 44px;
  cursor: pointer;
  padding-block: .5rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

#crm-customers .crm-note-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-block: 1rem;
}

#crm-customers #crm-note-text {
  min-height: 10rem;
}

#crm-customers #crm-timeline :is(ol, ul) {
  padding-inline-start: 1.25rem;
}

#crm-customers #crm-timeline li {
  margin-block: .85rem;
  overflow-wrap: anywhere;
}

#crm-customers .crm-stale {
  color: var(--danger);
}

#crm-customers #crm-receipt:not(:empty),
#crm-customers #crm-message:not(:empty) {
  margin-block: 1rem;
}

@media (max-width: 1100px) {
  #crm-customers .crm-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  #crm-customers .crm-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  #crm-customers .page-heading {
    flex-wrap: wrap;
  }
}
