:root {
  --bg: #0f1419;
  --panel: #171e26;
  --ink: #e8eef4;
  --muted: #8b9aab;
  --line: #2a3542;
  --accent: #3d9cf0;
  --accent-ink: #041018;
  --ok: #3ecf8e;
  --bad: #f07178;
  --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(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #1c3a55 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #243248 0%, transparent 50%),
    var(--bg);
}

.wrap {
  width: min(840px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.hero { margin-bottom: 1.75rem; }
.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
}
h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.03em;
}
.lede { margin: 0; color: var(--muted); max-width: 38rem; line-height: 1.5; }

.panel {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.4rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(6px);
}
.panel h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.muted { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.hint { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: 0.86em; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #212b36;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn:hover { border-color: #3d4d60; }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.85rem;
}
.field.inline { max-width: 12rem; }
.field span { font-size: 0.85rem; color: var(--muted); }
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0c1117;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
textarea { resize: vertical; font-family: var(--mono); font-size: 0.9rem; line-height: 1.45; }
input[type="file"] { color: var(--muted); max-width: 100%; }

.table-wrap {
  margin-top: 0.85rem;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 500; position: sticky; top: 0; background: #121820; }
tr:last-child td { border-bottom: 0; }

.log {
  margin: 0.9rem 0 0;
  padding: 0.85rem;
  background: #0c1117;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.45;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
}
.log .ok { color: var(--ok); }
.log .bad { color: var(--bad); }

.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
