:root {
  color-scheme: light;
  --bg: #eef6f1;
  --app: #f9fbfa;
  --card: #ffffff;
  --soft: #eefaf2;
  --soft-2: #e8f7ee;
  --text: #081225;
  --muted: #667085;
  --line: #dfe8e3;
  --green: #078b3e;
  --green-2: #00a64a;
  --green-3: #bff0cf;
  --red: #e94b5f;
  --gold: #e8a923;
  --shadow: 0 16px 36px rgba(10, 35, 24, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 5%, rgba(0, 166, 74, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.shell {
  min-height: 100vh;
}

.auth-view {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.auth-view:has(.demo-login-card:not(.hidden)) {
  grid-template-columns: 1fr;
}

.brand-panel {
  max-width: 720px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.9;
}

.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.heading-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 14px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px #dcefe4;
}

.heading-icon .icon-premium {
  width: 25px;
  height: 25px;
}

h2 {
  margin-bottom: 0;
  font-size: 1.72rem;
  line-height: 1.16;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.brand-panel p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.brand-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.brand-stats div,
.auth-card,
.panel,
.metric-card,
.mobile-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-stats div {
  min-height: 108px;
  padding: 18px;
  border-radius: 24px;
}

.brand-stats strong {
  display: block;
  color: var(--green);
  font-size: 1.3rem;
}

.brand-stats span {
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: 28px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(8, 18, 37, 0.08);
  border-radius: 18px;
  background: rgba(8, 11, 7, 0.06);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #31402b;
  font-weight: 900;
}

.auth-tab.active {
  background: #080b07;
  color: #cfff12;
  box-shadow: 0 10px 24px rgba(8, 11, 7, 0.16);
}

.onboarding-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(430px, 100%);
  height: min(860px, calc(100vh - 36px));
  min-height: min(680px, calc(100vh - 36px));
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(8, 18, 37, 0.09);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 247, 0.95) 56%, rgba(238, 250, 242, 0.98));
  box-shadow: 0 34px 92px rgba(8, 18, 37, 0.18);
  backdrop-filter: blur(22px);
}

.onboarding-top,
.onboarding-footer {
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

.onboarding-top {
  display: flex;
  justify-content: center;
}

.onboarding-footer {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto minmax(112px, 1fr);
}

.onboarding-footer .ghost {
  justify-self: start;
}

.onboarding-footer .primary {
  min-width: 124px;
  justify-self: end;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(8, 18, 37, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 26px rgba(8, 18, 37, 0.06);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 1rem;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.brand-mark,
.login-icon {
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--green), #053a22);
  box-shadow: 0 12px 24px rgba(7, 139, 62, 0.22);
  font-weight: 950;
}

.brand-mark {
  width: 42px;
  height: 42px;
}

.compact {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.onboarding-content {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 20px 18px;
}

.onboarding-slide {
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 100%;
  text-align: center;
  animation: onboardingFade 280ms ease both;
}

.onboarding-copy {
  min-width: 0;
}

.onboarding-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid rgba(7, 139, 62, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, #ffffff, #eefaf2);
  box-shadow: 0 16px 34px rgba(8, 18, 37, 0.08);
}

.onboarding-icon .icon-premium {
  width: 40px;
  height: 40px;
}

.onboarding-step {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(7, 139, 62, 0.16);
  border-radius: 999px;
  background: rgba(232, 247, 238, 0.72);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.onboarding-copy h1 {
  max-width: 340px;
  margin: 0 auto 8px;
  font-size: clamp(1.52rem, 6.4vw, 1.96rem);
  line-height: 1.08;
}

.onboarding-copy > p {
  max-width: 340px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.48;
}

.onboarding-feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  text-align: left;
}

.onboarding-feature-list > span,
.feature-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(8, 18, 37, 0.06);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  color: #10223a;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
}

.onboarding-feature-list > span::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: var(--green-2);
  box-shadow: 0 0 0 4px rgba(8, 166, 79, 0.08);
}

.feature-highlight {
  min-height: 42px;
  border-color: rgba(8, 166, 79, 0.18);
  background: linear-gradient(135deg, rgba(232, 247, 238, 0.95), rgba(255, 255, 255, 0.9));
}

.feature-highlight span,
.feature-highlight small {
  display: block;
}

.feature-highlight span {
  color: var(--green);
  font-size: 1rem;
  font-weight: 950;
}

.feature-highlight small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.onboarding-preview {
  display: grid;
  place-items: center;
  min-width: 0;
}

.preview-phone {
  width: 100%;
  min-height: 300px;
  padding: 15px;
  border: 1px solid rgba(8, 18, 37, 0.075);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 247, 0.94));
  box-shadow: 0 22px 44px rgba(8, 18, 37, 0.13);
}

.modern-preview {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: hidden;
  text-align: left;
}

.modern-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(8, 166, 79, 0.08), transparent 38%),
    linear-gradient(315deg, rgba(7, 20, 45, 0.045), transparent 42%);
}

.modern-preview > * {
  position: relative;
  z-index: 1;
}

.preview-row,
.preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.preview-header > span,
.preview-row span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px #dcefe4;
}

.preview-header svg,
.preview-row svg {
  width: 28px;
  height: 28px;
}

.preview-header strong,
.preview-header small {
  display: block;
}

.preview-header strong {
  font-size: 0.92rem;
  line-height: 1.18;
}

.preview-header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.preview-balance {
  display: grid;
  gap: 5px;
  margin-bottom: 0;
  padding: 18px 15px;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, #078b3e, #003f26);
  box-shadow: 0 18px 36px rgba(7, 139, 62, 0.22);
}

.preview-balance small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.preview-balance strong {
  font-size: clamp(1.52rem, 6.8vw, 1.9rem);
  font-weight: 950;
  line-height: 1.04;
}

.preview-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  height: 74px;
  gap: 8px;
  margin-bottom: 0;
  padding: 11px 12px;
  border: 1px solid rgba(8, 18, 37, 0.05);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.preview-chart i {
  display: block;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--green-2), #bcebc8);
}

.preview-chart i:nth-child(1) { height: 28%; }
.preview-chart i:nth-child(2) { height: 42%; }
.preview-chart i:nth-child(3) { height: 58%; }
.preview-chart i:nth-child(4) { height: 76%; }
.preview-chart i:nth-child(5) { height: 92%; }

.preview-ticket,
.preview-insight,
.statement-mini,
.preview-allocation {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.inline-ticket {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.inline-ticket small {
  text-align: right;
}

.preview-ticket strong,
.preview-ticket small,
.statement-mini span,
.statement-mini strong {
  display: block;
}

.preview-ticket strong,
.statement-mini strong {
  color: var(--green);
  font-size: 1rem;
}

.preview-ticket small,
.statement-mini span {
  color: var(--muted);
  font-weight: 800;
}

.preview-allocation {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.preview-allocation label {
  color: var(--text);
}

.compact-allocation {
  grid-template-columns: minmax(76px, 0.74fr) minmax(0, 1fr) 38px;
  align-items: center;
  margin-bottom: 0;
  padding: 10px 11px;
}

.compact-allocation label {
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.1;
}

.compact-allocation strong {
  color: var(--green);
  font-size: 0.78rem;
  text-align: right;
}

.preview-allocation span {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e3;
}

.preview-allocation i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--green-2));
}

.allocation-ring {
  display: grid;
  width: 118px;
  height: 118px;
  margin: 0 auto 2px;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, #ffffff 0 50%, transparent 51%),
    conic-gradient(var(--green) 0 62%, #2abf72 62% 82%, #bfe9ce 82% 100%);
  box-shadow: inset 0 0 0 1px rgba(8, 18, 37, 0.05), 0 14px 28px rgba(7, 139, 62, 0.12);
}

.allocation-ring strong,
.allocation-ring small {
  grid-column: 1;
  grid-row: 1;
  text-align: center;
}

.allocation-ring strong {
  margin-top: -10px;
  color: var(--green);
  font-size: 1.05rem;
  font-weight: 950;
}

.allocation-ring small {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.statement-grid-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.statement-grid-mini div {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(8, 18, 37, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.statement-grid-mini .positive {
  background: var(--soft);
  border-color: rgba(8, 166, 79, 0.18);
}

.statement-grid-mini span,
.statement-grid-mini strong {
  display: block;
}

.statement-grid-mini span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.statement-grid-mini strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 0.9rem;
}

.statement-grid-mini .positive strong {
  color: var(--green);
}

.statement-sparkline {
  width: 100%;
  height: 78px;
  padding: 8px;
  border: 1px solid rgba(8, 18, 37, 0.05);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
}

.statement-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.statement-mini.positive {
  background: var(--soft);
}

.preview-insight {
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 850;
  line-height: 1.45;
  background:
    linear-gradient(135deg, #ffffff, #f1fff6);
}

.journey-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

.journey-mini span {
  display: grid;
  height: 64px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  opacity: 0.58;
}

.journey-mini span.done,
.journey-mini span.active {
  opacity: 1;
}

.journey-mini span.active {
  border-color: #9de6b9;
  background: var(--soft);
  box-shadow: 0 12px 24px rgba(7, 139, 62, 0.12);
}

.journey-mini svg {
  width: 34px;
  height: 34px;
}

.journey-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e3;
}

.journey-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #41d878);
}

@keyframes onboardingFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-slide {
    animation: none;
  }
}

@media (max-height: 720px) {
  .onboarding-shell {
    height: calc(100vh - 28px);
    min-height: 0;
  }

  .onboarding-top,
  .onboarding-footer {
    padding: 10px 14px;
  }

  .brand-lockup {
    padding: 7px 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
  }

  .brand-lockup strong {
    font-size: 0.9rem;
  }

  .brand-lockup small {
    font-size: 0.68rem;
  }

  .onboarding-content {
    padding: 6px 18px 12px;
  }

  .onboarding-slide {
    gap: 9px;
  }

  .modern-preview {
    gap: 7px;
  }

  .onboarding-step {
    margin-bottom: 7px;
    padding: 5px 9px;
    font-size: 0.66rem;
  }

  .onboarding-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 7px;
    border-radius: 18px;
  }

  .onboarding-icon .icon-premium {
    width: 30px;
    height: 30px;
  }

  .onboarding-copy h1 {
    max-width: 320px;
    margin-bottom: 6px;
    font-size: 1.44rem;
    line-height: 1.08;
  }

  .onboarding-copy > p {
    max-width: 330px;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .preview-phone {
    min-height: 218px;
    padding: 12px;
    border-radius: 24px;
  }

  .preview-header > span,
  .preview-row span {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 14px;
  }

  .preview-header svg,
  .preview-row svg {
    width: 24px;
    height: 24px;
  }

  .preview-header strong {
    font-size: 0.82rem;
  }

  .preview-header small {
    font-size: 0.66rem;
  }

  .preview-balance {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .preview-balance strong {
    font-size: 1.4rem;
  }

  .preview-chart {
    height: 42px;
    padding: 7px 8px;
  }

  .preview-ticket,
  .preview-insight,
  .statement-mini,
  .preview-allocation {
    padding: 7px 9px;
    border-radius: 15px;
  }

  .allocation-ring {
    width: 82px;
    height: 82px;
  }

  .allocation-ring strong {
    font-size: 0.88rem;
  }

  .allocation-ring small {
    display: none;
  }

  .compact-allocation {
    grid-template-columns: minmax(64px, 0.72fr) minmax(0, 1fr) 32px;
    padding: 8px 9px;
  }

  .statement-grid-mini {
    gap: 6px;
  }

  .statement-grid-mini div {
    padding: 8px;
    border-radius: 14px;
  }

  .statement-sparkline {
    height: 54px;
  }

  .journey-mini {
    gap: 8px;
  }

  .journey-mini span {
    height: 48px;
    border-radius: 18px;
  }

  .journey-mini svg {
    width: 28px;
    height: 28px;
  }

  .onboarding-feature-list {
    display: none;
  }

  .onboarding-footer .primary,
  .onboarding-footer .ghost {
    min-height: 42px;
  }
}

.onboarding-footer {
  border-top: 1px solid rgba(8, 18, 37, 0.06);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 -16px 34px rgba(8, 18, 37, 0.04);
}

.onboarding-dots {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 6px;
  min-height: 28px;
  padding: 7px 9px;
  border: 1px solid rgba(8, 18, 37, 0.06);
  border-radius: 999px;
  background: rgba(244, 251, 247, 0.78);
}

.onboarding-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbdad1;
  transition: width 180ms ease, background 180ms ease;
}

.onboarding-dots button.active {
  width: 24px;
  background: var(--green);
}

.demo-login-card {
  width: min(430px, 100%);
  justify-self: center;
}

.login-icon {
  width: 68px;
  height: 68px;
}

.login-icon svg {
  width: 40px;
  height: 40px;
}

.auth-helper {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus {
  border-color: rgba(7, 139, 62, 0.55);
  box-shadow: 0 0 0 4px rgba(7, 139, 62, 0.08);
}

.primary,
.secondary,
.ghost,
.logout {
  min-height: 46px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-weight: 900;
}

.primary {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: white;
  box-shadow: 0 12px 22px rgba(7, 139, 62, 0.2);
}

.secondary {
  padding: 0 14px;
  background: var(--soft);
  color: var(--green);
  border-color: #ccebd8;
}

.ghost,
.logout {
  background: white;
  color: var(--muted);
  border-color: var(--line);
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 0.86rem;
}

body:has(.app-view:not(.hidden)) {
  display: grid;
  place-items: center;
  padding: 18px;
}

.app-view {
  position: relative;
  width: min(100%, 430px);
  height: min(920px, calc(100vh - 36px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(8, 18, 37, 0.08);
  border-radius: 34px;
  background: var(--app);
  box-shadow: 0 34px 110px rgba(8, 18, 37, 0.22);
}

.phone-status {
  position: absolute;
  inset: 0 0 auto;
  z-index: 7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 46px;
  padding: 0 24px;
  color: #020617;
  font-size: 0.86rem;
  background: rgba(249, 251, 250, 0.9);
  backdrop-filter: blur(10px);
}

.bottom-nav {
  position: absolute;
  right: auto;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 8;
  width: min(560px, calc(100% - 28px));
  padding: 8px 10px 10px;
  border: 1px solid rgba(8, 18, 37, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(8, 18, 37, 0.18);
  backdrop-filter: blur(24px);
  transform: translateX(-50%);
}

.nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
}

.nav-link {
  min-width: 0;
  min-height: 56px;
  padding: 4px 2px 1px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #101828;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
}

.nav-link .nav-icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin: 0 auto 4px;
  place-items: center;
  color: currentColor;
  font-size: 1.18rem;
}

.nav-icon svg {
  width: 30px;
  height: 30px;
}

.nav-link.active {
  color: var(--green);
}

.nav-main .nav-icon {
  width: 58px;
  height: 58px;
  margin-top: -23px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 12px 28px rgba(7, 139, 62, 0.32);
  font-size: 2rem;
}

.nav-main .nav-icon svg {
  width: 34px;
  height: 34px;
}

.icon-premium {
  --icon-navy: #07142d;
  --icon-green: #08a64f;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--icon-navy);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.icon-premium .accent {
  stroke: var(--icon-green);
}

.icon-premium .accent-fill {
  fill: var(--icon-green);
  stroke: var(--icon-green);
}

.icon-premium .navy-fill {
  fill: var(--icon-navy);
  stroke: var(--icon-navy);
}

.icon-premium .coin-mark {
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-original-fill {
  fill: none;
  stroke: none;
}

.nav-link.active .nav-icon {
  border-radius: 14px;
  background: rgba(8, 166, 79, 0.08);
}

.nav-link.nav-main.active .nav-icon {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
}

.nav-link.active .icon-premium {
  --icon-navy: #073017;
  --icon-green: #08a64f;
}

.nav-main .icon-premium {
  --icon-navy: #ffffff;
  --icon-green: #ffffff;
}

.logout {
  display: none;
}

.content {
  height: 100%;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 58px 16px 136px;
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  display: none;
}

.topbar {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.avatar {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 4px solid #bcebc8;
  border-radius: 999px;
  color: white;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,0.34), transparent 28%),
    linear-gradient(135deg, #0d7f42, #043a22);
  box-shadow: 0 10px 18px rgba(7, 139, 62, 0.18);
  font-weight: 950;
  overflow: hidden;
}

.avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-copy span {
  display: block;
  margin-bottom: 4px;
  color: #182133;
  font-size: 0.96rem;
}

.topbar-copy h2 {
  color: var(--text);
  font-size: 1.42rem;
  line-height: 1.12;
}

.topbar-copy h2 strong,
.green {
  color: var(--green);
}

.bell {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 1.25rem;
}

.bell-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.bell-icon .icon-premium {
  width: 25px;
  height: 25px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.upnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 16px;
  color: #667085;
  font-size: 0.9rem;
}

.upnote strong {
  color: var(--green);
}

.balance-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 22px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 85% 38%, rgba(255,255,255,0.15), transparent 20%),
    linear-gradient(135deg, #0b6f43, #003e27);
  box-shadow: 0 22px 34px rgba(0, 73, 43, 0.25);
}

.balance-card::after {
  content: "$";
  position: absolute;
  right: 26px;
  top: 42px;
  color: rgba(255, 255, 255, 0.12);
  font-size: 8rem;
  font-weight: 900;
}

.balance-top,
.mini-row,
.section-row,
.metric-line,
.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.balance-top {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

.balance-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.visibility-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.visibility-toggle .icon-premium {
  --icon-navy: #ffffff;
  --icon-green: #ffffff;
  width: 20px;
  height: 20px;
}

.account-pill {
  border: 0;
  color: white;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  font-weight: 800;
}

.balance-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  font-size: 2.55rem;
  line-height: 1;
}

.balance-card p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.86);
}

.balance-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-stats span,
.mobile-card small,
.goal-card small,
.profile-summary small {
  color: #667085;
  font-weight: 700;
}

.balance-stats span {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.8);
}

