:root {
  --bg: #050505;
  --bg-soft: #0e0e0f;
  --panel: #121214;
  --panel-2: #17171a;
  --panel-3: #1d1d21;
  --line: rgba(255, 215, 130, 0.12);
  --line-strong: rgba(255, 215, 130, 0.28);
  --text: #f5f1e8;
  --muted: #a59a83;
  --gold: #d6a94f;
  --gold-soft: #f1d18f;
  --gold-deep: #8d6522;
  --success: #4ed19d;
  --danger: #ff7a7a;
  --info: #89a7ff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top, rgba(214, 169, 79, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(214, 169, 79, 0.08), transparent 26%),
    linear-gradient(180deg, #050505 0%, #0a0a0b 48%, #121212 100%);
}

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

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem 1rem 6rem;
}

.auth-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 1.25rem;
}

.top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: #0a0a0b;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 16px 30px rgba(214, 169, 79, 0.2);
  font-weight: 800;
}

.brand-kicker,
.section-kicker,
.label-text {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.brand-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0.03em;
}

.page-chip,
.signal-chip,
.status-chip,
.asset-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(214, 169, 79, 0.08);
  color: var(--gold-soft);
  font-size: 0.78rem;
}

.signal-chip i,
.status-chip i {
  font-size: 0.8rem;
}

.hero-panel,
.surface-panel,
.menu-panel,
.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 35%),
    linear-gradient(180deg, rgba(24, 24, 28, 0.96), rgba(12, 12, 14, 0.98));
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

.hero-panel::after,
.auth-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 169, 79, 0.18), transparent 70%);
  pointer-events: none;
}

.surface-panel,
.auth-card {
  padding: 1.15rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.hero-title {
  margin: 0.55rem 0 0.35rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.25rem, 8vw, 3.4rem);
  line-height: 0.92;
}

.hero-text,
.muted-copy {
  color: #c8beae;
}

.balance-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
}

.balance-amount {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.balance-meta {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.balance-meta-card,
.mini-tile,
.referral-tier,
.asset-row,
.transaction-row,
.detail-row,
.method-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.balance-meta-card,
.detail-row,
.method-card,
.asset-row,
.transaction-row {
  padding: 0.95rem;
}

.metric-grid,
.shortcut-grid,
.asset-list,
.transaction-list,
.stack-list,
.detail-list {
  display: grid;
  gap: 0.85rem;
}

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

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

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
}

.action-link {
  display: block;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.06), rgba(255, 255, 255, 0.02));
  min-height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.action-link:hover,
.action-link:focus-visible,
.method-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.1), rgba(255, 255, 255, 0.03));
}

.action-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  color: var(--gold-soft);
  background: rgba(214, 169, 79, 0.08);
  border: 1px solid var(--line);
  font-size: 1.1rem;
}

.asset-row,
.transaction-row,
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.asset-row {
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.asset-row:hover,
.asset-row:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.1), rgba(255, 255, 255, 0.03));
}

.asset-main,
.transaction-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.asset-symbol,
.transaction-icon,
.market-badge {
  width: 2.85rem;
  height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(214, 169, 79, 0.08);
  border: 1px solid var(--line);
  color: var(--gold-soft);
  flex: 0 0 auto;
}

.asset-symbol {
  font-weight: 800;
}

.asset-meta,
.transaction-copy {
  min-width: 0;
}

.asset-side {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  flex-shrink: 0;
}

.asset-actions {
  display: flex;
  align-items: center;
}

.asset-meta strong,
.transaction-copy strong {
  display: block;
  font-size: 0.98rem;
}

.asset-meta span,
.transaction-copy span,
.tiny-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.positive {
  color: var(--success);
}

.negative {
  color: var(--danger);
}

.gold-text {
  color: var(--gold-soft);
}

