/* System Health Dashboard Styles */

.health-loading {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* Status Banner */
.health-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.health-banner .health-emoji {
  font-size: 2rem;
}
.health-banner strong {
  font-size: 1.2rem;
}
.health-banner p {
  margin: 0.25rem 0 0;
  opacity: 0.8;
  font-size: 0.9rem;
}
.health-healthy {
  background: linear-gradient(135deg, #064e3b, #065f46);
  color: #a7f3d0;
}
.health-degraded {
  background: linear-gradient(135deg, #78350f, #92400e);
  color: #fde68a;
}
.health-unhealthy {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  color: #fecaca;
}
.health-tip {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.5rem !important;
}

/* Stats Grid */
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.health-card {
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 10px;
  padding: 1rem;
}
.health-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.health-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.health-stat:last-child {
  border-bottom: none;
}
.health-stat span {
  opacity: 0.7;
}

/* Section Title */
.health-section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.1rem;
}

/* Modules Grid */
.health-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}
.health-module {
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 0.75rem;
  transition: transform 0.15s;
}
.health-module:hover {
  transform: translateY(-1px);
}
.health-module.deployed {
  border-left: 3px solid #10b981;
}
.health-module.missing {
  border-left: 3px solid #ef4444;
  opacity: 0.7;
}
.health-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.health-module-details {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 0.25rem;
}
.health-detail {
  white-space: nowrap;
}
.health-module-tables {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: 0.25rem;
  font-family: monospace;
}
.health-pr {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
}

/* Deployed PRs */
.health-prs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.health-pr-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Light Mode */
body.light-mode .health-card,
body.light-mode .health-module {
  background: #fff;
  border-color: #e5e7eb;
}
body.light-mode .health-stat {
  border-bottom-color: rgba(0,0,0,0.05);
}
body.light-mode .health-healthy {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #064e3b;
}
body.light-mode .health-degraded {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
}
body.light-mode .health-unhealthy {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #7f1d1d;
}
body.light-mode .health-pr {
  background: rgba(0,0,0,0.08);
  color: #333;
}
body.light-mode .health-pr-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .health-grid {
    grid-template-columns: 1fr;
  }
  .health-modules {
    grid-template-columns: 1fr;
  }
  .health-banner {
    flex-direction: column;
    text-align: center;
  }
}
