/* ============================================================
   REVELON — Main Stylesheet
   Light default + Dark mode via [data-theme="dark"]
   ============================================================ */

/* ---- THEME TOKENS ---- */
:root {
  --bg:           #f7f8fa;
  --surface:      #ffffff;
  --surface-2:    #f0f2f5;
  --border:       #e8eaed;
  --border-strong:#d0d3d8;
  --text:         #0f0f14;
  --text-2:       #4a4a5a;
  --text-muted:   #8a8a9a;
  --accent:       #1652f0;
  --accent-hover: #1242cc;
  --accent-light: #eef1fd;
  --accent-text:  #1652f0;
  --positive:     #16a34a;
  --positive-bg:  #f0fdf4;
  --negative:     #dc2626;
  --negative-bg:  #fef2f2;
  --warning:      #d97706;
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --shadow:       0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.1);
  --sidebar-w:    220px;
  --nav-h:        64px;
  --bn-h:         66px;
  --transition:   0.18s ease;
}

[data-theme="dark"] {
  --bg:           #0b0b0f;
  --surface:      #111116;
  --surface-2:    #18181f;
  --border:       #1e1e28;
  --border-strong:#2a2a38;
  --text:         #ebebf0;
  --text-2:       #9898b0;
  --text-muted:   #555568;
  --accent:       #f0b90b;
  --accent-hover: #d4a20a;
  --accent-light: #1e1a08;
  --accent-text:  #f0b90b;
  --positive:     #0ecb81;
  --positive-bg:  #071a11;
  --negative:     #f6465d;
  --negative-bg:  #1a0709;
  --warning:      #f0b90b;
  --shadow:       0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.4);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ============================================================
   AUTH LAYOUT (login / register)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

[data-theme="dark"] .auth-logo-icon { color: #000; }

.auth-logo-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a { color: var(--accent); font-weight: 600; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-of-type { margin-bottom: 0; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.form-control {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,82,240,0.12);
  background: var(--surface);
}

[data-theme="dark"] .form-control:focus {
  box-shadow: 0 0 0 3px rgba(240,185,11,0.12);
}

.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }

.input-wrap { position: relative; }
.input-wrap .form-control { padding-right: 46px; }
.input-wrap .input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--negative); margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* OTP inputs */
.otp-row { display: flex; gap: 10px; justify-content: center; }
.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.otp-input:focus { border-color: var(--accent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition), transform var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
[data-theme="dark"] .btn-primary { color: #000; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-strong); }

.btn-danger {
  background: var(--negative-bg);
  color: var(--negative);
  border: 1.5px solid var(--negative);
}

.btn-full { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { height: 52px; font-size: 16px; }

/* ============================================================
   APP LAYOUT (dashboard pages)
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; text-decoration: none;
}
.sidebar-brand-mark {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
/* Only the text fallback (image failed) gets a background */
.sidebar-brand-mark.brand-fallback { background: var(--accent); color: #fff; }
[data-theme="dark"] .sidebar-brand-mark.brand-fallback { color: #000; }
.sidebar-brand-mark img { width: 34px; height: 34px; object-fit: contain; }
.sidebar-brand-name { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.4px; white-space: nowrap; }
.sidebar-brand-tag  { font-size: 10px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-scroll::-webkit-scrollbar { width: 0; }
.sidebar-nav-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 10px 10px 4px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  text-decoration: none; white-space: nowrap; position: relative;
  transition: background var(--transition), color var(--transition);
}
.nav-item i { font-size: 18px; flex-shrink: 0; }
.nav-label { line-height: 1; }
.nav-item:hover { background: var(--surface-2); color: var(--text-2); text-decoration: none; }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item .tooltip { display: none; }
.nav-spacer { flex: 1; min-height: 12px; }

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 10px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.theme-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); cursor: pointer;
  transition: background var(--transition); user-select: none;
}
.theme-row:hover { background: var(--border); }
.theme-row-label { font-size: 12px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.theme-row-label i { font-size: 15px; }
.toggle-pill {
  width: 36px; height: 20px; border-radius: 20px;
  background: var(--border-strong); position: relative; transition: background 0.2s; flex-shrink: 0;
}
.toggle-pill::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
[data-theme="light"] .toggle-pill { background: var(--accent); }
[data-theme="light"] .toggle-pill::after { transform: translateX(16px); }

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); }

.sidebar-network { padding: 6px 10px; }
.sidebar-net-label { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 4px; }
.sidebar-net-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.net-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); flex-shrink: 0; box-shadow: 0 0 6px rgba(14,203,129,0.5); }

