.card {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  animation: fadeInSlide 0.3s ease;
  margin: 0;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.statusRunning {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

.statusSuccess {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
}

.statusSuccess:hover {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.statusPartial {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

.statusPartial:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.statusError {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.statusError:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Pending approval state */
.statusPendingApproval {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.2);
}

.statusPendingApproval:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.statusPendingApproval .waveIcon {
  background: rgba(139, 92, 246, 0.8);
}

.cardHeaderWrapper {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.cardHeaderWrapper:hover {
  background: rgba(245, 158, 11, 0.05);
}

.statusSuccess .cardHeaderWrapper:hover {
  background: rgba(34, 197, 94, 0.05);
}

.statusPartial .cardHeaderWrapper:hover {
  background: rgba(245, 158, 11, 0.05);
}

.statusError .cardHeaderWrapper:hover {
  background: rgba(239, 68, 68, 0.05);
}

.cardHeaderTop {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
}

.cardIcon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--status-warning);
  border-radius: 4px;
}

.statusSuccess .cardIcon {
  background: var(--status-success);
}

.statusPartial .cardIcon {
  background: var(--status-warning);
}

.statusError .cardIcon {
  background: var(--status-error);
}

.waveIcon {
  color: white;
}

.headerInfo {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.titleText {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.toolNamesPreview {
  font-size: 0.625rem;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rationalePreview {
  font-size: 0.688rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cardActions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.statusBadge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.188rem 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  font-size: 0.688rem;
  font-weight: 500;
  color: var(--status-warning);
  white-space: nowrap;
}

.statusSuccess .statusBadge {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--status-success);
}

.statusPartial .statusBadge {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--status-warning);
}

.statusError .statusBadge {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--status-error);
}

.statusIcon {
  flex-shrink: 0;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.successIcon {
  color: var(--status-success);
}

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

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

.expandButton {
  padding: 0.25rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expandButton:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--status-warning);
}

.cardContent {
  padding: 0 0.875rem 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  animation: expandDown 0.2s ease;
}

@keyframes expandDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rationale {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
  padding: 0.375rem 0.5rem;
  background: rgba(245, 158, 11, 0.05);
  border-left: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 0 4px 4px 0;
}

.toolsContainer {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  position: relative;
  padding-left: 0.75rem;
  border-left: 2px dashed rgba(245, 158, 11, 0.2);
}

.analysisSection {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.analysisSectionLabel {
  font-size: 0.688rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.analysisText {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

.findingsList,
.stepsList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.findingItem {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-primary);
  padding: 0.375rem 0.5rem;
  background: rgba(245, 158, 11, 0.05);
  border-left: 2px solid var(--status-warning);
  border-radius: 0 4px 4px 0;
}

.statusSuccess .findingItem {
  background: rgba(34, 197, 94, 0.05);
  border-left-color: var(--status-success);
}

.stepItem {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-primary);
  padding: 0.375rem 0.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-left: 2px solid var(--accent-primary);
  border-radius: 0 4px 4px 0;
}

/* Confirm buttons */
.confirmActions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.allowBtn,
.denyBtn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.188rem 0.625rem;
  border-radius: 10px;
  font-size: 0.688rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.4;
}

.allowBtn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--status-success);
}

.allowBtn:hover:not(:disabled) {
  background: var(--status-success);
  color: white;
}

.denyBtn {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--status-error);
}

.denyBtn:hover:not(:disabled) {
  background: var(--status-error);
  color: white;
}

.allowBtn:disabled,
.denyBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
