.kpi-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-5);
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--color-primary);
  opacity: 0.9;
}

.kpi-label {
  margin-bottom: var(--space-3);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-main {
  display: flex;
  align-items: flex-end;
  gap: var(--space-5);
  margin-bottom: var(--space-2);
}

.kpi-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.kpi-context {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  margin-top: var(--space-1);
  background: var(--surface-3);
  border-radius: var(--radius-full);
}

.progress-bar {
  height: 100%;
  width: var(--progress, 0%);
  background: var(--color-primary);
  border-radius: inherit;
}

.alert-panel {
  display: grid;
  gap: var(--space-3);
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}

.alert-icon {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: var(--radius-full);
  background: var(--color-info);
}

.alert-item.is-warning .alert-icon {
  background: var(--color-warning);
}

.alert-item.is-error .alert-icon {
  background: var(--color-error);
}

.alert-item.is-success .alert-icon {
  background: var(--color-success);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
}

.status-ok .status-dot {
  background: var(--color-success);
}

.status-warning .status-dot {
  background: var(--color-warning);
}

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

.timeline {
  display: grid;
  gap: var(--space-4);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-3);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 11px;
  bottom: -20px;
  width: 1px;
  background: var(--border-default);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  border: 1px solid var(--border-default);
}

.timeline-marker::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric-value {
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .kpi-card {
    padding: var(--space-4);
  }

  .metric-row {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1);
  }
}