:root {
  --bg: #0c0f17;
  --surface: #141923;
  --surface-border: #212938;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

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

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  padding: 24px;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  margin-bottom: 24px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.subtitle .val {
  color: #60a5fa;
  font-family: 'JetBrains Mono', monospace;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-pill {
  background: #0f172a;
  border: 1px solid #1e293b;
  padding: 10px 18px;
  border-radius: 12px;
  text-align: right;
}

.stat-pill .label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-pill .number {
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}

.btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}

.btn.primary {
  background: var(--primary);
  color: white;
}
.btn.primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn.accent {
  background: #be185d;
  color: white;
}
.btn.accent:hover { background: var(--accent); }

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
}
.btn.small:hover { background: #334155; }

.perf-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.perf-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 16px 20px;
  border-radius: 14px;
}

.perf-title {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.perf-val {
  font-size: 20px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--success);
}

.perf-val.highlight {
  color: #f472b6;
  font-size: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.02);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.card-body {
  padding: 20px;
}

.data-list {
  list-style: none;
}

.data-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
  font-size: 14px;
}

.data-list li:last-child {
  border-bottom: none;
}

.data-list .k {
  color: var(--text-muted);
}

.data-list .v {
  font-family: 'JetBrains Mono', monospace;
  color: #e2e8f0;
  text-align: right;
}

.data-list .v.code {
  color: #a78bfa;
  font-size: 13px;
}

.data-list .v.small-text {
  font-size: 11px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.db-item {
  background: #0f172a;
  border: 1px solid #1e293b;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.db-item .db-title {
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  justify-content: space-between;
}

.status-ok { color: var(--success); }
.status-err { color: var(--danger); }

.benchmark-section {
  margin-bottom: 24px;
}

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px;
}
