:root {
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #1a1e28;
  --border: #262b38;
  --text: #e6e8ee;
  --text-dim: #9aa0b0;
  --accent: #6ee7b7;
  --accent-2: #7c9bff;
  --danger: #ff8080;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #151926, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

header {
  padding: 32px 24px 16px;
  max-width: 1000px;
  margin: 0 auto;
}

header h1 {
  margin: 0 0 4px;
  font-size: 28px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  gap: 24px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text);
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

input,
select,
textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
}

textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
}

button {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 8px;
  color: #0b0d12;
  font-weight: 600;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
}

button.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-row {
  margin-bottom: 16px;
}

.search-row input,
.search-row select {
  flex: 1;
  min-width: 120px;
}

.agent-grid {
  display: grid;
  gap: 12px;
}

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

.agent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-card h3 {
  margin: 0;
  font-size: 16px;
}

.agent-card .slug {
  color: var(--text-dim);
  font-size: 12px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

.agent-card p {
  margin: 8px 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.active {
  background: rgba(110, 231, 183, 0.15);
  color: var(--accent);
}

.badge.inactive {
  background: rgba(154, 160, 176, 0.15);
  color: var(--text-dim);
}

.badge.suspended,
.badge.deprecated {
  background: rgba(255, 128, 128, 0.15);
  color: var(--danger);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  background: rgba(124, 155, 255, 0.12);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.msg {
  font-size: 13px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
}

.msg.error {
  background: rgba(255, 128, 128, 0.1);
  color: var(--danger);
}

.msg.success {
  background: rgba(110, 231, 183, 0.1);
  color: var(--accent);
}

.empty,
.loading {
  color: var(--text-dim);
  font-size: 13px;
  padding: 12px 0;
}

.footer-note {
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  margin-top: -8px;
}

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