/* ==========================================================================
   Google Antigravity Application Theme — AETHER Agent Client
   High-precision engineering dark theme with multi-surface layout,
   collapsible auxiliary workspace, agent step traces, and Model Hub.
   ========================================================================== */

:root {
  --ag-bg-base: #0a0b0e;
  --ag-bg-canvas: #0f1015;
  --ag-bg-surface: #14161d;
  --ag-bg-card: #191b24;
  --ag-bg-card-hover: #1f222e;
  --ag-bg-dock: rgba(22, 24, 33, 0.88);
  
  --ag-border-subtle: #212430;
  --ag-border-medium: #2a2e3d;
  --ag-border-active: #4285f4;
  
  --ag-blue: #4285f4;
  --ag-blue-dim: rgba(66, 133, 244, 0.14);
  --ag-purple: #a87ffb;
  --ag-purple-dim: rgba(168, 127, 251, 0.14);
  --ag-green: #34a853;
  --ag-green-dim: rgba(52, 168, 83, 0.15);
  --ag-amber: #fbbc04;
  --ag-amber-dim: rgba(251, 188, 4, 0.15);
  --ag-red: #ea4335;
  
  --text-primary: #f1f3f9;
  --text-secondary: #9da5b4;
  --text-tertiary: #6b7280;
  
  --font-brand: 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  --shadow-dock: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.antigravity-app {
  background-color: var(--ag-bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  user-select: none;
  position: relative;
}

/* Ambient glow lighting */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.glow-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #4285f4 0%, transparent 70%);
  top: -200px;
  left: 20%;
}
.glow-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #a87ffb 0%, transparent 70%);
  bottom: -200px;
  right: 15%;
}

/* Master Layout */
.app-root {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ─── Top Antigravity Application Bar ─── */
.ag-top-bar {
  height: 52px;
  background: var(--ag-bg-surface);
  border-bottom: 1px solid var(--ag-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ag-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ag-symbol-wrap {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #4285f4, #a87ffb);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(66, 133, 244, 0.4);
}
.ag-symbol {
  font-size: 15px;
  color: #fff;
  font-weight: 700;
}
.ag-title {
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}

.ag-workspace-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}
.ag-workspace-crumb .folder-icon { font-size: 13px; }
.ag-workspace-crumb .workspace-name { color: var(--text-primary); font-weight: 500; }
.branch-pill {
  font-size: 10px;
  background: var(--ag-blue-dim);
  color: var(--ag-blue);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
}

.top-bar-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Model Selector Pill in Top Bar */
.ag-model-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-medium);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
}
.ag-model-pill:hover {
  background: var(--ag-bg-card-hover);
  border-color: var(--ag-blue);
  box-shadow: 0 0 12px rgba(66, 133, 244, 0.2);
}
.ag-model-pill .model-sparkle { font-size: 13px; }
.ag-model-pill .model-name { font-size: 12px; font-weight: 600; font-family: var(--font-mono); }
.ag-model-pill .model-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--ag-green-dim);
  color: var(--ag-green);
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.ag-model-pill .chevron { font-size: 10px; color: var(--text-tertiary); }

/* Mode Switcher */
.ag-mode-toggle {
  display: flex;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.ag-mode-toggle .mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.ag-mode-toggle .mode-btn:hover {
  color: var(--text-primary);
}
.ag-mode-toggle .mode-btn.active {
  background: var(--ag-blue);
  color: #fff;
  font-weight: 600;
}

/* Top Bar Right */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.telemetry-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}
.telemetry-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ag-green);
  box-shadow: 0 0 6px var(--ag-green);
}
.telemetry-pill.evo-pill {
  background: var(--ag-purple-dim);
  color: var(--ag-purple);
  border-color: rgba(168, 127, 251, 0.3);
  font-weight: 600;
}

.ag-icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.ag-icon-btn:hover {
  background: var(--ag-bg-card-hover);
  color: var(--text-primary);
  border-color: var(--ag-border-medium);
}
.ag-icon-btn.active {
  color: var(--ag-blue);
  border-color: var(--ag-blue);
  background: var(--ag-blue-dim);
}

