/* =====================================================================
   Forex AI — Neon Dark PWA (style inspired by modern fintech apps)
   Content = our app. Look = dark charcoal + neon lime.
   ===================================================================== */

:root {
  /* Fallbacks — overridden by admin Theme settings via <style id="app-theme-vars"> */
  --brand-primary: #b8ff2e;
  --brand-secondary: #8fd914;
  --brand-success: #16a34a;
  --brand-danger: #ff5c6c;
  --brand-primary-rgb: 184, 255, 46;
  --brand-secondary-rgb: 143, 217, 20;
  --neon: var(--brand-primary);
  --neon-deep: #8fd914;
  --neon-ink: #0a1400;
  --brand-gradient: linear-gradient(135deg, #8fd914 0%, #b8ff2e 55%, #d4ff6a 100%);
  --brand-gradient-hero: linear-gradient(145deg, #8fd914 0%, #b8ff2e 48%, #d8ff70 100%);

  --app-topbar-h: 58px;
  --app-bottom-h: 72px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Light mode (default) */
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-muted: #eef1f5;
  --ink: #0f172a;
  --muted: #64748b;
  --border-soft: rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 24px 50px rgba(15, 23, 42, 0.14);
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --tabbar-bg: rgba(255, 255, 255, 0.96);
  --icon-btn-bg: #f4f6f8;
  --fab-ring: #eef1f5;
  --link-accent: var(--brand-primary);
  color-scheme: light;
}

/* Dark mode — whole app (guest + logged-in) */
html[data-bs-theme="dark"] {
  --surface: #151b24;
  --surface-2: #1b2330;
  --surface-muted: #0a0d12;
  --ink: #f4f7fb;
  --muted: #8b97a8;
  --border-soft: rgba(255, 255, 255, 0.07);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 28px 56px rgba(0, 0, 0, 0.45);
  --topbar-bg: rgba(10, 13, 18, 0.88);
  --tabbar-bg: rgba(12, 16, 22, 0.96);
  --icon-btn-bg: #1a2230;
  --fab-ring: #0a0d12;
  --link-accent: var(--neon);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(680px 320px at 110% -8%, rgba(var(--brand-primary-rgb), 0.08), transparent 55%),
    radial-gradient(520px 280px at -10% 30%, rgba(var(--brand-secondary-rgb), 0.05), transparent 50%),
    var(--surface-muted);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

body.app-logged-in {
  padding-bottom: calc(var(--app-bottom-h) + var(--safe-bottom) + 0.25rem);
}

main { flex: 1; width: 100%; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

a { transition: color 0.15s var(--ease); color: var(--link-accent); }
.text-muted { color: var(--muted) !important; }

/* ---------------------------------------------------------------------
   TOPBAR
   --------------------------------------------------------------------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: var(--app-topbar-h);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-soft);
}

body.app-logged-in .app-topbar {
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}
@media (min-width: 576px) {
  body.app-logged-in .app-topbar {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }
}

.app-topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  letter-spacing: -0.02em;
  min-width: 0;
}
.app-topbar .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  color: var(--neon-ink);
  flex-shrink: 0;
  font-size: 1rem;
  box-shadow: 0 8px 18px rgba(var(--brand-primary-rgb), 0.28);
  overflow: hidden;
}
.app-topbar .brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.app-topbar .brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
body.app-logged-in .app-topbar .brand-text { display: none; }

.app-greet {
  display: none;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
body.app-logged-in .app-greet { display: flex; }
.app-greet .hi {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}
.app-greet .nm {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48vw;
}

.app-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.app-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--icon-btn-bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.app-icon-btn:hover {
  transform: translateY(-1px);
  color: var(--neon-ink);
  background: var(--neon);
  border-color: transparent;
}
.app-icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-danger);
  border: 2px solid var(--surface-muted);
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--neon-ink);
  background: var(--brand-gradient);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(var(--brand-primary-rgb), 0.3);
}

.app-desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
}
.app-desktop-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.app-desktop-nav a:hover,
.app-desktop-nav a.active {
  color: var(--neon-ink);
  background: var(--neon);
}
@media (min-width: 992px) {
  .app-desktop-nav { display: flex; }
  .app-topbar .brand-text { max-width: 280px; }
  body.app-logged-in .app-topbar .brand-text { display: inline; max-width: 200px; }
  body.app-logged-in { padding-bottom: 0; }
}

/* ---------------------------------------------------------------------
   BOTTOM TAB BAR + CENTER FAB
   --------------------------------------------------------------------- */
.app-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  height: calc(var(--app-bottom-h) + var(--safe-bottom));
  padding: 0.25rem 0.5rem var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  background: var(--tabbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12);
}
.app-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 14px;
  padding: 0.4rem 0.15rem 0.55rem;
  transition: color 0.15s var(--ease);
}
.app-tabbar a i { font-size: 1.25rem; line-height: 1; }
.app-tabbar a.active,
.app-tabbar a:hover { color: var(--link-accent); background: transparent; }

.app-tabbar .tab-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: var(--neon-ink) !important;
  box-shadow: 0 10px 28px rgba(var(--brand-primary-rgb), 0.45);
  transform: translateY(-18px);
  display: grid;
  place-items: center;
  justify-self: center;
  padding: 0;
  border: 4px solid var(--fab-ring);
}
.app-tabbar .tab-fab span { display: none; }
.app-tabbar .tab-fab i { font-size: 1.55rem; }
.app-tabbar .tab-fab:hover {
  filter: brightness(1.05);
  color: var(--neon-ink) !important;
}

@media (min-width: 992px) {
  .app-tabbar { display: none; }
}

/* ---------------------------------------------------------------------
   BUTTONS / FORMS / CARDS
   --------------------------------------------------------------------- */
.btn {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), filter 0.15s var(--ease);
}
.btn-lg { border-radius: 999px; padding-left: 1.4rem; padding-right: 1.4rem; }
.btn-primary {
  background: var(--brand-gradient) !important;
  border: none !important;
  color: var(--neon-ink) !important;
  box-shadow: 0 8px 20px rgba(var(--brand-primary-rgb), 0.32);
}
.btn-primary:hover, .btn-primary:focus { filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline-primary {
  border: 1.5px solid rgba(var(--brand-primary-rgb), 0.4) !important;
  color: var(--neon) !important;
  background: transparent !important;
}
.btn-outline-primary:hover { background: rgba(var(--brand-primary-rgb), 0.1) !important; }

.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border-soft);
  padding: 0.7rem 1rem;
  background: var(--surface);
  color: var(--ink);
}
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}
.form-control:focus, .form-select:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-primary-rgb), 0.18);
}
.form-label { font-weight: 700; font-size: 0.85rem; color: var(--muted); }

