:root {
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 96px;
  
  --primary: #FF2D6F;
  --primary-dark: #E01558;
  --primary-light: #FF5C8D;
  --accent: #8B5CF6;
  --accent-dark: #7C3AED;
  --accent-light: #A78BFA;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(255, 45, 111, 0.3);
  --shadow-glow-accent: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* Dark theme (default) */
:root, :root.dark {
  --bg: #0A0A0F;
  --bg-elevated: #12121A;
  --surface: #141419;
  --surface-hover: #1A1A24;
  --border: #1F1F27;
  --border-bright: #2D2D3D;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0AB;
  --text-muted: #6B6B75;
}

/* Light theme */
:root.light {
  --bg: #FFFFFF;
  --bg-elevated: #F8F9FA;
  --surface: #FFFFFF;
  --surface-hover: #F3F4F6;
  --border: #E5E7EB;
  --border-bright: #D1D5DB;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 45, 111, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5%, 5%); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(255, 45, 111, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(255, 45, 111, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(255, 45, 111, 0.2);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 45, 111, 0.2), rgba(139, 92, 246, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-bright);
}

.card:hover::before {
  opacity: 1;
}

.input {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 45, 111, 0.1);
  background: var(--bg-elevated);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.input::placeholder {
  color: var(--text-muted);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.01em;
}

.logo:hover {
  transform: translateY(-2px);
}

.logo:hover .logo-icon {
  transform: rotate(-5deg) scale(1.1);
  box-shadow: 0 8px 24px rgba(255, 45, 111, 0.5);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 16px rgba(255, 45, 111, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.logo-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

.logo:hover .logo-icon::before {
  opacity: 0.5;
  animation: rotate 3s linear infinite;
}

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

.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--space-md);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.sidebar-item:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: var(--primary);
  color: white;
}

.main-content {
  margin-left: 240px;
  padding: var(--space-lg);
  min-height: 100vh;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .main-content {
    margin-left: 0;
    padding: var(--space-md);
  }
}

::selection {
  background: rgba(251, 37, 118, 0.4);
  color: white;
}

.glass {
  background: rgba(10, 0, 20, 0.7);
  border: 1px solid rgba(251, 37, 118, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(10, 0, 20, 0.8);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(251, 37, 118, 0.15);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(251, 37, 118, 0.05);
}

.glow-text {
  text-shadow: 0 0 20px rgba(251, 37, 118, 0.5);
}

.animate-glow {
  animation: glow 3s ease-in-out infinite alternate;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Stats Section */
.hero-stats {
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.stats-glow {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-number {
  font-size: 72px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-shadow: 0 0 80px rgba(255, 45, 111, 0.3);
  animation: float 4s ease-in-out infinite;
}

.stat-label {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stats-bar-container {
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

.stats-bar-bg {
  height: 12px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.stats-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 12px;
  position: relative;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(255, 45, 111, 0.5);
}

.stats-bar-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  to {
    left: 200%;
  }
}

.stats-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stats-tier {
  color: var(--accent);
  text-transform: capitalize;
  font-weight: 600;
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
  animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
}

@media (max-width: 1024px) {
  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .action-card-primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 45, 111, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.4s;
}

.action-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(255, 45, 111, 0.3);
}

.action-card:hover::before {
  opacity: 1;
}

.action-card-primary {
  background: linear-gradient(135deg, rgba(255, 45, 111, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(255, 45, 111, 0.3);
}

.action-card-primary:hover {
  background: linear-gradient(135deg, rgba(255, 45, 111, 0.15), rgba(139, 92, 246, 0.15));
  box-shadow: 0 20px 60px rgba(255, 45, 111, 0.4);
}

.action-card-stat {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.action-card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 8px 24px rgba(255, 45, 111, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-card:hover .action-card-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 32px rgba(255, 45, 111, 0.6);
}

.action-icon-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.action-icon-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 24px rgba(255, 45, 111, 0.3);
}

.action-card-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(255, 45, 111, 0.4), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.action-card:hover .action-card-glow {
  opacity: 1;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.1); opacity: 0.6; }
}

.action-card-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.action-card-content h3 {
  margin: 0 0 6px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.action-card-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.action-stat-value {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.action-card-arrow {
  color: var(--primary);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.action-card:hover .action-card-arrow {
  transform: translateX(6px);
}

/* Activity Card */
.activity-card {
  animation: fadeIn 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.6s backwards;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.card-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.badge {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.empty-state {
  text-align: center;
  padding: 64px 32px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, rgba(255, 45, 111, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.empty-state h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-state p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* Login Page Responsive Layout */
.login-container {
  background: var(--bg);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 400px;
}

.login-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 80px 80px 120px;
}

.login-hero-side {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-hero-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.1), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.1), transparent 50%);
  animation: gradientShift 15s ease infinite;
}

.login-hero-side > div {
  position: relative;
  z-index: 1;
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}

.login-form-side {
  position: relative;
  z-index: 1;
  animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1024px) {
  .login-form-side {
    padding: 60px 40px;
  }
}

@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
  }
  
  .login-form-side {
    padding: 40px 24px;
    min-height: 100vh;
  }
  
  .login-hero-side {
    display: none;
  }
}

/* Home Page Grid */
.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive Grid Utilities */
.grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.grid-2col-even {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .grid-2col,
  .grid-2col-even {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

