/* ==========================================================================
   AI AGENT BATTLECARD DESIGN SYSTEM (MATCHING REFERENCE SCREENSHOT)
   Pure #000000 Canvas • Liquid Metal Glass • Emerald Tactical Accents
   Zero Emojis • Vector Icons • Crisp Gradient Connecting Sockets (Zero Blur Glow)
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  background-color: #000000;
  color: #ffffff;
  overflow: hidden;
  position: fixed;
  inset: 0;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
  touch-action: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

.canvas-root {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: #000000;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   BACKGROUND DOT GRID MATRIX (Exact match to photo)
   ========================================================================== */
.canvas-dot-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  background-position: center center;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.45) 85%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.45) 85%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   INFINITE GRAPH CANVAS & CONNECTIONS
   ========================================================================== */
.infinite-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  will-change: transform;
}

.connections-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 15;
  overflow: visible;
}

/* ==========================================================================
   FLOW CARDS: LIQUID METAL GLASS SYSTEM
   ========================================================================== */
.flow-card {
  position: absolute;
  border-radius: 16px;
  z-index: 10;
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.flow-card:active {
  cursor: grabbing;
}

.card-glass-surface {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #141417 0%, #0a0a0d 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 
    0 24px 50px -12px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 1px rgba(255, 255, 255, 0.22);
}

/* Radar Arc Corner Bracket (hovering outside top-left corner) */
.corner-bracket {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  border-top-left-radius: 14px;
  pointer-events: none;
}

/* CARD INTERNAL STATUS & CHECKMARKS */
.card-header-status {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 5;
}

.check-badge {
  color: #00e575;
}

.check-badge-green {
  color: #00e575;
}

.trash-badge-red {
  color: #ef4444;
}

/* 1. AI Agent Node Card */
.ai-agent-node {
  width: 280px;
  height: 150px;
}

.ai-agent-node .card-glass-surface {
  padding: 32px 24px;
  display: flex;
  align-items: center;
}

.node-body-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.node-icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, #222226 0%, #101013 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.node-main-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.node-subtitle {
  font-size: 13.5px;
  color: #8e8e93;
  margin-top: 2px;
}

/* 2. OpenAI Chat Model Card (The Rich Emerald Card from Photo) */
.openai-model-node {
  width: 240px;
  height: 200px;
}

.emerald-glass-surface {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(14, 52, 28, 0.92) 0%, rgba(6, 26, 13, 0.98) 100%);
  border: 1px solid rgba(0, 229, 117, 0.35);
  border-radius: 16px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 
    0 24px 50px -12px rgba(0, 0, 0, 0.95),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  padding: 16px;
}

.model-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.model-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.openai-logo-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.model-titles {
  display: flex;
  flex-direction: column;
}

.model-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.15;
}

.model-name-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.model-fields-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
}

.dropdown-capsule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 117, 0.25);
  border-radius: 8px;
  padding: 7px 10px;
}

.dropdown-val {
  font-size: 12px;
  color: #ffffff;
  font-weight: 500;
}

.dropdown-arrow {
  color: rgba(255, 255, 255, 0.5);
}

/* Flow Card Wrappers for Nodes with Exterior Labels */
.flow-card-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-card-wrapper:active {
  cursor: grabbing;
}

/* Square Node Cards (Trigger, Postgres, Vector Tool, Embeddings) */
.trigger-node-card,
.postgres-node-card,
.vector-node-card,
.embeddings-node-card {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 18px;
}

.square-center-surface {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-center-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.card-center-svg {
  color: #ffffff;
}

/* Exterior Typography Under Square Cards */
.node-exterior-label {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #f4f4f5;
  line-height: 1.3;
  pointer-events: none;
  user-select: none;
}

.node-exterior-label .exterior-title {
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 500;
}

.node-exterior-label .exterior-sub {
  color: #71717a;
  font-size: 11.5px;
  margin-top: 2px;
}

/* 6. Qdrant Vector Store1 */
.qdrant-node {
  width: 220px;
  height: 130px;
}

.qdrant-node .card-glass-surface {
  padding: 24px 20px;
  display: flex;
  align-items: center;
}

.qdrant-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qdrant-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, #222226 0%, #101013 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.q-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.q-sub {
  font-size: 12.5px;
  color: #8e8e93;
}


/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */
.top-nav-bar {
  position: fixed;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  pointer-events: none;
}

