/* ==========================================================================
   Lumora — Premium dating platform design system
   --------------------------------------------------------------------------
   1. Design tokens (dark default, light theme override)
   2. Base & reset
   3. Typography & utilities
   4. Buttons, icons, badges, chips
   5. Forms
   6. Cards, avatars, dropdowns, toasts, modals
   7. Skeletons, tabs, tables, pagination, alerts, progress
   8. Public site (nav, hero, sections, footer)
   9. App shell (sidebar, topbar, content, mobile nav)
   10. Animations
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  --bg: #0b0b0f;
  --bg-soft: #101018;
  --bg-elevated: #15151f;
  --card: rgba(255, 255, 255, .045);
  --card-solid: #171722;
  --glass: rgba(23, 23, 34, .72);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #f4f4f6;
  --text-soft: #c9c9d6;
  --muted: #9a9aad;
  --faint: #6b6b80;

  --primary: #8b5cf6;
  --primary-strong: #7c3aed;
  --accent: #ec4899;
  --magenta: #d946ef;
  --rose: #f43f5e;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 55%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(139,92,246,.18), rgba(236,72,153,.18));
  --glow: 0 8px 30px rgba(139, 92, 246, .35);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;

  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: .75rem; --fs-sm: .85rem; --fs-md: .95rem; --fs-base: 1rem;
  --fs-lg: 1.15rem; --fs-xl: 1.35rem; --fs-2xl: 1.75rem; --fs-3xl: 2.25rem; --fs-hero: clamp(2.4rem, 5.2vw, 4rem);

  --topbar-h: 64px;
  --sidebar-w: 248px;
  --mobile-nav-h: 74px;
  --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="light"] {
  --bg: #f6f6fb;
  --bg-soft: #eeeeF7;
  --bg-elevated: #ffffff;
  --card: rgba(255, 255, 255, .85);
  --card-solid: #ffffff;
  --glass: rgba(255, 255, 255, .8);
  --border: rgba(24, 24, 48, .09);
  --border-strong: rgba(24, 24, 48, .16);
  --text: #191926;
  --text-soft: #3c3c50;
  --muted: #6d6d85;
  --faint: #9b9bb0;
  --shadow-sm: 0 2px 10px rgba(30, 30, 60, .07);
  --shadow-md: 0 10px 30px rgba(30, 30, 60, .1);
  --shadow-lg: 0 24px 60px rgba(30, 30, 60, .16);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.6;
  color: var(--text); background:
    radial-gradient(900px 480px at 85% -10%, rgba(236, 72, 153, .10), transparent 60%),
    radial-gradient(900px 480px at -10% 15%, rgba(139, 92, 246, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
::selection { background: rgba(139, 92, 246, .4); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 3. TYPOGRAPHY & UTILITIES ---------- */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.text-muted { color: var(--muted); }
.text-soft { color: var(--text-soft); }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-center { text-align: center; }
.fs-sm { font-size: var(--fs-sm); }
.fs-xs { font-size: var(--fs-xs); }
.fw-700 { font-weight: 700; }
.d-none { display: none !important; }
.d-flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.w-100 { width: 100%; }
.container { width: min(1180px, 92%); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 96px) 0; position: relative; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.section-head .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: var(--radius-full);
  background: var(--gradient-soft); border: 1px solid rgba(139, 92, 246, .25);
  color: var(--text); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px;
}
.section-sub { color: var(--muted); font-size: var(--fs-md); }

