/* ============================================
   PIC - Prestige Investment Capital
   Clean Fintech Banking Interface
   ============================================ */

:root {
  /* Primary - Deep Navy for banking trust */
  --navy: #0B1D35;
  --navy-light: #122744;
  --navy-medium: #1A3358;
  
  /* Accent - Teal/Green for fintech feel */
  --green: #00B876;
  --green-dark: #009E66;
  --green-light: #00D684;
  --green-bg: #E8FBF0;
  
  /* Gold - Subtle, used sparingly */
  --gold: #C9A84C;
  --gold-light: #E0C36A;
  
  /* Neutrals - Clean white/gray */
  --white: #FFFFFF;
  --gray-50: #F7F8FA;
  --gray-100: #F0F1F4;
  --gray-200: #E4E6EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Status */
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --info: #3B82F6;
  --info-light: #EFF6FF;
  
  /* Shadows - subtle, banking style */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  
  /* Radius - rounded but not too much */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 50%;
  
  --transition: all 0.2s ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }

/* ============================================
   Typography Helpers
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-green { color: var(--green); }
.text-navy { color: var(--navy); }
.text-danger { color: var(--danger); }
.text-gray { color: var(--gray-500); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.25rem; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }

/* ============================================
   Layout
   ============================================ */
.container { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }

/* ============================================
   Auth Pages (Login/Register)
   ============================================ */
.auth-page {
  min-height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-logo {
  margin-bottom: 28px;
  text-align: center;
}

.auth-logo-img {
  width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(10, 22, 40, 0.18);
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.auth-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 5px;
  background: transparent;
  color: var(--gray-500);
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Form Elements
   ============================================ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input-wrap { position: relative; }

.form-input-wrap i.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.88rem;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--gray-800);
}

.form-input.has-icon { padding-left: 42px; }

.form-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 184, 118, 0.08);
}

.form-input::placeholder { color: var(--gray-400); }

.eye-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--gray-400);
  font-size: 0.95rem;
  padding: 4px;
}

.form-error { color: var(--danger); font-size: 0.76rem; margin-top: 4px; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
  width: 100%;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-gold {
  background: var(--green);
  color: var(--white);
  font-weight: 700;
}

.btn-gold:hover {
  background: var(--green-dark);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
}

.btn-outline:hover { border-color: var(--navy); color: var(--navy); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #DC2626; }

.btn-sm { padding: 8px 14px; font-size: 0.82rem; width: auto; }
.btn-xs { padding: 5px 10px; font-size: 0.75rem; width: auto; border-radius: var(--radius-sm); }

/* ============================================
   Dashboard Layout
   ============================================ */
.app-layout {
  min-height: 100vh;
  background: var(--gray-50);
  padding-bottom: 76px;
}

.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header .logo {
  color: var(--navy);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-header .logo span { color: var(--green); }

.header-logo-img {
  height: 44px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}

/* Username chip with user icon */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-100);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--gray-200);
}

.user-chip i {
  color: var(--green);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip.hidden { display: none; }

/* Referral "linked" badge inside the register form */
.referral-locked-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--green);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.referral-locked-badge.hidden { display: none; }

.form-input-wrap { position: relative; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.notification-bell {
  position: relative;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.notification-bell:hover { background: var(--gray-200); }

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.notif-badge.hidden { display: none; }

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 6px;
  color: var(--gray-400);
  font-size: 0.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: none;
  min-width: 50px;
  flex: 1;
}

.nav-item i { font-size: 1.15rem; }
.nav-item.active { color: var(--green); }
.nav-item:hover { color: var(--green); }

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--gray-100);
  margin-bottom: 10px;
}

.card-navy {
  background: var(--navy);
  color: var(--white);
}

.card-bordered {
  border: 1px solid var(--gray-200);
  box-shadow: none;
}

/* ============================================
   Balance Cards
   ============================================ */
.balance-hero {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 12px 0;
  color: var(--white);
}

.balance-hero .total-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}

.balance-hero .total-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.balance-hero .total-amount .naira { color: var(--green-light); }

