:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1d23;
  --muted: #6b7280;
  --border: #e3e5e9;
  --accent: #2563eb;
  --ok: #16a34a;
  --bad: #dc2626;
  --code-bg: #f0f1f4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card: #1c1f26;
    --text: #e7e9ee;
    --muted: #9aa0ab;
    --border: #2c3038;
    --accent: #5b8def;
    --ok: #4ade80;
    --bad: #f87171;
    --code-bg: #22252c;
  }
}

* { box-sizing: border-box; }

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

.card {
  max-width: 560px;
  margin: 0 auto 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 36px;
}

h1 { margin: 0 0 4px; font-size: 1.4rem; }
h2 { margin: 0 0 4px; font-size: 1.05rem; }
.meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; line-height: 1.5; }

label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }

textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  margin-bottom: 16px;
}
textarea { min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

button {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.danger { background: var(--bad); padding: 6px 14px; font-size: 0.82rem; }
button.secondary { background: var(--muted); padding: 6px 14px; font-size: 0.82rem; }

.hint { color: var(--muted); font-size: 0.82rem; margin-top: -10px; margin-bottom: 16px; }

.result-box {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.status-ok { color: var(--ok); font-weight: 600; }
.status-bad { color: var(--bad); font-weight: 600; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
table tr { border-top: 1px solid var(--border); }
table tr:first-child { border-top: none; }
table td { padding: 10px 6px; vertical-align: middle; font-size: 0.9rem; }
table td.actions { text-align: right; white-space: nowrap; }

.empty { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
.invalid { color: var(--bad); font-size: 0.85rem; margin-bottom: 12px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row input { margin-bottom: 0; flex: 1; }
