/* ============================================================
   Wittyboost — Premium Glassmorphism Design System
   ============================================================ */

:root {
  --primary: #6C63FF;
  --primary-dark: #5a52d5;
  --primary-light: #8b85ff;
  --secondary: #00D4AA;
  --secondary-dark: #00b894;
  --accent: #FF6B6B;
  --accent2: #FFA502;
  --success: #00D4AA;
  --warning: #FFA502;
  --danger: #FF6B6B;
  --info: #74B9FF;

  --bg: #0A0A1A;
  --bg2: #0F0F2D;
  --bg3: #141428;
  --surface: rgba(255,255,255,0.05);
  --surface2: rgba(255,255,255,0.08);
  --surface3: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.1);
  --border2: rgba(108,99,255,0.3);

  --text: #E8E8FF;
  --text2: #B0B0D0;
  --text3: #7070A0;
  --text-inv: #0A0A1A;

  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 24px rgba(108,99,255,0.3);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-btn: 0 4px 16px rgba(108,99,255,0.4);

  --blur: blur(20px);
  --blur-sm: blur(10px);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;

  --nav-h: 72px;
  --sidebar-w: 260px;
}

/* Light mode */
[data-theme="light"] {
  --bg: #F4F4FF;
  --bg2: #EEEEFF;
  --bg3: #E8E8FF;
  --surface: rgba(255,255,255,0.7);
  --surface2: rgba(255,255,255,0.85);
  --surface3: rgba(255,255,255,0.95);
  --border: rgba(0,0,0,0.08);
  --border2: rgba(108,99,255,0.2);
  --text: #0A0A1A;
  --text2: #404060;
  --text3: #808090;
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Animated gradient bg */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(108,99,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,212,170,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(255,107,107,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

p { color: var(--text2); }

a { color: var(--primary-light); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary); }

img { max-width: 100%; }
ul { list-style: none; }

/* ── Glass card ───────────────────────────────────────────── */
.glass {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.glass-heavy {
  background: var(--surface2);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.card {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

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

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-light), var(--primary)); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(108,99,255,0.5); color: #fff; }

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,212,170,0.4);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,212,170,0.5); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--border2);
}
.btn-outline:hover { background: var(--surface); border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface2); border-color: var(--border2); }

.btn-danger { background: linear-gradient(135deg, var(--danger), #e55); color: #fff; box-shadow: 0 4px 16px rgba(255,107,107,0.3); }
.btn-success { background: linear-gradient(135deg, var(--success), var(--secondary-dark)); color: #fff; }
.btn-warning { background: linear-gradient(135deg, var(--warning), #e59400); color: #fff; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1.2rem 2.5rem; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 0.65rem; border-radius: var(--radius-sm); }

.btn:disabled, .btn.loading { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.btn.loading::before { content: ''; display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 0.4rem; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 500; font-size: 0.875rem; color: var(--text2); margin-bottom: 0.5rem; }

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
  backdrop-filter: var(--blur-sm);
}

.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); background: var(--surface2); }
.form-control::placeholder { color: var(--text3); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid { border-color: var(--success); }

.input-group { position: relative; }
.input-group .form-control { padding-left: 3rem; }
.input-group .input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.input-group .input-action { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--text3); cursor: pointer; background: none; border: none; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.8rem; color: var(--text3); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 0.3rem; }

/* ── Navigation ───────────────────────────────────────────── */
.navbar {
  height: var(--nav-h);
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  color: var(--text2);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--primary-light); }

.navbar-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

.navbar-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 0.5rem; border-radius: var(--radius-sm); }

/* ── Sidebar (dashboard) ──────────────────────────────────── */
.layout-dashboard { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  backdrop-filter: var(--blur);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 900;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
}

.sidebar-nav { padding: 1rem; flex: 1; }

.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  margin-bottom: 0.25rem;
  position: relative;
}
.sidebar-link:hover { background: var(--surface2); color: var(--text); }
.sidebar-link.active { background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(108,99,255,0.05)); color: var(--primary-light); border: 1px solid rgba(108,99,255,0.2); }
.sidebar-link .badge { margin-left: auto; font-size: 0.7rem; }

