/* GMAP V837 — responsive safety/audit layer.
   Purpose: protect tablet portrait/landscape and phone landscape without altering business logic. */

body[data-responsive-v837]{overflow-x:hidden}
body[data-responsive-v837] img,body[data-responsive-v837] svg,body[data-responsive-v837] video{max-width:100%}
body[data-responsive-v837] input,body[data-responsive-v837] select,body[data-responsive-v837] textarea,body[data-responsive-v837] button{max-width:100%}
body[data-responsive-v837] :where(.dashboard-main,.main-content,.content,.sa-main,.sa-content,.comm-shell,.comm-main,.special-main,.cd-main,.workspace-main){min-width:0}
body[data-responsive-v837] :where(h1,h2,h3,h4,p,span,strong,small,label,a,button){overflow-wrap:break-word;word-break:normal}

/* ---------- Super Admin ---------- */
@media (max-width:1100px){
  body[data-responsive-v837] .sa-top{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"brand actions" "title title" "search search"!important;
    gap:12px 16px!important;
    padding:16px!important;
  }
  body[data-responsive-v837] .sa-top-brand{grid-area:brand;min-width:0}
  body[data-responsive-v837] .sa-global-search{grid-area:search;display:block!important}
  body[data-responsive-v837] .sa-top-title{grid-area:title;text-align:left!important;padding:0!important;min-width:0!important}
  body[data-responsive-v837] .sa-top-actions{grid-area:actions;justify-self:end;min-width:0;padding-left:0!important}
  body[data-responsive-v837] .sa-top-actions::before{display:none!important}
  body[data-responsive-v837] .sa-top-title::before,body[data-responsive-v837] .sa-top-title::after{display:none!important}
  body[data-responsive-v837] .sa-top-brand span{max-width:none!important}

  body[data-responsive-v837] #membersPanel .member-card{grid-template-columns:1fr!important;gap:16px!important}
  body[data-responsive-v837] #membersPanel .member-left{border-right:0!important;border-bottom:1px solid rgba(60,110,90,.22)!important;padding-right:0!important;padding-bottom:14px!important}
  body[data-responsive-v837] #membersPanel .member-right{grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr)!important;gap:14px!important}
  body[data-responsive-v837] #membersPanel .scope-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-responsive-v837] #membersPanel .scope-label{white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}
  body[data-responsive-v837] #membersPanel .member-actions{grid-column:1/-1!important}
}
@media (max-width:760px){
  body[data-responsive-v837] .sa-top{
    grid-template-columns:1fr!important;
    grid-template-areas:"brand" "title" "search" "actions"!important;
    align-items:stretch!important;
    margin:0 0 12px!important;
    border-radius:0 0 20px 20px!important;
  }
  body[data-responsive-v837] .sa-top-brand{grid-template-columns:56px minmax(0,1fr)!important}
  body[data-responsive-v837] .sa-top-brand img{width:56px!important;height:56px!important}
  body[data-responsive-v837] .sa-top-brand strong{font-size:22px!important;line-height:1.05!important}
  body[data-responsive-v837] .sa-top-brand span{font-size:12.5px!important;line-height:1.35!important}
  body[data-responsive-v837] .sa-top-actions{justify-self:stretch!important;justify-content:flex-start!important;flex-wrap:wrap!important}
  body[data-responsive-v837] .sa-language-pill{flex:1 1 170px;justify-content:center}
  body[data-responsive-v837] .sa-profile{margin-left:auto}
  body[data-responsive-v837] .sa-profile-copy{display:none!important}
  body[data-responsive-v837] .sa-profile-trigger{grid-template-columns:48px 18px!important}
  body[data-responsive-v837] .sa-hero{min-height:auto!important;padding:22px 14px 52px!important}
  body[data-responsive-v837] .sa-hero h1{font-size:clamp(34px,9vw,46px)!important}
  body[data-responsive-v837] .sa-quick-grid{grid-template-columns:1fr!important}
  body[data-responsive-v837] #membersPanel .panel-head{padding:14px!important}
  body[data-responsive-v837] #membersPanel .panel-tools{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  body[data-responsive-v837] #membersPanel .search{min-width:0!important;width:100%!important}
  body[data-responsive-v837] #membersPanel .member-left{grid-template-columns:78px minmax(0,1fr)!important;gap:10px!important}
  body[data-responsive-v837] #membersPanel .member-photo,body[data-responsive-v837] #membersPanel .member-photo-fallback{width:78px!important;height:78px!important}
  body[data-responsive-v837] #membersPanel .member-right{display:grid!important;grid-template-columns:1fr!important}
  body[data-responsive-v837] #membersPanel .scope-grid{grid-template-columns:1fr!important}
  body[data-responsive-v837] #membersPanel .scope-btn{grid-template-columns:34px minmax(0,1fr) 44px!important}
  body[data-responsive-v837] #membersPanel .member-actions{flex-direction:column!important;align-items:stretch!important}
  body[data-responsive-v837] #membersPanel .member-actions button{width:100%!important}
}
@media (max-width:620px){
  body[data-responsive-v837] .sa-content{padding-left:8px!important;padding-right:8px!important}
  body[data-responsive-v837] .sa-top-title strong{font-size:27px!important}
  body[data-responsive-v837] .sa-top-title span{font-size:12px!important}
  body[data-responsive-v837] .sa-eyebrow{font-size:15px!important;padding:0 28px!important}
  body[data-responsive-v837] .sa-hero p{font-size:15px!important}
}

