/**
 * Console output styles for Konui.
 * Used by dashboard console and turn playback views.
 *
 * Extracted from console-styles.ts for external CSS loading.
 * Source: /konnectvol/konui/src/views/layout/console-styles.ts
 */

.console-output {
  background: #141414; /* greatVibe brand --color-bg, replaces Konnect navy #1a1a2e (2026-04-25) */
  padding: 8px 12px;
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 11px;
  line-height: 1.4;
}
.console-output::-webkit-scrollbar {
  width: 6px;
}
.console-output::-webkit-scrollbar-track {
  background: #141414; /* matches console bg so the track disappears (was #0d0d1a navy until 2026-04-25) */
}
.console-output::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
.console-line {
  white-space: pre-wrap;
  word-break: break-word;
  color: #ccc;
  margin-bottom: 2px;
}
.console-history-gap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0;
  padding: 8px 12px;
  border: 1px solid #ffffff0d;
  border-radius: 8px;
  background: #ffffff03;
  color: #9ba5b2;
  font: 400 12px/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  white-space: normal;
}
.console-history-gap-label { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.console-history-gap-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid #ffffff26;
  border-radius: 6px;
  background: #24282d;
  color: #c7d3df;
  font: 600 12px/1.4 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  white-space: normal;
  cursor: pointer;
}
.console-history-gap-action:hover { background: #30363e; border-color: #ffffff40; }
.console-history-gap-action:focus-visible { outline: 2px solid #61afef; outline-offset: 2px; }
@media (max-width: 600px), (pointer: coarse) {
  .console-history-gap-action { min-height: 44px; }
}
.console-line.system {
  color: #666;
  font-style: italic;
}
.console-line.assistant {
  color: #69db7c;
}
.console-line.tool {
  color: #ffa94d;
}
.console-line.result {
  color: #51cf66;
  font-size: 11px;
}
.console-line.error {
  color: #ff6b6b;
}

/* Context reset divider - visual separator for soft resets */
.context-reset-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #555;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.context-reset-divider::before,
.context-reset-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #444, transparent);
}
.context-reset-divider .reset-text {
  white-space: nowrap;
  padding: 4px 8px;
  background: rgba(85, 85, 85, 0.2);
  border-radius: 4px;
}

/* Tree structure formatting */
.console-line .tree-prefix {
  color: #666;
  font-family: "Consolas", "Monaco", monospace;
  user-select: none;
}
.console-line.tool .tree-prefix {
  color: #ffa94d;
}
.console-line.result .tree-prefix {
  color: #51cf66;
}
.console-line.tool-child {
  color: #888;
  padding-left: 24px;
  font-size: 11px;
}
.console-line.tool-child .tree-prefix {
  color: #555;
}
/* Assistant text bubble — W-004: mirrors .user-prompt style with agent chrome */
.console-line.assistant-text {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --prompt-color: #cc785c;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--prompt-color) 15%, #1a1f2e),
    color-mix(in srgb, var(--prompt-color) 6%, #1e1e1e)
  );
  border: 2px solid color-mix(in srgb, var(--prompt-color) 40%, transparent);
  border-radius: 24px;
  overflow: visible;
  padding: 12px 14px 10px;
  margin: 10px 0 4px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--prompt-color) 15%, transparent), inset 0 1px 0 color-mix(in srgb, var(--prompt-color) 12%, transparent);
  max-width: 100%;
  white-space: normal;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.console-line[hidden] {
  display: none !important;
}
.console-line.assistant-text:hover {
  border-color: color-mix(in srgb, var(--prompt-color) 55%, transparent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--prompt-color) 20%, transparent), inset 0 1px 0 color-mix(in srgb, var(--prompt-color) 15%, transparent);
}
.console-line.assistant-text[data-agent="codex"] {
  --prompt-color: #10a37f;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #10a37f 12%, #141414),
    color-mix(in srgb, #1dd1a1 5%, #1e1e1e)
  );
  border-color: color-mix(in srgb, #10a37f 48%, transparent);
  box-shadow: 0 2px 14px color-mix(in srgb, #10a37f 18%, transparent), inset 0 1px 0 color-mix(in srgb, #ffffff 5%, transparent);
}
.console-line.assistant-text[data-agent="codex"]:hover {
  border-color: color-mix(in srgb, #10a37f 64%, transparent);
  box-shadow: 0 4px 22px color-mix(in srgb, #10a37f 24%, transparent), inset 0 1px 0 color-mix(in srgb, #ffffff 7%, transparent);
}
.console-line.assistant-text::before {
  content: none;
}
.console-line.assistant-text .prompt-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.console-line.assistant-text .prompt-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background-color: #141414;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid color-mix(in srgb, var(--prompt-color) 40%, transparent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.console-line.assistant-text .prompt-avatar img {
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
  object-position: center;
  background: #141414;
  border-radius: 50%;
}
.console-line.assistant-text .prompt-name-block {
  flex: 1;
}
.console-line.assistant-text .prompt-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.console-line.assistant-text .prompt-time {
  color: #7f848e;
  font-size: 11px;
  margin-top: 1px;
}
.console-line.assistant-text .prompt-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.console-line.assistant-text .prompt-node-badge {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.console-line.assistant-text .prompt-username {
  font-weight: 700;
  font-size: 15px;
  color: var(--prompt-color);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.console-line.assistant-text .prompt-model-badge {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: color-mix(in srgb, var(--prompt-color) 20%, transparent);
  color: var(--prompt-color);
  letter-spacing: 0.3px;
}
.console-line.assistant-text .prompt-body {
  color: #f0f0f0;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
  padding-left: 0;
  position: relative;
}
.console-line.assistant-text .prompt-body.collapsible {
  max-height: 116px;
  overflow: hidden;
  cursor: pointer;
}
.console-line.assistant-text .prompt-body.collapsible::after {
  content: "\25BC show more";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 8px 4px 2px;
  background: linear-gradient(
    transparent,
    color-mix(in srgb, #1a1f2e 95%, var(--prompt-color))
  );
  color: #7f848e;
  font-size: 10px;
}
.console-line.assistant-text .prompt-body.collapsible.expanded {
  max-height: none;
  overflow: visible;
}
.console-line.assistant-text .prompt-body.collapsible.expanded::after {
  content: "\25B2 show less";
  position: relative;
  display: block;
  background: none;
  padding: 4px 0 0;
}
.console-line.user-prompt .prompt-body.collapsible {
  max-height: 116px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.console-line.user-prompt .prompt-body.collapsible::after {
  content: "\25BC show more";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 8px 4px 2px;
  background: linear-gradient(
    transparent,
    color-mix(in srgb, #1a1f2e 95%, var(--prompt-color, #c9956a))
  );
  color: #7f848e;
  font-size: 10px;
}
.console-line.user-prompt .prompt-body.collapsible.expanded {
  max-height: none;
  overflow: visible;
}
.console-line.user-prompt .prompt-body.collapsible.expanded::after {
  content: "\25B2 show less";
  position: relative;
  display: block;
  background: none;
  padding: 4px 0 0;
}
/* Todo list display */
.console-line.todo-container {
  padding-left: 12px;
  margin: 4px 0;
}
.todo-list {
  background: rgba(201, 149, 66, 0.08);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: #aaa;
}
.todo-icon {
  font-weight: bold;
  width: 14px;
  text-align: center;
}
.todo-item.todo-completed {
  color: #51cf66;
  text-decoration: line-through;
  opacity: 0.7;
}
.todo-item.todo-completed .todo-icon {
  color: #51cf66;
}
.todo-item.todo-in_progress {
  color: #ffa94d;
  font-weight: 500;
}
.todo-item.todo-in_progress .todo-icon {
  color: #ffa94d;
}
.todo-item.todo-pending {
  color: #888;
}
.todo-item.todo-pending .todo-icon {
  color: #666;
}

.cross-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #cc785c22;
  padding: 2px 8px;
  border-radius: 12px;
  color: #cc785c;
  font-size: 11px;
}

/* Phase 4: Presence avatar bar — stacked circles in gv-node-bar */
.presence-avatar-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 8px;
}
.presence-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3d3d3d;
  border: 2px solid #1a1a2e;
  color: #e0e0e0;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  cursor: default;
  transition: transform 0.15s ease;
}
.presence-avatar:first-child {
  margin-left: 0;
}
.presence-avatar:hover {
  transform: translateY(-2px);
  z-index: 1;
}
.presence-avatar.presence-working {
  border-color: #cc785c;
  background: #cc785c33;
  color: #cc785c;
  animation: presence-pulse 1.5s ease-in-out infinite;
}
@keyframes presence-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
/* Send button transforms to working user's avatar when a turn is active */
.console-submit.presence-working-btn {
  background: transparent;
  border: 3px solid #cc785c;
  padding: 0;
  overflow: hidden;
  animation: presence-pulse 1.5s ease-in-out infinite;
  font-size: 10px;
  font-weight: 600;
  color: #cc785c;
}
.console-submit.presence-working-btn:hover {
  transform: none;
  background: transparent;
}

/* Local greatVibe session status — transient console UI, not AI output */
.thinking-indicator {
  --prompt-color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 4px 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--prompt-color) 6%, transparent),
    color-mix(in srgb, var(--prompt-color) 2%, transparent)
  );
  border: 2px solid color-mix(in srgb, var(--prompt-color) 40%, transparent);
  border-radius: 16px;
  color: #7f848e;
  font-size: 12px;
  animation: thinking-fade-in 0.3s ease;
}
.thinking-indicator[data-agent="greatvibe"] {
  --prompt-color: #f59e0b;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #f59e0b 10%, #141414),
    color-mix(in srgb, #c2410c 5%, #1e1e1e)
  );
  border: 2px solid color-mix(in srgb, #f59e0b 40%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 5%, transparent);
  /* 2026-05-13: scaled up to sit in proportion with the message cards.
     Inline styles in console-ui.ts set padding + font-size + avatar size,
     but text + detail font-sizes and gap live in CSS — bump them here. */
  gap: 12px;
  border-radius: 18px;
}
.thinking-indicator[data-agent="greatvibe"] .thinking-avatar {
  width: 32px;
  height: 32px;
  opacity: 0.85;
}
.thinking-indicator[data-agent="greatvibe"] .thinking-avatar img {
  /* 2026-05-13: override the base 22px max-width cap so the inline
     32px width from gvBuildGreatVibeStatusHtml takes effect. */
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
}
.thinking-indicator[data-agent="greatvibe"] .thinking-text {
  font-size: 14px;
}
.thinking-indicator[data-agent="greatvibe"] .thinking-detail {
  font-size: 12px;
}
.thinking-indicator[data-stage="history-error"],
.thinking-indicator.stall-warning {
  --prompt-color: #e06c75;
  border-color: color-mix(in srgb, #e06c75 45%, transparent);
}
.gv-local-status[data-gv-local-status^="turn-output-error-"] {
  align-items: flex-start;
  flex-wrap: wrap;
}
.gv-local-status[data-gv-local-status^="turn-output-error-"] .thinking-text {
  flex: 1 1 240px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.gv-local-status[data-gv-local-status^="turn-output-error-"] .thinking-detail {
  flex: 1 1 100%;
  min-width: 0;
  margin-left: 44px;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
@media (max-width: 600px) {
  .gv-local-status[data-gv-local-status^="turn-output-error-"] {
    gap: 8px;
    padding: 10px 12px !important;
  }
  .gv-local-status[data-gv-local-status^="turn-output-error-"] .thinking-detail {
    margin-left: 0;
  }
}
.thinking-indicator .thinking-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  opacity: 0.7;
  background: #141414;
}
.thinking-indicator .thinking-avatar img {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  object-position: center;
  background: #141414;
  border-radius: 50%;
}
.thinking-indicator .thinking-text {
  color: #ffffffcc;
  font-size: 11px;
}
.thinking-indicator .thinking-detail {
  color: #7f848e;
  font-size: 11px;
  margin-left: auto;
}
.thinking-indicator .thinking-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.thinking-indicator .thinking-dots span {
  width: 4px;
  height: 4px;
  background: var(--prompt-color);
  border-radius: 50%;
  opacity: 0.4;
  animation: thinking-bounce 1.4s infinite ease-in-out both;
}
.thinking-indicator .thinking-dots span:nth-child(1) {
  animation-delay: 0s;
}
.thinking-indicator .thinking-dots span:nth-child(2) {
  animation-delay: 0.16s;
}
.thinking-indicator .thinking-dots span:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes thinking-bounce {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}
@keyframes thinking-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Response group - collapsible */
.response-group {
  margin-bottom: 4px;
}
.response-group .response-content .console-line {
  transition: max-height 0.2s ease, opacity 0.15s ease;
  overflow: hidden;
}
.response-group .response-content .console-line.assistant-text {
  overflow: visible;
}
.response-group.collapsed .response-content .console-line {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
  padding: 0;
}
.response-group.collapsed .response-content .tool-with-content,
.response-group.collapsed .response-content .console-rich-output {
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.response-group.collapsed .response-content .console-output-card {
  display: block;
}
.response-group.collapsed .response-content .steering-receipt {
  display: none;
}

/* Inline kontask output card */
.console-output-card {
  --gvturn-card-color: #cc785c;
  margin: 8px 0;
  padding: 10px;
  background: #141414;
  border: 2px solid color-mix(in srgb, var(--gvturn-card-color) 40%, transparent);
  border-radius: 24px;
  /* 2026-04-26: Inter primary, Lato secondary, system fallback. Aligns with
     sdk_gvturn-output-style. Inline-styled cards still win on specificity;
     this only affects unstyled HTML payloads that drop into the card. */
  font-family: "Inter", "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.console-output-card[data-agent="claude"] {
  --gvturn-card-color: #cc785c;
  border-color: color-mix(in srgb, #cc785c 40%, transparent);
}
.console-output-card[data-agent="codex"] {
  --gvturn-card-color: #10a37f;
  border-color: color-mix(in srgb, #10a37f 48%, transparent);
}
.console-output-card > div[style*="background:rgb(30,30,30)"],
.console-output-card > div[style*="background: rgb(30,30,30)"],
.console-output-card > div[style*="background:#1e1e1e"],
.console-output-card > div[style*="background: #1e1e1e"] {
  background: #141414 !important;
}
.console-output-card [data-power-footer] {
  background: #141414 !important;
  background-image: none !important;
  border: 0 !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-image: none !important;
}
.console-output-card [data-power-footer] > [style*="position:absolute"][style*="inset:0"] {
  display: none !important;
}
/* gvturn-output-style fallback baseline (sdk_gvturn-output-style § Konui-side
   fallback wrapper). Applies to unstyled HTML emitted by mesh nodes that
   don't embed the inline patterns yet. Specificity is intentionally low
   so any inline style on a card overrides these defaults. */
.console-output-card h2 {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: rgb(255, 255, 255);
  margin: 0 0 4px;
  line-height: 1.25;
}
.console-output-card h3 {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgb(255, 255, 255);
  margin: 12px 0 4px;
}
.console-output-card p {
  color: rgb(224, 224, 224);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 12px;
}
.console-output-card p:last-child {
  margin-bottom: 0;
}
.console-output-card em,
.console-output-card .gvturn-footer {
  font-style: italic;
  color: rgb(127, 132, 142);
  font-size: 13px;
}
.console-output-card strong {
  color: rgb(255, 255, 255);
  font-weight: 600;
}

/* New kontask card glow animation - matches timeline's new-card-glow */
.console-output-card.new {
  /* Initial glow state follows the generating agent chrome. */
  /* Note: box-shadow paints outside border-box regardless of overflow — no need for overflow:visible */
  box-shadow: inset 0 0 30px color-mix(in srgb, var(--gvturn-card-color) 20%, transparent), 0 0 20px color-mix(in srgb, var(--gvturn-card-color) 38%, transparent), 0 0 40px color-mix(in srgb, var(--gvturn-card-color) 18%, transparent);
  animation: console-card-glow 10s ease-out forwards;
}

@keyframes console-card-glow {
  0% {
    box-shadow: inset 0 0 30px color-mix(in srgb, var(--gvturn-card-color) 20%, transparent), 0 0 20px color-mix(in srgb, var(--gvturn-card-color) 38%, transparent), 0 0 40px color-mix(in srgb, var(--gvturn-card-color) 18%, transparent);
  }
  15% {
    box-shadow: inset 0 0 35px color-mix(in srgb, var(--gvturn-card-color) 24%, transparent), 0 0 25px color-mix(in srgb, var(--gvturn-card-color) 45%, transparent), 0 0 50px color-mix(in srgb, var(--gvturn-card-color) 24%, transparent);
  }
  40% {
    box-shadow: inset 0 0 20px color-mix(in srgb, var(--gvturn-card-color) 10%, transparent), 0 0 12px color-mix(in srgb, var(--gvturn-card-color) 20%, transparent), 0 0 25px color-mix(in srgb, var(--gvturn-card-color) 10%, transparent);
  }
  100% {
    box-shadow: none;
  }
}
/* Ensure all nested elements respect container width */
.console-output-card * {
  max-width: 100%;
  box-sizing: border-box;
}
.console-output-card div {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.console-output-card pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
  overflow-x: hidden;
  max-width: 100%;
}
.console-output-card code {
  word-break: break-all;
}
/* Collapse grid layouts on narrow screens */
@media (max-width: 600px) {
  .console-output-card [style*="grid-template-columns"] {
    display: block !important;
  }
  .console-output-card [style*="display:grid"],
  .console-output-card [style*="display: grid"] {
    display: block !important;
  }
}
.console-output-card .listings-report,
.console-output-card .listing-summary {
  background: transparent;
}
.console-output-card h2, .console-output-card h3 {
  color: var(--accent, #c99542);
  font-size: 11px;
  margin-bottom: 6px;
}

/* ============ RICH OUTPUT STYLES ============ */
.console-rich-output {
  margin: 4px 0 4px 12px;
  font-size: 11px;
}

/* Diff rendering */
.rich-diff {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  overflow: hidden;
  margin: 4px 0;
}
.rich-diff .diff-header {
  background: #252545;
  padding: 6px 8px;
  color: #56b6c2;
  font-size: 11px;
  border-bottom: 1px solid #2a2a4a;
  font-family: monospace;
}
.rich-diff .diff-content {
  max-height: 400px;
  overflow: auto;
  background: #151525;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
  line-height: 1.5;
}
.rich-diff .diff-line {
  display: flex;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
}
.rich-diff .diff-line:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-diff .diff-del {
  background: rgba(224, 108, 117, 0.1);
}
.rich-diff .diff-del .diff-marker {
  color: #e06c75;
}
.rich-diff .diff-del .diff-code {
  color: #ccc;
}
.rich-diff .diff-add {
  background: rgba(152, 195, 121, 0.1);
}
.rich-diff .diff-add .diff-marker {
  color: #98c379;
}
.rich-diff .diff-add .diff-code {
  color: #ccc;
}
.rich-diff .diff-info {
  color: #666;
  font-style: italic;
  padding: 4px 8px;
  font-size: 11px;
}
.rich-diff .diff-gutter {
  display: inline-flex;
  align-items: baseline;
  min-width: 52px;
  padding: 0 4px 0 4px;
  flex-shrink: 0;
  border-right: 1px solid #2a2a4a;
  user-select: none;
}
.rich-diff .diff-marker {
  display: inline-block;
  width: 14px;
  font-weight: bold;
  font-size: 11px;
}
.rich-diff .diff-num {
  display: inline-block;
  width: 30px;
  color: #555;
  text-align: right;
  font-size: 11px;
}
.rich-diff .diff-code {
  padding: 0 8px;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
}

/* File list (Glob) */
.rich-files {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-files .files-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
}
.rich-files .files-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-files .files-header code {
  background: #252545;
  padding: 1px 4px;
  border-radius: 2px;
  color: #ffa94d;
}
.rich-files .files-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 11px;
}
.rich-files .files-list {
  display: none;
  max-height: 200px;
  overflow-y: auto;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
  font-family: monospace;
  font-size: 11px;
}
.rich-files .files-list.expanded {
  display: block;
}
.rich-files .file-item {
  padding: 2px 8px 2px 24px;
  color: #69db7c;
}
.rich-files .file-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-files .files-more {
  padding: 4px 8px;
  color: #666;
  font-style: italic;
  font-size: 11px;
}

/* Search results (Grep) */
/* Grep result card. Restyled 2026-04-25: file groups, internal padding,
   warm-black bg matching console; left/right margins so the card doesn't
   ride the gvturn border. Mirror of src/views/layout/console-styles.ts. */
.rich-search {
  background: #141414;
  border: 1px solid #2a2a4a;
  border-radius: 6px;
  margin: 6px 4px;
  overflow: hidden;
}
.rich-search .search-header {
  padding: 8px 12px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a2e;
}
.rich-search .search-header:hover {
  background: #1e1e36;
}
.rich-search .search-pattern,
.rich-search .search-header code {
  background: #2a1f10;
  border: 1px solid #ffa94d44;
  padding: 2px 8px;
  border-radius: 3px;
  color: #ffa94d;
  font-family: monospace;
  font-size: 11px;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-search .search-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 11px;
  color: #7f848e;
}
.rich-search .search-info {
  color: #888;
  font-size: 11px;
  flex: 1;
}
.rich-search .search-content {
  display: none;
  max-height: 480px;
  overflow: auto;
  border-top: 1px solid #2a2a4a;
  background: #141414;
  padding: 4px 0;
}
.rich-search .search-content.expanded {
  display: block;
}
.rich-search .search-line {
  display: flex;
  line-height: 1.55;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
  padding-left: 24px;
}
.rich-search .search-line:hover {
  background: rgba(255, 255, 255, 0.04);
}
.rich-search .search-num {
  display: inline-block;
  min-width: 44px;
  padding: 0 10px 0 4px;
  color: #5e6478;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
  border-right: 1px solid #2a2a4a;
}
.rich-search .search-code {
  padding: 0 12px;
  color: #d0d3d8;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
}
.rich-search .search-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 6px;
  margin-top: 6px;
  color: #61afef;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11.5px;
  font-weight: 600;
  background: #181828;
  border-top: 1px solid #2a2a4a;
  border-bottom: 1px solid #2a2a4a;
}
.rich-search .search-file:first-child {
  border-top: none;
  margin-top: 0;
}
.rich-search .search-file-icon {
  color: #5e6478;
  font-size: 10px;
  flex-shrink: 0;
}
.rich-search .search-file-count {
  margin-left: auto;
  background: #61afef22;
  color: #61afef;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  font-family: "Consolas", "Monaco", monospace;
}
.rich-search .search-highlight {
  background: rgba(255, 169, 77, 0.22);
  color: #ffa94d;
  border-radius: 2px;
  padding: 0 1px;
}
.rich-search .search-more {
  padding: 6px 12px 8px 24px;
  color: #7f848e;
  font-style: italic;
  font-size: 11px;
}
.rich-search .search-more-file {
  padding-left: 40px;
  color: #5e6478;
}

/* Shell output (Bash) */
.rich-shell {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-shell .shell-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rich-shell .shell-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-shell .shell-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 11px;
}
.rich-shell .shell-cmd {
  background: #252545;
  padding: 2px 6px;
  border-radius: 3px;
  color: #ffa94d;
  font-family: monospace;
  font-size: 11px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-shell .shell-info {
  color: #666;
  font-size: 11px;
}
.rich-shell .shell-output {
  display: none;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid #2a2a4a;
  background: #151525;
}
.rich-shell .shell-output.expanded {
  display: block;
}
.rich-shell .shell-output pre {
  margin: 0;
  padding: 8px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #ccc;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Read file viewer */
.rich-read {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-read .read-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rich-read .read-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-read .read-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 11px;
}
.rich-read .read-path {
  background: #252545;
  padding: 2px 6px;
  border-radius: 3px;
  color: #56b6c2;
  font-family: monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-read .read-info {
  color: #666;
  font-size: 11px;
  white-space: nowrap;
}
.rich-read .read-content {
  display: none;
  max-height: 400px;
  overflow: auto;
  border-top: 1px solid #2a2a4a;
  background: #151525;
}
.rich-read .read-content.expanded {
  display: block;
}
.rich-read .read-line {
  display: flex;
  line-height: 1.5;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
}
.rich-read .read-line:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-read .read-num {
  display: inline-block;
  min-width: 40px;
  padding: 0 8px 0 4px;
  color: #555;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
  border-right: 1px solid #2a2a4a;
}
.rich-read .read-code {
  padding: 0 8px;
  color: #ccc;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
}
.rich-read .read-more {
  padding: 4px 8px;
  color: #666;
  font-style: italic;
  font-size: 11px;
}

/* Log tail viewer */
.rich-logtail {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-logtail .logtail-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rich-logtail .logtail-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-logtail .logtail-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 11px;
}
.rich-logtail .logtail-icon {
  font-size: 11px;
}
.rich-logtail .logtail-path {
  background: #252545;
  padding: 2px 6px;
  border-radius: 3px;
  color: #e5c07b;
  font-family: monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-logtail .logtail-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}
.rich-logtail .logtail-pathfull {
  padding: 0 8px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-logtail .logtail-content {
  display: none;
  max-height: 500px;
  overflow: auto;
  border-top: 1px solid #2a2a4a;
  background: #151525;
}
.rich-logtail .logtail-content.expanded {
  display: block;
}
.rich-logtail .logtail-line {
  display: flex;
  line-height: 1.5;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
}
.rich-logtail .logtail-line:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-logtail .logtail-num {
  display: inline-block;
  min-width: 40px;
  padding: 0 8px 0 4px;
  color: #555;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
  border-right: 1px solid #2a2a4a;
}
.rich-logtail .logtail-text {
  padding: 0 8px;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
}
.rich-logtail .logtail-more {
  padding: 4px 8px;
  color: #666;
  font-style: italic;
  font-size: 11px;
}

/* Write file card */
.rich-write {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-write .write-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rich-write .write-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-write .write-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 11px;
}
.rich-write .write-path {
  background: #252545;
  padding: 2px 6px;
  border-radius: 3px;
  color: #cc785c;
  font-family: monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-write .write-badge {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.rich-write .write-info {
  color: #666;
  font-size: 11px;
  white-space: nowrap;
}
.rich-write .write-content {
  display: none;
  max-height: 400px;
  overflow: auto;
  border-top: 1px solid #2a2a4a;
  background: #151525;
}
.rich-write .write-content.expanded {
  display: block;
}
.rich-write .write-line {
  display: flex;
  line-height: 1.5;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
}
.rich-write .write-line:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-write .write-num {
  display: inline-block;
  min-width: 40px;
  padding: 0 8px 0 4px;
  color: #555;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
  border-right: 1px solid #2a2a4a;
}
.rich-write .write-code {
  padding: 0 8px;
  color: #ccc;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
}
.rich-write .write-more {
  padding: 4px 8px;
  color: #666;
  font-style: italic;
  font-size: 11px;
}

/* WebFetch result */
.rich-webfetch {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-webfetch .webfetch-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rich-webfetch .webfetch-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-webfetch .webfetch-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 11px;
}
.rich-webfetch .webfetch-icon {
  font-size: 11px;
}
.rich-webfetch .webfetch-url {
  background: #252545;
  padding: 2px 6px;
  border-radius: 3px;
  color: #61afef;
  font-family: monospace;
  font-size: 11px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-webfetch .webfetch-url:hover {
  text-decoration: underline;
  color: #7cc4f8;
}
.rich-webfetch .webfetch-prompt {
  color: #7f848e;
  font-size: 11px;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.rich-webfetch .webfetch-content {
  display: none;
  max-height: 400px;
  overflow: auto;
  border-top: 1px solid #2a2a4a;
  background: #151525;
}
.rich-webfetch .webfetch-content.expanded {
  display: block;
}
.rich-webfetch .webfetch-prompt-full {
  padding: 6px 8px;
  color: #e5c07b;
  font-size: 11px;
  font-style: italic;
  border-bottom: 1px solid #2a2a4a;
}
.rich-webfetch .webfetch-summary {
  padding: 8px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #ccc;
  white-space: pre-wrap;
  word-break: break-word;
}
/* WebFetch — modernised header (matches WebSearch aesthetic) */
.rich-webfetch .webfetch-header {
  background: linear-gradient(
    180deg,
    rgba(97, 175, 239, 0.06) 0%,
    transparent 100%
  );
  padding: 8px 10px !important;
  gap: 8px !important;
}
.rich-webfetch .webfetch-domain-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rich-webfetch .webfetch-url {
  font-weight: 500;
  flex-shrink: 0;
}
.rich-webfetch .webfetch-path {
  color: #555;
  font-family: monospace;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
/* WebFetch failure variant */
.rich-webfetch.webfetch-error {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.05);
}
.rich-webfetch.webfetch-error .webfetch-header {
  color: #ffa4a4;
}
.rich-webfetch .webfetch-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 10px;
  font-weight: 700;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.45);
  letter-spacing: 0.5px;
  margin-left: auto;
}
/* WebFetch — prompt + summary body */
.rich-webfetch .webfetch-prompt-full {
  padding: 8px 12px;
  color: #e5c07b;
  font-size: 12px;
  border-bottom: 1px solid #2a2a4a;
  background: rgba(229, 192, 123, 0.04);
}
.rich-webfetch .wf-asked {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(229, 192, 123, 0.15);
  border: 1px solid rgba(229, 192, 123, 0.3);
  color: #e5c07b;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  vertical-align: middle;
}
.rich-webfetch .webfetch-summary {
  padding: 10px 14px 12px;
  color: #ccc;
  font-size: 12px;
  line-height: 1.55;
  font-family: -apple-system, "Segoe UI", sans-serif;
}
.rich-webfetch .webfetch-summary .wf-h2 {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  margin: 12px 0 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid #2a2a4a;
}
.rich-webfetch .webfetch-summary .wf-h2:first-child {
  margin-top: 0;
}
.rich-webfetch .webfetch-summary .wf-h3 {
  color: #61afef;
  font-weight: 600;
  font-size: 12px;
  margin: 10px 0 3px;
}
.rich-webfetch .webfetch-summary .wf-h3-num {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-right: 6px;
  border-radius: 9px;
  background: rgba(97, 175, 239, 0.15);
  color: #61afef;
  font-family: monospace;
  font-size: 10px;
  text-align: center;
}
.rich-webfetch .webfetch-summary .wf-p {
  margin: 4px 0 6px;
  color: #ccc;
}
.rich-webfetch .webfetch-summary .wf-strong {
  color: #fff;
  font-weight: 600;
}
.rich-webfetch .webfetch-summary .wf-code {
  background: #252545;
  border: 1px solid #2a2a4a;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 11px;
  color: #56b6c2;
}
.rich-webfetch .webfetch-summary .wf-list {
  margin: 4px 0 8px 18px;
  padding: 0;
  list-style: disc;
}
.rich-webfetch .webfetch-summary .wf-list li {
  margin: 2px 0;
  color: #ccc;
}
.rich-webfetch .webfetch-summary .wf-truncated {
  margin-top: 8px;
  padding: 4px 8px;
  border-top: 1px dashed #2a2a4a;
  color: #7f848e;
  font-size: 10px;
  font-style: italic;
  text-align: center;
}

/* WebSearch result */
.rich-websearch {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
  overflow: hidden;
}
.rich-websearch .websearch-header {
  padding: 8px 10px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(
    180deg,
    rgba(97, 175, 239, 0.06) 0%,
    transparent 100%
  );
}
.rich-websearch .websearch-header:hover {
  background: rgba(255, 255, 255, 0.04);
}
.rich-websearch .websearch-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 10px;
  color: #7f848e;
}
.rich-websearch .websearch-icon {
  font-size: 12px;
}
.rich-websearch .websearch-query {
  background: #252545;
  padding: 3px 8px;
  border-radius: 3px;
  color: #e5c07b;
  font-family: monospace;
  font-size: 11px;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-websearch .websearch-count {
  color: #98c379;
  font-size: 10px;
  font-family: monospace;
  white-space: nowrap;
  background: rgba(152, 195, 121, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(152, 195, 121, 0.2);
}
.rich-websearch .websearch-content {
  display: none;
  max-height: 460px;
  overflow: auto;
  background: #151525;
}
.rich-websearch .websearch-content.expanded {
  display: block;
}
.rich-websearch .websearch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.rich-websearch .websearch-row {
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  transition: background 0.1s;
}
.rich-websearch .websearch-row:last-child {
  border-bottom: none;
}
.rich-websearch .websearch-row:hover {
  background: rgba(97, 175, 239, 0.04);
}
.rich-websearch .websearch-cell-num {
  width: 28px;
  padding: 8px 4px 8px 10px;
  color: #555;
  font-family: monospace;
  font-size: 10px;
  text-align: right;
  vertical-align: top;
}
.rich-websearch .websearch-cell-domain {
  width: 140px;
  max-width: 180px;
  padding: 8px 8px;
  color: #7f848e;
  font-family: monospace;
  font-size: 11px;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rich-websearch .websearch-domain-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.rich-websearch .websearch-domain-text {
  vertical-align: middle;
}
.rich-websearch .websearch-cell-title {
  padding: 8px 10px 8px 4px;
  vertical-align: top;
  line-height: 1.4;
}
.rich-websearch .websearch-link {
  color: #61afef;
  text-decoration: none;
  font-weight: 500;
}
.rich-websearch .websearch-link:hover {
  text-decoration: underline;
  color: #7cc4f8;
}
.rich-websearch .websearch-path {
  color: #555;
  font-family: monospace;
  font-size: 10px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-websearch .websearch-empty {
  padding: 12px 14px;
  color: #7f848e;
  font-size: 11px;
  font-style: italic;
  text-align: center;
}
.rich-websearch .websearch-prose {
  padding: 8px 12px;
  border-top: 1px solid #2a2a4a;
  color: #ccc;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(40, 40, 60, 0.4);
}

/* Diff --stat grid (balanced columns) */
.rich-diff .diff-stat-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 42px minmax(60px, 120px);
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
}
.rich-diff .diff-stat-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-diff .diff-stat-file {
  color: #61afef;
  font-family: monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-diff .diff-stat-count {
  color: #7f848e;
  font-size: 12px;
  text-align: right;
  font-family: monospace;
}
.rich-diff .diff-stat-bar {
  display: flex;
  align-items: center;
}

/* Git log (commit cards) */
.rich-gitlog {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-gitlog .gitlog-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rich-gitlog .gitlog-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-gitlog .gitlog-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 10px;
}
.rich-gitlog .gitlog-list {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
}
.rich-gitlog .gitlog-list.expanded {
  display: block;
}
.rich-gitlog .gitlog-entry {
  padding: 6px 10px;
  font-size: 11px;
  border-bottom: 1px solid #22224a;
}
.rich-gitlog .gitlog-entry:last-child {
  border-bottom: none;
}
.rich-gitlog .gitlog-entry:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-gitlog .gitlog-entry-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rich-gitlog .gitlog-hash {
  background: #252545;
  padding: 1px 5px;
  border-radius: 3px;
  color: #e5c07b;
  font-family: monospace;
  font-size: 12px;
  flex-shrink: 0;
}
.rich-gitlog .gitlog-msg {
  color: #e0e0e0;
  padding: 2px 0 0 0;
  line-height: 1.4;
  word-break: break-word;
}
.rich-gitlog .gitlog-author {
  color: #7f848e;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: auto;
}
.rich-gitlog .gitlog-date {
  color: #555;
  font-size: 11px;
  flex-shrink: 0;
}
.rich-gitlog .gitlog-ref {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  font-family: monospace;
  flex-shrink: 0;
}
.rich-gitlog .gitlog-ref-head {
  background: #98c37922;
  color: #98c379;
}
.rich-gitlog .gitlog-ref-branch {
  background: #cc785c22;
  color: #cc785c;
}
.rich-gitlog .gitlog-ref-remote {
  background: #61afef22;
  color: #61afef;
}
.rich-gitlog .gitlog-ref-tag {
  background: #e5c07b22;
  color: #e5c07b;
}

/* Git status (categorized files) */
.rich-gitstatus {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-gitstatus .gitstatus-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rich-gitstatus .gitstatus-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-gitstatus .gitstatus-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 10px;
}
.rich-gitstatus .gitstatus-badge {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.rich-gitstatus .gitstatus-branch-badge {
  background: #cc785c22;
  color: #cc785c;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  font-family: monospace;
}
.rich-gitstatus .gitstatus-list {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
}
.rich-gitstatus .gitstatus-list.expanded {
  display: block;
}
.rich-gitstatus .gitstatus-group {
  padding: 4px 0;
  margin: 2px 8px;
}
.rich-gitstatus .gitstatus-group-label {
  padding: 2px 0 2px 2px;
  color: #7f848e;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.rich-gitstatus .gitstatus-file {
  padding: 3px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.rich-gitstatus .gitstatus-file:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}
.rich-gitstatus .gitstatus-icon {
  font-family: monospace;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.rich-gitstatus .gitstatus-path {
  font-family: monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Git commit confirmation */
.rich-gitcommit {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-gitcommit .gitcommit-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rich-gitcommit .gitcommit-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-gitcommit .gitcommit-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 0.7em;
}
.rich-gitcommit .gitcommit-label {
  color: #98c379;
  font-weight: 600;
}
.rich-gitcommit .gitcommit-hash {
  background: #252545;
  padding: 1px 5px;
  border-radius: 3px;
  color: #e5c07b;
  font-family: monospace;
  font-size: 12px;
}
.rich-gitcommit .gitcommit-branch {
  background: #cc785c22;
  color: #cc785c;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.rich-gitcommit .gitcommit-badge {
  background: #98c37922;
  color: #98c379;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.rich-gitcommit .gitcommit-body {
  display: none;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
}
.rich-gitcommit .gitcommit-body.expanded {
  display: block;
}
.rich-gitcommit .gitcommit-msg {
  color: #e0e0e0;
  font-size: 13px;
  padding: 4px 10px;
}
.rich-gitcommit .gitcommit-stats {
  display: flex;
  gap: 10px;
  padding: 2px 10px 4px;
  font-family: monospace;
  font-size: 12px;
}
.rich-gitcommit .gitcommit-ins {
  color: #98c379;
  font-weight: 600;
}
.rich-gitcommit .gitcommit-del {
  color: #e06c75;
  font-weight: 600;
}
.rich-gitcommit .gitcommit-file {
  padding: 3px 4px 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.rich-gitcommit .gitcommit-file:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}
.rich-gitcommit .gitcommit-icon {
  font-family: monospace;
  font-weight: 700;
  font-size: 12px;
  width: 16px;
  text-align: center;
}
.rich-gitcommit .gitcommit-path {
  font-family: monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e0e0e0;
}

/* Directory listing */
.rich-dirlist {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-dirlist .dirlist-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rich-dirlist .dirlist-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-dirlist .dirlist-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 10px;
}
.rich-dirlist .dirlist-list {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
}
.rich-dirlist .dirlist-list.expanded {
  display: block;
}
.rich-dirlist .dirlist-entry {
  padding: 2px 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
}
.rich-dirlist .dirlist-entry:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-dirlist .dirlist-icon {
  font-size: 12px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.rich-dirlist .dirlist-name {
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Git add confirmation — collapsible, directory-grouped */
.rich-gitadd {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-gitadd .gitadd-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rich-gitadd .gitadd-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-gitadd .gitadd-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 0.7em;
}
.rich-gitadd .gitadd-label {
  color: #98c379;
  font-weight: 600;
}
.rich-gitadd .gitadd-badge {
  background: #98c37922;
  color: #98c379;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.rich-gitadd .gitadd-list {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
}
.rich-gitadd .gitadd-list.expanded {
  display: block;
}
.rich-gitadd .gitadd-group-label {
  padding: 2px 0 2px 10px;
  color: #7f848e;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  font-family: monospace;
  margin-top: 4px;
}
.rich-gitadd .gitadd-file {
  padding: 3px 4px 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.rich-gitadd .gitadd-file:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}
.rich-gitadd .gitadd-icon {
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  color: #98c379;
  width: 16px;
  text-align: center;
}
.rich-gitadd .gitadd-path {
  font-family: monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #98c379;
}
.rich-gitadd .gitadd-output {
  color: #7f848e;
  font-size: 12px;
  padding: 6px 10px;
  font-family: monospace;
  border-top: 1px solid #2a2a4a;
}

/* Git branch list */
.rich-gitbranch {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-gitbranch .gitbranch-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rich-gitbranch .gitbranch-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-gitbranch .gitbranch-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 10px;
}
.rich-gitbranch .gitbranch-list {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
}
.rich-gitbranch .gitbranch-list.expanded {
  display: block;
}
.rich-gitbranch .gitbranch-entry {
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.rich-gitbranch .gitbranch-entry:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}
.rich-gitbranch .gitbranch-current {
  background: rgba(204, 120, 92, 0.08);
}
.rich-gitbranch .gitbranch-indicator {
  font-size: 10px;
  color: #cc785c;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.rich-gitbranch .gitbranch-name {
  font-family: monospace;
  font-size: 13px;
  color: #e0e0e0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Git remote operations (push/pull/fetch) */
.rich-gitremote {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
  padding: 8px 10px;
}
.rich-gitremote .gitremote-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.rich-gitremote .gitremote-url {
  color: #7f848e;
  font-family: monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-gitremote .gitremote-ref {
  color: #61afef;
  font-family: monospace;
  font-size: 12px;
  padding: 4px 0 0 20px;
}
.rich-gitremote .gitremote-stats {
  color: #7f848e;
  font-size: 12px;
  padding: 4px 0 0 20px;
}

/* Git checkout/switch */
.rich-gitcheckout {
  background: #1a1a2e;
  border: 1px solid #cc785c44;
  border-left: 3px solid #cc785c;
  border-radius: 4px;
  margin: 4px 0;
  padding: 8px 10px;
}
.rich-gitcheckout .gitcheckout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.rich-gitcheckout .gitcheckout-info {
  color: #7f848e;
  font-size: 12px;
  padding: 4px 0 0 20px;
}

/* Git stash */
.rich-gitstash {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  margin: 4px 0;
}
.rich-gitstash .gitstash-header {
  padding: 6px 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rich-gitstash .gitstash-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.rich-gitstash .gitstash-toggle {
  display: inline-block;
  width: 12px;
  transition: transform 0.15s;
  font-size: 10px;
}
.rich-gitstash .gitstash-list {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid #2a2a4a;
  padding: 4px 0;
}
.rich-gitstash .gitstash-list.expanded {
  display: block;
}
.rich-gitstash .gitstash-entry {
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.rich-gitstash .gitstash-entry:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}
.rich-gitstash .gitstash-index {
  color: #e5c07b;
  font-family: monospace;
  font-size: 12px;
  flex-shrink: 0;
}
.rich-gitstash .gitstash-desc {
  color: #e0e0e0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 2026-08-20: markdown-rendered prompt bodies (composer emits markdown; the
   live stream + history replay render it). Normalises block spacing inside
   the .prompt-body container and disables pre-wrap since markdown supplies
   its own structure. */
.prompt-body.prompt-body-md {
  white-space: normal;
}
.prompt-body-md p {
  margin: 0 0 8px;
}
.prompt-body-md p:last-child {
  margin-bottom: 0;
}
.prompt-body-md h1,
.prompt-body-md h2,
.prompt-body-md h3,
.prompt-body-md h4,
.prompt-body-md h5,
.prompt-body-md h6 {
  margin: 6px 0 8px;
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
}
.prompt-body-md h1 {
  font-size: 1.35em;
}
.prompt-body-md h2 {
  font-size: 1.2em;
}
.prompt-body-md h3 {
  font-size: 1.08em;
}
.prompt-body-md ul, .prompt-body-md ol {
  margin: 0 0 8px;
  padding-left: 22px;
}
.prompt-body-md li {
  margin: 2px 0;
}
.prompt-body-md blockquote {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 3px solid #61afef;
  color: #b8bec8;
}
.prompt-body-md pre {
  margin: 0 0 8px;
  padding: 10px 12px;
  background: #151515;
  border-radius: 6px;
  overflow-x: auto;
}
.prompt-body-md code {
  font-family: "JetBrains Mono", Monaco, Consolas, monospace;
  font-size: 0.86em;
  color: #56b6c2;
}
.prompt-body-md pre code {
  color: #e0e0e0;
}
.prompt-body-md a {
  color: #61afef;
  text-decoration: underline;
}
.prompt-body-md hr {
  border: none;
  border-top: 1px solid #3d3d3d;
  margin: 8px 0;
}
.prompt-body-md table {
  border-collapse: collapse;
  margin: 0 0 8px;
}
.prompt-body-md th, .prompt-body-md td {
  border: 1px solid #3d3d3d;
  padding: 4px 8px;
}

/* Assistant prose inherits provider identity; rich blocks remain lightweight. */
.console-line.assistant-text .prompt-body.assistant-content,
.steering-reply-markdown.assistant-content { white-space: normal; line-height: 1.6; overflow-wrap: anywhere; }
.assistant-content > :first-child { margin-top: 0; }
/* 2026-10-06: resolved agent question rows (question-resolution.ts, textContent only). */
.question-resolution-head { font-size: 12px; color: var(--gv-reply-user-muted, #a8aaa6); margin-bottom: 6px; }
.question-resolution-title { font-weight: 600; color: var(--gv-reply-user-text, #e0e0e0); }
.question-resolution-list { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.question-resolution-label { font-weight: 600; }
.question-resolution-prompt { color: var(--gv-reply-user-muted, #a8aaa6); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.question-resolution-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.question-resolution-answer[data-answer-kind="skipped"], .question-resolution-answer[data-answer-kind="none"], .question-resolution-missing { color: var(--gv-reply-user-muted, #a8aaa6); font-style: italic; }
.assistant-content > :last-child { margin-bottom: 0; }
.assistant-content p { margin: 0 0 .65em; }
.assistant-content h1,.assistant-content h2,.assistant-content h3,
.assistant-content h4,.assistant-content h5,.assistant-content h6 { font-size: 1.08em; font-weight: 600; line-height: 1.4; color: inherit; margin: 1em 0 .4em; }
.assistant-content h1,.assistant-content h2 { font-size: 1.14em; }
.assistant-content ul,.assistant-content ol { margin: .35em 0 .7em; padding-left: 1.5em; }
.assistant-content li { margin: .2em 0; }
.assistant-content li > p { margin: 0; }
.assistant-content a { color: #61afef; text-decoration: underline; text-underline-offset: 2px; }
.assistant-content blockquote { margin: .65em 0; padding: .2em .8em; border-left: 2px solid var(--prompt-color,#7f848e); color: #bec7cf; }
.assistant-content code,.assistant-content kbd { font-family: "JetBrains Mono",Monaco,Consolas,monospace; font-size: .92em; background: #ffffff08; border-radius: 4px; padding: .1em .3em; }
.assistant-content pre { margin: .6em 0; padding: .7em .85em; background: #10171980; border: 1px solid #ffffff0d; border-radius: 7px; white-space: pre; overflow: auto; max-height: 320px; overscroll-behavior: contain; }
.assistant-content pre code { padding: 0; background: transparent; white-space: pre; }
.assistant-content details { margin: .6em 0; border: 1px solid #ffffff16; border-radius: 7px; padding: .1em .7em; background: #ffffff03; }
.assistant-content summary { cursor: pointer; min-height: 36px; padding: .4em 0; color: var(--prompt-color,#b8c3cc); font-size: .92em; }
.assistant-content summary:focus-visible,.assistant-content a:focus-visible { outline: 2px solid #61afef; outline-offset: 3px; border-radius: 3px; }
.assistant-content details[open] > summary { margin-bottom: .3em; }
.assistant-content hr { border: 0; border-top: 1px solid #ffffff16; margin: .8em 0; }
.assistant-content .assistant-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior: contain; margin: .6em 0; }
.assistant-content table { border-collapse: collapse; width: 100%; font-size: .92em; text-align: left; }
.assistant-content th,.assistant-content td { border-bottom: 1px solid #ffffff16; padding: .45em .65em; vertical-align: top; }
.assistant-content th { color: #dbe4ec; font-weight: 600; background: #ffffff05; }
.assistant-content td { min-width: 80px; }
