/* U18 — Leads list on phones (≤640px): clean card, no avatar circle.
   Row 1: Mr./Ms. + name · language · nationality (small) · owner first name.
   Row 2: rooms-furnishing chip · budget · area · move-in start.   Row 3: assigned date · number of matching options.
   Then full-width buttons: Call · WhatsApp · Edit (Edit opens the lead file on the Profile tab, where the request is edited).
   Last layer, after m-lead-dense.css. Tablet/desktop untouched (new markup hidden there). Tokens only. Roll back: remove the m-lead-phone.css link. */
.lead.lx .lx-ph,.lead.lx .lx-edit{display:none}
@media(max-width:640px){
  html body .lead.lx>.lx-head{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;row-gap:var(--sp-1)}
  html body .lead.lx .lx-av{display:none}
  html body .lead.lx .lx-top,html body .lead.lx .l2,html body .lead.lx .lx-meta,html body .lead.lx .lx-sub{display:none}
  html body .lead.lx .lx-ph{display:grid;grid-column:1;grid-row:1;gap:var(--sp-1);min-width:0;align-content:start}
  html body .lead.lx>.lx-head>.lx-acts{grid-column:1;grid-row:2}
  /* no select box on phones: the owner's first name sits in its place (top right, before the fold arrow) */
  html body .lead.lx .bulk-pick{display:none}
  html body .lead.lx .ph1{display:flex;align-items:center;gap:var(--sp-2);min-width:0;padding-inline-end:32px;min-height:24px}
  html body .lead.lx .ph1>*,html body .lead.lx .ph2>*,html body .lead.lx .ph3>*{min-height:0}
  html body .lead.lx .ph-n{padding:0;margin:0;flex:0 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--fs-md);line-height:1.3;cursor:pointer}
  html body .lead.lx .ph-ln{margin-inline-start:var(--sp-2);flex:0 100 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--fs-xs);font-weight:var(--fw-med);color:var(--tx-muted)}
  html body .lead.lx .ph-ow{flex:none;margin-inline-start:auto;max-width:34%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:1px 8px;border-radius:999px;background:var(--bg-sunken,rgba(0,0,0,.05));font-size:var(--fs-xs);font-weight:var(--fw-bold);color:var(--tx-strong);line-height:1.4}
  html body .lead.lx .ph2{display:flex;align-items:center;gap:0;min-width:0;overflow:hidden;white-space:nowrap;font-size:var(--fs-sm);line-height:1.3}
  html body .lead.lx .ph2>span{flex:none}
  html body .lead.lx .ph2>.ph-a{flex:0 1 auto;width:auto;max-width:max-content;min-width:0;overflow:hidden;text-overflow:ellipsis}
  html body .lead.lx .ph-sp{padding:1px 8px;border-radius:var(--rd-sm);background:var(--bg-sunken,rgba(0,0,0,.05));font-size:var(--fs-xs);font-weight:var(--fw-bold);color:var(--tx-strong)}
  html body .lead.lx .ph2>.ph-sp{margin-inline-end:var(--sp-2)}
  html body .lead.lx .ph2>span:not(.ph-sp)+span::before{content:"·";margin-inline:var(--sp-2);color:var(--tx-faint)}
  html body .lead.lx .ph3{display:flex;align-items:center;gap:var(--sp-3);padding-inline-end:32px;min-width:0;overflow:hidden;white-space:nowrap;font-size:var(--fs-xs);color:var(--tx-muted)}
  html body .lead.lx .ph3 .li{width:13px;height:13px;margin-inline-end:4px;vertical-align:-2px}
  html body .lead.lx .ph-mc{margin-inline-start:auto;flex:none;padding:1px 8px;border-radius:999px;font-weight:var(--fw-bold);line-height:1.4;color:var(--tx-muted);background:var(--bg-sunken,rgba(0,0,0,.05))}
  /* match count colour by number of options: 0 red · 1-2 amber (few) · 3-5 blue (enough) · 6+ green (plenty) */
  html body .lead.lx .ph-mc[data-lv="0"]{color:var(--c-danger);background:var(--c-danger-soft)}
  html body .lead.lx .ph-mc[data-lv="l"]{color:var(--c-warning);background:var(--c-warning-soft)}
  html body .lead.lx .ph-mc[data-lv="m"]{color:var(--c-blue);background:var(--c-blue-soft)}
  html body .lead.lx .ph-mc[data-lv="h"]{color:var(--c-success);background:var(--c-success-soft)}
  /* buttons: Call · WhatsApp · Edit (Log hidden on phones; Edit shown) */
  html body .lead.lx>.lx-head>.lx-acts .btn.wa{flex-grow:.55;padding:0 4px;font-size:var(--fs-xs);height:34px;min-height:34px}
  html body .lead.lx>.lx-head>.lx-acts .btn.wa .li,html body .lead.lx>.lx-head>.lx-acts .btn.wa svg{width:16px;height:16px}
  html body .lead.lx>.lx-head>.lx-acts .lx-assign.re{flex:0 0 46px;width:46px;min-width:46px;height:40px;min-height:40px}
  html body .lead.lx>.lx-head>.lx-acts .lx-assign.re svg,html body .lead.lx>.lx-head>.lx-acts .lx-assign.re .li{width:24px;height:24px}
  html body .lead.lx>.lx-head>.lx-acts .lv-out{display:none}
  html body .lead.lx>.lx-head>.lx-acts .lx-edit{display:inline-flex;flex:1 1 auto;width:auto;min-width:0;height:36px;min-height:36px;padding:0 6px;align-items:center;justify-content:center;gap:4px;border-radius:var(--rd-sm);font-size:var(--fs-sm);font-weight:var(--fw-med)}
  html body .lead.lx>.lx-head>.lx-acts .lx-edit .li{width:18px;height:18px;flex:none}
}
/* expanded card: no "next step / follow-up" strip; the note is one clean line with no "Note" label */
@media(max-width:640px){
  html body .lead.lx .lx-panel>.gd{display:none}
  html body .lead.lx .lb-info{margin:0;border:0;border-radius:var(--rd-sm);background:var(--bg-sunken,rgba(0,0,0,.04))}
  html body .lead.lx .lb-r-note{display:block;padding:0;border:0}
  html body .lead.lx .lb-r-note>b{display:none}
  html body .lead.lx .lb-r-note .lb-note{display:flex;align-items:center;gap:var(--sp-2);width:100%;min-height:34px;padding:0 var(--sp-3);font-size:var(--fs-sm);line-height:1.3;color:var(--tx-strong)}
  html body .lead.lx .lb-r-note .lb-note .li{width:14px;height:14px;flex:none;color:var(--tx-muted)}
  html body .lead.lx .lb-r-note .lb-note span{display:block;flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-line-clamp:unset}
}
@media(max-width:360px){html body .lead.lx .ph-ln{display:none}}

