/* ================================================================
   NLO Portal — Refined Product UI System
   ================================================================ */

:root {
  --bg: #08090e;
  --bg-elev-1: rgba(255, 255, 255, 0.02);
  --bg-elev-2: rgba(255, 255, 255, 0.04);
  --bg-elev-3: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(10, 12, 20, 0.78);
  --text-primary: #f0f2f8;
  --text-secondary: #8a8f98;
  --text-muted: rgba(240, 242, 248, 0.45);
  --orange: #ff6723;
  --orange-soft: rgba(255, 103, 35, 0.11);
  --green: #2dd47b;
  --green-soft: rgba(45, 212, 123, 0.12);
  --red: #ff3b5c;
  --red-soft: rgba(255, 59, 92, 0.12);
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --content-max-width: 1240px;
  --content-padding: 38px;
  --header-height: 78px;
  --transition-fast: 0.16s ease;
  --transition: 0.25s ease;

  /* Liquid Glass tokens */
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-bg-hover: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hover: rgba(255, 255, 255, 0.16);
  --glass-blur: blur(40px);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.2);
  --glass-shadow-lg: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 48px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -240px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 103, 35, 0.1) 0%, rgba(255, 103, 35, 0) 68%);
}

body::after {
  bottom: -320px;
  left: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(65, 124, 255, 0.12) 0%, rgba(65, 124, 255, 0) 72%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Sora", sans-serif;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.1vw, 2.95rem);
}

h2 {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  color: var(--text-secondary);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

strong {
  font-weight: 600;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* ================================================================
   Bottom Tab Bar
   ================================================================ */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 14, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bottom-bar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 420px;
}

.bottom-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-bar-item:hover {
  color: var(--text-secondary);
}

.bottom-bar-item.active {
  color: var(--orange);
}

.bottom-bar-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-bar-icon svg {
  width: 22px;
  height: 22px;
}

.bottom-bar-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ================================================================
   Page Header Bar (in-page top bar for portfolio etc.)
   ================================================================ */

.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.page-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 0;
}

.page-header-logo-shell {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 103, 35, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 103, 35, 0.18);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.page-header-logo {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-header-name {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.page-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 12px;
}

.page-header-nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.page-header-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.page-header-nav-link.active {
  color: var(--orange);
  background: rgba(255, 103, 35, 0.08);
}

.page-header-wallet-menu {
  position: relative;
}

.page-header-wallet {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 12px 0 14px;
  background: linear-gradient(145deg, rgba(255, 103, 35, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 103, 35, 0.12);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.page-header-wallet:hover,
.page-header-wallet[aria-expanded="true"] {
  background: linear-gradient(145deg, rgba(255, 103, 35, 0.16), rgba(255, 255, 255, 0.06));
  color: var(--text-primary);
  border-color: rgba(255, 103, 35, 0.22);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.page-header-wallet:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 103, 35, 0.18);
}

.page-header-wallet-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.page-header-wallet-label {
  font-family: "Inter", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.page-header-wallet-address {
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.1;
}

.wallet-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.wallet-chevron svg {
  width: 14px;
  height: 14px;
}

.page-header-wallet[aria-expanded="true"] .wallet-chevron {
  color: var(--text-primary);
  transform: rotate(180deg);
}

.page-header-wallet-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 194px;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(18, 22, 34, 0.96), rgba(12, 14, 24, 0.92));
  border: 1px solid rgba(255, 103, 35, 0.12);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  gap: 4px;
  z-index: 30;
}

.page-header-wallet-dropdown[hidden] {
  display: none !important;
}

.wallet-menu-item {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  padding: 11px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.wallet-menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.wallet-menu-item-danger {
  color: #ff9a9a;
}

.wallet-menu-item-danger:hover {
  background: rgba(255, 59, 92, 0.12);
  color: #ffd4dc;
}

.wallet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(33, 214, 127, 0.12);
}

.demo-badge-inline {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.12em;
  margin-left: 2px;
}

/* ================================================================
   Page Back Button
   ================================================================ */

.page-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  margin-bottom: 20px;
}

