/* 20-lead-card.css — The lead card in the drawer: a summary first, the form only when editing.
   Part of the CRM stylesheet: the files load in number order (components/app_styles.html) and later
   rules win, exactly as when this was one file. */

/* The lead card: a summary first, the form only when editing. */
.lead-card:not(.is-editing) .lead-edit, .lead-card.is-editing .lead-view { display: none; }
.lead-card:not(.is-editing) .when-editing, .lead-card.is-editing .when-viewing { display: none; }
.lead-hero { align-items: flex-start; }
.lead-hero-text { min-width: 0; }
.lead-hero h2 { font-size: 22px; line-height: 28px; }
.lead-hero .sub { margin-top: 2px; font-size: 14px; }
.lead-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.lead-actions .btn { width: 100%; }
.lead-section-title { margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lead-facts, .lead-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); }
.lead-facts > div, .lead-meta > div { padding: 10px 14px; background: var(--surface); }
.lead-facts > .wide { grid-column: 1 / -1; }
.lead-facts dt, .lead-meta dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lead-facts dd, .lead-meta dd { margin: 2px 0 0; font-size: 15px; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.lead-facts dd.pre-line { white-space: pre-line; font-weight: 500; }
.lead-meta { margin-top: 12px; background: var(--border-soft); border-color: var(--border-soft); }
.lead-meta > div { background: var(--surface-2); }
.lead-meta dd { font-size: 14px; font-weight: 600; }
.lead-fill-hint { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px 14px; border: 1px dashed var(--accent-soft-2); border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
.lead-edit-actions { position: sticky; bottom: -24px; display: flex; justify-content: flex-end; gap: 8px; margin: 16px -24px 0; padding: 12px 24px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); }
.stage-chip { border-radius: var(--radius-pill); height: 32px; padding: 0 13px; font-size: 13px; }
.stage-chip.is-current { background: var(--chip-bg); color: var(--chip); border-color: transparent; font-weight: 700; }
.lead-tasks { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lead-tasks li { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-top: 1px solid var(--border-soft); }
.lead-tasks li:first-child { border-top: 0; }
.lead-tasks li.is-done .lead-task-title { text-decoration: line-through; color: var(--muted); }
.lead-task-title { font-size: 14px; font-weight: 650; }
.lead-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.lead-tasks-empty { color: var(--muted); font-size: 13.5px; }
@media (max-width: 640px) { .lead-edit-actions { margin: 16px -16px 0; padding: 12px 16px; } }

button.link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--accent); cursor: pointer; }
button.link:hover { color: var(--accent-strong); text-decoration: underline; }

