/* Calling CRM (1.28.0): callback pop-up, call context on the lead card, keyboard outcomes, team board, lead results, cadences. */

.callback-alert { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff7e6; border: 1px solid #f5c26b; border-left: 5px solid #d97706; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.callback-alert[hidden] { display: none; }
.callback-alert strong { color: #92400e; margin-right: 6px; }

.lead-crm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 10px; font-size: 13px; }
.lead-crm:empty { display: none; }
.crm-reason { border-radius: 50px; padding: 4px 10px; font-weight: 700; font-size: 12px; background: #e8f0ff; color: #174ea6; }
.crm-reason.callback { background: #fff1d6; color: #92400e; }
.crm-reason.new { background: var(--mint); color: #065f46; }
.crm-steps { display: inline-flex; gap: 3px; }
.crm-steps i { width: 14px; height: 6px; border-radius: 4px; background: var(--line); }
.crm-steps i.done { background: #94a3b8; }
.crm-steps i.now { background: var(--blue); }
.crm-vm { color: #6d28d9; font-weight: 600; }

.notepad-card .chips kbd, .kbd-hint kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; background: #f8fafc; color: var(--muted); }
.notepad-card .chips input:checked + span kbd { background: transparent; color: #cbd5e1; border-color: #475569; }
.kbd-hint { font-weight: 400; margin-left: 8px; font-size: 12px; }
.quick-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-times button { padding: 6px 10px; font-size: 13px; }
.next-call-note { font-size: 13px; margin: 0; }

tr.due-row td { background: #fff8f1; }
.board-table td:nth-child(5) b { color: var(--blue2); }
.live-tag { background: var(--mint); color: #065f46; }
.muted-tag { background: #eef2f6; color: var(--muted); }

.results-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 20px; }
.insight { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.insight.good { border-color: #86efac; background: #f3fdf7; }
.insight button { align-self: flex-start; margin-top: 4px; }
.crm-bars .bar { grid-template-columns: 70px 1fr 50px; }

.cadence-list { display: grid; gap: 12px; }
.cadence-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.cadence-card.off { opacity: .6; }
.cadence-card p { margin: 4px 0 0; }
.cadence-timeline { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; }
.cadence-timeline li { background: #f5f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 5px 9px; }
.cadence-steps input[type=number] { width: 70px; }
.crm-ownership { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.crm-ownership legend { padding: 0 6px; font-weight: 600; }
.campaign-cadence { font-size: 12px; }
.campaign-cadence select { font-size: 12px; padding: 4px 6px; max-width: 170px; }

@media (max-width: 700px) {
  .callback-alert { flex-direction: column; align-items: flex-start; }
  .kbd-hint { display: none; }
  .notepad-card .chips kbd { display: none; }
}

/* 1.31.0 Household & profile on the lead card */
.lead-profile { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; }
.lead-profile[hidden] { display: none; }
.profile-unlock { font-weight: 600; }
.profile-members, .profile-facts { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.profile-facts { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.profile-facts small { color: var(--muted); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

/* 1.32.0 Lookup data under an Auto Rescue row (R&A only) */
.rescue-data td { background: #f7faf8; }
.rescue-data ul { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 2px; }

/* 1.34.0 Driving record on the lead sheet */
.lead-driving { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; }
.lead-driving[hidden] { display: none; }
.driving-list { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 6px; }
.driving-list li.flag strong { color: #b42318; }
.driving-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.driving-form input { flex: 1 1 130px; min-width: 0; }
/* 1.41.3 Team board daily goals form */
.board-goals summary{cursor:pointer;font-weight:750;min-height:44px;display:flex;align-items:center}
.board-goals-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;align-items:end}
.board-goals-form label{display:grid;gap:4px;font-weight:650}
.board-goals-form input,.board-goals-form select{min-height:44px}
.board-goals-actions{display:flex;gap:8px;flex-wrap:wrap}
.board-goals-form p{grid-column:1/-1;margin:0}

/* Calling motivation (1.41.5): the Signal brief on the lead card, the calling scoreboard, today's pulse, the rep report. */
/* One column: the lead card sits beside the script, so two columns wrapped every line. */
.signal-brief { display: grid; grid-template-columns: 1fr; gap: 10px; background: #f5f9ff; border: 1px solid #c7d8f5; border-left: 5px solid var(--blue);
  border-radius: 14px; padding: 12px 16px; margin: 4px 0 12px; }
.signal-brief[hidden] { display: none; }
.signal-brief .eyebrow { margin: 0 0 4px; }
.signal-brief strong { display: block; color: var(--navy); font-size: 15px; }
.signal-brief p { margin: 4px 0 0; }
.signal-brief ul { margin: 2px 0 0; padding-left: 18px; font-weight: 600; color: var(--ink); }
.signal-brief .sb-also, .signal-brief .sb-tip { color: var(--muted); font-size: 13px; }
.signal-brief .sb-refer { color: #6d28d9; font-size: 13px; font-weight: 600; }
.signal-brief.changed { background: #fff7e6; border-color: #f5c26b; border-left-color: #d97706; animation: sb-flash 1.2s ease-out 1; }
@keyframes sb-flash { from { box-shadow: 0 0 0 6px rgba(217, 119, 6, .35); } to { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); } }

.scoreboard .sb-head { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.sb-range { display: inline-flex; border: 1px solid var(--line); border-radius: 50px; overflow: hidden; }
.sb-range button { border: 0; border-radius: 0; background: transparent; padding: 6px 12px; font-weight: 600; color: var(--muted); }
.sb-range button.active { background: var(--navy); color: #fff; }
.sb-progress { margin: 10px 0 12px; }
.sb-progress:empty { display: none; }
.sb-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; }
.sb-goal span { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.sb-goal b { color: var(--ink); }
.sb-track { height: 8px; border-radius: 6px; background: var(--line); margin-top: 4px; overflow: hidden; }
.sb-track i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 6px; transition: width .4s ease; }
.sb-goal.met .sb-track i { background: #16a34a; }
.sb-streak-line { margin: 10px 0 0; font-size: 14px; }
.sb-streak-line b { color: #b45309; }
.sb-board tr.me td { background: #fffbeb; font-weight: 600; }
.sb-board .sb-streak { display: block; color: #b45309; font-weight: 600; }
/* Phones: drop Conversations so Calls stays on screen (the streak already sits under the name). */
@media (max-width: 480px) { .sb-board th:nth-child(5), .sb-board td:nth-child(5) { display: none; } .sb-board th, .sb-board td { padding-left: 6px; padding-right: 6px; } }
.sb-note { font-size: 12px; margin-top: 8px; }
.ws-pulse { margin: 0 0 10px; padding: 8px 14px; border-radius: 50px; background: var(--mint); color: #065f46; font-weight: 600; display: inline-block; }
.ws-pulse[hidden] { display: none; }
.rep-report td, .rep-report th { white-space: nowrap; }
.rep-report tr.team-row td { border-top: 2px solid var(--line); font-weight: 700; background: #f8fafc; }

/* Hand-back desk (1.51.0): the release banner, "Ineligible: send to R&A" on the outcome keys, Sent to R&A, copy name. */
.release-banner { border: 1px solid #f5c26b; border-left: 5px solid #d97706; background: #fffaf0; }
.release-banner[hidden] { display: none; }
.release-banner h3 { margin: 2px 0 6px; }
.rg-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.rg-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.rg-list li.rg-waiting { border-color: #f5c26b; }
.rg-list li span { color: var(--muted); font-size: 13px; }
tr.rg-waiting td { background: #fffaf0; }
.handback-field { border: 1px solid #99d5cd; border-left: 4px solid #0f766e; border-radius: 12px; padding: 10px 12px; margin-top: 10px; display: grid; gap: 8px; background: #f0fbf9; }
.handback-field[hidden] { display: none; }
.handback-head { margin: 0; font-size: 13px; }
.handback-head strong { display: block; color: #0f766e; }
.handback-field input[type=text], .handback-field input:not([type]) { width: 100%; }
.notepad-card .chips .handback-chip span { border-color: #99d5cd; }
.crm-handback { border-radius: 50px; padding: 4px 10px; font-size: 12px; background: #dff6f2; color: #0f5b54; }
.hb-status { font-weight: 600; }
.hb-status.hb-bound { color: #15803d; }
.hb-status.hb-lost, .hb-status.hb-closed { color: var(--muted); }
.lead-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-name-row h2 { margin-right: 2px; }
.copy-name { padding: 4px 10px; font-size: 12px; }
.copy-buffer { position: fixed; top: 0; left: -9999px; opacity: 0; }
.lead-age { margin: -4px 0 8px; font-size: 13px; color: var(--muted); }
/* A3 (Oct 20 report): at 1000 px and below the sidebar's sign-out block is hidden, so the header carries Sign out; on short
   desktop screens the sidebar scrolls instead of running past the bottom. */
.mobile-signout { display: none; }
@media (max-width: 1000px) { .mobile-signout { display: inline-block; } }
@media (min-width: 1001px) { .sidebar { overflow-y: auto; } }

/* 1.52.0 My lists (Lead workspace), the dashboard line, and the Team board's Lists column */
.my-lists[hidden], .dash-lists[hidden] { display: none; }
.my-lists summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; list-style: revert; }
.my-lists summary .eyebrow { margin: 0; }
.my-lists[open] summary { margin-bottom: 10px; }
.my-lists input[type="checkbox"] { width: auto; margin: 0; }
.my-lists .my-lists-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; margin: 4px 0 8px; }
.my-lists-table tr.ml-off td { color: var(--muted); }
.my-lists .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dash-lists { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 18px; color: var(--muted); }
.dash-lists button { padding: .45rem .8rem; }
.board-lists { white-space: normal; max-width: 280px; }
.board-lists-clear { padding: .25rem .6rem; font-size: 12px; margin-left: 6px; }

/* 1.54.0 post-visit: what Next lead serves, loading states, progress lines */
.serving-chip{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:.25rem 0 .75rem;padding:.55rem .85rem;border:1px solid var(--line);border-radius:999px;background:var(--panel, #fff);font-weight:600;font-size:.92rem}
.serving-chip button.link{background:none;border:0;padding:0;color:var(--blue);font-weight:650;cursor:pointer;text-decoration:underline}
.my-lists summary .ml-open-hint{margin-left:.5rem;color:var(--blue);font-weight:650;font-size:.85rem}
.my-lists[open] summary .ml-open-hint{display:none}
.progress-line{display:flex;align-items:center;gap:.5rem;margin:.5rem 0;font-weight:600;color:var(--muted, #50606f)}
.spinner{display:inline-block;width:.9em;height:.9em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:jsf-spin .7s linear infinite;vertical-align:-.12em}
@keyframes jsf-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){.spinner{animation:none;border-right-color:currentColor;opacity:.6}}

/* 1.55.0 Back key: Recent strip, back / read-only note, ?debug=1 hop timer */
.recent-strip{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 10px;font-size:.9rem}
.recent-strip .recent-label{font-weight:600;color:var(--muted,#667085);text-transform:uppercase;font-size:.75rem;letter-spacing:.04em}
.recent-strip kbd{font:600 .7rem/1 inherit;border:1px solid currentColor;border-radius:3px;padding:1px 3px;opacity:.7}
.recent-strip button.link:disabled{opacity:.4;cursor:default}
.recent-list{display:flex;flex-wrap:wrap;gap:6px}
.recent-item{display:inline-flex;flex-direction:column;align-items:flex-start;gap:1px;padding:4px 10px;border:1px solid var(--line,#d0d5dd);border-radius:8px;background:var(--panel,#fff);cursor:pointer;text-align:left;max-width:220px}
.recent-item strong{font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}
.recent-item span{font-size:.75rem;color:var(--muted,#667085)}
.recent-item.recent-open{border-color:#2e90fa}
.back-note{margin:6px 0}
.back-note.back-note-warn{border-color:#f79009;background:#fffaeb;color:#93370d}
.hop-timer{position:fixed;right:12px;bottom:12px;z-index:50;background:#101828;color:#fff;font:600 12px/1.4 ui-monospace,Menlo,Consolas,monospace;padding:6px 10px;border-radius:6px;opacity:.9}
.hop-timer span{font-weight:400;margin-left:6px}
@media (max-width:640px){.recent-item{max-width:46vw}}

/* 1.58.0 commercial phone labels */
.lead-phone-facts{margin:4px 0 8px;display:grid;gap:3px;font-size:.9rem}
.lead-phone-facts p{margin:0}
.pf-owner{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px}
.pf-tag{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ecfdf3;color:#05603a;border:1px solid #abefc6;border-radius:4px;padding:1px 6px}
.pf-owner-link{font-weight:650;font-size:1.05rem}
.pf-hint{font-size:.78rem}
