/* ==========================================================================
   Investmentz Partner Dashboard — custom styles
   Only rules that Bootstrap 5.3 does not already provide live here.
   Brand primary / secondary are overridden inside bootstrap.css itself.

   THEMING
   Three themes are selectable from Profile > Appearance. The chosen theme is
   written to <html data-theme="..."> by custom.js before the body paints, so
   there is no flash of the wrong colours. Everything themeable is a variable
   in section 1b; components below only ever read those variables.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1a. Fixed brand palette — identical in every theme
   -------------------------------------------------------------------------- */
:root {
  /* Purple ramp */
  --app-purple: #493276;
  --app-purple-700: #372659;
  --app-purple-600: #5d4086;
  --app-purple-400: #7e669e;
  --app-purple-100: #d2cadd;
  --app-purple-050: #efe9f5;

  /* Orange ramp */
  --app-orange: #f47b1f;
  --app-orange-600: #d16022;
  --app-orange-050: #fff1de;

  /* Chart ink */
  --app-chart-bar: #7a54a8;

  /* Surfaces — the canvas, border tints and warm fill are themed (see 1b) */
  --app-surface: #ffffff;

  /* Text */
  --app-heading: #27213a;
  --app-body: #3a3350;
  --app-muted: #6b6480;

  /* Status */
  --app-success: #16a34a;
  --app-success-bg: #daf8df;

  /* Metrics */
  --app-topbar-h: 56px;
  --app-sidebar-w: 240px;
  --app-radius: 12px;
  --app-radius-sm: 8px;
  --app-shadow: 0 1px 2px rgba(39, 33, 58, .06);
  --app-shadow-lg: 0 8px 24px rgba(39, 33, 58, .12);

  /* Kept for backwards compatibility with earlier markup */
  --app-primary: var(--app-purple);
  --app-primary-700: var(--app-purple-700);
  --app-primary-600: var(--app-purple-600);
  --app-primary-400: var(--app-purple-400);
  --app-primary-100: var(--app-purple-100);
  --app-primary-050: var(--app-purple-050);
  --app-secondary: var(--app-orange);
  --app-secondary-600: var(--app-orange-600);
  --app-secondary-050: var(--app-orange-050);
}

/* --------------------------------------------------------------------------
   1b. Themeable slots
   Only the page canvas, its border/fill tints and the accent colour change
   between themes. The top bar and sidebar stay Investmentz purple in all
   three, and the sidebar promo buttons stay orange — that is fixed brand
   furniture rather than part of the theme.
   The :root defaults are the Orange Accent theme, so the page is still
   correctly styled if JavaScript never runs.
   -------------------------------------------------------------------------- */

/* Brand furniture — identical in every theme */
:root {
  --app-sidebar-bg: var(--app-purple);
  --app-sidebar-text: rgba(255, 255, 255, .88);
  --app-sidebar-hover-bg: rgba(255, 255, 255, .12);
  --app-sidebar-hover-text: #fff;
  --app-sidebar-active-bg: #ffffff;
  --app-sidebar-active-text: var(--app-purple);
  --app-sidebar-border: rgba(255, 255, 255, .14);

  --app-promo-bg: var(--app-purple-600);
  --app-promo-btn-bg: var(--app-orange);
  --app-promo-btn-color: #fff;
  --app-accent-on: #fff;
}

/* Orange Accent — warm cream canvas, orange highlights */
:root,
[data-theme="orange"] {
  --app-accent: var(--app-orange);
  --app-accent-600: var(--app-orange-600);
  --app-accent-050: #ffeeda;

  --app-bg: #fff9f2;
  --app-border: #f0e2d3;
  --app-border-soft: #f1e8de;
  --app-surface-warm: #fff4e6;
}

/* White — near-white canvas, neutral borders, purple highlights */
[data-theme="white"] {
  --app-accent: var(--app-purple);
  --app-accent-600: var(--app-purple-700);
  --app-accent-050: #f4f0fa;

  --app-bg: #fdfdfe;
  --app-border: #e9e6f0;
  --app-border-soft: #eeecf4;
  --app-surface-warm: #fafafc;
}

/* Purple — lavender-tinted canvas, purple highlights */
[data-theme="purple"] {
  --app-accent: var(--app-purple);
  --app-accent-600: var(--app-purple-700);
  --app-accent-050: #f1ecf9;

  --app-bg: #f7f5fc;
  --app-border: #e6e1f0;
  --app-border-soft: #ece8f4;
  --app-surface-warm: #f3f0fa;
}

/* Accent-driven Bootstrap buttons follow the theme */
.btn-secondary {
  --bs-btn-bg: var(--app-accent);
  --bs-btn-border-color: var(--app-accent);
  --bs-btn-hover-bg: var(--app-accent-600);
  --bs-btn-hover-border-color: var(--app-accent-600);
  --bs-btn-active-bg: var(--app-accent-600);
  --bs-btn-active-border-color: var(--app-accent-600);
  --bs-btn-disabled-bg: var(--app-accent);
  --bs-btn-disabled-border-color: var(--app-accent);
}