.page-back:hover {
  background: var(--bg-elev-2);
  color: var(--text-primary);
  border-color: var(--border);
}

.page-back svg {
  width: 18px;
  height: 18px;
}

/* ================================================================
   Splash Page
   ================================================================ */

.splash-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px var(--content-padding) 100px;
  position: relative;
  z-index: 1;
}

.splash-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  filter: drop-shadow(0 0 32px rgba(255, 103, 35, 0.25));
}

.splash-logo svg {
  width: 100%;
  height: 100%;
}

.splash-title {
  font-family: "Sora", sans-serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.splash-desc {
  max-width: 42ch;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 36px;
}

.splash-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(380px, 100%);
}

.splash-actions .btn-primary {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  font-size: 1rem;
}

.splash-secondary-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.splash-secondary-row .btn {
  flex: 1;
  height: 44px;
}

/* ================================================================
   Onboard Page
   ================================================================ */

.onboard-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px var(--content-padding) 100px;
  position: relative;
  z-index: 1;
}

.onboard-topbar {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  width: min(960px, calc(100% - (var(--content-padding) * 2)));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.onboard-connect-btn {
  min-width: 168px;
  height: 40px;
  border-radius: 14px;
  white-space: nowrap;
}

.onboard-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--orange-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 24px;
}

.onboard-title {
  font-family: "Sora", sans-serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.onboard-desc {
  color: var(--text-secondary);
  max-width: 38ch;
  margin-bottom: 32px;
}

.onboard-form {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboard-form .form-label {
  text-align: left;
}

.onboard-form .form-input {
  height: 54px;
  font-size: 1.05rem;
  border-radius: 16px;
  text-align: center;
}

.onboard-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.onboard-form .btn-primary {
  height: 52px;
  border-radius: 16px;
  font-size: 1rem;
  margin-top: 8px;
}

.splash-page-redirect {
  gap: 16px;
}

/* ================================================================
   Portfolio Page
   ================================================================ */

.portfolio-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 20px 40px;
}

.portfolio-empty-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  opacity: 0.7;
}

.portfolio-empty-logo svg {
  width: 100%;
  height: 100%;
}

.portfolio-empty-title {
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.portfolio-empty-desc {
  color: var(--text-secondary);
  max-width: 36ch;
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.portfolio-empty-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(340px, 100%);
}

.portfolio-empty-actions .btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
}

.portfolio-hero {
  text-align: center;
  margin-bottom: 20px;
}

.portfolio-hero-eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.portfolio-hero-value {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-shadow: 0 0 60px rgba(255, 103, 35, 0.12);
}

.portfolio-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.portfolio-stat-card {
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  padding: 14px;
  text-align: left;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.portfolio-stat-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

.buffer-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.buffer-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  cursor: help;
  flex-shrink: 0;
  transition: color 0.2s;
}

.buffer-tooltip-wrap:hover .buffer-tooltip-icon {
  color: var(--orange);
}

.buffer-tooltip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  padding: 10px 12px;
  background: rgba(20, 22, 34, 0.97);
  border: 1px solid rgba(255, 103, 35, 0.2);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 100;
  pointer-events: none;
}

.buffer-tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(255, 103, 35, 0.2);
}

.buffer-tooltip-wrap:hover .buffer-tooltip-text {
  display: block;
}

