/* T4 franchise demo: Inspinia / Bootstrap-3 look of the real portal. */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:'Open Sans',Arial,sans-serif;font-size:13px;color:#676a6c;background:#f3f3f4}
a{color:#117a65}
button,input,select,textarea{font-family:inherit;font-size:inherit}
.muted{color:#666;font-size:12px}
.nowrap{white-space:nowrap}
[hidden]{display:none!important}

/* ---------- shell */
.app{display:flex;min-height:100vh}
.side{width:220px;background:#2f4050;color:#a7b1c2;flex-shrink:0}
.side a{display:block;color:#a7b1c2;text-decoration:none}
.side .side-sec{padding:13px 22px;font-weight:600;color:#fff;background:#293846;border-left:4px solid #19aa8d;margin-top:8px}
.side a.sub{padding:9px 22px 9px 50px;background:#293846;font-weight:400}
.side a.sub:hover{color:#fff}
.side a.sub.on{color:#fff;font-weight:600}
.side-note{margin:18px 14px;padding:10px 12px;border:1px dashed #5d7286;border-radius:4px;font-size:12px;line-height:1.5;color:#c8d0da}
.logo{text-align:center;padding:16px 10px 8px}
.logo-c{width:92px;height:92px;border-radius:50%;background:#2bb3a4;color:#fff;font:italic 600 38px/92px Georgia,serif;margin:0 auto}
.branch{color:#fff;font-weight:600;margin-top:8px}
.side-backdrop{display:none}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;gap:12px;padding:10px 20px;background:#f3f3f4;border-bottom:1px solid #e7eaec;flex-wrap:wrap}
.burger{background:#128070;color:#fff;border:0;border-radius:3px;padding:6px 13px;font-size:17px;cursor:pointer;display:none}
.acting{display:flex;align-items:center;gap:6px;background:#fff;border:2px solid #1ab394;border-radius:20px;padding:3px 6px 3px 12px}
.acting label{font-weight:700;color:#2f4050}
.acting select{border:0;background:#e8f7f3;border-radius:14px;padding:4px 8px;font-weight:700;color:#0b5e4e;cursor:pointer}
.demo-badge{background:#fff3cd;color:#7a5b00;border:1px solid #f0d98a;border-radius:3px;padding:3px 8px;font-size:12px;font-weight:600}
.logout-form{margin-left:auto}
.logout{background:none;border:0;color:#555;font-size:14px;cursor:pointer;padding:6px}
.logout:hover{color:#2f4050}
.pagehead{background:#fff;padding:14px 24px;display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid #e7eaec;flex-wrap:wrap}
.pagehead h2{font-weight:300;font-size:24px;margin:0;color:#676a6c}
.content{padding:18px 24px;flex:1;min-width:0}
.ibox{background:#fff;border-top:3px solid #e7eaec;padding:16px}
.intro{margin:0 0 12px}

/* ---------- buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:3px;padding:7px 13px;font-size:13px;color:#fff;cursor:pointer;text-decoration:none;line-height:1.3;white-space:nowrap}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn-primary{background:#128070;border-color:#128070}.btn-primary:hover:not(:disabled){background:#0e6b5d}
.btn-info{background:#0f7f80;border-color:#0f7f80}
.btn-warning{background:#f8ac59;border-color:#f8ac59}
.btn-blue{background:#1a6fa8;border-color:#1a6fa8}
.btn-default{background:#fff;color:#555;border-color:#d5d9dc}.btn-default:hover{background:#f5f5f5}
.btn.sm{padding:5px 10px;font-size:12px}
.btn.big{padding:11px 16px;font-size:15px;font-weight:700}
.pill{border-radius:10px;padding:1px 8px;font-size:11px;font-weight:700;margin-left:2px}
.pill.warn{background:#f8ac59;color:#3d2600}.pill.today{background:#fff;color:#0b5e4e}.pill.none{background:rgba(255,255,255,.25)}

/* ---------- filters */
.filters{margin-bottom:12px}
.frow{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.fl{font-weight:700;color:#555;display:inline-flex;align-items:center;gap:6px}
.filters input,.filters select,.bulkbar select{border:1px solid #d5d9dc;padding:6px 8px;border-radius:2px;background:#fff;font-weight:400;color:#333}
.search-row{display:flex;gap:8px;margin-bottom:10px}
.search-row input{flex:1;max-width:420px;border:1px solid #d5d9dc;padding:8px 10px;border-radius:2px}
.fbox{background:#dff0d8;border:1px solid #c3e6cb;padding:12px 14px;display:flex;gap:10px 14px;flex-wrap:wrap;align-items:center;border-radius:2px}
.flash{padding:9px 12px;border-radius:3px;margin:10px 0;font-weight:600}
.flash.ok{background:#e8f7f3;border:1px solid #9fdcca;color:#0b5e4e}

/* ---------- list */
.bulkbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #e7eaec}
.bulkbar .total{margin-left:auto;color:#666}
.bulk-ctrls{display:contents}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse}
th{text-align:left;padding:10px 8px;border-bottom:1px solid #e7eaec;font-weight:700;color:#676a6c;vertical-align:bottom}
td{padding:10px 8px;border-top:1px solid #e7eaec;vertical-align:top}
table.leads tbody tr:hover td{background:#f7fbfa}
table.leads tr.sel td{background:#eef9f6}
td.cb,th.cb{width:30px}
td.num{text-align:center}
td.email{word-break:break-all;min-width:120px}
td.lastnote{max-width:180px;color:#666}
td.tier-cell{width:130px;min-width:130px}
.tier{display:inline-block;background:#0e8a80;color:#fff;padding:4px 7px;font-size:12px;border-radius:2px;line-height:1.35}
.tier.sm{font-size:11px;padding:3px 6px;font-weight:700}
.src{color:#d0343f;font-weight:700}
.lead-name{color:#333;font-weight:600;text-decoration:none}.lead-name:hover{text-decoration:underline}
.tagline{margin-top:4px;display:flex;flex-wrap:wrap;gap:3px}
.tagchip{font-size:11px;background:#f1f3f5;border:1px solid #dde2e6;border-radius:9px;padding:0 6px;color:#555;white-space:nowrap}
.wa-soon{color:#aaa}
.empty{text-align:center;color:#666;padding:24px}
.pager{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin-top:16px}
.pager .gap{padding:7px 4px}
.pager .cur{cursor:default}

.mob-only{display:none!important}
.cards{display:none}

/* ---------- details window (desktop modal) */
body.modal-open{overflow:hidden}
.modal-root{display:none}
.modal-root.open{display:block;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:50}
.dm{position:absolute;top:5vh;top:5dvh;left:50%;transform:translateX(-50%);width:min(1240px,96vw);height:90vh;height:90dvh;background:#fff;border-radius:4px;box-shadow:0 8px 30px rgba(0,0,0,.35);display:flex;flex-direction:column}
.dm-head{padding:12px 18px;border-bottom:1px solid #e5e5e5;display:flex;align-items:center;gap:12px}
.dm-title{flex:1;min-width:0}
.dm-head h4{margin:0;font-size:18px;color:#2f4050;font-weight:600}
.acting-note{font-size:12px;color:#555;background:#e8f7f3;border-radius:12px;padding:3px 10px}
.dm-x{background:#fff;border:1px solid #ddd;border-radius:3px;width:34px;height:34px;font-size:16px;cursor:pointer;color:#555}
.dm-flash{padding:7px 18px;font-weight:600;font-size:13px}
.dm-flash.ok{background:#e8f7f3;color:#0b5e4e}
.dm-flash.err{background:#fdecea;color:#8a1f1f}
.dm-body{flex:1;min-height:0;display:grid;grid-template-columns:1fr 430px}
.dm-left{padding:14px 18px;overflow-y:auto}
.dm-left label{font-weight:700;color:#555;margin-right:4px}
.dm-left label.blk{display:block;margin-bottom:4px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px}
.grid3>*{min-width:0}
.info{line-height:1.6}
.info>div{min-width:0}
.wrap-any{overflow-wrap:anywhere}
.mt{margin-top:12px}
.grid3 select,.cb-form select{width:100%;max-width:100%;border:1px solid #d5d9dc;padding:6px;margin-top:3px;background:#fff;color:#333;border-radius:2px}
.tags{display:flex;gap:6px 18px;flex-wrap:wrap}
.tagbox{font-weight:400!important;cursor:pointer;white-space:nowrap;display:inline-flex;align-items:center;gap:5px}
.tagbox input{width:16px;height:16px;vertical-align:-3px}
.nt{width:100%;border-collapse:collapse;font-size:12.5px;margin-top:14px}
.nt th{background:#f5f5f6;padding:7px;border:1px solid #e7eaec}
.nt td{padding:7px;border:1px solid #e7eaec;vertical-align:top}
.nt .c-date{width:128px;white-space:nowrap}.nt .c-staff{width:96px}.nt .c-ed{width:58px;text-align:center}
.nt .c-text{white-space:pre-wrap;overflow-wrap:anywhere;color:#333}
.nt tr.sys-row td{background:#f6f7f8;color:#666}
.nt .edit-row td{background:#fffbea}
.edit-form textarea{width:100%;border:1px solid #d5d9dc;padding:6px}
.edit-btns{display:flex;gap:6px;margin-top:6px}
.icon-btn{background:none;border:1px solid transparent;border-radius:3px;cursor:pointer;font-size:14px;padding:2px 6px;color:#555}
.icon-btn:hover{border-color:#ccc;background:#fafafa}
.icon-btn .lbl{display:none}
.callout{margin-top:10px;background:#fff8e1;border:1px solid #f0e2b0;padding:7px 10px;border-radius:3px;color:#5c4400}
.cb-row{align-items:end}
.inline{display:flex;gap:6px;align-items:center}
.inline select{flex:1}
.qn2{display:flex;gap:6px;align-items:flex-end}
.note-form textarea{width:100%;height:70px;margin-top:10px;border:1px solid #d5d9dc;padding:8px;resize:vertical;color:#333}
.history{margin-top:14px;border:1px solid #e7eaec;border-radius:3px}
.history summary{padding:8px 10px;cursor:pointer;font-weight:700;color:#2f4050;background:#fafbfc}
.hist{font-size:12px}.hist th,.hist td{padding:6px 10px}
.howtag{font-size:11px;background:#eef1f4;border-radius:8px;padding:0 6px;color:#555}
.dm-right{border-left:1px solid #e5e5e5;display:flex;flex-direction:column;min-height:0;background:#efeae2}
.wa-title{background:#128070;color:#fff;font-weight:700;padding:11px 14px;display:flex;justify-content:space-between;align-items:center}
.soon{background:#fff;color:#0b5e4e;border-radius:10px;padding:1px 8px;font-size:11px}
.wa-ph{flex:1;display:flex;align-items:center;justify-content:center;padding:20px}
.wa-card{background:#fff;border-radius:8px;padding:22px 20px;text-align:center;max-width:320px;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.wa-card h5{margin:6px 0 8px;font-size:16px;color:#2f4050}
.wa-card p{margin:6px 0;line-height:1.5;color:#555}
.wa-ic{font-size:34px}
.wa-composer{display:flex;gap:8px;padding:10px;background:#f0f2f5}
.wa-composer input{flex:1;border:0;border-radius:18px;padding:9px 14px}
.dm-foot{padding:10px 18px;border-top:1px solid #e5e5e5;display:flex;justify-content:flex-end;gap:8px}
/* Delete: red AND a trash icon AND the word, never colour alone. Kept apart on the left. */
.btn-danger{background:#c9302c;border-color:#ac2925;font-weight:700}.btn-danger:hover:not(:disabled){background:#ac2925}
.foot-del{margin:0 auto 0 0;display:flex}
.dm-deleted{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 18px;background:#fdecea;color:#8a1f1f;border-bottom:2px solid #c9302c;font-size:13px}
.dm-deleted form{margin:0}
.nt-hint{margin:14px 0 -6px}
.sheet-only{display:none!important}
.desk-inline{display:inline}

/* ---------- logs */
.viewtabs{display:flex;gap:4px;border-bottom:2px solid #e7eaec;margin-bottom:12px}
.viewtabs a{padding:8px 14px;text-decoration:none;color:#666;font-weight:600;border-bottom:3px solid transparent;margin-bottom:-2px}
.viewtabs a.on{color:#0b5e4e;border-bottom-color:#1ab394}
table.log tr.done td{color:#999}

/* ---------- login */
.login-body{display:flex;align-items:center;justify-content:center;min-height:100vh;background:#2f4050;padding:16px}
.login-card{background:#fff;border-radius:6px;padding:28px 26px;width:100%;max-width:360px;text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.3)}
.login-card h1{font-size:22px;font-weight:600;color:#2f4050;margin:12px 0 4px}
.login-card form{text-align:left;margin-top:14px;display:flex;flex-direction:column;gap:6px}
.login-card label{font-weight:700;color:#555;margin-top:6px}
.login-card input{border:1px solid #d5d9dc;padding:11px;border-radius:3px;font-size:16px}
.login-card .btn{margin-top:14px;width:100%}
.login-error{background:#fdecea;color:#8a1f1f;padding:8px;border-radius:3px;font-weight:600}

/* ---------- smaller screens: sidebar slides in */
@media (max-width:1199px){
  .burger{display:inline-block}
  .side{position:fixed;top:0;left:0;bottom:0;z-index:40;transform:translateX(-100%);transition:transform .2s;overflow-y:auto}
  body.side-open .side{transform:none}
  body.side-open .side-backdrop{display:block;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:39}
}
@media (max-width:1100px){
  .dm-body{grid-template-columns:1fr 320px}
  .grid3.info{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- tablet & phone: card list + bottom sheet with tabs */
@media (max-width:900px){
  html,body{overflow-x:hidden}
  .content{padding:12px}
  .ibox{padding:12px}
  .desk-only{display:none!important}
  .mob-only{display:inline-flex!important}
  .cards{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px;margin-top:12px}
  .mcard{background:#fff;border:1px solid #e3e6e8;border-radius:8px;padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.08);line-height:1.6}
  .mcard.sel{border-color:#1ab394}
  .mrow{display:flex;align-items:flex-start;gap:8px}
  .mcb input{width:20px;height:20px;margin:2px 0 0}
  .mname{flex:1;font-weight:700;color:#222;font-size:15px;text-decoration:none}
  .mline{color:#555}.mline .email{word-break:break-all;color:#117a65}
  .mmeta{color:#666;font-size:12px}
  .srcchip{background:#e8eefc;color:#2a4aa8;border-radius:8px;padding:0 6px;font-weight:700}
  .mnote{color:#666;font-style:italic;font-size:12px;border-top:1px solid #f0f0f0;margin-top:6px;padding-top:6px}
  .mact{display:flex;justify-content:flex-end;margin-top:8px}
  .mact .btn{padding:10px 16px;font-size:14px;font-weight:700}
  .filters:not(.more-open) .phone-more{display:none!important}
  .bulkbar{display:grid;grid-template-columns:auto 1fr;gap:8px 10px}
  .bulkbar .total{grid-column:1/-1;text-align:right}
  #bulk:not(.bulk-open) .bulk-ctrls{display:none!important}
  .bulk-ctrls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;grid-column:1/-1;background:#f5f8fa;border:1px solid #e3e6e8;border-radius:6px;padding:10px}
  #bulk:not(.bulk-open) .bulkbar{grid-template-columns:auto 1fr}
  #bulk:not(.bulk-open) .bulkbar .total{grid-column:auto;align-self:center}
  .bulk-ctrls .fl{width:100%;justify-content:space-between}.bulk-ctrls .fl select{flex:1}
  .bulk-ctrls .btn-blue{width:100%;padding:10px}
  .fbox .fl{width:100%;justify-content:space-between}
  .fbox .fl input,.fbox .fl select{flex:1;max-width:60%}
  .search-row{flex-wrap:wrap}
  .search-row input{max-width:none;font-size:16px;flex:1 1 100%}
  .search-row .btn{flex:1;padding:10px}
  .bulkbar .total{width:100%;margin-left:0}

  .modal-root.open{background:rgba(0,0,0,.35)}
  .dm{top:auto;bottom:0;left:0;right:0;transform:none;width:100%;max-width:760px;margin:0 auto;height:calc(100% - 60px);border-radius:14px 14px 0 0}
  .dm-head{padding:14px 14px 10px;align-items:flex-start}
  .dm-head h4{font-size:19px}
  .desk-inline,.desk-inline-block{display:none!important}
  .sheet-only{display:block!important}
  .sheet-sub{margin-top:5px;display:flex!important;flex-wrap:wrap;gap:6px;align-items:center}
  .acting-note{display:none}
  .dm-x{width:40px;height:40px;font-size:18px}
  .sheet-quick{display:grid!important;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px 14px}
  .sheet-quick .btn{min-height:48px;font-size:16px}
  .sheet-quick small{font-weight:400;font-size:11px}
  .sheet-tabs{display:flex!important;border-bottom:1px solid #e5e5e5}
  .sheet-tabs button{flex:1;background:none;border:0;border-bottom:3px solid transparent;padding:11px 0;font-weight:700;color:#666;font-size:14px;cursor:pointer}
  .sheet-tabs button.on{color:#0b5e4e;border-bottom-color:#1ab394}
  .dm-body{display:flex;flex-direction:column;overflow-y:auto}
  .dm-left{overflow:visible;padding:12px 14px}
  .pane{display:none!important}
  .pane.on{display:block!important}
  .dm-right.pane.on{display:flex!important;flex:1;min-height:360px;border-left:0}
  .grid3,.grid3.info{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .grid3 select,.cb-form select{padding:9px;font-size:16px}
  .tags{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .tagbox{border:1px solid #e3e6e8;border-radius:6px;padding:9px 8px;white-space:normal;display:flex}
  .tagbox input{width:20px;height:20px;flex-shrink:0;margin:0}
  .nt{margin-top:0}
  .nt thead{display:none}
  .nt,.nt tbody{display:block}
  .nt tr{display:grid;grid-template-columns:1fr auto auto;border:1px solid #e7eaec;border-radius:6px;margin-bottom:8px;overflow:hidden}
  .nt td{border:0;padding:4px 10px}
  .nt .c-date{grid-column:1;grid-row:1;padding-top:8px;font-weight:700;color:#2f4050;width:auto}
  .nt .c-staff{grid-column:2/4;grid-row:1;padding-top:8px;text-align:right;width:auto}
  .nt .c-text{grid-column:1/4;grid-row:2;font-size:14px}
  .nt .c-ed{grid-row:3;width:auto;padding-bottom:8px}
  .nt td.c-ed:nth-of-type(4){grid-column:2}.nt td.c-ed:nth-of-type(5){grid-column:3}
  .nt tr.edit-row{display:block}.nt tr.edit-row[hidden]{display:none!important}.nt tr.edit-row td{display:block;padding:10px}
  .nt td.empty{grid-column:1/4}
  .nt tr.sys-row td.c-ed{display:none}
  .nt tr.sys-row .c-text{padding-bottom:8px}
  .icon-btn{border-color:#d5d9dc;padding:6px 10px;font-size:13px}
  .icon-btn .lbl{display:inline}
  .cb-row{grid-template-columns:1fr}
  .qn2{flex-wrap:wrap}.qn2 form{flex:1}.qn2 .btn{width:100%;padding:11px 10px}
  .inline select{flex:0 0 76px}.inline .btn{flex:1;padding:10px}
  .note-form textarea{height:110px;font-size:16px}
  .note-form .btn{width:100%;margin-top:8px}
  .dm-foot{padding:10px 14px}
  .dm-foot .btn{flex:1;padding:11px;font-size:15px}
  .dm-foot .foot-del{flex:1;margin:0}
  .dm-deleted{padding:8px 14px}
  .nt-hint{margin:0 0 8px}
  .hist thead{display:none}
}

@media (max-width:600px){
  .topbar{padding:8px 12px;gap:8px}
  .demo-badge{display:none}
  .acting{padding:2px 4px 2px 10px}
  .acting label{font-size:12px}
  .pagehead{padding:10px 12px}
  .pagehead h2{font-size:20px}
  .pagehead .btn{padding:7px 10px}
  .content{padding:8px}
  .ibox{padding:10px}
  .frow{gap:8px}
  .frow .fl{width:100%;justify-content:space-between}
  .frow .fl select,.frow .fl input{flex:1;max-width:65%}
  .cards{grid-template-columns:1fr}
  .dm{height:calc(100% - 52px)}
  table.log thead{display:none}
  table.log tr{display:block;border:1px solid #e7eaec;border-radius:6px;margin-bottom:8px;padding:4px 0}
  table.log td{display:block;border:0;padding:3px 10px}
  table.log td[aria-hidden]{display:none}
}

/* ---------- WhatsApp (Phase 2): chat panel, list column, badges. Status is always words/icons, never colour alone. */
.wa-title{gap:8px}
.wa-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wa-callform{margin:0;flex-shrink:0}
.wa-call{font-weight:600}
/* Call permission (words + icon, never colour alone). */
.wa-title{flex-wrap:wrap}
.wa-t{flex:1 1 auto}
.wa-perm{background:#fff;color:#0b5e4e;border:1px solid #b9e4d8;border-radius:10px;padding:1px 9px;font-size:12px;font-weight:600;white-space:nowrap}
.wa-perm-declined,.wa-perm-expired{color:#5a2a00;border-color:#e8c9a8}
.callperm-badge{display:inline-block;border-radius:10px;padding:0 8px;font-size:11.5px;font-weight:700;vertical-align:1px;white-space:nowrap;background:#e8f6f1;color:#0b5e4e;border:1px solid #b9e4d8}
.callperm-declined,.callperm-expired{background:#fdf3e8;color:#5a2a00;border-color:#e8c9a8}
.wa-live{flex:1;min-height:0;display:flex;flex-direction:column}
.wa-msgs{flex:1;min-height:0;overflow-y:auto;padding:12px 12px 8px;display:flex;flex-direction:column;gap:6px}
.wa-day{align-self:center;margin:6px 0 2px}
.wa-day span{background:#fff;border-radius:8px;padding:2px 12px;font-size:12px;color:#555;box-shadow:0 1px 1px rgba(0,0,0,.08)}
.bubble{max-width:84%;padding:7px 10px 5px;border-radius:8px;box-shadow:0 1px 1px rgba(0,0,0,.13);color:#222;font-size:13.5px;line-height:1.42}
.bubble.out{align-self:flex-end;background:#d9fdd3;border-top-right-radius:2px}
.bubble.in{align-self:flex-start;background:#fff;border-top-left-radius:2px}
.bubble.failed{background:#fdecea;border:1px solid #f1b0ab}
.wa-label{font-size:11.5px;font-weight:700;color:#0b5e4e;margin-bottom:2px}
.wa-text{white-space:pre-wrap;overflow-wrap:anywhere}
.wa-doc{background:rgba(0,0,0,.06);border-radius:6px;padding:7px 9px;margin:2px 0 4px;font-weight:600;overflow-wrap:anywhere}
.wa-err{color:#8a1f1f;font-size:12px;margin-top:4px;font-weight:600}
.wa-meta{font-size:11px;color:#667;text-align:right;margin-top:2px}
.wa-by{font-weight:600}
.tick-read{color:#1c6fb0;font-weight:700}
.tick-delivered{font-weight:600}
.wa-empty{margin:auto;text-align:center;background:#fff;border-radius:8px;padding:18px 16px;max-width:300px;box-shadow:0 1px 2px rgba(0,0,0,.12);line-height:1.5}
.wa-empty p{margin:6px 0}
.wa-window{padding:7px 12px;font-size:12.5px;border-top:1px solid #eadfb4;line-height:1.4}
.wa-window.open{background:#fff8e1;color:#5c4400}
.wa-window.closed{background:#eef1f4;color:#2f4050;border-top-color:#dde2e6;font-weight:600}
.wa-composer{align-items:flex-end}
.wa-composer textarea{flex:1;border:0;border-radius:18px;padding:9px 14px;resize:none;min-height:40px;max-height:150px;color:#222;line-height:1.4;font-size:13.5px}
.wa-composer textarea:disabled{background:#e4e7ea;color:#666;cursor:not-allowed}
.wa-actions{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px 10px;background:#f0f2f5;align-items:center}
.wa-actions form{margin:0}
.wa-note{padding:8px 12px;font-size:12.5px;line-height:1.45}
.wa-demo{background:#fff3cd;color:#5c4400;border-bottom:1px solid #f0d98a}
.wa-blocked{background:#fdecea;color:#8a1f1f;border-bottom:2px solid #c9302c;display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.wa-blocked form{margin:0}
.linkish{background:none;border:0;color:#8a1f1f;cursor:pointer;font-size:12px;text-decoration:underline;padding:4px}
.wa-dnm{margin-left:auto!important}
.testbadge,.dnm-badge{display:inline-block;border-radius:10px;padding:0 7px;font-size:11px;font-weight:700;vertical-align:2px;white-space:nowrap}
.testbadge{background:#fff3cd;color:#7a5b00;border:1px solid #e0c060}
.dnm-badge{background:#fdecea;color:#8a1f1f;border:1px solid #f1b0ab}
.nt tr.wa-row td{background:#eaf7e8;color:#35553a}
td.wa-col{white-space:nowrap;font-size:12px}
.wa-new{background:#128070;color:#fff;border-radius:10px;padding:2px 8px;font-weight:700}
.wa-block,.wa-fail{color:#8a1f1f;font-weight:700}
.wa-read{color:#1c6fb0;font-weight:600}
.wa-noreply{color:#8a6d00}
.wa-none{color:#666}
.mwa{font-size:12.5px}
@media (max-width:900px){
  .dm-right.pane.on .wa-live{min-height:300px}
  .dm.tab-wa .dm-foot,.dm.tab-wa .dm-left{display:none}
  .wa-why{font-size:11.5px}
  .dm-right .wa-title{padding:6px 12px;background:#f0f2f5;justify-content:flex-end}
  .dm-right .wa-t{display:none}
  .wa-composer textarea{font-size:16px}
  .wa-actions .btn{padding:8px 10px;font-size:13px}
  .bubble{font-size:15px}
}

/* ---------- Franchise Today (Phase 3). Status is always words/icons, never colour alone. */
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.flash.err{background:#fdecea;border:1px solid #f1b0ab;color:#8a1f1f}
.today .flash{margin:0 0 10px}
.today-head h2{font-weight:400}
.strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.tile{background:#fff;border-radius:4px;padding:9px 14px;border-top:3px solid #1ab394;display:flex;align-items:center;gap:10px;flex-wrap:wrap;text-decoration:none;color:#555;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.tile:hover{background:#f7fbfa}
.tile b{font-size:24px;color:#2f4050;min-width:20px;line-height:1.2}
.tile span{font-weight:600;font-size:14px}
.tile.on{outline:3px solid #2f4050;outline-offset:-3px;background:#eef9f6}
.tile-on{flex-basis:100%;font-style:normal;font-size:11.5px;font-weight:700;color:#0b5e4e}
.split{display:grid;grid-template-columns:320px minmax(0,1fr);height:calc(100vh - 222px);min-height:540px;background:#fff;border:1px solid #e7eaec}
.today:has(> .flash) .split{height:calc(100vh - 272px)}
.today-wa .wa-why{display:none}
.queue{border-right:1px solid #e7eaec;overflow-y:auto;min-height:0}
.qall{display:block;padding:8px 12px;font-weight:600}
.qsec{background:#f3f6f7;padding:8px 12px;font-weight:800;color:#2f4050;font-size:12.5px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:1;border-bottom:1px solid #e7eaec}
.qn{background:#2f4050;color:#fff;border-radius:9px;padding:0 8px;font-size:12px}
.qi{display:flex;align-items:center;border-bottom:1px solid #f0f0f0;border-left:4px solid transparent}
.qi:hover{background:#f7fbfa}
.qi.on{background:#eef9f6;border-left-color:#1ab394}
.qlink{flex:1;min-width:0;display:flex;gap:9px;align-items:center;padding:9px 6px 9px 8px;text-decoration:none;color:inherit}
.av{width:36px;height:36px;border-radius:50%;background:#d8e4ea;color:#2f4050;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.qt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.lrow{display:flex;justify-content:space-between;gap:6px;align-items:baseline;min-width:0}
.qname{color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.qago{color:#666;font-size:11.5px;white-space:nowrap}
.why{color:#555;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.who{color:#0b5e4e;font-size:11.5px;font-weight:700;white-space:nowrap}
.qt .wa-new{font-size:11px;padding:0 7px}
.qb{display:flex;gap:5px;padding-right:8px;flex-shrink:0}
.ib{border:1.5px solid #1ab394;background:#fff;border-radius:50%;width:34px;height:34px;font-size:15px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.ib:hover{background:#e8f7f3}
.qempty{padding:10px 14px;color:#666;font-size:12.5px}
.qmore{display:block;padding:8px 14px;font-weight:600;border-bottom:1px solid #f0f0f0}
.lead-view{display:grid;grid-template-columns:430px minmax(0,1fr);min-height:0;min-width:0}
.lead-view.lv-empty{display:flex;align-items:center;justify-content:center;background:#efeae2}
.lv-head,.lv-tabs,.lv-tools{display:none}
.lv-body{display:contents}
.lv-chat{display:flex;flex-direction:column;min-height:0;min-width:0;background:#efeae2}
.chat-head{background:#fff;padding:9px 14px;border-bottom:1px solid #e7eaec;display:flex;justify-content:space-between;gap:8px 12px;align-items:center;flex-wrap:wrap}
.ch-info{min-width:0;flex:1 1 240px;line-height:1.6}
.ch-name{color:#2f4050;font-size:15px}
.ch-sub{font-size:12px;color:#666}
.claim{font-weight:700;white-space:nowrap;color:#0b5e4e}
.claim.none{color:#666;font-weight:600}
.callbar{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.callbar .btn{font-weight:700;padding:8px 11px;font-size:13.5px}
.callbar small{font-weight:400;font-size:11px}
.claim-form{margin:0;display:inline-flex}
.outcomes{background:#fff;border-bottom:1px solid #e7eaec;padding:6px 10px 7px}
.outcomes.called{background:#fff8e1;box-shadow:inset 5px 0 #f8ac59}
.outcomes.called .oc-title b::after{content:"  \2190  tap one now";color:#7a5b00}
.oc-title{font-size:12.5px;color:#2f4050;margin-bottom:5px}
.oc-btns{display:flex;flex-wrap:wrap;gap:5px}
.oc-btns form{margin:0;display:flex;gap:4px;align-items:center}
.oc{font-weight:700;font-size:12.5px;padding:5px 8px}
.desk-outcomes .oc-title .muted{display:none}
.oc-date input{border:1px solid #d5d9dc;border-radius:3px;padding:4px 5px;color:#333;font-size:12.5px;background:#fff;width:116px}
.today-wa{flex:1;min-height:0;display:flex;flex-direction:column}
.lv-notes{border-left:1px solid #e7eaec;display:flex;flex-direction:column;min-height:0;background:#fff;padding:10px 12px;overflow-y:auto}
.note-warn{background:#fff8e1;border:1px solid #f0e2b0;color:#5c4400;font-size:12.5px;padding:7px 9px;border-radius:4px;margin-bottom:8px;line-height:1.45;flex-shrink:0}
.ncards{flex:1;min-height:110px;overflow-y:auto;padding-right:2px}
.ncard{background:#fffbea;border-left:4px solid #f8ac59;border-radius:4px;padding:6px 9px;margin:0 0 7px;font-size:12.5px;color:#333;line-height:1.45}
.ncard.nsys{background:#f4f6f7;border-left-color:#c7ced4;color:#666}
.nh{font-size:11.5px;color:#7a5b00;margin-bottom:1px}
.ncard.nsys .nh{color:#666}
.ntext{white-space:pre-wrap;overflow-wrap:anywhere}
.addnote{margin-top:6px;flex-shrink:0}
.addnote textarea{width:100%;height:58px;border:1px solid #e0d6a8;border-radius:4px;padding:7px;background:#fffef5;resize:vertical;color:#333}
.an-row{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-top:5px;flex-wrap:wrap}
.an-remind{font-weight:600;color:#555;display:flex;gap:6px;align-items:center}
.an-remind select{border:1px solid #d5d9dc;padding:5px;border-radius:3px;background:#fff;color:#333}
.btn-warning{color:#3d2600;font-weight:700}
.lv-notes .callout{flex-shrink:0;font-size:12.5px}
.tierbox{border-top:1px solid #eee;margin-top:8px;padding-top:8px;flex-shrink:0}
.tb-btns{display:flex;gap:6px;margin-top:5px;flex-wrap:wrap}
.tb-btns form{margin:0}
.tb-btns .btn{font-weight:700}
.tb-hint{margin-top:4px}
.inline-note{align-self:center;background:#fffbea;border:1.5px dashed #c98a2b;color:#5c4813;border-radius:6px;padding:5px 10px;margin:3px auto;font-size:12.5px;max-width:88%;line-height:1.4}
.in-text{white-space:pre-wrap;overflow-wrap:anywhere}
.dm-claim{font-size:12px;font-weight:400;margin-left:6px}
.dm .outcomes{border:1px solid #e7eaec;border-radius:4px;margin-top:12px}
@media (max-width:1199px){
  .split{grid-template-columns:300px minmax(0,1fr);height:calc(100vh - 214px)}
  .today:has(> .flash) .split{height:calc(100vh - 264px)}
  .lead-view{grid-template-columns:360px minmax(0,1fr)}
  .callbar small{display:none}
}

/* Phone + tablet: 2x2 counts, big list, full-screen lead with tabs */
@media (max-width:900px){
  body:has(.today.lead-open){overflow:hidden}
  .strip{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
  .tile{padding:10px 12px;gap:8px}
  .tile span{font-size:14.5px}
  .split{display:block;height:auto;min-height:0;border:0;background:none}
  .queue{border:1px solid #e7eaec;background:#fff;overflow:visible}
  .qsec{position:static;font-size:14.5px;padding:10px 12px}
  .qn{font-size:13px;padding:1px 9px}
  .qlink{padding:12px 6px 12px 10px;gap:11px}
  .av{width:44px;height:44px;font-size:17px}
  .qname{font-size:15.5px}
  .qago{font-size:13px}
  .why{font-size:14px;white-space:normal}
  .who{font-size:13px}
  .lrow{flex-wrap:wrap}
  .ib{width:48px;height:48px;font-size:20px}
  .qb{gap:7px}
  .qempty,.qmore,.qall{font-size:14px;padding:12px 14px}
  .lead-view{display:none}
  .today:not(.lead-open) .qi.on{background:#fff;border-left-color:transparent}
  .today.lead-open .lead-view{display:flex;flex-direction:column;position:fixed;inset:0;z-index:45;background:#fff}
  .today.lead-open .lead-view.lv-empty{display:none}
  .lv-head{display:flex;align-items:center;gap:8px;background:#128070;color:#fff;padding:9px 12px;flex-shrink:0}
  .lv-back{color:#fff;font-size:26px;line-height:1;text-decoration:none;padding:4px 12px 6px 2px;font-weight:700}
  .lv-name{flex:1;font-weight:700;font-size:17px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .lv-call{background:#fff;color:#0b5e4e;font-weight:700;border-radius:20px;padding:9px 16px;text-decoration:none;font-size:15px;white-space:nowrap}
  .lv-tabs{display:flex;border-bottom:1px solid #e5e5e5;background:#fff;flex-shrink:0}
  .lv-tabs a{flex:1;text-align:center;padding:12px 0;font-weight:700;color:#666;text-decoration:none;border-bottom:3px solid transparent;font-size:15px}
  .today.tab-chat [data-ttab=chat],.today.tab-notes [data-ttab=notes],.today.tab-tools [data-ttab=tools]{color:#0b5e4e;border-bottom-color:#1ab394}
  .lv-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto}
  .tpane{display:none!important}
  .today.tab-chat .lv-chat{display:flex!important;flex:1;min-height:0}
  .today.tab-notes .lv-notes{display:block!important;border-left:0;padding:12px 14px}
  .today.tab-tools .lv-tools{display:block!important;padding:12px 14px}
  .chat-head,.desk-outcomes,.desk-tier{display:none}
  .today-wa .wa-title{padding:6px 12px;background:#f0f2f5;justify-content:flex-end}
  .today-wa .wa-t{display:none}
  .note-warn{font-size:14px;padding:9px 11px}
  .ncards{overflow:visible;min-height:0}
  .ncard{font-size:15px;padding:9px 11px}
  .nh{font-size:13px}
  .addnote textarea{font-size:16px;height:100px}
  .an-remind{font-size:14px}
  .an-remind select{font-size:16px;padding:8px}
  .an-row .btn{padding:11px 18px;font-size:15px}
  .lv-notes .callout{font-size:14px}
  .tools-sec{margin-bottom:6px}
  .tools-who{font-size:15px;margin-bottom:8px}
  .tools-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .tools-row .claim-form,.tools-row .claim-form .btn{width:100%}
  .tools-row .btn{min-height:50px;white-space:normal}
  .tools-row .btn-blue{flex-direction:column;gap:0}
  .tools-row small{font-weight:400;font-size:11px;display:block}
  .outcomes{border:1px solid #e7eaec;border-radius:8px;margin:12px 0;padding:12px}
  .oc-title{font-size:14px;margin-bottom:8px}
  .oc-btns{display:grid;grid-template-columns:1fr 1fr;gap:8px;grid-auto-flow:dense}
  .oc-btns form{display:block}
  .oc-btns form .oc{width:100%}
  .oc-btns form.oc-cb{grid-column:1/-1;display:flex;gap:8px}
  .oc-cb .oc{flex:1}
  .oc{padding:12px 8px;font-size:15px;min-height:50px}
  .oc-date input{font-size:16px;padding:11px 8px;height:50px;width:auto}
  .tierbox{border:1px solid #e7eaec;border-radius:8px;padding:12px;margin-top:0}
  .tb-btns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .tb-btns .btn{width:100%;padding:12px 6px;font-size:15px;min-height:50px;white-space:normal}
  .tools-details{width:100%;margin-top:12px;color:#2f4050!important}
  .inline-note{font-size:14px;max-width:94%}
}
@media (max-width:600px){
  .today-head .head-btns .btn-default{display:none}
  .tile b{font-size:22px}
}

/* ---------- Phase 5: score badges, status lines. Always icon + word; colour only helps. */
.score{display:inline-block;border-radius:10px;padding:1px 8px;font-size:12px;font-weight:700;white-space:nowrap;border:1px solid;vertical-align:1px}
.score.sm{font-size:11px;padding:0 7px}
.score.xs{font-size:10.5px;padding:0 6px;font-weight:700}
.score-hot{background:#fdebe4;color:#8a2a05;border-color:#e9a88f}
.score-warm{background:#fff6dc;color:#6b4f00;border-color:#e8d38c}
.score-cold{background:#eef2f6;color:#3b4a5a;border-color:#ccd5df}
.score-vip{background:#2f4050;color:#fff;border-color:#2f4050}
td .score{margin-left:4px}
.statuslines{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.sl{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#f7f9fa;border:1px solid #e7eaec;border-radius:4px;padding:6px 8px;font-size:12.5px;color:#444}
.sl form{margin:0}
.sl-main{flex:1;min-width:0}
.sl-why{color:#555}
.sl-warn{background:#fff8e1;border-color:#f0e2b0;color:#5c4400}
.sl-meet{background:#e8f4fb;border-color:#b8d8ee;color:#123d5c}
@media (max-width:900px){
  .sl{font-size:14px}
  .sl .btn{padding:9px 12px;font-size:14px}
  .score.xs{font-size:12px}
}
.flagchip{display:inline-block;margin-left:4px;font-size:11px;font-weight:700;background:#fff8e1;color:#5c4400;border:1px dashed #c9a43a;border-radius:9px;padding:0 6px;white-space:nowrap}
/* saved filter chips: one row, tap again to clear; "on" shows a tick + outline, not colour alone */
.chips{display:flex;gap:6px;flex-wrap:wrap;margin:2px 0 10px}
.chip{display:inline-flex;align-items:center;gap:5px;border:1px solid #d5d9dc;background:#fff;color:#2f4050;border-radius:16px;padding:5px 11px;font-weight:600;font-size:12.5px;text-decoration:none;white-space:nowrap}
.chip b{background:#eef1f4;border-radius:9px;padding:0 6px;font-size:11.5px;color:#2f4050}
.chip:hover{background:#f5f8fa}
.chip.on{border:2px solid #2f4050;background:#eef9f6;padding:4px 10px}
@media (max-width:900px){
  .chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .chip{padding:9px 13px;font-size:14px}
}
/* Today: 5 tiles (📅 Meetings this week) */
.strip{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:900px){.strip{grid-template-columns:1fr 1fr}.strip .tile:last-child{grid-column:1/-1}}
/* booking slot picker */
.book .intro{font-size:14px}
.book .sl{margin-bottom:8px}
.slotgrid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:12px 0}
.slotday{border:1px solid #e7eaec;border-radius:6px;padding:8px;background:#fafbfc}
.slotday h3{margin:0 0 6px;font-size:14px;color:#2f4050}
.slotday form{margin:0 0 6px}
.slotbtn{width:100%;font-size:15px;font-weight:700;padding:9px 6px}
.booklink{display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-top:1px solid #eee;padding-top:12px}
.booklink form{margin:0}
@media (max-width:1100px){.slotgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:600px){.slotgrid{grid-template-columns:1fr 1fr}.slotbtn{padding:12px 6px;font-size:16px}}
/* public booking page (lead's phone) */
body.pub{background:#eef3f2;margin:0}
.pub-card{max-width:520px;margin:0 auto;background:#fff;min-height:100vh;padding:22px 16px 30px}
.pub-logo{width:64px;height:64px;font-size:26px;line-height:64px}
.pub-card h1{font-size:22px;color:#2f4050;text-align:center;margin:12px 0 4px}
.pub-sub{text-align:center;color:#555;margin:0 0 14px;font-size:14px}
.pub-step{font-weight:700;color:#2f4050;font-size:15px;margin:16px 0 8px}
.pub-day{border:1px solid #e3e6e8;border-radius:8px;margin:0 0 10px;padding:8px 10px 10px}
.pub-day legend{font-weight:700;color:#2f4050;padding:0 4px;font-size:15px}
.pub-slots{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.pub-slot{display:flex;align-items:center;justify-content:center;gap:6px;border:1.5px solid #c9d1d6;border-radius:8px;padding:11px 4px;font-size:16px;font-weight:700;color:#2f4050;cursor:pointer}
.pub-slot input{width:18px;height:18px;margin:0}
.pub-slot:has(input:checked){border:3px solid #0b5e4e;background:#e8f7f3;padding:9px 2px}
.pub-slot:has(input:checked) span::after{content:" ✓"}
.pub-confirm{width:100%;font-size:17px;padding:14px;position:sticky;bottom:10px}
.pub-done{text-align:center;font-size:16px;line-height:1.5;padding:10px 0}
.pub-big{font-size:42px}
/* reports: tables + small bar charts (one hue, every bar labelled in words) */
.rep-how{margin:8px 0 4px;font-size:12.5px}
.rep-how summary{cursor:pointer;font-weight:700;color:#2f4050}
.rep-how ul{margin:6px 0;padding-left:20px;line-height:1.6}
.rep-h{font-size:16px;color:#2f4050;margin:18px 0 8px;font-weight:600}
table.rep td,table.rep th{white-space:nowrap}
table.rep td.num{text-align:right}
tr.rep-total td{background:#f7f9fa;border-top:2px solid #d5d9dc}
.charts{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:12px;margin-top:14px}
.chartcard{margin:0;border:1px solid #e7eaec;border-radius:6px;padding:10px 12px;background:#fff}
.chartcard figcaption{font-weight:700;color:#2f4050;margin-bottom:6px;font-size:13px}
.chart{width:100%;height:auto;display:block}
.chart .c-lab{font-size:12px;fill:#444}
.chart .c-val{font-size:12px;fill:#2f4050;font-weight:600}
.chart .c-track{fill:#f0f2f4}
.chart .c-bar{fill:#1c6fb0}
.chart g:hover .c-bar{fill:#0f4f85}
@media (max-width:600px){.charts{grid-template-columns:1fr}table.rep td{display:table-cell}}
/* automation page + consent line + bulk WhatsApp */
.auto .sl{margin-bottom:8px}
.auto .head-btns form{margin:0}
.autolog td{font-size:12.5px}
.adetail{min-width:260px}
.adetail details summary{cursor:pointer;color:#117a65;font-size:12px}
.atext{white-space:pre-wrap;background:#f7f9fa;border:1px solid #e7eaec;border-radius:4px;padding:6px 8px;margin-top:4px;color:#333}
.ast{font-weight:700;white-space:nowrap}
.ast-blocked_dnm,.ast-blocked_consent,.ast-failed{color:#8a1f1f}
.ast-sent{color:#0b5e4e}
.skips{margin:6px 0 0;padding-left:20px}
.consent-form{display:inline-flex;align-items:center;gap:5px;margin:0}
.consent-form label{font-weight:600;margin:0!important}
.consent-form select{border:1px solid #d5d9dc;border-radius:3px;padding:4px 6px;background:#fff;color:#333}
.bulk-wa{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap;border-left:1px solid #e7eaec;padding-left:10px}
.usefilter{font-size:12px;display:inline-flex;gap:4px;align-items:center}
.pagehead .head-btns{display:flex;gap:8px;flex-wrap:wrap}
@media (max-width:900px){.bulk-wa{border-left:0;padding-left:0;width:100%}.bulk-wa .btn{width:100%;padding:10px}
  .consent-form select{font-size:16px;padding:8px}}
table.leads td:nth-child(2){min-width:180px}
.qt .score.xs{flex-shrink:0}
@media (max-width:900px){
  .sl .sl-main{flex-basis:100%}
  .consent-form{width:100%;justify-content:space-between}
  .consent-form select{flex:1;max-width:60%}
}

/* ---------- Polish 25 Oct: fresh-eyes QA fixes */
/* list table: fits 1440px without hiding the WhatsApp / Open columns */
table.leads th,table.leads td{padding:9px 6px}
table.leads td:nth-child(2){min-width:160px}
.cbl{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.cbl input{width:16px;height:16px;margin:0}
/* tablet landscape and phones in desktop mode (901-1199px): give the chat room in Franchise Today */
@media (min-width:901px) and (max-width:1199px){
  .split{grid-template-columns:290px minmax(0,1fr)}
  .lead-view{grid-template-columns:minmax(0,1fr) 235px}
  .qlink{gap:7px;padding-right:2px}.av{width:30px;height:30px}
  .qb{gap:4px;padding-right:6px}.qb .ib{width:42px;height:42px;font-size:17px}
}
/* phone log tables: say who did it */
@media (max-width:600px){table.log td.by::before{content:"by ";color:#666}}
/* Touch screens (phones, tablets, phones in desktop mode): every control at least 44px to tap */
@media (pointer:coarse),(max-width:900px){
  .btn,.btn.sm,.logout,.burger,.chip,.linkish,.dm-x,.icon-btn{min-height:44px}
  .btn.sm{padding:8px 12px}
  .burger{min-width:44px}
  .logout{padding:8px 10px}
  select,input[type=search],input[type=text],input[type=date],input[type=password],input:not([type]){min-height:44px}
  .acting{padding:2px 4px 2px 12px}
  .acting select{min-height:40px;padding:6px 10px}
  .ib{width:46px;height:46px;font-size:19px}
  .lv-back{min-width:44px;min-height:44px;display:inline-flex;align-items:center}
  .lv-call{min-height:44px;display:inline-flex;align-items:center}
  .viewtabs a{min-height:44px;display:inline-flex;align-items:center}
  .history summary,.rep-how summary,details.sl summary,.adetail details summary{padding-top:12px;padding-bottom:12px}
  .cbl{min-width:44px;min-height:44px}
  .mcb{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:-10px 0 -10px -10px}
  .tagbox{min-height:44px}
  .oc{min-height:44px}
  .pager .btn{min-width:44px}
  .qmore,.qall{min-height:44px;display:flex;align-items:center}
  table.log td a,table.leads .lead-name,.ch-info a,.dm-title a{display:inline-flex;align-items:center;min-height:44px}
  .consent-form select{min-height:44px}
  .wa-composer .btn{min-height:44px;min-width:64px}
  .an-remind select{min-height:44px}
  .mcard .mname,.mline a,.info a{display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  .dm-x,.icon-btn{min-width:44px}
  .usefilter{min-height:44px}
  table.log td a,table.leads .lead-name,table.rep a{min-width:44px;min-height:44px;display:inline-flex;align-items:center}
}
/* 🆕 auto-import: New marker (icon + word) and the small status line on the list */
.newbadge{display:inline-block;background:#fff3cd;color:#5c4400;border:1px solid #c9a43a;border-radius:9px;padding:0 6px;font-size:11px;font-weight:700;white-space:nowrap;vertical-align:1px}
.ph-title{display:flex;align-items:baseline;gap:4px 14px;flex-wrap:wrap}
.import-line{font-size:12.5px;color:#555}
.sl form .btn{white-space:normal;text-align:left}
/* keyboard focus always visible (accessibility) */
:focus-visible{outline:3px solid #1a6fa8;outline-offset:2px}

/* ---------- Franchise Today PC layout (Alan 25 Oct 17:50): one header row, wide WhatsApp, narrow notes */
@media (min-width:901px){
  .today-head{display:flex;align-items:center;gap:14px;flex-wrap:nowrap}
  .today-head h2{white-space:nowrap;margin:0;font-size:21px}
  .today-head .head-btns{display:none}                 /* Source Customers / Call Reminders are in the menu */
  .today-head .strip{flex:1;margin:0;min-width:0}
  .today-head .strip .tile{padding-top:6px;padding-bottom:6px;min-height:0}
  .split{height:calc(100vh - 158px)}
  .today:has(> .flash) .split{height:calc(100vh - 208px)}
  .qgrp-empty{display:none}                            /* the 0s are already in the tiles */
  .qb{display:none}                                    /* call / message from the lead bar, not every row */
  .lead-view{grid-template-columns:minmax(0,1fr) 360px;grid-template-rows:auto minmax(0,1fr)}
  .lv-bar{grid-column:1/-1;background:#fff;border-bottom:1px solid #e7eaec}
  .lv-bar .chat-head{border-bottom:0;padding:9px 16px}
  .lv-chat,.lv-notes{grid-row:2}
  .desk-outcomes{display:none}                         /* "How did the call go?" only after pressing Call */
  .desk-outcomes:has(.outcomes.called){display:block;border-top:1px solid #e7eaec}
}
@media (min-width:901px) and (max-width:1199px){
  .split{height:calc(100vh - 152px)}
  .lead-view{grid-template-columns:minmax(0,1fr) 300px}
  .today-head h2{font-size:18px}
}
@media (max-width:900px){.lv-bar{display:none}}
@media (max-width:900px){.today-head .strip{flex:1 1 100%;margin:2px 0 0}}
/* header tiles stay one line on laptops so the list + chat keep their height */
@media (min-width:901px){
  .today-head .tile{flex-wrap:nowrap;gap:8px;padding-left:12px;padding-right:12px;min-width:0}
  .today-head .tile.on{flex-wrap:wrap}
  .today-head .tile span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
}
@media (min-width:901px) and (max-width:1599px){
  .today-head .tile b{font-size:20px}
  .today-head .tile span{font-size:13px}
  .today-head{gap:10px}
}
/* Title = back to the default view; three panels as separate cards (Alan 25 Oct 18:26) */
.today-home{color:inherit;text-decoration:none}
.today-home:hover{color:#128070}
@media (min-width:901px){
  .split{background:none;border:0;gap:12px}
  .queue,.lv-bar,.lv-chat,.lv-notes,.lead-view.lv-empty{background-clip:padding-box;border:1px solid #dfe3e6;border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,.06);overflow:hidden}
  .queue{background:#fff;overflow-y:auto}
  .lv-notes{overflow-y:auto}
  .lead-view{gap:12px}
  .lv-bar{border-bottom:1px solid #dfe3e6}
  .desk-outcomes:has(.outcomes.called){border-top:1px solid #eee}
}
/* Notes panel like the WhatsApp box: tier / call back / remind on top, note box at the bottom (Alan 25 Oct 19:07) */
.notes-top{flex-shrink:0;border-bottom:1px solid #eee;padding-bottom:8px;margin-bottom:8px}
.notes-top .callout{margin:0 0 6px}
.notes-top .tierbox{border-top:0;margin-top:0;padding-top:0}
.notes-top .an-remind{margin-top:7px;font-size:12.5px;flex-wrap:wrap}
.notes-top .an-remind .muted{font-weight:400;font-size:11.5px}
.an-compose{display:flex;gap:6px;align-items:stretch}
.an-compose textarea{flex:1;height:48px;margin:0}
.an-compose .btn{align-self:stretch;white-space:nowrap}
/* Tier picker + Not franchise related in the lead bar (Alan 25 Oct 19:24) */
.callbar .tierbox{border:0;margin:0;padding:0;display:flex;gap:6px;align-items:center}
.tierbox .tier-move{margin:0}
.tierbox select{border:1px solid #c9d0d4;border-radius:4px;padding:7px 6px;font-weight:600;color:#2f4050;background:#fff;max-width:210px}
.callbar .tierbox .btn{padding:8px 10px}
/* Wider notes column + taller note box; 📅 Call back picker on top (Alan 25 Oct 19:36) */
@media (min-width:1200px){.lead-view{grid-template-columns:minmax(0,1fr) clamp(380px,26vw,500px)}}
.an-compose textarea{height:76px;min-height:76px;line-height:1.45;font-size:13.5px}
.cb-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0}
.cb-form label{font-weight:700;color:#2f4050;margin:0}
.cb-form input[type=date]{border:1px solid #c9d0d4;border-radius:4px;padding:5px 6px;color:#333;background:#fff}
.cb-info{font-size:11.5px;margin-top:4px}

/* Preview pop-up before anything is sent on WhatsApp (Alan 25 Oct 19:41) */
dialog.pv{border:0;border-radius:8px;padding:18px 20px;width:min(520px,92vw);box-shadow:0 10px 40px rgba(0,0,0,.35)}
dialog.pv::backdrop{background:rgba(0,0,0,.45)}
.pv-title{margin:0 0 4px;font-size:17px;color:#2f4050}
.pv-to{font-size:12.5px;color:#555;margin-bottom:8px}
.pv-warn{background:#fff3cd;border:1px solid #f0d58a;color:#5c4400;border-radius:4px;padding:6px 9px;font-size:12.5px;margin-bottom:8px}
.pv-body{background:#dcf8c6;border-radius:8px;padding:10px 12px;white-space:pre-wrap;font-size:13.5px;line-height:1.45;max-height:50vh;overflow:auto;color:#222}
.pv-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.pv-btns .btn{min-width:90px;font-weight:700}
/* Notes header bar, like the WhatsApp one but amber = internal only */
.notes-title{background:#8a5a0c;color:#fff;font-weight:700;padding:8px 12px;margin:-10px -12px 8px;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0}
.notes-title .cb-form label{color:#fff;font-weight:600}
.notes-title .cb-form input[type=date]{border:0;padding:4px 6px}
.notes-title .cb-form .btn{padding:4px 10px}

/* Call + call permission in the WhatsApp bar; call back next to the tier (Alan 25 Oct 19:52) */
.wa-title .wa-t{margin-right:auto}
.wa-title .wa-callnow{background:#fff;color:#0b5e4e;font-weight:700;border:0}
.wa-title .wa-perm{background:rgba(255,255,255,.16);border-radius:12px;padding:3px 9px;font-size:12px;font-weight:600}
.callbar .cb-form .btn{padding:8px 10px}
.callbar .cb-form input[type=date]{padding:7px 6px}
.notes-title{justify-content:flex-start}
.wa-title .wa-perm{color:#fff!important;background:rgba(255,255,255,.18)!important;border:0!important}

/* ✅ sent WhatsApp buttons; call-back quick picks (Alan 25 Oct 20:20) */
.wa-actions .btn.sent{background:#e8f6ef;border-color:#9fd3b8;color:#0b5e4e}
.cb-form select[data-cb-quick]{border:1px solid #c9d0d4;border-radius:4px;padding:7px 6px;font-weight:600;color:#2f4050;background:#fff}
.cb-pick{display:inline-flex;gap:6px;align-items:center}
.cb-pick[hidden]{display:none}
.cb-day b{color:#2f4050}
td.why{max-width:320px;font-size:12.5px;color:#444}

/* Call-back pop-up + call back in the WhatsApp bar (Alan 25 Oct 20:50) */
dialog.cb-dlg{border:0;border-radius:8px;padding:16px 18px;box-shadow:0 10px 40px rgba(0,0,0,.35);min-width:300px}
dialog.cb-dlg::backdrop{background:rgba(0,0,0,.45)}
dialog.cb-dlg h4{margin:0 0 10px;color:#2f4050;font-size:16px}
dialog.cb-dlg input[type=date]{width:100%;font-size:15px;padding:8px;border:1px solid #c9d0d4;border-radius:4px}
.cb-dlg-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.wa-title .wa-cb{background:#fff3cd;color:#5c4400;border-radius:12px;padding:3px 9px;font-size:12px;font-weight:700}
.wa-title .wa-cb.late{background:#fde2e1;color:#8a1c1c}

/* 5-second pop-up for OK messages; hide system notes (Alan 25 Oct 21:03) */
.flash.toast{position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:60;box-shadow:0 6px 24px rgba(0,0,0,.25);border-radius:6px;padding:10px 18px;max-width:min(640px,92vw);transition:opacity .5s ease,transform .5s ease}
.flash.toast.gone{opacity:0;transform:translate(-50%,-12px)}
.today:has(> .flash.toast) .split{height:calc(100vh - 158px)}
.nt-toggle{background:rgba(255,255,255,.18);color:#fff;border:0;border-radius:12px;padding:3px 10px;font-size:12px;font-weight:600;cursor:pointer;margin-left:auto}
.nt-toggle[aria-pressed=true]{background:#fff;color:#8a5a0c}
.lv-notes.hide-sys .ncard.nsys{display:none}

.dm-flash.toast{position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:70;box-shadow:0 6px 24px rgba(0,0,0,.25);border-radius:6px;padding:10px 18px;max-width:min(640px,92vw);transition:opacity .5s ease,transform .5s ease}
.dm-flash.toast.gone{opacity:0;transform:translate(-50%,-12px)}

/* Call result pop-up (Alan 25 Oct 21:16) */
dialog.oc-dlg:not([open]){display:none!important}
dialog.oc-dlg[open]{display:block!important;border:0;border-radius:8px;padding:16px 18px;box-shadow:0 10px 40px rgba(0,0,0,.35);width:min(620px,94vw)}
dialog.oc-dlg::backdrop{background:rgba(0,0,0,.45)}
dialog.oc-dlg h4{margin:0 0 10px;color:#2f4050;font-size:16px}
dialog.oc-dlg .outcomes{border:0;padding:0;background:none;box-shadow:none}
dialog.oc-dlg .oc-title{display:none}
dialog.oc-dlg .oc{font-size:14px;padding:9px 12px}
.oc-dlg-btns{display:flex;justify-content:flex-end;margin-top:12px}
/* pop-up layout: Call back [date] on line 1; No answer · Interested · Booked on line 2 (Alan 25 Oct 21:21) */
dialog.oc-dlg .oc-btns{gap:8px}
dialog.oc-dlg .oc-cb{order:-1;flex:0 0 100%;display:flex;gap:8px;align-items:center}
dialog.oc-dlg .oc-date input{font-size:14px;padding:8px 6px;width:auto}

/* Key-fact badges under the lead name (Alan 25 Oct 21:24) */
.facts{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.fact{background:#eef4f7;border:1px solid #d5e2e9;color:#2f4050;border-radius:12px;padding:2px 9px;font-size:12px;font-weight:600;white-space:nowrap}
.lv-bar .chat-head .facts{flex:0 0 100%;margin-top:0}
/* fact badges on the name line (Alan 25 Oct 22:23) */
.lv-bar .ch-info .facts{display:inline-flex;flex-wrap:wrap;gap:4px;margin:0 0 0 6px;vertical-align:middle}
.lv-bar .ch-info .fact{font-size:11.5px;padding:1px 8px}
.lv-bar .chat-head .ch-info{flex:1 1 520px}
.lv-bar .ch-info .fact{font-size:11px;padding:0 7px;line-height:18px}
@media (min-width:1500px){
  .lv-bar .chat-head{flex-wrap:nowrap}
  .lv-bar .chat-head .ch-info{flex:1 1 auto;min-width:0}
  .lv-bar .chat-head .callbar{flex:0 0 auto;flex-wrap:nowrap}
}
/* compact lead bar so the fact badges fit on the name line (Alan 25 Oct 22:23) */
@media (min-width:1500px){
  .lv-bar .callbar .lbl-long{display:none}
  .lv-bar .callbar .tierbox select{max-width:175px}
  .lv-bar .callbar select[data-cb-quick]{max-width:190px}
  .lv-bar .callbar .btn{padding:7px 10px}
}
.lv-bar .ch-info .facts{gap:3px;margin-left:4px}
.lv-bar .ch-info .fact{padding:0 6px}
.lv-bar .ch-info > div:first-child{display:flex;flex-wrap:nowrap;align-items:center;gap:4px;white-space:nowrap}
.lv-bar .ch-info .facts{display:flex;flex:1 1 auto;min-width:0;flex-wrap:wrap;white-space:nowrap}
@media (min-width:1500px){
  .lv-bar .callbar{gap:5px}
  .lv-bar .callbar .tierbox > .tier-move label{font-size:0}
  .lv-bar .callbar .tierbox > .tier-move label select{font-size:13px}
  .lv-bar .callbar .tierbox select{max-width:165px}
  .lv-bar .callbar select[data-cb-quick]{max-width:165px}
}
/* call-back menu shows its full text (Alan 25 Oct 22:50) */
.lv-bar .callbar select[data-cb-quick]{max-width:none;width:auto}

/* Franchise Portal header, style B (Alan 25 Oct 22:58) */
.fp-title{min-width:190px}
.fp-title h2{font-size:22px;font-weight:700;color:#2f4050;margin:0}
.fp-sub{font-size:12px;color:#6b7782;margin-top:2px}
.today-head .strip{gap:0;border:1px solid #e3e8ec;border-radius:10px;overflow:hidden;background:#fff}
.today-head .strip .tile{border-top:0;border-radius:0;box-shadow:none;border-left:1px solid #e3e8ec;gap:12px;padding:9px 16px;background:#fff}
.today-head .strip .tile:first-child{border-left:0}
.today-head .strip .tile:hover{background:#f7fbfa}
.today-head .strip .tile.on{outline:0;background:#eef9f6;box-shadow:inset 0 -3px #1ab394}
.fp-ic{width:38px;height:38px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.fp-calls{background:#e6f4ff}.fp-replies{background:#eaf7ef}.fp-new{background:#fff4e0}.fp-reminders{background:#f3ecff}.fp-meetings{background:#ffeaea}
.fp-tx{display:flex;flex-direction:column;min-width:0;line-height:1.15}
.today-head .strip .tile .fp-tx b{font-size:22px;color:#2f4050}
.today-head .strip .tile .fp-tx span{font-size:12.5px;color:#6b7782;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (min-width:901px) and (max-width:1599px){
  .fp-ic{width:32px;height:32px;font-size:15px}
  .today-head .strip .tile{padding:7px 10px;gap:8px}
  .today-head .strip .tile .fp-tx b{font-size:19px}
  .fp-title{min-width:150px}.fp-title h2{font-size:19px}
}
@media (max-width:900px){
  .today-head .strip{border:0;gap:8px;background:none}
  .today-head .strip .tile{border:1px solid #e3e8ec;border-radius:10px}
  .today-head .strip .tile:first-child{border-left:1px solid #e3e8ec}
}
/* phone: same card design, just smaller (Alan 25 Oct 23:32) */
@media (max-width:900px){
  .today-head .strip{gap:6px}
  .today-head .strip .tile{padding:6px 10px;gap:9px;min-height:0;border-radius:9px}
  .today-head .strip .fp-ic{width:30px;height:30px;font-size:14px;border-radius:8px}
  .today-head .strip .tile .fp-tx b{font-size:17px}
  .today-head .strip .tile .fp-tx span{font-size:12px}
  .today-head .strip .tile{flex-wrap:nowrap}
}
/* phone: hide empty groups, Call Reminders button (in the menu) and the subtitle (Alan 25 Oct 23:36) */
@media (max-width:900px){
  .qgrp-empty{display:none}
  .today-head .head-btns{display:none}
  .fp-sub{display:none}
}

/* phone lead screen (Alan 25 Oct 23:43): readable call permission, one Call button, fact badges on top */
.ph-facts{display:none}
@media (max-width:900px){
  .today-wa .wa-title .wa-perm,.dm-right .wa-title .wa-perm{color:#0b5e4e!important;background:#e3f4ee!important;font-size:13px}
  .today-wa .wa-title .wa-callnow{display:none}
  .today-wa .wa-title{justify-content:flex-start;gap:6px}
  .ph-facts{display:flex;flex-wrap:wrap;gap:5px;padding:8px 10px;background:#fff;border-bottom:1px solid #e7eaec;flex-shrink:0}
  .ph-facts .fact{font-size:12.5px;padding:3px 9px}
}

/* phone: call back + call permission on one line, short 24-hour line (Alan 25 Oct 23:52) */
.wa-perm .lbl-short{display:none}
@media (max-width:900px){
  .today-wa .wa-title,.dm-right .wa-title{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .today-wa .wa-title .wa-cb,.today-wa .wa-title .wa-perm,.dm-right .wa-title .wa-perm{white-space:nowrap;font-size:12px!important;flex-shrink:0}
  .wa-perm .lbl-full{display:none}
  .wa-perm .lbl-short{display:inline}
  .wa24-long{display:none}
}

/* phone chat tidy (Alan 25 Oct 23:59): chip bar separated from the chat, DNM moved to Tools, smaller quick buttons */
@media (max-width:900px){
  .today-wa .wa-title{background:#fff!important;border-bottom:1px solid #dfe3e6;box-shadow:0 2px 4px rgba(0,0,0,.06);position:relative;z-index:1}
  .today-wa .wa-dnm{display:none}
  .today-wa .wa-actions{gap:5px;padding:6px 8px 8px}
  .today-wa .wa-actions .btn{padding:4px 9px!important;font-size:12.5px!important;min-height:38px!important;border-radius:8px}
  .tools-cb{margin-top:10px}
  .tools-cb select[data-cb-quick]{width:100%;font-size:15px;padding:10px;border:1px solid #c9d0d4;border-radius:6px;background:#fff}
  .tools-dnm{margin-top:18px;text-align:center}
}
@media (max-width:900px){
  .ph-hide{display:none}
  .today-wa .wa-actions .btn{padding:4px 8px!important;font-size:12.5px!important;min-height:36px!important}
}
.ph-only{display:none}
@media (max-width:900px){.ph-only{display:inline}}

/* phone Notes tab: amber bar pinned top, notes scroll in the middle, note box + Save pinned bottom (Alan 26 Oct 00:11) */
@media (max-width:900px){
  .today.tab-notes .lv-body{overflow:hidden}
  .today.tab-notes .lv-notes{display:flex!important;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:10px 12px 8px}
  .today.tab-notes .lv-notes .notes-title{flex-shrink:0}
  .today.tab-notes .lv-notes .ncards{flex:1;min-height:0;overflow-y:auto}
  .today.tab-notes .lv-notes .addnote{flex-shrink:0;margin-top:6px}
  .today.tab-notes .an-compose textarea{height:52px;min-height:52px}
}

/* phone top bar: who is on the lead, under the name (Alan 26 Oct 00:22) */
.lv-namebox{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
.lv-namebox .lv-name{flex:none}
.lv-who{font-size:12.5px;font-weight:600;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* who is on the lead: a pill next to Call (Alan 26 Oct 00:26) */
.lv-head .lv-who{flex-shrink:0;background:rgba(255,255,255,.18);border-radius:999px;padding:5px 10px;font-size:13px;font-weight:700;opacity:1;max-width:38vw}

/* phone Tools tab: clear sections (Alan 26 Oct 00:29) */
@media (max-width:900px){
  .today.tab-tools .lv-tools{padding:10px 12px 18px;background:#f3f6f7}
  .lv-tools .tcard{background:#fff;border:1px solid #e3e8ec;border-radius:10px;padding:10px 12px 12px;margin-bottom:10px}
  .lv-tools .tcard h5{margin:0 0 8px;font-size:13px;font-weight:800;color:#2f4050;text-transform:none;letter-spacing:.2px}
  .lv-tools .tcard h5 .muted{font-weight:600;font-size:12px}
  .lv-tools .tools-who{font-size:14px;margin-bottom:8px}
  .lv-tools .claim-form,.lv-tools .claim-form .btn{width:100%}
  .lv-tools .outcomes{border:0;padding:0;margin:0;background:none}
  .lv-tools .outcomes .oc-title{display:none}
  .lv-tools .oc-btns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .lv-tools .oc-btns form{display:contents}
  .lv-tools .oc-btns .oc{width:100%;min-height:46px;font-size:14px}
  .lv-tools .oc-btns .oc-cb{display:grid!important;grid-column:1/-1;grid-template-columns:1fr 1fr;gap:8px}
  .lv-tools .oc-btns .oc-cb .oc-date input{width:100%;height:46px}
  .lv-tools .tools-book{width:100%;margin-top:8px}
  .lv-tools .cb-form select[data-cb-quick]{width:100%;font-size:15px;padding:11px;border:1px solid #c9d0d4;border-radius:8px;background:#fff}
  .lv-tools .tcard-tier .tierbox{display:flex;flex-direction:column;gap:10px;border:0;margin:0;padding:0}
  .lv-tools .tcard-tier .tierbox .tier-move label{display:flex;align-items:center;gap:8px;width:100%;font-size:0}
  .lv-tools .tcard-tier .tierbox select{flex:1;width:100%;max-width:none;font-size:15px;padding:11px;border-radius:8px}
  .lv-tools .tcard-tier .tierbox .btn-danger{width:100%;background:#fff;color:#c0392b;border:1.5px solid #e4a59d;font-weight:700}
  .lv-tools .tcard-more{background:none;border:0;padding:0}
  .lv-tools .tools-details{width:100%;margin:0}
  .lv-tools .tools-dnm{margin-top:14px;text-align:center}
}
@media (max-width:900px){
  .lv-tools .oc-btns{grid-template-columns:repeat(3,minmax(0,1fr))}
  .lv-tools .oc-btns .oc{font-size:13px;padding:6px 4px}
  .lv-tools .oc-btns .oc-cb{order:4}
}

/* Tablets + phones in desktop view (901-1199px): lead list always on the left (Alan 26 Oct 01:16), a bit narrower so the chat has room */
@media (min-width:901px) and (max-width:1199px){
  .split{grid-template-columns:250px minmax(0,1fr)}
  .lead-view{grid-template-columns:minmax(0,1fr) 270px}
  .qlink{gap:6px;padding-left:6px}.av{width:28px;height:28px;font-size:12px}
  .why{font-size:11.5px}
}

/* Franchise Portal on PC / tablet / desktop view: the page is locked to the screen height, no page scroll;
   only the lists inside scroll (chat, notes, lead list). dvh = the real visible height on phones (URL bar). (Alan 26 Oct 01:26)
   Short screens (under 760px tall) keep a little page scroll, or the chat would shrink to nothing. */
@media (min-width:901px) and (min-height:760px){
  body:has([data-today]) .app{height:100vh;height:100dvh;min-height:0;overflow:hidden}
  body:has([data-today]) .main{min-height:0;height:100%;overflow:hidden}
  body:has([data-today]) main.content{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
  body:has([data-today]) .today{flex:1;min-height:0;display:flex;flex-direction:column}
  body:has([data-today]) .today .split{flex:1;height:auto!important;min-height:380px}
}
