/* ==========================================================================
   ZERO CORE PRESENCE HUD v2.0 - TOKYO CYBERPUNK STYLING
   ========================================================================== */

:root {
    /* Main Tech Colorway */
    --bg-dark: #050508; /* Deep void space black */
    --bg-panel: rgba(10, 10, 16, 0.72); /* Transluscet high-tech slate */
    --border-glow: rgba(0, 240, 255, 0.15);
    --border-glow-purple: rgba(176, 38, 255, 0.15);
    --panel-border: 1px solid rgba(255, 255, 255, 0.07);
    
    /* Sleek Hologram Neon Glows */
    --neon-blue: #00f0ff;      /* Electric Cyan */
    --neon-purple: #b026ff;    /* Neon Violet */
    --neon-magenta: #ff0077;   /* Cyber Pink */
    
    /* Tech System Alerts */
    --status-green: #39ff14;   /* Acid Green */
    --status-yellow: #ffd700;  /* Laser Yellow */
    --status-red: #ff2a2a;     /* Emergency Red */
    --status-gray: #4b5563;    /* Offline Slate */
    
    /* High-contrast Typography */
    --text-main: #ffffff;      /* Sharp contrast white */
    --text-body: #e4e4e7;      /* Legible body text */
    --text-muted: #8e8e9f;     /* Monospace subtext */
    
    /* Layout Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ==========================================================================
   BASE & RESET SYSTEM
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-body);
    font-family: var(--font-main);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    
    /* Cyberpunk digital blueprint background grid */
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.015) 1px, transparent 1px);
    background-size: 35px 35px;
    background-position: center;
}

/* Utilities */
.hidden { display: none !important; }
.text-cyan { color: var(--neon-blue) !important; }
.text-purple { color: var(--neon-purple) !important; }
.text-pink { color: var(--neon-magenta) !important; }

/* Dynamic Animations */
@keyframes pulse-cyan {
    0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(0, 240, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 42, 42, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 42, 42, 0); }
}
@keyframes spin-clockwise {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes spin-counter {
    0% { transform: translate(-50%, -50%) rotate(360deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}
@keyframes float-hud {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

.pulse { animation: pulse-cyan 2.5s infinite; }
.pulse-red { animation: pulse-red 2s infinite; }

/* Glassmorphism Panel Engine */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: var(--panel-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   SCREENS & TRANSLATIONS
   ========================================================================== */
.screen {
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.screen:not(.active) {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.98);
    z-index: -1;
}
.screen.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* ==========================================================================
   SCREEN 1: LOGIN COMPONENT
   ========================================================================== */
#login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-container {
    padding: 3.5rem 3rem;
    width: 420px;
    text-align: center;
    border-top: 3px solid var(--neon-blue);
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.07);
}
.login-logo i {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    color: var(--neon-blue);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}
.login-logo h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
}
.login-logo p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-purple);
    letter-spacing: 4px;
    margin-top: 6px;
    margin-bottom: 2.5rem;
}
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-blue);
    font-size: 0.95rem;
}
.input-group input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}
.input-group input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
    background: rgba(0, 0, 0, 0.6);
}

/* Futuristic Cyberpunk Button */
.cyber-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cyber-btn:hover {
    background: var(--neon-blue);
    color: #000000;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.45);
}
.cyber-btn.primary {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}
.cyber-btn.primary:hover {
    background: var(--neon-purple);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.45);
}
.error-msg {
    margin-top: 1.2rem;
    padding: 10px;
    background: rgba(255, 42, 42, 0.08);
    border: 1px solid rgba(255, 42, 42, 0.25);
    border-radius: 6px;
    color: var(--status-red);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   SCREEN 2: HUD DASHBOARD ENGINE
   ========================================================================== */
#dashboard-screen {
    display: flex;
    padding: 20px;
    gap: 20px;
    height: 100vh;
    width: 100vw;
}

/* --------------------------------------------------------------------------
   COLUMN 1: LEFT PANEL (TELEMETRY & LOGS)
   -------------------------------------------------------------------------- */