.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
}

/* ---------------------------------------------------------------------
   DASHBOARD
   --------------------------------------------------------------------- */
/* App content gutters — left/right breathing room on all screens */
body.app-logged-in .container,
body.app-logged-in .container-fluid {
  padding-left: 1.15rem !important;
  padding-right: 1.15rem !important;
}
@media (min-width: 576px) {
  body.app-logged-in .container {
    padding-left: 1.35rem !important;
    padding-right: 1.35rem !important;
  }
}
@media (min-width: 992px) {
  body.app-logged-in .container {
    max-width: 920px;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

.app-page { padding: 1rem 0 1.75rem; }

.app-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.app-page-head h1,
.app-page-head h2,
.app-page-head h3 {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.app-page-head .sub {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--muted);
}

body.app-logged-in .alert {
  border-radius: 16px;
  margin-left: 0;
  margin-right: 0;
}

.welcome-row { display: none; } /* greeting moved to topbar */

/* Hero neon wallet card */
.hero-balance {
  position: relative;
  background: var(--brand-gradient-hero);
  color: var(--neon-ink);
  border-radius: 28px;
  padding: 1.2rem 1.15rem 1.3rem;
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(var(--brand-primary-rgb), 0.28);
}
.hero-balance::before {
  content: "";
  position: absolute;
  top: -80px; right: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.45), transparent 62%);
  pointer-events: none;
}
.hero-balance::after {
  content: "";
  position: absolute;
  bottom: -40px; left: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(10,20,0,0.12), transparent 65%);
  pointer-events: none;
}
.hero-balance > * { position: relative; z-index: 1; }

.hero-balance .balance-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--neon-ink) 62%, transparent);
  margin-bottom: 0.15rem;
}
.hero-balance .balance-value {
  font-size: clamp(2.1rem, 9vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--neon-ink);
  margin-bottom: 0.85rem;
}

.hero-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.hero-mini {
  background: rgba(10, 20, 0, 0.22);
  border-radius: 16px;
  padding: 0.7rem 0.8rem;
  backdrop-filter: blur(6px);
}
.hero-mini .k {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(10, 20, 0, 0.65);
  margin-bottom: 0.15rem;
}
.hero-mini .v {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.balance-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}
.balance-actions.actions-4 { grid-template-columns: repeat(4, 1fr); }
.balance-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--neon-ink);
  font-size: 0.68rem;
  font-weight: 700;
}
.balance-actions a i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 20, 0, 0.18);
  font-size: 1.12rem;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}
