@import url("https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&family=Quicksand:wght@300..700&display=swap");

:root {
  --bg-deep: #0a0c18;
  --bg-deep-2: #0d1024;
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --mint: #2de1c2;
  --gold: #ffb84d;
  --pink: #ff5da2;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --text-hi: #f5f6fb;
  --text-mid: rgba(245, 246, 251, 0.62);
  --text-low: rgba(245, 246, 251, 0.38);
  --pro-color: #ffc845;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-ui: "Quicksand", sans-serif;
  /* --font-ui:
    "SamsungSharpSans", "Samsung Sharp Sans", "SamsungOne", Arial, Helvetica,
    sans-serif; */
  --font-display: var(--font-ui);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  background: var(--bg-deep);
  font-family: var(--font-ui);
  color: var(--text-hi);
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Page stage (mockup shell holder) ---------- */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(
      ellipse 80% 60% at 15% 0%,
      rgba(139, 92, 246, 0.18),
      transparent 60%
    ),
    radial-gradient(
      ellipse 80% 60% at 85% 100%,
      rgba(45, 225, 194, 0.12),
      transparent 60%
    ),
    var(--bg-deep);
  overflow: auto;
}

/* ---------- Phone frame (desktop container — plain rounded frame, no device chrome) ---------- */
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  max-height: 92vh;
  border-radius: 42px;
  padding: 0;
  background: var(--bg-deep-2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 40px 90px -20px rgba(0, 0, 0, 0.7),
    0 0 120px rgba(139, 92, 246, 0.12);
  flex: 0 0 auto;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: var(--bg-deep-2);
  background-image: url(images/bg1.png);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body[data-theme="gradient"] .screen {
  background-image:
    radial-gradient(
      ellipse 80% 60% at 18% 0%,
      rgba(139, 92, 246, 0.26),
      transparent 60%
    ),
    radial-gradient(
      ellipse 80% 60% at 82% 100%,
      rgba(45, 225, 194, 0.18),
      transparent 60%
    ),
    var(--bg-deep-2);
}

body[data-theme="black"] .screen {
  background-image: none;
  background-color: #000;
}

body[data-theme="black"] .screen::after {
  background-color: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-theme="black"] .blob {
  display: none;
}

body[data-theme="gradient"] .screen::after {
  background-color: rgba(0, 0, 0, 0.28);
}

.screen::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  background-color: #000000a6;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

/* ---------- ambient gradient blobs (glassmorphism needs these) ---------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: 0;
  animation: drift 16s ease-in-out infinite;
}

.blob.b1 {
  width: 260px;
  height: 260px;
  background: var(--violet);
  top: -80px;
  left: -60px;
  animation-delay: 0s;
}

.blob.b2 {
  width: 220px;
  height: 220px;
  background: var(--mint);
  bottom: 120px;
  right: -70px;
  animation-delay: -5s;
}

.blob.b3 {
  width: 200px;
  height: 200px;
  background: var(--pink);
  bottom: -60px;
  left: 20px;
  animation-delay: -10s;
  opacity: 0.4;
}

.blob.b4 {
  width: 180px;
  height: 180px;
  background: var(--gold);
  top: 220px;
  right: 10px;
  opacity: 0.28;
  animation-delay: -8s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(18px, -24px) scale(1.08);
  }

  66% {
    transform: translate(-16px, 14px) scale(0.94);
  }
}

/* ---------- scroll content ---------- */
.content {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  padding: 142px 20px 110px;
  scrollbar-width: none;
}

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

/* ---------- pull to refresh ---------- */
.pull-refresh {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-mid);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -64px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.pull-refresh.visible {
  opacity: 1;
}

.pull-refresh.ready {
  color: var(--mint);
}

.pull-refresh.refreshing {
  color: var(--mint);
  transform: translate(-50%, 0);
}

.pull-refresh-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(45, 225, 194, 0.35);
  border-radius: 50%;
  background: rgba(13, 16, 36, 0.9);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(45, 225, 194, 0.16);
  font-size: 14px;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.pull-refresh.ready .pull-refresh-icon {
  background: rgba(45, 225, 194, 0.14);
}

.pull-refresh.refreshing .pull-refresh-icon {
  animation: pullRefreshSpin 0.8s linear infinite;
}

.pull-refresh-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@keyframes pullRefreshSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- header ---------- */
.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 18px 20px 14px;
  background: linear-gradient(
    180deg,
    rgba(12, 14, 30, 0.96) 0%,
    rgba(12, 14, 30, 0.82) 78%,
    rgba(12, 14, 30, 0) 100%
  );
  pointer-events: none;
}

.app-header > * {
  pointer-events: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 12px;
  margin-bottom: 0;
}

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

.header-contact {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(255, 184, 77, 0.35);
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(255, 184, 77, 0.22),
    rgba(255, 93, 162, 0.14)
  );
  color: #ffd9a0;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.header-contact:active {
  transform: scale(0.94);
  background: rgba(255, 184, 77, 0.3);
}

.header-contact i {
  font-size: 15px;
  color: #65e6a8;
}

.notification-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-hi);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.notification-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.16);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid #171a2e;
  border-radius: 50%;
  background: var(--pink);
}

.greet-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-low);
  font-weight: 700;
  margin-bottom: 4px;
}

.greet-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-hi);
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(
    135deg,
    rgba(255, 184, 77, 0.22),
    rgba(255, 93, 162, 0.14)
  );
  border: 1px solid rgba(255, 184, 77, 0.35);
  padding: 8px 12px 8px 10px;
  border-radius: 100px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.streak-pill .flame {
  font-size: 15px;
  animation: flicker 1.6s ease-in-out infinite;
}

.streak-pill span.num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: #ffd9a0;
}

@keyframes flicker {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.12) rotate(-4deg);
  }
}

/* ---------- glass base ---------- */
.glass {
  /* background: linear-gradient(155deg, var(--glass-strong), var(--glass));));  */
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ---------- rewards hero card ---------- */
.hero-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.rewards-summary-card {
  background:
    linear-gradient(155deg, rgba(255, 184, 77, 0.16), rgba(255, 93, 162, 0.08)),
    linear-gradient(155deg, var(--glass-strong), var(--glass));
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rewards-hero-icon {
  width: 0;
  height: 0;
  border-radius: 18px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a0e08;
  font-size: 21px;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 12px 26px rgba(255, 93, 162, 0.26);
}

.rewards-hero-icon i {
  color: #ff778b;
}

.hero-info {
  flex: 1;
  min-width: 0;
}

.rewards-summary-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.13);
}

.rewards-summary-strip div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rewards-summary-strip span {
  display: block;
  margin-bottom: 3px;
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-low);
}

.rewards-summary-strip b {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-hi);
}

.hero-info .tier {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-hi);
}

/* ---------- rewards row (inside hero card) ---------- */
.rewards-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.rewards-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rewards-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 0 14px rgba(255, 184, 77, 0.35);
}

.rewards-label {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-low);
}

.rewards-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-hi);
}

.earn-rewards-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background: linear-gradient(120deg, var(--gold), var(--pink));
  color: #1a0e08;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(255, 93, 162, 0.35);
  transition:
    transform 0.15s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}

.earn-rewards-btn:active {
  transform: scale(0.94);
}

.earn-rewards-btn.shaking {
  animation: shakeBtn 0.5s ease;
}

.earn-rewards-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-low);
  box-shadow: none;
  cursor: not-allowed;
}