.left-panel {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

/* Brand Lobby Info */
.brand-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid var(--neon-blue);
    flex-shrink: 0;
}
.brand-header .logo-icon {
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.brand-header .brand-text h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.brand-header .brand-text span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: block;
}

/* Cards Shared Rules */
.hud-card {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}
.hud-card h3 {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.hud-card h3 i {
    color: var(--neon-blue);
}

/* Telemetry Card */
.telemetry-card {
    border-left: 2px solid var(--neon-blue);
    flex-shrink: 0;
}
.telemetry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}
.telemetry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 6px;
}
.telemetry-item .label {
    font-family: var(--font-mono);
    color: var(--text-muted);
}
.telemetry-item .value {
    font-weight: 600;
    display: flex;
    align-items: center;
}
.telemetry-item .value.code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.telemetry-item .status-dot {
    width: 6px;
    height: 6px;
    margin-right: 6px;
}
.badge-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}
.badge-status.online {
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.25);
    color: var(--status-green);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.15);
}
.badge-status.offline {
    background: rgba(255, 42, 42, 0.08);
    border: 1px solid rgba(255, 42, 42, 0.25);
    color: var(--status-red);
}

/* Brain load bar */
.gauge-wrapper {
    margin-top: 5px;
}
.gauge-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.gauge-bar {
    height: 5px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}
.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border-radius: 3px;
    box-shadow: 0 0 6px var(--neon-blue);
    transition: width 0.8s ease-in-out;
}

/* Camera Card HUD */
.camera-card {
    border-left: 2px solid var(--neon-purple);
    flex-shrink: 0;
}
.camera-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.camera-card .card-header h3 { margin-bottom: 0; }
.rec-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--status-red);
    display: flex;
    align-items: center;
}
.rec-badge .status-dot {
    width: 6px;
    height: 6px;
    margin-right: 4px;
}
.camera-viewport {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    position: relative;
}
.viewport-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

/* Corners indicators in camera viewer */
.hud-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--neon-purple);
}
.hud-corner.top-left { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.hud-corner.top-right { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.hud-corner.bottom-left { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.hud-corner.bottom-right { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.camera-placeholder-icon {
    font-size: 1.8rem;
    color: rgba(176, 38, 255, 0.25);
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(176, 38, 255, 0.1);
}
.viewport-hud .placeholder-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.viewport-hud .sub-placeholder-text {
    font-size: 0.6rem;
    color: #555566;
    margin-top: 4px;
    text-align: center;
}

/* Events Card */
.events-card {
    border-left: 2px solid var(--neon-blue);
    flex: 1;
    min-height: 0;
}
.event-feed-container {
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
}
.event-item {
    margin-bottom: 6px;
    line-height: 1.5;
    color: var(--text-muted);
    word-break: break-all;
}
.event-item .event-time {
    color: var(--neon-purple);
    font-weight: 700;
    margin-right: 6px;
}

/* --------------------------------------------------------------------------
   COLUMN 2: CENTER PANEL (NUCLEUS HUB & ACTIONS)
   -------------------------------------------------------------------------- */
.center-panel {
    width: 43%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    position: relative;
}

/* Top Information Header */
.top-info-bar {
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--neon-blue);
    flex-shrink: 0;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.info-item .divider {
    color: rgba(255,255,255,0.1);
    margin: 0 4px;
}
.top-info-bar .gear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}
.top-info-bar .gear-btn:hover {
    color: var(--status-red);
}

/* Holographic Particle Nucleus wrapper */
.nucleus-container {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* WebGL Particles behind the avatar */
#canvas-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Centered Mascot visualizer */
.avatar-sphere-wrapper {
    position: relative;
    width: 210px;
    height: 210px;
    margin-bottom: 25px;
    z-index: 1;
    animation: float-hud 6s ease-in-out infinite;
}

/* Outer Concentric Technology Ring (Clockwise) */
.avatar-ring-outer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 255px;
    height: 255px;
    border: 1px dashed var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
    animation: spin-clockwise 15s linear infinite;
    z-index: 0;
}

/* Inner Concentric Technology Ring (Counter-Clockwise) */
.avatar-ring-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 232px;
    height: 232px;
    border: 1px dashed var(--neon-purple);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.15);
    animation: spin-counter 12s linear infinite;
    z-index: 0;
}

/* Centered circular image container */
.avatar-sphere {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--neon-purple);
    box-shadow: 0 0 30px rgba(176, 38, 255, 0.35);
    background: rgba(5, 5, 8, 0.85);
    z-index: 1;
}
.avatar-sphere img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(0.9);
}

