/* Copyright (c) 2026 Steven Burt James (Agentic Essence). All Rights Reserved. Proprietary and Confidential. */
/**
 * Agentic Hologram — Spatial Holodeck Styles
 * True Holographic Projection // No Chat Boxes // Floating 3D Spatial Tasks
 */

:root {
    --bg-space: #05080d;
    --neon-cyan: #00ff88;       /* Primary Phosphor Green */
    --neon-magenta: #ffb700;    /* Terminal Amber */
    --neon-gold: #ffb700;       /* Terminal Amber */
    --neon-emerald: #00ff88;    /* Phosphor Green */
    --neon-violet: #00f0ff;     /* Terminal Cyan */
    
    --active-glow: #00ff88;
    --active-dim: rgba(0, 255, 136, 0.15);
    --font-ui: 'Outfit', -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

body.persona-swarm {
    --active-glow: #00ff88;
    --active-dim: rgba(0, 255, 136, 0.18);
}
body.persona-turing {
    --active-glow: #00f0ff;
    --active-dim: rgba(0, 240, 255, 0.18);
}
body.persona-knuth {
    --active-glow: #ffb700;
    --active-dim: rgba(255, 183, 0, 0.18);
}
body.persona-lovelace {
    --active-glow: #00ff88;
    --active-dim: rgba(0, 255, 136, 0.18);
}
body.persona-shadow {
    --active-glow: #ef4444;
    --active-dim: rgba(239, 68, 68, 0.18);
}
body.persona-sentry {
    --active-glow: #3b82f6;
    --active-dim: rgba(59, 130, 246, 0.18);
}
body.persona-cipher {
    --active-glow: #a855f7;
    --active-dim: rgba(168, 85, 247, 0.18);
}
body.persona-valkyrie {
    --active-glow: #f97316;
    --active-dim: rgba(249, 115, 22, 0.18);
}
body.persona-matrix {
    --active-glow: #10b981;
    --active-dim: rgba(16, 185, 129, 0.18);
}
body.persona-ghost {
    --active-glow: #94a3b8;
    --active-dim: rgba(148, 163, 184, 0.18);
}
body.persona-glitch {
    --active-glow: #e11d48;
    --active-dim: rgba(225, 29, 72, 0.18);
}
body.persona-archon {
    --active-glow: #6366f1;
    --active-dim: rgba(99, 102, 241, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-space);
    font-family: -apple-system, BlinkMacSystemFont, 'Outfit', 'Segoe UI', Roboto, sans-serif;
    color: #e2e8f0;
}

body {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding-top: var(--ae-sponsor-offset, 0px);
    box-sizing: border-box;
}

input, textarea, select, [contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
    touch-action: manipulation;
}

/* ================= 1. THE HOLOGRAPHIC CHAMBER ================= */
#holo-chamber {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1;
    overflow: hidden;
    contain: layout paint;
    pointer-events: none;
    perspective: 1000px;
}

#holo-stage-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.projector-emitter-floor {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) rotateX(72deg);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.emitter-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--active-glow);
    box-shadow: 0 0 15px var(--active-dim), inset 0 0 15px var(--active-dim);
    transition: all 0.5s ease;
}

.emitter-ring.outer {
    inset: 0;
    border-width: 2px;
    animation: spinClockwise 20s linear infinite;
}

.emitter-ring.mid {
    inset: 40px;
    border-style: dashed;
    animation: spinCounterClockwise 14s linear infinite;
}

.emitter-ring.core {
    inset: 95px;
    background: radial-gradient(circle, var(--active-dim) 0%, transparent 70%);
    box-shadow: 0 0 25px var(--active-glow);
    animation: pulseRing 3s ease-in-out infinite;
}