/* ---------- 4. BUTTONS / ICONS / BADGES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-full); border: 1px solid transparent;
  font-weight: 700; font-size: var(--fs-md); line-height: 1.2; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  user-select: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 22px rgba(139, 92, 246, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--glow); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-elevated); transform: translateY(-2px); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(239, 68, 68, .4); color: #fff; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: var(--fs-sm); }
.btn-lg { padding: 15px 32px; font-size: var(--fs-lg); }
.btn-block { display: flex; width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--card);
  color: var(--text-soft); cursor: pointer; transition: all var(--transition); flex-shrink: 0; position: relative;
}
.icon-btn:hover { background: var(--bg-elevated); color: var(--primary); transform: translateY(-1px); }
.ic { width: 20px; height: 20px; flex-shrink: 0; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 26px; height: 26px; }
.ic-md { width: 22px; height: 22px; }

.badge-dot {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-full); background: var(--gradient); color: #fff; font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: 700; text-transform: capitalize; white-space: nowrap;
}
.pill-success { background: rgba(16, 185, 129, .14); color: #34d399; }
.pill-warning { background: rgba(245, 158, 11, .14); color: #fbbf24; }
.pill-danger  { background: rgba(239, 68, 68, .14);  color: #f87171; }
.pill-muted   { background: rgba(154, 154, 173, .14); color: var(--muted); }
[data-theme="light"] .pill-success { color: #059669; }
[data-theme="light"] .pill-warning { color: #b45309; }
[data-theme="light"] .pill-danger { color: #dc2626; }
.pill-info { background: rgba(56, 189, 248, .14); color: #38bdf8; }

.vbadge { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border); }
.vbadge .ic { width: 13px; height: 13px; }
.vbadge-id    { color: #38bdf8; }
.vbadge-email { color: #34d399; }
.vbadge-mobile{ color: #fbbf24; }
.vbadge-admin { color: var(--accent); background: var(--gradient-soft); }

.online-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.online-dot.online { background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.online-dot.recent { background: var(--warning); }
.online-dot.offline { background: var(--faint); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-full);
  background: var(--card); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-soft);
  cursor: pointer; transition: all var(--transition); user-select: none;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--gradient-soft); border-color: rgba(139, 92, 246, .5); color: var(--text); font-weight: 600; }
.chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check input { display: none; }
.chip-check .ic { width: 14px; height: 14px; }

/* ---------- 5. FORMS ---------- */
.field { margin-bottom: 18px; }
.label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text-soft); margin-bottom: 7px; }
.label .req { color: var(--accent); }
.input, .select, .textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-size: var(--fs-md); transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9aad' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer; }
.select option { background: var(--card-solid); color: var(--text); }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon .input { padding-left: 44px; }
.input-hint { font-size: var(--fs-xs); color: var(--faint); margin-top: 6px; }
.input-error { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: var(--fs-xs); margin-top: 6px; display: none; }
.field-error.show { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 640px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch-track {
  width: 46px; height: 26px; border-radius: var(--radius-full); background: var(--border-strong);
  position: relative; transition: background var(--transition); flex-shrink: 0;
}
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform var(--transition); box-shadow: var(--shadow-sm);
}
.switch input:checked + .switch-track { background: var(--gradient); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch-label { font-size: var(--fs-md); color: var(--text-soft); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .switch-desc { display: block; font-size: var(--fs-xs); color: var(--faint); margin-top: 2px; }

/* Checkbox */
.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-sm); color: var(--text-soft); }
.checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }

/* ---------- 6. CARDS / AVATAR / DROPDOWN / TOAST / MODAL ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card-hover:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card-glass { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.card-pad-lg { padding: 32px; }
.card-title { font-size: var(--fs-lg); font-weight: 700; margin-bottom: 6px; }

.avatar {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; background: var(--bg-elevated); border: 1px solid var(--border); flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 30px; height: 30px; }
.avatar-sm { width: 38px; height: 38px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }
.avatar-gradient { background: var(--gradient); color: #fff; font-weight: 800; }

.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 210px; z-index: 90;
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.dropdown.open .dropdown-menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-right { left: auto; right: 0; }
.dropdown-menu a, .dropdown-menu button.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: var(--fs-md); font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button.menu-item:hover { background: var(--card); color: var(--text); }
.dropdown-sep { margin: 6px 8px; border-color: var(--border); }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: var(--fs-sm); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-head a { font-size: var(--fs-xs); }
.dropdown-user { padding: 10px 12px; }
.dropdown-user strong { display: block; font-size: var(--fs-md); }
.plan-chip { display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 700; background: var(--card); border: 1px solid var(--border); text-transform: capitalize; }
.plan-premium, .plan-vip { background: var(--gradient-soft); border-color: rgba(236, 72, 153, .4); }

.toast-container { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px); }
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); color: var(--text);
  animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.hide { animation: toastOut .25s ease forwards; }
.toast-icon { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.toast-icon .ic { width: 14px; height: 14px; }
.toast-success .toast-icon { background: rgba(16, 185, 129, .16); color: var(--success); }
.toast-error .toast-icon { background: rgba(239, 68, 68, .16); color: var(--danger); }
.toast-info .toast-icon { background: rgba(56, 189, 248, .16); color: var(--info); }
.toast-warning .toast-icon { background: rgba(245, 158, 11, .16); color: var(--warning); }
.toast-body { font-size: var(--fs-sm); line-height: 1.45; }
.toast-close { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; padding: 2px; }
.toast-close:hover { color: var(--text); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(5, 5, 10, .66);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 18px; opacity: 0; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; }
.modal {
  width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--card-solid);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.98); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: none; }
.modal-lg { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: var(--fs-xl); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

/* ---------- 7. SKELETON / TABS / TABLE / PAGINATION / ALERT / PROGRESS ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--card); border-radius: var(--radius-sm); }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
  animation: shimmer 1.4s infinite;
}
[data-theme="light"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(30, 30, 60, .06), transparent); }
.skeleton-card { height: 340px; border-radius: var(--radius); }
.skeleton-line { height: 14px; margin: 12px 16px; }
.skeleton-line.short { width: 55%; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 11px 18px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: var(--fs-md);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .25s ease; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 640px; }
.table th {
  text-align: left; padding: 13px 16px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); border-bottom: 1px solid var(--border); font-weight: 700; white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: rgba(139, 92, 246, .05); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .row-actions { display: flex; gap: 6px; }
.table .row-actions .icon-btn { width: 32px; height: 32px; }
.table .row-actions .ic { width: 15px; height: 15px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.page-link {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  color: var(--text-soft); font-size: var(--fs-sm); font-weight: 600; background: var(--card);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--gradient); border-color: transparent; color: #fff; }
.page-link.disabled { opacity: .4; pointer-events: none; }

.alert { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--radius-md); font-size: var(--fs-md); border: 1px solid; margin-bottom: 18px; align-items: flex-start; }
.alert .ic { margin-top: 2px; }
.alert-info { background: rgba(56, 189, 248, .08); border-color: rgba(56, 189, 248, .25); color: var(--text); }
.alert-success { background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .3); color: var(--text); }
.alert-warning { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .3); color: var(--text); }
.alert-danger { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); color: var(--text); }

.progress { height: 8px; border-radius: var(--radius-full); background: var(--border); overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); background: var(--gradient); transition: width .5s ease; }
.progress-lg { height: 12px; }

.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state .empty-icon {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient-soft); color: var(--primary);
}
.empty-state .empty-icon .ic { width: 30px; height: 30px; }
.empty-state h3 { color: var(--text); }

/* ---------- 8. PUBLIC SITE ---------- */
.public-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.public-nav-inner { width: min(1180px, 92%); margin-inline: auto; display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-name { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.public-nav-links { display: flex; gap: 24px; margin-left: auto; }
.public-nav-links a { color: var(--text-soft); font-size: var(--fs-md); font-weight: 600; }
.public-nav-links a:hover { color: var(--primary); }
.public-nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.public-nav-links + .public-nav-actions { margin-left: 0; }
.nav-burger { display: none; }
.public-mobile-menu {
  display: none; flex-direction: column; padding: 10px 4vw 22px; gap: 2px;
  border-top: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(18px);
}
.public-mobile-menu.open { display: flex; animation: fadeIn .25s ease; }
.public-mobile-menu > a { padding: 12px 8px; font-weight: 600; color: var(--text-soft); border-radius: var(--radius-sm); }
.public-mobile-menu > a:hover { background: var(--card); color: var(--text); }
.public-mobile-cta { display: grid; gap: 10px; padding-top: 14px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg::before, .hero-bg::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.hero-bg::before { width: 560px; height: 560px; background: rgba(139, 92, 246, .34); top: -220px; right: -120px; animation: float 9s ease-in-out infinite; }
.hero-bg::after { width: 480px; height: 480px; background: rgba(236, 72, 153, .3); bottom: -200px; left: -140px; animation: float 11s ease-in-out infinite reverse; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: clamp(20px, 4vw, 48px); margin-top: 44px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; }
.hero-stat span { color: var(--muted); font-size: var(--fs-sm); }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero-blob { position: absolute; width: min(430px, 90%); aspect-ratio: 1; border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%; background: var(--gradient); opacity: .85; filter: blur(2px); animation: morph 12s ease-in-out infinite; }
.hero-blob::after { content: ''; position: absolute; inset: 12px; border-radius: inherit; background: var(--bg); opacity: .92; }
.hero-card-stack { position: relative; z-index: 1; display: grid; gap: 14px; width: min(340px, 92%); }
.hero-mini-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-md);
  background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}
.hero-mini-card:nth-child(2) { animation-delay: 1.2s; transform: translateX(34px); }
.hero-mini-card:nth-child(3) { animation-delay: 2.2s; transform: translateX(-20px); }
.hero-mini-card .avatar { border: 2px solid rgba(139, 92, 246, .5); }
.hero-mini-card strong { display: block; font-size: var(--fs-md); }
.hero-mini-card span { color: var(--muted); font-size: var(--fs-xs); }
.hero-mini-action { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--gradient); box-shadow: var(--glow); }