/* Text Meta details below visualizer */
.avatar-meta-data {
    text-align: center;
    z-index: 1;
}
.avatar-meta-data h1 {
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 10px;
    letter-spacing: 6px;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}
.letter-spacing-large {
    padding-left: 6px; /* offset letter spacing centering */
}
.state-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid var(--neon-blue);
    border-radius: 20px;
    padding: 4px 18px;
    letter-spacing: 2px;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

/* Floating Control Dock Toolbar */
.floating-action-dock {
    width: auto;
    padding: 12px 25px;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    border-radius: 30px;
    flex-shrink: 0;
    z-index: 1;
    border-bottom: 2px solid var(--neon-purple);
}
.dock-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dock-btn:hover {
    color: var(--neon-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    transform: scale(1.08);
}

/* Mic central button logic */
.dock-btn.main-mic-btn {
    width: 52px;
    height: 52px;
    background: rgba(176, 38, 255, 0.08);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}
.dock-btn.main-mic-btn:hover {
    color: #ffffff;
    background: var(--neon-purple);
    box-shadow: 0 0 15px rgba(176, 38, 255, 0.45);
}

/* BLINKING RECORD DOCK STATE */
.dock-btn.main-mic-btn.recording {
    background: rgba(255, 42, 42, 0.08);
    border-color: var(--status-red);
    color: var(--status-red);
    animation: pulse-red 1.5s infinite;
}
.dock-btn.main-mic-btn.recording:hover {
    background: var(--status-red);
    color: #ffffff;
}

.dock-btn.active {
    color: var(--status-green) !important;
    border-color: var(--status-green) !important;
    background: rgba(57, 255, 20, 0.08) !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2) !important;
}

/* --------------------------------------------------------------------------
   COLUMN 3: RIGHT PANEL (CONVERSATION ENGINE)
   -------------------------------------------------------------------------- */
.right-panel {
    width: 32%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--neon-purple);
    padding: 0;
    overflow: hidden;
}

/* Chat Header title bar */
.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-header-title i {
    font-size: 1.1rem;
}
.chat-header-title h3 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.tech-btn {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}
.tech-btn:hover {
    border-color: var(--status-red);
    color: var(--status-red);
    background: rgba(255, 42, 42, 0.05);
}

/* Scrolling Chat messages panel */
.chat-scroll-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scroll-behavior: smooth;
}

/* Chat message bubbles optimized for legibility ("se lee excelente") */
.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 10px;
    line-height: 1.6;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    word-break: break-word;
}
.message.system {
    align-self: center;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 8px 15px;
}
.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(0, 240, 255, 0.02) 100%);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-right: 3.5px solid var(--neon-blue);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.04);
}
.message.zero {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(176, 38, 255, 0.08) 0%, rgba(176, 38, 255, 0.02) 100%);
    border: 1px solid rgba(176, 38, 255, 0.25);
    border-left: 3.5px solid var(--neon-purple);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(176, 38, 255, 0.04);
}

/* Markdown tables legibility in chat */
.msg-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.msg-content th, .msg-content td {
    border: 1px solid rgba(255,255,255,0.08);
    padding: 6px 10px;
    text-align: left;
}
.msg-content th {
    background: rgba(255,255,255,0.04);
    color: var(--neon-blue);
}

/* Input area dock wrapper */
.chat-input-dock {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    background: rgba(5, 5, 8, 0.4);
    flex-shrink: 0;
}
.chat-input-wrapper {
    display: flex;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s;
    align-items: center;
}
.chat-input-wrapper:focus-within {
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(176, 38, 255, 0.25);
    background: rgba(0, 0, 0, 0.7);
}

