/* NEXUS HUB — Premium Cyber-SaaS Dark Theme */

:root {
  --nexus-bg: #0B0F19;
  --nexus-surface: #1E293B;
  --nexus-border: #334155;
  --nexus-accent: #3B82F6;
  --nexus-cyan: #06B6D4;
  --nexus-emerald: #10B981;
  --nexus-muted: #94A3B8;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--nexus-bg);
  color: #F8FAFC;
}

.font-mono,
code,
pre {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* Animated Grid Background */
body.grid-bg {
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Hero Gradient */
.hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59, 130, 246, 0.15), transparent);
}

/* Glassmorphism Cards */
.card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Primary Button with Glow */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  animation: pulse-glow 2s infinite;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); 
  }
  50% { 
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6); 
  }
}

/* Large Primary Button */
.btn-primary-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary-large:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.7);
}

/* Small Primary Button */
.btn-primary-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary-small:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Secondary Button (Ghost) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--nexus-cyan);
  font-weight: 600;
  border: 1px solid var(--nexus-cyan);
  border-radius: 0.5rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Large Secondary Button */
.btn-secondary-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--nexus-cyan);
  font-weight: 600;
  font-size: 1.125rem;
  border: 2px solid var(--nexus-cyan);
  border-radius: 0.75rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary-large:hover {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

/* Input Field */
.input-field {
  background: var(--nexus-bg);
  border: 1px solid var(--nexus-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #E5E7EB;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.input-field:focus {
  border-color: var(--nexus-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

/* Navigation Link */
.nav-link {
  color: var(--nexus-muted);
  transition: color 0.15s ease;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--nexus-emerald);
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
}

/* AI Vision — Draft Review Status Badge (fallback, independent of Tailwind
   `nexus-*` utilities generating correctly — see vision_review.html) */
.draft-status-badge {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94A3B8;
}

.draft-status-badge.pending {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FCD34D;
}

.draft-status-badge.verified {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6EE7B7;
}

.draft-status-badge.rejected {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

/* AI Vision — Verification Panel form controls (defense-in-depth: keeps
   fields readable even if Tailwind CDN utility generation fails, or if the
   CDN's injected <style> tag ends up after this stylesheet in the DOM) */
#visionReviewRoot input[type="text"],
#visionReviewRoot select {
  color: #F8FAFC !important;
  background-color: rgba(11, 15, 25, 0.75) !important;
  color-scheme: dark;
}

#visionReviewRoot input[type="text"]::placeholder {
  color: #94A3B8 !important;
  opacity: 0.8;
}

#visionReviewRoot input[type="text"]:-webkit-autofill,
#visionReviewRoot input[type="text"]:-webkit-autofill:hover,
#visionReviewRoot input[type="text"]:-webkit-autofill:focus {
  -webkit-text-fill-color: #F8FAFC !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(11, 15, 25, 0.75) inset !important;
}

/* Verify Banners */
.verify-banner {
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid;
}

.verify-banner-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.verify-banner-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.verify-authentic {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.verify-authentic .verify-banner-title {
  color: var(--nexus-emerald);
}

.verify-not-found,
.verify-signature_mismatch {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.verify-not-found .verify-banner-title,
.verify-signature_mismatch .verify-banner-title {
  color: #EF4444;
}

.verify-revoked,
.verify-superseded {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.verify-revoked .verify-banner-title,
.verify-superseded .verify-banner-title {
  color: #F59E0B;
}

/* Animated Badge */
.badge-animated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nexus-cyan);
}

.badge-animated .pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--nexus-emerald);
  border-radius: 9999px;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Icon Container */
.icon-container {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  transition: transform 0.2s ease;
}

.card:hover .icon-container {
  transform: scale(1.1);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #ffffff, var(--nexus-cyan), var(--nexus-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Code Block */
.code-block {
  background: var(--nexus-bg);
  border: 1px solid var(--nexus-border);
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  overflow-x: auto;
}

/* Alert/Message */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid;
  margin-bottom: 1rem;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93C5FD;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6EE7B7;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #FCD34D;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .btn-primary-large {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
  
  .hero-gradient h1 {
    font-size: 2rem !important;
  }
}
