/* ══════════════════════════════════════════════════════════════
   SOFI Holographic Intelligence Chamber — Stage 4B
   Premium enterprise holographic AI projection.
   SOFI floats in a dark glass atmosphere — no visible viewport
   rectangle. Chat is secondary floating information.
   Command bar is voice-first.

   Primary   #00C8E0  (cyan)
   Secondary #22c55e  (Solis green)
   Accent    #c4a44a  (restrained gold — very subtle)
   Surface   deep translucent dark glass
   ══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════
   PANEL — holographic projection chamber
   ═══════════════════════════════════════════ */

#ai-cp-panel.sofi-holo{
  background: rgba(4, 8, 18, 0.94);
  backdrop-filter: blur(44px) saturate(1.15);
  -webkit-backdrop-filter: blur(44px) saturate(1.15);
  border: 1px solid rgba(0, 200, 224, 0.06);
  border-radius: 22px;
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.85),
    0 0 1px rgba(0, 200, 224, 0.1) inset,
    0 0 100px -50px rgba(0, 200, 224, 0.03);
  width: 480px;
  height: clamp(560px, 87vh, 720px);
  max-height: 92vh;
  overflow: hidden;
}

/* Top edge power indicator */
#ai-cp-panel.sofi-holo::before{
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(
    90deg, transparent,
    rgba(0, 200, 224, 0.2) 25%,
    rgba(0, 200, 224, 0.4) 50%,
    rgba(0, 200, 224, 0.2) 75%,
    transparent
  );
  z-index: 10;
  filter: blur(0.5px);
  pointer-events: none;
}


/* ═══════════════════════════════
   HEADER — minimal glass console
   ═══════════════════════════════ */

#ai-cp-panel.sofi-holo .ai-cp-header{
  background: rgba(4, 8, 18, 0.4);
  border-bottom: 1px solid rgba(0, 200, 224, 0.025);
  padding: 5px 10px;
  gap: 5px;
  flex-shrink: 0;
}

#ai-cp-panel.sofi-holo .sofi-avatar.sofi-3d-active{
  width: 0; height: 0; overflow: hidden; padding: 0; margin: 0; border: 0;
  flex: 0 0 0;
}

#ai-cp-panel.sofi-holo .ai-cp-title-wrap{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 10px;
}

#ai-cp-panel.sofi-holo .ai-cp-title{
  grid-column: 1; grid-row: 1;
  font-size: 11.5px; font-weight: 700; letter-spacing: 2.5px;
  color: rgba(224, 244, 255, 0.85); text-transform: uppercase;
}

#ai-cp-panel.sofi-holo .sofi-subtitle{
  grid-column: 1 / -1; grid-row: 2;
  font-size: 8px; color: rgba(0, 200, 224, 0.25);
  letter-spacing: 0.8px; text-transform: uppercase;
  font-weight: 500; margin-top: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}

#ai-cp-panel.sofi-holo .ai-cp-status{
  grid-column: 2; grid-row: 1;
  gap: 4px; font-size: 8.5px;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap; margin-top: 0;
}

#ai-cp-panel.sofi-holo #ai-cp-status-text{
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}

#ai-cp-panel.sofi-holo .ai-cp-status-dot{
  width: 4px; height: 4px;
}

#ai-cp-panel.sofi-holo .ai-cp-hbtn{
  color: rgba(0, 200, 224, 0.18);
  border-radius: 6px;
  width: 22px; height: 22px; font-size: 10px;
  transition: color 0.2s, background 0.2s;
}

#ai-cp-panel.sofi-holo .ai-cp-hbtn:hover{
  background: rgba(0, 200, 224, 0.05);
  color: rgba(0, 200, 224, 0.55);
}

#ai-cp-panel.sofi-holo .ai-cp-hbtn[title="Clear conversation"],
#ai-cp-panel.sofi-holo .ai-cp-hbtn[title*="Settings"]{
  width: 20px; height: 20px; font-size: 9px;
  opacity: 0.35;
}


/* ══════════════════════════════════════════════
   HOLOGRAPHIC STAGE — SOFI projected in space
   No visible rectangle. Canvas is transparent.
   Panel atmosphere IS the environment.
   ══════════════════════════════════════════════ */

#ai-cp-panel.sofi-holo #sofi-3d-viewport{
  position: relative;
  flex: 1 0 0;
  min-height: clamp(240px, 42vh, 340px);
  height: auto;
  background: transparent;
  border-bottom: none;
  overflow: hidden;
}

