/* ============================================================================
   Status Page
   ============================================================================ */

.status-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
  overflow-y: auto;
  padding: 24px;
  gap: 24px;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.status-mode {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-mode.live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-mode.sim {
  background: rgba(234, 179, 8, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-mode.replay {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Health Banner */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 40px;
  border-radius: 12px;
  font-size: 32px;
  font-weight: 700;
}

.status-banner.healthy {
  background: rgba(34, 197, 94, 0.2);
  border: 3px solid rgba(34, 197, 94, 0.5);
  color: var(--green);
}

.status-banner.unhealthy {
  background: rgba(239, 68, 68, 0.2);
  border: 3px solid rgba(239, 68, 68, 0.5);
  color: var(--red);
}

.banner-icon {
  font-size: 48px;
}

.banner-text {
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Issues List */
.status-issues {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.issue-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
}

.issue-item.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.issue-item.warning {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: var(--yellow);
}

.issue-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
}

.issue-item.error .issue-icon {
  background: rgba(239, 68, 68, 0.2);
}

.issue-item.warning .issue-icon {
  background: rgba(234, 179, 8, 0.2);
}

.status-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.status-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Connection Indicators */
.status-indicators {
  display: flex;
  gap: 40px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
}

.status-indicator.ok .status-dot {
  background: var(--green);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.status-indicator.error .status-dot {
  background: var(--red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.status-label {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 600;
}

/* Metric Cards Grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.metric-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.metric-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.metric-card.positive .metric-value {
  color: var(--green);
}

.metric-card.negative .metric-value {
  color: var(--red);
}

.metric-card.warning .metric-value {
  color: var(--yellow);
}

.metric-subtext {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Detail Rows */
.status-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.status-detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 18px;
  color: var(--text-secondary);
}

.detail-value {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Footer */
.status-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.status-refresh-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.status-refresh-btn:hover {
  background: var(--blue-hover);
}

.status-instance {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.status-loading,
.status-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 14px;
  color: var(--text-secondary);
}

.status-error {
  color: var(--red);
}
