/* NTIMA OS v13.1.56 — member PWA full-screen canvas, design preserved. */
body.wfms-portal-active{
  margin:0!important;
  min-height:100vh!important;
  overflow-x:hidden!important;
}
body.wfms-portal-active #outer-wrap,
body.wfms-portal-active #wrap,
body.wfms-portal-active #main,
body.wfms-portal-active #content-wrap,
body.wfms-portal-active #primary,
body.wfms-portal-active #content,
body.wfms-portal-active .container,
body.wfms-portal-active .content-area{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body .wfms-app.wfms-member-v1082{
  --ntima-member-gutter:clamp(18px,3vw,48px);
  box-sizing:border-box!important;
  width:100vw!important;
  max-width:none!important;
  min-height:100vh!important;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
  padding-left:var(--ntima-member-gutter)!important;
  padding-right:var(--ntima-member-gutter)!important;
}
.wfms-member-v1082 .wfms-v1082-header{
  margin-left:calc(0px - var(--ntima-member-gutter))!important;
  margin-right:calc(0px - var(--ntima-member-gutter))!important;
  padding-left:clamp(24px,4vw,64px)!important;
  padding-right:clamp(24px,4vw,64px)!important;
}
@media(max-width:760px){
  body .wfms-app.wfms-member-v1082{
    --ntima-member-gutter:12px;
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  .wfms-member-v1082 .wfms-v1082-header{
    padding-left:14px!important;
    padding-right:14px!important;
  }
}

/*
 * NTIMA OS v14.17.2 — member mobile content-width containment.
 *
 * Several Member pages use nested CSS grids whose items kept the browser
 * default min-width:auto. On narrow iOS/PWA viewports, wide children such as
 * the request roadmap and credit summary could therefore enlarge the grid's
 * intrinsic width. The page-level overflow guard then clipped the right-hand
 * content instead of letting the cards shrink. This patch keeps all Member
 * content inside the visual viewport and converts compact progress roadmaps
 * to wrapping grids on phones. No Member/Admin navigation or session logic is
 * changed here.
 */
@media (max-width:900px){
  body.wfms-portal-active .wfms-app.wfms-member-v1082,
  body.wfms-portal-active .wfms-member-v1082 .wfms-main,
  body.wfms-portal-active .wfms-member-v1082 .wfms-section,
  body.wfms-portal-active .wfms-member-v1082 .wfms-card,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-page,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-view,
  body.wfms-portal-active .wfms-member-v1082 .wfms-member-requests-page,
  body.wfms-portal-active .wfms-member-v1082 .wfms-member-request-panel,
  body.wfms-portal-active .wfms-member-v1082 .wfms-member-request-history,
  body.wfms-portal-active .wfms-member-v1082 .wfms-request-history,
  body.wfms-portal-active .wfms-member-v1082 .wfms-request-list,
  body.wfms-portal-active .wfms-member-v1082 .wfms-request-journey-card{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  body.wfms-portal-active .wfms-member-v1082 :is(
    .wfms-credit-page,
    .wfms-credit-view,
    .wfms-credit-summary,
    .wfms-credit-stats,
    .wfms-credit-overview-grid,
    .wfms-credit-details-grid,
    .wfms-member-request-panel,
    .wfms-member-request-history,
    .wfms-request-history,
    .wfms-request-list,
    .wfms-request-journey-card
  ) > *{
    min-width:0!important;
    max-width:100%!important;
  }

  body.wfms-portal-active .wfms-member-v1082 :is(
    .wfms-credit-heading p,
    .wfms-request-panel-head p,
    .wfms-request-journey-head h4,
    .wfms-request-journey-head span,
    .wfms-member-decision-message p,
    .wfms-requested-items,
    .wfms-credit-stat strong,
    .wfms-credit-stat small
  ){
    max-width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-summary,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-stats{
    width:100%!important;
    min-width:0!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-summary>div,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-stat{
    min-width:0!important;
    width:auto!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-hero,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-overview,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-panel{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-hero-top{
    min-width:0!important;
    flex-wrap:wrap!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-hero-top>div{
    min-width:0!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-hero-footer{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-request-history{
    padding:10px!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-request-journey-card{
    margin:10px 0!important;
    padding:14px!important;
    overflow:hidden!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-roadmap{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px 4px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:14px 0!important;
    padding:8px 0 2px!important;
    overflow:visible!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-road-step{
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    padding:0 2px!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-road-step:not(:last-child):after{
    display:none!important;
    content:none!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-road-step>span{
    width:32px!important;
    height:32px!important;
    font-size:12px!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-road-step strong{
    display:block!important;
    margin-top:6px!important;
    font-size:9px!important;
    line-height:1.18!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-timeline{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px 4px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
    padding:12px 0 4px!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-timeline span{
    min-width:0!important;
    width:auto!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-timeline span:not(:last-child):after{
    display:none!important;
    content:none!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-timeline small{
    font-size:9px!important;
    line-height:1.15!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-page,
  body.wfms-portal-active .wfms-member-v1082 .wfms-member-requests-page{
    padding-bottom:18px!important;
    scroll-margin-bottom:calc(120px + env(safe-area-inset-bottom,0px))!important;
  }

  body.wfms-portal-active{
    scroll-padding-bottom:calc(124px + env(safe-area-inset-bottom,0px))!important;
  }
}

@media (max-width:390px){
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-summary,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-stats{
    gap:7px!important;
  }

  body.wfms-portal-active .wfms-member-v1082 .wfms-roadmap,
  body.wfms-portal-active .wfms-member-v1082 .wfms-credit-timeline{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
