/* =============================================================================
   CYPHERS HUB - Cinematic Aurora Theme
   ============================================================================= */

:root {
  /* Core Palette - Deep Space */
  --bg-app: #030712;
  --bg-sidebar: rgba(10, 10, 15, 0.6);
  --bg-card: rgba(20, 25, 40, 0.4);
  --bg-card-hover: rgba(30, 35, 55, 0.5);
  
  /* Glass Borders */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-highlight: rgba(255, 255, 255, 0.15);
  --glass-shine: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.05) 40%, transparent 50%);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Vivid Accents - Neon */
  --accent-primary: #3b82f6;    /* Blue */
  --accent-secondary: #8b5cf6;  /* Violet */
  --accent-success: #10b981;    /* Emerald */
  --accent-warning: #f59e0b;    /* Amber */
  --accent-danger: #ef4444;     /* Red */
  --accent-glow: 0 0 20px rgba(59, 130, 246, 0.5);
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =============================================================================
   AMBIENT BACKGROUND
   ============================================================================= */

.app-background {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background: var(--bg-app);
  overflow: hidden;
}

.app-background::before,
.app-background::after {
  content: '';
  position: absolute;
  width: 1000px;
  height: 1000px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out alternate;
}

.app-background::before {
  background: radial-gradient(circle, #3b82f6, transparent 60%);
  top: -20%;
  left: -10%;
  animation-delay: -5s;
}

.app-background::after {
  background: radial-gradient(circle, #8b5cf6, transparent 60%);
  bottom: -20%;
  right: -10%;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 50px) scale(1.1); }
  100% { transform: translate(-30px, 20px) scale(0.95); }
}

/* =============================================================================
   LAYOUT & ANIMATIONS
   ============================================================================= */

.app-container { display: flex; min-height: 100vh; }

/* Entry Animation */
.animate-enter {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   SIDEBAR (Floating Glass)
   ============================================================================= */

.sidebar {
  width: 280px;
  padding: 2rem 1.5rem;
  position: fixed;
  height: 100vh;
  z-index: 50;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-right: -0.5rem;
  padding-right: 0.5rem;
}

.sidebar nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar nav::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 2px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.logo {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.75rem;
  padding: 0.5rem;
}

.logo-brand {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.logo-bracket {
  color: #22d3ee;
}

.logo-name {
  color: #ffffff; /* White for "Cyphers" — brackets are teal */
  font-weight: 700;
}

.logo-hub {
  color: white;
  font-weight: 700;
  margin-left: 0.25rem;
}

.logo-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.nav-text-icon {
  margin-left: 1.8rem; /* Align with other nav items that have icons */
}

/* Keep legacy styles for compatibility */
.logo-icon {
  width: 44px; height: 44px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.4rem; color: white;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
  position: relative;
}

.logo-text {
  font-size: 1.25rem; font-weight: 700; color: white;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.nav-section-title {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin: 1.5rem 0 0.75rem 1rem;
}

.sidebar nav > .nav-section-title:first-child {
  margin-top: 0.5rem;
}

.nav-section-badge {
  font-size: 0.55rem;
  padding: 0.1rem 0.35rem;
  vertical-align: middle;
}

.nav-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  color: var(--text-secondary); text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500; font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.nav-brand {
  margin-right: -0.15em;
}

.nav-brand .bracket {
  color: #22d3ee;
}

.nav-sublink {
  padding-left: 2.5rem;
  font-size: 0.82rem;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  background: rgba(34, 211, 238, 0.1);
  color: white;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 15%; bottom: 15%;
  width: 3px; background: #22d3ee; border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px #22d3ee;
}

.nav-badge {
  margin-left: auto;
  background: rgba(249, 117, 131, 0.2);
  color: #F97583;
  border: 1px solid rgba(249, 117, 131, 0.3);
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
}

.nav-icon {
  width: 18px; height: 18px;
  opacity: 0.7; transition: all 0.2s;
  flex-shrink: 0;
}

.nav-link:hover .nav-icon {
  opacity: 1;
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.5));
}

.nav-link.active .nav-icon {
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.sidebar-footer-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

/* =============================================================================
   MAIN CONTENT
   ============================================================================= */

.main-content {
  flex: 1; margin-left: 280px; padding: 3rem 4rem;
  max-width: 1800px;
}

.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 3rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.page-title {
  font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.1));
}

.page-subtitle { color: var(--text-secondary); font-size: 1.05rem; }

/* =============================================================================
   CARDS (Premium Glass)
   ============================================================================= */

.card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-highlight);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.card::after { /* Shine effect */
  content: ''; position: absolute; inset: 0; border-radius: 20px;
  background: var(--glass-shine);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover::after { opacity: 1; }

.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.15rem; font-weight: 600; color: white;
  display: flex; align-items: center; gap: 0.75rem;
}

/* =============================================================================
   STATS GRID
   ============================================================================= */

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(30, 35, 60, 0.6);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.5rem; font-weight: 700;
  color: white; line-height: 1.1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(255,255,255,0.1);
}