/* ---- Page area ---- */
.page { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* Topbar */
.topbar {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  transition: background var(--transition), border-color var(--transition);
}
.topbar-left { display: flex; flex-direction: column; gap: 1px; }
.topbar-title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.topbar-sub   { font-size: 12px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition), color var(--transition);
}
.topbar-icon-btn:hover { background: var(--surface-2); color: var(--text); }
body.app-page #globalThemeBtn { display: none !important; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
[data-theme="dark"] .avatar { color: #000; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 14px 5px 5px; border-radius: 30px;
}
.user-chip-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-chip-role { font-size: 11px; color: var(--text-muted); }

/* Page body */
.page-body { padding: 28px; flex: 1; }

/* ---- Bottom nav (mobile) ---- */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bn-h);
  background: var(--surface); border-top: 1px solid var(--border);
  z-index: 100; justify-content: space-around; align-items: flex-end;
  padding-bottom: 8px;
  transition: background var(--transition), border-color var(--transition);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 3px; padding-bottom: 2px;
  color: var(--text-muted); text-decoration: none;
  font-size: 10px; font-weight: 600; transition: color var(--transition);
}
.bn-item i { font-size: 21px; line-height: 1; }
.bn-item.active { color: var(--accent); }

/* Trust Wallet-style Swap button */
.bn-swap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px; text-decoration: none;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  padding-bottom: 2px; margin-top: -22px;
}
.bn-swap-circle {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, #1652f0, #4a7dff);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
  border: 3px solid var(--bg);
  box-shadow: 0 4px 18px rgba(22,82,240,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
[data-theme="dark"] .bn-swap-circle {
  background: linear-gradient(135deg, #f0b90b, #e6a800);
  color: #000; box-shadow: 0 4px 18px rgba(240,185,11,0.45);
}
.bn-swap:hover .bn-swap-circle { transform: scale(1.06); }
.bn-swap.active { color: var(--accent); }

/* Desktop wallet topbar — visible only on desktop */
.wlt-desktop-topbar { display: flex; }
@media (max-width: 768px) { .wlt-desktop-topbar { display: none !important; } }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .page { margin-left: 0 !important; padding-bottom: var(--bn-h); }
  .topbar { padding: 0 16px; }
  .page-body { padding: 16px; }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

/* ============================================================
   MOBILE TOPBAR (wallet pages — shown only on mobile)
   ============================================================ */
.mobile-topbar {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  transition: background var(--transition), border-color var(--transition);
}
.mobile-brand { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -0.4px; }
.mobile-topbar-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 768px) { .mobile-topbar { display: flex; } }

/* ============================================================
   WALLET HERO BOX (balance card + actions underneath)
   ============================================================ */
.wlt-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px 24px;
  margin-bottom: 22px;
  transition: background var(--transition), border-color var(--transition);
}
.wlt-balance-label { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; }
.wlt-balance-amt {
  font-size: 44px; font-weight: 800; letter-spacing: -1.8px;
  color: var(--text); line-height: 1; margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.wlt-balance-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.wlt-change-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: 20px; font-size: 13px; font-weight: 700;
}
.wlt-change-chip.pos { background: var(--positive-bg); color: var(--positive); }
.wlt-change-chip.neg { background: var(--negative-bg); color: var(--negative); }
.wlt-btc-equiv { font-size: 12px; color: var(--text-muted); }

/* Action buttons — spread evenly, under the balance */
.wlt-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.wlt-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; width: 100%; height: 76px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: none; letter-spacing: 0.01em;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.1s;
}
.wlt-btn i { font-size: 22px; line-height: 1; }
.wlt-btn:hover { background: var(--border); border-color: var(--border-strong); text-decoration: none; }
.wlt-btn:active { transform: scale(0.96); }
.wlt-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="dark"] .wlt-btn-primary { color: #000; }
.wlt-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
[data-theme="dark"] .wlt-btn-primary:hover { color: #000; }

/* ============================================================
   PORTFOLIO BAR
   ============================================================ */
.portfolio-bar-wrap { margin-bottom: 24px; }
.portfolio-bar {
  height: 7px; border-radius: 4px; overflow: hidden;
  display: flex; gap: 2px; background: var(--surface-2);
  margin-bottom: 10px;
}
.portfolio-seg { height: 100%; border-radius: 3px; min-width: 3px; }
.portfolio-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.portfolio-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.portfolio-legend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   ASSETS SECTION
   ============================================================ */
.assets-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}
.assets-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 16px;
}
.assets-title { font-size: 16px; font-weight: 700; color: var(--text); }
.assets-all-btn {
  padding: 5px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--accent-light); color: var(--accent);
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background var(--transition);
}
.assets-all-btn:hover { background: var(--border); color: var(--text); }

