:root {
  --bg: #020617;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.12);
  --green: #10b981;
  --cyan: #06b6d4;
  --orange: #f97316;
  --red: #ef4444;
  --glass: rgba(255, 255, 255, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'IBM Plex Mono', 'Space Grotesk', system-ui, sans-serif;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent 45%),
    var(--bg);
  color: #f8fafc;
}

main {
  min-height: 100vh;
}

.dashboard {
  padding: 2rem clamp(1rem, 3vw, 2.75rem);
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  grid-template-areas:
    'header'
    'services'
    'resources'
    'terminal'
    'alerts';
}

@media (min-width: 768px) {
  .dashboard {
    grid-template-areas:
      'header header'
      'services resources'
      'terminal terminal'
      'alerts alerts';
  }
}

@media (min-width: 1200px) {
  .dashboard {
    grid-template-areas:
      'header header header'
      'services resources terminal'
      'alerts alerts alerts';
  }
}

.panel {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(12px);
}

.header {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.85rem;
}

.services {
  grid-area: services;
  display: grid;
  gap: 0.7rem;
}

.service-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.service-row span:last-child {
  font-weight: 600;
}

.resources {
  grid-area: resources;
  display: grid;
  gap: 0.9rem;
}

.resource {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.resource-bar {
  background: linear-gradient(90deg, var(--green) 0%, var(--green) 60%, var(--orange) 80%, var(--red) 100%);
  height: 6px;
  border-radius: 99px;
  width: 100%;
  margin-top: 0.35rem;
}

.terminal {
  grid-area: terminal;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.terminal-output {
  flex: 1;
  background: rgba(3, 7, 18, 0.9);
  border-radius: 12px;
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.terminal-form {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.terminal-form input {
  flex: 1;
  padding: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: #f8fafc;
}

.terminal-form button {
  border-radius: 999px;
  border: none;
  padding: 0.85rem 1.4rem;
  background: var(--cyan);
  color: #020617;
  font-weight: 600;
  cursor: pointer;
}

.alerts {
  grid-area: alerts;
  display: grid;
  gap: 0.8rem;
}

.alert-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.quick-actions button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.95rem;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
  font-size: 0.8rem;
}

.command-radar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  border: none;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
  cursor: pointer;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}