.emitter-beam {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 60vh;
    background: linear-gradient(180deg, transparent 0%, var(--active-dim) 80%, rgba(0,0,0,0) 100%);
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

@keyframes spinClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes spinCounterClockwise {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}
@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* ================= 2. TOP HEADER HUD ================= */
.holo-header {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 100vw;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    z-index: 25;
    pointer-events: auto;
    flex-shrink: 0;
    box-sizing: border-box;
    background: rgba(5, 8, 16, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.holo-vox-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(11, 16, 26, 0.75);
    border: 1px solid rgba(255, 0, 127, 0.35);
    padding: 5px 12px 5px 7px;
    border-radius: 28px;
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(255, 0, 127, 0.1);
}

.holo-vox-brand:hover {
    border-color: rgba(0, 240, 255, 0.7);
    box-shadow: 0 6px 25px rgba(0, 240, 255, 0.3);
    transform: translateY(-1px);
}

.vox-logo-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vox-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(255, 0, 127, 0.5);
    display: block;
}

.vox-pulse-halo {
    position: absolute;
    inset: -3px;
    border-radius: 11px;
    border: 1.5px solid #ff007f;
    opacity: 0;
    animation: voxHaloPulse 2.8s infinite;
    pointer-events: none;
}

@keyframes voxHaloPulse {
    0% { transform: scale(0.92); opacity: 0.8; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

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

.vox-brand-name {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #fff;
    line-height: 1.1;
}

.accent-vox {
    background: linear-gradient(135deg, #ff007f 0%, #00f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vox-brand-tag {
    font-family: var(--font-code);
    font-size: 8px;
    letter-spacing: 0.8px;
    color: #00f0ff;
    opacity: 0.9;
    margin-top: 1px;
}

.holo-persona-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(11, 16, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.persona-symbol {
    font-size: 20px;
    color: var(--active-glow);
    text-shadow: 0 0 10px var(--active-glow);
    animation: floatGently 3s ease-in-out infinite;
}

.persona-name {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
}

.persona-role {
    display: block;
    font-family: var(--font-code);
    font-size: 9.5px;
    letter-spacing: 1px;
    color: var(--active-glow);
}

.holo-header-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex-shrink: 1;
}

.holo-hdr-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    min-width: 38px;
    height: 38px;
    border-radius: 19px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.nh-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(11, 16, 26, 0.65);
    border: 1px solid rgba(0, 255, 136, 0.4);
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.nh-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.nh-label {
    font-family: var(--font-code);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #00ff88;
}

.holo-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(11, 16, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}
.holo-icon-btn:active {
    transform: scale(0.92);
    border-color: var(--active-glow);
    color: #fff;
}

/* ================= 3. TRI-AGENT HOLOGRAPHIC DOCK ================= */
.holo-agent-dock, .holo-summon-bar {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(8, 14, 26, 0.65);
    border-bottom: 1px solid rgba(0, 240, 255, 0.18);
    padding: 5px 8px;
    border-radius: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 20;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.holo-agent-dock::-webkit-scrollbar { display: none; }

.agent-dock-tab, .summon-chip {
    flex: 1 1 0;
    min-width: 0;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 6px 4px;
    min-height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: #cbd5e1;
    text-decoration: none;
}

.agent-dock-tab:hover, .summon-chip:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.agent-dock-tab.active, .summon-chip.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: var(--active-glow);
    box-shadow: 0 0 16px var(--active-dim), inset 0 0 10px var(--active-dim);
}

.agent-tab-badge {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
    transition: transform 0.25s ease;
}

.agent-dock-tab.active .agent-tab-badge {
    transform: scale(1.35);
}

.agent-tab-badge.planner { background: var(--neon-cyan); color: var(--neon-cyan); }
.agent-tab-badge.builder { background: var(--neon-magenta); color: var(--neon-magenta); }
.agent-tab-badge.auditor { background: var(--neon-gold); color: var(--neon-gold); }
.agent-tab-badge.executor { background: #00ff88; color: #00ff88; }

.agent-tab-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.agent-tab-role {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.agent-tab-sub {
    font-family: var(--font-code);
    font-size: 8px;
    letter-spacing: 0.6px;
    opacity: 0.75;
}

.agent-voice-tag {
    font-family: var(--font-code);
    font-size: 9px;
    font-weight: 600;
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.25);
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 2px;
    transition: all 0.2s ease;
}

.agent-dock-tab.active .agent-voice-tag {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

.summon-chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.5;
}
.summon-chip .dot.cyan { background: var(--neon-cyan); }
.summon-chip .dot.magenta { background: var(--neon-magenta); }
.summon-chip .dot.gold { background: var(--neon-gold); }
.summon-chip .dot.emerald { background: var(--neon-emerald); }
.summon-chip.active .dot {
    opacity: 1;
    box-shadow: 0 0 8px currentColor;
}

/* Cyber cards & tools */
.spatial-task-card.cyber-card {
    border-color: rgba(0, 240, 255, 0.35);
    background: rgba(8, 14, 26, 0.7);
    backdrop-filter: blur(20px);
}

.quick-port-btn, .payload-tab-btn, .mitre-tactic-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-family: var(--font-code);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.quick-port-btn:active, .payload-tab-btn.active, .mitre-tactic-btn.active {
    background: rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
    color: #00f0ff;
}

/* ================= 4. SPATIAL FLOATING TASKS ("OUT OF THIN AIR") ================= */
#spatial-task-viewport {
    position: fixed;
    top: 106px;
    bottom: 132px;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 35;
    perspective: 1200px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 10px 12px;
    gap: 12px;
    overflow-y: auto;
}

.spatial-task-card {
    pointer-events: auto;
    width: 100%;
    max-width: 420px;
    background: rgba(8, 14, 26, 0.85);
    border: 1px solid var(--active-glow);
    border-radius: 14px;
    padding: 14px 18px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px var(--active-dim);
    transform-style: preserve-3d;
    animation: holoSpawn3D 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-bottom: 8px;
}

.spatial-task-card.dismissing {
    animation: holoVaporize3D 0.4s ease forwards;
}

@keyframes holoSpawn3D {
    0% {
        opacity: 0;
        transform: rotateY(-25deg) rotateX(15deg) translate3d(60px, -40px, -150px) scale(0.85);
        filter: blur(10px) brightness(2.2);
    }
    100% {
        opacity: 1;
        transform: rotateY(-6deg) rotateX(2deg) translate3d(0, 0, 0) scale(1);
        filter: blur(0) brightness(1);
    }
}

@keyframes holoVaporize3D {
    0% {
        opacity: 1;
        transform: rotateY(-6deg) translate3d(0, 0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: rotateY(30deg) translate3d(120px, -60px, -200px) scale(0.6);
        filter: blur(16px) brightness(3);
    }
}

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

.spatial-card-title {
    font-family: var(--font-code);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--active-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spatial-close-btn {
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}
.spatial-close-btn:hover {
    color: #ff007f;
}

.spatial-card-body {
    font-family: var(--font-code);
    font-size: 12px;
    line-height: 1.5;
    color: #e2e8f0;
    max-height: 240px;
    overflow-y: auto;
}

.spatial-card-body pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    color: #00f0ff;
    font-size: 11px;
}

/* ================= 5. VOCAL TRANSCRIPT HUD ================= */
.vocal-transcript-hud {
    position: absolute;
    bottom: 135px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 540px;
    text-align: center;
    z-index: 20;
    pointer-events: none;
    background: rgba(6, 10, 20, 0.45);
    border: 1px solid rgba(0, 240, 255, 0.18);
    border-radius: 20px;
    padding: 8px 18px;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.transcript-speaker {
    font-family: var(--font-code);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--active-glow);
    margin-bottom: 2px;
    text-shadow: 0 0 8px var(--active-glow);
}

.transcript-body {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.35;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

/* ================= 6. HOLOGRAPHIC VOICE CORE FOOTER ================= */
.holo-voice-footer {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 30;
    background: linear-gradient(180deg, rgba(4, 6, 11, 0.65) 0%, rgba(4, 6, 11, 0.92) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(0, 240, 255, 0.22);
}

.voice-equalizer-bars {
    display: flex;
    align-items: center;
    gap: 3.5px;
    height: 14px;
    margin-bottom: 0;
}

.voice-equalizer-bars .bar {
    width: 3px;
    height: 3px;
    background: var(--active-glow);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--active-glow);
    transition: height 0.1s ease;
}

.voice-equalizer-bars.speaking-active .bar,
.voice-equalizer-bars.listening-active .bar {
    animation: eqPulseBar 0.9s ease-in-out infinite alternate;
}
.voice-equalizer-bars.speaking-active .bar:nth-child(odd) { animation-delay: 0.15s; }
.voice-equalizer-bars.speaking-active .bar:nth-child(3n) { animation-delay: 0.3s; }
@keyframes eqPulseBar {
    from { height: 4px; opacity: 0.65; }
    to { height: 13px; opacity: 1; }
}

.voice-orb-container {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 8px;
}

.voice-orb-core {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--active-glow) 0%, rgba(10, 16, 28, 0.8) 70%);
    border: 1.5px solid var(--active-glow);
    box-shadow: 0 0 24px var(--active-glow), inset 0 0 15px rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.voice-orb-container:active .voice-orb-core {
    transform: scale(0.92);
}

.voice-icon {
    font-size: 22px;
    color: #fff;
    filter: drop-shadow(0 0 6px #fff);
}

.voice-orb-ripple {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid var(--active-glow);
    opacity: 0;
    pointer-events: none;
}

.voice-orb-container.listening .voice-orb-ripple {
    animation: orbListeningRipple 1.6s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.voice-orb-container.speaking .voice-orb-core {
    animation: orbSpeakingPulse 0.7s ease-in-out infinite alternate;
}

@keyframes orbListeningRipple {
    0% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}

@keyframes orbSpeakingPulse {
    from { transform: scale(1); box-shadow: 0 0 18px var(--active-glow); }
    to { transform: scale(1.12); box-shadow: 0 0 36px var(--active-glow); }
}

.voice-status-label {
    position: absolute;
    bottom: -16px;
    font-family: var(--font-code);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--active-glow);
    white-space: nowrap;
}

.voice-shortcuts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    background: rgba(10, 16, 28, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-width: 95%;
    overflow-x: auto;
    scrollbar-width: none;
}
.voice-shortcuts::-webkit-scrollbar {
    display: none;
}

.quick-vocal-chip {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-family: var(--font-code);
    font-size: 10.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.quick-vocal-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}
.quick-vocal-chip:active {
    background: var(--active-dim);
    border-color: var(--active-glow);
    color: #fff;
    transform: scale(0.95);
}

/* ================= 7. TRANSLUCENT FROSTED GLASS MODALS ================= */
.holo-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 8, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 16px;
}
.holo-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.holo-modal-glass {
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    overflow-y: auto;
    scrollbar-width: none;
    background: rgba(8, 14, 26, 0.58);
    border: 1px solid rgba(0, 240, 255, 0.28);
    border-radius: 22px;
    padding: 20px 22px;
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(0, 240, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.holo-modal-glass::-webkit-scrollbar {
    display: none;
}
.holo-modal-backdrop.open .holo-modal-glass {
    transform: translateY(0) scale(1);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}
.modal-title {
    font-family: var(--font-code);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--active-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close {
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.holo-chat-hdr-btn {
    min-height: 30px !important;
    padding: 4px 10px !important;
}

input[type="range"] {
    min-height: 28px;
}
.modal-close:hover {
    color: #ff007f;
    background: rgba(255, 0, 127, 0.12);
}

.modal-label {
    display: block;
    font-family: var(--font-code);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #718096;
    margin-bottom: 5px;
}

.modal-input {
    width: 100%;
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 10px;
    padding: 9px 12px;
    color: #fff;
    font-family: var(--font-code);
    font-size: 12.5px;
    margin-bottom: 6px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}
.modal-input:focus {
    border-color: var(--active-glow);
    box-shadow: 0 0 14px var(--active-dim);
    outline: none;
    background: rgba(0, 240, 255, 0.08);
}

.modal-action-btn {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: #00f0ff;
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 11.5px;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}
.modal-action-btn:hover {
    background: rgba(0, 240, 255, 0.22);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.25);
    color: #ffffff;
}
.modal-action-btn:active {
    transform: scale(0.97);
}

.modal-hint {
    font-size: 11px;
    color: #718096;
    display: block;
    margin-bottom: 12px;
}

.modal-bridge-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
}

/* Modal Brand Banner with Agentic Vox Logo */
.modal-brand-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.1) 0%, rgba(0, 240, 255, 0.08) 100%);
    border: 1px solid rgba(255, 0, 127, 0.25);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.modal-vox-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 0 14px rgba(255, 0, 127, 0.5);
    display: block;
    object-fit: cover;
}

.modal-brand-details {
    display: flex;
    flex-direction: column;
}

.modal-vox-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    line-height: 1.1;
}

.modal-vox-subtitle {
    font-family: var(--font-code);
    font-size: 8px;
    color: #00f0ff;
    letter-spacing: 0.8px;
    margin-top: 2px;
}

/* ================= 8. VOICE SELECTION & TUNING STUDIO ================= */
.voice-studio-agent-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: rgba(0, 240, 255, 0.04);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.vs-agent-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vs-agent-tab:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
}

.vs-agent-tab.active {
    background: rgba(0, 240, 255, 0.14);
    border-color: rgba(0, 240, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.18);
}

.vs-agent-title {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1px;
}

.vs-agent-desc {
    font-family: var(--font-code);
    font-size: 7.5px;
    opacity: 0.75;
    margin-top: 2px;
}

.voice-presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.voice-preset-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.voice-preset-card:hover {
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.3);
}

.voice-preset-card.selected {
    background: rgba(0, 240, 255, 0.14);
    border-color: #00f0ff;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.22);
}

.voice-preset-icon {
    font-size: 17px;
}

.voice-preset-meta {
    display: flex;
    flex-direction: column;
}

.voice-preset-name {
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
}

.voice-preset-style {
    font-family: var(--font-code);
    font-size: 8px;
    color: #94a3b8;
}

.slider-group {
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.slider-row {
    margin-bottom: 10px;
}
.slider-row:last-child {
    margin-bottom: 0;
}

.slider-label-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.slider-val {
    font-family: var(--font-code);
    font-size: 10.5px;
    color: #00f0ff;
    font-weight: 700;
}

.holo-slider {
    width: 100%;
    accent-color: #00f0ff;
    cursor: pointer;
}

/* Responsive HUD Header — zero horizontal overflow at 390x844 */
@media (max-width: 680px) {
    .projector-emitter-floor {
        width: 240px;
        height: 240px;
    }
    .holo-header {
        padding: 4px 6px;
        gap: 4px;
        overflow: hidden;
    }
    .vox-brand-tag,
    .holo-persona-indicator,
    .nh-pill,
    .holo-hdr-chip-lbl {
        display: none !important;
    }
    .holo-vox-brand {
        padding: 3px;
        gap: 4px;
        flex-shrink: 0;
        border-radius: 50%;
    }
    .vox-logo-wrap, .vox-logo-img {
        width: 24px;
        height: 24px;
    }
    .vox-brand-name {
        display: none;
    }
    .holo-header-controls {
        gap: 3px;
        flex: 1 1 auto;
        justify-content: flex-end;
        overflow: hidden;
    }
    .holo-header .byok-pill-anchor {
        min-width: 0;
        flex: 0 1 auto;
        max-width: 148px;
        overflow: hidden;
    }
    .holo-header .byok-header-pill {
        max-width: 100%;
        padding: 4px 7px !important;
        font-size: 10px !important;
        min-height: 34px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .holo-icon-btn, .holo-hdr-chip {
        width: 34px;
        min-width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 50%;
        font-size: 13px;
        flex-shrink: 0;
    }
    .voice-presets-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 440px) {
    .agent-dock-tab {
        padding: 6px 10px;
        gap: 5px;
    }
    .agent-tab-sub,
    .agent-voice-tag {
        display: none;
    }
}

/* ================= 9. TRI-AGENT PROFILES & PERSONALITIES MODAL ================= */
.agent-profiles-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.agent-profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-profile-card:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.3);
}

.agent-profile-card.active-agent {
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.18);
}

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

