:root {
  --bg: #f4f5f7; --card: #ffffff; --text: #16181d; --muted: #6b7280; --line: #e3e5e9;
  --primary: #1f6feb; --primary-text: #fff; --danger: #d1242f; --warn: #b4690e;
  --green: #1a9a4b; --yellow: #e6b800; --red: #e0383e; --black: #222;
  --fresh: #e7f6ec; --fresh-text: #136c35; --old: #fff4de; --old-text: #8a5300;
  --expired: #fde8e8; --expired-text: #a11b22; --canceled: #ede9fe; --canceled-text: #5b3cc4;
  --live: #1a9a4b; --ring: #1f6feb; --vm: #b4690e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --card: #181b21; --text: #eceef2; --muted: #9aa1ad; --line: #2a2f38;
    --primary: #4c8dff; --black: #000;
    --fresh: #12301e; --fresh-text: #7ee2a4; --old: #33270f; --old-text: #ffc96b;
    --expired: #3a1517; --expired-text: #ff9da1; --canceled: #261f45; --canceled-text: #c4b5fd;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  transition: background .3s;
}
body.flash { background: var(--fresh); }
body.center { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px 40px; }

nav.top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; flex-wrap: wrap;
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.links { display: flex; gap: 4px; flex-wrap: wrap; }
.links a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.links a.on { color: var(--text); background: var(--bg); font-weight: 600; }
.badge { background: var(--danger); color: #fff; border-radius: 10px; padding: 0 6px; margin-left: 4px; font-size: 12px; }

.banner { padding: 10px 16px; font-size: 14px; }
.banner.test { background: var(--old); color: var(--old-text); text-align: center; }
.banner.warn { background: var(--old); color: var(--old-text); border-radius: 10px; margin: 8px 0; }
.banner.info { background: var(--card); color: var(--text); border: 1px solid var(--primary); border-radius: 10px; margin: 8px 0; }
.banner.info .linkbtn { font-size: 14px; font-weight: 600; padding: 0 0 0 4px; min-height: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card h2, .card h3 { margin: 0 0 10px; }
.card.empty { text-align: center; }
.login { width: 100%; max-width: 340px; display: grid; gap: 12px; }
.login input { font-size: 18px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

.statusbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 8px; }
.audio-toggle { display: flex; gap: 6px; align-items: center; }

.daybanner { border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-weight: 600; }
.daybanner.fresh { background: var(--fresh); color: var(--fresh-text); }
.daybanner.old { background: var(--old); color: var(--old-text); }

.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 8px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--danger); }

.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); }
.chip.expired { background: var(--expired); color: var(--expired-text); }
.chip.canceled { background: var(--canceled); color: var(--canceled-text); }

