/**
 * Observatory Enhanced CSS - ITERATION A-340
 * Scope Visualization Styles
 * 
 * Features:
 * - Spanning scope bars with smooth colors
 * - Rich scope info panel
 * - Variable display formatting
 * - Legend and navigation
 */

/* ═══════════════════════════════════════════════════════════════════════════
   BASE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0d1117;
    color: #e6edf3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.observatory-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLAYBACK HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-playback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
    border-bottom: 1px solid #30363d;
    flex-shrink: 0;
}

.observatory-controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.observatory-controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Transport buttons */
.obs-transport-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #30363d;
    background: #21262d;
    color: #8b949e;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.obs-transport-btn:hover {
    background: #30363d;
    color: #e6edf3;
    border-color: #484f58;
}

.obs-transport-btn:active {
    background: #484f58;
}

/* Speed control */
.obs-speed-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid #30363d;
}

.obs-speed-label {
    font-size: 12px;
    color: #8b949e;
}

.obs-speed-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: #30363d;
    border-radius: 2px;
    cursor: pointer;
}

.obs-speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #58a6ff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}

.obs-speed-slider::-webkit-slider-thumb:hover {
    background: #79c0ff;
}

.obs-speed-value {
    font-size: 12px;
    color: #58a6ff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    min-width: 50px;
}

/* Step counter */
.obs-step-counter {
    font-size: 13px;
    color: #8b949e;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Replay/Live button */
.obs-replay-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #8b949e;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.obs-replay-btn .replay-dot {
    font-size: 8px;
}

.obs-replay-btn.is-live {
    background: rgba(35, 134, 54, 0.15);
    border-color: #238636;
    color: #3fb950;
}

.obs-replay-btn.is-live .replay-dot {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.obs-replay-btn:hover {
    background: #30363d;
    border-color: #484f58;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TIMELINE GRID AREA
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-grid-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #0d1117;
}

.observatory-timeline-wrapper {
    height: 100%;
    overflow: hidden;
}

.observatory-timeline-scroll {
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.observatory-timeline-grid {
    display: flex;
    min-height: 100%;
}

/* Row labels (sticky left column) */
.observatory-row-labels {
    flex-shrink: 0;
    width: 80px;
    background: #161b22;
    border-right: 1px solid #30363d;
    position: sticky;
    left: 0;
    z-index: 10;
}

.obs-row-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b949e;
    border-bottom: 1px solid #21262d;
    /* Height set dynamically via JS */
    min-height: 28px;
}

.obs-row-label.header-row {
    background: #21262d;
    color: #58a6ff;
}

/* Specific label styling */
.obs-row-label.scope-label {
    /* Height set dynamically based on scope depth */
    align-items: flex-start;
    padding-top: 8px;
}

.obs-row-label.vars-label {
    align-items: flex-start;
    padding-top: 8px;
}

/* Grid content area */
.observatory-grid-content {
    flex: 1;
    min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCOPE ROW - Nested depth bands with floating icons
   ═══════════════════════════════════════════════════════════════════════════ */

.obs-scope-and-icons {
    position: relative;
}

.obs-scope-bands {
    position: relative;
    background: #0d1117;
    min-height: 16px;
}

.obs-scope-row-empty {
    height: 32px;
    background: #161b22;
}

.obs-scope-band {
    position: absolute;
    left: 0;
    right: 0;
}

.obs-scope-band-segment {
    position: absolute;
    cursor: pointer;
    transition: filter 0.15s ease;
    overflow: hidden;
}

.obs-scope-band-segment:hover {
    filter: brightness(1.2);
    z-index: 10;
}

/* Remove the selected state changing colors - it was confusing */
.obs-scope-band-segment.selected {
    /* No brightness change - keeps colors stable */
}

/* Icon row floating over scope bands */
.obs-intent-icons-row {
    display: grid;
    z-index: 20;
}

.obs-intent-icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.obs-intent-icon-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 40px;
    background: #0d1117;
    border: 2px solid #21262d;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.15s ease;
}

.obs-intent-icon-cell:hover .obs-intent-icon-bubble {
    transform: scale(1.1);
    border-color: #484f58;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.obs-intent-icon-cell.selected .obs-intent-icon-bubble {
    border-color: #58a6ff;
    background: #161b22;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Status colors for icon bubbles */
.obs-intent-icon-cell.status-completed .obs-intent-icon-bubble {
    border-color: #21262d;
}

.obs-intent-icon-cell.status-completed.selected .obs-intent-icon-bubble {
    border-color: #58a6ff;
}

.obs-intent-icon-cell.status-running .obs-intent-icon-bubble {
    border-color: #1f6feb;
    animation: icon-pulse 1.5s ease-in-out infinite;
}

.obs-intent-icon-cell.status-error .obs-intent-icon-bubble {
    border-color: #f85149;
}

@keyframes icon-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 2px 16px rgba(31, 111, 235, 0.5); }
}