.btn-outline-secondary {
  --bs-btn-color: var(--app-accent);
  --bs-btn-border-color: var(--app-accent);
  --bs-btn-hover-bg: var(--app-accent);
  --bs-btn-hover-border-color: var(--app-accent);
  --bs-btn-active-bg: var(--app-accent);
  --bs-btn-active-border-color: var(--app-accent);
  --bs-btn-disabled-color: var(--app-accent);
  --bs-btn-disabled-border-color: var(--app-accent);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
body {
  background-color: var(--app-bg);
  color: var(--app-body);
  font-size: .9375rem;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

.text-heading {
  color: var(--app-heading);
}

.text-muted-app {
  color: var(--app-muted);
}

.text-brand {
  color: var(--app-purple);
}

.text-accent {
  color: var(--app-accent);
}

.text-success-app {
  color: var(--app-success);
}

/* --------------------------------------------------------------------------
   3. Top bar — purple in every theme
   -------------------------------------------------------------------------- */
.app-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1040;
  height: var(--app-topbar-h);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-inline: 1rem;
  background-color: var(--app-purple);
  color: #fff;
}

/* Reversed (white) wordmark, generated from the brand PNG so it reads on the
   purple bar. Natural size is 248x39; height drives the scale. */
.app-topbar-logo {
  height: 32px;
  width: auto;
  display: block;
}

/* Narrow phones: at 32px the wordmark is 203px wide and pushes the bell and
   avatar off the right edge, so step it down below 400px. */
@media (max-width: 400px) {
  .app-topbar-logo {
    height: 24px;
  }
}

.app-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--app-radius-sm);
  background-color: #fff;
  color: var(--app-purple);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .8125rem;
  flex: 0 0 auto;
}

.app-logo-text {
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.05;
}

.app-logo-text .dot-com {
  color: var(--app-accent);
}

.app-logo-tagline {
  font-size: .5625rem;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .7);
  line-height: 1;
}

.app-topbar-divider {
  width: 1px;
  height: 24px;
  background-color: rgba(255, 255, 255, .25);
}

.app-page-title {
  font-size: .9375rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Search */
.app-search {
  position: relative;
  width: min(320px, 34vw);
  height: 34px;
  align-items: center;
  padding: 0 2.25rem 0 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background-color: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .65);
  font-size: .8125rem;
  text-align: left;
}

.app-search:hover,
.app-search:focus-visible {
  background-color: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .45);
  color: rgba(255, 255, 255, .85);
}

.app-search-placeholder {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-search-icon {
  position: absolute;
  top: 50%;
  left: .75rem;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .7);
  pointer-events: none;
}

.app-search-modal {
  position: fixed;
  inset: 0;
  z-index: 2800;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4.5rem 1rem 2rem;
  background: rgba(28, 16, 46, .45);
}

.app-search-modal.is-on {
  display: flex;
}

.app-search-dialog {
  width: min(560px, 100%);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(28, 16, 46, .28);
  overflow: hidden;
}

.app-search-dialog-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--app-border);
}

.app-search-dialog-icon {
  color: var(--app-muted);
  flex: 0 0 auto;
}

.app-search-dialog-bar .form-control {
  border: 0;
  box-shadow: none;
  padding: 0;
  font-size: .9375rem;
}

.app-search-dialog-bar .form-control:focus {
  box-shadow: none;
}

.app-search-close {
  border: 0;
  background: transparent;
  color: var(--app-muted);
  padding: .25rem;
  border-radius: 6px;
}

.app-search-close:hover {
  color: var(--app-heading);
  background: var(--app-surface);
}

.app-search-dialog-body {
  overflow: auto;
  padding: .75rem;
}

.app-search-section {
  margin: 0 .5rem .375rem;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.app-search-results {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.app-search-hit {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  padding: .75rem .875rem;
  background: transparent;
  color: var(--app-heading);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

.app-search-hit:hover,
.app-search-hit.is-active {
  background: var(--app-purple-050);
  color: var(--app-purple);
}

.app-search-empty {
  margin: .75rem .5rem;
  font-size: .875rem;
  color: var(--app-muted);
}

/* --------------------------------------------------------------------------
   Login — space starfall + light
   -------------------------------------------------------------------------- */
.login-body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background: #060212;
  color: #fff;
  overflow-x: hidden;
}

.login-space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 18% 8%, rgba(130, 70, 230, .55), transparent 58%),
    radial-gradient(ellipse 70% 55% at 88% 78%, rgba(255, 120, 40, .28), transparent 52%),
    radial-gradient(ellipse 50% 40% at 60% 35%, rgba(60, 140, 220, .16), transparent 55%),
    linear-gradient(165deg, #1a0b38 0%, #0a0418 46%, #12061f 100%);
}

.login-lights {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.login-aurora {
  position: absolute;
  left: -10%;
  top: 8%;
  width: 70%;
  height: 42%;
  background: linear-gradient(115deg,
    transparent 10%,
    rgba(140, 90, 255, .28) 35%,
    rgba(80, 180, 255, .18) 55%,
    rgba(255, 140, 70, .16) 72%,
    transparent 90%);
  filter: blur(28px);
  transform: skewY(-8deg);
  animation: login-aurora 10s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

.login-aurora--2 {
  left: 20%;
  top: 38%;
  width: 80%;
  height: 36%;
  opacity: .75;
  animation-duration: 14s;
  animation-direction: alternate-reverse;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  mix-blend-mode: screen;
}

.login-orb--violet {
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  left: -8%;
  top: -12%;
  background: radial-gradient(circle, rgba(170, 110, 255, .55) 0%, rgba(100, 50, 200, .2) 42%, transparent 70%);
  animation: login-orb-pulse 7s ease-in-out infinite;
}

.login-orb--amber {
  width: min(460px, 65vw);
  height: min(460px, 65vw);
  right: -10%;
  bottom: -14%;
  background: radial-gradient(circle, rgba(255, 160, 70, .45) 0%, rgba(244, 123, 31, .18) 45%, transparent 72%);
  animation: login-orb-pulse 9s ease-in-out infinite reverse;
}

.login-orb--cyan {
  width: min(280px, 40vw);
  height: min(280px, 40vw);
  left: 42%;
  top: 28%;
  background: radial-gradient(circle, rgba(120, 210, 255, .28) 0%, transparent 70%);
  animation: login-orb-float 11s ease-in-out infinite;
}

.login-beam {
  position: absolute;
  top: -20%;
  left: 18%;
  width: 2px;
  height: 140%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 220, 180, .0) 15%,
    rgba(255, 210, 150, .45) 48%,
    rgba(180, 140, 255, .25) 70%,
    transparent 100%);
  filter: blur(1.5px);
  transform: rotate(18deg);
  opacity: .55;
  animation: login-beam 6s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(255, 200, 140, .35);
}

.login-beam--2 {
  left: 72%;
  transform: rotate(-14deg);
  opacity: .4;
  animation-delay: 1.4s;
  animation-duration: 8s;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(180, 140, 255, .0) 20%,
    rgba(180, 140, 255, .4) 50%,
    rgba(255, 180, 100, .2) 75%,
    transparent 100%);
}