.who { font-size: 28px; margin: 10px 0 2px; line-height: 1.15; }
.address { font-size: 18px; margin: 0 0 12px; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.prices > div { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.price { font-size: 22px; font-weight: 700; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pricecut { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--warn); }
.pricecut:empty { display: none; }
table.stats { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { text-align: right; padding: 6px 4px; border-top: 1px solid var(--line); }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
.cblive { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.cblive h4 { margin: 10px 0 6px; }
.noanswer { color: var(--old-text); background: var(--old); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.cb .actions { margin-top: 10px; }
.minirow { margin-top: 8px; align-items: center; }
.minirow .muted { min-width: 110px; }
.calls-title { margin: 14px 0 6px; font-size: 16px; }
#showAll { margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.tile { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 28px; font-weight: 600; line-height: 1.2; }
.tile-sub { font-size: 12px; color: var(--muted); }
.daypick input[type=date] { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
table.stats tr.clickable { cursor: pointer; }
table.stats tr.clickable:hover td, table.stats tr.on td { background: var(--bg); }
table.stats.calls td, table.stats.calls th { text-align: left; vertical-align: top; }
/* Talk rate per caller ID line: a small bar (scaled to the best line) beside the percent. */
.ratebar { display: inline-block; width: 64px; height: 8px; margin-right: 8px; vertical-align: middle;
  background: var(--line); border-radius: 4px; overflow: hidden; }
.ratebar span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.chip.flag { background: var(--expired); color: var(--expired-text); font-size: 12px; font-weight: 600;
  white-space: normal; border-radius: 10px; display: block; }
table.stats td.nowrap { white-space: nowrap; }
/* Wide tables scroll inside their own card on a phone instead of pushing the whole page sideways. */
#days, #dayCalls, #colors, #lines, #hours, #points, #weekdays, #resultsSum, #byType, #byPos { overflow-x: auto; }
/* Stats: best day to call. Tapping a day opens its hours in a tinted box under it. */
.wdbtn { font-size: inherit; font-weight: 600; padding: 0; min-height: 30px; text-align: left; }
.wdbtn .caret { display: inline-block; width: 1em; color: var(--muted); }
/* On a phone the voicemail column steps aside so the pickup rate fits without scrolling. */
@media (max-width: 480px) {
  table.stats.weekdays .vm { display: none; }
  table.stats.weekdays .ratebar { width: 44px; margin-right: 6px; }
}
table.stats.weekdays tr.wdhours > td { padding: 0 0 12px; border-top: 0; }
table.stats.sub { font-size: 13px; background: var(--bg); border-radius: 10px; }
table.stats.sub tr:first-child th { border-top: 0; }
table.stats.sub th:first-child, table.stats.sub td:first-child { padding-left: 10px; }
table.stats.sub th:last-child, table.stats.sub td:last-child { padding-right: 10px; }
.ratebar.pts span { background: linear-gradient(90deg, #ffd23f, #ff8c42); }
/* Upload page → What's loaded: one row per day, a missing file in red. */
.cover { font-size: 14px; }
.cover .gaps { margin: 4px 0 10px; display: grid; gap: 6px; }
.cover .gap { background: var(--expired); color: var(--expired-text); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.cover .allgood { background: var(--fresh); color: var(--fresh-text); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.cover table.stats td { white-space: nowrap; }
.cover .miss { color: var(--danger); font-weight: 700; }
.cover .wait { color: var(--muted); }
table.stats tr.flagrow td { border-top: 0; padding-top: 0; text-align: left; }
@media (max-width: 440px) { table.stats .numcol { display: none; } .ratebar { width: 40px; } }
.calurl { word-break: break-all; font-size: 13px; background: var(--bg); padding: 8px; border-radius: 8px; display: block; margin: 6px 0; }
.callbest { width: 100%; margin-top: 12px; font-size: 20px; }
.keys { text-align: center; }
@media (hover: none) { .keys { display: none; } }
.tally { margin-top: 8px; font-size: 14px; font-weight: 600; }
.tally:empty { display: none; }
/* "Calls so far": one line per person on the home, calls by caller ID line. */
.ptally { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; }
.ptally:empty { display: none; }
.ptally .ptitle { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.ptally .prow { padding: 3px 0; border-top: 1px solid var(--line); }
.ptally .prow:first-of-type { border-top: 0; }
.ptally .plines { color: var(--text); }
.callnewline { width: 100%; margin-top: 8px; font-size: 15px; }
/* The 3-calls-in-24-hours warning: red, with when it lifts. */
.limitwarn { color: var(--danger); font-size: 13px; font-weight: 600; margin: 2px 0 4px; }
.ptally .limit { color: var(--danger); font-weight: 600; }
.stophint { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--old); color: var(--old-text); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.conf { display: block; font-size: 12px; font-weight: 600; }
.conf.green { color: var(--green); } .conf.yellow { color: var(--warn); } .conf.red { color: var(--red); }
.conf.black { color: var(--muted); }
/* Numbers tagged wrong number / disconnected on this home: crossed out. */
.notcalling { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.notcalling:empty { display: none; }
.notcalling .ptitle { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.notcalling s { font-variant-numeric: tabular-nums; }
.lines { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: normal; }
.linetag { font-weight: 700; margin-right: 6px; }
.minor { margin-top: 8px; }
.minor .btn { flex: 1; font-size: 14px; }
.small-btn { min-height: 34px; padding: 6px 10px; font-size: 14px; }
.tag { font-size: 13px; background: var(--bg); border-radius: 8px; padding: 3px 8px; }

.contact { padding: 8px 0; border-top: 1px solid var(--line); }
.contact:first-child { border-top: 0; padding-top: 0; }
.cname { font-weight: 600; margin-bottom: 4px; }
.phone { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.phone .num { font-size: 18px; font-variant-numeric: tabular-nums; flex: 1; min-width: 140px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); } .dot.black { background: var(--black); box-shadow: 0 0 0 1px var(--muted); }

.btn {
  font: inherit; font-size: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  min-height: 44px;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.warn { border-color: var(--warn); color: var(--warn); }
.btn.big { font-size: 18px; padding: 14px 18px; flex: 1; }
.btn.subtle { color: var(--muted); }
.btn.suggested { outline: 3px solid var(--primary); outline-offset: 2px; font-weight: 700; }

.callpanel { text-align: center; }
.callstate { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.callstate.ringing { color: var(--ring); }
.callstate.live { color: var(--live); }
.callstate.vm { color: var(--vm); }
.callstate.idle { color: var(--muted); }
.callstate.warn { color: var(--warn); font-size: 18px; }

.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* An odd last result button ("Contacted") takes the whole row. */
.results-grid .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.btn.good { border-color: var(--live); color: var(--live); font-weight: 600; }

/* Dialer limited to some days (picked on the Leads page). */
.focusbar { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--primary); background: var(--card); font-size: 14px; }

/* All leads page */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chips.scroller { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.chipbtn { font: inherit; font-size: 14px; white-space: nowrap; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 36px; flex: none; }
.chipbtn.on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.chipbtn .n { opacity: .75; margin-left: 6px; font-variant-numeric: tabular-nums; }
.leadtools { margin: 2px 0 6px; }
.search { flex: 1; min-width: 0; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.sort { font: inherit; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.summary { margin: 6px 0; font-size: 14px; }
.callthese { width: 100%; margin-top: 6px; }
.showmore { width: 100%; margin: 6px 0 12px; }
.focusnow { margin-top: 10px; font-size: 14px; display: grid; gap: 8px; }
.lead { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; cursor: pointer; }
.lead .lrow1 { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.lead .laddr { font-weight: 700; font-size: 17px; }
.lead .lrow1 .chip { flex: none; }
.lead .lmeta { font-size: 14px; color: var(--muted); }
.lead .lmeta b { color: var(--text); }
.lead .cut { color: var(--warn); font-weight: 600; }
.lead .lcalls { font-size: 14px; margin-top: 4px; }
.lead .lfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
/* Leads page: the box to pick a home for her call list, and the bar with "Call these" */
.lead .lrow1 .laddr { flex: 1 1 auto; min-width: 0; }
.lead .lpick { flex: none; display: flex; align-items: center; padding: 2px 6px 2px 0; margin: -4px 0; cursor: pointer; }
.lead .lpick input { width: 22px; height: 22px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.pickall { margin-top: 4px; }
/* Leads page: the Days / Type / Status buttons, the calendar and the choices with their meaning */
.fbtns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.fbtn { display: inline-flex; align-items: baseline; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.fbtn .fk { color: var(--muted); font-size: 13px; }
.fbtn.set { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.fbtn[aria-expanded="true"] { background: var(--bg); }
.fpanel { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 6px 0 8px; background: var(--card); }
.fpanel .fhelp { margin: 0 0 8px; }
.calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.calnav { border: 0; background: none; color: var(--text); font-size: 24px; line-height: 1; padding: 4px 14px; cursor: pointer; }
.calnav:disabled { opacity: .25; cursor: default; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calgrid .wd { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.calday { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; padding: 2px 0;
  border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.calday .dn { font-size: 15px; }
.calday .dc { font-size: 11px; min-height: 13px; color: var(--muted); }
.calday.has { color: var(--text); border-color: var(--line); font-weight: 600; }
.calday.on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.calday.on .dc { color: var(--primary-text); opacity: .85; }
.calday.today .dn { text-decoration: underline; }
.calday:disabled { cursor: default; opacity: .4; }
.calquick { margin-top: 10px; align-items: center; }
.calquick .chipbtn:disabled { opacity: .4; cursor: default; }
.fopt { display: grid; gap: 2px; width: 100%; text-align: left; margin: 0 0 6px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.fopt.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.fopt .fo1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.fopt .fo1 .n { color: var(--muted); font-weight: 400; }
.fopt .fo2 { font-size: 13px; color: var(--muted); }
.fpanel .fdone { margin-top: 2px; }
.leadacts { margin-top: 6px; }
.focusbar .fundo { font-size: 14px; font-weight: 600; min-height: 32px; }
/* Settings → Phones and computers */
.devices { display: grid; gap: 10px; margin: 8px 0 12px; }
.devrow { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.devrow.gone { opacity: .7; }
.devhere { align-items: center; }
.pickbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(20, 30, 80, .12); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.pickbar .pickin { max-width: 608px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.pickbar .pickcount { font-weight: 700; margin-right: auto; min-width: 0; }
.pickbar .btn { white-space: nowrap; }
@media (max-width: 420px) { .pickbar .btn { padding: 8px 10px; font-size: 15px; } .pickbar .pickcount { font-size: 14px; } }
body.picking main { padding-bottom: 96px; }
.lstate { font-size: 13px; font-weight: 600; color: var(--muted); }
.lstate::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.lstate.ready { color: var(--live); }
.lstate.today { color: var(--ring); }
.lstate.limit { color: var(--warn); }
.lstate.nonumber { color: var(--danger); }
.ldetail { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 14px; cursor: default; }
.ldetail h4 { margin: 10px 0 4px; }
.ldetail .dnum { display: flex; gap: 8px; align-items: center; padding: 3px 0; flex-wrap: wrap; }
.ldetail .dnum .n { font-variant-numeric: tabular-nums; }
.ldetail .dnum .st { margin-left: auto; font-size: 12px; color: var(--muted); }
.ldetail .dnum.dnc .n, .ldetail .dnum.wrong .n { text-decoration: line-through; color: var(--muted); }
.ldetail .dnum.dnc .st, .ldetail .dnum.wrong .st { color: var(--danger); }
/* Stats: best time to call */
.chip.good { background: var(--fresh); color: var(--fresh-text); font-size: 11px; padding: 1px 8px; }
table.stats.hours tr.few td { color: var(--muted); }
table.stats.hours tr.few .ratebar span { opacity: .45; }
.note { width: 100%; margin-top: 10px; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
textarea.note { min-height: 60px; }
/* Notes pad: typed during calls, kept with the home. */
.notescard h3 { margin: 0; }
textarea.notes { min-height: 84px; resize: vertical; line-height: 1.35; }
.notesread { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.cbform label { margin-bottom: -6px; }

.history { margin-top: 12px; }
.history h4 { margin: 8px 0 4px; }
.hrow { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 6px; font-size: 13px; padding: 4px 0; border-top: 1px solid var(--line); }
.hrow span:last-child { grid-column: 1 / -1; }
.hrow span:last-child:empty { display: none; }

.drop { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 14px; padding: 36px 16px; cursor: pointer; color: var(--muted); margin: 12px 0; }
.drop.over { border-color: var(--primary); color: var(--primary); }
.drop input { display: none; }
.checklist { margin: 8px 0; padding-left: 20px; }
.results { padding-left: 18px; }
.big-num { font-size: 22px; font-weight: 700; }

.field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.field .label { width: 100%; }
.field input[type=number] { font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 160px; }
#types { display: flex; gap: 10px; flex-wrap: wrap; }

.cb.due { border-color: var(--danger); }
.cb input[type=datetime-local] { font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(92vw, 420px); background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.cbform { padding: 16px; display: grid; gap: 10px; }
.cbform input { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

@media (max-width: 420px) {
  .who { font-size: 24px; }
  .results-grid { grid-template-columns: 1fr; }
}
/* Phones: a shorter top of the page, so the home and its Call button show without scrolling.
   The menu drops the "Realty Dialer" name (the Dialer link does the same) and the dialer's
   "Read names" button sits beside the call count. */
@media (max-width: 480px) {
  nav.top { padding: 6px 10px; }
  nav.top .brand { display: none; }
  .links a { padding: 6px 8px; font-size: 14px; }
  .statusbar .row { display: contents; }
}


/* ---------- Make it fun (Settings): backgrounds, the dialer's filters, points, confetti ---------- */
/* The background is a layer pinned behind the page: it stays put while the page scrolls (also on
   iPhones, which ignore "fixed" page backgrounds) and costs nothing to scroll over. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); }
body[data-theme="ocean"]::before { background: linear-gradient(160deg, #dbeafe 0%, #e0f2fe 40%, #ede9fe 100%); }
body[data-theme="sunset"]::before { background: linear-gradient(160deg, #ffedd5 0%, #fde2e4 50%, #ede9fe 100%); }
body[data-theme="mint"]::before { background: linear-gradient(160deg, #dcfce7 0%, #ccfbf1 50%, #e0f2fe 100%); }
body[data-theme="candy"]::before { background: linear-gradient(160deg, #fbcfe8 0%, #e9d5ff 50%, #bfdbfe 100%); }
@media (prefers-color-scheme: dark) {
  body[data-theme="ocean"]::before { background: linear-gradient(160deg, #0b1d33 0%, #101a36 50%, #1b1438 100%); }
  body[data-theme="sunset"]::before { background: linear-gradient(160deg, #2a1610 0%, #2a1224 50%, #1c1533 100%); }
  body[data-theme="mint"]::before { background: linear-gradient(160deg, #0a271c 0%, #0b2426 50%, #0c1d2e 100%); }
  body[data-theme="candy"]::before { background: linear-gradient(160deg, #2b0f2a 0%, #22123d 50%, #0f1f3f 100%); }
}
/* Someone picked up (the chime): the whole background flashes green for a moment. */
body.flash::before { background: var(--fresh); }
/* On a colored background, cards float and the main buttons get a little color. */
body[data-theme]:not([data-theme="classic"]) .card,
body[data-theme]:not([data-theme="classic"]) .lead { border-color: transparent; box-shadow: 0 1px 2px rgba(20, 30, 80, .05), 0 8px 24px rgba(20, 30, 80, .08); }
/* (No see-through blur behind the top bar: it made scrolling slow on phones.) */
body[data-theme]:not([data-theme="classic"]) nav.top { background: color-mix(in srgb, var(--card) 94%, transparent); }
body[data-theme]:not([data-theme="classic"]) .btn.primary { background: linear-gradient(135deg, #2f6df6, #7c4dff); border-color: transparent; }
body[data-theme]:not([data-theme="classic"]) .statusbar { color: var(--text); }

/* The background lights up: green glow when someone picks up, a rainbow party after a good call. */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0; }
body.glow::after { background: radial-gradient(circle at 50% 35%, rgba(46, 204, 113, .55), rgba(46, 204, 113, 0) 70%); animation: funGlow 1.8s ease-out; }
body.party::after { background: linear-gradient(120deg, #ff5d8f, #ffd23f, #3bceac, #5b8def, #a06cd5, #ff5d8f); background-size: 300% 300%; animation: funParty 3.2s ease-out; }
@keyframes funGlow { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes funParty { 0% { opacity: 0; background-position: 0% 50%; } 15% { opacity: .35; } 70% { opacity: .25; } 100% { opacity: 0; background-position: 100% 50%; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.pointpop { position: fixed; left: 50%; bottom: 22%; transform: translateX(-50%); z-index: 70; pointer-events: none; white-space: nowrap;
  background: var(--card); color: var(--text); font-weight: 800; font-size: 20px; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(20, 30, 80, .25); animation: popUp 1.5s ease-out forwards; }
.pointpop.big { font-size: 22px; background: linear-gradient(135deg, #ffd23f, #ff8c42); color: #2a1600; animation-duration: 2.7s; }
.pointpop.high { bottom: 42%; }
@media (max-width: 420px) { .pointpop { font-size: 17px; white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 32px); } }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.8); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  22% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60px); } }
@media (prefers-reduced-motion: reduce) { body.glow::after, body.party::after, .pointpop { animation-duration: .01s; } }

/* Pep talk after a run of calls that reached nobody. */
.pepcard { position: relative; display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 36px 10px 12px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, #ffd23f 24%, var(--card)), color-mix(in srgb, #ff5d8f 16%, var(--card)));
  border: 1px solid color-mix(in srgb, #ff8c42 45%, transparent); color: var(--text); animation: pepIn .35s ease-out; }
.pepcard .pepemoji { font-size: 26px; line-height: 1.15; }
.pepcard .peptext { flex: 1; min-width: 0; }
.pepcard b { font-size: 16px; }
.pepcard .small { margin-top: 2px; }
.pepcard .fx { position: absolute; top: 2px; right: 0; font: inherit; font-size: 20px; line-height: 1; border: 0; background: transparent; color: var(--muted); padding: 6px 12px; min-height: 40px; cursor: pointer; }
@keyframes pepIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pepcard { animation: none; } }
@media (max-width: 480px) {
  .pepcard { padding: 8px 34px 8px 10px; gap: 8px; }
  .pepcard .pepemoji { font-size: 22px; }
  .pepcard b { font-size: 15px; }
}

/* Points today toward the daily goal. */
.pointsbox { margin-top: 8px; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.pointsbox .pbar { flex: 1; min-width: 90px; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--line) 85%, transparent); overflow: hidden; }
.pointsbox .pbar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffd23f, #ff8c42, #ff5d8f); transition: width .6s ease; }
.pointsbox.done .pbar span { background: linear-gradient(90deg, #3bceac, #2ec4b6, #5b8def); }

/* Combo: calls started within a minute of the last result, and the time left to keep it going. */
.combobox { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; margin-top: 8px;
  padding: 7px 12px 10px; border-radius: 12px; font-size: 14px; color: #2a1600;
  background: linear-gradient(135deg, #ffe08a, #ffb36b 55%, #ff8fab); }
.combobox .cflame { font-size: 20px; line-height: 1; display: inline-block; }
.combobox .ctext { flex: 1; min-width: 0; }
.combobox b { font-size: 16px; margin-right: 2px; }
.combobox .chint { font-weight: 600; }
.combobox .cbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(42, 22, 0, .12); }
.combobox .cbar span { display: block; height: 100%; width: 100%; background: rgba(42, 22, 0, .6); transition: width .25s linear; }
.combobox.paused .cbar span { background: rgba(42, 22, 0, .28); }
.combobox.hurry { background: linear-gradient(135deg, #ffc46b, #ff7a59 55%, #ff5d8f); animation: comboHurry .7s ease-in-out infinite alternate; }
.combobox.bump .cflame { animation: comboBump .5s ease-out; }
.combobox.over { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.combobox.over .cflame { filter: grayscale(1); opacity: .6; }
@keyframes comboHurry { from { transform: none; } to { transform: scale(1.015); } }
@keyframes comboBump { 0% { transform: scale(1); } 35% { transform: scale(1.6) rotate(-8deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .combobox.hurry, .combobox.bump .cflame { animation: none; } }

/* "Calling only" pills, each with an × to drop it. */
.focusbar .flabel { font-weight: 600; }
.fpill { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 999px; padding: 0 2px 0 12px; font-weight: 700; }
.fpill .fx { font: inherit; font-size: 20px; line-height: 1; border: 0; background: transparent; color: var(--muted); padding: 4px 10px; min-height: 34px; cursor: pointer; }

/* Settings: Cities to call, a dropdown with a box per city; and the background swatches. */
.citynow { margin: 2px 0 8px; font-size: 14px; }
.warntext { color: var(--warn); font-weight: 600; }
.msel { position: relative; }
.msel-btn { width: 100%; display: flex; align-items: center; gap: 10px; font: inherit; font-size: 16px; text-align: left;
  min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); cursor: pointer; }
.msel-btn:disabled { cursor: default; color: var(--muted); }
.msel-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.msel-caret { flex: none; color: var(--muted); transition: transform .15s; }
.msel-btn[aria-expanded="true"] { border-color: var(--primary); }
.msel-btn[aria-expanded="true"] .msel-caret { transform: rotate(180deg); }
/* Opens over the cards below it, but under the sticky menu bar (z-index 5). */
.msel-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 4; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 30, 80, .18); }
.msel-panel .search { display: block; width: 100%; font-size: 16px; }
.msel-list { max-height: min(50vh, 420px); overflow-y: auto; overscroll-behavior: contain; margin: 8px 0; }
.msel-ghead { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; background: var(--card);
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px 0; }
.msel-opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px; border-radius: 8px; cursor: pointer; }
.msel-opt:hover { background: var(--bg); }
.msel-opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--primary); }
.msel-name { flex: 1; min-width: 0; }
.msel-n { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.msel-none { padding: 8px 6px; margin: 0; }
.msel-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.msel-foot #citySaved { flex: 1; text-align: center; }
@media (prefers-color-scheme: dark) { .msel-panel { box-shadow: 0 12px 32px rgba(0, 0, 0, .55); } }
.linkbtn { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; border: 0; background: none; color: var(--primary); cursor: pointer; padding: 6px 0; min-height: 32px; }
.themes { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { font: inherit; font-size: 13px; width: 84px; border: 2px solid var(--line); border-radius: 14px; padding: 0 0 6px; background: var(--card); color: var(--text); cursor: pointer; overflow: hidden; }
.swatch i { display: block; height: 44px; margin-bottom: 6px; }
.swatch.on { border-color: var(--primary); font-weight: 700; }
.swatch[data-swatch="ocean"] i { background: linear-gradient(160deg, #dbeafe, #e0f2fe, #ede9fe); }
.swatch[data-swatch="sunset"] i { background: linear-gradient(160deg, #ffedd5, #fde2e4, #ede9fe); }
.swatch[data-swatch="mint"] i { background: linear-gradient(160deg, #dcfce7, #ccfbf1, #e0f2fe); }
.swatch[data-swatch="candy"] i { background: linear-gradient(160deg, #fbcfe8, #e9d5ff, #bfdbfe); }
.swatch[data-swatch="classic"] i { background: #f4f5f7; }

/* ---- Result buttons: each result its own color and icon, so the right one is found at a glance. ---- */
:root {
  --r-na-bg: #eef2f7; --r-na-fg: #334155; --r-na-bd: #c5cfdc;
  --r-vm-bg: #fff3dc; --r-vm-fg: #8a5300; --r-vm-bd: #f0c674;
  --r-cb-bg: #efe8ff; --r-cb-fg: #5b3cc4; --r-cb-bd: #c6b3ff;
  --r-ni-bg: #ffe8ec; --r-ni-fg: #a1213a; --r-ni-bd: #f3b1bd;
  --r-ct-bg: #e3f7ec; --r-ct-fg: #136c35; --r-ct-bd: #8fd6ab;
}
@media (prefers-color-scheme: dark) {
  :root {
    --r-na-bg: #1d2633; --r-na-fg: #c8d3e3; --r-na-bd: #344256;
    --r-vm-bg: #33270f; --r-vm-fg: #ffc96b; --r-vm-bd: #6b5220;
    --r-cb-bg: #261f45; --r-cb-fg: #c4b5fd; --r-cb-bd: #4a3c86;
    --r-ni-bg: #3a1720; --r-ni-fg: #ff9daf; --r-ni-bd: #6e2c3b;
    --r-ct-bg: #12301e; --r-ct-fg: #7ee2a4; --r-ct-bd: #2c6a44;
  }
}
.btn.r { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-width: 1.5px;
  transition: transform .08s ease, box-shadow .15s ease; }
.btn.r .ri { font-size: 1.15em; line-height: 1; }
.btn.r:active { transform: scale(.97); }
.btn.r-no_answer { background: var(--r-na-bg); color: var(--r-na-fg); border-color: var(--r-na-bd); }
.btn.r-voicemail { background: var(--r-vm-bg); color: var(--r-vm-fg); border-color: var(--r-vm-bd); }
.btn.r-callback { background: var(--r-cb-bg); color: var(--r-cb-fg); border-color: var(--r-cb-bd); }
.btn.r-not_interested { background: var(--r-ni-bg); color: var(--r-ni-fg); border-color: var(--r-ni-bd); }
.btn.r-contacted { background: var(--r-ct-bg); color: var(--r-ct-fg); border-color: var(--r-ct-bd); }
.btn.r-disconnected { background: var(--card); color: var(--r-na-fg); border-color: var(--r-na-bd); }
.btn.r-relisted { background: var(--card); color: var(--r-cb-fg); border-color: var(--r-cb-bd); }
.btn.r-do_not_call { background: var(--danger); color: #fff; border-color: var(--danger); }
.minor .btn.r { font-weight: 500; }
.btn.r.suggested { outline: 3px solid var(--primary); outline-offset: 2px; box-shadow: 0 4px 14px rgba(47, 109, 246, .25); }

/* ---- The big Call button: a pill that gently pulses while it waits (game mode). ---- */
.callbest { border-radius: 16px; font-weight: 700; min-height: 58px; box-shadow: 0 6px 18px rgba(47, 109, 246, .28); }
body[data-fun="1"] .callbest:not(:disabled) { animation: callPulse 2.6s ease-in-out infinite; }
@keyframes callPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(47, 109, 246, .28), 0 0 0 0 rgba(124, 77, 255, .35); }
  50% { box-shadow: 0 6px 18px rgba(47, 109, 246, .28), 0 0 0 9px rgba(124, 77, 255, 0); }
}

/* ---- Game mode: her level (gold, filling toward the next one) and today's badges. ---- */
.lvlchip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  color: #3b1d00; border: 1px solid #f0c040; white-space: nowrap;
  background: linear-gradient(90deg, #ffd23f var(--lv, 0%), #fff1bf var(--lv, 0%)); }
.badges { flex-basis: 100%; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.daybadge { font-size: 15px; line-height: 1; width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); filter: grayscale(1); opacity: .45; transition: transform .15s ease; }
.daybadge.on { filter: none; opacity: 1; border-color: #f0c040; background: radial-gradient(circle at 50% 35%, #fff7d1, #ffe08a);
  box-shadow: 0 2px 6px rgba(240, 160, 0, .35); }
.daybadge:active { transform: scale(.92); }
.daybadge:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.badgehint { flex-basis: 100%; font-size: 13px; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .daybadge.on { background: radial-gradient(circle at 50% 35%, #5c4710, #3d2f0a); border-color: #b8901f; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-fun="1"] .callbest { animation: none; }
  .btn.r, .daybadge { transition: none; }
}

/* ---- Nov 16: addresses open a Google search; the Appointment set result. ---- */
.addrlink { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.addrlink:hover { text-decoration-color: var(--primary); }
.addrlink .ext, .addrlink span[aria-hidden] { color: var(--muted); font-size: .8em; }
.address .ptype { color: var(--muted); }
:root { --r-ap-bg: #ccf3ee; --r-ap-fg: #075e55; --r-ap-bd: #2bb5a3; }
@media (prefers-color-scheme: dark) { :root { --r-ap-bg: #0d302c; --r-ap-fg: #7ee6d6; --r-ap-bd: #2a8a7e; } }
.btn.r-appointment { background: var(--r-ap-bg); color: var(--r-ap-fg); border-color: var(--r-ap-bd); }

/* ---- The dialer's layout: one column on a phone (in the order a call goes), two on a computer. ---- */
.dgrid { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.dgrid .card { margin: 0; }
.dleft, .dright { display: contents; }
.dgrid .leadcard { order: 1; }
.dgrid .callpanel { order: 2; }
.dgrid .actcard { order: 3; }
.dgrid .notescard { order: 4; }
.dgrid .resultscard { order: 5; }
.dgrid .numberscard { order: 6; }
.dgrid .footcard { order: 7; }
.actcard { padding: 10px 12px; }
.actcard .backhint { margin: 8px 0 0; }
#lead > .keys { margin-top: 12px; }
@media (min-width: 1000px) {
  body[data-page="dialer_page"] main { max-width: 1180px; }
  .dgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .dleft, .dright { display: flex; flex-direction: column; gap: 12px; }
  .dgrid .card { order: 0; }   /* each column in page order: the call, then its results, then notes */
  /* The call, its results and the notes stay in view while the home's details scroll. */
  .dright { position: sticky; top: 64px; max-height: calc(100vh - 76px); overflow-y: auto; overscroll-behavior: contain; }
  .resultscard .btn:disabled { opacity: .5; }
}
/* Phones and tablets: during a call the result buttons sit pinned at the bottom of the screen. */
.resultscard.pinbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 640px; margin: 0 auto;
  border-radius: 16px 16px 0 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(20, 30, 80, .18);
}
.resultscard.pinbar h3 { display: none; }
.resultscard.pinbar .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.resultscard.pinbar .btn.big { flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.15; padding: 6px 4px; min-height: 54px; }
.resultscard.pinbar .btn.r .ri { font-size: 19px; }
.resultscard.pinbar .minor { margin-top: 6px; gap: 6px; flex-wrap: nowrap; }
.resultscard.pinbar .minor .btn { font-size: 12.5px; min-height: 38px; padding: 4px 6px; gap: 4px; }
body.pinned main { padding-bottom: calc(var(--pin-h, 180px) + 16px); }
@media (prefers-color-scheme: dark) { .resultscard.pinbar { box-shadow: 0 -6px 24px rgba(0, 0, 0, .6); } }

/* ---- Callbacks page: homeowners who called back (until dealt with), and appointments. ---- */
.callsin { border-color: var(--primary); }
.callin, .appt { padding: 10px 0; border-top: 1px solid var(--line); }
.callin:first-child, .appt:first-child { border-top: 0; padding-top: 0; }
.callin.missed b { color: var(--danger); }
.callin.missed .small { color: var(--danger); font-weight: 600; }
.tag.warntag { background: var(--old); color: var(--old-text); }

/* ---- Lists page and "Upload another list" ---- */
.listrow { padding: 10px 0; border-top: 1px solid var(--line); }
.listrow:first-of-type { border-top: 0; }
.listrow.archived { opacity: .6; }
.lcols { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; margin: 6px 0 10px; }
.lcols label { display: grid; gap: 3px; font-size: 13px; font-weight: 600; }
.lcols select { font: inherit; font-size: 16px; padding: 7px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.lsample { overflow-x: auto; font-size: 12px; }
.listup h3 { margin: 14px 0 4px; }

/* ---- Upload page: "I may lawfully call these numbers", ticked for every upload. ---- */
.lawful { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0 4px; background: var(--bg); }
.lawbox { display: flex; gap: 10px; align-items: center; font-size: 16px; cursor: pointer; }
.lawbox input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.lawful .who-in { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); width: min(260px, 100%); margin-top: 4px; }
.drop.off { opacity: .45; }

/* ---- Leads page: Do Not Call shown, the search's matching numbers, and the editor. ---- */
.chip.dnc { background: var(--expired); color: var(--expired-text); font-size: 12px; }
.chip.nocheck { background: var(--old); color: var(--old-text); font-size: 12px; }
.lead .lmatch { font-size: 13px; margin-top: 4px; }
.lead .lmatch .dnc, .lead .lmatch .dnc_list, .lead .lmatch .wrong { color: var(--danger); font-weight: 600; }
.searchnote { margin: 4px 0 0; font-size: 13px; }
.ltools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.edit { margin-top: 12px; border-top: 2px solid var(--primary); padding-top: 8px; }
.edit h4 { margin: 14px 0 6px; }
.edit .erow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.edit .erow:first-of-type { border-top: 0; }
.edit input[type=text], .edit input[type=tel], .edit input[type=datetime-local], .edit select, .edit textarea {
  font: inherit; font-size: 16px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.edit input[type=text], .edit input[type=tel] { flex: 1; min-width: 140px; }
.edit textarea { width: 100%; min-height: 80px; }
.edit .n { font-variant-numeric: tabular-nums; min-width: 128px; }
.edit .st { font-size: 12px; font-weight: 600; }
.edit .st.dnc, .edit .st.wrong { color: var(--danger); }
.edit .lock { font-size: 13px; color: var(--danger); font-weight: 600; }
.edit .box { background: var(--bg); border-radius: 10px; padding: 10px; margin: 6px 0; display: grid; gap: 8px; }
.edit .box label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.edit .hist { font-size: 13px; }
.edit .hist div { padding: 5px 0; border-top: 1px solid var(--line); }
.edit .whoami { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.edit .saved { color: var(--live); font-size: 13px; font-weight: 600; }
.edit .errmsg { color: var(--danger); font-size: 14px; font-weight: 600; }

/* ---- Quick Call: call a number she found herself (never on the dialer's list). ---- */
.quickform h2 { margin-bottom: 8px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.quickform label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.quickform label .muted { font-weight: 400; }
.quickform input:not([type=checkbox]), .quickform textarea, .quickform select { font: inherit; font-size: 16px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
.quickform .qwide { margin-top: 8px; }
.quickform .lawbox { display: flex; font-weight: 400; }
#qPhone { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (max-width: 480px) { .qgrid { grid-template-columns: 1fr; } }
.qperson .phone { padding: 4px 0; }
.qperson .lrow1 { flex-wrap: wrap; }          /* a long Call back chip wraps under the name */
.qretick { display: flex; gap: 6px; align-items: center; flex-basis: 100%; }
.qretick input { width: 18px; height: 18px; accent-color: var(--primary); }
.qmore { margin-top: 10px; }
.qmore summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 600; padding: 6px 0; }
.qmore[open] summary { margin-bottom: 6px; }
.qline { display: grid; gap: 4px; margin: 10px 0 4px; }
.qline label { font-size: 14px; font-weight: 600; }
.qline p { margin: 0; }
.qhist { list-style: none; margin: 4px 0 2px; padding: 0; font-size: 13px; color: var(--muted); }
.qhist li { padding: 1px 0; }
.qnotes { margin-top: 6px; }
.qnotes summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 6px 0; overflow-wrap: anywhere; }
.qnotes summary .muted { font-weight: 400; }
.qnotes-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; max-height: 11em; overflow: auto;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); margin: 2px 0 0; }
.qnotes textarea { margin-top: 6px; }
.qnotes textarea[readonly] { opacity: .65; }
.qaddrow { align-items: center; margin-top: 6px; }
/* Stats: the dates the rate tables cover */
.rangecard #rangeChips { margin: 6px 0; }
.rangecustom { margin: 6px 0 2px; align-items: flex-end; }
.rangecustom input[type=date] { font: inherit; font-size: 16px; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); display: block; margin-top: 2px; }
/* Her own tags on a home (dialer, under the notes; Leads page) */
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.tagrow #tagChips { display: contents; }
.taginput { flex: 1 1 140px; min-width: 0; font: inherit; font-size: 16px; padding: 6px 12px; border-radius: 999px;
  border: 1px dashed var(--line); background: var(--bg); color: var(--text); }
.tagchip { display: inline-flex; align-items: center; gap: 2px; }
.tagchip .fx { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; padding: 4px 8px; cursor: pointer; opacity: .7; }
/* Callbacks → Everyone who called you */
#incoming a { color: var(--primary); font-weight: 600; text-decoration: none; }
/* Upload another list: what to fix before a file can come in */
.probs { margin: 6px 0 8px 18px; padding: 0; }
.probs li { margin: 2px 0; }
/* A link inside a banner reads in the banner's own color (the default blue vanished in dark mode) */
.banner a { color: inherit; font-weight: 700; text-decoration: underline; }
