/*
 * ╔══════════════════════════════════════════════════════════════════╗
 * ║  TREASURE TROVE — components.css  v4.2                           ║
 * ║  UI Components: Buttons · Forms · Cards · Badges · Coin Display  ║
 * ║                 Progress · Modal · Toast · Tabs · FAQ · Hero      ║
 * ║                 Leaderboard · Wallet Rows · Notifications          ║
 * ║                 Referral · Avatar · Empty State · Skeleton        ║
 * ╚══════════════════════════════════════════════════════════════════╝
 */


/* ═══════════════════════════════════════════════════════════════════ */
/*  1. BUTTONS                                                          */
/* ═══════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: all var(--t);
  -webkit-user-select: none;
  user-select: none;
  line-height: 1;
}

/* Shimmer swipe on hover */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn:hover::after { transform: translateX(100%); }

/* Primary */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-bright);
  box-shadow: 0 4px 18px rgba(108, 99, 255, 0.38);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.52);
  color: var(--text-bright);
}
.btn-primary:active  { transform: translateY(0); box-shadow: var(--shadow-sm); }

/* Accent / Gold */
.btn-accent {
  background: var(--gradient-accent);
  color: var(--text-inv);
  box-shadow: 0 4px 18px rgba(255, 215, 0, 0.32);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.48);
  color: var(--text-inv);
}
.btn-accent:active { transform: translateY(0); }

/* Outline primary */
.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: rgba(108, 99, 255, 0.1);
  box-shadow: var(--glow-sm);
  color: var(--primary-light);
}

/* Outline accent */
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border-color: rgba(255, 215, 0, 0.5);
}
.btn-outline-accent:hover {
  background: rgba(255, 215, 0, 0.08);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Ghost */
.btn-ghost {
  background: rgba(108, 99, 255, 0.06);
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: rgba(108, 99, 255, 0.12);
  color: var(--text-bright);
  border-color: var(--border-bright);
}

/* Danger */
.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 4px 18px rgba(255, 23, 68, 0.32);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(255, 23, 68, 0.48);
  color: white;
}

/* Success */
.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 4px 18px rgba(0, 200, 83, 0.32);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 200, 83, 0.48);
  color: white;
}

/* Sizes */
.btn-xs { padding: var(--space-1) var(--space-2); font-size: var(--text-xs); }
.btn-sm { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-7); font-size: var(--text-lg); border-radius: var(--radius-lg); }
.btn-xl { padding: var(--space-5) var(--space-8); font-size: var(--text-xl); border-radius: var(--radius-lg); }

/* Icon-only */
.btn-icon {
  padding: var(--space-3);
  width:  clamp(36px, 3.2vw, 50px);
  height: clamp(36px, 3.2vw, 50px);
  border-radius: var(--radius);
}
.btn-icon.btn-sm {
  width:  clamp(28px, 2.5vw, 38px);
  height: clamp(28px, 2.5vw, 38px);
  padding: var(--space-2);
}

/* Full width */
.btn-block { width: 100%; }

/* Pulsing glow for primary CTA */
.btn-glow { animation: btn-glow-pulse 2.5s ease-in-out infinite; }
@keyframes btn-glow-pulse {
  0%,100% { box-shadow: 0 4px 18px rgba(108,99,255,0.38); }
  50%      { box-shadow: 0 4px 36px rgba(108,99,255,0.65), 0 0 52px rgba(108,99,255,0.22); }
}

/* Loading spinner inside button */
.btn.loading { color: transparent; pointer-events: none; }
.btn.loading::before {
  content: '';
  position: absolute;
  width: 1.1em; height: 1.1em;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: var(--radius-full);
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════════════ */
/*  2. FORMS & INPUTS                                                   */
/* ═══════════════════════════════════════════════════════════════════ */

.form-group { margin-bottom: var(--space-4); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}
.form-label.required::after { content: ' *'; color: var(--danger); }

.form-control {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-bright);
  font-size: var(--text-base);
  font-family: var(--font-body);
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}
.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-control:hover { border-color: var(--border-light); }
.form-control:focus {
  border-color: var(--primary);
  background: rgba(108,99,255,0.04);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
  outline: none;
}
.form-control.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255,23,68,0.12);
}
.form-control.is-success { border-color: var(--success); }