.balance-stats strong {
  color: #8df1a9;
  font-size: 1.1rem;
}

.mobile-card {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 26px;
}

.soft-card {
  background: linear-gradient(135deg, #f7fffa, #eefaf2);
}

.ai-card,
.mission-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 44px;
  gap: 14px;
  align-items: center;
}

.bot,
.target,
.badge-icon {
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #effaf3, #ffffff);
  box-shadow: inset 0 0 0 1px #dcefe4, 0 10px 20px rgba(7, 139, 62, 0.10);
  font-size: 2rem;
}

.bot,
.target {
  width: 72px;
  height: 72px;
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 950;
}

.bot .icon-premium,
.target .icon-premium {
  width: 46px;
  height: 46px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--soft-2);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.arrow-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: var(--soft);
  color: var(--green);
  font-size: 1.8rem;
}

.section-row {
  margin: 20px 0 12px;
}

.section-row a,
.link {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.goals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#dashboard > .goals-grid {
  margin-bottom: clamp(14px, 3vw, 18px);
}

.goal-card {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.goal-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  font-size: 1.45rem;
}

.goal-icon .icon-premium {
  width: 31px;
  height: 31px;
}

.goal-card strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--green);
  font-size: 1.18rem;
}

.progress {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #dfe8e3;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #41d878);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.quick-actions button {
  min-height: 78px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
}

.quick-actions span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 1.65rem;
}

.quick-actions .quick-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  place-items: center;
}

.quick-actions .quick-icon .icon-premium {
  width: 34px;
  height: 34px;
}

.level-card {
  padding: 18px;
  border: 1px solid #caead6;
  border-radius: 28px;
  background: linear-gradient(135deg, #f8fffb, #eefaf2);
}

.level-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 18px;
  text-align: center;
  font-size: 0.68rem;
}

.level-node {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: #667085;
}

.level-node span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: #edf2f7;
  box-shadow: inset 0 0 0 1px #d8e2dc;
}

.level-node span .icon-premium {
  width: 31px;
  height: 31px;
  opacity: 0.78;
}

.level-node.reached {
  color: var(--green);
  font-weight: 900;
}

.level-node.reached span {
  background: var(--soft);
  box-shadow: inset 0 0 0 2px var(--green);
}

.level-node.reached span .icon-premium {
  opacity: 1;
}

.chart-card {
  padding: 16px;
  border-radius: 24px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.chart {
  display: flex;
  gap: 8px;
  align-items: end;
  min-height: 170px;
  padding-top: 14px;
}

.bar {
  flex: 1;
  min-width: 22px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #19af5b, rgba(25, 175, 91, 0.18));
  position: relative;
}

.bar span {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.65rem;
}

.split-grid {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 16px;
  border-radius: 26px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.panel-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.form-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.delete-button {
  width: 34px;
  height: 34px;
  border: 1px solid #ffd5dc;
  border-radius: 12px;
  background: #fff0f2;
  color: var(--red);
}

.timeline,
.insights,
.report-grid,
.journey-track,
.profile-list {
  display: grid;
  gap: 12px;
}

.timeline-item,
.insight-card,
.report-item,
.journey-step,
.settings-row {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  padding: 14px;
  border-radius: 20px;
  background: white;
}

.settings-row > strong,
.settings-row > div {
  flex: 1;
  min-width: 0;
}

.settings-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px #dcefe4;
}

.settings-icon .icon-premium {
  width: 28px;
  height: 28px;
}

.danger-row .settings-icon {
  background: #fff1f3;
  box-shadow: inset 0 0 0 1px #ffd8de;
}

.danger-row .settings-icon .icon-premium {
  --icon-navy: var(--red);
  --icon-green: var(--red);
}

.danger-row {
  color: var(--red);
}

.danger-row p {
  color: #8a4b55;
}

.toast-zone {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--text);
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.toast.success {
  border-color: #bcebc8;
  color: var(--green);
}

.toast.error {
  border-color: #ffd5dc;
  color: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 18, 37, 0.28);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(430px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: 0 28px 90px rgba(8, 18, 37, 0.24);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 10px;
  background: white;
}

.modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green);
  font-size: 1.4rem;
}

.modal-body {
  padding: 8px 18px 18px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.modal-list {
  display: grid;
  gap: 12px;
}

.modal-list > div,
.check-row,
.xp-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdfc;
}

.modal-list p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.xp-box {
  color: var(--green);
  font-weight: 950;
  text-align: center;
  background: var(--soft);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.insight-card p,
.report-item p {
  margin: 0;
  color: #475467;
  line-height: 1.55;
}

.report-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.report-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f4faf6;
}

.report-tab {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.report-tab.active {
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 10px 18px rgba(7, 139, 62, 0.18);
}

.statement-head {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, #0b6f43, #003e27);
}

.statement-head small {
  color: rgba(255,255,255,0.76);
}

.statement-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.statement-metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.statement-metric small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 800;
}

.statement-table td:nth-child(2),
.statement-table td:nth-child(3),
.statement-table th:nth-child(2),
.statement-table th:nth-child(3) {
  text-align: right;
}

.statement-chart {
  display: flex;
  align-items: center;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f5fbf7);
}

.statement-chart svg {
  width: 100%;
  height: 190px;
}

.statement-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.statement-form-grid label {
  min-width: 0;
}

.wide-field {
  grid-column: 1 / -1;
}

.report-chart {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f0fbf4);
}

.report-line {
  position: absolute;
  inset: 20px 20px 44px;
  border-left: 1px solid #dfe8e3;
  border-bottom: 1px solid #dfe8e3;
}

.report-line::after {
  content: "";
  position: absolute;
  inset: 25% 0 0 0;
  background: linear-gradient(160deg, transparent 0 20%, rgba(7,139,62,0.13) 21% 100%);
  clip-path: polygon(0 78%, 20% 67%, 42% 48%, 60% 52%, 78% 27%, 100% 10%, 100% 100%, 0 100%);
}

.profile-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, #f8fffb, #edf9f1);
  border: 1px solid #ccebd8;
}

.profile-hero > div:last-child {
  min-width: 0;
}

.profile-avatar-wrap {
  position: relative;
  width: 86px;
  height: 86px;
}

.profile-avatar {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #0d7f42, #043a22);
  font-size: 1.4rem;
  font-weight: 950;
  overflow: hidden;
}

.avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 3px solid white;
  border-radius: 999px;
  color: white;
  background: var(--green);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.profile-data-list {
  display: grid;
  gap: 10px;
}

.profile-data-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdfc;
}

