:root {
  --color-bg: #07130e;
  --color-bg-2: #0b1f17;
  --color-surface: rgba(14, 37, 28, 0.78);
  --color-surface-2: rgba(10, 29, 21, 0.92);
  --color-card: rgba(255, 255, 255, 0.045);
  --color-card-hover: rgba(255, 255, 255, 0.075);
  --color-border: rgba(92, 255, 166, 0.22);
  --color-border-strong: rgba(92, 255, 166, 0.48);
  --color-text: #f4fff8;
  --color-muted: #8fa99b;
  --color-soft: #cde6d8;
  --color-primary: #35e987;
  --color-primary-2: #29d6c4;
  --color-warning: #d99a55;
  --color-danger: #ff6262;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Orbitron', var(--font-body);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-soft: 0 16px 45px rgba(0, 0, 0, 0.32);
  --shadow-glow: 0 0 28px rgba(53, 233, 135, 0.18);
  --transition: 180ms ease;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--color-bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 20% 0%, rgba(53, 233, 135, 0.15), transparent 34rem),
    radial-gradient(circle at 90% 24%, rgba(41, 214, 196, 0.10), transparent 30rem),
    linear-gradient(180deg, var(--color-bg), #08170f 48%, #06100c);
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 75%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.app-shell {
  width: min(100% - 20px, 460px);
  margin: 0 auto;
  padding: 10px 0 92px;
  position: relative;
  z-index: 1;
}
.page-content,
.page-wide { width: 100%; margin: 0 auto; padding-top: var(--space-4); }
.site-header, .bottom-nav, .panel, .card, .stat-card, .table-panel, .form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(145%);
}
.site-header {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px 12px;
}
.brand, .header-actions, .nav-item, .chip, .icon-button, .section-heading, .metric-row, .inline-actions { display: flex; align-items: center; }
.brand { gap: 10px; min-width: 0; }
.brand-logo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2)); padding: 4px; box-shadow: var(--shadow-glow); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.brand-name { font-family: var(--font-display); font-size: 14px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }
.brand-name strong { color: var(--color-primary); }
.header-actions { gap: var(--space-2); }
.chip, .icon-button { border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.055); color: var(--color-soft); transition: var(--transition); }
.chip { gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; }
.icon-button { width: 38px; height: 38px; justify-content: center; border-radius: 999px; position: relative; }
.chip:hover, .icon-button:hover { border-color: var(--color-border-strong); color: var(--color-primary); transform: translateY(-1px); }
.icon-button.has-badge span { position: absolute; top: -5px; right: -4px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; background: var(--color-primary); color: #06130d; font-size: 10px; font-weight: 800; }
[data-lucide] { width: 18px; height: 18px; stroke-width: 2.3; }

.bottom-nav { position: fixed; left: 50%; bottom: 10px; z-index: 40; width: min(calc(100% - 20px), 460px); margin: 0; padding: 8px 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; transform: translateX(-50%); }
.nav-item { flex-direction: column; justify-content: center; gap: 3px; min-height: 50px; border-radius: var(--radius-md); color: var(--color-muted); font-size: 10px; font-weight: 700; transition: var(--transition); }
.nav-item:hover, .nav-item.is-active { color: var(--color-primary); background: rgba(53,233,135,0.08); }
.nav-item i { width: 20px; height: 20px; }

.page-title { margin: 0 0 var(--space-5); text-align: center; font-family: var(--font-display); font-size: clamp(21px, 7vw, 28px); line-height: 1.1; letter-spacing: 1px; }
.page-title span, .text-gradient { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-subtitle { margin: -12px 0 var(--space-6); text-align: center; color: var(--color-muted); font-size: 14px; line-height: 1.6; }
.section-heading { justify-content: space-between; gap: var(--space-3); margin: var(--space-6) 0 var(--space-3); }
.section-heading h2, .section-heading h3 { margin: 0; font-family: var(--font-display); font-size: 15px; letter-spacing: .4px; }
.section-heading p { margin: 4px 0 0; color: var(--color-muted); font-size: 13px; }
.panel, .card, .form-card, .table-panel { padding: var(--space-4); margin-bottom: var(--space-4); }
.card { transition: var(--transition); }
.card:hover, .stat-card:hover { border-color: var(--color-border-strong); background: var(--color-card-hover); transform: translateY(-2px); }
.grid { display: grid; gap: 10px; }
.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)); }
.stat-card { padding: 12px 10px; text-align: center; transition: var(--transition); }
.stat-label, .detail-label, .form-label, .wallet-label, .grid-label { display: block; color: var(--color-muted); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.stat-value, .detail-value, .wallet-amount, .grid-value { margin-top: 5px; color: var(--color-text); font-family: var(--font-display); font-weight: 800; }
.stat-value { font-size: 18px; }
.success { color: var(--color-primary); } .warning { color: var(--color-warning); } .danger { color: var(--color-danger); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 0; border-radius: var(--radius-md); padding: 0 16px; font-weight: 800; letter-spacing: .4px; color: #06130d; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2)); box-shadow: 0 10px 24px rgba(53,233,135,.22); transition: var(--transition); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(53,233,135,.30); }
.btn:disabled { cursor: not-allowed; color: var(--color-muted); background: rgba(255,255,255,.06); box-shadow: none; }
.btn-muted { color: var(--color-soft); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); box-shadow: none; }
.btn-block { width: 100%; }

.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 30px; animation: marquee 26s linear infinite; color: var(--color-soft); font-size: 13px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.profile-card { position: relative; overflow: hidden; }
.profile-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.05) 50%, transparent 100%); transform: translateX(-100%); animation: shimmer 5s infinite; }
@keyframes shimmer { 60%,100% { transform: translateX(100%); } }
.profile-header { display: flex; align-items: center; gap: var(--space-4); position: relative; z-index: 1; }
.avatar { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--color-border-strong); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 800; color: var(--color-primary); background: rgba(53,233,135,.1); border: 1px solid rgba(53,233,135,.18); }
.quick-action { display: grid; place-items: center; gap: 6px; min-height: 78px; padding: 10px 6px; border-radius: var(--radius-md); background: var(--color-card); border: 1px solid rgba(255,255,255,.07); color: var(--color-soft); font-size: 10px; font-weight: 700; text-align: center; transition: var(--transition); }
.quick-action:hover { border-color: var(--color-border-strong); color: var(--color-primary); transform: translateY(-2px); }
.quick-action i { width: 24px; height: 24px; color: var(--color-primary); }

