/* Leads tab: status chips, search, and a table that becomes one card per lead on phones. */
.lead-tools { display: flex; flex-direction: column; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:disabled { opacity: .55; cursor: not-allowed; }
.chip-count { font-weight: 700; opacity: .85; }

/* phones: table parts become blocks, each <tbody> is a card */
.leads-table, .leads-table tbody, .leads-table tr, .leads-table td { display: block; }
.leads-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead { margin-bottom: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.lead td { padding: 2px 0; }
.lead td[data-label]::before {
  content: attr(data-label); display: inline-block; min-width: 110px; margin-inline-end: 8px;
  color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.lead td.is-empty { display: none; }
.lead-name { font-size: 1.05rem; margin-inline-end: 8px; }
.lead-actions td { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.lead-actions td > * + * { margin-top: 10px; }
.lead-note { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .92rem; white-space: pre-wrap; }
.lead-edit > * + * { margin-top: 12px; }

/* wide screens: a real table */
@media (min-width: 840px) {
  .leads-table { display: table; width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .leads-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  .leads-table tr { display: table-row; }
  .leads-table th { padding: 10px 8px; text-align: start; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .leads-table tbody { display: table-row-group; }
  .lead { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .lead td { display: table-cell; padding: 10px 8px; vertical-align: top; border-top: 1px solid var(--border); }
  .lead td[data-label]::before { display: none; }
  .lead td.is-empty { display: table-cell; }
  .lead-actions td { margin: 0; padding-top: 0; border-top: 0; }
}