.login-horizon {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 120%;
  height: 38%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(255, 140, 60, .22) 0%,
    rgba(120, 60, 200, .12) 40%,
    transparent 72%);
  filter: blur(10px);
  animation: login-horizon 8s ease-in-out infinite alternate;
}

.login-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 220, 180, .06), transparent 35%),
    radial-gradient(ellipse at center, transparent 45%, rgba(3, 1, 10, .62) 100%);
}

.login-shell {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

.login-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  background: transparent;
}

.login-hero-content {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  margin-top: 12vh;
  animation: login-rise .8s cubic-bezier(.2, .8, .2, 1) both;
}

.login-logo {
  height: 34px;
  width: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, .25));
}

.login-eyebrow {
  margin: 0 0 .75rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 230, 200, .78);
}

.login-headline {
  margin: 0 0 1rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-shadow:
    0 0 24px rgba(255, 210, 160, .35),
    0 0 48px rgba(160, 120, 255, .55),
    0 2px 20px rgba(0, 0, 0, .35);
}

.login-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .78);
  max-width: 26rem;
}

.login-meteors {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  gap: .55rem;
}

.login-meteors li {
  width: 2.5rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), #f47b1f);
  opacity: .55;
  animation: login-meteor-pulse 2.8s ease-in-out infinite;
}

.login-meteors li:nth-child(2) { animation-delay: .45s; width: 1.6rem; opacity: .4; }
.login-meteors li:nth-child(3) { animation-delay: .9s; width: 2rem; opacity: .35; }

.login-panel {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: transparent;
}

.login-card {
  position: relative;
  overflow: hidden;
  width: min(420px, 100%);
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow:
    0 30px 80px rgba(4, 1, 16, .5),
    0 0 40px rgba(150, 90, 255, .28),
    0 0 80px rgba(244, 123, 31, .18),
    0 0 0 1px rgba(120, 80, 200, .16),
    inset 0 1px 0 rgba(255, 255, 255, .85);
  backdrop-filter: blur(18px);
  color: #27213a;
  animation: login-rise .7s .08s cubic-bezier(.2, .8, .2, 1) both, login-card-halo 5s ease-in-out infinite;
}

.login-card-glow {
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(180, 120, 255, .55),
    rgba(255, 255, 255, .05) 40%,
    rgba(244, 123, 31, .5));
  opacity: .55;
  filter: blur(10px);
  z-index: 0;
  animation: login-card-ring 4.5s ease-in-out infinite;
}

.login-card-shine {
  position: absolute;
  inset: -40% auto auto -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255, 200, 120, .28), rgba(160, 120, 255, .12) 45%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  animation: login-shine 6s ease-in-out infinite;
}

.login-card-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f47b1f;
}

.login-card-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: #27213a;
}

.login-card-sub {
  position: relative;
  z-index: 1;
  margin: .35rem 0 1.35rem;
  color: #6b6480;
  font-size: .95rem;
}

.login-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
}

.login-footnote {
  z-index: 1;
}

.login-field label {
  display: block;
  margin-bottom: .35rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b6480;
}

