:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

body {
  margin: 0;
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.hidden {
  display: none !important;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 28px rgb(0 0 0 / 18%);
}

.narrow {
  max-width: 420px;
  margin: 80px auto;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

h1, h2 {
  margin-top: 0;
}

label {
  display: block;
  margin: 12px 0;
  color: #cbd5e1;
}

input, select, button {
  border-radius: 10px;
  border: 1px solid #334155;
  padding: 10px 12px;
  font: inherit;
}

input, select {
  box-sizing: border-box;
  width: 100%;
  margin-top: 6px;
  background: #020617;
  color: #e2e8f0;
}

button {
  cursor: pointer;
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

button.secondary {
  background: #334155;
  border-color: #475569;
}

button.danger {
  background: #dc2626;
  border-color: #dc2626;
}

button:hover {
  filter: brightness(1.08);
}

.actions, .row, .inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-form input, .inline-form select {
  margin-top: 0;
}

.wrap {
  flex-wrap: wrap;
}

.wrap input, .wrap select {
  width: auto;
  min-width: 170px;
  flex: 1;
}

.status {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0 16px;
}

.status.active {
  color: #22c55e;
}

.status.failed, .error {
  color: #f87171;
}

.message {
  min-height: 24px;
  color: #93c5fd;
}

.list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #020617;
  border: 1px solid #1e293b;
}

.item small {
  color: #94a3b8;
}

pre {
  overflow: auto;
  white-space: pre-wrap;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 12px;
  min-height: 80px;
}

@media (max-width: 800px) {
  .grid.two, .topbar {
    grid-template-columns: 1fr;
    display: block;
  }

  .actions, .row, .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
}