.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); }

.dashboard-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-topbar {
  height: var(--nav-h);
  background: var(--surface);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 800;
}

.dash-content { padding: 2rem; flex: 1; }

/* ── Stat cards ───────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--card-accent, rgba(108,99,255,0.1));
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card.purple { --card-accent: rgba(108,99,255,0.15); border-color: rgba(108,99,255,0.2); }
.stat-card.teal   { --card-accent: rgba(0,212,170,0.12);  border-color: rgba(0,212,170,0.2); }
.stat-card.red    { --card-accent: rgba(255,107,107,0.12); border-color: rgba(255,107,107,0.2); }
.stat-card.gold   { --card-accent: rgba(255,165,2,0.12);   border-color: rgba(255,165,2,0.2); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.stat-icon.purple { background: rgba(108,99,255,0.2); color: var(--primary-light); }
.stat-icon.teal   { background: rgba(0,212,170,0.2);  color: var(--secondary); }
.stat-icon.red    { background: rgba(255,107,107,0.2); color: var(--accent); }
.stat-icon.gold   { background: rgba(255,165,2,0.2);   color: var(--accent2); }

.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.85rem; color: var(--text3); }
.stat-change { font-size: 0.8rem; font-weight: 600; margin-top: 0.5rem; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Wallet card ──────────────────────────────────────────── */
.wallet-card {
  background: linear-gradient(135deg, #6C63FF 0%, #5a52d5 40%, #00D4AA 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 8px 32px rgba(108,99,255,0.4);
}
.wallet-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.wallet-card::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.wallet-card * { position: relative; z-index: 1; color: #fff; }
.wallet-balance { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; }
.wallet-label { font-size: 0.85rem; opacity: 0.8; margin-bottom: 0.25rem; }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--surface2);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  text-align: left;
  white-space: nowrap;
}
tbody tr { border-top: 1px solid var(--border); transition: var(--transition-fast); }
tbody tr:hover { background: var(--surface); }
tbody td { padding: 1rem 1.25rem; font-size: 0.9rem; color: var(--text2); vertical-align: middle; }
tfoot td { padding: 1rem 1.25rem; border-top: 1px solid var(--border); font-weight: 600; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-primary { background: rgba(108,99,255,0.2); color: var(--primary-light); }
.badge-success { background: rgba(0,212,170,0.2);  color: var(--secondary); }
.badge-danger  { background: rgba(255,107,107,0.2); color: var(--accent); }
.badge-warning { background: rgba(255,165,2,0.2);   color: var(--accent2); }
.badge-info    { background: rgba(116,185,255,0.2); color: var(--info); }
.badge-gray    { background: var(--surface2); color: var(--text3); }

/* ── Modals ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h5 { margin: 0; font-size: 1.1rem; }
.modal-close { background: none; border: none; color: var(--text3); cursor: pointer; padding: 0.25rem; border-radius: var(--radius-sm); transition: var(--transition-fast); }
.modal-close:hover { color: var(--text); background: var(--surface); }

.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ── Alerts / toasts ──────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border-left: 3px solid;
}
.alert-success { background: rgba(0,212,170,0.1); border-color: var(--success); color: var(--success); }
.alert-danger  { background: rgba(255,107,107,0.1); border-color: var(--danger); color: var(--accent); }
.alert-warning { background: rgba(255,165,2,0.1); border-color: var(--warning); color: var(--accent2); }
.alert-info    { background: rgba(116,185,255,0.1); border-color: var(--info); color: var(--info); }

/* Toast notifications */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: slideIn 0.3s ease forwards;
  font-size: 0.9rem;
}
.toast.hide { animation: slideOut 0.3s ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--info); }
.toast-warning { border-left: 3px solid var(--warning); }

/* ── Progress ─────────────────────────────────────────────── */
.progress { background: var(--surface2); border-radius: var(--radius-full); height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width 0.6s ease; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.25rem; background: var(--surface); border-radius: var(--radius-full); padding: 0.25rem; margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.tab-btn.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Service cards ────────────────────────────────────────── */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-color, rgba(108,99,255,0.1)) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border2); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