.login-field .form-control {
  height: 46px;
  border-radius: 12px;
  border-color: #d9d2e4;
  background: rgba(255, 255, 255, .9);
  font-size: .95rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.login-field .form-control:focus {
  border-color: #493276;
  box-shadow: 0 0 0 .2rem rgba(73, 50, 118, .15), 0 0 24px rgba(120, 80, 220, .12);
  transform: translateY(-1px);
}

.login-password-wrap {
  position: relative;
}

.login-password-wrap .form-control {
  padding-right: 4.25rem;
}

.login-eye {
  position: absolute;
  top: 50%;
  right: .65rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #493276;
  font-size: .78rem;
  font-weight: 700;
}

.login-submit {
  height: 48px;
  margin-top: .35rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(120deg, #493276, #7a4fc0 40%, #f47b1f 85%, #ffc078);
  background-size: 220% 220%;
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow:
    0 10px 28px rgba(73, 50, 118, .4),
    0 0 24px rgba(244, 123, 31, .25);
  transition: transform .2s ease, box-shadow .2s ease, background-position .4s ease;
  animation: login-btn-glow 3.8s ease-in-out infinite;
}

.login-submit:hover {
  color: #fff;
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow:
    0 14px 34px rgba(73, 50, 118, .5),
    0 0 36px rgba(244, 123, 31, .4);
}

.login-error {
  margin: 0;
  padding: .75rem .9rem;
  border-radius: 10px;
  background: #fff1de;
  color: #b45309;
  font-size: .875rem;
  font-weight: 600;
}

.login-field-error {
  display: block;
  margin-top: .3rem;
  color: #b45309;
  font-size: .78rem;
}

.login-footnote {
  position: relative;
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: .78rem;
  color: #6b6480;
}

@keyframes login-rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes login-aurora {
  from { transform: skewY(-8deg) translate3d(-2%, 0, 0); opacity: .55; }
  to { transform: skewY(-6deg) translate3d(4%, 3%, 0); opacity: .95; }
}

@keyframes login-orb-pulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes login-orb-float {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: .45; }
  50% { transform: translate3d(24px, -18px, 0); opacity: .85; }
}

@keyframes login-beam {
  0%, 100% { opacity: .25; filter: blur(1.5px); }
  50% { opacity: .7; filter: blur(2.5px); }
}

@keyframes login-horizon {
  from { opacity: .55; transform: translateX(-50%) scaleX(1); }
  to { opacity: .95; transform: translateX(-50%) scaleX(1.06); }
}

@keyframes login-meteor-pulse {
  0%, 100% { opacity: .25; transform: translateX(0); }
  50% { opacity: .95; transform: translateX(10px); }
}

@keyframes login-shine {
  0%, 100% { opacity: .5; transform: translate(0, 0); }
  50% { opacity: 1; transform: translate(22px, 14px); }
}

@keyframes login-card-halo {
  0%, 100% {
    box-shadow:
      0 30px 80px rgba(4, 1, 16, .5),
      0 0 40px rgba(150, 90, 255, .22),
      0 0 70px rgba(244, 123, 31, .14);
  }
  50% {
    box-shadow:
      0 30px 80px rgba(4, 1, 16, .5),
      0 0 55px rgba(150, 90, 255, .4),
      0 0 95px rgba(244, 123, 31, .28);
  }
}

@keyframes login-card-ring {
  0%, 100% { opacity: .35; }
  50% { opacity: .7; }
}

@keyframes login-btn-glow {
  0%, 100% {
    box-shadow: 0 10px 28px rgba(73, 50, 118, .4), 0 0 20px rgba(244, 123, 31, .2);
    background-position: 0% 50%;
  }
  50% {
    box-shadow: 0 12px 36px rgba(73, 50, 118, .45), 0 0 34px rgba(244, 123, 31, .4);
    background-position: 80% 50%;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
    padding-bottom: .5rem;
  }

  .login-hero-content {
    margin-top: 2rem;
  }

  .login-headline {
    font-size: 2.2rem;
  }

  .login-panel {
    padding-top: 1rem;
    padding-bottom: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-aurora,
  .login-aurora--2,
  .login-orb,
  .login-beam,
  .login-beam--2,
  .login-horizon,
  .login-card,
  .login-card-glow,
  .login-hero-content,
  .login-meteors li,
  .login-card-shine,
  .login-submit {
    animation: none !important;
  }
}

/* Icon buttons in the top bar */
.app-icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background-color: transparent;
  transition: background-color .15s ease-in-out;
}

.app-icon-btn:hover,
.app-icon-btn:focus-visible {
  background-color: rgba(255, 255, 255, .14);
}

.app-badge-count {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding-inline: 4px;
  border-radius: 999px;
  /* Brand furniture: stays orange in every theme, like the promo buttons */
  background-color: var(--app-orange);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* User chip */
.app-user {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background-color: var(--app-purple-400);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.app-user-name {
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.1;
}

.app-user-id {
  font-size: .6875rem;
  color: rgba(255, 255, 255, .7);
  line-height: 1.1;
}

/* --------------------------------------------------------------------------
   4. Sidebar
   -------------------------------------------------------------------------- */
.app-sidebar {
  position: fixed;
  top: var(--app-topbar-h);
  bottom: 0;
  left: 0;
  z-index: 1035;
  width: var(--app-sidebar-w);
  padding: .75rem;
  overflow-y: auto;
  background-color: var(--app-sidebar-bg);
  border-right: 1px solid var(--app-sidebar-border);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem .75rem;
  border-radius: var(--app-radius-sm);
  color: var(--app-sidebar-text);
  font-size: .875rem;
  font-weight: 500;
  transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.app-nav-link:hover {
  background-color: var(--app-sidebar-hover-bg);
  color: var(--app-sidebar-hover-text);
}

.app-nav-link.active {
  background-color: var(--app-sidebar-active-bg);
  color: var(--app-sidebar-active-text);
  font-weight: 600;
}

.app-nav-link svg {
  flex: 0 0 auto;
}

.app-nav-divider {
  height: 1px;
  margin: .5rem .25rem;
  background-color: var(--app-sidebar-border);
}

/* Promo cards pinned to the bottom of the sidebar */
.app-promos {
  margin-top: auto;
  padding-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.app-promo {
  padding: .8125rem .875rem .875rem;
  border-radius: var(--app-radius);
  background-color: var(--app-promo-bg);
  color: #fff;
}

.app-promo-title {
  font-size: .8125rem;
  font-weight: 700;
}

.app-promo-text {
  font-size: .6875rem;
  color: rgba(255, 255, 255, .75);
}

.app-promo-btn {
  display: inline-block;
  padding: .3125rem .75rem;
  border: 0;
  border-radius: var(--app-radius-sm);
  background-color: var(--app-promo-btn-bg);
  color: var(--app-promo-btn-color);
  font-size: .75rem;
  font-weight: 700;
  transition: filter .15s ease-in-out;
}

.app-promo-btn:hover {
  filter: brightness(.94);
  color: var(--app-promo-btn-color);
}

/* Mobile drawer behaviour */
.app-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1030;
  background-color: rgba(39, 33, 58, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease-in-out, visibility .2s ease-in-out;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    top: 0;
    padding-top: calc(var(--app-topbar-h) + .75rem);
    transform: translateX(-100%);
    transition: transform .22s ease-in-out;
    box-shadow: var(--app-shadow-lg);
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .app-sidebar-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {

  .app-sidebar,
  .app-sidebar-backdrop,
  .app-theme-card {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   5. Main content shell
   -------------------------------------------------------------------------- */
.app-main {
  padding: 1.25rem 1rem 2rem;
  margin-top: var(--app-topbar-h);
}

@media (min-width: 992px) {
  .app-main {
    margin-left: var(--app-sidebar-w);
    padding-inline: 1.5rem;
  }
}

.app-section+.app-section {
  margin-top: 1.75rem;
}

.app-page-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--app-purple);
  margin: 0;
}

.app-section-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--app-purple);
  margin: 0;
}

.app-section-subtitle {
  font-size: .8125rem;
  color: var(--app-muted);
  margin: .125rem 0 0;
}

/* "Revenue Reports →" style links */
.app-link-accent {
  color: var(--app-accent);
  font-size: .8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  white-space: nowrap;
}

.app-link-accent:hover {
  color: var(--app-accent-600);
}

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.app-card {
  background-color: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
}

.app-card-pad {
  padding: 1.125rem 1.25rem 1.25rem;
}

.app-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--app-purple);
  margin: 0 0 .25rem;
}

/* Revenue card — split into a filled pane and a plain pane */
.app-revenue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .app-revenue {
    grid-template-columns: 1fr;
  }
}

.app-revenue-pane {
  padding: 1rem 1.125rem 1.125rem;
}

.app-revenue-pane+.app-revenue-pane {
  border-left: 1px solid var(--app-border);
}

@media (max-width: 575.98px) {
  .app-revenue-pane+.app-revenue-pane {
    border-left: 0;
    border-top: 1px solid var(--app-border);
  }
}

.app-revenue-pane--filled {
  background-color: var(--app-purple);
  color: #fff;
}

.app-revenue-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-bottom: .75rem;
}

