/* =============================================================================
   FLOWORK OS — NANO-MODULAR COMPONENT: TACTICAL_HUD.CSS
   Author: Flowork OS Sovereign Architect & Awenk Audico
   Co-authored-by: Flowork OS <agent@floworkos.com>
   ============================================================================= */

/* =============================================================================
   AGENT HUD TELEMETRY STREAM (Floating Living Cybernetic Pulse from Bottom Corner)
   ========================================================================== */
.hud-agent-stream {
  position: absolute;
  bottom: 24px;
  right: 36px;
  width: 420px;
  height: 560px;
  max-height: calc(100vh - 140px);
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 6%, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 6%, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 100%);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1), align-items 0.3s ease;
}

/* Chat docked to LEFT: Spawn from Bottom-Right corner */
.canvas-layout.chat-dock-left .hud-agent-stream {
  bottom: 24px;
  right: 36px;
  left: auto;
  align-items: flex-end;
}

/* Chat docked to RIGHT: Spawn from Bottom-Left corner */
.canvas-layout:not(.chat-dock-left) .hud-agent-stream {
  bottom: 24px;
  left: 36px;
  right: auto;
  align-items: flex-start;
}

.agent-stream-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(4, 12, 26, 0.22);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: 9999px;
  padding: 4px 11px 4px 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 10px rgba(0, 229, 255, 0.06);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  color: rgba(226, 232, 240, 0.6);
  white-space: nowrap;
  max-width: 340px;
  animation: streamChipFlutterUp var(--float-dur, 4.8s) cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  will-change: transform, opacity, filter;
  opacity: 0.45;
}

.agent-stream-chip .chip-beacon {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.6);
  flex-shrink: 0;
  animation: chipPulseGlow 1.4s ease-in-out infinite alternate;
}

.agent-stream-chip .chip-tag {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 1px 5px;
  border-radius: 9999px;
  text-transform: uppercase;
  flex-shrink: 0;
  opacity: 0.7;
}

