/* CHASKORA Phase 13.5 — fluid mobile, tablet and desktop layout.
   Containers may shrink. Wide operational tables scroll INSIDE their panel,
   never by extending the whole page. Keep the existing brand colours. */
html{max-width:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body,#app{width:100%;max-width:100%;min-width:0}
body{overflow-x:clip}
#app,main,.home-main,.workspace,.workspace>section,.panel,.service-section,
.signature-hero,.hero-copy,.hero-photograph,.campaign-section,.campaign-slide,
.section-head,.modal,.modal form,.pos-layout,.pos-layout>*,.split>*,
.delivery-grid>*,.kitchen-board>*,.coverage-cards>*,.stats>*,.grid>*{min-width:0;max-width:100%}
img,video,svg,canvas{max-width:100%}
p,h1,h2,h3,h4,small,.field-help,.notice,.service-result,.row>*,.order-card,
.modal,.panel,.food,.stat,.ticket-message{overflow-wrap:anywhere}
input,select,textarea{max-width:100%;min-width:0}
.form-grid,.stats,.grid,.gallery,.pos-products,.delivery-grid,.kitchen-board,
.coverage-cards,.campaign-slide{min-width:0}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-grid>*,.row>*,.actions>*,.toolbar>*{min-width:0}
.table-wrap,.cash-table,.responsive-table-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
.responsive-table-scroll table{min-width:max-content;width:100%;}
.service-map{max-width:100%;min-width:0;isolation:isolate}
.service-map .leaflet-container,.service-map .gm-style{max-width:100%}
#overlay .modal-bg{max-width:100%;overflow-y:auto;overscroll-behavior:contain}
#overlay .modal{min-width:0;max-width:min(95vw,600px);max-height:calc(100dvh - 24px);overflow-y:auto;overflow-x:hidden}
#overlay .modal .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#overlay input,#overlay select,#overlay textarea{max-width:100%}
.workspace{grid-template-columns:minmax(175px,205px) minmax(0,1fr)}
.workspace>section .section-head{display:flex;flex-wrap:wrap;gap:12px;min-width:0}
.workspace>section .section-head>*{min-width:0}
.workspace>section .section-head select{max-width:100%;width:min(100%,300px)}
.service-gps-status{margin:8px 0 2px;line-height:1.65}
.service-gps-status[data-quality="poor"]{color:#9c341d;font-weight:700}
.service-gps-status[data-quality="good"]{color:#27633c;font-weight:700}
.service-map .gps-accuracy-ring{stroke-dasharray:5 4}
@media(max-width:1050px){
 .workspace{grid-template-columns:minmax(145px,180px) minmax(0,1fr);gap:16px}
 .pos-layout{grid-template-columns:minmax(0,1fr)}
 .header{gap:12px}
}
@media(max-width:800px){
 .workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 .workspace>.sidebar{display:flex;width:100%;max-width:100%;gap:5px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;padding:10px}
 .workspace>.sidebar p,.workspace>.sidebar .user-info{display:none}
 .workspace>.sidebar button{flex:0 0 auto;width:auto;max-width:none;white-space:nowrap;padding:10px 12px;font-size:12px}
 .workspace>section{width:100%}
 .content-layout,.delivery-grid,.kitchen-board{grid-template-columns:minmax(0,1fr)}
 .header{flex-wrap:wrap;height:auto}
 .header>.nav{order:3;flex:1 0 100%;width:100%;margin:0;min-width:0;display:flex;flex-wrap:wrap;gap:5px 12px;white-space:normal;overflow:visible;justify-content:flex-start}
 .header>.nav a,.header>.nav button{flex:0 0 auto;padding:8px 3px;white-space:normal}
 .header>.brand{min-width:0;max-width:calc(100% - 116px)}
 .header>.cart-button{flex:0 0 auto;margin-inline-start:auto}
 .premium-footer,.footer-top{max-width:100%}
}
@media(max-width:600px){
 main{width:100%;padding-inline:14px;padding-bottom:30px}
 .home-main{width:100%;padding-inline:14px;padding-bottom:30px}
 .header{padding:10px 14px!important;gap:8px}
 .header .brand{min-width:0;max-width:calc(100% - 100px)}
 .header .brand-logo{width:52px;height:52px;flex:0 0 52px}
 .header .brand-wordmark{min-width:0;font-size:clamp(15px,5vw,21px);letter-spacing:-.5px}
 .header .brand-wordmark small{font-size:clamp(5px,1.65vw,8px);letter-spacing:.65px!important}
 .header .cart-button{min-height:36px;min-width:70px;padding:8px 9px;font-size:11px}
 .header>.nav{gap:3px 12px;font-size:11px;padding-top:7px}
 .header>.nav a,.header>.nav button{min-height:36px;display:inline-flex;align-items:center}
 .signature-hero,.campaign-slide,.sharing-section,.brand-story{grid-template-columns:minmax(0,1fr)}
 .signature-hero h1,.hero h1{font-size:clamp(30px,10vw,46px);letter-spacing:-1.5px;line-height:1.08}
 .signature-hero{gap:12px}
 .hero-copy{padding:12px 0}
 .hero-copy .actions,.service-section .actions,.form-actions{flex-wrap:wrap;gap:10px}
 .hero-copy .btn,.service-section .actions .btn{max-width:100%}
 .service-section h2{font-size:clamp(22px,7vw,30px)}
 .service-map{height:clamp(285px,78vw,370px);min-height:285px;border-radius:12px}
 .service-section .form-grid,#overlay .modal .form-grid{grid-template-columns:minmax(0,1fr)}
 .coverage-cards{grid-template-columns:minmax(0,1fr)}
 .grid,.gallery,.pos-products,.stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .panel{padding:14px}
 .row,.section-head,.order-head{flex-wrap:wrap}
 .row>*{min-width:0}
 .btn{min-height:40px;max-width:100%}
 .pos-product{min-width:0}
 #overlay .modal-bg{padding:8px;align-items:flex-start}
 #overlay .modal{width:100%;max-width:100%;max-height:calc(100dvh - 16px);padding:18px;margin:auto 0}
 .sidebar{border-radius:10px}
 .service-result{padding:13px}
 .service-result strong{font-size:18px}
 .photo-categories,.categories{grid-template-columns:repeat(2,minmax(0,1fr))}
 .section-head h2{font-size:clamp(20px,6vw,28px)}
}
@media(max-width:360px){
 main,.home-main{padding-inline:10px}
 .header{padding-inline:10px!important}
 .header .brand-logo{width:44px;height:44px;flex-basis:44px}
 .header .brand-wordmark{font-size:16px}
 .header .cart-button{min-width:60px}
 .grid,.gallery,.pos-products{grid-template-columns:minmax(0,1fr)}
 .actions .btn{white-space:normal;text-align:center}
}