/* Extremely subtle perspective grid — barely visible */
#ai-cp-panel.sofi-holo #sofi-3d-viewport::before{
  content: '';
  position: absolute;
  left: 5%; right: 5%; bottom: 0; height: 45%;
  background:
    repeating-linear-gradient(90deg, rgba(0, 200, 224, 0.015) 0px, transparent 1px, transparent 24px),
    repeating-linear-gradient(0deg, rgba(0, 200, 224, 0.01) 0px, transparent 1px, transparent 24px);
  mask-image: linear-gradient(180deg, transparent 10%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.45) 70%, rgba(0,0,0,0.7) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 10%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.45) 70%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Soft atmospheric floor glow */
#ai-cp-panel.sofi-holo #sofi-3d-viewport::after{
  content: '';
  position: absolute;
  left: 50%; bottom: 0; width: 85%; height: 35%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 100% 100% at 50% 100%, rgba(0, 200, 224, 0.04), transparent 65%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.6s ease;
}

/* Canvas — transparent, above effects */
#ai-cp-panel.sofi-holo #sofi-3d-viewport canvas{
  position: relative; z-index: 3;
}


/* ── Holographic Rings — elegant ellipses ── */

.sofi-ring{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

.sofi-ring-inner{
  bottom: 8%;
  width: 46%;
  padding-bottom: 5.5%;
  border: 1px solid rgba(0, 200, 224, 0.14);
  box-shadow: 0 0 20px 3px rgba(0, 200, 224, 0.045), inset 0 0 20px 3px rgba(0, 200, 224, 0.025);
  animation: sofiRingPulse 5.5s ease-in-out infinite;
}

.sofi-ring-mid{
  bottom: 4.5%;
  width: 62%;
  padding-bottom: 7.5%;
  border: 1px solid rgba(0, 200, 224, 0.06);
  box-shadow: 0 0 24px 3px rgba(0, 200, 224, 0.015);
  animation: sofiRingPulse 5.5s ease-in-out infinite 0.7s;
}

.sofi-ring-outer{
  bottom: 1.5%;
  width: 78%;
  padding-bottom: 9.5%;
  border: 1px solid rgba(0, 200, 224, 0.025);
  box-shadow: 0 0 28px 3px rgba(0, 200, 224, 0.008);
  animation: sofiRingPulse 5.5s ease-in-out infinite 1.4s;
}

@keyframes sofiRingPulse{
  0%, 100%{ opacity: 0.45; transform: translateX(-50%) scale(1); }
  50%{ opacity: 1; transform: translateX(-50%) scale(1.018); }
}


/* ── Vertical beam — barely perceptible ── */

.sofi-holo-beam{
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg, transparent,
    rgba(0, 200, 224, 0.03) 20%,
    rgba(0, 200, 224, 0.06) 50%,
    rgba(0, 200, 224, 0.03) 80%,
    transparent
  );
  pointer-events: none;
  z-index: 0;
}


/* ── Projection floor glow ── */

.sofi-holo-floor{
  position: absolute;
  left: 50%; bottom: 1%;
  width: 50%; height: 0;
  padding-bottom: 10%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(0, 200, 224, 0.035), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transition: background 0.6s ease;
}


/* ── Floating particles — very subtle ── */

