/* ========================================================
   DJARVIS AI STUDIO — SPATIAL AGENT CONTROL ROOM (djarvis.uz)
   Design System: Apple VisionOS + Hume AI + Linear Density
   ======================================================== */

:root {
  --bg-deep: #060811;
  --bg-surface: rgba(13, 17, 30, 0.65);
  --bg-surface-elevated: rgba(19, 26, 46, 0.78);
  --bg-surface-hover: rgba(28, 38, 66, 0.88);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(99, 102, 241, 0.35);
  --border-highlight: rgba(255, 255, 255, 0.16);

  --accent-primary: #6366f1;
  --accent-primary-glow: rgba(99, 102, 241, 0.45);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.4);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Luminescence */
.ambient-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.5;
}

.glow-top-left {
  top: -150px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 70%);
}

.glow-bottom-right {
  bottom: -150px;
  right: -100px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, transparent 70%);
}

.glow-center {
  top: 30%;
  left: 40%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1720px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 16px;
}

.font-mono {
  font-family: var(--font-mono);
}

/* ========================================================
   TOP SPATIAL FLOATING GLASS HEADER
   ======================================================== */
.top-spatial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-surface);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-badge-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar-orb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.orb-mini-core {
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px #ffffff;
  animation: miniPulse 2.5s infinite ease-in-out;
}

@keyframes miniPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.accent-dot {
  color: var(--accent-cyan);
}

.brand-edition {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.telemetry-pill-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.pill-label {
  color: var(--text-tertiary);
  font-weight: 600;
}

.pill-sep {
  color: rgba(255, 255, 255, 0.2);
}

.pill-value.highlight {
  color: #c7d2fe;
  font-weight: 600;
}

/* Spatial Navigation Dock */
.spatial-dock-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 6px;
  border-radius: 40px;
  border: 1px solid var(--border-subtle);
}

.dock-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dock-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.dock-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.dock-counter {
  font-size: 10px;
  background: var(--accent-primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.credits-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  color: #a7f3d0;
}

.voice-mode-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.voice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

/* ========================================================
   UPPER SECTION: AGENTLAR JAMOASI (5-AGENT FLEET)
   ======================================================== */
.agent-fleet-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fleet-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

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

.section-tag-icon {
  font-size: 15px;
  color: var(--accent-amber);
}

.section-heading {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #f1f5f9;
}

.fleet-status-meta {
  font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-weight: 600;
}

.fleet-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

.agent-fleet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.agent-card {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  cursor: pointer;
}

.agent-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}

.agent-card.active {
  border-color: rgba(99, 102, 241, 0.5);
  background: linear-gradient(145deg, rgba(22, 29, 54, 0.9), rgba(15, 20, 36, 0.8));
  box-shadow: 0 0 20px -5px rgba(99, 102, 241, 0.35);
}

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

.agent-avatar-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.avatar-blue { background: rgba(99, 102, 241, 0.2); border: 1px solid rgba(99, 102, 241, 0.4); }
.avatar-purple { background: rgba(168, 85, 247, 0.2); border: 1px solid rgba(168, 85, 247, 0.4); }
.avatar-amber { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.4); }
.avatar-emerald { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.4); }
.avatar-cyan { background: rgba(6, 182, 212, 0.2); border: 1px solid rgba(6, 182, 212, 0.4); }

.agent-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.badge-online { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-ready { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-standby { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-active { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-idle { background: rgba(148, 163, 184, 0.12); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.25); }

.agent-info-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.agent-role {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-specs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
}

.spec-dot {
  color: rgba(255, 255, 255, 0.2);
}

/* ========================================================
   3-COLUMN SPATIAL CANVAS WORKSPACE
   ======================================================== */
.spatial-tri-canvas {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.canvas-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Reusable Glass Module Card */
.glass-module-card {
  background: var(--bg-surface);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.4);
}

.card-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-icon {
  font-size: 15px;
}

.module-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  flex: 1;
}

.module-badge {
  font-size: 10px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-secondary);
}

/* LEFT COLUMN COMPONENTS */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.task-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.pulse-green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.pulse-blue { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.pulse-purple { background: #a855f7; box-shadow: 0 0 6px #a855f7; }
.pulse-amber { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

.task-content-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.task-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.task-meta-tag {
  font-size: 9.5px;
  color: var(--accent-cyan);
}

.task-desc {
  font-size: 11px;
  color: var(--text-tertiary);
}

.task-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin-top: 4px;
  overflow: hidden;
}

.task-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 4px;
}

/* Quick Commands */
.quick-commands-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.quick-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chips-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cmd-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.cmd-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #fff;
  transform: translateX(3px);
}

/* Voice Settings */
.voice-picker-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picker-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.voice-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.voice-option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.voice-option-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary);
  color: #fff;
}

