* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

#app { display: flex; min-height: 100vh; }

#sidebar {
  width: 220px;
  background: #1a1a2e;
  color: #fff;
  padding: 16px 0;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 0 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 8px;
}

.sidebar-header h5 { margin: 0; font-size: 16px; }

#sidebar nav a {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s;
}

#sidebar nav a:hover, #sidebar nav a.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

#main { flex: 1; background: #f5f6fa; }
#page-content { padding: 24px; max-width: 1200px; }

.metric-cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.metric-card {
  flex: 1; min-width: 160px;
  background: #fff; padding: 20px; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.metric-card .value { font-size: 28px; font-weight: 700; }
.metric-card .label { font-size: 13px; color: #666; margin-top: 4px; }

.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.status-sent { background: #e8f5e9; color: #2e7d32; }
.status-processing { background: #e3f2fd; color: #1565c0; }
.status-failed { background: #fce4ec; color: #c62828; }
.status-pending { background: #fff3e0; color: #e65100; }

.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #ddd; border-top-color: #333; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg { color: #c62828; font-size: 13px; margin-top: 4px; }
