:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --ok: #059669;
  --err: #dc2626;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181d;
    --fg: #e8e8e8;
    --muted: #9ca3af;
    --border: #2f333b;
    --accent: #60a5fa;
    --ok: #34d399;
    --err: #f87171;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

nav {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

a { color: var(--accent); }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }

form { display: flex; flex-direction: column; gap: 0.75rem; }

input, textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  resize: vertical;
}

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

button {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

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

button.link {
  align-self: auto;
  padding: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  font-weight: 400;
}

.muted { color: var(--muted); font-size: 0.9rem; }
.status { min-height: 1.5rem; font-size: 0.9rem; }
.ok { color: var(--ok); }
.err { color: var(--err); }

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

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

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

td:nth-child(3) { word-break: break-word; }
td:nth-child(1), td:nth-child(4) { white-space: nowrap; color: var(--muted); }
