@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:          #06080e;
  --surface:     #0d1020;
  --card:        #111526;
  --card-2:      #171c30;
  --border:      #1e253e;
  --border-2:    #283050;

  --primary:     #f59e0b;
  --primary-dim: rgba(245,158,11,0.12);
  --purple:      #7c3aed;
  --purple-dim:  rgba(124,58,237,0.12);

  --green:       #00e676;
  --green-dim:   rgba(0,230,118,0.12);
  --red:         #ff3b4e;
  --red-dim:     rgba(255,59,78,0.12);
  --yellow:      #fbbf24;
  --yellow-dim:  rgba(251,191,36,0.12);

  --text:        #e2eeff;
  --text-2:      #8896b3;
  --text-3:      #3d4f6b;

  --gradient:    linear-gradient(135deg, #f59e0b, #7c3aed);
  --sidebar-w:   240px;
  --topbar-h:    64px;
  --radius:      12px;
  --radius-sm:   8px;
  --ease:        0.2s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; }
input, select, textarea, button { font-family: inherit; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* Typography */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-muted   { color: var(--text-2); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-yellow  { color: var(--yellow); }
.text-primary { color: var(--primary); }

/* Layout */
.page-app { display: flex; min-height: 100vh; }

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.page-body { flex: 1; padding: 24px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* Navbar (landing) */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: rgba(6,8,14,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar .inner {
  max-width: 1520px; margin: 0 auto; padding: 0 20px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.logo {
  display: flex; align-items: center; gap: 8px; flex-shrink: 1; min-width: 0;
  font-size: 1rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.logo img, .logo svg { width: 26px; height: 26px; flex-shrink: 0; }
.nav-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Sidebar */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform var(--ease);
}
.sidebar-logo {
  height: var(--topbar-h);
  padding: 0 20px;
  display: flex; align-items: center; gap: 8px; flex-shrink: 1; min-width: 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  flex-shrink: 0;
}
.sidebar-logo img, .sidebar-logo svg { width: 28px; height: 28px; flex-shrink: 0; filter: none; }
.sidebar-nav { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.s-link {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 0.875rem; font-weight: 500;
  transition: all var(--ease); cursor: pointer; min-height: 44px;
}
.s-link:hover  { background: var(--card); color: var(--text); }
.s-link.active { background: var(--primary-dim); color: var(--primary); }
.s-link svg    { width: 17px; height: 17px; flex-shrink: 0; }
.s-sep { height: 1px; background: var(--border); margin: 8px 12px; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6,8,14,0.75);
  backdrop-filter: blur(4px);
  z-index: 49;
}

/* Mobile topbar hamburger */
.menu-btn {
  display: none;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0;
}

/* Avatar */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.avatar.lg { width: 44px; height: 44px; font-size: 1rem; }
.avatar.sm { width: 26px; height: 26px; font-size: 0.65rem; }
.user-name  { font-size: 0.85rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-label { font-size: 0.72rem; color: var(--text-2); }

/* Topbar (app pages) */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 12px;
}
.topbar-title { font-size: 1.05rem; font-weight: 700; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.card-title {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient);
}
.stat-label  { font-size: 0.78rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.stat-value  { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-change { font-size: 0.8rem; margin-top: 6px; }
.stat-icon   { position: absolute; top: 16px; right: 16px; font-size: 1.6rem; opacity: 0.15; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--ease); white-space: nowrap; min-height: 40px;
}
.btn-primary  { background: var(--gradient); color: #fff; }
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(245,158,11,0.25); }
.btn-outline  { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-outline:hover { background: var(--card-2); }
.btn-ghost    { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--card); }
.btn-danger   { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,59,78,0.2); }
.btn-danger:hover { background: rgba(255,59,78,0.2); }
.btn-success  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,230,118,0.2); }
.btn-success:hover { background: rgba(0,230,118,0.2); }
.btn-sm  { padding: 6px 13px; font-size: 0.8rem; min-height: 34px; }
.btn-lg  { padding: 13px 28px; font-size: 0.95rem; min-height: 48px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.875rem;
  padding: 10px 14px; min-height: 44px;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.form-input::placeholder { color: var(--text-3); }
select.form-input { cursor: pointer; }
.form-hint  { font-size: 0.77rem; color: var(--text-2); margin-top: 4px; }
.form-error { font-size: 0.77rem; color: var(--red); margin-top: 4px; }
.input-group { position: relative; }
.input-suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 0.8rem; font-weight: 600; color: var(--text-2); pointer-events: none;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 100px;
  font-size: 0.73rem; font-weight: 600; letter-spacing: 0.02em;
}
.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-red    { background: var(--red-dim);    color: var(--red); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-blue   { background: var(--primary-dim); color: var(--primary); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.badge-gray   { background: rgba(255,255,255,0.06); color: var(--text-2); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
thead th {
  padding: 10px 16px; text-align: left;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
tbody td {
  padding: 13px 16px; font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); cursor: default; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 22px; gap: 2px; overflow-x: auto; }
.tab {
  padding: 10px 20px; font-size: 0.875rem; font-weight: 500;
  color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all var(--ease); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Coin icon */
.coin-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 800; color: #fff;
  letter-spacing: 0.02em; flex-shrink: 0;
}
.coin-icon.sm { width: 28px; height: 28px; font-size: 0.55rem; }

/* Asset row */
.asset-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.asset-row:last-child { border-bottom: none; }
.asset-info { flex: 1; min-width: 0; }
.asset-name   { font-size: 0.88rem; font-weight: 600; }
.asset-symbol { font-size: 0.75rem; color: var(--text-2); }
.asset-amount { text-align: right; }
.asset-qty { font-size: 0.875rem; font-weight: 700; }
.asset-usd { font-size: 0.75rem; color: var(--text-2); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,8,14,0.82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 28px;
  width: 100%; max-width: 520px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px; gap: 12px;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { cursor: pointer; color: var(--text-2); font-size: 1.2rem; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--card-2); color: var(--text); }

/* Coin grid (admin credit) */
.coin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(76px,1fr)); gap: 8px;
  max-height: 300px; overflow-y: auto;
}
.coin-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer; transition: all 0.15s;
}
.coin-btn:hover  { border-color: var(--border-2); background: var(--card-2); }
.coin-btn.selected { border-color: var(--primary); background: var(--primary-dim); }
.cb-sym  { font-size: 0.75rem; font-weight: 800; color: var(--text); letter-spacing: 0.02em; }
.cb-name { font-size: 0.6rem; color: var(--text-2); text-align: center; line-height: 1.2; }

/* Admin layout */
.admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.user-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.user-list-head { padding: 12px; border-bottom: 1px solid var(--border); }
.user-list-body { overflow-y: auto; max-height: calc(100vh - 280px); }
.user-item {
  display: flex; align-items: center; gap: 8px; flex-shrink: 1; min-width: 0; padding: 12px;
  cursor: pointer; border-bottom: 1px solid var(--border); transition: background var(--ease);
  min-height: 60px;
}
.user-item:hover  { background: var(--card-2); }
.user-item.active { background: var(--primary-dim); }
.user-item-name  { font-size: 0.85rem; font-weight: 600; }
.user-item-email { font-size: 0.75rem; color: var(--text-2); }
.user-detail { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.user-detail-head {
  display: flex; align-items: center; gap: 14px; padding: 20px 24px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px;
}

/* Toast */
#toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px; flex-shrink: 1; min-width: 0;
  padding: 12px 18px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease; pointer-events: auto;
  max-width: 320px;
}
.toast.success { border-color: rgba(0,230,118,0.3); }
.toast.error   { border-color: rgba(255,59,78,0.3); }
.toast.info    { border-color: rgba(245,158,11,0.3); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.toast.success .toast-dot { background: var(--green); }
.toast.error   .toast-dot { background: var(--red); }
.toast.info    .toast-dot { background: var(--primary); }

/* Loading */
.loading-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100px;
}
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--border-2);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
}
.empty-state {
  display: flex; align-items: center; justify-content: center;
  min-height: 80px; color: var(--text-2); font-size: 0.875rem;
}

/* Divider */
.divider {
  height: 1px; background: var(--border);
  margin: 24px 0; position: relative;
}
.divider::after {
  content: 'or'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  padding: 0 12px; background: var(--card); color: var(--text-2); font-size: 0.78rem;
}

/* Auth page */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: radial-gradient(ellipse at 50% 0%, rgba(245,158,11,0.06) 0%, transparent 60%),
                               radial-gradient(ellipse at 50% 100%, rgba(124,58,237,0.06) 0%, transparent 60%),
                               var(--bg);
}
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 36px 32px;
  width: 100%; max-width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.auth-logo   { display: block; font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-2); margin-bottom: 24px; }