.balance-actions a:hover i {
  background: var(--neon-ink);
  color: var(--neon);
  transform: translateY(-2px);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.35rem 0 0.7rem;
}
.section-title h6 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.section-title .link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon);
  text-decoration: none;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.token-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 0.95rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.token-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.token-card .row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.token-card .t-name {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.token-card .t-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--neon);
}
.token-card .t-pct {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--neon);
}
.token-card .t-pct.down {
  background: rgba(255, 92, 108, 0.15);
  color: var(--brand-danger);
}
.token-card .t-value {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.token-card .t-sub { font-size: 0.7rem; color: var(--muted); }
.token-card .spark { margin-top: 0.35rem; }
.spark svg { display: block; width: 100%; height: 34px; }

.promo-card {
  background:
    radial-gradient(500px 220px at 100% 0, rgba(var(--brand-primary-rgb),0.16), transparent 60%),
    linear-gradient(145deg, var(--surface-2) 0%, var(--surface) 100%);
  color: var(--ink);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.22);
  border-radius: 22px;
  padding: 1rem 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}
.promo-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(var(--brand-primary-rgb), 0.16);
  color: var(--link-accent);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.promo-card .txt { flex: 1; min-width: 0; }
.promo-card .title { font-weight: 800; color: var(--ink); }
.promo-card .sub { font-size: 0.75rem; color: var(--muted); }
.promo-card .btn { flex-shrink: 0; }

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 1.05rem 1.1rem;
  color: var(--ink);
}
.detail-card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.detail-card .head .title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.95rem;
}
.detail-card .head .title i {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--neon);
}
.detail-card .head .link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon);
  text-decoration: none;
}
.detail-card .big-value {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.detail-card .value-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}
.detail-card .value-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--neon);
}
.detail-card .value-badge.down {
  background: rgba(255, 92, 108, 0.15);
  color: var(--brand-danger);
}

.timeframe {
  display: inline-flex;
  padding: 0.2rem;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  gap: 0.15rem;
}
.timeframe button {
  border: 0;
  background: transparent;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.timeframe button.is-active {
  background: var(--brand-gradient);
  color: var(--neon-ink);
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.35);
}

.level-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.16);
}
.level-row:first-of-type { border-top: 0; }
.level-row .lvl-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(var(--brand-primary-rgb), 0.12);
  color: var(--neon);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.8rem;
}
.level-row .meta { flex: 1; min-width: 0; }
.level-row .meta .name { font-size: 0.85rem; font-weight: 700; }
.level-row .meta .sub { font-size: 0.7rem; color: var(--muted); }
.level-row .val { font-weight: 800; font-size: 0.95rem; }

.withdraw-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 16px;
  padding: 0.7rem;
  margin: 0.65rem 0;
}
.withdraw-stats .cell { text-align: center; }
.withdraw-stats .cell .k {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.withdraw-stats .cell .v { font-weight: 800; margin-top: 0.2rem; }

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(var(--brand-primary-rgb), 0.45);
}
.progress-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.btn-withdraw {
  display: block;
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--brand-gradient);
  color: var(--neon-ink) !important;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 12px 24px rgba(var(--brand-primary-rgb), 0.3);
}
.btn-withdraw:hover { filter: brightness(1.05); }

.invest-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-soft);
}
.invest-item:first-of-type { border-top: 0; }
.invest-item .badge-round {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--neon);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}
.invest-item .meta { flex: 1; min-width: 0; }
.invest-item .name { font-weight: 800; font-size: 0.9rem; }
.invest-item .sub { font-size: 0.72rem; color: var(--muted); }
.invest-item .earn {
  font-weight: 800;
  color: var(--neon);
  font-size: 0.9rem;
}

.chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.chip-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 0.85rem 0.95rem;
  color: inherit;
}
.chip-card .k {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.chip-card .v { font-weight: 800; margin-top: 0.25rem; font-size: 1.05rem; }
.chip-card .sub { font-size: 0.7rem; color: var(--muted); }

.chat-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--app-bottom-h) + var(--safe-bottom) + 0.85rem);
  z-index: 1050;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--neon-ink) !important;
  background: var(--brand-gradient);
  box-shadow: 0 14px 28px rgba(var(--brand-primary-rgb), 0.4);
  font-size: 1.3rem;
  text-decoration: none;
}
@media (min-width: 992px) {
  .chat-fab { bottom: 1.5rem; }
}