/* Intent label row (below icons) */
.obs-cell-intent-label {
    height: 28px;
    padding: 4px 4px;
    font-size: 12px;
    background: #0d1117;
    border-bottom: 1px solid #21262d;
}

.obs-cell-intent-label .obs-intent-name {
    font-size: 12px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.obs-cell-intent-label.selected {
    background: #161b22;
}

.obs-cell-intent-label.selected .obs-intent-name {
    color: #e6edf3;
}

/* Scope type reference colors (used by JS for inline styles) */
/* Root: hsl(220, 45%, 18%) - Dark Blue */
/* Loop: hsl(270, 40%, 20%) - Dark Purple */
/* Conditional: hsl(35, 45%, 18%) - Dark Orange */
/* Try/Catch: hsl(0, 35%, 20%) - Dark Red */

/* ═══════════════════════════════════════════════════════════════════════════
   GRID TABLE CELLS
   ═══════════════════════════════════════════════════════════════════════════ */

.obs-grid-table-container {
    display: flex;
    flex-direction: column;
}

.obs-grid-table {
    background: #0d1117;
}

/* Column headers */
.obs-col-header {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #58a6ff;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    cursor: pointer;
    transition: background 0.15s ease;
}

.obs-col-header:hover {
    background: #21262d;
}

.obs-col-header.selected {
    background: #1f3a5f;
    color: #79c0ff;
}

.obs-col-header.current {
    background: #1a4721;
    color: #3fb950;
}

/* Grid cells */
.obs-grid-cell {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 12px;
    color: #e6edf3;
    background: #0d1117;
    border-bottom: 1px solid #21262d;
    cursor: pointer;
    transition: background 0.15s ease;
}

.obs-grid-cell:hover {
    background: #161b22;
}

.obs-grid-cell.selected {
    background: #1f3a5f;
}

.obs-grid-cell.current {
    background: #1a4721;
}

/* Step cell */
.obs-cell-step {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 500;
}

/* Intent icon (used in old layout, kept for compatibility) */
.obs-intent-icon {
    font-size: 20px;
    line-height: 1;
}

.obs-intent-name {
    font-size: 10px;
    color: #c9d1d9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.obs-cell-intent.status-completed {
    border-left: 3px solid #238636;
}

.obs-cell-intent.status-running {
    border-left: 3px solid #f0883e;
    animation: intent-running 1s ease-in-out infinite;
}

.obs-cell-intent.status-error {
    border-left: 3px solid #f85149;
}

@keyframes intent-running {
    0%, 100% { background: #0d1117; }
    50% { background: #2d1f0f; }
}

/* Events cell */
.obs-cell-events {
    font-size: 16px;
    color: #484f58;
}

.obs-cell-events.has-events {
    color: #8b949e;
}

/* Variables cell */
.obs-cell-vars {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    padding: 6px 8px;
    font-size: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    height: auto;
    min-height: 36px;
}

.obs-var-line {
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    font-size: 12px;
}

.obs-var-line .var-prefix {
    font-weight: 600;
    width: 12px;
    text-align: center;
}

.obs-var-line .var-emoji {
    font-size: 11px;
}

.obs-var-line .var-name {
    color: #c9d1d9;
}

.obs-var-line.var-created .var-prefix {
    color: #3fb950;
}

.obs-var-line.var-updated .var-prefix {
    color: #58a6ff;
}

.obs-var-line.var-deleted .var-prefix {
    color: #f85149;
}

.obs-var-line.var-created .var-name {
    color: #7ee787;
}

.obs-var-line.var-updated .var-name {
    color: #c9d1d9;
}

.obs-var-line.var-deleted .var-name {
    color: #ffa198;
    text-decoration: line-through;
}

.obs-var-more {
    color: #6e7681;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESIZABLE SPLITTER
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-splitter {
    height: 8px;
    background: #21262d;
    cursor: row-resize;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    position: relative;
}

.observatory-splitter:hover {
    background: #30363d;
}

.observatory-splitter.active {
    background: #388bfd;
}

.splitter-handle {
    width: 60px;
    height: 4px;
    background: #484f58;
    border-radius: 2px;
    transition: background 0.15s ease;
}

.observatory-splitter:hover .splitter-handle {
    background: #6e7681;
}

.observatory-splitter.active .splitter-handle {
    background: #fff;
}

/* Tooltip hint on hover */
.observatory-splitter::after {
    content: 'Drag to resize • Double-click to reset';
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #8b949e;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.observatory-splitter:hover::after {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DETAIL PANELS
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-detail-panels {
    display: flex;
    gap: 1px;
    height: 280px;
    min-height: 150px;
    flex-shrink: 0;
    background: #30363d;
    border-top: 1px solid #30363d;
}

.observatory-panel {
    flex: 1;
    background: #0d1117;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.obs-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    flex-shrink: 0;
}

.obs-panel-icon {
    font-size: 14px;
}

.obs-panel-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b949e;
}

.obs-panel-content {
    flex: 1;
    padding: 12px 14px;
    overflow-y: auto;
}

.obs-panel-placeholder {
    color: #484f58;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCOPE INFO PANEL CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.scope-info-content {
    height: 100%;
}

.scope-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin: -12px -14px 16px -14px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #30363d;
}

.scope-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.scope-info-title .scope-icon {
    font-size: 18px;
}

.scope-info-title .scope-name {
    font-weight: 600;
    color: #e6edf3;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.scope-info-title .scope-step-ref {
    font-size: 11px;
    color: #6e7681;
}

/* Stats row */
.scope-info-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #21262d;
}

.scope-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.scope-stat-icon {
    font-size: 14px;
}

.scope-stat-label {
    color: #6e7681;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 10px;
}

.scope-stat-value {
    color: #e6edf3;
    font-weight: 500;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Variables section */
.scope-variables-section {
    margin-top: 14px;
}

.scope-variables-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6e7681;
}

.scope-variables-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid #21262d;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    max-height: 140px;
    overflow-y: auto;
}

.scope-var-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.5;
}