.stat-description {
  font-size: 0.85rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 0.5rem;
}

/* =============================================================================
   BUTTONS (Neon)
   ============================================================================= */

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-color: var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* =============================================================================
   BADGES & STATUS
   ============================================================================= */

.badge {
  padding: 0.35rem 0.8rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); box-shadow: 0 0 15px rgba(139, 92, 246, 0.2); }
.badge-neutral { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

/* =============================================================================
   COMPONENT STYLES
   ============================================================================= */

.copy-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.button-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.info-grid {
  display: grid;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  gap: 1rem;
}

.info-label {
  color: var(--text-muted);
  min-width: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* =============================================================================
   FILTER BUTTONS
   ============================================================================= */

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

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

.filter-dot.healthy {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.filter-dot.degraded {
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}

.filter-dot.offline {
  background: #f87171;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.5);
}

.filter-dot.not-registered {
  background: #94a3b8;
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.5);
}

/* =============================================================================
   TABLES
   ============================================================================= */

.table-container { margin: 0 -2rem; }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left; padding: 1rem 2rem;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}

td {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: background 0.2s;
}

tr:hover td { background: rgba(255, 255, 255, 0.03); color: white; }
tr:last-child td { border-bottom: none; }

/* =============================================================================
   PROGRESS BARS
   ============================================================================= */

.progress-bar {
  height: 6px; background: rgba(255, 255, 255, 0.05);
  border-radius: 10px; overflow: hidden;
}

.progress-fill {
  height: 100%; border-radius: 10px;
  position: relative; overflow: hidden;
}

.progress-fill::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.progress-fill.green { background: var(--grad-success); box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
.progress-fill.blue { background: var(--grad-primary); box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); }

/* =============================================================================
   EVENTS LIST
   ============================================================================= */

.event-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--glass-border);
}

.event-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.05);
}

.event-title { color: white; font-weight: 600; margin-bottom: 0.2rem; }
.event-description { font-size: 0.9rem; color: var(--text-secondary); }
.event-tag { 
  background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
  padding: 0.1rem 0.4rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.75rem;
}

/* =============================================================================
   UTILITY
   ============================================================================= */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.text-mono { font-family: var(--font-mono); }

/* =============================================================================
   STATUS BAR
   ============================================================================= */

.status-bar {
  position: fixed; bottom: 0; left: 280px; right: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
  padding: 0.5rem 2rem;
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-secondary);
  z-index: 100;
}

