@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --border-color: #2a2a3a;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --accent-green: #22c55e;
  --accent-yellow: #eab308;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
}

.mono { font-family: 'JetBrains Mono', monospace; }

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.stat-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

/* Status colors */
.status-alive, .status-start { color: var(--accent-green); }
.status-scanning { color: var(--accent-blue); }
.status-restarting { color: var(--accent-yellow); }
.status-invalid, .status-error, .status-qr_timeout { color: var(--accent-red); }
.status-zombie { color: #f97316; }
.status-waiting { color: var(--text-secondary); }

/* Health badges */
.health-healthy { background: #22c55e20; color: #22c55e; }
.health-suspect { background: #eab30820; color: #eab308; }
.health-zombie { background: #ef444420; color: #ef4444; }
.health-recovering { background: #3b82f620; color: #3b82f6; }
.health-unknown { background: #71717a20; color: #71717a; }

/* Animations */
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Timeline */
.timeline-line {
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-dot {
  position: absolute;
  left: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 2px solid var(--bg-secondary);
}

.timeline-dot.success { background: var(--accent-green); }
.timeline-dot.warning { background: var(--accent-yellow); }
.timeline-dot.error { background: var(--accent-red); }

/* Table */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th { position: sticky; top: 0; background: var(--bg-tertiary); z-index: 10; }

/* Scrollbar */
.scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: var(--bg-primary); }
.scrollbar-thin::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

/* Tabs */
.tab-active { border-bottom: 2px solid var(--accent-blue); color: var(--text-primary); }
.tab-inactive { border-bottom: 2px solid transparent; color: var(--text-secondary); }

/* Truncate with hover */
.truncate-hover { 
  max-width: 100px; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap;
  cursor: help;
}

/* Live indicator */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--accent-green);
}
.live-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 1s infinite;
}

/* Team cards */
.team-card { transition: all 0.2s; cursor: pointer; }
.team-card:hover { border-color: var(--accent-blue); }
.team-card.active { border-color: var(--accent-purple); background: rgba(168, 85, 247, 0.1); }

/* Avatar placeholder */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  /* Prevent layout shift */
  min-width: 32px;
  min-height: 32px;
}

/* When avatar has a background-image, style for the image */
.avatar-img {
  background-size: cover;
  background-position: center;
  color: transparent; /* Hide initials when image loads */
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Inputs */
input, select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* Layout helpers */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mt-1 { margin-top: 4px; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 12px; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.hidden { display: none; }
.cursor-pointer { cursor: pointer; }
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.hover\:opacity-80:hover { opacity: 0.8; }

