:root {
  --bg: #0f1419;
  --card: #1a222d;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3d9cf5;
  --border: #2a3544;
  --danger: #f07178;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1 {
  font-size: 1.65rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

textarea {
  resize: vertical;
  min-height: 8rem;
  font-family: inherit;
  margin-bottom: 0.65rem;
}

button {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #0a0e12;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

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

.status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.25rem;
  margin: 0.35rem 0 0.5rem;
}

.status.err {
  color: var(--danger);
}

.meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.spinner {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.spinner::after {
  content: "";
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.registry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

label.inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

label.inline input {
  width: 7rem;
}

.api-key-input {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

tr.row-live {
  animation: rowflash 0.35s ease-out;
}

tr.row-err td {
  border-bottom-color: var(--danger);
}

@keyframes rowflash {
  from {
    background: rgba(61, 156, 245, 0.2);
  }
  to {
    background: transparent;
  }
}