.profile-data-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-data-list strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.avatar-uploader {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.large-avatar {
  width: 132px;
  height: 132px;
  font-size: 2rem;
}

.upload-box {
  display: grid;
  width: 100%;
  min-height: 54px;
  place-items: center;
  border: 1px dashed #9bdcaf;
  border-radius: 18px;
  color: var(--green);
  background: var(--soft);
  font-weight: 950;
}

.upload-box input {
  display: none;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdfc;
  color: var(--text);
}

.switch-row input {
  width: 42px;
  min-height: 24px;
  accent-color: var(--green);
}

.profile-summary > div {
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

@media (max-width: 640px) {
  body:has(.app-view:not(.hidden)) {
    display: block;
    padding: 0;
  }

  .app-view {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .bottom-nav {
    position: fixed;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 36px);
  }

  .auth-view {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .onboarding-shell {
    height: 100vh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .onboarding-top,
  .onboarding-footer {
    padding: 14px 16px;
  }

  .onboarding-content {
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
    padding: 10px 16px 18px;
  }

  .onboarding-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    border-radius: 22px;
  }

  .onboarding-icon .icon-premium {
    width: 36px;
    height: 36px;
  }

  .onboarding-copy h1 {
    font-size: clamp(1.48rem, 7vw, 1.92rem);
  }

  .onboarding-copy > p {
    font-size: 0.9rem;
  }

  .preview-phone {
    min-height: 282px;
    border-radius: 24px;
  }

  .preview-chart {
    height: 72px;
  }

  .onboarding-feature-list > span,
  .feature-highlight {
    min-height: 32px;
    padding-block: 7px;
  }

  .demo-login-card {
    width: 100%;
    min-height: 100vh;
    align-content: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-stats {
    grid-template-columns: 1fr;
  }

  .profile-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-hero {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .profile-avatar-wrap,
  .profile-avatar {
    width: 76px;
    height: 76px;
  }
}

/* investment-products-v1 */
.investment-product-picker {
  display: grid;
  gap: 10px;
}

.investment-product-select-label {
  display: grid;
  gap: 8px;
  color: #f8ffe8;
  font-weight: 900;
}

.investment-product-select-label > span {
  color: rgba(248, 255, 232, 0.74);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.investment-product-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
}

.investment-product-select-row select {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(207, 255, 18, 0.28);
  border-radius: 18px;
  color: #080b07;
  font-weight: 950;
  background:
    linear-gradient(45deg, transparent 50%, #080b07 50%) calc(100% - 20px) 21px / 7px 7px no-repeat,
    linear-gradient(135deg, #cfff12, #efff97);
  appearance: none;
}

.investment-product-select-row select:focus {
  outline: 2px solid rgba(207, 255, 18, 0.45);
  outline-offset: 2px;
}

.investment-product-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(207, 255, 18, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.investment-product-option.active {
  border-color: var(--neon, #cfff12);
  background: linear-gradient(135deg, rgba(207, 255, 18, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(207, 255, 18, 0.18);
}

.product-select-area {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.product-icon,
.product-regulation-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--neon, #cfff12);
  color: #080b07;
  border: 1px solid #080b07;
}

.product-regulation-button:disabled {
  opacity: 0.55;
}

.product-icon svg,
.product-regulation-button svg {
  width: 22px;
  height: 22px;
}

.product-select-area strong {
  display: block;
  color: #f8ffe8;
  font-weight: 900;
  line-height: 1.1;
}

.product-select-area p {
  margin: 4px 0 0;
  color: rgba(248, 255, 232, 0.72);
  font-weight: 800;
}

.selected-product-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.selected-product-summary span {
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: var(--neon, #cfff12);
  color: #080b07;
}

.selected-product-summary small,
.selected-product-summary strong {
  display: block;
  color: #080b07;
}

.selected-product-summary small {
  font-size: 0.68rem;
  font-weight: 900;
  opacity: 0.78;
}

.selected-product-summary strong {
  margin-top: 3px;
  font-size: 0.86rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.calendar-copy em {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.investment-product-admin-card {
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.7fr) auto;
}

@media (max-width: 520px) {
  .selected-product-summary {
    grid-template-columns: 1fr;
  }

  .investment-product-admin-card {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  body:has(.app-view:not(.hidden)) {
    padding: 18px;
  }

  .app-view {
    width: min(100%, 820px);
    height: min(960px, calc(100vh - 36px));
  }

  .content {
    padding-inline: 22px;
    padding-bottom: 140px;
  }

  .onboarding-content {
    grid-template-columns: 1fr;
  }

  .goals-grid,
  .report-summary,
  .split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  body:has(.app-view:not(.hidden)) {
    padding: 24px;
  }

  .app-view {
    width: min(100%, 1180px);
    height: min(920px, calc(100vh - 48px));
    border-radius: 32px;
  }

  .content {
    padding: 70px 30px 146px;
  }

  .topbar {
    grid-template-columns: 64px minmax(0, 1fr) 48px;
    max-width: 1060px;
    margin-inline: auto;
  }

  .avatar {
    width: 64px;
    height: 64px;
  }

  .section {
    max-width: 1060px;
    margin-inline: auto;
  }

  #dashboard {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
  }

  #dashboard.active {
    display: grid;
  }

  .balance-card,
  .chart-card {
    grid-column: span 1;
  }

  .ai-card,
  .mission-card,
  .quick-actions {
    grid-column: span 1;
  }

  .section-row,
  .goals-grid {
    grid-column: span 1;
  }

  .goals-grid,
  .report-summary,
  .split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard > .goals-grid {
    margin-bottom: 0;
  }

  .profile-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bottom-nav {
    width: min(560px, calc(100% - 48px));
  }

  .auth-view:has(.demo-login-card:not(.hidden)) {
    grid-template-columns: 1fr;
  }
}

/* CapitalDJ dark investment system */
.app-view {
  --text: #f8fbef;
  --muted: #abb5a5;
  --line: rgba(255, 255, 255, 0.11);
  --card: #12170f;
  --soft: rgba(205, 255, 36, 0.12);
  --soft-2: rgba(205, 255, 36, 0.18);
  --green: #c9ff1e;
  --green-2: #8bff27;
  --green-3: #efffb9;
  --lime: #d7ff22;
  --olive: #26331c;
  --deep: #080b07;
  --surface-dark: #10150d;
  --surface-dim: #1b2118;
  --surface-light: #f6f8f1;
  --shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at 18% 0%, rgba(201, 255, 30, 0.14), transparent 28%),
    linear-gradient(180deg, #202b18 0%, #0a0d08 46%, #070907 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.48);
}

body:has(.app-view:not(.hidden)) {
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 255, 30, 0.08), transparent 30%),
    linear-gradient(180deg, #d8dad6 0%, #bfc3bd 100%);
}

.app-view .phone-status {
  color: #f6f8f1;
  background: rgba(17, 24, 13, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.app-view .content {
  padding-top: 62px;
  background:
    linear-gradient(180deg, rgba(45, 58, 31, 0.62), transparent 210px),
    linear-gradient(180deg, #172011 0%, #080b07 70%);
}

.topbar {
  padding: 8px 2px 0;
}

.topbar-copy span,
.topbar-copy h2 {
  color: #f9fbf4;
}

.topbar-copy h2 strong,
.green {
  color: var(--lime);
}

.red {
  color: #ff6b7a;
}

.avatar {
  border-color: rgba(255, 255, 255, 0.28);
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.25), transparent 30%),
    linear-gradient(135deg, #d7ff22, #244115);
  color: #071008;
}

.bell,
.account-pill,
.visibility-toggle {
  color: #f7fbea;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 14px 28px rgba(0,0,0,0.18);
}

.bottom-nav {
  padding: 8px 10px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(246, 248, 241, 0.92);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}

.nav-link {
  color: #1b2118;
}

.nav-link.active {
  color: #0d1309;
}

.nav-link.active .nav-icon {
  color: #0d1309;
  background: rgba(201, 255, 30, 0.55);
  box-shadow: inset 0 0 0 1px rgba(13, 19, 9, 0.08);
}

.nav-main .nav-icon,
.nav-link.nav-main.active .nav-icon {
  color: #071008;
  background: linear-gradient(135deg, var(--lime), #81ef22);
  box-shadow: 0 16px 34px rgba(201, 255, 30, 0.28);
}

.nav-main .icon-premium {
  --icon-navy: #071008;
  --icon-green: #071008;
}

.upnote {
  color: #dce6d3;
}

.upnote span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: #071008;
  background: var(--lime);
  font-weight: 950;
}

.balance-card {
  min-height: 292px;
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(45, 58, 31, 0.86), rgba(10, 14, 8, 0.96)),
    radial-gradient(circle at 85% 14%, rgba(201, 255, 30, 0.2), transparent 28%);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
}

.balance-card::after {
  right: 22px;
  top: 72px;
  color: rgba(201, 255, 30, 0.06);
}

.balance-card h3 {
  color: #ffffff;
  font-size: clamp(2.25rem, 10vw, 3.15rem);
  letter-spacing: -0.02em;
}

.balance-card p,
.balance-stats span {
  color: rgba(246, 248, 241, 0.7);
}

.balance-stats {
  border-top-color: rgba(255, 255, 255, 0.13);
}

.balance-stats strong {
  color: var(--lime);
}

.portfolio-spark {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: 78px;
  margin: 18px 0 14px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.portfolio-spark .bar {
  min-width: 0;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--lime), rgba(201, 255, 30, 0.22));
}

.portfolio-spark .bar span {
  display: none;
}

.mobile-card,
.panel,
.goal-card,
.chart-card,
.timeline-item,
.insight-card,
.report-item,
.settings-row,
.profile-summary > div {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(246, 248, 241, 0.95);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
}

.mobile-card,
.panel,
.goal-card,
.timeline-item,
.report-item,
.settings-row,
.profile-summary > div {
  color: #10150d;
}

.app-view input,
.app-view select,
.app-view table,
.app-view .statement-metric,
.app-view .statement-chart,
.app-view .profile-data-list > div,
.app-view .upload-box,
.app-view .switch-row {
  color: #10150d;
}

.app-view input,
.app-view select {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(16, 21, 13, 0.12);
}

.app-view label {
  color: rgba(16, 21, 13, 0.68);
}

.soft-card,
.level-card,
.profile-hero {
  background: linear-gradient(135deg, #f8fff0, #dfff6c);
  border-color: rgba(201, 255, 30, 0.38);
}

.dark-feature-card,
.ai-console,
.ai-insight-card {
  color: #f8fbef;
  background:
    radial-gradient(circle at 90% 10%, rgba(201, 255, 30, 0.18), transparent 30%),
    linear-gradient(145deg, #12170f, #050705);
}

.dark-feature-card p,
.ai-console p,
.ai-insight-card p,
.ai-insight-card small {
  color: rgba(248, 251, 239, 0.72);
}

.pill {
  color: #071008;
  background: var(--lime);
}

.bot,
.target,
.goal-icon,
.heading-icon,
.settings-icon {
  background: rgba(201, 255, 30, 0.18);
  box-shadow: inset 0 0 0 1px rgba(201,255,30,0.22);
}

.arrow-button {
  color: #071008;
  background: var(--lime);
  border-radius: 999px;
}

.action-pills {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: -2px 0 14px;
}

.quick-actions button {
  min-height: 70px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(246, 248, 241, 0.94);
  color: #10150d;
}

.quick-actions .quick-icon {
  color: #071008;
}

.asset-showcase {
  padding: 16px;
  background: rgba(16, 21, 13, 0.98);
  color: #f8fbef;
}

.compact-row {
  margin-top: 0;
}

.asset-stack,
.asset-card-list {
  display: grid;
  gap: 10px;
}

.asset-tile,
.investment-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  color: #f8fbef;
  background: rgba(255, 255, 255, 0.08);
}

.asset-tile {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.asset-tile.featured,
.investment-card.featured {
  color: #071008;
  background: linear-gradient(135deg, var(--lime), #8cf225);
}

.asset-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #071008;
  background: #f8fbef;
  font-size: 0.78rem;
  font-weight: 950;
}

.asset-tile strong,
.asset-tile small,
.investment-card strong,
.investment-card small {
  display: block;
}

.asset-tile small,
.investment-card small {
  color: inherit;
  opacity: 0.68;
}

.investment-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(24, 31, 20, 0.98), rgba(11, 15, 9, 0.98));
}

.investment-head,
.investment-meta {
  display: grid;
  align-items: center;
  gap: 10px;
}

.investment-head {
  grid-template-columns: 46px minmax(0, 1fr) 36px;
}

.investment-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.investment-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 6px;
  height: 54px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.investment-chart i {
  height: 40%;
  border-radius: 999px 999px 5px 5px;
  background: rgba(255, 255, 255, 0.45);
}

.investment-chart i:nth-child(2) { height: 72%; background: var(--lime); }
.investment-chart i:nth-child(3) { height: 54%; }
.investment-chart i:nth-child(4) { height: 88%; background: var(--lime); }
.investment-chart i:nth-child(5) { height: 66%; }

.table-wrap {
  border-radius: 22px;
}

th,
td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.report-tabs {
  border-color: rgba(255, 255, 255, 0.08);
  background: #10150d;
}

.report-tab {
  color: rgba(248, 251, 239, 0.72);
}

.report-tab.active {
  color: #071008;
  background: var(--lime);
  box-shadow: none;
}

.analytics-summary .report-item {
  min-height: 118px;
}

.neon-kpi {
  background: var(--lime);
  color: #071008;
}

.dark-kpi {
  background: #10150d;
  color: #f8fbef;
}

.dark-kpi p,
.dark-kpi small {
  color: rgba(248, 251, 239, 0.68);
}

.analytics-chart {
  min-height: 230px;
  color: #f8fbef;
  background: linear-gradient(145deg, #12170f, #050705);
}

.statement-head {
  background:
    radial-gradient(circle at 85% 20%, rgba(201, 255, 30, 0.18), transparent 30%),
    linear-gradient(145deg, #12170f, #050705);
}

.statement-metric {
  background: #f6f8f1;
}

.statement-chart {
  background: linear-gradient(180deg, #f8faf3, #eaf5e3);
}

.analytics-chart .report-line {
  border-color: rgba(255, 255, 255, 0.12);
}

.analytics-chart .report-line::after {
  background: linear-gradient(160deg, transparent 0 20%, rgba(201,255,30,0.34) 21% 100%);
}

.chart-caption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: grid;
  justify-items: end;
  gap: 2px;
}

.chart-caption span {
  color: rgba(248, 251, 239, 0.64);
}

.ai-console {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  text-align: center;
}

.ai-orb {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 999px;
  color: #071008;
  background: var(--lime);
  box-shadow: 0 0 0 12px rgba(201,255,30,0.1);
}

.ai-orb .icon-premium {
  width: 44px;
  height: 44px;
}

.ai-prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.ai-prompt-row span {
  padding-left: 12px;
  text-align: left;
  color: #f8fbef;
  font-weight: 850;
}

.ai-prompt-row button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #071008;
  background: var(--lime);
  font-weight: 950;
}

.profile-hero {
  color: #071008;
}

.profile-avatar {
  background: linear-gradient(135deg, #10150d, #31421f);
}

.level-card {
  color: #071008;
}

.level-node span {
  background: rgba(255, 255, 255, 0.56);
}

.level-node.reached span {
  background: #10150d;
  box-shadow: inset 0 0 0 2px #10150d;
}

.level-node.reached span .icon-premium {
  --icon-navy: var(--lime);
  --icon-green: var(--lime);
}

@media (max-width: 640px) {
  .app-view .content {
    padding-bottom: 132px;
  }

  .table-panel .table-wrap {
    display: none;
  }

  .asset-card-list {
    display: grid;
  }

  .action-pills {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 641px) {
  .asset-card-list {
    margin-bottom: 14px;
  }
}

@media (min-width: 1025px) {
  .app-view {
    border-radius: 42px;
  }

  .balance-card {
    min-height: 360px;
  }

  .portfolio-spark {
    height: 104px;
  }

  .asset-showcase,
  .home-achievements {
    grid-column: span 1;
  }

  .mission-card {
    grid-column: span 1;
  }
}

/* Structural redesign v2: reference-driven mobile investment app */
body:has(.app-view:not(.hidden)) {
  background: #d2d4d0;
}

.app-view {
  --neon: #cfff12;
  --neon-2: #a8ff19;
  --ink: #070907;
  --olive-900: #0d1509;
  --olive-800: #17220f;
  --olive-700: #243219;
  --cream: #f4f6ef;
  --cream-2: #e9eee2;
  --soft-border: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #202d16 0%, #0d130a 48%, #070907 100%);
}

.app-view .content {
  padding: 62px 16px 128px;
  background:
    linear-gradient(180deg, rgba(203, 255, 18, 0.08), transparent 185px),
    linear-gradient(180deg, #202d16 0%, #0d130a 58%, #070907 100%);
}

.phone-status {
  background: rgba(17, 24, 12, 0.76) !important;
}

.topbar {
  grid-template-columns: 52px minmax(0, 1fr) 46px;
  margin-bottom: 14px;
}

.topbar-copy span {
  color: rgba(246, 248, 241, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
}

.topbar-copy h2 {
  color: #f7faef;
  font-size: clamp(1.05rem, 5vw, 1.38rem);
  line-height: 1.06;
}

.bell,
.visibility-toggle {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f7faef;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.bottom-nav {
  padding: 7px;
  border: 1px solid rgba(8, 12, 7, 0.08);
  background: rgba(247, 248, 243, 0.95);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.nav {
  gap: 2px;
}

.nav-link {
  display: grid;
  place-items: center;
  min-height: 58px;
  color: rgba(12, 17, 9, 0.62);
  border-radius: 999px;
  font-size: 0.64rem;
}

.nav-link .nav-icon {
  width: 30px;
  height: 30px;
}

.nav-link.active {
  color: #081006;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(8, 12, 7, 0.06);
}

.nav-main {
  position: relative;
}

.nav-main .nav-icon,
.nav-link.nav-main.active .nav-icon {
  width: 62px;
  height: 62px;
  margin-top: -28px;
  margin-bottom: 2px;
  color: #081006;
  background: var(--neon);
  box-shadow: 0 16px 34px rgba(207, 255, 18, 0.28);
}

.nav-main .icon-premium {
  --icon-navy: #081006;
  --icon-green: #081006;
}

.dashboard-scene {
  position: relative;
  margin-bottom: 14px;
}

.market-status {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  color: #f7faef;
}

.market-status small {
  color: var(--neon);
  font-weight: 850;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--neon);
  box-shadow: 0 0 0 7px rgba(207, 255, 18, 0.12);
}

.portfolio-hero-card {
  position: relative;
  overflow: hidden;
  min-height: 344px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  color: #f7faef;
  background:
    linear-gradient(160deg, rgba(49, 65, 31, 0.84), rgba(13, 18, 9, 0.98) 58%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 18px);
  box-shadow: 0 30px 64px rgba(0, 0, 0, 0.46);
}

.portfolio-hero-card::after {
  content: "";
  position: absolute;
  inset: auto -28px -72px auto;
  width: 190px;
  height: 190px;
  border: 34px solid rgba(207, 255, 18, 0.08);
  border-radius: 50%;
}

.portfolio-hero-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: start;
  gap: 14px;
}

.portfolio-hero-top small,
.portfolio-hero-top p,
.portfolio-hero-meta small {
  color: rgba(247, 250, 239, 0.62);
  font-weight: 800;
}

.portfolio-hero-top h3 {
  margin: 8px 0 4px;
  color: #ffffff;
  font-size: clamp(2.35rem, 11vw, 3.5rem);
  letter-spacing: 0;
  line-height: 0.92;
}

.portfolio-week-chart {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  height: 116px;
  margin: 20px 0;
  padding: 0 2px;
}

.portfolio-week-chart i,
.analytics-bars i {
  display: block;
  min-height: 18px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(255, 255, 255, 0.88);
}

.portfolio-week-chart i:nth-child(2n),
.analytics-bars i:nth-child(2n) {
  background: var(--neon);
}

.portfolio-hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.portfolio-hero-actions button,
.challenge-tabs button,
.floating-action-strip button,
.asset-detail-tabs button,
.ai-prompt-chips button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.portfolio-hero-actions button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #081006;
  background: var(--neon);
}

.portfolio-hero-actions button:nth-child(2) {
  background: #f7faef;
}

.portfolio-hero-actions .icon-premium {
  width: 24px;
  height: 24px;
}

.portfolio-hero-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.portfolio-hero-meta span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 10px;
  background: rgba(255, 255, 255, 0.04);
}

.portfolio-hero-meta strong {
  color: var(--neon);
  font-size: 0.88rem;
}

.floating-action-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.floating-action-strip button {
  display: grid;
  gap: 6px;
  min-height: 74px;
  place-items: center;
  padding: 10px 4px;
  color: #f7faef;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-action-strip span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #081006;
  background: var(--neon);
}

.floating-action-strip .icon-premium {
  width: 24px;
  height: 24px;
}

.dark-row {
  margin-top: 8px;
  color: #f7faef;
}

.dark-row a {
  color: var(--neon);
}

.asset-card-grid,
.investment-card-grid {
  display: grid;
  gap: 12px;
}

.asset-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.asset-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 176px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: #f7faef;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.asset-card.featured {
  color: #081006;
  background: var(--neon);
}

.asset-card-top,
.asset-card-foot,
.investment-card-top,
.investment-card-bottom,
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-card strong {
  font-size: 1rem;
}

.asset-card small {
  color: inherit;
  opacity: .68;
}

.asset-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.66rem;
  font-weight: 900;
}

.asset-card.featured .asset-chip {
  background: rgba(8, 16, 6, 0.1);
}

.asset-logo {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 999px;
  color: #081006;
  background: #f7faef;
  font-size: 0.74rem;
  font-weight: 950;
}

.asset-card-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  height: 46px;
  margin-top: auto;
}

.asset-card-chart i {
  display: block;
  border-radius: 999px 999px 5px 5px;
  background: rgba(255, 255, 255, 0.5);
}

.asset-card.featured .asset-card-chart i {
  background: rgba(8, 16, 6, 0.2);
}

.asset-card-chart i:nth-child(2n) {
  background: #f7faef;
}

.asset-card.featured .asset-card-chart i:nth-child(2n) {
  background: #081006;
}

.asset-card-foot em,
.positive {
  color: var(--neon);
}

.asset-card.featured .asset-card-foot em,
.investment-card-v2 .positive {
  color: #0f4a05;
}

.negative {
  color: #ff6b7a;
}

.challenge-panel,
.profile-challenge-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 32px;
  color: #10130d;
  background: #f4f6ef;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.24);
}

.challenge-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.challenge-head > span,
.activity-icon,
.ai-mini-orb,
.overview-orbit {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--neon);
  color: #081006;
}

.challenge-head > span {
  width: 50px;
  height: 50px;
}

.challenge-head .icon-premium {
  width: 30px;
  height: 30px;
}

.challenge-head small,
.challenge-amount small {
  color: rgba(16, 19, 13, 0.58);
  font-weight: 850;
}

.challenge-head button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  font-weight: 950;
}

.challenge-tabs {
  display: grid;
  grid-template-columns: 1fr 54px 1fr;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #dcefe3;
}

.challenge-tabs button {
  min-height: 48px;
  background: transparent;
}

.challenge-tabs .active {
  width: 54px;
  height: 54px;
  margin: -4px auto;
  color: #f7faef;
  background: #080b07;
  font-size: 0;
}

.challenge-tabs .active::before {
  content: "+";
  font-size: 1.6rem;
}

.challenge-amount {
  text-align: center;
}

.challenge-amount strong {
  display: block;
  margin-top: 4px;
  font-size: 1.8rem;
}

.split-progress {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  color: rgba(16, 19, 13, 0.58);
  font-weight: 900;
}

.split-progress::before,
.split-progress i {
  grid-column: 2;
  grid-row: 1;
  height: 10px;
  border-radius: 999px;
}

.split-progress::before {
  content: "";
  background: #dde2da;
}

.split-progress i {
  display: block;
  max-width: 100%;
  background: var(--neon);
}

.ai-suggestion-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 28px;
  color: #f7faef;
  background: linear-gradient(145deg, #161a13, #050705);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-mini-orb {
  width: 54px;
  height: 54px;
}

.ai-mini-orb .icon-premium {
  width: 34px;
  height: 34px;
}

.ai-suggestion-card span {
  color: var(--neon);
  font-weight: 950;
}

.ai-suggestion-card p {
  margin: 4px 0 0;
  color: rgba(247, 250, 239, 0.72);
}

.ai-suggestion-card button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #081006;
  background: var(--neon);
  font-weight: 950;
}

.investment-form-panel,
.contribution-exchange-panel {
  color: #10130d;
  background: #f4f6ef;
  border-radius: 32px;
}

.investment-list-panel,
.contribution-history-panel,
.report-panel,
.ai-panel {
  color: #f7faef;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.investment-list-panel .panel-head,
.contribution-history-panel .panel-head,
.report-panel .panel-head,
.ai-panel .panel-head {
  color: #f7faef;
}

.investment-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 12px;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 30px;
  color: #f7faef;
  background: linear-gradient(150deg, #25351a, #070907);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.investment-overview-card strong {
  display: block;
  margin: 5px 0;
  font-size: 1.9rem;
}

.overview-orbit {
  width: 74px;
  height: 74px;
}

.overview-orbit .icon-premium {
  width: 46px;
  height: 46px;
}

.investment-overview-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.investment-overview-actions button,
.asset-detail-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.investment-overview-actions button:first-child {
  background: var(--neon);
}

.asset-detail-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.asset-detail-tabs button {
  flex: 1;
  min-width: 86px;
  color: #10130d;
  background: #f4f6ef;
}

.asset-detail-tabs .active {
  background: var(--neon);
}

.investment-card-v2 {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 26px;
  color: #f7faef;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.investment-card-v2.highlight {
  color: #10130d;
  background: var(--neon);
}

.investment-card-v2.highlight .asset-line-graph {
  background: rgba(8, 16, 6, 0.1);
}

.asset-line-graph {
  position: relative;
  height: 74px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.asset-line-graph::before {
  content: "";
  position: absolute;
  inset: 18px 10px 18px;
  border-top: 2px solid rgba(255, 255, 255, 0.22);
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.asset-line-graph span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
}

.investment-card-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.investment-card-bottom span {
  display: grid;
  gap: 3px;
}

.investment-card-bottom small {
  color: inherit;
  opacity: .58;
}

.asset-best-card,
.contribution-row-v2 {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.asset-best-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 24px;
  color: #10130d;
  background: #f4f6ef;
}

.asset-best-card > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 999px;
  background: var(--neon);
}

.contribution-summary-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 32px;
  background: #f4f6ef;
  color: #10130d;
}

.swap-panels {
  position: relative;
  display: grid;
  gap: 0;
}

.swap-panel {
  min-height: 116px;
  padding: 18px;
}

.swap-panel.light {
  border-radius: 28px 28px 0 0;
  background: #bfe7df;
}

.swap-panel.dark {
  margin-top: -8px;
  border-radius: 28px;
  color: #f7faef;
  background: #080b07;
}

.swap-panel strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.75rem;
}

.swap-core {
  position: absolute;
  inset: calc(50% - 34px) auto auto 50%;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 7px solid #f4f6ef;
  border-radius: 999px;
  color: #081006;
  background: var(--neon);
  transform: translateX(-50%);
  z-index: 2;
}

.swap-core .icon-premium {
  width: 36px;
  height: 36px;
}

.contribution-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.contribution-metrics span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
}

.activity-icon {
  width: 46px;
  height: 46px;
}

.activity-icon .icon-premium {
  width: 28px;
  height: 28px;
}

.contribution-row-v2 {
  color: #10130d;
  background: #f4f6ef;
}

.contribution-row-v2 em {
  color: rgba(16, 19, 13, 0.62);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.analytics-tabs {
  background: #10130d;
}

.analytics-tabs .report-tab {
  color: rgba(247, 250, 239, 0.72);
}

.analytics-tabs .active {
  color: #081006;
  background: var(--neon);
}

.analytics-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.analytics-score,
.analytics-radar,
.analytics-bar-card,
.performance-stack,
.statement-card-v2,
.statement-ledger,
.statement-note-card,
.history-stack {
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
}

.analytics-score {
  min-height: 188px;
  padding: 18px;
  color: #081006;
  background: var(--neon);
}

.analytics-score strong {
  display: block;
  margin: 8px 0;
  font-size: 3rem;
}

.dot-matrix {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.dot-matrix i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(8, 16, 6, 0.16);
}

.dot-matrix i.on {
  background: #081006;
}

.analytics-radar {
  display: grid;
  gap: 8px;
  min-height: 176px;
  padding: 18px;
  color: #f7faef;
  background: #080b07;
}

.radar-shape {
  height: 80px;
  clip-path: polygon(50% 0, 92% 22%, 78% 78%, 50% 100%, 18% 74%, 8% 24%);
  background:
    linear-gradient(135deg, rgba(207, 255, 18, 0.62), transparent),
    repeating-linear-gradient(45deg, rgba(255,255,255,.2) 0 2px, transparent 2px 11px);
}

.analytics-summary-v2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-bar-card {
  padding: 16px;
  color: #f7faef;
  background: #10130d;
}

.analytics-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: 164px;
}

.performance-stack {
  display: grid;
  gap: 10px;
  padding: 16px;
  color: #10130d;
  background: #f4f6ef;
}

.performance-row,
.history-row {
  width: 100%;
  border: 0;
  border-radius: 20px;
  background: #ffffff;
  padding: 12px;
  text-align: left;
}

.performance-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.statement-card-v2 {
  display: grid;
  gap: 14px;
  padding: 16px;
  color: #10130d;
  background: #f4f6ef;
}

.statement-card-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.statement-card-head > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--neon);
}

.statement-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.statement-card-grid div {
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
}

.statement-mini-chart {
  width: 100%;
  color: #c7775e;
}

.statement-ledger,
.statement-note-card,
.history-stack {
  display: grid;
  gap: 8px;
  padding: 14px;
  color: #10130d;
  background: #f4f6ef;
}

.statement-ledger div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 64px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
}

.statement-ledger .total {
  background: var(--neon);
}

.statement-ledger em {
  color: rgba(16, 19, 13, 0.58);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.inline-actions {
  padding-inline: 0;
}

.history-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.history-row > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--neon);
}

.ai-assistant-screen {
  display: grid;
  gap: 14px;
  color: #f7faef;
}

.ai-screen-top {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ai-screen-top button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #081006;
  background: #f4f6ef;
  font-size: 1.4rem;
  font-weight: 950;
}

.ai-console-v2 {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 16px;
  border-radius: 34px;
  background: #050705;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-orb-v2 {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  color: #081006;
  background: var(--neon);
}

.ai-orb-v2 .icon-premium {
  width: 46px;
  height: 46px;
}

.ai-console-v2 p {
  max-width: 310px;
  color: rgba(247, 250, 239, 0.68);
  text-align: center;
}

.ai-metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ai-metric-row em {
  padding: 4px 8px;
  border-radius: 999px;
  color: #081006;
  background: var(--neon);
  font-size: .72rem;
  font-style: normal;
  font-weight: 950;
}

.ai-prompt-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.ai-prompt-chips button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
  color: #081006;
  background: var(--neon);
}