.progress-row { margin-top: 8px; }
.progress-meta { display: flex; justify-content: space-between; gap: var(--space-3); color: var(--color-soft); font-size: 12px; margin-bottom: 6px; }
.progress-bar { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-primary), var(--color-warning)); box-shadow: var(--shadow-glow); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: 12px 8px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 12px; }
th { color: var(--color-primary); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
tr:hover td { background: rgba(53,233,135,.06); }
.no-data { text-align: center; color: var(--color-muted); }
.level-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--color-muted); font-size: 11px; }

.plan-card .plan-head, .salary-item-head, .crypto-row, .method-card, .copy-row, .detail-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.plan-name { display: flex; align-items: center; gap: 10px; color: var(--color-primary); font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: .8px; }
.mini-logo { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2)); padding: 3px; }
.detail-row { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.detail-row:last-child { border-bottom: 0; }
.plan-profit { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

.trade-banner { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: var(--space-4); }
.back-btn { position: absolute; left: 0; width: 38px; height: 38px; border-radius: var(--radius-sm); color: var(--color-primary); border: 1px solid var(--color-border); background: rgba(255,255,255,.04); }
.prices-container { min-height: 220px; padding: var(--space-2); border-radius: var(--radius-md); background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.07); }
.crypto-row { padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.07); }
.crypto-row:last-child { border-bottom: 0; }
.coin-name { display: block; color: var(--color-warning); font-weight: 800; }
.coin-full, .coin-change { display: block; color: var(--color-muted); font-size: 11px; margin-top: 2px; }
.price-info { text-align: right; font-family: var(--font-display); font-weight: 800; }
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: var(--space-5); background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.modal-overlay.show { display: grid; }
.modal-box { width: min(100%, 340px); padding: var(--space-6); text-align: center; border-radius: var(--radius-xl); background: var(--color-surface-2); border: 1px solid var(--color-border-strong); box-shadow: var(--shadow-soft), var(--shadow-glow); }
.modal-icon { font-size: 40px; margin-bottom: 8px; }
.modal-title { margin: 0 0 8px; font-family: var(--font-display); color: var(--color-primary); }
.modal-text { margin: 0 0 var(--space-5); color: var(--color-soft); line-height: 1.6; }

.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.method-card { flex-direction: column; justify-content: center; min-height: 118px; padding: 12px; border-radius: var(--radius-lg); background: var(--color-surface-2); border: 1px solid rgba(255,255,255,.08); text-align: center; transition: var(--transition); }
.method-card.is-active, .method-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-glow); }
.method-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; font-size: 24px; }
.copy-row, .input-control { width: 100%; min-height: 50px; border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,.08); background: var(--color-surface-2); color: var(--color-text); padding: 0 var(--space-4); }
.copy-row code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-soft); }
.copy-row button { border: 0; background: transparent; color: var(--color-muted); }
.form-group { margin-bottom: var(--space-4); }
.form-label { margin-bottom: 8px; }