/* ─── Main 3-Surface Layout ─── */
.ag-main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ─── Surface 1: Left Navigation Rail ─── */
.ag-nav-rail {
  width: 220px;
  background: var(--ag-bg-surface);
  border-right: 1px solid var(--ag-border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px;
  flex-shrink: 0;
}

.btn-new-thread {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--ag-blue);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}
.btn-new-thread:hover { opacity: 0.92; }
.btn-new-thread .plus-icon { font-size: 16px; font-weight: 700; }
.btn-new-thread .shortcut {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.rail-nav-group {
  margin-top: 18px;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.8px;
  padding: 0 8px;
  margin-bottom: 6px;
}

.rail-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.rail-item:hover {
  background: var(--ag-bg-card);
  color: var(--text-primary);
}
.rail-item.active {
  background: var(--ag-blue-dim);
  color: var(--ag-blue);
  font-weight: 600;
}
.rail-icon { font-size: 14px; }

/* Rail Bottom */
.mini-vitals-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 10px;
}
.mini-vitals-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}
.mini-vitals-row .val { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }
.mini-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  margin-top: 4px;
  overflow: hidden;
}
.mini-bar-fill {
  height: 100%;
  background: var(--ag-blue);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}
.mt-6 { margin-top: 6px; }

.user-profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #252836;
  color: var(--ag-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 1px solid var(--ag-border-subtle);
}
.user-info .user-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.user-info .user-status { font-size: 10px; color: var(--text-tertiary); font-family: var(--font-mono); }

/* ─── Surface 2: Center Agent Interaction Canvas ─── */
.ag-chat-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--ag-bg-canvas);
  position: relative;
  overflow: hidden;
}

.canvas-header {
  height: 44px;
  border-bottom: 1px solid var(--ag-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(15, 16, 21, 0.6);
  backdrop-filter: blur(8px);
}
.canvas-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.title-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.mode-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: var(--ag-blue-dim);
  color: var(--ag-blue);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
}
.canvas-actions {
  display: flex;
  gap: 8px;
}
.canvas-btn {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.canvas-btn:hover {
  color: var(--text-primary);
  border-color: var(--ag-border-medium);
  background: var(--ag-bg-card-hover);
}

/* Messages Container */
.ag-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 140px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Antigravity Welcome Hero & Exploration Cards */
.ag-welcome-hero {
  max-width: 860px;
  width: 100%;
  margin: 36px auto 16px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeInMsg 0.4s ease;
}
.hero-brand {
  margin-bottom: 28px;
}
.hero-symbol {
  font-size: 28px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4285f4, #a87ffb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 14px auto;
  box-shadow: 0 8px 32px rgba(66, 133, 244, 0.35);
}
.hero-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}
.hero-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.5;
  margin: 0 auto;
}

/* Hero Action Cards Grid */
.hero-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.hero-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
}
.hero-card:hover {
  background: var(--ag-bg-card-hover);
  border-color: var(--ag-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(66, 133, 244, 0.15);
}
.hero-card .card-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.hero-card .card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.hero-card .card-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* Message Bubble */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  animation: fadeInMsg 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.user {
  align-items: flex-end;
}
.chat-msg.user .msg-bubble {
  background: #1e2433;
  border: 1px solid rgba(66, 133, 244, 0.3);
  color: var(--text-primary);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 18px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.chat-msg.assistant {
  align-items: flex-start;
}
.chat-msg.assistant .msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #4285f4, #a87ffb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}
.msg-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.msg-model-pill {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.chat-msg.assistant .msg-bubble {
  background: var(--ag-bg-surface);
  border: 1px solid var(--ag-border-subtle);
  border-radius: 4px 16px 16px 16px;
  padding: 16px 20px;
  width: 100%;
  box-shadow: var(--shadow-card);
}

/* Agent Reasoning Trace (Collapsible Accordion) */
.agent-thought-card {
  background: rgba(168, 127, 251, 0.06);
  border: 1px solid rgba(168, 127, 251, 0.22);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 12px;
}
.agent-thought-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--ag-purple);
  font-weight: 600;
}
.agent-thought-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(168, 127, 251, 0.15);
  color: #c9b8f9;
  font-size: 12px;
  line-height: 1.5;
  font-family: var(--font-mono);
}