.profile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-name-block {
    display: flex;
    flex-direction: column;
}

.profile-full-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #fff;
}

.profile-role-title {
    font-family: var(--font-code);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.profile-bio-text {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.45;
}

.profile-personality-box {
    background: rgba(0, 0, 0, 0.35);
    border-left: 3px solid #00f0ff;
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
    font-size: 11.5px;
    color: #e2e8f0;
    line-height: 1.4;
}

.profile-personality-title {
    font-family: var(--font-code);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.profile-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.profile-btn {
    flex: 1;
    padding: 8px 10px;
    font-family: var(--font-code);
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

.profile-btn.primary {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00f0ff;
    color: #00f0ff;
}

.profile-btn:hover {
    filter: brightness(1.2);
}

.model-sync-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    margin-bottom: 12px;
}

.model-sync-badge {
    font-family: var(--font-code);
    font-size: 10.5px;
    font-weight: 600;
    color: #00f0ff;
}





/* ================= 5b. HOLOGRAPHIC MULTI-TURN CHAT TRANSCRIPT & INPUT BAR ================= */
.holo-chat-feed-panel {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    flex: 1 1 0%;
    min-height: 0;
    width: calc(100% - 16px);
    max-width: 720px;
    margin: 5px auto;
    z-index: 20;
    display: flex;
    flex-direction: column;
    background: rgba(6, 11, 22, 0.78);
    border: 1px solid rgba(0, 240, 255, 0.32);
    border-radius: 14px;
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 18px var(--active-dim);
    overflow: hidden;
    pointer-events: auto;
    box-sizing: border-box;
}

.holo-chat-feed-panel.collapsed {
    flex: 0 0 auto;
    height: auto;
}

.holo-chat-feed-panel.collapsed .holo-chat-messages {
    display: none;
}

.holo-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(10, 18, 34, 0.85);
    border-bottom: 1px solid rgba(0, 240, 255, 0.18);
    flex-shrink: 0;
}

.holo-chat-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-code);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.1px;
    color: var(--active-glow);
}