.sofi-holo-particles{
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.sofi-holo-particles::before,
.sofi-holo-particles::after{
  content: '';
  position: absolute;
  width: 1px; height: 1px;
  border-radius: 50%;
  background: transparent;
  animation: sofiParticleDrift 18s linear infinite;
}

.sofi-holo-particles::before{
  box-shadow:
    32px 270px 0 0 rgba(0, 200, 224, 0.1),
    92px 200px 0 0 rgba(0, 200, 224, 0.055),
    168px 252px 0 0 rgba(0, 200, 224, 0.08),
    252px 180px 0 0 rgba(0, 200, 224, 0.04),
    338px 232px 0 0 rgba(0, 200, 224, 0.065),
    398px 292px 0 0 rgba(0, 200, 224, 0.03),
    208px 312px 0 0 rgba(0, 200, 224, 0.055),
    122px 172px 0 0 rgba(34, 197, 94, 0.025);
}

.sofi-holo-particles::after{
  animation-delay: -9s;
  animation-duration: 22s;
  box-shadow:
    52px 302px 0 0 rgba(0, 200, 224, 0.04),
    148px 165px 0 0 rgba(0, 200, 224, 0.065),
    232px 282px 0 0 rgba(0, 200, 224, 0.05),
    322px 212px 0 0 rgba(0, 200, 224, 0.03),
    102px 192px 0 0 rgba(196, 164, 74, 0.015),
    282px 322px 0 0 rgba(0, 200, 224, 0.04),
    428px 252px 0 0 rgba(0, 200, 224, 0.025);
}

@keyframes sofiParticleDrift{
  0%{ transform: translateY(0); opacity: 0; }
  5%{ opacity: 0.5; }
  95%{ opacity: 0.5; }
  100%{ transform: translateY(-35px); opacity: 0; }
}


/* ═══════════════════════════
   STATE-REACTIVE ENVIRONMENT
   ═══════════════════════════ */

/* LISTENING — heightened presence */
#ai-cp-panel.sofi-holo.sofi-state-listening .sofi-ring-inner{
  border-color: rgba(0, 200, 224, 0.4);
  box-shadow: 0 0 32px 6px rgba(0, 200, 224, 0.12), inset 0 0 32px 6px rgba(0, 200, 224, 0.07);
}
#ai-cp-panel.sofi-holo.sofi-state-listening .sofi-ring-mid{
  border-color: rgba(0, 200, 224, 0.18);
  box-shadow: 0 0 24px 4px rgba(0, 200, 224, 0.05);
}
#ai-cp-panel.sofi-holo.sofi-state-listening .sofi-ring-outer{
  border-color: rgba(0, 200, 224, 0.08);
}
#ai-cp-panel.sofi-holo.sofi-state-listening #sofi-3d-viewport::after{
  background: radial-gradient(ellipse 100% 100% at 50% 100%, rgba(0, 200, 224, 0.12), transparent 65%);
}
#ai-cp-panel.sofi-holo.sofi-state-listening .sofi-holo-floor{
  background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(0, 200, 224, 0.1), transparent 60%);
}

/* THINKING — processing pulse */
#ai-cp-panel.sofi-holo.sofi-state-thinking .sofi-ring-inner{
  animation: sofiRingProcess 2.2s ease-in-out infinite;
}
#ai-cp-panel.sofi-holo.sofi-state-thinking .sofi-ring-mid{
  animation: sofiRingProcess 2.2s ease-in-out infinite 0.35s;
}
#ai-cp-panel.sofi-holo.sofi-state-thinking .sofi-ring-outer{
  animation: sofiRingProcess 2.2s ease-in-out infinite 0.7s;
  border-style: dashed;
  border-color: rgba(0, 200, 224, 0.045);
}
@keyframes sofiRingProcess{
  0%{ transform: translateX(-50%) scale(1); opacity: 0.3; }
  50%{ transform: translateX(-50%) scale(1.04); opacity: 1; }
  100%{ transform: translateX(-50%) scale(1); opacity: 0.3; }
}

/* SPEAKING — rhythmic pulse */
#ai-cp-panel.sofi-holo.sofi-state-speaking .sofi-ring-inner{
  animation: sofiRingSpeak 1.5s ease-in-out infinite;
  border-color: rgba(0, 200, 224, 0.28);
}
#ai-cp-panel.sofi-holo.sofi-state-speaking .sofi-ring-mid{
  animation: sofiRingSpeak 1.5s ease-in-out infinite 0.25s;
  border-color: rgba(0, 200, 224, 0.12);
}
#ai-cp-panel.sofi-holo.sofi-state-speaking #sofi-3d-viewport::after{
  background: radial-gradient(ellipse 100% 100% at 50% 100%, rgba(0, 200, 224, 0.08), transparent 65%);
}
@keyframes sofiRingSpeak{
  0%, 100%{ transform: translateX(-50%) scale(1); }
  50%{ transform: translateX(-50%) scale(1.03); }
}

