/* ═══════════════════════════════════════
   LIFE OS AGENT GRID — Mission Control
   ═══════════════════════════════════════ */

/* ── Agent Status Grid ── */
.lifeos-agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.agent-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--agent-color, #a855f7);
  opacity: 0.8;
}

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.agent-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.agent-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: statusPulse 2s ease-in-out infinite;
}

.agent-status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: none;
}

.agent-status-dot.degraded {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.agent-card-domain {
  font-size: 11px;
  font-weight: 600;
  color: var(--agent-color, #a855f7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.agent-card-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.agent-card-tools .tool-count {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 11px;
}

/* ── Orchestrator Hero Card ── */
.orchestrator-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.orchestrator-card::before {
  height: 4px;
  background: linear-gradient(90deg, #a855f7, #6366f1);
}

.orchestrator-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.orchestrator-info {
  flex: 1;
}

.orchestrator-info h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.orchestrator-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.orchestrator-stats {
  display: flex;
  gap: 20px;
}

.orchestrator-stat {
  text-align: center;
}

.orchestrator-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #a855f7;
  display: block;
}

.orchestrator-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Domain Filter Tabs ── */
.domain-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.domain-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.domain-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.domain-tab.active {
  color: #fff;
  border-color: transparent;
}

.domain-tab[data-domain="body"].active { background: #22c55e; }
.domain-tab[data-domain="emotions"].active { background: #a855f7; }
.domain-tab[data-domain="relationships"].active { background: #f97316; }
.domain-tab[data-domain="time"].active { background: #3b82f6; }
.domain-tab[data-domain="work"].active { background: #6366f1; }
.domain-tab[data-domain="finances"].active { background: #f59e0b; }
.domain-tab[data-domain="celebrate"].active { background: #ec4899; }
.domain-tab[data-domain="system"].active { background: #64748b; }
.domain-tab[data-domain="all"].active { background: linear-gradient(135deg, #a855f7, #6366f1); }

/* ── Memory Stats Card ── */
.memory-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.memory-stat-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.memory-stat-tile .mem-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}

.memory-stat-tile .mem-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ── Connection Status Badge ── */
.lifeos-connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.lifeos-connection-badge.connected {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.lifeos-connection-badge.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ── Life Chart Controls Enhancement ── */
.chart-domain-info {
  flex: 1;
  min-width: 0;
}

.chart-domain-agents {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .lifeos-agents-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
  .orchestrator-card {
    flex-direction: column;
    text-align: center;
  }
  .orchestrator-stats {
    justify-content: center;
  }
}

/* ═══════════════════════════════════════
   WHEEL OF LIFE — Spoke Check-In (Reflections)
   ═══════════════════════════════════════ */

.wheel-checkin {
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 14px;
  padding: 16px;
  margin-top: 8px;
}

.wheel-spokes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.wheel-spoke-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.wheel-spoke-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--spoke-color, rgba(168, 85, 247, 0.3));
}

.spoke-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.spoke-info {
  flex: 1;
  min-width: 0;
}

.spoke-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

.spoke-question {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spoke-rating {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.spoke-star {
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.spoke-star:hover {
  transform: scale(1.3);
}

.spoke-star.active {
  text-shadow: 0 0 8px currentColor;
}