textarea.form-control {
  min-height: clamp(80px, 12vw, 150px);
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-8);
}

/* Input with prefix icon */
.input-wrap { position: relative; }
.input-wrap .form-control { padding-left: calc(var(--space-4) + 1.4em + var(--space-2)); }
.input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--text-base);
  pointer-events: none;
}
.input-wrap .input-suffix {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.input-wrap .input-suffix:hover { color: var(--text-bright); }

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}
.form-check-input {
  width: clamp(16px, 1.5vw, 20px);
  height: clamp(16px, 1.5vw, 20px);
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 0.15em;
}
.form-check-label { font-size: var(--text-sm); color: var(--text); cursor: pointer; line-height: 1.5; }

/* DPDP consent checkbox (India) */
.consent-check {
  background: rgba(108,99,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.consent-check:hover { border-color: var(--border-bright); background: rgba(108,99,255,0.07); }
.consent-check-mandatory { border-color: rgba(108,99,255,0.3); }

/* Feedback */
.form-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--space-1);
}
.form-hint { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }

/* Password strength bar */
.password-strength-bar {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border);
  margin-top: var(--space-2);
  overflow: hidden;
}
.password-strength-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--t), background var(--t);
}
.password-strength-fill[data-strength="1"] { width: 25%; background: var(--danger); }
.password-strength-fill[data-strength="2"] { width: 50%; background: var(--warning); }
.password-strength-fill[data-strength="3"] { width: 75%; background: var(--info); }
.password-strength-fill[data-strength="4"] { width: 100%; background: var(--success); }

/* OTP input boxes */
.otp-input-wrap {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}
.otp-input {
  width:  clamp(42px, 6vw, 62px);
  height: clamp(50px, 7.5vw, 72px);
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-bright);
  transition: all var(--t-fast);
  caret-color: var(--primary);
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.2), var(--glow-sm);
  background: rgba(108,99,255,0.06);
  outline: none;
}
.otp-input.filled { border-color: var(--success); color: var(--success); background: rgba(0,200,83,0.05); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  3. CARDS                                                            */
/* ═══════════════════════════════════════════════════════════════════ */

/* ── Base Card ── */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-bright);
}
.card-body    { padding: var(--space-5); }
.card-footer  { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); background: rgba(0,0,0,0.12); }

.card-hover {
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108,99,255,0.3);
}
.card-glow:hover { box-shadow: var(--shadow-lg), var(--glow); border-color: rgba(108,99,255,0.4); }

