/* Mobile layout; business logic and account access are unchanged. */
.crm-mobile-nav{display:none}
.shell>*,.shell #view,.shell .panel,.shell .editor,.shell .stats>*,.shell .analytics-grid>*{min-width:0}
.table-wrap{max-width:100%;overscroll-behavior-x:contain}
@media screen and (max-width:800px){
 .crm-desktop-nav{display:none}
 .crm-mobile-nav{display:block;clear:both;margin-top:16px}
 .crm-mobile-nav summary{cursor:pointer;min-height:48px;padding:12px 14px;border:1px solid #6f80a0;border-radius:12px;background:#ffffff0c;color:#fff;font-size:16px;line-height:1.5}
 .shell .side .crm-mobile-nav nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;margin:12px 0;gap:8px}
 .shell .side .crm-mobile-nav nav button{white-space:normal;min-height:48px;font-size:15px;text-align:right;line-height:1.5}
 .shell .side{height:auto;min-width:0;padding:16px;border-left:0}
 .shell .side .brandline{font-size:20px}
 .shell .side h3,.shell .side .small-print{overflow-wrap:anywhere}
 .shell .side [data-action=logout]{min-height:44px;padding:10px 0;font-size:14px}
 .shell>main.content{padding:20px 14px 36px}
 .shell .panel{padding:18px}
 .shell input:not([type=checkbox]):not([type=radio]),.shell select,.shell textarea,.auth input,.wm-dialog input,.wm-dialog select,.wm-dialog textarea{font-size:16px;min-width:0;max-width:100%;box-sizing:border-box}
 .shell button,.auth button,.wm-dialog button{min-height:44px;white-space:normal;line-height:1.5}
 .shell .toolbar{align-items:stretch}
 .shell .toolbar input,.shell .toolbar select{max-width:100%;min-width:0}
 .shell .actions>button{flex:1 1 140px}
 .shell .dashboard-heading{flex-wrap:wrap;align-items:flex-start}
 .shell .dashboard-period{max-width:100%}
 .shell .top h1{font-size:26px;overflow-wrap:anywhere}
 .shell .stat b,.shell .deal-spotlight strong,.wm-price{overflow-wrap:anywhere}
 .shell .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
 .shell .table-wrap button{font-size:14px}
 .wm-dialog{max-height:90vh;max-height:90dvh;max-width:calc(100vw - 24px);padding:18px;overscroll-behavior:contain}
 .wm-dialog .wm-card-head,.wm-dialog .wm-actions{flex-wrap:wrap}
 .wm-form>*{min-width:0}
 .wm-dialog .wm-actions button{flex:1 1 120px}
 #status:not(:empty){left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));max-width:none;overflow-wrap:anywhere}
}
@media screen and (max-width:600px){
 .shell .board{grid-template-columns:minmax(0,1fr);overflow:visible}
 .shell .board .column{padding:14px}
 .shell .contact-card{overflow-wrap:anywhere}
 .shell .toolbar>*{flex:1 1 100%;width:100%}
 .shell .stats,.shell .financial-cards{grid-template-columns:minmax(0,1fr)}
 .shell .pipeline-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
 .shell .command-hero{display:block}
 .shell .assistant-art{display:none}
 .shell .hero-copy h2{font-size:30px}
 .shell .hero-copy p{font-size:16px;line-height:1.7}
 .shell .command-kicker{font-size:12px;letter-spacing:0}
 .shell .hero-link{font-size:16px;margin-top:8px}
 .shell .deal-spotlight{padding:20px;gap:16px}
 .shell .deal-spotlight strong{font-size:36px}
 .shell .deal-spotlight .primary{margin-top:12px;width:100%}
 .shell #collection-dashboard{padding:16px}
 .shell .chart-heading,.shell .lead-overview{gap:12px;flex-wrap:wrap}
 .shell .chart-heading h3{overflow-wrap:anywhere}
 .shell .source-legend{min-width:0}
 .shell .media-channels{grid-template-columns:repeat(3,minmax(0,1fr))}
 .shell .media-channel>span:not(.media-icon){font-size:12px;overflow-wrap:anywhere;text-align:center}
 .wm-stats{grid-template-columns:1fr}
 .wm-stats>div{font-size:15px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
 .wm-stats b{font-size:24px;margin:0}
 .wm-hero{padding:20px}.wm-hero h2{font-size:25px}
 .wm-card-head{flex-wrap:wrap}.wm-card{padding:18px}
 .wm-badge{white-space:normal}
 .quote-brand-header{flex-wrap:wrap}
 .auth{margin:20px 12px;padding:24px 20px}
 .auth h1{font-size:27px}
 .auth .actions{flex-wrap:wrap}
 .auth .actions button{flex:1 1 130px}
}
@media print{.crm-mobile-nav{display:none}.crm-desktop-nav{display:block}}

/* Revenue breakdown: stored deal totals include VAT. */
.shell .deal-vat-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;flex:1;min-width:0;max-width:800px}
.shell .deal-vat-part{min-width:0;padding:16px;border:1px solid #ffffff30;border-radius:14px;background:#ffffff08}
.shell .deal-vat-part span{display:block;font-size:15px;margin-bottom:10px}
.shell .deal-vat-part strong{display:block;font-size:clamp(25px,3vw,44px);overflow-wrap:anywhere}
.shell .deal-vat-note{grid-column:1/-1;margin:0;font-size:12px}
@media(max-width:1000px){.shell .deal-spotlight{flex-direction:column;align-items:stretch}.shell .deal-vat-totals{max-width:none}}
@media(max-width:550px){.shell .deal-vat-totals{grid-template-columns:1fr;gap:12px}.shell .deal-vat-part strong{font-size:32px}}