/* Agent Tool Execution Step Card */
.agent-step-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 12px;
}
.agent-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ag-green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.step-title {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.step-preview {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 11px;
}

/* Typography & Layout in message body */
.msg-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  word-break: break-word;
}
.msg-body.streaming-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}
.streaming-cursor {
  color: var(--ag-blue);
  font-weight: 700;
  animation: blinkCursor 0.8s infinite;
  display: inline-block;
  margin-left: 2px;
}
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.msg-bubble h1, .msg-bubble h2, .msg-bubble h3 {
  color: #fff;
  margin: 14px 0 8px 0;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.msg-bubble h1 { font-size: 18px; }
.msg-bubble h2 { font-size: 16px; }
.msg-bubble h3 { font-size: 14px; }

.msg-bubble p {
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--text-primary);
  font-size: 14px;
}
.msg-bubble p:last-child {
  margin-bottom: 0;
}
.msg-bubble ul, .msg-bubble ol {
  margin: 8px 0 12px 22px;
  line-height: 1.6;
}
.msg-bubble li {
  margin-bottom: 5px;
}
.msg-bubble blockquote {
  border-left: 3px solid var(--ag-blue);
  padding: 6px 14px;
  margin: 12px 0;
  color: #c0c6d8;
  background: rgba(66, 133, 244, 0.06);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}
.ag-divider {
  border: none;
  border-top: 1px solid var(--ag-border-medium);
  margin: 16px 0;
}

/* Inline Code */
.msg-bubble code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #a8c7fa;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 5px;
  border-radius: 4px;
}

/* Code Block Containers with Header & Copy Button */
.code-block-container {
  margin: 14px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ag-border-medium);
  background: #0b0c10;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--ag-border-subtle);
}
.code-lang-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.btn-copy-code {
  background: transparent;
  border: 1px solid var(--ag-border-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}
.btn-copy-code:hover {
  background: var(--ag-bg-card-hover);
  color: var(--text-primary);
  border-color: var(--ag-blue);
}
.btn-copy-code.copied {
  background: var(--ag-green-dim);
  color: var(--ag-green);
  border-color: var(--ag-green);
}
.code-block-container pre {
  margin: 0;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
}
.code-block-container code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 13px;
}

/* Markdown Data Tables (Antigravity Design System) */
.table-container {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ag-border-medium);
  background: var(--ag-bg-card);
  box-shadow: var(--shadow-card);
}
.ag-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.ag-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid var(--ag-border-medium);
  font-family: var(--font-mono);
  font-size: 12px;
}
.ag-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--ag-border-subtle);
  color: var(--text-secondary);
}
.ag-table tr:last-child td {
  border-bottom: none;
}
.ag-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

/* ─── Floating Antigravity Prompt Dock ─── */
.ag-dock-container {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 24px;
}

.ag-input-dock {
  width: 100%;
  max-width: 860px;
  background: var(--ag-bg-dock);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--ag-border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dock);
  padding: 10px 14px;
  pointer-events: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ag-input-dock:focus-within {
  border-color: var(--ag-blue);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(66, 133, 244, 0.25);
}

.dock-context-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.dock-badge-btn {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.dock-badge-btn:hover {
  color: var(--text-primary);
  border-color: var(--ag-border-medium);
}
.dock-model-indicator {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  cursor: pointer;
}
.dock-model-indicator:hover { color: var(--ag-blue); }

.dock-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.ag-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 140px;
  padding: 4px 2px;
}
.ag-textarea::placeholder {
  color: var(--text-tertiary);
}

.dock-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dock-icon-btn {
  width: 32px;
  height: 32px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}
