/**
 * ANALYTICS & HEARTBEAT STYLING
 */

/* HEARTBEAT STATUS */

.heartbeat-status {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 230, 207, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.heartbeat-status h3 {
  color: #00d4ff;
  margin-bottom: 15px;
}

.heartbeat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.heartbeat-stat {
  background: rgba(10, 10, 20, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.heartbeat-stat:hover {
  border-color: rgba(0, 212, 255, 0.5);
  background: rgba(0, 212, 255, 0.1);
}

.stat-label {
  color: #aaa;
  font-size: 0.85em;
  display: block;
  margin-bottom: 5px;
}

.stat-value {
  color: #00d4ff;
  font-size: 1.8em;
  font-weight: bold;
  display: block;
}

/* ANALYTICS DASHBOARD */

.analytics-dashboard {
  padding: 20px 0;
}

.analytics-dashboard h2 {
  color: #00d4ff;
  margin-bottom: 25px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.metric-card {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(168, 230, 207, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.3s ease;
}

.metric-card:hover {
  border-color: rgba(0, 212, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.metric-icon {
  font-size: 2em;
  flex-shrink: 0;
}

.metric-label {
  color: #aaa;
  font-size: 0.85em;
  margin-bottom: 5px;
}

.metric-value {
  color: #00d4ff;
  font-size: 1.6em;
  font-weight: bold;
}

/* ANALYTICS SECTIONS */

.analytics-section {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 230, 207, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.analytics-section h3 {
  color: #a8e6cf;
  margin-bottom: 15px;
  font-size: 1.1em;
}

/* TABLES */

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
}

.analytics-table thead {
  background: rgba(0, 212, 255, 0.1);
}

.analytics-table th {
  color: #00d4ff;
  text-align: left;
  padding: 12px;
  font-weight: bold;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.analytics-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.analytics-table tbody tr:hover {
  background: rgba(0, 212, 255, 0.05);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: bold;
}

.status-badge.active {
  background: rgba(0, 212, 100, 0.2);
  color: #00d464;
}

/* TOKEN BREAKDOWN */

.token-breakdown {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.token-row {
  display: grid;
  grid-template-columns: 150px 1fr 100px;
  gap: 12px;
  align-items: center;
}

.token-name {
  color: #fff;
  font-size: 0.95em;
}

.token-bar-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  height: 20px;
  overflow: hidden;
}

.token-bar {
  background: linear-gradient(90deg, #00d4ff 0%, #0099cc 100%);
  height: 100%;
  transition: width 0.3s ease;
}

.token-count {
  color: #aaa;
  font-size: 0.85em;
  text-align: right;
}

/* TIMELINE */

.timeline {
  display: flex;
  gap: 4px;
  height: 60px;
  align-items: flex-end;
  padding: 10px 0;
}

.timeline-item {
  flex: 1;
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.timeline-item:hover {
  opacity: 1 !important;
}

/* SUMMARY GRID */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.summary-item {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.summary-label {
  color: #aaa;
  font-size: 0.85em;
  display: block;
  margin-bottom: 5px;
}

.summary-value {
  color: #00d4ff;
  font-size: 1.4em;
  font-weight: bold;
  display: block;
}

/* ACTIVITY TABLE */

.activity-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  gap: 12px;
  background: rgba(0, 212, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid #00d4ff;
  align-items: center;
}

.activity-time {
  color: #00d4ff;
  font-size: 0.85em;
  font-weight: bold;
}

.activity-desc {
  color: #aaa;
  font-size: 0.9em;
}

.activity-tokens {
  color: #ffa500;
  font-weight: bold;
  text-align: right;
}

/* Responsive */

@media (max-width: 768px) {
  .metrics-grid,
  .summary-grid,
  .heartbeat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .token-row {
    grid-template-columns: 1fr;
  }

  .token-count {
    text-align: left;
  }

  .activity-row {
    grid-template-columns: 1fr;
  }
}