/* ── Stat / KPI Card ── */
.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 45%; height: 100%;
  background: radial-gradient(ellipse at top right, rgba(108,99,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat-icon {
  width:  clamp(42px, 4vw, 62px);
  height: clamp(42px, 4vw, 62px);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 2vw, 28px);
  flex-shrink: 0;
}
.stat-icon-primary { background: rgba(108,99,255,0.14); color: var(--primary-light); }
.stat-icon-accent  { background: rgba(255,215,  0,0.11); color: var(--accent); }
.stat-icon-success { background: rgba(  0,200, 83,0.11); color: var(--success); }
.stat-icon-danger  { background: rgba(255, 23, 68,0.11); color: var(--danger); }
.stat-icon-info    { background: rgba(  0,176,255,0.11); color: var(--info); }

.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.stat-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-change { font-size: var(--text-xs); font-weight: 600; margin-top: var(--space-1); }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Reward Card ── */
.reward-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
}
.reward-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--glow);
  border-color: rgba(108,99,255,0.35);
}
.reward-card-img-wrap {
  position: relative;
  padding-top: 56%;
  background: var(--bg-card-3);
  overflow: hidden;
}
.reward-card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.reward-card:hover .reward-card-img { transform: scale(1.07); }
.reward-card-category { position: absolute; top: var(--space-3); left: var(--space-3); z-index: var(--z-raised); }
.reward-card-body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.reward-card-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
}
.reward-card-value { font-size: var(--text-sm); color: var(--text-muted); }
.reward-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
}
/* Lock overlay when user can't redeem */
.reward-card-locked {
  position: absolute; inset: 0;
  background: rgba(13,13,26,0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  backdrop-filter: blur(3px);
}
.reward-card-locked-icon { font-size: var(--text-4xl); color: var(--text-muted); }
.reward-card-locked-msg  { font-size: var(--text-sm); color: var(--text-muted); text-align: center; padding: 0 var(--space-4); }

/* ── Task Card ── */
.task-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
  overflow: hidden;
}
.task-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--t-spring);
}
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(108,99,255,0.25); }
.task-card:hover::before { transform: scaleY(1); }
.task-icon {
  width:  clamp(42px, 4vw, 58px);
  height: clamp(42px, 4vw, 58px);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 2vw, 26px);
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.2);
  flex-shrink: 0;
}
.task-info { flex: 1; min-width: 0; }
.task-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.55; }
.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.task-difficulty { color: var(--accent); font-size: var(--text-xs); letter-spacing: 0.1em; }
.task-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ── Offer-Wall Card ── */
.wall-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
  overflow: hidden;
}
.wall-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(108,99,255,0.3); }
.wall-logo {
  width:  clamp(48px, 5vw, 72px);
  height: clamp(48px, 5vw, 72px);
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-card-3);
  flex-shrink: 0;
}
.wall-info { flex: 1; min-width: 0; }
.wall-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; color: var(--text-bright); margin-bottom: var(--space-1); }
.wall-desc { font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall-meta { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.wall-arrow { color: var(--text-muted); font-size: var(--text-xl); flex-shrink: 0; transition: transform var(--t), color var(--t); }
.wall-card:hover .wall-arrow { transform: translateX(4px); color: var(--primary-light); }
.wall-locked-overlay {
  position: absolute; inset: 0;
  background: rgba(13,13,26,0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ── Blog Card ── */
.blog-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-card-img-wrap { position: relative; padding-top: 52%; overflow: hidden; background: var(--bg-card-3); }
.blog-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.blog-card:hover .blog-card-img { transform: scale(1.06); }
.blog-card-body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.blog-card-date { font-size: var(--text-xs); color: var(--text-muted); }
.blog-card-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--text-bright); line-height: 1.3; margin-bottom: var(--space-3); }
.blog-card-excerpt { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-read-more { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 700; color: var(--primary-light); margin-top: var(--space-4); transition: gap var(--t), color var(--t); }
.blog-card:hover .blog-card-read-more { gap: var(--space-3); color: var(--accent); }

/* ── Game Card ── */
.game-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.game-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, rgba(108,99,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg), var(--glow); border-color: rgba(108,99,255,0.4); }
.game-card-icon { font-size: clamp(40px, 6vw, 72px); line-height: 1; filter: drop-shadow(0 4px 14px rgba(108,99,255,0.4)); }
.game-card-name { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; color: var(--text-bright); }
.game-card-reward { font-size: var(--text-sm); color: var(--text-muted); }

/* ── Auth Card ── */
.auth-card-inner {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
/* Accent top stripe */
.auth-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
}
.auth-card-logo    { text-align: center; margin-bottom: var(--space-6); }
.auth-card-title   { font-size: var(--text-2xl); font-weight: 800; color: var(--text-bright); text-align: center; margin-bottom: var(--space-2); }
.auth-card-subtitle { font-size: var(--text-sm); color: var(--text-muted); text-align: center; margin-bottom: var(--space-6); }
.auth-divider { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0; }
.auth-divider-line { flex: 1; height: 1px; background: var(--border); }
.auth-divider-text { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  4. BADGES & PILLS                                                   */
/* ═══════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.5;
}

/* Status */
.badge-pending    { background: rgba(255,152,0,0.13); color: var(--warning); border: 1px solid rgba(255,152,0,0.3); }
.badge-approved,
.badge-active,
.badge-success    { background: rgba(0,200,83,0.11); color: var(--success); border: 1px solid rgba(0,200,83,0.25); }
.badge-rejected,
.badge-danger     { background: rgba(255,23,68,0.11); color: var(--danger); border: 1px solid rgba(255,23,68,0.25); }
.badge-processing,
.badge-info       { background: rgba(0,176,255,0.11); color: var(--info); border: 1px solid rgba(0,176,255,0.25); }
.badge-primary    { background: rgba(108,99,255,0.13); color: var(--primary-light); border: 1px solid rgba(108,99,255,0.28); }
.badge-secondary  { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }
.badge-accent     { background: rgba(255,215,0,0.1); color: var(--accent); border: 1px solid rgba(255,215,0,0.25); }

/* Sizes */
.badge-sm { font-size: 0.6rem; padding: 0.12em 0.45em; }
.badge-lg { font-size: var(--text-sm); padding: 0.35em 0.85em; }

/* Coin badge — gold pill */
.coin-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.24);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.coin-badge-icon { line-height: 1; }
.coin-badge-lg { font-size: var(--text-xl); padding: var(--space-2) var(--space-4); }

/* Transaction type color map — matches coin_transactions.type ENUM */
.type-earned        { color: var(--success); }
.type-redeemed      { color: var(--danger); }
.type-referrer_bonus { color: var(--primary-light); }
.type-referee_bonus  { color: var(--primary-xlight); }
.type-milestone     { color: var(--accent); }
.type-checkin       { color: var(--info); }
.type-penalty       { color: var(--danger); }
.type-refund        { color: var(--success); }

/* Country badge */
.country-badge { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  5. COIN DISPLAY (large animated balance)                           */
/* ═══════════════════════════════════════════════════════════════════ */

.coin-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.coin-display-icon {
  font-size: var(--text-5xl);
  line-height: 1;
  filter: drop-shadow(0 4px 18px rgba(255,215,0,0.52));
  animation: coin-float 3s ease-in-out infinite;
}
@keyframes coin-float {
  0%,100% { transform: translateY(0px); }
  50%     { transform: translateY(-10px); }
}
.coin-display-amount {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  letter-spacing: -0.04em;
}
.coin-display-label {
  font-size: var(--text-base);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


/* ═══════════════════════════════════════════════════════════════════ */
/*  6. PROGRESS BAR                                                     */
/* ═══════════════════════════════════════════════════════════════════ */

.progress {
  height: clamp(6px, 0.6vw, 10px);
  background: var(--bg-card-3);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  transition: width 0.7s var(--ease-out);
  position: relative;
  overflow: hidden;
}
/* Moving shimmer on progress fill */
.progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: progress-shine 2.2s linear infinite;
}
@keyframes progress-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.progress-fill-accent  { background: var(--gradient-accent); }
.progress-fill-success { background: var(--gradient-success); }

/* Inline progress + label */
.progress-with-label { display: flex; align-items: center; gap: var(--space-3); }
.progress-with-label .progress { flex: 1; }
.progress-label-text { font-size: var(--text-xs); font-weight: 700; color: var(--text-muted); white-space: nowrap; }

/* Milestone progress block */
.milestone-progress {
  background: rgba(108,99,255,0.04);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.milestone-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.milestone-title  { font-size: var(--text-sm); font-weight: 700; color: var(--text-bright); }
.milestone-count  { font-size: var(--text-sm); color: var(--text-muted); }
.milestone-reward { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--accent); font-weight: 600; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  7. MODAL                                                            */
/* ═══════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: clamp(320px, 50vw, 640px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--glow);
  transform: scale(0.92) translateY(22px);
  transition: transform var(--t-spring);
  position: relative;
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-sm { max-width: clamp(280px, 36vw, 420px); }
.modal-lg { max-width: clamp(400px, 66vw, 820px); }
.modal-xl { max-width: clamp(500px, 80vw, 1100px); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-card); z-index: 1;
}
.modal-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--text-bright); }
.modal-close {
  width:  clamp(28px, 3vw, 40px);
  height: clamp(28px, 3vw, 40px);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--text-xl);
  transition: all var(--t-fast);
  flex-shrink: 0;
  background: none; border: none;
}
.modal-close:hover { background: rgba(255,23,68,0.1); color: var(--danger); }
.modal-body   { padding: var(--space-6); }
.modal-footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }

/* Offer-wall fullscreen iframe modal */
.wall-iframe-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: calc(var(--z-modal) + 50);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.wall-iframe-overlay.active { opacity: 1; pointer-events: all; }
.wall-iframe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.wall-iframe-title { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; color: var(--text-bright); }
.wall-iframe-frame { flex: 1; width: 100%; border: none; background: white; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  8. TOAST NOTIFICATIONS                                              */
/* ═══════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: var(--space-5);
  right:  var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  min-width: clamp(240px, 26vw, 380px);
  max-width: clamp(300px, 36vw, 480px);
  transform: translateX(120%);
  transition: transform var(--t-spring), opacity var(--t);
  backdrop-filter: blur(14px);
}
.toast.show   { transform: translateX(0); }
.toast.hiding { opacity: 0; transform: translateX(120%); }

.toast-icon { font-size: var(--text-xl); flex-shrink: 0; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: var(--text-sm); font-weight: 700; color: var(--text-bright); margin-bottom: 0.2em; }
.toast-message { font-size: var(--text-xs); color: var(--text-muted); }
.toast-close { font-size: var(--text-lg); color: var(--text-muted); cursor: pointer; flex-shrink: 0; transition: color var(--t-fast); background: none; border: none; }
.toast-close:hover { color: var(--text-bright); }

.toast-success { border-left: 3px solid var(--success); } .toast-success .toast-icon { color: var(--success); }
.toast-danger  { border-left: 3px solid var(--danger);  } .toast-danger  .toast-icon { color: var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); } .toast-warning .toast-icon { color: var(--warning); }
.toast-info    { border-left: 3px solid var(--info);    } .toast-info    .toast-icon { color: var(--info); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  9. DROPDOWN                                                         */
/* ═══════════════════════════════════════════════════════════════════ */

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: clamp(160px, 16vw, 240px);
  z-index: var(--z-dropdown);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.93) translateY(-8px);
  transform-origin: top right;
  transition: all var(--t-spring);
}
.dropdown-menu.open { opacity: 1; pointer-events: all; transform: scale(1) translateY(0); }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  border: none; background: none; width: 100%; text-align: left;
}
.dropdown-item:hover { background: rgba(108,99,255,0.08); color: var(--text-bright); }
.dropdown-item-danger:hover { background: rgba(255,23,68,0.09); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: var(--space-1) 0; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  10. TABS                                                            */
/* ═══════════════════════════════════════════════════════════════════ */

.tabs {
  display: flex;
  gap: var(--space-1);
  background: var(--bg-card-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t);
  flex-shrink: 0;
  border: none; background: none;
}
.tab-btn:hover { color: var(--text); background: rgba(108,99,255,0.07); }
.tab-btn.active { background: var(--gradient-primary); color: var(--text-bright); box-shadow: var(--shadow-sm); }

/* Filter tabs — pill style */
.filter-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t);
  background: none;
}
.filter-tab:hover { color: var(--text); border-color: var(--border-bright); }
.filter-tab.active { background: rgba(108,99,255,0.12); color: var(--primary-light); border-color: rgba(108,99,255,0.36); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  11. FAQ ACCORDION                                                   */
/* ═══════════════════════════════════════════════════════════════════ */

.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t);
}
.faq-item.open { border-color: rgba(108,99,255,0.3); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  cursor: pointer;
  gap: var(--space-4);
  transition: background var(--t-fast);
  background: none; border: none; width: 100%; text-align: left;
}
.faq-question:hover { background: rgba(108,99,255,0.04); }
.faq-question-text { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; color: var(--text-bright); flex: 1; line-height: 1.4; }
.faq-chevron { color: var(--text-muted); font-size: var(--text-lg); flex-shrink: 0; transition: transform var(--t-spring), color var(--t); }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary-light); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.42s var(--ease-smooth); padding: 0 var(--space-5); }
.faq-item.open .faq-answer { max-height: 800px; padding-bottom: var(--space-5); }
.faq-answer-text { font-size: var(--text-base); color: var(--text-muted); line-height: 1.75; border-top: 1px solid var(--border); padding-top: var(--space-4); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  12. HERO SECTION                                                    */
/* ═══════════════════════════════════════════════════════════════════ */

.hero {
  min-height: clamp(480px, 80vh, 940px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}
/* Dot-grid texture */
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.06) 1px, transparent 1px);
  background-size: clamp(28px, 3.5vw, 56px) clamp(28px, 3.5vw, 56px);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