/* Desktop column headers */
.asset-table-head {
  display: flex; align-items: center;
  padding: 9px 20px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
  background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

/* Asset row */
.asset-row {
  display: flex; align-items: center; padding: 15px 20px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.asset-row:last-child { border-bottom: none; }
.asset-row:hover { background: var(--surface-2); }

/* Column definitions */
.atc-asset    { flex: 2.5; display: flex; align-items: center; gap: 13px; min-width: 0; }
.atc-price    { flex: 1.5; font-size: 13px; font-weight: 400; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.atc-24h      { flex: 1;   text-align: right; }
.atc-holdings { flex: 1.5; font-size: 13px; font-weight: 400; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.atc-value    { flex: 1.5; font-size: 14px; font-weight: 700; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

/* Coin icon */
.coin-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; overflow: hidden;
}
.coin-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; }
.sheet-coin-icon { width: 52px; height: 52px; font-size: 14px; }

/* Coin name block */
.coin-sym-block .csym  { font-size: 14px; font-weight: 700; color: var(--text); }
.coin-sym-block .cname { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* Change badge */
.change-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.change-badge.pos { background: var(--positive-bg); color: var(--positive); }
.change-badge.neg { background: var(--negative-bg); color: var(--negative); }

/* Mobile-only right column (value + change) */
.asset-mob-right { display: none; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.asset-mob-val { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* Mobile overrides */
@media (max-width: 768px) {
  .wlt-hero { padding: 22px 20px 20px; margin-bottom: 18px; }
  .wlt-balance-amt { font-size: 36px; letter-spacing: -1.2px; }
  .wlt-balance-meta { margin-bottom: 20px; }
  .wlt-actions { gap: 8px; }
  .wlt-btn { height: 66px; font-size: 10px; gap: 5px; }
  .wlt-btn i { font-size: 20px; }
  .asset-table-head { display: none; }
  .atc-price, .atc-24h, .atc-holdings, .atc-value { display: none; }
  .atc-asset { flex: 1; }
  .asset-mob-right { display: flex; }
  .asset-row { padding: 13px 16px; }
  .coin-icon { width: 38px; height: 38px; }
}


/* ============================================================
   STATS ROW (history page)
   ============================================================ */
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 640px) { .stats-row { grid-template-columns: 1fr 1fr; } }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.stat-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-icon-pos  { background: var(--positive-bg); color: var(--positive); }
.stat-icon-neg  { background: var(--negative-bg); color: var(--negative); }
.stat-icon-warn { background: #fef3c7; color: var(--warning); }
[data-theme="dark"] .stat-icon-warn { background: #1a1200; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }

/* ============================================================
   PANEL CARD (send/receive/history shared)
   ============================================================ */
.panel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 15px; font-weight: 700; color: var(--text); }
.panel-link  { font-size: 12px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 3px; }
.panel-link:hover { text-decoration: none; opacity: 0.8; }

/* ============================================================
   TX ROWS (history / send tips)
   ============================================================ */
.tx-row { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.tx-row:last-child { border-bottom: none; }
.tx-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.tx-send { background: var(--negative-bg); color: var(--negative); }
.tx-recv { background: var(--positive-bg); color: var(--positive); }
.tx-body { flex: 1; min-width: 0; }
.tx-label { font-size: 13px; font-weight: 600; color: var(--text); }
.tx-date  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.tx-right { text-align: right; flex-shrink: 0; }
.tx-amt { font-size: 14px; font-weight: 700; }
.tx-amt.pos { color: var(--positive); }
.tx-amt.neg { color: var(--negative); }
.tx-usd { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   UTILITY
   ============================================================ */
.text-num { font-variant-numeric: tabular-nums; }
.fw6 { font-weight: 600; }
.muted { color: var(--text-muted); }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 20px; color: var(--text-muted); font-size: 13px; }
.empty-state i { font-size: 38px; opacity: 0.3; }

/* ============================================================
   BOTTOM SHEET / COIN ACTION MODAL
   ============================================================ */
.sheet-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 200;
  backdrop-filter: blur(4px);
}
.sheet-overlay.open { display: block; }
.bottom-sheet {
  position: fixed; left: 0; right: 0; bottom: -100%;
  background: var(--surface); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 16px 24px 48px; z-index: 201;
  transition: bottom 0.32s cubic-bezier(0.34,1.4,0.64,1);
}
.bottom-sheet.open { bottom: 0; }
.sheet-handle { width: 38px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto 22px; }
.sheet-coin-header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.sheet-coin-name { font-size: 20px; font-weight: 700; color: var(--text); }
.sheet-coin-sym  { font-size: 13px; color: var(--text-muted); }
.sheet-btns { display: flex; gap: 10px; margin-bottom: 14px; }
.sheet-btn {
  flex: 1; height: 52px; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 700; text-decoration: none; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.sheet-btn i { font-size: 20px; }
.sheet-btn:hover { background: var(--border); color: var(--text); text-decoration: none; }
.sheet-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="dark"] .sheet-btn-primary { color: #000; }
.sheet-btn-primary:hover { background: var(--accent-hover); }
.sheet-cancel { width: 100%; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: background var(--transition); }
.sheet-cancel:hover { background: var(--surface-2); }

@media (min-width: 769px) {
  .sheet-overlay.open { display: block; }
  .bottom-sheet {
    left: 50%; right: auto; top: 50%; bottom: auto;
    transform: translate(-50%, -46%);
    width: 380px; max-width: 94vw;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    padding: 24px 28px 20px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .bottom-sheet.open {
    transform: translate(-50%, -50%);
    opacity: 1; pointer-events: auto;
  }
  .sheet-handle { display: none; }
  .sheet-btns { margin-bottom: 10px; }
  .sheet-coin-header { margin-bottom: 20px; }
  .bottom-sheet.sheet-wide {
    width: 520px;
    max-height: 88vh;
    overflow-y: auto;
  }
}

/* ============================================================
   LEGACY COIN ROW (kept for compatibility)
   ============================================================ */
.coin-list { display: flex; flex-direction: column; gap: 8px; }
.coin-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: background var(--transition), border-color var(--transition); }
.coin-row:hover { background: var(--surface-2); }
.coin-info { flex: 1; min-width: 0; }
.coin-right { text-align: right; flex-shrink: 0; }
.coin-usd { font-size: 15px; font-weight: 600; color: var(--text); }
.coin-change { font-size: 12px; margin-top: 2px; }
.up { color: var(--positive); }
.down { color: var(--negative); }
.flat { color: var(--text-muted); }
.tx-list { display: flex; flex-direction: column; gap: 6px; }

/* ============================================================
   BADGE / PILL
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-success { background: var(--positive-bg); color: var(--positive); }
.badge-danger  { background: var(--negative-bg); color: var(--negative); }
.badge-warning { background: #fef3c7; color: var(--warning); }
[data-theme="dark"] .badge-warning { background: #1a1200; }
.badge-info    { background: var(--accent-light); color: var(--accent-text); }

/* ============================================================
   ALERT / NOTICE BOX
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-danger  { background: var(--negative-bg); color: var(--negative); border: 1px solid var(--negative); }
.alert-success { background: var(--positive-bg); color: var(--positive); border: 1px solid var(--positive); }
.alert-info    { background: var(--accent-light); color: var(--accent-text); border: 1px solid var(--accent); }
.alert { display: none; }
.alert.show { display: flex; }

/* ============================================================
   SECTION + MISC
   ============================================================ */
.section { margin-bottom: 28px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 16px; font-weight: 700; color: var(--text); }
.section-link { font-size: 13px; font-weight: 600; color: var(--accent); }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--transition);
}
.copy-btn:hover { color: var(--accent); }

/* ============================================================
   LOADER SPINNER
   ============================================================ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
[data-theme="dark"] .spinner { border-color: rgba(0,0,0,0.2); border-top-color: #000; }
.spinner.dark-spinner { border-color: rgba(0,0,0,0.15); border-top-color: var(--accent); }

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

/* page-level loading */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.3s;
}
.page-loader.hide { opacity: 0; pointer-events: none; }

/* ============================================================
   COIN ICON
   ============================================================ */
.coin-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* ============================================================
   SEND / RECEIVE GRID
   ============================================================ */
.send-grid { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .send-grid { grid-template-columns: 1fr; } }
.send-tips { display: flex; flex-direction: column; gap: 0; }

/* ============================================================
   COIN DROPDOWN (receive page — icon select)
   ============================================================ */
.coin-dd { position: relative; width: 100%; }
.coin-dd-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: border-color var(--transition), background var(--transition);
}
.coin-dd-trigger:hover { border-color: var(--border-strong); }
.coin-dd.open .coin-dd-trigger { border-color: var(--accent); }
.coin-dd-current { display: flex; align-items: center; gap: 11px; min-width: 0; }
.coin-dd-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.coin-dd-sym  { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.2; }
.coin-dd-name { font-size: 11px; color: var(--text-muted); line-height: 1.2; }
.coin-dd-chev { color: var(--text-muted); font-size: 18px; transition: transform var(--transition); flex-shrink: 0; }
.coin-dd.open .coin-dd-chev { transform: rotate(180deg); }

.coin-dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 300px; overflow-y: auto; padding: 6px;
  display: none;
}
.coin-dd.open .coin-dd-panel { display: block; }
.coin-dd-option {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--transition);
}
.coin-dd-option:hover { background: var(--surface-2); }
.coin-dd-option.active { background: var(--accent-light); }
.coin-dd-check { margin-left: auto; color: var(--accent); font-size: 16px; opacity: 0; flex-shrink: 0; }
.coin-dd-option.active .coin-dd-check { opacity: 1; }
.coin-icon img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }

/* ============================================================
   FILTER CHIPS (history page)
   ============================================================ */
.filter-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-chip {
  padding: 7px 18px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-chip:hover { background: var(--surface-2); color: var(--text); }
.filter-chip.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* ============================================================
   TRANSACTION TABLE (history page)
   ============================================================ */
.tx-table-head {
  display: flex; align-items: center;
  padding: 10px 20px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.tx-table-row { border-bottom: 1px solid var(--border); }
.tx-table-row:last-child { border-bottom: none; }
.tx-mobile-row  { display: none; }
.tx-desktop-row { display: flex; align-items: center; padding: 14px 20px; gap: 12px; }

@media (max-width: 768px) {
  .tx-table-head  { display: none; }
  .tx-desktop-row { display: none; }
  .tx-mobile-row  { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
}

/* ============================================================
   LOGO
   ============================================================ */
img[src*="logo.png"] {
  border-radius: 50%;
  background: transparent;
  object-fit: cover;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .page { margin-left: 0 !important; padding-bottom: 62px; }
}

@media (max-width: 640px) {
  .auth-card { padding: 28px 20px; }
  .balance-hero { padding: 20px 20px 18px; }
  .balance-amount { font-size: 32px; }
  .balance-hero-top { flex-direction: column; gap: 10px; }
  .hero-greeting { text-align: left; }
  .hero-actions { flex-wrap: wrap; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .wallet-grid { grid-template-columns: 1fr; }
  .col-price, .col-24h, .col-holdings { display: none; }
}