/* Compat / landing */
.stat-card, .app-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
}
.stat-icon-primary { background: rgba(var(--brand-primary-rgb), 0.14); color: var(--neon-deep); }
.stat-icon-success { background: rgba(var(--brand-primary-rgb), 0.14); color: var(--neon-deep); }
.stat-icon-info { background: rgba(8, 145, 178, 0.12); color: #0891b2; }
.stat-icon-warning { background: rgba(217, 119, 6, 0.14); color: #d97706; }
.stat-icon-danger { background: rgba(255, 92, 108, 0.12); color: var(--brand-danger); }

.badge { font-weight: 700; border-radius: 999px; }
.alert { border-radius: var(--radius-md); border: none; }

/* =====================================================================
   Landing — AI trading look (desktop + mobile), admin brand colors
   Light / dark via html[data-bs-theme]
   ===================================================================== */
body.page-landing {
  --land-bg: #070b12;
  --land-surface: #0b111a;
  --land-surface-2: #101826;
  --land-text: #f4f7fb;
  --land-muted: #94a3b8;
  --land-border: rgba(255, 255, 255, 0.08);
  --land-panel: rgba(14, 20, 30, 0.72);
  --land-nav: #f4f7fb;
  --land-hero-fg: #f4f7fb;
  --land-hero-muted: rgba(203, 213, 225, 0.88);
  --land-hero-bg:
    radial-gradient(900px 480px at 12% 20%, rgba(var(--brand-primary-rgb), 0.22), transparent 60%),
    radial-gradient(700px 420px at 88% 70%, rgba(var(--brand-secondary-rgb), 0.14), transparent 55%),
    linear-gradient(160deg, #05080e 0%, #0a1018 48%, #0d1520 100%);
  background: var(--land-bg);
  color: var(--land-text);
  transition: background-color 0.25s ease, color 0.25s ease;
}
html[data-bs-theme="light"] body.page-landing {
  --land-bg: #eef2f7;
  --land-surface: #ffffff;
  --land-surface-2: #f7f9fc;
  --land-text: #0f172a;
  --land-muted: #64748b;
  --land-border: rgba(15, 23, 42, 0.08);
  --land-panel: rgba(255, 255, 255, 0.78);
  --land-nav: #0f172a;
  --land-hero-fg: var(--neon-ink);
  --land-hero-muted: color-mix(in srgb, var(--neon-ink) 72%, transparent);
  --land-hero-bg:
    radial-gradient(900px 480px at 12% 20%, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(700px 420px at 88% 70%, rgba(0, 0, 0, 0.08), transparent 55%),
    var(--brand-gradient-hero);
}
body.page-landing main {
  padding: 0;
  max-width: none;
  width: 100%;
}
body.page-landing .app-topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 80;
  pointer-events: auto;
  background: transparent;
  border-bottom: 1px solid transparent;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}
body.page-landing .app-topbar .brand-text,
body.page-landing .app-desktop-nav a {
  color: var(--land-hero-fg);
}
body.page-landing .app-desktop-nav a:hover { color: var(--brand-primary); }
html[data-bs-theme="light"] body.page-landing .app-desktop-nav a:hover {
  color: var(--neon-deep);
}
body.page-landing .app-topbar .brand-mark {
  background: color-mix(in srgb, var(--land-hero-fg) 12%, transparent);
  color: var(--land-hero-fg);
}
body.page-landing .app-icon-btn {
  position: relative;
  z-index: 81;
  pointer-events: auto;
  cursor: pointer;
  background: color-mix(in srgb, var(--land-hero-fg) 12%, transparent);
  color: var(--land-hero-fg);
}
body.page-landing .app-topbar .btn-primary {
  border-radius: 999px !important;
  padding-inline: 1rem !important;
}

.land-wrap,
.land-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

/* ---- Hero ---- */
.land-hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  overflow: hidden;
  color: var(--land-hero-fg);
  background: var(--land-hero-bg);
  padding: calc(var(--app-topbar-h) + 1.75rem) 0 0;
}
.land-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 40% 30%, black 10%, transparent 70%);
}
.land-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: landOrb 10s ease-in-out infinite alternate;
}
.land-orb--a {
  width: 280px; height: 280px;
  left: -40px; top: 12%;
  background: rgba(var(--brand-primary-rgb), 0.45);
}
.land-orb--b {
  width: 340px; height: 340px;
  right: -60px; bottom: 8%;
  background: rgba(var(--brand-secondary-rgb), 0.28);
  animation-delay: -3s;
}
.land-hero__scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  top: 30%;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-primary-rgb), 0.55), transparent);
  animation: landScan 5.5s linear infinite;
  opacity: 0.5;
}

