/* ============================================
   DABUR INVESTMENT - USER STYLES v2
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #C8956C;
  --primary-dark: #A8754C;
  --primary-light: #F0C8A0;
  --primary-bg: #FFF8F4;
  --bg: #F5F6FA;
  --white: #ffffff;
  --text: #1A1D2E;
  --text-muted: #8A94A6;
  --border: #E8ECF4;
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #F59E0B;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 68px;
}

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

html, body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* ==================== BOTTOM NAV ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  flex: 1;
}

.nav-item i { font-size: 20px; transition: transform 0.2s; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: scale(1.1); }

/* ==================== PAGE WRAPPER ==================== */
.page-wrapper { padding-bottom: calc(var(--nav-height) + 10px); min-height: 100vh; }

/* ==================== PAGE HEADER ==================== */
.page-header {
  background: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 1px 0 var(--border);
}

.page-header .back-btn {
  position: absolute;
  left: 16px;
  background: var(--bg);
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ==================== AUTH PAGE ==================== */
.auth-page { background: #F0F7F0; }
.auth-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.auth-banner {
  height: 280px;
  overflow: hidden;
  position: relative;
}
.auth-banner img { width: 100%; height: 100%; object-fit: cover; }
.auth-banner-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2D6A4F 0%, #40916C 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}

.logo-circle {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  overflow: hidden;
}
.logo-circle img { width: 80%; height: 80%; object-fit: contain; }
.logo-text { font-size: 36px; font-weight: 800; color: var(--primary); }
.auth-site-name { color: white; font-size: 22px; font-weight: 700; }

.auth-card {
  background: white;
  border-radius: 28px 28px 0 0;
  flex: 1;
  padding: 28px 24px;
  margin-top: -24px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.08);
}

.auth-tabs {
  display: flex;
  margin-bottom: 28px;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
}

.auth-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

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

.input-row {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 13px 16px;
  gap: 10px;
  transition: border-color 0.2s;
}
.input-row:focus-within { border-color: var(--primary); background: var(--primary-bg); }
.input-row i { color: var(--text-muted); font-size: 18px; width: 20px; }
.input-row input { flex: 1; border: none; background: none; outline: none; font-size: 15px; color: var(--text); font-family: inherit; }
.input-row input::placeholder { color: var(--text-muted); }
.country-code { font-weight: 700; color: var(--primary); border-right: 1.5px solid var(--border); padding-right: 10px; font-size: 14px; }
.toggle-pass-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px; }
.toggle-pass-btn i { font-size: 16px; }

.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); cursor: pointer; font-weight: 600; }

/* ==================== BUTTONS ==================== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(200,149,108,0.35);
  letter-spacing: 0.3px;
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(200,149,108,0.25); }
.btn-primary.full-width { width: 100%; }

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:active { background: var(--primary-bg); }

/* ==================== HOME BANNER ==================== */
.banner-slider { position: relative; overflow: hidden; height: 200px; }
.banner-slides { display: flex; transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94); height: 100%; }
.banner-slide { min-width: 100%; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: center;
}
.slider-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.slider-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); transition: all 0.3s; }
.slider-dot.active { background: white; width: 18px; border-radius: 3px; }

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
  background: white;
  padding: 20px 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.qa-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.qa-icon i { font-size: 22px; }
