@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&family=Geist+Mono:wght@300;400;500&display=swap');

/* ═══════════════════════════════════════════
   PURPOSEFUL — Design System
   Theme: Futuristic Premium Dashboard
═══════════════════════════════════════════ */

:root {
  /* Core palette */
  --bg:          #07070e;
  --bg2:         #0d0d1a;
  --surface:     #11111f;
  --surface2:    #181830;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);

  /* Accent colours */
  --cyan:        #00f5d4;
  --cyan-dim:    rgba(0,245,212,0.12);
  --violet:      #8b5cf6;
  --violet-dim:  rgba(139,92,246,0.12);
  --pink:        #f472b6;
  --pink-dim:    rgba(244,114,182,0.12);
  --amber:       #fbbf24;
  --amber-dim:   rgba(251,191,36,0.12);
  --green:       #10b981;
  --green-dim:   rgba(16,185,129,0.12);
  --red:         #f87171;
  --red-dim:     rgba(248,113,113,0.12);
  --blue:        #60a5fa;
  --blue-dim:    rgba(96,165,250,0.12);

  /* Text */
  --text:        #eeeef8;
  --text2:       rgba(238,238,248,0.55);
  --text3:       rgba(238,238,248,0.3);

  /* Sidebar */
  --sidebar-w:   260px;

  /* Radii */
  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  22px;
  --r-xl:  30px;

  /* Shadows */
  --shadow-card: 0 4px 32px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 40px rgba(0,245,212,0.15);

  /* Transitions */
  --ease: cubic-bezier(0.16,1,0.3,1);
}

/* Light mode */
[data-theme="light"] {
  --bg:        #f0f0fa;
  --bg2:       #e8e8f5;
  --surface:   #ffffff;
  --surface2:  #f5f5fc;
  --border:    rgba(0,0,0,0.07);
  --border2:   rgba(0,0,0,0.12);
  --text:      #0d0d20;
  --text2:     rgba(13,13,32,0.55);
  --text3:     rgba(13,13,32,0.3);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
}

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

html { scroll-behavior: smooth; }

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

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

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

/* ── Aurora background ── */
.aurora {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.aurora-blob {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0.15;
  animation: auroraFloat var(--t, 18s) ease-in-out infinite alternate;
}
.ab1 { width:700px; height:700px; background:var(--violet); top:-200px; left:-200px; --t:20s; }
.ab2 { width:600px; height:600px; background:var(--cyan);   bottom:-180px; right:-150px; --t:16s; animation-delay:-7s; }
.ab3 { width:450px; height:450px; background:var(--pink);   top:45%; left:50%; --t:22s; animation-delay:-12s; }
@keyframes auroraFloat { to { transform: translate(60px, 50px) scale(1.12); } }

/* Grain */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
}

/* ── App shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(17,17,31,0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
}
[data-theme="light"] .sidebar {
  background: rgba(255,255,255,0.88);
}

.sidebar-brand {
  padding: 1.8rem 1.5rem 1.4rem;
  display: flex; align-items: center; gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(0,245,212,0.3);
  flex-shrink: 0;
  animation: brandPulse 4s ease-in-out infinite;
}
@keyframes brandPulse {
  0%,100% { box-shadow: 0 0 20px rgba(0,245,212,0.3); }
  50%      { box-shadow: 0 0 40px rgba(0,245,212,0.5), 0 0 60px rgba(139,92,246,0.2); }
}
.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 40%, var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar user mini */
.sidebar-user {
  padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(139,92,246,0.4);
}
.sidebar-username { font-size: 0.82rem; font-weight: 600; }
.sidebar-role { font-size: 0.7rem; color: var(--text2); }

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.nav-section-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text3);
  padding: 0.6rem 0.75rem 0.3rem;
}
.nav-link {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--r-sm);
  font-size: 0.87rem; font-weight: 500;
  color: var(--text2);
  transition: all 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}
.nav-link::before {
  content: ''; position: absolute; inset: 0;
  background: var(--cyan-dim);
  opacity: 0; border-radius: inherit;
  transition: opacity 0.2s;
}
.nav-link:hover { color: var(--text); transform: translateX(3px); }
.nav-link:hover::before { opacity: 1; }
.nav-link.active {
  color: var(--cyan);
  background: var(--cyan-dim);
  font-weight: 600;
}
.nav-link.active .nav-icon { filter: drop-shadow(0 0 6px var(--cyan)); }
.nav-link.logout { color: var(--red); }
.nav-link.logout:hover { background: var(--red-dim); color: var(--red); }
.nav-link.logout::before { background: var(--red-dim); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }

/* Active indicator */
.nav-link.active::after {
  content: ''; position: absolute; right: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text3);
  text-align: center;
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 20px;
  background: var(--surface2);
  border-radius: 99px; border: 1px solid var(--border2);
  position: relative; cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}
.theme-toggle-thumb {
  position: absolute; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--pink));
  transition: transform 0.3s var(--ease);
  box-shadow: 0 0 8px rgba(251,191,36,0.5);
}
[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(16px);
  background: linear-gradient(135deg, var(--violet), var(--cyan));
}

/* ═══════════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 64px;
  background: rgba(7,7,14,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 2rem;
  gap: 1rem;
}
[data-theme="light"] .topbar { background: rgba(240,240,250,0.85); }
.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 1rem; letter-spacing: -0.02em;
}
.topbar-spacer { flex: 1; }
.topbar-badge {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--cyan-dim); border: 1px solid rgba(0,245,212,0.2);
  color: var(--cyan); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.75rem; border-radius: 999px;
}
.topbar-badge .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.15} }

.page-body { flex: 1; padding: 2rem 2.2rem 3rem; }

/* Mobile sidebar toggle */
.menu-btn {
  display: none;
  background: none; border: none;
  color: var(--text); font-size: 1.3rem; padding: 0.3rem;
}

/* ═══════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════ */
.page-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.04em; line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 40%, var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-subtitle { font-size: 0.9rem; color: var(--text2); margin-top: 0.3rem; }
.section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text3);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem;
}
.section-label::after { content: ''; flex:1; height:1px; background: var(--border); }

/* ═══════════════════════════════════════════
   CARDS
═══════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border2);
  box-shadow: var(--shadow-card), 0 0 30px rgba(0,0,0,0.3);
}

/* Stat card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.6rem;
  position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent, var(--cyan));
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--accent, var(--cyan)) inset;
}
.stat-card::before {
  content: ''; position: absolute;
  width: 200px; height: 200px;
  background: var(--accent, var(--cyan));
  border-radius: 50%; filter: blur(60px);
  opacity: 0.07; top:-80px; right:-80px;
  transition: opacity 0.3s;
}
.stat-card:hover::before { opacity: 0.15; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--accent-dim, var(--cyan-dim));
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; margin-bottom: 1.1rem;
}
.stat-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text2); margin-bottom: 0.35rem;
}
.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem; font-weight: 800; letter-spacing: -0.05em;
  line-height: 1; color: var(--text);
}
.stat-sub { font-size: 0.77rem; color: var(--text3); margin-top: 0.35rem; }
.stat-bar { height: 3px; border-radius: 99px; background: var(--border); margin-top: 1.1rem; overflow: hidden; }
.stat-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent, var(--cyan)), rgba(255,255,255,0.5));
  transform-origin: left;
  animation: barGrow 1.4s var(--ease) both var(--delay, 0.3s);
}
@keyframes barGrow { from{transform:scaleX(0)} to{transform:scaleX(1)} }

/* ═══════════════════════════════════════════
   FORMS
═══════════════════════════════════════════ */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block; font-size: 0.73rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text2); margin-bottom: 0.45rem;
  transition: color 0.2s;
}
.form-group:focus-within .form-label { color: var(--cyan); }

.input-wrap { position: relative; }
.input-icon {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  opacity: 0.3; pointer-events: none;
  transition: opacity 0.2s;
}
.form-group:focus-within .input-icon { opacity: 0.65; }