.app-revenue-pane--filled .app-revenue-label {
  color: rgba(255, 255, 255, .75);
}

.app-revenue-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .3125rem;
  font-size: .8125rem;
}

.app-revenue-row dt {
  font-weight: 400;
  color: var(--app-muted);
  margin: 0;
}

.app-revenue-row dd {
  font-weight: 700;
  color: var(--app-heading);
  margin: 0;
}

.app-revenue-pane--filled .app-revenue-row dt {
  color: rgba(255, 255, 255, .8);
}

.app-revenue-pane--filled .app-revenue-row dd {
  color: #fff;
}

.app-revenue-row--lead dd {
  font-size: 1.0625rem;
}

.app-revenue-pane--filled .app-link-accent {
  color: #fff;
}

.app-revenue-pane--filled .app-link-accent:hover {
  color: rgba(255, 255, 255, .8);
}

/* Growth pill */
.app-pill-success {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .1875rem .5rem;
  border-radius: 999px;
  background-color: var(--app-success-bg);
  color: var(--app-success);
  font-size: .75rem;
  font-weight: 700;
}

/* Featured product card */
.app-product-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--app-radius-sm);
  display: grid;
  place-items: center;
  background-color: var(--app-purple-050);
  color: var(--app-purple);
  flex: 0 0 auto;
}

.app-eyebrow {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--app-accent);
}

.app-product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--app-purple);
  margin: .125rem 0 .25rem;
}

/* Carousel dots */
.app-dots {
  display: flex;
  align-items: center;
  gap: .3125rem;
}

.app-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: var(--app-purple-100);
  transition: width .18s ease-in-out, background-color .18s ease-in-out;
}

.app-dot.active {
  width: 18px;
  background-color: var(--app-accent);
}

/* --------------------------------------------------------------------------
   7. Segmented filter
   -------------------------------------------------------------------------- */
.app-segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background-color: var(--app-surface);
  flex-wrap: wrap;
}

.app-segmented button,
.app-segmented a {
  border: 0;
  border-radius: 999px;
  padding: .3125rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--app-muted);
  background-color: transparent;
  text-decoration: none;
  transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.app-segmented button:hover,
.app-segmented a:hover {
  color: var(--app-purple);
}