/* Fade to bg at bottom */
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
}
.hero-content { position: relative; z-index: var(--z-raised); width: 100%; padding: var(--space-9) 0; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(108,99,255,0.11);
  border: 1px solid rgba(108,99,255,0.24);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-5);
}
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--text-bright);
  margin-bottom: var(--space-5);
}
.hero-title-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: var(--text-xl); color: var(--text-muted); line-height: 1.65; max-width: 56ch; margin-bottom: var(--space-7); }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-8); }
.hero-stats { display: flex; align-items: center; gap: var(--space-7); flex-wrap: wrap; padding-top: var(--space-6); border-top: 1px solid rgba(45,43,85,0.55); }
.hero-stat-item { text-align: left; }
.hero-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: var(--space-1);
}
.hero-stat-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  13. HOW IT WORKS STEPS                                             */
/* ═══════════════════════════════════════════════════════════════════ */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 22vw, 320px), 1fr));
  gap: var(--space-5);
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: clamp(24px, 3vw, 40px);
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
  z-index: 0;
}
.step-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  position: relative; z-index: 1;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.step-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(108,99,255,0.3); }
.step-number {
  width:  clamp(44px, 5vw, 66px);
  height: clamp(44px, 5vw, 66px);
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: white;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  box-shadow: var(--glow-sm);
  position: relative; z-index: 1;
}
.step-icon-wrap { font-size: var(--text-4xl); margin-bottom: var(--space-4); line-height: 1; }
.step-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--text-bright); margin-bottom: var(--space-3); }
.step-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  14. LEADERBOARD                                                     */
/* ═══════════════════════════════════════════════════════════════════ */

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(45,43,85,0.45);
  transition: background var(--t-fast);
  text-decoration: none;
  color: inherit;
}
.leaderboard-row:hover { background: rgba(108,99,255,0.05); }
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row.current-user { background: rgba(108,99,255,0.09); border-left: 3px solid var(--primary); }