/* Clip paperclip icon */
.input-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 18px;
    height: 100%;
    cursor: pointer;
    font-size: 1.05rem;
    transition: color 0.3s;
}
.input-action-btn:hover {
    color: var(--neon-blue);
}

/* Text input optimize for writing ("se escribe excelente") */
.chat-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 8px;
    color: var(--text-main);
    outline: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}
.chat-input-wrapper input::placeholder {
    color: #555566;
}

/* Send plane icon button */
.send-submit-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 20px;
    height: 100%;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.3s;
}
.chat-input-wrapper:focus-within .send-submit-btn {
    color: var(--neon-purple);
}
.send-submit-btn:hover {
    color: var(--neon-blue) !important;
    transform: scale(1.08);
}

/* Image preview attachment inside chat dock */
#image-preview-container {
    padding: 10px 24px 0 24px;
    display: flex;
    background: rgba(5, 5, 8, 0.4);
    flex-shrink: 0;
}
.preview-wrapper {
    position: relative;
    width: 65px;
    height: 65px;
    border-radius: 6px;
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    overflow: hidden;
}
#image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#remove-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--status-red);
    color: var(--status-red);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    cursor: pointer;
}
#remove-image-btn:hover {
    background: var(--status-red);
    color: #ffffff;
}

/* Embedded image in chat bubbles */
.chat-attached-image {
    max-width: 100%;
    max-height: 180px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-top: 10px;
    display: block;
    cursor: pointer;
    transition: all 0.3s;
}
.chat-attached-image:hover {
    transform: scale(1.015);
    border-color: var(--neon-blue);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

/* Fullscreen zoom modal overlay */
#image-modal {
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 3, 5, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}
#image-modal.modal-hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}
#modal-img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 6px;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.55);
}
.modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    transition: color 0.3s;
}
.modal-close:hover {
    color: var(--neon-red);
}

/* ==========================================================================
   INTERACTIVE 3D MEMORY MAP ACTIONS & TRANSITIONS
   ========================================================================== */

/* Tooltip for 3D Memory Nodes */
#tip {
    position: absolute;
    display: none;
    background: rgba(5, 5, 8, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 11px;
    font-family: var(--font-mono);
    line-height: 1.4;
    pointer-events: none;
    z-index: 2000;
    max-width: 320px;
    color: rgba(200, 220, 255, 0.9);
    white-space: pre-line;
    box-shadow: 0 5px 25px rgba(0, 240, 255, 0.2);
}

/* Base transitions for Avatar components */
.avatar-sphere-wrapper {
    position: relative;
    width: 210px;
    height: 210px;
    margin-bottom: 25px;
    z-index: 1;
    animation: float-hud 6s ease-in-out infinite;
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

.avatar-ring-outer, .avatar-ring-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

.avatar-meta-data {
    text-align: center;
    z-index: 1;
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

#canvas-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}

/* ACTIVE INTERACTIVE MEMORY MODE CONFIGURATION */

/* Hide rings to prevent overlap and noise */
.nucleus-container.memory-mode-active .avatar-ring-outer,
.nucleus-container.memory-mode-active .avatar-ring-inner {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.5);
}

/* Minimize Avatar and anchor it to bottom-left */
.nucleus-container.memory-mode-active .avatar-sphere-wrapper {
    position: absolute;
    bottom: 25px;
    left: 25px;
    width: 76px;
    height: 76px;
    margin-bottom: 0;
    z-index: 10;
    animation: none; /* disable float HUD */
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.45);
    border-color: var(--neon-purple);
}

/* Hide status texts to clean visual workspace */
.nucleus-container.memory-mode-active .avatar-meta-data {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Enable pointer events on 3D canvas so users can rotate, drag, and zoom */
.nucleus-container.memory-mode-active #canvas-3d {
    pointer-events: auto;
}

