/* G682: stable five-tab mobile layout and action-first pages */
body.g682-simple #portalTabs{position:fixed;bottom:0;left:0;right:0;z-index:70;
 display:flex;align-items:stretch;justify-content:space-around;background:#fff;
 box-shadow:0 -3px 18px rgba(9,36,67,.12);padding:4px max(6px,env(safe-area-inset-right))
 calc(5px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));min-height:64px}
body.g682-simple #portalTabs .g682-tab{font:600 11px/1.15 system-ui,sans-serif!important;
 background:transparent!important;border:0!important;color:#556c81!important;min-width:0;flex:1 1 20%;
 margin:0!important;padding:6px 0!important;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;
 border-radius:9px;white-space:normal}
body.g682-simple #portalTabs .g682-tab.active{color:#113b60!important;background:#f1f6fc!important;box-shadow:inset 0 -3px #d5ad52}
body.g682-simple #portalTabs .g682-tab-icon{display:flex;align-items:center;justify-content:center;height:23px}
body.g682-simple #portalTabs .g682-tab-icon svg{height:20px;width:20px}
body.g682-simple #portalContent{padding-bottom:calc(86px + env(safe-area-inset-bottom))}
body.g682-simple .g682-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
body.g682-simple .g682-actions button{min-height:46px;flex:1 1 135px;border-radius:10px;padding:11px}
body.g682-simple .g682-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
body.g682-simple .g682-stats>div{padding:14px 7px;text-align:center;background:#edf3f9;border-radius:10px}
body.g682-simple .g682-stats b{display:block;font-size:25px;color:#133b60;font-weight:800}
body.g682-simple .g682-stats small{display:block;font-size:10px;color:#566a80}
body.g682-simple .g682-task{padding:12px;border:1px solid #e1e9f0;border-radius:10px;display:grid;gap:5px;margin:9px 0}
body.g682-simple .g682-task strong{font-size:14px}
body.g682-simple .g682-task span{font-size:12px;color:#956a19}
body.g682-simple .g682-task small{color:#657689;font-size:12px}
body.g682-simple .g682-help a{color:#174c76;text-decoration:underline}
.g677-vendor-simple label{display:block;margin:10px 0}
.g677-vendor-simple select,.g677-vendor-simple input{display:block;width:100%;min-height:48px;border:1px solid #cedce9;border-radius:10px;padding:10px 12px;background:#fff;color:#123650}
.g677-vendor-simple .g682-vendor-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.g677-vendor-simple .g682-vendor-actions button{flex:1;min-height:46px}
.g677-vendor-simple .g682-vendor-state{background:#f1f5fa;border-radius:9px;padding:12px;color:#344f66}
.g677-vendor-simple a{color:#15466f;text-decoration:underline}
@media(max-width:390px){body.g682-simple #portalTabs .g682-tab{font-size:10px!important}body.g682-simple .g682-stats b{font-size:22px}}

/* G685 360px Android device: five equal cells, one icon and one label, no overlap. */
body.g682-simple.g514-five-admin #portalTabs:not(.hide) {
 display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
 gap:0!important;overflow:visible!important;box-sizing:border-box!important;
 width:100vw!important;max-width:100vw!important;min-height:60px!important;
 padding:3px 2px calc(4px + env(safe-area-inset-bottom))!important;
}
body.g682-simple.g514-five-admin #portalTabs .g682-tab{
 width:100%!important;min-width:0!important;min-height:52px!important;
 margin:0!important;padding:4px 1px!important;overflow:hidden!important;
 white-space:nowrap!important;font-size:10px!important;line-height:1.15!important;
 display:flex!important;flex-direction:column!important;align-items:center!important;
 justify-content:center!important;gap:3px!important;
}
body.g682-simple.g514-five-admin #portalTabs .g682-tab-icon,
body.g682-simple.g514-five-admin #portalTabs .g682-tab-icon .wx-icon {
 width:19px!important;height:19px!important;min-height:19px!important;
}
body.g682-simple.g514-five-admin #portalTabs .g682-tab>span:last-child{
 display:block!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;
}
body.g682-simple.g514-five-admin #portalContent{
 padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
}
body.g682-simple .g685-search{display:block;width:100%;box-sizing:border-box;
 padding:12px;min-height:44px;border:1px solid #d3dfed;border-radius:10px;margin:8px 0 12px}
body.g682-simple .g685-user-card{border:1px solid #e3e9f2;border-radius:10px;background:#fff;padding:12px;margin-bottom:9px;display:grid;gap:7px}
body.g682-simple .g685-user-card small{color:#64788a}
body.g682-simple .g685-user-actions{display:flex;flex-wrap:wrap;gap:7px}
body.g682-simple .g685-user-actions button{min-height:42px;padding:9px;flex:1 1 110px}
body.g682-simple .g685-account-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.g682-simple .g685-account-row button{min-height:48px;font-size:12px;padding:9px 5px}
body.g682-simple .g685-price-other{border:1px solid #dbe5ed;border-radius:9px;padding:10px;margin:11px 0}
body.g682-simple .g685-live-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:9px;background:#fff}
body.g682-simple .g685-live-filters button{min-height:42px;border-radius:8px;border:1px solid #dae5f0;background:#eff4f9;color:#163754;font-weight:700}
body.g682-simple .g685-live-filters button.active{background:#143f63;color:#fff}

/* G687: five icons at equal widths in real phone viewport, no nested label overflow. */
html,body{max-width:100%;overflow-x:hidden}
body.g682-simple #portalTabs:not(.hide){
 position:fixed!important;left:0!important;right:0!important;bottom:0!important;
 display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
 width:100%!important;max-width:100%!important;box-sizing:border-box!important;
 gap:0!important;padding:3px 5px calc(6px + env(safe-area-inset-bottom))!important;
 min-height:60px!important;z-index:90!important;overflow:hidden!important;
 background:#fff!important;
}
body.g682-simple #portalTabs .g682-tab{
 width:100%!important;min-width:0!important;max-width:none!important;
 height:55px!important;min-height:55px!important;max-height:55px!important;
 display:grid!important;grid-template-rows:23px 13px!important;
 align-content:center!important;justify-items:center!important;
 gap:3px!important;padding:4px 0!important;margin:0!important;
 font-size:10px!important;line-height:13px!important;
 white-space:nowrap!important;overflow:hidden!important;text-align:center!important;
}
body.g682-simple #portalTabs .g682-tab-icon{
 display:grid!important;place-items:center!important;
 width:22px!important;height:23px!important;max-height:23px!important;
 overflow:hidden!important;
}
body.g682-simple #portalTabs .g682-tab-icon svg,
body.g682-simple #portalTabs .g682-tab-icon .wx-icon{
 display:block!important;width:19px!important;height:19px!important;flex:none!important;
}
body.g682-simple #portalTabs .g682-tab>span:last-child{
 display:block!important;width:100%!important;min-width:0!important;
 white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
 font:600 10px/13px system-ui,sans-serif!important;text-align:center!important;
}
body.g682-simple #portalContent{padding-bottom:calc(100px + env(safe-area-inset-bottom))!important}
body.g682-simple #portalView .g687-customer-banner{
 display:grid;gap:3px;padding:12px;margin:10px 0 16px;background:#e8f1fb;
 border:1px solid #bad4ec;border-left:4px solid #d1a343;border-radius:10px;color:#133b60;
}
body.g682-simple #portalView .g687-customer-banner small{font-size:10px;font-weight:800;letter-spacing:.035em}
body.g682-simple #portalView .g687-customer-banner strong{font-size:17px;line-height:1.25;overflow-wrap:anywhere}
body.g682-simple #portalView .g687-customer-banner span{font-size:11px;color:#496a84}
body.g682-simple #portalView .g508-master input,
body.g682-simple #portalView .g508-master select{
 display:block;box-sizing:border-box;width:100%;min-height:44px;
}