.progress-shell {
  height: 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar-gold {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

.chart-shell {
  position: relative;
  padding: 1rem 1rem 0.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(214, 169, 79, 0.08), transparent 65%),
    rgba(255, 255, 255, 0.015);
}

.chart-bars {
  height: 150px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.55rem;
}

.chart-bars span {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  box-shadow: 0 0 18px rgba(214, 169, 79, 0.1);
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(214, 169, 79, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

.btn-gold {
  border: 0;
  color: #110d07;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 16px 26px rgba(214, 169, 79, 0.16);
}

.btn-gold:hover,
.btn-gold:focus {
  color: #110d07;
  background: linear-gradient(135deg, #f6dcaa, #e3b965);
}

.btn-outline-gold {
  color: var(--gold-soft);
  border: 1px solid var(--line-strong);
  background: rgba(214, 169, 79, 0.06);
}

.btn-outline-gold:hover,
.btn-outline-gold:focus {
  color: var(--text);
  border-color: var(--gold);
  background: rgba(214, 169, 79, 0.12);
}

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

.form-control,
.form-select {
  min-height: 3.15rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 130, 0.12);
  border-radius: 1rem;
}

.form-control::placeholder {
  color: rgba(245, 241, 232, 0.38);
}

.form-control:focus,
.form-select:focus {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(214, 169, 79, 0.42);
  box-shadow: 0 0 0 0.22rem rgba(214, 169, 79, 0.12);
}

.form-check-input {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 215, 130, 0.16);
}

.form-check-input:checked {
  background-color: var(--gold);
  border-color: var(--gold);
}

.menu-panel {
  padding: 0.4rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(calc(100% - 1.25rem), 430px);
}

.bottom-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  min-height: 3.7rem;
  padding: 0.4rem 0.2rem;
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.68rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bottom-link i {
  font-size: 1rem;
}

.bottom-link.active,
.bottom-link:hover {
  color: var(--text);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.18), rgba(214, 169, 79, 0.06));
  transform: translateY(-1px);
}

.auth-card {
  width: 100%;
  padding: 1.4rem;
}

.auth-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  line-height: 1;
}

.divider-note {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.divider-note::before,
.divider-note::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 32%;
  height: 1px;
  background: var(--line);
}

.divider-note::before {
  left: 0;
}

.divider-note::after {
  right: 0;
}

.mini-link {
  color: var(--gold-soft);
}

.wallet-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(214, 169, 79, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

.tier-grid {
  display: grid;
  gap: 0.85rem;
}

.referral-tier {
  padding: 1rem;
}

.referral-tier.featured {
  background: linear-gradient(135deg, rgba(214, 169, 79, 0.14), rgba(255, 255, 255, 0.02));
  border-color: var(--line-strong);
}

.list-plain {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

.list-plain li + li {
  margin-top: 0.45rem;
}

.page-stack > * + * {
  margin-top: 1rem;
}

.modal-backdrop.show {
  opacity: 0.72;
}

.asset-modal .modal-dialog {
  max-width: 430px;
}

.asset-modal .modal-content {
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at top right, rgba(214, 169, 79, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(24, 24, 28, 0.98), rgba(10, 10, 12, 1));
  box-shadow: var(--shadow);
}

.asset-modal .modal-header,
.asset-modal .modal-footer {
  border-color: var(--line);
}

.asset-modal .btn-close {
  filter: invert(1) brightness(1.4);
}

.modal-hero {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.modal-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.trend-chart {
  padding: 1rem 1rem 0.7rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(214, 169, 79, 0.1), transparent 72%),
    rgba(255, 255, 255, 0.02);
}

.trend-grid {
  height: 170px;
  display: flex;
  align-items: end;
  gap: 0.45rem;
}

.trend-grid span {
  flex: 1;
  min-width: 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(241, 209, 143, 1), rgba(141, 101, 34, 1));
  box-shadow: 0 0 18px rgba(214, 169, 79, 0.12);
}

.trend-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.stat-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat-pair {
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

@media (min-width: 576px) {
  .hero-panel {
    padding: 1.6rem;
  }
}