/* Feature / step cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .hero-inner { grid-template-columns: 1fr; } }

.feature-card { position: relative; overflow: hidden; }
.feature-icon {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: var(--gradient-soft); color: var(--primary); margin-bottom: 18px; border: 1px solid rgba(139, 92, 246, .2);
}
.feature-icon .ic { width: 26px; height: 26px; }
.feature-card h3 { font-size: var(--fs-lg); }
.feature-card p { color: var(--muted); font-size: var(--fs-md); margin: 0; }
.step-num {
  position: absolute; top: 18px; right: 22px; font-size: 3.4rem; font-weight: 800; line-height: 1;
  background: var(--gradient-soft); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: .9;
}

/* Discover preview / profile cards (public) */
.profile-mini-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--card); transition: transform var(--transition), border-color var(--transition); }
.profile-mini-row:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, .4); }

/* Pricing */
.pricing-card { position: relative; display: flex; flex-direction: column; }
.pricing-card.featured { border: 1.5px solid transparent; background:
  linear-gradient(var(--card-solid), var(--card-solid)) padding-box,
  var(--gradient) border-box; box-shadow: var(--glow); }
.pricing-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gradient); color: #fff; font-size: var(--fs-xs); font-weight: 800; padding: 5px 16px; border-radius: var(--radius-full); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.pricing-name { font-size: var(--fs-md); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.pricing-price { font-size: 2.6rem; font-weight: 800; margin: 8px 0 2px; }
.pricing-price small { font-size: var(--fs-md); color: var(--muted); font-weight: 600; }
.pricing-feature-list { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 11px; flex: 1; }
.pricing-feature-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-soft); font-size: var(--fs-md); }
.pricing-feature-list .ic { color: var(--success); margin-top: 3px; }
.pricing-feature-list li.na { opacity: .45; }
.pricing-feature-list li.na .ic { color: var(--faint); }

/* Testimonials */
.testimonial-card { position: relative; }
.testimonial-card .quote-ic { position: absolute; top: 20px; right: 24px; color: rgba(139, 92, 246, .25); width: 34px; height: 34px; }
.testimonial-stars { display: flex; gap: 3px; color: #fbbf24; margin-bottom: 14px; }
.testimonial-stars .ic { width: 15px; height: 15px; }
.testimonial-text { color: var(--text-soft); font-size: var(--fs-md); }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testimonial-author strong { display: block; font-size: var(--fs-md); }
.testimonial-author span { color: var(--faint); font-size: var(--fs-xs); }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: none; border: 0; color: var(--text); font-size: var(--fs-md); font-weight: 700; cursor: pointer; text-align: left; }
.faq-q .ic { transition: transform var(--transition); color: var(--primary); flex-shrink: 0; }
.faq-item.open .faq-q .ic { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 22px 20px; color: var(--muted); font-size: var(--fs-md); }
.faq-item.open .faq-a { max-height: 420px; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius); padding: clamp(40px, 6vw, 72px); text-align: center; background: var(--gradient); }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 50% 120%, rgba(255,255,255,.25), transparent); }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.6rem); position: relative; }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 520px; margin: 0 auto 28px; position: relative; }
.cta-band .btn-white { background: #fff; color: var(--primary-strong); position: relative; }
.cta-band .btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0, 0, 0, .25); color: var(--primary-strong); }

/* Public footer */
.public-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 40px; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--muted); font-size: var(--fs-md); margin-top: 14px; max-width: 300px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); color: var(--muted); }
.footer-social a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.footer-col h4 { font-size: var(--fs-md); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--muted); font-size: var(--fs-md); padding: 5px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 44px; padding-top: 22px; color: var(--faint); font-size: var(--fs-sm); }
.ic-footer-heart { width: 13px; height: 13px; color: var(--accent); vertical-align: -2px; }

