.card.crm-list { padding: 8px 12px; }
.crm-list table { table-layout: fixed; }
.crm-list :is(th, td) { white-space: normal; overflow-wrap: anywhere; }
.crm-list td { padding-block: 10px; vertical-align: top; }
.crm-list tr:last-child td { border-bottom: 0; }
.crm-list .crm-pick { width: 44px; text-align: center; }
.crm-list th:nth-child(3) { width: 24%; }
.crm-list th:nth-child(4) { width: 18%; }
.crm-list th:last-child { width: 17%; }
.crm-customer a { font-weight: 700; }
.crm-list select { width: 100%; min-width: 0; min-height: 40px; }
.crm-list summary { color: var(--pri); cursor: pointer; padding-block: 8px; }
.crm-list dl { margin: 0 0 8px; }
.crm-list dt { color: var(--mut); font-size: 12px; }
.crm-list dd { margin: 0 0 6px; }
.crm-list .crm-activity button { min-height: 40px; }
.crm-mobile-label { display: none; }

@media (max-width: 760px) {
  .crm-list :is(table, thead, tbody) { display: block; }
  .crm-list thead tr { display: flex; align-items: center; }
  .crm-list thead th:not(:nth-child(-n+2)) { display: none; }
  .crm-list tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .crm-list tbody tr:last-child { border: 0; }
  .crm-list tbody td { border: 0; padding: 4px 6px; }
  .crm-list tbody .crm-pick { grid-column: 1 / -1; width: auto; justify-self: start; }
  .crm-customer, .crm-activity { grid-column: 1 / -1; }
  .crm-list .crm-activity button, .crm-list select { min-height: 44px; }
  .crm-mobile-label { display: block; font-size: 12px; color: var(--mut); margin-bottom: 4px; }
}

.crm-tools {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.crm-toolbar, .crm-toolbar-actions, .crm-filter-footer, .crm-filter-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.crm-toolbar { align-items: center; }
.crm-toolbar #crmQ { flex: 1 1 280px; min-width: 0; }
.crm-tools :is(button, select, input:not([type="checkbox"]), summary) { min-height: 44px; }
.crm-actions { position: relative; }
.crm-tools summary {
  display: list-item;
  align-content: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--pri);
  cursor: pointer;
}
.crm-actions-menu {
  position: absolute;
  z-index: 4;
  inset: calc(100% + 6px) 0 auto auto;
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 18px var(--brand-shadow);
}
.crm-actions-menu button { text-align: left; }
.crm-filters summary { width: fit-content; }
.crm-filter-panel {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.crm-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 10px;
}
.crm-filter-panel label { margin: 0; min-width: 0; }
.crm-filter-grid label, .crm-filter-footer label { display: grid; gap: 4px; }
.crm-filter-panel :is(select, input[type="date"]) { width: 100%; min-width: 0; }
.crm-filter-checks { column-gap: 16px; }
.crm-filter-checks label { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; }
.crm-filter-footer [data-top="clear"] { margin-inline-start: auto; }

@media (max-width: 480px) {
  .crm-toolbar-actions { width: 100%; justify-content: space-between; }
  .crm-filter-footer [data-top="clear"] { margin-inline-start: 0; }
}