.dock-icon-btn:hover {
  background: var(--ag-bg-card-hover);
  color: var(--text-primary);
}
.dock-icon-btn.recording {
  background: rgba(234, 67, 53, 0.2);
  border-color: var(--ag-red);
  color: var(--ag-red);
  animation: pulseRec 1.2s infinite;
}
@keyframes pulseRec {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.dock-send-btn {
  width: 34px;
  height: 34px;
  background: var(--ag-blue);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
}
.dock-send-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Slash popover */
.ag-slash-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 360px;
  background: var(--ag-bg-dock);
  backdrop-filter: blur(20px);
  border: 1px solid var(--ag-border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dock);
  padding: 6px;
  z-index: 100;
}
.slash-item {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.slash-item:hover {
  background: var(--ag-bg-card);
}
.slash-name {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--ag-blue);
}
.slash-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ─── Surface 3: Antigravity 2.0 Auxiliary Workspace (Right Pane) ─── */
.ag-aux-pane {
  width: 340px;
  background: var(--ag-bg-surface);
  border-left: 1px solid var(--ag-border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s;
}
.ag-aux-pane.collapsed {
  width: 0;
  overflow: hidden;
  border-left: none;
}

.aux-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--ag-border-subtle);
  background: var(--ag-bg-card);
  padding: 4px;
}
.aux-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 7px 4px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}
.aux-tab:hover {
  color: var(--text-primary);
}
.aux-tab.active {
  background: var(--ag-bg-surface);
  color: var(--ag-blue);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.aux-content-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.aux-panel-view {
  display: none;
}
.aux-panel-view.active {
  display: block;
}

.panel-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.panel-section-title .badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--ag-blue-dim);
  color: var(--ag-blue);
  border-radius: var(--radius-pill);
}
.mt-16 { margin-top: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }

/* TaskDAG Nodes */
.task-dag-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dag-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.dag-node.completed { border-color: rgba(52, 168, 83, 0.3); }
.dag-node.completed .check {
  color: var(--ag-green);
  font-weight: 700;
}
.dag-node.running { border-color: var(--ag-blue); }
.dag-node.running .spinner {
  color: var(--ag-blue);
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.node-title { font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); font-size: 11px; }
.node-sub { font-size: 10px; color: var(--text-tertiary); }

