/* =====================================================
   APEX GLOBAL TRADING LTD — Shared Styles
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #001847;
  --royal: #002A73;
  --electric: #005BFF;
  --lime: #8DFF00;
  --green: #66E000;
  --mid-green: #43B600;
  --dark-green: #2E6E00;
  --white: #FFFFFF;
  --light-bg: #F7F9FC;
  --border: #E8EDF5;
  --text-primary: #0B1320;
  --text-secondary: #64748B;

  /* Gradients */
  --grad-header: linear-gradient(145deg, #001847 0%, #002A73 50%, #005BFF 100%);
  --grad-card-blue: linear-gradient(135deg, #002A73 0%, #005BFF 100%);
  --grad-card-navy: linear-gradient(135deg, #001847 0%, #002A73 100%);
  --grad-card-green: linear-gradient(135deg, #2E6E00 0%, #8DFF00 100%);
  --grad-card-electric: linear-gradient(135deg, #005BFF 0%, #4DA3FF 100%);
  --grad-lime: linear-gradient(135deg, #8DFF00 0%, #43B600 100%);
  --grad-balance: linear-gradient(135deg, #001847 0%, #002A73 40%, #005BFF 100%);
  --grad-stat1: linear-gradient(135deg, #002A73, #005BFF);
  --grad-stat2: linear-gradient(135deg, #2E6E00, #66E000);
  --grad-stat3: linear-gradient(135deg, #001847, #002A73);
  --grad-stat4: linear-gradient(135deg, #005BFF, #8DFF00);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--light-bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- PHONE WRAPPER ---- */
.phone-wrap {
  max-width: 430px;
  margin: 0 auto;
  background: var(--light-bg);
  min-height: 100vh;
  position: relative;
  padding-bottom: 90px;
}

/* ---- HEADER ---- */
.apex-header {
  background: var(--grad-header);
  padding: 10px 20px 8px;
  position: relative;
  overflow: hidden;
}
.apex-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.apex-header::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -20px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(141,255,0,0.05);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}
.logo-mark {
  display: flex; align-items: center; gap: 10px;
}
.logo-icon {
  width: 38px; height: 38px;
  background: var(--grad-lime);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; color: var(--navy);
}
.logo-text { font-size: 13px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.logo-sub { font-size: 9px; color: rgba(255,255,255,0.5); letter-spacing: 1px; text-transform: uppercase; }

/* ---- BALANCE CARD ---- */
.balance-card {
  background: var(--grad-balance);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,91,255,0.25);
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(141,255,0,0.06);
}
.balance-card::after {
  content: '';
  position: absolute;
  bottom: -20px; left: 20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.balance-label { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.balance-amount { font-size: 34px; font-weight: 900; color: #fff; letter-spacing: -1.5px; margin: 6px 0 18px; }
.balance-actions { display: flex; gap: 10px; position: relative; z-index: 1; }
.bal-btn {
  flex: 1; padding: 12px;
  border-radius: 14px; border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .15s, opacity .15s;
}
.bal-btn:active { transform: scale(0.97); opacity: 0.9; }
.bal-btn-primary { background: var(--grad-lime); color: var(--navy); }
.bal-btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* ---- QUICK ACTIONS ---- */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding: 20px 20px 0;
}
.quick-item {
  background: #fff;
  border-radius: 18px; padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(0,24,71,0.08);
  cursor: pointer; transition: transform .15s;
  text-decoration: none;
}
.quick-item:active { transform: scale(0.96); }
.quick-icon {
  width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.qi-blue { background: var(--grad-card-blue); }
.qi-green { background: var(--grad-card-green); }
.qi-electric { background: var(--grad-card-electric); }
.qi-navy { background: var(--grad-card-navy); }
.quick-label { font-size: 10px; font-weight: 700; color: var(--text-secondary); }

/* ---- SECTION ---- */
.section { padding: 20px 20px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.see-all { font-size: 12px; font-weight: 700; color: var(--electric); background: none; border: none; cursor: pointer; }

/* ---- STAT CARDS ---- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 20px 0; }
.stat-card {
  border-radius: 20px; padding: 16px;
  box-shadow: 0 4px 20px rgba(0,24,71,0.12);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.stat-label { font-size: 10px; color: rgba(255,255,255,0.65); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-value { font-size: 20px; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.stat-change { font-size: 10px; font-weight: 700; margin-top: 6px; }
.stat-up { color: var(--lime); }
.stat-down { color: #FF6B6B; }

/* ---- PORTFOLIO SCROLL ---- */
.portfolio-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; padding: 16px 20px 4px;
  scrollbar-width: none;
}
.portfolio-scroll::-webkit-scrollbar { display: none; }
.port-card {
  min-width: 155px; border-radius: 22px; padding: 18px;
  flex-shrink: 0; cursor: pointer;
  transition: transform .15s;
  box-shadow: 0 6px 24px rgba(0,24,71,0.18);
  position: relative; overflow: hidden;
}
.port-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.port-card:active { transform: scale(0.97); }
.pc-label { font-size: 10px; color: rgba(255,255,255,0.6); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.pc-value { font-size: 22px; font-weight: 900; color: #fff; letter-spacing: -0.5px; margin: 4px 0; }
.pc-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px; padding: 3px 10px;
  font-size: 10px; font-weight: 700; color: #fff; margin-top: 8px;
}
.pc-badge.lime { background: rgba(141,255,0,0.2); color: var(--lime); }
.pc-name { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 6px; font-weight: 500; }

/* ---- TRANSACTIONS ---- */
.tx-list { display: flex; flex-direction: column; gap: 10px; }
.tx-item {
  background: #fff; border-radius: 18px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 12px rgba(0,24,71,0.06);
}
.tx-icon-wrap {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.txi-d { background: var(--grad-card-green); }
.txi-t { background: var(--grad-card-blue); }
.txi-w { background: linear-gradient(135deg, #8B0000, #EF4444); }
.txi-r { background: linear-gradient(135deg, #7C3AED, #C084FC); }
.tx-info { flex: 1; }
.tx-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.tx-date { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.tx-amount { font-size: 14px; font-weight: 800; }
.pos { color: #16A34A; }
.neg { color: #DC2626; }
.neutral { color: var(--text-secondary); }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  position: fixed; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex; padding: 8px 10px 20px;
  box-shadow: 0 -6px 24px rgba(0,24,71,0.08);
  z-index: 100;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px; cursor: pointer; padding: 6px 0;
  text-decoration: none;
}
.nav-icon-wrap {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.nav-icon-wrap svg { width: 22px; height: 22px; stroke: #94A3B8; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.nav-label { font-size: 10px; font-weight: 600; color: #94A3B8; transition: color .2s; }
.nav-item.active .nav-icon-wrap svg { stroke: var(--electric); }
.nav-item.active .nav-label { color: var(--electric); }
.nav-fab-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px; cursor: pointer; padding: 0;
}
.nav-fab {
  width: 52px; height: 52px;
  background: var(--grad-card-blue);
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,91,255,0.4);
  margin-top: -26px; cursor: pointer;
  transition: transform .15s;
}
.nav-fab:active { transform: scale(0.95); }
.nav-fab svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-fab-label { font-size: 10px; font-weight: 600; color: var(--electric); }

/* ---- CARDS (generic gradient) ---- */
.grad-card {
  border-radius: 22px; padding: 20px;
  box-shadow: 0 6px 24px rgba(0,24,71,0.15);
  position: relative; overflow: hidden;
}
.grad-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.3px; }
.form-input, .form-select {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; color: var(--text-primary);
  outline: none; transition: border-color .2s;
  background: #fff;
}
.form-input:focus, .form-select:focus { border-color: var(--electric); }

/* ---- BUTTONS ---- */
.btn { width: 100%; padding: 16px; border: none; border-radius: 16px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 800; cursor: pointer; transition: transform .15s, opacity .15s; }
.btn:active { transform: scale(0.98); opacity: 0.92; }
.btn-blue { background: var(--grad-card-blue); color: #fff; box-shadow: 0 4px 16px rgba(0,91,255,0.3); }
.btn-lime { background: var(--grad-lime); color: var(--navy); box-shadow: 0 4px 16px rgba(141,255,0,0.3); }
.btn-ghost { background: rgba(0,91,255,0.08); color: var(--electric); }

/* ---- PACKAGE CARDS ---- */
.pkg-card {
  border-radius: 22px; padding: 22px;
  margin-bottom: 14px;
  box-shadow: 0 6px 24px rgba(0,24,71,0.1);
  position: relative; overflow: hidden;
}
.pkg-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.pkg-card-light { background: #fff; }
.pkg-roi { font-size: 38px; font-weight: 900; letter-spacing: -1.5px; }
.pkg-roi-label { font-size: 12px; font-weight: 600; opacity: 0.65; }
.pkg-detail-row { display: flex; gap: 16px; margin: 16px 0; }
.pkg-detail { flex: 1; }
.pkg-detail-label { font-size: 10px; font-weight: 600; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.5px; }
.pkg-detail-value { font-size: 14px; font-weight: 800; margin-top: 3px; }
.hot-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 10px; font-weight: 800;
}

/* ---- WALLET CURRENCY CARDS ---- */
.wallet-card {
  border-radius: 22px; padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 6px 24px rgba(0,24,71,0.18);
  position: relative; overflow: hidden;
}
.wallet-card::before {
  content: '';
  position: absolute; top: -40px; right: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.wc-flag { font-size: 28px; margin-bottom: 10px; }
.wc-name { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 500; }
.wc-code { font-size: 14px; font-weight: 800; color: #fff; }
.wc-amount { font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -1px; margin: 10px 0 16px; }
.wc-actions { display: flex; gap: 8px; }
.wc-btn {
  flex: 1; padding: 10px 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.12); font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px; font-weight: 700; color: #fff; cursor: pointer;
  transition: transform .15s;
}
.wc-btn.lime { background: var(--grad-lime); color: var(--navy); border: none; }
.wc-btn:active { transform: scale(0.97); }

/* ---- PAGE HEADER ---- */
.page-header {
  background: var(--grad-header);
  padding: 20px 20px 24px;
 overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute;
  top: -60px; right: -60px; width: 200px; height: 200px;
  border-radius: 50%; background: rgba(255,255,255,0.04);
}
.ph-back { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; cursor: pointer; text-decoration: none; }
.ph-back svg { width: 20px; height: 20px; stroke: rgba(255,255,255,0.7); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ph-back-text { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 600; }
.ph-title { font-size: 22px; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.ph-sub { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; font-weight: 500; }

/* ---- UTILITY ---- */
.px-20 { padding-left: 20px; padding-right: 20px; }
.pt-20 { padding-top: 20px; }
.pb-20 { padding-bottom: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }
.white-card { background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 4px 16px rgba(0,24,71,0.08); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-muted { color: var(--text-secondary); }
.text-white { color: #fff; }
.text-lime { color: var(--lime); }
.text-red { color: #DC2626; }
.font-900 { font-weight: 900; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
