/* MMUST CU Phase 39.2.2 — Member Portal Visibility & Navigation Polish
   Scope: authenticated member portal visual hierarchy, mobile navigation and readability.
   Brand lock: #0099FF blue, #FF9900 orange, #FFFFFF white, approved neutrals. */
:root{
  --p3922-blue:#0099FF;
  --p3922-blue-deep:#0077C8;
  --p3922-orange:#FF9900;
  --p3922-white:#FFFFFF;
  --p3922-ink:#172033;
  --p3922-copy:#344054;
  --p3922-muted:#526173;
  --p3922-soft:#F5F7FA;
  --p3922-blue-soft:#EFF9FF;
  --p3922-orange-soft:#FFF7EA;
  --p3922-border:#D7E1EA;
}

/* 1. Portal typography: no dull micro-copy. */
.member-portal-body{
  color:var(--p3922-ink)!important;
  background:linear-gradient(180deg,#F7FBFE 0%,#F3F6F9 100%)!important;
  font-size:15px;
}
.member-portal-content{color:var(--p3922-ink)!important;background:transparent!important}
.member-portal-content p,
.member-portal-content li,
.member-portal-content dd,
.member-portal-content .muted,
.member-portal-content .empty-mini,
.member-portal-content .empty-state{
  color:var(--p3922-copy)!important;
  font-size:14px!important;
  line-height:1.62!important;
}
.member-portal-content a{font-weight:750}
.member-portal-content .eyebrow{
  color:var(--p3922-blue)!important;
  font-size:11px!important;
  line-height:1.35!important;
  letter-spacing:.085em!important;
  font-weight:900!important;
}
.member-portal-content .member-head h1{color:var(--p3922-ink)!important;font-weight:900!important}
.member-portal-content .member-head p{color:var(--p3922-muted)!important;font-size:14px!important;line-height:1.55!important}
.member-portal-content .panel-top h2,
.member-portal-content .panel h2{color:var(--p3922-ink)!important;font-weight:850!important}
.member-portal-content .panel-top a{color:var(--p3922-blue-deep)!important;font-size:13px!important;font-weight:850!important}

/* 2. Clear MMUST CU card hierarchy without AI-style side stripes. */
.member-portal-content .panel,
.member-portal-content .member-head,
.member-portal-content .stat-card,
.member-portal-content .member-event-card,
.member-portal-content .modern-resource-card,
.member-portal-content .modern-sermon-card{
  border-color:var(--p3922-border)!important;
  box-shadow:0 8px 24px rgba(31,41,55,.055)!important;
}
.member-portal-content .panel{position:relative}
.member-portal-content .panel:focus-within{border-color:rgba(0,153,255,.45)!important}

/* Fix the blank Ministry/EV Team feature card caused by white-on-white inheritance. */
.member-portal-content .community-feature-card{
  position:relative!important;
  min-height:210px!important;
  padding:26px!important;
  border:0!important;
  border-radius:20px!important;
  overflow:hidden!important;
  color:var(--p3922-white)!important;
  background:
    radial-gradient(circle at 92% 14%,rgba(255,153,0,.36),transparent 27%),
    linear-gradient(135deg,var(--p3922-blue) 0%,#0086DE 62%,var(--p3922-blue-deep) 100%)!important;
  box-shadow:0 14px 34px rgba(0,119,200,.16)!important;
}
.member-portal-content .community-feature-card::after{
  content:"";position:absolute;right:-42px;bottom:-58px;width:175px;height:175px;border:24px solid rgba(255,153,0,.22);border-radius:50%;pointer-events:none
}
.member-portal-content .community-feature-card .community-feature-copy,
.member-portal-content .community-feature-card .community-number{position:relative;z-index:1}
.member-portal-content .community-feature-card .eyebrow{color:#FFF!important}
.member-portal-content .community-feature-card h2,
.member-portal-content .community-feature-card p,
.member-portal-content .community-feature-card strong,
.member-portal-content .community-feature-card span{color:#FFF!important}
.member-portal-content .community-feature-card h2{font-size:clamp(26px,4vw,40px)!important;line-height:1.08!important}
.member-portal-content .community-feature-card p{max-width:760px;font-size:15px!important;line-height:1.6!important;color:rgba(255,255,255,.94)!important}
.member-portal-content .community-feature-card .community-abbreviation{
  display:inline-flex!important;align-items:center!important;min-height:29px!important;margin:6px 0 8px!important;padding:4px 10px!important;
  border-radius:999px!important;background:var(--p3922-orange)!important;color:#111827!important;font-size:11px!important;font-weight:900!important
}
.member-portal-content .community-feature-card .community-number{
  border:1px solid rgba(255,255,255,.78)!important;background:rgba(255,255,255,.12)!important;backdrop-filter:blur(6px)
}
.member-portal-content .community-feature-card .community-number strong{font-size:40px!important}
.member-portal-content .community-feature-card .community-number span{font-size:11px!important;letter-spacing:.05em!important}

/* 3. Member header + mobile navigation should visibly belong to MMUST CU. */
.member-portal-body .v3-header{
  border-bottom:3px solid var(--p3922-blue)!important;
  box-shadow:0 5px 18px rgba(0,119,200,.07)!important;
}
.member-portal-body .v3-brand strong{color:var(--p3922-ink)!important;font-weight:900!important}
.member-portal-body .v3-brand small{color:var(--p3922-blue)!important;font-weight:900!important;letter-spacing:.035em}
.member-portal-mobilebar{
  background:#FFF!important;
  border-bottom:1px solid #D9E5ED!important;
  box-shadow:0 5px 16px rgba(0,119,200,.08)!important;
}
.portal-mobile-menu-button{
  min-height:46px!important;
  padding:0 14px!important;
  gap:10px!important;
  border:2px solid var(--p3922-blue)!important;
  border-radius:13px!important;
  background:var(--p3922-blue)!important;
  color:#FFF!important;
  font-size:13px!important;
  font-weight:900!important;
  box-shadow:0 6px 16px rgba(0,153,255,.16)!important;
}
.portal-mobile-menu-button:hover,.portal-mobile-menu-button:focus-visible{
  border-color:var(--p3922-orange)!important;background:var(--p3922-blue-deep)!important;outline:3px solid rgba(255,153,0,.28)!important;outline-offset:2px!important
}
.portal-mobile-menu-lines i{background:var(--p3922-orange)!important;height:3px!important;border-radius:999px!important}
.portal-mobile-current small{color:var(--p3922-blue)!important;font-size:10px!important;font-weight:900!important;letter-spacing:.075em!important}
.portal-mobile-current strong{color:var(--p3922-ink)!important;font-size:15px!important;font-weight:900!important}
.portal-mobile-notifications{
  width:46px!important;height:46px!important;border:2px solid var(--p3922-blue)!important;border-radius:13px!important;
  background:var(--p3922-blue-soft)!important;color:var(--p3922-blue)!important;box-shadow:0 5px 14px rgba(0,153,255,.10)!important
}
.portal-mobile-notifications svg{width:22px!important;height:22px!important;display:block}
.portal-mobile-notifications:hover,.portal-mobile-notifications:focus-visible{background:var(--p3922-blue)!important;color:#FFF!important;border-color:var(--p3922-orange)!important;outline:none!important}
.portal-mobile-notifications b{background:var(--p3922-orange)!important;color:#111827!important;border-color:#FFF!important;font-size:10px!important}

/* 4. Sidebar: larger labels, stronger contrast, clearer active page. */
.member-portal-sidebar{border-right:1px solid #D7E4ED!important}
.portal-sidebar-profile{
  background:linear-gradient(135deg,var(--p3922-blue-deep),var(--p3922-blue))!important;
  box-shadow:0 9px 24px rgba(0,119,200,.18)!important
}
.portal-profile-avatar{background:var(--p3922-orange)!important;color:#111827!important}
.portal-sidebar-profile strong{font-size:14px!important;line-height:1.35!important}
.portal-sidebar-profile span{font-size:11px!important;color:rgba(255,255,255,.94)!important}
.portal-sidebar-profile small{font-size:10.5px!important;color:rgba(255,255,255,.86)!important}
.portal-nav-heading{font-size:10px!important;color:#64748B!important;font-weight:900!important;letter-spacing:.095em!important}
.portal-nav-section>a{min-height:52px!important;border:1px solid transparent!important;padding:7px 9px!important}
.portal-nav-icon{width:34px!important;height:34px!important;background:var(--p3922-blue-soft)!important;color:var(--p3922-blue)!important}
.portal-nav-section>a:nth-of-type(even) .portal-nav-icon{background:var(--p3922-orange-soft)!important;color:#B85F00!important}
.portal-nav-copy strong{font-size:13px!important;color:#243142!important;line-height:1.28!important}
.portal-nav-copy small{font-size:10.5px!important;color:#5E6D7E!important;line-height:1.35!important}
.portal-nav-section>a:hover,.portal-nav-section>a:focus-visible{background:#F8FCFF!important;border-color:#CDEBFC!important;outline:none!important}
.portal-nav-section>a.is-active{
  background:linear-gradient(90deg,#EAF8FF,#F8FCFF)!important;
  border-color:#AFE1FA!important;
  box-shadow:inset 0 3px 0 var(--p3922-blue)!important
}
.portal-nav-section>a.is-active .portal-nav-icon{background:var(--p3922-blue)!important;color:#FFF!important}
.portal-nav-section>a.is-active .portal-nav-copy strong{color:#006EAF!important}
.portal-nav-count{background:var(--p3922-orange)!important;color:#111827!important;font-size:10px!important;font-weight:900!important}
.portal-sidebar-footer>a>strong{font-size:12px!important}

/* 5. Buttons and links: visible, thumb-friendly and branded. */
.member-portal-content .button{min-height:44px!important;font-size:13px!important;font-weight:900!important}
.member-portal-content .button.primary{background:var(--p3922-blue)!important;border-color:var(--p3922-blue)!important;color:#FFF!important}
.member-portal-content .button.secondary{background:var(--p3922-orange)!important;border-color:var(--p3922-orange)!important;color:#111827!important}
.member-portal-content .button.subtle{background:#FFF!important;border:2px solid #C9D6E0!important;color:#243142!important}
.member-portal-content .button.subtle:hover,.member-portal-content .button.subtle:focus-visible{border-color:var(--p3922-blue)!important;color:#006EAF!important;background:var(--p3922-blue-soft)!important}
.community-actions-panel>a{padding:14px 0!important;align-items:center!important}
.community-actions-panel>a b{font-size:13px!important;color:var(--p3922-ink)!important}
.community-actions-panel>a span{font-size:12px!important;color:var(--p3922-blue-deep)!important;font-weight:750!important}

/* 6. Mobile readability and navigation density. */
@media(max-width:700px){
  .member-portal-body{font-size:16px!important}
  .member-portal-body .v3-nav-wrap{min-height:78px!important;padding-left:12px!important;padding-right:12px!important}
  .member-portal-body .v3-brand{max-width:min(72vw,360px)!important}
  .member-portal-body .v3-brand img{width:48px!important;height:48px!important}
  .member-portal-body .v3-brand strong{font-size:12.5px!important;line-height:1.12!important;max-width:250px!important}
  .member-portal-body .v3-brand small{display:block!important;font-size:10.5px!important;margin-top:4px!important}
  .member-portal-mobilebar{top:78px!important;min-height:64px!important;padding:8px 11px!important;gap:9px!important}
  .portal-mobile-menu-button{width:auto!important;min-width:98px!important;justify-content:center!important}
  .portal-mobile-menu-button>span:last-child{display:inline!important}
  .portal-mobile-current strong{font-size:15px!important}

  .member-portal-content .member-shell{padding-top:15px!important}
  .member-portal-content .member-shell>.container,
  .member-portal-content .member-shell>.stat-grid,
  .member-portal-content .member-shell>.dashboard-layout{width:min(100% - 20px,1260px)!important}
  .member-portal-content .member-shell .member-head{padding:18px!important;border-radius:17px!important;gap:14px!important}
  .member-portal-content .member-head h1{font-size:31px!important;line-height:1.07!important}
  .member-portal-content .member-head p{font-size:15px!important;line-height:1.58!important}
  .member-portal-content .panel{padding:18px!important}
  .member-portal-content .panel-top h2{font-size:21px!important}
  .member-portal-content p,
  .member-portal-content li,
  .member-portal-content dd,
  .member-portal-content .muted,
  .member-portal-content .empty-mini,
  .member-portal-content .empty-state{font-size:14.5px!important;line-height:1.6!important}

  /* Complex content panels stack; compact card collections can remain two-across. */
  .member-portal-content .community-engagement-grid,
  .member-portal-content .workspace-content-grid{grid-template-columns:1fr!important;gap:12px!important}
  .member-portal-content .community-feature-card{grid-template-columns:1fr!important;min-height:0!important;padding:21px!important}
  .member-portal-content .community-feature-card h2{font-size:29px!important}
  .member-portal-content .community-feature-card p{font-size:14.5px!important}
  .member-portal-content .community-feature-card .community-number{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;padding:12px 14px!important;width:max-content!important;max-width:100%!important}
  .member-portal-content .community-feature-card .community-number strong{font-size:29px!important}
  .member-portal-content .community-feature-card .community-number span{font-size:10.5px!important}

  .community-actions-panel>a{display:grid!important;grid-template-columns:minmax(90px,.42fr) minmax(0,.58fr)!important;gap:10px!important}
  .community-actions-panel>a b{font-size:13px!important}.community-actions-panel>a span{font-size:12px!important;text-align:right!important}

  .phase11-dashboard .stat-card small{font-size:10px!important}.phase11-dashboard .stat-card strong{font-size:24px!important}.phase11-dashboard .stat-card span{font-size:10.5px!important}
  .member-service-history-page .service-history-summary small{font-size:9.5px!important}.member-service-history-page .service-history-summary span{font-size:10.5px!important}
}

@media(max-width:430px){
  .member-portal-body .v3-brand strong{font-size:11.5px!important;max-width:210px!important}
  .member-portal-body .v3-brand small{font-size:9.5px!important}
  .portal-mobile-menu-button{min-width:90px!important;padding:0 11px!important;font-size:12px!important}
  .portal-mobile-current small{font-size:9px!important}.portal-mobile-current strong{font-size:13.5px!important}
  .portal-nav-copy strong{font-size:13px!important}.portal-nav-copy small{font-size:10.5px!important}
  .member-portal-content .member-head h1{font-size:29px!important}
}

@media(prefers-reduced-motion:reduce){
  .portal-mobile-menu-button,.portal-mobile-notifications,.portal-nav-section>a{transition:none!important}
}
