:root {
  /* Colors - Dark Theme */
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --primary-green: #10b981;
  --primary-green-hover: #059669;
  --accent-yellow: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --danger: #ef4444;
  
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 70px;
  
  /* Effects */
  --glass-blur: blur(12px);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 15px rgba(16, 185, 129, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  /* Subtle animated gradient background */
  background: radial-gradient(circle at top left, #1e293b 0%, #0f172a 100%);
  min-height: 100vh;
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--accent-yellow);
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  gap: 0.5rem;
}
.btn-primary {
  background: var(--primary-green);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}
.btn-primary:hover {
  background: var(--primary-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}
.btn-accent {
  background: var(--accent-yellow);
  color: #000;
}
.btn-accent:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: var(--shadow-glow);
}

/* Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.sidebar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-weight: 500;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-green);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  transition: var(--transition);
}

/* Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.user-widget {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.user-balance {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-green);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: bold;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card-info h3 {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.stat-card-info .value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0.25rem;
}
.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.05);
}

/* Auth Layout */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-header h1 {
  color: var(--primary-green);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: white;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  animation: slideIn 0.3s ease forwards;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.toast.success { border-left: 4px solid var(--primary-green); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  .menu-toggle {
    display: block !important;
  }
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}