.holo-chat-count {
    font-size: 9.5px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1px 7px;
    border-radius: 10px;
}

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

.holo-chat-hdr-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-family: var(--font-code);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.holo-chat-hdr-btn:hover {
    border-color: var(--active-glow);
    color: #ffffff;
    background: rgba(0, 240, 255, 0.14);
}

.holo-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    user-select: text;
    -webkit-user-select: text;
}

.holo-chat-empty {
    margin: auto 0;
    text-align: center;
    padding: 18px 12px;
    color: #94a3b8;
}

.holo-chat-empty-title {
    font-family: var(--font-code);
    font-size: 12px;
    font-weight: 800;
    color: var(--active-glow);
    letter-spacing: 1.2px;
    margin-bottom: 6px;
}

.holo-chat-empty-sub {
    font-size: 12px;
    line-height: 1.45;
    color: #cbd5e1;
}

.holo-chat-msg {
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.48;
    word-break: break-word;
    user-select: text;
    -webkit-user-select: text;
}

.holo-chat-msg.user {
    align-self: flex-end;
    width: 90%;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: #f8fafc;
}

.holo-chat-msg.assistant {
    align-self: flex-start;
    width: 96%;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(0, 255, 136, 0.28);
    color: #e2e8f0;
}

.holo-chat-msg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.holo-chat-msg-speaker {
    font-family: var(--font-code);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--active-glow);
}

