/* Release 62.0.8 — Global Mobile Responsive Foundation
   Loaded LAST and intentionally applies to the complete LIC application. */

html,body{max-width:100%;overflow-x:hidden}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%}
.table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.executive-table,.admin-panel table{width:100%}

/* Prevent old fixed/min widths from forcing the whole application off-screen. */
.admin-shell,.admin-main,.admin-content,.admin-topbar,.admin-head,
.admin-shell-v32,.executive-admin,.module-heading,.executive-module-heading,
.r6204-hero,.r6204-kpis,.r6204-filter-card,.r6204-register-card,
.r6206-reg-hero,.r6206-rule,.r6204-tabs,
.delegate-hub-section,.dh64-command,.container{min-width:0!important}

/* Desktop/tablet fluidity */
@media(max-width:1280px){
  body.admin-page-v21 .admin-shell.executive-admin,
  .admin-shell.executive-admin,
  .admin-shell-v32{
    grid-template-columns:220px minmax(0,1fr)!important;
  }
  body.admin-page-v21 .admin-main,.admin-main{padding-left:18px!important;padding-right:18px!important}
  .admin-content{width:100%!important;max-width:100%!important}
  .r6204-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* Switch the complete admin application to an off-canvas sidebar on tablets/phones. */
@media(max-width:1024px){
  body.admin-page-v21 .admin-shell.executive-admin,
  body.admin-page-v21 .admin-shell,
  .admin-shell.executive-admin,
  .admin-shell-v32,
  .admin-shell{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
  }

  body.admin-page-v21 .admin-shell.executive-admin>aside,
  body.admin-page-v21 .admin-shell>aside,
  .admin-shell.executive-admin>aside,
  .admin-shell-v32>aside,
  .admin-shell>aside{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    left:-290px!important;
    width:280px!important;
    max-width:82vw!important;
    height:100dvh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    z-index:1000!important;
    transition:left .22s ease!important;
    box-shadow:20px 0 45px rgba(3,40,47,.24)!important;
  }

  body.admin-menu-open .admin-shell>aside,
  body.admin-page-v21.admin-menu-open .admin-shell.executive-admin>aside,
  body.admin-menu-open .admin-shell.executive-admin>aside{
    left:0!important;
  }

  body.admin-menu-open:after{
    content:"";position:fixed;inset:0;background:rgba(2,29,34,.48);z-index:990;
  }

  body.admin-page-v21 .admin-main,.admin-main,
  .admin-shell-v32 .admin-main{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0 14px 36px!important;
    overflow:visible!important;
  }

  body.admin-page-v21 .admin-topbar,.admin-topbar{
    width:auto!important;
    max-width:none!important;
    margin:0 -14px 16px!important;
    padding:8px 14px!important;
    min-height:64px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
  }

  .admin-menu-toggle{display:inline-grid!important;place-items:center!important;flex:0 0 42px!important}
  .admin-search{flex:1 1 auto!important;min-width:0!important}
  .admin-search input{width:100%!important}
  .admin-system-status{display:none!important}

  /* Header/admin profile should not consume the viewport. */
  .admin-profile,.admin-user-card,.admin-account{
    flex:0 0 auto!important;
    max-width:210px!important;
  }

  .admin-content>*{max-width:100%!important}

  /* All large executive hero blocks collapse naturally. */
  .r6204-hero,.r6206-reg-hero,.d6202-hero,.d620-adminhero,.d620-readhero,
  .p617-hero,.d619-adminhero,.d618-adminhero,.d616-modhero,
  .r6203-pass-hero>.container,.r6203-rsvp-hero>.container{
    grid-template-columns:1fr!important;
  }
  .r6204-hero-meta,.r6202-hero-actions,.r6206-reg-kpis{justify-content:flex-start!important}
  .r6204-kpis,.d620-kpis,.d619-kpis,.p617-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  .r6204-filter-form,.r6204-filter-form.delegate,
  .p617-form,.r48-form-grid,.admin-grid-2,
  .d6202-invest-intro,.r6203-pass-main{
    grid-template-columns:1fr!important;
  }
  .r6204-filter-form .wide{grid-column:auto!important}

  .r6204-tabs,.dh64-nav.d618-tabs,.p617-tabs{
    overflow-x:auto!important;
    white-space:nowrap!important;
    scrollbar-width:none!important;
  }
  .r6204-tabs::-webkit-scrollbar,.dh64-nav.d618-tabs::-webkit-scrollbar,.p617-tabs::-webkit-scrollbar{display:none}

  .r6204-register-card>header,.r6204-filter-head,.panel-title,.admin-head{
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:8px!important;
  }

  /* Tables scroll inside their card, never the page. */
  .r6204-register-card,.admin-panel{overflow:hidden!important}
  .table-scroll{overflow-x:auto!important}
  .r6204-table,.r6206-reg-table{min-width:980px!important}

  /* Public site */
  .container{width:min(100% - 28px,1180px)!important}
  .nav-wrap{height:68px!important}
  .brand img{width:165px!important}
  .nav-menu{display:none!important}
  .nav-toggle{display:block!important}
  .nav-actions{margin-left:auto!important}
  .hero-inner,.intro-grid,.feature-grid,.highlight-grid{
    grid-template-columns:1fr!important;
  }
  .hero h1{font-size:clamp(38px,8vw,58px)!important}
  .opportunity-orbit{width:min(420px,88vw)!important;height:min(420px,88vw)!important}
}

/* Phones */
@media(max-width:720px){
  .admin-main{padding-left:10px!important;padding-right:10px!important}
  .admin-topbar{margin-left:-10px!important;margin-right:-10px!important;padding-left:10px!important;padding-right:10px!important}

  /* Screenshot-specific issue: cards must use the full viewport width. */
  .r6204-hero,.r6206-reg-hero,.module-heading,.executive-module-heading,
  .r6204-filter-card,.r6204-register-card,.r6204-tabs,.r6205-reconcile,.r6207-live,
  .admin-panel,.r48-admin-card{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  .r6204-hero{padding:20px 17px!important;border-radius:14px!important}
  .r6204-hero h2{font-size:25px!important;line-height:1.08!important}
  .r6204-hero p{font-size:12px!important;line-height:1.5!important}
  .r6204-hero-meta{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  .r6204-hero-meta i{display:none!important}
  .r6204-hero-meta span{width:100%!important}

  .r6204-kpis{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .r6204-kpis article{
    grid-template-columns:28px 1fr!important;
    padding:10px!important;
    min-width:0!important;
  }
  .r6204-kpis article>i{width:27px!important;height:27px!important}
  .r6204-kpis b{font-size:19px!important}
  .r6204-kpis small{font-size:6px!important}

  .r6205-reconcile,.r6207-live,.r6207-data-error{
    grid-template-columns:26px 1fr!important;
  }
  .r6205-reconcile>em,.r6207-live>em{grid-column:2!important;width:max-content!important}

  .r6204-tabs{
    position:sticky!important;
    top:64px!important;
    z-index:30!important;
    padding:5px!important;
  }

  .r6204-filter-card{padding:13px!important}
  .r6204-filter-form,.r6204-filter-form.delegate{display:grid!important;grid-template-columns:1fr!important}
  .r6204-filter-form input,.r6204-filter-form select{font-size:16px!important}
  .r6204-filter-form .btn{width:100%!important;min-height:42px!important}

  .r6204-register-card>header{padding:14px!important}
  .r6204-legend{flex-wrap:wrap!important}

  /* Creation forms: one field per row and large touch targets. */
  .r6204-create-grid,.r49-admin-grid{display:grid!important;grid-template-columns:1fr!important}
  .r48-form-grid,.r49-form-grid{display:grid!important;grid-template-columns:1fr!important}
  .r48-form input,.r48-form select,.r48-form textarea{font-size:16px!important;min-height:44px!important}
  .r48-form .btn{width:100%!important;min-height:44px!important}

  /* Generic application cards/grids */
  .admin-stats,.admin-kpi-grid,.admin-kpis,.executive-kpi-grid,.intelligence-kpis,
  .feature-grid,.highlight-grid,.d6202-network-summary,.d618-wallet-grid,
  .d619-connections,.d620-discovery.active,.d615-engage,.dh64-metrics,
  .dh64-launchpad,.r6206-reg-kpis{
    grid-template-columns:1fr!important;
  }

  .hero{min-height:auto!important;padding:45px 0!important}
  .hero-inner{min-height:auto!important}
  .hero-actions{flex-direction:column!important}
  .hero-actions .btn{width:100%!important}
  .opportunity-orbit{display:none!important}

  /* Public header mobile behavior */
  .nav-actions .btn{padding:10px 12px!important;font-size:9px!important}
  .nav-actions .btn-outline{display:none!important}

  /* Delegate Hub */
  .dh64-command{padding-left:0!important;padding-right:0!important}
  .d6202-hero,.dh64-welcome{border-radius:15px!important}
  .d6202-hero-actions{width:100%!important}
  .d6202-policy{grid-template-columns:24px 1fr!important}
  .d6202-policy>a{display:none!important}

  /* RSVP & pass */
  .r6203-rsvp-hero h1{font-size:34px!important}
  .r6203-event{grid-template-columns:1fr!important}
  .r6203-rsvp-content,.r6203-pass-wrap{width:calc(100% - 24px)!important}
  .r6203-options{padding:0 14px 16px!important}
  .r6203-options>label{grid-template-columns:28px 34px 1fr!important}
  .r6203-pass-main{padding:16px!important}
  .r6203-pass-details{grid-template-columns:1fr!important}

  /* Make feedback/messages readable on phones. */
  .flash,.alert,.notice{max-width:calc(100vw - 20px)!important}
}

/* Very small phones */
@media(max-width:430px){
  .r6204-kpis{grid-template-columns:1fr 1fr!important}
  .admin-profile,.admin-user-card,.admin-account{max-width:150px!important}
  .admin-profile small,.admin-user-card small,.admin-account small{display:none!important}
  .r6204-hero-meta{grid-template-columns:1fr!important}
  .r6204-tabs button{padding:8px 9px!important;font-size:8px!important}
  .r6204-table,.r6206-reg-table{min-width:900px!important}
}

/* Safe-area support for installed PWA / iPhone. */
@supports(padding:max(0px)){
  @media(max-width:720px){
    .admin-main{padding-bottom:max(32px,env(safe-area-inset-bottom))!important}
    .d618-bottom{padding-bottom:max(6px,env(safe-area-inset-bottom))!important}
  }
}