.land-shell {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  align-items: center;
}

.land-hero__brand {
  margin: 0 0 0.9rem;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.94;
  color: var(--land-hero-fg);
  text-wrap: balance;
}
.land-hero__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--land-hero-fg);
  opacity: 0.92;
}
.land-hero__lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
  line-height: 1.6;
  color: var(--land-hero-muted);
}
.land-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}
.land-btn {
  border-radius: 999px !important;
  padding: 0.78rem 1.45rem !important;
  font-weight: 700 !important;
}
.land-hero .btn-primary.land-btn {
  background: #fff !important;
  border: none !important;
  color: var(--neon-deep) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.land-hero .btn-primary.land-btn:hover {
  filter: brightness(0.98);
  color: var(--neon-deep) !important;
}
html[data-bs-theme="dark"] .land-hero .btn-primary.land-btn {
  background: var(--brand-gradient) !important;
  color: var(--neon-ink) !important;
  box-shadow: 0 10px 30px rgba(var(--brand-primary-rgb), 0.28);
}
html[data-bs-theme="dark"] .land-hero .btn-primary.land-btn:hover {
  filter: brightness(1.06);
  color: var(--neon-ink) !important;
}
.land-btn--ghost {
  background: color-mix(in srgb, var(--land-hero-fg) 10%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--land-hero-fg) 28%, transparent) !important;
  color: var(--land-hero-fg) !important;
}
.land-btn--ghost:hover {
  background: color-mix(in srgb, var(--land-hero-fg) 18%, transparent) !important;
  color: var(--land-hero-fg) !important;
}
.land-btn--ghost-dark {
  background: transparent !important;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.4) !important;
  color: var(--brand-primary) !important;
}
html[data-bs-theme="dark"] .land-btn--ghost-dark { color: var(--neon) !important; }

/* ---- AI terminal visual (full plane on desktop) ---- */
.land-hero__stage {
  width: 100%;
  min-width: 0;
}
.land-terminal {
  position: relative;
  width: 100%;
  min-height: 360px;
  padding: 1.15rem 1.15rem 0;
  color: #e8eef7;
  background:
    linear-gradient(180deg, rgba(14, 20, 30, 0.92), rgba(8, 12, 18, 0.98)),
    rgba(8, 12, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(var(--brand-primary-rgb), 0.08),
    0 28px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.land-terminal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--brand-gradient);
}
.land-terminal__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.land-terminal__pair strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.land-terminal__pair em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.9);
  margin-top: 0.2rem;
}
.land-terminal__signal {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(var(--brand-primary-rgb), 0.14);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.4);
  color: var(--brand-primary);
  white-space: nowrap;
}
.land-terminal__signal .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), 0.55);
  animation: landPulse 1.8s ease-out infinite;
}
.land-terminal__price-main {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.land-terminal__price-chg {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-primary);
}
.land-terminal__chart {
  position: relative;
  height: 150px;
  margin: 1.1rem 0 0.9rem;
}
.land-candles {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 0.15rem;
  opacity: 0.35;
}
.land-candles i {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--brand-primary), rgba(var(--brand-primary-rgb), 0.25));
  animation: landCandle 2.8s ease-in-out infinite;
}
.land-candles i:nth-child(odd) { animation-delay: 0.2s; background: linear-gradient(180deg, #94a3b8, rgba(148, 163, 184, 0.2)); }
.land-candles i:nth-child(3n) { animation-delay: 0.45s; }
.land-spark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.land-spark__line {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: landDraw 1.7s var(--ease) 0.25s forwards;
}
.land-terminal__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.85rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.land-terminal__stats span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.2rem;
}
.land-terminal__stats strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.land-ticker {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  margin: 0 -1.15rem;
}
.land-ticker__track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding: 0.7rem 1.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.8);
  animation: landTicker 22s linear infinite;
}
.land-ticker__track span:nth-child(4n) { color: #f87171; }

.land-anim {
  opacity: 0;
  transform: translateY(16px);
  animation: landRise 0.7s var(--ease) forwards;
}
.land-anim--1 { animation-delay: 0.05s; }
.land-anim--2 { animation-delay: 0.14s; }
.land-anim--3 { animation-delay: 0.22s; }
.land-anim--4 { animation-delay: 0.3s; }
.land-anim--5 { animation-delay: 0.38s; }

@keyframes landRise { to { opacity: 1; transform: none; } }
@keyframes landOrb {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(18px) scale(1.08); }
}
@keyframes landScan {
  0% { top: 12%; opacity: 0; }
  15% { opacity: 0.55; }
  85% { opacity: 0.35; }
  100% { top: 88%; opacity: 0; }
}
@keyframes landPulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(var(--brand-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), 0); }
}
@keyframes landCandle {
  0%, 100% { transform: scaleY(1); transform-origin: bottom; }
  50% { transform: scaleY(0.88); transform-origin: bottom; }
}
@keyframes landDraw { to { stroke-dashoffset: 0; } }
@keyframes landTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Features / Why / About / How / CTA / Footer ---- */
.land-section {
  background: var(--land-bg);
  color: var(--land-text);
}
.land-features { padding: 5rem 0 3rem; }
.land-why { padding: 3rem 0 4rem; background: var(--land-surface-2); }
.land-about { padding: 2rem 0 4rem; }
.land-how { padding: 2rem 0 4rem; background: var(--land-surface-2); }
.land-cta { padding: 1rem 0 4rem; }

.land-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.land-section-head {
  max-width: 40rem;
  margin-bottom: 2.25rem;
}
.land-section-head--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.land-section-head h2 {
  margin: 0 0 0.55rem;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--land-text);
}
.land-section-head > p:last-child {
  margin: 0;
  color: var(--land-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Bento features */
.land-bento {
  display: grid;
  gap: 1rem;
}
.land-bento__item {
  position: relative;
  padding: 1.35rem 1.35rem 1.45rem;
  border-radius: 22px;
  background: var(--land-surface);
  border: 1px solid var(--land-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.land-bento__item::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--brand-gradient);
  opacity: 0.85;
}
.land-bento__item:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-primary-rgb), 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}
.land-bento__item--lg {
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(var(--brand-primary-rgb), 0.18), transparent 60%),
    var(--land-surface);
}
.land-bento__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--brand-primary);
}
.land-bento__item h3 {
  margin: 0 0 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--land-text);
}
.land-bento__item p {
  margin: 0;
  color: var(--land-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Why cards */
.land-why-grid {
  display: grid;
  gap: 1rem;
}
.land-why-card {
  position: relative;
  padding: 1.5rem 1.35rem 1.4rem;
  border-radius: 22px;
  background: var(--land-surface);
  border: 1px solid var(--land-border);
  overflow: hidden;
}
.land-why-card__num {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(var(--brand-primary-rgb), 0.18);
  line-height: 1;
}
.land-why-card > i {
  display: inline-flex;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--brand-primary);
}
.land-why-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--land-text);
}
.land-why-card p {
  margin: 0;
  color: var(--land-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* About panel */
.land-about__panel {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 28px;
  background:
    radial-gradient(600px 260px at 0% 0%, rgba(var(--brand-primary-rgb), 0.16), transparent 55%),
    var(--land-surface);
  border: 1px solid var(--land-border);
}
.land-about__panel .land-section-head { margin-bottom: 0; }
.land-about__body {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--land-muted);
  max-width: 46rem;
}
.land-about__body p { margin: 0; color: inherit; }

/* Steps */
.land-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.land-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.2rem;
  border-radius: 20px;
  background: var(--land-surface);
  border: 1px solid var(--land-border);
}
.land-step__num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1;
  min-width: 2.2rem;
}
.land-step__body h3 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
  color: var(--land-text);
}
.land-step__body p {
  margin: 0;
  color: var(--land-muted);
  font-size: 0.95rem;
}

/* CTA */
.land-cta__panel {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 28px;
  background: var(--brand-gradient-hero);
  color: var(--neon-ink);
  box-shadow: 0 20px 50px rgba(var(--brand-primary-rgb), 0.22);
}
.land-cta__panel h2 {
  margin: 0 0 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 700;
  color: var(--neon-ink);
}
.land-cta__panel p {
  margin: 0;
  color: color-mix(in srgb, var(--neon-ink) 78%, transparent);
  max-width: 36rem;
}
.land-cta .btn-primary.land-btn {
  background: #fff !important;
  color: var(--neon-deep) !important;
  border: none !important;
}
.land-cta .land-btn--ghost-dark {
  border-color: color-mix(in srgb, var(--neon-ink) 35%, transparent) !important;
  color: var(--neon-ink) !important;
}

