:root {
  --bg: #0e1116;
  --panel: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --danger: #f85149;
  --success: #3fb950;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

p.muted {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

button {
  appearance: none;
  background: var(--accent);
  color: #0e1116;
  border: 0;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
}

button:hover {
  background: var(--accent-hover);
}

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

button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  width: auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

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

input,
select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  font-family: inherit;
}

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

.field {
  margin-bottom: 1rem;
}

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

.status {
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}

.status.show {
  display: block;
}

.status.error {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.status.success {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

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

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

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

code {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  word-break: break-all;
}

textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  min-height: 80px;
  resize: vertical;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

nav {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .brand {
  font-weight: 600;
}

nav .links a {
  margin-left: 1rem;
  color: var(--muted);
}

nav .links a:hover {
  color: var(--text);
}
