/* ============================================================================
   Leads page. The same Glass Command look as the Inbox, because it is the same family of screens: it wears the
   Inbox's root class (.inbox) for the dark ground and the --ig-* tokens, then adds only what a page of tab cards
   needs. Everything is scoped under .leadhub so nothing leaks onto another page, except the lead profile dialog at
   the bottom, which is drawn on the body.
   10-28: the old board button, The Garden and the hand-made lead row are gone. The lead lines are the shared
   compact row (.lrow, css/v3/lead-card.css).
   ========================================================================== */
/* Small text must pass 4.5:1: the Inbox's faint ink (42% white) is about 3.7:1 on these panels, so on this page the
   dim and faint inks are raised, and the status colors are the app's one palette (style.css) instead of a second set. */
.inbox.leadhub{
  height:auto; min-height:calc(100vh - 150px);
  --ig-ink-dim:rgba(255,255,255,.78);
  --ig-ink-faint:rgba(255,255,255,.64);
  --ig-green:var(--green); --ig-amber:var(--yellow); --ig-ruby:var(--accent); --ig-violet:var(--violet);
}
.leadhub .hub{ gap:26px; padding-bottom:28px; }

.leadhub .hub-head{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:14px 28px; }
.leadhub .hub-titles{ min-width:0; }
.leadhub .hub-titles h1{ margin:0; font-size:32px; line-height:1.05; font-weight:800; letter-spacing:-.03em; }
.leadhub .hub-titles p{ margin:8px 0 0; max-width:64ch; font-size:14px; line-height:1.5; color:var(--ig-ink-dim); }
.leadhub .hub-titles p b{ color:var(--ig-ink); font-variant-numeric:tabular-nums; }
.leadhub .hub-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.leadhub .hub-search{ display:flex; align-items:center; gap:8px; height:44px; padding:0 12px; min-width:min(280px,100%); border-radius:12px; background:var(--ig-panel-bg); border:1px solid var(--line-strong); color:var(--ig-ink-faint); }
.leadhub .hub-search:focus-within{ border-color:var(--ig-steel); }
.leadhub .hub-search svg{ width:16px; height:16px; flex:none; }
.leadhub .hub-search input{ flex:1; min-width:0; height:100%; border:0; outline:0; background:none; color:var(--ig-ink); font:inherit; font-size:14px; }
/* a filled button uses the strong red: white on it is 5.2:1 */
.leadhub .hub-add{ height:44px; padding:0 16px; border-radius:12px; font:inherit; font-size:13.5px; font-weight:700; color:#fff; background:var(--accent-strong); border:0; cursor:pointer; }
.leadhub .hub-add:hover{ filter:brightness(1.08); }

.leadhub .hub-score{ display:flex; flex-wrap:wrap; gap:10px; }
/* a reply rate is not money: steel, not green (green means a paying client, nothing else) */
.leadhub .wk-num small{ margin-left:8px; font-size:12px; font-weight:600; color:var(--ig-steel); }
.leadhub .inbox-sync.ok .dot{ background:var(--ig-steel); }
.leadhub .chip.violet{ background:var(--ig-violet-soft); border:1px solid var(--ig-violet-border); color:var(--ig-violet); }

.leadhub .hub-group{ display:flex; flex-direction:column; gap:10px; }
.leadhub .hub-group-head h2{ margin:0; font-size:15px; font-weight:700; letter-spacing:-.01em; }
.leadhub .hub-group-head p{ margin:2px 0 0; font-size:12.5px; color:var(--ig-ink-faint); }
.leadhub .hub-cards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(176px, 1fr)); gap:12px; }

.leadhub .hub-card{ position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:16px 16px 14px; text-align:left;
  border-radius:var(--ig-r-lg); background:linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,0) 55%), var(--ig-panel-bg); backdrop-filter:var(--ig-panel-blur); -webkit-backdrop-filter:var(--ig-panel-blur);
  border:1px solid var(--ig-panel-border); color:var(--ig-ink); font:inherit; cursor:pointer; transition:background .15s, border-color .15s, transform .15s; }