/* Footer */
.land-footer {
  padding: 3.25rem 0 2rem;
  border-top: 1px solid var(--land-border);
  background: var(--land-surface);
  color: var(--land-text);
}
.land-footer__grid {
  display: grid;
  gap: 2rem;
}
.land-footer__name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.land-footer__name img {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.land-footer__name strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  color: var(--land-text);
}
.land-footer__brand > p {
  margin: 0 0 1rem;
  color: var(--land-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 22rem;
}
.land-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.land-footer__social a {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--land-text);
  text-decoration: none;
  border: 1px solid var(--land-border);
}
.land-footer__social a:hover {
  color: var(--neon-ink);
  background: var(--brand-primary);
  border-color: transparent;
}
.land-footer h4 {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--land-muted);
}
.land-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.land-footer li { margin-bottom: 0.55rem; }
.land-footer a,
.land-footer__contact span {
  color: var(--land-text);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.88;
}
.land-footer a:hover { color: var(--brand-primary); opacity: 1; }
.land-footer__contact i {
  color: var(--brand-primary);
  margin-right: 0.4rem;
}
.land-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--land-border);
  font-size: 0.82rem;
  color: var(--land-muted);
}

/* Desktop / large screens */
@media (min-width: 768px) {
  .land-bento {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
  .land-bento__item--lg {
    grid-column: span 2;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.25rem;
    align-items: start;
    min-height: 180px;
    padding: 1.75rem;
  }
  .land-bento__item--lg .land-bento__icon {
    grid-row: span 2;
    width: 64px; height: 64px;
    font-size: 1.6rem;
    margin-bottom: 0;
  }
  .land-why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
  .land-about__panel {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 2.5rem;
  }
  .land-footer__grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 2rem;
  }
  .land-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .land-step {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    min-height: 100%;
  }
  .land-cta__panel {
    grid-template-columns: 1.3fr auto;
    align-items: center;
  }
}
@media (min-width: 1100px) {
  .land-bento {
    grid-template-columns: 1.35fr 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .land-bento__item--lg {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .land-bento__item--lg .land-bento__icon {
    grid-row: auto;
    margin-bottom: 1.25rem;
  }
  .land-why-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) {
  .land-hero {
    display: flex;
    align-items: stretch;
    padding: 0;
    min-height: 100vh;
    min-height: 100svh;
  }
  .land-shell {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: var(--app-topbar-h);
    padding-bottom: 2.5rem;
  }
  .land-hero__copy {
    padding: 1rem 0 1rem;
  }
  .land-terminal {
    min-height: min(68vh, 560px);
    height: 100%;
    max-height: 620px;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    padding: 1.5rem 1.5rem 0;
  }
  .land-terminal__chart { flex: 1; min-height: 200px; height: auto; }
  .land-ticker { margin: 0 -1.5rem; }
}

@media (min-width: 1200px) {
  .land-hero__brand { font-size: 5rem; }
  .land-terminal { padding: 1.75rem 1.75rem 0; }
  .land-ticker { margin: 0 -1.75rem; }
}

/* Legacy aliases */
.hero-app { background: #070b12; color: #fff; }
.feature-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--brand-primary-rgb), 0.14);
  color: var(--brand-primary); font-size: 1.2rem;
}

.auth-card {
  max-width: 440px;
  margin: 1.5rem auto;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
  position: relative;
  background: var(--surface) !important;
  color: var(--ink);
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand-gradient);
}

.pwa-install {
  display: none;
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(var(--app-bottom-h) + var(--safe-bottom) + 0.75rem);
  z-index: 1050;
  background: #121820;
  color: #fff;
  border-radius: 18px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-lg);
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
}
.pwa-install.is-visible { display: flex; }

footer.app-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  padding: 1.25rem 0;
  margin-top: auto;
}
body.app-logged-in footer.app-footer { display: none; }

body.app-logged-in .table {
  --bs-table-color: var(--ink);
  color: var(--ink);
}
body.app-logged-in .table thead th { color: var(--muted); border-color: var(--border-soft); }
body.app-logged-in .table td { border-color: var(--border-soft); }

@media (max-width: 575.98px) {
  .auth-card { margin: 0.75rem auto; border-radius: var(--radius-lg) !important; }
  .balance-actions a { font-size: 0.62rem; }
  .balance-actions a i { width: 42px; height: 42px; }
}