.form-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 0.85rem 2.8rem 0.85rem 1rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.94rem;
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
[data-theme="light"] .form-input { background: rgba(0,0,0,0.04); }
.form-input::placeholder { color: var(--text3); }
.form-input:focus {
  border-color: rgba(0,245,212,0.5);
  background: rgba(0,245,212,0.04);
  box-shadow: 0 0 0 3px rgba(0,245,212,0.1);
}
.form-hint { font-size: 0.76rem; color: var(--text3); margin-top: 0.4rem; }

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border: none; border-radius: var(--r-sm);
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.02em;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.15s, box-shadow 0.25s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  color: #06060e;
  box-shadow: 0 4px 20px rgba(0,245,212,0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,245,212,0.35), 0 0 60px rgba(139,92,246,0.2);
}
.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
}
.btn-secondary:hover { background: var(--surface); border-color: var(--cyan); color: var(--cyan); }
.btn-danger {
  background: linear-gradient(135deg, var(--red), #c0392b);
  color: #fff;
  box-shadow: 0 4px 20px rgba(248,113,113,0.2);
}
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-full { width: 100%; }

/* Ripple */
.btn .ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* ═══════════════════════════════════════════
   ALERTS / MESSAGES
═══════════════════════════════════════════ */
.alert {
  border-radius: var(--r-sm); padding: 0.8rem 1rem;
  font-size: 0.87rem; line-height: 1.5;
  margin-bottom: 1.4rem; display: flex; align-items: flex-start; gap: 0.6rem;
}
.alert-error   { background: var(--red-dim);   border: 1px solid rgba(248,113,113,0.3); color: #fca5a5; animation: shake 0.4s ease; }
.alert-success { background: var(--green-dim); border: 1px solid rgba(16,185,129,0.3);  color: #6ee7b7; }
.alert-info    { background: var(--blue-dim);  border: 1px solid rgba(96,165,250,0.3);  color: #93c5fd; }
@keyframes shake {
  0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-5px)} 40%,80%{transform:translateX(5px)}
}

/* ═══════════════════════════════════════════
   PROGRESS BARS
═══════════════════════════════════════════ */
.progress-wrap { margin-bottom: 1rem; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.progress-label  { font-size: 0.82rem; font-weight: 500; }
.progress-pct    { font-family: 'Geist Mono', monospace; font-size: 0.78rem; color: var(--text2); }
.progress-track  { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.progress-fill   {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--from, var(--cyan)), var(--to, var(--violet)));
  animation: barGrow 1.6s var(--ease) both var(--delay, 0.2s);
}

/* ═══════════════════════════════════════════
   BADGES
═══════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.25rem 0.65rem;
  border-radius: 999px; border: 1px solid;
}
.badge-cyan   { color: var(--cyan);   border-color: rgba(0,245,212,0.3);  background: var(--cyan-dim); }
.badge-violet { color: var(--violet); border-color: rgba(139,92,246,0.3); background: var(--violet-dim); }
.badge-amber  { color: var(--amber);  border-color: rgba(251,191,36,0.3); background: var(--amber-dim); }
.badge-green  { color: var(--green);  border-color: rgba(16,185,129,0.3); background: var(--green-dim); }
.badge-pink   { color: var(--pink);   border-color: rgba(244,114,182,0.3);background: var(--pink-dim); }
.badge-red    { color: var(--red);    border-color: rgba(248,113,113,0.3);background: var(--red-dim); }

/* ═══════════════════════════════════════════
   GRIDS
═══════════════════════════════════════════ */
.grid-4 { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1.2rem; }
.grid-3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1.2rem; }
.grid-2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:1.2rem; }

/* ═══════════════════════════════════════════
   ANIMATIONS — entrance
═══════════════════════════════════════════ */
.fade-up { animation: fadeUp 0.7s var(--ease) both var(--delay, 0s); }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

.fade-in { animation: fadeIn 0.6s var(--ease) both var(--delay, 0s); }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Delay helpers */
.d1{--delay:0.05s} .d2{--delay:0.12s} .d3{--delay:0.19s}
.d4{--delay:0.26s} .d5{--delay:0.33s} .d6{--delay:0.40s}
.d7{--delay:0.47s} .d8{--delay:0.54s} .d9{--delay:0.61s}

