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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0e27;
  color: #e0e6ed;
  overflow: hidden;
  height: 100vh;
}

#app { position: relative; width: 100vw; height: 100vh; }

/* Galaxy Canvas */
#galaxy {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.6;
}

/* Header */
#header {
  position: relative; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 30px;
  background: linear-gradient(180deg, rgba(10,14,39,0.95) 0%, rgba(10,14,39,0.7) 100%);
  border-bottom: 1px solid #1e3a5f;
}

#header h1 {
  font-size: 24px; color: #00d4ff;
  text-shadow: 0 0 10px rgba(0,212,255,0.5);
}

#status { display: flex; gap: 20px; }

.status-badge {
  padding: 5px 12px; border-radius: 20px; font-size: 12px;
  background: #1e3a5f; border: 1px solid #00d4ff;
}

.status-badge.online { background: #0a4f2c; border-color: #00ff88; color: #00ff88; }

/* Main Grid */
#main-grid {
  position: relative; z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;
  gap: 15px; padding: 20px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.panel {
  background: rgba(15, 20, 45, 0.85);
  border: 1px solid #1e3a5f;
  border-radius: 8px;
  padding: 15px;
  backdrop-filter: blur(10px);
}

.panel h2 {
  font-size: 16px; color: #00d4ff; margin-bottom: 12px;
  border-bottom: 1px solid #1e3a5f; padding-bottom: 8px;
}

/* Agent Cards */
#agents-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.agent-card {
  background: rgba(30, 58, 95, 0.6);
  border: 1px solid #2a4a7f;
  border-radius: 6px; padding: 10px;
  cursor: pointer; transition: all 0.3s;
}

.agent-card:hover { transform: translateY(-2px); border-color: #00d4ff; }
.agent-card.busy { border-color: #ffaa00; box-shadow: 0 0 10px rgba(255,170,0,0.3); }

.agent-name { font-size: 14px; font-weight: bold; margin-bottom: 5px; }
.agent-type { font-size: 11px; color: #8892b0; margin-bottom: 8px; }
.agent-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.agent-status.idle { background: #0a4f2c; color: #00ff88; }
.agent-status.working { background: #4f3a0a; color: #ffaa00; }

/* Workflow List */
#workflows-list { display: flex; flex-direction: column; gap: 8px; }

.workflow-item {
  background: rgba(30, 58, 95, 0.6);
  border-left: 3px solid #00d4ff;
  border-radius: 4px; padding: 10px;
  cursor: pointer; transition: all 0.3s;
}

.workflow-item:hover { background: rgba(30, 58, 95, 0.9); }
.workflow-item.active { border-left-color: #00ff88; }

.workflow-name { font-size: 13px; font-weight: bold; margin-bottom: 4px; }
.workflow-desc { font-size: 11px; color: #8892b0; margin-bottom: 6px; }
.workflow-meta { display: flex; gap: 10px; font-size: 10px; color: #6b7280; }

/* Goals */
#goals-list { display: flex; flex-direction: column; gap: 8px; }

.goal-item {
  background: rgba(30, 58, 95, 0.6);
  border-radius: 4px; padding: 10px;
}

.goal-title { font-size: 13px; font-weight: bold; margin-bottom: 4px; }
.goal-desc { font-size: 11px; color: #8892b0; margin-bottom: 6px; }
.goal-progress {
  height: 6px; background: #1e3a5f; border-radius: 3px; overflow: hidden;
}
.goal-progress-bar {
  height: 100%; background: linear-gradient(90deg, #00d4ff, #00ff88);
  transition: width 0.3s;
}

/* Chat */
#chat-messages {
  flex: 1; overflow-y: auto; padding: 10px;
  background: rgba(0, 0, 0, 0.3); border-radius: 4px;
  margin-bottom: 10px; min-height: 200px;
}

.chat-message { margin-bottom: 10px; padding: 8px 12px; border-radius: 6px; }
.chat-message.user { background: rgba(0, 212, 255, 0.2); margin-left: 20%; }
.chat-message.agent { background: rgba(0, 255, 136, 0.2); margin-right: 20%; }
.chat-message.system { background: rgba(255, 170, 0, 0.2); text-align: center; font-style: italic; }

#chat-input-area { display: flex; gap: 10px; }
#chat-input { flex: 1; padding: 10px; border-radius: 4px; border: 1px solid #1e3a5f; background: rgba(0,0,0,0.3); color: #e0e6ed; }
#send-btn { padding: 10px 20px; border-radius: 4px; border: none; background: #00d4ff; color: #0a0e27; font-weight: bold; cursor: pointer; }
#send-btn:hover { background: #00ff88; }

/* Memory Stats */
#memory-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-box { background: rgba(30, 58, 95, 0.6); padding: 10px; border-radius: 4px; text-align: center; }
.stat-value { font-size: 24px; font-weight: bold; color: #00d4ff; }
.stat-label { font-size: 11px; color: #8892b0; }

/* Logs */
#logs-list { max-height: 300px; overflow-y: auto; font-family: monospace; font-size: 11px; }
.log-entry { padding: 4px 0; border-bottom: 1px solid rgba(30,58,95,0.5); }
.log-time { color: #6b7280; margin-right: 8px; }
.log-info { color: #00d4ff; }
.log-success { color: #00ff88; }
.log-warning { color: #ffaa00; }
.log-error { color: #ff4444; }