.auth-footer   { text-align: center; font-size: 0.82rem; color: var(--text-2); margin-top: 12px; }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* Hero section */
.hero {
  min-height: calc(100vh - var(--topbar-h));
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  padding: 80px 0;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 18px;
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-2); line-height: 1.7;
  margin-bottom: 32px; max-width: 500px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; }

/* Float card */
.float-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px;
  width: 280px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: floatY 3s ease-in-out infinite;
}
.float-coin-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mini-chart { width: 100%; height: 80px; display: block; }

/* Ticker */
.ticker-wrap { overflow: hidden; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }
.ticker-track {
  display: flex; gap: 0;
  animation: tickerScroll 40s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 28px; font-size: 0.82rem; font-weight: 500;
  border-right: 1px solid var(--border); white-space: nowrap;
}

/* Section */
.section { padding: 80px 0; }
.section-hd { text-align: center; margin-bottom: 48px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 10px; }
.section-sub { color: var(--text-2); font-size: 1rem; }

/* Feature card */
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color var(--ease), transform var(--ease);
}
.feature-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.fi-blue   { background: var(--primary-dim); }
.fi-purple { background: var(--purple-dim); }
.fi-green  { background: var(--green-dim); }
.fi-yellow { background: var(--yellow-dim); }
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-text  { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; }