/* SUCCESS — green */
#ai-cp-panel.sofi-holo.sofi-state-success .sofi-ring-inner{
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 24px 5px rgba(34, 197, 94, 0.08);
}
#ai-cp-panel.sofi-holo.sofi-state-success .sofi-ring-mid{
  border-color: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 16px 3px rgba(34, 197, 94, 0.03);
}
#ai-cp-panel.sofi-holo.sofi-state-success #sofi-3d-viewport::after{
  background: radial-gradient(ellipse 100% 100% at 50% 100%, rgba(34, 197, 94, 0.07), transparent 65%);
}
#ai-cp-panel.sofi-holo.sofi-state-success .sofi-holo-floor{
  background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(34, 197, 94, 0.06), transparent 60%);
}

/* ERROR — restrained red */
#ai-cp-panel.sofi-holo.sofi-state-error .sofi-ring-inner{
  border-color: rgba(239, 68, 68, 0.22);
  box-shadow: 0 0 20px 4px rgba(239, 68, 68, 0.06);
}
#ai-cp-panel.sofi-holo.sofi-state-error .sofi-ring-mid{
  border-color: rgba(239, 68, 68, 0.08);
}
#ai-cp-panel.sofi-holo.sofi-state-error #sofi-3d-viewport::after{
  background: radial-gradient(ellipse 100% 100% at 50% 100%, rgba(239, 68, 68, 0.05), transparent 65%);
}

/* MIC-ERROR */
#ai-cp-panel.sofi-holo.sofi-state-mic-error .sofi-ring-inner{
  border-color: rgba(239, 68, 68, 0.18);
  box-shadow: 0 0 16px 3px rgba(239, 68, 68, 0.04);
}

/* CONFUSED — amber */
#ai-cp-panel.sofi-holo.sofi-state-confused .sofi-ring-inner{
  border-color: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 18px 3px rgba(245, 158, 11, 0.04);
}
#ai-cp-panel.sofi-holo.sofi-state-confused .sofi-ring-mid{
  border-color: rgba(245, 158, 11, 0.07);
}


/* ═══════════════════════════════════════
   DATA PROJECTION — holographic readout
   ═══════════════════════════════════════ */

.sofi-data-projection{
  flex-shrink: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.4s ease;
  padding: 0 20px;
  background: transparent;
  border-top: none;
}

.sofi-data-projection.visible{
  max-height: 220px;
  opacity: 1;
  padding: 10px 24px 8px;
}

.sofi-dp-inner{
  position: relative;
  background: transparent;
  border: none; border-radius: 0;
  padding: 0; overflow: hidden;
}

.sofi-dp-inner::before{
  content: '';
  position: absolute; left: 0; right: 0; top: -100%; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(0, 200, 224, 0.015), transparent);
  animation: sofiScanDown 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sofiScanDown{
  0%{ top: -100%; }
  100%{ top: 200%; }
}

.sofi-dp-label{
  font-size: 8.5px; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(0, 200, 224, 0.38); font-weight: 600; margin-bottom: 1px;
}
.sofi-dp-period{
  font-size: 9.5px; color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px; margin-bottom: 7px;
}
.sofi-dp-value{
  font-size: 28px; font-weight: 700; color: rgba(224, 244, 255, 0.9);
  letter-spacing: -0.5px; line-height: 1.1;
  text-shadow: 0 0 28px rgba(0, 200, 224, 0.14), 0 0 56px rgba(0, 200, 224, 0.035);
}
.sofi-dp-value .sofi-dp-unit{
  font-size: 12px; font-weight: 500; color: rgba(0, 200, 224, 0.42); margin-left: 4px;
}
.sofi-dp-change{
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; margin-top: 4px;
}
.sofi-dp-change.up{ color: #22c55e; }
.sofi-dp-change.down{ color: #ef4444; }
.sofi-dp-divider{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 224, 0.05), transparent);
  margin: 8px 0;
}
.sofi-dp-row{ display: flex; gap: 16px; }
.sofi-dp-col{ flex: 1; }
.sofi-dp-col .sofi-dp-sublabel{
  font-size: 8px; text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.15); font-weight: 600;
}
.sofi-dp-col .sofi-dp-subvalue{
  font-size: 13px; font-weight: 600; color: rgba(224, 244, 255, 0.65); margin-top: 2px;
  text-shadow: 0 0 14px rgba(0, 200, 224, 0.06);
}

.sofi-dp-summary{ display: flex; flex-direction: column; gap: 4px; }
.sofi-dp-summary-row{
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 2px 0;
  border-bottom: 1px solid rgba(0, 200, 224, 0.015);
}
.sofi-dp-summary-row:last-child{ border-bottom: none; }
.sofi-dp-summary-row .sofi-dp-skey{
  font-size: 10px; color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500;
}
.sofi-dp-summary-row .sofi-dp-sval{
  font-size: 12px; font-weight: 600; color: rgba(224, 244, 255, 0.85);
  text-shadow: 0 0 10px rgba(0, 200, 224, 0.04);
}

