/* Страница статуса сервера */
.status-page {
  padding: 60px 0;
  min-height: calc(100vh - 200px);
  background: var(--color-background);
}

.status-page h1 {
  font-size: 48px;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.subtitle {
  font-size: 18px;
  color: var(--color-text-tertiary);
  margin-bottom: 48px;
}

/* Секции статуса */
.status-section {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.status-section h2 {
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--color-text-primary);
}

/* Информационные карточки */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--color-background-alt);
  border-radius: 12px;
  padding: 20px;
}

.info-label {
  font-size: 14px;
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Статус badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.status-badge.online {
  background: #10B98120;
  color: #059669;
}

.status-badge.offline {
  background: #EF444420;
  color: #DC2626;
}

/* Метрики */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--color-background-alt);
  border-radius: 12px;
  padding: 24px;
}

.metric-card h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.metric-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.metric-bar {
  width: 100%;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.metric-bar-fill {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.5s ease;
  border-radius: 4px;
}

.metric-bar-fill.warning {
  background: #F59E0B;
}

.metric-bar-fill.danger {
  background: #EF4444;
}

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

/* Docker контейнеры */
.containers-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.containers-list {
  display: grid;
  gap: 12px;
}

.container-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-background-alt);
  border-radius: 8px;
  padding: 16px;
}

.container-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.container-status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10B981;
}

.container-status-icon.stopped {
  background: #EF4444;
}

.container-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.container-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--color-text-tertiary);
}

/* Пайплайны */
.pipelines-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--color-background-alt);
  border-radius: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-value.success {
  color: #10B981;
}

.stat-value.failed {
  color: #EF4444;
}

.stat-label {
  font-size: 14px;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

/* Список пайплайнов */
.pipelines-list {
  display: grid;
  gap: 12px;
}

.pipeline-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-background-alt);
  border-radius: 8px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pipeline-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.pipeline-status {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.pipeline-status.success {
  background: #10B98120;
}

.pipeline-status.failed {
  background: #EF444420;
}

.pipeline-status.running {
  background: #3B82F620;
  animation: pulse 2s infinite;
}

.pipeline-info {
  flex: 1;
}

.pipeline-ref {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

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

.pipeline-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
}

.pipeline-link:hover {
  text-decoration: underline;
}

.pipeline-project {
  color: var(--color-primary);
  font-weight: 600;
}

/* Таймлайн событий */
.events-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--color-background-alt);
  border-radius: 12px;
  border-left: 3px solid var(--color-primary);
  transition: all 0.2s;
}

.event-item:hover {
  background: #f8f9fa;
  transform: translateX(4px);
}

.event-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.event-content {
  flex: 1;
}

.event-title {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.event-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.event-time {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.event-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
  padding: 8px;
}

.event-link:hover {
  text-decoration: underline;
}

/* Последнее обновление */
.last-updated {
  text-align: center;
  padding: 16px;
  color: var(--color-text-tertiary);
  font-size: 14px;
}

.auto-update {
  margin-left: 16px;
  padding: 4px 12px;
  background: var(--color-primary-light);
  border-radius: 12px;
  font-size: 12px;
}

/* Загрузка */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--color-text-tertiary);
}

/* Анимация пульса */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .status-page h1 {
    font-size: 32px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .pipelines-stats {
    flex-direction: column;
    gap: 16px;
  }

  .pipeline-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
