/* CRM › Interesados (Jace #3109): the forms of the landings as a tray of
   compact cards, and each one's page, laid out as a deal's. */
.lead-inbox { display: grid; gap: 12px; }
.lead-inbox .crm-list__total { margin: 0; }
.lead-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lead-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.lead-card:hover { border-color: var(--ring); box-shadow: var(--shadow); }
.lead-card--unassigned { border-left: 3px solid var(--brand); }
.lead-card__link,
.lead-card__link:visited {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  color: var(--foreground);
  text-decoration: none;
}
.lead-card__link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: var(--radius); }
.lead-card__top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lead-card__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.lead-card__top .lead-card__product { margin-left: auto; flex: none; }
.lead-card__company {
  margin: 0;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted-foreground); font-size: 12px; }
.lead-card__age,
.lead-card__owner { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.lead-card__age .icon,
.lead-card__owner > .icon { width: 14px; height: 14px; flex: none; }
.lead-card__owner .person { font-size: 12px; }
.lead-card__alerts { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; padding: 0; list-style: none; }

/* An alert never blocks: a warning's tone, in the card and on the page. */
.lead-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--tone-warning-solid) 35%, transparent);
  border-radius: 999px;
  background: var(--tone-warning-bg);
  padding: 1px 8px;
  color: var(--tone-warning-ink);
  font-size: 12px;
  line-height: 18px;
}
.lead-alert .icon { width: 12px; height: 12px; flex: none; }
.lead-alerts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lead-alerts .lead-alert { font-size: 13px; padding: 3px 10px; }

/* «Por landing»: each landing's leads, folded under the tray. */
.lead-summary > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.lead-summary > summary::-webkit-details-marker { display: none; }
.lead-summary > summary::before { content: "›"; color: var(--muted-foreground); transition: transform 120ms ease; }
.lead-summary[open] > summary::before { transform: rotate(90deg); }
.lead-summary > summary h2 { margin: 0; }
.lead-summary__rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.lead-summary__row { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.lead-summary__row h3 { margin: 0 0 6px; font-size: 14px; }
.lead-summary__counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; }
.lead-summary__counts dt { color: var(--muted-foreground); font-size: 11px; }
.lead-summary__counts dd { margin: 0; font-size: 18px; font-weight: 600; }
.lead-summary__reasons { margin: 8px 0 0; font-size: 12px; overflow-wrap: anywhere; }

/* Its page. */
.lead-page__back, .lead-page__back:visited { color: inherit; }
.lead-page .deal-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lead-page__lost strong { margin-right: 4px; }
.lead-page__note { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.lead-action { position: relative; }
.lead-action > summary { list-style: none; }
.lead-action > summary::-webkit-details-marker { display: none; }
.lead-action__panel {
  position: absolute;
  right: 0;
  z-index: 20;
  width: min(320px, calc(100vw - 32px));
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px;
  box-shadow: var(--shadow);
}
.lead-fields { display: grid; gap: 8px; margin: 0; }
.lead-fields > div { display: grid; gap: 2px; min-width: 0; }
.lead-fields dt { color: var(--muted-foreground); font-size: 12px; }
.lead-fields dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.lead-fields--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.lead-received h3,
.lead-existing h3 { margin: 16px 0 6px; font-size: 13px; color: var(--muted-foreground); font-weight: 600; }
.lead-received__text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.lead-questions { display: grid; gap: 8px; margin: 0; }
.lead-questions > div { border-left: 3px solid var(--border); padding-left: 10px; }
.lead-questions dt { font-size: 12px; color: var(--muted-foreground); }
.lead-questions dd { margin: 0; overflow-wrap: anywhere; }
.lead-work-form { gap: 10px; }
.lead-note-form { margin-bottom: 12px; }
.lead-reminder-form { margin-top: 12px; }
.lead-reminder-form > summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: 14px; }
.lead-reminder-form .form { margin-top: 10px; }

@media (max-width: 860px) {
  .lead-action__panel { right: auto; left: 0; }
}