/* ═══════════════════════════════════════════
   AUTH PAGES (login/register/etc)
═══════════════════════════════════════════ */
.auth-body {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
.auth-orb {
  position: fixed; border-radius: 50%; filter: blur(90px);
  opacity: 0.25; pointer-events: none; z-index: 0;
  animation: auroraFloat var(--t,16s) ease-in-out infinite alternate;
}
.auth-o1 { width:500px;height:500px;background:var(--violet);top:-150px;left:-120px;--t:18s; }
.auth-o2 { width:420px;height:420px;background:var(--cyan);  bottom:-120px;right:-80px;--t:14s;animation-delay:-5s; }
.auth-o3 { width:320px;height:320px;background:var(--pink);  top:50%;left:58%;--t:20s;animation-delay:-9s; }

.auth-card {
  position: relative; z-index: 10;
  width: 100%; max-width: 430px;
  background: rgba(17,17,31,0.85);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 3rem 2.6rem 2.6rem;
  box-shadow: 0 32px 64px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.07);
  animation: cardIn 0.8s var(--ease) both;
}
[data-theme="light"] .auth-card { background: rgba(255,255,255,0.9); }
@keyframes cardIn { from{opacity:0;transform:translateY(32px) scale(0.97)} to{opacity:1;transform:none} }
.auth-card::before {
  content:''; position:absolute; top:0; left:-100%; width:100%; height:2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  animation: shimmer 3.5s linear infinite;
}
@keyframes shimmer { to { left: 100%; } }

.auth-brand { text-align: center; margin-bottom: 2rem; }
.auth-brand-icon {
  width: 56px; height: 56px; margin: 0 auto 0.9rem;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  animation: brandPulse 3s ease-in-out infinite;
}
.auth-brand h1 {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.55rem;
  letter-spacing: -0.03em; color: var(--text);
}
.auth-brand p { font-size: 0.84rem; color: var(--text2); margin-top: 0.3rem; line-height: 1.4; }

.auth-footer { text-align:center; margin-top:1.4rem; font-size:0.84rem; color:var(--text2); }
.auth-footer a { color: var(--cyan); font-weight: 500; transition: opacity 0.2s; }
.auth-footer a:hover { opacity: 0.7; }

/* ═══════════════════════════════════════════
   PARTICLES
═══════════════════════════════════════════ */
.particles { position:fixed; inset:0; z-index:1; pointer-events:none; }
.particle {
  position:absolute; width:2px; height:2px; background:#fff;
  border-radius:50%; opacity:0;
  animation: twinkle var(--d,4s) ease-in-out infinite var(--delay,0s);
}
@keyframes twinkle { 0%,100%{opacity:0;transform:scale(0)} 50%{opacity:var(--op,0.5);transform:scale(1)} }

/* ═══════════════════════════════════════════
   PROFILE AVATAR
═══════════════════════════════════════════ */
.avatar-ring {
  border-radius: 50%; padding: 3px;
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--pink));
  animation: ringPulse 3s ease-in-out infinite;
  display: inline-block;
}
@keyframes ringPulse {
  0%,100% { box-shadow: 0 0 20px rgba(0,245,212,0.3); }
  50%      { box-shadow: 0 0 40px rgba(0,245,212,0.5), 0 0 80px rgba(139,92,246,0.2); }
}
.avatar-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800;
  color: #fff; font-size: 1.8rem;
  border: 3px solid var(--bg);
}

/* ═══════════════════════════════════════════
   ACHIEVEMENT BADGES
═══════════════════════════════════════════ */
.achievement {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; text-align: center;
}
.achievement-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--from, var(--amber)), var(--to, var(--pink)));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  animation: achieveGlow 4s ease-in-out infinite;
}
.achievement-icon:hover { transform: scale(1.1) rotate(-3deg); box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
@keyframes achieveGlow {
  0%,100%{box-shadow: 0 4px 16px rgba(0,0,0,0.3)}
  50%    {box-shadow: 0 4px 24px rgba(251,191,36,0.3), 0 0 40px rgba(244,114,182,0.15)}
}
.achievement-label { font-size: 0.72rem; font-weight: 600; color: var(--text2); }

/* ═══════════════════════════════════════════
   CHALLENGE CARDS
═══════════════════════════════════════════ */
.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.challenge-card:hover {
  transform: translateY(-4px);
  border-color: var(--border2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.challenge-diff {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.diff-easy   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.diff-medium { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,191,36,0.3); }
.diff-hard   { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(248,113,113,0.3); }

/* ═══════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,0.6);
  }
  .main-content { margin-left: 0; }
  .menu-btn { display: flex; }
  .page-body { padding: 1.2rem 1rem 3rem; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .topbar { padding: 0 1rem; }
  .sidebar-overlay {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
  }
  .sidebar-overlay.show { display: block; }
}