.ai-insight-stack {
  display: grid;
  gap: 10px;
}

.ai-insight-card-v2 {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  color: #f7faef;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-insight-card-v2 > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 999px;
  background: var(--neon);
}

.ai-bottom-prompt {
  position: sticky;
  bottom: 12px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: var(--neon);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.ai-bottom-prompt span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
}

.ai-bottom-prompt button {
  border: 0;
  border-radius: 999px;
  color: #f7faef;
  background: #050705;
  font-weight: 950;
}

.profile-card-v2,
.profile-data-card,
.profile-settings-v2,
.invite-card-v2,
.logout-card-v2 {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 30px;
  color: #10130d;
  background: #f4f6ef;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
}

.profile-card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.profile-card-top > button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
}

.profile-name-block {
  margin: 12px 0;
}

.profile-name-block h3 {
  margin: 4px 0;
  font-size: 1.55rem;
}

.profile-name-block h3 span {
  color: #078b3e;
}

.profile-xp-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 19, 13, 0.1);
}

.profile-xp-card > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--neon);
}

.profile-data-list {
  gap: 8px;
}

.profile-data-list > div {
  border: 0;
  background: #ffffff;
}

.profile-settings-v2 {
  display: grid;
  gap: 8px;
}

.profile-settings-v2 .settings-row,
.invite-card-v2,
.logout-card-v2 {
  border: 0;
  background: #ffffff;
}

.invite-card-v2,
.logout-card-v2 {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.invite-card-v2 > span,
.logout-card-v2 > span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  background: var(--neon);
}

.logout-card-v2 {
  color: #e94b5f;
}

.home-achievements,
.profile-achievements-v2 {
  color: #10130d;
  background: #f4f6ef;
  border-color: transparent;
}

.home-achievements .level-node span,
.profile-achievements-v2 .level-node span {
  box-shadow: inset 0 0 0 2px #080b07;
}

.home-achievements .level-node.reached span,
.profile-achievements-v2 .level-node.reached span {
  background: var(--neon, #cfff12);
  box-shadow:
    inset 0 0 0 2px #080b07,
    0 10px 24px rgba(207, 255, 18, 0.24);
}

.home-achievements .level-node.reached span .icon-premium,
.profile-achievements-v2 .level-node.reached span .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.onboarding-shell {
  background: #f4f6ef;
}

.onboarding-slide {
  min-height: 100%;
  align-content: center;
}

.onboarding-preview {
  border-radius: 34px;
  background: #d9ff42;
}

@media (max-width: 640px) {
  body:has(.app-view:not(.hidden)) {
    padding: 0;
  }

  .app-view {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .analytics-summary-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 641px) {
  .asset-card-grid,
  .investment-card-grid,
  .analytics-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contribution-summary-card {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1025px) {
  .app-view {
    width: min(1120px, calc(100vw - 36px));
    height: min(920px, calc(100vh - 36px));
  }

  .content {
    padding-inline: 24px;
  }

  #dashboard.active,
  #portfolio.active .split-grid,
  #contributions.active .split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
    gap: 18px;
    align-items: start;
  }

  #dashboard.active .dashboard-scene {
    grid-row: span 2;
  }

  #dashboard.active .asset-card-grid,
  #dashboard.active .dark-row,
  #dashboard.active .challenge-panel,
  #dashboard.active .ai-suggestion-card,
  #dashboard.active .home-achievements {
    grid-column: 2;
  }

  #dashboard.active .floating-action-strip {
    grid-column: 1;
  }

  .portfolio-hero-card {
    min-height: 560px;
  }

  .portfolio-week-chart {
    height: 230px;
  }

  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-tabs,
  .analytics-hero,
  .analytics-summary-v2,
  .analytics-bar-card,
  .performance-stack,
  .statement-card-v2,
  .statement-ledger,
  .statement-note-card,
  .history-stack {
    grid-column: span 2;
  }
}

/* Visual polish: dollar-moss platform background and professional dashboard chart */
body:has(.app-view:not(.hidden)) {
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 244, 0.96), transparent 34%),
    radial-gradient(circle at 8% 20%, rgba(168, 193, 132, 0.2), transparent 30%),
    linear-gradient(160deg, #d8e6bd 0%, #f0f5dc 48%, #c9dca9 100%);
}

