/* Colors */
:root {
  --bg: #050b18;
  --bg2: #0a1428;
  --panel-bg: #0c1830;
  --primary: #3ea6ff;
  --accent: #5ec8fa;
  --text: #eaf2ff;
  --text-dim: #7d93b8;
  --green: #3ddc84;
}

* { box-sizing: border-box; }
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar Navigation */
#sidebar {
  width: 80px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  box-shadow: 2px 0 10px rgba(0,0,0,0.7);
}
#sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#sidebar li {
  width: 100%;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
#sidebar li:hover {
  background: rgba(0,255,255,0.1);
}
#sidebar .icon {
  font-size: 24px;
}
#sidebar .label {
  font-size: 10px;
  margin-top: 4px;
}

/* Main Content */
#main-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  padding: 20px;
  overflow: auto;
}

/* Left & Right Panels */
#left-panel,
#right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-section {
  background: #101426;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,255,255,0.2);
}
.panel-section h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--primary);
}

/* Gauges */
.gauges {
  display: flex;
  gap: 10px;
  justify-content: space-around;
}
.gauges {
  flex-direction: column !important;
  gap: 14px !important;
}
.gauge-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gauge {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, rgba(255,255,255,0.08) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 10px rgba(62,166,255,0.35);
}
.gauge::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel-bg);
}
.gauge .gauge-label {
  position: relative;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.gauge-info {
  display: flex;
  flex-direction: column;
}
.gauge-info .gauge-name {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Lists */
#agents-list,
#metrics-list,
#activity-list,
#integration-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}
#agents-list li {
  padding: 6px 4px;
  margin-bottom: 4px;
  border-left: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
#agents-list li[data-status="active"]  .status-dot,
#agents-list li[data-status="running"] .status-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
#agents-list li[data-status="idle"]    .status-dot { background: #f5c542; }
#agents-list li[data-status="error"]   .status-dot { background: #ff5c5c; }
.agent-status-text {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

/* Center Panel */
#center-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
#orb-container {
  width: 200px;
  height: 200px;
  position: relative;
}

#orb-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  pointer-events: none;
}
#orb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent), transparent 70%);
  box-shadow: 0 0 20px var(--accent);
  animation: rotate 12s linear infinite;
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Input Panel */
#input-panel {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#waveform {
  width: 300px;
  height: 50px;
  background: #000;
  border-radius: 4px;
}
#quick-actions .pill {
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent);
}

/* Bottom Bar */
#bottom-bar {
  position: fixed;
  bottom: 0;
  left: 80px;
  right: 0;
  background: #101426;
  padding: 10px 20px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#quick-action-bar {
  display: flex;
  gap: 10px;
}
#command-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
#command-bar input {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--primary);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
}
#command-bar button.pill {
  padding: 8px 12px;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}

/* Sidebar wordmark */
#wordmark {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  padding: 1em 0;
  color: var(--accent);
}
/* Top bar */
#top-bar {
  position: absolute;
  top: 0;
  left: 80px;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: rgba(11,14,23,0.9);
  border-bottom: 1px solid rgba(0,255,255,0.2);
  font-size: 0.9em;
}
#clock {
  margin-left: auto;
}
/* Placeholder list items */
.placeholder {
  color: rgba(255,255,255,0.5);
  font-style: italic;
  text-align: center;
  padding: 0.5em;
}
/* Message bubble */
#message-bubble {
  margin: 20px auto;
  padding: 10px 20px;
  max-width: 400px;
  background: rgba(0,255,255,0.1);
  border: 1px solid var(--accent);
  border-radius: 20px;
  text-align: center;
  color: var(--accent);
}
/* Voice button */
#btn-voice {
  display: block;
  margin: 10px auto;
  padding: 10px 20px;
  font-size: 1em;
  background: var(--accent);
  border: none;
  border-radius: 25px;
  color: #000;
  cursor: pointer;
  box-shadow: 0 0 20px var(--accent);
}
/* Network gauge */
#gauge-network {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, rgba(255,255,255,0.1) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 10px rgba(0,255,255,0.3);
}

/* View routing (Agents/Tasks/Workflows/etc sections) */
#sidebar li.nav-active {
  background: rgba(0,255,255,0.15);
}
#view-panel {
  padding: 24px;
  overflow-y: auto;
  height: 100vh;
  box-sizing: border-box;
}
#view-panel h2 {
  color: var(--accent);
  margin: 0 0 16px;
}
#view-panel .view-table {
  width: 100%;
  border-collapse: collapse;
}
#view-panel .view-table th,
#view-panel .view-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0,255,255,0.15);
  font-size: 0.85rem;
}
#view-panel .view-table th {
  color: var(--accent);
  font-weight: 600;
}
#view-panel .view-empty {
  color: #888;
  padding: 20px 0;
}
#view-panel .settings-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,255,255,0.1);
}
