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

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: #f4f4f5;
  color: #1a1a2e;
  min-height: 100vh;
}

.admin-header {
  background: #1a1a2e;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.admin-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
}

.admin-header-actions button {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.admin-header-actions button:hover {
  background: rgba(255,255,255,0.1);
}

/* Auth gate */
.auth-gate {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.auth-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.auth-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  color: #1a1a2e;
}

.auth-card input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 1rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.auth-card button {
  padding: 0.75rem 2rem;
  background: #2d5a3d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.auth-card button:hover {
  background: #1e4a2d;
}

.auth-error { color: #c0392b; margin-top: 0.5rem; font-size: 0.85rem; }

/* Dashboard */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-section {
  margin-bottom: 2rem;
}

.dashboard-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a1a2e;
  border-bottom: 2px solid #2d5a3d;
  padding-bottom: 0.5rem;
}

/* Metrics grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric-card {
  background: white;
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.metric-card.status-good { border-left-color: #27ae60; }
.metric-card.status-warn { border-left-color: #f39c12; }
.metric-card.status-bad { border-left-color: #c0392b; }
.metric-card.status-neutral { border-left-color: #3498db; }

.metric-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.25rem;
}

/* Tables */
.table-container { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.admin-table th {
  background: #f8f8fa;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #666;
  border-bottom: 1px solid #eee;
}

.admin-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.admin-table tbody tr:hover {
  background: #f8f8fa;
}

/* Content gaps */
.content-gaps { margin-top: 1rem; }

.gap-item {
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border-left: 3px solid #f39c12;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.gap-item .gap-query {
  font-weight: 500;
  color: #1a1a2e;
}

.gap-item .gap-meta {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
}

/* User badges */
.user-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-inactive { background: #fbe9e7; color: #c62828; }
.badge-verified { background: #e3f2fd; color: #1565c0; }

.hidden { display: none !important; }

/* Mobile responsive */
@media (max-width: 768px) {
  .admin-header { flex-direction: column; gap: 0.5rem; }
  .dashboard { padding: 1rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
}