.holo-chat-msg.user .holo-chat-msg-speaker {
    color: #00f0ff;
}

.holo-msg-speak-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 4px;
}

.holo-msg-speak-btn:hover {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.12);
}

.holo-chat-msg-body {
    user-select: text;
    -webkit-user-select: text;
}

.holo-code-block {
    margin: 8px 0;
    border: 1px solid rgba(0, 240, 255, 0.32);
    border-radius: 8px;
    background: #03060c;
    overflow: hidden;
}

.holo-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    background: rgba(0, 240, 255, 0.1);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    font-family: var(--font-code);
    font-size: 10px;
}

.holo-code-lang {
    color: #00f0ff;
    font-weight: 700;
}

.holo-code-copy-btn {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.45);
    color: #00ff88;
    font-family: var(--font-code);
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
}

.holo-code-pre {
    margin: 0;
    padding: 10px;
    overflow-x: auto;
    font-family: var(--font-code);
    font-size: 11.5px;
    line-height: 1.45;
    color: #38bdf8;
    user-select: text;
    -webkit-user-select: text;
}

.holo-inline-code {
    font-family: var(--font-code);
    font-size: 11.5px;
    background: rgba(0, 240, 255, 0.12);
    color: #00f0ff;
    padding: 1px 5px;
    border-radius: 4px;
}

