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

:root {
  --bg: #030812;
  --surface: #080f1f;
  --card: #0d1b2e;
  --card2: #111e30;
  --border: rgba(255,255,255,0.07);
  --accent: #00d4ff;
  --accent2: #0066ff;
  --accent-glow: rgba(0,212,255,0.15);
  --success: #00e676;
  --warning: #ffb300;
  --danger: #ff4444;
  --text: #eef2ff;
  --muted: #5a6a8a;
  --muted2: #3a4a6a;
  --nav-h: 70px;
  --header-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --glow: 0 0 20px rgba(0,212,255,0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 4px; }

/* ── UTILITIES ── */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius-sm); border: none;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #000; box-shadow: 0 4px 20px rgba(0,212,255,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(0,212,255,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--card); color: var(--text); border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card2); border-color: var(--accent); }
.btn-danger { background: rgba(255,68,68,0.15); color: var(--danger); border: 1px solid rgba(255,68,68,0.3); }
.btn-danger:hover { background: rgba(255,68,68,0.25); }
.btn-full { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── INPUTS ── */
.input-group { position: relative; margin-bottom: 16px; }
.input-group label {
  display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}
.input-group input, .input-group select {
  width: 100%; padding: 14px 16px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.input-group input:focus, .input-group select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-group input::placeholder { color: var(--muted); }
.input-icon { position: relative; }
.input-icon input { padding-left: 44px; }
.input-icon .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }

/* ── CARDS ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card-glow {
  background: linear-gradient(135deg, #0d1b2e, #0a1525);
  border: 1px solid rgba(0,212,255,0.2);
  box-shadow: var(--glow);
}

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-success { background: rgba(0,230,118,0.15); color: var(--success); }
.badge-warning { background: rgba(255,179,0,0.15); color: var(--warning); }
.badge-danger { background: rgba(255,68,68,0.15); color: var(--danger); }
.badge-info { background: rgba(0,212,255,0.15); color: var(--accent); }
.badge-muted { background: var(--surface); color: var(--muted); }

/* ── LOADING ── */
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; flex-direction: column; gap: 16px;
}
.loading-overlay p { color: var(--muted); font-size: 14px; }
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── TOAST ── */
#toast-container {
  position: fixed; top: 20px; right: 16px; z-index: 9998;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 500; min-width: 260px; max-width: 340px;
  animation: slideIn 0.3s ease;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow);
}
.toast-success { background: #0a2e1a; border: 1px solid rgba(0,230,118,0.3); color: var(--success); }
.toast-error { background: #2e0a0a; border: 1px solid rgba(255,68,68,0.3); color: var(--danger); }
.toast-info { background: #0a1e2e; border: 1px solid rgba(0,212,255,0.3); color: var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── HEADER ── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: rgba(3,8,18,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); z-index: 100;
  display: flex; align-items: center; padding: 0 20px;
  justify-content: space-between;
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo .logo-icon {
  width: 36px; height: 36px; background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #000;
}
.header-logo span { font-size: 18px; font-weight: 700; }
.header-balance {
  background: var(--card); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px; font-size: 14px; font-weight: 600;
  color: var(--accent);
}
.header-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: 15px; color: #000; cursor: pointer;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(8,15,31,0.96); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); z-index: 100;
  display: flex; align-items: center;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; padding: 8px;
  color: var(--muted); cursor: pointer; transition: all 0.2s;
  border: none; background: none; font-family: inherit;
}
.nav-item .nav-icon { font-size: 22px; transition: transform 0.2s; }
.nav-item .nav-label { font-size: 11px; font-weight: 600; transition: color 0.2s; }
.nav-item.active { color: var(--accent); }
.nav-item.active .nav-icon { transform: scale(1.1); }

/* ── MAIN CONTENT ── */
.app-content {
  padding-top: calc(var(--header-h) + 16px);
  padding-bottom: calc(var(--nav-h) + 16px);
  padding-left: 16px; padding-right: 16px;
  min-height: 100vh;
}

/* ── HOME PAGE ── */
.balance-card {
  background: linear-gradient(135deg, #061428 0%, #0a1f3d 50%, #061428 100%);
  border: 1px solid rgba(0,212,255,0.25); border-radius: 20px;
  padding: 28px 24px; margin-bottom: 24px; position: relative; overflow: hidden;
}
.balance-card::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 200px; height: 200px; background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.balance-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.balance-amount { font-size: 40px; font-weight: 800; line-height: 1; margin-bottom: 16px; }
.balance-amount span { font-size: 20px; font-weight: 500; color: var(--muted); margin-right: 4px; }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
  color: var(--text); text-align: center;
}
.action-btn:hover { background: var(--card2); border-color: var(--accent); transform: translateY(-2px); }
.action-btn:active { transform: translateY(0); }
.action-btn .action-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.action-btn .action-label { font-size: 12px; font-weight: 600; color: var(--muted); }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-title { font-size: 16px; font-weight: 700; }
.section-link { font-size: 13px; color: var(--accent); font-weight: 600; cursor: pointer; }

/* ── ORDER ITEM ── */
.order-item {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 10px; cursor: pointer; transition: all 0.2s;
}
.order-item:hover { background: var(--card2); border-color: var(--muted2); }
.order-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.order-info { flex: 1; min-width: 0; }
.order-id { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.order-date { font-size: 12px; color: var(--muted); }
.order-amount { font-size: 15px; font-weight: 700; text-align: right; }

/* ── WALLET ── */
.wallet-hero {
  background: linear-gradient(135deg, #0a1628, #0d2040);
  border: 1px solid rgba(0,212,255,0.2); border-radius: 20px;
  padding: 32px 24px; text-align: center; margin-bottom: 24px;
}
.wallet-balance { font-size: 48px; font-weight: 800; color: var(--accent); margin: 8px 0 16px; }
.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }

.tx-item {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-bottom: 1px solid var(--border);
}
.tx-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.tx-info { flex: 1; }
.tx-desc { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.tx-date { font-size: 12px; color: var(--muted); }
.tx-amount { font-size: 15px; font-weight: 700; }
.tx-amount.credit { color: var(--success); }
.tx-amount.debit { color: var(--danger); }

/* ── PROFILE ── */
.profile-header { text-align: center; padding: 24px 0 32px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #000;
  border: 3px solid rgba(0,212,255,0.3);
}
.profile-name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.profile-email { color: var(--muted); font-size: 14px; }
.profile-menu { margin-top: 8px; }
.menu-item {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.2s;
}
.menu-item:hover { background: var(--card); }
.menu-item:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.menu-item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-bottom: none; }
.menu-icon { font-size: 20px; width: 32px; text-align: center; }
.menu-label { flex: 1; font-size: 15px; font-weight: 500; }
.menu-arrow { color: var(--muted); }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 24px; width: 100%; max-width: 480px;
  border: 1px solid var(--border); border-bottom: none;
  animation: slideUp 0.3s ease;
}
.modal-handle {
  width: 40px; height: 4px; background: var(--muted2); border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 48px; }
.empty-title { font-size: 18px; font-weight: 700; }
.empty-desc { color: var(--muted); font-size: 14px; max-width: 240px; }

/* ── PAGE TRANSITIONS ── */
.page-enter { animation: pageIn 0.25s ease forwards; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── VBOX FINDER ── */
.vbox-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s;
}
.vbox-card:hover { border-color: var(--accent); background: var(--card2); }
.vbox-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.vbox-address { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.vbox-meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── RESPONSIVE ── */
@media (min-width: 480px) {
  .app-content { max-width: 480px; margin: 0 auto; }
  .app-header, .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
}