.scope-var-type {
    font-size: 12px;
    flex-shrink: 0;
}

.scope-var-name {
    color: #7ee787;
    white-space: nowrap;
}

.scope-var-equals {
    color: #6e7681;
}

.scope-var-value {
    color: #a5d6ff;
    word-break: break-all;
}

.scope-var-value.truncated::after {
    content: '...';
    color: #6e7681;
}

/* Iteration navigation */
.scope-iteration-nav {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #21262d;
}

.scope-iter-btn {
    flex: 1;
    padding: 8px 12px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #8b949e;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.scope-iter-btn:hover:not(:disabled) {
    background: #30363d;
    color: #e6edf3;
    border-color: #484f58;
}

.scope-iter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENTS PANEL - Collapsible Sections (A-341)
   ═══════════════════════════════════════════════════════════════════════════ */

.obs-section {
    margin-bottom: 12px;
    border: 1px solid #21262d;
    border-radius: 6px;
    overflow: hidden;
}

.obs-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #161b22;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.obs-section-header:hover {
    background: #21262d;
}

.obs-section-toggle {
    font-size: 10px;
    color: #6e7681;
    width: 12px;
}

.obs-section-icon {
    font-size: 14px;
}

.obs-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #8b949e;
    flex: 1;
}

.obs-section-count {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #6e7681;
}

