:root {
  /* Colors */
  --bg-body: #09090b;
  --bg-card: #18181b;
  --bg-elevated: #27272a;
  --border-color: #3f3f46;
  
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.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-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.w-full { width: 100%; }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-info { background: rgba(6, 182, 212, 0.2); color: var(--info); }

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) 0;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: var(--bg-elevated);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Charts (CSS only representation) */
.chart-bar-container {
  display: flex;
  align-items: flex-end;
  height: 200px;
  gap: 12px;
  padding-top: 20px;
}

.chart-bar {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  position: relative;
  transition: height 0.3s;
}

.chart-bar-fill {
  background: var(--primary);
  width: 100%;
  border-radius: var(--radius-sm);
  position: absolute;
  bottom: 0;
}

.chart-pie {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(
    var(--success) 0% 60%, 
    var(--danger) 60% 85%, 
    var(--info) 85% 100%
  );
  margin: 0 auto;
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: var(--space-md);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

.table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.table tr:last-child td { border-bottom: none; }