.audio-volume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vol-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.vol-slider {
  flex: 1;
  accent-color: var(--accent-primary);
  height: 4px;
}

/* ========================================================
   CENTER COLUMN: 3D INTERACTIVE ROTATABLE NEURAL CORE (CONCEPT J2 1:1)
   ======================================================== */
.spatial-neural-stage {
  position: relative;
  background: linear-gradient(180deg, rgba(6, 12, 24, 0.96) 0%, rgba(3, 7, 16, 0.98) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(0, 245, 255, 0.15);
}

/* Top Bar Line 1 */
.j2-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(5, 11, 22, 0.95);
  border-bottom: 1px solid rgba(0, 245, 255, 0.16);
  gap: 8px;
  flex-wrap: wrap;
}

.j2-brand-group {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.j2-delta-logo {
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.65));
  flex-shrink: 0;
}

.j2-brand-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.j2-brand-divider {
  color: rgba(148, 163, 184, 0.35);
  font-size: 14px;
  margin: 0 1px;
}

.j2-concept-label {
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.j2-audio-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.j2-audio-in-text {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* Dual Segmented LED dB Meter (1:1 with reference image) */
.j2-dual-db-meter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 148px;
}

.j2-db-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.j2-db-tag {
  font-size: 8.5px;
  color: #64748b;
  width: 14px;
}

.j2-led-track {
  flex: 1;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0px,
    rgba(255, 255, 255, 0.1) 2px,
    transparent 2px,
    transparent 4px
  );
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.j2-led-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #00f5ff 58%, #a855f7 88%, #f43f5e 100%);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0px, #000 2px, transparent 2px, transparent 4px);
  mask-image: repeating-linear-gradient(90deg, #000 0px, #000 2px, transparent 2px, transparent 4px);
  transition: width 0.08s linear;
}

.j2-db-scale {
  display: flex;
  justify-content: space-between;
  padding-left: 19px;
  font-size: 8px;
  color: #64748b;
  line-height: 1;
}

.j2-top-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.j2-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.j2-icon-btn:hover,
.j2-icon-btn.active {
  color: #00f5ff;
  background: rgba(0, 245, 255, 0.1);
  border-color: rgba(0, 245, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.25);
}

/* Sub-header Row: Status Pill + 5-Variant Equalizer Switcher */
.j2-subbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 14px 6px;
  z-index: 12;
  background: rgba(4, 10, 22, 0.75);
  border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.j2-status-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(4, 24, 36, 0.85);
  border: 1px solid rgba(0, 245, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.16), inset 0 0 8px rgba(0, 245, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 10.5px;
  color: #67e8f9;
  letter-spacing: 0.3px;
}

.j2-status-prefix {
  color: #94a3b8;
  font-weight: 500;
}

#orb-status-text {
  color: #5eead4;
  font-weight: 600;
}

.eq-variant-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: rgba(8, 15, 28, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.24);
  padding: 3px;
  border-radius: 7px;
}

.eq-var-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.eq-var-btn:hover {
  color: #e2e8f0;
  background: rgba(0, 245, 255, 0.08);
}

.eq-var-btn.active {
  color: #020617;
  background: linear-gradient(135deg, #00f5ff 0%, #38bdf8 55%, #a855f7 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.45);
  font-weight: 700;
}

.stop-trigger-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.stop-trigger-btn:hover {
  background: rgba(244, 63, 94, 0.3);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
  transform: scale(1.05);
}

/* 3D CANVAS WRAPPER (CONCEPT J2: TALL & CINEMATIC) */
.three-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 410px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 48%, rgba(6, 42, 68, 0.42) 0%, rgba(4, 10, 22, 0.94) 65%, #02050d 100%);
}