.sofi-dp-ranking{ display: flex; flex-direction: column; gap: 2px; }
.sofi-dp-rank-row{ display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.sofi-dp-rank-num{
  font-size: 9px; font-weight: 700; color: rgba(0, 200, 224, 0.32);
  width: 16px; text-align: right; flex-shrink: 0;
}
.sofi-dp-rank-name{
  flex: 1; font-size: 10.5px; color: rgba(255, 255, 255, 0.42);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sofi-dp-rank-val{
  font-size: 11px; font-weight: 600; color: rgba(224, 244, 255, 0.85); flex-shrink: 0;
  text-shadow: 0 0 8px rgba(0, 200, 224, 0.04);
}

.sofi-dp-clarification{ display: flex; flex-direction: column; gap: 4px; }
.sofi-dp-clarification .sofi-dp-cq{
  font-size: 10px; color: rgba(0, 200, 224, 0.42);
  text-transform: uppercase; letter-spacing: 0.8px;
  font-weight: 600; margin-bottom: 2px;
}
.sofi-dp-copt{
  display: block; width: 100%;
  background: rgba(0, 200, 224, 0.01);
  border: 1px solid rgba(0, 200, 224, 0.045);
  border-radius: 8px;
  padding: 6px 10px;
  color: rgba(224, 244, 255, 0.55);
  font-size: 11px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sofi-dp-copt:hover{
  background: rgba(0, 200, 224, 0.04);
  border-color: rgba(0, 200, 224, 0.15);
  color: #00C8E0;
}

.sofi-dp-animate{
  animation: sofiDataFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes sofiDataFadeIn{
  from{ opacity: 0; transform: translateY(5px); filter: blur(2px); }
  to{ opacity: 1; transform: none; filter: none; }
}


/* ══════════════════════════════════════
   SUGGESTIONS — ghost chips, borderless
   ══════════════════════════════════════ */

#ai-cp-panel.sofi-holo .ai-cp-suggestions{
  background: transparent;
  border-bottom: none;
  padding: 3px 14px;
  gap: 4px;
  max-height: 44px;
  flex-shrink: 0;
}

#ai-cp-panel.sofi-holo .ai-cp-chip{
  background: transparent;
  border: 1px solid rgba(0, 200, 224, 0.035);
  color: rgba(0, 200, 224, 0.28);
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

#ai-cp-panel.sofi-holo .ai-cp-chip:hover{
  background: rgba(0, 200, 224, 0.035);
  border-color: rgba(0, 200, 224, 0.12);
  color: rgba(0, 200, 224, 0.65);
}


/* ════════════════════════════════════════════
   CHAT — secondary floating information layer
   Not a chatbot. Floating translucent readout.
   ════════════════════════════════════════════ */

#ai-cp-panel.sofi-holo .ai-cp-body{
  background: transparent;
  padding: 4px 16px;
  gap: 5px;
  max-height: 110px;
  flex: 0 1 auto;
}

#ai-cp-panel.sofi-holo .ai-cp-body::-webkit-scrollbar{ width: 3px; }
#ai-cp-panel.sofi-holo .ai-cp-body::-webkit-scrollbar-thumb{
  background: rgba(0, 200, 224, 0.06);
  border-radius: 3px;
}

/* Messages — floating text, no heavy bubbles */
#ai-cp-panel.sofi-holo .ai-cp-msg{ gap: 6px; }

#ai-cp-panel.sofi-holo .ai-cp-msg.ai .ai-cp-msg-avatar{
  width: 16px; height: 16px; font-size: 7px;
  opacity: 0.35;
  background: linear-gradient(135deg, rgba(0, 200, 224, 0.15), rgba(29, 111, 206, 0.15));
  border: none;
}

#ai-cp-panel.sofi-holo .ai-cp-msg.ai .ai-cp-bubble{
  background: none;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  max-width: 100%;
  color: rgba(224, 244, 255, 0.55);
  font-size: 11.5px;
  line-height: 1.45;
}

