/* ============================================
   DABUR INVESTMENT - USER STYLES
   ============================================ */

:root {
  --primary: #C8956C;
  --primary-dark: #A8754C;
  --primary-light: #E8B58C;
  --bg: #f5f5f5;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #888;
  --border: #e0e0e0;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
  --nav-height: 65px;
}

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

html, body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  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 -2px 12px rgba(0,0,0,0.08);
}

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

.nav-item.active { color: var(--primary); }
.nav-item svg, .nav-item .nav-icon { font-size: 22px; }

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

/* ==================== TOP HEADER ==================== */
.page-header {
  background: var(--primary);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 17px;
  font-weight: 600;
}

.page-header .back-btn {
  position: absolute;
  left: 16px;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* ==================== AUTH PAGE ==================== */
.auth-page { background: #f0f7f0; }

.auth-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.auth-banner {
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f5e9 0%, #f0f7f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-banner img { width: 100%; height: 100%; object-fit: cover; }

.auth-banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.logo-circle img { width: 80%; height: 80%; object-fit: contain; }
.logo-text { font-size: 36px; font-weight: bold; color: var(--primary); }

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

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.auth-tab.active {
  color: var(--primary);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

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

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

.phone-input, .password-wrap, .ref-input {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 50px;
  padding: 12px 16px;
  gap: 10px;
}

.country-code {
  font-weight: 600;
  color: var(--primary);
  border-right: 1px solid var(--border);
  padding-right: 10px;
}

.phone-input input, .password-wrap input, .ref-input input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
}

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

/* ==================== BUTTONS ==================== */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:active { transform: scale(0.97); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary.full-width { width: 100%; }

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
}

/* ==================== HOME PAGE ==================== */
.home-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.home-hero img { width: 100%; height: 100%; object-fit: cover; }

.home-hero-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: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

.slider-dot.active { background: white; width: 20px; border-radius: 4px; }

.quick-actions {
  background: white;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

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

.quick-action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: #fff8f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ==================== PLAN TABS ==================== */
.plan-tabs {
  display: flex;
  background: white;
  margin: 12px 12px 0;
  border-radius: var(--radius);
  padding: 4px;
}

.plan-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary);
  transition: all 0.2s;
}

.plan-tab.active {
  background: var(--primary);
  color: white;
}

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

/* ==================== PLAN CARD ==================== */
.plan-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.plan-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #f5f5f5;
}

.plan-card-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #e8f5e9, #f0f7f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}

.plan-card-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  padding: 12px;
}

.plan-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

.plan-stat {
  background: white;
  padding: 12px;
  text-align: center;
}

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

.plan-card-btn {
  margin: 12px;
  display: block;
  text-align: center;
}

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

