/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #06090f;
  --bg-nav:    #080b13;
  --bg-card:   #0d1120;
  --bg-card2:  #111827;
  --bg-input:  #0a0e1a;
  --border:    rgba(255,255,255,.08);
  --border2:   rgba(255,255,255,.04);

  /* XLM = white (Stellar), XRP = Ripple blue */
  --teal:      #ffffff;
  --teal-dim:  rgba(255,255,255,.08);
  --teal-glow: rgba(255,255,255,.2);
  --blue:      #00AAE4;
  --blue-dim:  rgba(0,170,228,.12);
  --blue-glow: rgba(0,170,228,.25);

  /* Primary — Ripple blue */
  --primary:      #00AAE4;
  --primary-end:  #0085C0;
  --primary-grad: #00AAE4;
  --primary-dim:  rgba(0,170,228,.12);
  --primary-glow: rgba(0,170,228,.25);

  --gold:      #00AAE4;
  --gold-dim:  rgba(0,170,228,.1);
  --green:     #4ade80;
  --red:       #f87171;

  --text:      #f0f4f8;
  --text-2:    #7a8ba0;
  --text-3:    #3a4a5a;

  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(0,0,0,.8);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.9);
  --shadow-glow: 0 0 30px rgba(0,170,228,.08);

  --font: 'Inter', system-ui, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a    { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img  { max-width: 100%; display: block; }

/* ── Loading screen ───────────────────────────────────────────── */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  transition: opacity .4s;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loader-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.loader-logo .xlm { color: #ffffff; }
.loader-logo .xrp { color: #00AAE4; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(0,170,228,.15);
  border-top-color: #00AAE4;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Typography ───────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -1px; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-2); line-height: 1.7; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px; font-weight: 600; font-size: .9rem;
  transition: all .2s; white-space: nowrap; cursor: pointer; border: none; font-family: inherit;
}
.btn-primary {
  background: #00AAE4; color: #ffffff;
  box-shadow: 0 4px 16px rgba(0,170,228,.25);
}
.btn-primary:hover { background: #0093c4; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,170,228,.35); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: rgba(0,170,228,.6); color: #00AAE4; }
.btn-ghost { color: var(--text-2); padding: 10px 16px; }
.btn-ghost:hover { color: var(--text); background: var(--bg-card); border-radius: var(--radius-sm); }
.btn-sm  { padding: 8px 16px; font-size: .82rem; }
.btn-lg  { padding: 16px 32px; font-size: 1rem; }
.btn-danger { background: rgba(248,113,113,.1); color: var(--red); border: 1px solid rgba(248,113,113,.2); }
.btn-danger:hover { background: rgba(248,113,113,.18); }
.btn-full { width: 100%; }
.btn-teal { background: rgba(0,170,228,.1); color: #00AAE4; border: 1px solid rgba(0,170,228,.2); }
.btn-teal:hover { background: rgba(0,170,228,.18); }

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card-sm { padding: 16px; border-radius: var(--radius-sm); }

/* B&W gradient-border card */
.card-galaxy {
  background: var(--bg-card); border-radius: var(--radius); padding: 24px;
  position: relative;
}
.card-galaxy::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius); padding: 1px;
  background: linear-gradient(135deg, rgba(0,170,228,.25), rgba(0,170,228,.08), rgba(0,170,228,.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 50px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.badge-pending  { background: rgba(255,255,255,.08); color: #cccccc; }
.badge-approved { background: rgba(74,222,128,.1);   color: var(--green); }
.badge-rejected { background: rgba(248,113,113,.1);  color: var(--red); }
.badge-active   { background: rgba(255,255,255,.08); color: #ffffff; }
.badge-credited { background: rgba(74,222,128,.1);   color: var(--green); }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .82rem; color: var(--text-2); font-weight: 500; }
.form-input {
  background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  color: var(--text); font-size: .95rem; width: 100%;
  transition: border-color .2s; outline: none;
}
.form-input:focus { border-color: #00AAE4; box-shadow: 0 0 0 3px rgba(0,170,228,.12); }
.form-input::placeholder { color: var(--text-3); }
select.form-input option { background: var(--bg-card); }

/* ── Toast ────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500; max-width: 340px;
  animation: slideUp .3s ease; box-shadow: var(--shadow);
}
.toast-success { background: var(--bg-card); border-left: 3px solid var(--green);   color: var(--text); }
.toast-error   { background: var(--bg-card); border-left: 3px solid var(--red);     color: var(--text); }
.toast-info    { background: var(--bg-card); border-left: 3px solid #00AAE4; color: var(--text); }
@keyframes slideUp  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideOut { to   { opacity:0; transform:translateY(12px); } }

/* ── Modals ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.85); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 28px; width: 100%; max-width: 480px;
  transform: translateY(16px) scale(.97); transition: transform .25s;
  box-shadow: 0 20px 60px rgba(0,0,0,.9);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { color: var(--text-3); font-size: 1.2rem; padding: 4px; transition: color .15s; }
.modal-close:hover { color: var(--text); }
.modal-body { display: flex; flex-direction: column; gap: 16px; }
.modal-footer { margin-top: 20px; display: flex; gap: 10px; }
.modal-footer .btn { flex: 1; }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th {
  background: var(--bg-card2); padding: 12px 16px;
  text-align: left; color: var(--text-2); font-weight: 600;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
tbody tr { border-top: 1px solid var(--border2); transition: background .15s; }
tbody tr:hover { background: var(--bg-card2); }
tbody td { padding: 14px 16px; vertical-align: middle; }
td.up   { color: var(--green); font-weight: 600; }
td.down { color: var(--red);   font-weight: 600; }
.up   { color: var(--green); }
.down { color: var(--red); }

/* ── Coin icons ───────────────────────────────────────────────── */
.coin-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.1);
}
.coin-xlm { background: rgba(255,255,255,.1); color: #ffffff; }
.coin-xrp { background: rgba(0,170,228,.15); color: #00AAE4; }

/* ── Nav ──────────────────────────────────────────────────────── */
.dash-nav {
  background: rgba(6,9,15,.95); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,170,228,.1);
  height: 64px; display: flex; align-items: center;
  position: sticky; top: 0; z-index: 100;
}
.dash-nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.dash-logo {
  font-size: 1.15rem; font-weight: 800; letter-spacing: -1px;
  display: flex; align-items: center; gap: 2px;
}
.dash-logo .logo-xlm { color: #ffffff; }
.dash-logo .logo-xrp { color: #00AAE4; }

.nav-tabs { display: flex; gap: 2px; }
.nav-tab {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: .88rem;
  transition: all .2s; cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.nav-tab:hover { color: var(--text); background: rgba(0,170,228,.07); }
.nav-tab.active { color: #00AAE4; background: rgba(0,170,228,.12); }
.nav-tab svg { opacity: .7; }
.nav-tab.active svg { opacity: 1; }

.nav-right { display: flex; align-items: center; gap: 10px; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 50px;
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; transition: all .2s;
}
.user-btn:hover { border-color: rgba(255,255,255,.3); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
}
.user-name { font-size: .85rem; font-weight: 600; }
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); min-width: 180px; padding: 6px;
  box-shadow: var(--shadow-lg); z-index: 200;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: all .18s;
}
.dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--text-2); cursor: pointer; width: 100%;
  transition: all .15s;
}
.dropdown-item:hover { background: var(--bg-card2); color: var(--text); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: rgba(248,113,113,.08); }
.dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }
.user-dropdown-wrap { position: relative; }

/* ── Dashboard Layout ─────────────────────────────────────────── */
.dash-body { max-width: 1280px; margin: 0 auto; padding: 28px 24px; }
.section { display: none; }
.section.active { display: block; }

/* ── Portfolio Hero ───────────────────────────────────────────── */
.portfolio-hero {
  background: #0d1120;
  border: 1px solid rgba(0,170,228,.15);
  border-radius: 20px; padding: 32px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.portfolio-hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,170,228,.06) 0%, transparent 70%);
  pointer-events: none;
}
.portfolio-hero::after {
  content: ''; position: absolute; bottom: -60px; left: 30%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,170,228,.03) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label { font-size: .75rem; color: rgba(255,255,255,.4); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }
.hero-balance { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: -2px; line-height: 1; margin-bottom: 8px; }
.hero-sub { font-size: .88rem; color: var(--text-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-change { font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; }
.hero-change.up   { background: rgba(74,222,128,.12); color: var(--green); }
.hero-change.down { background: rgba(248,113,113,.12); color: var(--red); }

/* Allocation bar */
.alloc-bar-wrap { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.06); }
.alloc-bar-label { display: flex; justify-content: space-between; font-size: .75rem; margin-bottom: 8px; }
.alloc-bar-label .xlm-lbl { color: #ffffff; font-weight: 600; }
.alloc-bar-label .xrp-lbl { color: #00AAE4; font-weight: 600; }
.alloc-bar { height: 6px; border-radius: 50px; background: rgba(255,255,255,.06); overflow: hidden; display: flex; }
.alloc-bar-xlm { background: #ffffff; transition: width .6s ease; }
.alloc-bar-xrp { background: #00AAE4; transition: width .6s ease; }

/* Hero action buttons */
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 20px; border-radius: var(--radius); min-width: 86px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: var(--text-2); font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.hero-action-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #ffffff; transform: translateY(-2px); }
.hero-action-btn .btn-icon { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; }
.hero-action-btn.primary { background: rgba(0,170,228,.12); border-color: rgba(0,170,228,.3); color: #00AAE4; }
.hero-action-btn.primary:hover { background: rgba(0,170,228,.2); border-color: rgba(0,170,228,.5); }

/* ── Coin Cards ───────────────────────────────────────────────── */
.coin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 28px; }
.coin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color .2s, transform .2s; }
.coin-card:hover { border-color: rgba(255,255,255,.25); transform: translateY(-2px); }
.coin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.coin-card-info { display: flex; align-items: center; gap: 12px; }
.coin-card-name { font-weight: 700; font-size: .95rem; }
.coin-card-sym  { font-size: .75rem; color: var(--text-2); margin-top: 2px; }
.coin-card-price .price { font-size: 1rem; font-weight: 700; }
.coin-card-price .chg   { font-size: .76rem; font-weight: 600; margin-top: 2px; }
.coin-card-bal  { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.coin-card-usd  { font-size: .82rem; color: var(--text-2); margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.coin-card-staked { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border2); display: flex; justify-content: space-between; font-size: .8rem; }
.coin-card-staked .lbl { color: var(--text-2); }
.coin-card-staked .val { font-weight: 600; color: #ffffff; }
.apy-badge { background: rgba(0,170,228,.12); color: #00AAE4; padding: 2px 9px; border-radius: 50px; font-size: .7rem; font-weight: 700; border: 1px solid rgba(0,170,228,.25); }

/* Sparkline */
.coin-card-sparkline { margin-top: 14px; }

/* ── Section title ────────────────────────────────────────────── */
.section-title { font-size: .95rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; }

/* ── Market Tab ───────────────────────────────────────────────── */
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 28px; }
.market-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.market-stat-label { font-size: .7rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.market-stat-val   { font-size: .95rem; font-weight: 700; }
.market-sparkline  { margin-top: 4px; overflow: hidden; border-radius: 6px; }
.market-price-big  { font-size: 1.6rem; font-weight: 900; letter-spacing: -1px; }

/* ── Earn / Stake ─────────────────────────────────────────────── */
.earn-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.earn-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.earn-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.earn-card-name { font-weight: 700; }
.earn-card-apy  { font-size: 2.2rem; font-weight: 900; color: #ffffff; letter-spacing: -2px; }
.earn-card-apy-label { font-size: .72rem; color: var(--text-2); }
.earn-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.earn-stat-label { font-size: .72rem; color: var(--text-2); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }
.earn-stat-val   { font-size: .95rem; font-weight: 700; }
.earn-card-actions { display: flex; gap: 10px; }
.earn-card-actions .btn { flex: 1; }

/* ── Swap Tab ─────────────────────────────────────────────────── */
.swap-wrap { max-width: 520px; margin: 0 auto; }
.swap-direction { display: flex; align-items: center; justify-content: center; margin: 8px 0; }
.swap-arrow-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .25s; color: var(--text-2);
}
.swap-arrow-btn:hover { border-color: rgba(255,255,255,.4); color: #ffffff; background: rgba(255,255,255,.08); transform: rotate(180deg); }
.swap-rate-box { background: var(--bg-card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .84rem; color: var(--text-2); }
.swap-history-wrap { margin-top: 32px; }

/* ── History ──────────────────────────────────────────────────── */
.history-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 14px; border-radius: 50px; font-size: .8rem; font-weight: 600; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-2);
  transition: all .2s;
}
.filter-chip.active { background: rgba(0,170,228,.12); border-color: rgba(0,170,228,.35); color: #00AAE4; }
.tx-type-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tx-type-icon.receive  { background: rgba(74,222,128,.1);   color: var(--green); }
.tx-type-icon.send     { background: rgba(0,170,228,.1);  color: #00AAE4; }
.tx-type-icon.stake    { background: rgba(0,170,228,.12); color: #00AAE4; }
.tx-type-icon.unstake  { background: rgba(248,113,113,.1); color: var(--red); }
.tx-type-icon.swap     { background: rgba(0,170,228,.08); color: #00AAE4; }
.tx-expandable { cursor: pointer; }
.tx-details { display: none; }
.tx-details.open { display: table-row; }
.tx-details td { padding: 8px 16px 14px; font-size: .8rem; color: var(--text-2); background: var(--bg-card2); }

/* ── Price Alerts ─────────────────────────────────────────────── */
.alert-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.alert-item { background: var(--bg-card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.alert-item .coin   { font-weight: 700; margin-right: 6px; }
.alert-item .target { color: #ffffff; font-weight: 700; }
.alert-delete { color: var(--text-3); cursor: pointer; font-size: .82rem; transition: color .15s; padding: 4px 8px; }
.alert-delete:hover { color: var(--red); }

/* ── Receive Modal ────────────────────────────────────────────── */
.receive-address-large { font-size: .95rem; font-weight: 700; letter-spacing: .02em; word-break: break-all; line-height: 1.8; color: var(--text); }
.receive-network-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 50px; font-size: .75rem; font-weight: 600; margin-bottom: 4px; }
.receive-network-badge.xlm { background: rgba(255,255,255,.1); color: #ffffff; border: 1px solid rgba(255,255,255,.2); }
.receive-network-badge.xrp { background: rgba(0,170,228,.12); color: #00AAE4; border: 1px solid rgba(0,170,228,.25); }

/* ── Settings ─────────────────────────────────────────────────── */
.settings-section { margin-bottom: 28px; }
.settings-section h3 { margin-bottom: 14px; font-size: .72rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.settings-row { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-row-info .lbl { font-weight: 600; font-size: .9rem; margin-bottom: 3px; }
.settings-row-info .sub { font-size: .8rem; color: var(--text-2); }

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-3); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; }

/* ── Memo note ────────────────────────────────────────────────── */
.memo-note { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .8rem; color: #aaaaaa; line-height: 1.5; }

/* ── Auth Pages ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.auth-box {
  width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 36px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; font-size: 1.4rem; font-weight: 800; letter-spacing: -1px; }
.auth-logo .xlm { color: #ffffff; }
.auth-logo .xrp { color: #00AAE4; }
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.auth-sub   { color: var(--text-2); font-size: .9rem; margin-bottom: 28px; }
.auth-form  { display: flex; flex-direction: column; gap: 16px; }
.auth-link  { text-align: center; margin-top: 20px; font-size: .88rem; color: var(--text-2); }
.auth-link a { color: #00AAE4; font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }
.auth-divider { text-align: center; color: var(--text-3); font-size: .8rem; margin: 4px 0; }
.pass-wrap { position: relative; }
.pass-wrap .form-input { padding-right: 44px; }
.pass-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); cursor: pointer; display: flex; align-items: center; line-height: 1; }
.pass-toggle:hover { color: var(--text-2); }
.pass-toggle svg { display: block; }
.error-msg { background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.2); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .85rem; color: var(--red); display: none; }
.error-msg.show { display: block; }

/* ── OTP Input ────────────────────────────────────────────────── */
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-input {
  width: 52px; height: 56px; text-align: center;
  font-size: 1.4rem; font-weight: 700;
  background: var(--bg-input); border: 2px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); outline: none;
  transition: border-color .2s;
}
.otp-input:focus { border-color: #00AAE4; box-shadow: 0 0 0 3px rgba(0,170,228,.12); }

/* ── Admin ────────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 220px; background: var(--bg-nav); border-right: 1px solid var(--border);
  padding: 16px 10px; flex-shrink: 0; position: sticky; top: 64px;
  height: calc(100vh - 64px); overflow-y: auto;
}
.admin-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: .88rem; font-weight: 500;
  cursor: pointer; transition: all .15s; margin-bottom: 2px; width: 100%;
}
.admin-sidebar-item:hover { background: var(--bg-card); color: var(--text); }
.admin-sidebar-item.active { background: rgba(255,255,255,.1); color: #ffffff; }
.admin-main { flex: 1; padding: 28px; overflow: auto; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .val { font-size: 2rem; font-weight: 900; letter-spacing: -1px; color: #ffffff; }
.stat-card .lbl { font-size: .78rem; color: var(--text-2); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* ── Bottom Mobile Nav ────────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(0,0,0,.97); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around; align-items: center;
}
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 10px; cursor: pointer;
  color: var(--text-3); font-size: .65rem; font-weight: 600;
  transition: all .2s; flex: 1; background: none; border: none; font-family: inherit;
  text-transform: uppercase; letter-spacing: .04em;
}
.mobile-nav-btn svg { opacity: .5; transition: opacity .2s; }
.mobile-nav-btn.active { color: #ffffff; }
.mobile-nav-btn.active svg { opacity: 1; }
.mobile-nav-btn:active { transform: scale(.93); }

/* ── Admin mobile toggle ──────────────────────────────────────── */
.admin-menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; flex-shrink: 0;
}
.admin-sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}
.admin-sidebar-overlay.open { display: block; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .desktop-only { display: none !important; }
}

@media (max-width: 480px) {
  /* Auth */
  .auth-box { padding: 28px 20px; border-radius: 16px; }
  .auth-title { font-size: 1.2rem; }
  .otp-input { width: 44px; height: 48px; font-size: 1.2rem; }
}

@media (max-width: 768px) {
  /* Layout */
  .dash-body { padding: 16px 12px 90px; }

  /* Top nav — hide tabs, slim down */
  .nav-tabs { display: none; }
  .dash-nav { height: 56px; }
  .dash-nav-inner { padding: 0 14px; }
  .dash-logo { font-size: 1rem; }
  .user-name { display: none; }
  .user-btn { padding: 5px 8px 5px 5px; gap: 0; }
  .user-btn svg { display: none; }

  /* Show bottom nav */
  .mobile-bottom-nav { display: flex; }

  /* Hero */
  .portfolio-hero { padding: 18px; border-radius: 16px; }
  .hero-balance { font-size: 1.9rem; }
  .hero-label { margin-bottom: 6px; }
  .hero-actions { gap: 6px; margin-top: 18px; }
  .hero-action-btn { padding: 11px 10px; min-width: 60px; font-size: .72rem; gap: 5px; }
  .hero-action-btn .btn-icon { width: 24px; height: 24px; }

  /* Coin cards */
  .coin-cards, .earn-cards { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: 1fr; }
  .earn-card-stats { grid-template-columns: 1fr 1fr; }

  /* Modals — full-screen on mobile */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100% !important; width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(30px) scale(1);
    max-height: 92vh; overflow-y: auto;
  }
  .modal-overlay.open .modal { transform: translateY(0) scale(1); }

  /* Swap */
  .swap-wrap { max-width: 100%; }

  /* Tables */
  .table-wrap { border-radius: var(--radius-sm); }
  tbody td, thead th { padding: 10px 12px; white-space: nowrap; }

  /* Settings */
  .settings-row { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Admin */
  .admin-menu-toggle { display: flex; }
  .admin-sidebar {
    position: fixed; left: -240px; top: 0; bottom: 0;
    z-index: 300; width: 220px; transition: left .25s;
    padding-top: 64px;
  }
  .admin-sidebar.open { left: 0; }
  .admin-main { padding: 16px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card .val { font-size: 1.5rem; }
}

/* ── Utility ──────────────────────────────────────────────────── */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.text-teal    { color: #ffffff; }
.text-blue    { color: #cccccc; }
.text-gold    { color: #e5e5e5; }
.text-purple  { color: #ffffff; }
.text-muted   { color: var(--text-2); }
.text-sm      { font-size: .85rem; }
.text-xs      { font-size: .78rem; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }


