<!doctype html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>Mastermind — Setup</title>
  <style>
    body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;margin:0;background:#0b0f14;color:#e8eef7}
    header{background:#111824;border-bottom:1px solid #233043;padding:14px 16px}
    main{max-width:700px;margin:0 auto;padding:16px}
    .card{background:#111824;border:1px solid #233043;border-radius:12px;padding:14px;margin:12px 0}
    label{display:block;margin:10px 0 6px;color:#a9b7c6}
    input{width:100%;padding:12px;border-radius:10px;border:1px solid #233043;background:#0e1520;color:#e8eef7}
    button{padding:12px 14px;border-radius:10px;border:1px solid #233043;background:#1c2a3d;color:#e8eef7;margin-top:12px}
    a{color:#7cc4ff;text-decoration:none}
  </style>
</head>
<body>
  <header>
    <div style="display:flex;justify-content:space-between;align-items:center;gap:10px">
      <div style="font-weight:700">Setup</div>
      <a href="/">Back</a>
    </div>
  </header>
  <main>
    <div class="card">
      <h2 style="margin:0 0 8px">Public Base URL</h2>
      <div style="color:#a9b7c6;font-size:13px;line-height:1.4">This should be the URL you use to reach the app (e.g., Tailscale IP). OAuth callbacks rely on this.</div>
      <form method="post" action="/setup/base-url">
        <label>Base URL</label>
        <input name="baseUrl" value="<%= baseUrl %>" />
        <button type="submit">Save</button>
      </form>
    </div>
  </main>
</body>
</html>