.three-canvas-wrapper:active {
  cursor: grabbing;
}

.three-canvas-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  z-index: 4;
  pointer-events: auto;
}

/* Subtle Technical Grid & Blurred Code Backdrop (1:1 with reference image) */
.j2-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 245, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 245, 255, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  z-index: 1;
}

.j2-bg-code-left {
  position: absolute;
  top: 26px;
  left: 20px;
  font-size: 10px;
  line-height: 1.55;
  color: rgba(56, 189, 248, 0.22);
  filter: blur(0.9px);
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.j2-bg-bars-right {
  position: absolute;
  top: 36px;
  right: 22px;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  filter: blur(0.8px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 1;
}

.j2-bg-bars-right div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #38bdf8;
}

.j2-bg-bars-right i {
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #00f5ff, #818cf8);
  border-radius: 2px;
}

.j2-floor-reflection {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 75px;
  background: radial-gradient(ellipse at center, rgba(0, 245, 255, 0.26) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 75%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 2;
}

/* HUD CORNER READOUTS OVERLAY */
.hud-corner-bottom-left {
  position: absolute;
  bottom: 14px;
  left: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.hud-corner-bottom-left .hud-dim {
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.j2-corner-sep {
  color: rgba(148, 163, 184, 0.3);
  font-size: 12px;
}

.hud-corner-bottom-left .hud-bright {
  font-size: 12px;
  color: #38bdf8;
}

.hud-corner-bottom-left .hud-bright strong {
  color: #f8fafc;
  font-weight: 600;
}

.hud-corner-bottom-right {
  position: absolute;
  bottom: 12px;
  right: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
  min-width: 175px;
}

.j2-telemetry-pill {
  font-size: 10.5px;
  color: #f8fafc;
  background: rgba(8, 16, 30, 0.82);
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.j2-telemetry-pill span {
  color: #38bdf8;
  font-weight: 500;
}

.j2-telemetry-pill strong {
  color: #f1f5f9;
  font-weight: 600;
}

.j2-telemetry-pill.highlight {
  border-color: rgba(0, 245, 255, 0.42);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.12);
}

.j2-telemetry-pill.highlight strong {
  color: #5eead4;
}

.canvas-glow-underlay {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.25) 0%, rgba(139, 92, 246, 0.14) 52%, transparent 72%);
  filter: blur(28px);
  z-index: 1;
  pointer-events: none;
}

/* Audio Frequency Ripple Rings */
.audio-ripple-rings {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.audio-ripple-rings.active {
  opacity: 1;
}

.ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(99, 102, 241, 0.4);
  animation: rippleSpread 2.5s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ripple.r2 { animation-delay: 0.8s; border-color: rgba(6, 182, 212, 0.35); }
.ripple.r3 { animation-delay: 1.6s; border-color: rgba(168, 85, 247, 0.3); }

@keyframes rippleSpread {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Spatial Audio Playback Bar */
.spatial-audio-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-top: 10px;
}

.audio-play-pause-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  transition: transform 0.15s ease;
}

.audio-play-pause-btn:hover {
  transform: scale(1.08);
}

.audio-spectrum-canvas-wrap {
  flex: 1;
  height: 26px;
  display: flex;
  align-items: center;
}

.audio-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.audio-badge {
  font-size: 10px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* CHAIN-OF-THOUGHT ACCORDION */
.thought-accordion {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
}

.thought-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(99, 102, 241, 0.08);
}

.thought-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thought-heading {
  font-size: 12.5px;
  font-weight: 600;
  color: #c7d2fe;
}

.thought-duration {
  font-size: 10.5px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.thought-arrow {
  font-size: 11px;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}

.thought-accordion.open .thought-arrow {
  transform: rotate(180deg);
}

.thought-content {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.thought-step-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.thought-step-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

/* CHAT STREAM */
.spatial-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.spatial-chat-stream::-webkit-scrollbar {
  width: 5px;
}

.spatial-chat-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.message-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.user-row {
  flex-direction: row-reverse;
}

.msg-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.user-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-card {
  max-width: 82%;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.6;
}

.glass-bubble {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.4);
}

.user-bubble {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(99, 102, 241, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 4px 20px -4px rgba(99, 102, 241, 0.4);
}

.msg-sender-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 12px;
}

.sender-name {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
}

.sender-role {
  font-size: 10px;
  color: var(--accent-cyan);
}

.msg-footer-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.msg-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.msg-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* SPATIAL INPUT DOCK (CONCEPT J2 UNIFIED COMMAND CONSOLE) */
.spatial-input-dock.j2-command-dock {
  width: 100%;
  background: linear-gradient(180deg, rgba(8, 15, 29, 0.92) 0%, rgba(5, 10, 20, 0.96) 100%);
  border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: 16px;
  padding: 10px 12px 12px;
  box-shadow: 0 14px 36px -8px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(0, 245, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.handsfree-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.handsfree-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 5px 11px;
  color: var(--text-secondary);
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.handsfree-pill-btn:hover {
  background: rgba(0, 245, 255, 0.1);
  border-color: rgba(0, 245, 255, 0.35);
  color: #fff;
}

.handsfree-pill-btn.active {
  background: rgba(4, 34, 44, 0.78);
  border-color: rgba(0, 245, 255, 0.48);
  color: #5eead4;
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.16);
}

.handsfree-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  flex-shrink: 0;
}

.handsfree-pill-btn.active .handsfree-pulse-dot {
  background: #00f5ff;
  box-shadow: 0 0 8px #00f5ff;
  animation: pulseDot 1.5s infinite;
}

.handsfree-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.2px;
}

.handsfree-hint .hint-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  opacity: 0.75;
}

.typing-indicator-row {
  display: flex;
  gap: 12px;
  align-items: center;
  animation: fadeIn 0.25s ease;
}

.typing-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.input-glass-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(3, 8, 18, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  padding: 6px 8px;
  min-height: 50px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-glass-capsule:focus-within {
  border-color: rgba(0, 245, 255, 0.65);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 245, 255, 0.2);
}

.mic-trigger-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #06b6d4, #4f46e5);
  border: 1px solid rgba(0, 245, 255, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mic-trigger-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.45);
}

