/* PHASE M1 - Mobile First Rescue: Client Portal */
html,body{max-width:100%;overflow-x:hidden!important}
img,svg,canvas,iframe{max-width:100%;height:auto}input,select,textarea,button{font-size:16px!important}
.btn,button,a,input[type=submit]{min-height:44px;touch-action:manipulation}
.mobile-appbar{display:none}

@media(max-width:900px){
  body{font-size:16px!important;background:#06111f!important}
  .shell{display:block!important;min-height:100vh!important}
  aside{position:fixed!important;left:0!important;top:0!important;bottom:0!important;width:min(82vw,320px)!important;z-index:10001!important;transform:translateX(-105%)!important;transition:.22s ease!important;overflow:auto!important;border-right:1px solid rgba(101,213,255,.20)!important;box-shadow:28px 0 80px rgba(0,0,0,.45)!important}
  aside.open{transform:translateX(0)!important}
  .portal-overlay{display:none;position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.55);backdrop-filter:blur(3px)}
  body.menu-open .portal-overlay{display:block!important}
  .mobile-menu-btn,.mobile-appbar{display:flex!important}
  .mobile-menu-btn{position:fixed!important;right:14px!important;bottom:14px!important;z-index:10002!important;border:0!important;border-radius:999px!important;padding:13px 16px!important;background:linear-gradient(135deg,#2cc9ff,#7357ff)!important;color:#061121!important;font-weight:900!important;box-shadow:0 16px 40px rgba(0,0,0,.34)!important}
  .mobile-appbar{position:sticky;top:0;z-index:9999;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;background:rgba(6,17,31,.92);backdrop-filter:blur(14px);border-bottom:1px solid rgba(101,213,255,.14)}
  .mobile-appbar strong{font-size:15px}.mobile-appbar button{border:1px solid rgba(101,213,255,.18);background:rgba(255,255,255,.06);color:#eaf5ff;border-radius:12px;padding:9px 12px;font-weight:900}
  main{padding:14px!important}
  .top{display:block!important;margin-top:8px!important}
  h1{font-size:25px!important;line-height:1.12!important}h2{font-size:20px!important}
  .stats,.grid2,.partner-grid,.form-grid,.wallet-pro,.board{grid-template-columns:1fr!important;gap:12px!important}
  .stat,.panel,.field,.board-card{border-radius:20px!important;padding:15px!important}
  .stat strong{font-size:23px!important}
  .ref-box{display:grid!important;grid-template-columns:1fr!important}.ref-box input{min-width:0!important}
  .btn,.btn.secondary,button,input[type=submit]{width:100%!important;justify-content:center!important;text-align:center!important;border-radius:14px!important;padding:12px 14px!important}
  input,select,textarea{width:100%!important;max-width:100%!important;border-radius:14px!important;padding:13px!important}
  .qr-card img{width:220px!important;max-width:85vw!important}
  .share-toolkit{display:grid!important;grid-template-columns:1fr 1fr!important}
  .table-wrap{overflow:visible!important;border:0!important}
  table.mobile-card-table,table.mobile-card-table thead,table.mobile-card-table tbody,table.mobile-card-table th,table.mobile-card-table td,table.mobile-card-table tr{display:block!important;width:100%!important}
  table.mobile-card-table thead{display:none!important}
  table.mobile-card-table tr{margin:0 0 12px!important;padding:12px!important;border:1px solid rgba(101,213,255,.14)!important;border-radius:16px!important;background:rgba(255,255,255,.035)!important}
  table.mobile-card-table td{border:0!important;padding:8px 0!important;display:flex!important;justify-content:space-between!important;gap:12px!important;text-align:right!important;word-break:break-word!important}
  table.mobile-card-table td:before{content:attr(data-label);font-weight:800;color:#a8c4e3;text-align:left!important;min-width:42%;max-width:45%}
}