.leaderboard-rank { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 900; color: var(--text-muted); width: clamp(30px, 3vw, 46px); text-align: center; flex-shrink: 0; }
.leaderboard-rank.rank-1 { color: var(--accent); font-size: var(--text-2xl); }
.leaderboard-rank.rank-2 { color: #C0C0C0; }
.leaderboard-rank.rank-3 { color: #CD7F32; }

.leaderboard-avatar {
  width:  clamp(36px, 3.5vw, 50px);
  height: clamp(36px, 3.5vw, 50px);
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card-3);
}
.leaderboard-user { flex: 1; min-width: 0; }
.leaderboard-username { font-size: var(--text-sm); font-weight: 700; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-country { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.leaderboard-coins { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; color: var(--accent); flex-shrink: 0; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  15. WALLET TRANSACTION ROWS                                         */
/* ═══════════════════════════════════════════════════════════════════ */

.txn-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(45,43,85,0.4);
  transition: background var(--t-fast);
}
.txn-row:hover { background: rgba(108,99,255,0.04); }
.txn-row:last-child { border-bottom: none; }
.txn-icon {
  width:  clamp(38px, 3.8vw, 50px);
  height: clamp(38px, 3.8vw, 50px);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xl);
  flex-shrink: 0;
  background: var(--bg-card-3);
  border: 1px solid var(--border);
}
.txn-info { flex: 1; min-width: 0; }
.txn-desc { font-size: var(--text-sm); font-weight: 600; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: var(--space-1); }
.txn-time { font-size: var(--text-xs); color: var(--text-muted); }
.txn-amount { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; flex-shrink: 0; text-align: right; }
.txn-amount.credit { color: var(--success); }
.txn-amount.credit::before { content: '+'; }
.txn-amount.debit  { color: var(--danger); }
.txn-amount.debit::before  { content: '−'; }
.txn-balance-after { font-size: var(--text-xs); color: var(--text-muted); text-align: right; margin-top: 2px; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  16. NOTIFICATION ITEMS                                              */
/* ═══════════════════════════════════════════════════════════════════ */

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(45,43,85,0.4);
  transition: background var(--t-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.notif-item:hover { background: rgba(108,99,255,0.05); }
.notif-item.unread { background: rgba(108,99,255,0.06); }
.notif-icon {
  width:  clamp(36px, 3.6vw, 48px);
  height: clamp(36px, 3.6vw, 48px);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-lg);
  flex-shrink: 0;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.2);
}
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: var(--text-sm); font-weight: 700; color: var(--text-bright); margin-bottom: var(--space-1); line-height: 1.4; }
.notif-message { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-time { font-size: var(--text-xs); color: var(--text-muted); flex-shrink: 0; }
.notif-unread-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--primary); flex-shrink: 0; margin-top: 0.5em; box-shadow: var(--glow-sm); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  17. AVATAR                                                          */
/* ═══════════════════════════════════════════════════════════════════ */

.avatar-base {
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg-card-3);
  flex-shrink: 0;
  display: block;
}
.avatar-xs  { width: clamp(22px, 2vw,  32px); height: clamp(22px, 2vw,  32px); }
.avatar-sm  { width: clamp(30px, 3vw,  44px); height: clamp(30px, 3vw,  44px); }
.avatar-md  { width: clamp(40px, 4vw,  56px); height: clamp(40px, 4vw,  56px); }
.avatar-lg  { width: clamp(56px, 6vw,  80px); height: clamp(56px, 6vw,  80px); }
.avatar-xl  { width: clamp(80px, 8vw, 120px); height: clamp(80px, 8vw, 120px); }
.avatar-primary { border-color: var(--primary); }
.avatar-accent  { border-color: var(--accent); }
.avatar-glow    { box-shadow: var(--glow-sm); }
/* Upload wrapper */
.avatar-upload-wrap { position: relative; display: inline-block; }
.avatar-upload-btn {
  position: absolute; bottom: 0; right: 0;
  width:  clamp(22px, 2.5vw, 32px);
  height: clamp(22px, 2.5vw, 32px);
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  cursor: pointer;
  border: 2px solid var(--bg);
  transition: transform var(--t-spring);
}
.avatar-upload-btn:hover { transform: scale(1.15); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  18. REFERRAL COMPONENTS                                             */
/* ═══════════════════════════════════════════════════════════════════ */

.referral-link-box {
  background: rgba(108,99,255,0.05);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.referral-reward-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.referral-reward-box {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  position: relative; overflow: hidden;
}
.referral-reward-box::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top, rgba(255,215,0,0.04) 0%, transparent 70%); pointer-events: none; }
.referral-reward-icon   { font-size: var(--text-4xl); margin-bottom: var(--space-3); line-height: 1; }
.referral-reward-coins  { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 900; color: var(--accent); margin-bottom: var(--space-1); }
.referral-reward-label  { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; }

