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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

.navbar {
  background: #1e293b;
  color: white;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-brand { font-weight: 700; font-size: 1.2em; }
.nav-links { display: flex; gap: 16px; flex: 1; }
.nav-links a { color: #94a3b8; text-decoration: none; padding: 4px 8px; border-radius: 4px; }
.nav-links a:hover, .nav-links a.active { color: white; background: #334155; }
.nav-user { display: flex; gap: 12px; align-items: center; font-size: 0.9em; }
.nav-user a { color: #94a3b8; text-decoration: none; }
.nav-user a:hover { color: white; }

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

h1 { margin-bottom: 20px; color: #1e293b; }
h2 { margin-bottom: 16px; color: #334155; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: 8px; padding: 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-value { font-size: 2em; font-weight: 700; color: #4f46e5; }
.stat-label { font-size: 0.85em; color: #64748b; margin-top: 4px; }

.section { margin-bottom: 32px; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background: #4f46e5;
  color: white;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9em;
}
.btn:hover { background: #4338ca; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 4px 10px; font-size: 0.85em; }

.input {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 0.95em;
  background: white;
}
.input:focus { outline: 2px solid #4f46e5; border-color: transparent; }

textarea.input { font-family: inherit; resize: vertical; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }

.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.group-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-left: 4px solid transparent;
}
.group-card.tracked { border-left-color: #22c55e; }
.group-card h3 { margin-bottom: 8px; }
.group-card h3 a { color: #1e293b; text-decoration: none; }
.group-card h3 a:hover { color: #4f46e5; }
.group-card p { font-size: 0.9em; color: #64748b; margin: 2px 0; }

.group-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  margin-top: 8px;
}
.group-status.tracked { background: #dcfce7; color: #166534; }
.group-status.not-tracked { background: #fee2e2; color: #991b1b; }

.feature-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.feature-card h3 { text-transform: capitalize; }

.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.data-table th { background: #f8fafc; text-align: left; padding: 10px 14px; font-weight: 600; color: #475569; border-bottom: 2px solid #e2e8f0; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.data-table tr:hover { background: #f8fafc; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }

.output-detail { background: white; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.output-detail pre { white-space: pre-wrap; word-wrap: break-word; background: #f8fafc; padding: 16px; border-radius: 6px; margin: 12px 0; }
.output-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.output-meta-item { padding: 8px 0; }
.output-meta-item label { font-weight: 600; color: #64748b; font-size: 0.85em; display: block; }
.output-meta-item span { color: #1e293b; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.pagination button { padding: 6px 12px; }

@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; padding: 12px 16px; }
  .nav-links { order: 3; width: 100%; margin-top: 8px; }
  .container { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .group-grid { grid-template-columns: 1fr; }
}