#ai-cp-panel.sofi-holo .ai-cp-msg.user .ai-cp-msg-avatar{
  width: 16px; height: 16px; font-size: 7px;
  opacity: 0.3;
  background: rgba(255, 255, 255, 0.04);
  border: none;
}

#ai-cp-panel.sofi-holo .ai-cp-msg.user .ai-cp-bubble{
  background: rgba(0, 200, 224, 0.025);
  border: none;
  border-left: 2px solid rgba(0, 200, 224, 0.08);
  border-radius: 0 6px 6px 0;
  padding: 3px 8px;
  max-width: 90%;
  color: rgba(224, 244, 255, 0.65);
  font-size: 11px;
}

#ai-cp-panel.sofi-holo .ai-cp-card-title{
  color: rgba(0, 200, 224, 0.5);
  font-size: 11.5px;
}

#ai-cp-panel.sofi-holo .ai-cp-kpi{
  background: rgba(0, 200, 224, 0.01);
  border-color: rgba(0, 200, 224, 0.03);
  padding: 5px 7px;
}

#ai-cp-panel.sofi-holo .ai-cp-kpi .k-label{ font-size: 8.5px; }
#ai-cp-panel.sofi-holo .ai-cp-kpi .k-value{ font-size: 12px; }

#ai-cp-panel.sofi-holo .ai-cp-md{
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(224, 244, 255, 0.55);
}

#ai-cp-panel.sofi-holo .ai-cp-md strong{
  color: rgba(224, 244, 255, 0.8);
}

#ai-cp-panel.sofi-holo .ai-cp-md li strong{
  color: rgba(0, 200, 224, 0.5);
}

#ai-cp-panel.sofi-holo .ai-cp-typing span{
  background: rgba(0, 200, 224, 0.22);
  width: 4px; height: 4px;
}


/* ════════════════════════════════════════════
   COMMAND CONSOLE — voice-first, floating bar
   Mic is primary. Text input is secondary.
   ════════════════════════════════════════════ */

#ai-cp-panel.sofi-holo .ai-cp-inputbar{
  background: rgba(4, 8, 18, 0.75);
  border: 1px solid rgba(0, 200, 224, 0.045);
  border-top: none;
  padding: 6px 8px;
  gap: 6px;
  margin: 0 10px 8px;
  border-radius: 22px;
  box-shadow: 0 -6px 24px -10px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  align-items: center;
}

/* Mic — primary action, prominent */
#ai-cp-panel.sofi-holo #ai-cp-mic{
  background: rgba(0, 200, 224, 0.06) !important;
  border: 1.5px solid rgba(0, 200, 224, 0.12) !important;
  color: rgba(0, 200, 224, 0.55);
  width: 42px !important; height: 42px !important;
  border-radius: 50% !important;
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

#ai-cp-panel.sofi-holo #ai-cp-mic:hover{
  background: rgba(0, 200, 224, 0.1);
  border-color: rgba(0, 200, 224, 0.25);
  color: #00C8E0;
}

#ai-cp-panel.sofi-holo #ai-cp-mic.listening{
  background: rgba(0, 200, 224, 0.14);
  border-color: rgba(0, 200, 224, 0.45);
  color: #00C8E0;
  box-shadow: 0 0 28px -2px rgba(0, 200, 224, 0.35), 0 0 8px rgba(0, 200, 224, 0.15) inset;
  animation: sofiMicPulse 1.3s ease-in-out infinite;
}

@keyframes sofiMicPulse{
  0%, 100%{ box-shadow: 0 0 28px -2px rgba(0, 200, 224, 0.35), 0 0 8px rgba(0, 200, 224, 0.15) inset; }
  50%{ box-shadow: 0 0 36px 0 rgba(0, 200, 224, 0.5), 0 0 12px rgba(0, 200, 224, 0.2) inset; }
}

/* Text input — secondary */
#ai-cp-panel.sofi-holo #ai-cp-input{
  background: rgba(6, 12, 24, 0.35);
  border: 1px solid rgba(0, 200, 224, 0.03);
  border-radius: 12px;
  color: rgba(224, 244, 255, 0.8);
  font-size: 11.5px;
  padding: 7px 12px;
}

#ai-cp-panel.sofi-holo #ai-cp-input::placeholder{
  color: rgba(0, 200, 224, 0.14);
  font-size: 11px;
}