@keyframes shakeBtn {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }

  20% {
    transform: translateX(-4px) rotate(-4deg);
  }

  40% {
    transform: translateX(4px) rotate(4deg);
  }

  60% {
    transform: translateX(-3px) rotate(-3deg);
  }

  80% {
    transform: translateX(3px) rotate(3deg);
  }
}

/* ---------- balance card ---------- */
.balance-card {
  border-radius: var(--radius-xl);
  padding: 22px 22px 18px;
  margin-bottom: 16px;
  position: relative;
  background:
    linear-gradient(155deg, rgb(0 107 255 / 22%), rgb(0 0 0 / 45%)),
    linear-gradient(155deg, var(--glass-strong), var(--glass));
}

.balance-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 0;
}

.balance-label {
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-split {
  display: flex;
  /* margin-top: -30px; */
  padding-right: 44px;
}

.balance-panel {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 122px;
  text-align: center;
}

.balance-panel + .balance-panel {
  border-left: 1px solid var(--glass-border);
  padding-left: 24px;
  margin-left: 24px;
}

.balance-panel-label {
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pro-color .balance-panel-label {
  color: var(--pro-color);
}

.eye-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-mid);
  font-size: 13px;
}

.balance-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.01em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.balance-panel .balance-amount {
  font-size: clamp(24px, 5.7vw, 38px);
  margin-top: 12px;
}

.pro-color .balance-amount {
  color: var(--pro-color);
}

.balance-panel .balance-amount-row {
  gap: 7px;
  justify-content: center;
}

.balance-profit-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgb(0 163 79 / 44%);
  border-radius: 999px;
  background: rgba(45, 225, 194, 0.1);
  color: var(--text-mid);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.pro-color .balance-profit-pill {
  border-color: var(--pro-color);
}

.balance-profit-pill strong {
  color: var(--mint);
  font-weight: 700;
}

.zar-equivalent::before {
  content: "≈ ";
}

.pro-color .balance-profit-pill strong {
  color: var(--pro-color);
}

.balance-amount .cents {
  font-size: 20px;
  color: var(--text-mid);
}

.balance-amount-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.amount-with-zar {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.zar-equivalent {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--mint);
  background: rgba(45, 225, 194, 0.1);
  border: 1px solid rgba(45, 225, 194, 0.18);
  border-radius: 999px;
  padding: 2px 7px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.hero-zar {
  transform: translateY(-2px);
}

.balance-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

@media (max-width: 380px) {
  .balance-panel + .balance-panel {
    padding-left: 12px;
    margin-left: 12px;
  }

  .balance-split {
    padding-right: 36px;
  }

  .balance-panel .balance-amount {
    font-size: 22px;
  }
}

.balance-sub .delta {
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  background: rgba(45, 225, 194, 0.12);
  padding: 2px 8px;
  border-radius: 20px;
}

.balance-sub .period {
  font-size: 12px;
  color: var(--text-low);
}

.balance-bars {
  height: 54px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(8px, 3.2vw, 16px);
  margin: 14px 0 2px;
  padding: 3px 2px 0;
  position: relative;
}

.balance-bars span {
  flex: 1 1 0;
  max-width: 42px;
  min-width: 0;
  border-radius: 9px 9px 0px 0px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), #00000000 22%),
    linear-gradient(180deg, var(--mint), rgb(45 225 194 / 0%));
  /* box-shadow:
    0 0 14px rgba(45, 225, 194, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28); */
  transition: height 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}

.balance-bars span.blue {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), #00000000 22%),
    linear-gradient(180deg, #144baa, rgb(45 225 194 / 0%));
}

.balance-bars span.amber {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), #00000000 22%),
    linear-gradient(180deg, #aa7e14, rgb(45 225 194 / 0%));
}

.balance-bars span.red {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), #00000000 22%),
    linear-gradient(180deg, #aa143c, rgb(45 225 194 / 0%));
}

.quick-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  gap: 10px;
}

.qa-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.qa-btn:active {
  transform: scale(0.93);
  background: rgba(255, 255, 255, 0.14);
}

.qa-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
}

.qa-btn span {
  font-size: 10.5px;
  color: var(--text-mid);
  font-weight: 600;
}

/* ---------- section heading ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 22px 0 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.section-link {
  font-size: 11.5px;
  color: var(--mint);
  font-weight: 700;
  cursor: pointer;
}

/* ---------- balance stats grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}

.stat-tile {
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.stat-tile:active {
  transform: scale(0.96);
}

.stat-tile .stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
}

.stat-tile .stat-label {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-low);
  margin-bottom: 4px;
}

.stat-tile .stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  font-variant-numeric: tabular-nums;
}

.stat-tile .stat-note {
  font-size: 10px;
  color: var(--text-low);
  margin-top: 3px;
}

.stat-tile .stat-note.pos {
  color: var(--mint);
}

/* ---------- missions (horizontal scroll) ---------- */
.missions-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  scrollbar-width: none;
}

.missions-scroll::-webkit-scrollbar {
  display: none;
}

.mission-card {
  flex: 0 0 auto;
  width: 168px;
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.mission-icon {
  font-size: 20px;
  margin-bottom: 10px;
  display: block;
}

.mission-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  min-height: 34px;
}

.mission-progress-track {
  height: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.mission-progress-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--mint), var(--violet-soft));
}

.mission-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.mission-pct {
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 600;
}

/* ---------- badges ---------- */
.badges-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.badges-row::-webkit-scrollbar {
  display: none;
}

.badge {
  flex: 0 0 auto;
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.badge-icon.unlocked {
  background: linear-gradient(
    150deg,
    rgba(139, 92, 246, 0.35),
    rgba(45, 225, 194, 0.22)
  );
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
  color: var(--gold);
}

.badge-icon.locked {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: var(--text-low);
  opacity: 0.5;
}

.badge-name {
  font-size: 9.5px;
  color: var(--text-low);
  font-weight: 600;
  text-align: center;
}

/* ---------- activity list ---------- */
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.act-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.act-info {
  flex: 1;
  min-width: 0;
}

.act-name {
  font-size: 13px;
  font-weight: 600;
}

.act-meta {
  font-size: 11px;
  color: var(--text-low);
  margin-top: 2px;
}

.act-right {
  text-align: right;
  flex: 0 0 auto;
}

.act-amount {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
}

.act-amount.pos {
  color: var(--mint);
}

/* ---------- app views ---------- */
.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

/* ---------- trading page ---------- */
.trade-market-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 18px;
  margin-bottom: 14px;
}

.trade-market-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.coin-badge {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #f7931a, var(--gold));
  color: #fff;
  font-size: 13px;
  box-shadow: 0 0 16px rgba(247, 147, 26, 0.35);
}

.trade-pair-label {
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 600;
}

.trade-pair-select {
  max-width: 100%;
  padding: 6px 30px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  appearance: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23f5f6fb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.trade-pair-select option {
  background: #14182a;
  color: var(--text-hi);
}

.trade-chart {
  position: relative;
  height: 340px;
  margin: 0 0 16px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(10, 12, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.22);
}

.trade-chart iframe,
.trade-chart svg {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.trade-chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.chart-grid-line {
  stroke: rgba(245, 246, 251, 0.18);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--mint);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(45, 225, 194, 0.35));
}

.chart-marker-line {
  stroke: rgba(245, 246, 251, 0.5);
  stroke-width: 1;
}

.chart-marker-dot {
  fill: var(--mint);
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
}

