/* Runs UI (customer runs + test history + run detail).
   Spec: docs/superpowers/specs/2026-07-06-admin-runs-ui-design.md.
   Tables/buttons/pagination reuse admin.css (.admin_table, ._pagination,
   .button_blue, .ellipsis, utility classes). Only what has no existing
   equivalent lives here. Chip look follows .selected_file_chip
   (transformations.css). Min font size 14px. */

.runs_stage_chips {display: flex;flex-wrap: wrap;gap: 4px;}
.runs_stage_chip {display: inline-block;padding: 2px 8px;border-radius: 10px;font-size: 14px;border: 1px solid #DCDCD8;background: #f5f5f5;color: #616161;white-space: nowrap;}
.runs_stage_chip_in_progress {background: #fff3e0;border-color: #ffb74d;color: #e65100;}
.runs_stage_chip_success {background: #e8f5e9;border-color: #81c784;color: #2e7d32;}
.runs_stage_chip_failed {background: #ffebee;border-color: #e57373;color: #c62828;}
.runs_stage_chip_skipped {background: #f5f5f5;border-color: #DCDCD8;color: #9e9e9e;text-decoration: line-through;}

.runs_status_success {color: #2e7d32;white-space: nowrap;}
.runs_status_partial {color: #f9a825;white-space: nowrap;}
.runs_status_failed {color: #c62828;white-space: nowrap;}
.runs_status_progress {color: #e65100;white-space: nowrap;}
.runs_status_pending {color: #616161;white-space: nowrap;}

.runs_batch_toggle {cursor: pointer;}
.runs_hidden {display: none;}
.runs_sources_cell {background: #fafafa;padding: 10px;}

.runs_tabs {display: flex;gap: 10px;margin-bottom: 15px;align-items: center;}
.runs_tab_active {background: #1976d2 !important;border-color: #1976d2 !important;}

.runs_failed_section_title {margin: 20px 0 10px 0;}
.runs_empty {padding: 40px;text-align: center;color: #999;}
.runs_empty i {font-size: 48px;margin-bottom: 15px;}

.runs_stage_error {color: #c62828;font-size: 14px;white-space: pre-wrap;word-break: break-word;max-width: 600px;}
.runs_detail_section_title {margin: 20px 0 10px 0;}
.runs_gcs_hint {color: #888;font-size: 14px;margin: -4px 0 10px 0;}
.runs_insights_summary {font-size: 14px;margin-bottom: 10px;}

/* Batch detail: per-source-run sections */
.runs_source_section {margin-bottom: 24px;border: 1px solid #e0e0e0;border-radius: 4px;overflow: hidden;}
.runs_source_section:has(.runs_source_body.runs_hidden) {margin-bottom: 6px;}
.runs_source_meta {display: flex;flex-wrap: wrap;gap: 12px;align-items: center;padding: 10px 12px;background: #f5f5f5;border-bottom: 1px solid #e0e0e0;cursor: pointer;}
.runs_source_caret {color: #777;}
.runs_source_show_more {margin-top: 10px;}
.runs_source_meta_file {font-weight: bold;color: #333;}
.runs_source_meta_id {font-size: 14px;font-family: monospace;max-width: 160px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.runs_source_meta_action {margin-left: auto;}
.runs_source_body {display: flex;flex-direction: column;gap: 0;}
.runs_source_body.runs_hidden {display: none;}
.runs_source_col {border-bottom: 1px solid #e0e0e0;}
.runs_source_col:last-child {border-bottom: none;}
.runs_source_col_title {margin: 10px 12px 6px 12px;font-size: 14px;color: #555;}
.runs_source_stages_table {margin: 0;border: none;}
.runs_source_stages_table th,.runs_source_stages_table td {border-left: none;border-right: none;}
.runs_source_stage_time {font-size: 14px;color: #666;white-space: nowrap;}
.runs_source_failure .runs_stage_error,.runs_source_failure > span {margin: 0 12px 10px 12px;display: block;max-width: none;}

/* List page: action column */
.runs_col_action {width: 36px;min-width: 36px;}

/* Run artifacts: prompt / parsed source / output / reference previews.
   Fragments are server-rendered (common/_run_artifact_content.html); this
   file only styles the toggle affordance + fragment containers. */
.runs_artifact_list {display: flex;flex-direction: column;gap: 8px;margin-bottom: 10px;}
.runs_artifact_item {border: 1px solid #e0e0e0;border-radius: 4px;overflow: hidden;}
.runs_artifact_toggle {display: block;width: 100%;text-align: left;padding: 8px 12px;border: none;background: #f5f5f5;cursor: pointer;font-size: 14px;}
.runs_artifact_toggle:disabled {opacity: .6;cursor: default;}
.runs_artifact_caret {margin-right: 6px;color: #777;}
.runs_artifact_content {padding: 12px;border-top: 1px solid #e0e0e0;}
.runs_artifact_pre {white-space: pre-wrap;word-wrap: break-word;background: #f5f5f5;padding: 12px;border-radius: 4px;max-height: 500px;overflow-y: auto;margin: 0;font-size: 14px;}
.runs_artifact_prompt_block,.runs_artifact_answer_block {border: 1px solid #e0e0e0;border-radius: 4px;background: #fafafa;padding: 10px 12px;margin-bottom: 10px;}
.runs_artifact_prompt_block:last-child,.runs_artifact_answer_block:last-child {margin-bottom: 0;}
.runs_artifact_prompt_label,.runs_artifact_answer_title {font-weight: bold;font-size: 14px;color: #3f3f3f;margin-bottom: 6px;}
.runs_artifact_answer_body {font-size: 14px;color: #333;}
.runs_artifact_insight {border: 1px solid #e0e0e0;border-radius: 4px;background: #fafafa;padding: 12px;margin-bottom: 15px;}
.runs_artifact_insight:last-child {margin-bottom: 0;}
.runs_artifact_insight_label {font-weight: bold;color: #333;margin-bottom: 8px;}
.runs_artifact_error {color: #c62828;background: #ffebee;padding: 8px 10px;border-radius: 4px;margin-bottom: 8px;font-size: 14px;}
.runs_artifact_research {margin-top: 12px;padding-top: 12px;border-top: 1px solid #e0e0e0;font-size: 14px;}
.runs_artifact_sources_list {margin: 6px 0 0 0;padding-left: 20px;font-size: 14px;}
.runs_artifact_meta {display: flex;flex-wrap: wrap;gap: 8px 16px;padding: 8px 12px;margin-bottom: 12px;background: #f0f4f8;border-radius: 4px;font-size: 14px;}
.runs_artifact_meta_item {white-space: nowrap;}
.runs_artifact_raw_toggle_wrap {margin-top: 12px;}
.runs_artifact_raw_json {margin-top: 8px;}