.leadhub .hub-card:hover{ background:rgba(255,255,255,.08); transform:translateY(-1px); }
.leadhub .hub-card:active{ transform:translateY(0); }
.leadhub .hub-card.active{ background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.45); }
@supports (color:color-mix(in srgb, red, blue)){
  .leadhub .hub-card.active{ border-color:color-mix(in srgb, var(--tone) 62%, transparent);
    background:linear-gradient(160deg, color-mix(in srgb, var(--tone) 20%, transparent), rgba(255,255,255,.02) 60%), var(--ig-panel-bg); }
}
/* an empty card is quieter by its number and border, not by fading its words below the contrast line */
.leadhub .hub-card.empty{ border-style:dashed; }
.leadhub .hub-card.empty .hc-num{ opacity:.55; }
.leadhub .hc-num{ font-family:var(--font-mono,monospace); font-size:36px; font-weight:600; line-height:1; letter-spacing:-.03em; font-variant-numeric:tabular-nums; color:var(--tone); }
.leadhub .tone-red{ --tone:var(--ig-ruby); } .leadhub .tone-amber{ --tone:var(--ig-amber); } .leadhub .tone-green{ --tone:var(--ig-green); }
.leadhub .tone-violet{ --tone:var(--ig-violet); } .leadhub .tone-steel{ --tone:var(--ig-steel); } .leadhub .tone-gray{ --tone:var(--ig-ink-dim); }
/* design C ring (2026-10-17): how much of the card is still ready to message; a full ring means nobody has been messaged yet */
.leadhub .hc-ring{ position:absolute; top:14px; right:14px; width:32px; height:32px; border-radius:50%;
  background:conic-gradient(var(--tone) calc(var(--ready,1) * 360deg), rgba(255,255,255,.12) 0);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask:radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.leadhub .hc-label{ font-size:14.5px; font-weight:700; letter-spacing:-.01em; }
.leadhub .hc-help{ font-size:12.5px; line-height:1.4; color:var(--ig-ink-dim); }
.leadhub .hc-foot{ margin-top:auto; padding-top:8px; font-size:12px; color:var(--ig-ink-faint); }
.leadhub .hc-green{ white-space:nowrap; }
.leadhub .hc-foot b{ color:var(--ig-ink); font-family:var(--font-mono,monospace); font-weight:600; font-variant-numeric:tabular-nums; }
.leadhub .hc-how{ font-family:var(--font-mono,monospace); font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ig-ink-faint); padding:3px 8px; border:1px solid var(--ig-hairline); border-radius:999px; }