/* Production polish — shared user pages in dark shell */
body.app-logged-in .nav-tabs {
  border-bottom-color: var(--border-soft);
  gap: 0.25rem;
  flex-wrap: wrap;
}
body.app-logged-in .nav-tabs .nav-link {
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  padding: 0.45rem 0.9rem;
}
body.app-logged-in .nav-tabs .nav-link.active {
  background: var(--brand-gradient);
  color: var(--neon-ink);
}
body.app-logged-in .table-responsive {
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
}
body.app-logged-in .table {
  margin-bottom: 0;
}
body.app-logged-in .list-group-item {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-soft);
}
body.app-logged-in .pagination .page-link {
  background: var(--surface);
  border-color: var(--border-soft);
  color: var(--ink);
}
body.app-logged-in .pagination .page-item.active .page-link {
  background: var(--brand-gradient);
  border-color: transparent;
  color: var(--neon-ink);
}

/* ---------------------------------------------------------------------
   USER SIDEBAR (modern slide-out drawer)
   --------------------------------------------------------------------- */
.app-menu-btn {
  flex-shrink: 0;
}
.app-menu-btn i {
  font-size: 1.35rem;
}

.app-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1045;
  background: rgba(8, 12, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.app-sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: min(330px, 88vw);
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(var(--brand-primary-rgb), 0.16), transparent 55%),
    radial-gradient(360px 200px at 0% 100%, rgba(59, 130, 246, 0.12), transparent 50%),
    linear-gradient(180deg, #0d1219 0%, #121a24 55%, #0b1017 100%);
  color: #eef2f7;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(-105%);
  transition: transform 0.28s var(--ease);
  overflow: hidden;
}
.app-sidebar.is-open {
  transform: translateX(0);
}
.app-sidebar__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 30%);
}

.app-sidebar__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 1rem 1rem 0.75rem;
}
.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.app-sidebar__brand strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.app-sidebar__brand small {
  display: block;
  font-size: 0.68rem;
  color: rgba(238, 242, 247, 0.55);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.app-sidebar__brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  color: var(--neon-ink);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(var(--brand-primary-rgb), 0.3);
}
.app-sidebar__brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-sidebar__close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.app-sidebar__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.app-sidebar__user {
  position: relative;
  margin: 0.25rem 0.85rem 0.85rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.app-sidebar__avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--neon-ink);
  background: var(--brand-gradient);
  flex-shrink: 0;
}
.app-sidebar__user-meta { min-width: 0; flex: 1; }
.app-sidebar__user-name {
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-sidebar__user-ref {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: rgba(var(--brand-primary-rgb), 0.9);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}
.app-sidebar__user-go {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.app-sidebar__user-go:hover { color: #fff; background: rgba(255,255,255,0.12); }

.app-sidebar__nav {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 0.15rem 0.75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.app-sidebar__section { margin-bottom: 1rem; }
.app-sidebar__label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 242, 247, 0.42);
  padding: 0.35rem 0.7rem 0.45rem;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.7rem;
  margin-bottom: 0.2rem;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(238, 242, 247, 0.88);
  font-weight: 650;
  font-size: 0.9rem;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.app-sidebar__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(2px);
}
.app-sidebar__link.is-active {
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.18), rgba(var(--brand-primary-rgb), 0.08));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(var(--brand-primary-rgb), 0.22);
}
.app-sidebar__link.is-active .app-sidebar__ico {
  background: var(--brand-gradient);
  color: var(--neon-ink);
}
.app-sidebar__ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(238, 242, 247, 0.9);
  font-size: 1rem;
  flex-shrink: 0;
}
.app-sidebar__txt { flex: 1; min-width: 0; }
.app-sidebar__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #ff5c6c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

.app-sidebar__foot {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.18);
}
.app-sidebar__theme,
.app-sidebar__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.5rem;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.app-sidebar__theme:hover,
.app-sidebar__logout:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.app-sidebar__logout {
  background: rgba(255, 92, 108, 0.12);
  border-color: rgba(255, 92, 108, 0.28);
  color: #ff8a96;
}
.app-sidebar__logout:hover {
  background: rgba(255, 92, 108, 0.2);
  color: #ffb0b8;
}

html[data-bs-theme="light"] .app-sidebar {
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(var(--brand-primary-rgb), 0.2), transparent 55%),
    radial-gradient(360px 200px at 0% 100%, rgba(59, 130, 246, 0.1), transparent 50%),
    linear-gradient(180deg, #101722 0%, #151d29 100%);
}

body.sidebar-open {
  overflow: hidden;
}