.holo-md-heading {
    font-weight: 800;
    color: #00f0ff;
    margin: 4px 0 2px;
}

.holo-md-li {
    padding-left: 8px;
    margin: 2px 0;
}

.holo-chat-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    max-width: 640px;
    margin-top: 0;
    background: rgba(14, 22, 38, 0.94);
    border: 1.5px solid rgba(148, 163, 184, 0.32);
    border-radius: 24px;
    padding: 4px 6px 4px 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    cursor: text;
    pointer-events: auto;
    z-index: 60;
}

.holo-chat-input-bar:focus-within {
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.16);
}

.holo-chat-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.35;
    min-height: 38px;
    max-height: 110px;
    padding: 7px 4px;
    resize: none;
    overflow-y: auto;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
    touch-action: manipulation;
}

.holo-chat-input::placeholder {
    color: #94a3b8;
    font-size: 15px;
}

.holo-chat-send-btn {
    background: #00ff88;
    color: #041016;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    height: 38px;
    min-height: 38px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.holo-chat-send-btn.stop-mode {
    background: linear-gradient(135deg, #ef4444, #be123c);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
}

.holo-chat-send-btn:active {
    transform: scale(0.95);
}

.holo-chat-msg.error {
    align-self: flex-start;
    width: 96%;
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid rgba(248, 113, 113, 0.55);
    color: #fecaca;
}

.holo-thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 2px;
}
.holo-thinking-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--active-glow);
    box-shadow: 0 0 6px var(--active-glow);
    animation: holoVoxDot 1.2s infinite ease-in-out;
    display: inline-block;
}
.holo-thinking-dots span:nth-child(2) { animation-delay: 0.18s; background: #00f0ff; }
.holo-thinking-dots span:nth-child(3) { animation-delay: 0.36s; background: #ffb700; }
@keyframes holoVoxDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.15); opacity: 1; }
}

@media (max-width: 820px) {
    .holo-chat-feed-panel {
        width: calc(100% - 12px);
        margin: 4px auto;
    }
}