.leadhub .hub-panel{ border-radius:var(--ig-r-lg); padding:18px; scroll-margin-bottom:16px; }
.leadhub .hp-head{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:12px 24px; }
.leadhub .hp-head > div{ min-width:0; }
.leadhub .hp-head h3{ margin:0; font-size:18px; font-weight:800; letter-spacing:-.02em; }
.leadhub .hp-head p{ margin:5px 0 0; max-width:72ch; font-size:13px; line-height:1.5; color:var(--ig-ink-dim); }
.leadhub .hp-head p b{ color:var(--ig-ink); font-variant-numeric:tabular-nums; }
/* the one big button on a card: a white fill with dark ink (16:1), the page's own primary look */
.leadhub .hub-cta{ flex:none; min-height:44px; padding:10px 18px; border-radius:12px; border:0; background:#fff; color:#14161c; font:inherit; font-size:13.5px; font-weight:800; cursor:pointer; }
.leadhub .hub-cta:hover{ background:#f0f0f0; }
.leadhub .hub-cta[disabled]{ opacity:.55; cursor:default; }

.leadhub .hp-list, .leadhub .hub-results{ display:grid; gap:6px; }
.leadhub .hp-list{ margin-top:14px; }
.leadhub .hp-list.lrow-list{ gap:0; }
.leadhub .hub-results[hidden]{ display:none; }
.leadhub .hp-note, .leadhub .hub-panel-empty{ padding:16px 12px; font-size:13px; color:var(--ig-ink-dim); }
.leadhub .hp-note.err{ color:var(--red); border:1px solid var(--red); border-radius:10px; margin:6px 0; }

.leadhub button:focus-visible, .leadhub input:focus-visible, .leadhub .lrow:focus-visible{ outline:2px solid var(--ig-steel); outline-offset:2px; }

@media (max-width:640px){
  .leadhub .hub-titles h1{ font-size:26px; }
  .leadhub .hub-cards{ grid-template-columns:minmax(0,1fr); }
  .leadhub .hub-cta{ width:100%; }
  .leadhub .hub-search{ min-width:100%; }
  .leadhub .hub-add{ flex:1; }
}
@media (prefers-reduced-motion:reduce){
  .leadhub .hub-card{ transition:none; }
  .leadhub .hub-card:hover{ transform:none; }
}

/* ============================================================================
   The lead profile and Add a lead (js/views/leads.js): a dialog drawn on the body, so these are not under .leadhub.
   ========================================================================== */
.drawer:focus{ outline:none; }
.drawer .close{ min-width:44px; min-height:44px; }
.drawer .lp-owner{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 4px; }
/* a message that stays until the next action, written where the person is looking (a toast is gone in 3 seconds) */
.lp-msg{ display:none; margin:8px 0; padding:10px 12px; border-radius:10px; font-size:14px; line-height:1.4; }
.lp-msg.bad{ display:block; color:#fff; background:#a3182c; border:1px solid var(--red); }
.lp-msg.ok{ display:block; color:var(--text); background:var(--panel-2); border:1px solid var(--line-strong); }
.field-err{ margin:4px 0 8px; font-size:13px; line-height:1.4; color:var(--red); }
.drawer [aria-invalid="true"]{ border-color:var(--red); outline:1px solid var(--red); }
.drawer .quicklog button{ min-height:44px; border-color:var(--line-strong); }
@media (min-width:641px){ .drawer .quicklog button{ min-height:36px; } }

/* Maya on her own (2026-11-21): the follow-up block under the Reactivation scoreboard */
.leadhub .hub-fu{ gap:10px; }
.leadhub .fu-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.leadhub .hub-fu-stats{ display:flex; flex-wrap:wrap; gap:10px; }
.leadhub .wk-num small.mute{ color:var(--ig-ink-faint); font-weight:500; }
.leadhub .fu-btn{ font:inherit; color:inherit; cursor:pointer; text-align:left; }
.leadhub .fu-btn:hover{ border-color:var(--ig-steel-border); }
.leadhub .fu-btn:focus-visible{ outline:2px solid var(--ig-steel); outline-offset:2px; }
.leadhub .fu-btn.held .wk-num{ color:var(--ig-amber); }
.leadhub .fu-go{ font-size:11.5px; font-weight:700; color:var(--ig-steel); margin-left:4px; }
.leadhub .fu-off{ border:1px dashed var(--ig-panel-border); border-radius:14px; padding:10px 14px; font-size:13px; color:var(--ig-ink-dim); }
.leadhub .fu-mute{ color:var(--ig-ink-faint); font-weight:500; }
.leadhub .fu-held{ display:flex; flex-direction:column; border:1px solid var(--ig-panel-border); border-radius:14px; background:var(--ig-panel-bg); overflow:hidden; }
.leadhub .fu-held[hidden]{ display:none; }
.leadhub .fu-hrow{ display:grid; grid-template-columns:minmax(110px,.8fr) minmax(0,2fr) auto auto; gap:12px; align-items:center; padding:9px 14px; font:inherit; font-size:12.5px; color:inherit; text-align:left; background:none; border:0; border-top:1px solid var(--ig-panel-border); cursor:pointer; }
.leadhub .fu-hrow:first-child{ border-top:0; }
.leadhub .fu-hrow:hover{ background:rgba(255,255,255,.05); }
.leadhub .fu-hrow:focus-visible{ outline:2px solid var(--ig-steel); outline-offset:-2px; }
.leadhub .fu-why{ color:var(--ig-ink-dim); } .leadhub .fu-when{ color:var(--ig-ink-faint); font-variant-numeric:tabular-nums; }
.leadhub .fu-held .fu-note{ padding:10px 14px; }
@media (max-width:560px){ .leadhub .fu-hrow{ grid-template-columns:1fr auto; } .leadhub .fu-why{ grid-column:1 / -1; order:3; } .leadhub .fu-hrow .fu-go{ display:none; } }
.leadhub .fu-note{ margin:0; font-size:12px; color:var(--ig-ink-faint); }
.leadhub .fu-more{ border:1px solid var(--ig-panel-border); border-radius:14px; background:var(--ig-panel-bg); padding:10px 14px; }
.leadhub .fu-more summary{ display:flex; justify-content:space-between; gap:10px; cursor:pointer; font-size:13px; font-weight:700; list-style:none; }
.leadhub .fu-more summary::-webkit-details-marker{ display:none; }
.leadhub .fu-more summary::after{ content:"\25BE"; color:var(--ig-ink-faint); margin-left:auto; padding-left:8px; }
.leadhub .fu-more[open] summary::after{ content:"\25B4"; }
.leadhub .fu-sum{ font-weight:500; color:var(--ig-ink-faint); }
.leadhub .fu-sec{ margin:10px 0 2px; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--ig-ink-faint); font-weight:700; }
.leadhub .fu-row{ display:grid; grid-template-columns:minmax(150px,1.3fr) minmax(90px,1fr) minmax(130px,auto); gap:14px; align-items:center; padding:7px 0; border-top:1px solid var(--ig-panel-border); font-size:12.5px; }
.leadhub .fu-sec + .fu-row{ border-top:0; }
.leadhub .fu-touch{ border:1px solid var(--ig-panel-border); border-radius:14px; background:var(--ig-panel-bg); padding:8px 14px 10px; }
.leadhub .fu-touch .fu-sec{ margin:4px 0 2px; }
.leadhub .fu-trow{ display:grid; grid-template-columns:minmax(190px,1.4fr) minmax(90px,1fr) 240px; gap:14px; align-items:center; padding:8px 0; border-top:1px solid var(--ig-panel-border); font-size:12.5px; }
.leadhub .fu-sec + .fu-trow{ border-top:0; }
.leadhub .fu-tname b{ font-size:13px; }
.leadhub .fu-touch .fu-note{ margin-top:2px; }
@media (max-width:560px){ .leadhub .fu-trow{ grid-template-columns:1fr; gap:6px; } .leadhub .fu-trow .fu-v{ text-align:left; } }
/* Click a row to see the people behind it (sql/PASTE-43) */
.leadhub .fu-x{ font:inherit; color:inherit; background:none; border-left:0; border-right:0; border-bottom:0; width:100%; text-align:left; cursor:pointer; border-radius:0; }
.leadhub .fu-x:hover{ background:rgba(255,255,255,.05); }
.leadhub .fu-x:focus-visible{ outline:2px solid var(--ig-steel); outline-offset:-2px; }
.leadhub .fu-x .fu-v::after{ content:"\25BE"; margin-left:8px; color:var(--ig-ink-faint); }
.leadhub .fu-x[aria-expanded="true"] .fu-v::after{ content:"\25B4"; }
.leadhub .fu-people{ margin:2px 0 8px; border:1px solid var(--ig-panel-border); border-radius:12px; background:var(--ig-panel-bg); overflow:hidden; }
.leadhub .fu-people[hidden]{ display:none; }
.leadhub .fu-people .fu-note{ padding:9px 14px; }
.leadhub .fu-prow{ display:grid; grid-template-columns:minmax(110px,.8fr) 130px 118px minmax(0,2.6fr) auto; gap:12px; align-items:center; width:100%; text-align:left; font:inherit; font-size:12.5px; color:inherit; background:none; border:0; border-top:1px solid var(--ig-panel-border); padding:9px 14px; cursor:pointer; }
.leadhub .fu-prow:first-child{ border-top:0; }
.leadhub .fu-prow:hover{ background:rgba(255,255,255,.05); }
.leadhub .fu-prow:focus-visible{ outline:2px solid var(--ig-steel); outline-offset:-2px; }
.leadhub .fu-pt{ color:var(--ig-ink-faint); font-variant-numeric:tabular-nums; }
.leadhub .fu-pmsg{ color:var(--ig-ink-dim); min-width:0; overflow-wrap:anywhere; }
.leadhub .fu-pst{ font-weight:700; }
.leadhub .fu-pst.ok{ color:var(--ig-green); } .leadhub .fu-pst.no{ color:var(--ig-ink-faint); } .leadhub .fu-pst.wait{ color:var(--ig-amber); }
@media (max-width:700px){ .leadhub .fu-prow{ grid-template-columns:1fr auto; } .leadhub .fu-pmsg{ grid-column:1 / -1; order:3; } .leadhub .fu-prow .fu-go{ display:none; } }
.leadhub .fu-meter{ display:block; height:6px; border-radius:3px; background:rgba(255,255,255,.10); overflow:hidden; }
.leadhub .fu-meter i{ display:block; height:100%; background:var(--ig-steel); border-radius:3px; }
.leadhub .fu-meter.low i{ background:rgba(255,255,255,.30); }
.leadhub .fu-v{ color:var(--ig-ink-faint); font-variant-numeric:tabular-nums; text-align:right; }
.leadhub .fu-v b{ color:var(--ig-ink); }
@media (max-width:560px){ .leadhub .fu-row{ grid-template-columns:1fr auto; } .leadhub .fu-meter{ grid-column:1 / -1; order:3; } }
