.po-insights {
  margin: 16px 0;
  border: 1px solid var(--line, #d9dee8);
  border-radius: 12px;
  background: var(--surface, #fff);
  overflow: hidden;
}

.po-insights-loading,
.po-insights-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  color: var(--muted, #667085);
  font-size: 13px;
}

.po-insights-loading > span {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: po-insights-spin 0.8s linear infinite;
}

.po-insights-error {
  align-items: flex-start;
  flex-direction: column;
  color: #9b3b31;
}

.po-insights-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line, #e4e7ec);
}

.po-insights-summary span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f4f6f8;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
}

.po-insights-group {
  border-bottom: 1px solid var(--line, #e4e7ec);
}

.po-insights-group:last-child {
  border-bottom: 0;
}

.po-insights-group > summary {
  cursor: pointer;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
}

.po-insights-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 0 16px 16px;
}

.po-insights-columns h4 {
  margin: 0 0 10px;
  color: #344054;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.po-insights-list,
.po-insights-timeline,
.po-insights-files {
  display: grid;
  gap: 8px;
}

.po-insights-item,
.po-insights-file {
  padding: 10px 11px;
  border: 1px solid #eaecf0;
  border-radius: 9px;
  background: #fafbfc;
}

.po-insights-item p,
.po-insights-timeline-item p {
  margin: 5px 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.po-insights-context {
  display: block;
  margin-top: 5px;
  color: #315455;
  font-size: 12px;
  font-weight: 700;
}

.po-insights-item-head,
.po-insights-file,
.po-insights-file-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.po-insights-item-head b,
.po-insights-file b {
  color: #101828;
  font-size: 13px;
}

.po-insights-item-head time,
.po-insights-file time,
.po-insights-file span,
.po-insights-muted,
.po-insights-meta {
  color: #667085;
  font-size: 11px;
}

.po-insights-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.po-insights-timeline-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
}

.po-insights-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #667085;
}

.po-insights-file > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.po-insights-file b {
  overflow-wrap: anywhere;
}

.po-insights-download {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.po-insights-download:hover {
  background: #f2f4f7;
}

.po-insights-empty {
  margin: 0;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f8f9fb;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

@keyframes po-insights-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .po-insights-columns {
    grid-template-columns: 1fr;
  }
}