.chart-tooltip {
  position: absolute;
  top: 74px;
  left: 246px;
  width: 82px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(34, 194, 174, 0.9);
  color: #10201f;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
  font-size: 10px;
  line-height: 1.25;
  transform: translateX(-50%);
}

.chart-tooltip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 2px;
}

.chart-cursor {
  position: absolute;
  top: 98px;
  left: 247px;
  font-size: 22px;
  color: #fff;
  transform: rotate(-18deg);
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.trade-mid-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 10px;
  margin-bottom: 14px;
}

.order-book-card,
.trade-stats-card,
.place-order-card,
.positions-card {
  border-radius: 22px;
  padding: 13px;
  overflow: hidden;
}

.book-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.book-bid {
  color: var(--mint);
}

.book-ask {
  color: var(--pink);
}

.book-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  height: 21px;
}

.book-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.book-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w);
  border-radius: inherit;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}

.book-bar.bid::before {
  right: 0;
  left: auto;
}

.trade-stats-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.trade-stat {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.trade-stat span {
  color: var(--text-mid);
}

.trade-stat b {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}

.place-order-card {
  margin-bottom: 14px;
  padding: 18px;
}

.trade-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.trade-session-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(45, 225, 194, 0.2);
  border-radius: 12px;
  background: rgba(45, 225, 194, 0.06);
}

.trade-session-indicator {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(45, 225, 194, 0.65);
}

.trade-session-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trade-session-copy strong {
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 13px;
}

.trade-session-copy small {
  color: var(--text-mid);
  font-size: 11px;
}

.trade-running-heading,
.trade-execution-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trade-running-heading {
  margin-bottom: 14px;
}

.trade-running-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-hi);
}

.trade-running-timer {
  color: var(--text-mid);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.trade-pnl-metric {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.trade-pnl-metric span,
.trade-execution-time span {
  color: var(--text-mid);
  font-size: 11px;
}

.trade-pnl-value {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: color 180ms ease;
}

.trade-pnl-value.positive {
  color: var(--mint);
}

.trade-pnl-value.negative {
  color: #ff6675;
}

.trade-execution-time {
  margin-bottom: 5px;
}

.trade-execution-time strong {
  color: var(--text-hi);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.trade-simulation-note {
  display: block;
  margin-bottom: 13px;
  color: var(--text-low);
  font-size: 10px;
}

.execute-trade-btn {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), #45f1da);
  color: #101522;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.execute-trade-btn:hover {
  filter: brightness(1.06);
}

.trade-again-btn[hidden] {
  display: none;
}

.positions-card {
  padding: 12px;
  margin-bottom: 8px;
}

.positions-tabs {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.positions-tab {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-mid);
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.positions-tab.active {
  color: var(--text-hi);
  border-color: var(--mint);
}

.positions-head,
.position-row {
  display: grid;
  grid-template-columns: 0.78fr 0.95fr 1fr 0.8fr 0.8fr;
  gap: 7px;
  align-items: center;
}

.positions-head {
  color: var(--text-low);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.position-row {
  min-height: 24px;
  font-size: 12px;
  color: var(--text-mid);
}

.asset-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-hi);
  font-family: var(--font-display);
  font-weight: 800;
}

.mini-coin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f7931a, var(--gold));
}

.mini-coin.eth {
  background: linear-gradient(135deg, #627eea, var(--violet-soft));
}

.pos-buy {
  color: var(--mint);
  font-weight: 800;
}

.pos-sell {
  color: var(--pink);
  font-weight: 800;
}

.pos-profit {
  color: var(--mint);
  font-family: var(--font-display);
  font-weight: 800;
}

/* ---------- history page ---------- */
.history-hero {
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.history-hero::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -58px;
  bottom: -78px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(45, 225, 194, 0.34),
    transparent 68%
  );
  pointer-events: none;
}

.history-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.history-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.history-export {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mint);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.history-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  position: relative;
  z-index: 1;
}

.history-summary {
  border-radius: 16px;
  padding: 11px 9px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-summary span {
  display: block;
  font-size: 9px;
  color: var(--text-low);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.history-summary b {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}

.history-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding-bottom: 1px;
}

.history-filters::-webkit-scrollbar {
  display: none;
}

.history-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--text-mid);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.history-chip.active {
  color: #11201e;
  background: linear-gradient(135deg, var(--mint), #74f7e5);
  border-color: transparent;
}

.history-section {
  margin-bottom: 16px;
}

.history-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 9px;
  color: var(--text-low);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-list {
  border-radius: 22px;
  overflow: hidden;
}

.history-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.history-icon.trade {
  color: var(--mint);
  background: rgba(45, 225, 194, 0.14);
}

.history-icon.card {
  color: var(--violet-soft);
  background: rgba(139, 92, 246, 0.16);
}

.history-icon.reward {
  color: var(--gold);
  background: rgba(255, 184, 77, 0.15);
}

.history-icon.out {
  color: var(--pink);
  background: rgba(255, 93, 162, 0.14);
}

.history-main {
  min-width: 0;
}

.history-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--text-hi);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-low);
  font-size: 11px;
  font-weight: 600;
}

.history-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(45, 225, 194, 0.7);
}

.history-side {
  text-align: right;
}

.history-amount {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
  margin-bottom: 3px;
}

.history-amount.pos {
  color: var(--mint);
}

.history-tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 800;
  color: var(--text-mid);
  background: rgba(255, 255, 255, 0.07);
}

/* ---------- trades dashboard ---------- */
.trades-kicker {
  margin: 8px 0 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-low);
  font-weight: 800;
}

.trades-overview-card {
  border-radius: 24px;
  padding: 16px 20px 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.trades-overview-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -90px auto;
  width: 210px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(45, 225, 194, 0.28),
    transparent 68%
  );
  pointer-events: none;
}

.trades-overview-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.trades-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.trades-summary-item {
  min-width: 0;
}

.trades-summary-item + .trades-summary-item {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 12px;
}

.trades-summary-item span {
  display: block;
  color: var(--text-mid);
  font-size: 12px;
  margin-bottom: 3px;
}

.trades-summary-item b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.trades-summary-item .profit {
  color: var(--mint);
  text-shadow: 0 0 16px rgba(45, 225, 194, 0.35);
}

.trades-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.trades-action-btn {
  height: 50px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: #101522;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.trades-action-btn.deposit {
  background: linear-gradient(135deg, #66f4e4, var(--mint));
  box-shadow:
    0 0 22px rgba(45, 225, 194, 0.52),
    0 12px 28px rgba(0, 0, 0, 0.32);
}

.trades-action-btn.withdraw {
  background: linear-gradient(135deg, #ff8ac4, var(--pink));
  box-shadow:
    0 0 22px rgba(255, 93, 162, 0.52),
    0 12px 28px rgba(0, 0, 0, 0.32);
}

.trades-section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin: 0 0 10px;
}

.trade-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.trade-ticket {
  min-height: 64px;
  border-radius: 16px;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: 9px 1fr auto auto;
  gap: 9px;
  align-items: center;
}

.trade-ticket.closed {
  grid-template-columns: 9px 1fr auto;
  min-height: 70px;
}

.trade-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34e884;
  box-shadow: 0 0 10px rgba(52, 232, 132, 0.75);
}