.top-nav-bar > * {
  pointer-events: auto;
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(22, 22, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.nav-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-main-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.nav-path {
  font-size: 13px;
  color: #71717a;
}

.category-pill {
  font-size: 10px;
  font-weight: 600;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 2px 7px;
  border-radius: 100px;
}

.tabs-pill-capsule {
  display: flex;
  align-items: center;
  background: rgba(22, 22, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 3px;
  backdrop-filter: blur(16px);
}

.tab-pill-btn {
  background: transparent;
  border: none;
  color: #8e8e93;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-pill-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 360px; /* Space for What happens next panel */
}

.pill-btn-active {
  background: #00e575;
  color: #000000;
  font-size: 12px;
  font-weight: 600;
  border: none;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
}

.pill-btn-secondary {
  background: rgba(22, 22, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.pill-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(22, 22, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(16px);
  text-decoration: none;
}

/* ==========================================================================
   MINIMAL PROMPT BOX (Top-Right)
   ========================================================================== */
.minimal-prompt-wrapper {
  position: fixed;
  top: 16px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 50;
  pointer-events: auto;
}

.minimal-prompt-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  height: 42px;
  background: rgba(14, 14, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  padding: 4px 5px 4px 14px;
  box-shadow: 
    0 16px 36px -8px rgba(0, 0, 0, 0.85),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.minimal-prompt-box:focus-within {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 
    0 16px 36px -8px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(16, 185, 129, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  width: 360px;
}

.prompt-metal-rim {
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35) 50%, transparent);
  pointer-events: none;
}

.prompt-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  flex-shrink: 0;
}

.prompt-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  min-width: 0;
}

.prompt-input-field::placeholder {
  color: #71717a;
  font-weight: 400;
}

.prompt-btn-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.prompt-micro-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 500;
  color: #10b981;
  backdrop-filter: blur(12px);
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-check-icon {
  color: #10b981;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   LEFT VERTICAL DOCK (from photo)
   ========================================================================== */
.left-vertical-dock {
  position: fixed;
  top: 140px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(18, 18, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px;
  backdrop-filter: blur(20px);
  z-index: 50;
}

.dock-icon-square {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #8e8e93;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dock-icon-square:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dock-icon-square.emerald-active {
  background: #00e575;
  color: #000000;
}

/* ==========================================================================
   BOTTOM CONTROLS & CREATIVITY CARD (from photo)
   ========================================================================== */
.bottom-center-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 16, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 6px 14px;
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.95);
  z-index: 50;
}

.center-dock-btn {
  background: transparent;
  border: none;
  color: #e4e4e7;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.center-dock-btn.test-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dock-clock-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #a1a1aa;
}

.live-clock-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00e575;
}

.dock-mini-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.dock-mini-icon-btn {
  background: transparent;
  border: none;
  color: #8e8e93;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-mini-icon-btn:hover {
  color: #ffffff;
}

.dock-mini-icon-btn.trash-btn:hover {
  color: #ef4444;
}

/* Bottom Left Logs & Chat */
.bottom-left-dock-area {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
}

.chat-id-tag {
  display: flex;
  flex-direction: column;
}

.chat-lbl {
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
}

.chat-hash {
  font-size: 10px;
  color: #71717a;
  font-family: monospace;
}

.logs-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 22, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 100px;
  backdrop-filter: blur(16px);
}

.arrow-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.logs-text {
  font-size: 11px;
  color: #a1a1aa;
}

/* Bottom Right Creativity Ratio Card (from photo) */
.bottom-right-creativity-card {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background: linear-gradient(180deg, rgba(14, 52, 28, 0.9) 0%, rgba(6, 26, 13, 0.96) 100%);
  border: 1px solid rgba(0, 229, 117, 0.35);
  border-radius: 16px;
  padding: 12px 14px;
  backdrop-filter: blur(28px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.9);
  z-index: 50;
}

.creativity-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.step-group {
  display: flex;
  flex-direction: column;
}

.step-tag {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.step-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
}

.posts-ready-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.7);
}

.signal-bars {
  color: #00e575;
  font-weight: 700;
}

.creativity-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-track-bg {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 100px;
}

.slider-track-fill {
  height: 100%;
  background: #00e575;
  border-radius: 100px;
}

.slider-thumb-handle {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
}

.slider-ticks-row {
  display: flex;
  justify-content: space-between;
}

.tick-val {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
}