.agent-stream-chip .chip-text {
  font-size: 10px;
  font-weight: 400;
  color: rgba(241, 245, 249, 0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  letter-spacing: 0.2px;
}

.agent-stream-chip .chip-meta {
  font-size: 8px;
  font-weight: 600;
  color: rgba(100, 116, 139, 0.6);
  letter-spacing: 0.4px;
  flex-shrink: 0;
  opacity: 0.65;
}

/* Variant Types - Subtle & Atmospheric */
.agent-stream-chip.type-cmd {
  border-color: rgba(245, 158, 11, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 8px rgba(245, 158, 11, 0.08);
}
.agent-stream-chip.type-cmd .chip-beacon {
  background: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}
.agent-stream-chip.type-cmd .chip-tag {
  background: rgba(245, 158, 11, 0.1);
  color: rgba(251, 191, 36, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.agent-stream-chip.type-tool {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 8px rgba(0, 229, 255, 0.08);
}
.agent-stream-chip.type-tool .chip-beacon {
  background: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.6);
}
.agent-stream-chip.type-tool .chip-tag {
  background: rgba(0, 229, 255, 0.1);
  color: rgba(0, 229, 255, 0.75);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.agent-stream-chip.type-agent {
  border-color: rgba(168, 85, 247, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 8px rgba(168, 85, 247, 0.08);
}
.agent-stream-chip.type-agent .chip-beacon {
  background: rgba(168, 85, 247, 0.7);
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
}
.agent-stream-chip.type-agent .chip-tag {
  background: rgba(168, 85, 247, 0.1);
  color: rgba(192, 132, 252, 0.75);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.agent-stream-chip.type-think {
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 8px rgba(56, 189, 248, 0.08);
}
.agent-stream-chip.type-think .chip-beacon {
  background: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}
.agent-stream-chip.type-think .chip-tag {
  background: rgba(56, 189, 248, 0.1);
  color: rgba(56, 189, 248, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.agent-stream-chip.type-done {
  border-color: rgba(16, 185, 129, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 8px rgba(16, 185, 129, 0.08);
}
.agent-stream-chip.type-done .chip-beacon {
  background: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}
.agent-stream-chip.type-done .chip-tag {
  background: rgba(16, 185, 129, 0.1);
  color: rgba(52, 211, 153, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.agent-stream-chip.type-net {
  border-color: rgba(129, 140, 248, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 8px rgba(129, 140, 248, 0.08);
}
.agent-stream-chip.type-net .chip-beacon {
  background: rgba(129, 140, 248, 0.7);
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.6);
}
.agent-stream-chip.type-net .chip-tag {
  background: rgba(129, 140, 248, 0.1);
  color: rgba(165, 180, 252, 0.75);
  border: 1px solid rgba(129, 140, 248, 0.2);
}

/* Fluttering flight upward from bottom corner ("beterbangan gitu", agak gak jelas/holographic whisper) */
@keyframes streamChipFlutterUp {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.72) rotate(0deg);
    filter: blur(2.5px);
  }
  14% {
    opacity: 0.52;
    transform: translateY(0px) scale(1) rotate(var(--drift-rot, 0deg));
    filter: blur(0.4px);
  }
  48% {
    opacity: 0.44;
    transform: translateY(-110px) translateX(calc(var(--drift-x, 0px) * 0.6)) scale(0.99) rotate(calc(var(--drift-rot, 0deg) * 0.8));
    filter: blur(0.6px);
  }
  75% {
    opacity: 0.32;
    transform: translateY(-220px) translateX(var(--drift-x, 0px)) scale(0.96) rotate(calc(var(--drift-rot, 0deg) * 1.3));
    filter: blur(1px);
  }
  90% {
    opacity: 0.14;
    transform: translateY(-300px) translateX(calc(var(--drift-x, 0px) * 1.3)) scale(0.91);
    filter: blur(1.8px);
  }
  100% {
    opacity: 0;
    transform: translateY(-360px) translateX(calc(var(--drift-x, 0px) * 1.5)) scale(0.86);
    filter: blur(3px);
  }
}

@keyframes chipPulseGlow {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* =============================================================================
   CHAT ATTACHMENTS, FILE UPLOADS, SCREENSHOT CARDS & LIGHTBOX MODAL
   Co-authored-by: Flowork OS <agent@floworkos.com>
   ============================================================================= */

/* Attachment Tray in Input Box */
.chat-attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 2px 8px 2px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.14);
  margin-bottom: 6px;
  max-height: 120px;
  overflow-y: auto;
}

.chat-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 6px;
  padding: 3px 7px 3px 5px;
  font-size: 11px;
  color: #e2e8f0;
  transition: all 0.15s ease;
  user-select: none;
}

.chat-attachment-chip:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.45);
}

.chat-attachment-thumb {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: #000;
  flex-shrink: 0;
}

.chat-attachment-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.chat-attachment-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #cbd5e1;
}

.chat-attachment-size {
  color: var(--text-muted, #94a3b8);
  font-size: 9.5px;
  margin-left: 2px;
}

.chat-attachment-del {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.chat-attachment-del:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

/* User Message Attachments */
.chat-msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 0 auto 8px auto;
  width: 100%;
}

.chat-msg-img-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: #000;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 280px;
  max-height: 200px;
}

.chat-msg-img-wrap:hover {
  transform: translateY(-2px);
  border-color: #00e5ff;
  box-shadow: 0 4px 18px rgba(0, 229, 255, 0.25);
}

.chat-msg-attached-img {
  max-width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.chat-img-zoom-hint {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: none !important;
  border-radius: 4px;
  padding: 3px 5px;
  color: #00e5ff;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.chat-msg-img-wrap:hover .chat-img-zoom-hint {
  opacity: 1;
}

.chat-msg-file-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-msg-file-card:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.45);
}

/* Agent Response Media / Screenshot Cards */
.chat-media-card {
  margin: 10px 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: rgba(10, 14, 26, 0.85);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.chat-media-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.16);
  font-size: 10.5px;
  font-family: var(--font-mono, monospace);
}

.chat-media-tag {
  color: #00e5ff;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-media-filename {
  color: var(--text-dim, #94a3b8);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-media-preview {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070f;
  min-height: 100px;
  max-height: 480px;
  overflow: hidden;
}

.chat-media-preview img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.chat-media-preview:hover img {
  transform: scale(1.015);
}

.chat-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.5);
  backdrop-filter: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #00e5ff;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
  user-select: none;
}

.chat-media-preview:hover .chat-media-overlay {
  opacity: 1;
}

/* Agent Response File Attachment Cards */
.chat-file-card {
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.chat-file-card:hover {
  background: rgba(0, 229, 255, 0.09);
  border-color: rgba(0, 229, 255, 0.4);
}

.chat-file-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.chat-file-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.chat-file-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-file-title {
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-path {
  color: var(--text-muted, #94a3b8);
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chat-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.chat-file-btn:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: rgba(0, 229, 255, 0.45);
  color: #00e5ff;
}

/* Lightbox Modal */
.chat-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.chat-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.88);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.chat-lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #0a0d18;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 229, 255, 0.2);
  overflow: hidden;
}

.chat-lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.18);
  font-size: 11px;
  color: #e2e8f0;
}

.chat-lightbox-title {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: #00e5ff;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-lightbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.chat-lightbox-btn:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.5);
  color: #ffffff;
}

.chat-lightbox-body {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #03050a;
  overflow: auto;
  max-height: calc(92vh - 55px);
}

.chat-lightbox-body img {
  max-width: 100%;
  max-height: calc(92vh - 80px);
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
}


/* ==========================================================================
   SOVEREIGN HOLOGRAPHIC TACTICAL HUD DECK (FRAMELESS, TRANSLUCENT)
   ========================================================================== */
.sovereign-tactical-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 24px;
}

