/* ============================================================
   InvestPro – Global Stylesheet
   Dark luxury finance aesthetic: deep navy, cyan accents, gold highlights
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-deep:     #070b14;
  --bg-card:     #0d1321;
  --bg-elevated: #111827;
  --border:      #1e2d40;
  --border-glow: #00d4ff33;
  --accent:      #00d4ff;
  --accent2:     #0066cc;
  --gold:        #f6c90e;
  --success:     #10b981;
  --danger:      #ef4444;
  --warning:     #f59e0b;
  --purple:      #8b5cf6;
  --text-primary:   #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted:     #4a5568;
  --font-main: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px rgba(0,212,255,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; }
a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: 0.8; }
p { line-height: 1.7; color: var(--text-secondary); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-gold    { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mono         { font-family: var(--font-mono); }
.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-100 { width: 100%; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .3s, box-shadow .3s;
}
.card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.card-glow { box-shadow: var(--shadow-glow); border-color: var(--border-glow); }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border: none; border-radius: 8px;
  font-family: var(--font-main);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,255,0.3); color: #fff; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #e6a800);
  color: #000;
}
.btn-gold:hover { opacity: 0.9; transform: translateY(-1px); color: #000; }
.btn-success {
  background: var(--success); color: #fff;
}
.btn-success:hover { opacity: 0.85; color:#fff; }
.btn-danger {
  background: var(--danger); color: #fff;
}
.btn-danger:hover { opacity: 0.85; color:#fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { width: 100%; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
.form-control::placeholder { color: var(--text-muted); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 6px; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.alert-danger  { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: var(--danger); }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }
.alert-info    { background: rgba(0,212,255,0.08);  border: 1px solid rgba(0,212,255,0.25); color: var(--accent); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--bg-elevated); }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody td { padding: 14px 16px; font-size: 14px; color: var(--text-secondary); }
tbody td strong { color: var(--text-primary); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.badge-pending  { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-approved,
.badge-active   { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-rejected,
.badge-danger   { background: rgba(239,68,68,0.15);  color: var(--danger); }

/* ── Progress Bar ───────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width .5s ease;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(7,11,20,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; color: var(--text-primary);
}
.navbar-brand span { color: var(--accent); }
.navbar-nav { display: flex; align-items: center; gap: 8px; }
.navbar-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  transition: all .2s;
}
.navbar-nav a:hover,
.navbar-nav a.active { color: var(--accent); background: rgba(0,212,255,0.08); }

/* ── Sidebar (Dashboard) ────────────────────────────────────── */
.dash-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.sidebar {
  width: 240px; min-width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky; top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent);
  background: rgba(0,212,255,0.06);
  border-left-color: var(--accent);
}
.sidebar-nav a .icon { font-size: 18px; width: 20px; text-align: center; }
.sidebar-divider {
  height: 1px; background: var(--border);
  margin: 12px 24px;
}
.sidebar-label {
  padding: 8px 24px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.dash-content { flex: 1; padding: 32px; max-width: 100%; }

/* ── Rank Badge ─────────────────────────────────────────────── */
.rank-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 1px;
}
.rank-1 { background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid rgba(148,163,184,0.3); }
.rank-2 { background: rgba(16,185,129,0.15);  color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.rank-3 { background: rgba(139,92,246,0.15);  color: var(--purple); border: 1px solid rgba(139,92,246,0.3); }
.rank-4 { background: rgba(246,201,14,0.15);  color: var(--gold); border: 1px solid rgba(246,201,14,0.3); }

/* ── Referral Box ───────────────────────────────────────────── */
.referral-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.referral-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--accent); font-family: var(--font-mono); font-size: 13px;
}
.referral-box button {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 16px;
  transition: color .2s;
}
.referral-box button:hover { color: var(--accent); }

/* ── Section Headers ────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
}
.section-title span { color: var(--accent); }

/* ── Wallet Card ────────────────────────────────────────────── */
.wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.wallet-card::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(0,212,255,0.05);
}
.wallet-type {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.wallet-amount {
  font-size: 32px; font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.wallet-amount span { font-size: 16px; color: var(--text-muted); }

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 32px 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?w=1920&auto=format&fit=crop');
  background-size: cover; background-position: center;
  filter: brightness(0.15);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(7,11,20,0.8) 0%, rgba(0,102,204,0.2) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--accent);
  padding: 8px 16px; border-radius: 99px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 24px;
}
.hero-badge::before { content: '●'; font-size: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.3; } }
.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--accent); }
.hero-subtitle {
  font-size: 18px; color: var(--text-secondary);
  max-width: 500px; margin-bottom: 40px;
}
.hero-stats {
  display: flex; gap: 40px; margin-top: 60px;
}
.hero-stat-value {
  font-size: 28px; font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.hero-stat-label {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}

/* ── Features Section ───────────────────────────────────────── */
.features { padding: 100px 32px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all .3s;
}
.feature-card:hover { border-color: var(--border-glow); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.feature-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(0,102,204,0.15));
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.feature-title { font-size: 18px; margin-bottom: 10px; color: var(--text-primary); }
.feature-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Grid layouts ───────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.container { max-width: 1200px; margin: 0 auto; }

/* ── Auth Pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  position: relative;
}
.auth-page::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1642543492481-44e81e3914a7?w=1920&auto=format&fit=crop');
  background-size: cover; background-position: center;
  filter: brightness(0.08) saturate(0.5);
  z-index: -1;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%; max-width: 440px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5);
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo h1 { font-size: 28px; }
.auth-logo h1 span { color: var(--accent); }
.auth-logo p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

/* ── Toast Notification ─────────────────────────────────────── */
.toast {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: slideIn .3s ease;
  max-width: 320px;
}
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Hamburger / Mobile ─────────────────────────────────────── */
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; color: var(--text-primary); font-size: 22px;
}
.mobile-menu {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px; z-index: 999;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 12px 16px;
  color: var(--text-secondary); font-size: 15px;
  border-radius: 8px; transition: all .2s;
}
.mobile-menu a:hover { background: rgba(0,212,255,0.08); color: var(--accent); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .dash-content { padding: 20px 16px; }
  .hamburger { display: block; }
  .navbar-nav { display: none; }
  .hero { padding: 100px 20px 60px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .auth-card { padding: 32px 24px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}