.trade-asset-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.trade-coin {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(135deg, #f7931a, var(--gold));
  box-shadow: 0 0 13px rgba(247, 147, 26, 0.4);
}

.trade-coin.eth {
  background: linear-gradient(135deg, #eef2ff, #627eea);
  color: #30365f;
}

.trade-symbol {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-hi);
  white-space: nowrap;
}

.trade-dir {
  font-weight: 800;
}

.trade-dir.long {
  color: var(--mint);
}

.trade-dir.short {
  color: #ff8aa5;
}

.trade-sub {
  font-size: 12px;
  color: rgba(245, 246, 251, 0.74);
  margin-top: 2px;
  white-space: nowrap;
}

.trade-pl {
  text-align: right;
  font-size: 12px;
  color: var(--text-mid);
  min-width: 70px;
}

.trade-pl b {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.trade-pl .up {
  color: var(--mint);
}

.trade-pl .down {
  color: #ff6d91;
}

.trade-close-btn {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 109, 123, 0.75);
  background: rgba(255, 93, 103, 0.13);
  color: #ff8b94;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 93, 103, 0.25);
}

.closed-trade-profit {
  text-align: right;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 105px;
}

.closed-trade-profit .up {
  color: var(--mint);
}

.closed-trade-profit .down {
  color: #ff6d91;
}

.closed-trade-date {
  display: block;
  margin-top: 4px;
  color: var(--text-mid);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
}

/* ---------- affiliate network ---------- */
.affiliate-title {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8ff7ef;
  text-shadow: 0 0 16px rgba(45, 225, 194, 0.55);
}

.affiliate-overview-card {
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.affiliate-overview-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -80px;
  width: 200px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(45, 225, 194, 0.28),
    transparent 70%
  );
  pointer-events: none;
}

.affiliate-overview-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.affiliate-summary-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 1.05fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.affiliate-summary-item + .affiliate-summary-item {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 10px;
}

.affiliate-summary-item span {
  display: block;
  color: var(--text-mid);
  font-size: 11px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.affiliate-summary-item b {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.affiliate-summary-item .withdrawable {
  color: var(--mint);
  text-shadow: 0 0 14px rgba(45, 225, 194, 0.4);
}

.affiliate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.affiliate-action-btn {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.05;
  font-weight: 800;
  text-transform: uppercase;
  color: #10201f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  box-shadow:
    0 0 22px rgba(45, 225, 194, 0.42),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.affiliate-action-btn.copy {
  background: linear-gradient(135deg, #7cf8ec, var(--mint));
}

.affiliate-action-btn.withdraw {
  background: linear-gradient(135deg, #ff8ac4, var(--pink));
  box-shadow:
    0 0 22px rgba(255, 93, 162, 0.48),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.affiliate-section-title {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.affiliate-tier-card {
  border-radius: 18px;
  padding: 11px;
  margin-bottom: 10px;
}

.tier-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 8px;
}

.tier-title {
  font-size: 15px;
}

.tier-users,
.tier-earned {
  font-size: 15px;
  white-space: nowrap;
}

.tier-users {
  color: var(--text-hi);
}

.tier-earned {
  color: var(--mint);
}

.affiliate-member {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 43px;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.affiliate-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.affiliate-avatar.blue {
  background: linear-gradient(135deg, #67e8f9, #4d7cff);
}

.affiliate-avatar.gold {
  background: linear-gradient(135deg, var(--gold), var(--pink));
}

.affiliate-avatar.mint {
  background: linear-gradient(135deg, var(--mint), var(--violet-soft));
}

.affiliate-member-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.05;
}

.affiliate-member-date {
  font-size: 11px;
  color: var(--text-mid);
}

.affiliate-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--mint);
}

.affiliate-status.pending {
  color: var(--gold);
}

.affiliate-status::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.affiliate-view-all {
  margin: 5px 0 -2px auto;
  width: max-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-mid);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.affiliate-footer-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border-radius: 22px;
  padding: 12px;
  margin-top: 10px;
}

.affiliate-mini-profile {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
}

.affiliate-mini-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
}

.affiliate-bonus-box {
  min-width: 122px;
  border-radius: 14px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  color: var(--text-mid);
}

.affiliate-bonus-box b {
  display: block;
  color: var(--text-hi);
  font-size: 12px;
  margin-bottom: 4px;
}

.affiliate-bonus-box span {
  color: var(--mint);
  font-weight: 800;
}

/* ---------- profile settings ---------- */
.profile-title {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8ff7ef;
  text-shadow: 0 0 16px rgba(45, 225, 194, 0.55);
}

.profile-card {
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 18% 45%,
      rgba(139, 92, 246, 0.24),
      transparent 32%
    ),
    radial-gradient(
      circle at 82% 75%,
      rgba(45, 225, 194, 0.18),
      transparent 35%
    );
  pointer-events: none;
}

.profile-avatar-large {
  width: 98px;
  height: 98px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.75);
  background: linear-gradient(135deg, var(--violet), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.35);
  position: relative;
  z-index: 1;
}

.profile-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.profile-overline {
  color: var(--text-mid);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.profile-name-large {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 800;
  margin-bottom: 8px;
  white-space: nowrap;
}

.profile-member {
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-member b {
  color: var(--text-hi);
}

.settings-panel {
  border-radius: 20px;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--panel-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--panel-color) 22%, transparent);
}

.settings-heading {
  color: var(--panel-color);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 2px 8px;
}

.settings-row {
  min-height: 50px;
  border-radius: 11px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  cursor: pointer;
}

.settings-row:last-child {
  margin-bottom: 0;
}

.settings-row.featured {
  background: linear-gradient(
    135deg,
    rgba(45, 225, 194, 0.28),
    rgba(45, 225, 194, 0.12)
  );
  box-shadow: 0 0 22px rgba(45, 225, 194, 0.36);
  border-color: rgba(45, 225, 194, 0.48);
}

.settings-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--panel-color);
  background: rgba(255, 255, 255, 0.08);
}

.settings-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-hi);
}

.settings-chevron {
  color: var(--panel-color);
  font-size: 16px;
}

.settings-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.profile-toggle {
  position: relative;
  width: 52px;
  height: 30px;
  display: inline-block;
  cursor: pointer;
}

.profile-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.profile-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.profile-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.profile-toggle input:checked + .profile-toggle-track {
  background: rgba(45, 225, 194, 0.26);
  border-color: rgba(45, 225, 194, 0.5);
}

.profile-toggle input:checked + .profile-toggle-track + .profile-toggle-knob {
  background: var(--mint);
  transform: translateX(22px);
}

.twofa-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(45, 225, 194, 0.08);
  border: 1px solid rgba(45, 225, 194, 0.18);
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.5;
}

.twofa-note strong {
  color: var(--text-hi);
}

.twofa-status {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--text-mid);
  line-height: 1.5;
}

.notification-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.notification-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.notification-item.unread {
  border-color: rgba(45, 225, 194, 0.26);
  background: rgba(45, 225, 194, 0.07);
}

.notification-item-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
}

.notification-item-icon.mint {
  color: var(--mint);
  background: rgba(45, 225, 194, 0.14);
}

.notification-item-icon.gold {
  color: var(--gold);
  background: rgba(255, 184, 77, 0.14);
}

.notification-item-icon.pink {
  color: var(--pink);
  background: rgba(255, 93, 162, 0.14);
}

.notification-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.notification-item-copy strong {
  color: var(--text-hi);
  font-size: 12px;
}

.notification-item-copy span,
.notification-item-copy small {
  color: var(--text-mid);
  font-size: 11px;
  line-height: 1.4;
}

.notification-item-copy small {
  color: var(--text-low);
  font-size: 10px;
}

.contact-options {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.contact-option:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.1);
}