/* U18e — Leads toolbar on phones: clean search box, then ONE row: count · filter icon · agent · sort. Chips (Qualified / Not qualified / No next step / SLA / dates / source) hidden here; wide screens untouched. */
.pv-fb,.pv-ag{display:none}
@media(max-width:640px){
  html body .lf-top{display:block;position:relative;margin:0 0 var(--sp-2)}
  html body .lf-top>.lf-fb{display:none}
  html body .lf-top>#q{width:100%;box-sizing:border-box;height:46px;min-height:46px;padding:0 var(--sp-4) 0 44px;border:1px solid var(--ln);border-radius:999px;background:var(--bg-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a96a6' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px 50%/20px;box-shadow:0 1px 2px rgba(20,30,50,.05);font-size:var(--fs-md)}
  html body .lf-top>#q:focus{outline:0;border-color:var(--c-blue);box-shadow:0 0 0 3px var(--c-blue-soft)}
  html body .pv-bar{position:static;top:auto;z-index:auto;padding:0 0 var(--sp-2);gap:0;background:transparent}
  html body .pv-bar .pv-chips,html body .pv-bar .pv-clr,html body .pv-bar .pv-nf{display:none}
  html body .pv-bar .pv-top{display:flex;align-items:center;gap:var(--sp-2);flex-wrap:nowrap}
  html body .pv-bar .pv-count{flex:none;font-size:var(--fs-sm);color:var(--tx-muted)}
  html body .pv-bar .pv-count b{font-size:var(--fs-md);color:var(--tx-strong)}
  html body .pv-bar .pv-fb{display:inline-flex;flex:none;position:relative;width:38px;height:38px;min-height:38px;padding:0;justify-content:center;border-radius:12px}
  html body .pv-bar .pv-fb .li{width:19px;height:19px}
  html body .pv-bar .pv-fb b{position:absolute;top:-5px;inset-inline-end:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--c-danger);color:var(--c-white);font-size:10px;line-height:16px;text-align:center}
  html body .pv-bar select{display:block;flex:1 1 0;min-width:0;max-width:none;height:38px;min-height:38px;padding:0 var(--sp-3);border-radius:12px;font-size:var(--fs-sm);text-overflow:ellipsis}
  html body .pv-bar .pv-ag{display:block}
}
@media(max-width:640px){html body .pv-bar #pv-sort{flex:0 0 112px;max-width:112px}html body .pv-bar .pv-ag{flex:1 1 0}}

/* U18f — month picker inside the search box (phones): drop-down with check boxes, one or several months. */
.lf-mo-wrap{display:none}
@media(max-width:640px){
  html body .lf-top .lf-mo-wrap{display:block;position:absolute;top:5px;inset-inline-end:6px;z-index:40}
  html body .lf-top>#q{padding-inline-end:112px}
  html body .lf-mo{display:inline-flex;align-items:center;gap:4px;height:36px;padding:0 10px 0 12px;border:0;border-radius:999px;background:var(--c-blue-soft);color:var(--tx-strong);font:var(--fw-bold) var(--fs-sm) var(--font-body);cursor:pointer;white-space:nowrap}
  html body .lf-mo .li{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  html body .lf-mo[aria-expanded="true"] .li{transform:rotate(180deg)}
  html body .lf-mo-pop{position:absolute;top:42px;inset-inline-end:0;width:200px;max-height:60vh;overflow:auto;padding:var(--sp-2);border:1px solid var(--ln);border-radius:14px;background:var(--bg-surface);box-shadow:0 10px 28px rgba(20,30,50,.16)}
  html body .lf-mo-pop[hidden]{display:none}
  html body .lf-mo-pop .mo-i{display:flex;align-items:center;gap:var(--sp-3);min-height:42px;padding:0 var(--sp-2);border-radius:10px;font-size:var(--fs-md);cursor:pointer}
  html body .lf-mo-pop .mo-i:active{background:var(--bg-sunken,rgba(0,0,0,.05))}
  html body .lf-mo-pop .mo-i input{width:20px;height:20px;min-height:20px;margin:0;accent-color:var(--c-blue)}
  html body .lf-mo-pop .mo-f{display:flex;gap:var(--sp-2);margin-top:var(--sp-2);padding-top:var(--sp-2);border-top:1px solid var(--ln)}
  html body .lf-mo-pop .mo-f .btn{flex:1;min-height:38px;padding:0 var(--sp-2)}
  html body .lf-grid #fm{display:none}
}
@media(max-width:640px){html body .lf-mo-pop .mo-i,html body .lf-mo-pop .mo-i span{text-transform:none;letter-spacing:0;color:var(--tx-strong);font-weight:var(--fw-med);font-size:var(--fs-md)}}

/* U18g — scroll jitter fix. The list is windowed (spacers + measured heights); a card's 8px top margin collapsed OUT of its wrapper, so each wrapper measured 8px less than it really took.
   Every window change then moved the page by 8px × rows above → the screen shook while scrolling. flow-root keeps the margin inside the measured height. All screen sizes. */
.pv-i{display:flow-root}
.pv-host{overflow-anchor:none}