/* Custom technological scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Floating Category Filter Card Styles */
#memory-filter-card {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 240px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    padding: 15px;
    border-right: 2.5px solid var(--neon-purple);
    background: rgba(10, 10, 16, 0.90);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
#memory-filter-card h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: var(--neon-blue);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 6px;
    text-transform: uppercase;
}
.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    margin-bottom: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.filter-item:hover {
    color: var(--text-main);
}
.filter-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.filter-item input[type="checkbox"] {
    accent-color: var(--neon-purple);
    cursor: pointer;
    width: 13px;
    height: 13px;
}
.filter-count {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
}

/* 3A.2: dot ambar para estado PROCESANDO/ATENCION */
.status-dot.amber { background: #ffb02e; box-shadow: 0 0 6px #ffb02e; border-radius: 50%; display: inline-block; }

/* 3A.4: Mission Control multi-agente */
.agents-list { display: flex; flex-direction: column; gap: 7px; max-height: 230px; overflow-y: auto; }
.agent-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.agent-status .status-dot { width: 8px; height: 8px; }
.agent-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.agent-name { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-role { font-size: 0.64rem; opacity: 0.55; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-badge { font-family: var(--font-mono); font-size: 0.58rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.agent-badge.online { color: var(--status-green); border: 1px solid rgba(57,255,20,0.3); }
.agent-badge.standby { color: #ffb02e; border: 1px solid rgba(255,176,46,0.3); }
.agent-badge.off { color: var(--status-red); border: 1px solid rgba(255,42,42,0.3); }

/* 3A.7: Memory Banks - navegador paginado de ChromaDB */
.memory-banks-card .mem-layers { display: flex; gap: 6px; margin-bottom: 8px; }
.mem-layer { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 6px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: inherit; cursor: pointer; font-family: var(--font-mono); transition: all .15s; }
.mem-layer:hover { background: rgba(255,255,255,0.06); }
.mem-layer.active { border-color: var(--status-green); box-shadow: 0 0 8px rgba(57,255,20,0.15); }
.mem-layer-name { font-size: 0.62rem; letter-spacing: 1px; opacity: 0.85; }
.mem-layer-count { font-size: 0.8rem; font-weight: 700; color: var(--status-green); }
.mem-items { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; margin-bottom: 8px; }
.mem-item { display: flex; gap: 8px; padding: 6px 8px; border-radius: 6px; background: rgba(255,255,255,0.025); border-left: 2px solid rgba(255,255,255,0.1); }
.mem-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; box-shadow: 0 0 5px currentColor; }
.mem-body { display: flex; flex-direction: column; min-width: 0; }
.mem-tag { font-family: var(--font-mono); font-size: 0.58rem; opacity: 0.7; letter-spacing: 0.5px; }
.mem-text { font-size: 0.7rem; line-height: 1.3; opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mem-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mem-pgbtn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: inherit; border-radius: 5px; padding: 4px 10px; cursor: pointer; font-size: 0.7rem; }
.mem-pgbtn:hover:not(:disabled) { background: rgba(57,255,20,0.1); border-color: var(--status-green); }
.mem-pgbtn:disabled { opacity: 0.3; cursor: not-allowed; }
#mem-pageinfo { font-family: var(--font-mono); font-size: 0.62rem; opacity: 0.7; }

/* 3A.8: scroll interno de la columna izquierda (muchas cards) */
.left-panel { overflow-y: auto; overflow-x: hidden; }

/* 3A.8: responsive - apilar columnas en pantallas angostas */
@media (max-width: 1100px) {
    #dashboard-screen { flex-direction: column; height: auto; min-height: 100vh; overflow-y: auto; }
    .left-panel, .center-panel, .right-panel { width: 100%; height: auto; flex-shrink: 0; }
    .left-panel { overflow: visible; max-height: none; }
    .nucleus-container { min-height: 420px; }
    .right-panel { min-height: 480px; }
}
@media (max-width: 600px) {
    #dashboard-screen { padding: 10px; gap: 12px; }
    .top-info-bar { flex-wrap: wrap; gap: 8px; }
}