.app-segmented button.is-active,
.app-segmented a.is-active {
  background-color: var(--app-purple);
  color: #fff;
}

/* --------------------------------------------------------------------------
   8. Stat tiles
   -------------------------------------------------------------------------- */
.app-stat {
  position: relative;
  height: 100%;
  padding: .875rem 1rem 1rem;
}

.app-stat-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--app-muted);
  padding-right: 1.25rem;
}

.app-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--app-heading);
  line-height: 1.2;
  margin: .375rem 0 .125rem;
}

.app-stat-value.is-success {
  color: var(--app-success);
}

.app-stat-value.is-accent {
  color: var(--app-accent);
}

.app-stat-total {
  font-size: .75rem;
  color: var(--app-muted);
}

.app-stat-arrow {
  position: absolute;
  top: .875rem;
  right: 1rem;
  color: var(--app-accent);
}

a.app-stat--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

a.app-stat--link:hover {
  border-color: var(--app-purple);
  box-shadow: 0 0 0 1px var(--app-purple);
  color: inherit;
}

a.app-stat--link:hover .app-stat-arrow {
  color: var(--app-purple);
}

a.app-stat--link:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   9. Opportunity tiles
   -------------------------------------------------------------------------- */
.app-opp {
  height: 100%;
  padding: 1rem 1.125rem 1.125rem;
  display: flex;
  flex-direction: column;
}

.app-opp-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--app-purple);
}

.app-opp-count {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--app-heading);
  margin: .25rem 0 .75rem;
}

.app-opp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  font-size: .8125rem;
  padding-block: .1875rem;
}

.app-opp-row dt {
  color: var(--app-muted);
  font-weight: 400;
  margin: 0;
}

.app-opp-row dd {
  color: var(--app-heading);
  font-weight: 700;
  margin: 0;
}

.app-opp-row dd.is-accent {
  color: var(--app-accent);
}

.app-opp .btn {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   10. Notes / disclaimers
   -------------------------------------------------------------------------- */
.app-note {
  font-size: .75rem;
  color: var(--app-muted);
  margin-top: .625rem;
}

.app-disclaimer {
  margin-top: 1.25rem;
  padding: .75rem 1rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background-color: var(--app-surface-warm);
  font-size: .75rem;
  color: var(--app-muted);
}

/* --------------------------------------------------------------------------
   11. Profile page
   -------------------------------------------------------------------------- */
.app-profile-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.75rem;
  align-items: start;
  margin-top: 1rem;
}

@media (max-width: 575.98px) {
  .app-profile-grid {
    grid-template-columns: 1fr;
  }
}

.app-profile-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .625rem;
}

.app-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.125rem;
  background-color: var(--app-purple);
}

.app-avatar-xl {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
  background-color: var(--app-purple);
}

.app-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.125rem 1.5rem;
  margin: 0;
}

@media (max-width: 767.98px) {
  .app-field-grid {
    grid-template-columns: 1fr;
  }
}

.app-field dt {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin: 0 0 .1875rem;
}

.app-field dd {
  font-size: .875rem;
  font-weight: 700;
  color: var(--app-heading);
  margin: 0;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   12. Theme picker (Profile > Appearance)
   -------------------------------------------------------------------------- */
.app-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .875rem;
  margin: 1rem 0 1.25rem;
}

@media (max-width: 767.98px) {
  .app-theme-grid {
    grid-template-columns: 1fr;
  }
}

.app-theme-card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: .875rem 1rem 1rem;
  border: 2px solid var(--app-border);
  border-radius: var(--app-radius);
  background-color: var(--app-surface);
  transition: border-color .15s ease-in-out, background-color .15s ease-in-out;
}

.app-theme-card:hover {
  border-color: var(--app-purple-100);
}

.app-theme-card.is-selected {
  border-color: var(--app-accent);
  background-color: var(--app-accent-050);
}

.app-theme-swatches {
  display: flex;
  gap: .375rem;
  margin-bottom: .625rem;
}

.app-swatch {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid rgba(39, 33, 58, .12);
}

.app-swatch--purple {
  background-color: var(--app-purple);
}

.app-swatch--purple-mid {
  background-color: var(--app-purple-600);
}

.app-swatch--lavender {
  background-color: var(--app-purple-100);
}

.app-swatch--tint {
  background-color: var(--app-purple-050);
}

.app-swatch--white {
  background-color: #ffffff;
}

.app-swatch--orange {
  background-color: var(--app-orange);
}

.app-theme-name {
  display: block;
  font-size: .875rem;
  font-weight: 700;
  color: var(--app-heading);
}

.app-theme-desc {
  display: block;
  font-size: .75rem;
  color: var(--app-muted);
  margin-top: .0625rem;
}

.app-theme-check {
  position: absolute;
  top: .875rem;
  right: .875rem;
  color: var(--app-accent);
  opacity: 0;
  transition: opacity .15s ease-in-out;
}

.app-theme-card.is-selected .app-theme-check {
  opacity: 1;
}

/* Inline "saved" confirmation next to the save button */
.app-save-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.app-saved-msg {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--app-success);
  opacity: 0;
  transition: opacity .2s ease-in-out;
}

.app-saved-msg.is-visible {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   13. Generic content blocks used by the secondary pages
   -------------------------------------------------------------------------- */
.app-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--app-muted);
}

.app-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto .75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background-color: var(--app-purple-050);
  color: var(--app-purple);
}