.contact-option-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 16px;
}

.contact-option.whatsapp .contact-option-icon,
.contact-option.group .contact-option-icon {
  color: #65e6a8;
  background: rgba(101, 230, 168, 0.14);
}

.contact-option.telegram .contact-option-icon {
  color: #62c8ff;
  background: rgba(98, 200, 255, 0.14);
}

.contact-option-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}

.contact-option-copy strong {
  color: var(--text-hi);
  font-size: 12px;
}

.contact-option-copy small {
  color: var(--text-mid);
  font-size: 10.5px;
  line-height: 1.4;
}

.contact-option-arrow {
  color: var(--text-low);
  font-size: 11px;
}

.ai-overlay {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: grid;
  background:
    linear-gradient(180deg, rgba(10, 12, 24, 0.74), rgba(10, 12, 24, 0.92)),
    rgba(0, 0, 0, 0.72);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition:
    opacity 0.25s ease,
    transform 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(3px);
  overflow: hidden;
}

.ai-overlay.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

#aiOverlayContent,
#aiOverlayContent > .ai-chat-view {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

#aiOverlayContent {
  position: relative;
  overflow: hidden;
}

.ai-overlay-error {
  padding: 30px 22px;
  color: var(--text-mid);
  text-align: center;
}

.ai-chat-view {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
  overflow: hidden;
}

.ai-chat-heading {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-hi);
}

.ai-chat-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ai-chat-heading strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
}

.ai-chat-title span {
  color: var(--mint);
  font-size: 11px;
  font-weight: 800;
}

.ai-back-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-hi);
  font-size: 16px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.ai-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.ai-back-btn:active {
  transform: scale(0.94);
}

.ai-chat-panel {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ai-chat-messages {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}

.ai-chat-messages::-webkit-scrollbar {
  display: none;
}

.ai-chat-composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ai-chat-composer textarea {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  min-height: 24px;
  max-height: 118px;
  padding: 4px 2px;
  border: 0;
  outline: 0;
  resize: none;
  overflow-y: auto;
  border-radius: 0;
  background: transparent;
  color: var(--text-hi);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.ai-chat-composer textarea::placeholder {
  color: rgba(245, 246, 251, 0.44);
}

.ai-chat-composer:focus-within {
  border-color: rgba(45, 225, 194, 0.36);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(45, 225, 194, 0.08);
}

.ai-chat-composer button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), #7cf6df);
  border: 0;
  box-shadow: 0 10px 24px rgba(45, 225, 194, 0.28);
  color: #071414;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.ai-chat-composer button:hover {
  filter: brightness(1.06);
}

.ai-chat-composer button:active {
  transform: scale(0.94);
}

.ai-chat-heading .ai-status {
  display: none;
}

.ai-message {
  max-width: 84%;
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border-radius: 18px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.ai-message.assistant {
  align-self: flex-start;
  color: rgba(245, 246, 251, 0.82);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-left-radius: 7px;
}

.ai-message.assistant strong {
  color: var(--mint);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-message-content {
  min-width: 0;
}

.ai-message-content p,
.ai-message-content ul,
.ai-message-content ol,
.ai-message-content pre {
  margin-bottom: 8px;
}

.ai-message-content > :last-child {
  margin-bottom: 0;
}

.ai-message-content ul,
.ai-message-content ol {
  padding-left: 16px;
}

.ai-message-content li + li {
  margin-top: 4px;
}

.ai-message-content h4 {
  margin-bottom: 6px;
  color: var(--text-hi);
  font-size: 12px;
}

.ai-message-content code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--mint);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.ai-message-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
}

.ai-message-content pre code {
  padding: 0;
  background: transparent;
  white-space: pre;
}

.ai-message-content a {
  color: var(--mint);
  font-weight: 800;
  text-decoration: none;
}

.ai-message.user {
  align-self: flex-end;
  color: #17142a;
  background: linear-gradient(135deg, var(--pink), #ffb84d);
  border-bottom-right-radius: 7px;
  font-weight: 800;
}

.ai-message.typing .ai-message-content,
.ai-message.typing span {
  color: var(--text-low);
}

.ai-message.typing .ai-message-content::after,
.ai-message.typing span::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-left: 6px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: middle;
  animation: aiTypingPulse 0.9s ease-in-out infinite;
}

.ai-message.error {
  color: #ff9a9a;
  border-color: rgba(255, 93, 162, 0.22);
  background: rgba(255, 93, 162, 0.08);
}

@keyframes aiTypingPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleX(0.45);
  }

  50% {
    opacity: 0.9;
    transform: scaleX(1);
  }
}

.delete-account-btn {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ff7777;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin: 10px 0 8px;
}