/* ── Landing page ─────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero-title {
  background: linear-gradient(135deg, #fff 0%, rgba(108,99,255,0.9) 50%, rgba(0,212,170,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { font-size: 1.2rem; color: var(--text2); max-width: 600px; margin: 1.25rem 0 2rem; }

/* Floating shapes */
.shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.shape-1 { width: 400px; height: 400px; top: -100px; right: -100px; background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%); }
.shape-2 { width: 300px; height: 300px; bottom: -50px; left: -50px; background: radial-gradient(circle, rgba(0,212,170,0.12) 0%, transparent 70%); }
.shape-3 { width: 200px; height: 200px; top: 40%; left: 60%; background: radial-gradient(circle, rgba(255,107,107,0.08) 0%, transparent 70%); }

.section { padding: 5rem 0; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 1rem;
}

/* ── Steps ────────────────────────────────────────────────── */
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 16px rgba(108,99,255,0.4);
}

/* ── Pricing ──────────────────────────────────────────────── */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}
.pricing-card.featured {
  background: linear-gradient(135deg, rgba(108,99,255,0.15) 0%, rgba(0,212,170,0.08) 100%);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-price { font-size: 3rem; font-weight: 800; color: var(--text); }
.pricing-period { color: var(--text3); font-size: 0.9rem; }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.auth-side {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, var(--secondary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.auth-side::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23fff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.auth-form-wrap {
  flex: 0 0 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--bg2);
}
.auth-form { width: 100%; max-width: 400px; }
.auth-logo { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.5rem; }

/* ── PWA install banner ───────────────────────────────────── */
#pwa-install-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(200%);
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  z-index: 3000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 380px;
  width: calc(100% - 2rem);
}
#pwa-install-banner.show { transform: translateX(-50%) translateY(0); }

/* ── Grid helpers ─────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.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: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.flex-1 { flex: 1; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted   { color: var(--text3); }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-flex { display: flex; }
.w-100 { width: 100%; }
/* Mobile visibility helpers */
@media (max-width: 768px)  { .d-mobile-none  { display: none !important; } }
@media (min-width: 769px)  { .d-desktop-none { display: none !important; } }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: var(--radius-full); }

/* Avatar */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 1rem; flex-shrink: 0; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.85rem; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.divider-text { position: relative; text-align: center; margin: 1.5rem 0; }
.divider-text::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.divider-text span { position: relative; background: var(--bg2); padding: 0 1rem; color: var(--text3); font-size: 0.85rem; }

/* Checkbox / toggle */
.form-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

.toggle { position: relative; width: 44px; height: 24px; cursor: pointer; }
.toggle input { display: none; }
.toggle-slider { position: absolute; inset: 0; background: var(--surface2); border-radius: 99px; transition: var(--transition); border: 1px solid var(--border); }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: var(--transition); }
.toggle input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Loading spinner */
.spinner { width: 40px; height: 40px; border: 3px solid var(--surface2); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text3); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }

/* Pill / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition-fast);
}
.chip:hover, .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Search box */
.search-box { position: relative; }
.search-box input { padding-left: 2.75rem; }
.search-box .search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }

/* Product/listing card */
.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.listing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border2); }
.listing-img { width: 100%; height: 180px; object-fit: cover; background: var(--surface2); }
.listing-body { padding: 1.25rem; }
.listing-price { font-size: 1.25rem; font-weight: 800; color: var(--primary-light); }
.listing-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; }

