/* ============================================
   Deep Analysis Runs — super-admin transcript replay viewer
   (spec/TODO_agentic_analysis_harness.md §13 P3 R6 / §11).
   Cross-tenant debugging surface: loud company badge, per-kind
   timeline frames, begin_sku segment nav. .darv-* namespace.
   ============================================ */

.darv-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b6b6b;
}

/* --- Cross-tenant / company badges (loud by design) ------------------- */
.darv-cross-tenant-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #7c2d12;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.darv-company-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.darv-company-chip {
  font-weight: 600;
  white-space: nowrap;
}

/* --- Index filters ------------------------------------------------------ */
.darv-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 16px;
}
.darv-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #6b6b6b;
}
.darv-filter select,
.darv-filter input[type="text"] {
  min-width: 170px;
  padding: 6px 8px;
  border: 1px solid #d6d3cd;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
}

/* --- Status pills + chips ---------------------------------------------- */
.darv-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.darv-status-queued   { background: #eef2ff; color: #3730a3; }
.darv-status-running  { background: #fef9c3; color: #854d0e; }
.darv-status-complete { background: #dcfce7; color: #166534; }
.darv-status-failed   { background: #fee2e2; color: #991b1b; }
.darv-status-refused  { background: #f3f4f6; color: #4b5563; }

.darv-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.darv-chip-stale  { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.darv-chip-budget { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.darv-chip-playbook-matches_current      { background: #dcfce7; color: #166534; }
.darv-chip-playbook-differs_from_current { background: #fef9c3; color: #854d0e; }
.darv-chip-playbook-no_longer_registered { background: #fee2e2; color: #991b1b; }

.darv-code {
  font-size: 12px;
  background: #f5f4f0;
  border: 1px solid #e8e6e1;
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-all;
}

/* --- Banners ------------------------------------------------------------ */
.darv-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid transparent;
}
.darv-banner-inflight { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.darv-banner-note     { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }

/* --- Meta card ---------------------------------------------------------- */
.darv-meta-card { margin-bottom: 16px; padding: 16px; }
.darv-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 20px;
  margin: 0;
}
.darv-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a8a8a;
  margin-bottom: 2px;
}
.darv-meta dd {
  margin: 0;
  font-size: 13px;
  color: #1a1a1a;
  overflow-wrap: anywhere;
}
.darv-meta-error { grid-column: 1 / -1; }
.darv-meta-error dd { color: #991b1b; }

/* --- Prompt card -------------------------------------------------------- */
.darv-prompt-card { margin-bottom: 16px; padding: 16px; }
.darv-prompt-card h2 { margin: 0 0 6px; font-size: 15px; }
.darv-hint { font-size: 12px; color: #6b6b6b; margin: 0 0 8px; }
.darv-prompt-card summary { cursor: pointer; font-size: 13px; font-weight: 600; }

/* --- Segment nav -------------------------------------------------------- */
.darv-segment-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.darv-segment-nav-label { font-size: 12px; color: #6b6b6b; }
.darv-segment-link {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #d6d3cd;
  background: #fff;
  font-size: 12px;
  text-decoration: none;
  color: #1a1a1a;
}
.darv-segment-link:hover { border-color: #b9b5ac; }
.darv-segment-current {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
  font-weight: 600;
}

/* --- Timeline frames ---------------------------------------------------- */
.darv-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.darv-frame { padding: 12px 14px; }
.darv-frame-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.darv-kind {
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
}
.darv-kind-assistant { color: #3730a3; }
.darv-kind-tool      { color: #166534; font-family: ui-monospace, monospace; }
.darv-kind-report    { color: #7c2d12; }
.darv-at { font-size: 11px; color: #8a8a8a; white-space: nowrap; }

.darv-frame-assistant { border-left: 3px solid #6366f1; }
.darv-frame-tool      { border-left: 3px solid #16a34a; }
.darv-frame-begin-sku { border-left: 3px solid #1a1a1a; background: #faf9f7; }
.darv-frame-report    { border-left: 3px solid #ea580c; }
.darv-frame-error     { border-left: 3px solid #dc2626; }

.darv-frame-section { margin-top: 6px; }
.darv-section-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a8a8a;
  margin-bottom: 2px;
}
.darv-section-error { color: #991b1b; font-weight: 700; }

.darv-pre {
  margin: 0;
  padding: 8px 10px;
  background: #f5f4f0;
  border: 1px solid #e8e6e1;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
}
.darv-assistant-text { background: #eef2ff; border-color: #c7d2fe; }

.darv-report-body { font-size: 13px; line-height: 1.6; }
.darv-report-body h1, .darv-report-body h2, .darv-report-body h3 {
  font-size: 14px;
  margin: 10px 0 4px;
}
.darv-report-body code {
  background: #f5f4f0;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 12px;
}

.darv-empty {
  text-align: center;
  color: #8a8a8a;
  font-size: 13px;
  padding: 18px 8px;
  margin: 0;
}
