/* MERIDIAN V1.1 — Custom Styles */

:root {
  --color-green: #10b981;
  --color-yellow: #f59e0b;
  --color-red: #ef4444;
  --color-blue: #3b82f6;
  --color-purple: #8b5cf6;
  --color-surface: #111827;
  --color-surface-light: #1f2937;
  --color-border: #374151;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface);
}
::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 3px;
}

/* Navigation Tabs */
.nav-tab {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9ca3af;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nav-tab:hover {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.05);
}
.nav-tab.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-green { background: rgba(16, 185, 129, 0.15); color: var(--color-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-green .status-dot { background: var(--color-green); box-shadow: 0 0 6px var(--color-green); }
.status-yellow { background: rgba(245, 158, 11, 0.15); color: var(--color-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-yellow .status-dot { background: var(--color-yellow); box-shadow: 0 0 6px var(--color-yellow); }
.status-red { background: rgba(239, 68, 68, 0.15); color: var(--color-red); border: 1px solid rgba(239, 68, 68, 0.3); }
.status-red .status-dot { background: var(--color-red); box-shadow: 0 0 6px var(--color-red); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Cards */
.card {
  background: var(--color-surface-light);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.card:hover {
  border-color: #4b5563;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

/* Metric Display */
.metric-value {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
}
.metric-label {
  font-size: 0.6875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}
.metric-change-up { color: var(--color-green); }
.metric-change-down { color: var(--color-red); }

/* Bar Charts (CSS-only) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
}
.bar-chart .bar {
  flex: 1;
  min-width: 4px;
  border-radius: 2px 2px 0 0;
  transition: height 0.3s ease;
  position: relative;
}
.bar-chart .bar:hover {
  opacity: 0.8;
}
.bar-chart .bar .bar-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  border: 1px solid #374151;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  white-space: nowrap;
  margin-bottom: 4px;
  z-index: 10;
}
.bar-chart .bar:hover .bar-tooltip {
  display: block;
}

/* Agent Grid */
.agent-card {
  background: var(--color-surface-light);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transition: all 0.15s;
}
.agent-card:hover {
  border-color: #4b5563;
  background: rgba(31, 41, 55, 0.8);
}
.agent-icon {
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Status indicator inline */
.status-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}
.status-indicator.idle { background: #6b7280; }
.status-indicator.running { background: var(--color-blue); animation: pulse-dot 1.5s ease-in-out infinite; }
.status-indicator.complete { background: var(--color-green); }
.status-indicator.active { background: var(--color-green); animation: pulse-dot 2s ease-in-out infinite; }
.status-indicator.failed { background: var(--color-red); }
.status-indicator.scaling { background: var(--color-purple); animation: pulse-dot 1.5s ease-in-out infinite; }

/* Experiment Cards */
.exp-queued { border-left: 3px solid #6b7280; }
.exp-live { border-left: 3px solid var(--color-blue); }
.exp-concluded { border-left: 3px solid var(--color-green); }

/* Proof Tags */
.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag-public { background: rgba(16, 185, 129, 0.15); color: var(--color-green); }
.tag-private { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

/* Briefing Sections */
.briefing-section {
  background: var(--color-surface-light);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.briefing-section h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface-light) 25%, #2d3748 50%, var(--color-surface-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.375rem;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Button */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--color-blue);
  color: white;
}
.btn-primary:hover {
  background: #2563eb;
}
.btn-outline {
  border-color: var(--color-border);
  color: #9ca3af;
  background: transparent;
}
.btn-outline:hover {
  border-color: #6b7280;
  color: #e5e7eb;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}
.empty-state .empty-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