.card-title {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

/* ==================== MY PAGE ==================== */
.my-hero {
  background: linear-gradient(135deg, #4a7c4e 0%, #2d5a31 100%);
  color: white;
  padding: 20px 16px 30px;
  position: relative;
  overflow: hidden;
}

.my-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.my-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.my-avatar img { width: 100%; height: 100%; object-fit: contain; }

.my-user-id { font-size: 20px; font-weight: 700; margin-bottom: 4px; }

.vip-badge {
  display: inline-block;
  background: rgba(200,149,108,0.3);
  border: 1px solid var(--primary);
  color: var(--primary-light);
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.my-stats {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.my-stat {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.my-stat-value { font-size: 16px; font-weight: 700; }
.my-stat-label { font-size: 11px; opacity: 0.8; margin-top: 2px; }

.menu-list { background: white; }

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  gap: 12px;
}

.menu-item:last-child { border-bottom: none; }
.menu-item-icon { font-size: 20px; }
.menu-item span { flex: 1; }
.menu-item-arrow { color: var(--text-muted); }

/* ==================== RECHARGE PAGE ==================== */
.amount-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.amount-opt {
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 50px;
  padding: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.amount-opt.selected {
  background: #fff8f4;
  border-color: var(--primary);
  color: var(--primary);
}

.payment-options { margin: 16px 0; }

.pay-opt {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  border: 2px solid var(--border);
  gap: 12px;
  background: white;
  transition: border-color 0.2s;
}

.pay-opt.selected { border-color: var(--primary); background: #fff8f4; }

.pay-opt-check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-opt.selected .pay-opt-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ==================== INCOME/RECORD ITEMS ==================== */
.record-item {
  background: white;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.record-type {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: #fff8f4;
  padding: 3px 10px;
  border-radius: 20px;
}

.record-status-success { color: var(--success); font-size: 13px; font-weight: 600; }
.record-status-pending { color: var(--warning); font-size: 13px; font-weight: 600; }
.record-status-failed { color: var(--danger); font-size: 13px; font-weight: 600; }

.record-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-date { font-size: 12px; color: var(--text-muted); }
.record-amount { font-size: 16px; font-weight: 700; }
.record-amount.positive { color: var(--success); }
.record-amount.negative { color: var(--danger); }

/* ==================== BALANCE DETAILS ==================== */
.balance-hero {
  background: var(--primary);
  color: white;
  padding: 20px;
  border-radius: 0 0 20px 20px;
  text-align: center;
}

.balance-amount { font-size: 36px; font-weight: 700; margin-top: 8px; }

/* ==================== WITHDRAW PAGE ==================== */
.withdraw-tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--border);
}

.withdraw-tab {
  flex: 1;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.withdraw-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ==================== SHARE PAGE ==================== */
.share-hero {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--border);
}

.invite-section { padding: 16px; }

.invite-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  border-left: 3px solid var(--primary);
  padding-left: 10px;
  margin-bottom: 14px;
}

.invite-item {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  gap: 12px;
  box-shadow: var(--shadow);
}

.invite-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.invite-icon.blue { background: #3498db; }
.invite-icon.orange { background: var(--primary); }

.invite-info { flex: 1; }
.invite-label { font-size: 13px; color: var(--text-muted); }
.invite-value { font-size: 13px; color: #999; word-break: break-all; }
.copy-btn {
  background: #f5f5f5;
  border: none;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 600;
}

.reward-levels {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.reward-level {
  flex: 1;
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.reward-level-name { font-size: 13px; color: var(--primary); font-weight: 600; }
.reward-level-pct { font-size: 24px; font-weight: 700; margin-top: 4px; }

.info-box {
  background: white;
  border-radius: var(--radius);
  border: 1.5px solid var(--primary);
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 14px;
  text-align: center;
  color: var(--text);
}

/* ==================== TEAM PAGE ==================== */
.team-hero {
  background: var(--primary);
  padding: 20px 16px;
  color: white;
  position: relative;
  overflow: hidden;
}

.team-user-id { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.team-recharge { font-size: 14px; opacity: 0.85; }
.team-recharge-value { font-size: 28px; font-weight: 700; margin: 6px 0 14px; }

.team-stats {
  display: flex;
  gap: 10px;
}

.team-stat {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.team-stat-label { font-size: 12px; opacity: 0.8; }
.team-stat-value { font-size: 20px; font-weight: 700; margin-top: 2px; }

.level-tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--border);
}

.level-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
}

.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: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.team-grid-value { font-size: 26px; font-weight: 700; }
.team-grid-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ==================== POPUP MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 340px;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  text-align: center;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.modal-body { padding: 16px; }
.modal-img { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.modal-text { font-size: 14px; line-height: 1.6; text-align: center; }
.modal-text .highlight { color: var(--danger); font-weight: 700; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.3);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

/* ==================== FORM INPUTS ==================== */
.input-group {
  margin-bottom: 14px;
}

.input-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.input-field {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  background: white;
}

.input-field:focus { border-color: var(--primary); }

.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

.input-with-icon .input-field { padding-left: 40px; }

/* ==================== NOTIFICATION BADGE ==================== */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
  max-width: 90%;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ==================== LOADING ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  flex-direction: column;
  gap: 12px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==================== EMPTY STATE ==================== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 0; height: 0; }

/* ==================== 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; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.p-16 { padding: 16px; }
.fw-bold { font-weight: 700; }
.section { padding: 12px; }

/* ==================== SWIPER BANNER ==================== */
.banner-slider {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.banner-slides {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
}

.banner-slide {
  min-width: 100%;
  height: 100%;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== UPI INFO BOX ==================== */
.upi-box {
  background: #fff8f4;
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.upi-id { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.upi-name { font-size: 14px; color: var(--text-muted); }

.upi-qr {
  width: 150px;
  height: 150px;
  margin: 12px auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.upi-qr img { width: 100%; height: 100%; object-fit: contain; }

/* Plan already purchased badge */
.plan-owned {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  margin-left: 8px;
}

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