/* V105.1 Visual Balance Patch
   Fixes homepage stat contrast, auth/login layout, and stretched portal dashboard widgets. */
:root{
  --mhub-green:#064915;
  --mhub-green-2:#0d6225;
  --mhub-ink:#0b1020;
  --mhub-muted:#65738a;
  --mhub-line:#dce9df;
}

/* Public homepage hero: make highlighted stats readable and intentional */
.hero-shell{
  min-height:min(620px,72vh)!important;
  background:
    radial-gradient(circle at 18% 45%,rgba(6,73,21,.09),transparent 0 30%,transparent 48%),
    linear-gradient(90deg,#fff 0%,#fff 39%,rgba(255,255,255,.78) 53%,rgba(244,250,246,.7) 100%)!important;
}
.hero-shell:before{
  inset:0 0 0 43%!important;
  background:
    linear-gradient(90deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.78) 22%,rgba(255,255,255,.22) 52%,rgba(255,255,255,.06) 100%),
    url('../images/hero-community.jpg') center right/cover no-repeat!important;
  opacity:.96!important;
}
.hero-shell .container{
  max-width:1320px!important;
  padding-top:2.15rem!important;
  padding-bottom:2.15rem!important;
}
.hero-title{
  max-width:740px!important;
  font-size:clamp(2.65rem,5vw,5.25rem)!important;
  line-height:.94!important;
  letter-spacing:-.07em!important;
  color:#050914!important;
}
.hero-copy{
  max-width:670px!important;
  color:#34445a!important;
  font-size:.98rem!important;
  line-height:1.6!important;
}
.hero-stat-grid{
  width:min(760px,100%)!important;
  max-width:760px!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;
  padding:0!important;
  margin-top:1.65rem!important;
  border-radius:20px!important;
  overflow:hidden!important;
  background:#063f17!important;
  border:1px solid rgba(255,255,255,.22)!important;
  box-shadow:0 26px 70px rgba(0,45,16,.28)!important;
}
.hero-stat-card{
  background:#063f17!important;
  border:0!important;
  border-right:1px solid rgba(255,255,255,.16)!important;
  border-radius:0!important;
  min-height:76px!important;
  padding:1rem 1.05rem!important;
  color:#fff!important;
}
.hero-stat-card:nth-child(4n){border-right:0!important;}
.hero-stat-card strong{
  color:#fff!important;
  font-size:1.52rem!important;
  font-weight:950!important;
  line-height:1!important;
  letter-spacing:-.035em!important;
}
.hero-stat-card span{
  color:rgba(255,255,255,.88)!important;
  font-size:.76rem!important;
  line-height:1.25!important;
  font-weight:650!important;
  margin-top:.32rem!important;
}
.impact-strip{margin-top:0!important;padding-top:1.7rem!important;}

/* Login and password pages: compact premium two-column layout */
.auth-shell-v1041{
  max-width:1180px!important;
  padding:42px 18px 56px!important;
}
.auth-grid-v1041{
  grid-template-columns:minmax(0,.92fr) minmax(380px,480px)!important;
  gap:1rem!important;
}
.auth-brand-v1041,
.auth-card-v1041{
  border-radius:24px!important;
  box-shadow:0 22px 54px rgba(3,45,18,.09)!important;
}
.auth-brand-v1041{
  min-height:390px!important;
  padding:1.65rem!important;
}
.auth-brand-v1041 h2{
  font-size:clamp(1.85rem,3.2vw,3.15rem)!important;
  line-height:1!important;
}
.auth-card-v1041{
  padding:1.55rem!important;
}
.auth-card-v1041 h1{
  font-size:clamp(1.55rem,2.1vw,2.15rem)!important;
}
.auth-card-v1041 .auth-subtitle{
  font-size:.92rem!important;
  margin-bottom:1rem!important;
}
.auth-card-v1041 .form-control{
  min-height:44px!important;
  font-size:.94rem!important;
  border-radius:14px!important;
}
.auth-actions-v1041 .btn{min-height:42px!important;padding:.55rem 1rem!important;}
.auth-help-v1041{font-size:.84rem!important;}

/* Portal/dashboard cards: stop equal-height rows creating huge empty cards */
.v104-grid.two,
.v104-grid.three,
.v104-grid.four,
.v104-grid.auto{align-items:start!important;}
.v104-card.green{min-height:0!important;height:auto!important;}
.v104-card.green .v104-section-title{font-size:clamp(1.15rem,1.8vw,1.65rem)!important;line-height:1.1!important;}
.v104-card.green p{font-size:.9rem!important;}
.v104-hero{padding:1.35rem!important;border-radius:26px!important;}
.v104-hero h1{font-size:clamp(1.75rem,3.1vw,3.1rem)!important;line-height:1!important;}
.v104-hero p{font-size:.94rem!important;}
.v104-title{font-size:clamp(1.55rem,2.25vw,2.25rem)!important;}
.v104-card{border-radius:21px!important;padding:1rem!important;}
.v104-list-item{padding:.72rem .82rem!important;border-radius:16px!important;}

/* Admin: keep command centre premium but slightly denser */
.admin-v105 .dashboard-topbar,
.admin-shell .dashboard-topbar{padding:18px 30px!important;}
.admin-v105-page{padding:24px 30px 38px!important;}
.admin-v105 h1,.admin-v105 .h1{font-size:clamp(27px,2.7vw,46px)!important;}
.admin-v105-hero{padding:28px!important;border-radius:26px!important;}
.admin-v105-hero-grid{gap:18px!important;}
.admin-v105-hero-metric{padding:14px!important;border-radius:18px!important;}
.admin-v105-hero-metric strong{font-size:28px!important;}
.admin-v105-panel{padding:18px!important;border-radius:22px!important;}
.admin-v105-workgrid{gap:12px!important;}
.admin-v105-module-card{min-height:128px!important;padding:16px!important;border-radius:20px!important;}
.admin-v105 .table th,.admin-shell .table th{font-size:10.5px!important;}
.admin-v105 .table,.admin-shell .table{font-size:13px!important;}

@media(max-width:1199.98px){
  .hero-shell{min-height:auto!important;}
  .hero-shell:before{inset:36% 0 0 0!important;opacity:.42!important;}
  .hero-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .hero-stat-card:nth-child(2n){border-right:0!important;}
  .auth-grid-v1041{grid-template-columns:1fr!important;}
}
@media(max-width:767.98px){
  .hero-shell:before{display:none!important;}
  .hero-title{font-size:clamp(2.25rem,12vw,3.55rem)!important;}
  .hero-stat-grid{grid-template-columns:1fr!important;}
  .hero-stat-card{border-right:0!important;border-bottom:1px solid rgba(255,255,255,.14)!important;}
  .hero-stat-card:last-child{border-bottom:0!important;}
  .auth-brand-v1041{display:none!important;}
  .auth-shell-v1041{padding:28px 14px 44px!important;}
  .auth-card-v1041{padding:1.2rem!important;}
  .admin-v105-page,.admin-v105 .dashboard-topbar,.admin-shell .dashboard-topbar{padding:18px!important;}
}