/* Footer */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 32px 24px; text-align: center;
  color: var(--text-2); font-size: 0.82rem;
}
.footer .logo { display: block; margin-bottom: 10px; font-size: 1.2rem; }

/* Chart box */
.chart-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chart-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 8px;
}
.tf-btn {
  padding: 5px 12px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.tf-btn:hover  { color: var(--text); border-color: var(--border); }
.tf-btn.active { background: var(--primary-dim); color: var(--primary); border-color: rgba(245,158,11,0.3); }

/* Animations */
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes slideUp   { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes floatY    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ======================================================
   MOBILE RESPONSIVE
   ====================================================== */

/* Tablet: <= 1024px */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .user-list-body { max-height: 300px; }
}

/* Mobile/Tablet: <= 768px */
@media (max-width: 768px) {
  /* Show hamburger, hide sidebar by default */
  .menu-btn { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }

  /* Main content takes full width when sidebar is hidden */
  .main-content { margin-left: 0; }

  /* Topbar adjustments */
  .topbar { padding: 0 14px; gap: 10px; }

  /* Navbar mobile */
  .navbar .inner { padding: 0 14px; gap: 8px; }
  .logo { font-size: 0.82rem; gap: 6px; }
  .logo img, .logo svg { width: 22px; height: 22px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 6px 10px; font-size: 0.78rem; }
  .topbar-title { font-size: 0.95rem; }

  /* Grids collapse */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Hero */
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 60px 0 40px; }
  .hero-visual { display: none; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }

  /* Page body */
  .page-body { padding: 16px; }

  /* Sections */
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }

  /* Auth card */
  .auth-card { padding: 28px 20px; }

  /* Modal */
  .modal { padding: 20px 16px; }

  /* History topbar filters */
  .topbar > div:last-child {
    display: none;
  }

  /* Admin layout */
  .admin-layout { grid-template-columns: 1fr; }
  .user-list-body { max-height: 260px; }
}

/* Hide non-essential table columns on mobile */
@media (max-width: 768px) {
  .col-hide-mobile { display: none; }
}