.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block; margin-right: 0.5rem;
  box-shadow: 0 0 8px currentColor;
}
.status-dot.healthy { background: #34d399; color: #34d399; }

/* =============================================================================
   HEADER STATUS BADGES
   ============================================================================= */

.header-badges {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.active .dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.status-badge.disabled {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.disabled .dot {
  background: #fbbf24;
}

/* =============================================================================
   QUICK ACTIONS
   ============================================================================= */

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--text-secondary);
}

.quick-action-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  transform: translateY(-2px);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.quick-action-btn:hover .quick-action-icon {
  background: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.quick-action-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

/* =============================================================================
   SYSTEM STATUS
   ============================================================================= */

.system-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.system-status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.system-status-item:last-child {
  border-bottom: none;
}

.system-status-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.status-indicator {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-indicator.initialized {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.status-indicator.disabled {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.status-indicator.enforced {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

/* =============================================================================
   FLEET STATUS
   ============================================================================= */

.fleet-status-legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.legend-dot.healthy { background: #34d399; box-shadow: 0 0 8px #34d399; }
.legend-dot.degraded { background: #fbbf24; }
.legend-dot.unhealthy { background: #f87171; }
.legend-dot.offline { background: #64748b; }

/* Grid layouts */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* Responsive */
@media (max-width: 1400px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* =============================================================================
   MODALS
   ============================================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-container {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

/* =============================================================================
   FORMS
   ============================================================================= */

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  color: #60a5fa;
  font-size: 0.9rem;
  line-height: 1.5;
}

.info-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 18px;
  padding-right: 2.5rem;
}

.form-select option {
  background: #1e293b;
  color: white;
  padding: 0.5rem;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #22d3ee;
  cursor: pointer;
}

/* =============================================================================
   WIZARD STYLES
   ============================================================================= */

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.wizard-step.active,
.wizard-step.completed {
  opacity: 1;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.wizard-step.active .step-number {
  background: #22d3ee;
  color: #030712;
}

.wizard-step.completed .step-number {
  background: #10b981;
  color: white;
}

.wizard-step.completed .step-number::after {
  content: '✓';
}

.step-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.wizard-connector {
  width: 80px;
  height: 2px;
  background: var(--glass-border);
  margin: 0 1rem;
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

/* Endpoint Type Selection */
.endpoint-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.endpoint-type-card {
  position: relative;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.endpoint-type-card:hover {
  border-color: var(--glass-border-highlight);
  background: var(--bg-card-hover);
}

.endpoint-type-card.selected {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
}

.endpoint-type-card.recommended .recommended-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #22d3ee;
  color: #030712;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.type-icon {
  color: #22d3ee;
  margin-bottom: 0.75rem;
}

.type-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.type-description {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Radio Group */
.radio-group {
  display: flex;
  gap: 1.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.radio-label input[type="radio"] {
  accent-color: #22d3ee;
}

/* Gold Standard Badge */
.gold-standard-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 12px;
}

.gold-standard-badge .badge-icon {
  font-size: 1.5rem;
}

.gold-standard-badge .badge-title {
  font-weight: 600;
  color: #22d3ee;
}

.gold-standard-badge .badge-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.gold-standard-badge .badge-status {
  margin-left: auto;
  background: #22d3ee;
  color: #030712;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

/* Access Control Options */
.access-control-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.access-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.access-option:hover {
  border-color: var(--glass-border-highlight);
}

.access-option.selected,
.access-option:has(input:checked) {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.05);
}

.access-option input[type="radio"] {
  accent-color: #22d3ee;
  margin-top: 0.25rem;
}

.option-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.option-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Info Box */
.info-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.info-icon {
  flex-shrink: 0;
}

/* Success Banner */
.success-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  margin-bottom: 2rem;
}

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

.success-title {
  font-weight: 600;
  color: #10b981;
}

.success-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Deploy Section */
.deploy-section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.section-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.code-block {
  position: relative;
  background: #0f172a;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  white-space: pre-wrap;
  margin: 0;
}

.code-block .code-highlight {
  color: #22d3ee;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--glass-border);
  border: none;
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--glass-border-highlight);
  color: white;
}

/* =============================================================================
   ENDPOINTS LIST STYLES
   ============================================================================= */

.endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.endpoint-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  transition: all 0.3s;
}

.endpoint-card:hover {
  border-color: var(--glass-border-highlight);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.endpoint-card-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.endpoint-status {
  flex-shrink: 0;
}

.endpoint-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.endpoint-icon.tlsmcp_proxy,
.endpoint-icon.tlsmcp_sdk {
  background: linear-gradient(135deg, #22d3ee, #0891b2);
}

.endpoint-icon.n8n_https_node {
  background: linear-gradient(135deg, #ff6b6b, #c92a2a);
}

.endpoint-icon.claude_mcp_server {
  background: linear-gradient(135deg, #d97706, #92400e);
}

.endpoint-info {
  flex: 1;
  min-width: 0;
}

.endpoint-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.125rem;
}

.endpoint-hostname {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.endpoint-badges {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.endpoint-type-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.endpoint-type-badge.tlsmcp_proxy,
.endpoint-type-badge.tlsmcp_sdk {
  background: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
}

.endpoint-type-badge.n8n_https_node {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.endpoint-type-badge.claude_mcp_server {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
}

.environment-badge {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: capitalize;
}

.environment-badge.production {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.environment-badge.staging {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.environment-badge.development {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.endpoint-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.endpoint-lastseen {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  min-width: 120px;
  flex-shrink: 0;
}

.offline-text {
  color: var(--accent-danger);
}

/* Limit Indicator */
.limit-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.limit-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.upgrade-link {
  color: #22d3ee;
  text-decoration: none;
  font-weight: 500;
  margin-left: auto;
}

.upgrade-link:hover {
  text-decoration: underline;
}

/* =============================================================================
   ENDPOINT DETAIL STYLES
   ============================================================================= */

.breadcrumb {
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.breadcrumb a:hover {
  color: #22d3ee;
}

.endpoint-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.endpoint-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.status-divider {
  width: 1px;
  height: 20px;
  background: var(--glass-border);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.status-label {
  color: var(--text-muted);
}

.status-value {
  color: var(--text-secondary);
}

.status-text {
  font-weight: 500;
}

/* Cert Info Grid */
.cert-info-grid {
  display: grid;
  gap: 0.75rem;
}

.cert-info-item {
  display: flex;
  gap: 1rem;
}

.cert-label {
  color: var(--text-muted);
  min-width: 100px;
}

.cert-value {
  color: var(--text-secondary);
}

.cert-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

/* Config Grid */
.config-grid {
  display: grid;
  gap: 0.75rem;
}

.config-item {
  display: flex;
  gap: 1rem;
}

.config-label {
  color: var(--text-muted);
  min-width: 120px;
}

.config-value {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.config-value code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Telemetry Bars */
.telemetry-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.telemetry-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.telemetry-label {
  width: 80px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.telemetry-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.telemetry-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.telemetry-value {
  width: 80px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 500;
}

.telemetry-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

/* Entity Type Grid (Modal) */
.entity-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.entity-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.entity-type-option:hover {
  border-color: var(--glass-border-highlight);
}

.entity-type-option.selected {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
}

.entity-type-option input {
  display: none;
}

.entity-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.entity-label {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Entity Badge */
.entity-badge {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: capitalize;
}

.entity-badge.user {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.entity-badge.agent {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.entity-badge.service {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.entity-badge.application {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Button Variants */
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: #22d3ee;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.text-danger {
  color: #f87171 !important;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.empty-state p {
  margin-bottom: 1rem;
}
