/* Shared layout corrections: contain children rather than hiding overflow. */
.customer-portal,.customer-portal *,.customer-portal *::before,.customer-portal *::after{box-sizing:border-box}
.mobile-hero-image{display:none}
.seller-workspace details{border:1px solid #c9dcd6;border-radius:12px;margin:14px 0;padding:16px;background:#f8fbfa}
.seller-workspace summary{cursor:pointer;font-size:18px;font-weight:650;min-height:44px;align-content:center}
.seller-workspace form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px;border:1px solid #d5e2df;border-radius:10px;margin:14px 0;background:white}
.seller-workspace form>h2,.seller-workspace form>fieldset,.seller-workspace form>p,.seller-workspace form>div,.seller-workspace form>button{grid-column:1/-1}
.seller-workspace label{display:flex;flex-direction:column;gap:6px;min-width:0}
.seller-workspace label:has(input[type=checkbox]){flex-direction:row;align-items:center}
.seller-workspace input,.seller-workspace select,.seller-workspace textarea{box-sizing:border-box;max-width:100%;min-width:0;min-height:42px;font-size:16px}
.seller-workspace input[type=checkbox]{min-height:20px;width:20px;flex-shrink:0}
.seller-workspace select{width:100%;text-overflow:ellipsis}
.seller-workspace fieldset{border:1px solid #d1dfdb;border-radius:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.seller-mode-badge{padding:10px;background:#e3efeb;color:#164c3e;font-weight:600;border-radius:8px}
@media(max-width:600px){.seller-workspace form,.seller-workspace fieldset{grid-template-columns:minmax(0,1fr)}}
.inventory-city-board{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}
.inventory-city-board .inventory-city{grid-column:span 2;min-width:0}
.inventory-city-board .inventory-city[data-city=Bodega]{grid-column:span 3}
.inventory-city-board .inventory-city[data-city=Guayaquil]{grid-column:span 9}
.inventory-city-board .inventory-city[data-city=Talleres]{grid-column:span 6}
.inventory-city-board h3{font-size:16px;margin:0 0 8px;color:#315e55;border-bottom:2px solid #d4e3df;padding-bottom:6px}
body.executive.erp .inventory-city-board .inventory-source-grid{grid-template-columns:minmax(0,1fr);gap:10px}
body.executive.erp .inventory-city-board [data-city=Guayaquil] .inventory-source-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body.executive.erp .inventory-city-board [data-city=Talleres] .inventory-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.inventory-city-board .inventory-source-grid article{padding:12px;border-radius:12px;background:linear-gradient(145deg,#fff,#edf4f1);min-width:0;box-sizing:border-box}
.inventory-city-board .branch-badge img{height:38px;width:120px}
.inventory-city-board .branch-badge small{display:none}
.inventory-city-board h4{margin:8px 0;font-size:14px}
.inventory-city-board article p{font-size:14px;margin:7px 0;overflow-wrap:anywhere}
.inventory-city-board article>small{font-size:13px;color:#536961}
.inventory-copy-status{font-size:14px;color:#795b22}
.inventory-copy-status.is-online{color:#17603e}
@media(max-width:760px){
 .inventory-city-board{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .inventory-city-board .inventory-city,.inventory-city-board .inventory-city[data-city=Bodega]{grid-column:span 1}
 .inventory-city-board .inventory-city[data-city=Guayaquil],.inventory-city-board .inventory-city[data-city=Talleres]{grid-column:span 2}
 body.executive.erp .inventory-city-board [data-city=Guayaquil] .inventory-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.branch-badge{display:flex;flex-direction:column;gap:6px;align-items:flex-start;max-width:100%;min-width:0}
.branch-badge img{width:142px;height:54px;object-fit:contain;max-width:100%;background:white;border-radius:5px}
.branch-badge small{font-size:13px;font-weight:500;white-space:normal;color:#466158}
.user-category th{background:#e5efec;padding:14px;text-align:left;color:#194e41}
.referral-management{padding:20px;margin:22px 0;background:#f2f7f5;border:1px solid #bed4cd;border-radius:12px}
.referral-management summary{cursor:pointer;font-weight:650;font-size:18px;min-height:44px}
.referral-management form{padding:16px;border:1px solid #ccdad6;border-radius:10px;margin:16px 0;display:grid;gap:12px}
.referral-management form label{display:flex;flex-direction:column;gap:6px}
.referral-management input[type=checkbox]{width:auto;align-self:flex-start}
@media screen and (max-width:760px){
 body.executive.erp .topbar-actions{display:flex;flex-wrap:wrap;gap:10px;overflow:visible;min-width:0;max-width:100%;align-items:center}
 body.executive.erp .topbar-actions>*{min-width:0;max-width:100%;flex:0 1 auto}
 body.executive.erp .topbar-actions .user-pill{flex:1 1 100%;width:100%;white-space:normal;overflow-wrap:anywhere}
 body.executive.erp #logoutButton{flex:0 0 auto;margin-left:auto;min-width:82px;min-height:44px;grid-column:auto;justify-self:auto;white-space:normal}
 .referral-page main{width:100%;padding:16px;margin:0;box-sizing:border-box}
 .referral-page main *{box-sizing:border-box;max-width:100%;overflow-wrap:anywhere}
 .referral-management{padding:14px}
}
/* A portrait layout must not inherit desktop-sized nested table scrollers. */
@media screen and (max-width:760px){
 body.executive.erp{overflow-x:visible;-webkit-text-size-adjust:100%}
 body.executive.erp .app-shell,body.executive.erp .app-shell:has(.sidebar:hover),body.executive.erp .app-shell:has(.sidebar:focus-within){grid-template-columns:minmax(0,1fr);overflow:visible;max-width:100%;width:100%}
 body.executive.erp .workspace,body.executive.erp .content,body.executive.erp .panel,body.executive.erp .full-width-stack{min-width:0;max-width:100%}
 body.executive.erp .sidebar{position:relative;overflow:visible}
 body.executive.erp .content{padding:16px 12px}
 body.executive.erp .panel{padding:18px 14px}
 body.executive.erp .product-table-scroll:has(.grouped-stock-table){max-height:68dvh;height:auto;overflow:auto;border:1px solid #d4e0e7;-webkit-overflow-scrolling:touch}
 body.executive.erp .grouped-stock-table{display:table;min-width:850px;width:100%;white-space:normal}
 body.executive.erp .grouped-stock-table tbody{display:table-row-group}
 body.executive.erp .grouped-stock-table thead{display:table-header-group;position:sticky;top:0;z-index:1;width:auto;height:auto;clip-path:none;overflow:visible}
 body.executive.erp .grouped-stock-table tr{display:table-row;margin:0;padding:0;border-radius:0}
 body.executive.erp .grouped-stock-table td{display:table-cell;width:auto;min-width:0;max-width:210px;white-space:normal;padding:8px 10px;border-bottom:1px solid #e5ecea;font-size:13px;line-height:1.25;vertical-align:middle}
 body.executive.erp .grouped-stock-table td::before{content:none;display:none}
 body.executive.erp .grouped-stock-table td:last-child{border-bottom:0}
 body.executive.erp .grouped-stock-table .inventory-family-start{border-top:4px solid #2e7767}
 body.executive.erp .inventory-local-cell,body.executive.erp .inventory-motor-chips,body.executive.erp .inventory-row-actions{min-width:0;max-width:100%;flex-wrap:wrap;white-space:normal}
 body.executive.erp .grouped-stock-table button{min-height:44px}
 body.executive.erp .inventory-pagination{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 0}
 body.executive.erp .inventory-pagination>span{grid-column:1/-1;grid-row:1;text-align:center;white-space:normal}
 body.executive.erp .inventory-pagination button{min-height:44px;width:100%}
 body.executive.erp .inventory-source-grid{grid-template-columns:minmax(0,1fr)}
 body.executive.erp .inventory-source-grid article{min-width:0;overflow-wrap:anywhere}
 body.executive.erp .table-summary{align-items:flex-start;flex-wrap:wrap;gap:10px}
 body.executive.erp .local-stock-list{min-width:0;grid-template-columns:minmax(0,1fr)}
 body.executive.erp .table-scroll:not(:has(.grouped-stock-table)){max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
 body.executive.erp input,body.executive.erp select{font-size:16px;min-width:0;max-width:100%}
 body.executive.erp .dialog,body.executive.erp dialog{max-width:calc(100vw - 24px);max-height:85vh;max-height:85dvh;overflow:auto}
}
.customer-portal main>*{min-width:0;max-width:100%;box-sizing:border-box}
.customer-portal .branch-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.customer-portal .branch-city-group:has(.branch-card:only-child){grid-column:auto}
.customer-portal .branch-city-group:has(.branch-card:only-child) .branch-city-cards{grid-template-columns:minmax(0,1fr)}
.customer-portal .branch-card{min-width:0;overflow-wrap:anywhere}
.customer-portal .product-photo:has(img[hidden]){display:none}
.admin-dashboard{gap:20px}
.admin-dashboard>.panel,.admin-dashboard>.grid{min-width:0}
.admin-dashboard .admin-overview{background:#123d39;color:#fff;border:0}
.admin-dashboard .admin-overview h3{color:#fff;font-size:1.65rem}
.admin-shortcuts{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}
.admin-shortcuts a{background:#fff;color:#123d39;padding:12px 18px;border-radius:9px;text-decoration:none;font-weight:650}
.admin-dashboard .grid.two{grid-template-columns:minmax(0,1fr)}
.admin-dashboard .admin-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:22px;background:#f0f5f4;border-radius:12px;margin-top:20px}
.admin-dashboard .admin-form>p,.admin-dashboard .check-list{grid-column:1/-1}
.admin-dashboard .check-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.admin-dashboard section.panel{overflow-x:auto;scroll-margin-top:90px}
.admin-dashboard input,.admin-dashboard select{max-width:100%;min-width:0}
@media(max-width:900px){
 .customer-portal .site-header{display:flex;flex-wrap:wrap;gap:12px;padding:14px 18px}
 .customer-portal .site-header nav{order:3;width:100%;margin:0;display:flex;flex-wrap:wrap;justify-content:center;gap:12px 20px}
 .customer-portal .header-actions{width:auto;margin-left:auto;flex-wrap:wrap}
 .customer-portal .intro,.customer-portal .about,.customer-portal .destination-fields{grid-template-columns:minmax(0,1fr)}
 .customer-portal .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .customer-portal .branch-grid{grid-template-columns:minmax(0,1fr)}
 .customer-portal .branch-city-cards{grid-template-columns:minmax(0,1fr)}
 .admin-dashboard .admin-form,.admin-dashboard .check-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 body.executive.customer-portal .site-header .wordmark{min-width:0;width:125px;max-width:40vw}
 body.executive.customer-portal .site-header nav{white-space:normal;overflow:visible;font-size:14px;gap:10px 16px}
 body.executive.customer-portal .site-header nav a{white-space:normal;min-height:36px;display:flex;align-items:center}
 body.executive.customer-portal main{max-width:100%;padding:0 12px 24px;gap:18px}
 body.executive.customer-portal[data-marque] .storefront-hero{background:#08111a;min-height:0;padding:0;display:flex;gap:0;overflow:visible;margin:0;border-radius:14px}
 body.executive.customer-portal .storefront-hero::before{display:none}
 body.executive.customer-portal .mobile-hero-image{display:block;width:100%;height:auto;object-fit:contain;border-radius:14px 14px 0 0}
 body.executive.customer-portal .storefront-hero .hero-content{max-width:100%;width:auto;margin:0;padding:24px 20px 12px;background:none}
 body.executive.customer-portal .storefront-hero .hero-content h1{font-size:36px;line-height:1.12;letter-spacing:-.02em}
 body.executive.customer-portal .storefront-hero .hero-benefits{padding:14px 20px 24px;margin:0;display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
 body.executive.customer-portal .hero-benefits span{max-width:none;width:100%}
 body.executive.customer-portal #featuredProducts{display:grid;grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:minmax(0,1fr);overflow:visible;scroll-snap-type:none;padding:0;gap:16px}
 body.executive.customer-portal #catalogo{display:grid;grid-template-columns:minmax(0,1fr);padding:22px 18px!important;gap:22px}
 body.executive.customer-portal #catalogo>.garage{padding:20px;max-width:100%;min-width:0}
 body.executive.customer-portal #catalogo h2{font-size:28px;line-height:1.18;letter-spacing:-.02em}
 body.executive.customer-portal .locations-section{padding:20px 14px}
 body.executive.customer-portal .branch-city-group{padding:18px 12px}
 body.executive.customer-portal .branch-card{padding:20px 16px}
 body.executive.customer-portal .product-card{padding:20px;max-width:100%;min-width:0}
 body.executive.customer-portal .product-card select{font-size:16px}
 body.executive.customer-portal .member-welcome::after{display:none}
 body.executive.customer-portal .member-welcome{background-position:center;background-size:contain;background-repeat:no-repeat;background-color:#0c293b}
 body.executive.customer-portal .member-welcome p{overflow-wrap:anywhere}
 .customer-portal main{width:100%;max-width:100%;padding:0 14px;box-sizing:border-box}
 .customer-portal .wordmark{width:135px;max-width:40vw;flex-shrink:1}
 .customer-portal .wordmark img{width:100%;height:auto;object-fit:contain}
 .customer-portal .site-header{position:relative}
 .customer-portal .storefront-hero{margin:0;min-height:560px;padding:28px 20px;background-position:60% center}
 .customer-portal .hero-content{width:100%;max-width:100%;padding:0}
 .customer-portal .hero-content h1{font-size:clamp(34px,10vw,48px);line-height:1.08;letter-spacing:-.025em}
 .customer-portal .hero-benefits{position:static;display:grid;grid-template-columns:1fr;gap:12px;margin-top:30px;padding:0}
 .customer-portal .hero-benefits span{min-width:0}
 .customer-portal .section-heading{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
 .customer-portal h2{font-size:clamp(24px,7vw,32px);overflow-wrap:break-word}
 .customer-portal .product-grid,.customer-portal .two-cols,.customer-portal .delivery-promises,.customer-portal .store-topics,.customer-portal .store-search,.customer-portal .searchbar{display:grid;grid-template-columns:minmax(0,1fr)}
 .customer-portal .product-card,.customer-portal .garage,.customer-portal .member-welcome{min-width:0;padding:20px}
 .customer-portal .product-photo{height:210px;max-width:100%}
 .customer-portal .product-photo img{width:100%;height:100%;object-fit:contain}
 .customer-portal .brand-showcase,.customer-portal .brand-viewport{min-width:0;max-width:100%;overflow:hidden}
 .customer-portal .brand-track{width:max-content}
 .customer-portal .marque-line{display:flex;flex-wrap:wrap;justify-content:center;padding:18px 0;gap:12px!important}
 .customer-portal .delivery-story,.customer-portal .destination-surface,.customer-portal .branch-city-group{padding:22px 18px}
 .customer-portal input,.customer-portal select,.customer-portal textarea{font-size:16px;min-width:0;max-width:100%;box-sizing:border-box}
 .customer-portal button,.customer-portal .button{min-height:44px;white-space:normal;max-width:100%}
 .customer-portal dialog{width:calc(100% - 24px);max-height:88dvh;padding:18px;box-sizing:border-box;overflow-y:auto}
 .customer-portal .vehicle-row{display:flex;flex-wrap:wrap;gap:10px}
 .customer-portal .account-dropdown{right:0;left:auto;max-width:calc(100vw - 28px)}
 .admin-dashboard .admin-form,.admin-dashboard .check-list{grid-template-columns:minmax(0,1fr)}
 .admin-dashboard .detail-grid{grid-template-columns:minmax(0,1fr)}
}
.topbar>div:first-child{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.topbar #quotesFromInventory{display:inline-flex;position:static;margin:0;padding:9px 14px;line-height:1.2}.topbar #viewTitle{margin:0}.erp table .branch-badge{gap:3px;max-width:130px}.erp table .branch-badge img{width:82px;height:30px}.erp table .branch-badge small{font-size:11px}.erp table td{vertical-align:middle}
.inventory-title-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.inventory-title-actions #viewTitle{margin:0}.erp .inventory-local-cell{font-size:13px;line-height:1.4}