.mic-trigger-btn.recording {
  background: linear-gradient(135deg, #00f5ff, #6366f1);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.55);
  animation: micPulse 1.5s infinite ease-in-out;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.input-glass-capsule input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 13.5px;
  font-family: var(--font-main);
  padding: 0 4px;
}

.input-glass-capsule input::placeholder {
  color: #64748b;
}

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

.stop-trigger-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.stop-trigger-btn:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.65);
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.send-trigger-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(99, 102, 241, 0.32));
  border: 1px solid rgba(0, 245, 255, 0.42);
  color: #67e8f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.send-trigger-btn:hover {
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  border-color: #00f5ff;
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.45);
}

/* ========================================================
   RIGHT COLUMN: HIGH-DENSITY REGIONAL TELEMETRY HUD
   ======================================================== */
.cbu-main-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cbu-currency-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.cbu-rate-large {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  font-family: var(--font-mono);
}

.rate-unit {
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.cbu-delta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--accent-emerald);
}

.mini-converter-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 4px;
}

.calc-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 2px 6px;
  width: 90px;
}

.calc-input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 12px;
  font-family: var(--font-mono);
}

.curr-tag {
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 700;
}

.calc-arrow {
  color: var(--text-tertiary);
  font-size: 11px;
}

.calc-result-wrap {
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
  font-family: var(--font-mono);
}

/* Djarvis Neural Cluster Telemetry HUD */
.cluster-status-banner {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cluster-status-label {
  font-size: 11px;
  color: #38bdf8;
}

.cluster-status-value {
  font-size: 12.5px;
  font-weight: 700;
  color: #00f0ff;
  font-family: 'JetBrains Mono', monospace;
}

.cluster-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px;
  border-radius: var(--radius-sm);
}

.p-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 4px;
}