.sovereign-hud-widget {
  background: rgba(4, 10, 22, 0.72) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 229, 255, 0.2) !important;
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 16px rgba(0, 229, 255, 0.02) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sovereign-hud-widget:hover {
  border-color: rgba(0, 229, 255, 0.45) !important;
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.12), inset 0 0 20px rgba(0, 229, 255, 0.04) !important;
}

.sovereign-hud-header {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 229, 255, 0.25);
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.sovereign-hud-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #00e5ff;
  font-family: var(--font-mono);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.sovereign-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.sovereign-hud-footer {
  width: 100%;
  height: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0, 229, 255, 0.18);
  margin-top: 10px;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.85);
  white-space: nowrap;
}

.sovereign-hud-footer-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
}
.sovereign-hud-footer-3col span:first-child { text-align: left; }
.sovereign-hud-footer-3col span:last-child { text-align: right; }

/* Radar & Vector Canvas Wrappers */
.radar-canvas-wrap {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radar-canvas {
  width: 100%;
  max-width: 360px;
  height: 200px;
  display: block;
}

.vector-canvas-wrap {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vector-canvas {
  width: 100%;
  max-width: 360px;
  height: 180px;
  display: block;
}

/* Telemetry Feed */
.matrix-log-feed {
  width: 100%;
  height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  overflow: hidden;
}

.matrix-log-line {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: 1px dotted rgba(0, 229, 255, 0.08);
}

.log-time {
  color: #64748b;
  font-size: 9px;
  flex-shrink: 0;
  width: 62px;
}

.log-tag {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  text-align: center;
  min-width: 32px;
  letter-spacing: 0.06em;
}

.log-tag.tag-sys { background: rgba(0, 229, 255, 0.12); color: #00e5ff; border: 1px solid rgba(0, 229, 255, 0.35); text-shadow: 0 0 6px #00e5ff; }
.log-tag.tag-net { background: rgba(52, 211, 153, 0.12); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); text-shadow: 0 0 6px #34d399; }
.log-tag.tag-sec { background: rgba(192, 132, 252, 0.12); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.35); text-shadow: 0 0 6px #c084fc; }
.log-tag.tag-eng { background: rgba(251, 191, 36, 0.12); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.35); text-shadow: 0 0 6px #fbbf24; }
.log-tag.tag-rad { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); text-shadow: 0 0 6px #38bdf8; }
.log-tag.tag-ai  { background: rgba(244, 63, 94, 0.12); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.35); text-shadow: 0 0 6px #f43f5e; }

.log-msg {
  color: rgba(241, 245, 249, 0.9);
  text-overflow: ellipsis;
  overflow: hidden;
  flex: 1;
}

/* Quantum Metrics */
.metrics-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0 8px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.arc-gauge-svg {
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.gauge-track {
  fill: none;
  stroke: rgba(0, 229, 255, 0.12);
  stroke-width: 6;
}

.gauge-fill {
  fill: none;
  stroke: #00e5ff;
  stroke-width: 6;
  stroke-dasharray: 264;
  stroke-dashoffset: 26;
  filter: drop-shadow(0 0 8px #00e5ff);
  transition: stroke-dashoffset 0.6s ease;
}

.metrics-top-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.metrics-main-val {
  font-size: 22px;
  font-weight: 800;
  color: #00e5ff;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  line-height: 1.1;
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.7);
}

.metrics-main-lbl {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.8);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.metrics-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(0, 229, 255, 0.15);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.metrics-bar-fill {
  height: 100%;
  width: 98.4%;
  background: linear-gradient(90deg, #00e5ff, #38bdf8);
  box-shadow: 0 0 8px #00e5ff;
}

.telemetry-kv-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 0;
}

.telemetry-kv-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: rgba(148, 163, 184, 0.85);
  letter-spacing: 0.05em;
  line-height: 17px;
  border-bottom: 1px dotted rgba(0, 229, 255, 0.06);
  padding-bottom: 2px;
}

.telemetry-kv-val {
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Sovereign Deck CTA Button */
.sovereign-deck-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.btn-deck-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #030712;
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 50px rgba(0, 242, 254, 0.2);
  transition: all 0.2s ease;
}

.btn-deck-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 70px rgba(0, 242, 254, 0.35);
  filter: brightness(1.1);
}

/* ==========================================================================
   JARVIS TACTICAL CYBER-HUD & AUDIO ENGINE (FLOWORK OS SOVEREIGN PROTOCOL)
   ========================================================================== */

.fl-tactical-hud-container {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
}

.fl-tactical-card {
  position: relative;
  background: rgba(3, 7, 18, 0.82);
  -webkit-backdrop-filter: none saturate(180%);
  backdrop-filter: none saturate(180%);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 229, 255, 0.18), inset 0 0 14px rgba(0, 229, 255, 0.04);
  padding: 12px 14px;
  color: #e2e8f0;
  font-family: var(--font-mono, monospace);
  overflow: hidden;
  pointer-events: auto;
  transform-origin: bottom right;
  animation: flTacticalEntrance 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

.fl-tactical-card.is-leaving {
  animation: flTacticalExit 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes flTacticalEntrance {
  0% { opacity: 0; transform: translateY(18px) scale(0.94); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes flTacticalExit {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-14px) scale(0.96); filter: blur(6px); }
}

.fl-tactical-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fl-tactical-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.4);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.fl-tactical-time {
  font-size: 9.5px;
  color: #94a3b8;
  letter-spacing: 0.06em;
}

.fl-tactical-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}
.fl-tactical-close:hover {
  color: #f87171;
}

.fl-tactical-body {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* 1. JET FIGHTER RECON // TARGET LOCK */
.fl-tactical-card.type-target_lock {
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 242, 254, 0.25);
}

.fl-tactical-radar {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(0, 242, 254, 0.4);
  background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, rgba(3, 7, 18, 0.6) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.fl-tactical-radar::before {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 242, 254, 0.3);
}

.fl-tactical-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, rgba(0, 242, 254, 0.4) 0deg, transparent 60deg, transparent 360deg);
  border-radius: 50%;
  animation: flRadarSweep 1.8s linear infinite;
}

