/*
 * tables.css — Lead list cards, row states, badges, and overflow handling.
 * Used by manager-customer-calling, manager-follow-up, and lead-summary-card.
 * Depends on tokens in app.css.
 */

/* ── Lead card ──────────────────────────────────────────────────────────────── */
.lead-card {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.lead-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* Status-tinted left border */
.lead-card[data-status="new"]           { border-left: 4px solid var(--status-new); }
.lead-card[data-status="contacted"]     { border-left: 4px solid var(--status-contacted); }
.lead-card[data-status="interested"]    { border-left: 4px solid var(--status-interested); }
.lead-card[data-status="not_interested"]{ border-left: 4px solid var(--status-not-interested); }
.lead-card[data-status="undecided"]     { border-left: 4px solid var(--status-undecided); }
.lead-card[data-status="unknown"]       { border-left: 4px solid var(--status-unknown); }
.lead-card[data-status="in_repair"]     { border-left: 4px solid var(--status-in-repair); }
.lead-card[data-status="completed"]     { border-left: 4px solid var(--status-completed); }

.lead-card-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: var(--sp-2);
}

.lead-card-plate {
  display: flex; align-items: center; gap: var(--sp-2);
}

.lead-card-vehicle {
  font-size: var(--text-sm); font-weight: var(--font-medium);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vehicle-color { color: var(--color-text-muted); margin-left: var(--sp-1); }

.lead-card-customer {
  font-size: var(--text-sm);
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
}
.customer-name  { font-weight: var(--font-medium); }
.customer-phone { color: var(--color-text-muted); }

.lead-card-location {
  font-size: var(--text-xs); color: var(--color-text-muted);
}

.lead-card-damage {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
}

.lead-card-meta {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2);
}

.lead-updated {
  font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap;
}

.lead-card-open {
  margin-top: auto;
}

/* ── Search results container ───────────────────────────────────────────────── */
.lead-search-results {
  display: flex; flex-direction: column; gap: var(--sp-3);
}

/* ── No results ─────────────────────────────────────────────────────────────── */
.no-results {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  padding: var(--sp-6);
}

/* ── Result count label ─────────────────────────────────────────────────────── */
.results-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--color-border);
}