/* Steps progress */
.step-progress { display: flex; align-items: center; gap: 0; margin-bottom: 2rem; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-circle { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; color: var(--text3); flex-shrink: 0; transition: var(--transition); z-index: 1; }
.step-circle.done { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-circle.active { border-color: var(--primary); color: var(--primary-light); box-shadow: 0 0 0 4px rgba(108,99,255,0.2); }
.step-line { flex: 1; height: 2px; background: var(--border); transition: var(--transition); }
.step-line.done { background: var(--primary); }

/* Notification dot */
.notif-dot { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }
.notif-count { background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 99px; padding: 1px 6px; min-width: 18px; text-align: center; line-height: 1.4; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.animate-fade { animation: fadeIn 0.4s ease forwards; }
.animate-float { animation: float 4s ease-in-out infinite; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 240px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .auth-side { display: none; }
  .auth-form-wrap { flex: 1; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .navbar-nav { display: none; }
  .navbar-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 899;
    display: none;
  }
  .sidebar-overlay.open { display: block; }
  .dashboard-main { margin-left: 0; }

  .dash-content { padding: 1rem; }
  .hero { padding: 4rem 1rem; min-height: 70vh; }
  .wallet-balance { font-size: 1.75rem; }
  .tabs { overflow-x: auto; }

  .modal { max-width: 100%; max-height: 95vh; border-radius: var(--radius) var(--radius) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}

@media (max-width: 480px) {
  .btn-xl { padding: 0.9rem 1.5rem; font-size: 1rem; }
  h1 { font-size: 1.75rem; }
  .stat-value { font-size: 1.4rem; }
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ── Focus ────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ── Mobile Bottom Navigation ─────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bnav-items {
  display: flex;
  height: 62px;
  align-items: stretch;
}
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text3);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 500;
  transition: color 0.15s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item i { font-size: 1.3rem; transition: transform 0.2s; line-height: 1; }
.bnav-item.active { color: var(--primary-light); }
.bnav-item.active i { transform: scale(1.12); }
.bnav-item.active::after {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}

/* ── Platform / social icons ──────────────────────────────── */
.plt-icon { flex-shrink: 0; }

/* ── Wallet quick-actions row ─────────────────────────────── */
.wallet-actions {
  display: flex;
  gap: 0;
  margin-top: 1.25rem;
}
.wallet-action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.wallet-action-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  transition: background 0.15s;
}
.wallet-action:hover .wallet-action-btn { background: rgba(255,255,255,0.28); }
.wallet-action-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Services icon grid (dashboard) ──────────────────────── */
.service-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.service-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 0.875rem 0.5rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.service-icon-item:hover {
  background: var(--surface2);
  border-color: var(--border2);
  transform: translateY(-2px);
}
.service-icon-item .sii-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
  line-height: 1.3;
}

/* ── Category horizontal scroll (mobile SMM) ─────────────── */
.cat-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.cat-scroll-item .csi-ring {
  width: 60px; height: 60px;
  border-radius: 50%;
  padding: 3px;
  background: var(--surface2);
  border: 2px solid var(--border);
  transition: border-color 0.15s;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cat-scroll-item.active .csi-ring { border-color: var(--primary); }
.cat-scroll-item .csi-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}
.cat-scroll-item.active .csi-label { color: var(--primary-light); }

/* ── Gift card category chips ─────────────────────────────── */
.gc-cat-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.gc-cat-chip {
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.gc-cat-chip:hover,
.gc-cat-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Order item row (dashboard recent orders) ─────────────── */
.order-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.order-row:hover { border-color: var(--border2); }

/* ── Responsive overrides ─────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: block; }
  .dashboard-main { padding-bottom: 72px; }

  /* Sidebar hidden on mobile — use bottom nav instead */
  .sidebar { display: none !important; }

  /* Top bar: show menu toggle only on tablet */
  .dash-topbar { padding: 0 1rem; gap: 0.75rem; }

  /* Wallet card compact on mobile */
  .wallet-balance { font-size: 2rem; }

  /* Services grid: 4 per row on mobile */
  .service-icon-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
  .service-icon-item { padding: 0.75rem 0.25rem; border-radius: 10px; }

  /* 2-col grid collapses to 1 on very small screens */
  .dash-content .grid.grid-2 { grid-template-columns: 1fr; }

  /* Hide desktop cat sidebar on mobile */
  .smm-cat-desktop { display: none !important; }
  .smm-cat-mobile  { display: block !important; }
}

@media (min-width: 769px) {
  /* Hide mobile cat scroll on desktop */
  .smm-cat-mobile { display: none !important; }
  .smm-cat-desktop { display: block !important; }
}