.app-view:not(#homeView) .trades-overview-title,
.app-view:not(#homeView) .trade-card-title,
.app-view:not(#homeView) .history-title,
.app-view:not(#homeView) .affiliate-title,
.app-view:not(#homeView) .profile-title {
  font-size: 18px;
}

.app-view:not(#homeView) .trades-section-title,
.app-view:not(#homeView) .positions-tab,
.app-view:not(#homeView) .trades-action-btn,
.app-view:not(#homeView) .settings-label,
.app-view:not(#homeView) .delete-account-btn {
  font-size: 14px;
}

.app-view:not(#homeView) .profile-overline {
  font-size: 14px;
}

.app-view:not(#homeView) .profile-name-large {
  font-size: 24px;
}

.app-view:not(#homeView) .trades-summary-row,
.app-view:not(#homeView) .affiliate-summary-row {
  gap: 8px;
}

.app-view:not(#homeView) .trades-summary-item b,
.app-view:not(#homeView) .affiliate-summary-item b {
  font-size: 14px;
  line-height: 1.1;
}

.app-view:not(#homeView) .trade-symbol {
  font-size: 13px;
}

.app-view:not(#homeView) .trade-pl b,
.app-view:not(#homeView) .closed-trade-profit {
  font-size: 14px;
}

.app-view:not(#homeView) .trade-close-btn {
  padding: 0 9px;
  font-size: 11px;
}

.app-view:not(#homeView) .affiliate-overview-title,
.app-view:not(#homeView) .affiliate-section-title,
.app-view:not(#homeView) .tier-title,
.app-view:not(#homeView) .tier-users,
.app-view:not(#homeView) .tier-earned {
  font-size: 13px;
}

.app-view:not(#homeView) .affiliate-member-name {
  font-size: 12px;
}

.banking-summary {
  border-radius: 16px;
  padding: 12px;
  background: rgba(45, 225, 194, 0.08);
  border: 1px solid rgba(45, 225, 194, 0.18);
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-mid);
}

.banking-summary b {
  display: block;
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 3px;
}

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  z-index: 10;
  border-radius: 26px;
  padding: 10px 10px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #000000c4;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  color: var(--text-low);
  transition: color 0.2s ease;
}

.nav-item:nth-child(3) {
  position: relative;
  color: #ff6acc;
}

.nav-item.active {
  color: var(--text-hi);
}

.nav-item:nth-child(3).active {
  position: relative;
  color: #467eff;
}

.nav-item:nth-child(3) {
  position: relative;
}

.nav-item:nth-child(3)::after {
  content: "";
  position: absolute;
  height: 8px;
  aspect-ratio: 1;
  background-color: #5e8cff;
  border-radius: 50%;
  bottom: -4px;
  box-shadow: 0 0 10px #2671ff;
  left: 50%;
  translate: -50%;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.35),
    rgb(4 28 136 / 18%)
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: -1;
}

.nav-item:nth-child(3).active::before {
  background: linear-gradient(135deg, rgb(0 0 0 / 76%), rgb(192 162 0 / 18%));
  border: 1px solid rgb(85 169 255);
}

.nav-icon {
  font-size: 17px;
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* fade-in on load */
.content > * {
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.content > *:nth-child(2) {
  animation-delay: 0.05s;
}

.content > *:nth-child(3) {
  animation-delay: 0.1s;
}

.content > *:nth-child(4) {
  animation-delay: 0.15s;
}

.content > *:nth-child(5) {
  animation-delay: 0.2s;
}

.content > *:nth-child(6) {
  animation-delay: 0.25s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.credit {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(245, 246, 251, 0.28);
  letter-spacing: 0.02em;
  z-index: 1;
}

/* ---------- mobile: app fills the viewport, no frame ---------- */
/* @media (max-width: 640px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .stage {
    padding: 0;
    display: contents;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-deep-2);
    overflow: visible;
  }

  .phone {
    display: contents;
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    display: contents;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    overflow: visible;
  }

  .content {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible !important;
  }

  .credit {
    display: none;
  }
} */

@media (max-width: 640px) {
  html,
  body {
    height: 100%;
    overflow: hidden; /* .content is the only scroll region, like on desktop */
  }

  .stage {
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-deep-2);
  }

  .phone {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    border-radius: 0;
    /* keep position: relative, overflow: hidden, width/height: 100% from the base .screen rule */
  }

  .app-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header-actions {
    gap: 5px;
  }

  .header-contact {
    padding: 0 8px;
    font-size: 10px;
  }

  .notification-btn {
    width: 36px;
    height: 36px;
  }

  .streak-pill {
    padding-left: 8px;
    padding-right: 8px;
  }

  .streak-pill span.num {
    font-size: 11px;
  }

  .credit {
    display: none;
  }
}
/* ---------- clickable states ---------- */
.qa-btn,
.mission-card,
.badge,
.section-link,
.act-item-clickable {
  cursor: pointer;
  user-select: none;
}

.mission-card.done {
  opacity: 0.72;
}

.mission-card .claim-check {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 13px;
  color: var(--mint);
  display: none;
}

.mission-card.done .claim-check {
  display: block;
}

/* ---------- toast ---------- */
.toast-stack {
  position: absolute;
  top: 56px;
  left: 16px;
  right: 16px;
  z-index: 600000000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(
    155deg,
    rgba(20, 22, 38, 0.92),
    rgba(20, 22, 38, 0.82)
  );
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  transform: translateY(-24px);
  opacity: 0;
  animation:
    toastIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    toastOut 0.4s ease forwards 2.6s;
}

.toast i {
  font-size: 15px;
  color: var(--mint);
  flex: 0 0 auto;
}

.toast.warn i {
  color: var(--pink);
}

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

@keyframes toastOut {
  to {
    transform: translateY(-14px);
    opacity: 0;
  }
}

/* ---------- general alert modal ---------- */
.alert-backdrop {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 22px;
  background: rgba(4, 5, 10, 0.64);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.alert-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.alert-modal {
  position: relative;
  width: 100%;
  padding: 28px 24px 22px;
  border: 1px solid var(--glass-border);
  border-top: 0;
  border-radius: 0 0 42px 42px;
  background: linear-gradient(
    165deg,
    rgba(35, 37, 61, 0.98),
    rgba(14, 16, 30, 0.98)
  );
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(139, 92, 246, 0.12);
  text-align: center;
  transform: translateY(-120%) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.alert-backdrop.open .alert-modal {
  transform: translateY(0) scale(1);
}

.alert-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(45, 225, 194, 0.14);
  color: var(--mint);
  font-size: 22px;
}

.alert-modal.error .alert-icon,
.alert-modal.danger .alert-icon,
.alert-modal.warning .alert-icon,
.alert-modal.warn .alert-icon {
  background: rgba(255, 93, 162, 0.14);
  color: var(--pink);
}

.alert-modal.success .alert-icon {
  background: rgba(45, 225, 194, 0.14);
  color: var(--mint);
}

.alert-modal h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.alert-modal p {
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.alert-confirm {
  width: 100%;
  margin-top: 20px;
  padding: 11px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  font: 800 13px var(--font-ui);
  cursor: pointer;
}

/* ---------- internal loaders ---------- */
.page-loader {
  position: absolute;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at 30% 28%,
      rgba(139, 92, 246, 0.28),
      transparent 34%
    ),
    radial-gradient(
      circle at 76% 70%,
      rgba(45, 225, 194, 0.22),
      transparent 36%
    ),
    rgba(10, 12, 24, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1;
}

.loader-card {
  min-width: 176px;
  border-radius: 22px;
  padding: 20px 22px;
  text-align: center;
  /* background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)); */
  /* border: 1px solid rgba(255, 255, 255, 0.18); */
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
}

.loader-mark {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--mint);
  border-right-color: var(--pink);
  animation: loaderSpin 0.8s linear infinite;
}

.loader-mark::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--mint));
  box-shadow: 0 0 18px rgba(45, 225, 194, 0.5);
}

.loader-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-hi);
  margin-bottom: 3px;
}

.loader-sub {
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 700;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- action sheet ---------- */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(4, 5, 10, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: 100%;
  max-height: 88%;
  border-radius: 28px 28px 0 0;
  padding: 10px 22px 28px;
  background: linear-gradient(165deg, rgb(24 26 44), rgb(14 16 30 / 60%));
  border: 1px solid var(--glass-border);
  border-bottom: none;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.sheet-backdrop.open .sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  margin: 8px auto 18px;
  flex: 0 0 auto;
}

#sheetContent {
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

#sheetContent::-webkit-scrollbar {
  display: none;
}

.sheet-loading {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sheet-loading .loader-card {
  min-width: 160px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 18px 0 12px;
}

.sheet-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sheet-title .sheet-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  font-size: 15px;
}

.sheet-title h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.sheet-sub {
  font-size: 12px;
  color: var(--text-mid);
  margin: 6px 0 18px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-low);
  display: block;
  margin-bottom: 7px;
}

.field .input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
}

.field .input-wrap:focus-within {
  border-color: var(--mint);
}

.field .input-wrap span.prefix {
  color: var(--text-mid);
  font-weight: 700;
  font-family: var(--font-display);
}

.field input,
.field select {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}

.field select option {
  background: #14162a;
  color: var(--text-hi);
}

.field-hint {
  font-size: 11px;
  color: var(--text-low);
  margin-top: 6px;
}

.field-hint.error {
  color: var(--pink);
}

.field input[type="file"] {
  font-size: 11px;
  color: var(--text-mid);
}

.field input[type="file"]::file-selector-button {
  border: none;
  border-radius: 10px;
  padding: 7px 10px;
  margin-right: 10px;
  cursor: pointer;
  background: rgba(45, 225, 194, 0.14);
  color: var(--mint);
  font-family: var(--font-ui);
  font-weight: 700;
}

.zar-live {
  color: var(--mint);
  font-weight: 700;
}

.deposit-method-fields {
  margin-top: -2px;
}

.deposit-details-card {
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  color: var(--text-mid);
  line-height: 1.55;
}

.deposit-details-card b {
  display: block;
  margin-bottom: 5px;
  color: var(--text-hi);
  font-size: 12px;
}

.deposit-details-card .code-line {
  display: block;
  margin-top: 4px;
  color: var(--mint);
  font-family: var(--font-display);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
}

.chip.active {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.35),
    rgba(45, 225, 194, 0.2)
  );
  color: var(--text-hi);
  border-color: rgba(255, 255, 255, 0.25);
}

.choice-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.choice-row:has(input:checked) {
  border-color: rgba(45, 225, 194, 0.44);
  background: rgba(45, 225, 194, 0.09);
}

.choice-row input {
  accent-color: var(--mint);
}

.choice-swatch {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.choice-swatch.theme-default {
  background:
    linear-gradient(135deg, rgba(13, 16, 36, 0.1), rgba(0, 0, 0, 0.5)),
    url(images/bg1.png) center / cover;
}

.choice-swatch.theme-gradient {
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(139, 92, 246, 0.85),
      transparent 42%
    ),
    radial-gradient(
      circle at 82% 80%,
      rgba(45, 225, 194, 0.85),
      transparent 44%
    ),
    #0d1024;
}

.choice-swatch.theme-black {
  background: #000;
}

.choice-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.choice-copy strong {
  color: var(--text-hi);
  font-size: 13px;
}

.choice-copy small {
  color: var(--text-mid);
  font-size: 11px;
  line-height: 1.35;
}

.sheet-confirm {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(120deg, var(--violet), var(--mint));
  color: #0a0c18;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.35);
  transition: transform 0.12s ease;
}

.sheet-confirm:active {
  transform: scale(0.97);
}

.sheet-cancel {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  background: transparent;
  color: var(--text-mid);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
}

/* ---------- top auth bar ---------- */
.top-auth-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: transform 0.12s ease;
}

.auth-btn:active {
  transform: scale(0.94);
}

.auth-btn.login {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-hi);
}

.auth-btn.register {
  background: linear-gradient(120deg, var(--violet), var(--mint));
  color: #0a0c18;
  border-color: transparent;
}

/* ---------- shared auth form bits ---------- */
.link-text {
  color: var(--mint);
  font-weight: 700;
  cursor: pointer;
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-mid);
}

.forgot-link {
  text-align: right;
  margin: -6px 0 16px;
  font-size: 11.5px;
}

.pass-toggle {
  color: var(--text-low);
  cursor: pointer;
  font-size: 13px;
}

/* ---------- playful welcome (register) form ---------- */
.welcome-wrap {
  text-align: center;
  padding-top: 2px;
}

.welcome-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.4);
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-sub {
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.5;
  padding: 0 6px;
  margin-bottom: 20px;
}

.welcome-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--mint));
  border: 2px solid rgba(255, 255, 255, 0.18);
  transition: background 0.3s ease;
}