.obs-section-content {
    padding: 10px 12px;
    background: #0d1117;
}

.obs-section.collapsed .obs-section-content {
    display: none;
}

/* Model calls in events panel */
.obs-model-call {
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.obs-model-call:hover {
    background: rgba(88, 166, 255, 0.12);
    border-color: rgba(88, 166, 255, 0.3);
}

.obs-model-call:last-child {
    margin-bottom: 0;
}

.obs-model-call-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.obs-model-call .model-name {
    font-size: 12px;
    font-weight: 600;
    color: #58a6ff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.obs-model-call .model-stats {
    font-size: 11px;
    color: #8b949e;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    flex: 1;
}

.obs-model-call .obs-open-model-btn {
    flex-shrink: 0;
}

.obs-model-call-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(88, 166, 255, 0.15);
}

.obs-model-call-section .call-label {
    display: block;
    font-size: 10px;
    color: #6e7681;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.obs-model-call-section .call-preview {
    font-size: 11px;
    color: #a5d6ff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 60px;
    overflow: hidden;
}

/* Variable changes in events panel */
.obs-var-change {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.obs-var-change:hover {
    filter: brightness(1.1);
}

.obs-var-change:last-child {
    margin-bottom: 0;
}

.obs-var-change.created {
    background: rgba(63, 185, 80, 0.1);
    border-left: 3px solid #3fb950;
}

.obs-var-change.updated {
    background: rgba(240, 136, 62, 0.1);
    border-left: 3px solid #f0883e;
}

.obs-var-change.deleted {
    background: rgba(248, 81, 73, 0.1);
    border-left: 3px solid #f85149;
}

.obs-var-change-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.obs-var-change .var-prefix {
    font-weight: 700;
    font-size: 14px;
    width: 14px;
}

.obs-var-change.created .var-prefix { color: #3fb950; }
.obs-var-change.updated .var-prefix { color: #f0883e; }
.obs-var-change.deleted .var-prefix { color: #f85149; }

.obs-var-change .var-type-icon {
    font-size: 12px;
}

.obs-var-change .var-name {
    font-size: 12px;
    font-weight: 600;
    color: #7ee787;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.obs-var-change-value {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding-left: 20px;
}

.obs-var-change .var-equals {
    color: #6e7681;
}

.obs-var-change .var-value {
    font-size: 11px;
    color: #a5d6ff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    word-break: break-all;
}

.obs-var-change-old {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 20px;
    font-size: 10px;
}

.obs-var-change-old .old-label {
    color: #6e7681;
}

.obs-var-change-old .old-value {
    color: #8b949e;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    text-decoration: line-through;
}

/* Cognitive frames */
.obs-cognitive-frame {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(163, 113, 247, 0.08);
    border: 1px solid rgba(163, 113, 247, 0.2);
    border-radius: 6px;
    border-left: 3px solid #a371f7;
}

.obs-cognitive-frame:last-child {
    margin-bottom: 0;
}

.obs-cognitive-frame .frame-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.obs-cognitive-frame .frame-icon {
    font-size: 16px;
}

.obs-cognitive-frame .frame-type {
    font-size: 12px;
    font-weight: 600;
    color: #a371f7;
    flex: 1;
}

.obs-cognitive-frame .frame-time {
    font-size: 10px;
    color: #6e7681;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.obs-cognitive-frame .frame-content {
    font-size: 12px;
    color: #c9d1d9;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

/* Frame type variants */
.obs-cognitive-frame.frame-narration {
    border-left-color: #79c0ff;
    background: rgba(121, 192, 255, 0.08);
}

.obs-cognitive-frame.frame-reflection {
    border-left-color: #d2a8ff;
    background: rgba(210, 168, 255, 0.08);
}

.obs-cognitive-frame.frame-prediction {
    border-left-color: #f0883e;
    background: rgba(240, 136, 62, 0.08);
}

.obs-cognitive-frame.frame-surprise {
    border-left-color: #ff7b72;
    background: rgba(255, 123, 114, 0.08);
}

/* Model call frames */
.obs-model-call-frame {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(56, 139, 253, 0.08);
    border: 1px solid rgba(56, 139, 253, 0.2);
    border-radius: 6px;
    border-left: 3px solid #388bfd;
}

.obs-model-call-frame:last-child {
    margin-bottom: 0;
}

.obs-model-call-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.obs-model-meta {
    font-size: 11px;
    color: #8b949e;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.obs-open-model-btn {
    background: rgba(56, 139, 253, 0.2);
    border: 1px solid rgba(56, 139, 253, 0.4);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #79c0ff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.obs-open-model-btn:hover {
    background: rgba(56, 139, 253, 0.3);
    border-color: #58a6ff;
    color: #a5d6ff;
}

.obs-model-preview {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
}

.obs-model-preview:last-child {
    margin-bottom: 0;
}

.obs-preview-label {
    color: #8b949e;
    font-weight: 500;
    flex-shrink: 0;
}

.obs-preview-text {
    color: #c9d1d9;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obs-response-preview .obs-preview-text {
    color: #7ee787;
}

/* Model call modal (fallback) */
.obs-model-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.obs-model-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.obs-model-modal-content {
    position: relative;
    width: 800px;
    max-width: 90vw;
    max-height: 80vh;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.obs-model-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #21262d;
    border-bottom: 1px solid #30363d;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
}

.obs-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #8b949e;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

.obs-modal-close:hover {
    color: #f85149;
}

.obs-model-modal-body {
    flex: 1;
    overflow: auto;
    padding: 16px;
}

.obs-model-modal-body pre {
    margin: 0;
    font-size: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #c9d1d9;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
}

/* Raw events list */
.obs-raw-events {
    max-height: 300px;
    overflow-y: auto;
}

.obs-raw-event {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    font-size: 11px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.obs-raw-event:hover {
    background: rgba(88, 166, 255, 0.08);
    border-color: rgba(88, 166, 255, 0.2);
}

.obs-raw-event .event-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.obs-raw-event .event-type {
    color: #c9d1d9;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    flex: 1;
}

.obs-raw-event .event-time {
    color: #6e7681;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 10px;
}

/* Open button for frames and events */
.obs-open-frame-btn {
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: #79c0ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.obs-open-frame-btn:hover {
    background: rgba(88, 166, 255, 0.25);
    border-color: rgba(88, 166, 255, 0.5);
}

/* Cognitive frame header with button */
.obs-cognitive-frame .frame-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.obs-cognitive-frame .frame-header .obs-open-frame-btn {
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENTS PANEL CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.obs-events-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #21262d;
}

/* Rover mission actions */
.obs-rover-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.obs-rover-btn {
    background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    border: 1px solid #2ea043;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.obs-rover-btn:hover {
    background: linear-gradient(135deg, #2ea043 0%, #3fb950 100%);
    border-color: #3fb950;
    box-shadow: 0 2px 8px rgba(46, 160, 67, 0.3);
    transform: translateY(-1px);
}

.obs-rover-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.obs-event-step-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.obs-step-intent {
    font-size: 13px;
    font-weight: 500;
}

.obs-step-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.obs-meta-item {
    font-size: 11px;
    color: #8b949e;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.obs-status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.obs-status-badge.status-completed {
    background: rgba(35, 134, 54, 0.2);
    color: #3fb950;
}

.obs-status-badge.status-running {
    background: rgba(240, 136, 62, 0.2);
    color: #f0883e;
}

.obs-status-badge.status-error {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
}

.obs-status-badge.status-pending {
    background: rgba(139, 148, 158, 0.2);
    color: #8b949e;
}

/* Section titles */
.obs-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6e7681;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #21262d;
}

/* Model calls */
.obs-model-calls-section {
    margin-bottom: 14px;
}

.obs-model-call {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 6px;
    margin-bottom: 6px;
}

.model-name {
    font-size: 11px;
    font-weight: 500;
    color: #58a6ff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.model-stats {
    font-size: 10px;
    color: #8b949e;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Variable changes in events panel */
.obs-vars-section {
    margin-bottom: 14px;
}

.obs-var-change {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.obs-var-change.created {
    background: rgba(63, 185, 80, 0.1);
}

.obs-var-change.updated {
    background: rgba(240, 136, 62, 0.1);
}

.obs-var-change.deleted {
    background: rgba(248, 81, 73, 0.1);
}

.var-prefix {
    font-weight: 700;
    width: 12px;
}

.obs-var-change.created .var-prefix { color: #3fb950; }
.obs-var-change.updated .var-prefix { color: #f0883e; }
.obs-var-change.deleted .var-prefix { color: #f85149; }

.var-name {
    color: #7ee787;
}

.var-equals {
    color: #6e7681;
}

.var-value {
    color: #a5d6ff;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCOPE LEGEND
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-scope-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 16px;
    background: #161b22;
    border-top: 1px solid #30363d;
    flex-shrink: 0;
}

.legend-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6e7681;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #8b949e;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLACEHOLDER & LOADING STATES
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6e7681;
    text-align: center;
}

.observatory-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.observatory-placeholder p {
    font-size: 14px;
    margin: 0;
}

.observatory-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 17, 23, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.observatory-loading-content {
    text-align: center;
}

.observatory-loading-telescope {
    font-size: 48px;
    animation: telescope-scan 2s ease-in-out infinite;
}

@keyframes telescope-scan {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.observatory-loading-message {
    margin-top: 16px;
    font-size: 14px;
    color: #8b949e;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════════════════════════════════════════ */

.observatory-timeline-scroll::-webkit-scrollbar,
.obs-panel-content::-webkit-scrollbar,
.scope-variables-list::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.observatory-timeline-scroll::-webkit-scrollbar-track,
.obs-panel-content::-webkit-scrollbar-track,
.scope-variables-list::-webkit-scrollbar-track {
    background: #161b22;
}

.observatory-timeline-scroll::-webkit-scrollbar-thumb,
.obs-panel-content::-webkit-scrollbar-thumb,
.scope-variables-list::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.observatory-timeline-scroll::-webkit-scrollbar-thumb:hover,
.obs-panel-content::-webkit-scrollbar-thumb:hover,
.scope-variables-list::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Toast animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Modal markdown rendered content */
.obs-model-modal-body.markdown-rendered {
    color: #c9d1d9;
    line-height: 1.6;
}

.obs-model-modal-body.markdown-rendered h1,
.obs-model-modal-body.markdown-rendered h2,
.obs-model-modal-body.markdown-rendered h3 {
    color: #e6edf3;
    margin-top: 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 8px;
}

.obs-model-modal-body.markdown-rendered h1 {
    font-size: 24px;
}

.obs-model-modal-body.markdown-rendered h2 {
    font-size: 18px;
}

.obs-model-modal-body.markdown-rendered table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.obs-model-modal-body.markdown-rendered th,
.obs-model-modal-body.markdown-rendered td {
    border: 1px solid #30363d;
    padding: 8px 12px;
    text-align: left;
}

.obs-model-modal-body.markdown-rendered th {
    background: #21262d;
    font-weight: 600;
}

.obs-model-modal-body.markdown-rendered pre {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.obs-model-modal-body.markdown-rendered code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
}

.obs-model-modal-body.markdown-rendered hr {
    border: none;
    border-top: 1px solid #30363d;
    margin: 24px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   A-342: COMPACT HEADER STYLES
   Single-row header with status info and sub-tabs
   ═══════════════════════════════════════════════════════════════════════════ */

.agent-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(180deg, #1e2228 0%, #181c20 100%);
    border-bottom: 1px solid #30363d;
    gap: 12px;
    min-height: 40px;
}

.agent-compact-header .header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.agent-compact-header .btn-back-compact {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: #58a6ff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.agent-compact-header .btn-back-compact:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: #58a6ff;
}

.agent-compact-header .header-title {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
    white-space: nowrap;
}

.agent-compact-header .btn-edit-compact {
    background: transparent;
    border: none;
    color: #8b949e;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.agent-compact-header .btn-edit-compact:hover {
    background: rgba(139, 148, 158, 0.15);
    color: #e6edf3;
}

.agent-compact-header .header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #8b949e;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.agent-compact-header .status-separator {
    color: #30363d;
    font-size: 10px;
}

.agent-compact-header .status-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.agent-compact-header .agent-id-compact {
    display: flex;
    align-items: center;
    gap: 4px;
}

.agent-compact-header .id-text {
    color: #79c0ff;
    cursor: default;
}

.agent-compact-header .btn-copy-id {
    background: transparent;
    border: none;
    color: #8b949e;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.agent-compact-header .btn-copy-id:hover {
    background: rgba(139, 148, 158, 0.15);
    color: #e6edf3;
}

.agent-compact-header .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #484f58;
}

.agent-compact-header .status-dot.status-dot-green {
    background: #3fb950;
    box-shadow: 0 0 4px rgba(63, 185, 80, 0.5);
}

.agent-compact-header .status-dot.status-dot-blue {
    background: #58a6ff;
}

.agent-compact-header .status-dot.status-dot-red {
    background: #f85149;
}

.agent-compact-header .status-dot.status-dot-yellow {
    background: #d29922;
}

.agent-compact-header .status-dot.status-dot-gray {
    background: #484f58;
}

.agent-compact-header .header-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.agent-compact-header .header-tab-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #8b949e;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.agent-compact-header .header-tab-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    color: #e6edf3;
}

.agent-compact-header .header-tab-btn.active {
    background: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.3);
    color: #58a6ff;
}

.agent-compact-header .header-tab-btn .tab-label {
    font-size: 11px;
}

/* Hide tab labels on smaller screens */
@media (max-width: 1200px) {
    .agent-compact-header .header-tab-btn .tab-label {
        display: none;
    }
    
    .agent-compact-header .header-status {
        font-size: 10px;
    }
}

/* A-342: Hide old sub-tab bar if it somehow appears */
.sub-tab-bar#agentsSubTabBar {
    display: none !important;
}

/* A-342: Adjust detail layout without sub-tab bar */
.agents-detail-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.agents-detail-layout .sub-tab-content-area {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   A-342: COMMENT & CODE SECTION STYLES
   Collapsible sections for displaying comments (markdown) and intent code (JSON)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Comment section */
.obs-comment-content {
    background: rgba(88, 166, 255, 0.05);
    border-left: 3px solid #58a6ff;
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #e6edf3;
}

.obs-comment-content h2,
.obs-comment-content h3,
.obs-comment-content h4 {
    color: #79c0ff;
    margin: 0.5em 0;
    font-weight: 600;
}

.obs-comment-content h2 { font-size: 1.3em; }
.obs-comment-content h3 { font-size: 1.1em; }
.obs-comment-content h4 { font-size: 1em; }

.obs-comment-content p {
    margin: 0.5em 0;
}

.obs-comment-content code {
    background: rgba(110, 118, 129, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    color: #f0883e;
}

.obs-comment-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.5em 0;
}

.obs-comment-content pre code {
    background: transparent;
    padding: 0;
    color: #e6edf3;
}

.obs-comment-content strong {
    color: #f0883e;
    font-weight: 600;
}

.obs-comment-content em {
    color: #a5d6ff;
    font-style: italic;
}

.obs-comment-content ul,
.obs-comment-content ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.obs-comment-content li {
    margin: 0.25em 0;
}

.obs-comment-content a {
    color: #58a6ff;
    text-decoration: none;
}

.obs-comment-content a:hover {
    text-decoration: underline;
}

/* Code section */
.obs-code-content {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    overflow: hidden;
}

.obs-intent-code {
    margin: 0;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #e6edf3;
    overflow-x: auto;
    white-space: pre;
    max-height: 300px;
    overflow-y: auto;
}

/* Copy button in section header */
.obs-copy-code-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    transition: all 0.15s ease;
}

.obs-copy-code-btn:hover {
    background: rgba(139, 148, 158, 0.2);
    color: #e6edf3;
}

/* JSON syntax colors in code section */
.obs-intent-code .json-key {
    color: #79c0ff;
}

.obs-intent-code .json-string {
    color: #a5d6ff;
}

.obs-intent-code .json-number {
    color: #f0883e;
}

.obs-intent-code .json-boolean {
    color: #ff7b72;
}

.obs-intent-code .json-null {
    color: #8b949e;
}

/* Section header layout adjustment for copy button */
.obs-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.obs-section-header .obs-copy-code-btn {
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   A-342: QUICK INFO BAR STYLES
   Shows ResultKey, Tags, Iteration info, Model config, Error handling
   ═══════════════════════════════════════════════════════════════════════════ */

.obs-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(88, 166, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid rgba(88, 166, 255, 0.1);
}

.quick-info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #e6edf3;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.quick-info-item .qi-icon {
    font-size: 12px;
    opacity: 0.8;
}

.quick-info-item .qi-label {
    color: #8b949e;
    margin-left: 4px;
}

.quick-info-item .qi-value {
    color: #79c0ff;
    font-weight: 500;
}

/* Result key styling */
.quick-info-item.result-key .qi-icon {
    color: #3fb950;
}

.quick-info-item.result-key .qi-value {
    color: #7ee787;
    background: rgba(63, 185, 80, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Tags styling */
.qi-tag {
    display: inline-block;
    background: rgba(136, 87, 44, 0.3);
    color: #f0883e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 2px;
}

.qi-tag:first-of-type {
    margin-left: 4px;
}

/* Badges */
.qi-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
}

.qi-badge.model {
    background: rgba(136, 46, 224, 0.2);
    color: #d2a8ff;
}

.qi-badge.temp {
    background: rgba(255, 123, 114, 0.15);
    color: #ff7b72;
}

.qi-badge.format {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.qi-badge.parallel {
    background: rgba(255, 217, 61, 0.2);
    color: #ffd93d;
}

.qi-badge.retries {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.qi-badge.error-strategy {
    background: rgba(210, 153, 34, 0.2);
    color: #d29922;
}

/* Iteration info */
.quick-info-item.iteration .qi-value {
    color: #a5d6ff;
}

/* Model info */
.quick-info-item.model-info {
    background: rgba(136, 46, 224, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
}

/* Error handling */
.quick-info-item.error-handling {
    background: rgba(210, 153, 34, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   A-342: INLINE HEADER ELEMENTS
   ResultKey, Tags, and Rover button on same line as intent name
   ═══════════════════════════════════════════════════════════════════════════ */

.obs-step-main-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Result key inline */
.obs-result-key {
    color: #7ee787;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    background: rgba(63, 185, 80, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(63, 185, 80, 0.2);
}

/* Tags array style */
.obs-tags-array {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: #8b949e;
}

.obs-tag-item {
    color: #f0883e;
}

/* Inline rover button (smaller) */
.obs-rover-btn-inline {
    background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    border: 1px solid #2ea043;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.obs-rover-btn-inline:hover {
    background: linear-gradient(135deg, #2ea043 0%, #3fb950 100%);
    border-color: #3fb950;
    box-shadow: 0 2px 6px rgba(46, 160, 67, 0.3);
}

/* Update header layout */
.obs-event-step-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

/* Hide old rover actions div if present */
.obs-rover-actions {
    display: none;
}