/* HCP mobile safe patch v1 — presentation only; source-of-truth unchanged. */
html,body{max-width:100%;overflow-x:clip}
.shell,.sidebar,.main,.content,.page-head,.panel,.node-card,.hcp-home-hero,.stat,.toolbar{min-width:0;max-width:100%}
.hcp-home-hero,.hcp-advanced,.preview-panel,.panel,.stat{overflow-wrap:anywhere}
.table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.table-scroll table{width:max-content;min-width:690px}
#toast{max-width:min(360px,calc(100vw - 24px));z-index:2000}
dialog{max-width:calc(100vw - 24px)}
dialog .modal-body{max-width:100%;min-width:0}
@media(max-width:930px){
 .shell{display:flex;flex-direction:column;min-width:0;width:100%}
 .sidebar{width:100%;max-width:100vw;min-width:0;flex:0 0 auto;overflow:hidden;border-right:0;border-bottom:1px solid #26364d;padding:10px 12px}
 .sidebar .brand{max-width:100%;padding:2px 4px 9px}
 .sidebar .section-caption,.sidebar .aside-bottom{display:none}
 .sidebar nav{display:flex;flex-wrap:nowrap;min-width:0;max-width:100%;width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;scrollbar-width:thin;padding:2px 0 6px;gap:4px}
 .sidebar nav .navitem{flex:0 0 auto;width:auto;min-width:max-content;max-width:none;white-space:nowrap;min-height:42px;margin:0;padding:10px 12px}
 .sidebar nav .navitem[hidden]{display:none!important}
 .main{width:100%;min-width:0}
 .topbar{min-height:52px;height:auto;padding:10px 14px;gap:10px;flex-wrap:wrap}
 .top-left,.top-right{min-width:0;max-width:100%}
 .top-right{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
 .top-left{overflow:hidden}
 #crumbCurrent{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .content{padding:20px 14px}
 .page-head{flex-direction:column;align-items:flex-start;gap:12px}
 .page-head .primary{white-space:normal;max-width:100%}
 .hcp-home-hero{padding:16px 14px}
 .hcp-home-hero-top{flex-direction:column}
 .hcp-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
 .hcp-workflow-note{white-space:normal;overflow-wrap:anywhere}
 .node-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .toolbar{flex-wrap:wrap;gap:10px}
 .vm-filters{max-width:100%}
 .preview-form{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
}
@media(max-width:520px){
 .sidebar{padding:8px 10px}
 .sidebar nav .navitem{padding:9px 11px;font-size:12px}
 .topbar{padding:9px 12px}
 .content{padding:16px 12px}
 .page-head h1{font-size:25px;line-height:1.2}
 .hcp-home-hero{padding:15px 12px}
 .hcp-home-hero h2{font-size:19px}
 .hcp-quick-actions{grid-template-columns:1fr;gap:9px}
 .hcp-quick-action{min-height:94px;padding:12px 42px 12px 13px}
 .hcp-quick-action strong{font-size:14px}
 .hcp-quick-action small{font-size:12px}
 .stat-grid{gap:9px}
 .stat{min-height:112px;padding:12px}
 .stat-value{font-size:26px}
 .node-grid,.monitor-charts,.gateway-status-grid{grid-template-columns:1fr}
 .modal-actions{flex-wrap:wrap}
 .modal-actions>*{flex:1 1 140px}
 .preview-form,.form-grid{grid-template-columns:1fr}
 .row-title,.toolbar{gap:10px}
 #hcpLogout,.refresh-button{min-height:40px}
}
@media(max-width:365px){
 .stat-grid{grid-template-columns:1fr}
 .top-right{width:100%;justify-content:flex-start}
 .sidebar .brand{font-size:16px}
}
@media(prefers-reduced-motion:reduce){
 .sidebar nav{scroll-behavior:auto}
}