.referral-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border-bottom: 1px solid rgba(45,43,85,0.4); }
.referral-row:last-child { border-bottom: none; }
.referral-user-info { flex: 1; min-width: 0; }
.referral-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.referral-email { font-size: var(--text-xs); color: var(--text-muted); }
.referral-coins-amount { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; color: var(--accent); }
.referral-coins-pending { font-size: var(--text-xs); color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  19. EMPTY STATE                                                     */
/* ═══════════════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-9) var(--space-5);
  gap: var(--space-4);
}
.empty-state-icon  { font-size: var(--text-5xl); opacity: 0.4; filter: grayscale(0.5); }
.empty-state-title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; color: var(--text-bright); }
.empty-state-desc  { font-size: var(--text-base); color: var(--text-muted); max-width: 38ch; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  20. LOADING / SKELETON                                              */
/* ═══════════════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, var(--bg-card-3) 25%, rgba(45,43,85,0.5) 50%, var(--bg-card-3) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s linear infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text  { height: 1em; margin-bottom: 0.5em; }
.skeleton-title { height: 1.5em; width: 60%; margin-bottom: var(--space-3); }
.skeleton-img   { padding-top: 56%; border-radius: var(--radius); }

.page-loader { position: fixed; inset: 0; background: var(--bg); z-index: calc(var(--z-toast) + 100); display: flex; align-items: center; justify-content: center; }
.spinner {
  width:  clamp(32px, 4vw, 52px);
  height: clamp(32px, 4vw, 52px);
  border: 3px solid rgba(108,99,255,0.2);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════════════ */
/*  21. ALERTS                                                          */
/* ═══════════════════════════════════════════════════════════════════ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid;
  font-size: var(--text-sm);
  line-height: 1.55;
  margin-bottom: var(--space-4);
}
.alert-icon    { font-size: var(--text-xl); flex-shrink: 0; margin-top: 0.1em; }
.alert-content { flex: 1; }
.alert-title   { font-weight: 700; margin-bottom: var(--space-1); }
.alert-success { background: rgba(0,200,83,0.07);  border-color: rgba(0,200,83,0.25);  color: var(--success); }
.alert-danger  { background: rgba(255,23,68,0.07); border-color: rgba(255,23,68,0.25); color: var(--danger); }
.alert-warning { background: rgba(255,152,0,0.07); border-color: rgba(255,152,0,0.25); color: var(--warning); }
.alert-info    { background: rgba(0,176,255,0.07); border-color: rgba(0,176,255,0.25); color: var(--info); }
.alert-primary { background: rgba(108,99,255,0.07); border-color: rgba(108,99,255,0.25); color: var(--primary-light); }


/* ═══════════════════════════════════════════════════════════════════ */
/*  22. TABLE & PAGINATION                                              */
/* ═══════════════════════════════════════════════════════════════════ */

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th {
  background: var(--bg-card-3);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.table td { padding: var(--space-4); color: var(--text); border-bottom: 1px solid rgba(45,43,85,0.4); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: rgba(108,99,255,0.04); }

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-5) 0; flex-wrap: wrap; }
.page-btn {
  min-width: clamp(32px, 3vw, 42px);
  height: clamp(32px, 3vw, 42px);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--t-fast);
  padding: 0 var(--space-2);
  text-decoration: none;
}
.page-btn:hover  { background: rgba(108,99,255,0.1); color: var(--primary-light); border-color: rgba(108,99,255,0.3); }
.page-btn.active { background: var(--gradient-primary); color: white; border-color: transparent; box-shadow: var(--glow-sm); }
.page-btn:disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }


