/* Nexus Dashboard — AgentOS Design System */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-hover: #16161f;
  --border: #1e1e2e;
  --accent: #6e8efb;
  --green: #3dd68c;
  --red: #f85149;
  --orange: #f0a500;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h1 .logo {
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  border-radius: 8px;
}

.system-stats {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-value {
  color: var(--text);
  font-weight: 500;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

.projects-section h2,
.sidebar h2 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.project-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.project-card.deprecated {
  opacity: 0.6;
}

.project-card.deprecated:hover {
  border-color: var(--border);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-port {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.online {
  background: rgba(61, 214, 140, 0.15);
  color: var(--green);
}

.status-badge.offline {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
}

.status-badge.deprecated {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.response-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.panel h2 {
  margin-bottom: 1rem;
}

.hermes-input {
  display: flex;
  gap: 0.5rem;
}

.hermes-input input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.hermes-input input:focus {
  outline: none;
  border-color: var(--accent);
}

.hermes-input input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hermes-input button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.hermes-input button:hover:not(:disabled) {
  opacity: 0.9;
}

.hermes-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hermes-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.activity-list {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-time {
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
}

.activity-message {
  color: var(--text);
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .panel {
    flex: 1;
    min-width: 280px;
  }
}