.app-view {
  background:
    radial-gradient(circle at 22% -10%, rgba(255, 255, 246, 0.94), transparent 31%),
    radial-gradient(circle at 86% 10%, rgba(156, 182, 118, 0.14), transparent 34%),
    linear-gradient(180deg, #f7faea 0%, #eaf2d3 48%, #d9e7bf 100%);
}

.app-view .content {
  background:
    linear-gradient(90deg, rgba(20, 62, 26, 0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 62, 26, 0.016) 1px, transparent 1px),
    radial-gradient(circle at 30% 0%, rgba(255, 255, 240, 0.7), transparent 29%),
    radial-gradient(circle at 88% 14%, rgba(145, 171, 107, 0.12), transparent 33%),
    linear-gradient(180deg, #f7faea 0%, #eaf2d3 43%, #d7e5bd 100%);
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
}

.app-view .phone-status {
  color: #16311a;
  background: rgba(247, 250, 234, 0.84) !important;
  border-bottom: 1px solid rgba(22, 49, 26, 0.08);
}

.topbar-copy span {
  color: rgba(22, 49, 26, 0.72);
}

.topbar-copy h2,
.market-status,
.dark-row {
  color: #102715;
}

.topbar-copy h2 strong,
.market-status small,
.dark-row a {
  color: #1e4f28;
}

.bell {
  color: #102715;
  background: rgba(247, 250, 239, 0.76);
  border-color: rgba(22, 49, 26, 0.12);
  box-shadow: 0 14px 32px rgba(43, 77, 41, 0.18);
}

.floating-action-strip button {
  color: #102715;
  background: rgba(247, 250, 239, 0.54);
  border-color: rgba(22, 49, 26, 0.1);
  box-shadow: 0 14px 28px rgba(43, 77, 41, 0.12);
}

.status-dot {
  background: #245d2e;
  box-shadow: 0 0 0 7px rgba(36, 93, 46, 0.12);
}

.portfolio-professional-chart {
  position: relative;
  z-index: 1;
  height: 154px;
  margin: 18px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(207, 255, 18, 0.13);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at 76% 20%, rgba(207, 255, 18, 0.14), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portfolio-professional-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.portfolio-professional-chart .chart-grid line {
  stroke: rgba(247, 250, 239, 0.1);
  stroke-width: 1;
  stroke-dasharray: 3 8;
}

.portfolio-professional-chart .chart-area {
  fill: url(#portfolioAreaGradient);
}

.portfolio-professional-chart .chart-line {
  fill: none;
  stroke: var(--neon);
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portfolio-professional-chart .chart-points circle {
  fill: #0f1b0a;
  stroke: rgba(207, 255, 18, 0.86);
  stroke-width: 2.4;
}

.portfolio-professional-chart .chart-points .current {
  fill: var(--neon);
  stroke: #f7faef;
  stroke-width: 2.6;
}

.portfolio-professional-chart .chart-current rect {
  fill: rgba(5, 8, 6, 0.9);
  stroke: rgba(207, 255, 18, 0.28);
}

.portfolio-professional-chart .chart-current text {
  fill: #f7faef;
  font-size: 9px;
  font-weight: 900;
}

.portfolio-professional-chart .chart-current text + text {
  fill: rgba(247, 250, 239, 0.58);
  font-size: 8px;
}

@media (min-width: 1025px) {
  .portfolio-professional-chart {
    height: 236px;
  }
}

/* Contrast pass: keep light-card content readable on the dollar-moss theme */
.app-view {
  --light-card-text: #0d1b0e;
  --light-card-muted: #43533a;
  --light-card-link: #174a22;
  --light-card-link-hover: #0c3115;
  --light-card-danger: #9d1f32;
  --light-card-danger-muted: #74313a;
}

:where(
  .home-achievements,
  .profile-achievements-v2,
  .profile-card-v2,
  .profile-data-card,
  .profile-settings-v2,
  .invite-card-v2,
  .logout-card-v2,
  .investment-form-panel,
  .contribution-exchange-panel,
  .challenge-panel,
  .profile-challenge-card,
  .asset-best-card,
  .contribution-summary-card,
  .contribution-row-v2,
  .performance-stack,
  .statement-card-v2,
  .statement-ledger,
  .statement-note-card,
  .history-stack,
  .mobile-card
) {
  color: var(--light-card-text);
}

:where(
  .home-achievements,
  .profile-achievements-v2,
  .profile-card-v2,
  .profile-data-card,
  .profile-settings-v2,
  .invite-card-v2,
  .logout-card-v2,
  .investment-form-panel,
  .contribution-exchange-panel,
  .challenge-panel,
  .profile-challenge-card,
  .asset-best-card,
  .contribution-summary-card,
  .contribution-row-v2,
  .performance-stack,
  .statement-card-v2,
  .statement-ledger,
  .statement-note-card,
  .history-stack,
  .mobile-card
) :where(h1, h2, h3, h4, label, strong, th) {
  color: var(--light-card-text);
}

:where(
  .profile-card-v2,
  .profile-data-card,
  .profile-settings-v2,
  .invite-card-v2,
  .investment-form-panel,
  .contribution-exchange-panel,
  .challenge-panel,
  .profile-challenge-card,
  .asset-best-card,
  .contribution-summary-card,
  .contribution-row-v2,
  .performance-stack,
  .statement-card-v2,
  .statement-ledger,
  .statement-note-card,
  .history-stack,
  .mobile-card
) :where(p, small, em, td, span:not(.icon-premium):not(.settings-icon):not(.heading-icon):not(.quick-icon):not(.nav-icon):not(.bell-icon)) {
  color: var(--light-card-muted);
}

:where(
  .home-achievements,
  .profile-achievements-v2,
  .profile-data-card,
  .profile-settings-v2,
  .invite-card-v2,
  .mobile-card
) :where(a, .secondary) {
  color: var(--light-card-link);
}

:where(
  .home-achievements,
  .profile-achievements-v2,
  .profile-data-card,
  .profile-settings-v2,
  .invite-card-v2,
  .mobile-card
) :where(a:hover, .secondary:hover) {
  color: var(--light-card-link-hover);
}

.home-achievements .section-row a,
.profile-achievements-v2 .section-row a,
.profile-data-card .section-row a,
.profile-settings-v2 .section-row a,
.mobile-card .section-row a,
.invite-card-v2 .secondary,
.mobile-card .secondary {
  color: var(--light-card-link);
}

.home-achievements .section-row a:hover,
.profile-achievements-v2 .section-row a:hover,
.profile-data-card .section-row a:hover,
.profile-settings-v2 .section-row a:hover,
.mobile-card .section-row a:hover,
.invite-card-v2 .secondary:hover,
.mobile-card .secondary:hover {
  color: var(--light-card-link-hover);
}

.home-achievements .level-node,
.profile-achievements-v2 .level-node {
  color: var(--light-card-muted);
}

.home-achievements .level-node.reached,
.profile-achievements-v2 .level-node.reached {
  color: var(--light-card-text);
}

.home-achievements .level-node.reached span,
.profile-achievements-v2 .level-node.reached span {
  color: #080b07;
}

.profile-data-list > div span,
.profile-summary small,
.challenge-head small,
.challenge-amount small,
.split-progress {
  color: var(--light-card-muted);
}

.profile-data-list > div strong,
.profile-summary strong,
.challenge-amount strong,
.statement-card-grid strong,
.statement-ledger strong,
.performance-row strong,
.history-row strong {
  color: var(--light-card-text);
}

.avatar-edit {
  color: #080b07;
  background: var(--neon);
  border-color: #f7faef;
}

.avatar-edit .icon-premium,
.invite-card-v2 > span .icon-premium,
.logout-card-v2 > span .icon-premium,
.profile-xp-card > span .icon-premium,
.statement-card-head > span .icon-premium,
.asset-best-card > span .icon-premium,
.activity-icon .icon-premium,
.challenge-head > span .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.invite-card-v2 .secondary,
.mobile-card .secondary {
  color: var(--light-card-link);
  background: #f7faef;
  border-color: rgba(23, 74, 34, 0.32);
}

.investment-form-panel .primary,
.contribution-exchange-panel .primary {
  color: #080b07;
  background: var(--neon);
  box-shadow: 0 16px 26px rgba(8, 11, 7, 0.18);
}

.logout-card-v2,
.danger-row {
  color: var(--light-card-danger);
}

.logout-card-v2 strong,
.danger-row strong {
  color: var(--light-card-danger);
}

.logout-card-v2 p,
.danger-row p {
  color: var(--light-card-danger-muted);
}

.logout-card-v2 em {
  color: var(--light-card-danger);
}

.green,
:where(.home-achievements, .profile-achievements-v2, .profile-card-v2, .profile-data-card, .mobile-card) .green,
:where(.asset-best-card, .performance-stack, .statement-card-v2, .contribution-row-v2) .positive {
  color: #175a23;
}

:where(.asset-best-card, .performance-stack, .statement-card-v2, .contribution-row-v2) .negative {
  color: var(--light-card-danger);
}

.swap-panel.dark,
.swap-panel.dark :where(p, small, span, strong, em),
.statement-head,
.statement-head :where(p, small, span, strong, em) {
  color: #f7faef;
}

/* Black-card pass: remove transparent/translucent card surfaces */
.app-view {
  --black-card-bg: #080b07;
  --black-card-bg-2: #10130d;
  --black-card-text: #f7faef;
  --black-card-muted: rgba(247, 250, 239, 0.72);
  --black-card-border: rgba(255, 255, 255, 0.12);
}

.asset-card:not(.featured),
.investment-card-v2:not(.highlight),
.ai-suggestion-card,
.ai-insight-card-v2,
.investment-list-panel,
.contribution-history-panel,
.report-panel,
.ai-panel {
  color: var(--black-card-text);
  border: 1px solid var(--black-card-border);
  background:
    radial-gradient(circle at 86% 12%, rgba(207, 255, 18, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(24, 31, 20, 0.98), rgba(8, 11, 7, 0.99) 58%),
    var(--black-card-bg);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.36);
}

.investment-list-panel,
.contribution-history-panel,
.report-panel,
.ai-panel {
  padding: 16px;
  border-radius: 32px;
}

.asset-card:not(.featured) :where(strong, h3, h4),
.investment-card-v2:not(.highlight) :where(strong, h3, h4),
.ai-suggestion-card :where(strong, h3, h4),
.ai-insight-card-v2 :where(strong, h3, h4),
.investment-list-panel :where(strong, h3, h4),
.contribution-history-panel :where(strong, h3, h4),
.report-panel :where(strong, h3, h4),
.ai-panel :where(strong, h3, h4) {
  color: var(--black-card-text);
}

.asset-card:not(.featured) :where(p, small, span:not(.icon-premium), em),
.investment-card-v2:not(.highlight) :where(p, small, span:not(.icon-premium), em),
.ai-suggestion-card :where(p, small, span:not(.icon-premium), em),
.ai-insight-card-v2 :where(p, small, span:not(.icon-premium), em),
.investment-list-panel :where(p, small, span:not(.icon-premium), em, td),
.contribution-history-panel :where(p, small, span:not(.icon-premium), em, td),
.report-panel :where(p, small, span:not(.icon-premium), em, td),
.ai-panel :where(p, small, span:not(.icon-premium), em, td) {
  color: var(--black-card-muted);
}

.investment-list-panel .panel-head,
.contribution-history-panel .panel-head,
.report-panel .panel-head,
.ai-panel .panel-head {
  color: var(--black-card-text);
}

.investment-list-panel .panel-head span,
.contribution-history-panel .panel-head span,
.report-panel .panel-head span,
.ai-panel .panel-head span {
  color: var(--black-card-muted);
}

.asset-card:not(.featured) .asset-chip,
.investment-card-v2:not(.highlight) .asset-line-graph,
.ai-insight-card-v2 > span {
  background: rgba(255, 255, 255, 0.1);
}

.asset-card:not(.featured) .asset-card-chart,
.investment-card-v2:not(.highlight) .asset-line-graph {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.asset-card:not(.featured) .positive,
.investment-card-v2:not(.highlight) .positive,
.investment-list-panel .positive,
.report-panel .positive,
.ai-panel .positive {
  color: var(--neon);
}

.asset-card:not(.featured) .negative,
.investment-card-v2:not(.highlight) .negative,
.investment-list-panel .negative,
.report-panel .negative,
.ai-panel .negative {
  color: #ff7b8c;
}

.asset-card.featured,
.investment-card-v2.highlight {
  color: #081006;
  background: var(--neon);
}

/* Portfolio organization pass */
.investment-list-panel {
  overflow: hidden;
}

.investment-list-panel .panel-head {
  margin-bottom: 14px;
}

.asset-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 14px;
  padding: 6px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.asset-detail-tabs button {
  min-width: 0;
  min-height: 42px;
  color: rgba(247, 250, 239, 0.78);
  background: transparent;
  white-space: nowrap;
}

.asset-detail-tabs button.active {
  color: #081006;
  background: var(--neon);
  box-shadow: 0 12px 24px rgba(207, 255, 18, 0.22);
}

.portfolio-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.investment-card-v2 {
  min-width: 0;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.investment-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: start;
}

.asset-identity {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.asset-identity > div {
  min-width: 0;
}

.asset-identity strong,
.asset-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-identity small {
  margin-top: 2px;
  line-height: 1.25;
}

.investment-card-head .delete-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
}

.asset-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-card-tags span {
  max-width: 100%;
  overflow: hidden;
  padding: 7px 10px;
  border-radius: 999px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(247, 250, 239, 0.86);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  font-weight: 900;
}

.asset-card-tags .risk-baixo {
  color: #cfff12;
}

.asset-card-tags .risk-moderado {
  color: #f7faef;
}

.asset-card-tags .risk-alto {
  color: #ff9aaa;
}

.asset-performance-meter {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background:
    radial-gradient(circle at 74% 18%, rgba(207, 255, 18, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.06);
}

.asset-performance-meter svg {
  display: block;
  width: 100%;
  height: 92px;
}

.asset-performance-meter .gauge-track {
  fill: none;
  stroke: rgba(247, 250, 239, 0.14);
  stroke-width: 13;
  stroke-linecap: round;
}

.asset-performance-meter .gauge-value {
  fill: none;
  stroke: var(--neon);
  stroke-width: 13;
  stroke-linecap: round;
}

.asset-performance-meter.negative .gauge-value {
  stroke: #ff6b7a;
}

.asset-performance-meter .gauge-dot {
  fill: #f7faef;
  stroke: #080b07;
  stroke-width: 2;
}

.asset-performance-meter text {
  fill: rgba(247, 250, 239, 0.62);
  font-size: 9px;
  font-weight: 900;
}

.asset-meter-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.asset-meter-copy strong {
  font-size: 1.35rem;
}

.asset-meter-copy span {
  max-width: 58%;
  text-align: right;
  line-height: 1.25;
}

.investment-card-metrics,
.asset-group-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.investment-card-metrics span,
.asset-group-metrics span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.investment-card-metrics small,
.asset-group-metrics small {
  font-size: 0.68rem;
  font-weight: 850;
}

.investment-card-metrics strong,
.asset-group-metrics strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.investment-card-v2.highlight .asset-card-tags span,
.investment-card-v2.highlight .investment-card-metrics span,
.investment-card-v2.highlight .asset-performance-meter {
  color: #081006;
  background: rgba(8, 16, 6, 0.08);
  border-color: rgba(8, 16, 6, 0.12);
}

.investment-card-v2.highlight .asset-identity strong {
  color: #080b07;
  font-weight: 950;
}

.investment-card-v2.highlight .asset-performance-meter .gauge-track {
  stroke: rgba(8, 16, 6, 0.14);
}

.investment-card-v2.highlight .asset-performance-meter .gauge-value {
  stroke: #081006;
}

.investment-card-v2.highlight .asset-performance-meter text,
.investment-card-v2.highlight .asset-meter-copy span,
.investment-card-v2.highlight .investment-card-metrics small,
.investment-card-v2.highlight .asset-identity small {
  color: rgba(8, 16, 6, 0.68);
  fill: rgba(8, 16, 6, 0.68);
}

.asset-group-list {
  display: grid;
  gap: 12px;
}

.asset-group-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  color: #f7faef;
  background:
    radial-gradient(circle at 88% 12%, rgba(207, 255, 18, 0.12), transparent 32%),
    linear-gradient(145deg, #12170f, #070907);
}

.asset-group-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.asset-group-head > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: var(--neon);
}

.asset-group-head .icon-premium {
  width: 28px;
  height: 28px;
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.asset-group-head div {
  min-width: 0;
}

.asset-group-head strong,
.asset-group-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-group-head em {
  padding: 7px 10px;
  border-radius: 999px;
  color: #081006;
  background: var(--neon);
  font-style: normal;
  font-weight: 950;
}

.asset-group-bar,
.risk-exposure div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.asset-group-bar i,
.risk-exposure i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--neon);
}

.risk-exposure {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.risk-exposure strong {
  color: var(--neon);
  font-size: 1.15rem;
}

.asset-group-card.risk-alto .asset-group-head em,
.asset-group-card.risk-alto .asset-group-bar i,
.asset-group-card.risk-alto .risk-exposure i {
  background: #ff6b7a;
}

.asset-group-card.risk-alto .risk-exposure strong {
  color: #ff9aaa;
}

.investment-list-panel .asset-best-card {
  color: var(--light-card-text);
  background: #f4f6ef;
}

.investment-list-panel .asset-best-card :where(small, span:not(.icon-premium)) {
  color: var(--light-card-muted);
}

.investment-list-panel .asset-best-card :where(strong, h3, h4) {
  color: var(--light-card-text);
}

.investment-list-panel .asset-best-card > span .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

/* Quick menu pass */
.topbar.topbar-with-menu {
  grid-template-columns: 52px minmax(0, 1fr) 44px 44px;
  gap: 8px;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.menu-button {
  color: #081006;
}

.menu-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.menu-icon .icon-premium {
  width: 25px;
  height: 25px;
}

.quick-menu-list {
  display: grid;
  gap: 10px;
}

.quick-menu-row {
  width: 100%;
  min-height: 64px;
  text-align: left;
}

.quick-menu-row .settings-icon {
  background: var(--neon, #cfff12);
}

.quick-menu-row .settings-icon .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.quick-menu-row p {
  margin: 3px 0 0;
  color: var(--light-card-muted, #526054);
  font-size: 0.8rem;
  line-height: 1.25;
}

@media (max-width: 420px) {
  .topbar.topbar-with-menu {
    grid-template-columns: 46px minmax(0, 1fr) 40px 40px;
    gap: 6px;
  }

  .topbar.topbar-with-menu .bell {
    width: 40px;
    height: 40px;
  }

  .topbar.topbar-with-menu .avatar {
    width: 46px;
    height: 46px;
  }
}

/* Bottom sheet modal pass */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(4, 8, 5, 0.48);
  backdrop-filter: blur(14px);
  animation: sheetBackdropIn 180ms ease-out both;
}

.modal {
  position: relative;
  display: flex;
  width: min(560px, calc(100vw - 24px));
  max-height: min(82vh, 760px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(8, 16, 6, 0.1);
  border-radius: 30px 30px 24px 24px;
  background: #f8fbf4;
  box-shadow: 0 -24px 80px rgba(3, 8, 4, 0.42);
  animation: slideUpSheet 240ms cubic-bezier(.22, .9, .18, 1) both;
}

.modal::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 3;
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: rgba(8, 16, 6, 0.18);
  transform: translateX(-50%);
}

.modal-head {
  flex: 0 0 auto;
  padding: 28px 18px 12px;
  border-bottom: 1px solid rgba(8, 16, 6, 0.07);
  background: #f8fbf4;
}

.modal-head h3 {
  color: #080b07;
  font-size: 1.08rem;
  font-weight: 950;
}

.modal-close {
  background: rgba(8, 16, 6, 0.08);
  color: #080b07;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 18px 18px;
}

.modal-actions {
  flex: 0 0 auto;
  padding: 12px 18px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(8, 16, 6, 0.07);
  background: #f8fbf4;
}

.modal-actions:empty {
  display: none;
}

@keyframes slideUpSheet {
  from {
    opacity: 0;
    transform: translateY(105%) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sheetBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .modal-backdrop {
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: min(88vh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .modal-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-actions {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal {
    animation: none;
  }
}

/* Invest tab contrast pass */
.contribution-history-panel .contribution-row-v2,
.contribution-history-panel .quota-row,
.contribution-history-panel .external-row,
.quota-contribution-summary .swap-panel.light,
.quota-contribution-summary .contribution-metrics span {
  color: #080b07;
}

.contribution-history-panel .contribution-row-v2 :where(strong, h3, h4),
.contribution-history-panel .quota-row :where(strong, h3, h4),
.contribution-history-panel .external-row :where(strong, h3, h4),
.quota-contribution-summary .swap-panel.light :where(strong, h3, h4),
.quota-contribution-summary .contribution-metrics span :where(strong, h3, h4) {
  color: #080b07;
}

.contribution-history-panel .contribution-row-v2 :where(small, span:not(.icon-premium):not(.activity-icon), em, p),
.contribution-history-panel .quota-row :where(small, span:not(.icon-premium):not(.activity-icon), em, p),
.contribution-history-panel .external-row :where(small, span:not(.icon-premium):not(.activity-icon), em, p),
.quota-contribution-summary .swap-panel.light :where(small, span:not(.icon-premium), em, p),
.quota-contribution-summary .contribution-metrics span :where(small, span:not(.icon-premium), em, p) {
  color: #334233;
}

.contribution-history-panel .quota-row,
.contribution-history-panel .external-row {
  background: #f4f6ef;
}

.contribution-history-panel .quota-row .activity-icon,
.contribution-history-panel .external-row .activity-icon {
  color: #080b07;
}

.contribution-history-panel .quota-row .activity-icon .icon-premium,
.contribution-history-panel .external-row .activity-icon .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.quota-contribution-summary .swap-panel.dark,
.quota-contribution-summary .swap-panel.dark :where(strong, h3, h4, small, span, em, p) {
  color: #f7faef;
}

/* DJ quota focus pass */
.quota-dashboard-scene {
  margin-bottom: 12px;
}

.quota-status strong {
  color: #081006;
}

.quota-status small {
  color: #173112;
}

.quota-hero-card {
  min-height: 0;
  background:
    radial-gradient(circle at 82% 8%, rgba(207, 255, 18, 0.24), transparent 30%),
    linear-gradient(158deg, #151c10 0%, #080b07 62%);
}

.quota-hero-card .portfolio-professional-chart {
  margin: 14px 0 16px;
}

.quota-professional-chart .quota-area {
  fill: url(#quotaAreaGradient);
}

.quota-hero-meta strong {
  color: #f7faef;
}

.dj-quota-kpis,
.dj-quota-grid,
.quota-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dj-quota-kpis {
  margin: 0 0 14px;
}

.dj-quota-kpis article,
.dj-quota-grid span,
.quota-report-grid span {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  color: #f7faef;
  background: linear-gradient(145deg, #12170f, #070907);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}

.dj-quota-kpis small,
.dj-quota-grid small,
.quota-report-grid small {
  color: rgba(247, 250, 239, 0.62);
  font-size: 0.68rem;
  font-weight: 850;
}

.dj-quota-kpis strong,
.dj-quota-grid strong,
.quota-report-grid strong {
  overflow: hidden;
  color: var(--neon);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dj-quota-kpis span,
.dj-quota-position-card p,
.quota-report-highlight p {
  color: rgba(247, 250, 239, 0.68);
  line-height: 1.35;
}

.quota-challenge-panel {
  margin-bottom: 14px;
}

.quota-ai-card {
  margin-bottom: 16px;
}

.external-section-row {
  align-items: center;
}

.external-section-row span {
  color: rgba(247, 250, 239, 0.68);
  font-weight: 850;
}

.external-asset-grid {
  margin-bottom: 16px;
}

.dj-quota-position-card,
.quota-report-highlight {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  color: #f7faef;
  background:
    radial-gradient(circle at 90% 10%, rgba(207, 255, 18, 0.22), transparent 30%),
    linear-gradient(148deg, #141b0e, #070907 62%);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

.dj-quota-position-card::after,
.quota-report-highlight::after {
  content: "";
  position: absolute;
  inset: auto -44px -72px auto;
  width: 170px;
  height: 170px;
  border: 30px solid rgba(207, 255, 18, 0.08);
  border-radius: 50%;
}

.dj-quota-card-head,
.quota-report-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.dj-quota-badge,
.quota-report-head > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  background: var(--neon);
}

.dj-quota-badge .icon-premium,
.quota-report-head .icon-premium {
  width: 34px;
  height: 34px;
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.dj-quota-card-head h3,
.quota-report-head h3 {
  color: #f7faef;
  font-size: 1.16rem;
}

.dj-quota-card-head small,
.quota-report-head small {
  color: var(--neon);
  font-weight: 950;
  text-transform: uppercase;
}

.dj-quota-total {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
}

.dj-quota-total small {
  color: rgba(247, 250, 239, 0.64);
  font-weight: 850;
}

.dj-quota-total strong {
  color: #ffffff;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 0.96;
}

.dj-quota-total span {
  color: var(--neon);
  font-weight: 900;
}

.dj-quota-progress {
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.dj-quota-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--neon);
}

.dj-quota-grid,
.quota-report-grid,
.dj-quota-actions,
.quota-report-actions {
  position: relative;
  z-index: 1;
}

.dj-quota-actions,
.quota-report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dj-quota-actions button,
.quota-report-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #081006;
  background: var(--neon);
  font-weight: 950;
}

.dj-quota-actions button:nth-child(2),
.quota-report-actions button:nth-child(2) {
  background: #f7faef;
}

.external-overview-card {
  margin-top: 14px;
}

.quota-contribution-summary .swap-panel.light {
  color: #081006;
  background: var(--neon);
}

.quota-contribution-summary .swap-panel.light small,
.quota-contribution-summary .swap-panel.light span {
  color: rgba(8, 16, 6, 0.72);
}

.quota-contribution-list {
  display: grid;
  gap: 10px;
}

.quota-contribution-list .compact-row {
  margin-top: 2px;
  color: #f7faef;
}

.quota-row {
  align-items: center;
  border-color: rgba(207, 255, 18, 0.24);
}

.quota-row .activity-icon {
  background: var(--neon);
}

.quota-row .activity-icon .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.external-contribution-title {
  margin-top: 10px;
}

.consulting-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  color: #f7faef;
  background:
    radial-gradient(circle at 90% 0%, rgba(207, 255, 18, 0.2), transparent 30%),
    linear-gradient(145deg, #14190e, #070907 70%);
  box-shadow: 0 22px 46px rgba(8, 11, 7, 0.28);
}

.consulting-card::after {
  content: "";
  position: absolute;
  inset: auto -42px -72px auto;
  width: 150px;
  height: 150px;
  border: 26px solid rgba(207, 255, 18, 0.08);
  border-radius: 50%;
}

.consulting-orb,
.consulting-copy,
.consulting-actions {
  position: relative;
  z-index: 1;
}

.consulting-orb {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 23px;
  background: var(--neon);
  box-shadow: 0 16px 26px rgba(207, 255, 18, 0.16);
}

.consulting-orb .icon-premium {
  width: 38px;
  height: 38px;
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.consulting-copy small {
  color: var(--neon);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.consulting-copy h3 {
  margin: 4px 0 6px;
  color: #f7faef;
  font-size: clamp(1.08rem, 3vw, 1.45rem);
  line-height: 1.08;
}

.consulting-copy p {
  margin: 0;
  color: rgba(247, 250, 239, 0.7);
  line-height: 1.38;
}

.consulting-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.consulting-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font-weight: 950;
}

.consulting-actions .primary {
  color: #080b07;
  background: var(--neon);
}

.consulting-actions .secondary {
  color: #080b07;
  background: #f7faef;
}

.quota-report-highlight {
  margin: 8px 0 14px;
}

.quota-report-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .dj-quota-kpis,
  .quota-report-grid {
    grid-template-columns: 1fr;
  }

  .dj-quota-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dj-quota-actions,
  .quota-report-actions,
  .consulting-actions {
    grid-template-columns: 1fr;
  }
}

/* External follow-up layout */
#portfolio.active .portfolio-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

#portfolio.active .external-followup-panel,
#portfolio.active .investment-list-panel {
  grid-column: 1 / -1;
}

.external-followup-panel {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f7faef;
  background:
    radial-gradient(circle at 90% 4%, rgba(207, 255, 18, 0.2), transparent 28%),
    linear-gradient(145deg, #14190e, #070907 68%);
  box-shadow: 0 22px 48px rgba(8, 11, 7, 0.28);
}

.external-followup-panel::after {
  content: "";
  position: absolute;
  inset: auto -52px -82px auto;
  width: 170px;
  height: 170px;
  border: 28px solid rgba(207, 255, 18, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.external-followup-card,
.external-followup-form {
  position: relative;
  z-index: 1;
}

.external-followup-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.external-followup-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 22px;
  background: var(--neon);
}

.external-followup-icon .icon-premium {
  width: 36px;
  height: 36px;
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.external-followup-copy {
  min-width: 0;
}

.external-followup-copy small {
  display: block;
  margin-bottom: 4px;
  color: var(--neon);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.external-followup-copy h3 {
  color: #f7faef;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

.external-followup-copy p {
  max-width: 700px;
  margin: 5px 0 0;
  color: rgba(247, 250, 239, 0.7);
  line-height: 1.4;
}

.external-followup-toggle {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #080b07;
  background: var(--neon);
  box-shadow: 0 16px 28px rgba(207, 255, 18, 0.2);
  font-weight: 950;
  white-space: nowrap;
}

.external-followup-form {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(8, 16, 6, 0.12);
  border-radius: 24px;
  background: #f4f6ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.external-followup-form[hidden] {
  display: none !important;
}

.external-followup-form.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.external-followup-form h3,
.external-followup-form button,
.external-followup-form input[name="origin"] {
  grid-column: 1 / -1;
}

.external-followup-form input,
.external-followup-form select {
  min-width: 0;
}

.external-followup-panel.form-open {
  border-color: rgba(207, 255, 18, 0.24);
}

@media (max-width: 720px) {
  .external-followup-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .external-followup-icon {
    width: 54px;
    height: 54px;
    border-radius: 19px;
  }

  .external-followup-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .external-followup-form.is-open {
    grid-template-columns: 1fr;
  }
}

/* Contribution calendar carousel */
.contribution-calendar-list {
  display: grid;
  gap: 12px;
}

.contribution-calendar-title {
  align-items: end;
  margin-top: 2px;
}

.contribution-calendar-title h3 {
  color: #f7faef;
}

.contribution-calendar-title span {
  color: rgba(247, 250, 239, 0.64);
  font-weight: 850;
}

.contribution-calendar-scroll {
  display: grid;
  grid-auto-columns: minmax(232px, 282px);
  grid-auto-flow: column;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.contribution-calendar-scroll::-webkit-scrollbar {
  display: none;
}

.contribution-calendar-scroll {
  scrollbar-width: none;
}

.contribution-calendar-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid rgba(8, 16, 6, 0.1);
  border-radius: 26px;
  color: #080b07;
  background: #f4f6ef;
  box-shadow: 0 18px 30px rgba(8, 11, 7, 0.16);
  scroll-snap-align: start;
}

.contribution-calendar-card.external-calendar-card {
  background: #eef4e7;
}

.calendar-date {
  display: grid;
  align-content: space-between;
  justify-items: center;
  min-height: 126px;
  padding: 10px 8px;
  border-radius: 22px;
  color: #080b07;
  background: var(--neon);
}

.calendar-date span {
  color: #080b07;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: .06em;
}

.calendar-date strong {
  color: #080b07;
  font-size: 2rem;
  line-height: 1;
}

.calendar-date i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(8, 16, 6, 0.1);
  font-style: normal;
}

.calendar-date .icon-premium {
  width: 23px;
  height: 23px;
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.calendar-copy {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.calendar-copy small {
  color: #486044;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.calendar-copy strong {
  overflow: hidden;
  color: #080b07;
  font-size: 1.12rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-copy p,
.calendar-copy em {
  margin: 0;
  color: #334233;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.3;
}

.calendar-copy p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1025px) {
  .contribution-calendar-scroll {
    grid-auto-columns: minmax(260px, 300px);
  }

  #dashboard.active .consulting-card {
    grid-column: 1 / -1;
    grid-template-columns: 72px minmax(0, 1fr) minmax(320px, 0.45fr);
    align-items: center;
  }

  .consulting-actions {
    grid-column: auto;
  }
}

/* Reports contrast pass */
.report-panel .performance-stack,
.report-panel .statement-card-v2,
.report-panel .statement-ledger,
.report-panel .statement-note-card,
.report-panel .history-stack {
  color: #080b07;
  background: #f4f6ef;
}

.report-panel .performance-row,
.report-panel .history-row,
.report-panel .statement-card-grid div,
.report-panel .statement-ledger div,
.report-panel .report-item:not(.dark-kpi):not(.neon-kpi) {
  color: #080b07;
  background: #ffffff;
}

.report-panel .performance-stack :where(h3, h4, strong),
.report-panel .performance-row :where(strong, em),
.report-panel .statement-card-v2 :where(h3, h4, strong),
.report-panel .statement-ledger :where(strong, span),
.report-panel .statement-note-card :where(h3, h4, strong),
.report-panel .history-stack :where(h3, h4, strong, em),
.report-panel .report-item:not(.dark-kpi):not(.neon-kpi) :where(h3, h4, strong) {
  color: #080b07;
}

.report-panel .performance-row :where(small, p, span:not(.icon-premium):not(.asset-logo)),
.report-panel .statement-card-v2 :where(small, p, span:not(.icon-premium)),
.report-panel .statement-ledger :where(small, p, em),
.report-panel .statement-note-card :where(small, p, em, span:not(.icon-premium)),
.report-panel .history-stack :where(small, p, span:not(.icon-premium)),
.report-panel .report-item:not(.dark-kpi):not(.neon-kpi) :where(small, p, span:not(.icon-premium), em) {
  color: #334233;
}

.report-panel .performance-row .asset-logo {
  color: #080b07;
  background: var(--neon);
  border: 1.5px solid #080b07;
  box-shadow: 0 8px 18px rgba(8, 11, 7, 0.18);
}

.report-panel .performance-row .asset-logo .icon-premium,
.report-panel .history-row > span .icon-premium,
.report-panel .statement-card-head > span .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.report-panel .history-row > span,
.report-panel .statement-card-head > span {
  color: #080b07;
  background: var(--neon);
  border: 1.5px solid #080b07;
}

.report-panel .neon-kpi,
.report-panel .neon-kpi :where(strong, small, p, span:not(.icon-premium)) {
  color: #080b07;
}

.report-panel .dark-kpi,
.report-panel .dark-kpi :where(strong, small, p, span:not(.icon-premium)) {
  color: #f7faef;
}

/* Close icon pass */
.modal-close {
  display: grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  color: #080b07;
  background: rgba(8, 16, 6, 0.07);
  border: 1px solid rgba(8, 16, 6, 0.1);
  border-radius: 999px;
  font-size: 0;
  line-height: 0;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.modal-close span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.modal-close .icon-close-circle {
  width: 25px;
  height: 25px;
  color: #080b07;
}

.modal-close:hover {
  background: rgba(207, 255, 18, 0.34);
  box-shadow: 0 10px 20px rgba(8, 11, 7, 0.12);
}

.modal-close:active {
  transform: scale(.94);
}

/* Profile next-level text pass */
.profile-xp-card {
  grid-template-columns: 58px minmax(104px, .85fr) minmax(150px, 1.25fr);
}

.profile-xp-card > div {
  min-width: 0;
}

.profile-xp-card > div small,
.profile-xp-card > div strong {
  display: block;
  line-height: 1.18;
  word-break: normal;
  overflow-wrap: normal;
}

.profile-xp-card > div:last-child strong {
  white-space: normal;
}

@media (max-width: 420px) {
  .profile-xp-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .profile-xp-card > div:last-child {
    grid-column: 2;
  }
}

/* Platform background: match the soft green onboarding tag */
body:has(.app-view:not(.hidden)) {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.6), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(223, 241, 230, 0.78), transparent 30%),
    linear-gradient(135deg, #f3fbf6 0%, #e8f7ee 48%, #dff1e6 100%);
}

.app-view {
  background:
    linear-gradient(180deg, #f3fbf6 0%, #e8f7ee 45%, #dff1e6 100%);
}

.app-view .content {
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 255, 255, 0.54), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(216, 239, 224, 0.72), transparent 28%),
    linear-gradient(180deg, #f3fbf6 0%, #e8f7ee 42%, #dff1e6 100%);
}

/* Dashboard primary card: premium cutout inspired by mobile finance cards */
.quota-hero-card {
  padding: 24px 20px 20px;
  border-radius: 34px;
  clip-path: polygon(0 0, calc(100% - 168px) 0, calc(100% - 130px) 58px, 100% 58px, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 82% 13%, rgba(207, 255, 18, 0.28), transparent 24%),
    radial-gradient(circle at 58% 24%, rgba(207, 255, 18, 0.12), transparent 22%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 13px),
    linear-gradient(156deg, #171f13 0%, #080b07 55%, #10140d 100%);
}

.quota-hero-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -18px;
  right: 104px;
  width: 58px;
  height: 78px;
  border-radius: 0 0 32px 0;
  background: #e8f7ee;
  box-shadow: 17px 25px 0 #e8f7ee;
}

.quota-hero-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -22px -20px auto auto;
  width: 146px;
  height: 80px;
  border: 0;
  border-radius: 0 0 0 34px;
  background: #e8f7ee;
  opacity: 1;
  box-shadow: -18px 22px 0 #e8f7ee;
}

.quota-hero-card > * {
  position: relative;
  z-index: 3;
}

.quota-hero-card .portfolio-hero-top {
  padding-right: 142px;
}

.quota-cutout-info {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 12px;
  display: grid;
  width: 118px;
  min-height: 44px;
  align-content: center;
  justify-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(8, 11, 7, 0.14);
  border-radius: 18px;
  color: #080b07;
  background: linear-gradient(135deg, #dfff6c, #cfff12);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
}

.quota-cutout-info small,
.quota-cutout-info strong {
  display: block;
  color: #080b07;
  line-height: 1.05;
  text-align: center;
}

.quota-cutout-info small {
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quota-cutout-info strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .quota-hero-card {
    clip-path: polygon(0 0, calc(100% - 142px) 0, calc(100% - 104px) 52px, 100% 52px, 100% 100%, 0 100%);
  }

  .quota-hero-card::before {
    right: 82px;
    width: 48px;
    height: 70px;
  }

  .quota-hero-card::after {
    width: 120px;
    height: 72px;
  }

  .quota-cutout-info {
    right: 9px;
    width: 98px;
    min-height: 38px;
    border-radius: 16px;
  }

  .quota-cutout-info strong {
    font-size: 0.72rem;
  }

  .quota-hero-card .portfolio-hero-top {
    padding-right: 118px;
  }
}

/* Quota card uniform pass: remove visible rear cutout */
.quota-hero-card {
  clip-path: none;
  overflow: hidden;
  padding-top: 22px;
  border-radius: 34px;
}

.quota-hero-card::before,
.quota-hero-card::after {
  display: none;
}

.quota-cutout-info {
  top: 14px;
  right: 14px;
  width: 112px;
  min-height: 40px;
  border-color: rgba(207, 255, 18, 0.22);
  color: #f7faef;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 11, 7, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 14px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.quota-cutout-info small {
  color: rgba(247, 250, 239, 0.64);
}

.quota-cutout-info strong {
  color: #f7faef;
}

.quota-hero-card .portfolio-hero-top {
  padding-right: 130px;
}

@media (max-width: 420px) {
  .quota-hero-card {
    clip-path: none;
  }

  .quota-cutout-info {
    top: 12px;
    right: 12px;
    width: 94px;
    min-height: 36px;
  }

  .quota-hero-card .portfolio-hero-top {
    padding-right: 106px;
  }
}

/* Reports green KPI contrast pass */
.report-panel .analytics-score,
.report-panel .analytics-score :where(small, strong, p, span:not(.icon-premium)) {
  color: #080b07;
}

.report-panel .analytics-score .dot-matrix i {
  background: rgba(8, 11, 7, 0.18);
}

.report-panel .analytics-score .dot-matrix i.on {
  background: rgba(8, 11, 7, 0.82);
}

/* Reports KPI spacing pass */
.report-panel .analytics-summary-v2 .report-item {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 112px;
}

.report-panel .analytics-summary-v2 .report-item small,
.report-panel .analytics-summary-v2 .report-item strong,
.report-panel .analytics-summary-v2 .report-item p {
  display: block;
  margin: 0;
}

.report-panel .analytics-summary-v2 .report-item small {
  line-height: 1.15;
}

.report-panel .analytics-summary-v2 .report-item strong {
  line-height: 1.08;
}

.report-panel .analytics-summary-v2 .report-item p {
  line-height: 1.2;
}

/* DJ quota KPI one-row pass */
.dj-quota-grid,
.quota-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.dj-quota-grid::-webkit-scrollbar,
.quota-report-grid::-webkit-scrollbar {
  display: none;
}

.dj-quota-grid,
.quota-report-grid {
  scrollbar-width: none;
}

.dj-quota-grid span,
.quota-report-grid span {
  scroll-snap-align: start;
}

@media (max-width: 720px) {
  .dj-quota-grid,
  .quota-report-grid {
    grid-template-columns: repeat(4, minmax(138px, 1fr));
  }
}

/* Reports real evolution chart pass */
.real-evolution-bars {
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  align-items: stretch;
  padding-top: 6px;
}

.real-evolution-bar {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  min-width: 0;
  height: 100%;
}

.real-evolution-bar i {
  align-self: end;
  min-height: 0;
  width: 100%;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--neon), rgba(207, 255, 18, 0.42));
  box-shadow: 0 0 18px rgba(207, 255, 18, 0.16);
}

.real-evolution-bar i.zero {
  height: 0 !important;
  min-height: 0;
  border-top: 1px solid rgba(247, 250, 239, 0.28);
  background: transparent;
  box-shadow: none;
}

.real-evolution-bar small {
  overflow: hidden;
  color: rgba(247, 250, 239, 0.62);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.real-evolution-bars.empty {
  grid-template-columns: 1fr;
  place-items: center;
  gap: 10px;
  color: rgba(247, 250, 239, 0.68);
}

.real-evolution-bars.empty .evolution-empty-line {
  width: min(240px, 82%);
  height: 2px;
  border-radius: 999px;
  background: rgba(247, 250, 239, 0.24);
}

.real-evolution-bars.empty em {
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

/* Admin environment */
.admin-panel {
  display: grid;
  gap: 14px;
}

.admin-screen {
  display: grid;
  gap: 14px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-kpi-grid article,
.admin-users-panel,
.admin-detail-panel,
.admin-record-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  color: #f7faef;
  background:
    radial-gradient(circle at 90% 12%, rgba(207, 255, 18, 0.12), transparent 28%),
    linear-gradient(145deg, #151b11, #070907);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.25);
}

.admin-kpi-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
}

.admin-kpi-grid small,
.admin-kpi-grid p,
.admin-detail-head small,
.admin-detail-head p,
.admin-record-card small,
.admin-record-card p,
.admin-user-card small {
  margin: 0;
  color: rgba(247, 250, 239, 0.68);
}

.admin-kpi-grid strong,
.admin-detail-head strong,
.admin-record-card strong,
.admin-user-card strong {
  color: #f7faef;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.5fr);
  gap: 12px;
}

.admin-users-panel,
.admin-detail-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.admin-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-search-row input,
.admin-search-row button {
  min-height: 42px;
  border-radius: 16px;
}

.admin-search-row button,
.admin-tabs button.active,
.admin-record-actions button {
  border: 0;
  color: #080b07;
  background: var(--neon);
  font-weight: 900;
}

.admin-user-list,
.admin-stack,
.admin-info-grid {
  display: grid;
  gap: 10px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 10px;
  color: #f7faef;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.admin-user-card.active {
  border-color: rgba(207, 255, 18, 0.65);
  background: rgba(207, 255, 18, 0.12);
}

.admin-user-card > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  color: #080b07;
  background: var(--neon);
  font-weight: 950;
}

.admin-user-card em {
  color: var(--neon);
  font-style: normal;
  font-weight: 900;
}

.admin-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-detail-head h3 {
  margin: 2px 0;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tabs button {
  min-height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(247, 250, 239, 0.78);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 850;
}

.admin-action-row {
  display: flex;
  justify-content: flex-end;
}

.admin-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-info-grid span {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 18px;
  color: #080b07;
  background: #f7faef;
}

.admin-info-grid small {
  color: #41513b;
}

.admin-info-grid strong {
  color: #080b07;
}

.admin-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(110px, 0.7fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.admin-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.admin-record-actions button {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
}

.admin-record-actions .danger {
  color: #fff7f7;
  background: #c93d4d;
}

.admin-empty {
  padding: 14px;
  border-radius: 20px;
  color: #080b07;
  background: #f7faef;
}

.admin-menu-row {
  border-color: rgba(207, 255, 18, 0.42);
}

@media (max-width: 900px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .admin-kpi-grid,
  .admin-info-grid {
    grid-template-columns: 1fr;
  }

  .admin-record-card {
    grid-template-columns: 1fr;
  }

  .admin-record-actions,
  .admin-action-row {
    justify-content: stretch;
  }

  .admin-record-actions button,
  .admin-action-row button {
    width: 100%;
  }
}

/* iOS/mobile viewport pass: keep the app inside the visible area and the nav always reachable. */
html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  overflow-x: hidden;
}

@supports (height: 100dvh) {
  .app-view {
    height: min(920px, calc(100dvh - 36px));
  }

  .onboarding-shell {
    height: min(860px, calc(100dvh - 36px));
    min-height: min(680px, calc(100dvh - 36px));
  }
}

@media (max-width: 640px) {
  html,
  body,
  .shell {
    width: 100%;
    max-width: 100%;
    min-height: 100svh;
    min-height: 100dvh;
  }

  body:has(.app-view:not(.hidden)) {
    display: block !important;
    width: 100%;
    height: 100svh;
    height: 100dvh;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
  }

  .app-view {
    position: fixed;
    inset: 0;
    width: 100vw !important;
    max-width: 100vw;
    height: 100svh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .app-view .phone-status {
    position: fixed;
    inset: 0 0 auto;
    height: calc(46px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px));
    z-index: 90;
  }

  .app-view .content {
    height: 100%;
    max-height: none;
    min-height: 0;
    width: 100%;
    max-width: 100vw;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-top: calc(58px + env(safe-area-inset-top, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(154px + env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
  }

  .bottom-nav {
    position: fixed !important;
    right: auto !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    z-index: 95 !important;
    width: calc(100vw - 24px) !important;
    max-width: 560px;
    padding: 7px 8px;
    box-sizing: border-box;
    transform: translateX(-50%) !important;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }

  .nav-link {
    min-width: 0;
    min-height: 54px;
    padding: 3px 0 1px;
    overflow: hidden;
    font-size: clamp(0.56rem, 2.35vw, 0.64rem);
    line-height: 1.06;
  }

  .nav-link .nav-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 3px;
  }

  .nav-icon svg {
    width: 28px;
    height: 28px;
  }

  .nav-main .nav-icon,
  .nav-link.nav-main.active .nav-icon {
    width: 56px;
    height: 56px;
    margin-top: -23px;
    margin-bottom: 1px;
  }

  .section,
  .section.active,
  .panel,
  .form-panel,
  .table-panel,
  .portfolio-hero-card,
  .quota-hero-card,
  .external-followup-panel,
  .investment-list-panel,
  .contribution-history-panel,
  .report-panel,
  .ai-panel,
  .admin-panel {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .split-grid,
  .portfolio-layout,
  .report-grid,
  .analytics-hero,
  .asset-card-grid,
  .investment-card-grid,
  .admin-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 100%;
  }

  .table-wrap,
  .statement-ledger,
  .performance-stack,
  .history-stack {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-view input,
  .app-view select,
  .app-view textarea,
  .app-view button {
    max-width: 100%;
  }

  .dj-quota-grid,
  .quota-report-grid,
  .contribution-calendar-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

@supports not (height: 100dvh) {
  @media (max-width: 640px) {
    body:has(.app-view:not(.hidden)),
    .app-view {
      height: -webkit-fill-available !important;
    }
  }
}

/* Mobile menu and achievements polish */
.bottom-nav,
.bottom-nav .nav,
.bottom-nav .nav-main {
  overflow: visible;
}

.bottom-nav .nav-main {
  isolation: isolate;
}

.bottom-nav .nav-link.nav-main {
  overflow: visible;
}

.bottom-nav .nav-main .nav-icon,
.bottom-nav .nav-link.nav-main.active .nav-icon {
  width: 66px;
  height: 66px;
  margin-top: -34px;
  margin-bottom: 0;
  border: 5px solid rgba(247, 248, 243, 0.96);
  transform: translateY(-2px);
}

.level-track {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 1.4vw, 8px);
}

.level-node {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #25311f;
  font-size: clamp(0.55rem, 1.9vw, 0.68rem);
  font-weight: 850;
  line-height: 1.08;
}

.level-node span {
  width: clamp(38px, 10.8vw, 46px);
  height: clamp(38px, 10.8vw, 46px);
  max-width: 46px;
  max-height: 46px;
  overflow: hidden;
}

.level-node span .icon-premium {
  width: clamp(23px, 6.8vw, 28px);
  height: clamp(23px, 6.8vw, 28px);
}

.home-achievements .level-node.reached span,
.profile-achievements-v2 .level-node.reached span {
  background: var(--neon, #cfff12);
  box-shadow:
    inset 0 0 0 2px #080b07,
    0 8px 18px rgba(207, 255, 18, 0.2);
}

.home-achievements .level-node.reached span .icon-premium,
.profile-achievements-v2 .level-node.reached span .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

.invite-share-sheet {
  display: grid;
  gap: 10px;
}

.invite-share-sheet strong {
  padding: 12px;
  border-radius: 16px;
  color: #080b07;
  background: #e8f7ee;
  overflow-wrap: anywhere;
}

.invite-share-sheet small {
  color: #41513b;
  font-weight: 850;
}

@media (max-width: 640px) {
  .bottom-nav {
    padding-top: 12px;
  }

  .bottom-nav .nav-link {
    min-height: 60px;
    padding-top: 4px;
    font-size: clamp(0.58rem, 2.45vw, 0.66rem);
    white-space: normal;
  }

  .bottom-nav .nav-link:not(.nav-main) .nav-icon {
    width: 28px;
    height: 28px;
  }

  .bottom-nav .nav-main .nav-icon,
  .bottom-nav .nav-link.nav-main.active .nav-icon {
    width: 64px;
    height: 64px;
    margin-top: -34px;
  }

  .level-card {
    padding: 16px 12px;
  }

  .level-track {
    gap: 4px;
    margin-top: 14px;
  }

  .home-achievements .level-node,
  .profile-achievements-v2 .level-node {
    font-size: clamp(0.5rem, 2.15vw, 0.58rem);
  }
}

/* Bottom nav spacing pass: separate labels from icons and keep the center action balanced. */
.bottom-nav .nav {
  align-items: end;
}

.bottom-nav .nav-link {
  display: grid;
  grid-template-rows: 30px auto;
  align-content: center;
  justify-items: center;
  row-gap: 6px;
  min-height: 64px;
  padding: 7px 2px 5px;
  line-height: 1.08;
}

.bottom-nav .nav-link .nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  margin: 0 auto;
  place-items: center;
  align-self: center;
}

.bottom-nav .nav-link:not(.nav-main) .nav-icon svg {
  width: 29px;
  height: 29px;
}

.bottom-nav .nav-link.nav-main {
  grid-template-rows: 36px auto;
  row-gap: 10px;
  padding-top: 2px;
  overflow: visible;
}

.bottom-nav .nav-main .nav-icon,
.bottom-nav .nav-link.nav-main.active .nav-icon {
  align-self: start;
  width: 66px;
  height: 66px;
  margin: -35px auto 0;
  transform: none;
}

.bottom-nav .nav-main .nav-icon svg,
.bottom-nav .nav-link.nav-main.active .nav-icon svg {
  width: 36px;
  height: 36px;
}

@media (max-width: 640px) {
  .bottom-nav .nav-link {
    grid-template-rows: 29px auto;
    min-height: 65px;
    padding: 7px 1px 5px;
    row-gap: 6px;
  }

  .bottom-nav .nav-link .nav-icon,
  .bottom-nav .nav-link:not(.nav-main) .nav-icon {
    width: 29px;
    height: 29px;
    margin: 0 auto;
  }

  .bottom-nav .nav-link:not(.nav-main) .nav-icon svg {
    width: 28px;
    height: 28px;
  }

  .bottom-nav .nav-link.nav-main {
    grid-template-rows: 35px auto;
    row-gap: 11px;
  }

  .bottom-nav .nav-main .nav-icon,
  .bottom-nav .nav-link.nav-main.active .nav-icon {
    width: 64px;
    height: 64px;
    margin: -36px auto 0;
  }
}

/* iOS bottom nav final pass: keep the center action elevated without covering labels. */
.bottom-nav {
  overflow: visible !important;
}

.bottom-nav .nav {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: end !important;
  justify-items: stretch !important;
  gap: 2px !important;
  overflow: visible !important;
}

.bottom-nav .nav-link {
  display: grid !important;
  grid-template-rows: 32px 16px !important;
  align-content: end !important;
  align-items: center !important;
  justify-items: center !important;
  row-gap: 7px !important;
  min-width: 0 !important;
  min-height: 66px !important;
  padding: 7px 1px 5px !important;
  overflow: visible !important;
  color: #11190f;
  font-size: clamp(0.6rem, 2.35vw, 0.72rem) !important;
  font-weight: 900;
  line-height: 1 !important;
  letter-spacing: 0;
  white-space: nowrap !important;
}

.bottom-nav .nav-link[data-section="portfolio"] {
  font-size: clamp(0.54rem, 2.12vw, 0.68rem) !important;
}

.bottom-nav .nav-link .nav-icon,
.bottom-nav .nav-link:not(.nav-main) .nav-icon {
  display: grid !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 auto !important;
  place-items: center !important;
  align-self: center !important;
}

.bottom-nav .nav-link:not(.nav-main) .nav-icon svg {
  width: 29px !important;
  height: 29px !important;
}

.bottom-nav .nav-link.nav-main {
  grid-template-rows: 44px 16px !important;
  align-content: end !important;
  row-gap: 8px !important;
  min-height: 74px !important;
  padding: 0 1px 5px !important;
  overflow: visible !important;
}

.bottom-nav .nav-main .nav-icon,
.bottom-nav .nav-link.nav-main.active .nav-icon {
  align-self: start !important;
  width: 58px !important;
  height: 58px !important;
  margin: -27px auto 0 !important;
  border: 5px solid rgba(247, 248, 243, 0.98) !important;
  transform: none !important;
  z-index: 2;
}

.bottom-nav .nav-main .nav-icon svg,
.bottom-nav .nav-link.nav-main.active .nav-icon svg {
  width: 32px !important;
  height: 32px !important;
}

@media (max-width: 640px) {
  .app-view .content {
    padding-bottom: calc(172px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .bottom-nav {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(560px, calc(100vw - 20px)) !important;
    min-height: 82px;
    padding: 11px 8px max(10px, env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box;
  }

  .bottom-nav .nav-link {
    grid-template-rows: 31px 15px !important;
    row-gap: 7px !important;
    min-height: 64px !important;
    padding: 7px 0 5px !important;
    font-size: clamp(0.58rem, 2.35vw, 0.66rem) !important;
  }

  .bottom-nav .nav-link[data-section="portfolio"] {
    font-size: clamp(0.5rem, 2.02vw, 0.6rem) !important;
  }

  .bottom-nav .nav-link.nav-main {
    grid-template-rows: 42px 15px !important;
    row-gap: 8px !important;
    min-height: 72px !important;
    padding-bottom: 5px !important;
  }

  .bottom-nav .nav-main .nav-icon,
  .bottom-nav .nav-link.nav-main.active .nav-icon {
    width: 56px !important;
    height: 56px !important;
    margin-top: -25px !important;
  }

  .bottom-nav .nav-main .nav-icon svg,
  .bottom-nav .nav-link.nav-main.active .nav-icon svg {
    width: 31px !important;
    height: 31px !important;
  }
}

/* Mobile overflow and neon consistency pass. */
:root {
  --neon: #cfff12;
}

.app-view :where(
  .primary,
  button.primary,
  .external-followup-toggle,
  .admin-search-row button,
  .admin-tabs button.active,
  .challenge-tabs button.active,
  .consulting-actions .primary,
  .portfolio-hero-actions button:first-child
) {
  border-color: transparent !important;
  color: #080b07 !important;
  background: var(--neon, #cfff12) !important;
  box-shadow: 0 16px 30px rgba(207, 255, 18, 0.22) !important;
}

.app-view :where(
  .primary,
  button.primary,
  .external-followup-toggle,
  .admin-search-row button,
  .admin-tabs button.active,
  .challenge-tabs button.active,
  .consulting-actions .primary,
  .portfolio-hero-actions button:first-child
) .icon-premium {
  --icon-navy: #080b07;
  --icon-green: #080b07;
}

@media (max-width: 640px) {
  .app-view,
  .app-view .content,
  .app-view .section,
  .app-view :where(
    .panel,
    .mobile-card,
    .portfolio-hero-card,
    .quota-hero-card,
    .external-followup-panel,
    .investment-list-panel,
    .contribution-history-panel,
    .report-panel,
    .ai-panel,
    .admin-panel,
    .admin-users-panel,
    .admin-detail-panel,
    .profile-card-v2,
    .statement-card-v2,
    .asset-card,
    .investment-card-v2
  ) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .app-view .content {
    overflow-x: hidden !important;
    padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
    padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .app-view :where(
    h1,
    h2,
    h3,
    h4,
    p,
    small,
    strong,
    em,
    label,
    a,
    button,
    input,
    select,
    textarea
  ) {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .app-view :where(input, select, textarea) {
    width: 100%;
    box-sizing: border-box;
  }

  .portfolio-hero-card,
  .quota-hero-card,
  .external-followup-panel,
  .admin-panel,
  .profile-card-v2 {
    overflow: hidden;
  }

  .quota-hero-card {
    padding-right: clamp(14px, 4vw, 20px) !important;
    padding-left: clamp(14px, 4vw, 20px) !important;
  }

  .portfolio-hero-top {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px;
  }

  .portfolio-hero-top h3 {
    font-size: clamp(2rem, 10vw, 3rem) !important;
    line-height: 0.94;
  }

  .portfolio-hero-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100%;
  }

  .portfolio-hero-actions button {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    justify-content: center;
    padding: 10px 14px;
    white-space: normal;
    line-height: 1.08;
  }

  .quota-hero-meta,
  .dj-quota-grid,
  .quota-report-grid {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 42vw);
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .quota-hero-meta::-webkit-scrollbar,
  .dj-quota-grid::-webkit-scrollbar,
  .quota-report-grid::-webkit-scrollbar {
    display: none;
  }

  .quota-hero-meta > *,
  .dj-quota-grid > *,
  .quota-report-grid > * {
    min-width: 0;
    scroll-snap-align: start;
  }

  .quota-hero-meta small,
  .dj-quota-grid small,
  .quota-report-grid small {
    white-space: normal;
  }

  .floating-action-strip {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(86px, 24vw);
    justify-content: start;
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .floating-action-strip::-webkit-scrollbar {
    display: none;
  }

  .floating-action-strip button {
    min-width: 0;
    width: 100%;
    scroll-snap-align: start;
  }

  .floating-action-strip button strong {
    display: block;
    font-size: clamp(0.72rem, 3vw, 0.86rem);
    line-height: 1.02;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .admin-layout,
  .admin-info-grid,
  .admin-record-card,
  .investment-product-admin-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .admin-search-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px;
  }

  .admin-search-row input {
    min-width: 0;
    font-size: clamp(0.8rem, 3.6vw, 0.95rem);
  }

  .admin-search-row button {
    min-width: 84px;
    padding: 0 14px;
    white-space: nowrap;
  }

  .admin-user-card {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    grid-template-areas:
      "avatar copy"
      "avatar value";
    align-items: center;
    gap: 8px 10px;
    overflow: hidden;
  }

  .admin-user-card > span {
    grid-area: avatar;
  }

  .admin-user-card > div {
    grid-area: copy;
    min-width: 0;
  }

  .admin-user-card strong,
  .admin-user-card small {
    display: block;
    max-width: 100%;
    line-height: 1.05;
  }

  .admin-user-card small,
  .admin-detail-head p,
  .admin-info-grid strong {
    overflow-wrap: anywhere;
  }

  .admin-user-card em {
    grid-area: value;
    justify-self: start;
    max-width: 100%;
    font-size: clamp(1rem, 5vw, 1.35rem);
    line-height: 1;
  }

  .admin-detail-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .admin-detail-head > * {
    min-width: 0;
  }

  .admin-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .admin-record-card > *,
  .investment-product-admin-card > *,
  .admin-info-grid > *,
  .profile-data-list > *,
  .settings-row > div,
  .quick-menu-row > div {
    min-width: 0;
    max-width: 100%;
  }

  .admin-record-actions,
  .admin-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .admin-action-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-record-actions button,
  .admin-action-row button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .statement-form-grid,
  .profile-form,
  .external-followup-form.is-open {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .profile-data-list strong,
  .profile-data-list p,
  .settings-row strong,
  .settings-row p,
  .quick-menu-row strong,
  .quick-menu-row p {
    overflow-wrap: anywhere;
  }

  .bottom-nav {
    width: min(560px, calc(100vw - 18px)) !important;
    min-height: 88px;
    padding: 12px 7px max(11px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .bottom-nav .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 1px !important;
  }

  .bottom-nav .nav-link {
    position: relative;
    z-index: 1;
    grid-template-rows: 31px 24px !important;
    min-height: 70px !important;
    padding: 6px 0 4px !important;
    overflow: visible !important;
    font-size: clamp(0.58rem, 2.28vw, 0.66rem) !important;
  }

  .bottom-nav .nav-label {
    display: block;
    width: 100%;
    max-width: 64px;
    margin: 0 auto;
    color: #11190f;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
  }

  .bottom-nav .nav-link[data-section="portfolio"] .nav-label {
    max-width: 58px;
    font-size: clamp(0.49rem, 1.98vw, 0.58rem);
    line-height: 0.92;
    white-space: normal;
  }

  .bottom-nav .nav-link.active:not(.nav-main) {
    background: transparent !important;
    box-shadow: none !important;
  }

  .bottom-nav .nav-link.active:not(.nav-main)::before,
  .bottom-nav .nav-link.active:not(.nav-main)::after {
    display: none !important;
  }

  .bottom-nav .nav-link.active:not(.nav-main) .nav-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 16px;
    background: rgba(207, 255, 18, 0.55);
    box-shadow: 0 8px 18px rgba(8, 11, 7, 0.1);
  }

  .bottom-nav .nav-link.nav-main {
    z-index: 3;
    grid-template-rows: 43px 20px !important;
    min-height: 74px !important;
    row-gap: 7px !important;
  }

  .bottom-nav .nav-main .nav-icon,
  .bottom-nav .nav-link.nav-main.active .nav-icon {
    width: 56px !important;
    height: 56px !important;
    margin-top: -25px !important;
  }
}

/* Dashboard currency split: BRL and USD stay visually separated in the main balance card. */
.portfolio-hero-controls {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.dashboard-currency-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  width: max-content;
  max-width: 152px;
  padding: 4px;
  border: 1px solid rgba(207, 255, 18, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-currency-toggle button {
  min-height: 30px;
  min-width: 58px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: rgba(247, 250, 239, 0.72);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-currency-toggle button.active {
  color: #080b07;
  background: var(--neon, #cfff12);
  box-shadow: 0 10px 20px rgba(207, 255, 18, 0.18);
}

.quota-hero-card .portfolio-hero-top {
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 640px) {
  .quota-hero-card .portfolio-hero-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-right: min(29vw, 106px) !important;
  }

  .portfolio-hero-controls {
    justify-items: start;
  }

  .dashboard-currency-toggle {
    max-width: 132px;
  }

  .dashboard-currency-toggle button {
    min-width: 50px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.66rem;
  }

  .quota-cutout-info {
    width: min(28vw, 104px);
  }
}

/* PIX validation flow: pending requests stay visible but do not count as balance. */
.pix-payment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(8, 11, 7, 0.14);
  border-radius: 22px;
  color: #080b07;
  background: linear-gradient(135deg, var(--neon, #cfff12), #e6ff72);
  box-shadow: 0 18px 38px rgba(207, 255, 18, 0.18);
}

.pix-payment-card small,
.pix-payment-card span {
  display: block;
  color: rgba(8, 11, 7, 0.72);
  font-weight: 850;
  line-height: 1.25;
}

.pix-payment-card strong {
  display: block;
  margin: 3px 0;
  color: #080b07;
  font-size: clamp(1rem, 4vw, 1.32rem);
  font-weight: 1000;
  letter-spacing: 0.04em;
}

.pix-payment-card button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #f8fff2;
  background: #080b07;
  font-weight: 950;
  white-space: nowrap;
}

.receipt-upload-field {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  color: #080b07;
  background: rgba(248, 255, 242, 0.94);
  border: 1px solid rgba(8, 11, 7, 0.12);
}

.receipt-upload-field span {
  color: rgba(8, 11, 7, 0.72);
  font-size: 0.78rem;
  font-weight: 950;
}

.receipt-upload-field input {
  width: 100%;
  color: #080b07;
  font-weight: 850;
}

.pending-contribution-pill {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(207, 255, 18, 0.26);
  border-radius: 999px;
  color: #080b07;
  background: var(--neon, #cfff12);
}

.pending-contribution-pill span,
.pending-contribution-pill strong {
  color: #080b07;
  font-weight: 1000;
  line-height: 1.1;
}

.pending-contribution-pill span {
  font-size: 0.76rem;
}

.contribution-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-left: 6px;
  padding: 3px 8px;
  border: 1px solid rgba(8, 11, 7, 0.16);
  border-radius: 999px;
  color: #080b07;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.62rem;
  font-weight: 1000;
  line-height: 1;
  vertical-align: middle;
}

.contribution-status.pending {
  background: var(--neon, #cfff12);
}

.contribution-status.approved {
  color: #f8fff2;
  background: #0c8f46;
}

.contribution-status.rejected {
  color: #fff5f5;
  background: #a42a2a;
}

.calendar-copy small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

@media (max-width: 640px) {
  .pix-payment-card {
    grid-template-columns: 1fr;
  }

  .pix-payment-card button {
    width: 100%;
  }

  .pending-contribution-pill {
    align-items: flex-start;
    border-radius: 20px;
    flex-direction: column;
  }
}

/* Reports: BRL and USD are shown separately to avoid mixing international quotas with local values. */
.report-currency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.report-currency-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(207, 255, 18, 0.18);
  border-radius: 28px;
  color: #f8fff2;
  background: linear-gradient(145deg, #080b07, #10150d);
  box-shadow: 0 22px 44px rgba(8, 11, 7, 0.26);
}

.report-currency-card.usd {
  border-color: rgba(255, 255, 255, 0.18);
}

.report-currency-card small,
.report-currency-card p,
.report-currency-card em {
  color: rgba(248, 255, 242, 0.68);
  font-weight: 850;
}

.report-currency-card strong {
  color: var(--neon, #cfff12);
  font-size: clamp(1.55rem, 5vw, 2.4rem);
  font-weight: 1000;
  line-height: 1;
  overflow-wrap: anywhere;
}

.report-currency-card em {
  width: max-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  color: #080b07;
  background: var(--neon, #cfff12);
  font-style: normal;
  line-height: 1;
}

.report-currency-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.report-currency-metrics span {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.report-currency-metrics b {
  display: block;
  color: #f8fff2;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.report-reference-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.currency-evolution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.currency-evolution-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 156px;
  padding: 14px;
  border-radius: 22px;
  color: #f8fff2;
  background: rgba(8, 11, 7, 0.72);
  border: 1px solid rgba(207, 255, 18, 0.14);
}

.currency-evolution-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.currency-evolution-card span {
  color: var(--neon, #cfff12);
  font-weight: 1000;
  overflow-wrap: anywhere;
}

.currency-mini-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  align-items: end;
  min-height: 90px;
}

.currency-mini-bars span {
  display: grid;
  align-items: end;
  gap: 6px;
  height: 100%;
  color: rgba(248, 255, 242, 0.68);
}

.currency-mini-bars i {
  display: block;
  min-height: 0;
  border-radius: 999px 999px 4px 4px;
  background: var(--neon, #cfff12);
}

.currency-mini-bars small {
  color: rgba(248, 255, 242, 0.62);
  font-size: 0.62rem;
  font-weight: 850;
  text-align: center;
}

.currency-evolution-card.empty .evolution-empty-line {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 28px;
  background: rgba(207, 255, 18, 0.3);
}

.currency-evolution-card.empty em {
  color: rgba(248, 255, 242, 0.68);
  font-style: normal;
}

@media (max-width: 640px) {
  .report-currency-grid,
  .currency-evolution-grid,
  .report-reference-grid {
    grid-template-columns: 1fr;
  }
}

/* Nubank-style mobile cleanup: unclamp the dashboard card and slim the fixed nav. */
@media (max-width: 640px) {
  .app-view,
  .app-view .content {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-view .content {
    padding-inline: clamp(14px, 4vw, 18px) !important;
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dashboard-scene,
  .quota-dashboard-scene,
  .portfolio-hero-card,
  .quota-hero-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .quota-hero-card {
    min-height: auto !important;
    padding: 18px !important;
    border-radius: 30px !important;
    clip-path: none !important;
  }

  .quota-cutout-info {
    position: static !important;
    z-index: 1;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: fit-content !important;
    max-width: 100%;
    min-height: 0 !important;
    margin: 0 0 12px !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(207, 255, 18, 0.24);
    border-radius: 999px !important;
    color: rgba(248, 255, 242, 0.86) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: none !important;
  }

  .quota-cutout-info small,
  .quota-cutout-info strong {
    width: auto !important;
    color: inherit !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .quota-hero-card .portfolio-hero-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
    padding-right: 0 !important;
  }

  .portfolio-hero-top > div:first-child {
    min-width: 0;
  }

  .portfolio-hero-top small,
  .portfolio-hero-top p {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.2 !important;
  }

  .portfolio-hero-top h3 {
    display: block;
    max-width: 100%;
    margin-block: 8px 6px;
    font-size: clamp(1.85rem, 8.5vw, 2.45rem) !important;
    line-height: 0.92 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  .portfolio-hero-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    justify-items: start !important;
    gap: 10px !important;
    width: 100%;
  }

  .dashboard-currency-toggle {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
    padding: 4px !important;
    gap: 3px !important;
  }

  .dashboard-currency-toggle button {
    min-width: 58px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 0.7rem !important;
  }

  .visibility-toggle {
    flex: 0 0 auto;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
  }

  .portfolio-hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }

  .portfolio-hero-actions button {
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 10px 12px !important;
    border-radius: 999px !important;
    font-size: clamp(0.72rem, 3vw, 0.84rem) !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  .portfolio-hero-actions button svg {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 auto;
  }

  .quota-hero-meta {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 1fr);
    grid-template-columns: none !important;
    gap: 0 !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .quota-hero-meta::-webkit-scrollbar {
    display: none;
  }

  .quota-hero-meta span {
    scroll-snap-align: start;
    min-width: 118px;
    padding: 14px 12px !important;
  }

  .quota-hero-meta span small,
  .quota-hero-meta span strong {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  .bottom-nav {
    left: 50% !important;
    right: auto !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(430px, calc(100vw - 28px)) !important;
    min-height: 68px !important;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 999px !important;
    transform: translateX(-50%) !important;
  }

  .bottom-nav .nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100%;
  }

  .bottom-nav .nav-link {
    display: grid !important;
    grid-template-rows: 25px auto !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 4px 1px 3px !important;
    font-size: clamp(0.58rem, 2.35vw, 0.68rem) !important;
    line-height: 1.05 !important;
    overflow: visible !important;
  }

  .bottom-nav .nav-label {
    display: block !important;
    width: 100%;
    max-width: 70px;
    margin: 0 auto !important;
    color: #11190f !important;
    font-weight: 950 !important;
    line-height: 1.05 !important;
    text-align: center;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .bottom-nav .nav-link[data-section="portfolio"] .nav-label {
    max-width: 62px !important;
    font-size: clamp(0.54rem, 2.05vw, 0.62rem) !important;
    line-height: 1.02 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .bottom-nav .nav-link .nav-icon,
  .bottom-nav .nav-link:not(.nav-main) .nav-icon {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    min-height: 25px !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
  }

  .bottom-nav .nav-link.active:not(.nav-main) .nav-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    margin-top: -3px !important;
    background: rgba(207, 255, 18, 0.62) !important;
  }

  .bottom-nav .nav-link:not(.nav-main) .nav-icon svg,
  .bottom-nav .nav-link.active:not(.nav-main) .nav-icon svg {
    width: 24px !important;
    height: 24px !important;
  }

  .bottom-nav .nav-link.nav-main {
    z-index: 3;
    grid-template-rows: 31px auto !important;
    gap: 5px !important;
    min-height: 56px !important;
    padding-top: 0 !important;
  }

  .bottom-nav .nav-main .nav-icon,
  .bottom-nav .nav-link.nav-main.active .nav-icon {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    margin: -18px auto 0 !important;
    border: 4px solid rgba(249, 252, 246, 0.98) !important;
    border-radius: 50% !important;
    box-shadow: 0 12px 26px rgba(8, 11, 7, 0.2) !important;
  }

  .bottom-nav .nav-main .nav-icon svg,
  .bottom-nav .nav-link.nav-main.active .nav-icon svg {
    width: 28px !important;
    height: 28px !important;
  }
}

/* The logged-in app no longer simulates a device status bar. */
.phone-status {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

.push-preference-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(8, 11, 7, 0.12);
  border-radius: 18px;
  color: #080b07;
  background: linear-gradient(135deg, var(--neon, #cfff12), #ecff8a);
  box-shadow: 0 14px 32px rgba(207, 255, 18, 0.16);
}

.push-preference-card strong,
.push-preference-card p,
.push-preference-card small {
  color: #080b07;
}

.push-preference-card p {
  margin: 0;
  font-weight: 950;
}

/* Group monthly closings and investor earnings */
.monthly-closing-admin-head,
.earnings-dashboard-card,
.report-earnings-panel {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(207, 255, 18, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, #080b07, #12180d);
  color: #f8fbf5;
  box-shadow: 0 20px 42px rgba(8, 11, 7, 0.2);
}

.monthly-closing-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.monthly-closing-admin-head h3,
.earnings-dashboard-head h3,
.report-earnings-panel h3 {
  margin: 3px 0 0;
  color: #fff;
}

.monthly-closing-admin-head p,
.earnings-dashboard-card p,
.report-earnings-panel p {
  color: #aeb8a8;
}

.monthly-group-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 12px;
  width: 100%;
  margin: 14px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.monthly-group-strip::-webkit-scrollbar { display: none; }

.monthly-group-strip > article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(8, 11, 7, 0.12);
  border-radius: 18px;
  background: #f7faf3;
  color: #080b07;
  scroll-snap-align: start;
}

.monthly-group-strip > article > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid #080b07;
  border-radius: 16px;
  background: var(--neon, #cfff12);
  font-weight: 950;
}

.monthly-group-strip strong,
.monthly-group-strip small { display: block; color: #080b07; overflow-wrap: anywhere; }
.monthly-group-strip em { padding: 6px 8px; border-radius: 999px; color: #080b07; background: #dfe6da; font-size: 0.72rem; font-style: normal; font-weight: 900; }
.monthly-group-strip em.active { background: var(--neon, #cfff12); }

.monthly-result-status {
  display: inline-flex;
  margin-right: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #080b07;
  background: #dfe6da;
  font-size: 0.68rem;
}

.monthly-result-status.published { background: #c9efff; }
.monthly-result-status.paid { background: var(--neon, #cfff12); }
.monthly-result-status.cancelled { color: #8d1717; background: #ffe4e4; }

.monthly-result-form .international-fee-field { display: none; }
.monthly-result-form.is-international .international-fee-field { display: grid; }
.monthly-result-form.is-international .b3-fee-field { display: none; }

.monthly-result-preview {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #080b07;
  color: #f8fbf5;
}

.monthly-result-preview > p { margin: 0; color: #b8c1b3; }
.monthly-preview-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.monthly-preview-kpis span { display: grid; gap: 4px; min-width: 0; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.07); }
.monthly-preview-kpis small { color: #aeb8a8; }
.monthly-preview-kpis strong { color: var(--neon, #cfff12); overflow-wrap: anywhere; }
.monthly-preview-participants { display: grid; gap: 6px; }
.monthly-preview-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.monthly-preview-head small { color: #aeb8a8; }
.monthly-preview-participants > span { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.monthly-preview-participants b { min-width: 0; overflow-wrap: anywhere; }
.monthly-preview-participants small { color: #aeb8a8; }
.monthly-preview-participants > span strong { color: var(--neon, #cfff12); }
.form-error { color: #ffb5b5 !important; }

.earnings-dashboard-card { display: grid; gap: 16px; margin: 18px 0; padding: 20px; }
.earnings-dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.earnings-dashboard-head small { color: var(--neon, #cfff12); text-transform: uppercase; font-weight: 900; }
.earnings-dashboard-head button { padding: 9px 12px; border: 0; border-radius: 999px; background: var(--neon, #cfff12); color: #080b07; font-weight: 950; }
.earnings-currency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.earning-currency-card { min-width: 0; padding: 16px; border-radius: 18px; background: rgba(255,255,255,0.07); }
.earning-currency-card > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.earning-currency-card > div:first-child span { color: #080b07; padding: 4px 7px; border-radius: 999px; background: var(--neon, #cfff12); font-weight: 950; }
.earning-currency-card small, .earning-currency-card p, .earning-currency-card dt { color: #aeb8a8; }
.earning-currency-card > strong { display: block; margin-top: 14px; color: #fff; font-size: clamp(1.45rem, 4vw, 2.2rem); overflow-wrap: anywhere; }
.earning-currency-card dl { display: grid; gap: 8px; margin: 14px 0 0; }
.earning-currency-card dl > div { display: flex; justify-content: space-between; gap: 12px; }
.earning-currency-card dd { margin: 0; color: #fff; text-align: right; font-weight: 850; }
.earnings-empty { margin: 0; padding-top: 2px; }

.report-earnings-panel { display: grid; gap: 16px; padding: 20px; }
.report-earnings-panel .section-row { margin: 0; }
.report-earning-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-earning-summary article { min-width: 0; padding: 15px; border-radius: 16px; background: var(--neon, #cfff12); color: #080b07; }
.report-earning-summary small, .report-earning-summary strong, .report-earning-summary p, .report-earning-summary span { display: block; color: #080b07; }
.report-earning-summary strong { margin-top: 5px; font-size: 1.45rem; overflow-wrap: anywhere; }
.report-earning-summary p { margin: 6px 0; }
.earning-history-list { display: grid; gap: 8px; }
.earning-history-list > article { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.09); }
.earning-history-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--neon, #cfff12); color: #080b07; }
.earning-history-icon svg { width: 24px; height: 24px; }
.earning-history-list small, .earning-history-list p { color: #aeb8a8; }
.earning-history-list strong { color: #fff; }
.earning-history-list em { max-width: 135px; color: #080b07; padding: 6px 8px; border-radius: 999px; background: #e7eddf; font-size: 0.72rem; font-style: normal; font-weight: 900; text-align: center; }
.earning-history-list em.paid { background: var(--neon, #cfff12); }

@media (max-width: 640px) {
  .monthly-closing-admin-head,
  .earnings-dashboard-head,
  .monthly-preview-head { align-items: stretch; flex-direction: column; }
  .monthly-closing-admin-head .primary,
  .earnings-dashboard-head button { width: 100%; }
  .monthly-preview-kpis,
  .earnings-currency-grid,
  .report-earning-summary { grid-template-columns: 1fr; }
  .monthly-preview-participants > span { grid-template-columns: minmax(0, 1fr) auto; }
  .monthly-preview-participants > span small { grid-column: 1; }
  .earning-history-list > article { grid-template-columns: 38px minmax(0, 1fr); }
  .earning-history-list > article > em { grid-column: 2; justify-self: start; }
  .earning-currency-card > strong { white-space: nowrap; font-size: clamp(1.35rem, 7vw, 1.9rem); }
}