/* ═══════════════════════════════════════════════════════════════════ */
/*  23. MISC: Tooltip · Divider · QR · Blog Content · Search          */
/* ═══════════════════════════════════════════════════════════════════ */

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
  z-index: var(--z-tooltip);
}
[data-tooltip]:hover::after { opacity: 1; }

/* Or divider with text */
.divider-or { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider-or-text { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }

/* QR code */
.qr-code-wrap { background: white; border-radius: var(--radius-lg); padding: var(--space-4); display: inline-block; box-shadow: var(--shadow-accent); }

/* Search input wrap */
.search-wrap { position: relative; }
.search-wrap .form-control { padding-left: calc(var(--space-4) + 1.2em + var(--space-2)); }
.search-icon { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

/* Blog rich content */
.blog-content h2, .blog-content h3 { margin-top: var(--space-6); margin-bottom: var(--space-3); }
.blog-content p { margin-bottom: var(--space-4); }
.blog-content a { text-decoration: underline; text-underline-offset: 3px; }
.blog-content img { border-radius: var(--radius); margin: var(--space-5) 0; }

/* Compliance / verified badge */
.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(0,200,83,0.06);
  border: 1px solid rgba(0,200,83,0.2);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--success);
}

/* Age gate / 18+ badge */
.age-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(255,23,68,0.08);
  border: 1px solid rgba(255,23,68,0.2);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--danger);
}