/* Plumbline — the Leads screen (assets/app-leads.js). Phone first: the stages stack; on a wider screen they sit
   side by side as columns. Uses the portal's own colours (app.css). */

/* follow-ups due and new requests, at the top */
.leads__due { margin-bottom: 16px; }
.leads__due .sec-h + .rows { padding: 0 16px 4px; }
.leads__due .rows + .sec-h { border-top: 1px solid var(--line-2); padding-top: 12px; }
.leadrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.leadrow__main { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.leadrow__main b, .leadrow__main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leadrow__acts { display: flex; align-items: center; gap: 6px; flex: none; }
.rows .leadrow__acts a.lead__reach { margin: 0; padding: 0; border-radius: 50%; } /* not the list's own link spacing (.rows a) */

/* the stages */
.leads__board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
@media (min-width: 760px) { .leads__board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .leads__board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.leads__col { padding: 12px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.leads__colh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.leads__colh h2 { margin: 0; font-size: 15px; font-weight: 600; }
.leads__colh span { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.leads__hint { margin: 0 0 10px; font-size: 12.5px; color: var(--text-3); }
.leads__none { margin: 4px 0; font-size: 13px; color: var(--text-3); }
.leads__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.leads__list--flat { margin-top: 10px; }
@media (min-width: 760px) { .leads__list--flat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .leads__list--flat { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* one lead */
.lead { padding: 10px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--sh); min-width: 0; }
.lead__open { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lead__open b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.lead__open small { display: block; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.lead__open:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.lead__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.lead__why { font-size: 12.5px; color: var(--text-3); }
.lead__foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.lead__who { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lead__reach { display: inline-flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand); }
.lead__reach:hover { background: var(--brand-50); }
.lead__reach svg { width: 16px; height: 16px; }
.lead__stage { margin-left: auto; max-width: 9.5rem; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.lead__stage:disabled { opacity: .6; }

/* won and lost */
.leads__closed { display: grid; gap: 10px; margin-bottom: 18px; }
.leads__closed details { padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh); }
.leads__closed summary { cursor: pointer; font-size: 14.5px; color: var(--text-2); }
.leads__closed summary b { color: var(--text); margin-right: 4px; }

/* the add / edit sheet and the follow-up sheet */
.leadform__reach { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.leadform__reach svg { width: 15px; height: 15px; }
.leadform__since { margin: 0 0 8px; font-size: 13px; }
.leadlog__quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.leadlog__quick .chip { padding: 6px 11px; font-size: 13px; cursor: pointer; border: 0; }

/* the quote request link */
.quotecard { margin-bottom: 18px; }
.quotecard__url { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.quotecard__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.quotecard__on { margin-top: 14px; }
.quotecard .fine .tlink { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }

/* the card on the owner's desk and My day */
.leadcard .moneycard__i { background: var(--ok-wash, #dff3ea); color: var(--ok-ink, #0d6046); }