.app-table thead th {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--app-muted);
  background-color: var(--app-surface-warm);
  border-bottom-color: var(--app-border);
  white-space: nowrap;
}

.app-table tbody td {
  font-size: .8125rem;
  color: var(--app-heading);
  vertical-align: middle;
  border-bottom-color: var(--app-border-soft);
}

/* --------------------------------------------------------------------------
   14. Small type helpers (Bootstrap has no .fs-* at these sizes)
   -------------------------------------------------------------------------- */
.app-text-sm {
  font-size: .8125rem;
}

.app-text-xs {
  font-size: .75rem;
}

/* --------------------------------------------------------------------------
   15. Focus visibility — keep keyboard users oriented on brand surfaces
   -------------------------------------------------------------------------- */
.app-nav-link:focus-visible,
.app-segmented button:focus-visible,
.app-dot:focus-visible,
.app-link-accent:focus-visible,
.app-theme-card:focus-visible,
.app-promo-btn:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.app-sidebar .app-nav-link:focus-visible,
.app-sidebar .app-promo-btn:focus-visible {
  outline-color: var(--app-sidebar-active-bg);
}

.app-topbar :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* --------------------------------------------------------------------------
   16. Refer & Grow
   -------------------------------------------------------------------------- */
.app-referral-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .875rem 1.125rem;
}

.app-referral-link {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--app-heading);
  word-break: break-all;
}

/* Numbered steps in the referral journey */
.app-step {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 100%;
  padding: .875rem 1rem;
}

.app-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--app-purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.app-step-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--app-heading);
}

/* --------------------------------------------------------------------------
   17. Status badges
   -------------------------------------------------------------------------- */
.app-badge {
  display: inline-block;
  padding: .1875rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.app-badge--success {
  background-color: #dcfce7;
  color: #166534;
}

.app-badge--warn {
  background-color: #ffedd5;
  color: #c2410c;
}

.app-badge--danger {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* --------------------------------------------------------------------------
   18. Data table — search, sorting, numeric cells
   -------------------------------------------------------------------------- */
.app-table-search {
  position: relative;
  max-width: 320px;
}

.app-table-search .form-control {
  height: 38px;
  padding-left: 2.25rem;
  font-size: .8125rem;
  border-color: var(--app-border);
}

.app-table-search-icon {
  position: absolute;
  top: 50%;
  left: .75rem;
  transform: translateY(-50%);
  color: var(--app-muted);
  pointer-events: none;
}

/* Sortable column headers */
.app-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.app-sort:hover {
  color: var(--app-purple);
}

.app-sort-icon {
  margin-left: .25rem;
  opacity: .4;
  vertical-align: -1px;
}

.app-sort.is-asc .app-sort-icon,


.app-sort:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: -2px;
}

/* Numeric columns */
.app-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Revenue reads orange in every theme, like the promo buttons.
   Qualified with .app-table tbody so it outranks the generic cell colour. */
.app-table tbody td.app-num--revenue {
  color: var(--app-orange);
  font-weight: 700;
}

.app-table-empty td {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--app-muted);
  font-size: .8125rem;
}

.app-table-count {
  font-size: .75rem;
  color: var(--app-muted);
}
.app-referral-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin: 0 0 .1875rem;
}

/* --------------------------------------------------------------------------
   19. Revenue details — back link, charts, month summary
   -------------------------------------------------------------------------- */
.app-back-link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--app-accent);
  margin-bottom: .75rem;
}

.app-back-link:hover {
  color: var(--app-accent-600);
}

