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

/* ─── VARIABLES ─────────────────────────────────────────── */
:root {
  --primary:    #6c3cff;
  --primary-d:  #5429e0;
  --blue:       #1a73e8;
  --white:      #ffffff;
  --black:      #0a0a0a;
  --dark:       #111118;
  --dark2:      #1a1a27;
  --dark3:      #23233a;
  --gray:       #8888aa;
  --border:     rgba(108,60,255,0.25);
  --success:    #22c55e;
  --danger:     #ef4444;
  --warning:    #f59e0b;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 8px 32px rgba(108,60,255,0.15);
  --transition: all 0.25s ease;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ─── HERO / IMAGE DE FOND ───────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.35);
  z-index: 0;
  transition: var(--transition);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,20,0.3) 0%,
    rgba(108,60,255,0.15) 50%,
    rgba(10,10,20,0.85) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* ─── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(10,10,20,0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.topbar-logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--white);
}

.topbar-logo span { color: var(--primary); }

.topbar-actions { display: flex; gap: 12px; align-items: center; }

/* ─── BOTTOM NAV ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(10,10,20,0.96);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--gray);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}

.nav-item i { font-size: 20px; }
.nav-item.active, .nav-item:hover { color: var(--primary); }

/* ─── PAGE WRAPPER ────────────────────────────────────────── */
.page {
  padding-top: 70px;
  padding-bottom: 80px;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── CARTES ──────────────────────────────────────────────── */
.card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 20px;
}

/* ─── WALLET CARDS ────────────────────────────────────────── */
.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.wallet-card {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border-radius: var(--radius);
  padding: 18px 14px;
  position: relative;
  overflow: hidden;
}

.wallet-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.wallet-card.secondary {
  background: linear-gradient(135deg, var(--dark3), var(--dark2));
  border: 1px solid var(--border);
}

.wallet-label { font-size: 11px; color: rgba(255,255,255,0.75); margin-bottom: 6px; }
.wallet-amount { font-size: 20px; font-weight: 800; }
.wallet-sub { font-size: 10px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ─── PLAN CARDS ──────────────────────────────────────────── */
.plan-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  min-height: 180px;
  cursor: pointer;
  transition: var(--transition);
}

.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.plan-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
}

.plan-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,10,20,0.85) 0%,
    rgba(108,60,255,0.2) 100%
  );
}

.plan-card-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  width: fit-content;
}

.plan-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.plan-price { font-size: 24px; font-weight: 900; color: var(--primary); }

.plan-info {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.plan-info-item { font-size: 12px; color: rgba(255,255,255,0.8); }
.plan-info-item strong { color: var(--white); }

.plan-btn {
  margin-top: 12px;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  width: fit-content;
}

.plan-btn:hover { background: var(--primary-d); }

/* ─── FORMULAIRES ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--dark3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--white);
  font-size: 15px;
  transition: var(--transition);
}

.form-input:focus { border-color: var(--primary); background: var(--dark2); }
.form-input::placeholder { color: var(--gray); }

.form-input-group {
  display: flex;
  gap: 8px;
}

.form-input-group select {
  width: 130px;
  flex-shrink: 0;
  background: var(--dark3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
}

/* ─── BOUTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(108,60,255,0.4);
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
  border-radius: 20px;
}

/* ─── BADGES / STATUS ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-primary { background: rgba(108,60,255,0.15); color: var(--primary); }

/* ─── LISTES TRANSACTIONS ─────────────────────────────────── */
.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--dark3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tx-info { flex: 1; padding: 0 12px; }
.tx-label { font-size: 13px; font-weight: 600; }
.tx-date  { font-size: 11px; color: var(--gray); margin-top: 2px; }
.tx-amount { font-size: 14px; font-weight: 700; }
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--danger); }

/* ─── SECTION TITLE ───────────────────────────────────────── */
.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 20px;
  background: var(--primary);
  border-radius: 4px;
}

/* ─── STATS GRID ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-value { font-size: 22px; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 11px; color: var(--gray); margin-top: 4px; }

/* ─── ALERT ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: block; }
.alert-danger  { background: rgba(239,68,68,0.1);  border-left: 3px solid var(--danger);  color: var(--danger); }
.alert-success { background: rgba(34,197,94,0.1);  border-left: 3px solid var(--success); color: var(--success); }
.alert-info    { background: rgba(108,60,255,0.1); border-left: 3px solid var(--primary); color: var(--primary); }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 40px;
  width: 100%;
  max-width: 480px;
  transform: translateY(100%);
  transition: var(--transition);
}

.modal-overlay.show .modal { transform: translateY(0); }

.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 20px;
}

.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 16px; }

/* ─── LOADER ──────────────────────────────────────────────── */
.loader {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── SUPPORT CHAT ────────────────────────────────────────── */
.chat-box {
  height: 320px;
  overflow-y: auto;
  padding: 12px;
  background: var(--dark3);
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}

.msg-user {
  background: var(--primary);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-admin {
  background: var(--dark2);
  border: 1px solid var(--border);
  color: var(--white);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 10px;
  color: var(--gray);
  margin-top: 4px;
}

/* ─── REFERRAL ────────────────────────────────────────────── */
.referral-box {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.referral-code {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 6px;
  margin: 8px 0;
}

.referral-link {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  word-break: break-all;
  margin-bottom: 12px;
}

/* ─── PROGRESS BAR ────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--dark3);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--blue));
  border-radius: 4px;
  transition: width 0.5s ease;
}

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

.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* ─── LOGO INDITEX ────────────────────────────────────────── */
.brand-logo {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--white);
  text-shadow: 0 0 30px rgba(108,60,255,0.6);
}

.brand-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
  font-weight: 300;
  letter-spacing: 1px;
}

/* ─── UTILITIES ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-gray { color: var(--gray); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.fw-700 { font-weight: 700; }
.fw-900 { font-weight: 900; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.w-100  { width: 100%; }