.qa-icon.recharge { background: #EEF2FF; color: #4F46E5; }
.qa-icon.withdraw { background: #FFF7ED; color: #EA580C; }
.qa-icon.online { background: #F0FDF4; color: #16A34A; }
.qa-icon.channel { background: #EFF6FF; color: #2563EB; }

/* ==================== PLAN TABS ==================== */
.plan-tabs {
  display: flex;
  background: white;
  margin: 14px 14px 0;
  border-radius: 14px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
}

.plan-tab {
  flex: 1; padding: 11px;
  text-align: center;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--text-muted);
  transition: all 0.2s;
}
.plan-tab.active { background: var(--primary); color: white; box-shadow: 0 3px 10px rgba(200,149,108,0.3); }

.plan-content { display: none; padding: 14px; }
.plan-content.active { display: block; }

/* ==================== PLAN CARD (improved) ==================== */
.plan-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid rgba(200,149,108,0.1);
}

.plan-card-img-wrap {
  position: relative;
  height: 170px;
  overflow: hidden;
  background: linear-gradient(135deg, #F0F7EE, #E8F5E9);
}
.plan-card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.3s;
}

.plan-card-body { padding: 16px; }

.plan-card-title {
  font-size: 16px; font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.plan-badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.plan-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.plan-stat-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px;
}

.plan-stat-item .value {
  font-size: 18px; font-weight: 700;
  color: var(--primary);
}
.plan-stat-item .label {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px; font-weight: 500;
}

.plan-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.plan-total-profit {
  font-size: 13px; color: var(--text-muted);
}
.plan-total-profit strong { color: var(--success); font-size: 15px; }

.plan-buy-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 3px 12px rgba(200,149,108,0.35);
  transition: all 0.2s;
}
.plan-buy-btn:active { transform: scale(0.97); }
.plan-buy-btn i { font-size: 16px; }

.plan-presale-btn {
  width: 100%; padding: 12px;
  background: var(--bg); color: var(--text-muted);
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  cursor: not-allowed;
  margin-top: 12px;
}

/* ==================== MY PAGE ==================== */
.my-hero {
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 50%, #40916C 100%);
  color: white;
  padding: 24px 20px 32px;
  position: relative;
  overflow: hidden;
}
.my-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.my-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -20px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.my-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: white;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.my-avatar img { width: 100%; height: 100%; object-fit: contain; }
.my-avatar i { font-size: 32px; color: var(--primary); }

.my-user-id { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.vip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(200,149,108,0.25);
  border: 1px solid rgba(200,149,108,0.4);
  color: #FFD9B0;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
}

.my-stats {
  display: flex; gap: 10px; margin-top: 20px;
}
.my-stat {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}
.my-stat-value { font-size: 16px; font-weight: 700; }
.my-stat-label { font-size: 10px; opacity: 0.75; margin-top: 3px; font-weight: 500; }

.menu-list { background: white; margin: 14px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }

.menu-item {
  display: flex; align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  font-size: 15px; font-weight: 500;
  gap: 14px; transition: background 0.15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg); }