.username-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.username-input-wrap:focus-within {
  border-color: var(--mint);
}

.at-prefix {
  color: var(--text-low);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.username-input-wrap input {
  border: none;
  background: none;
  outline: none;
  color: var(--text-hi);
  text-align: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  width: 100%;
}

.username-input-wrap input.sm {
  font-size: 15px;
}

.availability-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-low);
  margin-bottom: 18px;
  min-height: 14px;
}

.availability-text.ok {
  color: var(--mint);
}

.availability-text.bad {
  color: var(--pink);
}

.welcome-cta {
  opacity: 1;
}

.welcome-cta:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- referral sheet ---------- */
.referral-code-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.referral-code-wrap .code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--mint);
}

.referral-code-wrap .copy-btn {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(45, 225, 194, 0.14);
  color: var(--mint);
  border: 1px solid rgba(45, 225, 194, 0.3);
}

.referral-stats-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.referral-stat {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.referral-stat .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.referral-stat .lbl {
  font-size: 10px;
  color: var(--text-low);
  font-weight: 600;
  margin-top: 2px;
}

/* ---------- rewards game modal ---------- */
.rewards-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rewards-top-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rewards-top-label {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-low);
}

.rewards-top-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--text-hi);
}

.earn-btn-sm {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background: linear-gradient(120deg, var(--gold), var(--pink));
  color: #1a0e08;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(255, 93, 162, 0.35);
  transition: transform 0.15s ease;
  white-space: nowrap;
}

.earn-btn-sm:active {
  transform: scale(0.94);
}

.earn-btn-sm:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-low);
  box-shadow: none;
  cursor: not-allowed;
}

.reward-history-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -4px 0 14px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-hi);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
}

.reward-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.reward-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-history-item.clickable {
  cursor: pointer;
}

.reward-history-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 4px;
}

.reward-history-meta {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text-low);
}

.reward-history-side {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.reward-history-amount {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-hi);
}

.reward-status {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reward-status.pending {
  color: var(--gold);
  background: rgba(255, 184, 77, 0.12);
  border: 1px solid rgba(255, 184, 77, 0.28);
}

.reward-status.approved {
  color: var(--mint);
  background: rgba(45, 225, 194, 0.12);
  border: 1px solid rgba(45, 225, 194, 0.28);
}

.reward-status.revoked {
  color: var(--pink);
  background: rgba(255, 93, 162, 0.12);
  border: 1px solid rgba(255, 93, 162, 0.28);
}

.reward-task-card {
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 14px;
}

.reward-task-title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-hi);
}

.reward-task-desc {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-mid);
}

.reward-task-progress {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
}

.reward-task-track {
  height: 7px;
  border-radius: 999px;
  /* overflow: hidden; */
  margin-top: 7px;
  background: rgb(255 255 255 / 12%);
  position: relative;
  width: 100%;
}

.reward-task-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--mint));
}

.reward-task-expiry {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

/* ---------- speedometer reward gauge ---------- */
.gauge-stage {
  text-align: center;
  padding: 4px 0 4px;
}

.gauge-wrap {
  position: relative;
  width: 250px;
  height: 158px;
  margin: 4px auto 6px;
}

.gauge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gauge-tick {
  stroke: rgba(245, 246, 251, 0.22);
  stroke-width: 2;
  stroke-linecap: round;
}

.gauge-tick.major {
  stroke: rgba(245, 246, 251, 0.4);
  stroke-width: 2.5;
}

.gauge-endlabel {
  position: absolute;
  bottom: 2px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-low);
  letter-spacing: 0.02em;
}

.gauge-endlabel.min {
  left: 2px;
}

.gauge-endlabel.max {
  right: 2px;
}

.gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 5px;
  height: 98px;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(-90deg);
  will-change: transform;
  z-index: 4;
}

.gauge-needle-shape {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--mint) 0%,
    var(--violet-soft) 55%,
    transparent 100%
  );
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  filter: drop-shadow(0 0 6px rgba(45, 225, 194, 0.65));
  border-radius: 2px 2px 0 0;
}

.gauge-needle.settled .gauge-needle-shape {
  background: linear-gradient(
    180deg,
    var(--gold) 0%,
    var(--pink) 60%,
    transparent 100%
  );
  filter: drop-shadow(0 0 8px rgba(255, 184, 77, 0.7));
}

.gauge-pivot {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  z-index: 5;
  background: radial-gradient(
    circle at 35% 30%,
    #ffffff,
    var(--violet-soft) 55%,
    var(--violet) 100%
  );
  box-shadow:
    0 0 14px rgba(139, 92, 246, 0.7),
    0 0 0 4px rgba(139, 92, 246, 0.14);
}

.gauge-pivot.settled {
  background: radial-gradient(
    circle at 35% 30%,
    #fff,
    var(--gold) 55%,
    var(--pink) 100%
  );
  box-shadow:
    0 0 16px rgba(255, 93, 162, 0.75),
    0 0 0 4px rgba(255, 93, 162, 0.16);
}