/* SVG charts scale with their card; the viewBox does the work */
.app-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.app-chart-grid {
  stroke: var(--app-border);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.app-chart-axis {
  fill: var(--app-muted);
  font-size: 11px;
  font-weight: 500;
}

.app-chart-baseline {
  stroke: var(--app-border);
  stroke-width: 1;
}

/* Bars are buttons: selecting one filters the month summary */
.app-bar {
  fill: var(--app-chart-bar);
  cursor: pointer;
  transition: fill .15s ease-in-out;
}

.app-bar:hover {
  fill: var(--app-purple);
}

.app-bar.is-selected {
  fill: var(--app-purple);
}



/* Year-on-year line */
.app-line {
  fill: none;
  stroke: var(--app-purple);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-line-dot {
  fill: var(--app-purple);
}

/* Month summary list */
.app-month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5625rem 0;
  border-bottom: 1px solid var(--app-border-soft);
  transition: background-color .15s ease-in-out;
}

.app-month-row:last-child {
  border-bottom: 0;
}

.app-month-row.is-selected {
  background-color: var(--app-accent-050);
  box-shadow: inset 3px 0 0 var(--app-accent);
  padding-left: .625rem;
  margin-inline: -.625rem;
  padding-right: .625rem;
}

.app-month-name {
  font-size: .875rem;
  font-weight: 700;
  color: var(--app-heading);
  white-space: nowrap;
}

.app-month-meta {
  font-size: .8125rem;
  color: var(--app-muted);
  white-space: nowrap;
}

.app-month-amount {
  font-size: .875rem;
  font-weight: 700;
  color: var(--app-orange);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.app-bar:focus-visible {
  fill: var(--app-purple);
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

/* Charts keep a legible minimum size and scroll on narrow screens instead of
   shrinking — SVG text scales with the viewBox, so squashing makes it unreadable. */
.app-chart-scroll {
  overflow-x: auto;
}

.app-chart-scroll .app-chart {
  min-width: 620px;
}

.app-chart-scroll--trend .app-chart {
  min-width: 400px;
}

/* The trend chart renders at roughly 0.75x its viewBox in a half-width column,
   so its axis type needs to be larger in viewBox units to match the bar chart. */
.app-chart-scroll--trend .app-chart-axis {
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   20. Product detail (PMS and friends)
   -------------------------------------------------------------------------- */

/* In the designs, sortable headers are title case while plain ones stay
   uppercase — qualified so it outranks the generic thead rule. */
.app-table thead th.app-sort {
  text-transform: none;
  font-size: .75rem;
}

/* Fixed-orange money highlights, the same treatment the revenue column gets */
.app-highlight {
  color: var(--app-orange);
  font-weight: 700;
}

.app-stat-value.is-money {
  color: var(--app-orange);
}

.app-formula {
  font-size: .875rem;
  color: var(--app-body);
  margin: 0;
}

.app-formula-inputs {
  font-size: .8125rem;
  color: var(--app-muted);
  margin: 0 0 .5rem;
}
/* --------------------------------------------------------------------------
   21. Featured products carousel (Bootstrap carousel component)
   Bootstrap owns the sliding and the 5s autoplay; these rules only restyle
   its indicators into the brand dots. Selectors are qualified enough to
   outrank .carousel-indicators [data-bs-target] from bootstrap.css.
   -------------------------------------------------------------------------- */
.app-featured {
  position: relative;
}

/* The card stretches to match the revenue card beside it, so it is taller than
   the carousel. Making .carousel static hands the containing block to the card,
   which puts the dots in the card's bottom-right corner rather than floating
   above the empty space under the slides. */
.app-featured .carousel {
  position: static;
}

.app-featured .carousel-indicators {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: auto;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  gap: .3125rem;
}

/* Narrow cards: let them fall back into normal flow under the buttons. */
@media (max-width: 575.98px) {
  .app-featured .carousel-indicators {
    position: static;
    margin-top: .875rem;
  }
}

.app-featured .carousel-indicators .app-dot {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: var(--app-purple-100);
  background-clip: border-box;
  text-indent: 0;
  opacity: 1;
  transition: width .18s ease-in-out, background-color .18s ease-in-out;
}

.app-featured .carousel-indicators .app-dot.active {
  width: 18px;
  background-color: var(--app-accent);
  opacity: 1;
}

/* Converted / informational status badge */
.app-badge--info {
  background-color: #ede9fe;
  color: #5b21b6;
}

/* --------------------------------------------------------------------------
   22. Reason pills (Pending Clients facet filter)
   -------------------------------------------------------------------------- */
.app-reason-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .875rem;
}

.app-reason-pill {
  padding: .4375rem .875rem;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background-color: var(--app-surface);
  color: var(--app-heading);
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s ease-in-out, border-color .15s ease-in-out, color .15s ease-in-out;
}

.app-reason-pill:hover {
  border-color: var(--app-purple-100);
  color: var(--app-purple);
}

.app-reason-pill.is-active {
  background-color: var(--app-purple);
  border-color: var(--app-purple);
  color: #fff;
}

.app-reason-pill:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   23. Opportunity pages (SIF / AIF / MF / IPO)
   -------------------------------------------------------------------------- */
.app-criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .875rem;
}

@media (max-width: 767.98px) {
  .app-criteria-grid {
    grid-template-columns: 1fr;
  }
}

/* Read-only statements of the rule, styled like a disabled field */
.app-criteria {
  padding: .5625rem .75rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background-color: var(--app-surface);
  font-size: .8125rem;
  color: var(--app-muted);
}

.app-client-code {
  margin-top: .125rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--app-muted);
}

.app-client-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.app-client-link:hover .fw-bold {
  color: var(--app-purple);
  text-decoration: underline;
}

.app-product-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-product-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--app-border-soft);
  font-size: .875rem;
  font-weight: 600;
  color: var(--app-heading);
}

.app-product-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.app-product-list li:first-child {
  padding-top: 0;
}

.app-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  margin-top: 1rem;
}

.app-page-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .625rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: #fff;
  color: var(--app-body);
  font-size: .8125rem;
  font-weight: 600;
}

.app-page-btn:hover:not(:disabled) {
  border-color: var(--app-purple);
  color: var(--app-purple);
}

.app-page-btn.is-active {
  background: var(--app-purple);
  border-color: var(--app-purple);
  color: #fff;
}

.app-page-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.app-page-ellipsis {
  color: var(--app-muted);
  padding: 0 .25rem;
}

.app-why {
  font-size: .8125rem;
  color: var(--app-body);
  min-width: 15rem;
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28, 16, 46, .45);
}

.app-loader.is-on {
  display: flex;
}

.app-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  min-width: 12rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  background: #fff;
  color: var(--app-heading);
  font-size: .9375rem;
  font-weight: 700;
}

.app-loader-spin {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--app-border);
  border-top-color: var(--app-purple);
  border-radius: 50%;
  animation: app-loader-spin .7s linear infinite;
}

@keyframes app-loader-spin {
  to { transform: rotate(360deg); }
}

.app-action-cell {
  display: flex;
  align-items: center;
  gap: .75rem;
  white-space: nowrap;
}