@keyframes flRadarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fl-tactical-crosshair {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid #00f2fe;
  animation: flCrosshairLock 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 0 10px #00f2fe;
  z-index: 2;
}

@keyframes flCrosshairLock {
  0% { transform: scale(2.2) rotate(45deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.fl-tactical-intel {
  flex: 1;
  min-width: 0;
}

.fl-tactical-title {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.fl-tactical-subtitle {
  font-size: 10px;
  color: #38bdf8;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fl-tactical-telemetry {
  display: flex;
  gap: 8px;
  margin-top: 5px;
  font-size: 9px;
  color: #64748b;
}
.fl-tactical-telemetry span {
  color: #00e5ff;
}

/* 2. CYBER BREACH // TERMINAL INFILTRATION */
.fl-tactical-card.type-terminal_exec {
  border-color: rgba(0, 255, 178, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 255, 178, 0.2);
}

.fl-tactical-card.type-terminal_exec .fl-tactical-badge {
  background: rgba(0, 255, 178, 0.12);
  color: #00ffb2;
  border-color: rgba(0, 255, 178, 0.4);
  text-shadow: 0 0 8px rgba(0, 255, 178, 0.6);
}

.fl-tactical-term-box {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 255, 178, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
  width: 100%;
  font-size: 10.5px;
  color: #00ffb2;
  position: relative;
  overflow: hidden;
}

.fl-tactical-term-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, #00ffb2, transparent);
  animation: flHackerLaserScan 1s infinite linear;
}

.fl-tactical-term-cmd {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

/* 3. QUANTUM PROTOCOL // SKILL ENGAGEMENT */
.fl-tactical-card.type-skill_pinned {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 25px rgba(168, 85, 247, 0.25);
}

.fl-tactical-card.type-skill_pinned .fl-tactical-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.fl-tactical-skill-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(0, 229, 255, 0.1) 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
  animation: flHexPulse 1.5s infinite alternate;
}

@keyframes flHexPulse {
  0% { transform: scale(0.98); box-shadow: 0 0 10px rgba(168, 85, 247, 0.2); }
  100% { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
}

/* 4. ORBITAL LAUNCH // SUBAGENT SWARM */
.fl-tactical-card.type-agent_spawn {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.25);
}

.fl-tactical-satellite {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: flSatRotate 4s linear infinite;
}

@keyframes flSatRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fl-tactical-satellite-core {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 14px #38bdf8;
}

/* 5. DEFENSE RED ALERT // INTERCEPT GATE */
.fl-tactical-card.type-alert_breach {
  border-color: rgba(239, 68, 68, 0.65) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 30px rgba(239, 68, 68, 0.35) !important;
  animation: flAlertEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards, flAlertGlitch 1.2s infinite ease-in-out;
}

@keyframes flAlertEntrance {
  0% { opacity: 0; transform: translateY(18px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes flAlertGlitch {
  0%, 100% { border-color: rgba(239, 68, 68, 0.65); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
  50% { border-color: rgba(248, 113, 113, 0.9); box-shadow: 0 0 35px rgba(239, 68, 68, 0.6); }
}

.fl-tactical-card.type-alert_breach .fl-tactical-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

.fl-tactical-alert-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #f87171;
  flex-shrink: 0;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

/* NAVBAR TOGGLE BUTTON (JARVIS HUD & AUDIO) */
.fl-jarvis-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 600;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.fl-jarvis-toggle-btn:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.fl-jarvis-toggle-btn.is-muted {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.05);
}

/* ==========================================================================
   FULL CHAT-COVERING TACTICAL CYBER-OVERLAY (DRAMATIC JARVIS HUD)
   ========================================================================== */

.fl-chat-tactical-overlay {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  z-index: 100 !important;
  background: rgba(2, 6, 23, 0.78) !important;
  -webkit-backdrop-filter: none saturate(160%) !important;
  backdrop-filter: none saturate(160%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  animation: flChatOverlayEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto !important;
  user-select: none !important;
  overflow: hidden !important;
}

.rightbar-chat .fl-chat-tactical-overlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 100 !important;
}

.fl-chat-tactical-overlay.is-leaving {
  animation: flChatOverlayExit 0.35s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes flChatOverlayEnter {
  0% { opacity: 0; transform: scale(1.04); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes flChatOverlayExit {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(0.96); filter: blur(8px); }
}

.fl-chat-tactical-window {
  position: relative !important;
  width: calc(100% - 16px) !important;
  max-width: 340px !important;
  height: 165px !important;
  max-height: 165px !important;
  min-height: 165px !important;
  margin: auto !important;
  background: rgba(4, 12, 28, 0.92) !important;
  -webkit-backdrop-filter: none saturate(200%) !important;
  backdrop-filter: none saturate(200%) !important;
  border: 1px solid rgba(0, 242, 254, 0.5) !important;
  border-radius: 10px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 242, 254, 0.25), inset 0 0 20px rgba(0, 242, 254, 0.08) !important;
  overflow: hidden !important;
  padding: 10px 14px !important;
  font-family: var(--font-mono, monospace) !important;
  color: #e2e8f0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  pointer-events: auto !important;
}

.fl-chat-tactical-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00f2fe 50%, transparent);
  animation: flHackerLaserScan 1s infinite linear;
}

@keyframes flHackerLaserScan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Tactical Window Sub-elements */
.fl-tactical-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  margin-bottom: 4px !important;
  padding-bottom: 4px !important;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2) !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.fl-tactical-header-tag {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.fl-cyber-dot {
  font-size: 8px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}
.fl-cyber-dot.cyan { color: #00f2fe !important; text-shadow: 0 0 8px #00f2fe !important; }
.fl-cyber-dot.amber { color: #fbbf24 !important; text-shadow: 0 0 8px #fbbf24 !important; }
.fl-cyber-dot.emerald { color: #10b981 !important; text-shadow: 0 0 8px #10b981 !important; }
.fl-cyber-dot.purple { color: #c084fc !important; text-shadow: 0 0 8px #c084fc !important; }

.fl-cyber-tag {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}
.fl-cyber-tag.cyan { color: #00f2fe !important; }
.fl-cyber-tag.amber { color: #fbbf24 !important; }
.fl-cyber-tag.emerald { color: #10b981 !important; }
.fl-cyber-tag.purple { color: #c084fc !important; }

.fl-tactical-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  border: 1px solid currentColor !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  letter-spacing: 0.04em !important;
}

.fl-tactical-screen {
  flex: 1 !important;
  min-height: 0 !important;
  margin: 6px 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.fl-tactical-bottom {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  font-size: 9.5px !important;
  color: #64748b !important;
  letter-spacing: 0.04em !important;
  margin-top: 4px !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.fl-cmd-cursor {
  display: inline-block !important;
  color: #00ffb2 !important;
  margin-left: 2px !important;
  animation: flCmdCursorBlink 0.8s infinite !important;
}

@keyframes flCmdCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 1. Target Lock Radar */
.fl-chat-tactical-window.type-target_lock {
  border-color: rgba(0, 242, 254, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(0, 242, 254, 0.12) !important;
}

.fl-chat-target-radar {
  position: relative !important;
  width: 68px !important;
  height: 68px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(0, 242, 254, 0.6) !important;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(3, 7, 18, 0.8) 75%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
}

.fl-chat-target-radar::before {
  content: '' !important;
  position: absolute !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 1px dashed rgba(0, 242, 254, 0.45) !important;
}

.fl-chat-radar-sweep {
  position: absolute !important;
  top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important;
  border-radius: 50% !important;
  background: conic-gradient(from 0deg, rgba(0, 242, 254, 0.5) 0deg, transparent 65deg, transparent 360deg) !important;
  animation: flRadarSweep 1.4s linear infinite !important;
}

.fl-chat-target-crosshair {
  position: absolute !important;
  width: 26px !important;
  height: 26px !important;
  border: 1.5px solid #00f2fe !important;
  box-shadow: 0 0 10px #00f2fe !important;
  animation: flCrosshairLock 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  z-index: 2 !important;
}

@keyframes flRadarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes flCrosshairLock {
  0% { transform: scale(1.6) rotate(45deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* 2. Live Terminal Breacher */
.fl-chat-tactical-window.type-terminal_exec {
  border-color: rgba(0, 255, 178, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(0, 255, 178, 0.1) !important;
}

.fl-chat-term-matrix {
  font-family: monospace !important;
  font-size: 9px !important;
  color: #00ffb2 !important;
  opacity: 0.18 !important;
  line-height: 1 !important;
  margin-bottom: 4px !important;
  user-select: none !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.fl-tactical-code {
  margin: 0 !important;
  padding: 6px 10px !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(0, 255, 178, 0.3) !important;
  border-radius: 6px !important;
  font-family: var(--font-mono, monospace) !important;
  font-size: 11px !important;
  color: #00ffb2 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

/* 3. Skill Protocol */
.fl-chat-tactical-window.type-skill_pinned {
  border-color: rgba(168, 85, 247, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(168, 85, 247, 0.12) !important;
}

.fl-chat-search-bar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(168, 85, 247, 0.5) !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
  color: #c084fc !important;
}

.fl-chat-pin-stamp {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  background: rgba(0, 229, 255, 0.2) !important;
  color: #00e5ff !important;
  border: 1px solid rgba(0, 229, 255, 0.6) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
}

/* 4. Sub-Agent Swarm Orbit */
.fl-chat-tactical-window.type-agent_spawn {
  border-color: rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(56, 189, 248, 0.12) !important;
}

.fl-chat-sat-orbit {
  position: relative !important;
  width: 68px !important;
  height: 68px !important;
  border-radius: 50% !important;
  border: 1.5px dashed rgba(56, 189, 248, 0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: flSatRotate 3s linear infinite !important;
}

.fl-chat-sat-node {
  position: absolute !important;
  top: -5px !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #00f2fe !important;
  box-shadow: 0 0 10px #00f2fe !important;
}

@keyframes flSatRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 5. Defense Shield Breach */
.fl-chat-tactical-window.type-alert_breach {
  border-color: rgba(239, 68, 68, 0.9) !important;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.5), inset 0 0 25px rgba(239, 68, 68, 0.2) !important;
}

.fl-chat-tactical-window.type-alert_breach::before {
  background: linear-gradient(90deg, transparent, #ef4444 50%, transparent) !important;
}

/* 6. System Online */
.fl-chat-tactical-window.type-system_online {
  border-color: rgba(0, 229, 255, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(0, 229, 255, 0.12) !important;
}


/* ==========================================================================
   UNIFIED COLLAPSIBLE TOOL HISTORY CAPSULE (UNIFIED 13PX TYPOGRAPHY & SLEEK LIST)
   ========================================================================== */

.fl-toolstream-wrap {
  margin: 1px 0 4px 0;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible;
  transition: all 0.15s ease;
}

.fl-toolstream-wrap[open] {
  margin: 2px 0 6px 0;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.fl-toolstream-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  cursor: pointer;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px !important;
  color: #94a3b8;
  background: transparent !important;
  border: none !important;
  transition: color 0.15s ease;
  list-style: none;
  line-height: 1.5;
}

.fl-toolstream-wrap[open] .fl-toolstream-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border: none !important;
  width: auto;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.fl-toolstream-summary::-webkit-details-marker {
  display: none !important;
}

.fl-toolstream-summary:hover {
  color: #f1f5f9;
}

.fl-toolstream-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px !important;
  font-weight: 700;
  color: #38bdf8;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  user-select: none;
}

.fl-toolstream-summary:hover .fl-toolstream-chevron {
  color: #00f2fe;
}

.fl-toolstream-wrap[open] > .fl-toolstream-summary > .fl-toolstream-chevron {
  transform: rotate(90deg);
  color: #38bdf8;
}

.fl-toolstream-title {
  font-weight: 600;
  color: #cbd5e1;
  font-size: 13px !important;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.fl-toolstream-summary:hover .fl-toolstream-title {
  color: #ffffff;
}

.fl-toolstream-tools-list {
  display: none !important;
}

/* Toolstream Body: Pure Indented Text List */
.fl-toolstream-body {
  padding: 2px 0 2px 14px !important;
  display: flex;
  flex-direction: column;
  gap: 4px !important;
  max-height: 520px;
  overflow-y: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-left: 5px !important;
}

.fl-toolstream-body::-webkit-scrollbar {
  width: 4px;
}
.fl-toolstream-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* Zero Boxing: No borders, no backgrounds, no boxes on each tool */
.fl-toolstream-body > details,
.fl-toolstream-body > .fl-commands-group > details,
.fl-toolstream-body .fl-cmd-item,
.fl-toolstream-body .fl-tool-card,
.fl-toolstream-body .fl-subagent-card,
.fl-toolstream-body .fl-task-card {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  margin: 1px 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

/* Eliminate nested group artifacts */
.fl-toolstream-body .fl-commands-group {
  display: contents !important;
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
}

.fl-toolstream-body .fl-commands-summary,
.fl-toolstream-body .fl-commands-group-summary,
.fl-toolstream-body summary.fl-commands-summary {
  display: none !important;
}

.fl-toolstream-body .fl-commands-list {
  display: contents !important;
}

/* Hide tacky uppercase hacker tags */
.fl-tool-tag,
.fl-skill-tag,
.fl-task-tag,
.fl-subagent-tag,
.fl-commands-tag {
  display: none !important;
}

/* Header of each tool: Plain text row with chevron */
.fl-toolstream-body .fl-cmd-item-header,
.fl-toolstream-body .fl-tool-header,
.fl-toolstream-body .fl-subagent-header,
.fl-toolstream-body .fl-task-header {
  padding: 3px 0 !important;
  min-height: unset !important;
  font-size: 13px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  user-select: none !important;
  color: #94a3b8 !important;
  list-style: none !important;
}

.fl-toolstream-body .fl-cmd-item-header::-webkit-details-marker,
.fl-toolstream-body .fl-tool-header::-webkit-details-marker,
.fl-toolstream-body .fl-subagent-header::-webkit-details-marker,
.fl-toolstream-body .fl-task-header::-webkit-details-marker {
  display: none !important;
}

.fl-toolstream-body .fl-cmd-item-header:hover,
.fl-toolstream-body .fl-tool-header:hover,
.fl-toolstream-body .fl-subagent-header:hover,
.fl-toolstream-body .fl-task-header:hover {
  color: #f1f5f9 !important;
  background: transparent !important;
}

/* Chevron for each tool: cyan '>' */
.fl-toolstream-body .fl-cmd-item-chevron,
.fl-toolstream-body .fl-tool-chevron {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  transition: transform 0.15s ease, color 0.15s ease !important;
}

.fl-toolstream-body details[open] > .fl-cmd-item-header > .fl-cmd-item-chevron,
.fl-toolstream-body details[open] > .fl-tool-header > .fl-tool-chevron {
  transform: rotate(90deg) !important;
  color: #38bdf8 !important;
}

.fl-toolstream-body .fl-cmd-item-prompt {
  font-size: 13px !important;
  font-family: var(--font-mono) !important;
  font-weight: 600 !important;
  color: #64748b !important;
  flex-shrink: 0 !important;
}

.fl-toolstream-body .fl-tool-icon {
  display: none !important;
}

.fl-toolstream-body .fl-cmd-item-title,
.fl-toolstream-body .fl-tool-title,
.fl-toolstream-body .fl-subagent-name,
.fl-toolstream-body .fl-task-title {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #cbd5e1 !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Plain text command / argument, NO pill background */
.fl-toolstream-body .fl-tool-cmd {
  font-size: 12.5px !important;
  font-family: var(--font-mono) !important;
  padding: 0 !important;
  background: transparent !important;
  color: #94a3b8 !important;
  border: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 360px !important;
}

.fl-toolstream-body .fl-tool-reason-pill {
  display: none !important;
}

.fl-toolstream-body .fl-tool-badge {
  font-size: 11.5px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  margin-left: auto !important;
  font-weight: 500 !important;
}

.fl-toolstream-body .fl-tool-badge.done {
  color: #10b981 !important;
}

/* Output details when an individual tool is expanded: Clean indented code container */
.fl-toolstream-body .fl-cmd-item-body,
.fl-toolstream-body .fl-tool-details,
.fl-toolstream-body .fl-subagent-body,
.fl-toolstream-body .fl-task-body {
  background: rgba(2, 6, 23, 0.7) !important;
  padding: 8px 12px !important;
  margin: 4px 0 6px 14px !important;
  border-left: 2px solid rgba(56, 189, 248, 0.3) !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-radius: 0 4px 4px 0 !important;
  font-size: 12.5px !important;
}

.fl-toolstream-body .fl-tool-reason-box {
  font-size: 12px !important;
  padding: 4px 8px !important;
  margin-bottom: 6px !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.fl-toolstream-body .fl-trb-lbl {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
}

.fl-toolstream-body .fl-trb-txt {
  font-size: 12px !important;
  color: #cbd5e1 !important;
}

.fl-toolstream-body .fl-tool-block-header {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 600 !important;
  margin-bottom: 4px !important;
}

.fl-toolstream-body .fl-cmd-stdout-bar {
  font-size: 11px !important;
  margin-bottom: 4px !important;
}

.fl-toolstream-body pre,
.fl-toolstream-body code {
  font-size: 12px !important;
  line-height: 1.5 !important;
}


.fl-live-active-slot:empty {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  display: none !important;
}

.fl-live-active-slot {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ==========================================================================
   NEURAL ANTICIPATOR (DAG PIPELINE HUD) & REAL-TIME TELEMETRY
   ========================================================================== */
.fl-dag-pipeline-bar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 10px;
  margin: 6px 0;
  background: rgba(11, 24, 43, 0.7);
  border: 1px solid rgba(0, 242, 254, 0.22);
  border-radius: 7px;
  backdrop-filter: none !important;
}

.fl-dag-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.fl-dag-title {
  color: #00f2fe;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

.fl-dag-active-step-badge {
  color: #38bdf8;
  font-size: 8.5px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
}

.fl-dag-nodes {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.fl-dag-nodes::-webkit-scrollbar {
  display: none;
}

.fl-dag-node {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.fl-dag-node.pending {
  color: #64748b;
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(71, 85, 105, 0.25);
}

.fl-dag-node.active {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.55);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
  animation: flDagPulse 1.4s infinite ease-in-out;
}

.fl-dag-node.done {
  color: #00ffb2;
  background: rgba(0, 255, 178, 0.08);
  border: 1px solid rgba(0, 255, 178, 0.35);
  box-shadow: 0 0 8px rgba(0, 255, 178, 0.15);
}

.fl-dag-status-icon {
  font-size: 8px;
}

.fl-dag-status-icon.pulse {
  display: inline-block;
  animation: flIconSpin 1.2s infinite linear;
}

.fl-dag-connector {
  flex: 1;
  min-width: 8px;
  max-width: 18px;
  height: 2px;
  background: rgba(71, 85, 105, 0.35);
}

.fl-dag-connector.active {
  background: linear-gradient(90deg, #00ffb2, #00f2fe);
  box-shadow: 0 0 6px #00f2fe;
}

@keyframes flDagPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.2);
    border-color: rgba(0, 242, 254, 0.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.6);
    border-color: rgba(0, 242, 254, 0.9);
  }
}

@keyframes flIconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fl-live-token-speed,
.fl-live-latency-gauge {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}





/* =============================================================================
   HOLOGRAPHIC AMBIENT CHAT TOOL STREAM (100% TRANSPARENT / FRAMELESS HUD)
   Co-authored-by: Flowork OS <agent@floworkos.com>
   ============================================================================= */
:root {
  --holo-cyan: #00f0ff;
  --holo-emerald: #10b981;
  --holo-amber: #f59e0b;
  --holo-purple: #c084fc;
  --holo-rose: #f43f5e;
}

.fl-live-ambient-stage {
  position: relative !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 4px 6px 2px 6px !important;
  margin: 4px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  font-family: var(--font-mono, monospace) !important;
  overflow: visible !important;
  animation: flHoloFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: opacity 0.35s ease, max-height 0.35s ease, height 0.35s ease, margin 0.35s ease, padding 0.35s ease !important;
}

@keyframes flHoloFadeIn {
  0% { opacity: 0; transform: translateY(-3px); }
  100% { opacity: 1; transform: translateY(0); }
}

.fl-live-ambient-stage.is-finished {
  opacity: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: translateY(-4px) !important;
  pointer-events: none !important;
}

.fl-ambient-hud-line {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  line-height: 1.2 !important;
}

.fl-ambient-meta {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.fl-ambient-glyph {
  color: #00f0ff;
  font-size: 11px;
  animation: flGlyphPulse 1.6s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
}

@keyframes flGlyphPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.fl-ambient-tag {
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
}
.fl-ambient-tag.cyan { color: #00f0ff; text-shadow: 0 0 6px rgba(0, 240, 255, 0.4); }
.fl-ambient-tag.emerald { color: #10b981; text-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.fl-ambient-tag.amber { color: #f59e0b; text-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.fl-ambient-tag.purple { color: #c084fc; text-shadow: 0 0 6px rgba(192, 132, 252, 0.4); }
.fl-ambient-tag.rose { color: #f43f5e; text-shadow: 0 0 6px rgba(244, 63, 94, 0.4); }

.fl-ambient-sep {
  color: #64748b;
  font-size: 10px;
}

.fl-ambient-target {
  font-size: 10.5px !important;
  color: #cbd5e1 !important;
  letter-spacing: 0.02em !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.fl-ambient-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}
.fl-ambient-badge.cyan { color: #00f0ff; background: rgba(0, 240, 255, 0.1); border: 1px solid rgba(0, 240, 255, 0.35); }
.fl-ambient-badge.emerald { color: #10b981; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.35); }
.fl-ambient-badge.amber { color: #f59e0b; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); }
.fl-ambient-badge.purple { color: #c084fc; background: rgba(192, 132, 252, 0.1); border: 1px solid rgba(192, 132, 252, 0.35); }
.fl-ambient-badge.rose { color: #f43f5e; background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.35); }

.fl-ambient-spinner {
  width: 6px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: flSpin 0.75s linear infinite;
  display: inline-block;
}

.fl-ambient-laser-track {
  width: 100% !important;
  height: 12px !important;
  position: relative !important;
  overflow: hidden !important;
}

.fl-ambient-wave-svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.fl-ambient-sine-wave {
  animation: flSineWaveDrift 2.4s linear infinite;
}

@keyframes flSineWaveDrift {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -120; }
}

.fl-ambient-laser-beam {
  animation: flLaserBeamSweep 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes flLaserBeamSweep {
  0% { cx: 20px; opacity: 0.3; r: 2; }
  50% { opacity: 1; r: 2.8; }
  100% { cx: 580px; opacity: 0.3; r: 2; }
}