.gauge-readout {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  color: var(--text-hi);
  margin: 2px 0 0;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

.gauge-readout.settled {
  background: linear-gradient(120deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gauge-status-text {
  font-size: 12px;
  color: var(--text-mid);
  margin: 2px 0 16px;
  min-height: 16px;
  font-weight: 600;
}

.gauge-status-text.settled {
  color: var(--mint);
}

.deduct-btn {
  outline: none;
  border: none;
  padding: 9px 8px;
  border-radius: 50px;
  background: linear-gradient(to bottom right, #ff8b8b, #ffffff);
  margin: 2px;
  border: 1px solid #acacac;
  font-weight: bold;
  cursor: pointer;
}

.sheet-loader {
  --color-1: #fff;
  --size: 1px;

  width: calc(14 * var(--size));
  height: calc(14 * var(--size));
  border-radius: 50%;
  display: block;
  margin: calc(20 * var(--size)) auto;
  position: relative;
  background: var(--color-1);
  box-sizing: border-box;
  animation: blink 1.2s -0.6s ease-in-out infinite;
}
.sheet-loader::before,
.sheet-loader::after {
  content: "";
  position: absolute;
  top: 0;
  width: calc(14 * var(--size));
  height: calc(14 * var(--size));
  border-radius: 50%;
  background: var(--color-1);
  box-sizing: border-box;
}
.sheet-loader::before {
  left: calc(-22 * var(--size));
  animation: blink 1.2s -0.8s ease-in-out infinite;
}
.sheet-loader::after {
  left: calc(22 * var(--size));
  animation: blink 1.2s -0.4s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.sheet-loader-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #000000a6;
  border-radius: 25px 25px 0 0;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  -backdrop-filter: blur(5px);
  z-index: 10;
}

.sheet.is-loading .sheet-loader-container {
  display: flex;
}

/* =====================================================================
   Trades dashboard (retouched) — TRADES / OVERVIEW tabbed portfolio page
   Reuses .trades-overview-card / .trades-summary-* / .trades-action-btn /
   .trade-stack / .trade-ticket / .closed-trade-* tokens already defined
   above; this block adds the pieces the new layout needs and a couple of
   targeted overrides (kept additive so nothing already relying on the
   base rules further up the file is disturbed).
   ===================================================================== */

/* ---- top TRADES / OVERVIEW tab switch ---- */
.trades-tabbar {
  display: flex;
  gap: 24px;
  margin: 2px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.trades-tab {
  background: none;
  border: 0;
  padding: 0 0 11px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-low);
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.trades-tab:active {
  transform: translateY(1px);
}

.trades-tab.active {
  color: var(--text-hi);
}

.trades-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--violet), var(--violet-soft));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.65);
}

/* ---- pane switching ---- */
.trades-pane {
  display: none;
}

.trades-pane.active {
  display: block;
  animation: tradesPaneIn 0.25s ease;
}

@keyframes tradesPaneIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

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

/* ---- overview card: header row (title block + sparkline) ---- */
.trades-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.trades-overview-sub {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 2px;
}

.trades-spark {
  width: 118px;
  height: 46px;
  flex: 0 0 auto;
  overflow: visible;
}

/* ---- overview card: per-stat icon badge ---- */
.trades-summary-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  margin-bottom: 8px;
}

.trades-summary-icon.violet {
  background: linear-gradient(135deg, var(--violet), var(--violet-soft));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45);
}

.trades-summary-icon.mint {
  background: linear-gradient(135deg, #66f4e4, var(--mint));
  box-shadow: 0 0 12px rgba(45, 225, 194, 0.5);
}

/* ---- deposit / withdraw action buttons: icon + title/subtitle + chevron ---- */
.trades-action-btn {
  height: 60px;
  padding: 0 14px 0 12px;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
}

.trades-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(16, 21, 34, 0.16);
}

.trades-action-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.trades-action-text b {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.trades-action-text span {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.trades-action-chevron {
  font-size: 13px;
  opacity: 0.55;
  flex: 0 0 auto;
}

/* ---- section headers with trailing count pill ---- */
.trades-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 12px;
}

.trades-section-sub {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 2px;
}

.count-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 13px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11.5px;
  white-space: nowrap;
}

.count-pill.mint {
  color: #8ff7ef;
  background: rgba(45, 225, 194, 0.14);
  border: 1px solid rgba(45, 225, 194, 0.4);
}

.count-pill.muted {
  color: var(--text-mid);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ---- running trade tickets: individual glass cards + mini sparkline ---- */
.trade-ticket {
  grid-template-columns: 9px 1fr 44px auto auto;
}

.trade-ticket.closed {
  grid-template-columns: 9px 1fr auto auto;
}

.trade-info {
  min-width: 0;
}

.trade-mini-spark {
  width: 44px;
  height: 22px;
  display: block;
}

/* ---- closed trades: coloured accent bar + chevron ---- */
.trade-accent-bar {
  align-self: stretch;
  width: 4px;
  border-radius: 4px;
  background: var(--mint);
}

.trade-accent-bar.down {
  background: #ff6d91;
}

.trade-chevron {
  color: var(--text-low);
  font-size: 14px;
  justify-self: end;
}

/* ---- overview pane: asset allocation bars ---- */
.alloc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.alloc-label {
  flex: 0 0 38px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-mid);
}

.alloc-bar-track {
  flex: 1;
  height: 8px;
  min-width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.alloc-bar-fill {
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

.alloc-value {
  flex: 0 0 36px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-display);
}

/* ---- small-screen tightening (narrow phones / folded devices) ---- */
@media (max-width: 380px) {
  .trades-overview-card {
    padding: 14px 15px 16px;
  }

  .trades-spark {
    width: 84px;
    height: 38px;
  }

  .trades-summary-row {
    gap: 8px;
  }

  .trades-summary-item + .trades-summary-item {
    padding-left: 8px;
  }

  .trades-summary-item b {
    font-size: 15.5px;
  }

  .trades-actions {
    gap: 10px;
  }

  .trades-action-btn {
    height: 56px;
    padding: 0 10px;
  }

  .trades-action-text b {
    font-size: 13.5px;
  }

  .trades-action-text span {
    font-size: 10px;
  }

  .trade-ticket {
    grid-template-columns: 9px 1fr auto auto;
  }

  .trade-mini-spark {
    display: none;
  }

  .stats-grid {
    gap: 8px;
  }
}

.sheet-lock {
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  display: none;
}

.sheet.locked .sheet-lock {
  display: block;
}

.sheet-lock i {
  color: #ff4646;
  /* text-shadow: 0 0 20px #ff4f4f; */
}

.int-loader {
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid #0000;
  border-right-color: #ffffff2e;
  position: relative;
  animation: l24 1s infinite linear;
}
.int-loader:before,
.int-loader:after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: inherit;
  animation: inherit;
  animation-duration: 2s;
}
.int-loader:after {
  animation-duration: 4s;
}
@keyframes l24 {
  100% {
    transform: rotate(1turn);
  }
}

.int-loader-cont {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: #000000db;
  z-index: 100000;
}

.int-loader-int {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  height: max-content;
  transform: translate(-50%, -50%);
}

.sub-title-text {
  display: block;
  font-size: 11px;
  font-weight: normal;
  color: #68ff88;
}

.sub-title-text.sub-danger {
  color: #ff6868;
}
