:root {
  --bg0: #0f1419;
  --bg1: #1a222c;
  --line: #2c3847;
  --text: #e7eef7;
  --muted: #8fa3b8;
  --accent: #3db8a0;
  --accent-dim: #2a8f7c;
  --danger: #e06c75;
  --focus: #5ec8ff;
  --radius: 6px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "ui-monospace", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, #1c3a36 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #243044 0%, transparent 50%),
    var(--bg0);
}

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

header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.4rem 0 1.75rem;
  color: var(--muted);
}

section {
  background: color-mix(in srgb, var(--bg1) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.25rem;
  margin-bottom: 1rem;
}

h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

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

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

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

input, select, textarea {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg0);
  color: var(--text);
  font: inherit;
  font-family: var(--mono);
  font-size: 0.9rem;
}

select {
  flex: 0 1 8rem;
  cursor: pointer;
}

textarea.token-out {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  resize: vertical;
  line-height: 1.35;
}

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

button {
  padding: 0.55rem 0.9rem;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #041512;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

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

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

.status {
  min-height: 1.25rem;
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
}

.status.error { color: var(--danger); }
.status.ok { color: var(--accent); }

.list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.list li {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.88rem;
}

.zone-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
}

.zone-meta strong {
  font-family: var(--font);
}

.zone-meta span {
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  margin-top: 0.85rem;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 36rem;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

th:nth-child(3),
td:nth-child(3) {
  width: 8.5rem;
}

th:nth-child(4),
td:nth-child(4) {
  width: 3.25rem;
}

th:last-child,
td:last-child {
  width: 5.25rem;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

td:last-child button {
  width: auto;
}

@media (max-width: 640px) {
  .row { flex-direction: column; }
  button { width: 100%; }
}
