/* FO_DASHBOARD_V1 — System Dashboard dark theme */
body {
  background: #0f172a !important;
  color: #e5e7eb !important;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.dash-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dash-title {
  font-size: 24px;
  font-weight: 800;
  color: #f1f5f9;
}
.dash-sub {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 2px;
}
.dash-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dash-btn {
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.06);
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.dash-btn:hover { background: rgba(255,255,255,0.12); }
.dash-btn.accent { background: #2563eb; border-color: #1d4ed8; color: #fff; }
.dash-btn.accent:hover { background: #1d4ed8; }

/* Grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.dash-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; }
}

/* Cards */
.dash-card {
  background: #1e293b;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.dash-card.full {
  grid-column: 1 / -1;
}
.dash-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  margin-bottom: 8px;
}
.dash-card-value {
  font-size: 28px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.1;
}
.dash-card-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Health Badge */
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.health-HEALTHY { background: rgba(34,197,94,0.15); color: #4ade80; }
.health-DEGRADED { background: rgba(250,204,21,0.15); color: #facc15; }
.health-CRITICAL { background: rgba(249,115,22,0.15); color: #fb923c; }
.health-EMERGENCY { background: rgba(239,68,68,0.15); color: #f87171; }
.health-null, .health-undefined { background: rgba(148,163,184,0.1); color: #94a3b8; }

/* Trajectory Badge */
.traj-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.traj-CONVERGING { background: rgba(34,197,94,0.15); color: #4ade80; }
.traj-DIVERGING { background: rgba(239,68,68,0.15); color: #f87171; }
.traj-OSCILLATING { background: rgba(250,204,21,0.15); color: #facc15; }
.traj-STAGNATING { background: rgba(148,163,184,0.15); color: #94a3b8; }

/* SHV Bar */
.shv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.shv-label {
  font-size: 11px;
  color: #94a3b8;
  width: 120px;
  flex-shrink: 0;
  text-align: right;
}
.shv-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(148,163,184,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.shv-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.shv-val {
  font-size: 11px;
  color: #c8d0dc;
  width: 36px;
  text-align: right;
}

/* Emergence list */
.emg-item {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(148,163,184,0.1);
  margin-bottom: 6px;
  font-size: 12px;
}
.emg-type {
  font-weight: 700;
  margin-right: 6px;
}
.emg-SYNC { color: #f87171; }
.emg-CONFLICT { color: #fb923c; }
.emg-SYNERGY { color: #4ade80; }
.emg-OSCILLATION { color: #facc15; }

/* Quantum */
.q-signal {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.q-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.q-name {
  font-size: 11px;
  color: #94a3b8;
  width: 100px;
}
.q-state {
  font-size: 11px;
  font-weight: 700;
  color: #c8d0dc;
}

/* Loading */
.dash-loading {
  color: #64748b;
  font-size: 12px;
  padding: 8px 0;
}
.dash-error {
  color: #f87171;
  font-size: 12px;
}
