/* Portal command center + session replay + sticky actions + chart chrome */
.portal-cmd {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 22px;
}

.portal-cmd__row--top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-cmd-card {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background:
    radial-gradient(ellipse 90% 70% at 0% 0%, rgba(212, 175, 55, 0.1) 0%, transparent 55%),
    linear-gradient(165deg, #14120e 0%, #0c0c0e 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.portal-cmd__eyebrow {
  margin: 0 0 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cd7f32;
}

.portal-cmd__title {
  margin: 0 0 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f2f2f2;
  text-transform: uppercase;
}

.portal-cmd__copy {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #b8b8b8;
}

.portal-cmd__meta,
.portal-cmd__stat {
  margin: 0 0 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #d4af37;
  letter-spacing: 0.5px;
}

.portal-cmd__stat {
  font-size: 1.55rem;
  line-height: 1.1;
}

.portal-cmd__link,
.portal-cmd__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.1);
  color: #e8d48a;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.portal-cmd__btn:hover,
.portal-cmd__link:hover {
  background: rgba(212, 175, 55, 0.18);
  color: #fff;
}

/* RR path hero */
.portal-cmd-card--rr {
  padding: 18px 18px 16px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 229, 102, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, #16120a 0%, #0c0c0e 100%);
  border-color: rgba(212, 175, 55, 0.32);
}

.portal-rr__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.portal-rr__need {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffe566;
  letter-spacing: 0.5px;
}

.portal-rr__tiers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-rr__from { color: #d4af37; }
.portal-rr__to { color: #888; }
.portal-rr__arrow { color: #d4af37; opacity: 0.75; }

.portal-rr__track {
  height: 10px;
  border-radius: 999px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.portal-rr__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d4af37 0%, #ffe566 55%, #e87820 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
  transition: width 0.55s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.portal-rr__meta {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: #999;
  text-align: center;
}

/* Challenge cockpit */
.portal-challenge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-challenge__days {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fbbf24;
  text-align: right;
}

/* Session replay celebration */
.celebration-sheet__card--replay {
  max-width: 440px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 48px rgba(212, 175, 55, 0.15), 0 24px 60px rgba(0, 0, 0, 0.55);
}

.celebration-sheet__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 18px;
}

.celebration-sheet__cell {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.18);
  text-align: center;
}

.celebration-sheet__cell-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
}

.celebration-sheet__cell-value {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #d4af37;
}

/* Mobile sticky · solid dark bar (no light gutters between buttons) */
.portal-mobile-sticky {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  gap: 8px;
  align-items: stretch;
  justify-content: stretch;
  padding:
    10px
    max(10px, env(safe-area-inset-right, 0px))
    calc(10px + env(safe-area-inset-bottom, 0px))
    max(10px, env(safe-area-inset-left, 0px));
  /* Solid fill · gradient to transparent was reading as pale stripes on some phones */
  background: #080808;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  min-height: calc(54px + env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
}

.portal-mobile-sticky__primary,
.portal-mobile-sticky__secondary {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 12px 8px;
  border-radius: 12px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 3.4vw, 0.85rem);
  line-height: 1.15;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}

.portal-mobile-sticky__primary {
  background: linear-gradient(135deg, #e8c547 0%, #d4af37 50%, #b8922e 100%);
  color: #0a0a0a;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.portal-mobile-sticky__secondary {
  background: #141414;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: #d4c48a;
}

/* Hero metric scale bump */
.stats-bento .stat-card--hero .stat-card-value {
  font-size: clamp(2rem, 5vw, 2.55rem) !important;
  color: #d4af37 !important;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.28);
}

/* Progress charts premium shell */
.progress-chart-card,
.chart-card,
#progressChartsGrid .card {
  border: 1px solid rgba(212, 175, 55, 0.16) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 229, 102, 0.05);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(212, 175, 55, 0.07) 0%, transparent 55%),
    #0e0e10 !important;
}

@media (max-width: 900px) {
  .portal-cmd__row--top {
    grid-template-columns: 1fr;
  }
  .portal-challenge {
    flex-direction: column;
    align-items: flex-start;
  }
  .portal-challenge__days {
    text-align: left;
  }
  .portal-mobile-sticky {
    display: flex;
  }
  /* [hidden] is display:none !important in UA CSS; force sticky visible after bind */
  .portal-mobile-sticky:not([hidden]) {
    display: flex !important;
  }
  .dashboard-page {
    /* Room for sticky CTAs + home indicator · do not use overflow-x:clip on body (clips fixed bars) */
    padding-bottom: 0;
  }
  /* Narrow phones: slightly tighter letter-spacing so labels fit */
  @media (max-width: 380px) {
    .portal-mobile-sticky__primary,
    .portal-mobile-sticky__secondary {
      letter-spacing: 0.03em;
      font-size: 0.7rem;
      padding: 12px 6px;
    }
  }
}

@media (min-width: 901px) {
  .portal-mobile-sticky {
    display: none !important;
  }
}