/* ---------- 9. APP SHELL ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px; padding: 22px 16px;
  border-right: 1px solid var(--border); background: var(--bg-soft); scrollbar-width: thin; z-index: 120;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 13px; padding: 11px 14px; border-radius: var(--radius-md);
  color: var(--muted); font-weight: 600; font-size: var(--fs-md); transition: all var(--transition); position: relative;
}
.sidebar-link:hover { color: var(--text); background: var(--card); }
.sidebar-link.active { color: #fff; background: var(--gradient); box-shadow: 0 6px 20px rgba(139, 92, 246, .35); }
.sidebar-link.active:hover { color: #fff; }
.sidebar-badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-full);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-link.active .sidebar-badge { background: rgba(255, 255, 255, .25); }
.sidebar-upsell { margin-top: auto; border: 1px solid rgba(139, 92, 246, .3); border-radius: var(--radius-md); padding: 18px; background: var(--gradient-soft); text-align: center; }
.sidebar-upsell p { font-size: var(--fs-xs); color: var(--muted); margin: 6px 0 14px; }
.sidebar-upsell-icon { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px; background: var(--gradient); color: #fff; display: grid; place-items: center; box-shadow: var(--glow); }
.sidebar-upsell-member { border-color: rgba(16, 185, 129, .3); }
.sidebar-upsell-member .sidebar-upsell-icon { background: linear-gradient(135deg, #10b981, #059669); box-shadow: none; }
.sidebar-scrim { display: none; }

.topbar {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 clamp(14px, 3vw, 28px);
  position: sticky; top: 0; z-index: 110;
  background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.brand-sm { font-size: 1.05rem; }
.topbar-spacer { flex: 1; }
.topbar-action { width: 40px; height: 40px; background: transparent; border-color: transparent; }
.topbar-action:hover { background: var(--card); }
.topbar-avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.app-content { flex: 1; width: 100%; max-width: 1160px; margin-inline: auto; padding: clamp(18px, 3vw, 30px) clamp(14px, 3vw, 28px) 40px; }

/* Page header block used across app pages */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; }
.page-head p { color: var(--muted); margin: 4px 0 0; font-size: var(--fs-md); }

/* Mobile navigation */
.mobile-nav {
  display: none; position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 20px)); z-index: 130; height: var(--mobile-nav-h);
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-lg);
  align-items: stretch; justify-content: space-around; padding: 6px;
}
.mobile-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); border-radius: 18px; flex: 1; position: relative; }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-icon { position: relative; display: grid; place-items: center; }
.mobile-nav-icon .badge-dot { top: -5px; right: -10px; }
.mobile-nav-label { font-size: 10.5px; font-weight: 700; }
.mobile-nav-bubble {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-top: -26px;
  background: var(--gradient); color: #fff; box-shadow: var(--glow); border: 4px solid var(--bg);
  transition: transform var(--transition);
}
.mobile-nav-bubble .ic { width: 22px; height: 22px; }
.mobile-nav-item.active .mobile-nav-bubble { transform: scale(1.08); }
.mobile-nav-cta .mobile-nav-label { color: var(--text-soft); }

/* Back to top */
.back-to-top { position: fixed; bottom: 24px; right: 24px; z-index: 120; width: 46px; height: 46px; box-shadow: var(--shadow-md); }
body[data-authed="1"] .back-to-top { bottom: calc(var(--mobile-nav-h) + 26px); }
@media (min-width: 1024px) { body[data-authed="1"] .back-to-top { bottom: 24px; } }

/* ---------- 10. ANIMATIONS ---------- */
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%; }
  33% { border-radius: 58% 42% 44% 56% / 44% 58% 42% 56%; }
  66% { border-radius: 42% 58% 52% 48% / 58% 44% 56% 42%; }
}
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes popIn { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes burst { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes matchPop {
  0% { transform: scale(.5) rotate(-6deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.anim-pop { animation: popIn .35s cubic-bezier(.2, .9, .3, 1.3) both; }
.anim-fade { animation: fadeIn .35s ease both; }
.anim-burst { animation: burst .45s ease; }
