/* Lead pipeline: stage colours, required-fields prompt, stage stepper (17 Nov) - assets/js/components/lead-pipeline.js */
.lpl-ov { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 16px; background: rgba(16, 24, 40, .45); }
.lpl-modal { display: flex; flex-direction: column; width: min(500px, 100%); max-height: calc(100vh - 32px); background: var(--surface, #fff); border-radius: 12px; box-shadow: 0 20px 48px rgba(16, 24, 40, .24); }
.lpl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border, #e4e7ec); }
.lpl-head h2 { margin: 0; font-size: 18px; line-height: 1.35; color: var(--text, #101828); }
.lpl-x { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; color: var(--text-muted, #475467); cursor: pointer; }
.lpl-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lpl-x:hover, .lpl-x:focus-visible { background: var(--surface-muted, #f2f4f7); color: var(--text, #101828); outline: none; }
.lpl-body { overflow: auto; padding: 16px 20px 4px; }
.lpl-intro { margin: 0 0 12px; color: var(--text-muted, #475467); font-size: 14px; line-height: 1.5; }
.lpl-stage { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; background: var(--lpl-bg); color: var(--text, #101828); font-weight: 600; }
.lpl-stage::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lpl-c); }
/* LP5 "Set pipeline display colors": text with a coloured dot (no pill), or the badge alone. */
.lpl-stage--dot { padding: 0; background: none; font-weight: inherit; }
.lpl-stage--badge { padding: 2px 10px; }
.lpl-stage--badge::before { display: none; }
.lpl-missing { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.lpl-missing li { padding: 2px 10px; border: 1px solid #fedf89; border-radius: 999px; background: var(--warning-bg, #fffaeb); color: var(--warning, #b54708); font-size: 13px; font-weight: 500; }
.lpl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lpl-label { font-size: 14px; font-weight: 600; color: var(--text, #101828); }
.lpl-req { margin-left: 2px; color: var(--danger, #b42318); }
.lpl-input { width: 100%; min-height: 40px; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--text, #101828); background: var(--surface, #fff); border: 1px solid var(--border-strong, #98a2b3); border-radius: 8px; }
.lpl-input:focus { outline: none; border-color: var(--brand, #2456e6); box-shadow: 0 0 0 3px rgba(36, 86, 230, .15); }
.lpl-textarea { min-height: 88px; resize: vertical; }
.lpl-field.is-invalid .lpl-input { border-color: var(--danger, #b42318); }
.lpl-err { margin: 0; color: var(--danger, #b42318); font-size: 13px; }
.lpl-note { margin: 4px 0 12px; color: var(--text-subtle, #667085); font-size: 12px; }
.lpl-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border, #e4e7ec); }
.lpl-btn { height: 40px; padding: 0 16px; border: 1px solid var(--border-strong, #d0d5dd); border-radius: 8px; background: var(--surface, #fff); color: var(--text, #101828); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.lpl-btn:hover { background: var(--surface-hover, #f2f4f7); }
.lpl-btn--primary { border-color: var(--brand, #2456e6); background: var(--brand, #2456e6); color: #fff; }
.lpl-btn--primary:hover { background: var(--brand-hover, #1d47c2); }
.lpl-btn:focus-visible { outline: 2px solid var(--brand, #2456e6); outline-offset: 2px; }

/* stepper: vertical list (record card), compact chips (preview) */
.lpl-steps { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lpl-step { position: relative; }
.lpl-step__btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-muted, #475467); font: inherit; font-size: 13px; text-align: left; }
button.lpl-step__btn { cursor: pointer; }
button.lpl-step__btn:hover { background: var(--surface-muted, #f2f4f7); color: var(--text, #101828); }
button.lpl-step__btn:focus-visible { outline: 2px solid var(--brand, #2456e6); outline-offset: 1px; }
.lpl-step__dot { flex: none; width: 10px; height: 10px; border: 2px solid var(--lpl-c); border-radius: 50%; background: var(--surface, #fff); }
.lpl-step.is-done .lpl-step__dot, .lpl-step.is-current .lpl-step__dot { background: var(--lpl-c); }
.lpl-step__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lpl-step.is-current .lpl-step__btn { border-color: var(--lpl-c); background: var(--lpl-bg); color: var(--text, #101828); font-weight: 600; }
.lpl-step__days { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--surface, #fff); color: var(--text-muted, #475467); font-size: 12px; font-weight: 500; }
.lpl-step__req { flex: none; color: var(--text-subtle, #667085); font-size: 11px; }
.lpl-steps--compact { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.lpl-steps--compact .lpl-step__btn { width: auto; min-height: 30px; padding: 4px 10px; border-color: var(--border, #e4e7ec); border-radius: 999px; }
.lpl-steps--compact .lpl-step__req { display: none; }

/* LR2: the Lead stage tracker card (live design record-tabs.css:283, :668-671). `.rt-leads`
   spaces the contact card's blocks, one per lead (the design has one). */
.rt-rtext { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--text, #101828); }
.rt-lead { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.rt-lead__name { font-weight: 600; color: var(--brand, #2456e6); text-decoration: none; overflow-wrap: anywhere; }
.rt-lead__name:hover { text-decoration: underline; }
.rt-lead__meta { color: var(--text-muted, #475467); font-size: 12px; }
.rt-leads { display: grid; gap: 16px; }

/* pipeline settings: colour + required columns */
.pe-scolor { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--border-strong, #d0d5dd); border-radius: 8px; background: var(--surface, #fff); font: inherit; font-size: 13px; color: var(--text, #101828); cursor: pointer; white-space: nowrap; }
.pe-scolor:hover { background: var(--surface-hover, #f2f4f7); }
.pe-scolor__sw { width: 16px; height: 16px; border-radius: 4px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .12); }
.pe-cpop { box-sizing: border-box; padding: 12px; }
.pe-cpop__grid { display: grid; grid-template-columns: repeat(5, 32px); gap: 8px; margin: 8px 0 12px; }
.pe-cpop__sw { position: relative; width: 32px; height: 32px; border-radius: 8px; background: var(--sw); cursor: pointer; }
.pe-cpop__sw input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pe-cpop__sw:has(input:checked) { box-shadow: 0 0 0 2px var(--surface, #fff), 0 0 0 4px var(--sw); }
.pe-cpop__sw:has(input:focus-visible) { outline: 2px solid var(--brand, #2456e6); outline-offset: 4px; }
.pe-cpop__custom { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pe-cpop__custom input[type="color"] { width: 36px; height: 32px; padding: 2px; border: 1px solid var(--border-strong, #d0d5dd); border-radius: 6px; background: none; cursor: pointer; }
.pe-cpop__preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border, #e4e7ec); }
.pe-req-btn { max-width: 220px; text-align: left; }
.pe-req-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-reqlist { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 0; padding: 0; border: 0; }
.pe-reqlist label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.pe-reqlist label:hover { background: var(--surface-muted, #f2f4f7); }
.pe-reqprev { margin-top: 16px; padding: 12px; border: 1px dashed var(--border-strong, #d0d5dd); border-radius: 8px; color: var(--text-muted, #475467); font-size: 13px; }

/* GL2 (go-live B4): dark mode. The stage tints are mixed over white (stageRules.ts `tint`), so the
   current step, the stage pill and the hovered step showed light text on a near-white fill.
   Mix the stage colour over the dark surface instead, keeping its hue; `--surface-muted` has no
   value, so hovers read the theme's hover surface. The design has no dark values for these. */
[data-theme="dark"] .lpl-stage,
[data-theme="dark"] .lpl-step.is-current .lpl-step__btn { background: color-mix(in srgb, var(--lpl-c) 24%, var(--surface)); }
[data-theme="dark"] .lpl-stage--dot { background: none; }
[data-theme="dark"] button.lpl-step__btn:hover { background: var(--surface-hover); }
[data-theme="dark"] .lpl-step.is-current button.lpl-step__btn:hover { background: color-mix(in srgb, var(--lpl-c) 32%, var(--surface)); }
[data-theme="dark"] .pe-reqlist label:hover { background: var(--surface-hover); }