.salary-item { padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface); margin-bottom: var(--space-3); }
.salary-item.is-current { border-color: rgba(217,154,85,.65); }
.salary-item-head { margin-bottom: var(--space-3); }
.salary-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: var(--space-3) 0; }
.salary-requirements { display: flex; justify-content: space-between; gap: var(--space-3); color: var(--color-soft); font-size: 12px; margin-top: 8px; }

@media (min-width: 761px) {
  body {
    background:
      radial-gradient(circle at 50% -10%, rgba(53, 233, 135, 0.13), transparent 34rem),
      linear-gradient(180deg, #07130e, #06100c);
  }

  .app-shell { width: 460px; }
}

@media (max-width: 430px) {
  .hide-mobile { display: none; }
  .app-shell { width: min(100% - 16px, 430px); }
  .site-header { gap: 8px; }
  .header-actions { gap: 6px; }
  .icon-button { width: 36px; height: 36px; }
  .brand-logo { width: 38px; height: 38px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .plan-profit { align-items: stretch; flex-direction: column; }
  .profile-header { align-items: flex-start; }
}

@media (max-width: 360px) {
  .app-shell { width: min(100% - 12px, 360px); }
  .brand-name { font-size: 12px; letter-spacing: .6px; }
  .quick-action { min-height: 70px; font-size: 9px; }
  .quick-action i { width: 21px; height: 21px; }
  .stat-value { font-size: 16px; }
  .method-icon { width: 50px; height: 50px; }
}
/* Profile and team mobile polish */
.eyebrow {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.profile-hero,
.team-hero {
  position: relative;
  overflow: hidden;
  padding: 18px;
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(53, 233, 135, .13), rgba(41, 214, 196, .05)),
    var(--color-surface);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.profile-hero::after,
.team-hero::after {
  content: '';
  position: absolute;
  right: -42px;
  top: -42px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 1px solid rgba(53, 233, 135, .18);
  background: rgba(53, 233, 135, .06);
}

.profile-topline,
.profile-identity,
.profile-id-card,
.account-grid,
.menu-row {
  display: flex;
  align-items: center;
}

.profile-topline {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: var(--space-3);
}

.profile-identity {
  min-width: 0;
  gap: var(--space-3);
}

.avatar-lg {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 5px rgba(53, 233, 135, .08);
}

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

.profile-copy h1,
.team-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: .6px;
}

.team-hero h1 span {
  color: var(--color-primary);
}

.team-hero p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--color-soft);
  font-size: 13px;
  line-height: 1.6;
}

.profile-id-card {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,.18);
}

.profile-id-card strong,
.account-grid strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .7px;
}

.profile-id-card button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  background: rgba(53, 233, 135, .08);
}

.wallet-grid,
.profile-actions,
.team-summary-grid,
.level-invest-grid {
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-4);
}

.wallet-grid,
.team-summary-grid,
.level-invest-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.wallet-tile,
.summary-card,
.level-invest-card {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.wallet-note,
.summary-card small {
  display: block;
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 11px;
}

.summary-card strong,
.level-invest-card strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 20px;
}

.level-invest-card span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.level-invest-card.is-highlight {
  border-color: var(--color-border-strong);
  background: linear-gradient(145deg, rgba(53, 233, 135, .14), rgba(53, 233, 135, .04));
}

.level-invest-card.is-highlight strong {
  color: var(--color-primary);
}

.menu-list {
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-4);
}

.menu-row {
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.menu-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.menu-row strong,
.menu-row small {
  display: block;
}

.menu-row strong {
  font-size: 14px;
}

.menu-row small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 11px;
}

.menu-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  background: rgba(53, 233, 135, .09);
}

.account-panel,
.team-progress-panel,
.info-panel {
  background: rgba(14, 37, 28, .68);
}

.compact-heading {
  margin: 0 0 var(--space-3);
}

.account-grid {
  justify-content: space-between;
  gap: var(--space-3);
}

.account-grid .btn {
  min-height: 40px;
  padding-inline: 12px;
}

.team-levels .table-panel {
  padding: 14px;
}

.team-levels .section-heading {
  margin: 0 0 var(--space-3);
}

.commission-list {
  display: grid;
  gap: 8px;
}

.commission-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
}

.commission-list span {
  color: var(--color-soft);
  font-weight: 700;
}

.info-panel p {
  margin: 0;
  color: var(--color-soft);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 360px) {
  .profile-hero,
  .team-hero {
    padding: 14px;
  }

  .profile-copy h1,
  .team-hero h1 {
    font-size: 19px;
  }

  .avatar-lg {
    width: 62px;
    height: 62px;
  }

  .menu-row {
    padding: 10px;
  }
}
