/**
 * Swarm Dashboard Pro Theme
 * Use with Phosphor Icons: https://unpkg.com/@phosphor-icons/web
 */

:root {
  /* Backgrounds */
  --bg-primary: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a24;
  --bg-input: #0d0d14;
  --bg-hover: #1f1f2a;
  
  /* Borders */
  --border: #2a2a3a;
  --border-hover: #3a3a4a;
  --border-focus: #6366f1;
  
  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #c0c0cc;
  --text-muted: #8888a0;
  --text-dim: #555566;
  
  /* Accent */
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-muted: rgba(99, 102, 241, 0.15);
  
  /* Status */
  --success: #22c55e;
  --success-muted: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-muted: rgba(239, 68, 68, 0.15);
  
  /* Agent Colors */
  --agent-damon: #60a5fa;  --agent-damon-bg: #1e3a5f;
  --agent-percy: #c084fc;  --agent-percy-bg: #3b1f47;
  --agent-g: #4ade80;      --agent-g-bg: #1f3d1f;
  --agent-nix: #fbbf24;    --agent-nix-bg: #3d2f1f;
  --agent-max: #38bdf8;    --agent-max-bg: #1f2d3d;
  --agent-cru: #f472b6;    --agent-cru-bg: #3d1f2f;
  
  /* Spacing */
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px;
  
  /* Radius */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Base Styles */
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
}

/* Status Indicators */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.offline { background: var(--danger); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 8px var(--warning); }

/* Agent Badges */
.agent-badge { padding: 4px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.agent-badge.damon { background: var(--agent-damon-bg); color: var(--agent-damon); }
.agent-badge.percy { background: var(--agent-percy-bg); color: var(--agent-percy); }
.agent-badge.g { background: var(--agent-g-bg); color: var(--agent-g); }
.agent-badge.nix { background: var(--agent-nix-bg); color: var(--agent-nix); }
.agent-badge.max { background: var(--agent-max-bg); color: var(--agent-max); }
.agent-badge.cru { background: var(--agent-cru-bg); color: var(--agent-cru); }

/* Card Component */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-lg); }
.card:hover { border-color: var(--border-hover); }

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

/* Buttons */
.btn { padding: 10px 18px; border: none; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); }

/* Inputs */
.input { width: 100%; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px; }
.input:focus { outline: none; border-color: var(--border-focus); }
.input::placeholder { color: var(--text-muted); }

/* Metric Display */
.metric-value { font-size: 28px; font-weight: 700; }
.metric-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Sparkline */
.sparkline { height: 32px; display: flex; align-items: flex-end; gap: 2px; }
.sparkline-bar { flex: 1; background: var(--accent); border-radius: 2px; min-height: 2px; transition: height 0.3s ease; }

/* Navigation */
.nav { display: flex; gap: var(--space-md); padding: var(--space-md); border-bottom: 1px solid var(--border); }
.nav a { color: var(--text-muted); text-decoration: none; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); transition: all 0.2s ease; }
.nav a:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav a.active { color: var(--accent); }

/* Animations */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

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