/* MENU_FIX_V1 (demo): compact top menu. Was a wrapped 4-8 row sticky header (302px desktop / 527px phone) covering content.
   Now: row 1 = brand + user tools, row 2 = one horizontally scrolling nav row. Sticky only on wide screens; scrolls away on tablet/phone. */
header#top{flex-wrap:wrap;row-gap:2px;column-gap:10px;padding:5px 14px}
header#top .brand{white-space:nowrap}
header#top nav{order:9;flex:1 1 100%;display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;white-space:nowrap;gap:2px;min-width:0;scrollbar-width:thin;padding-bottom:2px;-webkit-overflow-scrolling:touch}
header#top nav>*{flex:0 0 auto}
header#top nav a{padding:4px 9px;display:inline-flex;align-items:center;gap:4px}
header#top #ax-bar{order:2;flex:0 1 380px;min-width:200px}
header#top .who{order:4;margin-left:auto;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
header#top input[type=search],header#top .who input{max-width:240px}
@media(max-width:1100px){header#top{position:static}}
@media(max-width:700px){header#top{padding:4px 8px;column-gap:6px}header#top .who{font-size:11px;gap:4px}header#top .who input{max-width:150px}}
/* ===== MOBILE_V1 phones (<=700px): compact one-line bar, menu behind ☰, content gets the screen, one flowing column ===== */
#m-menu{display:none}
@media(max-width:700px){
 html,body{overflow-x:hidden}
 .banner{position:static;font-size:10px;line-height:1.2;padding:2px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 header#top{position:sticky;top:0;flex-wrap:nowrap;align-items:center;padding:4px 8px;min-height:48px;column-gap:6px;transition:transform .18s ease;z-index:40}
 body.m-hide:not(.m-open) header#top{transform:translateY(-110%)}
 header#top .brand{flex:1 1 auto;min-width:0;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 header#top .brand::before{width:26px!important;height:16px!important;margin-right:5px!important}
 #m-menu{display:inline-flex;align-items:center;gap:4px;min-height:40px;min-width:44px;padding:6px 12px;border-radius:8px;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.12);color:#fff;font-weight:700;font-size:14px}
 header#top .m-bell{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;text-decoration:none}
 header#top nav,header#top #ax-bar,header#top .who{display:none!important}
 body.m-open header#top{flex-wrap:wrap;max-height:calc(100vh - 10px);overflow-y:auto;row-gap:6px;padding-bottom:8px}
 body.m-open header#top nav{display:grid!important;grid-template-columns:1fr 1fr;gap:4px;order:9;flex:1 1 100%;overflow:visible;white-space:normal}
 body.m-open header#top nav a{min-height:42px;padding:8px 10px;border:1px solid rgba(255,255,255,.18);border-radius:8px;font-size:14px}
 body.m-open header#top #ax-bar{display:flex!important;order:8;flex:1 1 100%;min-width:0}
 body.m-open header#top .who{display:flex!important;order:10;flex:1 1 100%;margin:0;font-size:12px}
 body.m-open header#top .who #logout{min-height:40px;padding:0 6px}
 #warm-hello{margin:6px auto 0!important;padding:0 6px!important}#warm-hello .in{padding:5px 10px!important;gap:8px!important;border-radius:8px!important}
 #warm-hello .sun{width:22px!important;height:22px!important;box-shadow:none!important}#warm-hello b{font-size:14px!important}#warm-hello small{display:none!important}
 #winbar{padding:3px 6px!important;font-size:12px!important;gap:4px!important}#winbar>.muted{display:none}#winbar select{min-height:36px}
 main,#app{padding:6px!important}
 h1{font-size:17px!important;margin:2px 0 6px!important;line-height:1.25}h2{font-size:15px!important;margin:10px 0 4px!important}h3{font-size:14px!important;margin:8px 0 4px!important}
 .card{padding:8px!important;margin-bottom:8px!important;border-radius:8px}
 .row{gap:6px}
 #app .card.row>select,#app .card.row>input:not([type=checkbox]),#app .row>.grow{flex:1 1 100%;max-width:100%;min-width:0}
 button,.btn,a.btn,select,input:not([type=checkbox]):not([type=radio]):not([type=file]){min-height:40px}
 input,select,textarea{font-size:16px!important;max-width:100%}
 input[type=checkbox],input[type=radio]{width:28px;height:28px;margin:6px}
 #app table td a,#app a.lk,#app a.crev,#app a.muted,#app>a,#app a[href^="#/leads"]{display:inline-block;padding:10px 2px;min-height:40px;box-sizing:border-box}
 button.link{min-width:44px}
 .formgrid,.grid2,.grid-asst{grid-template-columns:1fr!important}
 .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
 img,video,canvas,iframe{max-width:100%;height:auto}
 pre,.cdt{max-height:none!important;white-space:pre-wrap;overflow-wrap:anywhere}
 .tablewrap,.sheet,.ax-grid{overflow:visible!important;max-height:none!important}
 /* tables -> stacked cards */
 table{display:block;width:100%!important;min-width:0!important;max-width:100%;border:0}
 table thead,table tr.m-head{display:none!important}
 table tbody,table tfoot{display:block}
 table tr{display:block;border:1px solid #e3e8ef;border-radius:8px;padding:6px 8px;margin:0 0 8px;background:#fff}
 table td,table th{display:block!important;position:relative;border:0!important;padding:3px 0!important;white-space:normal!important;max-width:none!important;width:auto!important;text-align:left!important;overflow-wrap:anywhere;overflow:visible!important}
 table td[data-l]:not([data-l=""]){padding-left:36%!important;min-height:22px}
 table td[data-l]:not([data-l=""])::before{content:attr(data-l);position:absolute;left:0;top:4px;width:33%;color:#6b7280;font-size:11.5px;line-height:1.25;overflow-wrap:anywhere}
 table td:empty{display:none!important}
 table.m-kv tr{padding:4px 8px}table.m-kv th{color:#6b7280;font-size:12px;font-weight:600;padding-bottom:0!important}
 td.claimcol{padding-left:0!important}td.claimcol::before{display:none}td.claimcol button{width:100%;min-height:44px;font-size:15px}
 .hide-m{display:none!important}
 .toast{left:8px!important;right:8px!important;max-width:none!important}
}
/* BACK_LINK_40 (Oct 30): '← Leads' back link is a real 40px tap target */
p.backp{margin:0 0 4px}a.back{display:inline-flex;align-items:center;min-height:40px;min-width:40px;padding:0 14px 0 2px;text-decoration:none}
@media (max-width:700px){.warm-empty{display:none!important}}