.tick-val.active-val {
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================================================
   DYNAMIC TRADE NODES (Robinhood Chain L2 - 0-Popup Execution)
   ========================================================================== */
.dynamic-trade-card {
  z-index: 12;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  animation: spawnCard 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spawnCard {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.trade-node-surface {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #16181f 0%, #0d0f14 100%);
  border: 1px solid rgba(0, 229, 117, 0.28);
  box-shadow: 
    0 24px 50px -12px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 229, 117, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

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

.trade-token-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-symbol {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.token-mcap-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: #00e575;
  background: rgba(0, 229, 117, 0.12);
  border: 1px solid rgba(0, 229, 117, 0.28);
  border-radius: 9999px;
  padding: 2px 7px;
}

.trade-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auto-verified-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  padding: 2px 5px;
}

.shield-icon {
  color: #38bdf8;
}

.trade-close-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.trade-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.trade-node-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.trade-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.trade-stat-label {
  color: #71717a;
}

.trade-stat-val {
  color: #f4f4f5;
  font-weight: 500;
}

.trade-pnl-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pnl-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 3px 8px;
}

.pnl-green {
  background: rgba(0, 229, 117, 0.16);
  color: #00e575;
  border: 1px solid rgba(0, 229, 117, 0.3);
}

.pnl-red {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.trade-chain-tag {
  font-size: 10px;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trade-tx-footer {
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-executing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #f59e0b;
}

.zap-pulse {
  animation: zapPulse 1s infinite alternate;
}

@keyframes zapPulse {
  from { opacity: 0.4; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.1); }
}

.trade-explorer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #38bdf8;
  text-decoration: none;
  font-family: monospace;
  transition: color 0.15s ease;
}

.trade-explorer-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Status banner for Autonomous Mode & Mcap filter */
.agent-header-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 14, 18, 0.85);
  border: 1px solid rgba(0, 229, 117, 0.28);
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 11.5px;
  backdrop-filter: blur(20px);
}

.pulse-green-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e575;
  box-shadow: 0 0 8px #00e575;
  animation: greenPulse 1.6s infinite;
}

@keyframes greenPulse {
  0% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.7; }
}

/* Clean Monochromatic Node Cards: Big Dex Logos, Compact Default & Accordion Expansion */
.card-compact {
  min-height: 76px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-expanded {
  min-height: 280px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.big-dex-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.big-dex-logo-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #18181f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.big-algo-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #18181f;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.compact-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.compact-title-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.compact-title-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.compact-symbol {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.compact-mcap {
  font-size: 11px;
  color: #71717a;
  font-family: -apple-system, sans-serif;
}

.compact-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-pnl {
  font-size: 11px;
  font-weight: 600;
  font-family: monospace;
}

.pnl-pos {
  color: #ffffff;
}

.pnl-neg {
  color: #a1a1aa;
}

.compact-score-tag {
  font-size: 10px;
  color: #71717a;
}

.compact-cut-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-passed {
  color: #ffffff;
}

.tag-cut {
  color: #a1a1aa;
}

.compact-actions-group {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.quick-sell-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-sell-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.sold-status-badge {
  font-size: 10px;
  color: #71717a;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

.expand-toggle-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.expand-toggle-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.expanded-details-container {
  padding: 0 14px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  animation: expandFade 0.2s ease;
}

@keyframes expandFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.learning-reason-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reason-line {
  font-size: 10px;
  line-height: 1.35;
  color: #d4d4d8;
  display: flex;
  gap: 6px;
}

.reason-label {
  color: #71717a;
  font-weight: 700;
  font-size: 9px;
  min-width: 82px;
  flex-shrink: 0;
}

.reason-text {
  color: #e4e4e7;
}

.highlight-learned {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 4px;
  margin-top: 2px;
}

.dev-intel-section {
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.25);
}

.intel-section-title {
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.intel-data-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.intel-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #a1a1aa;
}

.intel-k {
  color: #71717a;
}

.intel-v {
  color: #d4d4d8;
  font-family: monospace;
}

.mono-addr {
  letter-spacing: -0.2px;
}

.trade-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 10.5px;
  color: #71717a;
}

.meta-stats-row {
  display: flex;
  gap: 8px;
  font-size: 10.5px;
}

.score-factors-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.factor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: #a1a1aa;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.factor-name {
  color: #e4e4e7;
  font-weight: 500;
}

.factor-pts {
  color: #ffffff;
  font-family: monospace;
  font-weight: 600;
}

.factor-note {
  color: #71717a;
  font-size: 9.5px;
}

.algo-weights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.weight-item {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.w-label {
  color: #71717a;
}

.w-val {
  color: #ffffff;
  font-weight: 600;
  font-family: monospace;
}