#ai-cp-panel.sofi-holo #ai-cp-input:focus{
  border-color: rgba(0, 200, 224, 0.14);
  box-shadow: 0 0 12px -4px rgba(0, 200, 224, 0.06);
}

/* Send — subtle */
#ai-cp-panel.sofi-holo #ai-cp-send{
  background: rgba(0, 200, 224, 0.06);
  border: 1px solid rgba(0, 200, 224, 0.06);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 12px;
}

#ai-cp-panel.sofi-holo #ai-cp-send:hover{
  background: rgba(0, 200, 224, 0.14);
  border-color: rgba(0, 200, 224, 0.2);
}

/* Stop */
#ai-cp-panel.sofi-holo #ai-cp-stop{
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.06);
  width: 32px; height: 32px;
  border-radius: 50%;
}


/* ── Footer ── */

.sofi-holo-footer{
  display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 2px 14px 4px;
  font-size: 7px; color: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.5px; flex-shrink: 0;
}
.sofi-holo-footer span{ color: rgba(0, 200, 224, 0.1); }


/* ── Resize handle ── */

#ai-cp-panel.sofi-holo .ai-cp-resize{
  color: rgba(0, 200, 224, 0.06);
}
#ai-cp-panel.sofi-holo .ai-cp-resize:hover{
  color: rgba(0, 200, 224, 0.2);
}


/* ── Settings modal ── */

#ai-cp-panel.sofi-holo ~ #ai-cp-settings-modal .ai-cp-settings-box{
  background: rgba(4, 8, 18, 0.97);
  border-color: rgba(0, 200, 224, 0.06);
}


/* ── Minimized ── */

#ai-cp-panel.sofi-holo.minimized #sofi-3d-viewport,
#ai-cp-panel.sofi-holo.minimized .sofi-data-projection,
#ai-cp-panel.sofi-holo.minimized .sofi-holo-footer{ display: none; }

#ai-cp-panel.sofi-holo.minimized .ai-cp-inputbar{
  margin: 0; border-radius: 0 0 22px 22px; border: none;
  border-top: 1px solid rgba(0, 200, 224, 0.03);
}


/* ══════════════════
   REDUCED MOTION
   ══════════════════ */

@media (prefers-reduced-motion: reduce){
  .sofi-ring,
  .sofi-dp-inner::before,
  .sofi-dp-animate,
  .sofi-holo-particles::before,
  .sofi-holo-particles::after,
  #ai-cp-panel.sofi-holo #ai-cp-mic.listening{
    animation: none !important;
  }
}


/* ══════════════════════════
   RESPONSIVE — desktop first
   ══════════════════════════ */

/* Laptop (shorter screens — trade chat for stage room) */
@media (max-height: 800px){
  #ai-cp-panel.sofi-holo .ai-cp-body{
    max-height: 60px;
  }
  #ai-cp-panel.sofi-holo .ai-cp-suggestions{
    max-height: 36px;
    padding: 2px 14px;
  }
}

/* Very short desktop (720p with toolbars) */
@media (max-height: 680px){
  #ai-cp-panel.sofi-holo .ai-cp-body{
    max-height: 44px;
  }
  #ai-cp-panel.sofi-holo .ai-cp-suggestions{
    max-height: 28px;
    padding: 2px 12px;
    overflow: hidden;
  }
}

/* Tablet */
@media (max-width: 1024px){
  #ai-cp-panel.sofi-holo{
    width: 440px;
  }
}

/* Mobile — bottom sheet */
@media (max-width: 768px){
  #ai-cp-panel.sofi-holo{
    width: 100% !important;
    height: 80vh !important;
    border-radius: 22px 22px 0 0;
  }

  #ai-cp-panel.sofi-holo #sofi-3d-viewport{
    min-height: 220px;
  }

  .sofi-data-projection.visible{
    max-height: 180px;
    padding: 8px 16px 6px;
  }

  #ai-cp-panel.sofi-holo .ai-cp-suggestions{
    padding: 3px 10px;
  }

  #ai-cp-panel.sofi-holo .ai-cp-body{
    max-height: 80px;
  }

  #ai-cp-panel.sofi-holo .ai-cp-inputbar{
    margin: 0 6px 4px;
    border-radius: 18px;
  }

  #ai-cp-panel.sofi-holo #ai-cp-mic{
    width: 38px; height: 38px;
    font-size: 14px;
  }

  .sofi-ring-outer{ display: none; }
}
