/* =============================================
   RealVest Pro - Main Stylesheet
   ============================================= */

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

:root {
  --primary: #1a2a4a;
  --secondary: #2563eb;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-light: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #94a3b8;
  --sidebar-bg: #162040;
  --sidebar-hover: #1e2d50;
  --sidebar-active: #2563eb;
  --card-bg: #ffffff;
  --body-bg: #f0f4f8;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--body-bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
}

.auth-left-content {
  max-width: 480px;
  color: white;
}

.auth-left .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 50px;
}

.auth-left .brand-logo {
  width: 52px;
  height: 52px;
  background: var(--secondary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(37,99,235,0.4);
}

.auth-left .brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-left h1 {
  font-family: 'Sora', sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.auth-left h1 span {
  color: var(--accent);
}

.auth-left p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 40px;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.auth-stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.auth-stat .value {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.auth-stat .label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.auth-right {
  flex: 0 0 500px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0,0,0,0.3);
}

.auth-form-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-form-header h2 {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.auth-form-header p {
  color: var(--text-muted);
  font-size: 15px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #fafafa;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--secondary);
  background: white;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.form-control::placeholder {
  color: #b0bec5;
}

.input-icon {
  position: relative;
}

.input-icon .form-control {
  padding-left: 44px;
}

.input-icon .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.input-icon .eye-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  font-size: 16px;
  transition: color 0.2s;
}

.input-icon .eye-toggle:hover { color: var(--secondary); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37,99,235,0.4);
}

.btn-block { width: 100%; }

.btn-lg { padding: 15px 28px; font-size: 16px; }

.auth-footer {
  text-align: center;
  margin-top: 24px;
}

.auth-footer p {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-footer a {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* Language Selector */
.lang-selector-wrap {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.lang-selector-wrap label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.lang-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-dark);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lang-btn:hover, .lang-btn.active {
  border-color: var(--secondary);
  background: var(--secondary);
  color: white;
}

/* Alerts */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
.dashboard-wrap {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 260px; /* matches layout.php */
  background: var(--sidebar-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000; /* raised to match layout.php — avoids topbar overlap */
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Collapsed state */
.sidebar.collapsed {
  width: 80px !important;
}

/* Sibling main-content adjustment when collapsed (CSS fallback) */
.sidebar.collapsed ~ .main-content {
  margin-left: 80px;
}



.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}

.user-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-vip {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.user-name {
  font-size: 15px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-card {
  margin: 16px 22px;
  background: linear-gradient(135deg, rgba(37,99,235,0.3), rgba(37,99,235,0.1));
  border: 1px solid rgba(37,99,235,0.3);
  border-radius: var(--radius);
  padding: 16px;
}

.wallet-card-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.wallet-card-amount {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}

/* NAV */
.sidebar-nav {
  flex: 1;
  padding: 10px 12px;
  overflow-y: auto;
}

.nav-item {
  margin-bottom: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: white;
}

.nav-link.active {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.nav-link .nav-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link .nav-label { flex: 1; }

.nav-link .nav-arrow {
  font-size: 12px;
  transition: transform 0.3s;
}

.nav-link.open .nav-arrow { transform: rotate(90deg); }

.nav-indicator {
  width: 3px;
  height: 0;
  background: var(--secondary);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  transition: height 0.3s;
}

.nav-item:has(.nav-link.active) .nav-indicator { height: 36px; }

.subnav {
  display: none;
  padding: 4px 0 4px 22px;
}

.subnav.open { display: block; }

.subnav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: var(--transition);
}

.subnav-link::before {
  content: '▶';
  font-size: 8px;
  color: rgba(255,255,255,0.3);
}

.subnav-link:hover {
  color: white;
  background: rgba(255,255,255,0.05);
}

.subnav-link.active { color: var(--accent); }

.sidebar-bottom {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.nav-link.logout {
  color: rgba(239,68,68,0.7);
}
.nav-link.logout:hover {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

/* MAIN CONTENT */
.main-content {
  margin-left: 260px; /* matches expanded sidebar width */
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* TOP BAR */
.topbar {
  background: white;
  padding: 0 32px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left h2 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-notif {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  cursor: pointer;
  color: var(--text-dark);
  font-size: 18px;
  transition: var(--transition);
}

.topbar-notif:hover { background: var(--border); }

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.topbar-user:hover { background: #f8fafc; }

.topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.topbar-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

/* PAGE CONTENT */
.page-content {
  padding: 32px;
  flex: 1;
}

/* CARDS */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
}

.card-body { padding: 24px; }

/* STAT CARDS */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.stat-card-value {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.stat-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-card-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  opacity: 0.06;
}

/* BALANCE CARD - hero */
.balance-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a6e 100%);
  border-radius: var(--radius);
  padding: 28px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(26,42,74,0.4);
}

.balance-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.balance-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: 60px;
  width: 160px;
  height: 160px;
  background: rgba(37,99,235,0.2);
  border-radius: 50%;
}

.balance-hero-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.balance-hero-amount {
  font-family: 'Sora', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  position: relative;
  z-index: 1;
}

.balance-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.balance-item {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.balance-item-label {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}

.balance-item-value {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

/* Investment Plan card */
.plan-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.plan-info { display: flex; align-items: center; gap: 14px; }

.plan-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.plan-name {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.plan-roi {
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}

/* VIP Bar */
.vip-bar {
  background: white;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.vip-bar-left {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.vip-bar-left strong {
  color: var(--text-dark);
  font-family: 'Sora', sans-serif;
  font-size: 17px;
}

/* City Image */
.city-banner {
  border-radius: var(--radius);
  overflow: hidden;
  height: 180px;
  margin-top: 20px;
  background: linear-gradient(to right, #1a2a4a, #2563eb);
  position: relative;
  box-shadow: var(--shadow);
}

.city-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  mix-blend-mode: luminosity;
}

.city-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,42,74,0.8) 0%, transparent 60%);
}

/* =============================================
   DEPOSIT PAGE
   ============================================= */
.deposit-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.method-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-dark);
  display: block;
}

.method-card:hover {
  border-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.method-card.selected {
  border-color: var(--secondary);
  background: rgba(37,99,235,0.04);
}

.method-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.method-name {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.method-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Bank Transfer Details */
.bank-detail-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.bank-detail-header {
  background: var(--primary);
  color: white;
  padding: 16px 20px;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-detail-body { padding: 20px; }

.bank-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.bank-field:last-child { border-bottom: none; }

.bank-field-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.bank-field-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-btn {
  background: none;
  border: 1.5px solid var(--secondary);
  color: var(--secondary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.copy-btn:hover {
  background: var(--secondary);
  color: white;
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* File Upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fafafa;
}

.file-upload-area:hover {
  border-color: var(--secondary);
  background: rgba(37,99,235,0.02);
}

.file-upload-area.dragover {
  border-color: var(--secondary);
  background: rgba(37,99,235,0.05);
}

.file-upload-icon { font-size: 40px; margin-bottom: 12px; }
.file-upload-text { font-size: 15px; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.file-upload-sub { font-size: 13px; color: var(--text-muted); }

.file-preview {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.file-preview.show { display: flex; }

/* Crypto selection */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.crypto-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-dark);
}

.crypto-card:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.crypto-icon { font-size: 32px; margin-bottom: 8px; }
.crypto-name { font-weight: 700; font-size: 14px; }
.crypto-short { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* QR Code area */
.qr-container {
  text-align: center;
  padding: 24px;
}

.qr-placeholder {
  width: 160px;
  height: 160px;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

/* Confirmation page */
.confirm-card {
  text-align: center;
  padding: 60px 40px;
}

.confirm-icon {
  font-size: 72px;
  margin-bottom: 24px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.confirm-title {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.confirm-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #7f1d1d; }

/* Table */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 2px solid var(--border);
  background: #f8fafc;
}

table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table tbody tr:hover { background: #f8fafc; }
table tbody tr:last-child td { border-bottom: none; }

/* =============================================
   HAMBURGER / MOBILE
   ============================================= */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .auth-left { display: none; }
  .auth-right { flex: 0 0 100%; max-width: 520px; margin: 0 auto; }
  .auth-page { justify-content: center; padding: 20px; }
}

@media (max-width: 768px) {
  .auth-right {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 30px 24px;
  }

  .form-row { grid-template-columns: 1fr; }

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px !important;
    z-index: 1000;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.show { display: block; }

  .main-content { margin-left: 0 !important; }

  .hamburger { display: flex; }
}

  .topbar { padding: 0 20px; }

  .page-content { padding: 20px; }

  .stat-grid { grid-template-columns: 1fr; }

  .balance-hero-grid { grid-template-columns: 1fr; }

  .balance-hero-amount { font-size: 32px; }
}

@media (max-width: 480px) {
  .auth-stats { grid-template-columns: repeat(2, 1fr); }
  .deposit-methods { grid-template-columns: 1fr 1fr; }
}

/* RTL support for Arabic */
[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
}

[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: 260px;
}

[dir="rtl"] .subnav {
  padding-left: 0;
  padding-right: 22px;
}

@media (max-width: 768px) {
  [dir="rtl"] .sidebar {
    transform: translateX(100%);
  }
  [dir="rtl"] .sidebar.open {
    transform: translateX(0);
  }
  [dir="rtl"] .main-content {
    margin-right: 0;
  }
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--secondary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }

/* Amount input with currency */
.amount-input-wrap {
  position: relative;
}

.amount-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 16px;
}

.amount-input-wrap .form-control {
  padding-left: 32px;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* Toast notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--success);
  font-size: 14px;
  font-weight: 500;
}

.toast.error { border-left-color: var(--danger); }

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100px); opacity: 0; }
}

/* Step indicator */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: white;
  transition: var(--transition);
}

.step.active .step-num {
  border-color: var(--secondary);
  background: var(--secondary);
  color: white;
}

.step.done .step-num {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.step.active .step-label { color: var(--secondary); }
.step.done .step-label { color: var(--success); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 24px;
  min-width: 40px;
}

.step-line.done { background: var(--success); }

/* =============================================
   ADDITIONAL STYLES — v3
   ============================================= */

/* ── Referral page ───────────────────────────── */
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: var(--transition);
}

/* ── Transactions filter pills ───────────────── */
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill {
  padding: 5px 13px; border-radius: 20px; font-size: 12px;
  font-weight: 600; text-decoration: none; border: 1.5px solid var(--border);
  background: white; color: var(--text-dark); transition: var(--transition);
}
.filter-pill:hover, .filter-pill.active {
  background: var(--secondary); border-color: var(--secondary); color: white;
}

/* ── KYC status banner ───────────────────────── */
.kyc-banner {
  border-radius: var(--radius); padding: 20px 24px;
  margin-bottom: 24px; display: flex; align-items: center; gap: 16px;
}

/* ── Steps (enhanced) ───────────────────────── */
.steps-v2 {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 32px; padding: 0 20px;
}
.step-v2 {
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1;
}
.step-v2-num {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2.5px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--text-muted);
  background: white; transition: var(--transition); position: relative; z-index: 1;
}
.step-v2.active .step-v2-num  { border-color: var(--secondary); background: var(--secondary); color: white; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.step-v2.done   .step-v2-num  { border-color: var(--success); background: var(--success); color: white; }
.step-v2-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.step-v2.active .step-v2-label { color: var(--secondary); }
.step-v2.done   .step-v2-label { color: var(--success); }
.step-v2-line { flex: 1; height: 2px; background: var(--border); margin-bottom: 20px; }
.step-v2-line.done { background: var(--success); }

/* ── Dashboard chart card ────────────────────── */
.chart-wrap {
  background: white; border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.chart-wrap h3 {
  font-family: 'Sora', sans-serif; font-size: 16px;
  font-weight: 700; margin-bottom: 16px; color: var(--text-dark);
}

/* ── Notification dot pulse ──────────────────── */
@keyframes notifPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: 0.7; }
}
.notif-dot-live { animation: notifPulse 2s ease infinite; }

/* ── Admin sidebar badge ─────────────────────── */
.admin-badge {
  background: #ef4444; color: white; font-size: 10px;
  font-weight: 700; border-radius: 10px; padding: 1px 6px; margin-left: auto;
}

/* ── Two-column layout on tablet ─────────────── */
@media (max-width: 900px) {
  .prop-detail-grid { grid-template-columns: 1fr !important; }
  .withdraw-grid    { grid-template-columns: 1fr !important; }
  .invest-grid      { grid-template-columns: 1fr !important; }
}

/* ── Empty state ─────────────────────────────── */
.empty-state {
  text-align: center; padding: 70px 40px; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state .empty-title { font-family: 'Sora',sans-serif; font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.empty-state .empty-sub   { font-size: 14px; line-height: 1.6; margin-bottom: 22px; }

/* ── Profile avatar ring ─────────────────────── */
.avatar-ring {
  border-radius: 50%; border: 3px solid var(--secondary);
  padding: 2px; display: inline-block;
}
.avatar-ring img, .avatar-ring .avatar-placeholder {
  border-radius: 50%; display: block;
}

/* ── Referral code display ───────────────────── */
.ref-code-box {
  background: #f8fafc; border: 2px dashed var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: center; cursor: pointer; transition: var(--transition);
}
.ref-code-box:hover { border-color: var(--secondary); background: rgba(37,99,235,0.03); }
.ref-code-value {
  font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800;
  letter-spacing: 4px; color: var(--text-dark);
}

/* ── Highlight animation ─────────────────────── */
@keyframes highlight {
  0%   { background: rgba(37,99,235,0.15); }
  100% { background: transparent; }
}
.highlight { animation: highlight 1.5s ease; }

/* ── Mobile tweaks ───────────────────────────── */
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .balance-hero-amount { font-size: 28px; }
  .vip-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .card-header { flex-wrap: wrap; gap: 10px; }
  .breadcrumb { font-size: 12px; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .topbar-left h2 { font-size: 16px; }
}


/* =============================================
   RESPONSIVE FIXES FOR UPDATED LAYOUT
   ============================================= */

@media (min-width: 769px) {
  .main-content {
    transition: margin-left 0.3s ease;
  }
}

/* Ensure proper layout on tablets */
@media (min-width: 769px) and (max-width: 992px) {
  .sidebar {
    width: 260px; /* keep consistent — mobile media query handles hiding */
  }

  .main-content {
    margin-left: 260px;
  }
}

/* Fix for properties grid on different screen sizes */
@media (min-width: 480px) and (max-width: 767px) {
  .properties-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Fix for property detail page on tablets */
@media (min-width: 769px) and (max-width: 991px) {
  .prop-detail-layout {
    grid-template-columns: 1fr 300px !important;
  }
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
  .nav-link, .subnav-link, .btn, .method-card, .crypto-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  
  .nav-link:active, .subnav-link:active {
    background: var(--sidebar-hover);
    transform: scale(0.98);
  }
  
  .btn:active {
    transform: scale(0.97);
  }
}

/* Fix for gallery slider on mobile */
@media (max-width: 640px) {
  .slider-slide img {
    height: 240px !important;
  }
  
  .slider-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }
  
  .thumb-item {
    width: 50px !important;
    height: 38px !important;
  }
}

/* Fix for sticky sidebar on desktop only */
@media (min-width: 992px) {
  .sidebar-sticky {
    position: sticky !important;
    top: 82px !important;
  }
}

/* Ensure proper z-index for modals and dropdowns */
.lightbox {
  z-index: 9999;
}

#profileDrop {
  z-index: 1001;
}

.sidebar-overlay {
  z-index: 998;
}

/* Fix for wallet card in collapsed sidebar */
.sidebar.collapsed .wallet-card {
  margin: 12px 8px;
  padding: 10px 4px;
}

.sidebar.collapsed .wallet-card .wallet-card-label i {
  font-size: 18px;
}

/* Improve scroll on mobile */
@media (max-width: 768px) {
  .sidebar {
    -webkit-overflow-scrolling: touch;
  }
  
  .recent-activity-list {
    -webkit-overflow-scrolling: touch;
  }
}

/* Fix for two-column layout on dashboard */
@media (max-width: 991px) {
  .two-column-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Fix for breadcrumb on mobile */
@media (max-width: 640px) {
  .breadcrumb {
    font-size: 11px;
    margin-bottom: 16px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .breadcrumb::-webkit-scrollbar {
    display: none;
  }
}

/* Loading state for buttons */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Smooth transitions for all interactive elements */
a, button, .btn, .nav-link, .card {
  transition: all 0.2s ease;
}

/* Prevent body scroll when sidebar is open on mobile */
body.sidebar-open {
  overflow: hidden;
}