.menu-item-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.menu-item-icon.blue { background: #EEF2FF; color: #4F46E5; }
.menu-item-icon.green { background: #F0FDF4; color: #16A34A; }
.menu-item-icon.orange { background: #FFF7ED; color: #EA580C; }
.menu-item-icon.red { background: #FEF2F2; color: #EF4444; }
.menu-item-icon.purple { background: #FAF5FF; color: #7C3AED; }
.menu-item-icon.gray { background: var(--bg); color: var(--text-muted); }
.menu-item-icon.teal { background: #F0FDFA; color: #0D9488; }

.menu-item span.label { flex: 1; }
.menu-item .arrow { color: var(--text-muted); }

/* ==================== CARDS ==================== */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

/* ==================== BALANCE HERO ==================== */
.balance-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 24px 20px 28px;
  border-radius: 0 0 24px 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(200,149,108,0.3);
}
.balance-label { font-size: 13px; opacity: 0.85; font-weight: 500; margin-bottom: 8px; }
.balance-amount { font-size: 38px; font-weight: 800; letter-spacing: -0.5px; }

/* ==================== INPUT GROUPS ==================== */
.input-group { margin-bottom: 14px; }
.input-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-muted); }
.input-field {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px; outline: none;
  transition: border-color 0.2s;
  background: white;
  font-family: inherit;
}
.input-field:focus { border-color: var(--primary); background: var(--primary-bg); }

.input-with-icon { position: relative; }
.input-with-icon i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 17px;
}
.input-with-icon .input-field { padding-left: 42px; }
.rupee-icon { font-size: 17px; color: var(--text-muted); }

/* ==================== AMOUNT OPTIONS ==================== */
.amount-options {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.amount-opt {
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  color: var(--text);
}
.amount-opt.selected { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }
.amount-opt:hover { border-color: var(--primary-light); }

/* ==================== PAYMENT OPTIONS ==================== */
.pay-opt {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px solid var(--border);
  gap: 12px; background: white;
  transition: all 0.2s;
}
.pay-opt.selected { border-color: var(--primary); background: var(--primary-bg); }
.pay-check {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all 0.2s;
}
.pay-opt.selected .pay-check { background: var(--primary); border-color: var(--primary); color: white; }

/* ==================== RECORD ITEMS ==================== */
.record-item {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.record-type-badge {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.record-body {
  display: flex; justify-content: space-between; align-items: center;
}
.record-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.record-amount { font-size: 17px; font-weight: 700; }
.record-amount.positive { color: var(--success); }
.record-amount.negative { color: var(--danger); }

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.status-pill.success { background: #F0FDF4; color: var(--success); }
.status-pill.pending { background: #FFFBEB; color: var(--warning); }
.status-pill.failed  { background: #FEF2F2; color: var(--danger); }

/* ==================== UPI BOX ==================== */
.upi-box {
  background: var(--primary-bg);
  border: 1.5px dashed var(--primary);
  border-radius: 16px;
  padding: 18px; margin-bottom: 16px;
  text-align: center;
}
.upi-id-text { font-size: 18px; font-weight: 800; color: var(--primary); margin: 8px 0 4px; }
.upi-name-text { font-size: 13px; color: var(--text-muted); }
.upi-qr { width: 140px; height: 140px; margin: 12px auto; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.upi-qr img { width: 100%; height: 100%; object-fit: contain; }
.copy-btn {
  background: var(--primary);
  color: white; border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; margin-top: 8px;
  transition: background 0.2s;
}

/* ==================== INFO BOX ==================== */
.info-box {
  background: var(--bg);
  border-radius: 12px;
  border-left: 3px solid var(--primary);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px; color: var(--text-muted);
}
.info-box.warn { border-left-color: var(--warning); background: #FFFBEB; }
.info-box.danger { border-left-color: var(--danger); background: #FEF2F2; }

/* ==================== SHARE PAGE ==================== */
.share-hero { width: 100%; height: 180px; object-fit: cover; display: block; }
.invite-section { padding: 18px; }
.section-heading {
  font-size: 16px; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.section-heading::before {
  content: ''; width: 4px; height: 20px;
  background: var(--primary); border-radius: 2px;
}

.invite-item {
  display: flex; align-items: center;
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.invite-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.invite-icon.link { background: #EEF2FF; color: #4F46E5; }
.invite-icon.code { background: var(--primary-bg); color: var(--primary); }
.invite-info { flex: 1; min-width: 0; }
.invite-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.invite-value { font-size: 13px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reward-levels { display: flex; gap: 10px; margin: 14px 0; }
.reward-level {
  flex: 1; background: white; border-radius: 16px;
  padding: 16px 12px; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.reward-level-name { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.reward-level-pct { font-size: 26px; font-weight: 800; color: var(--text); }

.commission-item {
  background: white; border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 16px; margin-bottom: 8px;
  font-size: 14px; font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

/* ==================== TEAM PAGE ==================== */
.team-hero {
  background: linear-gradient(135deg, #1B4332, #40916C);
  padding: 20px; color: white;
}
.team-user-id { font-size: 18px; font-weight: 700; }
.team-recharge-val { font-size: 28px; font-weight: 800; margin: 4px 0 16px; }
.team-stats { display: flex; gap: 10px; }
.team-stat {
  flex: 1; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px; padding: 12px; text-align: center;
}
.team-stat-label { font-size: 11px; opacity: 0.8; }
.team-stat-value { font-size: 20px; font-weight: 800; margin-top: 3px; }

.level-tabs { display: flex; background: white; border-bottom: 1px solid var(--border); }
.level-tab {
  flex: 1; padding: 13px; text-align: center;
  cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.level-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.team-grid-item {
  background: white; border-radius: 16px;
  padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.team-grid-value { font-size: 26px; font-weight: 800; color: var(--text); }
.team-grid-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay.center { align-items: center; padding: 20px; }

.modal-box {
  background: white;
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: 480px;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.center .modal-box { border-radius: 24px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  font-size: 17px; font-weight: 700;
}
.modal-close-btn {
  background: var(--bg); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.modal-body { padding: 0 20px 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; }

/* ==================== POPUP MODAL ==================== */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.popup-box {
  background: white; border-radius: 24px;
  width: 100%; max-width: 340px;
  overflow: hidden;
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
@keyframes popIn { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,0.3);
  border: none; color: white;
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 15px; z-index: 1;
}
.popup-img { width: 100%; height: 180px; object-fit: cover; display: block; }
.popup-img-placeholder {
  height: 120px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
}
.popup-content { padding: 16px 18px; }
.popup-title { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 10px; }
.popup-desc { font-size: 13px; line-height: 1.7; color: var(--text-muted); text-align: center; }
.popup-desc .highlight { color: var(--danger); font-weight: 700; }
.popup-footer { padding: 12px 18px 18px; }

/* ==================== TOAST (Professional) ==================== */
.toast-container {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  pointer-events: none;
  width: 90%; max-width: 380px;
}

.toast-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  width: 100%;
  pointer-events: all;
}
@keyframes toastIn { from { transform: translateY(-20px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastOut { from { transform: translateY(0) scale(1); opacity: 1; } to { transform: translateY(-10px) scale(0.9); opacity: 0; } }

.toast-item.success { background: #1A2B1A; color: #4ADE80; }
.toast-item.error   { background: #2B1A1A; color: #F87171; }
.toast-item.warning { background: #2B2514; color: #FCD34D; }
.toast-item.info    { background: #1A1F2B; color: #60A5FA; }

.toast-item .t-icon { font-size: 18px; flex-shrink: 0; }
.toast-item .t-msg { flex: 1; }

/* Legacy single toast (for pages not using container) */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #1A2B1A; color: #4ADE80;
  padding: 12px 22px; border-radius: 50px;
  font-size: 14px; font-weight: 600; z-index: 9999;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  opacity: 0; white-space: nowrap; max-width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: #2B1A1A; color: #F87171; }
.toast.success { background: #1A2B1A; color: #4ADE80; }
.toast.warning { background: #2B2514; color: #FCD34D; }

/* ==================== LOADING ==================== */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== EMPTY STATE ==================== */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state-icon { font-size: 48px; margin-bottom: 14px; color: var(--border); }
.empty-state-text { font-size: 15px; color: var(--text-muted); font-weight: 500; }

/* ==================== WITHDRAW TABS ==================== */
.tab-bar {
  display: flex; background: white;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  flex: 1; padding: 14px; text-align: center;
  cursor: pointer; font-size: 15px; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ==================== SECTION ==================== */
.section { padding: 14px; }

/* ==================== UTILS ==================== */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.fw-bold      { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
::-webkit-scrollbar { width: 0; }

@media (min-width: 481px) {
  body { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ==================== PLAN IMAGE FALLBACK ==================== */
.plan-img-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #F0F7EE, #E8F5E9);
}
.plan-img-fallback i { font-size: 52px; color: var(--primary); opacity: 0.5; }
.plan-img-fallback.vip { background: linear-gradient(135deg, #FFF8F4, #FFE8D6); }

/* ==================== VIP PLAN BADGE ==================== */
.vip-plan-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FFF8F4, #FFE8D6);
  color: var(--primary);
  border: 1px solid rgba(200,149,108,0.3);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 0;
}
.daily-badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ==================== MY WALLET CARDS ==================== */
.my-wallet-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  width: 100%;
  padding: 0 4px;
}
.my-wallet-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 13px 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mwc-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: white;
}
.mwc-icon.income  { background: rgba(39,174,96,0.35); }
.mwc-icon.recharge { background: rgba(52,152,219,0.35); }
.mwc-info { flex: 1; }
.mwc-label { font-size: 11px; opacity: 0.75; font-weight: 500; color: white; }
.mwc-value { font-size: 22px; font-weight: 800; color: white; letter-spacing: -0.5px; margin-top: 2px; }

/* ==================== BANNER SLIDER FULL ==================== */
.banner-slider { position: relative; overflow: hidden; height: 220px; }
.banner-slides  { display: flex; transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94); height: 100%; }
.banner-slide   { min-width: 100%; height: 100%; position: relative; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==================== MY PLAN NAV ACTIVE ==================== */
.nav-item.active .fa-chart-line { color: var(--primary); }

/* ==================== INSTANT DEPOSIT AMOUNT BTN ==================== */
.amount-opt-i {
  flex: 1 1 calc(33% - 8px);
  min-width: 80px;
  padding: 12px 8px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.amount-opt-i.selected {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

/* ==================== FLOATING SUPPORT BUTTON ==================== */
/* ===== SUPPORT FAB CIRCLE BUTTON ===== */
.support-fab {
  position: fixed !important;
  bottom: calc(var(--nav-height) + 16px) !important;
  right: 16px !important;
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #C8956C, #A0714F) !important;
  color: white !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  text-decoration: none !important;
  z-index: 99999 !important;
  box-shadow:
    0 6px 20px rgba(200,149,108,0.55),
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
  border: 2.5px solid rgba(255,255,255,0.3) !important;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.25s ease !important;
  animation: fabBounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards !important;
}
.support-fab i {
  font-size: 22px !important;
  line-height: 1 !important;
}
.support-fab .fab-text {
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  opacity: 0.9 !important;
}
.support-fab:hover {
  transform: scale(1.12) !important;
  box-shadow:
    0 10px 28px rgba(200,149,108,0.65),
    0 4px 10px rgba(0,0,0,0.2) !important;
}
.support-fab:active { transform: scale(0.93) !important; }
.support-fab-badge {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  background: #e74c3c !important;
  color: white !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  border-radius: 50px !important;
  min-width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 5px !important;
  border: 2.5px solid white !important;
  box-shadow: 0 2px 8px rgba(231,76,60,0.55) !important;
  animation: fabPulse 2s infinite !important;
}
@keyframes fabBounceIn {
  0%   { opacity: 0; transform: scale(0.3) translateY(30px); }
  60%  { opacity: 1; transform: scale(1.1) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fabPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.2); }
}
