/* Dashboard and member-navigation refinements from the 2026-10-21 design review. */
.dashboard-command-board{
  position:relative;isolation:isolate;overflow:hidden;display:grid;gap:0;
  margin:0 0 24px;padding:clamp(24px,3.2vw,40px);border:1px solid rgba(255,255,255,.9);
  border-radius:32px;background:
    radial-gradient(circle at 92% 5%,rgba(193,226,231,.55),transparent 27%),
    radial-gradient(circle at 8% 100%,rgba(219,239,229,.58),transparent 31%),
    linear-gradient(135deg,rgba(255,252,248,.94),rgba(247,246,255,.8));
  box-shadow:0 30px 70px -48px rgba(31,68,62,.55),inset 0 1px 0 rgba(255,255,255,.95)
}
.dashboard-command-board:before{content:"";position:absolute;z-index:-1;width:360px;height:360px;right:-180px;bottom:-230px;border-radius:50%;border:1px solid rgba(91,144,135,.12);box-shadow:0 0 0 42px rgba(255,255,255,.16),0 0 0 86px rgba(150,197,187,.06)}
.dashboard-command-board.is-live{box-shadow:0 34px 84px -50px rgba(49,105,94,.7),inset 0 1px 0 rgba(255,255,255,.95)}
.dashboard-command-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;padding-bottom:clamp(20px,2.6vw,30px)}
.dashboard-command-head h1{margin:0 0 10px;font-size:clamp(2rem,3.5vw,3rem);line-height:1.04;letter-spacing:-.05em;color:#173a35}
.dashboard-command-head p{max-width:760px;margin:0;color:#6b7975;line-height:1.65}
.dashboard-command-next{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:28px;padding:clamp(22px,2.7vw,32px);border:1px solid rgba(255,255,255,.86);border-radius:25px;background:linear-gradient(132deg,rgba(227,243,238,.78),rgba(255,255,255,.66) 52%,rgba(240,234,248,.52));box-shadow:0 22px 48px -40px rgba(27,74,65,.52),inset 0 1px 0 rgba(255,255,255,.9)}
.dashboard-command-next h2{margin:6px 0 3px;font-size:clamp(1.45rem,2.4vw,2.05rem);letter-spacing:-.035em;color:#1c3d38}
.dashboard-command-next p{margin:0 0 15px;color:#687672}
.dashboard-command-next .today-action-progress{width:min(660px,100%);height:7px;margin-top:15px;background:rgba(73,113,104,.11);border-radius:999px;overflow:hidden}
.dashboard-command-next .today-action-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5d9c8f,#9cc7ba);box-shadow:0 0 18px rgba(88,153,139,.25)}
.dashboard-command-journey{position:relative;display:grid;grid-template-columns:minmax(280px,.82fr) minmax(420px,1.18fr);align-items:center;gap:clamp(22px,3vw,42px);margin-top:22px;padding:22px 24px;border:1px solid rgba(255,255,255,.9);border-radius:22px;background:linear-gradient(125deg,rgba(255,255,255,.72),rgba(236,247,243,.64) 48%,rgba(242,238,250,.58));box-shadow:0 22px 50px -42px rgba(34,80,70,.62),inset 0 1px 0 rgba(255,255,255,.96)}
.dashboard-command-journey:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(105deg,transparent 25%,rgba(255,255,255,.42) 43%,transparent 61%);transform:translateX(-110%);animation:journey-glass-sheen 8s ease-in-out infinite}
.journey-summary-copy{position:relative;z-index:1;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:14px;min-width:0}
.journey-summary-copy>div{display:grid;gap:5px}.journey-summary-copy strong{color:#214b43;font-size:clamp(1rem,1.35vw,1.2rem);letter-spacing:-.015em}.journey-summary-copy small{color:#6d7d78;line-height:1.55}
.journey-emblem{position:relative;display:grid;place-items:center;width:46px;height:46px;border:1px solid rgba(255,255,255,.96);border-radius:16px;background:linear-gradient(145deg,#f8fffc,#e4f3ee);box-shadow:0 15px 28px -20px rgba(35,91,79,.65),inset 0 1px 0 #fff}
.journey-emblem:before,.journey-emblem:after,.journey-emblem span{content:"";position:absolute;border-radius:50%}.journey-emblem:before{width:25px;height:25px;border:1.5px solid rgba(72,133,120,.24)}.journey-emblem:after{width:8px;height:8px;background:#54a08f;box-shadow:0 0 0 6px rgba(84,160,143,.1),0 0 19px rgba(84,160,143,.42)}.journey-emblem span{width:34px;height:34px;border-top:1.5px solid #7c73aa;animation:journey-orbit 5.5s linear infinite}
.journey-milestone-track{position:relative;z-index:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.journey-milestone-track:before{content:"";position:absolute;left:7%;right:7%;top:18px;height:1px;background:linear-gradient(90deg,rgba(83,154,138,.15),rgba(83,154,138,.48),rgba(123,113,169,.2))}
.journey-milestone{position:relative;display:grid;justify-items:center;align-content:start;gap:8px;min-width:0;color:#55706a;font-size:.72rem;font-weight:730;line-height:1.35;text-align:center;animation:journey-rise .55s ease both;animation-delay:calc(var(--journey-index)*90ms)}
.journey-milestone-check{position:relative;z-index:1;display:grid;place-items:center;width:36px;height:36px;border:1px solid rgba(255,255,255,.96);border-radius:50%;background:linear-gradient(145deg,#68aa9a,#4f8e80);color:#fff;font-size:.82rem;box-shadow:0 9px 22px -13px rgba(36,101,87,.8),0 0 0 5px rgba(255,255,255,.42)}
@keyframes journey-glass-sheen{0%,62%{transform:translateX(-110%)}82%,100%{transform:translateX(110%)}}
@keyframes journey-orbit{to{transform:rotate(360deg)}}
@keyframes journey-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

.program-grid{display:grid;gap:22px;align-items:stretch}
.program-grid--1{grid-template-columns:minmax(0,1fr)}
.program-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.program-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.program-grid>.portal-program-card{width:100%;box-sizing:border-box}

.portal-side-utility{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;margin:0 0 13px;padding:6px 5px 6px 12px;border:1px solid rgba(255,255,255,.72);border-radius:15px;background:linear-gradient(135deg,rgba(255,255,255,.6),rgba(230,241,237,.32));box-shadow:0 12px 26px -24px rgba(35,78,68,.48)}
.portal-side-utility-label{display:flex;align-items:center;gap:8px;color:#61736e;font-size:.72rem;letter-spacing:.04em}
.portal-side-utility-label .sa-icon{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.portal-side-utility .portal-collapse-toggle{flex:0 0 34px;align-self:auto;margin:0!important}

.portal-user-bottom{display:grid!important;grid-template-columns:44px minmax(0,1fr) 38px;align-items:center;gap:10px!important;padding-right:7px!important}
.portal-user-identity{display:grid!important;min-width:0}
.portal-profile-menu{position:relative;z-index:4}
.portal-profile-menu>summary{list-style:none;display:grid;place-items:center;width:36px;height:36px;border:1px solid rgba(255,255,255,.9);border-radius:12px;background:rgba(255,255,255,.62);color:#4e756c;cursor:pointer;box-shadow:0 12px 24px -21px rgba(26,69,60,.55);transition:transform .2s ease,background .2s ease}
.portal-profile-menu>summary::-webkit-details-marker{display:none}
.portal-profile-menu>summary:hover,.portal-profile-menu[open]>summary{transform:rotate(8deg);background:#fff}
.portal-profile-menu>summary .sa-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.portal-profile-popover{position:absolute;right:0;bottom:calc(100% + 12px);width:210px;padding:8px;border:1px solid rgba(255,255,255,.9);border-radius:17px;background:rgba(252,251,248,.96);backdrop-filter:blur(20px);box-shadow:0 24px 55px -28px rgba(26,62,56,.58),inset 0 1px 0 #fff}
.portal-profile-popover:after{content:"";position:absolute;right:12px;bottom:-6px;width:12px;height:12px;background:rgba(252,251,248,.96);border-right:1px solid rgba(255,255,255,.9);border-bottom:1px solid rgba(255,255,255,.9);transform:rotate(45deg)}
.portal-profile-popover a,.portal-profile-popover button{position:relative;z-index:1;display:flex!important;align-items:center;gap:9px;width:100%;padding:10px 11px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:#445f59!important;font:inherit;font-size:.78rem!important;font-weight:680!important;text-align:left;cursor:pointer;box-shadow:none!important}
.portal-profile-popover a:hover,.portal-profile-popover button:hover{background:#edf6f2!important;color:#245c52!important;transform:none!important}
.portal-profile-popover form{margin:0}
.portal-profile-popover .sa-icon{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.portal-body.portal-sidebar-collapsed .portal-side-utility{justify-content:center;padding:5px}
.portal-body.portal-sidebar-collapsed .portal-side-utility-label{display:none}
.portal-body.portal-sidebar-collapsed .portal-user-bottom{grid-template-columns:44px 0 38px!important;gap:2px!important}
.portal-body.portal-sidebar-collapsed .portal-user-identity{display:none!important}
.portal-body.portal-sidebar-collapsed .portal-profile-popover{right:-8px}

@media(max-width:1100px){.program-grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}.program-grid--3>.portal-program-card:last-child:nth-child(odd){grid-column:1/-1}}
@media(max-width:900px){.dashboard-command-journey{grid-template-columns:1fr}.journey-milestone-track{max-width:560px;width:100%}}
@media(max-width:820px){.portal-side-utility{display:none}.portal-user-bottom{grid-template-columns:44px minmax(0,1fr) 38px!important}.portal-user-identity{display:grid!important}.program-grid--1,.program-grid--2,.program-grid--3{grid-template-columns:1fr}.program-grid--3>.portal-program-card:last-child:nth-child(odd){grid-column:auto}.dashboard-command-head,.dashboard-command-next{grid-template-columns:1fr}.dashboard-command-head>.btn,.dashboard-command-next>.btn{justify-self:start}.portal-body .portal-side{top:84px!important;bottom:8px!important;height:auto!important;padding-top:20px!important;border:1px solid rgba(255,255,255,.86)!important;border-left:0!important;border-radius:0 22px 22px 0!important;box-shadow:24px 18px 60px -38px rgba(20,50,44,.58)!important}html[dir=rtl] .portal-body .portal-side{border-left:1px solid rgba(255,255,255,.86)!important;border-right:0!important;border-radius:22px 0 0 22px!important}}
@media(max-width:560px){.dashboard-command-board{padding:21px 18px;border-radius:24px}.dashboard-command-head h1{font-size:1.9rem}.dashboard-command-head>.btn,.dashboard-command-next>.btn{width:100%;justify-content:center}.dashboard-command-next{padding:20px 17px;border-radius:20px}.dashboard-command-journey{margin-top:18px;padding:18px 15px}.journey-summary-copy{grid-template-columns:42px minmax(0,1fr);gap:11px}.journey-emblem{width:40px;height:40px;border-radius:14px}.journey-milestone-track{gap:6px}.journey-milestone{font-size:.66rem}.journey-milestone-check{width:32px;height:32px}.journey-milestone-track:before{top:16px}.portal-profile-popover{right:0;width:200px}}
@media(prefers-reduced-motion:reduce){.portal-profile-menu>summary{transition:none}.portal-profile-menu>summary:hover,.portal-profile-menu[open]>summary{transform:none}.dashboard-command-journey:before,.journey-emblem span,.journey-milestone{animation:none}}
/* Guest/member sidebar must remain usable when the saved desktop state is collapsed. */
@media (min-width: 821px) {
    .portal-body .portal-side {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .portal-body.portal-sidebar-collapsed .portal-side .portal-user:not(.portal-user-bottom),
    .portal-body.portal-sidebar-collapsed .portal-side .portal-side-card {
        display: none !important;
    }

    .portal-body.portal-sidebar-collapsed .portal-side nav {
        width: 100%;
    }

    .portal-body.portal-sidebar-collapsed .portal-side nav a {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }
}

/* The mobile drawer always opens at its full width, regardless of saved desktop state. */
@media (max-width: 820px) {
    .portal-body.portal-sidebar-collapsed .portal-side .portal-user:not(.portal-user-bottom) {
        display: grid !important;
    }

    .portal-body.portal-sidebar-collapsed .portal-side .portal-side-card {
        display: block !important;
    }
}