/* ---------- Member dashboard ---------- */
@media (max-width:1180px){
  body[data-responsive-v837] .grid-top,body[data-responsive-v837] .v401-zone,body[data-responsive-v837] .v401-right-grid{min-width:0!important}
  body[data-responsive-v837] .right-stack{min-width:0!important}
  body[data-responsive-v837] .welcome-hero-card,body[data-responsive-v837] .profile-card,body[data-responsive-v837] .status-card,body[data-responsive-v837] .payment-card{max-width:100%!important}
}
@media (max-width:900px){
  body[data-responsive-v837] .userbar{flex-wrap:wrap!important;height:auto!important;min-height:64px!important;gap:8px!important}
  body[data-responsive-v837] .header-search-wrap{flex:1 1 220px!important;min-width:160px!important}
  body[data-responsive-v837] .header-profile-group{min-width:0!important}
  body[data-responsive-v837] .grid-top{grid-template-columns:1fr!important}
  body[data-responsive-v837] .right-stack{display:grid!important;grid-template-columns:1fr!important}
}
@media (max-width:680px){
  body[data-responsive-v837] .userbar{padding-left:10px!important;padding-right:10px!important}
  body[data-responsive-v837] .header-search-wrap{order:10;flex-basis:100%!important;width:100%!important}
  body[data-responsive-v837] .header-profile-group .usertext{display:none!important}
}

/* ---------- Executive / Events / Treasurer shared committee dashboard ---------- */
@media (max-width:1180px){
  body[data-responsive-v837] .dashboard-main,body[data-responsive-v837] .cd-shell,body[data-responsive-v837] .cd-content,body[data-responsive-v837] .workspace-overview{min-width:0!important}
  body[data-responsive-v837] :where(.workspace-tile-grid,.v279-dashboard-grid,.v280-finance-grid,.v792-income-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:820px){
  body[data-responsive-v837] .cd-header{height:auto!important;min-height:64px!important;flex-wrap:wrap!important}
  body[data-responsive-v837] .cd-header-actions{flex-wrap:wrap!important;min-width:0!important}
  body[data-responsive-v837] :where(.workspace-tile-grid,.v279-dashboard-grid,.v280-finance-grid,.v792-income-grid){grid-template-columns:1fr!important}
  body[data-responsive-v837] .workspace-overview-head{display:flex!important;flex-direction:column!important;align-items:flex-start!important}
  body[data-responsive-v837] .workspace-open-btn{width:100%!important}
}
@media (max-width:620px){
  body[data-responsive-v837] .dashboard-main{padding-left:10px!important;padding-right:10px!important}
  body[data-responsive-v837] .v277-card-head,body[data-responsive-v837] .v279-dashboard-head{flex-direction:column!important;align-items:flex-start!important}
}

/* ---------- Special Committee ---------- */
@media (max-width:1180px){
  body[data-responsive-v837] .special-main,body[data-responsive-v837] .special-content{min-width:0!important}
}
@media (max-width:800px){
  body[data-responsive-v837] .special-header,body[data-responsive-v837] .special-topbar{height:auto!important;min-height:64px!important;flex-wrap:wrap!important}
  body[data-responsive-v837] .special-grid,body[data-responsive-v837] .special-stats,body[data-responsive-v837] .special-workspace-grid{grid-template-columns:1fr!important}
}

/* ---------- Communications ---------- */
@media (max-width:1000px){
  body[data-responsive-v837] .comm-shell,body[data-responsive-v837] .comm-layout{grid-template-columns:1fr!important}
  body[data-responsive-v837] .comm-sidebar{position:relative!important;width:auto!important;max-width:none!important;height:auto!important}
  body[data-responsive-v837] .comm-main{min-width:0!important}
}
@media (max-width:700px){
  body[data-responsive-v837] .comm-topbar,body[data-responsive-v837] .comm-toolbar{flex-wrap:wrap!important;height:auto!important}
  body[data-responsive-v837] .comm-message-row,body[data-responsive-v837] .comm-thread-head{min-width:0!important}
}

/* ---------- Homepage / public forms ---------- */
@media (max-width:820px){
  body[data-responsive-v837] :where(.header-inner,.nav-inner,.hero-inner,.section-inner,.container){max-width:100%!important;min-width:0!important}
}

/* Low-height landscape safeguard: do not let sticky headers consume the viewport. */
@media (max-height:520px) and (orientation:landscape){
  body[data-responsive-v837] .sa-top,body[data-responsive-v837] .userbar,body[data-responsive-v837] .cd-header,body[data-responsive-v837] .special-header{position:relative!important;top:auto!important}
  body[data-responsive-v837] .sa-hero{min-height:auto!important}
}