.p-item.active {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.p-name {
  font-size: 9.5px;
  color: var(--text-tertiary);
}

.p-val {
  font-size: 11px;
  color: #fff;
  font-weight: 600;
}

/* Weather Radar */
.weather-current-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.weather-temp-huge {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
}

.weather-meta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-condition-text {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.weather-sub-meta {
  font-size: 10.5px;
  color: var(--text-tertiary);
}

/* Finance HUD */
.finance-overview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fin-stat-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fin-stat-label {
  font-size: 10.5px;
  color: var(--text-tertiary);
}

.fin-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.fin-stat-val.highlight {
  color: var(--accent-cyan);
}

.budget-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: 6px;
}

.budget-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-tertiary);
}

/* ========================================================
   TAB PANES (TABS 2, 3, 4)
   ======================================================== */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.glass-window-pane {
  background: var(--bg-surface);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* YAQINLAR MESSENGER */
.messenger-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 640px;
}

.messenger-sidebar {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-user-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.user-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.user-label {
  font-size: 10px;
  color: var(--text-tertiary);
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.e2ee-lock-tag {
  font-size: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 6px;
  border-radius: 6px;
}

.sidebar-search {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 8px 14px;
  color: #fff;
  font-size: 12.5px;
  outline: none;
}

.contacts-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.contact-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-left: 3px solid var(--accent-primary);
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-avatar.blue { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.contact-avatar.emerald { background: linear-gradient(135deg, #059669, #10b981); }
.contact-avatar.violet { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }

.contact-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-top {
  display: flex;
  justify-content: space-between;
}

.contact-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.contact-time {
  font-size: 10px;
  color: var(--text-tertiary);
}

.contact-preview {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-bottom-actions {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.invite-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

.toggle-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}

.toggle-subtitle {
  font-size: 10px;
  color: var(--text-tertiary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-primary); }
input:checked + .slider:before { transform: translateX(16px); }

/* Messenger Chat Area */
.messenger-chat-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-header-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.chat-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.e2ee-badge {
  color: #34d399;
}

.chat-header-actions {
  display: flex;
  gap: 8px;
}

.header-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.header-action-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
}

.chat-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-bubble.incoming {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
}

.msg-bubble.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
}

.msg-time {
  font-size: 10px;
  align-self: flex-end;
  opacity: 0.7;
}

.chat-input-row {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
}

.chat-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 10px 18px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}

.send-msg-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* MEDIA STUDIO & FINANCE PANELS */
.media-studio-container, .finance-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.media-studio-header, .finance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.media-title-group, .fin-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.media-icon, .fin-icon {
  font-size: 28px;
}

.media-engine-tag, .fin-db-tag {
  font-size: 11px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
  color: #c7d2fe;
}

.media-workflow-grid, .finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.glass-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.glass-panel h3 {
  font-size: 15px;
  color: #fff;
  font-weight: 700;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.form-group input, .form-group select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-btn {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  border: none;
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: all 0.2s;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.dubbing-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-step {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
}

.status-step.active {
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

/* ========================================================
   RESPONSIVE QUERIES
   ======================================================== */
@media (max-width: 1400px) {
  .spatial-tri-canvas {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
  }
  .agent-fleet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .spatial-tri-canvas {
    grid-template-columns: 1fr;
  }
  .agent-fleet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .messenger-container {
    grid-template-columns: 1fr;
  }
}

.model-option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.16);
  color: #cbd5e1;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.model-option-btn:hover {
  border-color: rgba(0, 245, 255, 0.45);
  color: #ffffff;
}

.model-option-btn.active {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.18), rgba(168, 85, 247, 0.18));
  border-color: rgba(0, 245, 255, 0.65);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.22);
}

.mic-trigger-btn.recording,
#stage-mic-btn.active {
  background: linear-gradient(135deg, #ef4444, #ec4899) !important;
  border-color: #f87171 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.65) !important;
  animation: micPulseGlow 1.2s infinite ease-in-out;
}

@keyframes micPulseGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

/* ============================================================ */
/* PIXEL-PERFECT MARVEL VFX HUD HEADER & 2x2 CAPSULE SELECTOR   */
/* (TOCH-V-TOCH REPLICA FROM MARVEL ARCHIVE SPECIFICATION)       */
/* ============================================================ */
.vfx-hud-top-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(3, 7, 18, 0.75);
  border-bottom: 1px solid rgba(0, 240, 255, 0.18);
  flex-wrap: wrap;
}

