/* ============================================================
   NOVA SOUL ARCHITECT - Cosmic Design System
   ============================================================ */

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

/* Cosmic Background */
body {
  background: radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(6,182,212,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(245,158,11,0.04) 0%, transparent 50%),
              #0F0A1E;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1A1035; }
::-webkit-scrollbar-thumb { background: #8B5CF6; border-radius: 3px; }

/* Cosmic Card */
.cosmic-card {
  background: linear-gradient(145deg, rgba(35,27,58,0.9), rgba(26,16,53,0.95));
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.cosmic-card:hover {
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 0 20px rgba(139,92,246,0.1), 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

/* Nova Glow */
.nova-glow {
  box-shadow: 0 0 15px rgba(139,92,246,0.4), 0 0 30px rgba(139,92,246,0.1);
}
.nova-glow-sm { box-shadow: 0 0 8px rgba(139,92,246,0.3); }

/* Gradient Text */
.nova-gradient {
  background: linear-gradient(135deg, #8B5CF6, #06B6D4, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn-nova {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: white;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}
.btn-nova:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(139,92,246,0.4);
}
.btn-nova:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  background: rgba(139,92,246,0.15);
  color: #A78BFA;
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid rgba(139,92,246,0.3);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}
.btn-secondary:hover {
  background: rgba(139,92,246,0.25);
  border-color: rgba(139,92,246,0.5);
}
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #EF4444;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.3);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* Inputs */
.input-nova {
  width: 100%;
  background: rgba(15,10,30,0.6);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 10px;
  padding: 10px 16px;
  color: white;
  font-size: 14px;
  transition: all 0.3s;
  outline: none;
}
.input-nova:focus {
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.input-nova::placeholder { color: rgba(255,255,255,0.3); }

textarea.input-nova { resize: vertical; min-height: 80px; }

select.input-nova {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-purple { background: rgba(139,92,246,0.2); color: #A78BFA; }
.badge-teal { background: rgba(6,182,212,0.2); color: #22D3EE; }
.badge-amber { background: rgba(245,158,11,0.2); color: #FBBF24; }
.badge-green { background: rgba(16,185,129,0.2); color: #34D399; }
.badge-red { background: rgba(239,68,68,0.2); color: #F87171; }
.badge-blue { background: rgba(59,130,246,0.2); color: #60A5FA; }

/* Progress Bar */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(139,92,246,0.15);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #8B5CF6, #06B6D4);
  transition: width 0.5s ease;
}

/* Sidebar */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(139,92,246,0.15);
  color: white;
}
.sidebar-link.active {
  border-left: 3px solid #8B5CF6;
}
.sidebar-link i { width: 20px; text-align: center; font-size: 15px; }

/* Star particles */
.stars {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
}
.star {
  position: absolute;
  width: 2px; height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}

/* Tables */
.nova-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.nova-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(139,92,246,0.15);
}
.nova-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(139,92,246,0.08);
  font-size: 14px;
}
.nova-table tr:hover td { background: rgba(139,92,246,0.05); }

/* Loading */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(139,92,246,0.2);
  border-top-color: #8B5CF6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Stat Card */
.stat-card {
  background: linear-gradient(145deg, rgba(35,27,58,0.9), rgba(26,16,53,0.95));
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 0 0 80px;
  opacity: 0.1;
}
.stat-card.purple::after { background: #8B5CF6; }
.stat-card.teal::after { background: #06B6D4; }
.stat-card.amber::after { background: #F59E0B; }
.stat-card.green::after { background: #10B981; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  z-index: 9999;
  animation: slideUp 0.3s ease;
  max-width: 400px;
}
.toast-success { background: #059669; color: white; }
.toast-error { background: #DC2626; color: white; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Tab */
.tab { padding: 8px 20px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; border: none; color: rgba(255,255,255,0.5); background: transparent; }
.tab:hover { color: rgba(255,255,255,0.8); }
.tab.active { background: rgba(139,92,246,0.2); color: #A78BFA; }

/* Pipeline Steps */
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s;
}
.step-circle.completed { background: #059669; color: white; }
.step-circle.active { background: #8B5CF6; color: white; box-shadow: 0 0 15px rgba(139,92,246,0.5); }
.step-circle.pending { background: rgba(139,92,246,0.15); color: rgba(255,255,255,0.4); }

/* Constellation Grid */
.agent-card {
  position: relative;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(35,27,58,0.9), rgba(26,16,53,0.95));
  border: 1px solid rgba(139,92,246,0.15);
  cursor: pointer;
  transition: all 0.3s;
  overflow: hidden;
}
.agent-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(139,92,246,0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.agent-card:hover::before { opacity: 1; }
.agent-card:hover {
  border-color: rgba(139,92,246,0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(139,92,246,0.15);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-content {
  background: #1A1035;
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: scaleIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .mobile-menu { display: flex !important; }
}
.mobile-menu { display: none !important; }