/* Small mobile: <= 480px */
@media (max-width: 480px) {
  :root { --topbar-h: 56px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 1.3rem; }
  .stat-label { font-size: 0.68rem; letter-spacing: 0.03em; }
  .stat-card { padding: 14px 12px; }
  .page-body { padding: 12px; }
  .btn-lg { padding: 11px 20px; font-size: 0.875rem; }
  .section-title { font-size: 1.5rem; }
  .hero-title { font-size: 1.7rem; }
  .auth-card { padding: 24px 16px; }
  .topbar-title { display: none; }
  .dep-wrap { padding: 0 12px; }
}

/* ============================================================
   Homepage Sections - LuxwellCapital-style layout
   ============================================================ */

/* Section eyebrow label */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--primary); margin-bottom: 14px;
}

/* Left-aligned section heading (for two-col sections) */
.section-hd.left { text-align: left; }
.section-hd.left .section-sub { max-width: 520px; }

/* Hero collage (image grid on right side of hero) */
.hero-collage {
  position: relative; width: 100%;
  display: flex; flex-direction: column; gap: 10px;
}
.hc-main {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  display: block;
}
.hc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hc-sm {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border);
  display: block;
}
.hc-live-tag {
  position: absolute; bottom: 134px; left: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(6,8,14,0.9); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 6px 14px; font-size: 0.75rem; font-weight: 600;
  color: var(--text); pointer-events: none;
}
.hc-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: deppulse 1.4s ease-in-out infinite; flex-shrink: 0;
}

/* Stats bar */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; text-align: center;
}
.stats-item {
  padding: 0 24px;
  border-right: 1px solid var(--border);
}
.stats-item:last-child { border-right: none; }
.stats-num {
  font-size: 2rem; font-weight: 800; line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stats-label { font-size: 0.82rem; color: var(--text-2); margin-top: 6px; }

/* Checklist (Why Bitvera section) */
.check-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.check-item { display: flex; align-items: flex-start; gap: 12px; font-size: 0.9rem; color: var(--text-2); line-height: 1.5; }
.check-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-dim); border: 1px solid rgba(0,230,118,0.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.check-dot svg { width: 11px; height: 11px; color: var(--green); }

/* Why section two-col */
.why-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.why-img {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.why-img img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }
.why-roi-tag {
  position: absolute; bottom: 20px; right: 20px;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(8px);
  border: 1px solid rgba(0,230,118,0.2); border-radius: 10px;
  padding: 10px 16px; text-align: right;
}
.why-roi-pct { font-size: 1.3rem; font-weight: 800; color: var(--green); }
.why-roi-sub { font-size: 0.7rem; color: var(--text-2); margin-top: 2px; }

/* Testimonial cards */
.review-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.review-stars { color: var(--primary); font-size: 0.85rem; letter-spacing: 3px; }
.review-text { font-size: 0.875rem; color: var(--text-2); line-height: 1.8; font-style: italic; flex: 1; }
.review-author { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gradient); display: flex; align-items: center;
  justify-content: center; font-size: 0.72rem; font-weight: 800;
  color: #fff; flex-shrink: 0;
}
.review-name { font-size: 0.875rem; font-weight: 700; }
.review-loc  { font-size: 0.75rem; color: var(--text-2); }

/* Multi-col footer */
.footer-new {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px;
}
.footer-brand { max-width: 280px; }
.footer-brand .logo { -webkit-text-fill-color: unset; color: inherit; }
.footer-tagline { font-size: 0.85rem; color: var(--text-2); line-height: 1.7; margin-top: 12px; }
.footer-col-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--primary); margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.875rem; color: var(--text-2); transition: color var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; font-size: 0.78rem; color: var(--text-3);
}

/* Mobile responsive for new sections */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-item:nth-child(2) { border-right: none; }
  .stats-item:nth-child(1),
  .stats-item:nth-child(2) { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 0; }
  .stats-item:nth-child(3),
  .stats-item:nth-child(4) { padding-top: 24px; }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { max-width: 100%; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hc-live-tag { bottom: 130px; }
}
@media (max-width: 480px) {
  .stats-num { font-size: 1.6rem; }
  .hero-collage { display: none; }
}