.portfolio-stat-card-toggle {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.portfolio-stat-card-toggle:hover,
.portfolio-stat-card-toggle[aria-expanded="true"] {
  border-color: rgba(255, 103, 35, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.portfolio-stat-card-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 103, 35, 0.14);
}

.portfolio-stat-card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portfolio-stat-card-static {
  text-align: left;
}

.portfolio-stat-card-static .portfolio-stat-card-main {
  width: 100%;
}

.portfolio-stat-card-static .stat-value {
  font-variant-numeric: tabular-nums;
}

.portfolio-stat-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.portfolio-stat-card-action-text {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-stat-card-action-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.portfolio-stat-card-action-icon svg {
  width: 16px;
  height: 16px;
}

.portfolio-stat-card-toggle[aria-expanded="true"] .portfolio-stat-card-action {
  color: var(--orange);
}

.portfolio-stat-card-toggle[aria-expanded="true"] .portfolio-stat-card-action-icon {
  transform: rotate(180deg);
}

.portfolio-stat-card .stat-label {
  margin-bottom: 6px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
}

.portfolio-stat-card .stat-value {
  font-size: 1rem;
}

.deposit-history-panel {
  border: 1px solid rgba(255, 103, 35, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(22, 24, 36, 0.98), rgba(12, 14, 22, 0.98)),
    radial-gradient(circle at top right, rgba(255, 103, 35, 0.10), transparent 34%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  padding: 20px;
  margin: -8px 0 20px;
}

.deposit-history-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.deposit-history-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.deposit-history-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 54ch;
  line-height: 1.55;
}

.deposit-history-modes {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.deposit-history-mode {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.deposit-history-mode:hover,
.deposit-history-mode.active {
  border-color: rgba(255, 133, 79, 0.34);
  background: linear-gradient(180deg, rgba(255, 122, 52, 0.22), rgba(255, 103, 35, 0.12));
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.deposit-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.deposit-history-summary-card {
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deposit-history-summary-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.deposit-history-summary-value {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
}

.deposit-chart-wrap {
  min-height: 320px;
}

.deposit-chart-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deposit-chart-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.deposit-chart-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 163, 114, 0.88);
  margin-bottom: 6px;
}

.deposit-chart-caption {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 52ch;
}

.deposit-chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.deposit-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.deposit-chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.deposit-chart-legend-dot-confirmed {
  background: linear-gradient(180deg, #ff8f56 0%, #ff5c1c 100%);
}

.deposit-chart-legend-dot-pending {
  background: linear-gradient(180deg, rgba(255, 198, 139, 0.95) 0%, rgba(255, 152, 79, 0.4) 100%);
}

.deposit-chart-legend-dot-total {
  background: linear-gradient(180deg, #ff8f56 0%, #ff5c1c 100%);
  box-shadow: 0 0 0 3px rgba(255, 103, 35, 0.12);
}

.deposit-chart-canvas-shell {
  position: relative;
  height: 300px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at top left, rgba(255, 103, 35, 0.06), transparent 36%);
  padding: 16px 14px 10px;
  overflow: hidden;
}

.deposit-chart-canvas-shell canvas {
  width: 100% !important;
  height: 100% !important;
}

.deposit-chart-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.deposit-chart-baseline {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1.5;
}

.deposit-chart-axis {
  fill: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-family: "Inter", sans-serif;
}

.deposit-chart-value {
  fill: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

.deposit-chart-line {
  fill: none;
  stroke: #ff6f2c;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.deposit-chart-area {
  fill: rgba(255, 111, 44, 0.15);
}

.deposit-chart-dot {
  fill: #ff8d55;
  stroke: rgba(12, 14, 20, 0.9);
  stroke-width: 2;
}

.portfolio-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

.portfolio-actions .btn {
  height: 44px;
  border-radius: 14px;
}

.strategy-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.strategy-list-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.strategy-list-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

.strategy-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.strategy-list-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.strategy-list-icon.icon-orange { background: var(--orange-soft); }
.strategy-list-icon.icon-blue { background: rgba(126, 166, 255, 0.15); }
.strategy-list-icon.icon-green { background: var(--green-soft); }

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

.strategy-list-name {
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.strategy-list-sub {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 2px;
}

.strategy-list-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.strategy-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.strategy-value-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.strategy-value-amount {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

/* Strategy card expand/collapse */
.strategy-list-card {
  cursor: pointer;
}

/* ---- Strategy Detail View ---- */
.strat-detail-hero {
  margin-bottom: 6px;
}

.strat-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.strat-detail-title-row h1 {
  font-family: "Sora", sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
}

.strat-detail-bg-icon {
  flex-shrink: 0;
}

.strat-detail-eyebrow {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 4px;
}

.strat-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.strat-detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-soft);
  margin-top: 24px;
  margin-bottom: 16px;
}

.strat-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-family: "Inter", sans-serif;
}

.strat-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.strat-tab:hover {
  color: var(--text-primary);
}

.strat-positions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual position card (inside strategy detail) */
.strat-position-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px;
}

.strat-pos-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.strat-pos-card-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.strat-pos-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.strat-pos-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strat-pos-card-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.strat-pos-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.strat-pos-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.strat-pos-card-stat .stat-label {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.strat-pos-card-stat .stat-value {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

/* Rename button — always visible in strategy detail cards */
.position-rename-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  transition: opacity 0.15s, color 0.15s;
  line-height: 1;
  flex-shrink: 0;
}

.position-rename-btn.visible {
  opacity: 1;
}

.position-rename-btn:hover {
  color: var(--orange);
}

.position-rename-input {
  background: var(--bg-elev-1);
  border: 1px solid var(--orange);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 4px 10px;
  width: 160px;
  outline: none;
  font-family: "Inter", sans-serif;
}

/* ---- Breadcrumb Navigation ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 4px;
}

.breadcrumb button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.breadcrumb button:hover {
  color: var(--orange);
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.5;
  user-select: none;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ---- Position Detail View ---- */
.pos-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pos-detail-header h1 {
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.pos-detail-hero-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.pos-detail-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.pos-detail-hero-top .stat-label {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.pos-running-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--green);
  border: 1px solid rgba(45, 212, 123, 0.3);
  border-radius: 999px;
  padding: 3px 10px;
  line-height: 1;
  white-space: nowrap;
}

.pos-running-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.pos-detail-hero-value {
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  margin: 4px 0;
}

.pos-detail-hero-bg {
  display: none;
}

.pos-detail-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.pos-detail-hero-stats .stat-label {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.pos-detail-hero-stats .stat-value {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

/* Position tabs (pill style) */
.pos-detail-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 16px;
}

.pos-tab {
  background: none;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: all 0.15s;
}

.pos-tab:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.pos-tab.active {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}

/* Performance chart placeholder */
.perf-chart-wrap {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px;
  min-height: 200px;
}

.perf-chart-wrap svg {
  width: 100%;
  height: 180px;
}

/* Pool rows */
/* Pool filter dropdown */
.pool-filter-bar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.pool-filter-bar select {
  background: var(--bg-elev-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.pool-filter-bar select:focus {
  border-color: var(--orange);
}

.pool-row-exit-info {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

.pool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.pool-row:last-child {
  border-bottom: none;
}

.pool-row-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pool-row-pair {
  font-weight: 600;
  font-size: 0.9rem;
}

.pool-row-apy {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 500;
}

.pool-row-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pool-row-value {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}

.pool-row-invested {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Activity rows */
.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.act-stable { background: rgba(45, 212, 123, 0.12); color: var(--green); }
.activity-icon.act-shift { background: rgba(255, 103, 35, 0.12); color: var(--orange); }
.activity-icon.act-adjust { background: rgba(126, 166, 255, 0.12); color: #7ea6ff; }
.activity-icon.act-hold { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }

.activity-icon svg {
  width: 16px;
  height: 16px;
}

.activity-text {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ================================================================
   Withdraw Capital View
   ================================================================ */

.withdraw-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0;
  cursor: pointer;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
}

.withdraw-back svg {
  width: 22px;
  height: 22px;
}

.withdraw-title {
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.withdraw-amount-section {
  margin-bottom: 16px;
}

.withdraw-amount-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.withdraw-amount-input-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.withdraw-dollar-sign {
  font-family: "Sora", sans-serif;
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 600;
}

.withdraw-amount-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: "Sora", sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  width: 100%;
  outline: none;
}

.withdraw-amount-input::placeholder {
  color: var(--text-muted);
}

/* Hide number input spin buttons */
.withdraw-amount-input::-webkit-outer-spin-button,
.withdraw-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.withdraw-amount-input[type=number] {
  -moz-appearance: textfield;
}

/* ── Fund source pill ── */
.withdraw-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.withdraw-source-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.withdraw-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--orange);
  background: rgba(255, 103, 35, 0.08);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
}

.withdraw-source-pill .pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
}

/* ── Destination section ── */
.withdraw-dest-section {
  margin-bottom: 16px;
}

.withdraw-dest-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.withdraw-dest-card {
  padding: 12px 16px;
}

.withdraw-wallet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.withdraw-wallet-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.withdraw-wallet-addr {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.withdraw-receive-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.withdraw-token-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elev-2);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.82rem;
}

.withdraw-token-badge svg {
  width: 18px;
  height: 18px;
}

.withdraw-receive-value {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.withdraw-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
}

.withdraw-review-btn {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--orange);
  color: #110d09;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: filter var(--transition-fast), transform 0.1s;
}

.withdraw-review-btn:hover {
  filter: brightness(1.08);
}

.withdraw-review-btn:active {
  transform: scale(0.98);
}

.withdraw-review-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

/* ================================================================
   Success Page
   ================================================================ */

.success-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px var(--content-padding) 60px;
  position: relative;
  z-index: 1;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 0 12px rgba(45, 212, 123, 0.08), 0 0 40px rgba(45, 212, 123, 0.15);
}

.success-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--green);
}

.success-title {
  font-family: "Sora", sans-serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.success-desc {
  color: var(--text-secondary);
  max-width: 40ch;
  margin-bottom: 28px;
}

.success-breakdown {
  width: min(400px, 100%);
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 28px;
  text-align: left;
}

.success-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.success-breakdown-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.success-breakdown-total {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.breakdown-row + .breakdown-row {
  border-top: 1px solid var(--border-soft);
}

.breakdown-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

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

.breakdown-name {
  font-weight: 500;
  font-size: 0.88rem;
}

.breakdown-sub {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.breakdown-amount {
  text-align: right;
}

.breakdown-amount-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.breakdown-amount-value {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(400px, 100%);
}

.success-actions .btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
}

/* ================================================================
   Account / Settings Pages
   ================================================================ */

.account-page {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.account-page-title {
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.account-section {
  margin-bottom: 24px;
}

.account-section-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}

.account-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
}

.account-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.account-field + .account-field {
  border-top: 1px solid var(--border-soft);
}

.account-field-label {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.account-field-value {
  font-weight: 500;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-field-value.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.connected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

.account-btn-row {
  margin-top: 24px;
}

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--bg-elev-3);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle.active {
  background: var(--orange-soft);
  border-color: rgba(255, 103, 35, 0.42);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.toggle.active::after {
  transform: translateX(20px);
  background: var(--orange);
}

/* Inline edit field */
.inline-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-edit .form-input {
  height: 36px;
  font-size: 0.88rem;
  border-radius: 10px;
  width: 180px;
}

.inline-edit .btn-sm {
  height: 36px;
}

/* ================================================================
   Main layout
   ================================================================ */

.portal-main {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: calc(var(--content-padding) + 8px) var(--content-padding) 24px;
  position: relative;
  z-index: 1;
}

.page-eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.page-intro {
  max-width: 64ch;
  margin-top: 10px;
  color: var(--text-secondary);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 500;
}

/* ================================================================
   General components
   ================================================================ */

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

.card-lg {
  padding: 32px;
  border-radius: var(--radius-lg);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.82rem; }
.text-center { text-align: center; }

.hidden {
  display: none !important;
}

.divider {
  width: 100%;
  border: 0;
  height: 1px;
  background: var(--border-soft);
}

.empty-state {
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  color: var(--text-secondary);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-dim {
  color: var(--text-secondary);
  background: var(--bg-elev-2);
}

.badge-green {
  color: var(--green);
  background: var(--green-soft);
}

.badge-orange {
  color: var(--orange);
  background: var(--orange-soft);
}

.badge-blue {
  color: #7ea6ff;
  background: rgba(126, 166, 255, 0.15);
}

.pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border: 0;
  border-radius: var(--radius-pill);
  height: 30px;
  padding: 0 12px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.pill:hover {
  color: var(--text-primary);
}

.pill.active {
  color: var(--text-primary);
  background: var(--bg-elev-2);
}

.btn {
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
  transition: filter var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  background: var(--orange);
  color: #110d09;
  box-shadow: 0 4px 20px rgba(255, 103, 35, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px rgba(255, 103, 35, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--bg-elev-2);
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(255, 59, 92, 0.32);
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-sm {
  height: 34px;
  border-radius: 11px;
  font-size: 0.8rem;
  padding: 0 12px;
}

.btn-lg {
  height: 52px;
  border-radius: 16px;
  font-size: 0.98rem;
  padding: 0 18px;
}

.btn-full {
  width: 100%;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--bg-elev-1);
  padding: 0 14px;
  color: var(--text-primary);
  outline: 0;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-input:focus {
  border-color: rgba(255, 103, 35, 0.55);
  background: var(--bg-elev-2);
}

.form-input::placeholder {
  color: rgba(240, 242, 248, 0.34);
}

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238a8f98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.input-with-suffix {
  display: flex;
  gap: 10px;
}

.input-with-suffix .form-input {
  min-width: 0;
  flex: 1;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slider-row {
  display: grid;
  grid-template-columns: minmax(100px, 170px) 1fr 58px;
  align-items: center;
  gap: 12px;
}

.slider-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.slider-value {
  text-align: right;
  font-weight: 600;
}

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  border: 0;
  box-shadow: 0 0 0 5px rgba(255, 103, 35, 0.18);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 103, 35, 0.18);
  cursor: pointer;
}

.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.67rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.stat-value {
  font-size: 1.02rem;
  color: var(--text-primary);
  font-weight: 600;
  font-family: "Sora", sans-serif;
}

.stat-value.stat-large {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.stat-row + .stat-row {
  border-top: 1px solid var(--border-soft);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.pnl-positive { color: var(--green); }
.pnl-negative { color: var(--red); }

/* ================================================================
   Connect page
   ================================================================ */

.connect-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px var(--content-padding) 48px;
  position: relative;
  z-index: 1;
}

.connect-shell {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.connect-title {
  font-size: clamp(2.1rem, 5.2vw, 3rem);
  font-weight: 500;
}

.connect-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 52ch;
}

.connect-form {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.connect-wallet-input {
  height: 62px;
  font-size: 1.12rem;
  border-radius: 18px;
  background: var(--bg-elev-2);
  border-color: rgba(255, 255, 255, 0.12);
  padding: 0 20px;
}

.chain-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chain-pill {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  height: 34px;
  padding: 0 14px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.chain-pill:hover {
  color: var(--text-primary);
  border-color: var(--border);
}

.chain-pill.active {
  color: var(--text-primary);
  background: var(--bg-elev-2);
  border-color: rgba(255, 103, 35, 0.42);
}

.connect-cta {
  margin-top: 6px;
  height: 56px;
  border-radius: 18px;
  font-size: 1rem;
}

.connect-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ================================================================
   Discover page
   ================================================================ */

.discover-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.filter-tabs .pill {
  padding: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
}

.filter-tabs .pill.active {
  color: var(--text-primary);
}

.filter-chains .pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.filter-chains .pill.active {
  background: var(--bg-elev-3);
  color: var(--text-primary);
  border-color: rgba(255, 103, 35, 0.42);
}

.pool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.pool-card {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  padding: 18px;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.pool-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: transparent;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}

.pool-card:hover {
  background: var(--bg-elev-2);
  border-color: var(--border);
  transform: translateY(-1px);
}

.pool-card.selected {
  border-color: rgba(255, 103, 35, 0.5);
  background: rgba(255, 103, 35, 0.07);
}

.pool-card.selected::before {
  background: var(--orange);
}

.pool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pool-pair {
  font-family: "Sora", sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.3;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
}

.pool-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pool-meta {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
}

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

.selection-bar {
  position: sticky;
  bottom: 16px;
  margin-top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-soft);
}

/* ================================================================
   Simulate page
   ================================================================ */

.simulate-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.45fr);
  gap: 26px;
}

.simulate-left {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  align-self: start;
}

.simulate-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue-card {
  border-top: 1px solid var(--border-soft);
  padding: 10px 2px;
}

.queue-card:first-child {
  border-top: 0;
}

.phase-tracker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.phase-item {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  padding: 4px 9px;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.phase-item.phase-active {
  color: var(--orange);
  border-color: rgba(255, 103, 35, 0.42);
  background: var(--orange-soft);
}

.phase-item.phase-done {
  color: var(--green);
  border-color: rgba(45, 212, 123, 0.34);
}

.results-stat-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

/* ================================================================
   Deploy page
   ================================================================ */

.deploy-shell {
  width: min(760px, 100%);
  margin: 0 auto;
}

.strategy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 4px;
  background: var(--bg-elev-1);
}

.strategy-card {
  border: 0;
  border-radius: var(--radius-pill);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
}

.strategy-card + .strategy-card {
  margin-top: 2px;
}

.strategy-card.selected {
  background: var(--bg-elev-3);
}

.strategy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.strategy-icon svg {
  width: 18px;
  height: 18px;
}

.strategy-card strong {
  font-weight: 500;
}

.strategy-card-desc {
  display: none;
}

.deposit-focus {
  padding: 34px 0 26px;
  text-align: center;
}

.deposit-focus .form-label {
  margin-bottom: 12px;
}

.deposit-amount-wrap {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  padding: 8px 0;
}

.deposit-amount-input {
  width: 240px;
  background: transparent;
  border: 0;
  height: auto;
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-align: center;
  padding: 0;
}

.deposit-amount-input:focus {
  box-shadow: none;
}

.deposit-token-select {
  width: 100px;
  background: transparent;
  border: 0;
  text-align: right;
  color: var(--text-secondary);
  font-weight: 600;
  padding-right: 16px;
}

/* ================================================================
   Monitor page
   ================================================================ */

.monitor-hero {
  text-align: center;
  margin-bottom: 26px;
}

.monitor-hero-sub {
  margin-top: 8px;
  font-size: 1.05rem;
}

.monitor-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 30px;
}

.monitor-stat {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--bg-elev-1);
  padding: 12px;
  text-align: center;
}

.monitor-stat .stat-value {
  font-size: 1.02rem;
}

.position-card {
  padding: 18px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

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

.position-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.position-icon {
  font-size: 1rem;
}

.position-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.position-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.history-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-elev-1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.history-toggle:hover {
  background: var(--bg-elev-2);
  color: var(--text-primary);
}

.history-toggle .history-arrow {
  transition: transform var(--transition-fast);
}

.history-open .history-toggle .history-arrow {
  transform: rotate(180deg);
}

.history-content {
  margin-top: 12px;
}

.history-collapsed .history-content {
  display: none;
}

/* ================================================================
   Toast, loading, modal, animation
   ================================================================ */

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 103, 35, 0.22);
  border-top-color: var(--orange);
  animation: spin 0.6s linear infinite;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(5, 6, 10, 0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 2000;
  background: rgba(16, 18, 26, 0.94);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-primary);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.toast-success {
  border-color: rgba(45, 212, 123, 0.3);
  background: rgba(45, 212, 123, 0.12);
}

.toast-error {
  border-color: rgba(255, 59, 92, 0.35);
  background: rgba(255, 59, 92, 0.12);
}

.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fade-in {
  animation: fadeIn 0.28s ease;
}

.slide-up {
  animation: slideUp 0.28s ease;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ================================================================
   Mobile / tablet
   ================================================================ */

@media (max-width: 1100px) {
  :root {
    --content-padding: 24px;
  }

  .simulate-layout {
    grid-template-columns: 1fr;
  }

  .simulate-left {
    position: static;
  }

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

@media (max-width: 767px) {
  :root {
    --content-padding: 16px;
  }

  .portal-main {
    padding: 18px 16px 24px;
  }

  .connect-page {
    padding: 12px 16px 28px;
  }

  .connect-wallet-input {
    height: 56px;
    font-size: 0.98rem;
  }

  .pool-list {
    grid-template-columns: 1fr;
  }

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

  .selection-bar {
    flex-wrap: wrap;
    border-radius: 14px;
    bottom: 76px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .results-stat-list,
  .position-stats {
    grid-template-columns: 1fr;
  }

  .slider-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .deposit-amount-input {
    width: 170px;
  }

  .monitor-stat-row {
    grid-template-columns: 1fr;
  }

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

  .deposit-history-panel-head {
    flex-direction: column;
  }

  .deposit-history-summary {
    grid-template-columns: 1fr 1fr;
  }

  .deposit-chart-topline {
    flex-direction: column;
  }

  .deposit-chart-canvas-shell {
    height: 260px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 78px;
  }

  .splash-logo {
    width: 76px;
    height: 76px;
  }

  .onboard-icon {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ══════════════════════════════════════════════════════════
   INVESTMENT JOURNEY TIMELINE
   ══════════════════════════════════════════════════════════ */

.journey-loading,
.journey-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 0.85rem;
}

/* --- Cost Summary Card --- */
.journey-cost-summary {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.journey-cost-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.journey-stat {
  text-align: center;
  min-width: 80px;
  flex: 1;
}
.journey-stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.journey-stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.journey-stat.positive .journey-stat-value { color: var(--green); }
.journey-stat.negative .journey-stat-value { color: var(--red); }

/* --- Timeline Container --- */
.journey-timeline {
  position: relative;
  padding-left: 24px;
}
.journey-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-soft);
}

/* --- Stop Card --- */
.journey-stop {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  transition: var(--transition-fast);
}
.journey-stop:hover {
  border-color: var(--border);
  background: var(--bg-elev-2);
}

/* --- Stop Indicator Dot --- */
.journey-stop-indicator {
  position: absolute;
  left: -21px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-elev-1);
}
.journey-stop-indicator.completed {
  background: var(--green);
  border-color: var(--green);
}
.journey-stop-indicator.active {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
}

/* --- Stop Header --- */
.journey-stop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.journey-stop-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.journey-pool-name {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
}
.journey-chain-badge,
.journey-dex-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-elev-3);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.journey-stop-meta {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.journey-stop-status.active { color: var(--orange); font-weight: 600; }
.journey-stop-status.completed { color: var(--green); }

/* --- PnL Chips --- */
.journey-pnl-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.journey-pnl-chip {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-elev-2);
  color: var(--text-secondary);
}
.journey-pnl-chip.positive { color: var(--green); }
.journey-pnl-chip.negative { color: var(--red); }
.journey-pnl-chip.muted { color: var(--text-muted); }

/* --- Value Row --- */
.journey-value-row {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.journey-ticks {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 0.72rem;
}

/* --- TX Hashes --- */
.journey-tx-row {
  display: flex;
  gap: 16px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 6px;
}

/* --- Rotation Reasoning --- */
.journey-rotation {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--orange);
}
.journey-rotation-header {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.journey-rotation-detail {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.journey-cf-correct { color: var(--green); font-weight: 600; }
.journey-cf-wrong { color: var(--red); }

/* --- Gate Badges --- */
.gate-pass { color: var(--green); font-weight: 600; }
.gate-fail { color: var(--red); font-weight: 600; }

/* --- Dates --- */
.journey-dates {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Truncated Notice --- */
.journey-truncated {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: center;
}
.journey-show-all-btn {
  background: none;
  border: none;
  color: var(--orange);
  cursor: pointer;
  font-size: 0.78rem;
  text-decoration: underline;
}

/* --- Journey Responsive --- */
@media (max-width: 768px) {
  .journey-timeline { padding-left: 18px; }
  .journey-stop-indicator { left: -16px; width: 10px; height: 10px; }
  .journey-cost-row { flex-direction: column; gap: 8px; }
  .journey-stop-header { flex-direction: column; align-items: flex-start; }
  .journey-rotation-detail { flex-direction: column; gap: 4px; }
}
