:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #94a3b8;
  --text: #e5e7eb;
  --accent: #38bdf8;
  --error: #ef4444;
  --border: #1f2937;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, #0b1220, #0f172a 40%, #0f172a);
  color: var(--text);
}

.container {
  max-width: 880px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 { font-size: 1.8rem; margin: 0 0 0.25rem; }
.subtitle { color: var(--muted); margin: 0 0 1rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

label span {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input, select, button {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  outline: none;
}

input::placeholder { color: #64748b; }

.actions { margin-top: 0.75rem; }
button {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border: none;
  cursor: pointer;
  font-weight: 600;
}
button:hover { filter: brightness(1.05); }

.kv {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1.25rem;
}
.kv li { display: flex; justify-content: space-between; }

.alert {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--border);
  background: #1f2937;
}
.alert-error { border-color: #7f1d1d; background: #1c1917; }
.alert-error strong { color: var(--error); }

pre.api-error {
  margin-top: 0.5rem;
  background: #0b1220;
  padding: 0.75rem;
  border-radius: 8px;
  overflow-x: auto;
}

.details summary { cursor: pointer; }
.footer { color: var(--muted); margin: 1rem 0 2rem; text-align: center; }