:root {
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.5);
  --primary-hover: #4f46e5;
  --accent: #10b981;
  --bg-main: #0b1120;
  --bg-card: rgba(30, 41, 59, 0.4);
  --bg-glass: rgba(15, 23, 42, 0.8);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.05);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --sidebar-width: 280px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 10px;
}

/* Dashboard Premium Styles */
.glass-card {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  /* Ensures no extra spacing outside the grid gap */
}

.glass-panel {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-gradient {
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
}

.nav-link {
  transition: all 0.2s ease;
  color: #94a3b8;
}

.active-tab,
.nav-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 100%) !important;
  border-left: 3px solid #6366f1;
  color: #6366f1 !important;
}

.glow-indigo,
.sidebar-glow {
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.glow-emerald,
.status-badge-active {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.cyber-grid {
  background-image: radial-gradient(circle at 2px 2px, rgba(99, 102, 241, 0.05) 1px, transparent 0);
  background-size: 40px 40px;
}

.neon-border {
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.font-display {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.font-mono {
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace !important;
}

/* Material Symbols Adjustments */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Global Utilities */
.hidden {
  display: none !important;
}

/* Existing utility and component styles below */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top right, #1e1b4b 0%, #0b1120 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: #fff;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-lg {
  max-width: 800px;
}

/* Monitor Live Classes */
.monitor-section {
  margin-bottom: 3rem;
}

.monitor-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#monitor-servers-grid,
#monitor-peers-grid {
  display: grid;
  grid-template-cols: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {

  #monitor-servers-grid,
  #monitor-peers-grid {
    grid-template-cols: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {

  #monitor-servers-grid,
  #monitor-peers-grid {
    grid-template-cols: repeat(3, 1fr);
  }
}

.monitor-server-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.monitor-server-card:hover {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(71, 85, 105, 0.5);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.monitor-peer-card {
  background: #162032;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.25rem;
  position: relative;
  transition: all 0.3s;
}

.monitor-peer-card:hover {
  background: #1c273c;
  border-color: rgba(255, 255, 255, 0.1);
}

.health-bar-container {
  height: 0.375rem;
  width: 100%;
  background: #1e293b;
  border-radius: 9999px;
  overflow: hidden;
  mt: 0.25rem;
}

.health-bar-fill {
  height: 100%;
  transition: all 0.5s;
  border-radius: 9999px;
}

.monitor-label-group {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.monitor-progress-group {
  margin-bottom: 1rem;
}

.monitor-stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.live-indicator {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.dot-pulse {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}