.balance-row {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.balance-item {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.balance-item .label { font-size: 0.65rem; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.balance-item .amount { font-size: 0.9rem; font-weight: 700; color: var(--white); }

/* ============================================
   Plan Badge
   ============================================ */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.78rem;
}

.plan-badge.bronze   { background: #F5EDE4; color: #8B5E3C; }
.plan-badge.silver   { background: #F0F0F0; color: #555; }
.plan-badge.gold     { background: #FDF6E3; color: #92760C; }
.plan-badge.diamond  { background: #E8F4FD; color: #1A6FA0; }
.plan-badge.elite    { background: #EEF2FF; color: #4338ca; }
.plan-badge.platinum { background: #F4F4F5; color: #52525b; }
.plan-badge.vip      { background: #FFFBEB; color: #b45309; }
.plan-badge.premium  { background: #ECFDF5; color: #047857; }
.plan-badge.none     { background: var(--gray-100); color: var(--gray-500); }

/* ============================================
   Investment Plans
   ============================================ */
.plans-banner {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 12px;
}

.plans-banner img { margin-bottom: 10px; }
.plans-banner h2 { font-size: 1.2rem; color: var(--navy); }
.plans-banner h2 span { color: var(--green); }
.plans-banner p { font-size: 0.82rem; color: var(--gray-500); }

/* Plan cards (replaces the old plans-table) */
.plans-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.plan-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.plan-card:hover {
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.plan-card.is-current {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fffbe8 0%, #ffffff 60%);
}

.plan-card.is-current::after {
  content: 'CURRENT';
  position: absolute;
  top: 10px;
  right: -32px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 36px;
  transform: rotate(35deg);
  letter-spacing: 0.5px;
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.plan-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-card-name i {
  font-size: 1rem;
}

.plan-card-name.bronze i   { color: #cd7f32; }
.plan-card-name.silver i   { color: #a0a0a0; }
.plan-card-name.gold i     { color: #d4af37; }
.plan-card-name.diamond i  { color: #5ec4d6; }
.plan-card-name.elite i    { color: #6366f1; }
.plan-card-name.platinum i { color: #e5e4e2; }
.plan-card-name.vip i      { color: #f59e0b; }
.plan-card-name.premium i  { color: #10b981; }

.plan-card-deposit {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
}

.plan-card-deposit small {
  font-size: 0.7rem;
  color: var(--gray-500);
  font-weight: 500;
  display: block;
  text-align: right;
}

.plan-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-200);
}

.plan-card-stat {
  text-align: center;
}

.plan-card-stat .label {
  font-size: 0.62rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.plan-card-stat .value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

.plan-card-cta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
}

.plans-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.plans-table th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 5px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.plans-table td {
  padding: 10px 5px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 500;
  color: var(--gray-700);
}

.plans-table tr:nth-child(even) td { background: var(--gray-50); }
.plans-table .plan-name { font-weight: 700; color: var(--navy); }

.plans-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.plans-footer-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.plans-footer-item i { font-size: 1.1rem; color: var(--green); margin-bottom: 4px; }
.plans-footer-item .label { font-size: 0.7rem; color: var(--gray-500); }
.plans-footer-item .value { font-weight: 700; font-size: 0.82rem; color: var(--navy); }

/* ============================================
   Deposit Page
   ============================================ */
.bank-details-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
}

.bank-details-card .bank-icon { font-size: 2.2rem; color: var(--green-light); margin-bottom: 10px; }

.bank-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bank-detail-row:last-child { border-bottom: none; }
.bank-detail-row .label { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.bank-detail-row .value { font-weight: 600; font-size: 0.88rem; }

.copy-btn {
  background: rgba(255,255,255,0.1);
  color: var(--green-light);
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  cursor: pointer;
}

.copy-btn:hover { background: rgba(255,255,255,0.18); }

/* ============================================
   Story Task
   ============================================ */
.story-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.story-header {
  background: var(--green);
  padding: 14px 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-header i { font-size: 1.2rem; }
.story-header h3 { font-size: 0.95rem; font-weight: 700; flex: 1; }

/* Normal text timer shown next to the title (replaces the old countdown circle) */
.task-timer {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.task-timer.hidden { display: none; }

/* Timer shown below the story content while the 15s countdown runs */
.task-timer-bottom {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--navy);
  font-weight: 600;
  text-align: center;
  border-left: 3px solid var(--green);
}

.task-timer-bottom i { color: var(--green); margin-right: 4px; }

.task-timer-bottom.hidden { display: none; }

.story-body { padding: 20px; }

.story-content {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.story-countdown { text-align: center; padding: 14px; }

.countdown-circle {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 auto 8px;
}

.countdown-label { font-size: 0.8rem; color: var(--gray-500); }

/* ============================================
   Notifications Panel
   ============================================ */
.notif-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--white);
  z-index: 200;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.notif-panel.open { right: 0; }

.notif-panel-header {
  padding: 14px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-panel-header h3 { font-size: 0.95rem; font-weight: 700; color: var(--navy); }

.notif-close {
  background: var(--gray-100);
  color: var(--gray-600);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.notif-list { flex: 1; overflow-y: auto; padding: 8px; }

.notif-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: pointer;
}

.notif-item:hover { background: var(--gray-50); }

.notif-item.unread {
  background: var(--green-bg);
  border-left: 3px solid var(--green);
}

.notif-item .notif-title { font-weight: 600; font-size: 0.82rem; color: var(--gray-800); }
.notif-item .notif-msg { font-size: 0.76rem; color: var(--gray-500); line-height: 1.4; }
.notif-item .notif-time { font-size: 0.68rem; color: var(--gray-400); margin-top: 4px; }

.notif-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.2);
  z-index: 199;
  display: none;
}

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

/* ============================================
   Modal / Popup
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.hidden { display: none; }

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.modal-card i.modal-icon { font-size: 2.5rem; color: #0088cc; margin-bottom: 14px; }
.modal-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.modal-card p { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 18px; line-height: 1.5; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn { flex: 1; }

/* ============================================
   Withdrawal Form
   ============================================ */
.wd-balance-select { display: flex; gap: 6px; margin-bottom: 14px; }

.wd-balance-option {
  flex: 1;
  padding: 10px 6px;
  text-align: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
}

.wd-balance-option.active { border-color: var(--green); background: var(--green-bg); }
.wd-balance-option .type { font-size: 0.72rem; color: var(--gray-500); margin-bottom: 2px; }
.wd-balance-option .bal { font-weight: 700; font-size: 0.85rem; color: var(--navy); }

/* ============================================
   Referral Page
   ============================================ */
.referral-code-box {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
}

.referral-code-box .code {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--green-light);
  margin: 8px 0;
}

.referral-link-box { display: flex; gap: 6px; margin-top: 10px; }

.referral-link-box input {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.referral-link-box input::placeholder { color: rgba(255,255,255,0.3); }
.referral-link-box .copy-btn { background: var(--green); color: var(--white); padding: 9px 14px; font-weight: 600; }

/* ============================================
   Status Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-pending { background: var(--warning-light); color: #92400E; }
.badge-approved { background: var(--success-light); color: #065F46; }
.badge-rejected { background: var(--danger-light); color: #991B1B; }
.badge-active { background: var(--success-light); color: #065F46; }

/* ============================================
   Section Title
   ============================================ */
.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i { color: var(--green); }

/* ============================================
   Empty State
   ============================================ */
.empty-state { text-align: center; padding: 36px 20px; }
.empty-state i { font-size: 2.5rem; color: var(--gray-300); margin-bottom: 10px; }
.empty-state h4 { font-size: 0.92rem; color: var(--gray-500); margin-bottom: 4px; }
.empty-state p { font-size: 0.8rem; color: var(--gray-400); }

/* ============================================
   Toast
   ============================================ */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.3s ease;
  max-width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast-success { background: var(--green); color: var(--white); }
.toast-error { background: var(--danger); color: var(--white); }
.toast-warning { background: var(--warning); color: var(--gray-900); }

/* ============================================
   Spinner
   ============================================ */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

.spinner-dark { border-color: var(--gray-200); border-top-color: var(--navy); }

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

.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.page-loader .spinner {
  width: 32px; height: 32px;
  border-width: 3px;
  border-color: var(--gray-200);
  border-top-color: var(--green);
}

/* ============================================
   Admin Panel
   ============================================ */
.admin-layout { min-height: 100vh; background: var(--gray-50); }

.admin-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 250px;
  height: 100vh;
  background: var(--navy);
  padding: 18px 0;
  overflow-y: auto;
  z-index: 100;
  transition: left 0.3s ease;
}

.admin-sidebar .sidebar-logo {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  text-align: center;
}

.admin-sidebar .sidebar-logo-img {
  height: 56px;
  width: auto;
  border-radius: 10px;
  margin: 0 auto;
  display: block;
}

.admin-sidebar .sidebar-logo h2 { color: var(--white); font-size: 1rem; font-weight: 800; }
.admin-sidebar .sidebar-logo h2 span { color: var(--green-light); }
.admin-sidebar .sidebar-logo p { color: rgba(255,255,255,0.4); font-size: 0.7rem; margin-top: 2px; }

.sidebar-nav { list-style: none; }

.sidebar-nav li a,
.sidebar-nav li button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: none;
}

.sidebar-nav li a:hover,
.sidebar-nav li button:hover { color: var(--white); background: rgba(255,255,255,0.04); }

.sidebar-nav li a.active,
.sidebar-nav li button.active {
  color: var(--green-light);
  background: rgba(0, 184, 118, 0.06);
  border-right: 3px solid var(--green);
}

.sidebar-nav li i { width: 18px; text-align: center; font-size: 0.9rem; }

.admin-main { margin-left: 250px; padding: 18px; min-height: 100vh; }

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-topbar h1 { font-size: 1.2rem; font-weight: 700; color: var(--navy); }

/* Admin Stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--gray-100);
}

.stat-card .stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.stat-card .stat-value { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.stat-card .stat-label { font-size: 0.74rem; color: var(--gray-500); margin-top: 2px; }

.stat-card.green .stat-icon { background: var(--green-bg); color: var(--green); }
.stat-card.gold .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-card.blue .stat-icon { background: var(--info-light); color: var(--info); }
.stat-card.red .stat-icon { background: var(--danger-light); color: var(--danger); }
.stat-card.navy .stat-icon { background: #E8EDF5; color: var(--navy); }

/* Admin Table */
.admin-table-wrap {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }

.admin-table th {
  background: var(--gray-50);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.admin-table tr:hover td { background: var(--gray-50); }
.admin-table .actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* Admin Form */
.admin-form-group { margin-bottom: 14px; }
.admin-form-group label { display: block; font-weight: 600; font-size: 0.8rem; color: var(--gray-600); margin-bottom: 5px; }

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  transition: var(--transition);
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 184, 118, 0.08);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--navy);
  font-size: 1.2rem;
  padding: 4px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .admin-sidebar { left: -250px; }
  .admin-sidebar.open { left: 0; }
  .admin-main { margin-left: 0; }
  .hamburger { display: block; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-table { font-size: 0.72rem; }
  .admin-table th, .admin-table td { padding: 7px 8px; }
}

@media (max-width: 480px) {
  .balance-hero .total-amount { font-size: 1.6rem; }
  .balance-row { flex-direction: column; gap: 5px; }
  .balance-item {
    display: flex;
    justify-content: space-between;
    text-align: left;
    padding: 8px 10px;
  }
  .plans-table { font-size: 0.66rem; }
  .plans-table th, .plans-table td { padding: 7px 4px; }
  .admin-stats { grid-template-columns: 1fr; }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================
   Page Sections
   ============================================ */
.page-section { display: none; }
.page-section.active { display: block; }

.countdown-display {
  font-size: 0.88rem;
  color: var(--gray-500);
  text-align: center;
  padding: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

/* ============================================
   Quick Actions
   ============================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.quick-action-item:hover { border-color: var(--green); }
.quick-action-item .icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.quick-action-item .label { font-size: 0.67rem; font-weight: 600; color: var(--gray-600); }

.quick-action-item .icon.green { background: var(--green-bg); color: var(--green); }
.quick-action-item .icon.gold { background: var(--warning-light); color: var(--warning); }
.quick-action-item .icon.navy { background: #E8EDF5; color: var(--navy); }
.quick-action-item .icon.blue { background: var(--info-light); color: var(--info); }
.quick-action-item .icon.telegram { background: #E8F4FD; color: #0088cc; }
.quick-action-item .icon.care { background: #F3E8FF; color: #7c3aed; }

/* ============================================
   Transaction List
   ============================================ */
.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.tx-item:last-child { border-bottom: none; }

.tx-item .tx-left { display: flex; align-items: center; gap: 10px; }

.tx-item .tx-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.tx-item .tx-icon.credit { background: var(--green-bg); color: var(--green); }
.tx-item .tx-icon.debit { background: var(--danger-light); color: var(--danger); }
.tx-item .tx-desc { font-size: 0.8rem; font-weight: 600; color: var(--gray-700); }
.tx-item .tx-date { font-size: 0.68rem; color: var(--gray-400); }
.tx-item .tx-amount { font-weight: 700; font-size: 0.85rem; }
.tx-item .tx-amount.credit { color: var(--green); }
.tx-item .tx-amount.debit { color: var(--danger); }

/* ============================================
   Maintenance Mode Overlay
   ============================================ */
.maintenance-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a1628 0%, #1a2940 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.maintenance-overlay.hidden { display: none; }

.maintenance-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.maintenance-logo {
  width: 80px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  border-radius: 12px;
}

.maintenance-icon {
  font-size: 3rem;
  color: var(--gold, #d4af37);
  margin-bottom: 12px;
  display: block;
}

.maintenance-card h2 {
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.maintenance-card p {
  color: var(--gray-500);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ============================================
   Install App Instructions Overlay
   ============================================ */
.install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.78);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.install-overlay.hidden { display: none; }

.install-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 22px 22px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: installSlideUp 0.25s ease-out;
}

@keyframes installSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gray-100);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--gray-500);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.install-close:hover { background: var(--gray-200); color: var(--navy); }

.install-logo {
  width: 70px;
  height: auto;
  margin: 0 auto 14px;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(10, 22, 40, 0.15);
}

.install-card h2 {
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.install-steps {
  margin-top: 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--green);
}

.install-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-step-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--navy);
  line-height: 1.5;
}

.install-step-text i {
  color: var(--green);
  margin-right: 4px;
  font-size: 0.95rem;
}

.install-step-text strong {
  color: var(--navy);
  font-weight: 700;
}

/* ============================================
   Plan Lifecycle Grid (dashboard)
   ============================================ */
.plan-lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.plan-lifecycle-item {
  padding: 8px 10px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}

.plan-lifecycle-item .text-xs {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.plan-lifecycle-item .fw-bold {
  font-size: 0.82rem;
  word-break: break-word;
}

/* Stats row (Today's Task, Today's Reward, Total Earnings) */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.stat-mini {
  padding: 12px 10px !important;
  margin-bottom: 0 !important;
  text-align: center;
}

.stat-mini .text-xs {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.stat-mini .fw-bold {
  font-size: 0.95rem;
}

.text-navy { color: var(--navy) !important; }
.text-danger { color: var(--danger) !important; }

/* Plans page footer items (info cards under the plan list) */
.plans-footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 480px) {
  .plans-footer {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plans-footer-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}

.plans-footer-item i {
  font-size: 1.3rem;
  margin-bottom: 6px;
  display: block;
}

.plans-footer-item .value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 2px;
}

.plans-footer-item .label {
  font-size: 0.7rem;
  color: var(--gray-500);
  font-weight: 500;
  line-height: 1.3;
}