.vfx-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vfx-hud-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid #00f0ff;
  background: rgba(0, 30, 50, 0.55);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4), inset 0 0 10px rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vfx-brand-titles {
  display: flex;
  flex-direction: column;
}

.vfx-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vfx-title-djarvis {
  font-family: 'Orbitron', var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.65);
}

.vfx-title-uz {
  font-family: 'Orbitron', var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  color: #ffffff;
}

.vfx-marvel-pill {
  font-family: 'Share Tech Mono', var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #38bdf8;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 4px;
}

.vfx-subtitle {
  font-family: 'Share Tech Mono', var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

/* 2x2 Rounded Glass Capsule Card */
.vfx-variant-capsule-card {
  background: rgba(4, 12, 26, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 20px;
  padding: 10px 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.06), inset 0 0 15px rgba(0, 240, 255, 0.03);
}

.vfx-capsule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  align-items: center;
}

.vfx-var-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Orbitron', var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.vfx-var-pill:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Variant Specific Label Colors */
.vfx-var-pill[data-variant="mark_vii"] {
  color: #00f0ff;
}
.vfx-var-pill[data-variant="mind_matrix"] {
  color: #ffaa00;
}
.vfx-var-pill[data-variant="djarvis_fusion"] {
  color: #00f0ff;
}
.vfx-var-pill[data-variant="holo_3d"] {
  color: #00ffb3;
}

/* Glowing Indicator Dots */
.vfx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-cyan {
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff;
}

.dot-amber {
  background: #ffaa00;
  box-shadow: 0 0 8px #ffaa00;
}

.dot-fusion {
  background: linear-gradient(135deg, #00f0ff 0%, #ffaa00 100%);
  box-shadow: 0 0 8px #00f0ff;
}

.dot-emerald {
  background: #00ffb3;
  box-shadow: 0 0 8px #00ffb3;
}

/* Active Pill States */
.vfx-var-pill.active {
  color: #ffffff !important;
}

.vfx-var-pill.active[data-variant="mind_matrix"] {
  border-color: #ffaa00;
  background: rgba(35, 20, 5, 0.75);
  box-shadow: 0 0 16px rgba(255, 170, 0, 0.45), inset 0 0 8px rgba(255, 170, 0, 0.15);
}

.vfx-var-pill.active[data-variant="mark_vii"] {
  border-color: #00f0ff;
  background: rgba(0, 30, 50, 0.7);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.45), inset 0 0 8px rgba(0, 240, 255, 0.15);
}

.vfx-var-pill.active[data-variant="djarvis_fusion"] {
  border-color: #38bdf8;
  background: rgba(4, 25, 45, 0.7);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45), inset 0 0 8px rgba(56, 189, 248, 0.15);
}

.vfx-var-pill.active[data-variant="holo_3d"] {
  border-color: #00ffb3;
  background: rgba(4, 25, 20, 0.7);
  box-shadow: 0 0 16px rgba(0, 255, 179, 0.45), inset 0 0 8px rgba(0, 255, 179, 0.15);
}

/* Authentic Stage Reticle & Telemetry Overlays */
.vfx-hologram-stage {
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.06) 0%, rgba(2, 6, 18, 0.95) 75%) !important;
  border: 1px solid rgba(0, 240, 255, 0.22) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

.hud-stage-reticle-bar {
  position: absolute;
  top: 12px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  z-index: 10;
  pointer-events: none;
  border-bottom: 1px solid rgba(0, 240, 255, 0.14);
  padding-bottom: 6px;
}

.hud-reticle-left,
.hud-reticle-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-vfx-title-tag {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.hud-state-stream {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #38bdf8;
}

.hud-bottom-telemetry-bar {
  position: absolute;
  bottom: 34px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  z-index: 10;
  pointer-events: none;
  border-top: 1px solid rgba(0, 240, 255, 0.14);
  padding-top: 6px;
}



