:root {
  --background: #0f0f11;
  --foreground: #f8f9fa;
  --primary: #6366f1;
  --primary-muted: rgba(99, 102, 241, 0.15);
  --green: #10b981;
  --green-muted: rgba(16, 185, 129, 0.15);
  --yellow: #f59e0b;
  --yellow-muted: rgba(245, 158, 11, 0.15);
  --red: #ef4444;
  --red-muted: rgba(239, 68, 68, 0.15);
  --blue: #3b82f6;
  --blue-muted: rgba(59, 130, 246, 0.15);
  
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --sidebar-bg: rgba(15, 15, 17, 0.7);
  
  --radius: 12px;
  --font-main: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.05), transparent 25%);
}

/* Typography & Utilities */
.text-primary { color: var(--primary); }
.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-muted { color: #9ca3af; }
.bg-primary-muted { background-color: var(--primary-muted); }
.bg-green-muted { background-color: var(--green-muted); }
.bg-yellow-muted { background-color: var(--yellow-muted); }
.bg-red-muted { background-color: var(--red-muted); }
.bg-blue-muted { background-color: var(--blue-muted); }
.bg-green { background-color: var(--green); }
.bg-yellow { background-color: var(--yellow); }
.bg-blue { background-color: var(--blue); }
.font-mono { font-family: monospace; }
.italic { font-style: italic; }
.text-xs { font-size: 0.75rem; }
.mt-6 { margin-top: 1.5rem; }

/* Glassmorphism Classes */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--card-border);
  border-radius: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: var(--primary-muted);
  color: var(--primary);
  box-shadow: inset 2px 0 0 var(--primary);
}

.nav-item ion-icon {
  font-size: 1.25rem;
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--card-border);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pulsing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  z-index: 5;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.content-area {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

/* Tabs */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.stat-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -1px;
}

/* Activity List */
.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.activity-list {
  padding: 12px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.activity-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-text {
  font-size: 0.9375rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.125rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon.text-red:hover {
  color: var(--red);
  background: var(--red-muted);
}

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

.data-table th, .data-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.data-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.01);
}

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

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.profile-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.875rem;
}

.bg-gradient-1 { background: linear-gradient(135deg, #6366f1, #a855f7); }
.bg-gradient-2 { background: linear-gradient(135deg, #10b981, #3b82f6); }

.profile-info {
  display: flex;
  flex-direction: column;
}

.name {
  font-weight: 500;
  font-size: 0.875rem;
}

.username {
  font-size: 0.75rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-yellow { background: var(--yellow-muted); color: var(--yellow); }
.badge-green { background: var(--green-muted); color: var(--green); }
.badge-blue { background: var(--blue-muted); color: var(--blue); }

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-bottom: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
}