/* Goals textarea */
.ag-goals-textarea {
  width: 100%;
  height: 80px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  resize: vertical;
}
.ag-btn-sm {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.ag-btn-sm.primary { background: var(--ag-blue); color: #fff; }
.ag-btn-sm.secondary { background: var(--ag-bg-card); border: 1px solid var(--ag-border-subtle); color: var(--text-primary); }
.ag-btn-primary-full {
  width: 100%;
  padding: 8px 12px;
  background: var(--ag-purple);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(168, 127, 251, 0.3);
}

/* Dynamic Interactive File Tree & Inline Viewer */
.file-tree-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  user-select: none;
}
.file-item.clickable {
  cursor: pointer;
}
.file-item.clickable:hover {
  background: var(--ag-bg-card-hover);
  color: var(--text-primary);
  border-color: var(--ag-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.file-item.active {
  background: var(--ag-blue-dim);
  color: var(--ag-blue);
  border-color: var(--ag-blue);
  font-weight: 600;
}
.file-item .file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.file-item .file-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.file-item .file-size {
  font-size: 9px;
  color: var(--text-tertiary);
}
.file-item .tag {
  font-size: 9px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Panel Actions Row & Small Action Buttons */
.panel-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ag-icon-btn-xs {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  color: var(--text-secondary);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
}
.ag-icon-btn-xs:hover {
  background: var(--ag-bg-card-hover);
  color: var(--text-primary);
  border-color: var(--ag-blue);
}

.ag-btn-xs {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-mono);
  transition: all 0.15s;
}
.ag-btn-xs.primary {
  background: var(--ag-blue);
  color: #fff;
}
.ag-btn-xs.primary:hover {
  background: #3367d6;
}
.ag-btn-xs.secondary {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  color: var(--text-secondary);
}
.ag-btn-xs.secondary:hover {
  color: var(--text-primary);
  border-color: var(--ag-border-medium);
}

/* Inline File Preview Drawer */
.file-viewer-drawer {
  margin-top: 10px;
  border: 1px solid var(--ag-border-medium);
  border-radius: var(--radius-sm);
  background: #090a0e;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--ag-border-subtle);
}
.drawer-path {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ag-blue);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.drawer-code {
  margin: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  color: #c9d1d9;
  max-height: 220px;
  overflow: auto;
  white-space: pre;
}

/* Screen Preview Card */
.screen-preview-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.screen-preview-card img {
  max-width: 100%;
  border-radius: 4px;
  border: 1px solid var(--ag-border-subtle);
}
.preview-empty {
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 20px 0;
}

/* Terminal & Sandbox */
.ag-code-editor {
  width: 100%;
  height: 100px;
  background: #0b0c10;
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: #8ab4f8;
  font-family: var(--font-mono);
  font-size: 11px;
  resize: vertical;
}
.ag-terminal-output {
  background: #08090c;
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  max-height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.daemon-status-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.daemon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}
.daemon-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ag-green);
  box-shadow: 0 0 6px var(--ag-green);
}

/* Evolution Tab */
.evo-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.evo-stat-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.evo-stat-card .val {
  font-size: 20px;
  font-weight: 700;
  color: var(--ag-purple);
  font-family: var(--font-mono);
}
.evo-stat-card .lbl {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.rules-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.rule-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.rule-domain {
  font-size: 9px;
  font-weight: 700;
  color: var(--ag-purple);
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}
.rule-text {
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Memory Tab */
.memory-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stat-pill {
  padding: 4px 8px;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-pill);
  font-size: 10px;
  color: var(--text-secondary);
}
.stat-pill span { font-weight: 600; color: var(--text-primary); }
.ag-input-sm {
  width: 100%;
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
}
.memory-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

/* ─── Antigravity Model Hub Modal ─── */
.ag-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeInModal 0.2s ease-out;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ag-modal-card {
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: var(--ag-bg-surface);
  border: 1px solid var(--ag-border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ag-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title-group .sparkle { font-size: 18px; }
.modal-title-group h2 {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.15s;
}
.modal-close-btn:hover { color: #fff; }

.modal-search-row {
  padding: 12px 20px;
  border-bottom: 1px solid var(--ag-border-subtle);
  background: var(--ag-bg-card);
}
.modal-search-row input {
  width: 100%;
  background: var(--ag-bg-surface);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.modal-search-row input:focus {
  border-color: var(--ag-blue);
}

.model-cards-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.model-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}
.section-tag {
  font-size: 10px;
  color: var(--ag-green);
  font-weight: 600;
  background: var(--ag-green-dim);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.model-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.model-card:hover {
  background: var(--ag-bg-card-hover);
  border-color: var(--ag-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.model-card.active {
  border-color: var(--ag-blue);
  background: rgba(66, 133, 244, 0.08);
  box-shadow: 0 0 0 1px var(--ag-blue);
}
.model-card.active::after {
  content: "ACTIVE";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 700;
  background: var(--ag-blue);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.model-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.model-card-icon { font-size: 18px; }
.model-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.model-card-provider {
  font-size: 11px;
  color: var(--text-tertiary);
}
.model-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.model-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.meta-chip {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}
.meta-chip.hardware {
  background: var(--ag-green-dim);
  color: var(--ag-green);
}
.meta-chip.cloud {
  background: var(--ag-blue-dim);
  color: var(--ag-blue);
}

/* Interactive Map Cards */
.aether-map-card {
  background: #11131a;
  border: 1px solid var(--ag-border-medium);
  border-radius: var(--radius-md);
  margin: 10px 0;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.aether-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #161822;
  border-bottom: 1px solid var(--ag-border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.aether-map-coords {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ag-blue);
}
.aether-interactive-map {
  width: 100%;
  height: 280px;
  background: #0a0b0e;
}

/* ─── Cognitive Development & Neuro-Evolution Styles ─── */
.stage-progress-card {
  background: linear-gradient(135deg, rgba(20, 24, 36, 0.9), rgba(15, 18, 28, 0.95));
  border: 1px solid var(--ag-border-medium);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stage-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.stage-score-pill {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(52, 168, 83, 0.15);
  color: #34a853;
  border: 1px solid rgba(52, 168, 83, 0.3);
}

.stage-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 6px;
}

.stage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4285f4, #a87ffb);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.stage-sub-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.mentorship-live-card {
  background: #11131a;
  border: 1px solid rgba(168, 127, 251, 0.3);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

.mentor-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.mentor-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #a87ffb;
}

.mentor-score-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #34a853;
}

.mentor-challenge-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.mentor-critique-box {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px;
  border-radius: var(--radius-xs);
  border-left: 2px solid #a87ffb;
}

.ag-btn-secondary-full {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.ag-btn-secondary-full:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: var(--ag-border-medium);
}

.badge.purple {
  background: rgba(168, 127, 251, 0.15);
  color: #a87ffb;
  border: 1px solid rgba(168, 127, 251, 0.3);
}

.badge.blue {
  background: rgba(66, 133, 244, 0.15);
  color: #4285f4;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

/* Swarm Multi-Agent Styling */
.swarm-config-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.swarm-input-title, .swarm-roles-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.swarm-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.role-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--ag-border-medium);
}

.role-chip input[type="checkbox"] {
  accent-color: var(--ag-blue);
  cursor: pointer;
}

.swarm-live-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 480px;
  overflow-y: auto;
}

.swarm-empty-state {
  padding: 18px 12px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  border: 1px dashed var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
}

.swarm-agent-card {
  background: rgba(20, 22, 30, 0.7);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.25s ease;
  animation: slideInAgent 0.3s ease-out;
}

.swarm-agent-card.running {
  border-color: rgba(168, 127, 251, 0.6);
  box-shadow: 0 0 12px rgba(168, 127, 251, 0.2);
}

.swarm-agent-card.completed {
  border-color: rgba(52, 168, 83, 0.4);
}

.swarm-agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swarm-agent-identity {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swarm-agent-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.swarm-agent-role-pill {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.swarm-agent-content {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px;
  border-radius: var(--radius-xs);
  max-height: 200px;
  overflow-y: auto;
}

.swarm-artifacts-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 10px;
}

.swarm-artifact-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(66, 133, 244, 0.12);
  color: #8ab4f8;
  border: 1px solid rgba(66, 133, 244, 0.25);
}

@keyframes slideInAgent {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── All-Rounder 12-Domain Capability Matrix ── */
.all-rounder-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.domain-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.domain-card:hover {
  border-color: var(--ag-border-medium);
  background: rgba(255, 255, 255, 0.04);
}

.domain-card.active {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.06);
}

.domain-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.domain-card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.domain-score-pill {
  font-size: 10px;
  font-weight: 700;
  color: var(--ag-purple);
  font-family: var(--font-mono);
}

.domain-progress-bar-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.domain-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ag-blue), var(--ag-purple));
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Self-Play RLAIF Stream Card ── */
.rlaif-stream-card {
  background: var(--ag-bg-card);
  border: 1px solid var(--ag-border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.rlaif-trace-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xs);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slideInAgent 0.2s ease-out;
}

.rlaif-trace-item.pass {
  border-left: 3px solid #34a853;
}

.rlaif-trace-item.fail {
  border-left: 3px solid #ea4335;
}

.rlaif-trace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rlaif-trace-domain {
  font-size: 10px;
  font-weight: 700;
  color: var(--ag-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rlaif-trace-reward {
  font-size: 10px;
  font-weight: 700;
  color: #34a853;
  font-family: var(--font-mono);
}

.rlaif-trace-feedback {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.35;
}



